Skip to content

VS Code extension: try it in real VS Code, then sessions, images, terminals and the Marketplace #20

Closed

Description

@blockmandev

Why

editors/vscode/ drives incode --acp. Its protocol client, controller and file bridge are tested (54 tests, plus 1 live test against the real binary), but the extension has never been opened in a real VS Code. The webview was only checked by code review.

Where the code is

  • src/acp.ts: protocol client, no vscode import.
  • src/controller.ts: one agent process and session per window.
  • src/chatView.ts: the webview and its CSP.
  • src/fsBridge.ts: file reads and writes through WorkspaceEdit.
  • src/extension.ts: commands and settings.
  • media/chat.js, media/markdown.js: the page is built with createElement/textContent only, never innerHTML.
  • Tests: test/*.test.ts, with a fake agent in test/fixtures/fake-agent.js.

Steps (local)

cargo build --release            # incode on PATH, or set incode.path
cd editors/vscode && npm install && npm run compile && npm test
INCODE_BIN=$PWD/../../target/release/incode npm test   # also runs the live test
npm run package                  # builds incode-0.1.0.vsix (needs network the first time)
code --install-extension incode-0.1.0.vsix

In VS Code: Incode: Open Chat.

  • Send a prompt and watch the streamed text, tool calls and plan.
  • Answer a permission card.
  • Press Stop.
  • Switch mode, role and agent.
  • Use Incode: Send Selection.
  • Use a slash command from the completion list.

To build

  • Fix anything found in real use (layout, theming, focus, long outputs).
  • Session list and reopening a session (session/list, session/load; incode supports both).
  • Image prompts (incode advertises promptCapabilities.image).
  • Terminals: terminal/* client requests are answered "method not found" today.
  • sendSelection only fills the input box; consider an option to send at once.
  • Publish: a publisher account on the VS Code Marketplace and Open VSX, vsce publish, and a CI job that packages on tags.

Note: incode itself never sends fs/read_text_file or fs/write_text_file today. The extension supports them; it's tested only against the fake agent.


Generated by Claude Code

Activity

  1. added a commit that references this issue on Oct 22, 2026
  2. blockmandev commented on Oct 22, 2026

    @blockmandev
    MemberAuthor

    Three code items done in #54 (merged):

    • Session list and reopening: incode: Open Session…, plus a title-bar button shown when the agent offers session/list and session/load. It lists the workspace's sessions and reopens the pick with its history.
    • Image prompts: paste, drop or pick PNG/JPEG pictures, sent as ACP image blocks. The bounds are incode's own, and the extension checks the bytes again, whatever the page did.
    • incode.sendSelectionImmediately: Send Selection sends at once.

    An independent review then found six bugs (a lost draft on a refused send, races in New Session, restart and a failed load, a stray "cancelled" turn, a double send at startup). All are fixed in the same PR, each with a test and a deliberately broken control. Tests: 91 against the fake agent, 93 with the live tests against a real incode.

    Terminals (terminal/*): intentionally not built. incode never sends those requests (see #21).

    Left:

    • Real use in VS Code, and fixing what it finds. Drag-drop, paste and the file dialog have only been exercised in a fake DOM.
    • Publishing to the Marketplace and Open VSX, which the owner has scheduled last, with the SDKs.
  3. blockmandev commented on Oct 23, 2026

    @blockmandev
    MemberAuthor

    Solved in #54: reopening sessions, image prompts, and Send Selection sending at once, with 91 fake-agent and 93 live tests. Terminals aren't needed, because incode never sends terminal/* requests. Trying it in real VS Code, and Marketplace publishing, moved to #56.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions