Skip to content

fix(tui): execute client-side slash commands typed in the prompt - #51225

Open
stweil wants to merge 1 commit into
anomalyco:devfrom
stweil:tui-slash-dispatch
Open

stweil wants to merge 1 commit into
anomalyco:devfrom
stweil:tui-slash-dispatch

Conversation

@stweil

@stweil stweil commented Sep 24, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #51222

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Submitting an exact single-token slash command such as /compact, /new, /share, or /exit sent it to the model as a plain prompt. Only server command templates in sync.data.command were intercepted; client-side commands surfaced by useCommandSlashes in the / autocomplete were never dispatched on submit.

Route exact single-token input through the same command-slashes registry the autocomplete uses, preserving server-command priority and letting multi-token input fall through to the prompt.

Assisted-by: OpenCode / big-pickle (OpenCode)

How did you verify your code works?

Local tests.

Screenshots / recordings

None.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Submitting an exact single-token slash command such as /compact, /new,
/share, or /exit sent it to the model as a plain prompt. Only server
command templates in sync.data.command were intercepted; client-side
commands surfaced by useCommandSlashes in the / autocomplete were never
dispatched on submit.

Route exact single-token input through the same command-slashes registry
the autocomplete uses, preserving server-command priority and letting
multi-token input fall through to the prompt.

Assisted-by: OpenCode / big-pickle (OpenCode)
Signed-off-by: Jack <jack@anoma.ly>

This branch has not been deployed

No deployments
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.

tui: submitting a client-side slash command sends it to the model instead of executing it

1 participant