Logs/docs: add /healthz verbose log and README ‘Viewing logs’ steps

Co-Authored-By: Lars Baunwall <larslb@thinkability.dk>
This commit is contained in:
Devin AI 2025-08-12 18:25:59 +00:00
parent 862eab2a4a
commit e61d191ebf
2 changed files with 11 additions and 0 deletions

View file

@ -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). Youll 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)

View file

@ -78,6 +78,7 @@ async function startBridge() {
const cfgNow = vscode.workspace.getConfiguration('bridge');
const verboseNow = cfgNow.get<boolean>('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 });