fix(patch): cherry-pick 1cae5ab to release/v0.28.0-preview.3-pr-18376 to patch version v0.28.0-preview.3 and create version 0.28.0-preview.4#18463
Conversation
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 implements a targeted solution to rectify an incompatibility issue with Xcode 26.3's 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
|
|
Size Change: +2.39 kB (+0.01%) Total Size: 23.7 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Code Review
This pull request cherry-picks a fix for non-compliant responses from Xcode's mcpbridge. It introduces a new XcodeMcpBridgeFixTransport wrapper to intercept and correct these responses. The implementation is sound and includes relevant tests. My review includes suggestions to improve encapsulation by avoiding access to private properties through type assertions, which will make the code more robust and maintainable.
| const underlyingTransport = | ||
| transport instanceof XcodeMcpBridgeFixTransport | ||
| ? // eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
| (transport as any).transport | ||
| : transport; |
There was a problem hiding this comment.
Accessing the private transport property using as any is a workaround that breaks encapsulation. Once the transport property in XcodeMcpBridgeFixTransport is made public (as suggested in another comment), you can access it directly without the type cast and eslint-disable comment, making the code cleaner and more robust.
const underlyingTransport =
transport instanceof XcodeMcpBridgeFixTransport
? transport.transport
: transport;| extends EventEmitter | ||
| implements Transport | ||
| { | ||
| constructor(private readonly transport: Transport) { |
There was a problem hiding this comment.
The transport property is marked as private, but it's being accessed from mcp-client.ts using a type assertion (as any). This breaks encapsulation and makes the code brittle. To provide proper, type-safe access, please change the visibility of transport to public.
| constructor(private readonly transport: Transport) { | |
| constructor(public readonly transport: Transport) { |
900e0c9
into
release/v0.28.0-preview.3-pr-18376
This PR automatically cherry-picks commit 1cae5ab to patch version v0.28.0-preview.3 in the preview release to create version 0.28.0-preview.4.