Skip to content

fix(patch): cherry-pick 030a5ac to release/v0.18.3-pr-13565 [CONFLICTS]#13869

Merged
SandyTao520 merged 2 commits intorelease/v0.18.3-pr-13565from
hotfix/v0.18.3/0.18.4/stable/cherry-pick-030a5ac/pr-13565
Nov 26, 2025
Merged

fix(patch): cherry-pick 030a5ac to release/v0.18.3-pr-13565 [CONFLICTS]#13869
SandyTao520 merged 2 commits intorelease/v0.18.3-pr-13565from
hotfix/v0.18.3/0.18.4/stable/cherry-pick-030a5ac/pr-13565

Conversation

@gemini-cli-robot
Copy link
Copy Markdown
Collaborator

This PR automatically cherry-picks commit 030a5ac to patch version v0.18.3 in the stable release to create version 0.18.4.

⚠️ Merge Conflicts Detected

This cherry-pick resulted in merge conflicts that need manual resolution.

🔧 Next Steps:

  1. Review the conflicts: Check out this branch and review the conflict markers
  2. Resolve conflicts: Edit the affected files to resolve the conflicts
  3. Test the changes: Ensure the patch works correctly after resolution
  4. Update this PR: Push your conflict resolution

📋 Files with conflicts:

The commit has been created with conflict markers for easier manual resolution.

🚨 Important:

  • Do not merge this PR until conflicts are resolved
  • The automated patch release will trigger once this PR is merged

@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 backports crucial bug fixes and enhancements related to the application's authentication process and terminal interaction. It centralizes terminal control logic, improves error reporting, and refines the user experience during authentication, especially in non-browser environments. The PR currently requires manual intervention to resolve merge conflicts before it can be merged.

Highlights

  • Cherry-pick with Conflicts: This pull request is an automated cherry-pick of commit 030a5ac to the release/v0.18.3-pr-13565 branch, which has resulted in merge conflicts that require manual resolution.
  • Authentication Flow Improvements: The underlying changes fix multiple bugs in the authentication flow, including implementing previously unused restart support. This is particularly evident when logging in with Google in environments where browser launch is suppressed, now triggering a controlled restart with a specific exit code.
  • Terminal Control Refactoring: Terminal control functions (e.g., mouse events, alternate screen buffers, line wrapping, Kitty keyboard protocol) have been refactored and moved from packages/cli into a new packages/core/src/utils/terminal.ts file. This centralizes terminal manipulation logic and makes it reusable across packages.
  • Enhanced Error Handling and Output: Error handling in packages/cli/index.ts has been updated to use writeToStderr for critical errors, ensuring consistent output to the standard error stream. The oauth2.ts module also now uses writeToStdout and writeToStderr for user messages during authentication, and emits CoreEvent.UserFeedback.
  • Controlled Application Restarts: A new RELAUNCH_EXIT_CODE has been introduced to facilitate controlled application restarts, specifically used after successful authentication or when a restart is requested from the settings dialog.
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.

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 contains several unresolved merge conflicts from the cherry-pick process. These are critical issues that block the PR from being merged. Please resolve all conflict markers. The underlying code changes appear to be a significant and beneficial refactoring of terminal I/O and authentication flows, centralizing logic into the core package and improving user experience.

Comment thread packages/cli/src/gemini.tsx Outdated
Comment on lines +50 to +61
<<<<<<< HEAD
=======
createInkStdio,
patchStdio,
writeToStdout,
writeToStderr,
disableMouseEvents,
enableMouseEvents,
enterAlternateScreen,
disableLineWrapping,
shouldEnterAlternateScreen,
>>>>>>> 030a5ace9 (Fix multiple bugs with auth flow including using the implemented but unused restart support. (#13565))
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.

critical

This file contains an unresolved merge conflict that must be fixed before this pull request can be merged.

Comment on lines +57 to +76
<<<<<<< HEAD
=======
writeToStdout: vi.fn((...args) =>
process.stdout.write(
...(args as Parameters<typeof process.stdout.write>),
),
),
writeToStderr: vi.fn((...args) =>
process.stderr.write(
...(args as Parameters<typeof process.stderr.write>),
),
),
patchStdio: vi.fn(() => () => {}),
createInkStdio: vi.fn(() => ({
stdout: process.stdout,
stderr: process.stderr,
})),
enableMouseEvents: vi.fn(),
disableMouseEvents: vi.fn(),
>>>>>>> 030a5ace9 (Fix multiple bugs with auth flow including using the implemented but unused restart support. (#13565))
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.

critical

This file contains an unresolved merge conflict that must be fixed before this pull request can be merged.

Comment on lines +189 to +202
<<<<<<< HEAD
import { ShellExecutionService } from '@google/gemini-cli-core';
import { type ExtensionManager } from '../config/extension-manager.js';
import { enableMouseEvents, disableMouseEvents } from './utils/mouse.js';
import { writeToStdout } from '../utils/stdio.js';
=======
import {
ShellExecutionService,
writeToStdout,
enableMouseEvents,
disableMouseEvents,
} from '@google/gemini-cli-core';
import { type ExtensionManager } from '../config/extension-manager.js';
>>>>>>> 030a5ace9 (Fix multiple bugs with auth flow including using the implemented but unused restart support. (#13565))
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.

critical

This file contains an unresolved merge conflict that must be fixed before this pull request can be merged.

Comment thread packages/cli/src/ui/AppContainer.tsx Outdated
Comment on lines +119 to +122
<<<<<<< HEAD
import { writeToStdout } from '../utils/stdio.js';
=======
>>>>>>> 030a5ace9 (Fix multiple bugs with auth flow including using the implemented but unused restart support. (#13565))
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.

critical

This file contains an unresolved merge conflict that must be fixed before this pull request can be merged.

Comment thread packages/cli/src/ui/utils/mouse.ts Outdated
Comment on lines +7 to +11
<<<<<<< HEAD
import { writeToStdout } from '../../utils/stdio.js';
=======
import { enableMouseEvents, disableMouseEvents } from '@google/gemini-cli-core';
>>>>>>> 030a5ace9 (Fix multiple bugs with auth flow including using the implemented but unused restart support. (#13565))
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.

critical

This file contains an unresolved merge conflict that must be fixed before this pull request can be merged.

Comment thread packages/core/src/index.ts Outdated
Comment on lines +147 to +153
<<<<<<< HEAD
=======

// Export stdio utils
export * from './utils/stdio.js';
export * from './utils/terminal.js';
>>>>>>> 030a5ace9 (Fix multiple bugs with auth flow including using the implemented but unused restart support. (#13565))
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.

critical

This file contains an unresolved merge conflict that must be fixed before this pull request can be merged.

@SandyTao520 SandyTao520 force-pushed the hotfix/v0.18.3/0.18.4/stable/cherry-pick-030a5ac/pr-13565 branch from 0bb9418 to 3101ef0 Compare November 26, 2025 21:12
@SandyTao520 SandyTao520 enabled auto-merge (squash) November 26, 2025 21:13
@github-actions
Copy link
Copy Markdown

Size Change: +3.69 kB (+0.02%)

Total Size: 21.3 MB

Filename Size Change
./bundle/gemini.js 21.3 MB +3.69 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 2e8d783 into release/v0.18.3-pr-13565 Nov 26, 2025
21 checks passed
@SandyTao520 SandyTao520 deleted the hotfix/v0.18.3/0.18.4/stable/cherry-pick-030a5ac/pr-13565 branch November 26, 2025 21:22
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