Repository navigation
feat(proxy): add disconnect support for Claude Desktop, VS Code Copilot Chat, and VS Code Claude Code - #580
Open
zsoltkovacs4-dot wants to merge 8 commits into
Conversation
Export removeDesktopConfig() and readManagedMcpState() from desktop.ts, reversing writeDesktopConfig's write: strips INFERENCE_KEYS, inferenceModels, coworkEgressAllowedHosts, and marker-managed MCP entries while preserving genuine user-added MCP entries. No-ops when nothing was connected. EPMCDME-15246 (proxy-disconnect-support), task 1/5.
Export removeVsCodeLanguageModelsConfig(), checking both stable and Insiders chatLanguageModels.json locations and filtering out the CodeMie provider entry. A missing product dir (edition not installed) is treated as nothing-to-do per location; corrupt JSON still throws. EPMCDME-15246 (proxy-disconnect-support), task 2/5.
Export removeVsCodeClaudeCodeConfig(), stripping the ANTHROPIC_BASE_URL / ANTHROPIC_AUTH_TOKEN managed entries from claudeCode.environmentVariables at both stable and Insiders settings.json, via targeted jsonc-parser edits so comments/formatting survive. Missing product dir per edition no-ops; corrupt JSONC still throws. EPMCDME-15246 (proxy-disconnect-support), task 3/5.
Rewrite disconnectTargets from its single codex-desktop-only branch to independent per-target TargetResult dispatch (Claude Desktop, VS Code Copilot Chat, VS Code Claude Code, Codex Desktop), mirroring connect-orchestrator's shape. One target throwing sets process.exitCode = 1 without blocking a sibling target's own outcome. Codex Desktop behavior is unchanged. EPMCDME-15246 (proxy-disconnect-support), task 4/5.
Add --claude-desktop, --vscode, --vscode-claude-code options to the disconnect subcommand alongside --codex-desktop, and pass all four booleans through to disconnectTargets. Updates the existing CLI wiring test's expectation to the new four-key targets object. EPMCDME-15246 (proxy-disconnect-support), task 5/5.
Fixes five blocking findings from the disconnect-support review: non-transactional config/marker writes in removeDesktopConfig now tolerate a marker-clear failure without masking a successful config strip; VS Code Copilot Chat and Claude Code disconnect connectors isolate per-location (stable/Insiders) write failures so one location's error no longer discards the other's success; disconnect-orchestrator adopts connect-orchestrator's printSummary convention; CLI-parser tests cover the three new disconnect flags; and removeDesktopConfig now detects stranded gateway keys directly on the config file as a fallback when a failed org-catalog fetch on first connect left no marker behind. Ref: EPMCDME-15246
Ref: EPMCDME-15246
…_proxy-disconnect-support # Conflicts: # src/cli/commands/proxy/connectors/vscode.ts
Contributor
|
Your branch has a lot of conflicts with the main branch, please resolve them |
Collaborator
|
@zsoltkovacs4-dot hi, we would like to ask you to resolve merge conflicts on your branch |
3 of 4 tasks
Hello @uladzislausvetlakou, conflicts are resolved in this PR: https://github.com/codemie-ai/codemie-code/pull/618/commits |
Collaborator
|
Owner
|
[AUTO_CLOSE_WARNING] ⏰ This pull request has had no activity for 7 days (last activity: 2026-10-13). It will be automatically closed no earlier than 2026-10-27 (UTC) (~6 more days). Any activity from anyone — a comment, a push, a review, reopening — restarts the countdown from that moment. This warning will be deleted automatically once that happens. |
This branch has not been deployed
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.
Summary
Extends
codemie proxy disconnectto fully support all four proxy targets — Codex Desktop (existing), Claude Desktop, VS Code Copilot Chat, and VS Code Claude Code — by adding a remove-config connector for each of the three new targets and rewriting the disconnect orchestrator to dispatch across all four independently, mirroring the existingconnectflow'sTargetResultreporting shape.Changes
connectors/desktop.ts:removeDesktopConfig()clears CodeMie-written config keys and the managed-MCP marker; detects and recovers stranded gateway keys even when no marker exists (e.g. after a failed org-catalog fetch on first connect).connectors/vscode.ts/connectors/vscode-claude-code.ts:removeVsCodeLanguageModelsConfig()/removeVsCodeClaudeCodeConfig()check both the stable and Insiders config locations; a write failure at one location no longer discards a successful removal at the other.disconnect-orchestrator.ts: rewritten to dispatch all four targets independently viaTargetResult, withprintSummary()matchingconnect-orchestrator.ts's convention.index.ts:disconnectsubcommand gains--claude-desktop,--vscode,--vscode-claude-codeflags alongside the existing--codex-desktopflag.Testing
npx vitest run --project cli: 37 passed | 1 skipped, 279 passed | 10 skipped, 0 failures)Checklist
mainRef: EPMCDME-15246