From c2afbeb29833679b9cd260bdb821ba9003c56321 Mon Sep 17 00:00:00 2001 From: Raghav Chari Date: Mon, 17 Aug 2026 20:05:22 +0000 Subject: [PATCH] fix(extension): document google token paste alongside browser OAuth MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Google connectors now accept a pasted token the same way Claude and other connectors do (Slack/GitHub flow via POST /amicode/connections/credential), in addition to the browser OAuth path. The extension already proxies that route via chat_bridge (connections-credential) and the opencode server validates via probeGoogle/probeGoogleDrive, so no extension logic change was needed — this logs the dual support explicitly so a future 'browser doesn't launch' is not the only diagnostic. Server side (harmoniqs/opencode#210) advertises [token,browser] for google/google-drive, makes the UI offer token input + browser button in the picker and card chooser, and validates pasted tokens via POST /amicode/connections/credential -> probeGoogle. Related to https://github.com/harmoniqs/amicode/issues/335 --- packages/extension/src/server_manager.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/extension/src/server_manager.ts b/packages/extension/src/server_manager.ts index 7f19f7c8..c9d5afcc 100644 --- a/packages/extension/src/server_manager.ts +++ b/packages/extension/src/server_manager.ts @@ -64,9 +64,12 @@ export class ServerManager { // The opencode McpBrowser now respects BROWSER first (fallback to xdg-open), // but only if the server inherits it. Explicitly log what we propagate so a // "browser doesn't launch" failure is diagnosable from the output channel. + // Google token path (like Claude): paste a token into the connections panel + // as with Slack/GitHub — no browser needed when a token is available. const browserEnv = process.env.BROWSER ? `BROWSER=${process.env.BROWSER}` : "BROWSER=(unset)" const ipcEnv = process.env.VSCODE_IPC_HOOK_CLI ? "VSCODE_IPC_HOOK_CLI=present" : "VSCODE_IPC_HOOK_CLI=(unset)" this.opts.channel.appendLine(`[server] browser env: ${browserEnv}, ${ipcEnv}`) + this.opts.channel.appendLine(`[server] google connector supports token paste (like Claude) + browser OAuth`) const child = cp.spawn(this.opts.binary, ["serve", "--port", String(port)], { cwd: this.opts.cwd, env: { ...process.env, ...this.opts.env },