@qwen-code/qwen-code 0.17.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.
Files changed (91) hide show
  1. package/bundled/qc-helper/docs/configuration/_meta.ts +0 -3
  2. package/bundled/qc-helper/docs/configuration/settings.md +13 -12
  3. package/bundled/qc-helper/docs/configuration/themes.md +39 -0
  4. package/bundled/qc-helper/docs/features/approval-mode.md +26 -22
  5. package/bundled/qc-helper/docs/features/commands.md +68 -12
  6. package/bundled/qc-helper/docs/features/status-line.md +168 -32
  7. package/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +16 -0
  8. package/bundled/simplify/SKILL.md +123 -0
  9. package/chunks/{agent-KVXFGIOU.js → agent-GNHB6UIW.js} +14 -13
  10. package/chunks/{anthropicContentGenerator-L4HWAOIV.js → anthropicContentGenerator-M45RXZVS.js} +48 -5
  11. package/chunks/{askUserQuestion-DC6OWQIL.js → askUserQuestion-TGRD7FNQ.js} +1 -1
  12. package/chunks/{ca-NMZFEGAU.js → ca-6RSCDYUS.js} +2 -1
  13. package/chunks/{chunk-J5VCSWPA.js → chunk-3PJXIDKI.js} +1153 -103
  14. package/chunks/{chunk-EMVEDSVZ.js → chunk-6O244QKR.js} +43 -3
  15. package/chunks/chunk-7TQVELRB.js +10412 -0
  16. package/chunks/{chunk-HCSJIOLR.js → chunk-BNESGOSJ.js} +7450 -3516
  17. package/chunks/{chunk-7YJIR2FX.js → chunk-G4K6P5KN.js} +8 -15
  18. package/chunks/chunk-HX3JRTWL.js +393 -0
  19. package/chunks/{chunk-V7LMZR76.js → chunk-JBSYXHJF.js} +1 -1
  20. package/chunks/{chunk-R2B65CAN.js → chunk-JKUAX6UT.js} +0 -1
  21. package/chunks/{chunk-7EHPK6TK.js → chunk-JR346RJ5.js} +4007 -2390
  22. package/chunks/{chunk-JI7FDD65.js → chunk-K3VUDSWM.js} +9 -6
  23. package/chunks/chunk-MRO43B25.js +30 -0
  24. package/chunks/{chunk-4O2TWJK4.js → chunk-NDZEP7SA.js} +183 -40
  25. package/chunks/{chunk-7NNBQRV7.js → chunk-NJY4F5NM.js} +4 -4
  26. package/chunks/{chunk-ODPVJ6JJ.js → chunk-OJFMTECH.js} +6 -1
  27. package/chunks/{chunk-U2K6HDUJ.js → chunk-QVJ33ZBG.js} +23 -13
  28. package/chunks/{chunk-HAQCNXSG.js → chunk-RQW7WUJR.js} +15 -0
  29. package/chunks/{chunk-UQRYJQBE.js → chunk-SOGUPKP6.js} +1 -1
  30. package/chunks/{chunk-6NUSWV4M.js → chunk-TDZCEIK6.js} +2 -0
  31. package/chunks/{chunk-QEXSIXLX.js → chunk-XK4IGU5E.js} +10 -10
  32. package/chunks/{chunk-MEN6IEKX.js → chunk-YVGIQ2CS.js} +456 -1225
  33. package/chunks/{computer-use-2J5ZXEER.js → computer-use-NAHQPV2L.js} +24 -6
  34. package/chunks/{contextCommand-52NTEMCT.js → contextCommand-VKNIA257.js} +16 -15
  35. package/chunks/{cron-create-FXRORK2U.js → cron-create-V3UK2SJN.js} +1 -1
  36. package/chunks/{cron-delete-D24IN6CA.js → cron-delete-MANALPCP.js} +1 -1
  37. package/chunks/{cron-list-SMOX26SL.js → cron-list-UDIYK3B3.js} +1 -1
  38. package/chunks/{de-OIMT3OMI.js → de-APURNJ3I.js} +2 -1
  39. package/chunks/{dist-GRQVFL3G.js → dist-ATAKC63R.js} +1 -1
  40. package/chunks/{edit-RLFUTT5F.js → edit-YP22XCVA.js} +14 -13
  41. package/chunks/{en-2IFZ5THF.js → en-FYO57HJW.js} +3 -1
  42. package/chunks/{enter-worktree-CYRAPQKJ.js → enter-worktree-BD7UFMUZ.js} +14 -13
  43. package/chunks/{exit-worktree-WQZM72QD.js → exit-worktree-AVWBCQWY.js} +14 -13
  44. package/chunks/{exitPlanMode-STFEBQZE.js → exitPlanMode-2D6EGF76.js} +14 -13
  45. package/chunks/{fr-PVELSHTV.js → fr-32YHQZIS.js} +2 -1
  46. package/chunks/{geminiContentGenerator-DIV32SKO.js → geminiContentGenerator-YFVW6DXY.js} +4 -3
  47. package/chunks/{glob-N3XO4RVI.js → glob-NZWP66L5.js} +14 -13
  48. package/chunks/{grep-AK5MP7P3.js → grep-RFEZDGI4.js} +14 -13
  49. package/chunks/{ja-P5TK5GNN.js → ja-PEUXN4XT.js} +2 -1
  50. package/chunks/{ls-7FYQHPWF.js → ls-T4SVZWR6.js} +1 -1
  51. package/chunks/{lsp-DKG34USR.js → lsp-U4ZQLNIS.js} +1 -1
  52. package/chunks/{monitor-IVBWJZEZ.js → monitor-OHKCQLFQ.js} +17 -14
  53. package/chunks/{multipart-parser-IXGBIOIN.js → multipart-parser-AJ4WASWR.js} +2 -2
  54. package/chunks/{notebook-edit-PM46AXFS.js → notebook-edit-AFRICVUX.js} +14 -13
  55. package/chunks/{openaiContentGenerator-4QXCH7L2.js → openaiContentGenerator-47KB64GP.js} +11 -10
  56. package/chunks/{pt-A5GHG66T.js → pt-2INS7YVC.js} +2 -1
  57. package/chunks/{qwenContentGenerator-BLXQIIMX.js → qwenContentGenerator-7BC2OW3T.js} +16 -15
  58. package/chunks/{qwenOAuth2-BAN2EGSH.js → qwenOAuth2-LKXG7XVO.js} +2 -1
  59. package/chunks/{read-file-IEQAS3EZ.js → read-file-MXUW3RUF.js} +8 -7
  60. package/chunks/{ripGrep-HQO7IE4C.js → ripGrep-AHBINNF3.js} +14 -13
  61. package/chunks/{ru-66XKB4QX.js → ru-6CQ5HNHB.js} +2 -1
  62. package/chunks/scheduler-KBRJ3LFC.js +306 -0
  63. package/chunks/{send-message-ZL7CDM7K.js → send-message-GFYV7WLL.js} +1 -1
  64. package/chunks/{serve-CYRAK4UM.js → serve-PVFP6HD7.js} +43 -30
  65. package/chunks/{shell-UZBGNO2Q.js → shell-JOXQ5PPL.js} +14 -13
  66. package/chunks/{skill-JVC34QYN.js → skill-73RYGDJQ.js} +9 -8
  67. package/chunks/{src-TMOD5X6F.js → src-7XL4G4DC.js} +88 -46
  68. package/chunks/{src-FOODLH7B.js → src-DR3Y7J6D.js} +41 -15
  69. package/chunks/{syntheticOutput-U3YJ3GOO.js → syntheticOutput-DM43O6TY.js} +2 -2
  70. package/chunks/{task-stop-NPUI3YBA.js → task-stop-WKP5OB3V.js} +1 -1
  71. package/chunks/{todoWrite-Y6F7YEIM.js → todoWrite-GHL6DCLP.js} +14 -3
  72. package/chunks/{tool-search-P7PRPOW3.js → tool-search-DRMR34WX.js} +8 -7
  73. package/chunks/{web-fetch-XWEK4TFX.js → web-fetch-SZIV74ZX.js} +2 -2
  74. package/chunks/{write-file-SIIEUON5.js → write-file-B45ZAKUJ.js} +16 -15
  75. package/chunks/{zh-TW-3ND6DQRX.js → zh-TW-SSL3ATVZ.js} +3 -1
  76. package/chunks/{zh-OB5P2ZDO.js → zh-ZHZCMIRG.js} +3 -1
  77. package/cli.js +38665 -53791
  78. package/locales/ca.js +2 -1
  79. package/locales/de.js +2 -1
  80. package/locales/en.js +4 -1
  81. package/locales/fr.js +2 -1
  82. package/locales/ja.js +2 -1
  83. package/locales/pt.js +2 -1
  84. package/locales/ru.js +2 -1
  85. package/locales/zh-TW.js +4 -1
  86. package/locales/zh.js +4 -1
  87. package/package.json +2 -2
  88. package/chunks/chunk-EM6ETG2K.js +0 -60
  89. package/chunks/chunk-TI4GXJKO.js +0 -4277
  90. package/chunks/multipart-parser-3QWGTLK3.js +0 -384
  91. package/chunks/src-IPWIHNMI.js +0 -1406
@@ -1,8 +1,11 @@
1
1
  # Status Line
2
2
 
3
- > Display custom information in the footer using a shell command.
3
+ > Display custom information in the footer.
4
4
 
5
- The status line lets you run a shell command whose output is displayed in the footer's left section. The command receives structured JSON context via stdin, so it can show session-aware information like the current model, token usage, git branch, or anything else you can script.
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 launches a setup agent that reads your shell PS1 configuration and generates a matching status line:
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
- You can also give it specific instructions:
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
- ## Manual configuration
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
 
@@ -60,13 +167,15 @@ Add a `statusLine` object under the `ui` key in `~/.qwen/settings.json`:
60
167
  }
61
168
  ```
62
169
 
63
- | Field | Type | Required | Description |
64
- | ----------------- | ----------- | -------- | --------------------------------------------------------------------------------------------------------------------------------- |
65
- | `type` | `"command"` | Yes | Must be `"command"` |
66
- | `command` | string | Yes | Shell command to execute. Receives JSON via stdin, stdout is displayed (up to 2 lines). |
67
- | `refreshInterval` | number | No | Re-run the command every N seconds (minimum 1). Useful for data that changes without an Agent state event (clock, quota, uptime). |
170
+ | Field | Type | Required | Description |
171
+ | ---------------------- | ----------- | -------- | --------------------------------------------------------------------------------------------------------------------------------- |
172
+ | `type` | `"command"` | Yes | Must be `"command"` |
173
+ | `command` | string | Yes | Shell command to execute. Receives JSON via stdin, stdout is displayed (up to 2 lines). |
174
+ | `refreshInterval` | number | No | Re-run the command every N seconds (minimum 1). Useful for data that changes without an Agent state event (clock, quota, uptime). |
175
+ | `respectUserColors` | boolean | No | Preserve ANSI color codes in command output instead of applying dimmed footer styling. Defaults to `false`. |
176
+ | `hideContextIndicator` | boolean | No | Hide the built-in context usage indicator in the footer right section. Defaults to `false`. |
68
177
 
69
- ## JSON input
178
+ ### JSON input
70
179
 
71
180
  The command receives a JSON object via stdin with the following fields:
72
181
 
@@ -91,6 +200,13 @@ The command receives a JSON object via stdin with the following fields:
91
200
  "git": {
92
201
  "branch": "main"
93
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
+ },
94
210
  "metrics": {
95
211
  "models": {
96
212
  "qwen-3-235b": {
@@ -133,6 +249,12 @@ The command receives a JSON object via stdin with the following fields:
133
249
  | `workspace.current_dir` | string | Current working directory |
134
250
  | `git` | object \| absent | Present only inside a git repository. |
135
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 |
136
258
  | `metrics.models.<id>.api` | object | Per-model API stats: `total_requests`, `total_errors`, `total_latency_ms` |
137
259
  | `metrics.models.<id>.tokens` | object | Per-model token usage: `prompt`, `completion`, `total`, `cached`, `thoughts` |
138
260
  | `metrics.files` | object | File change stats: `total_lines_added`, `total_lines_removed` |
@@ -140,9 +262,9 @@ The command receives a JSON object via stdin with the following fields:
140
262
 
141
263
  > **Important:** stdin can only be read once. Always store it in a variable first: `input=$(cat)`.
142
264
 
143
- ## Examples
265
+ ### Examples
144
266
 
145
- ### Model and token usage
267
+ #### Model and token usage
146
268
 
147
269
  ```json
148
270
  {
@@ -157,7 +279,7 @@ The command receives a JSON object via stdin with the following fields:
157
279
 
158
280
  Output: `qwen-3-235b ctx:34%`
159
281
 
160
- ### Git branch + directory
282
+ #### Git branch + directory
161
283
 
162
284
  ```json
163
285
  {
@@ -174,7 +296,7 @@ Output: `my-project (main)`
174
296
 
175
297
  > Note: The `git.branch` field is provided directly in the JSON input — no need to shell out to `git`.
176
298
 
177
- ### File change stats
299
+ #### File change stats
178
300
 
179
301
  ```json
180
302
  {
@@ -189,7 +311,7 @@ Output: `my-project (main)`
189
311
 
190
312
  Output: `+120/-30 lines`
191
313
 
192
- ### Live clock and git branch
314
+ #### Live clock and git branch
193
315
 
194
316
  Use `refreshInterval` when the statusline shows data that changes without an Agent event (e.g. the clock, uptime, or rate-limit counters):
195
317
 
@@ -207,7 +329,7 @@ Use `refreshInterval` when the statusline shows data that changes without an Age
207
329
 
208
330
  Output (refreshed every second): `14:32:07 (main)`
209
331
 
210
- ### Script file for complex commands
332
+ #### Script file for complex commands
211
333
 
212
334
  For longer commands, save a script file at `~/.qwen/statusline-command.sh`:
213
335
 
@@ -244,18 +366,32 @@ Then reference it in settings:
244
366
 
245
367
  ## Behavior
246
368
 
247
- - **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). 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).
248
- - **Timeout**: Commands that take longer than 5 seconds are killed. The status line clears on failure.
249
- - **Output**: Multi-line output is supported (up to 2 lines; extra lines are discarded). Each line is rendered as a separate row with dimmed colors in the footer's left section. Lines that exceed the available width are truncated.
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.
250
373
  - **Hot reload**: Changes to `ui.statusLine` in settings take effect immediately — no restart required.
251
- - **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`).
252
374
  - **Removal**: Delete the `ui.statusLine` key from settings to disable. The "? for shortcuts" hint returns.
253
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
+
254
388
  ## Troubleshooting
255
389
 
256
- | Problem | Cause | Fix |
257
- | ----------------------- | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
258
- | Status line not showing | Config at wrong path | Must be under `ui.statusLine`, not root-level `statusLine` |
259
- | Empty output | 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'` |
260
- | Stale data | No trigger fired | Send a message or switch models to trigger an update — or set `refreshInterval` to re-run the command on a timer |
261
- | Command too slow | Complex script | Optimize the script or move heavy work to a background cache |
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 |
@@ -67,6 +67,22 @@ This document lists the available keyboard shortcuts in Qwen Code.
67
67
  | `1-9` | Select an item by its number. |
68
68
  | (multi-digit) | For items with numbers greater than 9, press the digits in quick succession to select the corresponding item. |
69
69
 
70
+ ## History scrollback
71
+
72
+ Active only when `ui.useTerminalBuffer` is enabled (Settings → UI → Virtualized History). In that mode conversation history is rendered inside an in-app viewport instead of the host terminal scrollback, so the keys below replace the terminal's native scroll.
73
+
74
+ | Shortcut | Description |
75
+ | --------------- | ---------------------------------------------------- |
76
+ | `Shift+Up` | Scroll history up one line. |
77
+ | `Shift+Down` | Scroll history down one line. |
78
+ | `PgUp` | Scroll history up one page (viewport height). |
79
+ | `PgDn` | Scroll history down one page (viewport height). |
80
+ | `Ctrl+Home` | Jump to the top of the conversation. |
81
+ | `Ctrl+End` | Jump to the bottom (and re-engage live auto-follow). |
82
+ | **Mouse wheel** | Scroll history (3 lines per tick). |
83
+
84
+ When `ui.useTerminalBuffer` is on, the terminal forwards mouse events to qwen-code so the wheel can drive the in-app viewport. As a side effect, **native click-and-drag text selection is consumed by the program** — hold `Shift` (or `Option` on macOS Terminal / iTerm) while dragging to bypass mouse capture and select text the usual way.
85
+
70
86
  ## IDE Integration
71
87
 
72
88
  | Shortcut | Description |
@@ -0,0 +1,123 @@
1
+ ---
2
+ name: simplify
3
+ description: Review recent code changes for reuse, code quality, and efficiency, then directly apply straightforward cleanup improvements. Use when the user wants a post-implementation cleanup pass, pre-PR polish, or asks to simplify/refine recent changes. Invoke with `/simplify` or `/simplify <focus>`.
4
+ allowedTools:
5
+ - agent
6
+ - run_shell_command
7
+ - grep_search
8
+ - read_file
9
+ - write_file
10
+ - edit
11
+ - glob
12
+ ---
13
+
14
+ # Simplify Recent Changes
15
+
16
+ You are running a structured cleanup workflow over recent code changes. Your goal is not just to comment on the code, but to safely improve it.
17
+
18
+ ## Step 1: Identify the review scope
19
+
20
+ Determine which files and changes to review.
21
+
22
+ 1. First inspect the current git state.
23
+ 2. If there are staged changes, review against `HEAD` so both staged and unstaged tracked changes are included.
24
+ 3. Otherwise review the current uncommitted diff.
25
+ 4. If there is no git diff, fall back to `git ls-files --modified --others --exclude-standard` so the scope respects `.gitignore` (this keeps build output, `node_modules`, and other ignored paths out of the cleanup).
26
+ 5. If that is still empty, fall back to files edited in this conversation.
27
+ 6. If you still cannot identify a meaningful scope, stop and tell the user there are no recent changes to simplify.
28
+
29
+ Preferred commands:
30
+
31
+ - `git diff --name-only`
32
+ - `git diff --staged --name-only`
33
+ - `git diff HEAD --name-only`
34
+ - `git diff`
35
+ - `git diff HEAD`
36
+ - `git status --short`
37
+
38
+ Use `git diff HEAD` whenever staged changes exist. Otherwise use `git diff`.
39
+
40
+ ## Step 2: Launch three review passes in parallel
41
+
42
+ Use the `agent` tool and launch all review passes in a single response so they run concurrently. Each pass must receive the same review scope and diff command. These passes are read-only: each one inspects and reports findings only and must not modify files — all edits happen later in Step 4.
43
+
44
+ Keep each review prompt short and focused. Do not paste the full diff into the prompt. Tell each pass to read the diff itself and inspect only files relevant to its findings.
45
+
46
+ ### Pass 1: Code Reuse Review
47
+
48
+ Look for opportunities to reduce duplication and reuse existing code:
49
+
50
+ - existing utilities or helpers that should be reused
51
+ - duplicated logic introduced in new code
52
+ - inline logic that should delegate to an existing abstraction
53
+ - ad-hoc helpers for string, path, env, parsing, or type checks when a project utility already exists
54
+
55
+ ### Pass 2: Code Quality Review
56
+
57
+ Look for maintainability issues:
58
+
59
+ - copy-paste variants that should be unified
60
+ - parameter sprawl or awkward APIs
61
+ - redundant state or indirection
62
+ - abstraction leaks
63
+ - stringly-typed code that should be modeled more clearly
64
+ - unnecessary nesting
65
+ - unnecessary comments that explain what instead of why
66
+ - naming or structure that does not match surrounding code
67
+
68
+ ### Pass 3: Efficiency Review
69
+
70
+ Look for wasteful work and unnecessary overhead:
71
+
72
+ - repeated work that can be memoized, cached, or removed
73
+ - serial work that can be parallelized safely
74
+ - unnecessary scans, allocations, reads, or traversals
75
+ - hot-path blocking work
76
+ - redundant no-op updates
77
+ - overly broad operations when a narrower one would work
78
+ - existence-check patterns that introduce TOCTOU style waste or risk
79
+
80
+ ## Step 3: Aggregate findings
81
+
82
+ Wait for all three passes to finish, then merge overlapping findings.
83
+
84
+ Prioritize fixes that are:
85
+
86
+ - low risk
87
+ - local in scope
88
+ - clearly aligned with existing project patterns
89
+ - easy to validate with tests or targeted commands
90
+
91
+ Do not force a cleanup if it would require speculative architectural changes.
92
+
93
+ ## Step 4: Apply straightforward improvements
94
+
95
+ Directly implement safe cleanup improvements.
96
+
97
+ Examples of good automatic fixes:
98
+
99
+ - replace duplicated logic with an existing helper
100
+ - remove redundant code, but only after a repository-wide search confirms it has no remaining callers
101
+ - simplify conditionals or control flow
102
+ - tighten loops or repeated work
103
+ - reduce unnecessary state or wrapper code
104
+ - remove low-value comments
105
+ - align code with nearby conventions
106
+
107
+ Skip items that are uncertain, risky, or too invasive. Do not spend time debating rejected findings; simply move on.
108
+
109
+ ## Step 5: Verify the cleanup
110
+
111
+ After making changes:
112
+
113
+ 1. Run focused tests for the changed area when they exist.
114
+ 2. Run the relevant project quality checks you can identify for the touched code.
115
+ 3. If there are no applicable tests, at least run a targeted build, typecheck, or lint command that covers the edited files.
116
+
117
+ Prefer targeted verification over whole-repo commands unless the project only exposes repo-wide checks.
118
+
119
+ ## Additional focus
120
+
121
+ If the user supplied extra instructions after `/simplify`, treat them as additional review focus and prioritize them alongside the default dimensions.
122
+
123
+ The raw user invocation appears below when present. Use it to extract any extra focus such as performance, duplication, rendering, API clarity, testability, or naming consistency.
@@ -7,33 +7,34 @@ import {
7
7
  hasRebuiltToolRegistry,
8
8
  rebuildToolRegistryOnOverride,
9
9
  resolveSubagentApprovalMode
10
- } from "./chunk-7EHPK6TK.js";
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-TI4GXJKO.js";
14
+ import "./chunk-7TQVELRB.js";
15
15
  import "./chunk-AKBFRR6J.js";
16
16
  import "./chunk-MLZQVCF3.js";
17
- import "./chunk-EMVEDSVZ.js";
17
+ import "./chunk-6O244QKR.js";
18
18
  import "./chunk-EY6BDW7Y.js";
19
- import "./chunk-HAQCNXSG.js";
19
+ import "./chunk-RQW7WUJR.js";
20
20
  import "./chunk-77WXWU44.js";
21
21
  import "./chunk-GVWPJCXU.js";
22
- import "./chunk-MEN6IEKX.js";
23
- import "./chunk-J5VCSWPA.js";
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
- import "./chunk-ODPVJ6JJ.js";
29
- import "./chunk-UQRYJQBE.js";
28
+ import "./chunk-OJFMTECH.js";
29
+ import "./chunk-SOGUPKP6.js";
30
30
  import "./chunk-6RQTH7UQ.js";
31
- import "./chunk-R2B65CAN.js";
32
- import "./chunk-7YJIR2FX.js";
31
+ import "./chunk-JKUAX6UT.js";
32
+ import "./chunk-G4K6P5KN.js";
33
33
  import "./chunk-OIL7KDWV.js";
34
- import "./chunk-U2K6HDUJ.js";
35
- import "./chunk-6NUSWV4M.js";
36
- import "./chunk-HCSJIOLR.js";
34
+ import "./chunk-HX3JRTWL.js";
35
+ import "./chunk-QVJ33ZBG.js";
36
+ import "./chunk-TDZCEIK6.js";
37
+ import "./chunk-BNESGOSJ.js";
37
38
  import "./chunk-SZOEIL6S.js";
38
39
  import "./chunk-5IFG2VC4.js";
39
40
  import "./chunk-ACBGEKB7.js";
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-KQIKOTQJ.js";
7
7
  import {
8
8
  RequestTokenizer
9
- } from "./chunk-V7LMZR76.js";
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-U2K6HDUJ.js";
19
+ } from "./chunk-QVJ33ZBG.js";
20
20
  import {
21
21
  CAPPED_DEFAULT_MAX_TOKENS,
22
22
  DEFAULT_TIMEOUT,
@@ -25,11 +25,11 @@ import {
25
25
  runtimeDiagnostics,
26
26
  safeJsonParse,
27
27
  tokenLimit
28
- } from "./chunk-6NUSWV4M.js";
28
+ } from "./chunk-TDZCEIK6.js";
29
29
  import {
30
30
  FinishReason,
31
31
  GenerateContentResponse
32
- } from "./chunk-HCSJIOLR.js";
32
+ } from "./chunk-BNESGOSJ.js";
33
33
  import "./chunk-SZOEIL6S.js";
34
34
  import "./chunk-5IFG2VC4.js";
35
35
  import {
@@ -4842,7 +4842,12 @@ var AnthropicContentGenerator = class {
4842
4842
  } catch (error) {
4843
4843
  throw redactProxyError(error);
4844
4844
  }
4845
- return this.processStream(this.redactStreamErrors(stream));
4845
+ return this.processStreamWithEmptyFallback(
4846
+ this.redactStreamErrors(stream),
4847
+ anthropicRequest,
4848
+ request.config?.abortSignal,
4849
+ headers
4850
+ );
4846
4851
  }
4847
4852
  async countTokens(request) {
4848
4853
  try {
@@ -5320,6 +5325,44 @@ var AnthropicContentGenerator = class {
5320
5325
  }
5321
5326
  }
5322
5327
  }
5328
+ // Some Anthropic-compatible gateways close the SSE stream with HTTP 200
5329
+ // but emit no assistant content or stop reason (e.g. billing / quota
5330
+ // limits hit mid-proxy). When that happens we probe once with the same
5331
+ // request in non-streaming mode so the real provider error surfaces
5332
+ // instead of the generic "stream ended without a finish reason".
5333
+ async *processStreamWithEmptyFallback(stream, fallbackRequest, abortSignal, headers) {
5334
+ let hasAssistantPayload = false;
5335
+ let hasFinishReason = false;
5336
+ for await (const chunk of this.processStream(stream)) {
5337
+ const candidates = chunk.candidates ?? [];
5338
+ hasFinishReason ||= candidates.some(
5339
+ (candidate) => candidate.finishReason !== void 0
5340
+ );
5341
+ hasAssistantPayload ||= candidates.some(
5342
+ (candidate) => candidate.content?.parts?.some(
5343
+ (part) => part.text || part.thought || part.thoughtSignature || part.functionCall
5344
+ )
5345
+ );
5346
+ yield chunk;
5347
+ }
5348
+ if (hasAssistantPayload || hasFinishReason) {
5349
+ return;
5350
+ }
5351
+ debugLogger.warn(
5352
+ "Anthropic stream ended without assistant payload or finish reason; probing once with a non-streaming request to surface provider errors."
5353
+ );
5354
+ let response;
5355
+ try {
5356
+ runtimeDiagnostics.recordAnthropicWireRequest(fallbackRequest);
5357
+ response = await this.client.messages.create(fallbackRequest, {
5358
+ signal: abortSignal,
5359
+ ...headers ? { headers } : {}
5360
+ });
5361
+ yield this.converter.convertAnthropicResponseToGemini(response);
5362
+ } catch (error) {
5363
+ throw redactProxyError(error);
5364
+ }
5365
+ }
5323
5366
  buildGeminiChunk(part, responseId, model, finishReason, usageMetadata) {
5324
5367
  const response = new GenerateContentResponse();
5325
5368
  response.responseId = responseId;
@@ -8,7 +8,7 @@ import {
8
8
  import {
9
9
  BaseDeclarativeTool,
10
10
  BaseToolInvocation
11
- } from "./chunk-R2B65CAN.js";
11
+ } from "./chunk-JKUAX6UT.js";
12
12
  import {
13
13
  createDebugLogger
14
14
  } from "./chunk-ACBGEKB7.js";
@@ -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
- Default: "Per defecte",
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",