Fixes 'input.on' is not a function error in Gemini CLI#19691
Conversation
Summary of ChangesHello @gundermanc, 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 delivers a crucial fix for a runtime error that was blocking the Gemini CLI's functionality for authenticated users. By refining how the application handles input streams, it enhances the overall stability and reliability of the CLI. Additionally, the changes introduce more detailed telemetry for file modifications, offering better insights into automated code edits. 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
|
415dfca to
2caaefb
Compare
There was a problem hiding this comment.
Code Review
This pull request effectively resolves a critical runtime error ('input.on' is not a function) that occurred when using Google account authentication. The fix correctly replaces an unsafe type cast with Readable.from(), ensuring that both Node.js and Web API streams are handled properly. The addition of a new test case to cover this scenario is a great practice. However, this PR also includes unrelated changes to add new telemetry for edit tool statistics. While these changes are correct, they violate the repository's convention of keeping pull requests small and focused, as noted in the specific comment.
I am having trouble creating individual review comments. Click here to see my feedback.
packages/core/src/code_assist/telemetry.ts (25-28)
While the main purpose of this PR is to fix a runtime error with streams, it also introduces new telemetry for tracking added/removed lines from edit tools. According to the repository's development conventions, pull requests should be small and focused. Bundling a bug fix with a new feature makes the PR harder to review and can complicate rollbacks if needed. Please consider splitting these changes into separate pull requests in the future.
References
- The repository style guide recommends that pull requests should be small and focused. This pull request combines a bug fix with a new telemetry feature, which should ideally be in separate pull requests. (link)
|
Size Change: -1.45 kB (-0.01%) Total Size: 25.2 MB
ℹ️ View Unchanged
|
Summary
Fixes an error that blocks the ability to use Gemini CLI when authenticated with a Google account. User types in a message and is confronted by an unhandled error.
This is another case of the codebase using casts (as keyword) to override the type system, leading to a failure at runtime instead of a compilation error, as code and dependencies change.
I have filed the following item to track eliminating these code smells: #19440
Pre-Merge Checklist