From e61d191ebfd2ec0febe5dd5f5473090c211c8246 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 12 Aug 2025 18:25:59 +0000 Subject: [PATCH] =?UTF-8?q?Logs/docs:=20add=20/healthz=20verbose=20log=20a?= =?UTF-8?q?nd=20README=20=E2=80=98Viewing=20logs=E2=80=99=20steps?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Lars Baunwall --- README.md | 10 ++++++++++ src/extension.ts | 1 + 2 files changed, 11 insertions(+) diff --git a/README.md b/README.md index ab2de6b..100b0fd 100644 --- a/README.md +++ b/README.md @@ -58,6 +58,16 @@ Optional: Packaging a VSIX - bridge.token (string; default ""): optional bearer token; empty disables auth - bridge.historyWindow (number; default 3): number of user/assistant turns to keep - bridge.maxConcurrent (number; default 1): max concurrent chat requests; excess → 429 +## Viewing logs + +To see verbose logs: +1) Enable: Settings → search “Copilot Bridge” → enable “bridge.verbose” +2) Open: View → Output → select “Copilot Bridge” in the dropdown +3) Trigger a request (e.g., curl /v1/chat/completions). You’ll see: + - HTTP request lines (method/path) + - Access acquisition attempts (“Copilot access missing; attempting to acquire…”, “Copilot access acquired.”) + - SSE lifecycle (“SSE start …”, “SSE end …”) + - Health checks (best-effort access check when verbose is on) - bridge.verbose (boolean; default false): verbose logs to “Copilot Bridge” output channel ## Manual Testing (curl) diff --git a/src/extension.ts b/src/extension.ts index eef42e6..d35c5a8 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -78,6 +78,7 @@ async function startBridge() { const cfgNow = vscode.workspace.getConfiguration('bridge'); const verboseNow = cfgNow.get('verbose') ?? false; if (!access && verboseNow) { + if (verboseNow) output?.appendLine(`Healthz: access=${access ? 'present' : 'missing'}`); await getAccess(); } writeJson(res, 200, { ok: true, copilot: access ? 'ok' : 'unavailable', version: vscode.version });