OpenCode AIAn unofficial OpenCode integration for VS Code and VSCodium. Downloads and manages its own OpenCode V2 runtime, with no separate OpenCode installation required. No Copilot dependency or Microsoft AI account is needed. Features
Setup
Managed mode uses a separate loopback service registration and executable. It shares your normal OpenCode configuration, provider accounts, and session data, not a separate private workspace. System mode can reuse your existing service. Neither mode restarts your manually started service. Closing an editor terminal does not delete its backend session. VSCodium users can install the same VSIX manually. Public releases use Microsoft's Marketplace, not Open VSX. Terminal shortcutsOn macOS, Cmd+Enter inserts a newline, Cmd+Backspace deletes to the start of the line, and Cmd+Left/Right moves to the start/end of the line. Cmd+A reaches OpenCode's input selection when Kitty mode is active; in legacy applications it selects terminal output. Cmd+C copies terminal selections; Cmd+V pastes. Ctrl+V remains available to OpenCode for clipboard and image attachments. Cmd+P and Cmd+Shift+P still open VS Code's Quick Open and Command Palette while the terminal is focused. Ctrl+P remains OpenCode's command palette. The terminal follows the application's Kitty keyboard mode for modified keys, including Shift+Enter and Ctrl+Enter. Keyboard state survives switching between Side and Center panels. Native Ctrl+V paste on Windows/Linux uses the physical key so it also works with non-Latin layouts. Commit messagesSelect the OpenCode action in Source Control or run OpenCode: Generate commit message with OpenCode. Staged changes take priority. With nothing staged, the draft describes unstaged tracked files. Untracked files must be staged first. The result goes into the existing Git commit box. Nothing is staged or committed automatically. Existing drafts require replacement confirmation, and edits made while generation is running are preserved. Staging changes during a request discards the stale result. Diffs up to 32 MiB are read locally. The model receives a bounded excerpt and file summary; lockfiles, generated output, minified files, and binary contents are omitted. Very large summaries are shortened and report the omitted file count. This is not a byte-to-token guarantee for every model. Known credential filenames are rejected, and Git external diff/text-conversion programs are not run. If a saved commit model has disappeared from the server's catalog, generation uses the OpenCode default and warns you. The saved preference is not overwritten. Generation is cancellable, including connection setup, with a 120-second default deadline. Inline completionInline requests are disabled by default. Enabling them sends bounded code around the cursor to your configured OpenCode model and may incur model usage costs. Known credential files and Git internals are excluded. Requests are debounced and canceled when superseded. Responses for changed documents or cursor positions are discarded. Nothing is inserted until you accept a suggestion. IntelliSense selections are extended using their native replacement ranges. Use OpenCode: Select inline-completion model to choose a fast model. Commit drafts use OpenCode: Select commit-message model. These preferences stay in VS Code settings and do not change global OpenCode configuration. OpenCode's current one-shot API uses the server's base configuration. Per-request token limits are not exposed by that API. The extension bounds context and response size and applies request timeouts, but model billing and generation limits remain controlled by OpenCode and its provider. Remote access and public portsRun OpenCode: Enable Remote sidebar, or check Remote sidebar in OpenCode settings. Remote is off by default. Enabling the sidebar does not publish anything.
OpenTunnel terminates TLS on the machine running the extension, not at its relay. The OpenCode tunnel additionally uses a private fragment key and a secure browser cookie. The service credential never enters the sidebar. Tunnel identities and private access keys are stored in the editor's SecretStorage; QR codes are generated locally. Port URLs are public and have no added authentication. Remote requires an editor extension host running Node 22 or newer. No separate OpenTunnel CLI is required. VS Code Remote/SSH workspaces are not supported by this feature. First-time certificate provisioning can take a few minutes. If a connection fails, retry or check Output → OpenCode Remote for redacted diagnostics. Disconnect cancels setup and cleans up the reserved address. Settings
The managed runtime is stored under the extension's global storage, not in the workspace. It runs an isolated OpenCode service on a random local port, so it does not replace or depend on the user's own Each editor window pins its runtime version. Downloads become available to newly opened or reloaded windows without replacing binaries or restarting services used by existing windows. Clean up old runtimes asks for confirmation before removing older versions and stopping their idle services. It keeps the newest two versions, versions pinned by open windows, and services with active sessions or terminals. Abandoned downloads older than a day are removed automatically. Only stable V2 runtimes are accepted; upgrading to another major requires an extension update. The TypeScript client is bundled with the extension and updates with the extension release. Privacy and limitationsThe extension has no analytics. Generation uses OpenCode's stateless text endpoint without tools or session-history entries. OpenCode's service credential remains in the extension host. Remote's QR code and copied private link carry a separate access key, revoked by disconnecting the tunnel. This version targets local filesystem workspaces and a local OpenCode V2 service. It is not a browser extension or a client for external remote OpenCode servers. Project switching uses the editor's normal unsaved-file safeguards. Canonical DevelopmentRequires Node 22.18+ and VS Code 1.100+. A separate OpenCode installation is optional when the runtime is managed.
Press F5 in this folder to run an Extension Development Host.
AttributionThe logo and pixel-loader artwork are adapted from OpenCode under its MIT license. OpenCode AI is maintained independently and is not affiliated with or endorsed by the OpenCode team. Third-party notices are included in the extension package. |