feat(cli): enhance tool confirmation UI and selection layout#24376
feat(cli): enhance tool confirmation UI and selection layout#24376
Conversation
- Adds clear visual boundaries around tool confirmation content (commands and diffs) to improve terminal readability. - Updates `ShellToolInvocation` to display the provided `description` parameter rather than the raw command. - Fixes `BaseSelectionList` items to expand to full width, ensuring focus backgrounds span the entire container. - Updates related UI component snapshots to reflect the new layout and truncation formats.
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 improves the visual consistency and readability of the CLI tool confirmation interface. By introducing structured borders and ensuring full-width selection highlights, the UI provides a more polished and intuitive experience for users when confirming tool actions. Additionally, the tool invocation logic was updated to prioritize descriptive text over raw commands, further enhancing clarity. 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
|
🧠 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. |
|
Size Change: +5.81 kB (+0.02%) Total Size: 34 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Code Review
This pull request updates the UI layout for tool confirmations, specifically introducing a simplified, scrollable layout for shell and edit tools to prevent UI overflow. It also includes minor refactorings to improve code organization and consistency in confirmation labels. I have kept the review comment regarding the sandbox_expansion layout as it correctly identifies a potential UI usability issue where a long permission list could push confirmation options off-screen.
Note: Security Review did not run due to the size of the PR.
|
✅ 57 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. |
- Group sandbox permissions by category with comma-separated paths. - Reorder layout to Code Block -> Question -> Permissions for better flow. - Fix vertical spacing issues above and below the body content. - Ensure truncation labels remain correctly aligned without double-padding content. - Update snapshots to reflect compact and corrected layout.
b36abb1 to
811a7b9
Compare
811a7b9 to
09ee79c
Compare
09ee79c to
6415074
Compare
This commit addresses a regression introduced in PR #24376 where the target file path was no longer displayed during the confirmation prompt for `Edit` and `WriteFile` tools. The previous PR suppressed the tool description for tools using the `edit` confirmation layout. Since both `Edit` and `WriteFile` pass their contextual target information (e.g., "✓ Edit src/main.ts") via the tool description property, this suppression caused the UI to only show the generic tool name and the diff. This change removes the `!isEdit` restriction in the `ToolConfirmationQueue` to restore the description visibility. Fixes #24936
This commit addresses a regression introduced in PR #24376 where the target file path was no longer displayed during the confirmation prompt for `Edit` and `WriteFile` tools. The previous PR suppressed the tool description for tools using the `edit` confirmation layout. Since both `Edit` and `WriteFile` pass their contextual target information (e.g., "✓ Edit src/main.ts") via the tool description property, this suppression caused the UI to only show the generic tool name and the diff. This change removes the `!isEdit` restriction in the `ToolConfirmationQueue` to restore the description visibility. Fixes #24936
This commit addresses a regression introduced in PR #24376 where the target file path was no longer displayed during the confirmation prompt for `Edit` and `WriteFile` tools. The previous PR suppressed the tool description for tools using the `edit` confirmation layout. Since both `Edit` and `WriteFile` pass their contextual target information (e.g., "✓ Edit src/main.ts") via the tool description property, this suppression caused the UI to only show the generic tool name and the diff. This change removes the `!isEdit` restriction in the `ToolConfirmationQueue` to restore the description visibility. Fixes #24936
This commit addresses a regression introduced in PR #24376 where the target file path was no longer displayed during the confirmation prompt for `Edit` and `WriteFile` tools. The previous PR suppressed the tool description for tools using the `edit` confirmation layout. Since both `Edit` and `WriteFile` pass their contextual target information (e.g., "✓ Edit src/main.ts") via the tool description property, this suppression caused the UI to only show the generic tool name and the diff. This change removes the `!isEdit` restriction in the `ToolConfirmationQueue` to restore the description visibility. Fixes #24936

Summary
This PR enhances the tool confirmation UI and selection layout within the CLI, providing clear visual boundaries around tool confirmation content (commands and diffs) to improve terminal readability.
Details
ShellToolInvocationto display the provideddescriptionparameter rather than the raw command.BaseSelectionListitems to expand to full width, ensuring focus backgrounds span the entire container.Related Issues
N/A
How to Validate
Run the CLI and observe tool confirmations (especially with
replaceorrun_shell_command). Verify the styling improvements and list focus states. Tests are already updated.Pre-Merge Checklist