Skip to content

Add VS Code ACP extension and align MCP runtime#363

Open
amDosion wants to merge 4 commits intoclaude-code-best:mainfrom
amDosion:feat/vscode-extension
Open

Add VS Code ACP extension and align MCP runtime#363
amDosion wants to merge 4 commits intoclaude-code-best:mainfrom
amDosion:feat/vscode-extension

Conversation

@amDosion
Copy link
Copy Markdown
Collaborator

Summary

  • Add the VS Code ACP extension package and local install/package workflow.
  • Align VS Code ACP MCP runtime behavior with the CLI path so MCP reconnects and dynamic tools, including claude-in-chrome, are visible to ToolSearch/API calls.
  • Add runtime MCP tool-state refresh, ACP MCP lifecycle cleanup, Windows PowerShell shell handling, slash-command/login/MCP UI support, and installation documentation.
  • Preserve source privacy for the VSIX package via .vscodeignore; vsce ls --no-dependencies shows only package.json, resources/icon.svg, dist/webview.js, and dist/extension.js.

Verification

  • bun test -> 3623 pass, 2 skip, 0 fail
  • bun audit -> no vulnerabilities found
  • bunx biome lint . --max-diagnostics=1000 -> no diagnostics
  • bun run typecheck -> pass
  • bun run build -> pass
  • Direct MCP SDK smoke for dist/cli.js --claude-in-chrome-mcp -> 18 tools, includes tabs_context_mcp
  • cd packages/vscode-extension && bun run test:all -> pass, including /mcp tools claude-in-chrome
  • npx @vscode/vsce ls --no-dependencies -> package contains only compiled assets and manifest/resource files

Notes

This PR is intentionally not merged. It is opened for upstream review from amDosion:feat/vscode-extension into claude-code-best:main.

unraid added 3 commits April 25, 2026 22:28
The VS Code ACP path had diverged from the CLI flow: MCP servers were listed as configured or reconnected, but the running QueryEngine kept stale tool schemas. This made claude-in-chrome appear connected while ToolSearch and the API could not see its tools.

This commit adds the VS Code extension package, keeps VSIX contents limited to bundled dist/resources via .vscodeignore, refreshes MCP-backed tool state at runtime, hardens ACP MCP lifecycle cleanup, and keeps Windows ACP shell execution on PowerShell semantics.

Constraint: The VSIX must not ship extension source files, tests, or scripts.

Rejected: Publish raw extension source in the VSIX | Marketplace users only need package.json, resources, and built dist assets.

Confidence: high

Scope-risk: broad

Directive: Do not remove the .vscodeignore source exclusions without re-running vsce ls and reviewing VSIX contents.

Tested: bun test; bun audit; bunx biome lint . --max-diagnostics=1000; bun run typecheck; bun run build; direct claude-in-chrome MCP SDK smoke; packages/vscode-extension bun run test:all; vsce ls --no-dependencies

Not-tested: Actual Marketplace publish with a live VSCE_PAT
This worktree still contained the broader cleanup and command-path changes that were separate from the VS Code ACP MCP runtime commit. Committing them separately keeps the plugin runtime fix reviewable while preserving the rest of the worktree state.

The changes include repository audit/planning docs, command and UI cleanup, RCS and MCP client hardening, dependency metadata updates, and formatting/static-analysis fixes across the decompiled codebase.

Constraint: The prior commit intentionally isolated the VS Code extension MCP runtime behavior; this commit records the remaining worktree modifications as their own unit.

Rejected: Squash into the VS Code ACP commit | that would mix runtime MCP behavior with broad cleanup and documentation changes.

Confidence: medium

Scope-risk: broad

Directive: Review src/main.tsx carefully in future changes because this commit includes a large formatting-heavy diff there.

Tested: bun test; bun audit; bunx biome lint . --max-diagnostics=1000; bun run typecheck; bun run build; packages/vscode-extension bun run test:all; git diff --cached --check

Not-tested: Fresh CI run after this exact commit boundary
Users need a direct install path that is separate from implementation notes. This document explains VSIX installation, source-based local installation, CLI path configuration, basic validation, uninstall steps, and the release-package source exclusions.

Constraint: The extension VSIX should ship compiled assets only, not source directories or test scripts.

Rejected: Keep installation notes only in architecture docs | users need a focused operational guide without ACP internals.

Confidence: high

Scope-risk: narrow

Directive: If .vscodeignore changes, update the package-contents section after running vsce ls.

Tested: git diff --check

Not-tested: Rebuilding the VSIX for this docs-only change
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 25, 2026

Important

Review skipped

Too many files!

This PR contains 195 files, which is 45 over the limit of 150.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 09caf24e-46e1-485c-81fa-fb7cf4ef9936

📥 Commits

Reviewing files that changed from the base of the PR and between e0ca1d0 and 8575e3a.

⛔ Files ignored due to path filters (2)
  • bun.lock is excluded by !**/*.lock
  • packages/vscode-extension/resources/icon.svg is excluded by !**/*.svg
📒 Files selected for processing (195)
  • PLANS.md
  • biome.json
  • build.ts
  • codex-slash-bug-trace.md
  • docs/features/vscode-extension-installation.md
  • docs/features/vscode-extension.md
  • docs/internals/repo-audit-findings-2026-04-24-zh.md
  • docs/internals/repo-audit-findings-2026-04-24.md
  • docs/plans/vscode-ext-cli-api.md
  • docs/plans/vscode-ext-gap-analysis.md
  • docs/plans/vscode-ext-keybindings.md
  • docs/plans/vscode-ext-phase2-design.md
  • docs/plans/vscode-ext-reference-impl.md
  • docs/plans/vscode-ext-slash-commands-fix.md
  • docs/plans/vscode-extension-phase1.md
  • docs/runbook/STATUS.md
  • package.json
  • packages/@ant/model-provider/package.json
  • packages/acp-link/package.json
  • packages/builtin-tools/src/tools/BashTool/BashTool.tsx
  • packages/builtin-tools/src/tools/BashTool/bashSecurity.ts
  • packages/builtin-tools/src/tools/BashTool/sedValidation.ts
  • packages/builtin-tools/src/tools/FileReadTool/imageProcessor.ts
  • packages/builtin-tools/src/tools/NotebookEditTool/NotebookEditTool.ts
  • packages/builtin-tools/src/tools/PowerShellTool/PowerShellTool.tsx
  • packages/builtin-tools/src/tools/WebFetchTool/utils.ts
  • packages/builtin-tools/src/tools/WebSearchTool/adapters/exaAdapter.ts
  • packages/color-diff-napi/src/__tests__/color-diff.test.ts
  • packages/mcp-client/src/connection.ts
  • packages/mcp-client/src/sanitization.ts
  • packages/remote-control-server/package.json
  • packages/remote-control-server/src/__tests__/routes.test.ts
  • packages/remote-control-server/src/__tests__/sse-writer.test.ts
  • packages/remote-control-server/src/config.ts
  • packages/remote-control-server/src/routes/acp/index.ts
  • packages/remote-control-server/src/routes/v2/worker-events-stream.ts
  • packages/remote-control-server/src/routes/web/sessions.ts
  • packages/remote-control-server/src/services/automationState.ts
  • packages/remote-control-server/web/src/acp/client.ts
  • packages/remote-control-server/web/src/components/EventStream.tsx
  • packages/remote-control-server/web/src/components/PermissionViews.tsx
  • packages/remote-control-server/web/src/index.css
  • packages/vscode-extension/.vscodeignore
  • packages/vscode-extension/README.md
  • packages/vscode-extension/esbuild.config.mjs
  • packages/vscode-extension/package.json
  • packages/vscode-extension/scripts/acp-smoke.mjs
  • packages/vscode-extension/scripts/extension-smoke.cjs
  • packages/vscode-extension/scripts/install-local.ps1
  • packages/vscode-extension/scripts/install-local.sh
  • packages/vscode-extension/src/ACPClient.ts
  • packages/vscode-extension/src/ChatViewProvider.ts
  • packages/vscode-extension/src/EditorBridge.ts
  • packages/vscode-extension/src/HistoryManager.ts
  • packages/vscode-extension/src/StatusBarManager.ts
  • packages/vscode-extension/src/agentSpawner.ts
  • packages/vscode-extension/src/extension.ts
  • packages/vscode-extension/tsconfig.json
  • packages/vscode-extension/webview/App.tsx
  • packages/vscode-extension/webview/components/ChatView.tsx
  • packages/vscode-extension/webview/components/CommandMenu.tsx
  • packages/vscode-extension/webview/components/ElicitationDialog.tsx
  • packages/vscode-extension/webview/components/MessageBubble.tsx
  • packages/vscode-extension/webview/components/ModeSelector.tsx
  • packages/vscode-extension/webview/components/ModelPicker.tsx
  • packages/vscode-extension/webview/components/PermissionPanel.tsx
  • packages/vscode-extension/webview/components/PlanView.tsx
  • packages/vscode-extension/webview/components/PromptInput.tsx
  • packages/vscode-extension/webview/components/StatusBar.tsx
  • packages/vscode-extension/webview/components/ToolCallCard.tsx
  • packages/vscode-extension/webview/hooks/useACP.ts
  • packages/vscode-extension/webview/hooks/useVSCodeAPI.ts
  • packages/vscode-extension/webview/index.tsx
  • packages/vscode-extension/webview/lib/__tests__/slashCommands.test.ts
  • packages/vscode-extension/webview/lib/__tests__/threadReducer.test.ts
  • packages/vscode-extension/webview/lib/acp/types.ts
  • packages/vscode-extension/webview/lib/protocol.ts
  • packages/vscode-extension/webview/lib/slashCommands.ts
  • packages/vscode-extension/webview/lib/threadReducer.ts
  • packages/vscode-extension/webview/lib/types.ts
  • packages/vscode-extension/webview/markdown.ts
  • packages/vscode-extension/webview/styles.css
  • packages/vscode-extension/webview/types.d.ts
  • scripts/codex/noninteractive-exec.sh
  • scripts/run-all.sh
  • src/QueryEngine.ts
  • src/Tool.ts
  • src/__tests__/tools.vscode-acp.test.ts
  • src/bridge/bridgeMain.ts
  • src/cli/handlers/mcp.tsx
  • src/cli/transports/SSETransport.ts
  • src/cli/transports/WebSocketTransport.ts
  • src/commands/color/color.ts
  • src/commands/config/config.tsx
  • src/commands/effort/effort.tsx
  • src/commands/elicitation.ts
  • src/commands/fast/fast.tsx
  • src/commands/ide/ide.tsx
  • src/commands/login/index.ts
  • src/commands/login/login.tsx
  • src/commands/mcp/index.ts
  • src/commands/mcp/mcp.tsx
  • src/commands/model/model.tsx
  • src/commands/plugin/AddMarketplace.tsx
  • src/commands/plugin/ManageMarketplaces.tsx
  • src/components/AutoUpdater.tsx
  • src/components/MemoryUsageIndicator.tsx
  • src/components/MessageSelector.tsx
  • src/components/NativeAutoUpdater.tsx
  • src/components/PromptInput/Notifications.tsx
  • src/components/PromptInput/PromptInput.tsx
  • src/components/PromptInput/PromptInputFooterLeftSide.tsx
  • src/components/PromptInput/PromptInputQueuedCommands.tsx
  • src/components/ScrollKeybindingHandler.tsx
  • src/components/Spinner.tsx
  • src/components/StatusLine.tsx
  • src/components/TextInput.tsx
  • src/components/WorktreeExitDialog.tsx
  • src/components/agents/ColorPicker.tsx
  • src/components/mcp/MCPSettings.tsx
  • src/components/mcp/MCPToolListView.tsx
  • src/components/messages/AttachmentMessage.tsx
  • src/components/messages/UserPromptMessage.tsx
  • src/components/messages/UserToolResultMessage/UserToolSuccessMessage.tsx
  • src/components/teams/TeamsDialog.tsx
  • src/entrypoints/cli.tsx
  • src/hooks/renderPlaceholder.ts
  • src/hooks/useArrowKeyHistory.tsx
  • src/hooks/useGlobalKeybindings.tsx
  • src/hooks/useReplBridge.tsx
  • src/hooks/useVoiceIntegration.tsx
  • src/main.tsx
  • src/native-ts/file-index/index.ts
  • src/query.ts
  • src/screens/REPL.tsx
  • src/services/MagicDocs/prompts.ts
  • src/services/SessionMemory/prompts.ts
  • src/services/acp/__tests__/agent.test.ts
  • src/services/acp/__tests__/bridge.test.ts
  • src/services/acp/agent.ts
  • src/services/acp/bridge.ts
  • src/services/acp/entry.ts
  • src/services/acp/mcpDynamicConfig.ts
  • src/services/analytics/sink.ts
  • src/services/api/claude.ts
  • src/services/api/filesApi.ts
  • src/services/api/gemini/index.ts
  • src/services/api/grok/index.ts
  • src/services/api/sessionIngress.ts
  • src/services/api/withRetry.ts
  • src/services/langfuse/sanitize.ts
  • src/services/lsp/LSPServerInstance.ts
  • src/services/mcp/__tests__/envExpansion.test.ts
  • src/services/mcp/auth.ts
  • src/services/mcp/client.ts
  • src/services/mcp/oauthPort.ts
  • src/services/mcp/officialRegistry.ts
  • src/services/mcp/useManageMCPConnections.ts
  • src/services/plugins/pluginOperations.ts
  • src/services/tokenEstimation.ts
  • src/state/AppState.tsx
  • src/tools.ts
  • src/utils/Shell.ts
  • src/utils/__tests__/runtimeToolState.test.ts
  • src/utils/__tests__/sliceAnsi.test.ts
  • src/utils/__tests__/stringUtils.test.ts
  • src/utils/ansiToPng.ts
  • src/utils/bash/ast.ts
  • src/utils/bash/bashParser.ts
  • src/utils/bash/shellQuote.ts
  • src/utils/claudeInChrome/setup.ts
  • src/utils/computerUse/executor.ts
  • src/utils/deepLink/protocolHandler.ts
  • src/utils/fsOperations.ts
  • src/utils/hooks.ts
  • src/utils/jetbrains.ts
  • src/utils/messages.ts
  • src/utils/nativeInstaller/installer.ts
  • src/utils/plugins/installedPluginsManager.ts
  • src/utils/plugins/officialMarketplaceStartupCheck.ts
  • src/utils/processUserInput/processSlashCommand.tsx
  • src/utils/ripgrep.ts
  • src/utils/runtimeToolState.ts
  • src/utils/sessionEnvironment.ts
  • src/utils/sessionStorage.ts
  • src/utils/sessionStoragePortable.ts
  • src/utils/shell/__tests__/bashProvider.test.ts
  • src/utils/shell/__tests__/resolveDefaultShell.test.ts
  • src/utils/shell/__tests__/shellToolUtils.test.ts
  • src/utils/shell/bashProvider.ts
  • src/utils/shell/resolveDefaultShell.ts
  • src/utils/shell/shellToolUtils.ts
  • src/utils/slowOperations.ts
  • src/utils/staticRender.tsx
  • src/utils/suggestions/skillUsageTracking.ts

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov-commenter
Copy link
Copy Markdown

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment

Thanks for integrating Codecov - We've got you covered ☂️

The PR already includes the extension host and webview source under packages/vscode-extension, but reviewers need an entry point that explains which directories are source, which files are generated output, and why source is excluded from the VSIX package.

Constraint: Source should remain reviewable in the repository while the VSIX continues to ship compiled assets only.

Rejected: Rely on root feature docs only | they describe architecture but are not colocated with the extension source tree.

Confidence: high

Scope-risk: narrow

Directive: Keep this README aligned with .vscodeignore whenever the packaging boundary changes.

Tested: git diff --check

Not-tested: Re-running VS Code extension smoke tests for this docs-only change
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants