@mmmbuto/qwen-code-termux 0.16.1-termux → 0.18.0-termux

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 (185) hide show
  1. package/README.md +79 -109
  2. package/bundled/new-app/SKILL.md +22 -0
  3. package/bundled/qc-helper/SKILL.md +29 -24
  4. package/bundled/qc-helper/docs/_meta.ts +1 -0
  5. package/bundled/qc-helper/docs/configuration/_meta.ts +0 -3
  6. package/bundled/qc-helper/docs/configuration/settings.md +37 -31
  7. package/bundled/qc-helper/docs/configuration/themes.md +39 -0
  8. package/bundled/qc-helper/docs/features/_meta.ts +1 -3
  9. package/bundled/qc-helper/docs/features/approval-mode.md +35 -35
  10. package/bundled/qc-helper/docs/features/auto-mode.md +54 -9
  11. package/bundled/qc-helper/docs/features/channels/_meta.ts +1 -0
  12. package/bundled/qc-helper/docs/features/channels/feishu.md +170 -0
  13. package/bundled/qc-helper/docs/features/commands.md +115 -35
  14. package/bundled/qc-helper/docs/features/followup-suggestions.md +2 -2
  15. package/bundled/qc-helper/docs/features/headless.md +32 -0
  16. package/bundled/qc-helper/docs/features/markdown-rendering.md +21 -1
  17. package/bundled/qc-helper/docs/features/memory.md +22 -5
  18. package/bundled/qc-helper/docs/features/scheduled-tasks.md +1 -1
  19. package/bundled/qc-helper/docs/features/status-line.md +168 -32
  20. package/bundled/qc-helper/docs/features/sub-agents.md +60 -0
  21. package/bundled/qc-helper/docs/features/worktree.md +345 -0
  22. package/bundled/qc-helper/docs/overview.md +4 -4
  23. package/bundled/qc-helper/docs/quickstart.md +4 -4
  24. package/bundled/qc-helper/docs/qwen-serve-deploy-local.md +221 -0
  25. package/bundled/qc-helper/docs/qwen-serve.md +234 -24
  26. package/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +16 -0
  27. package/bundled/qc-helper/docs/support/Uninstall.md +19 -1
  28. package/bundled/qc-helper/docs/support/troubleshooting.md +2 -1
  29. package/bundled/simplify/SKILL.md +123 -0
  30. package/chunks/agent-IDS4HMOX.js +56 -0
  31. package/chunks/agent-headless-5Q2EUSPS.js +50 -0
  32. package/chunks/{anthropicContentGenerator-SSGKR6DO.js → anthropicContentGenerator-2HBRNQ3B.js} +52 -9
  33. package/chunks/{askUserQuestion-PJWUUXKN.js → askUserQuestion-75TDJVK2.js} +45 -3
  34. package/chunks/{ca-UZ7BANMN.js → ca-BARBRL6N.js} +89 -5
  35. package/chunks/{chunk-GGNTZ2NH.js → chunk-2Y5SYSD3.js} +368 -597
  36. package/chunks/{chunk-2LA2TREA.js → chunk-3AA2DK35.js} +1448 -207
  37. package/chunks/{chunk-I2V5WXHJ.js → chunk-3AUHFMSK.js} +80 -38
  38. package/chunks/chunk-3DHXZ6EV.js +241 -0
  39. package/chunks/{chunk-PR4T27R7.js → chunk-3HTIVKZE.js} +42 -8
  40. package/chunks/chunk-3HX5LZ6R.js +1798 -0
  41. package/chunks/chunk-3PJXIDKI.js +2517 -0
  42. package/chunks/{chunk-MYAKAFEC.js → chunk-55ZMG67I.js} +7451 -3517
  43. package/chunks/{chunk-66CXYE4B.js → chunk-5IFG2VC4.js} +293 -242
  44. package/chunks/chunk-64WXLC72.js +98 -0
  45. package/chunks/{chunk-C6WMLUNB.js → chunk-72LDN5PP.js} +1 -1
  46. package/chunks/{chunk-F23NCRJ2.js → chunk-A7B4ISQP.js} +1 -1
  47. package/chunks/chunk-B7HXHOHU.js +393 -0
  48. package/chunks/{chunk-XEGHDASV.js → chunk-D3RHSPAS.js} +435 -540
  49. package/chunks/{chunk-XKS5KBFJ.js → chunk-EYENRK4D.js} +694 -384
  50. package/chunks/chunk-H6BD2ELD.js +36 -0
  51. package/chunks/{chunk-XP27SJMH.js → chunk-HR7SV7AY.js} +79 -48
  52. package/chunks/{chunk-D5NTAHYL.js → chunk-IDX6COTE.js} +7 -2
  53. package/chunks/{chunk-SHT4VJWU.js → chunk-IWKSG2AR.js} +2 -2
  54. package/chunks/chunk-J37FGIOA.js +1623 -0
  55. package/chunks/chunk-J5MDQKJL.js +2230 -0
  56. package/chunks/{chunk-USE2VQ5P.js → chunk-JTQAQBTV.js} +21 -0
  57. package/chunks/{chunk-NCTLV2NB.js → chunk-KQJMQJPI.js} +1 -1
  58. package/chunks/{chunk-5FBA5XC2.js → chunk-KRIHGKNA.js} +1 -1
  59. package/chunks/chunk-LD2XBG6Z.js +102 -0
  60. package/chunks/{chunk-MAY32HXD.js → chunk-M6VTDSVR.js} +3 -1
  61. package/chunks/chunk-MRO43B25.js +30 -0
  62. package/chunks/{chunk-N4WOREMD.js → chunk-NVFMZBX2.js} +43 -3
  63. package/chunks/chunk-OHEGWO4L.js +264 -0
  64. package/chunks/{chunk-K6O2NBMF.js → chunk-OQ7NJIY7.js} +4604 -6397
  65. package/chunks/chunk-QQDPRDVW.js +25 -0
  66. package/chunks/{chunk-KXZ4TJB4.js → chunk-SEGYWKIH.js} +1 -1
  67. package/chunks/chunk-SKBPNJEW.js +45 -0
  68. package/chunks/{chunk-4AOCVI6J.js → chunk-SNGELLWX.js} +52 -6
  69. package/chunks/{chunk-3OCRHZA3.js → chunk-TD4OPI4T.js} +56742 -44104
  70. package/chunks/{chunk-DQ4QTG7E.js → chunk-VV4F63BD.js} +11 -11
  71. package/chunks/chunk-XBY7E2FX.js +605 -0
  72. package/chunks/{chunk-JKMBWLFB.js → chunk-YILFYI5W.js} +48 -26
  73. package/chunks/chunk-YOGAOMYB.js +159 -0
  74. package/chunks/{chunk-QWSRH265.js → chunk-Z2Z3GUXZ.js} +777 -776
  75. package/chunks/{chunk-SDHRQFOS.js → chunk-ZTZ4DDQE.js} +2 -2
  76. package/chunks/computer-use-W2TYQNEE.js +825 -0
  77. package/chunks/contextCommand-6FGX3A7J.js +52 -0
  78. package/chunks/{cron-create-3ZBBN7WB.js → cron-create-APL5LU6I.js} +3 -3
  79. package/chunks/{cron-delete-NAGKKIIG.js → cron-delete-4SBJSCN4.js} +3 -3
  80. package/chunks/{cron-list-PAGRXNAI.js → cron-list-2AMGOMVO.js} +3 -3
  81. package/chunks/{de-V4IE2OOZ.js → de-YGKK2BC4.js} +89 -5
  82. package/chunks/{devtools-TWVXEJQB.js → devtools-FM6GJPYG.js} +2 -1
  83. package/chunks/{dist-4L54HRX2.js → dist-4LXD6L6X.js} +24 -5
  84. package/chunks/dist-H6ONXVLG.js +94146 -0
  85. package/chunks/{dist-XKWIWPWQ.js → dist-KAZ3SEBX.js} +1083 -3856
  86. package/chunks/{dist-BXDUQ2QY.js → dist-PK7DFCAW.js} +1 -1
  87. package/chunks/{edit-NVO3FOAK.js → edit-ZCEZC264.js} +30 -22
  88. package/chunks/{en-HGJ2SPLM.js → en-DHGYHIHX.js} +127 -6
  89. package/chunks/{enter-worktree-UEBG4WFC.js → enter-worktree-BBHCFCHG.js} +30 -20
  90. package/chunks/enterPlanMode-3M6KTD3B.js +158 -0
  91. package/chunks/{exit-worktree-UZ3MAQZN.js → exit-worktree-73YPIEQO.js} +27 -19
  92. package/chunks/exitPlanMode-TYZM6BAE.js +703 -0
  93. package/chunks/{fr-CJULI7ZX.js → fr-JXBKPJKQ.js} +89 -5
  94. package/chunks/{geminiContentGenerator-3UZFXGNT.js → geminiContentGenerator-7N2V3VW2.js} +8 -6
  95. package/chunks/{getMachineId-bsd-JXOSIJV2.js → getMachineId-bsd-4CASPIU4.js} +4 -4
  96. package/chunks/{getMachineId-darwin-TE4QRR42.js → getMachineId-darwin-HPQPEMZR.js} +4 -4
  97. package/chunks/{getMachineId-linux-S3OL52XK.js → getMachineId-linux-AUARKYHL.js} +3 -3
  98. package/chunks/{getMachineId-unsupported-DWUSBAPX.js → getMachineId-unsupported-S32ZDA2T.js} +3 -3
  99. package/chunks/{getMachineId-win-AAC5P3AP.js → getMachineId-win-4EFLHYIJ.js} +4 -4
  100. package/chunks/{glob-KNHSFFFG.js → glob-5XBCPQ2A.js} +27 -19
  101. package/chunks/{grep-LACWDZW4.js → grep-VIUU3A7X.js} +30 -19
  102. package/chunks/{ja-L7CHRQEW.js → ja-TGPZSP2B.js} +89 -5
  103. package/chunks/{keychain-token-storage-335UOLJ6.js → keychain-token-storage-6IU6ORQN.js} +3 -3
  104. package/chunks/{ls-AGXQOKSG.js → ls-JRGYIGLY.js} +4 -4
  105. package/chunks/{lsp-UDMUHNPA.js → lsp-SHMKFOAC.js} +3 -3
  106. package/chunks/{monitor-ETKWPJEH.js → monitor-6R4LIJL5.js} +40 -25
  107. package/chunks/{multipart-parser-3QWGTLK3.js → multipart-parser-AJ4WASWR.js} +2 -2
  108. package/chunks/{notebook-edit-QJJLPNYT.js → notebook-edit-5E7ULDVQ.js} +28 -20
  109. package/chunks/{openaiContentGenerator-CNNN424U.js → openaiContentGenerator-ZVHFKM3O.js} +17 -14
  110. package/chunks/{pt-M6JULLEQ.js → pt-TIBG6BIO.js} +89 -5
  111. package/chunks/{qwenContentGenerator-BOLCGK3R.js → qwenContentGenerator-B2VTVSPJ.js} +31 -23
  112. package/chunks/{qwenOAuth2-EEJGROP7.js → qwenOAuth2-2KCKWDCF.js} +6 -4
  113. package/chunks/read-file-GIT7BCDR.js +27 -0
  114. package/chunks/ripGrep-MWKFVYMS.js +48 -0
  115. package/chunks/{ru-QILM4HBC.js → ru-JBCHCK4L.js} +89 -5
  116. package/chunks/scheduler-5VOOYGBH.js +308 -0
  117. package/chunks/send-message-4QNWQJF4.js +244 -0
  118. package/chunks/{serve-OLSI7WSR.js → serve-MN6HZBWN.js} +14262 -7414
  119. package/chunks/shell-NQZQGFM2.js +56 -0
  120. package/chunks/{skill-D6YRHTTI.js → skill-WCFW4644.js} +145 -119
  121. package/chunks/{src-TMOD5X6F.js → src-7XL4G4DC.js} +88 -46
  122. package/chunks/{src-4QH4FZ6I.js → src-IHA6DTUV.js} +452 -62
  123. package/chunks/{syntheticOutput-5PVFDDJ4.js → syntheticOutput-YTYS2ZMQ.js} +4 -4
  124. package/chunks/task-create-MPORPYN6.js +19 -0
  125. package/chunks/task-list-R2YDYPZT.js +151 -0
  126. package/chunks/{task-stop-AJKPSR6R.js → task-stop-SYWJYBCM.js} +3 -3
  127. package/chunks/task-update-E4NSLKMQ.js +408 -0
  128. package/chunks/team-create-7R7KA5IP.js +314 -0
  129. package/chunks/team-delete-25OIWUPN.js +116 -0
  130. package/chunks/{todoWrite-VLAUG4CA.js → todoWrite-4YHMIF4X.js} +16 -5
  131. package/chunks/{tool-search-MZGHUUKD.js → tool-search-YBRVZCLI.js} +29 -11
  132. package/chunks/{tts-notification-K3X7X7MN.js → tts-notification-7SOEMQK4.js} +5 -4
  133. package/chunks/{web-fetch-OILB464A.js → web-fetch-MFIRHIHI.js} +5 -5
  134. package/chunks/workflow-5RIKVCIE.js +960 -0
  135. package/chunks/{write-file-BIQAA57V.js → write-file-DMQTJZOM.js} +32 -24
  136. package/chunks/{zh-PWL2NKY3.js → zh-7H5OQC4I.js} +135 -11
  137. package/chunks/{zh-TW-S3YGWICZ.js → zh-TW-P4IDHD3M.js} +128 -11
  138. package/cli.js +45402 -20570
  139. package/examples/agent/agents/diary.md +86 -0
  140. package/examples/agent/qwen-extension.json +5 -0
  141. package/examples/commands/commands/fs/grep-code.md +3 -0
  142. package/examples/commands/qwen-extension.json +5 -0
  143. package/examples/context/QWEN.md +8 -0
  144. package/examples/context/qwen-extension.json +5 -0
  145. package/examples/mcp-server/example.ts +60 -0
  146. package/examples/mcp-server/package.json +18 -0
  147. package/examples/mcp-server/qwen-extension.json +12 -0
  148. package/examples/mcp-server/tsconfig.json +13 -0
  149. package/examples/skills/qwen-extension.json +5 -0
  150. package/examples/skills/skills/synonyms/SKILL.md +48 -0
  151. package/examples/starter/QWEN.md +30 -0
  152. package/examples/starter/README.md +59 -0
  153. package/examples/starter/agents/diary.md +86 -0
  154. package/examples/starter/commands/writing/polish.md +13 -0
  155. package/examples/starter/example.ts +64 -0
  156. package/examples/starter/package.json +18 -0
  157. package/examples/starter/qwen-extension.json +12 -0
  158. package/examples/starter/skills/synonyms/SKILL.md +48 -0
  159. package/examples/starter/tsconfig.json +13 -0
  160. package/fzfWorker.js +1083 -0
  161. package/locales/ca.js +118 -5
  162. package/locales/de.js +117 -5
  163. package/locales/en.js +169 -7
  164. package/locales/fr.js +119 -5
  165. package/locales/ja.js +114 -5
  166. package/locales/pt.js +117 -5
  167. package/locales/ru.js +116 -5
  168. package/locales/zh-TW.js +161 -12
  169. package/locales/zh.js +169 -12
  170. package/package.json +4 -2
  171. package/scripts/postinstall.cjs +2 -1
  172. package/bundled/qc-helper/docs/features/checkpointing.md +0 -77
  173. package/chunks/agent-7ZN3CRHR.js +0 -48
  174. package/chunks/chunk-6PCB2DEF.js +0 -434
  175. package/chunks/chunk-EM6ETG2K.js +0 -60
  176. package/chunks/chunk-G7YTSRES.js +0 -150
  177. package/chunks/contextCommand-7IBASARL.js +0 -44
  178. package/chunks/exitPlanMode-PZAMWIRW.js +0 -227
  179. package/chunks/multipart-parser-IXGBIOIN.js +0 -384
  180. package/chunks/read-file-CCUEUFG2.js +0 -24
  181. package/chunks/ripGrep-TADOH2HK.js +0 -40
  182. package/chunks/send-message-YL44UZFC.js +0 -151
  183. package/chunks/shell-7KKKC5G7.js +0 -48
  184. package/chunks/src-IPWIHNMI.js +0 -1406
  185. package/chunks/undici-F6ZOXSS5.js +0 -8
@@ -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 |
@@ -275,6 +275,66 @@ disallowedTools:
275
275
  ---
276
276
  ```
277
277
 
278
+ #### Claude Code Compatibility Fields
279
+
280
+ Qwen Code accepts the Claude Code 2.1.168 frontmatter fields below so you
281
+ can drop a CC agent file into `.qwen/agents/` and have the supported fields
282
+ parse identically. Optional fields with invalid values are silently dropped
283
+ at parse time rather than rejected — the same lenient posture CC uses.
284
+
285
+ | Field | Type | Notes |
286
+ | ---------------- | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
287
+ | `permissionMode` | enum string | `acceptEdits`, `auto`, `bypassPermissions`, `default`, `dontAsk`, `plan`. Mapped to `approvalMode` at parse time; when both are set, the explicit `approvalMode` wins. |
288
+ | `maxTurns` | positive integer | Caps the agent's turn budget. Wired into `runConfig.max_turns` at runtime; when both are set, the top-level field wins. The legacy nested value is pruned from the on-disk file on save to avoid two sources of truth. |
289
+ | `color` | enum string | Display color. Allowlist: `red`, `blue`, `green`, `yellow`, `purple`, `orange`, `pink`, `cyan` (mirrors CC's `_Y`). The legacy qwen sentinel `auto` is preserved for backward compatibility. Other values are silently dropped on parse. |
290
+ | `mcpServers` | record of specs | Per-agent MCP server overrides. Merged with the session-level MCP server set when the agent spawns; on key collision the agent's spec wins (matching CC's `scope: 'agent'` semantics). Malformed entries are dropped per-key with a warning rather than failing the whole agent. |
291
+ | `hooks` | record of arrays | Per-agent hooks. Keys are CC hook event names (`PreToolUse`, `PostToolUse`, `UserPromptSubmit`, …); values are arrays of `{ matcher?, hooks: [...] }` definitions in the same shape as `settings.json`'s `hooks` field. Registered while the agent runs, removed when it stops. |
292
+
293
+ Example with all of the above:
294
+
295
+ ```
296
+ ---
297
+ name: rigorous-reviewer
298
+ description: Deep code review with a turn cap
299
+ permissionMode: plan
300
+ maxTurns: 50
301
+ color: cyan
302
+ tools:
303
+ - read_file
304
+ - grep_search
305
+ - glob
306
+ mcpServers:
307
+ filesystem:
308
+ type: stdio
309
+ command: node
310
+ args: [/usr/local/lib/mcp-fs/server.js]
311
+ hooks:
312
+ PreToolUse:
313
+ - matcher: Bash
314
+ hooks:
315
+ - type: command
316
+ command: echo "review-agent about to run a shell command"
317
+ ---
318
+
319
+ You are a code reviewer. Analyze the code thoroughly and report findings
320
+ ordered by severity.
321
+ ```
322
+
323
+ The remaining CC frontmatter fields — `effort`, `skills`, `initialPrompt`,
324
+ `memory`, `isolation` — are documented in the declarative-agent design doc
325
+ and land in follow-up PRs once the prerequisite infrastructure exists
326
+ (`effort` needs a model-layer parameter; `memory` needs a scoped memory
327
+ subsystem; `--agent` CLI flag enables `initialPrompt`; etc.).
328
+
329
+ > **`hooks` v1 limitation.** While a subagent declaring `hooks` is running,
330
+ > its hook entries fire for every matching event in the session, not only
331
+ > for that subagent's own tool calls. If two subagents with different
332
+ > per-agent hook sets run concurrently, both sets fire for both agents.
333
+ > Per-agent scope filtering at hook-firing time is left to a follow-up;
334
+ > for v1, prefer per-agent hooks that are safe to fire globally for the
335
+ > duration of the agent's run (e.g. logging) over hooks that mutate
336
+ > behavior.
337
+
278
338
  #### Example Usage
279
339
 
280
340
  ```