Skip to content

feat(ide): add daemon connection spike#4199

Merged
wenshao merged 8 commits into
mainfrom
feat/ide-daemon-adapter
May 18, 2026
Merged

feat(ide): add daemon connection spike#4199
wenshao merged 8 commits into
mainfrom
feat/ide-daemon-adapter

Conversation

@chiga0

@chiga0 chiga0 commented May 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • What changed: Added a locally verifiable DaemonIdeConnection spike in the VS Code extension host, plus unit coverage for daemon session creation, SSE event consumption, prompt forwarding, permission responses, cancel, model switch, and session death handling.
  • Why it changed: IDE can start dogfooding Mode B through httpServer + SSE without moving the default VS Code ACP subprocess path yet.
  • Reviewer focus: Extension-host boundary, compatibility with existing ACP callback shapes, default-off behavior, and whether the unsupported gaps are explicit enough before wiring this into QwenAgentManager.

Validation

  • Commands run:
    cd packages/vscode-ide-companion && npx vitest run src/services/daemonIdeConnection.test.ts
    cd packages/core && npm run build
    cd packages/vscode-ide-companion && npm run check-types
    cd packages/vscode-ide-companion && npx eslint src/services/daemonIdeConnection.ts src/services/daemonIdeConnection.test.ts --max-warnings 0
    cd packages/vscode-ide-companion && npx prettier --check src/services/daemonIdeConnection.ts src/services/daemonIdeConnection.test.ts ../../docs/developers/daemon-client-adapters/ide.md
    cd packages/vscode-ide-companion && npm run build
  • Prompts / inputs used: Unit tests use a fake daemon session event queue that emits session_update, permission_request, and session_died frames.
  • Expected result: IDE adapter spike can be verified locally without a live daemon and without changing the existing VS Code default path.
  • Observed result: Targeted vitest passed with 5 tests. Targeted ESLint and Prettier passed. VS Code companion npm run build passed; it still reports the pre-existing src/utils/editorGroupUtils.ts curly warning and stale Browserslist data.
  • Quickest reviewer verification path: Run cd packages/vscode-ide-companion && npx vitest run src/services/daemonIdeConnection.test.ts.
  • Evidence: The targeted test output reports src/services/daemonIdeConnection.test.ts (5 tests) and Test Files 1 passed.

Scope / Risk

  • Main risk or tradeoff: This is intentionally a spike adapter. It proves the extension-host daemon transport surface, but does not yet wire the feature flag, settings/env resolution, or webview flow.
  • Not covered / not validated: No live qwen serve smoke, no QwenAgentManager switch, no session list/load/delete parity, no daemon set-mode route, no IDE file-service boundary, and no reverse RPC for local editor/browser/clipboard.
  • Breaking changes / migration notes: None. Existing VS Code ACP subprocess behavior is unchanged and remains the default.

Testing Matrix

🍏 🪟 🐧
npm run ⚠️ ⚠️
npx ⚠️ ⚠️
Docker N/A N/A N/A
Podman N/A N/A N/A
Seatbelt N/A N/A N/A

Testing matrix notes:

  • Local validation was run on macOS only.
  • This PR does not touch sandbox runtime behavior.

Linked Issues / Bugs

Related to #3803, #4175, and #4201.
Supersedes the docs-only IDE draft #4198 with a locally verifiable adapter spike.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog Exclude from release notes type/feature-request New feature or enhancement request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants