Improve display formatting for tool inputs with long string parameters
Resolved 💬 2 comments Opened Jul 8, 2025 by nikaided Closed Jul 8, 2025
Description
When displaying tool use entries (like Edit, Write, etc.) that contain long string parameters such as old_string and new_string, the current implementation shows the entire JSON on a single line, which can be difficult to read.
Current Behavior
Tool inputs are displayed as compact JSON on a single line:
[2025/07/08 14:03:41] ASSISTANT
→ Tool: Edit
{"file_path":"/path/to/file","old_string":"very long text...","new_string":"another very long text..."}
Proposed Improvement
For better readability, tool inputs with long string parameters should be displayed with proper formatting:
- Extract and display string parameters (like
old_string,new_string,content) on separate lines - Apply proper indentation for multi-line content
- Consider truncating very long strings with an expand/collapse option
Example of Improved Display
[2025/07/08 14:03:41] ASSISTANT
→ Tool: Edit
file_path: /path/to/file
old_string:
Line 1 of old content
Line 2 of old content
...
new_string:
Line 1 of new content
Line 2 of new content
...
Technical Notes
- The formatting logic would need to be implemented in
ConsoleFormatter.FormatToolInput() - Special handling for known tool parameters that contain multi-line text
- Maintain backward compatibility with existing display format as an option
Related Code
src/CCHist/Services/ConsoleFormatter.cs- FormatToolInput methodsrc/CCHist/Services/EntryFormatter.cs- Entry formatting and line counting logic
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗