Commit Graph
56 Commits
Author SHA1 Message Date
thejoker.msk 11fad73ef5 fix(cd): harden zoxide directory suggestions 2026-08-14 13:11:21 +03:00
Kenny B 0b2221d5e9 feat(cd): optionally complete from zoxide's database
`cd` completes from FileGenerator, which reads one directory: the one you
are standing in. So `cd proj` only ever resolves when proj happens to be
a child of the current directory, and returns nothing at all otherwise --
including for directories visited constantly. That is the opposite of
what cd is normally reached for, and it reads as completion being broken
rather than as a scope limit.

zoxide.extend-cd routes `cd` through the generator `z` already uses, so
local children are offered first and zoxide's frecency database fills in
everything else, reachable by name from anywhere.

Off by default: it shells out to zoxide, and offering absolute paths from
outside the current directory is a real change in what `cd` proposes.

The query is also cached for two seconds. Generators run on every
keystroke and `zoxide query -l` is a subprocess costing ~11ms here, which
is the whole redraw budget; the list only changes when the user changes
directory, so the window costs nothing. This applies to `z` and `zi` too,
which were paying it per keystroke already.
2026-08-14 13:01:02 +03:00
VERSE 30619a8621 docs: AI guide (#117)
- AGENTS.md
- CLAUDE.md

I think we need this because I know many or most of contributors is
using AI for contributing
This is not excessive
2026-08-04 22:34:21 +07:00
VERSE 27e0792560 feat(spec): better file path suggestions (#41)
Enhance file/folder suggestion
2026-07-26 20:43:05 +07:00
VERSE 6ffb9f83f2 feat(scoring): transition workflow learning and fix history UX (#39)
- add transition scoring engine to learn sequential workflows per
directory using command skeletons
- prioritize current active git branch over older branches in
suggestions
- restore strict chronological order for history navigation and bypass
AI re-ranking
- add in-memory session history for instant access to just-run commands
- fix PTY prompt not syncing when using arrow keys in the history menu
- fix history tie-breaker to properly prioritize newer commands by
assigning larger IDs
- fix potential mutex deadlock between bufferMu and pty write during
history navigation
- fix workspace git detection to remove depth limits and correctly
identify repositories with detached HEADs
- fix SQLite connection leaks in frecency queries
- fix global state leaks in history tests by snapshotting and restoring
registry states
- modernize string prefix checks using strings.CutPrefix
2026-07-26 19:10:56 +07:00
VERSE 860b475b53 feat: scoring and frecency (#37)
Enhance lookup mechanics and priority propagation (`spec/lookup.go`)
Remove the requirement of typing a leading `-` when searching for
options, allowing flag suggestions to surface naturally during input
Accurately forward the `Priority` field from registry specs into the
`Suggestion` struct so the scoring engine evaluates relevance properly

Integrate scoring into the main suggestion pipeline
(`root/suggestions.go`)
Collect context signals using `scoring.CollectSignals(cwd, query,
rootCmd, store)` with the live working directory retrieved from
`spec.GetCWD()`
Pass the entire deduplicated list across spec, history and AI items
through `scoring.Score(deduped, signals)` to compute scores and sort by
descending order before rendering on screen

Record execution history in Frecency Store (`root/wrapper.go`)
Save the last executed command to `lastSubmittedCommand` whenever Enter
is pressed or a suggestion is selected
Trigger `store.Record(...)` asynchronously within the `IRIS_CMD_STOP`
hook using a dedicated goroutine guarded by panic recovery and timeout
limits, preventing blocks on the main shell thread

Optimize workspace identification for AI
(`internal/ai/context_provider.go`)
Use `workspace.DetectCached(cwd)` to instantly fetch ecosystem context
across Git, Node, Go, Rust, Python and Docker alongside active git
branch state
This caching mechanism avoids redundant subprocess execution when
outside git repositories, significantly speeding up prompt context
generation
2026-07-13 17:56:29 +07:00
VERSE 94c8af7b1d feat: AI suggestion (#34)
## Feat
* feat(ai): add AI suggestion engine, context gathering, and ghost text
overlay (`v0.3.0`)

## Security & Perf
* fix(ai): restrict background `--help` execution to a hardcoded command
allowlist to prevent RCE
* fix(root): defer context cancellation in goroutine to prevent resource
leaks
* perf(ai): implement LRU eviction and maximum size limit for
`ProviderCache`
* perf(ai): truncate command context output
(`CommandContextProvider.Gather`) to 1000 characters to save tokens

## Bug Fixes
* fix(ai): add mutex synchronization and thread-safe snapshotting to
`AIEngine.RegisterProvider` and `GatherDynamicContext`
* fix(ai): return a copy of fresh `Suggestion` in `AIEngine.Suggest` to
prevent cache mutation
* fix(ai): use length-prefixed encoding in `EnvSnapshot.Hash` to prevent
delimiter collisions
* fix(ai): skip variable assignment lines containing `=` when extracting
Makefile targets
* fix(runner): check `scanner.Err()` and return `nil` on scan errors in
justfile generator
* test(ci): rename `git commit` to `git checkout` in overlay test to
resolve CI `typos` false positive
2026-07-11 15:17:14 +07:00
VERSE ebde9ba68f refactor(commands): separate commands and its core into two folders (#32)
- I think it would be better if one for commands only, one for the spec
handling core logic so people won't be confused by the core logic inside
the commands folder (cleaner I guess)
- Regen docs
2026-07-05 11:27:30 +07:00
VERSE 2ef3c90819 feat(commands): more commands (#30)
- I wrote a scripts to copy and generate all commands missing in iris
from fig repo: https://github.com/withfig/autocomplete
- Add a new script to generate commands docs about which commands
currently are inside commands folder
377d4aac663590e504fe39a92eb4dac4cbd333b2
- Add more icons e64d4e70a1db61e62053460a882e093bd6373ab1
2026-07-04 22:08:36 +07:00
VERSE ffa336196a chore: use go fix to enhance codebase (#29)
This pull request modernizes the codebase by adopting Go 1.21+ features, including built-in functions like min and max, standard library iterators such as strings.SplitSeq and strings.FieldsSeq, utility functions like maps.Copy and slices.Contains, and string manipulation helpers like strings.Cut and strings.CutPrefix. Feedback is provided on a test file where the usage of strings.Builder can be further optimized to avoid unnecessary string allocations during concatenation.

`go fix -diff ./...`
2026-07-04 19:44:38 +07:00
VERSE ca9d30af9c fix: data race and overlay bugs (#20)
- redundant ghost text
- prompt deletion bug on overlay
- overlay bug on the non-exists commands

<img width="1152" height="221" alt="image"
src="https://github.com/user-attachments/assets/29ef0c1f-4cd8-4e36-960f-352010fc3bd1"
/>
<img width="1275" height="470" alt="image"
src="https://github.com/user-attachments/assets/aa765110-f9fa-49c8-94f2-767a827f5e5f"
/>
<img width="2517" height="152" alt="image"
src="https://github.com/user-attachments/assets/47a6668f-fb01-46be-9ad2-2c50c283f175"
/>
2026-07-03 12:29:42 +07:00
VERSE ea82216dc9 style(ui): redesign new menu (#18)
- 2 mode classic (the old one) and modern
a2a17cab3a4bdf27abd2a956f9d53a0c4a685909
- add icon 3a11c7a6beb1dcf11e89977f380376fdea9fba89
- fix some bugs
2026-07-03 11:50:35 +07:00
VERSE f37f0681ce feat: better debugger (#13)
- create centralized structured logger with rotation
(https://github.com/versenilvis/IRIS/commit/96ad7c95ef0f7a9957b1bbf70bb6c8da3ce28b2e)
- update core lookup and utils to use new logger
(https://github.com/versenilvis/IRIS/commit/8b74b5a9cdc1828cff8c6d0bdaaccbe31da7a00a)
- add log startup metadata and propagate reload flags
(https://github.com/versenilvis/IRIS/commit/31208aa91a58e9e09abbf5497c314f5c961a58e2)
- add log key interceptions and pty events
(https://github.com/versenilvis/IRIS/commit/91ccb92835dd16ee70bf630fe0f267aad93c9db0)
- add test for logger 221a40c893b75e6215787163cd751a4c1cb6c1d8
- secure reload arguments file path to prevent symlink attacks
(https://github.com/versenilvis/IRIS/pull/13/commits/c3eabfda451230e52cb71f0c2a556687f839bd3f)
- close log file on reinitialization to prevent descriptor leak
(https://github.com/versenilvis/IRIS/pull/13/commits/a57d2c9be107a8c6200cf7046cc85b2f58667dce)
2026-07-01 20:09:38 +07:00
VERSE aca3d1670c fix: better suggestion and overlay movement on key presses (#12)
- support history suggestions for aliases
https://github.com/versenilvis/IRIS/commit/0ae25d05ce0faf8ff2eeee9aa3fbb5889d9ad511
- merge spec and history results
(https://github.com/versenilvis/IRIS/commit/315c94f12bb689ad6b39b1f0ce5e0bdef71f38d5)
- add 25ms pty throttle and optimize ctrl+l
(https://github.com/versenilvis/IRIS/commit/1e603d74c208be00f6b2cb79a628416455711c3a)
- align suggestion menu to col 1
(https://github.com/versenilvis/IRIS/commit/e307b210849af65276e93e1cff8895f3b54937ff)
- resolve zsh ipc fd mismatch and generate autocomplete hooks
(https://github.com/versenilvis/IRIS/pull/12/commits/2199607fad8122ec441ff4b99e562ca62bd948ff)
- fix: eliminate prompt duplication and freeze UI movement during menu
navigation
https://github.com/versenilvis/IRIS/pull/12/commits/6783989a49f0a68d01bad542588983a5c7b597a2
2026-07-01 16:11:38 +07:00
VERSE a2972f61f1 chore(commands): more commands for suggestions (#10)
## What's new
- color completion message command green
https://github.com/versenilvis/IRIS/pull/10/commits/6e141f5e6909fad1ec42725cce38d51729acf399
- new flat command folder structure
https://github.com/versenilvis/IRIS/pull/10/commits/87026a854a529ec5d5baed967d5f7a7f0085a24b
- fix some linter problems
https://github.com/versenilvis/IRIS/pull/10/commits/536de790cefda912f50bf4022e40ce2b965db2e2
- fix some gemini fix suggestions
2026-06-23 10:27:26 +07:00
VERSE 3d76a3ee88 feat: toml config support (#9)
## What's new
- TOML config support 
- add config init command to justfile
https://github.com/versenilvis/IRIS/pull/9/commits/a5bb6c23d74ca73385b3590d2eb275ce6429906b
- add copy binary file to local bin on reload
https://github.com/versenilvis/IRIS/pull/9/commits/4da3acdbc58c28f20fa0021d15fec82823ba392b
- init config on setup
https://github.com/versenilvis/IRIS/pull/9/commits/fb48b6bb832f38e24fab9211d92858bab9a58a07

## Fix
- add lsof to support macos because /proc filesystem is Linux-specific
and does not exist on macOS 0439d829573864fcf902fc4127f7d45384bfab01
- git push doesnt suggest current branch, fix
https://github.com/versenilvis/IRIS/pull/9/commits/b498532b401b764a4a1a2c70b3cb44b7caf72320
- use timeout context for lsof command in reload handler
https://github.com/versenilvis/IRIS/pull/9/commits/1a2baee951e6538a729da12aedfe53960e51102d
2026-05-30 22:05:06 +07:00
VERSE bf67e50ea6 Feat: crash log (#7)
Merged #6
- crash log (db0e1be9a02f70927124f9f3563df5e9dee3a764)
- perf(watchdog): limit buffer size and optimize crash substring search (https://github.com/versenilvis/IRIS/pull/7/commits/7725434fedf8b32929dc0d71e1256fda13cfdfca)
- refactor(crash): use dynamic buffer for stack trace capture (https://github.com/versenilvis/IRIS/pull/7/commits/07809a4330a1236471e8dae0e83afd4323a4c83a)
2026-05-23 23:32:36 +07:00
VERSE d06526cf21 Fix: issue #4 and #5 (#6)
- Issue #4: currently there is no official release yet so we cant
download from installer
- I added an installer debugger here to test
(f091dbf13bdf109b631951e2558651f560ca8b84)
- Issue #5: my another library
[fuzzy](https://github.com/versenilvis/fuzzy/) has a logic bug so it
causes crash, fix d479c6cb4d8453e50366c9839daaabb45a98a2df

- Other:
  -  remove unneeded comments (edd9d05fdd16e682b6b416913e2fa9c3f6599956)
  - Add some tests
  - Fix reload crash (3a76e78e655fd8daafb635ec0937667325f75ee4)
- New optimized build command (56a4a815f836271b861f32795d2df3b25a3dffc0)
2026-05-23 23:22:04 +07:00
verse91 9b206fe701 fix: git 2026-05-10 02:44:54 +07:00
verse91 0ec946f408 fix(git): git doesnt show branch suggesstion properly 2026-05-10 02:40:07 +07:00
verse91 e15e88e53d chore(pkg): replace fuzzyvn with fuzzy 2026-05-10 00:18:14 +07:00
verse91 c6cfdd0695 chore(filegen): use strings.Contains for more flexible directory searching 2026-05-10 00:12:40 +07:00
verse91 d74c959be4 feat(git): more commands, tests, add Registry conflict between tests 2026-05-10 00:03:19 +07:00
verse91 c76541258a fix: all issues by golangci-lint 2026-05-09 23:49:33 +07:00
verse91 e587f02798 fix(tests): fix all problems related to test 2026-05-09 23:37:13 +07:00
verse91 17f33ff480 feat: all tests 2026-05-09 23:18:08 +07:00
verse91 3c5a0580d1 fix(zoxide/cd): support folder contains space 2026-05-09 22:54:27 +07:00
verse91 9720b5f4bc fix(filegen): cd and zoxide only shows dir 2026-05-04 20:15:44 +07:00
verse91 5d81871aef feat(command): zoxide 2026-05-04 20:15:12 +07:00
verse91 66b2b22d94 feat(filegen): scan 1 level deeper in folder 2026-04-27 15:07:26 +07:00
verse91 667cf9feae feat(chmod): add more options and limit file extension 2026-04-27 15:03:47 +07:00
verse91 d2909d93aa fix: wrong suggestion on chmod command 2026-04-27 15:03:21 +07:00
verse91 7c11a3a620 feat: now pressing space show alias as full command 2026-04-19 09:55:31 +07:00
verse91 3adc045c09 refactor(spec): seperate into small files 2026-04-16 00:32:24 +07:00
verse91 fc21a6b0cc fix: iris keep suggesting when press tab continually 2026-04-14 12:12:07 +07:00
verse91 736723fbe8 refactor: shell adaptor 2026-04-11 22:34:04 +07:00
verse91 78e19199b0 feat: in-place reloading on current TTY 2026-04-11 21:53:37 +07:00
verse91 2b760fb82a fix(spec): prioritize aliases 2026-04-11 21:37:59 +07:00
verse91 8b25bdac0f fix(spec): remove sync.Once so we can always up-to-date with shell config 2026-04-11 21:36:08 +07:00
verse91 71a75ced28 refactor(spec): improve reading aliases in shell config 2026-04-11 21:28:16 +07:00
verse91 503d38e5c4 fix(spec): add token injection to resolve shell aliases 2026-04-11 21:01:40 +07:00
verse91 4c70c24299 feat(spec): scan shell aliases like .zshrc, .bashrc, ... 2026-04-11 21:00:31 +07:00
verse91 81b80d079c perf(spec): using string.Builder instead of concatenation 2026-04-11 20:56:16 +07:00
verse91 1f483c5ab2 feat(spec): support aliases 2026-04-11 20:55:06 +07:00
verse91 1109034c87 fix(spec): handle value attached flags 2026-04-11 20:53:02 +07:00
verse91 e465d900a8 fix(spec): handle quote when tokenize 2026-04-11 20:51:31 +07:00
verse91 525eac1bfa feat(spec): system PATH scannee 2026-04-11 20:49:58 +07:00
verse91 f64c8022b2 feat(git): dynamic git command completion 2026-04-11 20:43:49 +07:00
verse91 6917e42c28 feat (spec): improve command completion logic 2026-04-11 20:34:05 +07:00
verse91 b01844639b feat(spec): change priority 2026-04-09 23:48:09 +07:00