Skip to content

feat: completion popup for / commands and @ references - #6

Merged
qiankunli merged 1 commit into
mainfrom
feat/at-completion
Jul 9, 2026
Merged

feat: completion popup for / commands and @ references#6
qiankunli merged 1 commit into
mainfrom
feat/at-completion

Conversation

@qiankunli

Copy link
Copy Markdown
Collaborator

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.

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.
@qiankunli
qiankunli merged commit 4a93e48 into main Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants