feat: argument pickers for slash commands (/model, /resume, …) - #5
Conversation
|
The macos-latest 3.14 failure was a pre-existing harness race, not a regression: pty drivers sent their first keystroke after a fixed Fixed at the root in |
|
Second CI hit investigated to ground truth. Both dumps decode the same way:
Not reproducible locally: 15+ plain runs, single-core + CPU-load runs, Python 3.14.7 isolated, 21+ instrumented stress rounds (wrapping Three changes now shipped on this branch:
Verified: new fail-fast/retry regression test passes, full pty file 10/10, full suite 1144 passed (telemetry failures pre-existing), ruff clean. |
What
Slash commands with known options now complete their arguments in the same themed panel as the
/,@and.pickers — no more typing model ids or session ids by hand.Typing
/model(or accepting/modelfrom the/menu) opens the panel with live catalog rows; Enter/Tab inserts (canonical id + trailing space), a second Enter executes, Escape dismisses without executing.Coverage
Providers gate on already-typed args: consumed positions close the menu, nested positions offer the next stage.
/model,/model-subagent(+default),/pierre model— catalog, honoringui.hidden_models, current marker/resume— sessions newest-first (current / in-use markers);--deletecompletes targets, but--deleteis never offered by default/thinking/reasoning/permissions/mode/notifications/tutor/memory/help— literal choices/rewind(recent turns),/drop(pending attachments),/mcp(subcommands, then server names),/wt-exit(flags, in-worktree only)/loop plan.md), and path completion is suppressed while an argument picker owns the token (/model vendor/xis a model ref, not a file)Details
SlashCommand.arg_completionsprovider +arg_empty_hint(registry), routing completer + arg context detection (pickers), panel inert rows ("no models available (catalog still loading?)", "no matching options"), Escape dismissal per typed text, single-slot row cache keyed by typed text (cleared when the background catalog fetch lands)/modstill closes the menu (existing behavior kept, test still green)Testing
🤖 Generated with lecode