fix(patch): cherry-pick d0c6a56 to release/v0.28.2-pr-18976 [CONFLICTS]#19024
Conversation
# Conflicts: # packages/core/src/utils/headless.test.ts # packages/core/src/utils/headless.ts
Summary of ChangesHello @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 of a commit aimed at improving the Highlights
Changelog
Activity
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. 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
|
There was a problem hiding this comment.
Code Review
This pull request contains unresolved merge conflicts from a cherry-pick operation. As noted in the description, these conflicts in packages/core/src/utils/headless.test.ts and packages/core/src/utils/headless.ts must be resolved. The presence of conflict markers makes the code invalid and prevents merging.
| <<<<<<< HEAD | ||
| it('should return false if query is provided but it is still a TTY', () => { | ||
| // Note: per current logic, query alone doesn't force headless if TTY | ||
| // This matches the existing behavior in packages/cli/src/config/config.ts | ||
| expect(isHeadlessMode({ query: 'test query' })).toBe(false); | ||
| ======= | ||
| it('should return true if query is provided', () => { | ||
| expect(isHeadlessMode({ query: 'test query' })).toBe(true); | ||
| }); | ||
|
|
||
| it('should return true if -p or --prompt is in process.argv as a fallback', () => { | ||
| const originalArgv = process.argv; | ||
| process.argv = ['node', 'index.js', '-p', 'hello']; | ||
| try { | ||
| expect(isHeadlessMode()).toBe(true); | ||
| } finally { | ||
| process.argv = originalArgv; | ||
| } | ||
|
|
||
| process.argv = ['node', 'index.js', '--prompt', 'hello']; | ||
| try { | ||
| expect(isHeadlessMode()).toBe(true); | ||
| } finally { | ||
| process.argv = originalArgv; | ||
| } | ||
| }); | ||
|
|
||
| it('should return false if -y or --yolo is in process.argv as a fallback', () => { | ||
| const originalArgv = process.argv; | ||
| process.argv = ['node', 'index.js', '-y']; | ||
| try { | ||
| expect(isHeadlessMode()).toBe(false); | ||
| } finally { | ||
| process.argv = originalArgv; | ||
| } | ||
|
|
||
| process.argv = ['node', 'index.js', '--yolo']; | ||
| try { | ||
| expect(isHeadlessMode()).toBe(false); | ||
| } finally { | ||
| process.argv = originalArgv; | ||
| } | ||
| >>>>>>> d0c6a56c6 (fix(core): ensure --yolo does not force headless mode (#18976)) |
There was a problem hiding this comment.
| <<<<<<< HEAD | ||
| (!!process.stdout && !process.stdout.isTTY) | ||
| ); | ||
| ======= | ||
| (!!process.stdout && !process.stdout.isTTY); | ||
|
|
||
| if (isNotTTY || !!options?.prompt || !!options?.query) { | ||
| return true; | ||
| } | ||
|
|
||
| // Fallback: check process.argv for flags that imply headless mode. | ||
| return process.argv.some((arg) => arg === '-p' || arg === '--prompt'); | ||
| >>>>>>> d0c6a56c6 (fix(core): ensure --yolo does not force headless mode (#18976)) |
There was a problem hiding this comment.
This PR automatically cherry-picks commit d0c6a56 to patch version v0.28.2 in the stable release to create version 0.28.3.
This cherry-pick resulted in merge conflicts that need manual resolution.
🔧 Next Steps:
📋 Files with conflicts:
The commit has been created with conflict markers for easier manual resolution.
🚨 Important: