Skip to content

Commit 789cb4f

Browse files
feat(diagnostics): add telemetry logging for ignored stream parts to vs code output channel
1 parent 83c962e commit 789cb4f

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"displayName": "GitHub Copilot API Gateway",
44
"description": "Free & open-source universal API Gateway for all VS Code language models. Auto-discovers GitHub Copilot, Gemini, Ollama & any AI extension — exposing them via local OpenAI, Anthropic, Google & Llama compatible APIs. One endpoint, every model. Use with Cursor, LangChain, Agents & more.",
55
"icon": "media/icon.png",
6-
"version": "2.11.4",
6+
"version": "2.11.5",
77
"author": {
88
"name": "Suhaib Bin Younis",
99
"email": "vscode@suhaib.in",

src/CopilotApiGateway.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4413,6 +4413,16 @@ export class CopilotApiGateway implements vscode.Disposable {
44134413
return p.thinking;
44144414
}
44154415

4416+
// If we reach here, we are about to silently drop an unrecognized part!
4417+
// Log it to the Output Channel so users can share it in GitHub issues.
4418+
try {
4419+
if (Object.keys(p).length > 0) {
4420+
this.logInfo(`[Diagnostic] Unknown stream part ignored: ${JSON.stringify(p)}`);
4421+
}
4422+
} catch (e) {
4423+
this.logInfo(`[Diagnostic] Unknown unstringifiable stream part ignored.`);
4424+
}
4425+
44164426
return undefined;
44174427
}
44184428

0 commit comments

Comments
 (0)