mirror of
https://github.com/lWolvesl/claw-code.git
synced 2026-04-02 15:51:51 +08:00
The custom crossterm editor now supports prompt history, slash-command tab completion, multiline editing, and Ctrl-C semantics that clear partial input without always terminating the session. The live REPL loop now distinguishes buffer cancellation from clean exit, persists session state on meaningful boundaries, and renders tool activity in a more structured way for terminal use. Constraint: Keep the active REPL on the existing crossterm path without adding a line-editor dependency Rejected: Swap to rustyline or reedline | broader integration risk than this polish pass justifies Confidence: medium Scope-risk: moderate Reversibility: clean Directive: Keep editor state logic generic in input.rs and leave REPL policy decisions in main.rs Tested: cargo fmt --manifest-path rust/Cargo.toml --all; cargo clippy --manifest-path rust/Cargo.toml --all-targets --all-features -- -D warnings; cargo test --manifest-path rust/Cargo.toml Not-tested: Interactive manual terminal smoke test for arrow keys/tab/Ctrl-C in a live TTY