Add configurable tool output verbosity #3363
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue #, if available:
N/A
Description of changes:
• Adds configurable tool output verbosity via new setting
chat.tool_output_verbose(default: true)• When set to false, hides detailed tool execution output for trusted tools while preserving:
• Permission prompts for untrusted tools (safety preserved)
• Completion messages with tool names:
● Completed in 0.99s (fs_read, fs_write)• Structured events for IDE integration
• Implementation changes:
• Added
ChatToolOutputVerbosesetting toSettingenum with full mapping• Added
tools_used_in_turn: Vec<String>field toChatSessionto track tools used in current turn• Modified print_tool_description() to conditionally display output based on
verbose || !trusted• Enhanced completion message to append tool names when not verbose
• Added
show_detailsparameter toTool::invoke()and propagated through toqueue_function_result()• Updated
fs_readtool implementations to respect show_details flag (6 call sites)Tests
Test case: Default behavior (verbose=true)
Output shows full tool details:
Test case: Reduced verbosity (verbose=false, trusted tools)
Output shows only completion:
● Completed in 0.99s (fs_read)Test case: Permission prompts preserved (verbose=false, untrusted tools)
Output shows full details with permission prompt:
Test case: Multiple tools (verbose=false)
Output shows all tools used:
● Completed in 1.5s (fs_read, fs_write)By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.