mirror of
https://github.com/lWolvesl/claw-code.git
synced 2026-04-02 23:11:52 +08:00
Replace bespoke CLI line editing with rustyline and canonical model aliases
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
This commit is contained in:
@@ -15,6 +15,7 @@ commands = { path = "../commands" }
|
||||
compat-harness = { path = "../compat-harness" }
|
||||
crossterm = "0.28"
|
||||
pulldown-cmark = "0.13"
|
||||
rustyline = "15"
|
||||
runtime = { path = "../runtime" }
|
||||
serde_json = "1"
|
||||
syntect = "5"
|
||||
|
||||
Reference in New Issue
Block a user