feat(cli): support selective topic expansion and click-to-expand#24793
feat(cli): support selective topic expansion and click-to-expand#24793Abhijit-2592 merged 5 commits intomainfrom
Conversation
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 introduces interactive topic expansion for the Gemini CLI history. By enabling selective expansion and click-to-expand functionality, users can now toggle detailed summaries for individual topics without affecting the entire view. The changes ensure a more intuitive and cleaner user interface while maintaining compatibility with existing global keyboard shortcuts. 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
|
There was a problem hiding this comment.
Code Review
This pull request refactors the TopicMessage component to support expandable content, enabling users to toggle between a concise strategic intent and a detailed summary. It introduces hooks for mouse click handling, overflow tracking, and expansion state management. New unit tests for TopicMessage are included, and ToolGroupMessage tests have been updated. Feedback identifies an improvement for the overflow tracking logic to correctly handle the expansion state and recommends replacing hardcoded string literals with existing constants in test files.
packages/cli/src/ui/components/messages/ToolGroupMessage.test.tsx
Outdated
Show resolved
Hide resolved
|
Size Change: +1.95 kB (+0.01%) Total Size: 34 MB
ℹ️ View Unchanged
|
639f87f to
e40061d
Compare
jacob314
left a comment
There was a problem hiding this comment.
Approved once these comments are addressed.
96bbb79 to
4f8ead3
Compare
Implement an expandable UI for Topic messages in the CLI. By default, only the strategic intent is shown. If a summary is provided, users can expand the message using Ctrl+O to view the full details. - Update TopicMessage to register with OverflowContext when a summary is present. - Show '(ctrl+o to expand/collapse)' hint for topics with summaries. - Add TopicMessage.test.tsx with comprehensive coverage for different arg combinations and expansion states. - Confine changes strictly to the UI layer.
Enhance Topic messages with selective expansion capabilities: - Integrate with ToolActionsContext to track individual expansion state via callId. - Add mouse click support (useMouseClick) to toggle individual topic summaries. - Combine global expansion state (Ctrl+O) with individual state for seamless hybrid interaction. - Update unit tests to verify both global and selective expansion, including mouse click simulation.
Enhance Topic messages with selective expansion capabilities: - Integrate with ToolActionsContext to track individual expansion state via callId. - Add mouse click support (useMouseClick) to toggle individual topic summaries. - Combine global expansion state (Ctrl+O) with individual state for seamless hybrid interaction. - Remove '(ctrl+o to expand/collapse)' hint text to reduce UI clutter. - Update unit tests to verify both global and selective expansion, including mouse click simulation.
- Optimize overflow tracking in TopicMessage to account for expansion state. - Use UPDATE_TOPIC_TOOL_NAME constant in TopicMessage tests. - Maintain UI-only scope as requested.
4f8ead3 to
240b09e
Compare

Summary
Implement selective topic expansion and click-to-expand support in the Gemini CLI history. This allows users to toggle individual topic summaries via mouse clicks while maintaining the global
Ctrl+Ofunctionality.Details
TopicMessagewithToolActionsContextto track expansion state percallId.useMouseClickhook to the topic container, allowing users to toggle summaries by clicking the topic line.Ctrl+O), ensuring both interaction models work seamlessly together.(ctrl+o to expand/collapse)hint text to reduce visual clutter, as functionality is discoverable via click or the global shortcut.Ctrl+Sdepending on their terminal configuration.Related Issues
Closes #24791
How to Validate
npm test -w @google/gemini-cli -- src/ui/components/messages/TopicMessage.test.tsxto verify all rendering states and click simulation.Ctrl+Ostill toggles all topics in the current turn simultaneously.Pre-Merge Checklist