feat: add a VS Code extension that embeds the existing web UI (webview shell)#1780
feat: add a VS Code extension that embeds the existing web UI (webview shell)#1780kermanx wants to merge 1 commit into
Conversation
🦋 Changeset detectedLatest commit: f31b529 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Adding a user perspective in favor of deeper VS Code integration, since this PR is retained as a reference for future porting. I'm already using the official extension ( Concretely, the ask:
The webview-shell approach in this draft and the SDK-native |
|
You have reached your Codex usage limits. You can see your limits in the Codex usage dashboard. |
Related Issue
N/A — see Problem below (no linked issue).
Problem
Kimi Code has no presence inside VS Code in this fork's base: using it means keeping a browser tab or the desktop app next to the editor, detached from the editor's workspace. This explores a VS Code extension that puts the existing web UI into the activity bar, bound to the editor's own workspace folders.
What changed
apps/kimi-vscode(new): activity-bar icon + sidebar webview that iframes the server-served web UI (same thin-shell model asapps/kimi-desktop— no UI reimplementation, no copied code). It starts the local server in the foreground (KIMI_CODE_EXPERIMENTAL_MULTI_SERVER=1, ready-line parsing for port/token,#token=fragment auth), registers every VS Code workspace folder viaPOST /api/v1/workspaces, and passes them to the UI in order. Dev mode runs the CLI sources via tsx; F5 debug configs committed.src/lib/workspaceHint.ts—?workspace=<pin>+ ordered repeatable&folder=<root>params: pinned initial selection, workspace listings filtered+ordered by the host, per-workspace session loading restricted to host folders, add/remove-workspace entry points hidden, flat single-workspace layout.src/composables/hostColorScheme.ts+useAppearance— host-pushed color-scheme postMessage resolves 'system' mode to the VS Code theme at thedata-color-schemelevel (the webview's cross-origin iframe otherwise follows the OS). Plain browser behavior unchanged without the params.ELECTRON_RUN_AS_NODE=1), lifts node-pty natives from VS Code's own install (ABI always matches). Without node-pty only the terminal feature degrades (verified in both states)..github/workflows/vscode-extension.ymlbuilds/artifacts the vsix onworkflow_dispatch; publishes only when dispatched (VSCE_PAT,--skip-duplicate).flake.nix, root typecheck script,.gitignore(shared.vscode/{launch,tasks}.json, packaging outputs), AGENTS.md, changeset.Notes for reviewers / future porting
apps/vscode(full web UI vs SDK-native editor integration). The kimi-web host-binding (workspaceHint) and theme-bridge pieces are independent of this extension and could serve any iframe-embedded host if ever wanted.81414b6(pre-apps/vscode-landing fork main); no rebase has been done onto current upstream main.Checklist
apps/kimi-web/test/)gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update. (Not intended for merge; the extension's README covers dev/packaging.)