Skip to content

Commit 95c720e

Browse files
docs: update feature documentation and mkdocs config (#222)
1 parent 74cdeb3 commit 95c720e

8 files changed

Lines changed: 172 additions & 21 deletions

File tree

docs/features/ai-config.md

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,41 @@ Configure AI models, providers, and custom agents.
44

55
## Model Selection
66

7-
Browse and select from available AI models:
7+
### Quick Model Switcher
88

9-
1. Click the **model selector** in the chat interface
10-
2. Browse available models
11-
3. Click a model to set it for the current session
9+
A compact model switcher is embedded directly in the chat interface. Click the **model name** in the prompt area or chat header to open the quick-select popover:
1210

13-
### Changing Models Mid-Session
11+
| Item | Description |
12+
|------|-------------|
13+
| **Active model** | Shown at the top with a checkmark. Click the star icon to add or remove from favorites. |
14+
| **Favorites** | Pinned models always appear first in the list. |
15+
| **Recents** | Last 10 used models appear below favorites (excluding the active one and any favorites). |
16+
| **Variants** | Some models offer tier options (e.g., fast or pro). Variant items are highlighted and show a checkmark on the active selection. |
17+
| **All Models…** | Opens the full model browser when you need a model not in recents or favorites. |
18+
19+
Model selections persist across page reloads.
20+
21+
### Per-Agent Model Selection
22+
23+
Each agent can use a different model independently:
24+
25+
1. Select an agent in the chat session header
26+
2. Open the quick model switcher
27+
3. Choose a model — it is now stored for that agent
1428

15-
You can switch models during a chat session:
29+
When you switch agents, the model you last used with that agent is restored automatically. Your global model selection is unaffected.
1630

17-
1. Click the model name in the chat header
18-
2. Select a different model
19-
3. Continue chatting with the new model
31+
### Full Model Browser
32+
33+
To browse all available models:
34+
35+
1. Click **All Models…** in the quick-select popover
36+
2. Filter by provider or search by name
37+
3. Click a model to select it
38+
39+
### Changing Models Mid-Session
2040

21-
Context is preserved when switching models.
41+
You can switch models at any point during a session without losing context. The new model is used for all subsequent messages.
2242

2343
## Provider Credentials
2444

docs/features/assistant-internal-api.md

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
The Assistant Internal API provides capabilities for OpenCode agents to interact with the manager backend via a secure bearer-token API.
44

5+
> For a user-facing overview of how to use and set up assistant mode, see [Assistant Mode](assistant-mode.md).
6+
57
## Authentication
68

79
All endpoints require a bearer token. The token can be found at:
@@ -122,12 +124,46 @@ Returns the updated settings object.
122124
- `400`: Invalid request body or disallowed key
123125
- `401`: Missing or invalid bearer token
124126

127+
### Repos
128+
129+
**GET `/api/internal/repos`**
130+
131+
Retrieve a list of all managed repositories, ordered by the user's repo preference order.
132+
133+
**Response:**
134+
```ts
135+
{
136+
repos: Array<{
137+
id: number
138+
repoUrl?: string // Git remote URL (absent for local-only repos)
139+
localPath: string // Relative path under repos root
140+
fullPath: string // Absolute filesystem path
141+
sourcePath?: string // Source worktree path (for worktrees)
142+
branch?: string // Current branch name (for worktrees)
143+
defaultBranch: string // e.g. "main"
144+
cloneStatus: 'cloning' | 'ready' | 'error'
145+
clonedAt: number // Timestamp when repo was cloned
146+
lastPulled?: number // Timestamp of last pull
147+
lastAccessedAt?: number // Timestamp of last access
148+
openCodeConfigName?: string // Associated OpenCode config name
149+
isWorktree?: boolean // Whether repo is a worktree
150+
isLocal?: boolean // Whether repo is local-only
151+
}>
152+
}
153+
```
154+
155+
**Status Codes:**
156+
- `200`: Repository list returned
157+
- `401`: Missing or invalid bearer token
158+
- `500`: Server error (database failure)
159+
125160
## Skills
126161

127-
The assistant workspace includes three skills that document these capabilities:
162+
The assistant workspace includes four skills that document these capabilities:
128163

129164
1. **Schedule Management** (`.opencode/skills/schedule-management/SKILL.md`)
130165
2. **Notifications** (`.opencode/skills/notifications/SKILL.md`)
131166
3. **Manager Settings** (`.opencode/skills/manager-settings/SKILL.md`)
167+
4. **Repo Management** (`.opencode/skills/repo-management/SKILL.md`)
132168

133169
These skills are automatically provisioned when assistant mode is initialized and contain detailed examples and usage patterns.

docs/features/assistant-mode.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Assistant Mode
2+
3+
Assistant Mode gives OpenCode Manager a dedicated AI workspace — an isolated directory (`repos/assistant/`) where a built-in assistant agent can manage scheduled jobs, send push notifications, and read or update settings via a secure internal API.
4+
5+
## What Is Assistant Mode?
6+
7+
The assistant workspace is a special repository-like directory managed and maintained by OpenCode Manager. When initialized it contains:
8+
9+
| File | Purpose |
10+
|------|---------|
11+
| `AGENTS.md` | Workspace description the agent reads on every session start |
12+
| `opencode.json` | OpenCode configuration scoped to the assistant agent |
13+
| `.opencode/internal-token` | Bearer token used to authenticate against the internal API |
14+
| `.opencode/agents/assistant.md` | Agent definition with system prompt and permissions |
15+
| `.opencode/skills/` | Auto-generated skills teaching the agent to use the internal API |
16+
17+
## Skills Provided
18+
19+
Four skills are provisioned automatically when assistant mode is initialized:
20+
21+
| Skill | What it teaches |
22+
|-------|----------------|
23+
| `schedule-management` | Create, list, update, delete, and run scheduled jobs |
24+
| `notifications` | Send push notifications to registered user devices |
25+
| `manager-settings` | Read and patch user preferences |
26+
| `repo-management` | List all managed repositories |
27+
28+
See [Assistant Internal API](assistant-internal-api.md) for the full API reference these skills expose.
29+
30+
## Getting Started
31+
32+
1. Click **Assistant** in the sidebar or mobile tab bar
33+
2. On first visit, OpenCode Manager initializes the workspace and creates a new session
34+
3. A welcome prompt is automatically sent to orient the agent
35+
4. Subsequent visits resume the most recent session
36+
37+
No manual setup is required. The workspace directory and all managed files are created automatically.
38+
39+
## Session Views
40+
41+
The assistant page works in two modes:
42+
43+
| Mode | URL | What you see |
44+
|------|-----|-------------|
45+
| Redirect | `/assistant` | Instantly redirects to the last session or creates one |
46+
| Session list | `/assistant?view=sessions` | Full session history with sidebar panels |
47+
48+
The session list exposes the same management panels as regular repos — file browser, MCP servers, skills, source control, and permissions reset.
49+
50+
## Workspace Initialization
51+
52+
The workspace is initialized idempotently. Managed files are only rewritten when OpenCode Manager has updated their content. User customizations to managed files are preserved.
53+
54+
### Warnings
55+
56+
If a managed file was modified after initialization, the next session will receive an inline prompt explaining which files were preserved and what the expected content is. This surfaces configuration drift without silently overwriting your changes.
57+
58+
### Re-initializing
59+
60+
To re-apply all managed files to their latest defaults:
61+
62+
1. Navigate to the session list (`?view=sessions`)
63+
2. Open the **Permissions** panel
64+
3. Use the reset action to re-initialize the workspace

docs/features/chat.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,17 @@ Messages stream in real-time using Server-Sent Events (SSE):
1919
- No waiting for complete responses
2020
- Can interrupt generation if needed
2121

22+
## Model Selection
23+
24+
Click the **model name** in the chat prompt area to open the quick model switcher. From there you can:
25+
26+
- Switch to a favorite or recently used model without leaving the chat
27+
- Toggle favorites (star icon next to the active model)
28+
- Pick a model variant (highlighted in orange when available)
29+
- Open **All Models…** to browse the full model list
30+
31+
Each agent retains its own model selection — switching agents restores the model last used with that agent. See [AI Configuration](ai-config.md#model-selection) for the full reference.
32+
2233
## Slash Commands
2334

2435
Type `/` to see available commands:

docs/features/overview.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ OpenCode Manager provides a comprehensive web interface for managing OpenCode AI
2929
- **Slash Commands** - Built-in (`/help`, `/new`, `/compact`) and custom commands
3030
- **File Mentions** - Reference files with `@filename` autocomplete
3131
- **Plan/Build Modes** - Toggle between read-only and file-change modes
32+
- **Per-Agent Model Selection** — Each agent retains its own model selection independently
3233
- **Mermaid Diagrams** - Visual diagram rendering in chat
3334

3435
[Learn more →](chat.md)
@@ -94,3 +95,11 @@ OpenCode Manager provides a comprehensive web interface for managing OpenCode AI
9495
- **Customizable** - Control which events trigger notifications
9596

9697
[Learn more →](notifications.md)
98+
99+
### Assistant Mode
100+
101+
- **Dedicated AI Workspace** — Isolated assistant directory with managed configuration and a built-in bearer-token API
102+
- **Auto-Provisioned Skills** — Schedule management, notifications, settings, and repo listing skills available out of the box
103+
- **Session Continuity** — Navigating to the assistant always resumes the most recent session or creates one automatically
104+
105+
[Learn more →](assistant-mode.md)

docs/features/stt.md

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -71,18 +71,26 @@ Any OpenAI-compatible transcription API works:
7171

7272
## Using Voice Input
7373

74-
### Recording
74+
### Tap-to-Start / Tap-to-Stop
7575

76-
1. Click the **microphone** button in the chat input
77-
2. Speak your message
78-
3. Click the **stop** button when finished
79-
4. Your speech is transcribed into the input field
76+
1. **Tap the microphone button** in the chat input to begin recording
77+
2. The button shows active recording status
78+
3. **Tap the stop button** when you have finished speaking
79+
4. The transcribed text is inserted into the input field
8080
5. Review and send
8181

82-
### Recording Overlay
82+
### Recording States
8383

84-
While recording, a visual overlay indicates active recording status.
84+
| State | Indicator | When it appears |
85+
|-------|-----------|-----------------|
86+
| Recording | "Recording…" | Microphone is active; audio is being captured |
87+
| Processing | "Processing…" | Audio sent to STT backend; waiting for transcript (external provider only) |
88+
| Interim text | Live partial transcript | Browser is streaming partial results in real time (built-in provider only) |
8589

86-
### Aborting
90+
### Cancelling
8791

88-
Click the **cancel** button during recording to discard without transcribing.
92+
Tap the **cancel (×) button** during recording to discard the recording without transcribing.
93+
94+
### Errors
95+
96+
If recording fails — microphone permission denied, startup timeout, or transcription error — a brief error message appears and auto-dismisses after 3 seconds. No text is inserted.

docs/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Open [http://localhost:5003](http://localhost:5003) and create your admin accoun
2121
OpenCode Manager is a mobile-first web interface for [OpenCode](https://opencode.ai) AI agents. It combines repository management, chat/session control, Git and file tools, schedules, AI configuration, MCP server management, push notifications, and full PWA support into a single responsive application.
2222

2323
- **Repository management** — Clone, discover, and manage multiple Git repos with SSH authentication and worktree support
24-
- **Chat & sessions** — Real-time SSE streaming with slash commands, `@file` mentions, and Plan/Build modes
24+
- **Chat & sessions** — Real-time SSE streaming with slash commands, `@file` mentions, Plan/Build modes, and per-agent model selection
2525
- **Schedules** — Recurring repo jobs with reusable prompts, run history, and linked sessions
2626
- **AI configuration** — Model/provider setup, OAuth for Anthropic/GitHub Copilot, custom agents
2727
- **MCP & Skills** — MCP server management and skill support
@@ -43,6 +43,7 @@ OpenCode Manager runs as a pnpm workspace:
4343
- **Chat & Sessions** — Real-time SSE streaming, slash commands, `@file` mentions, Plan/Build modes, Mermaid diagrams — [Learn more](features/chat.md)
4444
- **Files** — Directory browser with tree view, syntax highlighting, create/rename/delete, ZIP download — [Learn more](features/files.md)
4545
- **Schedules** — Recurring repo jobs with reusable prompts, run history, linked sessions — [Learn more](features/schedules.md)
46+
- **Assistant Mode** — Dedicated AI workspace with auto-provisioned skills for schedule management, notifications, settings, and repo listing — [Learn more](features/assistant-mode.md)
4647
- **AI Configuration** — Model/provider setup, OAuth for Anthropic/GitHub Copilot, custom agents — [Learn more](features/ai-config.md)
4748
- **MCP Servers** — Add local or remote MCP servers with OAuth support — [Learn more](features/mcp.md)
4849
- **Skills** — Skill support for extended agent capabilities — [Learn more](features/skills.md)

mkdocs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ nav:
3535
- AI Configuration: features/ai-config.md
3636
- Skills: features/skills.md
3737
- MCP Servers: features/mcp.md
38+
- Assistant Mode: features/assistant-mode.md
39+
- Assistant Internal API: features/assistant-internal-api.md
3840
- Text-to-Speech: features/tts.md
3941
- Speech-to-Text: features/stt.md
4042
- Push Notifications: features/notifications.md

0 commit comments

Comments
 (0)