Compact tool output improvements

- Rename take_screenshot -> screenshot, code_coverage -> coverage (shorter names)
- Align | character across all compact tools (pad to 11 chars for str_replace)
- Make code_search a compact tool with summary display
- Show language and search name in code_search output (e.g., rust:"find structs")
- Add format_code_search_summary() to extract match/file counts from JSON response
This commit is contained in:
Dhanji R. Prasanna
2026-01-14 08:12:50 +05:30
parent bd25d7dace
commit dea0e6b1ca
7 changed files with 77 additions and 22 deletions

View File

@@ -393,14 +393,14 @@ mod screenshot_tests {
#[test]
fn test_screenshot_tool_call_structure() {
let tool_call = make_tool_call(
"take_screenshot",
"screenshot",
json!({
"path": "screenshot.png",
"window_id": "Safari"
}),
);
assert_eq!(tool_call.tool, "take_screenshot");
assert_eq!(tool_call.tool, "screenshot");
assert_eq!(tool_call.args.get("path").unwrap().as_str(), Some("screenshot.png"));
assert_eq!(tool_call.args.get("window_id").unwrap().as_str(), Some("Safari"));
}