Conversation
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 addresses a regression where the 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
|
|
Hi @spencer426, 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! |
|
Size Change: 0 B Total Size: 34 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Code Review
This pull request replaces the use of debugLogger from @google/gemini-cli-core with direct process.stdout.write calls in the skills list command. The corresponding tests have been updated to spy on process.stdout.write instead of monitoring core events. Feedback was provided to improve type safety in the test file by using vi.SpyInstance for the spy variable instead of the any type, which also allows for the removal of an ESLint suppression comment.
Gemini cli treats commands running from a subprocess as headless and skips info logging unless in debug mode. See github.com/google-gemini/gemini-cli/pull/24566. Bug: b:498783782 Change-Id: Ied8c7bfadd9765206bccba0af197b514c12d71b9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7727693 Reviewed-by: Brian Sheedy <bsheedy@chromium.org> Reviewed-by: Erik Staab <estaab@chromium.org> Auto-Submit: Jyothi Mathew <jyomathew@google.com> Commit-Queue: Brian Sheedy <bsheedy@chromium.org> Cr-Commit-Position: refs/heads/main@{#1609566}
Summary
Fixes a regression where
gemini skills listproduced no output on stdout when run in non-interactive environments (e.g., via a Python script'ssubprocess.run). This regression was caused by PR #22739, which configured theConsolePatcherto dropconsole.logandconsole.infomessages in headless mode to reduce noise. Becauseskills listrelied ondebugLogger.log(which wrapsconsole.log), its intended stdout payload was incorrectly suppressed.This PR modifies the
skills listcommand to write its output directly usingprocess.stdout.write, bypassing theConsolePatcherand ensuring the list is reliably printed regardless of the TTY state.Details
debugLogger.logcalls withprocess.stdout.writeinpackages/cli/src/commands/skills/list.ts.debugLoggerimport.list.test.ts) to spy onprocess.stdout.writeinstead ofcoreEvents.emitConsoleLog.Related Issues
Caused by #22739
Fixes #24574
How to Validate
gemini skills listin a standard terminal. It should print the discovered skills as expected.gemini skills listin a non-interactive environment (e.g., piping tocator using a Python script):python3 -c "import subprocess; print(subprocess.run(['node', 'packages/cli/bin/gemini', 'skills', 'list'], capture_output=True, text=True).stdout)"It should successfully print the list of skills instead of an empty string.
Pre-Merge Checklist