make CLI argv args reach typed command handlers (T-232)
Parameterized subsystem commands were unreachable from the CLI: the
argv translator emits {positional, flags} but the handlers read named
top-level keys (args['path'], args['id'], ...), and nothing mapped
between them -- so 'clide editor open <path>' returned 'path is
required'. The fix needed no new mechanism: D-74's CommandSchema.normalize
already folds the argv shape into named args by a declared positional
ordering; these commands just never registered a schema.
Adopts it for the navigation/drive surface -- editor.open/activate/read/
save/close, files.read/ls, pane.close/focus/resize/write -- with
non-required positional schemas, so the only effect is positional->named
mapping plus numeric coercion of line/cols/rows. Handlers unchanged;
missing-arg errors unchanged. Edit-mutation verbs, pane.spawn, and git
arg verbs are deferred (noted on the ticket).
Takes effect on app restart (the dispatcher is built once at boot).
Closes T-232 (under T-208 'Give Claude hands').
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -88,6 +88,10 @@ heading, and (b) bumping `pubspec.yaml` `version:` in the same commit.
|
||||
|
||||
### Fixed
|
||||
|
||||
- CLI commands that take arguments now work: `clide editor open <path>`,
|
||||
`clide files read <path>`, `clide pane focus <id>` / `resize <id> <c> <r>`,
|
||||
etc. now bind positional/flag argv to the handler's named args (they
|
||||
previously returned "X is required" from the CLI). (T-232)
|
||||
- The Claude composer no longer loses a half-typed message when the UI changes
|
||||
under it — e.g. a permission prompt taking the composer's place. The draft
|
||||
(text and caret) is kept per session and restored when the composer returns.
|
||||
|
||||
Reference in New Issue
Block a user