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:
Yeachan-Heo
2026-04-01 13:05:32 +00:00
parent 27e46d7ea6
commit a13b1c2825
5 changed files with 235 additions and 60 deletions

View File

@@ -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())