Skip to content

Fix the type incompatibility issue in the MCP HTTP server handler#268548

Merged
connor4312 merged 3 commits intomicrosoft:mainfrom
bwateratmsft:bwateratmsft/undici
Sep 26, 2025
Merged

Fix the type incompatibility issue in the MCP HTTP server handler#268548
connor4312 merged 3 commits intomicrosoft:mainfrom
bwateratmsft:bwateratmsft/undici

Conversation

@bwateratmsft
Copy link
Contributor

Fixes a type incompatibility bug introduced by #268488 / #268524.

Copilot AI review requested due to automatic review settings September 26, 2025 20:20
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a type incompatibility issue in the MCP HTTP server handler by introducing a common response interface and updating method signatures to use it consistently across both Node.js and common implementations.

  • Introduces a CommonResponse interface to handle slight type differences between undici's Response and the standard Response type
  • Updates all Response type references to use the new CommonResponse interface
  • Simplifies the Node.js fetch implementation by returning undici's response directly with type casting

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/vs/workbench/api/common/extHostMcp.ts Defines CommonResponse interface and updates all method signatures to use it instead of standard Response
src/vs/workbench/api/node/extHostMcpNode.ts Updates Node.js implementation to return CommonResponse and simplifies fetch logic by removing manual Response construction

@connor4312 connor4312 enabled auto-merge (squash) September 26, 2025 20:39
@vs-code-engineering vs-code-engineering bot added this to the September 2025 milestone Sep 26, 2025
@connor4312 connor4312 merged commit ce6aa6d into microsoft:main Sep 26, 2025
17 checks passed
@bwateratmsft bwateratmsft deleted the bwateratmsft/undici branch September 26, 2025 21:38
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Nov 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants