feat: Simplify API surface and improve claude streaming correctness - #2
Conversation
CarlJi
commented
Mar 2, 2026
- Remove premature Capabilities fields (Daemon, StructuredOutput, MultiModal, ExtendedThinking)
- Remove ReasoningEffort type and OutputSchema from SessionConfig; drop corresponding claude CLI args
- Fix duplicate TextEvent in claude streaming: suppress result-line text when assistant events already delivered it
- CollectResult now returns error on fatal ErrorEvent instead of silently ignoring it
- Rewrite demo/basic as a full multi-backend integration demo covering 8 scenarios (validate, single-turn, streaming, multi-turn, resume/fork, config override, MCP, health-check)
- Update README: revise Executor interface docs, replace DockerExecutor section with Custom Executors, expand event table with Source/MCPServer/CallID fields
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 focuses on refining the core API by removing unnecessary capability flags and configuration parameters, leading to a cleaner and more focused interface. It also addresses a critical bug in Claude's streaming output to ensure correct event delivery and improves error handling for fatal events. A major enhancement is the complete rewrite of the basic demo, transforming it into a robust, multi-backend example that covers a wide array of interaction patterns, significantly improving the utility and clarity of the project's examples. Corresponding documentation has been updated to reflect these architectural and functional changes. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
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 introduces significant and valuable changes. It simplifies the API surface by removing several fields from Capabilities and SessionConfig, which makes the library easier to use. The fix for duplicate TextEvent in Claude streaming is a crucial correctness improvement, and the implementation with statefulMapLine is well-reasoned. Handling fatal errors in CollectResult also enhances robustness. The complete rewrite of the demo/basic example into a comprehensive multi-backend integration test is a major improvement and will be very helpful for users. My feedback includes a few suggestions to improve error handling in the new demo code to make it even more robust. Overall, this is a great set of changes.
|
Good overall direction — the API surface reduction is clean and the streaming deduplication fix is well-motivated. A few things worth addressing before merge:
See inline comments for details. |
- Remove premature Capabilities fields (Daemon, StructuredOutput, MultiModal, ExtendedThinking) - Remove ReasoningEffort type and OutputSchema from SessionConfig; drop corresponding claude CLI args - Fix duplicate TextEvent in claude streaming: suppress result-line text when assistant events already delivered it - CollectResult now returns error on fatal ErrorEvent instead of silently ignoring it - Rewrite demo/basic as a full multi-backend integration demo covering 8 scenarios (validate, single-turn, streaming, multi-turn, resume/fork, config override, MCP, health-check) - Update README: revise Executor interface docs, replace DockerExecutor section with Custom Executors, expand event table with Source/MCPServer/CallID fields
ecab10f to
6a5db77
Compare