From 2bc7f158640be5ba9fb0f46eff48af4af4af631d Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Tue, 29 Jul 2025 12:25:56 +0530 Subject: [PATCH] remove mcp/sendOauthCode protocol --- core/core.ts | 16 ---------------- core/protocol/core.ts | 6 ------ .../vscode/src/extension/VsCodeExtension.ts | 8 -------- 3 files changed, 30 deletions(-) diff --git a/core/core.ts b/core/core.ts index c1c36c37c..4e406fa3f 100644 --- a/core/core.ts +++ b/core/core.ts @@ -442,22 +442,6 @@ export class Core { await MCPManagerSingleton.getInstance().refreshConnection(msg.data.id); } }); - // TODO: remove this protocol altogher along with vscode counterpart - // on("mcp/sendOauthCode", async (msg) => { - // const authenticatingServer = MCPManagerSingleton.getInstance() - // .getStatuses() - // .find((s) => s.status === "authenticating"); - // const authStatus = await handleMCPOauthCode( - // msg.data.code, - // this.ide, - // authenticatingServer, - // ); - // if (authStatus === "AUTHORIZED" && authenticatingServer) { - // await MCPManagerSingleton.getInstance().refreshConnection( - // authenticatingServer.id, - // ); - // } - // }); on("mcp/removeAuthentication", async (msg) => { removeMCPAuth(msg.data, this.ide); await MCPManagerSingleton.getInstance().refreshConnection(msg.data.id); diff --git a/core/protocol/core.ts b/core/protocol/core.ts index daacaa4f1..086ba2104 100644 --- a/core/protocol/core.ts +++ b/core/protocol/core.ts @@ -145,12 +145,6 @@ export type ToCoreFromIdeOrWebviewProtocol = { }, ]; "mcp/startAuthentication": [MCPServerStatus, void]; - "mcp/sendOauthCode": [ - { - code: string; - }, - void, - ]; "mcp/removeAuthentication": [MCPServerStatus, void]; "context/getSymbolsForFiles": [{ uris: string[] }, FileSymbolMap]; diff --git a/extensions/vscode/src/extension/VsCodeExtension.ts b/extensions/vscode/src/extension/VsCodeExtension.ts index 463b2ba42..32154e19a 100644 --- a/extensions/vscode/src/extension/VsCodeExtension.ts +++ b/extensions/vscode/src/extension/VsCodeExtension.ts @@ -440,14 +440,6 @@ export class VsCodeExtension { void this.core.invoke("config/ideSettingsUpdate", settings); } }); - - // TODO: this should practically only start listening when user has started an mcp oauth flow. how to do this? - this.uriHandler.event((uri) => { - console.log("debug1 uri->", uri); - this.core.invoke("mcp/sendOauthCode", { - code: new URLSearchParams(uri.query).get("code") ?? "", - }); - }); } static continueVirtualDocumentScheme = EXTENSION_NAME;