Conversation
|
Hi @jacob314, thank you so much for your contribution to Gemini CLI! We really appreciate the time and effort you've put into this. We're making some updates to our contribution process to improve how we track and review changes. Please take a moment to review our recent discussion post: Improving Our Contribution Process & Introducing New Guidelines. Key Update: Starting January 26, 2026, the Gemini CLI project will require all pull requests to be associated with an existing issue. Any pull requests not linked to an issue by that date will be automatically closed. Thank you for your understanding and for being a part of our community! |
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 refactors the application's state management by separating input-related state from the general UI state. This change is intended to optimize performance for input prompts by reducing unnecessary re-renders. Additionally, it introduces a fix to ensure that user-defined mouse mode settings are correctly preserved when transitioning out of expand mode. 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.04 kB (0%) Total Size: 34 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Code Review
This pull request introduces an InputContext to manage input-related state, such as the buffer, user messages, and shell mode, separately from the main UIStateContext. This refactoring improves performance by reducing unnecessary re-renders of the application. Additionally, the PR includes a fix for mouse mode state management in AppContainer and updates various components and tests to consume the new InputContext. I have identified two critical issues: the inclusion of redundant dependencies in the uiState memoization array, which negates the performance benefits of the context split, and a flaw in the mouse mode snapshot logic that causes manual user toggles to be discarded.
Note: Security Review did not run due to the size of the PR.
…ompt performance.
| initError: string | null; | ||
| pendingGeminiHistoryItems: HistoryItemWithoutId[]; | ||
| thought: ThoughtSummary | null; | ||
| shellModeActive: boolean; |
There was a problem hiding this comment.
critical part of this change. Remove these parameters from the UIStateContext depended on by ToolGroupMessage, etc.
| }; | ||
| }; | ||
|
|
||
| function findLastIndex<T>( |
There was a problem hiding this comment.
These changes to VirtualizedList aren't directly related to spllitting the context and can be reverted if desired. They are part of the same effort to improve the efficiency of the main chat history area which is rendered as a VirtualizedList.
Problem is we were using the same context object for the InputPrompt and the chat history resulting bad performance as every keystroke would cause React to invalidate the chat history. We had caching in place to help but wasn't enough.
FIxes #24624
How to test:
Resume a long history.
Verify that typing in the input prompt feels fast rather than laggy.