@protolabsai/proto 0.23.0 → 0.24.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +88 -1
- package/bundled/browser-automation/SKILL.md +358 -0
- package/cli.js +6036 -4676
- package/package.json +2 -2
- package/bundled/qc-helper/docs/_meta.ts +0 -30
- package/bundled/qc-helper/docs/common-workflow.md +0 -571
- package/bundled/qc-helper/docs/configuration/_meta.ts +0 -10
- package/bundled/qc-helper/docs/configuration/auth.md +0 -366
- package/bundled/qc-helper/docs/configuration/memory.md +0 -0
- package/bundled/qc-helper/docs/configuration/model-providers.md +0 -542
- package/bundled/qc-helper/docs/configuration/qwen-ignore.md +0 -55
- package/bundled/qc-helper/docs/configuration/settings.md +0 -661
- package/bundled/qc-helper/docs/configuration/themes.md +0 -160
- package/bundled/qc-helper/docs/configuration/trusted-folders.md +0 -61
- package/bundled/qc-helper/docs/extension/_meta.ts +0 -9
- package/bundled/qc-helper/docs/extension/extension-releasing.md +0 -204
- package/bundled/qc-helper/docs/extension/getting-started-extensions.md +0 -299
- package/bundled/qc-helper/docs/extension/introduction.md +0 -331
- package/bundled/qc-helper/docs/features/_meta.ts +0 -20
- package/bundled/qc-helper/docs/features/approval-mode.md +0 -263
- package/bundled/qc-helper/docs/features/arena.md +0 -218
- package/bundled/qc-helper/docs/features/checkpointing.md +0 -77
- package/bundled/qc-helper/docs/features/commands.md +0 -314
- package/bundled/qc-helper/docs/features/export.md +0 -51
- package/bundled/qc-helper/docs/features/followup-suggestions.md +0 -109
- package/bundled/qc-helper/docs/features/headless.md +0 -318
- package/bundled/qc-helper/docs/features/hooks.md +0 -356
- package/bundled/qc-helper/docs/features/language.md +0 -139
- package/bundled/qc-helper/docs/features/lsp.md +0 -453
- package/bundled/qc-helper/docs/features/mcp.md +0 -299
- package/bundled/qc-helper/docs/features/sandbox.md +0 -241
- package/bundled/qc-helper/docs/features/scheduled-tasks.md +0 -139
- package/bundled/qc-helper/docs/features/skills.md +0 -289
- package/bundled/qc-helper/docs/features/sub-agents.md +0 -353
- package/bundled/qc-helper/docs/features/token-caching.md +0 -29
- package/bundled/qc-helper/docs/ide-integration/_meta.ts +0 -4
- package/bundled/qc-helper/docs/ide-integration/ide-companion-spec.md +0 -182
- package/bundled/qc-helper/docs/ide-integration/ide-integration.md +0 -144
- package/bundled/qc-helper/docs/integration-github-action.md +0 -241
- package/bundled/qc-helper/docs/integration-jetbrains.md +0 -81
- package/bundled/qc-helper/docs/integration-vscode.md +0 -39
- package/bundled/qc-helper/docs/integration-zed.md +0 -72
- package/bundled/qc-helper/docs/overview.md +0 -65
- package/bundled/qc-helper/docs/quickstart.md +0 -273
- package/bundled/qc-helper/docs/reference/_meta.ts +0 -4
- package/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +0 -72
- package/bundled/qc-helper/docs/reference/sdk-api.md +0 -524
- package/bundled/qc-helper/docs/support/Uninstall.md +0 -42
- package/bundled/qc-helper/docs/support/_meta.ts +0 -6
- package/bundled/qc-helper/docs/support/tos-privacy.md +0 -112
- package/bundled/qc-helper/docs/support/troubleshooting.md +0 -123
|
@@ -1,314 +0,0 @@
|
|
|
1
|
-
# Commands
|
|
2
|
-
|
|
3
|
-
This document details all commands supported by Qwen Code, helping you efficiently manage sessions, customize the interface, and control its behavior.
|
|
4
|
-
|
|
5
|
-
Qwen Code commands are triggered through specific prefixes and fall into three categories:
|
|
6
|
-
|
|
7
|
-
| Prefix Type | Function Description | Typical Use Case |
|
|
8
|
-
| -------------------------- | --------------------------------------------------- | ---------------------------------------------------------------- |
|
|
9
|
-
| Slash Commands (`/`) | Meta-level control of Qwen Code itself | Managing sessions, modifying settings, getting help |
|
|
10
|
-
| At Commands (`@`) | Quickly inject local file content into conversation | Allowing AI to analyze specified files or code under directories |
|
|
11
|
-
| Exclamation Commands (`!`) | Direct interaction with system Shell | Executing system commands like `git status`, `ls`, etc. |
|
|
12
|
-
|
|
13
|
-
## 1. Slash Commands (`/`)
|
|
14
|
-
|
|
15
|
-
Slash commands are used to manage Qwen Code sessions, interface, and basic behavior.
|
|
16
|
-
|
|
17
|
-
### 1.1 Session and Project Management
|
|
18
|
-
|
|
19
|
-
These commands help you save, restore, and summarize work progress.
|
|
20
|
-
|
|
21
|
-
| Command | Description | Usage Examples |
|
|
22
|
-
| ----------- | --------------------------------------------------------- | ------------------------------------ |
|
|
23
|
-
| `/init` | Analyze current directory and create initial context file | `/init` |
|
|
24
|
-
| `/summary` | Generate project summary based on conversation history | `/summary` |
|
|
25
|
-
| `/compress` | Replace chat history with summary to save Tokens | `/compress` |
|
|
26
|
-
| `/resume` | Resume a previous conversation session | `/resume` |
|
|
27
|
-
| `/restore` | Restore files to state before tool execution | `/restore` (list) or `/restore <ID>` |
|
|
28
|
-
| `/export` | Export current session to a file (html, md, json, jsonl) | `/export html`, `/export md` |
|
|
29
|
-
|
|
30
|
-
### 1.2 Interface and Workspace Control
|
|
31
|
-
|
|
32
|
-
Commands for adjusting interface appearance and work environment.
|
|
33
|
-
|
|
34
|
-
| Command | Description | Usage Examples |
|
|
35
|
-
| ------------ | ---------------------------------------- | ----------------------------- |
|
|
36
|
-
| `/clear` | Clear terminal screen content | `/clear` (shortcut: `Ctrl+L`) |
|
|
37
|
-
| `/context` | Show context window usage breakdown | `/context` |
|
|
38
|
-
| `/theme` | Change Qwen Code visual theme | `/theme` |
|
|
39
|
-
| `/vim` | Turn input area Vim editing mode on/off | `/vim` |
|
|
40
|
-
| `/directory` | Manage multi-directory support workspace | `/dir add ./src,./tests` |
|
|
41
|
-
| `/editor` | Open dialog to select supported editor | `/editor` |
|
|
42
|
-
|
|
43
|
-
### 1.3 Language Settings
|
|
44
|
-
|
|
45
|
-
Commands specifically for controlling interface and output language.
|
|
46
|
-
|
|
47
|
-
| Command | Description | Usage Examples |
|
|
48
|
-
| --------------------- | -------------------------------- | -------------------------- |
|
|
49
|
-
| `/language` | View or change language settings | `/language` |
|
|
50
|
-
| → `ui [language]` | Set UI interface language | `/language ui zh-CN` |
|
|
51
|
-
| → `output [language]` | Set LLM output language | `/language output Chinese` |
|
|
52
|
-
|
|
53
|
-
- Available built-in UI languages: `zh-CN` (Simplified Chinese), `en-US` (English), `ru-RU` (Russian), `de-DE` (German)
|
|
54
|
-
- Output language examples: `Chinese`, `English`, `Japanese`, etc.
|
|
55
|
-
|
|
56
|
-
### 1.4 Tool and Model Management
|
|
57
|
-
|
|
58
|
-
Commands for managing AI tools and models.
|
|
59
|
-
|
|
60
|
-
| Command | Description | Usage Examples |
|
|
61
|
-
| ---------------- | ------------------------------------------------- | --------------------------------------------- |
|
|
62
|
-
| `/mcp` | List configured MCP servers and tools | `/mcp`, `/mcp desc` |
|
|
63
|
-
| `/tools` | Display currently available tool list | `/tools`, `/tools desc` |
|
|
64
|
-
| `/skills` | List and run available skills | `/skills`, `/skills <name>` |
|
|
65
|
-
| `/approval-mode` | Change approval mode for tool usage | `/approval-mode <mode (auto-edit)> --project` |
|
|
66
|
-
| →`plan` | Analysis only, no execution | Secure review |
|
|
67
|
-
| →`default` | Require approval for edits | Daily use |
|
|
68
|
-
| →`auto-edit` | Automatically approve edits | Trusted environment |
|
|
69
|
-
| →`yolo` | Automatically approve all | Quick prototyping |
|
|
70
|
-
| `/model` | Switch model used in current session | `/model` |
|
|
71
|
-
| `/model --fast` | Set or select the fast model for background tasks | `/model --fast qwen3.5-flash` |
|
|
72
|
-
| `/extensions` | List all active extensions in current session | `/extensions` |
|
|
73
|
-
| `/memory` | Manage AI's instruction context | `/memory add Important Info` |
|
|
74
|
-
|
|
75
|
-
### 1.5 Information, Settings, and Help
|
|
76
|
-
|
|
77
|
-
Commands for obtaining information and performing system settings.
|
|
78
|
-
|
|
79
|
-
| Command | Description | Usage Examples |
|
|
80
|
-
| ----------- | ----------------------------------------------- | -------------------------------- |
|
|
81
|
-
| `/help` | Display help information for available commands | `/help` or `/?` |
|
|
82
|
-
| `/about` | Display version information | `/about` |
|
|
83
|
-
| `/stats` | Display detailed statistics for current session | `/stats` |
|
|
84
|
-
| `/settings` | Open settings editor | `/settings` |
|
|
85
|
-
| `/auth` | Change authentication method | `/auth` |
|
|
86
|
-
| `/bug` | Submit issue about Qwen Code | `/bug Button click unresponsive` |
|
|
87
|
-
| `/copy` | Copy last output content to clipboard | `/copy` |
|
|
88
|
-
| `/quit` | Exit Qwen Code immediately | `/quit` or `/exit` |
|
|
89
|
-
|
|
90
|
-
### 1.6 Common Shortcuts
|
|
91
|
-
|
|
92
|
-
| Shortcut | Function | Note |
|
|
93
|
-
| ------------------ | ----------------------- | ---------------------- |
|
|
94
|
-
| `Ctrl/cmd+L` | Clear screen | Equivalent to `/clear` |
|
|
95
|
-
| `Ctrl/cmd+T` | Toggle tool description | MCP tool management |
|
|
96
|
-
| `Ctrl/cmd+C`×2 | Exit confirmation | Secure exit mechanism |
|
|
97
|
-
| `Ctrl/cmd+Z` | Undo input | Text editing |
|
|
98
|
-
| `Ctrl/cmd+Shift+Z` | Redo input | Text editing |
|
|
99
|
-
|
|
100
|
-
### 1.7 CLI Auth Subcommands
|
|
101
|
-
|
|
102
|
-
In addition to the in-session `/auth` slash command, Qwen Code provides standalone CLI subcommands for managing authentication directly from the terminal:
|
|
103
|
-
|
|
104
|
-
| Command | Description |
|
|
105
|
-
| ---------------------------------------------------- | ------------------------------------------------- |
|
|
106
|
-
| `qwen auth` | Interactive authentication setup |
|
|
107
|
-
| `qwen auth qwen-oauth` | Authenticate with Qwen OAuth |
|
|
108
|
-
| `qwen auth coding-plan` | Authenticate with Alibaba Cloud Coding Plan |
|
|
109
|
-
| `qwen auth coding-plan --region china --key sk-sp-…` | Non-interactive Coding Plan setup (for scripting) |
|
|
110
|
-
| `qwen auth status` | Show current authentication status |
|
|
111
|
-
|
|
112
|
-
> [!tip]
|
|
113
|
-
>
|
|
114
|
-
> These commands run outside of a Qwen Code session. Use them to configure authentication before starting a session, or in scripts and CI environments. See the [Authentication](../configuration/auth) page for full details.
|
|
115
|
-
|
|
116
|
-
## 2. @ Commands (Introducing Files)
|
|
117
|
-
|
|
118
|
-
@ commands are used to quickly add local file or directory content to the conversation.
|
|
119
|
-
|
|
120
|
-
| Command Format | Description | Examples |
|
|
121
|
-
| ------------------- | -------------------------------------------- | ------------------------------------------------ |
|
|
122
|
-
| `@<file path>` | Inject content of specified file | `@src/main.py Please explain this code` |
|
|
123
|
-
| `@<directory path>` | Recursively read all text files in directory | `@docs/ Summarize content of this document` |
|
|
124
|
-
| Standalone `@` | Used when discussing `@` symbol itself | `@ What is this symbol used for in programming?` |
|
|
125
|
-
|
|
126
|
-
Note: Spaces in paths need to be escaped with backslash (e.g., `@My\ Documents/file.txt`)
|
|
127
|
-
|
|
128
|
-
## 3. Exclamation Commands (`!`) - Shell Command Execution
|
|
129
|
-
|
|
130
|
-
Exclamation commands allow you to execute system commands directly within Qwen Code.
|
|
131
|
-
|
|
132
|
-
| Command Format | Description | Examples |
|
|
133
|
-
| ------------------ | ------------------------------------------------------------------ | -------------------------------------- |
|
|
134
|
-
| `!<shell command>` | Execute command in sub-Shell | `!ls -la`, `!git status` |
|
|
135
|
-
| Standalone `!` | Switch Shell mode, any input is executed directly as Shell command | `!`(enter) → Input command → `!`(exit) |
|
|
136
|
-
|
|
137
|
-
Environment Variables: Commands executed via `!` will set the `QWEN_CODE=1` environment variable.
|
|
138
|
-
|
|
139
|
-
## 4. Custom Commands
|
|
140
|
-
|
|
141
|
-
Save frequently used prompts as shortcut commands to improve work efficiency and ensure consistency.
|
|
142
|
-
|
|
143
|
-
> [!note]
|
|
144
|
-
>
|
|
145
|
-
> Custom commands now use Markdown format with optional YAML frontmatter. TOML format is deprecated but still supported for backwards compatibility. When TOML files are detected, an automatic migration prompt will be displayed.
|
|
146
|
-
|
|
147
|
-
### Quick Overview
|
|
148
|
-
|
|
149
|
-
| Function | Description | Advantages | Priority | Applicable Scenarios |
|
|
150
|
-
| ---------------- | ------------------------------------------ | -------------------------------------- | -------- | ---------------------------------------------------- |
|
|
151
|
-
| Namespace | Subdirectory creates colon-named commands | Better command organization | | |
|
|
152
|
-
| Global Commands | `~/.qwen/commands/` | Available in all projects | Low | Personal frequently used commands, cross-project use |
|
|
153
|
-
| Project Commands | `<project root directory>/.qwen/commands/` | Project-specific, version-controllable | High | Team sharing, project-specific commands |
|
|
154
|
-
|
|
155
|
-
Priority Rules: Project commands > User commands (project command used when names are same)
|
|
156
|
-
|
|
157
|
-
### Command Naming Rules
|
|
158
|
-
|
|
159
|
-
#### File Path to Command Name Mapping Table
|
|
160
|
-
|
|
161
|
-
| File Location | Generated Command | Example Call |
|
|
162
|
-
| ---------------------------------------- | ----------------- | --------------------- |
|
|
163
|
-
| `~/.qwen/commands/test.md` | `/test` | `/test Parameter` |
|
|
164
|
-
| `<project>/.qwen/commands/git/commit.md` | `/git:commit` | `/git:commit Message` |
|
|
165
|
-
|
|
166
|
-
Naming Rules: Path separator (`/` or `\`) converted to colon (`:`)
|
|
167
|
-
|
|
168
|
-
### Markdown File Format Specification (Recommended)
|
|
169
|
-
|
|
170
|
-
Custom commands use Markdown files with optional YAML frontmatter:
|
|
171
|
-
|
|
172
|
-
```markdown
|
|
173
|
-
---
|
|
174
|
-
description: Optional description (displayed in /help)
|
|
175
|
-
---
|
|
176
|
-
|
|
177
|
-
Your prompt content here.
|
|
178
|
-
Use {{args}} for parameter injection.
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
| Field | Required | Description | Example |
|
|
182
|
-
| ------------- | -------- | ---------------------------------------- | ------------------------------------------ |
|
|
183
|
-
| `description` | Optional | Command description (displayed in /help) | `description: Code analysis tool` |
|
|
184
|
-
| Prompt body | Required | Prompt content sent to model | Any Markdown content after the frontmatter |
|
|
185
|
-
|
|
186
|
-
### TOML File Format (Deprecated)
|
|
187
|
-
|
|
188
|
-
> [!warning]
|
|
189
|
-
>
|
|
190
|
-
> **Deprecated:** TOML format is still supported but will be removed in a future version. Please migrate to Markdown format.
|
|
191
|
-
|
|
192
|
-
| Field | Required | Description | Example |
|
|
193
|
-
| ------------- | -------- | ---------------------------------------- | ------------------------------------------ |
|
|
194
|
-
| `prompt` | Required | Prompt content sent to model | `prompt = "Please analyze code: {{args}}"` |
|
|
195
|
-
| `description` | Optional | Command description (displayed in /help) | `description = "Code analysis tool"` |
|
|
196
|
-
|
|
197
|
-
### Parameter Processing Mechanism
|
|
198
|
-
|
|
199
|
-
| Processing Method | Syntax | Applicable Scenarios | Security Features |
|
|
200
|
-
| ---------------------------- | ------------------ | ------------------------------------ | -------------------------------------- |
|
|
201
|
-
| Context-aware Injection | `{{args}}` | Need precise parameter control | Automatic Shell escaping |
|
|
202
|
-
| Default Parameter Processing | No special marking | Simple commands, parameter appending | Append as-is |
|
|
203
|
-
| Shell Command Injection | `!{command}` | Need dynamic content | Execution confirmation required before |
|
|
204
|
-
|
|
205
|
-
#### 1. Context-aware Injection (`{{args}}`)
|
|
206
|
-
|
|
207
|
-
| Scenario | TOML Configuration | Call Method | Actual Effect |
|
|
208
|
-
| ---------------- | --------------------------------------- | --------------------- | ------------------------ |
|
|
209
|
-
| Raw Injection | `prompt = "Fix: {{args}}"` | `/fix "Button issue"` | `Fix: "Button issue"` |
|
|
210
|
-
| In Shell Command | `prompt = "Search: !{grep {{args}} .}"` | `/search "hello"` | Execute `grep "hello" .` |
|
|
211
|
-
|
|
212
|
-
#### 2. Default Parameter Processing
|
|
213
|
-
|
|
214
|
-
| Input Situation | Processing Method | Example |
|
|
215
|
-
| --------------- | ------------------------------------------------------ | ---------------------------------------------- |
|
|
216
|
-
| Has parameters | Append to end of prompt (separated by two line breaks) | `/cmd parameter` → Original prompt + parameter |
|
|
217
|
-
| No parameters | Send prompt as is | `/cmd` → Original prompt |
|
|
218
|
-
|
|
219
|
-
🚀 Dynamic Content Injection
|
|
220
|
-
|
|
221
|
-
| Injection Type | Syntax | Processing Order | Purpose |
|
|
222
|
-
| --------------------- | -------------- | ------------------- | -------------------------------- |
|
|
223
|
-
| File Content | `@{file path}` | Processed first | Inject static reference files |
|
|
224
|
-
| Shell Commands | `!{command}` | Processed in middle | Inject dynamic execution results |
|
|
225
|
-
| Parameter Replacement | `{{args}}` | Processed last | Inject user parameters |
|
|
226
|
-
|
|
227
|
-
#### 3. Shell Command Execution (`!{...}`)
|
|
228
|
-
|
|
229
|
-
| Operation | User Interaction |
|
|
230
|
-
| ------------------------------- | -------------------- |
|
|
231
|
-
| 1. Parse command and parameters | - |
|
|
232
|
-
| 2. Automatic Shell escaping | - |
|
|
233
|
-
| 3. Show confirmation dialog | ✅ User confirmation |
|
|
234
|
-
| 4. Execute command | - |
|
|
235
|
-
| 5. Inject output to prompt | - |
|
|
236
|
-
|
|
237
|
-
Example: Git Commit Message Generation
|
|
238
|
-
|
|
239
|
-
````markdown
|
|
240
|
-
---
|
|
241
|
-
description: Generate Commit message based on staged changes
|
|
242
|
-
---
|
|
243
|
-
|
|
244
|
-
Please generate a Commit message based on the following diff:
|
|
245
|
-
|
|
246
|
-
```diff
|
|
247
|
-
!{git diff --staged}
|
|
248
|
-
```
|
|
249
|
-
````
|
|
250
|
-
|
|
251
|
-
#### 4. File Content Injection (`@{...}`)
|
|
252
|
-
|
|
253
|
-
| File Type | Support Status | Processing Method |
|
|
254
|
-
| ------------ | ---------------------- | --------------------------- |
|
|
255
|
-
| Text Files | ✅ Full Support | Directly inject content |
|
|
256
|
-
| Images/PDF | ✅ Multi-modal Support | Encode and inject |
|
|
257
|
-
| Binary Files | ⚠️ Limited Support | May be skipped or truncated |
|
|
258
|
-
| Directory | ✅ Recursive Injection | Follow .gitignore rules |
|
|
259
|
-
|
|
260
|
-
Example: Code Review Command
|
|
261
|
-
|
|
262
|
-
```markdown
|
|
263
|
-
---
|
|
264
|
-
description: Code review based on best practices
|
|
265
|
-
---
|
|
266
|
-
|
|
267
|
-
Review {{args}}, reference standards:
|
|
268
|
-
|
|
269
|
-
@{docs/code-standards.md}
|
|
270
|
-
```
|
|
271
|
-
|
|
272
|
-
### Practical Creation Example
|
|
273
|
-
|
|
274
|
-
#### "Pure Function Refactoring" Command Creation Steps Table
|
|
275
|
-
|
|
276
|
-
| Operation | Command/Code |
|
|
277
|
-
| ----------------------------- | ----------------------------------------- |
|
|
278
|
-
| 1. Create directory structure | `mkdir -p ~/.qwen/commands/refactor` |
|
|
279
|
-
| 2. Create command file | `touch ~/.qwen/commands/refactor/pure.md` |
|
|
280
|
-
| 3. Edit command content | Refer to the complete code below. |
|
|
281
|
-
| 4. Test command | `@file.js` → `/refactor:pure` |
|
|
282
|
-
|
|
283
|
-
```markdown
|
|
284
|
-
---
|
|
285
|
-
description: Refactor code to pure function
|
|
286
|
-
---
|
|
287
|
-
|
|
288
|
-
Please analyze code in current context, refactor to pure function.
|
|
289
|
-
Requirements:
|
|
290
|
-
|
|
291
|
-
1. Provide refactored code
|
|
292
|
-
2. Explain key changes and pure function characteristic implementation
|
|
293
|
-
3. Maintain function unchanged
|
|
294
|
-
```
|
|
295
|
-
|
|
296
|
-
### Custom Command Best Practices Summary
|
|
297
|
-
|
|
298
|
-
#### Command Design Recommendations Table
|
|
299
|
-
|
|
300
|
-
| Practice Points | Recommended Approach | Avoid |
|
|
301
|
-
| -------------------- | ----------------------------------- | ------------------------------------------- |
|
|
302
|
-
| Command Naming | Use namespaces for organization | Avoid overly generic names |
|
|
303
|
-
| Parameter Processing | Clearly use `{{args}}` | Rely on default appending (easy to confuse) |
|
|
304
|
-
| Error Handling | Utilize Shell error output | Ignore execution failure |
|
|
305
|
-
| File Organization | Organize by function in directories | All commands in root directory |
|
|
306
|
-
| Description Field | Always provide clear description | Rely on auto-generated description |
|
|
307
|
-
|
|
308
|
-
#### Security Features Reminder Table
|
|
309
|
-
|
|
310
|
-
| Security Mechanism | Protection Effect | User Operation |
|
|
311
|
-
| ---------------------- | -------------------------- | ---------------------- |
|
|
312
|
-
| Shell Escaping | Prevent command injection | Automatic processing |
|
|
313
|
-
| Execution Confirmation | Avoid accidental execution | Dialog confirmation |
|
|
314
|
-
| Error Reporting | Help diagnose issues | View error information |
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
# Session Export
|
|
2
|
-
|
|
3
|
-
The `/export` command saves your current session to a file in your working directory. Four formats are supported.
|
|
4
|
-
|
|
5
|
-
## Usage
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
/export <format>
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
| Command | Output |
|
|
12
|
-
| --------------- | -------------------------------------------------- |
|
|
13
|
-
| `/export html` | Self-contained HTML file with a rendered viewer |
|
|
14
|
-
| `/export md` | Markdown — plain text, readable anywhere |
|
|
15
|
-
| `/export json` | Structured JSON — one object per message |
|
|
16
|
-
| `/export jsonl` | JSONL — one JSON object per line (stream-friendly) |
|
|
17
|
-
|
|
18
|
-
Files are written to the current working directory with a timestamped name, e.g. `export-2025-04-05T16-30-00-000Z.html`.
|
|
19
|
-
|
|
20
|
-
## HTML Format
|
|
21
|
-
|
|
22
|
-
The HTML export produces a **self-contained file** — no server, no internet connection required to view it. Open it directly in any browser.
|
|
23
|
-
|
|
24
|
-
It includes:
|
|
25
|
-
|
|
26
|
-
- Full conversation history with role labels (user / assistant / tool)
|
|
27
|
-
- Rendered markdown (code blocks, lists, headings)
|
|
28
|
-
- Tool call inputs and outputs collapsed by default
|
|
29
|
-
- A minimal, readable stylesheet baked in
|
|
30
|
-
|
|
31
|
-
This is useful for sharing a session with teammates, archiving a debugging session, or reviewing a long conversation outside the terminal.
|
|
32
|
-
|
|
33
|
-
## JSON / JSONL Formats
|
|
34
|
-
|
|
35
|
-
These formats expose the raw message structure, useful for:
|
|
36
|
-
|
|
37
|
-
- Piping into other tools (`jq`, scripts, LLM pipelines)
|
|
38
|
-
- Programmatic analysis of session content
|
|
39
|
-
- Building integrations on top of proto session data
|
|
40
|
-
|
|
41
|
-
`json` outputs a single array. `jsonl` outputs one JSON object per line, which is better for streaming and large files.
|
|
42
|
-
|
|
43
|
-
## Markdown Format
|
|
44
|
-
|
|
45
|
-
Exports the conversation as a readable `.md` file. Good for pasting into notes, wikis, or GitHub issues.
|
|
46
|
-
|
|
47
|
-
## Notes
|
|
48
|
-
|
|
49
|
-
- Export captures the session state at the moment the command runs — messages added after export are not included.
|
|
50
|
-
- The file is written to `config.workingDir` (the directory proto was started in).
|
|
51
|
-
- No session data is sent anywhere — the file is written locally only.
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
# Followup Suggestions
|
|
2
|
-
|
|
3
|
-
Qwen Code can predict what you want to type next and show it as ghost text in the input area. This feature uses an LLM call to analyze the conversation context and generate a natural next step suggestion.
|
|
4
|
-
|
|
5
|
-
This feature works end-to-end in the CLI. In the WebUI, the hook and UI plumbing are available, but host applications must trigger suggestion generation and wire the followup state for suggestions to appear.
|
|
6
|
-
|
|
7
|
-
## How It Works
|
|
8
|
-
|
|
9
|
-
After Qwen Code finishes responding, a suggestion appears as dimmed text in the input area after a short delay (~300ms). For example, after fixing a bug, you might see:
|
|
10
|
-
|
|
11
|
-
```
|
|
12
|
-
> run the tests
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
The suggestion is generated by sending the conversation history to the model, which predicts what you would naturally type next.
|
|
16
|
-
|
|
17
|
-
## Accepting Suggestions
|
|
18
|
-
|
|
19
|
-
| Key | Action |
|
|
20
|
-
| ------------- | ------------------------------------------------ |
|
|
21
|
-
| `Tab` | Accept the suggestion and fill it into the input |
|
|
22
|
-
| `Enter` | Accept the suggestion and submit it immediately |
|
|
23
|
-
| `Right Arrow` | Accept the suggestion and fill it into the input |
|
|
24
|
-
| Any typing | Dismiss the suggestion and type normally |
|
|
25
|
-
|
|
26
|
-
## When Suggestions Appear
|
|
27
|
-
|
|
28
|
-
Suggestions are generated when all of the following conditions are met:
|
|
29
|
-
|
|
30
|
-
- The model has completed its response (not during streaming)
|
|
31
|
-
- At least 2 model turns have occurred in the conversation
|
|
32
|
-
- There are no errors in the most recent response
|
|
33
|
-
- No confirmation dialogs are pending (e.g., shell confirmation, permissions)
|
|
34
|
-
- The approval mode is not set to `plan`
|
|
35
|
-
- The feature is enabled in settings (enabled by default)
|
|
36
|
-
|
|
37
|
-
Suggestions will not appear in non-interactive mode (e.g., headless/SDK mode).
|
|
38
|
-
|
|
39
|
-
Suggestions are automatically dismissed when:
|
|
40
|
-
|
|
41
|
-
- You start typing
|
|
42
|
-
- A new model turn begins
|
|
43
|
-
- The suggestion is accepted
|
|
44
|
-
|
|
45
|
-
## Fast Model
|
|
46
|
-
|
|
47
|
-
By default, suggestions use the same model as your main conversation. For faster and cheaper suggestions, configure a dedicated fast model:
|
|
48
|
-
|
|
49
|
-
### Via command
|
|
50
|
-
|
|
51
|
-
```
|
|
52
|
-
/model --fast qwen3.5-flash
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
Or use `/model --fast` (without a model name) to open a selection dialog.
|
|
56
|
-
|
|
57
|
-
### Via settings.json
|
|
58
|
-
|
|
59
|
-
```json
|
|
60
|
-
{
|
|
61
|
-
"fastModel": "qwen3.5-flash"
|
|
62
|
-
}
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
The fast model is used for background tasks like suggestion generation. When not configured, the main conversation model is used as fallback.
|
|
66
|
-
|
|
67
|
-
Thinking/reasoning mode is automatically disabled for all background tasks (suggestion generation and speculation), regardless of your main model's thinking configuration. This avoids wasting tokens on internal reasoning that isn't needed for these tasks.
|
|
68
|
-
|
|
69
|
-
## Configuration
|
|
70
|
-
|
|
71
|
-
These settings can be configured in `settings.json`:
|
|
72
|
-
|
|
73
|
-
| Setting | Type | Default | Description |
|
|
74
|
-
| ------------------------------ | ------- | ------- | ------------------------------------------------------------------ |
|
|
75
|
-
| `ui.enableFollowupSuggestions` | boolean | `true` | Enable or disable followup suggestions |
|
|
76
|
-
| `ui.enableCacheSharing` | boolean | `true` | Use cache-aware forked queries to reduce cost (experimental) |
|
|
77
|
-
| `ui.enableSpeculation` | boolean | `false` | Speculatively execute suggestions before submission (experimental) |
|
|
78
|
-
| `fastModel` | string | `""` | Model for background tasks (suggestion generation, speculation) |
|
|
79
|
-
|
|
80
|
-
### Example
|
|
81
|
-
|
|
82
|
-
```json
|
|
83
|
-
{
|
|
84
|
-
"fastModel": "qwen3.5-flash",
|
|
85
|
-
"ui": {
|
|
86
|
-
"enableFollowupSuggestions": true,
|
|
87
|
-
"enableCacheSharing": true
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
## Monitoring
|
|
93
|
-
|
|
94
|
-
Suggestion model usage appears in `/stats` output, showing tokens consumed by the fast model for suggestion generation.
|
|
95
|
-
|
|
96
|
-
The fast model is also shown in `/about` output under "Fast Model".
|
|
97
|
-
|
|
98
|
-
## Suggestion Quality
|
|
99
|
-
|
|
100
|
-
Suggestions go through quality filters to ensure they are useful:
|
|
101
|
-
|
|
102
|
-
- Must be 2-12 words (CJK: 2-30 characters), under 100 characters total
|
|
103
|
-
- Cannot be evaluative ("looks good", "thanks")
|
|
104
|
-
- Cannot use AI voice ("Let me...", "I'll...")
|
|
105
|
-
- Cannot be multiple sentences or contain formatting (markdown, newlines)
|
|
106
|
-
- Cannot be meta-commentary ("nothing to suggest", "silence")
|
|
107
|
-
- Cannot be error messages or prefixed labels ("Suggestion: ...")
|
|
108
|
-
- Single-word suggestions are only allowed for common commands (yes, commit, push, etc.)
|
|
109
|
-
- Slash commands (e.g., `/commit`) are always allowed as single-word suggestions
|