remove mcp/sendOauthCode protocol

This commit is contained in:
uinstinct 2025-07-29 12:25:56 +05:30
parent 64702333a7
commit 2bc7f15864
3 changed files with 0 additions and 30 deletions

View file

@ -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);

View file

@ -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];

View file

@ -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;