Make load_toolset a compact tool for CLI display

Add load_toolset to the compact tool lists in streaming.rs and
ui_writer_impl.rs so it renders as a single-line summary instead of
the full multi-line tool definitions output.

Summary format:
  🧩 loaded '<name>' — on success
  ℹ️ already loaded  — when already loaded
   failed          — on error

The toolset name arg is extracted as display_arg in print_tool_compact
so it appears in the compact output line.
This commit is contained in:
Dhanji R. Prasanna
2026-02-14 14:49:57 +11:00
parent 74714806c0
commit 92352e1897
2 changed files with 35 additions and 3 deletions

View File

@@ -486,7 +486,7 @@ impl UiWriter for ConsoleUiWriter {
self.hint_state.handle_hint(ToolParsingHint::Complete);
// Handle file operation tools and other compact tools
let is_compact_tool = matches!(tool_name, "read_file" | "write_file" | "str_replace" | "remember" | "screenshot" | "coverage" | "rehydrate" | "code_search" | "plan_approve");
let is_compact_tool = matches!(tool_name, "read_file" | "write_file" | "str_replace" | "remember" | "screenshot" | "coverage" | "rehydrate" | "code_search" | "plan_approve" | "load_toolset");
if !is_compact_tool {
// Reset continuation tracking for non-compact tools
*self.last_read_file_path.lock().unwrap() = None;
@@ -543,8 +543,15 @@ impl UiWriter for ConsoleUiWriter {
String::new()
}
} else {
// For remember, screenshot, etc. - no path to show
String::new()
// For load_toolset, show the toolset name
if tool_name == "load_toolset" {
args.iter().find(|(k, _)| k == "name")
.map(|(_, v)| v.to_string())
.unwrap_or_default()
} else {
// For remember, screenshot, etc. - no path to show
String::new()
}
}
} else {
// Shorten path (project -> name/, workspace -> ./, home -> ~) then truncate if still long