Skip to content

feat(tui): complete slash commands and skills as you type - #276

Merged
setoelkahfi merged 1 commit into
feature/skill-slash-commandsfrom
feature/tui-slash-autocomplete
Nov 17, 2026
Merged

setoelkahfi merged 1 commit into
feature/skill-slash-commandsfrom
feature/tui-slash-autocomplete

Conversation

@setoelkahfi

@setoelkahfi setoelkahfi commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

The TUI had no completion for slash commands. Typing / now opens a popup above the input with the built-ins (including the TUI-only /thinking, /tools and /resume), user-defined commands and skills, each with a dimmed description.

  • Filters by prefix, then by substring. Shows up to eight rows.
  • Up/Down move the selection and wrap. Tab completes to /<name> . Enter completes, and submits once the input already equals the selected name. Esc closes the popup until the input changes.
  • The tab-bar Tab handler only fires on empty input, and any / prefix makes the input non-empty, so the two don't clash.
  • The candidate list is cached on App and rebuilt from disk each time the input becomes /.

Test plan:

  • Unit tests for candidate ordering and de-duplication, prefix-then-substring filtering, Tab/Enter/Esc/Up/Down handling, and a TestBackend render check of the popup.
  • cargo fmt -- --check, cargo clippy --tests -- -D warnings and cargo test --locked pass.
  • Still to check by hand: cargo run -p sigit, type /, then /wh, Tab, Enter, and a /<skill>.

Top of the stack. Base is feature/skill-slash-commands.

@setoelkahfi
setoelkahfi added this pull request to stack #277 October 29, 2026 16:37
@setoelkahfi
setoelkahfi marked this pull request as ready for review October 29, 2026 16:55
@setoelkahfi
setoelkahfi requested a review from paydii October 29, 2026 16:55
@setoelkahfi setoelkahfi self-assigned this Oct 29, 2026

@sigit-code-review sigit-code-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change adds slash-command and skill autocompletion to the TUI. Typing / now opens a popup above the input, listing built-in, user-defined, and skill commands with descriptions. The popup supports prefix and substring filtering, keyboard navigation (Up/Down/Tab/Enter/Esc), and closes when dismissed or when an argument is typed. The candidate list is cached and refreshed as needed. The change includes a comprehensive set of unit tests for candidate ordering, filtering, keyboard handling, and rendering. No previous findings are present, and the new logic is well-covered by tests.


Automated review by siGit Code Review · commit b36bc3b · see the review dashboard

@setoelkahfi
setoelkahfi force-pushed the feature/tui-slash-autocomplete branch from b36bc3b to c810854 Compare November 7, 2026 09:32
@setoelkahfi
setoelkahfi force-pushed the feature/tui-slash-autocomplete branch 2 times, most recently from cc51ff0 to 7a3aeb4 Compare November 7, 2026 12:31
Typing / in the chat box opens a popup above the input with the built-in
commands, user-defined commands and skills, each with a dimmed
description. It filters by prefix first, then by substring, and shows up
to eight rows.

Up and Down move the selection (wrapping). Tab completes to "/<name> ".
Enter completes too, and submits once the input already equals the
selected name. Esc closes the popup until the input changes. The tab-bar
Tab handler only fires on empty input, so it does not clash.

The candidate list is cached on App and rebuilt from disk each time the
input becomes "/".

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@setoelkahfi
setoelkahfi force-pushed the feature/tui-slash-autocomplete branch from 7a3aeb4 to 1a7fcd9 Compare November 17, 2026 09:10
@setoelkahfi
setoelkahfi merged commit 12d61fb into development Nov 17, 2026
9 checks passed
@setoelkahfi
setoelkahfi deleted the feature/tui-slash-autocomplete branch November 17, 2026 17:35
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.

3 participants