Skip to content

fix(patch): cherry-pick 2c1d6f8 to release/v0.30.0-preview.4-pr-19369 to patch version v0.30.0-preview.4 and create version 0.30.0-preview.5#20086

Merged
SandyTao520 merged 2 commits intorelease/v0.30.0-preview.4-pr-19369from
hotfix/v0.30.0-preview.4/0.30.0-preview.5/preview/cherry-pick-2c1d6f8/pr-19369
Feb 24, 2026
Merged

fix(patch): cherry-pick 2c1d6f8 to release/v0.30.0-preview.4-pr-19369 to patch version v0.30.0-preview.4 and create version 0.30.0-preview.5#20086
SandyTao520 merged 2 commits intorelease/v0.30.0-preview.4-pr-19369from
hotfix/v0.30.0-preview.4/0.30.0-preview.5/preview/cherry-pick-2c1d6f8/pr-19369

Conversation

@gemini-cli-robot
Copy link
Copy Markdown
Collaborator

This PR automatically cherry-picks commit 2c1d6f8 to patch version v0.30.0-preview.4 in the preview release to create version 0.30.0-preview.5.

@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 is an automated cherry-pick to backport a fix related to tool confirmation handling. The primary goal is to enhance the robustness of the tool action system by providing a fallback mechanism for tools that might not adhere to the standard correlationId pattern, ensuring their confirmation callbacks are still processed correctly. This change improves compatibility and prevents potential issues with older or specific tool integrations.

Highlights

  • Legacy Tool Confirmation Handling: Introduced a mechanism to handle tool confirmations for 'legacy' tools that do not provide a correlationId. This ensures that such tools can still trigger their local onConfirm callback when approved.
  • Type Definitions and Type Guard: Added new type definitions, LegacyConfirmationDetails, and a type guard function, hasLegacyCallback, to correctly identify and process tool confirmation details that include a local onConfirm callback.
  • Updated Tool Confirmation Logic: Modified the confirm function within ToolActionsProvider to prioritize publishing confirmation events via the message bus (if a correlationId is present) but fall back to calling the local onConfirm callback for legacy tools.
  • New Test Case: Added a new test case to verify that the local onConfirm callback is correctly invoked for tools without a correlationId, ensuring the new fallback logic works as expected.
Changelog
  • packages/cli/src/ui/contexts/ToolActionsContext.test.tsx
    • Imported SerializableConfirmationDetails type.
    • Added a new test case to validate local onConfirm calls for tools lacking a correlationId.
  • packages/cli/src/ui/contexts/ToolActionsContext.tsx
    • Imported SerializableConfirmationDetails type.
    • Defined LegacyConfirmationDetails type to include a local onConfirm callback.
    • Implemented hasLegacyCallback type guard function to check for the presence of a legacy onConfirm callback.
    • Modified the confirm function to include a fallback logic that calls details.onConfirm if no correlationId is available and a legacy callback exists.
    • Updated the debug warning message to reflect the new fallback logic.
Activity
  • This pull request was automatically created by gemini-cli-robot to cherry-pick commit 2c1d6f8 into the release/v0.30.0-preview.4-pr-19369 branch, patching version v0.30.0-preview.4 and creating 0.30.0-preview.5.
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.

@gemini-cli gemini-cli Bot added the status/need-issue Pull requests that need to have an associated issue. label Feb 23, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 23, 2026

Size Change: +270 B (0%)

Total Size: 24.5 MB

ℹ️ View Unchanged
Filename Size Change
./bundle/gemini.js 24.5 MB +270 B (0%)
./bundle/sandbox-macos-permissive-open.sb 890 B 0 B
./bundle/sandbox-macos-permissive-proxied.sb 1.31 kB 0 B
./bundle/sandbox-macos-restrictive-open.sb 3.36 kB 0 B
./bundle/sandbox-macos-restrictive-proxied.sb 3.56 kB 0 B
./bundle/sandbox-macos-strict-open.sb 4.82 kB 0 B
./bundle/sandbox-macos-strict-proxied.sb 5.02 kB 0 B

compressed-size-action

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

The pull request introduces a new test case and associated type definitions to handle legacy tool confirmation callbacks. The review comments suggest improvements to type safety and code clarity within the test file by avoiding unnecessary imports and explicit type assertions, ensuring better maintainability and readability. This ensures that tools without a correlationId can still be confirmed through a local onConfirm function, improving the robustness of tool action handling by providing a fallback mechanism for older tool implementations.

MessageBusType,
IdeClient,
CoreToolCallStatus,
type SerializableConfirmationDetails,
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 import of SerializableConfirmationDetails is unnecessary in this test file as it's only used for a type assertion, which can be avoided by directly defining the legacyTool with the LegacyConfirmationDetails type.

  CoreToolCallStatus,
}

rootCommand: 'ls',
rootCommands: ['ls'],
onConfirm: mockOnConfirm,
} as unknown as SerializableConfirmationDetails,
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 type assertion as unknown as SerializableConfirmationDetails is a workaround that can be avoided by defining legacyTool with the correct LegacyConfirmationDetails type, which is now available. This improves type safety and readability.

        onConfirm: mockOnConfirm,
      },
    };

The configuration doc moved from docs/get-started/configuration.md to
docs/reference/configuration.md on main, causing the link checker to fail.
@SandyTao520 SandyTao520 requested a review from a team as a code owner February 23, 2026 23:47
@SandyTao520 SandyTao520 merged commit 10416ef into release/v0.30.0-preview.4-pr-19369 Feb 24, 2026
25 checks passed
@SandyTao520 SandyTao520 deleted the hotfix/v0.30.0-preview.4/0.30.0-preview.5/preview/cherry-pick-2c1d6f8/pr-19369 branch February 24, 2026 00:11
kuishou68 pushed a commit to iOfficeAI/aioncli that referenced this pull request Feb 27, 2026
… to patch version v0.30.0-preview.4 and create version 0.30.0-preview.5 (google-gemini#20086)

Co-authored-by: Sandy Tao <sandytao520@icloud.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status/need-issue Pull requests that need to have an associated issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants