@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,50 @@
1
+ // Force strict mode and setup for ESM
2
+ "use strict";
3
+ import {
4
+ AgentHeadless,
5
+ ContextState,
6
+ templateString
7
+ } from "./chunk-TD4OPI4T.js";
8
+ import "./chunk-K5PGHDBN.js";
9
+ import "./chunk-XBY7E2FX.js";
10
+ import "./chunk-SKBPNJEW.js";
11
+ import "./chunk-NVFMZBX2.js";
12
+ import "./chunk-O4PICXES.js";
13
+ import "./chunk-TW522KN6.js";
14
+ import "./chunk-3DHXZ6EV.js";
15
+ import "./chunk-J5MDQKJL.js";
16
+ import "./chunk-MLZQVCF3.js";
17
+ import "./chunk-LD2XBG6Z.js";
18
+ import "./chunk-OHEGWO4L.js";
19
+ import "./chunk-SNGELLWX.js";
20
+ import "./chunk-77WXWU44.js";
21
+ import "./chunk-A7B4ISQP.js";
22
+ import "./chunk-OQ7NJIY7.js";
23
+ import "./chunk-3PJXIDKI.js";
24
+ import "./chunk-UWCTAVOD.js";
25
+ import "./chunk-OFEVLU4C.js";
26
+ import "./chunk-3HTIVKZE.js";
27
+ import "./chunk-IDX6COTE.js";
28
+ import "./chunk-KQJMQJPI.js";
29
+ import "./chunk-D3RHSPAS.js";
30
+ import "./chunk-2Y5SYSD3.js";
31
+ import "./chunk-SEGYWKIH.js";
32
+ import "./chunk-64WXLC72.js";
33
+ import "./chunk-B7HXHOHU.js";
34
+ import "./chunk-EYENRK4D.js";
35
+ import "./chunk-M6VTDSVR.js";
36
+ import "./chunk-55ZMG67I.js";
37
+ import "./chunk-H6BD2ELD.js";
38
+ import "./chunk-5IFG2VC4.js";
39
+ import "./chunk-HR7SV7AY.js";
40
+ import "./chunk-ZERZSAZL.js";
41
+ import "./chunk-QN5NZ3UQ.js";
42
+ import "./chunk-BR4QREVK.js";
43
+ import "./chunk-Z2Z3GUXZ.js";
44
+ import "./chunk-A4BMJM77.js";
45
+ import "./chunk-J2S4EL5Y.js";
46
+ export {
47
+ AgentHeadless,
48
+ ContextState,
49
+ templateString
50
+ };
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-KQIKOTQJ.js";
7
7
  import {
8
8
  RequestTokenizer
9
- } from "./chunk-SDHRQFOS.js";
9
+ } from "./chunk-ZTZ4DDQE.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-6PCB2DEF.js";
19
+ } from "./chunk-EYENRK4D.js";
20
20
  import {
21
21
  CAPPED_DEFAULT_MAX_TOKENS,
22
22
  DEFAULT_TIMEOUT,
@@ -25,20 +25,20 @@ import {
25
25
  runtimeDiagnostics,
26
26
  safeJsonParse,
27
27
  tokenLimit
28
- } from "./chunk-MAY32HXD.js";
28
+ } from "./chunk-M6VTDSVR.js";
29
29
  import {
30
30
  FinishReason,
31
31
  GenerateContentResponse
32
- } from "./chunk-MYAKAFEC.js";
33
- import "./chunk-66CXYE4B.js";
32
+ } from "./chunk-55ZMG67I.js";
33
+ import "./chunk-H6BD2ELD.js";
34
+ import "./chunk-5IFG2VC4.js";
34
35
  import {
35
36
  createDebugLogger
36
- } from "./chunk-XP27SJMH.js";
37
- import "./chunk-XKS5KBFJ.js";
37
+ } from "./chunk-HR7SV7AY.js";
38
38
  import {
39
39
  require_ms
40
40
  } from "./chunk-BR4QREVK.js";
41
- import "./chunk-QWSRH265.js";
41
+ import "./chunk-Z2Z3GUXZ.js";
42
42
  import {
43
43
  init_esbuild_shims
44
44
  } from "./chunk-A4BMJM77.js";
@@ -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;
@@ -1,16 +1,19 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
+ import {
4
+ CAP_ESCALATION_LABELS
5
+ } from "./chunk-QQDPRDVW.js";
3
6
  import "./chunk-MLZQVCF3.js";
4
7
  import {
5
8
  BaseDeclarativeTool,
6
9
  BaseToolInvocation,
7
10
  ToolDisplayNames,
8
11
  ToolNames
9
- } from "./chunk-XEGHDASV.js";
12
+ } from "./chunk-D3RHSPAS.js";
10
13
  import {
11
14
  createDebugLogger
12
- } from "./chunk-XP27SJMH.js";
13
- import "./chunk-QWSRH265.js";
15
+ } from "./chunk-HR7SV7AY.js";
16
+ import "./chunk-Z2Z3GUXZ.js";
14
17
  import {
15
18
  init_esbuild_shims
16
19
  } from "./chunk-A4BMJM77.js";
@@ -177,6 +180,7 @@ var AskUserQuestionToolInvocation = class extends BaseToolInvocation {
177
180
  const question = this.params.questions[questionIndex];
178
181
  return `**${question?.header || `Question ${questionIndex + 1}`}**: ${value}`;
179
182
  }).join("\n");
183
+ this.applyPlanGateMetadata();
180
184
  const llmMessage = `User has provided the following answers:
181
185
 
182
186
  ${answersContent}`;
@@ -199,6 +203,44 @@ ${answersContent}`;
199
203
  };
200
204
  }
201
205
  }
206
+ /**
207
+ * Updates Plan Approval Gate state based on the metadata.source field
208
+ * and the user's answer. Only acts on recognized gate metadata sources.
209
+ */
210
+ applyPlanGateMetadata() {
211
+ const source = this.params.metadata?.source;
212
+ if (!source) return;
213
+ const gateState = this._config.getPlanGateState();
214
+ if (!gateState) return;
215
+ if (source === "plan_gate_cap") {
216
+ if (!gateState.capEscalationPending) {
217
+ debugLogger.warn(
218
+ "[applyPlanGateMetadata] plan_gate_cap ignored: no cap escalation pending"
219
+ );
220
+ return;
221
+ }
222
+ const firstAnswer = Object.values(this.userAnswers)[0] ?? "";
223
+ if (firstAnswer === CAP_ESCALATION_LABELS.CONTINUE) {
224
+ gateState.gateMode = "uncapped";
225
+ } else if (firstAnswer === CAP_ESCALATION_LABELS.APPROVE) {
226
+ gateState.gateMode = "user_override";
227
+ } else {
228
+ gateState.gateMode = "user_takeover";
229
+ }
230
+ gateState.capEscalationPending = false;
231
+ } else if (source === "plan_gate_needs_user") {
232
+ if (!gateState.needsUserPending) {
233
+ debugLogger.warn(
234
+ "[applyPlanGateMetadata] plan_gate_needs_user ignored: no needs_user pending"
235
+ );
236
+ return;
237
+ }
238
+ if (gateState.gateMode === "capped" || gateState.gateMode === "uncapped") {
239
+ gateState.reviewCount = 0;
240
+ }
241
+ gateState.needsUserPending = false;
242
+ }
243
+ }
202
244
  };
203
245
  var AskUserQuestionTool = class _AskUserQuestionTool extends BaseDeclarativeTool {
204
246
  constructor(config) {
@@ -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",
@@ -94,7 +95,30 @@ var ca_default = {
94
95
  // ============================================================================
95
96
  "Analyzes the project and creates a tailored QWEN.md file.": "Analitza el projecte i crea un fitxer QWEN.md personalitzat.",
96
97
  "List available Qwen Code tools. Usage: /tools [desc]": "Llistar les eines disponibles de Qwen Code. \xDAs: /tools [desc]",
97
- "List available skills.": "Llistar les habilitats disponibles.",
98
+ "Open the skills panel (browse, search, toggle, pick).": "Obrir el panell d'habilitats (explorar, cercar, activar, triar).",
99
+ "Manage Skills": "Gestionar habilitats",
100
+ "Skills configuration saved.": "Configuraci\xF3 d'habilitats desada.",
101
+ "Skills configuration saved, but refresh failed: {{error}}. Restart to ensure the new state is applied.": "Configuraci\xF3 d'habilitats desada, per\xF2 l'actualitzaci\xF3 ha fallat: {{error}}. Reinicia per assegurar-te que el nou estat s'apliqui.",
102
+ "Workspace is untrusted; workspace settings are ignored by the merged config. Run /trust first to persist skills changes here, or edit ~/.qwen/settings.json directly to manage skills at user scope.": "L'espai de treball no \xE9s de confian\xE7a; els par\xE0metres de l'espai de treball s'ignoren a la configuraci\xF3 fusionada. Executa /trust primer, o edita ~/.qwen/settings.json directament per gestionar habilitats a l'\xE0mbit d'usuari.",
103
+ "SkillManager not available.": "SkillManager no disponible.",
104
+ "Loading skills\u2026": "Carregant habilitats\u2026",
105
+ "Failed to load skills: {{error}}": "No s\u2019han pogut carregar les habilitats: {{error}}",
106
+ "Failed to save skills configuration: {{error}}": "No s'ha pogut desar la configuraci\xF3 d'habilitats: {{error}}",
107
+ "All available skills are disabled. Edit ~/.qwen/settings.json or .qwen/settings.json (skills.disabled) to re-enable.": "Totes les habilitats disponibles estan desactivades. Edita ~/.qwen/settings.json o .qwen/settings.json (skills.disabled) per tornar-les a activar.",
108
+ "Press esc to close.": "Prem Esc per tancar.",
109
+ "{{count}} skills \xB7 ": "{{count}} habilitats \xB7 ",
110
+ "{{matched}} / {{total}} skills \xB7 ": "{{matched}} / {{total}} habilitats \xB7 ",
111
+ "Space toggle \xB7 Enter pick (fill input) \xB7 Esc save & exit \xB7 workspace scope": "Espai alternar \xB7 Enter triar (omple l'entrada) \xB7 Esc desar i sortir \xB7 \xE0mbit d'espai de treball",
112
+ "Search:": "Cerca:",
113
+ "type to filter\u2026": "escriu per filtrar\u2026",
114
+ "No skills are currently available.": "No hi ha habilitats disponibles actualment.",
115
+ "All available skills are locked at a higher scope (see below).": "Totes les habilitats disponibles estan bloquejades en un \xE0mbit superior (veure a sota).",
116
+ "No skills match the search.": "Cap habilitat coincideix amb la cerca.",
117
+ "Locked by higher-scope settings (cannot toggle here):": "Bloquejades per par\xE0metres d'\xE0mbit superior (aqu\xED no es poden commutar):",
118
+ "higher scope": "\xE0mbit superior",
119
+ " {{name}} {{description}} [locked: {{scope}}]": " {{name}} {{description}} [bloquejada: {{scope}}]",
120
+ "\u2191/\u2193 navigate \xB7 backspace edits search": "\u2191/\u2193 navega \xB7 Retroc\xE9s edita la cerca",
121
+ Bundled: "Integrada",
98
122
  "Available Qwen Code CLI tools:": "Eines del CLI de Qwen Code disponibles:",
99
123
  "No tools available": "No hi ha eines disponibles",
100
124
  "View or change the approval mode for tool usage": "Veure o canviar el mode d'aprovaci\xF3 per a l'\xFAs d'eines",
@@ -147,7 +171,7 @@ var ca_default = {
147
171
  "open full Qwen Code documentation in your browser": "obrir la documentaci\xF3 completa de Qwen Code al navegador",
148
172
  "Configuration not available.": "Configuraci\xF3 no disponible.",
149
173
  "Connect an LLM provider": "Connectar un prove\xEFdor LLM",
150
- "Copy the last result or code snippet to clipboard": "Copiar l'\xFAltim resultat o fragment de codi al porta-retalls",
174
+ "Copy the last AI response to clipboard (/copy N for Nth-latest)": "Copia l'\xFAltima resposta de la IA al porta-retalls (/copy N per a l'N-\xE8sima)",
151
175
  // ============================================================================
152
176
  // Ordres - Agents
153
177
  // ============================================================================
@@ -359,7 +383,7 @@ var ca_default = {
359
383
  Text: "Text",
360
384
  JSON: "JSON",
361
385
  Plan: "Planificaci\xF3",
362
- Default: "Per defecte",
386
+ "Ask permissions": "Demanar permisos",
363
387
  "Auto Edit": "Edici\xF3 autom\xE0tica",
364
388
  YOLO: "YOLO",
365
389
  "toggle vim mode on/off": "activar/desactivar el mode Vim",
@@ -545,6 +569,7 @@ var ca_default = {
545
569
  "After tool execution fails": "Quan falla l'execuci\xF3 de l'eina",
546
570
  "When notifications are sent": "Quan s'envien notificacions",
547
571
  "When the user submits a prompt": "Quan l'usuari envia un missatge",
572
+ "When a slash command expands into a prompt": "Quan una ordre de barra s'expandeix en un missatge",
548
573
  "When a new session is started": "Quan s'inicia una nova sessi\xF3",
549
574
  "Right before Qwen Code concludes its response": "Immediatament abans que Qwen Code conclou la seva resposta",
550
575
  "When a subagent (Agent tool call) is started": "Quan s'inicia un subagent (crida a l'eina Agent)",
@@ -557,6 +582,7 @@ var ca_default = {
557
582
  "Input to command is JSON with tool_name, tool_input, tool_use_id, error, error_type, is_interrupt, and is_timeout.": "L'entrada a l'ordre \xE9s JSON amb tool_name, tool_input, tool_use_id, error, error_type, is_interrupt i is_timeout.",
558
583
  "Input to command is JSON with notification message and type.": "L'entrada a l'ordre \xE9s JSON amb el missatge de notificaci\xF3 i el tipus.",
559
584
  "Input to command is JSON with original user prompt text.": "L'entrada a l'ordre \xE9s JSON amb el text original del missatge de l'usuari.",
585
+ "Input to command is JSON with command_name, command_args, and expanded prompt text.": "L'entrada a l'ordre \xE9s JSON amb command_name, command_args i el text del missatge expandit.",
560
586
  "Input to command is JSON with session start source.": "L'entrada a l'ordre \xE9s JSON amb la font d'inici de sessi\xF3.",
561
587
  "Input to command is JSON with session end reason.": "L'entrada a l'ordre \xE9s JSON amb el motiu de fi de sessi\xF3.",
562
588
  "Input to command is JSON with agent_id and agent_type.": "L'entrada a l'ordre \xE9s JSON amb agent_id i agent_type.",
@@ -570,6 +596,7 @@ var ca_default = {
570
596
  "show stderr to model immediately": "mostrar stderr al model immediatament",
571
597
  "show stderr to user only but continue with tool call": "mostrar stderr nom\xE9s a l'usuari per\xF2 continuar amb la crida a l'eina",
572
598
  "block processing, erase original prompt, and show stderr to user only": "blocar el processament, esborrar el missatge original i mostrar stderr nom\xE9s a l'usuari",
599
+ "block expanded prompt submission and show stderr to user only": "blocar l'enviament del missatge expandit i mostrar stderr nom\xE9s a l'usuari",
573
600
  "stdout shown to Qwen": "stdout mostrat a Qwen",
574
601
  "show stderr to user only (blocking errors ignored)": "mostrar stderr nom\xE9s a l'usuari (errors de bloqueig ignorats)",
575
602
  "command completes successfully": "l'ordre es completa correctament",
@@ -598,6 +625,15 @@ var ca_default = {
598
625
  // ============================================================================
599
626
  "Resume a previous session": "Reprendre una sessi\xF3 anterior",
600
627
  "Fork the current conversation into a new session": "Bifurca la conversa actual en una sessi\xF3 nova",
628
+ "Spawn a background agent that inherits the full conversation": "Inicia un agent en segon pla que hereta tota la conversa",
629
+ "Please provide a directive. Usage: /fork <directive>": "Proporcioneu una directiva. \xDAs: /fork <directiva>",
630
+ "Cannot fork while a response or tool call is in progress. Wait for it to finish or resolve the pending tool call.": "No es pot crear una bifurcaci\xF3 mentre hi ha una resposta o una crida a una eina en curs. Espereu que acabi o resolgueu la crida a l'eina pendent.",
631
+ "Cannot fork before the first conversation turn.": "No es pot crear una bifurcaci\xF3 abans del primer torn de conversa.",
632
+ "The /fork command requires the fork feature gate. Set QWEN_CODE_ENABLE_FORK_SUBAGENT=1 to enable it.": "L\u2019ordre /fork requereix el feature gate de fork. Definiu QWEN_CODE_ENABLE_FORK_SUBAGENT=1 per activar-lo.",
633
+ "The agent tool is unavailable; cannot fork.": "L'eina d'agent no est\xE0 disponible; no es pot crear una bifurcaci\xF3.",
634
+ "Failed to launch fork: {{error}}": "No s\u2019ha pogut iniciar la bifurcaci\xF3: {{error}}",
635
+ "User launched a background fork via /fork: {{directive}}": "L'usuari ha iniciat una bifurcaci\xF3 en segon pla amb /fork: {{directive}}",
636
+ "Forked into a background agent. It inherits this conversation and runs without blocking \u2014 track it in the background tasks panel; it reports back when done.": "S'ha bifurcat a un agent en segon pla. Hereta aquesta conversa i s'executa sense bloquejar \u2014 feu-ne el seguiment al tauler de tasques en segon pla; informar\xE0 quan acabi.",
601
637
  "Cannot branch while a response or tool call is in progress. Wait for it to finish or resolve the pending tool call.": "No es pot bifurcar mentre hi ha una resposta o una crida a una eina en curs. Espereu que acabi o resolgueu la crida a l'eina pendent.",
602
638
  "No conversation to branch.": "No hi ha cap conversa per bifurcar.",
603
639
  "Restore a tool call. This will reset the conversation and file history to the state it was in when the tool call was suggested": "Restaurar una crida a una eina. Aix\xF2 restablir\xE0 la conversa i l'historial de fitxers a l'estat en qu\xE8 es trobaven quan es va suggerir la crida a l'eina",
@@ -630,10 +666,10 @@ var ca_default = {
630
666
  // Ordres - Mode d'aprovació
631
667
  // ============================================================================
632
668
  "Tool Approval Mode": "Mode d'aprovaci\xF3 d'eines",
633
- "{{mode}} mode": "Mode {{mode}}",
634
669
  "Analyze only, do not modify files or execute commands": "Analitzar nom\xE9s, sense modificar fitxers ni executar ordres",
635
670
  "Require approval for file edits or shell commands": "Requerir aprovaci\xF3 per a edicions de fitxers o ordres shell",
636
671
  "Automatically approve file edits": "Aprovar autom\xE0ticament les edicions de fitxers",
672
+ "Use classifier to automatically approve safe tool calls": "Utilitzar el classificador per aprovar autom\xE0ticament les crides segures a eines",
637
673
  "Automatically approve all tools": "Aprovar autom\xE0ticament totes les eines",
638
674
  "Workspace approval mode exists and takes priority. User-level change will have no effect.": "Existeix un mode d'aprovaci\xF3 de l'espai de treball i t\xE9 prioritat. El canvi a nivell d'usuari no tindr\xE0 cap efecte.",
639
675
  "Apply To": "Aplicar a",
@@ -641,6 +677,7 @@ var ca_default = {
641
677
  "Open auto-memory folder": "Obrir la carpeta de mem\xF2ria autom\xE0tica",
642
678
  "Auto-memory: {{status}}": "Mem\xF2ria autom\xE0tica: {{status}}",
643
679
  "Auto-dream: {{status}} \xB7 {{lastDream}} \xB7 /dream to run": "Auto-dream: {{status}} \xB7 {{lastDream}} \xB7 /dream per executar",
680
+ "Auto-skill: {{status}}": "Habilitat autom\xE0tica: {{status}}",
644
681
  never: "mai",
645
682
  on: "activada",
646
683
  off: "desactivada",
@@ -1050,6 +1087,21 @@ var ca_default = {
1050
1087
  " Overall Agreement Rate:": " Taxa d'acord global:",
1051
1088
  "No tool calls have been made in this session.": "No s'ha realitzat cap crida a eines en aquesta sessi\xF3.",
1052
1089
  "Session start time is unavailable, cannot calculate stats.": "L'hora d'inici de la sessi\xF3 no est\xE0 disponible, no es poden calcular les estad\xEDstiques.",
1090
+ Activity: "Activitat",
1091
+ Efficiency: "Efici\xE8ncia",
1092
+ Today: "Avui",
1093
+ "Token Trend": "Tend\xE8ncia de Tokens",
1094
+ "Cache Hit Rate": "Taxa d'encert de cache",
1095
+ "Tool Success": "\xC8xit d'eines",
1096
+ "Tool Leaderboard": "Classificaci\xF3 d'eines",
1097
+ Time: "Temps",
1098
+ Success: "\xC8xit",
1099
+ Cache: "Cache",
1100
+ Latency: "Lat\xE8ncia",
1101
+ "Code Impact": "Impacte al codi",
1102
+ net: "net",
1103
+ streak: "ratxa",
1104
+ best: "r\xE8cord",
1053
1105
  // ============================================================================
1054
1106
  // Migració del format d'ordres
1055
1107
  // ============================================================================
@@ -1386,7 +1438,39 @@ var ca_default = {
1386
1438
  "Desc:": "Descripci\xF3:",
1387
1439
  "Ref:": "Refer\xE8ncia:",
1388
1440
  "\u4E2D\u56FD (China)": "Xina",
1389
- "\u4E2D\u56FD (China) - \u963F\u91CC\u4E91\u767E\u70BC": "Xina - \u963F\u91CC\u4E91\u767E\u70BC"
1441
+ "\u4E2D\u56FD (China) - \u963F\u91CC\u4E91\u767E\u70BC": "Xina - \u963F\u91CC\u4E91\u767E\u70BC",
1442
+ // Stats Dashboard — Category 2
1443
+ "Activity Heatmap": "Mapa d'activitat",
1444
+ Less: "Menys",
1445
+ More: "M\xE9s",
1446
+ Sessions: "Sessions",
1447
+ Duration: "Durada",
1448
+ Projects: "Projectes",
1449
+ "Loading stats...": "Carregant estad\xEDstiques...",
1450
+ "(no data)": "(sense dades)",
1451
+ d: "d",
1452
+ h: "h",
1453
+ m: "m",
1454
+ Input: "Entrada",
1455
+ Models: "Models",
1456
+ "All time": "Tot el temps",
1457
+ "Last 7 days": "\xDAltims 7 dies",
1458
+ "Last 30 days": "\xDAltims 30 dies",
1459
+ "Show usage statistics dashboard.": "Mostra el tauler d'estad\xEDstiques d'\xFAs.",
1460
+ // Stats Dashboard — keyboard hints (not translated)
1461
+ "tab \xB7 esc": "tab \xB7 esc",
1462
+ "tab \xB7 r dates \xB7 \u2190\u2192 month \xB7 esc": "tab \xB7 r dates \xB7 \u2190\u2192 month \xB7 esc",
1463
+ "tab \xB7 r dates \xB7 esc": "tab \xB7 r dates \xB7 esc",
1464
+ // Stats Dashboard — missing labels
1465
+ "API Requests": "Sol\xB7licituds d'API",
1466
+ "Tool Calls": "Crides d'eines",
1467
+ "Success rate": "Taxa d'\xE8xit",
1468
+ "Code Changes": "Canvis de codi",
1469
+ Tool: "Eina",
1470
+ reqs: "sol.",
1471
+ in: "ent.",
1472
+ out: "sort.",
1473
+ "In/Out": "Ent/Sort"
1390
1474
  };
1391
1475
  export {
1392
1476
  ca_default as default