mirror of
https://github.com/lWolvesl/claw-code.git
synced 2026-04-02 16:11:52 +08:00
The REPL now wraps rustyline::Editor instead of maintaining a custom raw-mode input stack. This preserves the existing LineEditor surface while delegating history, completion, and interactive editing to a maintained library. The CLI argument parser and /model command path also normalize shorthand model names to our current canonical Anthropic identifiers. Constraint: User requested rustyline 15 specifically for the CLI editor rewrite Constraint: Existing LineEditor constructor and read_line API had to remain stable Rejected: Keep extending the crossterm-based editor | custom key handling and history logic were redundant with rustyline Rejected: Resolve aliases only for --model flags | /model would still diverge from CLI startup behavior Confidence: high Scope-risk: moderate Reversibility: clean Directive: Keep model alias normalization centralized in main.rs so CLI flag parsing and /model stay in sync Tested: cargo check --workspace Tested: cargo test --workspace Tested: cargo build --workspace Tested: cargo clippy --workspace --all-targets -- -D warnings Not-tested: Interactive manual terminal validation of Shift+Enter behavior across terminal emulators
553 B
553 B