fix(zed-integration): Ensure that the zed integration is classified as interactive - #13394
Conversation
…s interactive Shell-based tool calls were always failing because the zed flag wasn't getting marked in the config as an interactive session. This should allow the tool calls to proceed.
Summary of ChangesHello @benbrandt, 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 critical bug in the Zed integration where shell-based tool calls were consistently failing. The core issue was that sessions initiated with 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. 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 addresses an urgent bug where shell-based tool calls were failing for the Zed integration because the session was not being correctly identified as interactive. The fix, located in packages/cli/src/config/config.ts, is clean and effective. It correctly updates the interactive flag to be true when the --experimental-acp flag is present. The subsequent removal of the now-redundant !argv.experimentalAcp check simplifies the logic for excluding tools in non-interactive modes. The change is minimal, well-targeted, and directly resolves the issue. I find no issues with this implementation.
|
@benbrandt Doesn't the existing conditional already treat ACP as interactive? |
|
The issue is that |
Ah I missed the change on line 517... lgtm |
…egration is classified as interactive (google-gemini#13394)
…egration is classified as interactive (google-gemini#13394)
|
@benbrandt In could not tell if this was related to this exact change, but I noticed that we're not getting anything in stdout since 18.0-preview0: > echo '{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"protocolVersion":1,"clientCapabilities":{"fs":{"readTextFile":false,"writeTextFile":false},"terminal":false}}}' | node ~/Downloads/v0.17.1.js --experimental-acp
{"jsonrpc":"2.0","id":0,"result":{"protocolVersion":1,"authMethods":[{"id":"oauth-personal","name":"Log in with Google","description":null},{"id":"gemini-api-key","name":"Use Gemini API key","description":"Requires setting the `GEMINI_API_KEY` environment variable"},{"id":"vertex-ai","name":"Vertex AI","description":null}],"agentCapabilities":{"loadSession":false,"promptCapabilities":{"image":true,"audio":true,"embeddedContext":true}}}}
> echo '{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"protocolVersion":1,"clientCapabilities":{"fs":{"readTextFile":false,"writeTextFile":false},"terminal":false,"_meta":{"terminal-auth":true}}}}' | node ~/Downloads/v0.18.0-preview.0.js --experimental-acp
# nothing |
|
I bet this change that fixed the terminals broke the auth flow... Will have to look at it in the morning |
|
Yes I bisected it to #13247 |
…s interactive (#13394) Co-authored-by: Shreya Keshive <shreyakeshive@google.com>
|
@gsabran thanks so much! this helps a ton. Looking now |
…s interactive (google-gemini#13394) Co-authored-by: Shreya Keshive <shreyakeshive@google.com>
…s interactive (#13394) Co-authored-by: Shreya Keshive <shreyakeshive@google.com>
Summary
Shell-based tool calls were always failing because the zed flag wasn't getting marked in the config as an interactive session.
This should allow the tool calls to proceed. This is urgent and most sessions are completely broken if the agent cannot call shell commands.
Related Issues
Closes: zed-industries/zed#41059
How to Validate
Run
npm run buildand put the following config in your Zed settings.json{ "agent_servers": { "jimandi": { "command": "/path/to/your/repo/gemini-cli/packages/cli/dist/index.js", "args": ["--experimental-acp"] } } }Pre-Merge Checklist