diff options
| author | Paul Buetow <paul@buetow.org> | 2026-02-07 23:46:42 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-02-07 23:46:42 +0200 |
| commit | f408ae894e4e10bbf4358c7c07bb9618ef1353e4 (patch) | |
| tree | 0722f09473a58f1b9027e271cd6bd0e96e7a390d /fish/conf.d/ai.fish | |
| parent | bf56ef64278a90acab9116311e649e762d39cd34 (diff) | |
rename
Diffstat (limited to 'fish/conf.d/ai.fish')
| -rw-r--r-- | fish/conf.d/ai.fish | 30 |
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' |
