@qwen-code/qwen-code 0.17.0-preview.0 → 0.17.1-nightly.20260604.16dd99fa3
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/bundled/qc-helper/docs/features/approval-mode.md +26 -22
- package/bundled/qc-helper/docs/features/commands.md +12 -10
- package/bundled/qc-helper/docs/features/status-line.md +161 -27
- package/chunks/{agent-Z7O3I6MY.js → agent-GNHB6UIW.js} +10 -10
- package/chunks/{anthropicContentGenerator-UCGOKLGC.js → anthropicContentGenerator-M45RXZVS.js} +3 -3
- package/chunks/{askUserQuestion-DC6OWQIL.js → askUserQuestion-TGRD7FNQ.js} +1 -1
- package/chunks/{ca-NMZFEGAU.js → ca-6RSCDYUS.js} +2 -1
- package/chunks/{chunk-J5VCSWPA.js → chunk-3PJXIDKI.js} +1153 -103
- package/chunks/{chunk-FEENTAB2.js → chunk-6O244QKR.js} +1 -1
- package/chunks/chunk-7TQVELRB.js +10412 -0
- package/chunks/{chunk-HCSJIOLR.js → chunk-BNESGOSJ.js} +7450 -3516
- package/chunks/{chunk-V7LMZR76.js → chunk-JBSYXHJF.js} +1 -1
- package/chunks/{chunk-R2B65CAN.js → chunk-JKUAX6UT.js} +0 -1
- package/chunks/{chunk-7JHNICSJ.js → chunk-JR346RJ5.js} +643 -136
- package/chunks/{chunk-4Q4IDQE5.js → chunk-K3VUDSWM.js} +4 -4
- package/chunks/{chunk-MJCO2CPA.js → chunk-NDZEP7SA.js} +45 -6
- package/chunks/{chunk-BF5WTWOH.js → chunk-NJY4F5NM.js} +3 -3
- package/chunks/{chunk-U2K6HDUJ.js → chunk-QVJ33ZBG.js} +23 -13
- package/chunks/{chunk-HAQCNXSG.js → chunk-RQW7WUJR.js} +15 -0
- package/chunks/{chunk-UQRYJQBE.js → chunk-SOGUPKP6.js} +1 -1
- package/chunks/{chunk-ZWH2TVVN.js → chunk-XK4IGU5E.js} +10 -10
- package/chunks/{chunk-OXXOAIGT.js → chunk-YVGIQ2CS.js} +333 -1162
- package/chunks/{computer-use-2J5ZXEER.js → computer-use-NAHQPV2L.js} +24 -6
- package/chunks/{contextCommand-FU55EUOH.js → contextCommand-VKNIA257.js} +12 -12
- package/chunks/{cron-create-FXRORK2U.js → cron-create-V3UK2SJN.js} +1 -1
- package/chunks/{cron-delete-D24IN6CA.js → cron-delete-MANALPCP.js} +1 -1
- package/chunks/{cron-list-SMOX26SL.js → cron-list-UDIYK3B3.js} +1 -1
- package/chunks/{de-OIMT3OMI.js → de-APURNJ3I.js} +2 -1
- package/chunks/{dist-GRQVFL3G.js → dist-ATAKC63R.js} +1 -1
- package/chunks/{edit-UQFK25NR.js → edit-YP22XCVA.js} +10 -10
- package/chunks/{en-2IFZ5THF.js → en-FYO57HJW.js} +3 -1
- package/chunks/{enter-worktree-VZT6JX45.js → enter-worktree-BD7UFMUZ.js} +10 -10
- package/chunks/{exit-worktree-JETQQ26R.js → exit-worktree-AVWBCQWY.js} +10 -10
- package/chunks/{exitPlanMode-SFNBASAU.js → exitPlanMode-2D6EGF76.js} +10 -10
- package/chunks/{fr-PVELSHTV.js → fr-32YHQZIS.js} +2 -1
- package/chunks/{geminiContentGenerator-XWUW7B7J.js → geminiContentGenerator-YFVW6DXY.js} +2 -2
- package/chunks/{glob-34CPYA2M.js → glob-NZWP66L5.js} +10 -10
- package/chunks/{grep-4RXPZUYZ.js → grep-RFEZDGI4.js} +10 -10
- package/chunks/{ja-P5TK5GNN.js → ja-PEUXN4XT.js} +2 -1
- package/chunks/{ls-7FYQHPWF.js → ls-T4SVZWR6.js} +1 -1
- package/chunks/{lsp-DKG34USR.js → lsp-U4ZQLNIS.js} +1 -1
- package/chunks/{monitor-QCNAUO75.js → monitor-OHKCQLFQ.js} +10 -10
- package/chunks/{multipart-parser-IXGBIOIN.js → multipart-parser-AJ4WASWR.js} +2 -2
- package/chunks/{notebook-edit-I2MBTWI6.js → notebook-edit-AFRICVUX.js} +10 -10
- package/chunks/{openaiContentGenerator-VNQUJIG5.js → openaiContentGenerator-47KB64GP.js} +8 -8
- package/chunks/{pt-A5GHG66T.js → pt-2INS7YVC.js} +2 -1
- package/chunks/{qwenContentGenerator-LICFK2K7.js → qwenContentGenerator-7BC2OW3T.js} +12 -12
- package/chunks/{read-file-N2YTOQ2U.js → read-file-MXUW3RUF.js} +5 -5
- package/chunks/{ripGrep-NBWBOVPW.js → ripGrep-AHBINNF3.js} +10 -10
- package/chunks/{ru-66XKB4QX.js → ru-6CQ5HNHB.js} +2 -1
- package/chunks/{scheduler-XHHMN7TA.js → scheduler-KBRJ3LFC.js} +10 -10
- package/chunks/{send-message-ZL7CDM7K.js → send-message-GFYV7WLL.js} +1 -1
- package/chunks/{serve-HESJL2FH.js → serve-PVFP6HD7.js} +12 -12
- package/chunks/{shell-V7PVS7O7.js → shell-JOXQ5PPL.js} +10 -10
- package/chunks/{skill-6LP5ANRL.js → skill-73RYGDJQ.js} +6 -6
- package/chunks/{src-TMOD5X6F.js → src-7XL4G4DC.js} +88 -46
- package/chunks/{src-4TLZBCTV.js → src-DR3Y7J6D.js} +14 -12
- package/chunks/{syntheticOutput-U3YJ3GOO.js → syntheticOutput-DM43O6TY.js} +2 -2
- package/chunks/{task-stop-NPUI3YBA.js → task-stop-WKP5OB3V.js} +1 -1
- package/chunks/{todoWrite-USWGQJ53.js → todoWrite-GHL6DCLP.js} +8 -2
- package/chunks/{tool-search-6CRPUSUB.js → tool-search-DRMR34WX.js} +5 -5
- package/chunks/{web-fetch-LGLGFGGT.js → web-fetch-SZIV74ZX.js} +2 -2
- package/chunks/{write-file-CCMVL5Q7.js → write-file-B45ZAKUJ.js} +12 -12
- package/chunks/{zh-TW-3ND6DQRX.js → zh-TW-SSL3ATVZ.js} +3 -1
- package/chunks/{zh-OB5P2ZDO.js → zh-ZHZCMIRG.js} +3 -1
- package/cli.js +32976 -50717
- package/locales/ca.js +2 -1
- package/locales/de.js +2 -1
- package/locales/en.js +4 -1
- package/locales/fr.js +2 -1
- package/locales/ja.js +2 -1
- package/locales/pt.js +2 -1
- package/locales/ru.js +2 -1
- package/locales/zh-TW.js +4 -1
- package/locales/zh.js +4 -1
- package/package.json +2 -2
- package/chunks/chunk-EM6ETG2K.js +0 -60
- package/chunks/chunk-TI4GXJKO.js +0 -4277
- package/chunks/multipart-parser-3QWGTLK3.js +0 -384
- package/chunks/src-IPWIHNMI.js +0 -1406
|
@@ -4,18 +4,22 @@ Qwen Code offers five distinct permission modes that allow you to flexibly contr
|
|
|
4
4
|
|
|
5
5
|
## Permission Modes Comparison
|
|
6
6
|
|
|
7
|
-
| Mode
|
|
8
|
-
|
|
|
9
|
-
| **Plan**
|
|
10
|
-
| **
|
|
11
|
-
| **Auto-Edit**
|
|
12
|
-
| **Auto**
|
|
13
|
-
| **YOLO**
|
|
7
|
+
| Mode | File Editing | Shell Commands | Best For | Risk Level |
|
|
8
|
+
| -------------------- | --------------------------- | --------------------------- | ------------------------------------------------------------------------------------------------------ | ---------- |
|
|
9
|
+
| **Plan** | ❌ Read-only analysis only | ❌ Not executed | • Code exploration <br>• Planning complex changes <br>• Safe code review | Lowest |
|
|
10
|
+
| **Ask Permissions** | ✅ Manual approval required | ✅ Manual approval required | • New/unfamiliar codebases <br>• Critical systems <br>• Team collaboration <br>• Learning and teaching | Low |
|
|
11
|
+
| **Auto-Edit** | ✅ Auto-approved | ❌ Manual approval required | • Daily development tasks <br>• Refactoring and code improvements <br>• Safe automation | Medium |
|
|
12
|
+
| **Auto** | ✅ Classifier-evaluated | ✅ Classifier-evaluated | • Long autonomous sessions <br>• When Auto-Edit is too cautious but YOLO is too risky | Medium |
|
|
13
|
+
| **YOLO** | ✅ Auto-approved | ✅ Auto-approved | • Trusted personal projects <br>• Automated scripts/CI/CD <br>• Batch processing tasks | Highest |
|
|
14
|
+
|
|
15
|
+
> [!NOTE]
|
|
16
|
+
>
|
|
17
|
+
> The mode previously named **Default** has been renamed to **Ask Permissions** to better describe its behavior. The underlying configuration value (`tools.approvalMode: "default"`) and the `/approval-mode default` command are unchanged for backward compatibility.
|
|
14
18
|
|
|
15
19
|
### Quick Reference Guide
|
|
16
20
|
|
|
17
21
|
- **Start in Plan Mode**: Great for understanding before making changes
|
|
18
|
-
- **Work in
|
|
22
|
+
- **Work in Ask Permissions Mode**: The balanced choice for most development work
|
|
19
23
|
- **Switch to Auto-Edit**: When you're making lots of safe code changes
|
|
20
24
|
- **Try Auto Mode**: When you want fewer interruptions but still want safety on shell commands and network calls — an LLM classifier evaluates each call
|
|
21
25
|
- **Use YOLO sparingly**: Only for trusted automation in controlled environments
|
|
@@ -96,11 +100,11 @@ How should we handle database migration?
|
|
|
96
100
|
}
|
|
97
101
|
```
|
|
98
102
|
|
|
99
|
-
## 2. Use
|
|
103
|
+
## 2. Use Ask Permissions Mode for Controlled Interaction
|
|
100
104
|
|
|
101
|
-
|
|
105
|
+
Ask Permissions Mode is the standard way to work with Qwen Code. In this mode, you maintain full control over all potentially risky operations - Qwen Code will ask for your approval before making any file changes or executing shell commands.
|
|
102
106
|
|
|
103
|
-
### When to use
|
|
107
|
+
### When to use Ask Permissions Mode
|
|
104
108
|
|
|
105
109
|
- **New to a codebase**: When you're exploring an unfamiliar project and want to be extra cautious
|
|
106
110
|
- **Critical systems**: When working on production code, infrastructure, or sensitive data
|
|
@@ -108,23 +112,23 @@ Default Mode is the standard way to work with Qwen Code. In this mode, you maint
|
|
|
108
112
|
- **Team collaboration**: When multiple people are working on the same codebase
|
|
109
113
|
- **Complex operations**: When the changes involve multiple files or complex logic
|
|
110
114
|
|
|
111
|
-
### How to use
|
|
115
|
+
### How to use Ask Permissions Mode
|
|
112
116
|
|
|
113
|
-
**Turn on
|
|
117
|
+
**Turn on Ask Permissions Mode during a session**
|
|
114
118
|
|
|
115
|
-
You can switch into
|
|
119
|
+
You can switch into Ask Permissions Mode during a session using **Shift+Tab** (or **Tab** on Windows) to cycle through permission modes. If you're in any other mode, pressing **Shift+Tab** (or **Tab** on Windows) will eventually cycle back to Ask Permissions Mode, indicated by the absence of any mode indicator at the bottom of the terminal.
|
|
116
120
|
|
|
117
|
-
**Start a new session in
|
|
121
|
+
**Start a new session in Ask Permissions Mode**
|
|
118
122
|
|
|
119
|
-
|
|
123
|
+
Ask Permissions Mode is the initial mode when you start Qwen Code. If you've changed modes and want to return to Ask Permissions Mode, use:
|
|
120
124
|
|
|
121
125
|
```
|
|
122
126
|
/approval-mode default
|
|
123
127
|
```
|
|
124
128
|
|
|
125
|
-
**Run "headless" queries in
|
|
129
|
+
**Run "headless" queries in Ask Permissions Mode**
|
|
126
130
|
|
|
127
|
-
When running headless commands,
|
|
131
|
+
When running headless commands, Ask Permissions Mode is the default behavior. You can explicitly specify it with:
|
|
128
132
|
|
|
129
133
|
```
|
|
130
134
|
qwen --prompt "Analyze this code for potential bugs"
|
|
@@ -148,7 +152,7 @@ Qwen Code will analyze your codebase and propose a plan. It will then ask for ap
|
|
|
148
152
|
|
|
149
153
|
You can review each proposed change and approve or reject it individually.
|
|
150
154
|
|
|
151
|
-
### Configure
|
|
155
|
+
### Configure Ask Permissions Mode as default
|
|
152
156
|
|
|
153
157
|
```bash
|
|
154
158
|
// .qwen/settings.json
|
|
@@ -200,7 +204,7 @@ configuration, troubleshooting, FAQ).
|
|
|
200
204
|
|
|
201
205
|
### When to use Auto Mode
|
|
202
206
|
|
|
203
|
-
- **Long autonomous sessions**: When
|
|
207
|
+
- **Long autonomous sessions**: When Ask Permissions Mode interrupts too often but
|
|
204
208
|
YOLO is too risky.
|
|
205
209
|
- **Trusted projects**: Internal codebases where the agent should keep
|
|
206
210
|
moving but you still want a guardrail on destructive shell commands and
|
|
@@ -277,7 +281,7 @@ Refactor the auth module to use OAuth2. Run the full test suite afterwards.
|
|
|
277
281
|
Qwen Code makes the file edits (in-workspace edits skip the classifier),
|
|
278
282
|
runs `npm test` (classifier judges safe), and surfaces a block if it ever
|
|
279
283
|
tries something risky like `rm -rf /Users/me/.aws`. You can review the
|
|
280
|
-
reason inline and decide whether to switch to
|
|
284
|
+
reason inline and decide whether to switch to Ask Permissions Mode for that step.
|
|
281
285
|
|
|
282
286
|
### Configure Auto Mode as default
|
|
283
287
|
|
|
@@ -363,7 +367,7 @@ qwen --prompt "Run the test suite, fix all failing tests, then commit changes"
|
|
|
363
367
|
During a Qwen Code session, use **Shift+Tab** (or **Tab** on Windows) to quickly cycle through the four modes:
|
|
364
368
|
|
|
365
369
|
```
|
|
366
|
-
|
|
370
|
+
Ask Permissions Mode → Auto-Edit Mode → YOLO Mode → Plan Mode → Ask Permissions Mode
|
|
367
371
|
```
|
|
368
372
|
|
|
369
373
|
### Persistent Configuration
|
|
@@ -31,16 +31,18 @@ These commands help you save, restore, and summarize work progress.
|
|
|
31
31
|
|
|
32
32
|
Commands for adjusting interface appearance and work environment.
|
|
33
33
|
|
|
34
|
-
| Command
|
|
35
|
-
|
|
|
36
|
-
| `/clear`
|
|
37
|
-
| `/context`
|
|
38
|
-
| → `detail`
|
|
39
|
-
| `/diff`
|
|
40
|
-
| `/theme`
|
|
41
|
-
| `/vim`
|
|
42
|
-
| `/directory`
|
|
43
|
-
| `/editor`
|
|
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
|
+
| → `detail` | Show per-item context usage breakdown | `/context detail` |
|
|
39
|
+
| `/diff` | Open an interactive diff viewer showing uncommitted changes and per-turn diffs. Use ←/→ to switch between current git diff and individual conversation turns, ↑/↓ to browse files | `/diff` |
|
|
40
|
+
| `/theme` | Change Qwen Code visual theme | `/theme` |
|
|
41
|
+
| `/vim` | Turn input area Vim editing mode on/off | `/vim` |
|
|
42
|
+
| `/directory` | Manage multi-directory support workspace | `/dir add ./src,./tests` |
|
|
43
|
+
| `/editor` | Open dialog to select supported editor | `/editor` |
|
|
44
|
+
| `/statusline` | Open interactive [status line](./status-line.md) preset dialog | `/statusline` |
|
|
45
|
+
| `/statusline <text>` | Generate a command-mode [status line](./status-line.md) via agent | `/statusline show model and git branch` |
|
|
44
46
|
|
|
45
47
|
### 1.3 Language Settings
|
|
46
48
|
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
# Status Line
|
|
2
2
|
|
|
3
|
-
> Display custom information in the footer
|
|
3
|
+
> Display custom information in the footer.
|
|
4
4
|
|
|
5
|
-
The status line
|
|
5
|
+
The status line shows session-aware information — model name, token usage, git branch, and more — in the footer's left section. There are two configuration modes:
|
|
6
|
+
|
|
7
|
+
- **Preset mode** — pick from built-in data items via an interactive dialog or JSON config. No scripting required.
|
|
8
|
+
- **Command mode** — run a shell command that receives structured JSON context via stdin. Full flexibility for custom formatting.
|
|
6
9
|
|
|
7
10
|
```
|
|
8
11
|
Single-line status (default approval mode — 1 row):
|
|
@@ -26,26 +29,130 @@ Multi-line status + non-default mode (3 rows max):
|
|
|
26
29
|
|
|
27
30
|
When configured, the status line replaces the default "? for shortcuts" hint. High-priority messages (Ctrl+C/D exit prompts, Esc, vim INSERT mode) temporarily override the status line. The status line text is truncated to fit within the available width.
|
|
28
31
|
|
|
29
|
-
## Prerequisites
|
|
30
|
-
|
|
31
|
-
- [`jq`](https://jqlang.github.io/jq/) is recommended for parsing the JSON input (install via `brew install jq`, `apt install jq`, etc.)
|
|
32
|
-
- Simple commands that don't need JSON data (e.g. `git branch --show-current`) work without `jq`
|
|
33
|
-
|
|
34
32
|
## Quick setup
|
|
35
33
|
|
|
36
|
-
The easiest way to configure a status line is the `/statusline` command. It
|
|
34
|
+
The easiest way to configure a status line is the `/statusline` command. It opens an interactive dialog where you can select preset items, toggle theme colors, and see a live preview:
|
|
37
35
|
|
|
38
36
|
```
|
|
39
37
|
/statusline
|
|
40
38
|
```
|
|
41
39
|
|
|
42
|
-
|
|
40
|
+
This opens the preset mode configurator. Use arrow keys to navigate, space to toggle items, and enter to confirm. Your selection is saved to settings automatically.
|
|
41
|
+
|
|
42
|
+
You can also give `/statusline` specific instructions to have it generate a command-mode configuration:
|
|
43
43
|
|
|
44
44
|
```
|
|
45
45
|
/statusline show model name and context usage percentage
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Preset mode
|
|
51
|
+
|
|
52
|
+
Preset mode provides a set of built-in data items that you can pick and combine — no shell commands, no `jq`, no scripting. Items are rendered as `item1 | item2 | item3` in a single line.
|
|
53
|
+
|
|
54
|
+
### Configuration
|
|
55
|
+
|
|
56
|
+
Add a `statusLine` object under the `ui` key in `~/.qwen/settings.json`:
|
|
57
|
+
|
|
58
|
+
```json
|
|
59
|
+
{
|
|
60
|
+
"ui": {
|
|
61
|
+
"statusLine": {
|
|
62
|
+
"type": "preset",
|
|
63
|
+
"items": [
|
|
64
|
+
"model-with-reasoning",
|
|
65
|
+
"git-branch",
|
|
66
|
+
"context-remaining",
|
|
67
|
+
"current-dir",
|
|
68
|
+
"context-used"
|
|
69
|
+
],
|
|
70
|
+
"useThemeColors": true
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
| Field | Type | Required | Description |
|
|
77
|
+
| ---------------------- | ---------- | -------- | ---------------------------------------------------------------------------------------------------------- |
|
|
78
|
+
| `type` | `"preset"` | Yes | Must be `"preset"` |
|
|
79
|
+
| `items` | string[] | Yes | Ordered list of preset item IDs to display (see table below). Items are joined with `\|` as the separator. |
|
|
80
|
+
| `useThemeColors` | boolean | No | Apply the active `/theme` color to the status line text. Defaults to `true`. |
|
|
81
|
+
| `hideContextIndicator` | boolean | No | Hide the built-in context usage indicator in the footer right section. Defaults to `false`. |
|
|
82
|
+
|
|
83
|
+
### Available preset items
|
|
84
|
+
|
|
85
|
+
| Item ID | Default | Description |
|
|
86
|
+
| ---------------------- | ------- | ------------------------------------------------------------------ |
|
|
87
|
+
| `model-with-reasoning` | Yes | Current model name with reasoning level (e.g. `qwen-3-235b high`) |
|
|
88
|
+
| `model` | | Current model name without reasoning level |
|
|
89
|
+
| `git-branch` | Yes | Current Git branch name (hidden when not in a git repo) |
|
|
90
|
+
| `context-remaining` | Yes | Percentage of context window remaining (e.g. `Context 65.7% left`) |
|
|
91
|
+
| `total-input-tokens` | | Total input tokens used in session (e.g. `30.0k in`) |
|
|
92
|
+
| `total-output-tokens` | | Total output tokens used in session (e.g. `5.0k out`) |
|
|
93
|
+
| `current-dir` | Yes | Current working directory |
|
|
94
|
+
| `project-name` | | Project name (basename of working directory) |
|
|
95
|
+
| `pull-request-number` | | Open PR number for the current branch (requires `gh` CLI) |
|
|
96
|
+
| `branch-changes` | | Session file change stats (e.g. `+120 -30`) |
|
|
97
|
+
| `context-used` | Yes | Percentage of context window used (e.g. `Context 34.3% used`) |
|
|
98
|
+
| `run-state` | | Compact session state (`Ready`, `Working`, or `Confirm`) |
|
|
99
|
+
| `qwen-version` | | Qwen Code version (e.g. `v0.14.1`) |
|
|
100
|
+
| `context-window-size` | | Total context window size (e.g. `131.1k window`) |
|
|
101
|
+
| `used-tokens` | | Current prompt token count (e.g. `45.0k used`) |
|
|
102
|
+
| `session-id` | | Current session identifier |
|
|
103
|
+
|
|
104
|
+
Items marked **Default** are pre-selected when you first open the `/statusline` dialog.
|
|
105
|
+
|
|
106
|
+
### Example output
|
|
107
|
+
|
|
108
|
+
With the default items, the status line looks like:
|
|
109
|
+
|
|
110
|
+
```
|
|
111
|
+
qwen-3-235b high | main | Context 65.7% left | /home/user/project | Context 34.3% used
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Customizing via the dialog
|
|
115
|
+
|
|
116
|
+
Running `/statusline` opens an interactive multi-select dialog:
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
┌ Configure Status Line ────────────────────────────────────────┐
|
|
120
|
+
│ Select which items to display in the status line. │
|
|
121
|
+
│ │
|
|
122
|
+
│ Type to search │
|
|
123
|
+
│ > │
|
|
124
|
+
│ │
|
|
125
|
+
│ [x] Use theme colors Apply colors from the active /theme│
|
|
126
|
+
│ ─────────────────────── │
|
|
127
|
+
│ [x] model-with-reasoning Current model name with reasoning │
|
|
128
|
+
│ [ ] model-only Current model name without reason │
|
|
129
|
+
│ [x] git-branch Current Git branch when available │
|
|
130
|
+
│ [x] context-remaining Percentage of context remaining │
|
|
131
|
+
│ ... │
|
|
132
|
+
│ │
|
|
133
|
+
│ Preview │
|
|
134
|
+
│ qwen-3-235b high | main | Context 65.7% left │
|
|
135
|
+
│ │
|
|
136
|
+
│ Use up/down to navigate, space to select, enter to confirm │
|
|
137
|
+
└───────────────────────────────────────────────────────────────┘
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
- Type to filter items by name or description
|
|
141
|
+
- A live preview updates as you toggle items
|
|
142
|
+
- Press enter to save the configuration
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## Command mode
|
|
147
|
+
|
|
148
|
+
Command mode runs a shell command whose stdout is displayed in the status line. The command receives structured JSON context via stdin for session-aware output.
|
|
149
|
+
|
|
150
|
+
### Prerequisites
|
|
151
|
+
|
|
152
|
+
- [`jq`](https://jqlang.github.io/jq/) is recommended for parsing the JSON input (install via `brew install jq`, `apt install jq`, etc.)
|
|
153
|
+
- Simple commands that don't need JSON data (e.g. `git branch --show-current`) work without `jq`
|
|
154
|
+
|
|
155
|
+
### Configuration
|
|
49
156
|
|
|
50
157
|
Add a `statusLine` object under the `ui` key in `~/.qwen/settings.json`:
|
|
51
158
|
|
|
@@ -68,7 +175,7 @@ Add a `statusLine` object under the `ui` key in `~/.qwen/settings.json`:
|
|
|
68
175
|
| `respectUserColors` | boolean | No | Preserve ANSI color codes in command output instead of applying dimmed footer styling. Defaults to `false`. |
|
|
69
176
|
| `hideContextIndicator` | boolean | No | Hide the built-in context usage indicator in the footer right section. Defaults to `false`. |
|
|
70
177
|
|
|
71
|
-
|
|
178
|
+
### JSON input
|
|
72
179
|
|
|
73
180
|
The command receives a JSON object via stdin with the following fields:
|
|
74
181
|
|
|
@@ -93,6 +200,13 @@ The command receives a JSON object via stdin with the following fields:
|
|
|
93
200
|
"git": {
|
|
94
201
|
"branch": "main"
|
|
95
202
|
},
|
|
203
|
+
"worktree": {
|
|
204
|
+
"name": "fix-auth",
|
|
205
|
+
"path": "/home/user/project/.qwen/worktrees/fix-auth",
|
|
206
|
+
"branch": "fix-auth",
|
|
207
|
+
"original_cwd": "/home/user/project",
|
|
208
|
+
"original_branch": "main"
|
|
209
|
+
},
|
|
96
210
|
"metrics": {
|
|
97
211
|
"models": {
|
|
98
212
|
"qwen-3-235b": {
|
|
@@ -135,6 +249,12 @@ The command receives a JSON object via stdin with the following fields:
|
|
|
135
249
|
| `workspace.current_dir` | string | Current working directory |
|
|
136
250
|
| `git` | object \| absent | Present only inside a git repository. |
|
|
137
251
|
| `git.branch` | string | Current branch name |
|
|
252
|
+
| `worktree` | object \| absent | Present only when inside an active worktree (created by `enter_worktree`). |
|
|
253
|
+
| `worktree.name` | string | Worktree slug name |
|
|
254
|
+
| `worktree.path` | string | Absolute path to the worktree directory |
|
|
255
|
+
| `worktree.branch` | string | Branch checked out in the worktree |
|
|
256
|
+
| `worktree.original_cwd` | string | Working directory before entering the worktree |
|
|
257
|
+
| `worktree.original_branch` | string | Branch that was active before entering the worktree |
|
|
138
258
|
| `metrics.models.<id>.api` | object | Per-model API stats: `total_requests`, `total_errors`, `total_latency_ms` |
|
|
139
259
|
| `metrics.models.<id>.tokens` | object | Per-model token usage: `prompt`, `completion`, `total`, `cached`, `thoughts` |
|
|
140
260
|
| `metrics.files` | object | File change stats: `total_lines_added`, `total_lines_removed` |
|
|
@@ -142,9 +262,9 @@ The command receives a JSON object via stdin with the following fields:
|
|
|
142
262
|
|
|
143
263
|
> **Important:** stdin can only be read once. Always store it in a variable first: `input=$(cat)`.
|
|
144
264
|
|
|
145
|
-
|
|
265
|
+
### Examples
|
|
146
266
|
|
|
147
|
-
|
|
267
|
+
#### Model and token usage
|
|
148
268
|
|
|
149
269
|
```json
|
|
150
270
|
{
|
|
@@ -159,7 +279,7 @@ The command receives a JSON object via stdin with the following fields:
|
|
|
159
279
|
|
|
160
280
|
Output: `qwen-3-235b ctx:34%`
|
|
161
281
|
|
|
162
|
-
|
|
282
|
+
#### Git branch + directory
|
|
163
283
|
|
|
164
284
|
```json
|
|
165
285
|
{
|
|
@@ -176,7 +296,7 @@ Output: `my-project (main)`
|
|
|
176
296
|
|
|
177
297
|
> Note: The `git.branch` field is provided directly in the JSON input — no need to shell out to `git`.
|
|
178
298
|
|
|
179
|
-
|
|
299
|
+
#### File change stats
|
|
180
300
|
|
|
181
301
|
```json
|
|
182
302
|
{
|
|
@@ -191,7 +311,7 @@ Output: `my-project (main)`
|
|
|
191
311
|
|
|
192
312
|
Output: `+120/-30 lines`
|
|
193
313
|
|
|
194
|
-
|
|
314
|
+
#### Live clock and git branch
|
|
195
315
|
|
|
196
316
|
Use `refreshInterval` when the statusline shows data that changes without an Agent event (e.g. the clock, uptime, or rate-limit counters):
|
|
197
317
|
|
|
@@ -209,7 +329,7 @@ Use `refreshInterval` when the statusline shows data that changes without an Age
|
|
|
209
329
|
|
|
210
330
|
Output (refreshed every second): `14:32:07 (main)`
|
|
211
331
|
|
|
212
|
-
|
|
332
|
+
#### Script file for complex commands
|
|
213
333
|
|
|
214
334
|
For longer commands, save a script file at `~/.qwen/statusline-command.sh`:
|
|
215
335
|
|
|
@@ -246,18 +366,32 @@ Then reference it in settings:
|
|
|
246
366
|
|
|
247
367
|
## Behavior
|
|
248
368
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
- **
|
|
369
|
+
**Both modes:**
|
|
370
|
+
|
|
371
|
+
- **Update triggers**: The status line updates when the model changes, a new message is sent (token count changes), vim mode is toggled, git branch changes, tool calls complete, or file changes occur. Updates are debounced (300ms).
|
|
372
|
+
- **Output**: Up to 2 lines. Each line is rendered as a separate row in the footer's left section. Lines that exceed the available width are truncated.
|
|
252
373
|
- **Hot reload**: Changes to `ui.statusLine` in settings take effect immediately — no restart required.
|
|
253
|
-
- **Shell**: Commands run via `/bin/sh` on macOS/Linux. On Windows, `cmd.exe` is used by default — wrap POSIX commands with `bash -c "..."` or point to a bash script (e.g. `bash ~/.qwen/statusline-command.sh`).
|
|
254
374
|
- **Removal**: Delete the `ui.statusLine` key from settings to disable. The "? for shortcuts" hint returns.
|
|
255
375
|
|
|
376
|
+
**Command mode only:**
|
|
377
|
+
|
|
378
|
+
- **Timeout**: Commands that take longer than 5 seconds are killed. The status line clears on failure.
|
|
379
|
+
- **Refresh**: Set `refreshInterval` (seconds) to additionally re-run the command on a timer — useful for data that changes without an Agent event (clock, rate limits, build status).
|
|
380
|
+
- **Shell**: Commands run via `/bin/sh` on macOS/Linux. On Windows, `cmd.exe` is used by default — wrap POSIX commands with `bash -c "..."` or point to a bash script (e.g. `bash ~/.qwen/statusline-command.sh`).
|
|
381
|
+
|
|
382
|
+
**Preset mode only:**
|
|
383
|
+
|
|
384
|
+
- **No external dependencies**: Preset items are computed internally — no shell commands, no `jq`, no timeouts.
|
|
385
|
+
- **Theme integration**: When `useThemeColors` is `true` (default), the status line text uses the active `/theme` color. When `false`, dimmed footer styling is applied.
|
|
386
|
+
- **PR lookup**: The `pull-request-number` item runs `gh pr view` in the background (2s timeout). It only triggers when the branch changes, not on every update.
|
|
387
|
+
|
|
256
388
|
## Troubleshooting
|
|
257
389
|
|
|
258
|
-
| Problem
|
|
259
|
-
|
|
|
260
|
-
| Status line not showing
|
|
261
|
-
| Empty output
|
|
262
|
-
| Stale data
|
|
263
|
-
| Command too slow
|
|
390
|
+
| Problem | Cause | Fix |
|
|
391
|
+
| --------------------------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
392
|
+
| Status line not showing | Config at wrong path | Must be under `ui.statusLine`, not root-level `statusLine` |
|
|
393
|
+
| Empty output (command mode) | Command fails silently | Test manually: `echo '{"session_id":"test","version":"0.14.1","model":{"display_name":"test"},"context_window":{"context_window_size":0,"used_percentage":0,"remaining_percentage":100,"current_usage":0,"total_input_tokens":0,"total_output_tokens":0},"workspace":{"current_dir":"/tmp"},"metrics":{"models":{},"files":{"total_lines_added":0,"total_lines_removed":0}}}' \| sh -c 'your_command'` |
|
|
394
|
+
| Stale data (command mode) | No trigger fired | Send a message or switch models to trigger an update — or set `refreshInterval` to re-run the command on a timer |
|
|
395
|
+
| Command too slow | Complex script | Optimize the script or move heavy work to a background cache |
|
|
396
|
+
| Preset items missing | Conditional items have no data | `git-branch` is hidden outside git repos; `context-used` is hidden when usage is 0; `branch-changes` is hidden when no files changed. This is expected — items appear once their data is available |
|
|
397
|
+
| PR number not showing | `gh` CLI not installed | Install [GitHub CLI](https://cli.github.com/) and authenticate with `gh auth login`. The lookup runs with a 2s timeout |
|
|
@@ -7,34 +7,34 @@ import {
|
|
|
7
7
|
hasRebuiltToolRegistry,
|
|
8
8
|
rebuildToolRegistryOnOverride,
|
|
9
9
|
resolveSubagentApprovalMode
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-JR346RJ5.js";
|
|
11
11
|
import "./chunk-24YKA2DA.js";
|
|
12
12
|
import "./chunk-O4PICXES.js";
|
|
13
13
|
import "./chunk-TW522KN6.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-7TQVELRB.js";
|
|
15
15
|
import "./chunk-AKBFRR6J.js";
|
|
16
16
|
import "./chunk-MLZQVCF3.js";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-6O244QKR.js";
|
|
18
18
|
import "./chunk-EY6BDW7Y.js";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-RQW7WUJR.js";
|
|
20
20
|
import "./chunk-77WXWU44.js";
|
|
21
21
|
import "./chunk-GVWPJCXU.js";
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-YVGIQ2CS.js";
|
|
23
|
+
import "./chunk-3PJXIDKI.js";
|
|
24
24
|
import "./chunk-UWCTAVOD.js";
|
|
25
25
|
import "./chunk-W57YDFU5.js";
|
|
26
26
|
import "./chunk-OFEVLU4C.js";
|
|
27
27
|
import "./chunk-NQ3E7YLD.js";
|
|
28
28
|
import "./chunk-OJFMTECH.js";
|
|
29
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-SOGUPKP6.js";
|
|
30
30
|
import "./chunk-6RQTH7UQ.js";
|
|
31
|
-
import "./chunk-
|
|
31
|
+
import "./chunk-JKUAX6UT.js";
|
|
32
32
|
import "./chunk-G4K6P5KN.js";
|
|
33
33
|
import "./chunk-OIL7KDWV.js";
|
|
34
34
|
import "./chunk-HX3JRTWL.js";
|
|
35
|
-
import "./chunk-
|
|
35
|
+
import "./chunk-QVJ33ZBG.js";
|
|
36
36
|
import "./chunk-TDZCEIK6.js";
|
|
37
|
-
import "./chunk-
|
|
37
|
+
import "./chunk-BNESGOSJ.js";
|
|
38
38
|
import "./chunk-SZOEIL6S.js";
|
|
39
39
|
import "./chunk-5IFG2VC4.js";
|
|
40
40
|
import "./chunk-ACBGEKB7.js";
|
package/chunks/{anthropicContentGenerator-UCGOKLGC.js → anthropicContentGenerator-M45RXZVS.js}
RENAMED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-KQIKOTQJ.js";
|
|
7
7
|
import {
|
|
8
8
|
RequestTokenizer
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-JBSYXHJF.js";
|
|
10
10
|
import {
|
|
11
11
|
Blob,
|
|
12
12
|
File,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
import {
|
|
17
17
|
buildRuntimeFetchOptions,
|
|
18
18
|
redactProxyError
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-QVJ33ZBG.js";
|
|
20
20
|
import {
|
|
21
21
|
CAPPED_DEFAULT_MAX_TOKENS,
|
|
22
22
|
DEFAULT_TIMEOUT,
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
import {
|
|
30
30
|
FinishReason,
|
|
31
31
|
GenerateContentResponse
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-BNESGOSJ.js";
|
|
33
33
|
import "./chunk-SZOEIL6S.js";
|
|
34
34
|
import "./chunk-5IFG2VC4.js";
|
|
35
35
|
import {
|
|
@@ -21,6 +21,7 @@ var ca_default = {
|
|
|
21
21
|
"@src/myFile.ts": "@src/myFile.ts",
|
|
22
22
|
"Shell mode": "Mode shell",
|
|
23
23
|
"YOLO mode": "Mode YOLO",
|
|
24
|
+
"Auto mode": "Mode auto",
|
|
24
25
|
"plan mode": "mode de planificaci\xF3",
|
|
25
26
|
"auto-accept edits": "acceptaci\xF3 autom\xE0tica de canvis",
|
|
26
27
|
"Accepting edits": "Acceptant canvis",
|
|
@@ -359,7 +360,7 @@ var ca_default = {
|
|
|
359
360
|
Text: "Text",
|
|
360
361
|
JSON: "JSON",
|
|
361
362
|
Plan: "Planificaci\xF3",
|
|
362
|
-
|
|
363
|
+
"Ask permissions": "Demanar permisos",
|
|
363
364
|
"Auto Edit": "Edici\xF3 autom\xE0tica",
|
|
364
365
|
YOLO: "YOLO",
|
|
365
366
|
"toggle vim mode on/off": "activar/desactivar el mode Vim",
|