@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
@@ -0,0 +1,170 @@
1
+ # Feishu (Lark)
2
+
3
+ This guide covers setting up a Qwen Code channel on Feishu (飞书) / Lark.
4
+
5
+ ## Prerequisites
6
+
7
+ - A Feishu organization account
8
+ - A Feishu application with App ID and App Secret (see below)
9
+
10
+ ## Creating an Application
11
+
12
+ 1. Go to the [Feishu Open Platform](https://open.feishu.cn)
13
+ 2. Create a new application (or use an existing one)
14
+ 3. Under the application, enable the **Bot** capability (添加应用能力 → 机器人)
15
+ 4. In **Event Subscriptions** (事件与回调), select **Long Connection** (使用长连接接收事件)
16
+ 5. Add the event `im.message.receive_v1` (接收消息)
17
+ 6. Note the **App ID** (Client ID) and **App Secret** (Client Secret) from the application credentials page
18
+
19
+ ### Required Permissions
20
+
21
+ Enable the following permissions under **Permissions & Scopes** (权限管理):
22
+
23
+ - `im:message` — Read and send messages
24
+ - `im:message:send_as_bot` — Send messages as bot
25
+ - `im:resource` — Access message resources (images, files)
26
+
27
+ ### Publish the Application
28
+
29
+ After configuring permissions and events, create a version and publish it. The bot won't work until the application is published and approved.
30
+
31
+ ## Configuration
32
+
33
+ Add the channel to `~/.qwen/settings.json`:
34
+
35
+ ```json
36
+ {
37
+ "channels": {
38
+ "my-feishu": {
39
+ "type": "feishu",
40
+ "clientId": "<your-app-id>",
41
+ "clientSecret": "<your-app-secret>",
42
+ "senderPolicy": "open",
43
+ "sessionScope": "user",
44
+ "cwd": "/path/to/your/project",
45
+ "groupPolicy": "open",
46
+ "collapsible": true,
47
+ "groups": {
48
+ "*": { "requireMention": true }
49
+ }
50
+ }
51
+ }
52
+ }
53
+ ```
54
+
55
+ ### Configuration Options
56
+
57
+ | Option | Description |
58
+ | ---------------------- | ------------------------------------------------------------------- |
59
+ | `clientId` | Feishu App ID |
60
+ | `clientSecret` | Feishu App Secret |
61
+ | `collapsible` | Collapse long responses into expandable sections (default: `false`) |
62
+ | `collapsibleThreshold` | Character threshold for collapsing (default: `500`) |
63
+ | `webhookPort` | If set, use HTTP webhook mode instead of WebSocket |
64
+ | `verificationToken` | Verification token for webhook mode |
65
+ | `encryptKey` | Encrypt key for webhook mode |
66
+
67
+ ## Running
68
+
69
+ ```bash
70
+ # Start only the Feishu channel
71
+ qwen channel start my-feishu
72
+
73
+ # Or start all configured channels together
74
+ qwen channel start
75
+ ```
76
+
77
+ Open Feishu and send a message to the bot. You should see a streaming interactive card with the response.
78
+
79
+ ## Connection Modes
80
+
81
+ ### WebSocket (Default)
82
+
83
+ WebSocket mode uses an outbound long connection — no public URL or server is needed. This is the recommended mode for most deployments.
84
+
85
+ ### Webhook
86
+
87
+ If you need webhook mode (e.g., for shared applications), set `webhookPort` in your config:
88
+
89
+ ```json
90
+ {
91
+ "channels": {
92
+ "my-feishu": {
93
+ "type": "feishu",
94
+ "webhookPort": 9321,
95
+ "verificationToken": "<from-feishu-console>",
96
+ "encryptKey": "<from-feishu-console>"
97
+ }
98
+ }
99
+ }
100
+ ```
101
+
102
+ Then set the request URL in Feishu Open Platform to `http://<your-server>:9321`.
103
+
104
+ ## Group Chats
105
+
106
+ Feishu bots work in both DM and group conversations. To enable group support:
107
+
108
+ 1. Set `groupPolicy` to `"allowlist"` or `"open"` in your channel config
109
+ 2. Add the bot to a Feishu group
110
+ 3. @mention the bot in the group to trigger a response
111
+
112
+ By default, the bot requires an @mention in group chats (`requireMention: true`). Set `"requireMention": false` for a specific group to make it respond to all messages.
113
+
114
+ ## Features
115
+
116
+ ### Interactive Card Streaming
117
+
118
+ Responses are rendered as Feishu interactive cards with real-time streaming updates. The card shows a "generating" indicator while the response is being produced, and a **Stop** button to cancel generation.
119
+
120
+ ### Quote/Reply Context
121
+
122
+ When you reply to (quote) a message, the quoted content is automatically included as context for the agent. This works for:
123
+
124
+ - Text and rich-text messages
125
+ - Interactive cards (bot's previous responses)
126
+
127
+ ### Images and Files
128
+
129
+ You can send photos and documents to the bot:
130
+
131
+ - **Images:** Analyzed using multimodal vision capabilities
132
+ - **Files:** Downloaded and saved locally for the agent to read
133
+
134
+ ### Concurrent Messages
135
+
136
+ Multiple users can send messages simultaneously in the same group chat. Each message gets its own independent card and response — they don't interfere with each other.
137
+
138
+ ## Key Differences from DingTalk
139
+
140
+ - **Response format:** Uses Feishu interactive cards (v2 schema) with native markdown rendering, including tables
141
+ - **Streaming:** Card content is updated in-place with throttled PATCH requests (1.5s interval)
142
+ - **Connection:** WebSocket via `@larksuiteoapi/node-sdk` — same outbound-only model, no public URL needed
143
+ - **Working indicator:** An "OnIt" emoji reaction is added while processing
144
+ - **Quote context:** Supports quoting both text messages and interactive cards
145
+
146
+ ## Troubleshooting
147
+
148
+ ### Bot doesn't connect
149
+
150
+ - Verify your App ID and App Secret are correct
151
+ - Make sure **Long Connection** is selected in Event Subscriptions
152
+ - Check that the `im.message.receive_v1` event is subscribed
153
+ - Check the terminal output for connection errors
154
+
155
+ ### Bot doesn't respond in groups
156
+
157
+ - Check that `groupPolicy` is set to `"allowlist"` or `"open"` (default is `"disabled"`)
158
+ - Make sure you @mention the bot in the group message
159
+ - Verify the bot has been added to the group
160
+
161
+ ### Card stays in "generating" state
162
+
163
+ - This usually indicates the response completed but the final card update failed
164
+ - Check terminal logs for API errors (rate limiting, card size limits)
165
+ - Very long responses with many tables may hit Feishu's card element limits
166
+
167
+ ### Quote doesn't include card content
168
+
169
+ - The bot reads card content via the `card_msg_content_type=user_card_content` API parameter
170
+ - Ensure the bot has `im:message` permission to read messages
@@ -18,28 +18,39 @@ Slash commands are used to manage Qwen Code sessions, interface, and basic behav
18
18
 
19
19
  These commands help you save, restore, and summarize work progress.
20
20
 
21
- | Command | Description | Usage Examples |
22
- | ----------- | --------------------------------------------------------- | ------------------------------------ |
23
- | `/init` | Analyze current directory and create initial context file | `/init` |
24
- | `/summary` | Generate project summary based on conversation history | `/summary` |
25
- | `/compress` | Replace chat history with summary to save Tokens | `/compress` |
26
- | `/resume` | Resume a previous conversation session | `/resume` |
27
- | `/recap` | Generate a one-line session recap now | `/recap` |
28
- | `/restore` | Restore files to state before tool execution | `/restore` (list) or `/restore <ID>` |
21
+ | Command | Description | Usage Examples |
22
+ | ---------------- | ------------------------------------------------------------------------ | ------------------------------------------------------------- |
23
+ | `/init` | Analyze current directory and create initial context file | `/init` |
24
+ | `/summary` | Generate project summary based on conversation history | `/summary` |
25
+ | `/compress` | Replace chat history with summary to save Tokens | `/compress` |
26
+ | `/compress-fast` | Fast compression without AI — strips old tool outputs and thinking parts | `/compress-fast` |
27
+ | `/resume` | Resume a previous conversation session | `/resume` |
28
+ | `/recap` | Generate a one-line session recap now | `/recap` |
29
+ | `/restore` | Revert project files to the checkpoint before a tool call ran | `/restore` (list) or `/restore <ID>` |
30
+ | `/delete` | Delete a previous session | `/delete` |
31
+ | `/branch` | Fork the current conversation into a new session | `/branch` |
32
+ | `/fork` | Spawn a background agent that inherits the full conversation | `/fork <directive>` |
33
+ | `/rewind` | Rewind conversation to a previous turn | `/rewind` or `/rollback` |
34
+ | `/export` | Export session history to file | `/export html`, `/export md`, `/export json`, `/export jsonl` |
35
+ | `/rename` | Rename or tag the current session | `/rename My Feature` or `/tag` |
29
36
 
30
37
  ### 1.2 Interface and Workspace Control
31
38
 
32
39
  Commands for adjusting interface appearance and work environment.
33
40
 
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
- | `/theme` | Change Qwen Code visual theme | `/theme` |
40
- | `/vim` | Turn input area Vim editing mode on/off | `/vim` |
41
- | `/directory` | Manage multi-directory support workspace | `/dir add ./src,./tests` |
42
- | `/editor` | Open dialog to select supported editor | `/editor` |
41
+ | Command | Description | Usage Examples |
42
+ | -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- |
43
+ | `/clear` | Clear terminal screen content | `/clear` (shortcut: `Ctrl+L`) |
44
+ | `/context` | Show context window usage breakdown | `/context` |
45
+ | → `detail` | Show per-item context usage breakdown | `/context detail` |
46
+ | `/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` |
47
+ | `/theme` | Change Qwen Code visual theme | `/theme` |
48
+ | `/vim` | Turn input area Vim editing mode on/off | `/vim` |
49
+ | `/directory` | Manage multi-directory support workspace | `/dir add ./src,./tests` |
50
+ | `/editor` | Open dialog to select supported editor | `/editor` |
51
+ | `/statusline` | Open interactive [status line](./status-line.md) preset dialog | `/statusline` |
52
+ | `/statusline <text>` | Generate a command-mode [status line](./status-line.md) via agent | `/statusline show model and git branch` |
53
+ | `/terminal-setup` | Configure terminal keybindings for multiline input | `/terminal-setup` |
43
54
 
44
55
  ### 1.3 Language Settings
45
56
 
@@ -68,6 +79,7 @@ Commands for managing AI tools and models.
68
79
  | →`plan` | Analysis only, no execution | Secure review |
69
80
  | →`default` | Require approval for edits | Daily use |
70
81
  | →`auto-edit` | Automatically approve edits | Trusted environment |
82
+ | →`auto` | Classifier-evaluated approval | Autonomous sessions with safety guardrails |
71
83
  | →`yolo` | Automatically approve all | Quick prototyping |
72
84
  | `/model` | Switch model used in current session | `/model` |
73
85
  | `/model --fast` | Set a lighter model for prompt suggestions | `/model --fast qwen3-coder-flash` |
@@ -76,6 +88,14 @@ Commands for managing AI tools and models.
76
88
  | `/remember` | Save a durable memory | `/remember Prefer terse responses` |
77
89
  | `/forget` | Remove matching entries from auto-memory | `/forget <query>` |
78
90
  | `/dream` | Manually run auto-memory consolidation | `/dream` |
91
+ | `/hooks` | Manage Qwen Code hooks | `/hooks`, `/hooks list` |
92
+ | `/permissions` | Manage permission rules | `/permissions` |
93
+ | `/agents` | Manage subagents | `/agents manage`, `/agents create` |
94
+ | `/arena` | Manage Arena sessions | `/arena start`, `/arena status` |
95
+ | `/goal` | Set a goal — keep working until condition met | `/goal <condition>`, `/goal clear` |
96
+ | `/tasks` | List background tasks | `/tasks` |
97
+ | `/lsp` | Show LSP server status | `/lsp` |
98
+ | `/trust` | Manage folder trust settings | `/trust` |
79
99
 
80
100
  ### 1.5 Built-in Skills
81
101
 
@@ -85,6 +105,7 @@ These commands invoke bundled skills that provide specialized workflows.
85
105
  | ------------ | ------------------------------------------------------------------- | ------------------------------------------------- |
86
106
  | `/review` | Review code changes with 5 parallel agents + deterministic analysis | `/review`, `/review 123`, `/review 123 --comment` |
87
107
  | `/loop` | Run a prompt on a recurring schedule | `/loop 5m check the build` |
108
+ | `/simplify` | Review recent changes and apply safe cleanup edits directly | `/simplify`, `/simplify focus on duplication` |
88
109
  | `/qc-helper` | Answer questions about Qwen Code usage and configuration | `/qc-helper how do I configure MCP?` |
89
110
 
90
111
  See [Code Review](./code-review.md) for full `/review` documentation.
@@ -188,7 +209,7 @@ progress; otherwise it waits for the current turn to finish and then fires).
188
209
  Unlike the manual command, the auto-trigger is fully silent on failure: if
189
210
  generation errors or there is nothing to summarize, no message is added to
190
211
  the history. Controlled by the `general.showSessionRecap` setting
191
- (default: `true`); the manual `/recap` command always works regardless of
212
+ (default: `false`); the manual `/recap` command always works regardless of
192
213
  this setting.
193
214
 
194
215
  **Example:**
@@ -205,26 +226,85 @@ this setting.
205
226
  >
206
227
  > Configure a fast model via `/model --fast <model>` (e.g.
207
228
  > `qwen3-coder-flash`) to make `/recap` fast and cheap. Set
208
- > `general.showSessionRecap` to `false` to opt out of the auto-trigger
209
- > while keeping the manual command available.
229
+ > `general.showSessionRecap` to `true` to enable the auto-trigger; the
230
+ > manual `/recap` command always works regardless of this setting.
210
231
 
211
- ### 1.8 Information, Settings, and Help
232
+ ### 1.8 Diff Viewer (`/diff`)
212
233
 
213
- Commands for obtaining information and performing system settings.
234
+ The `/diff` command opens an interactive diff viewer showing uncommitted changes and per-turn diffs. Use ←/→ to switch between the current git diff and individual conversation turns, ↑/↓ to browse files, and Enter to view inline diffs.
235
+
236
+ **How it works:**
237
+
238
+ In interactive mode, `/diff` opens a dialog with a **source picker** along the top:
239
+
240
+ - **Current** — working tree vs HEAD (`git diff HEAD`). Shows all uncommitted changes including staged, unstaged, and untracked files.
241
+ - **T1, T2, T3, …** — per-turn diffs, one tab per model turn that modified files. Most recent turns appear first. Each tab shows a preview of the original prompt for context.
242
+
243
+ The file list displays per-file stats (lines added/removed) with tags for special states (`new`, `deleted`, `untracked`, `binary`, `truncated`, `oversized`). Press Enter on a file to view its inline diff with syntax-highlighted hunks.
244
+
245
+ Per-turn diffs require file checkpointing to be enabled (on by default in interactive mode). When file checkpointing is off, only the "Current" source is available.
246
+
247
+ **Keyboard shortcuts:**
248
+
249
+ | Key | Action |
250
+ | --------- | ------------------------------------------- |
251
+ | `←` / `→` | Switch between sources (Current / T1 / T2…) |
252
+ | `↑` / `↓` | Navigate file list |
253
+ | `j` / `k` | Navigate file list (vim-style) |
254
+ | Enter | View inline diff for selected file |
255
+ | `←` / Esc | Return to file list from inline diff view |
256
+ | Esc | Close the dialog |
257
+
258
+ **Example:**
214
259
 
215
- | Command | Description | Usage Examples |
216
- | --------------- | ----------------------------------------------- | -------------------------------- |
217
- | `/help` | Display help information for available commands | `/help` or `/?` |
218
- | `/status` | Display version information | `/status` or `/about` |
219
- | `/status paths` | Display current session file and log paths | `/status paths` |
220
- | `/stats` | Display detailed statistics for current session | `/stats` |
221
- | `/settings` | Open settings editor | `/settings` |
222
- | `/auth` | Change authentication method | `/auth` |
223
- | `/bug` | Submit issue about Qwen Code | `/bug Button click unresponsive` |
224
- | `/copy` | Copy last output content to clipboard | `/copy` |
225
- | `/quit` | Exit Qwen Code immediately | `/quit` or `/exit` |
260
+ ```
261
+ /diff · Turn 3 "refactor the auth middleware" ──── 3 files +45 -12 ┐
262
+ │ │
263
+ Current · T3 · T2 · T1 ▶ │
264
+ │ │
265
+ src/utils/parser.ts +30 -8 │
266
+ │ src/utils/parser.test.ts +12 -2 │
267
+ │ README.md +3 -2 │
268
+ │ │
269
+ ←/→ source · ↑/↓ file · Enter view · Esc close │
270
+ └─────────────────────────────────────────────────────────────────────┘
271
+ ```
272
+
273
+ **Non-interactive mode:**
274
+
275
+ In headless (`--prompt`) or non-interactive contexts, `/diff` prints a plain-text summary of the working tree vs HEAD. Per-turn navigation is not available.
276
+
277
+ ```
278
+ 3 files changed, +45 / -12
279
+ +30 -8 src/utils/parser.ts
280
+ +12 -2 src/utils/parser.test.ts
281
+ +3 -2 README.md
282
+ ```
283
+
284
+ ### 1.9 Information, Settings, and Help
285
+
286
+ Commands for obtaining information and performing system settings.
226
287
 
227
- ### 1.9 Common Shortcuts
288
+ | Command | Description | Usage Examples |
289
+ | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- |
290
+ | `/help` | Display help information for available commands | `/help` or `/?` |
291
+ | `/status` | Display version information | `/status` or `/about` |
292
+ | `/status paths` | Display current session file and log paths | `/status paths` |
293
+ | `/stats` | Open interactive usage statistics dashboard with three tabs: Session (live metrics), Activity (heatmap, token trend, project ranking), and Efficiency (cache rate, tool leaderboard, model comparison). Use `tab` to switch tabs, `r` to cycle time ranges, `←→` to pan months, `esc` to close. | `/stats` |
294
+ | `/stats model` | Show per-model token breakdown and estimated cost | `/stats model` |
295
+ | `/stats tools` | Show per-tool call counts | `/stats tools` |
296
+ | `/settings` | Open settings editor | `/settings` |
297
+ | `/auth` | Change authentication method | `/auth` |
298
+ | `/doctor` | Run installation and environment diagnostics | `/doctor`, `/doctor memory` |
299
+ | `/docs` | Open full Qwen Code documentation in browser | `/docs` |
300
+ | `/ide` | Manage IDE integration | `/ide status`, `/ide install` |
301
+ | `/insight` | Generate programming insights from chat history | `/insight` |
302
+ | `/setup-github` | Set up GitHub Actions | `/setup-github` |
303
+ | `/bug` | Submit issue about Qwen Code | `/bug Button click unresponsive` |
304
+ | `/copy` | Copy AI output to clipboard (`/copy N` = Nth-last AI message) | `/copy` or `/copy 2` |
305
+ | `/quit` | Exit Qwen Code immediately | `/quit` or `/exit` |
306
+
307
+ ### 1.10 Common Shortcuts
228
308
 
229
309
  | Shortcut | Function | Note |
230
310
  | ------------------ | ----------------------- | ---------------------- |
@@ -234,7 +314,7 @@ Commands for obtaining information and performing system settings.
234
314
  | `Ctrl/cmd+Z` | Undo input | Text editing |
235
315
  | `Ctrl/cmd+Shift+Z` | Redo input | Text editing |
236
316
 
237
- ### 1.10 Authentication Commands
317
+ ### 1.11 Authentication Commands
238
318
 
239
319
  Use `/auth` inside a Qwen Code session to configure authentication. Use `/doctor` to inspect the current authentication and environment status.
240
320
 
@@ -32,7 +32,7 @@ Suggestions are generated when all of the following conditions are met:
32
32
  - There are no errors in the most recent response
33
33
  - No confirmation dialogs are pending (e.g., shell confirmation, permissions)
34
34
  - The approval mode is not set to `plan`
35
- - The feature is enabled in settings (enabled by default)
35
+ - The feature is enabled in settings (disabled by default — set `ui.enableFollowupSuggestions` to `true` to turn it on)
36
36
 
37
37
  Suggestions will not appear in non-interactive mode (e.g., headless/SDK mode).
38
38
 
@@ -72,7 +72,7 @@ These settings can be configured in `settings.json`:
72
72
 
73
73
  | Setting | Type | Default | Description |
74
74
  | ------------------------------ | ------- | ------- | ------------------------------------------------------------------ |
75
- | `ui.enableFollowupSuggestions` | boolean | `true` | Enable or disable followup suggestions |
75
+ | `ui.enableFollowupSuggestions` | boolean | `false` | Enable or disable followup suggestions |
76
76
  | `ui.enableCacheSharing` | boolean | `true` | Use cache-aware forked queries to reduce cost (experimental) |
77
77
  | `ui.enableSpeculation` | boolean | `false` | Speculatively execute suggestions before submission (experimental) |
78
78
  | `fastModel` | string | `""` | Model for prompt suggestions and speculative execution |
@@ -238,9 +238,41 @@ Key command-line options for headless usage:
238
238
  | `--approval-mode` | Set approval mode | `qwen -p "query" --approval-mode auto_edit` |
239
239
  | `--continue` | Resume the most recent session for this project | `qwen --continue -p "Pick up where we left off"` |
240
240
  | `--resume [sessionId]` | Resume a specific session (or choose interactively) | `qwen --resume 123e... -p "Finish the refactor"` |
241
+ | `--max-session-turns` | Cap the number of user/model/tool turns in the run | `qwen -p "..." --max-session-turns 30` |
242
+ | `--max-wall-time` | Wall-clock budget; accepts `90` (s), `30s`, `5m`, `1h`, `1.5h` | `qwen -p "..." --max-wall-time 10m` |
243
+ | `--max-tool-calls` | Cumulative tool-call budget for the run | `qwen -p "..." --max-tool-calls 50` |
241
244
 
242
245
  For complete details on all available configuration options, settings files, and environment variables, see the [Configuration Guide](../configuration/settings).
243
246
 
247
+ ## Safety in unattended runs
248
+
249
+ Headless / CI runs combined with `--yolo` (or `--approval-mode=yolo`) auto-approve every tool call, including `shell`, `write`, and `edit`. **`--yolo` does not enable a sandbox** — those tools run at the host process's privilege level. When Qwen Code detects this combination with no sandbox configured, it prints a one-line warning to stderr at startup. Suppress the warning with `QWEN_CODE_SUPPRESS_YOLO_WARNING=1` once you've reviewed the trade-off.
250
+
251
+ ### Run-level budgets
252
+
253
+ Qwen Code can abort an unattended run when it crosses one of the following thresholds. Each is `-1` (unlimited) by default; setting any one is enough to bound runaway behavior. They are enforced cooperatively against the same `AbortController` that already carries SIGINT, so a budget abort emits a structured `FatalBudgetExceededError` (exit code **55**) — distinct from the turn-cap exit code 53 and SIGINT's 130 so CI scripts can branch on the reason.
254
+
255
+ | Flag | Settings key | What it bounds |
256
+ | --------------------- | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
257
+ | `--max-wall-time` | `model.maxWallTimeSeconds` | Wall-clock duration of the whole run. Flag accepts `90` (s), `30s`, `5m`, `1h`, `1.5h` (fractional units supported). Minimum 1s — sub-second values are rejected as typos. Settings is seconds. |
258
+ | `--max-tool-calls` | `model.maxToolCalls` | Cumulative top-level tool calls dispatched by the main run loop (counts successes _and_ failures — the model still consumes tokens on errors). See "Scope" below for subagent / structured-output exemptions. |
259
+ | `--max-session-turns` | `model.maxSessionTurns` | Number of user/model/tool turns; pre-existing. Exits with code 53 on overrun (distinct from budget exit 55). |
260
+
261
+ #### Scope
262
+
263
+ - **`--max-tool-calls` counts top-level dispatches only.** When the model calls the `agent` tool, the dispatch counts as **1**; inner tool calls performed by the spawned subagent are **not** counted. A model that funnels work through subagents can do unbounded inner work under a small top-level budget. Combine with `--exclude-tools agent` if you need a tighter cap.
264
+ - **`structured_output` is exempt from `--max-tool-calls`.** Under `--json-schema`, the model's terminal `structured_output` call is the "I'm done" contract, not real work — it doesn't count against `--max-tool-calls` so a budget-edge completion isn't aborted as a false positive. The exemption is unconditional (including failed Ajv validations), so a model stuck in a malformed-output retry loop is NOT bounded by `--max-tool-calls`; combine with `--max-session-turns` or `--max-wall-time` to cap retries.
265
+ - **`structured_output` is NOT exempt from `--max-session-turns`.** That counter is pre-existing and bumps for every turn including the terminal contract. Size `--max-session-turns` to `N+1` if you want to allow `N` real-work turns under `--json-schema`.
266
+ - **Single-shot vs `--input-format stream-json`:** in stream-json input mode the daemon resets the budget counters at the start of every user message; the budget is per-message, not per-process.
267
+ - **`qwen serve` / ACP sessions:** the daemon ACP session path does NOT currently consult `--max-wall-time` / `--max-tool-calls` from settings.json. These budgets only apply to single-shot `qwen -p` runs and to `--input-format stream-json` sessions. (`qwen serve` does emit the YOLO-no-sandbox warning at boot if `tools.approvalMode: 'yolo'` is set in settings.)
268
+
269
+ ### Recommended combinations
270
+
271
+ - **Trusted, isolated environment (ephemeral CI runner, container):** `qwen -p "..." --yolo --max-session-turns N --max-wall-time 10m --output-format json`. Pin a turn budget and a wall-clock budget so a stuck agent can't burn through your CI minutes, and capture `--output-format json` for post-run usage / tool-call auditing.
272
+ - **Local machine or shared infra:** also pass `--sandbox` (or set `QWEN_SANDBOX=1`) so shell / write / edit tools run inside the sandbox image.
273
+ - **Long-running CI with retry-on-rate-limit:** combine `QWEN_CODE_UNATTENDED_RETRY=1` with `--max-wall-time`. The retry env keeps the run alive past transient 429 / 529 responses; the wall-clock budget ensures a persistently-failing provider can't extend the job indefinitely.
274
+ - **Bounded auditing / exploration:** for read-only tasks, `--max-tool-calls 25` caps how aggressively the model can grep / read. Combine with `--exclude-tools shell,write,edit` to make the bound meaningful.
275
+
244
276
  ## Examples
245
277
 
246
278
  ### Code review
@@ -150,6 +150,25 @@ response:
150
150
  | `/copy code typescript` | Copies the last `typescript` code block. |
151
151
  | `/copy code mermaid 1` | Copies the first `mermaid` code block. |
152
152
 
153
+ ## Selecting an Earlier AI Message
154
+
155
+ By default `/copy` targets the most recent AI message. Prefix the command with
156
+ a positive integer to copy from the Nth-last AI message instead — handy when
157
+ the latest reply is something low-signal (e.g., a TODO update) and the
158
+ substantive output is one or two turns back.
159
+
160
+ | Command | Behavior |
161
+ | --------------------- | ------------------------------------------------------ |
162
+ | `/copy 2` | Copies the second-to-last AI message in full. |
163
+ | `/copy 3` | Copies the third-to-last AI message in full. |
164
+ | `/copy 2 code python` | Copies the last `python` code block from the 2nd-last. |
165
+ | `/copy 3 latex` | Copies the last LaTeX block from the 3rd-last message. |
166
+
167
+ `/copy 1` is equivalent to `/copy`. If `N` exceeds the number of AI messages
168
+ in the session, `/copy` reports the actual count instead of copying anything.
169
+ Without a leading integer, sub-selectors such as `/copy code python 2` keep
170
+ their existing meaning (the 2nd `python` block in the last message).
171
+
153
172
  ## Current Limits
154
173
 
155
174
  - Mermaid image rendering depends on Mermaid CLI plus terminal image support.
@@ -160,4 +179,5 @@ response:
160
179
  Mermaid layout engine.
161
180
  - Raw mode is global for rendered Markdown blocks; it is not a per-block toggle.
162
181
  - LaTeX rendering covers common symbols and expressions, not full TeX layout.
163
- - Source copy commands operate on the last AI response.
182
+ - Source copy commands target the last AI response by default, or the Nth-last
183
+ when invoked as `/copy N ...`.
@@ -24,15 +24,32 @@ Don't include things Qwen can figure out by reading your code. QWEN.md works bes
24
24
 
25
25
  ### Where to create QWEN.md
26
26
 
27
- | File | Who it applies to |
28
- | ----------------------------- | --------------------------------------------- |
29
- | `~/.qwen/QWEN.md` | You, across all your projects |
30
- | `QWEN.md` in the project root | Your whole team (commit it to source control) |
27
+ | File | Who it applies to |
28
+ | ----------------------------- | ------------------------------------------------ |
29
+ | `~/.qwen/QWEN.md` | You, across all your projects |
30
+ | `QWEN.md` in the project root | Your whole team (commit it to source control) |
31
+ | `.qwen/QWEN.local.md` | Only you, only in this project (keep out of git) |
31
32
 
32
- You can have both. Qwen loads all QWEN.md files it finds when you start a session — your personal one plus any in the project.
33
+ You can have any combination of these. Qwen loads all of them when you start a session.
33
34
 
34
35
  If your repository already has an `AGENTS.md` file for other AI tools, Qwen reads that too. No need to duplicate instructions.
35
36
 
37
+ #### When to use `.qwen/QWEN.local.md`
38
+
39
+ Use it for **project-specific but personal** instructions — things that belong to this project but shouldn't be shared with the team:
40
+
41
+ - Your own cluster ID, container registry namespace, or cloud account
42
+ - A personal debug command that hardcodes your local environment
43
+ - Notes you want Qwen to know about your work-in-progress, but not commit
44
+
45
+ It loads **after** the shared project `QWEN.md`, so your local instructions can supplement or override the team's.
46
+
47
+ **You must gitignore it yourself.** Although `.qwen/` is often treated as a local directory, qwen-code does not generate a `.gitignore` for you, and some projects commit `.qwen/settings.json`. Add this line to your `.gitignore` (or to your global git ignore):
48
+
49
+ ```
50
+ .qwen/QWEN.local.md
51
+ ```
52
+
36
53
  ### Generate one automatically with `/init`
37
54
 
38
55
  Run `/init` and Qwen will analyze your codebase to create a starter QWEN.md with build commands, test instructions, and conventions it finds. If one already exists, it suggests additions instead of overwriting.
@@ -6,7 +6,7 @@ Scheduled tasks let Qwen Code re-run a prompt automatically on an interval. Use
6
6
 
7
7
  Tasks are session-scoped: they live in the current Qwen Code process and are gone when you exit. Nothing is written to disk.
8
8
 
9
- > **Note:** Scheduled tasks are an experimental feature. Enable them with `experimental.cron: true` in your [settings](../configuration/settings.md), or set `QWEN_CODE_ENABLE_CRON=1` in your environment.
9
+ > **Tip:** Scheduled tasks are enabled by default. To disable them, set `experimental.cron: false` in your [settings](../configuration/settings.md), or set `QWEN_CODE_DISABLE_CRON=1` in your environment.
10
10
 
11
11
  ## Schedule a recurring prompt with /loop
12
12