Skip to content

fix(tui): route leading-slash lines by registered command id - #1205

Merged
TheGreatAxios merged 2 commits into
mainfrom
cl-9000-slash-routing
Sep 29, 2026
Merged

TheGreatAxios merged 2 commits into
mainfrom
cl-9000-slash-routing

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Leading-slash composer lines misrouted as commands: absolute paths (/Users/you/notes) and unknown slash names dispatched against the command registry instead of reaching the model.

This change routes a leading slash to a command only on an exact registered-id hit (first token to whitespace, lowercased). Anything else is sent verbatim as a prompt; bare slash stays empty. All three submit sites share one call-site-owned set from the palette/registry source, and the slash popup, arg-stage parse, and unedited-hint strip treat path heads as prompts.

Unknown-slash UX: typos go to the model (no did-you-mean notice, no fuzzy matcher); multi-slash input always did.

Verification: submit-handler + command-catalog suites 51/51 pass; agent-ask-wake, live-session-port, runtime-bridge suites 119/119 pass; full repo gate (lint, typecheck, dead-exports, build, projects-dir-guard, 8606 tests across 551 files) green.

Fixes CL-9000

A leading slash dispatches a slash command only when its first token (to whitespace, lowercased) exactly matches a registered command id. Absolute paths (/Users/you/notes) and unknown names now reach the model verbatim as prompts; bare slash stays empty. All three submit sites share one registry-owned set, and the slash popup, arg-stage parse, and unedited-hint strip treat path heads as prompts.

Unknown-slash choice: typos go to the model (no did-you-mean notice, no fuzzy matcher); multi-slash input always did.
@linear-code

linear-code Bot commented Sep 28, 2026

Copy link
Copy Markdown

CL-9000

Case-insensitive routing matched /CLEAR but forwarded the typed case, so
the exact registry lookup missed and reported Unknown command. The router
now returns the canonical lowercase id; the ignores-case test asserts the
lowered name and a keeper test drives /CLEAR through the real registry.
@TheGreatAxios
TheGreatAxios merged commit 1a7fa51 into main Sep 29, 2026
13 checks passed
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.

1 participant