Repository navigation
Conversation
VS Code 1.147's Copilot agent host initializes with clientInfo.name "vscode-agent-host", and its Copilot CLI sessions with the agent host off send "vscode". Both read ~/.copilot/mcp-config.json, so they belong to the copilot client. The copilot row stayed connected_never_seen and the sessions showed up as an "other" row (or, for "vscode", under the VS Code client). Move "vscode" from the VS Code client to copilot and add "vscode-agent-host". The VS Code Local harness sends the product's long name, so the VS Code client also gains "Visual Studio Code - Insiders". Fixes smart-mcp-proxy#1959
Owner
Author
|
Moved upstream: smart-mcp-proxy#1961 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
Description
Fixes smart-mcp-proxy#1959. Connect for GitHub Copilot works, but the Copilot row stays
connected_never_seenbecause VS Code reports aclientInfo.namethat the copilot client doesn't list.Presence matches
clientInfo.nameexactly againstClientInfoNames. Here is what each VS Code path sends, from VS Code's source:clientInfo.namecopilotSessionLauncher.tsvscode-agent-host~/.copilot/mcp-config.jsoncopilotcliSessionService.ts(clientName: 'vscode')vscode~/.copilot/mcp-config.jsonmcpServerRequestHandler.ts(productService.nameLong)Visual Studio CodeCode/User/mcp.jsonVisual Studio Code - InsidersCode/User/mcp.jsonChanges, all in
internal/connect/clients.go:vscode-agent-hostandvscode.Visual Studio Code - Insiders, and dropvscode, because the Local harness never sends it.Notes for reviewers:
vscode→ copilot mapping is inferred. The agent-host case shows the Copilot SDK sends its host'sclientNameasclientInfo.name, and I'm assuming theclientName: 'vscode'path works the same way. Not checked against a live VS Code with the agent host off.Testing
TestClientInfoNamesMatchWhatEachHostSendsreplaces the copilot-only alias test and covers both clients.go testpasses forinternal/connect,internal/clientidentity, and the client/presence/connect tests ininternal/httpapi,internal/runtimeandinternal/server, using the CI skip list for the E2E tests that start the binary. golangci-lint was not run.