feat: completion popup for / commands and @ references - #6
Merged
Conversation
Follows terminal coding-agent conventions: '/' at line start pops command candidates (/codex /claude to switch agent, /exit), '@' anywhere pops reference candidates (agent providers first, then other baton sessions matched by id prefix or title substring). Tab completes, up/down navigate, Esc dismisses; Enter keeps its send semantics. - src/tui/completion.ts: pure trigger/candidate/apply logic (unit-tested) - TUI: candidate popup above composer, highlights selection; /exit quits; agent switch accepts both @codex and /codex prefixes - bin fix: 'baton --flag' now routes to TUI instead of 'unknown command' (and no premature process.exit after the TUI import); help text updated to the chat-first UX Verified: bun run check green (66 tests, 8 new completion tests); pty smoke confirms TUI boots with new hints and focused composer.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follows terminal coding-agent conventions: '/' at line start pops command
candidates (/codex /claude to switch agent, /exit), '@' anywhere pops
reference candidates (agent providers first, then other baton sessions
matched by id prefix or title substring). Tab completes, up/down navigate,
Esc dismisses; Enter keeps its send semantics.
agent switch accepts both @codex and /codex prefixes
(and no premature process.exit after the TUI import); help text updated
to the chat-first UX
Verified: bun run check green (66 tests, 8 new completion tests); pty smoke
confirms TUI boots with new hints and focused composer.