mirror of
https://github.com/instructkr/claude-code.git
synced 2026-04-03 22:08:51 +03:00
Make the REPL feel more reliable and discoverable
This pass hardens the interactive UX instead of chasing feature breadth. It preserves raw REPL input whitespace, honors the configured editorMode for vim-oriented sessions, improves slash-command help readability, and turns unknown slash commands into actionable guidance instead of noisy stderr output. Constraint: Keep the existing slash-command surface and avoid new dependencies Rejected: Full TUI/input rewrite | too broad for a polish-and-reliability pass Confidence: high Scope-risk: moderate Reversibility: clean Directive: Preserve user prompt text exactly in the REPL path; do not reintroduce blanket trimming before runtime submission Tested: cargo check Tested: cargo test Tested: Manual QA of /help, /status, /statu suggestion flow, and editorMode=vim banner/help/status behavior Not-tested: Live network-backed assistant turns against a real provider
This commit is contained in:
@@ -284,6 +284,11 @@ impl RuntimeConfig {
|
||||
self.merged.get(key)
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn get_string(&self, key: &str) -> Option<&str> {
|
||||
self.get(key).and_then(JsonValue::as_str)
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn as_json(&self) -> JsonValue {
|
||||
JsonValue::Object(self.merged.clone())
|
||||
|
||||
Reference in New Issue
Block a user