@qwen-code/qwen-code 0.15.1 → 0.15.2-nightly.20260428.1befabe58
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 +31 -4
- package/bundled/batch/SKILL.md +1 -0
- package/bundled/loop/SKILL.md +1 -0
- package/bundled/qc-helper/SKILL.md +1 -0
- package/bundled/qc-helper/docs/configuration/auth.md +6 -1
- package/bundled/qc-helper/docs/configuration/settings.md +12 -19
- package/bundled/qc-helper/docs/features/_meta.ts +1 -0
- package/bundled/qc-helper/docs/features/commands.md +2 -1
- package/bundled/qc-helper/docs/features/sub-agents.md +0 -1
- package/bundled/qc-helper/docs/features/tool-use-summaries.md +178 -0
- package/bundled/qc-helper/docs/quickstart.md +1 -0
- package/bundled/review/SKILL.md +3 -2
- package/cli.js +16020 -7671
- package/locales/ca.js +2143 -0
- package/locales/de.js +2 -0
- package/locales/en.js +9 -0
- package/locales/fr.js +2 -0
- package/locales/ja.js +2 -0
- package/locales/pt.js +2 -0
- package/locales/ru.js +2 -0
- package/locales/zh-TW.js +1678 -0
- package/locales/zh.js +7 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -424,7 +424,7 @@ As an open-source terminal agent, you can use Qwen Code in four primary ways:
|
|
|
424
424
|
1. Interactive mode (terminal UI)
|
|
425
425
|
2. Headless mode (scripts, CI)
|
|
426
426
|
3. IDE integration (VS Code, Zed)
|
|
427
|
-
4. TypeScript
|
|
427
|
+
4. SDKs (TypeScript, Python, Java)
|
|
428
428
|
|
|
429
429
|
#### Interactive mode
|
|
430
430
|
|
|
@@ -452,11 +452,38 @@ Use Qwen Code inside your editor (VS Code, Zed, and JetBrains IDEs):
|
|
|
452
452
|
- [Use in Zed](https://qwenlm.github.io/qwen-code-docs/en/users/integration-zed/)
|
|
453
453
|
- [Use in JetBrains IDEs](https://qwenlm.github.io/qwen-code-docs/en/users/integration-jetbrains/)
|
|
454
454
|
|
|
455
|
-
####
|
|
455
|
+
#### SDKs
|
|
456
456
|
|
|
457
|
-
Build on top of Qwen Code with the
|
|
457
|
+
Build on top of Qwen Code with the available SDKs:
|
|
458
458
|
|
|
459
|
-
- [Use the Qwen Code SDK](./packages/sdk-typescript/README.md)
|
|
459
|
+
- TypeScript: [Use the Qwen Code SDK](./packages/sdk-typescript/README.md)
|
|
460
|
+
- Python: [Use the Python SDK](./packages/sdk-python/README.md)
|
|
461
|
+
- Java: [Use the Java SDK](./packages/sdk-java/qwencode/README.md)
|
|
462
|
+
|
|
463
|
+
Python SDK example:
|
|
464
|
+
|
|
465
|
+
```python
|
|
466
|
+
import asyncio
|
|
467
|
+
|
|
468
|
+
from qwen_code_sdk import is_sdk_result_message, query
|
|
469
|
+
|
|
470
|
+
|
|
471
|
+
async def main() -> None:
|
|
472
|
+
result = query(
|
|
473
|
+
"Summarize the repository layout.",
|
|
474
|
+
{
|
|
475
|
+
"cwd": "/path/to/project",
|
|
476
|
+
"path_to_qwen_executable": "qwen",
|
|
477
|
+
},
|
|
478
|
+
)
|
|
479
|
+
|
|
480
|
+
async for message in result:
|
|
481
|
+
if is_sdk_result_message(message):
|
|
482
|
+
print(message["result"])
|
|
483
|
+
|
|
484
|
+
|
|
485
|
+
asyncio.run(main())
|
|
486
|
+
```
|
|
460
487
|
|
|
461
488
|
## Commands & Shortcuts
|
|
462
489
|
|
package/bundled/batch/SKILL.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: batch
|
|
3
3
|
description: Execute batch operations on multiple files in parallel. Automatically discovers files, splits into chunks, and processes with parallel worker agents. Use `/batch` followed by operation and file pattern.
|
|
4
|
+
argument-hint: '<operation> <file-pattern>'
|
|
4
5
|
allowedTools:
|
|
5
6
|
- task
|
|
6
7
|
- glob
|
package/bundled/loop/SKILL.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: loop
|
|
3
3
|
description: Create a recurring loop that runs a prompt on a schedule. Usage - /loop 5m check the build, /loop check the PR every 30m, /loop run tests (defaults to 10m). /loop list to show jobs, /loop clear to cancel all.
|
|
4
|
+
argument-hint: '[interval] <prompt> | list | clear'
|
|
4
5
|
allowedTools:
|
|
5
6
|
- cron_create
|
|
6
7
|
- cron_list
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: qc-helper
|
|
3
3
|
description: Answer any question about Qwen Code usage, features, configuration, and troubleshooting by referencing the official user documentation. Also helps users view or modify their settings.json. Invoke with `/qc-helper` followed by a question, e.g. `/qc-helper how do I configure MCP servers?` or `/qc-helper change approval mode to yolo`.
|
|
4
|
+
argument-hint: '<question>'
|
|
4
5
|
allowedTools:
|
|
5
6
|
- read_file
|
|
6
7
|
- edit_file
|
|
@@ -330,6 +330,7 @@ You'll see a selector with arrow-key navigation:
|
|
|
330
330
|
Select authentication method:
|
|
331
331
|
|
|
332
332
|
Alibaba Cloud Coding Plan - Paid · Up to 6,000 requests/5 hrs · All Alibaba Cloud Coding Plan Models
|
|
333
|
+
API Key - Bring your own API key
|
|
333
334
|
Qwen OAuth - Discontinued — switch to Coding Plan or API Key
|
|
334
335
|
|
|
335
336
|
(Use ↑ ↓ arrows to navigate, Enter to select, Ctrl+C to exit)
|
|
@@ -340,9 +341,10 @@ Select authentication method:
|
|
|
340
341
|
| Command | Description |
|
|
341
342
|
| ---------------------------------------------------- | ------------------------------------------------- |
|
|
342
343
|
| `qwen auth` | Interactive authentication setup |
|
|
343
|
-
| `qwen auth qwen-oauth` | Authenticate with Qwen OAuth |
|
|
344
344
|
| `qwen auth coding-plan` | Authenticate with Alibaba Cloud Coding Plan |
|
|
345
345
|
| `qwen auth coding-plan --region china --key sk-sp-…` | Non-interactive Coding Plan setup (for scripting) |
|
|
346
|
+
| `qwen auth api-key` | Authenticate with an API key |
|
|
347
|
+
| `qwen auth qwen-oauth` | Authenticate with Qwen OAuth (discontinued) |
|
|
346
348
|
| `qwen auth status` | Show current authentication status |
|
|
347
349
|
|
|
348
350
|
**Examples:**
|
|
@@ -357,6 +359,9 @@ qwen auth coding-plan
|
|
|
357
359
|
# Set up Coding Plan non-interactively (useful for CI/scripting)
|
|
358
360
|
qwen auth coding-plan --region china --key sk-sp-xxxxxxxxx
|
|
359
361
|
|
|
362
|
+
# Set up API key (ModelStudio Standard or custom provider)
|
|
363
|
+
qwen auth api-key
|
|
364
|
+
|
|
360
365
|
# Check your current auth configuration
|
|
361
366
|
qwen auth status
|
|
362
367
|
```
|
|
@@ -117,6 +117,7 @@ Settings are organized into categories. All settings should be placed within the
|
|
|
117
117
|
| `ui.enableFollowupSuggestions` | boolean | Enable [followup suggestions](../features/followup-suggestions) that predict what you want to type next after the model responds. Suggestions appear as ghost text and can be accepted with Tab, Enter, or Right Arrow. | `true` |
|
|
118
118
|
| `ui.enableCacheSharing` | boolean | Use cache-aware forked queries for suggestion generation. Reduces cost on providers that support prefix caching (experimental). | `true` |
|
|
119
119
|
| `ui.enableSpeculation` | boolean | Speculatively execute accepted suggestions before submission. Results appear instantly when you accept (experimental). | `false` |
|
|
120
|
+
| `experimental.emitToolUseSummaries` | boolean | Generate short LLM-based labels summarizing each tool-call batch. See [Tool-Use Summaries](../features/tool-use-summaries). Requires `fastModel` to be configured; silently skipped otherwise. Can be overridden per-session with `QWEN_CODE_EMIT_TOOL_USE_SUMMARIES=0` or `=1`. | `true` |
|
|
120
121
|
|
|
121
122
|
#### ide
|
|
122
123
|
|
|
@@ -133,17 +134,17 @@ Settings are organized into categories. All settings should be placed within the
|
|
|
133
134
|
|
|
134
135
|
#### model
|
|
135
136
|
|
|
136
|
-
| Setting | Type | Description
|
|
137
|
-
| -------------------------------------------------- | ------- |
|
|
138
|
-
| `model.name` | string | The Qwen model to use for conversations.
|
|
139
|
-
| `model.maxSessionTurns` | number | Maximum number of user/model/tool turns to keep in a session. -1 means unlimited.
|
|
140
|
-
| `model.generationConfig` | object | Advanced overrides passed to the underlying content generator. Supports request controls such as `timeout`, `maxRetries`, `enableCacheControl`, `contextWindowSize` (override model's context window size), `modalities` (override auto-detected input modalities), `customHeaders` (custom HTTP headers for API requests), and `extra_body` (additional body parameters for OpenAI-compatible API requests only), along with fine-tuning knobs under `samplingParams` (for example `temperature`, `top_p`, `max_tokens`). Leave unset to rely on provider defaults. | `undefined` |
|
|
141
|
-
| `model.chatCompression.contextPercentageThreshold` | number | Sets the threshold for chat history compression as a percentage of the model's total token limit. This is a value between 0 and 1 that applies to both automatic compression and the manual `/compress` command. For example, a value of `0.6` will trigger compression when the chat history exceeds 60% of the token limit. Use `0` to disable compression entirely.
|
|
142
|
-
| `model.skipNextSpeakerCheck` | boolean | Skip the next speaker check.
|
|
143
|
-
| `model.skipLoopDetection` | boolean | Disables loop detection checks. Loop detection prevents infinite loops in AI responses but can generate false positives that interrupt legitimate workflows. Enable this option if you experience frequent false positive loop detection interruptions.
|
|
144
|
-
| `model.skipStartupContext` | boolean | Skips sending the startup workspace context (environment summary and acknowledgement) at the beginning of each session. Enable this if you prefer to provide context manually or want to save tokens on startup.
|
|
145
|
-
| `model.enableOpenAILogging` | boolean | Enables logging of OpenAI API calls for debugging and analysis. When enabled, API requests and responses are logged to JSON files.
|
|
146
|
-
| `model.openAILoggingDir` | string | Custom directory path for OpenAI API logs. If not specified, defaults to `logs/openai` in the current working directory. Supports absolute paths, relative paths (resolved from current working directory), and `~` expansion (home directory).
|
|
137
|
+
| Setting | Type | Description | Default |
|
|
138
|
+
| -------------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------- |
|
|
139
|
+
| `model.name` | string | The Qwen model to use for conversations. | `undefined` |
|
|
140
|
+
| `model.maxSessionTurns` | number | Maximum number of user/model/tool turns to keep in a session. -1 means unlimited. | `-1` |
|
|
141
|
+
| `model.generationConfig` | object | Advanced overrides passed to the underlying content generator. Supports request controls such as `timeout`, `maxRetries`, `enableCacheControl`, `splitToolMedia` (set `true` for strict OpenAI-compatible servers like LM Studio that reject non-text content on `role: "tool"` messages — splits media into a follow-up user message), `contextWindowSize` (override model's context window size), `modalities` (override auto-detected input modalities), `customHeaders` (custom HTTP headers for API requests), and `extra_body` (additional body parameters for OpenAI-compatible API requests only), along with fine-tuning knobs under `samplingParams` (for example `temperature`, `top_p`, `max_tokens`). Leave unset to rely on provider defaults. | `undefined` |
|
|
142
|
+
| `model.chatCompression.contextPercentageThreshold` | number | Sets the threshold for chat history compression as a percentage of the model's total token limit. This is a value between 0 and 1 that applies to both automatic compression and the manual `/compress` command. For example, a value of `0.6` will trigger compression when the chat history exceeds 60% of the token limit. Use `0` to disable compression entirely. | `0.7` |
|
|
143
|
+
| `model.skipNextSpeakerCheck` | boolean | Skip the next speaker check. | `false` |
|
|
144
|
+
| `model.skipLoopDetection` | boolean | Disables loop detection checks. Loop detection prevents infinite loops in AI responses but can generate false positives that interrupt legitimate workflows. Enable this option if you experience frequent false positive loop detection interruptions. | `false` |
|
|
145
|
+
| `model.skipStartupContext` | boolean | Skips sending the startup workspace context (environment summary and acknowledgement) at the beginning of each session. Enable this if you prefer to provide context manually or want to save tokens on startup. | `false` |
|
|
146
|
+
| `model.enableOpenAILogging` | boolean | Enables logging of OpenAI API calls for debugging and analysis. When enabled, API requests and responses are logged to JSON files. | `false` |
|
|
147
|
+
| `model.openAILoggingDir` | string | Custom directory path for OpenAI API logs. If not specified, defaults to `logs/openai` in the current working directory. Supports absolute paths, relative paths (resolved from current working directory), and `~` expansion (home directory). | `undefined` |
|
|
147
148
|
|
|
148
149
|
**Example model.generationConfig:**
|
|
149
150
|
|
|
@@ -223,7 +224,6 @@ The `extra_body` field allows you to add custom parameters to the request body s
|
|
|
223
224
|
| `context.fileFiltering.respectQwenIgnore` | boolean | Respect .qwenignore files when searching. | `true` |
|
|
224
225
|
| `context.fileFiltering.enableRecursiveFileSearch` | boolean | Whether to enable searching recursively for filenames under the current tree when completing `@` prefixes in the prompt. | `true` |
|
|
225
226
|
| `context.fileFiltering.enableFuzzySearch` | boolean | When `true`, enables fuzzy search capabilities when searching for files. Set to `false` to improve performance on projects with a large number of files. | `true` |
|
|
226
|
-
| `context.clearContextOnIdle.thinkingThresholdMinutes` | number | Minutes of inactivity before clearing old thinking blocks to free context tokens. Aligns with typical provider prompt-cache TTL. Use `-1` to disable. | `5` |
|
|
227
227
|
| `context.clearContextOnIdle.toolResultsThresholdMinutes` | number | Minutes of inactivity before clearing old tool result content. Use `-1` to disable. | `60` |
|
|
228
228
|
| `context.clearContextOnIdle.toolResultsNumToKeep` | number | Number of most-recent compactable tool results to preserve when clearing. Floor at 1. | `5` |
|
|
229
229
|
|
|
@@ -430,11 +430,6 @@ LSP server configuration is done through `.lsp.json` files in your project root
|
|
|
430
430
|
| `advanced.dnsResolutionOrder` | string | The DNS resolution order. | `undefined` |
|
|
431
431
|
| `advanced.excludedEnvVars` | array of strings | Environment variables to exclude from project context. Specifies environment variables that should be excluded from being loaded from project `.env` files. This prevents project-specific environment variables (like `DEBUG=true`) from interfering with the CLI behavior. Variables from `.qwen/.env` files are never excluded. | `["DEBUG","DEBUG_MODE"]` |
|
|
432
432
|
| `advanced.bugCommand` | object | Configuration for the bug report command. Overrides the default URL for the `/bug` command. Properties: `urlTemplate` (string): A URL that can contain `{title}` and `{info}` placeholders. Example: `"bugCommand": { "urlTemplate": "https://bug.example.com/new?title={title}&info={info}" }` | `undefined` |
|
|
433
|
-
| `advanced.tavilyApiKey` | string | API key for Tavily web search service. Used to enable the `web_search` tool functionality. | `undefined` |
|
|
434
|
-
|
|
435
|
-
> [!note]
|
|
436
|
-
>
|
|
437
|
-
> **Note about advanced.tavilyApiKey:** This is a legacy configuration format. For Qwen OAuth users, DashScope provider is automatically available without any configuration. For other authentication types, configure Tavily or Google providers using the new `webSearch` configuration format.
|
|
438
433
|
|
|
439
434
|
#### mcpServers
|
|
440
435
|
|
|
@@ -571,7 +566,6 @@ For authentication-related variables (like `OPENAI_*`) and the recommended `.qwe
|
|
|
571
566
|
| `CLI_TITLE` | Set to a string to customize the title of the CLI. | |
|
|
572
567
|
| `CODE_ASSIST_ENDPOINT` | Specifies the endpoint for the code assist server. | This is useful for development and testing. |
|
|
573
568
|
| `QWEN_CODE_MAX_OUTPUT_TOKENS` | Overrides the default maximum output tokens per response. When not set, Qwen Code uses an adaptive strategy: starts with 8K tokens and automatically retries with 64K if the response is truncated. Set this to a specific value (e.g., `16000`) to use a fixed limit instead. | Takes precedence over the capped default (8K) but is overridden by `samplingParams.max_tokens` in settings. Disables automatic escalation when set. Example: `export QWEN_CODE_MAX_OUTPUT_TOKENS=16000` |
|
|
574
|
-
| `TAVILY_API_KEY` | Your API key for the Tavily web search service. | Used to enable the `web_search` tool functionality. Example: `export TAVILY_API_KEY="tvly-your-api-key-here"` |
|
|
575
569
|
| `QWEN_CODE_UNATTENDED_RETRY` | Set to `true` or `1` to enable persistent retry mode. When enabled, transient API capacity errors (HTTP 429 Rate Limit and 529 Overloaded) are retried indefinitely with exponential backoff (capped at 5 minutes per retry) and heartbeat keepalives every 30 seconds on stderr. | Designed for CI/CD pipelines and background automation where long-running tasks should survive temporary API outages. Must be set explicitly — `CI=true` alone does **not** activate this mode. See [Headless Mode](../features/headless#persistent-retry-mode) for details. Example: `export QWEN_CODE_UNATTENDED_RETRY=1` |
|
|
576
570
|
| `QWEN_CODE_PROFILE_STARTUP` | Set to `1` to enable startup performance profiling. Writes a JSON timing report to `~/.qwen/startup-perf/` with per-phase durations. | Only active inside the sandbox child process. Zero overhead when not set. Example: `export QWEN_CODE_PROFILE_STARTUP=1` |
|
|
577
571
|
|
|
@@ -620,7 +614,6 @@ For sandbox image selection, precedence is:
|
|
|
620
614
|
| `--version` | | Displays the version of the CLI. | | |
|
|
621
615
|
| `--openai-logging` | | Enables logging of OpenAI API calls for debugging and analysis. | | This flag overrides the `enableOpenAILogging` setting in `settings.json`. |
|
|
622
616
|
| `--openai-logging-dir` | | Sets a custom directory path for OpenAI API logs. | Directory path | This flag overrides the `openAILoggingDir` setting in `settings.json`. Supports absolute paths, relative paths, and `~` expansion. Example: `qwen --openai-logging-dir "~/qwen-logs" --openai-logging` |
|
|
623
|
-
| `--tavily-api-key` | | Sets the Tavily API key for web search functionality for this session. | API key | Example: `qwen --tavily-api-key tvly-your-api-key-here` |
|
|
624
617
|
|
|
625
618
|
## Context Files (Hierarchical Instructional Context)
|
|
626
619
|
|
|
@@ -240,9 +240,10 @@ In addition to the in-session `/auth` slash command, Qwen Code provides standalo
|
|
|
240
240
|
| Command | Description |
|
|
241
241
|
| ---------------------------------------------------- | ------------------------------------------------------------- |
|
|
242
242
|
| `qwen auth` | Interactive authentication setup |
|
|
243
|
-
| `qwen auth qwen-oauth` | ~~Authenticate with Qwen OAuth~~ (discontinued on 2026-04-15) |
|
|
244
243
|
| `qwen auth coding-plan` | Authenticate with Alibaba Cloud Coding Plan |
|
|
245
244
|
| `qwen auth coding-plan --region china --key sk-sp-…` | Non-interactive Coding Plan setup (for scripting) |
|
|
245
|
+
| `qwen auth api-key` | Authenticate with an API key |
|
|
246
|
+
| `qwen auth qwen-oauth` | ~~Authenticate with Qwen OAuth~~ (discontinued on 2026-04-15) |
|
|
246
247
|
| `qwen auth status` | Show current authentication status |
|
|
247
248
|
|
|
248
249
|
> [!tip]
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
# Tool-Use Summaries
|
|
2
|
+
|
|
3
|
+
Qwen Code can generate a short, git-commit-subject-style label after each tool batch completes, summarizing what the batch accomplished. The label appears inline in the transcript and replaces the generic `Tool × N` header in compact mode.
|
|
4
|
+
|
|
5
|
+
This is a UX aid for parallel tool calls: when the model fans out into several `Read` + `Grep` + `Bash` calls at once, the summary tells you the intent at a glance instead of forcing you to scan the tool list.
|
|
6
|
+
|
|
7
|
+
The feature is enabled by default and runs silently in the background. It requires a configured [fast model](./followup-suggestions#fast-model).
|
|
8
|
+
|
|
9
|
+
## What You See
|
|
10
|
+
|
|
11
|
+
### Full mode (default)
|
|
12
|
+
|
|
13
|
+
The summary appears as a dim badge line directly below the tool group:
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
╭──────────────────────────────────────────────╮
|
|
17
|
+
│ ✓ ReadFile a.txt │
|
|
18
|
+
│ ✓ ReadFile b.txt │
|
|
19
|
+
│ ✓ ReadFile c.txt │
|
|
20
|
+
│ ✓ ReadFile d.txt │
|
|
21
|
+
╰──────────────────────────────────────────────╯
|
|
22
|
+
|
|
23
|
+
● Read 4 text files
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### Compact mode (`Ctrl+O` or `ui.compactMode: true`)
|
|
27
|
+
|
|
28
|
+
The label replaces the generic `Tool × N` header in the compact one-liner:
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
╭──────────────────────────────────────────────╮
|
|
32
|
+
│✓ Read txt files · 4 tools │
|
|
33
|
+
│Press Ctrl+O to show full tool output │
|
|
34
|
+
╰──────────────────────────────────────────────╯
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
The individual tool calls are still a keystroke away (`Ctrl+O` to toggle to full mode).
|
|
38
|
+
|
|
39
|
+
## How It Works
|
|
40
|
+
|
|
41
|
+
After a tool batch finalizes, Qwen Code fires a fire-and-forget call to the configured fast model with:
|
|
42
|
+
|
|
43
|
+
- The tool names, truncated arguments, and truncated results (each capped at 300 characters).
|
|
44
|
+
- The assistant's most recent text output (first 200 characters) as an intent prefix.
|
|
45
|
+
- A system prompt instructing the model to return a past-tense, 30-character label in git-commit-subject style.
|
|
46
|
+
|
|
47
|
+
The call runs in parallel with the next turn's API streaming, so its ~1s latency is hidden behind the main model's response. When the label resolves, it is appended to the transcript as a `tool_use_summary` entry.
|
|
48
|
+
|
|
49
|
+
Example labels: `Searched in auth/`, `Fixed NPE in UserService`, `Created signup endpoint`, `Read config.json`, `Ran failing tests`.
|
|
50
|
+
|
|
51
|
+
## When It Appears
|
|
52
|
+
|
|
53
|
+
The summary is generated when **all** of the following are true:
|
|
54
|
+
|
|
55
|
+
- `experimental.emitToolUseSummaries` is `true` (default).
|
|
56
|
+
- A `fastModel` is configured (via settings or `/model --fast`).
|
|
57
|
+
- At least one tool completed in the batch.
|
|
58
|
+
- The turn was not aborted before tool completion.
|
|
59
|
+
- The fast model returned a non-empty, non-error response.
|
|
60
|
+
|
|
61
|
+
Subagent tool calls do not trigger summary generation — only the main session's tool batches do.
|
|
62
|
+
|
|
63
|
+
## When It Doesn't Appear
|
|
64
|
+
|
|
65
|
+
The summary is silently skipped (no error, no UI change) when:
|
|
66
|
+
|
|
67
|
+
- No fast model is configured.
|
|
68
|
+
- The fast model call fails, times out, or returns empty.
|
|
69
|
+
- The model returned an obvious error-message-like string (e.g., `Error: ...`, `I cannot ...`) — filtered out by the client so the UI does not show misleading labels.
|
|
70
|
+
- The turn was aborted (`Ctrl+C`) before the model finished.
|
|
71
|
+
|
|
72
|
+
In all these cases, the tool group renders as it always has.
|
|
73
|
+
|
|
74
|
+
## Fast Model
|
|
75
|
+
|
|
76
|
+
The label is generated using the [fast model](./followup-suggestions#fast-model) — the same model you configure for prompt suggestions and speculative execution. Configure it via:
|
|
77
|
+
|
|
78
|
+
### Via command
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
/model --fast qwen3-coder-flash
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Via `settings.json`
|
|
85
|
+
|
|
86
|
+
```json
|
|
87
|
+
{
|
|
88
|
+
"fastModel": "qwen3-coder-flash"
|
|
89
|
+
}
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
When no fast model is configured, summary generation is skipped entirely — the feature has no effect until you set one up.
|
|
93
|
+
|
|
94
|
+
## Configuration
|
|
95
|
+
|
|
96
|
+
These settings can be configured in `settings.json`:
|
|
97
|
+
|
|
98
|
+
| Setting | Type | Default | Description |
|
|
99
|
+
| ----------------------------------- | ------- | ------- | -------------------------------------------------------------------------------------------------- |
|
|
100
|
+
| `experimental.emitToolUseSummaries` | boolean | `true` | Master switch for summary generation. Turn off to disable the extra fast-model call. |
|
|
101
|
+
| `fastModel` | string | `""` | Fast model used for summary generation (shared with prompt suggestions). Required; no-op if empty. |
|
|
102
|
+
|
|
103
|
+
### Environment override
|
|
104
|
+
|
|
105
|
+
`QWEN_CODE_EMIT_TOOL_USE_SUMMARIES` overrides the `experimental.emitToolUseSummaries` setting for the current session:
|
|
106
|
+
|
|
107
|
+
- `QWEN_CODE_EMIT_TOOL_USE_SUMMARIES=0` or `=false` — force off.
|
|
108
|
+
- `QWEN_CODE_EMIT_TOOL_USE_SUMMARIES=1` or `=true` — force on.
|
|
109
|
+
- Unset — use the `experimental.emitToolUseSummaries` setting.
|
|
110
|
+
|
|
111
|
+
### Example
|
|
112
|
+
|
|
113
|
+
```json
|
|
114
|
+
{
|
|
115
|
+
"fastModel": "qwen3-coder-flash",
|
|
116
|
+
"experimental": {
|
|
117
|
+
"emitToolUseSummaries": true
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## Scope & lifecycle
|
|
123
|
+
|
|
124
|
+
Three points that tend to trip up a first read of this feature:
|
|
125
|
+
|
|
126
|
+
1. **One generation per batch, shared by both display modes.** The fast-model call happens exactly once in `handleCompletedTools` when a tool batch finalizes. Toggling `Ctrl+O` afterwards does **not** trigger a new call — both modes read from the same `tool_use_summary` history entry that was captured the first time. You can flip compact mode on and off freely without extra cost.
|
|
127
|
+
2. **No backfill on toggle or on session resume.** A `tool_group` that completed before the feature was enabled (or before you flipped the setting on, or in a resumed session — `ChatRecordingService` does not persist summary entries) will never get a label. There is no "sweep existing history" pass. If you turn this setting on mid-session, only _future_ batches will show a label; older groups keep the default rendering with no indicator that a label is missing.
|
|
128
|
+
3. **Main-agent batches only.** The trigger lives in the main session's turn loop (`useGeminiStream`), so:
|
|
129
|
+
- ✅ Shell, MCP, file operations, and the `Task` / subagent tool _call itself_ (as it appears in the main batch) are summarized.
|
|
130
|
+
- ❌ A subagent's **internal** tool batches (run through `packages/core/src/agents/runtime/`) are not summarized.
|
|
131
|
+
|
|
132
|
+
An outer batch that _contains_ a `Task` tool will still be labeled, but the fast model sees only the subagent tool call and its aggregated output — not the individual tool calls inside the subagent. Expect labels like `Ran research-agent` or `Delegated file search` rather than `Searched 14 files`. This is intentional — summarizing subagent internals would multiply the fast-model cost and surface noise that never shows up in the primary UI.
|
|
133
|
+
|
|
134
|
+
## Recommended pairing: enable compact mode
|
|
135
|
+
|
|
136
|
+
For batches of 3+ parallel tool calls, pairing this feature with `ui.compactMode: true` produces the cleanest transcript. The compact view folds the whole batch into a single labeled row (`✓ Read txt files · 4 tools`) instead of showing every tool line plus the trailing summary. Details remain one keystroke away via `Ctrl+O`.
|
|
137
|
+
|
|
138
|
+
```json
|
|
139
|
+
{
|
|
140
|
+
"fastModel": "qwen3-coder-flash",
|
|
141
|
+
"ui": {
|
|
142
|
+
"compactMode": true
|
|
143
|
+
},
|
|
144
|
+
"experimental": {
|
|
145
|
+
"emitToolUseSummaries": true
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
In full mode (the default), the summary renders as a trailing `● <label>` line below the tool group — useful for large or heterogeneous batches, but for small same-type batches (e.g. `Read × 3`) the label can read as a restatement of the visible tool lines. If that matches your usual workflow, either turn compact mode on as above, or turn the summary off entirely via `experimental.emitToolUseSummaries: false`.
|
|
151
|
+
|
|
152
|
+
## Monitoring
|
|
153
|
+
|
|
154
|
+
Summary model usage appears in `/stats` output under the fast-model token totals, with the `prompt_id` `tool_use_summary_generation` so it can be distinguished from prompt suggestions and other background tasks.
|
|
155
|
+
|
|
156
|
+
## Data flow & privacy
|
|
157
|
+
|
|
158
|
+
The summary call sends each successful tool's name, truncated `args`, and truncated result (each field capped at 300 characters) to the **fast model**, plus the first 200 characters of the assistant's most recent text as an intent prefix.
|
|
159
|
+
|
|
160
|
+
If your fast model is configured for the same provider/auth as your main session model, the data flows along the same boundary your main session already uses — no change in trust scope. If you have configured a fast model from a **different provider**, tool inputs and outputs (potentially including file contents read by `read_file`, command output from shell calls, or values surfaced through MCP tools) will be sent to that other provider as part of the summarization prompt. That is a strictly larger data-sharing scope than the main session alone.
|
|
161
|
+
|
|
162
|
+
If this matters for your workflow, you have two clean options:
|
|
163
|
+
|
|
164
|
+
- Configure `fastModel` to a model under the same provider as your main session, so the summary call doesn't cross any new auth/data boundary.
|
|
165
|
+
- Disable the feature entirely with `experimental.emitToolUseSummaries: false` (or `QWEN_CODE_EMIT_TOOL_USE_SUMMARIES=0`).
|
|
166
|
+
|
|
167
|
+
The 300-character per-field cap limits exposure but does not eliminate it — secrets discovered in tool output during the cap window can still be sent. Treat the fast model's data boundary the same way you treat the main model's.
|
|
168
|
+
|
|
169
|
+
## Cost
|
|
170
|
+
|
|
171
|
+
One fast-model call per qualifying tool batch. Input is a small fixed system prompt plus the truncated tool inputs/outputs (each capped at 300 characters per field). Output is a single short line (capped at 100 characters, typically 20 tokens or fewer). On a typical fast model this is roughly $0.001 per batch.
|
|
172
|
+
|
|
173
|
+
If you do not want the extra cost, turn the feature off via `experimental.emitToolUseSummaries: false` or `QWEN_CODE_EMIT_TOOL_USE_SUMMARIES=0`.
|
|
174
|
+
|
|
175
|
+
## Related
|
|
176
|
+
|
|
177
|
+
- [Compact Mode](../configuration/settings#ui.compactMode) — toggle with `Ctrl+O`; the summary replaces the generic tool-group header when compact mode is on.
|
|
178
|
+
- [Followup Suggestions](./followup-suggestions) — another fast-model-driven UX enhancement that shares the same `fastModel` setting.
|
|
@@ -223,6 +223,7 @@ Here are the most important commands for daily use:
|
|
|
223
223
|
| `qwen` | start Qwen Code | `qwen` |
|
|
224
224
|
| `/auth` | Change authentication method (in session) | `/auth` |
|
|
225
225
|
| `qwen auth` | Configure authentication from the terminal | `qwen auth` |
|
|
226
|
+
| `qwen auth api-key` | Configure API key authentication | `qwen auth api-key` |
|
|
226
227
|
| `qwen auth status` | Check current authentication status | `qwen auth status` |
|
|
227
228
|
| `/help` | Display help information for available commands | `/help` or `/?` |
|
|
228
229
|
| `/compress` | Replace chat history with summary to save Tokens | `/compress` |
|
package/bundled/review/SKILL.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: review
|
|
3
3
|
description: Review changed code for correctness, security, code quality, and performance. Use when the user asks to review code changes, a PR, or specific files. Invoke with `/review`, `/review <pr-number>`, `/review <file-path>`, or `/review <pr-number> --comment` to post inline comments on the PR.
|
|
4
|
+
argument-hint: '[pr-number|file-path] [--comment]'
|
|
4
5
|
allowedTools:
|
|
5
6
|
- task
|
|
6
7
|
- run_shell_command
|
|
@@ -17,7 +18,7 @@ You are an expert code reviewer. Your job is to review code changes and provide
|
|
|
17
18
|
|
|
18
19
|
**Critical rules (most commonly violated — read these first):**
|
|
19
20
|
|
|
20
|
-
1. **Match the language of the PR.** If the PR is in English, ALL your output (terminal + PR comments) MUST be in English. If in Chinese, use Chinese. Do NOT switch languages.
|
|
21
|
+
1. **Match the language of the PR.** If the PR is in English, ALL your output (terminal + PR comments) MUST be in English. If in Chinese, use Chinese. Do NOT switch languages. For **local reviews** (no PR), if the system prompt includes an output language preference, use that language; otherwise follow the user's input language.
|
|
21
22
|
2. **Step 9: use Create Review API** with `comments` array for inline comments. Do NOT use `gh api .../pulls/.../comments` to post individual comments. See Step 9 for the JSON format.
|
|
22
23
|
|
|
23
24
|
**Design philosophy: Silence is better than noise.** Every comment you make should be worth the reader's time. If you're unsure whether something is a problem, DO NOT MENTION IT. Low-quality feedback causes "cry wolf" fatigue — developers stop reading all AI comments and miss real issues.
|
|
@@ -528,4 +529,4 @@ These criteria apply to both Step 4 (review agents) and Step 5 (verification age
|
|
|
528
529
|
- Flag any exposed secrets, credentials, API keys, or tokens in the diff as **Critical**.
|
|
529
530
|
- Silence is better than noise. If you have nothing important to say, say nothing.
|
|
530
531
|
- **Do NOT use `#N` notation** (e.g., `#1`, `#2`) in PR comments or summaries — GitHub auto-links these to issues/PRs. Use `(1)`, `[1]`, or descriptive references instead.
|
|
531
|
-
- **Match the language of the PR.** Write review comments, findings, and summaries in the same language as the PR title/description/code comments. If the PR is in English, write in English. If in Chinese, write in Chinese. Do NOT switch languages.
|
|
532
|
+
- **Match the language of the PR.** Write review comments, findings, and summaries in the same language as the PR title/description/code comments. If the PR is in English, write in English. If in Chinese, write in Chinese. Do NOT switch languages. For **local reviews** (no PR), respect the user's output language preference if set; otherwise follow the user's input language.
|