Skip to content

fix(patch): cherry-pick d351f07 to release/v0.18.0-preview.1-pr-12535 to patch version v0.18.0-preview.1 and create version 0.18.0-preview.2#13813

Merged
SandyTao520 merged 1 commit intorelease/v0.18.0-preview.1-pr-12535from
hotfix/v0.18.0-preview.1/0.18.0-preview.2/preview/cherry-pick-d351f07/pr-12535
Nov 25, 2025
Merged

fix(patch): cherry-pick d351f07 to release/v0.18.0-preview.1-pr-12535 to patch version v0.18.0-preview.1 and create version 0.18.0-preview.2#13813
SandyTao520 merged 1 commit intorelease/v0.18.0-preview.1-pr-12535from
hotfix/v0.18.0-preview.1/0.18.0-preview.2/preview/cherry-pick-d351f07/pr-12535

Conversation

@gemini-cli-robot
Copy link
Copy Markdown
Collaborator

This PR automatically cherry-picks commit d351f07 to patch version v0.18.0-preview.1 in the preview release to create version 0.18.0-preview.2.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @gemini-cli-robot, 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 automates the creation of a new patch release for the CLI, specifically addressing user experience improvements related to interactive shell tools. The core changes involve implementing an inactivity timer to provide visual cues to users when an interactive shell is waiting for input, and enhancing the loading indicator to reflect this state. These updates aim to make the interactive shell experience more intuitive and responsive by guiding users to focus on the shell when necessary.

Highlights

  • Automated Patch Release: This pull request is an automated cherry-pick of commit d351f07 to create a new patch version 0.18.0-preview.2 from v0.18.0-preview.1.
  • Interactive Shell Focus Hints: Introduced a new useInactivityTimer hook and integrated it into ToolMessage and ShellToolMessage components to display a 'focus hint' (e.g., '(ctrl+f to focus)') when an interactive shell is awaiting input but is not currently focused.
  • Enhanced Loading Indicator for Interactive Shells: The useLoadingIndicator and usePhraseCycler hooks were updated to display a specific 'Interactive shell awaiting input...' message after a period of inactivity when an interactive shell is waiting for user input.
  • Output Time Tracking: Added lastShellOutputTime to useShellCommandProcessor and lastToolOutputTime to useReactToolScheduler to track the most recent output from either shell commands or other tools, which is then used to manage inactivity timers.
  • Refined Finish Reason Messages: Updated the user-facing messages for FinishReason.IMAGE_PROHIBITED_CONTENT and FinishReason.NO_IMAGE in useGeminiStream for better clarity.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@SandyTao520 SandyTao520 enabled auto-merge (squash) November 25, 2025 17:13
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces several UI enhancements, primarily focused on improving user feedback during tool execution and interactive shell sessions. A key change is the addition of a focus hint for interactive shells, which appears after a period of inactivity to guide the user. This is implemented using a new useInactivityTimer hook and by tracking the last output time from tools and shell commands. The logic for loading phrases has also been updated to prioritize this new actionable state. Additionally, some magic numbers have been refactored into constants, and user-facing messages for certain finish reasons have been clarified. Overall, these are solid improvements to the user experience. I have a couple of suggestions to improve the robustness of shell tool detection.

Comment on lines +63 to +67
const isThisShellFocused =
(name === SHELL_COMMAND_NAME || name === 'Shell') &&
status === ToolCallStatus.Executing &&
ptyId === activeShellPtyId &&
embeddedShellFocused;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The logic to identify a shell tool is incomplete and uses a hardcoded string. It's missing a check for SHELL_TOOL_NAME (the internal tool name) and it hardcodes 'Shell' instead of using the SHELL_NAME constant. This could lead to inconsistent behavior for identifying shell tools.

To fix this, you should import SHELL_NAME from ../../constants.js and SHELL_TOOL_NAME from @google/gemini-cli-core and update the condition.

Suggested change
const isThisShellFocused =
(name === SHELL_COMMAND_NAME || name === 'Shell') &&
status === ToolCallStatus.Executing &&
ptyId === activeShellPtyId &&
embeddedShellFocused;
const isThisShellFocused =
(name === SHELL_COMMAND_NAME || name === SHELL_NAME || name === SHELL_TOOL_NAME) &&
status === ToolCallStatus.Executing &&
ptyId === activeShellPtyId &&
embeddedShellFocused;

Comment on lines +89 to +92
const isThisShellFocusable =
(name === SHELL_COMMAND_NAME || name === 'Shell') &&
status === ToolCallStatus.Executing &&
config?.getEnableInteractiveShell();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Similar to the check for isThisShellFocused, this condition is incomplete for identifying a shell tool. It should also check for SHELL_TOOL_NAME and use the SHELL_NAME constant instead of a hardcoded string to ensure all shell tools are correctly identified as focusable.

Suggested change
const isThisShellFocusable =
(name === SHELL_COMMAND_NAME || name === 'Shell') &&
status === ToolCallStatus.Executing &&
config?.getEnableInteractiveShell();
const isThisShellFocusable =
(name === SHELL_COMMAND_NAME || name === SHELL_NAME || name === SHELL_TOOL_NAME) &&
status === ToolCallStatus.Executing &&
config?.getEnableInteractiveShell();

@github-actions
Copy link
Copy Markdown

Size Change: +3.59 kB (+0.02%)

Total Size: 21.1 MB

Filename Size Change
./bundle/gemini.js 21.1 MB +3.59 kB (+0.02%)
ℹ️ View Unchanged
Filename Size
./bundle/sandbox-macos-permissive-closed.sb 1.03 kB
./bundle/sandbox-macos-permissive-open.sb 890 B
./bundle/sandbox-macos-permissive-proxied.sb 1.31 kB
./bundle/sandbox-macos-restrictive-closed.sb 3.29 kB
./bundle/sandbox-macos-restrictive-open.sb 3.36 kB
./bundle/sandbox-macos-restrictive-proxied.sb 3.56 kB

compressed-size-action

@SandyTao520 SandyTao520 merged commit 843b019 into release/v0.18.0-preview.1-pr-12535 Nov 25, 2025
21 checks passed
@SandyTao520 SandyTao520 deleted the hotfix/v0.18.0-preview.1/0.18.0-preview.2/preview/cherry-pick-d351f07/pr-12535 branch November 25, 2025 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants