To-Do Tools (#3902)

Co-authored-by: David Katz <dkatz@squareup.com>
This commit is contained in:
tlongwell-block
2025-08-11 15:57:17 -04:00
committed by GitHub
parent 99a40bd8d1
commit 566b9dc577
7 changed files with 804 additions and 13 deletions
+14
View File
@@ -248,6 +248,7 @@ fn render_tool_request(req: &ToolRequest, theme: Theme, debug: bool) {
"developer__text_editor" => render_text_editor_request(call, debug),
"developer__shell" => render_shell_request(call, debug),
"dynamic_task__create_task" => render_dynamic_task_request(call, debug),
"todo__read" | "todo__write" => render_todo_request(call, debug),
_ => render_default_request(call, debug),
},
Err(e) => print_markdown(&e.to_string(), theme),
@@ -452,6 +453,19 @@ fn render_dynamic_task_request(call: &ToolCall, debug: bool) {
println!();
}
fn render_todo_request(call: &ToolCall, _debug: bool) {
print_tool_header(call);
// For todo tools, always show the full content without redaction
if let Some(Value::String(content)) = call.arguments.get("content") {
println!("{}: {}", style("content").dim(), style(content).green());
} else {
// For todo__read, there are no arguments
// Just print an empty line for consistency
}
println!();
}
fn render_default_request(call: &ToolCall, debug: bool) {
print_tool_header(call);
print_params(&call.arguments, 0, debug);