fix(commands): surface limits and web toggles
Acceptance-Criteria: - Command palette suggestions include limits/web management commands - Help overlay documents :limits and :web on|off|status controls Test-Notes: - cargo test -p owlen-tui - cargo clippy -p owlen-tui --tests -- -D warnings
This commit is contained in:
@@ -183,6 +183,22 @@ const COMMANDS: &[CommandSpec] = &[
|
|||||||
keyword: "markdown",
|
keyword: "markdown",
|
||||||
description: "Toggle markdown rendering",
|
description: "Toggle markdown rendering",
|
||||||
},
|
},
|
||||||
|
CommandSpec {
|
||||||
|
keyword: "limits",
|
||||||
|
description: "Show hourly/weekly usage totals",
|
||||||
|
},
|
||||||
|
CommandSpec {
|
||||||
|
keyword: "web on",
|
||||||
|
description: "Enable web search tool exposure",
|
||||||
|
},
|
||||||
|
CommandSpec {
|
||||||
|
keyword: "web off",
|
||||||
|
description: "Disable web search tool exposure",
|
||||||
|
},
|
||||||
|
CommandSpec {
|
||||||
|
keyword: "web status",
|
||||||
|
description: "Show current web search tool state",
|
||||||
|
},
|
||||||
CommandSpec {
|
CommandSpec {
|
||||||
keyword: "e",
|
keyword: "e",
|
||||||
description: "Edit a file",
|
description: "Edit a file",
|
||||||
@@ -336,6 +352,22 @@ mod tests {
|
|||||||
assert_eq!(results[0].keyword, "agent start");
|
assert_eq!(results[0].keyword, "agent start");
|
||||||
assert!(results.iter().any(|spec| spec.keyword == "agent stop"));
|
assert!(results.iter().any(|spec| spec.keyword == "agent stop"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn suggestions_include_limits_command() {
|
||||||
|
let results = suggestions("li");
|
||||||
|
assert!(!results.is_empty());
|
||||||
|
assert_eq!(results[0].keyword, "limits");
|
||||||
|
assert!(results.iter().any(|spec| spec.keyword == "limits"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn suggestions_include_web_variants() {
|
||||||
|
let results = suggestions("web");
|
||||||
|
assert!(results.iter().any(|spec| spec.keyword == "web on"));
|
||||||
|
assert!(results.iter().any(|spec| spec.keyword == "web off"));
|
||||||
|
assert!(results.iter().any(|spec| spec.keyword == "web status"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn is_subsequence(text: &str, pattern: &str) -> bool {
|
fn is_subsequence(text: &str, pattern: &str) -> bool {
|
||||||
|
|||||||
@@ -4237,7 +4237,8 @@ fn render_help(frame: &mut Frame<'_>, app: &ChatApp) {
|
|||||||
Line::from(" :provider <name> [auto|local|cloud] → switch provider or set mode"),
|
Line::from(" :provider <name> [auto|local|cloud] → switch provider or set mode"),
|
||||||
Line::from(" :models --local | --cloud → focus models by scope"),
|
Line::from(" :models --local | --cloud → focus models by scope"),
|
||||||
Line::from(" :cloud setup [--force-cloud-base-url] → configure Ollama Cloud"),
|
Line::from(" :cloud setup [--force-cloud-base-url] → configure Ollama Cloud"),
|
||||||
Line::from(" :web on|off → expose or hide the web.search tool"),
|
Line::from(" :web on|off|status → manage web.search availability"),
|
||||||
|
Line::from(" :limits → show hourly/weekly usage totals"),
|
||||||
Line::from(""),
|
Line::from(""),
|
||||||
Line::from(vec![Span::styled(
|
Line::from(vec![Span::styled(
|
||||||
"SESSION MANAGEMENT",
|
"SESSION MANAGEMENT",
|
||||||
|
|||||||
Reference in New Issue
Block a user