Skip to content

fix(opencode): only intercept registered local slash commands#25933

Open
G17hao wants to merge 1 commit intoanomalyco:devfrom
G17hao:spec-file-feature
Open

fix(opencode): only intercept registered local slash commands#25933
G17hao wants to merge 1 commit intoanomalyco:devfrom
G17hao:spec-file-feature

Conversation

@G17hao
Copy link
Copy Markdown

@G17hao G17hao commented May 5, 2026

Issue for this PR

Closes #25932

Type of change

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

What does this PR do?

Standalone local slash execution should only run when the typed slash command matches a registered local TUI slash command. Before this change, a single-token command like /review could be consumed by the local slash path, which cleared the prompt and skipped the normal command handling. This change adds an explicit registered-slash check before intercepting the prompt and keeps the existing command flow for non-local slash commands.

How did you verify your code works?

  • bun test ./test/cli/cmd/tui/prompt-slash.test.ts
  • bun test ./test/session/prompt.test.ts
  • bun typecheck
  • git push hook also ran bun turbo typecheck

Screenshots / recordings

N/A

Checklist

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

@github-actions github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. labels May 5, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

Thanks for updating your PR! It now meets our contributing guidelines. 👍

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.

Single-token slash commands are swallowed when no local TUI slash matches

1 participant