feat(cli): refine tool output formatting for compact mode#24677
feat(cli): refine tool output formatting for compact mode#24677jwhelangoog wants to merge 2 commits intomainfrom
Conversation
…irectory - Remove multi-line payloads from the dense view of search and read_files tools to keep the UI compact. - Update list_directory summary/result text to use 'Found' instead of 'Listed' (consistent with verbiage from other tools).
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request refines the CLI's compact output mode to enhance readability and information density. By removing verbose multi-line payloads and standardizing terminology across various tools, the interface becomes cleaner and more consistent. Additionally, layout adjustments were implemented to ensure that tool names are prioritized and remain visible even when descriptions are long. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
|
Size Change: -1.47 kB (0%) Total Size: 34 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Code Review
This pull request refactors the DenseToolMessage component to provide a more compact UI by removing detailed item lists, such as file lists and grep matches, from the output. It also updates the ls tool's summary terminology from 'Listed' to 'Found' and introduces a new test case for description truncation. Feedback was provided regarding a layout issue in DenseToolMessage.tsx where a missing flexShrink property on a wrapping Box could prevent the description from truncating correctly when terminal width is exceeded.
|
✅ 58 tests passed successfully on gemini-3-flash-preview. 🧠 Model Steering GuidanceThis PR modifies files that affect the model's behavior (prompts, tools, or instructions).
This is an automated guidance message triggered by steering logic signatures. |
- tool 'name' will not be truncated up to 25 chars - tool invocation 'description' locks to first line of output (and truncates if nec) - result 'summary' will appear on first line if space is available, otherwise can wrap to second line. (no content wrapping expected beyond second line)
286fde7 to
75506f3
Compare
Summary
Refine tool output formatting in the CLI's compact (dense/grouped) mode to improve readability and information density. This PR makes search and read tools truly terse by removing multi-line payloads and ensures consistent verbiage across listing tools.
Details
1. Compact Mode Refinements
grep_searchandread_many_files.list_directory(ReadFolder) summary from "Listed" to "Found" to align with other search tools.hasDensePayloadto returnfalsefor grep and multi-file read results, ensuring the UI doesn't reserve space for expandable payloads that are no longer present.2. Wrapping & Truncation Logic
DenseToolMessageto ensure tool names (up to 25 chars) are not truncated by long descriptions. The tool name now hasflexShrink: 0, while the description usesflexShrink: 1to fill the remaining space and truncate if necessary.Related Issues
Fixes #24634
Fixes #24644
How to Validate
grep_searchorread_many_filescalls. Verify they appear as single-line summaries without lists of matches/files.list_directoryand verify the summary starts with "Found".npm test -w @google/gemini-cliandnpm test -w @google/gemini-cli-core.Pre-Merge Checklist