-
Notifications
You must be signed in to change notification settings - Fork 0
Features Guide
A comprehensive deep dive into every opencode Studio feature.
The #1 reason this project exists. The opencode terminal can't handle visual context — opencode Studio can.
| Method | How | Best For |
|---|---|---|
| Clipboard paste |
Ctrl+V / Cmd+V
|
Screenshots, copied images |
| Drag & drop | Drag file onto the input area | Files from your file manager |
| File picker | Click the 📎 Attach button | Browsing for specific files |
When you drag a file over the input area, a visual drop zone appears with a dashed border and accent highlight — so you always know exactly where to drop.
- Images: PNG, JPEG, GIF, WebP, SVG — render as thumbnail previews in the attachment bar
- Documents: Text files, code files, PDFs
- Data: JSON, CSV, YAML, TOML
Each attachment shows as a removable chip above the input:
- Images display a 56×56 thumbnail preview
- Other files display the filename or MIME type
- Hover and click × to remove
Attachments are sent as FilePartInput objects through the RPC bridge. The webview converts files to base64 data URLs (for pasted/dropped content) or workspace-relative paths (for picked files). The extension host forwards them to the opencode server via the SDK's session.prompt endpoint.
Type @ anywhere in the input to trigger fuzzy file search across your workspace.
- Type
@in the message input - A dropdown appears with matching files (up to 30 results)
- Continue typing to filter results
- Select with
↑/↓arrows andEnter/Tab, or click - The file reference is inserted into your message
opencode Studio supports three search methods via the RPC protocol:
| Method | Trigger | Purpose |
|---|---|---|
find.files |
@ in input |
Fuzzy file path search |
find.text |
Via opencode commands | Grep-style text search |
find.symbols |
Via opencode commands | Symbol search (functions, classes, etc.) |
- Type
@compto quickly find files in acomponents/directory - Chain multiple
@-mentions:@Header.tsx @Footer.tsx make these consistent - The search uses a sequence counter to prevent stale results from overwriting fresh ones
Type / at the start of your input to open the command palette.
- Type
/at the beginning of the message - A palette shows available opencode commands with descriptions
- Filter by typing the command name
- Select with
↑/↓arrows andEnter/Tab, or click - Add arguments after the command:
/compact summarize the conversation
Commands route to the session.command RPC endpoint instead of session.prompt. The command name and arguments are parsed from the input, and the current model and agent selections are passed along.
Messages stream in real-time with rich rendering.
Each message is composed of typed parts, each rendered differently:
| Part Type | Rendering |
|---|---|
text |
Full GFM markdown via ReactMarkdown + remarkGfm |
reasoning |
Rendered like text — shows model thinking/reasoning tokens |
file |
Image thumbnail (for image MIME types) or file attachment chip |
tool |
Expandable tool call card with status and output |
Tool invocations appear as collapsible <details> elements showing:
-
Status icon:
•running,✓completed (green),✗error (red) - Tool name in monospace font
- Title/description of the action
- Expandable output — click to see the tool's full output (scrollable, up to 240px)
While the agent is generating, an animated three-dot typing indicator appears alongside the assistant avatar.
Provider errors and session errors appear as a red-tinted banner with:
- ⚠ icon and error message
- One-click ↻ Retry button (appears when a previous prompt can be resent)
opencode Studio includes a full tool approval system with four execution modes.
| Mode | Icon | Behavior |
|---|---|---|
| Manual | ✋ | Every tool action requires explicit approval |
| Auto | ⚡ | Safe actions auto-approve; risky ones prompt for approval |
| Bypass | ⏩ | Everything auto-approves — no prompts at all |
| Plan | ◔ | Read-only mode — explore and plan without any edits. Forces the plan agent |
In Auto mode, the following patterns trigger a confirmation prompt:
bash, shell, exec, external, webfetch, fetch, network,
doom, delete, rm, install, sudo
These are matched against the permission's type, title, and pattern fields.
- The opencode server emits a
permission.updatedevent - The extension relays it to the webview
- Based on the current mode:
- Bypass: auto-approves immediately
- Auto (safe action): auto-approves immediately
- Auto (risky action): adds to permission queue for user decision
- Manual/Plan: always adds to permission queue
- User responds: Allow Once, Always Allow, or Reject
- Response is sent via
session.permissionRPC endpoint
Click the mode dropdown in the header bar. The mode icon (✋/⚡/⏩/◔) shows the current mode at a glance.
The header shows your current model in a dropdown. Models are loaded from your opencode config via config.providers:
- Displays as
provider · model name(e.g.,openai · GPT-4o) - Auto-selects the default model from your opencode config
- Changes take effect on the next message — no restart needed
The mode dropdown doubles as the agent selector:
-
Manual/Auto/Bypass use the selected agent (defaults to
build) -
Plan forces the
planagent regardless of selection - Primary agents (
build) sort to the top
Click ☰ in the header to open the session sidebar:
- Browse all sessions, sorted by most recently updated
- Resume a session by clicking it
- Delete with a two-step confirmation (🗑 → Delete/✕)
- Create a new session from the sidebar's + New button
| Event | Handling |
|---|---|
session.updated |
Session list refreshes with new title/timestamp |
session.deleted |
Session removed from list; if active, state clears |
gui.new-session |
Triggers a new session (can be initiated externally) |
If you send a message with no active session, one is automatically created.
While the agent is generating, a ■ Stop button replaces the Send button. Clicking it:
- Calls
session.aborton the current session - Immediately sets
busy = false - The UI returns to the ready state
Network timeouts, 502/503/504 errors, connection refused, rate limits, and "overloaded" responses are retried automatically:
- 3 attempts with exponential backoff: 400ms → 800ms → 1600ms
- Pattern matching:
timeout,network,fetch failed,econn,502,503,504,rate limit,overloaded,upstream
If the managed server process exits unexpectedly:
- Auto-restarts up to 5 times
- Backoff: 1s → 2s → 4s → 8s → 15s (capped)
- After 5 failures: shows error message and stops retrying
- Use
opencode: Restart Serverto manually reset the counter
If the primary opencode serve spawn fails (PATH issues, quoting quirks), the extension falls back to createOpencodeServer() from the SDK — a cross-platform launcher that handles binary resolution internally.
When a model provider returns an error:
- The error is displayed in a red banner
- The
lastPromptis preserved - A ↻ Retry button re-sends the exact same message
- You can also switch models before retrying
A banner appears whenever the server isn't connected:
- Blue (starting): "Starting opencode server… (first launch can take a while)"
- Red (error): Shows the error message with a Retry button
By default, opencode Studio lives in the sidebar. Open it as a full editor tab:
-
Ctrl+Shift+P/Cmd+Shift+P→opencode: Open in Editor Tab - The GUI opens as a tab, giving you more screen real estate
| Key | Context | Action |
|---|---|---|
Enter |
Input (no suggestions) | Send message |
Shift+Enter |
Input | Insert newline |
↑ / ↓
|
Suggestions visible | Navigate suggestions |
Enter / Tab
|
Suggestions visible | Accept suggestion |
Escape |
Suggestions visible | Dismiss suggestions |