summaryrefslogtreecommitdiff
path: root/fish/conf.d/ai.fish
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-02-07 23:46:42 +0200
committerPaul Buetow <paul@buetow.org>2026-02-07 23:46:42 +0200
commitf408ae894e4e10bbf4358c7c07bb9618ef1353e4 (patch)
tree0722f09473a58f1b9027e271cd6bd0e96e7a390d /fish/conf.d/ai.fish
parentbf56ef64278a90acab9116311e649e762d39cd34 (diff)
rename
Diffstat (limited to 'fish/conf.d/ai.fish')
-rw-r--r--fish/conf.d/ai.fish30
1 files changed, 30 insertions, 0 deletions
diff --git a/fish/conf.d/ai.fish b/fish/conf.d/ai.fish
new file mode 100644
index 0000000..01993c4
--- /dev/null
+++ b/fish/conf.d/ai.fish
@@ -0,0 +1,30 @@
+# set -gx HEXAI_PROVIDER copilot
+
+function ai::cursor_agent
+ set last_updated_file ~/.cursor_agent_last_updated
+ if not test -e $last_updated_file
+ cursor-agent update
+ touch $last_updated_file
+ else
+ set current_time (date +%s)
+ if test (uname) = Darwin
+ set file_time (stat -f %m $last_updated_file 2>/dev/null)
+ else
+ set file_time (stat -c %Y $last_updated_file 2>/dev/null)
+ end
+ set time_diff (math "$current_time - $file_time")
+ if test $time_diff -gt 86400
+ cursor-agent update
+ touch $last_updated_file
+ end
+ end
+ touch ~/.nofish
+ cursor-agent
+end
+
+function a
+ ai::cursor_agent
+end
+
+abbr -a suggest hexai
+abbr -a explain 'hexai explain'