@qwen-code/qwen-code 0.19.2 → 0.19.3-nightly.20260630.e00fe6a27

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 (286) hide show
  1. package/bundled/extension-creator/SKILL.md +357 -0
  2. package/bundled/loop/SKILL.md +21 -7
  3. package/bundled/loop/SKILL.test.ts +41 -0
  4. package/bundled/loop/loop-task-file.test.ts +1064 -0
  5. package/bundled/loop/loop-task-file.ts +404 -0
  6. package/bundled/loop/loop-tick-resolver.test.ts +665 -0
  7. package/bundled/loop/loop-tick-resolver.ts +347 -0
  8. package/bundled/qc-helper/SKILL.md +26 -19
  9. package/bundled/qc-helper/docs/configuration/auth.md +11 -11
  10. package/bundled/qc-helper/docs/configuration/model-providers.md +13 -13
  11. package/bundled/qc-helper/docs/configuration/settings.md +76 -75
  12. package/bundled/qc-helper/docs/features/channels/plugins.md +1 -1
  13. package/bundled/qc-helper/docs/features/commands.md +108 -77
  14. package/bundled/qc-helper/docs/features/hooks.md +6 -1
  15. package/bundled/qc-helper/docs/features/memory.md +52 -0
  16. package/bundled/qc-helper/docs/qwen-serve.md +24 -2
  17. package/bundled/qc-helper/docs/support/tos-privacy.md +16 -3
  18. package/bundled/qc-helper/docs/support/troubleshooting.md +6 -0
  19. package/chunks/{MaxSizedBox-7RERNLFK.js → MaxSizedBox-T5X5MN5Q.js} +29 -27
  20. package/chunks/{StandaloneSessionPicker-S22XBSN6.js → StandaloneSessionPicker-P3E3WTOQ.js} +42 -37
  21. package/chunks/{acpAgent-4MCETHF2.js → acpAgent-QEP6DXFW.js} +864 -175
  22. package/chunks/{agent-K3ENVYSB.js → agent-UDANDUF7.js} +24 -23
  23. package/chunks/{agent-headless-HO3V3A3A.js → agent-headless-KYVSZHSO.js} +24 -23
  24. package/chunks/{anthropicContentGenerator-E3TQ5XJJ.js → anthropicContentGenerator-KWSJAQ7B.js} +33 -12
  25. package/chunks/{artifact-tool-QA4KRO3B.js → artifact-tool-D2X7G3C3.js} +2 -2
  26. package/chunks/{askUserQuestion-HMWXW6VN.js → askUserQuestion-UGETICJQ.js} +2 -2
  27. package/chunks/{bridge-4LV2HBH2.js → bridge-X42LXPTA.js} +31 -30
  28. package/chunks/{ca-7WC7ELX6.js → ca-IUFWESZL.js} +1 -0
  29. package/chunks/{chunk-JXQ23SNT.js → chunk-2JKEQWDZ.js} +623 -78
  30. package/chunks/{chunk-2TJ3YN6Q.js → chunk-2RJA6J57.js} +416 -401
  31. package/chunks/{chunk-3UALQ56H.js → chunk-3227DZO4.js} +1 -1
  32. package/chunks/{chunk-BGUDAULQ.js → chunk-3CPCDXFR.js} +5 -5
  33. package/chunks/{chunk-5RVSM6NW.js → chunk-3HUHAQF3.js} +1 -1
  34. package/chunks/{chunk-D5E5TMYH.js → chunk-3M4W4U5G.js} +16 -2
  35. package/chunks/{chunk-DBZUXSSV.js → chunk-4X7NIEQJ.js} +3 -3
  36. package/chunks/chunk-5GOVVXEV.js +73 -0
  37. package/chunks/{chunk-2BAQ3ACS.js → chunk-5SM4VT6V.js} +405 -5
  38. package/chunks/{chunk-NYOHZYHM.js → chunk-5XQ4A26L.js} +45 -3
  39. package/chunks/{chunk-CI5O6SQL.js → chunk-6FKEVYCD.js} +4 -4
  40. package/chunks/{chunk-ZD3NW5KL.js → chunk-7LM4XHPE.js} +63 -9
  41. package/chunks/chunk-7UNP2XM7.js +840 -0
  42. package/chunks/{chunk-OQHQHJRK.js → chunk-ARYCHZ4B.js} +151 -4775
  43. package/chunks/chunk-BC3C4F3Q.js +40 -0
  44. package/chunks/{chunk-CGEGHF2C.js → chunk-BKXBARJZ.js} +1 -1
  45. package/chunks/chunk-BMFMJINR.js +45 -0
  46. package/chunks/chunk-BOJWHRMX.js +11273 -0
  47. package/chunks/{chunk-CGOMICBE.js → chunk-BSZEQNUA.js} +34 -1
  48. package/chunks/{chunk-OIC6S73E.js → chunk-BUUQ5HPX.js} +1 -1
  49. package/chunks/{chunk-2BIF2NVV.js → chunk-BVSVIN45.js} +2 -2
  50. package/chunks/{chunk-TOEGRAVX.js → chunk-BX5YO7UW.js} +17 -5
  51. package/chunks/{chunk-4W4T77MO.js → chunk-BXVWV4GI.js} +109 -6
  52. package/chunks/{chunk-VQRYPFCV.js → chunk-CYHVPQYT.js} +10 -460
  53. package/chunks/{chunk-PRYMDRBV.js → chunk-DDMOU62Q.js} +1 -1
  54. package/chunks/{chunk-S566HKUS.js → chunk-DHXWNSJA.js} +15 -1
  55. package/chunks/{chunk-F6XNTYNE.js → chunk-E6XQPQXW.js} +30 -307
  56. package/chunks/{chunk-QBZ22PQX.js → chunk-EWALXUAD.js} +3 -1
  57. package/chunks/{chunk-EL5IHQON.js → chunk-EWYQFWYF.js} +6 -27
  58. package/chunks/{chunk-HG6YKEBI.js → chunk-F2DOT6UZ.js} +161 -30
  59. package/chunks/{chunk-JTYRZODB.js → chunk-FOOIZCWL.js} +16 -7
  60. package/chunks/{chunk-EX4W6ZYG.js → chunk-G5G4TFZ7.js} +1 -1
  61. package/chunks/{chunk-EW6C27XX.js → chunk-GEHVIWAT.js} +9 -3
  62. package/chunks/chunk-HEVBZSXG.js +4923 -0
  63. package/chunks/chunk-HFQ2XSE7.js +690 -0
  64. package/chunks/{chunk-PF523XJX.js → chunk-HPGTGMP3.js} +1 -1
  65. package/chunks/{chunk-OTBK43JR.js → chunk-HYCC3XM3.js} +1 -1
  66. package/chunks/{chunk-TMBPDHXD.js → chunk-I4H7PRWQ.js} +1 -1
  67. package/chunks/{chunk-EEEZIVFJ.js → chunk-JOLIREYR.js} +1 -1
  68. package/chunks/{chunk-TZM5JIAX.js → chunk-JYPQTRA3.js} +10 -7
  69. package/chunks/chunk-K5XU6E4T.js +167 -0
  70. package/chunks/{chunk-BS64PXY3.js → chunk-KFVU7ODN.js} +1 -1
  71. package/chunks/{chunk-3RJ3ZPPR.js → chunk-KKQWC6WS.js} +7 -7
  72. package/chunks/{chunk-3QFE4OTE.js → chunk-LBW7NW7X.js} +4 -4
  73. package/chunks/{chunk-Z7XXFPGP.js → chunk-LDWTYE33.js} +1 -1
  74. package/chunks/{chunk-EXMX5YHG.js → chunk-LP5E4YIH.js} +1 -1
  75. package/chunks/{chunk-ZUAXI2OA.js → chunk-M2U5NM24.js} +188 -11366
  76. package/chunks/{chunk-I5T6PIBQ.js → chunk-MBV2CTRL.js} +1010 -925
  77. package/chunks/{chunk-5JZLXFPD.js → chunk-MTHMXSNT.js} +11 -11
  78. package/chunks/{chunk-FPACXT7T.js → chunk-MTJVHQDP.js} +534 -164
  79. package/chunks/chunk-NDOC6M5S.js +481 -0
  80. package/chunks/{chunk-HGNSRCRB.js → chunk-NL4C3H6C.js} +1 -1
  81. package/chunks/{chunk-GZCJS5WH.js → chunk-O2VBQ3Y2.js} +2 -2
  82. package/chunks/{chunk-UN3C6GOR.js → chunk-PPFWEV7G.js} +10 -108
  83. package/chunks/{chunk-RS4HRC75.js → chunk-QI2CFVRF.js} +85 -8
  84. package/chunks/{chunk-XU5P23GN.js → chunk-QLDPRILK.js} +3 -3
  85. package/chunks/chunk-QYUE6W3T.js +123 -0
  86. package/chunks/{chunk-USGMPVOY.js → chunk-R3LHDWF2.js} +21 -12
  87. package/chunks/{chunk-BNXANYLH.js → chunk-RD6YJJJ6.js} +81 -1
  88. package/chunks/{chunk-PXFFKNCO.js → chunk-RIP623NO.js} +4877 -2469
  89. package/chunks/{chunk-XKBP7M7A.js → chunk-RYBSUGOR.js} +142 -30
  90. package/chunks/{chunk-BG4BIP7F.js → chunk-SBBN4BWR.js} +4 -2
  91. package/chunks/{chunk-T2VDEFUU.js → chunk-SKQZZVAV.js} +2 -2
  92. package/chunks/{chunk-5R4SBCX6.js → chunk-SL5MOGQH.js} +3 -3
  93. package/chunks/chunk-SMXULRAN.js +37 -0
  94. package/chunks/{chunk-WA5OJGFL.js → chunk-SS6WJMQK.js} +363 -76
  95. package/chunks/{chunk-UAARVVBI.js → chunk-TNWFHGN6.js} +1 -1
  96. package/chunks/{chunk-I2RFAW6Q.js → chunk-TT6Q3EN4.js} +7 -5
  97. package/chunks/chunk-UAKXW3DN.js +30 -0
  98. package/chunks/{chunk-C4K3FEQ2.js → chunk-UX4SGCGN.js} +32 -3
  99. package/chunks/{chunk-J6AW7O5D.js → chunk-WHDQZHRU.js} +2 -2
  100. package/chunks/{chunk-WGAEWQTF.js → chunk-WN6K47NR.js} +1 -2
  101. package/chunks/{chunk-UAARJR2G.js → chunk-WQT5SOI6.js} +2 -2
  102. package/chunks/{chunk-VYFMN7C6.js → chunk-WUMVIRTN.js} +225 -37
  103. package/chunks/{chunk-R36VMVEP.js → chunk-XJMKOTVV.js} +5 -5
  104. package/chunks/{chunk-TXVGVZYR.js → chunk-XJYUPHRC.js} +3 -3
  105. package/chunks/{chunk-2JD55C6G.js → chunk-Y6YMRS3U.js} +2 -2
  106. package/chunks/{chunk-LLFFKXZZ.js → chunk-YALKC62D.js} +56 -29
  107. package/chunks/{chunk-GYZQA2FO.js → chunk-YLZJCUH6.js} +1 -1
  108. package/chunks/chunk-YTFBURQD.js +313 -0
  109. package/chunks/{chunk-KBXLIVWQ.js → chunk-ZFPRYHWR.js} +2 -2
  110. package/chunks/{chunk-X6EDWN44.js → chunk-ZP6UKOPB.js} +1 -1
  111. package/chunks/{computer-use-6BBRNT6S.js → computer-use-LF2S6LUZ.js} +103 -49
  112. package/chunks/{contextCommand-UJAJ6N57.js → contextCommand-VPX5UG55.js} +26 -25
  113. package/chunks/{cron-create-4KQE6YLH.js → cron-create-SKEY55RG.js} +4 -4
  114. package/chunks/{cron-delete-THME66UP.js → cron-delete-I3NAT32Z.js} +6 -6
  115. package/chunks/{cron-list-7A54SJ5N.js → cron-list-6XRRL6TH.js} +5 -5
  116. package/chunks/{daemon-status-provider-CSL3BUOY.js → daemon-status-provider-5JAWZS4V.js} +34 -34
  117. package/chunks/{de-ACHALDED.js → de-EOW5PVHF.js} +1 -0
  118. package/chunks/{dist-BD27IA3L.js → dist-4FCNM6KJ.js} +2 -2
  119. package/chunks/{dist-OD2FY543.js → dist-O3H4PABL.js} +2 -2
  120. package/chunks/{dist-BOOH5JWN.js → dist-SCAAUWPS.js} +18 -4
  121. package/chunks/{dist-QHJRBCMP.js → dist-UKPWQJCL.js} +44 -2
  122. package/chunks/{dist-QFFZWACU.js → dist-VD7HXTML.js} +20 -9
  123. package/chunks/{earlyInputCapture-X6KMCSHD.js → earlyInputCapture-7FRQMU4P.js} +25 -24
  124. package/chunks/{edit-7J6WXARF.js → edit-REKJDIRL.js} +68 -27
  125. package/chunks/{en-NCUBOJOY.js → en-HPWEJBTR.js} +8 -0
  126. package/chunks/{enter-worktree-KULCKJPJ.js → enter-worktree-GBKUDCD3.js} +24 -23
  127. package/chunks/{enterPlanMode-H2CIOLMH.js → enterPlanMode-WB3Y4FGT.js} +24 -23
  128. package/chunks/{errors-6G2JYR54.js → errors-2XJDYO3M.js} +26 -25
  129. package/chunks/{exit-worktree-ECBWBVC5.js → exit-worktree-KKC7O2ZV.js} +24 -23
  130. package/chunks/{exitPlanMode-DQV56GTW.js → exitPlanMode-7HMS3TF7.js} +24 -23
  131. package/chunks/{fast-path-35JJFS3C.js → fast-path-XVNIYWGG.js} +4 -4
  132. package/chunks/{fast-path-settings-TSVI53EB.js → fast-path-settings-UQLRFDQP.js} +3 -2
  133. package/chunks/{fr-GVKZ27MF.js → fr-BN5NKSAC.js} +1 -0
  134. package/chunks/{gemini-NDTG7WAX.js → gemini-U5TPU3IQ.js} +210 -104
  135. package/chunks/{geminiContentGenerator-XTG6SFLA.js → geminiContentGenerator-ZVWRHXOO.js} +4 -4
  136. package/chunks/{glob-SJ2JBZK4.js → glob-FEJWIH2W.js} +24 -23
  137. package/chunks/{grep-BRMWFEWR.js → grep-KMP25IIA.js} +24 -23
  138. package/chunks/{headlessSafetyWarnings-LJ6FJX77.js → headlessSafetyWarnings-5DEDET4M.js} +24 -23
  139. package/chunks/{initializer-P5AXF7PV.js → initializer-FJTACLOH.js} +31 -28
  140. package/chunks/{ja-FKZ2WZ4D.js → ja-7DEUB2TS.js} +1 -0
  141. package/chunks/{keychain-token-storage-CSYMNRPP.js → keychain-token-storage-YLMDLKXT.js} +2 -2
  142. package/chunks/{list-6COK34BP.js → list-SCQXYJUW.js} +32 -29
  143. package/chunks/{loadedSettingsAdapter-XIUTN245.js → loadedSettingsAdapter-P6KPNAG7.js} +30 -27
  144. package/chunks/{loop-wakeup-33GPXJLA.js → loop-wakeup-FYEQEJUA.js} +7 -7
  145. package/chunks/{ls-BYQY7RVV.js → ls-R5WP4BGZ.js} +4 -4
  146. package/chunks/{lsp-X54RO4IV.js → lsp-GSICJMMW.js} +2 -2
  147. package/chunks/{monitor-DH7KFSJV.js → monitor-JU3HHHVY.js} +24 -23
  148. package/chunks/nonInteractiveCli-IZEKUHU3.js +100 -0
  149. package/chunks/{notebook-edit-D4R4ZLMA.js → notebook-edit-YHY3Z2QQ.js} +52 -23
  150. package/chunks/{openaiContentGenerator-F74IPQ6E.js → openaiContentGenerator-4WUVA3Q2.js} +13 -12
  151. package/chunks/{pt-SY5NCFGR.js → pt-TNZRNLQB.js} +1 -0
  152. package/chunks/{qwenContentGenerator-ATTK5P4D.js → qwenContentGenerator-MVYYR44B.js} +26 -25
  153. package/chunks/{qwenOAuth2-K4AASPCV.js → qwenOAuth2-6HNGHALT.js} +5 -4
  154. package/chunks/{read-file-767G23OY.js → read-file-NABEO2X4.js} +8 -8
  155. package/chunks/{read-mcp-resource-I5HCZJ6X.js → read-mcp-resource-DQQW7H7T.js} +2 -2
  156. package/chunks/{ripGrep-4OMMGSWX.js → ripGrep-YXLK6UTX.js} +24 -23
  157. package/chunks/{ru-FWNXJG4F.js → ru-NIAUBKCN.js} +1 -0
  158. package/chunks/{run-qwen-serve-REKSTYRA.js → run-qwen-serve-4B5QBMLQ.js} +144 -41
  159. package/chunks/{scheduler-UNTFDQLG.js → scheduler-XAKIYBDL.js} +24 -23
  160. package/chunks/{send-message-2DAFXEYP.js → send-message-EE4TWKVU.js} +2 -2
  161. package/chunks/{serve-KZ56QB5S.js → serve-4RXVLUKD.js} +30 -28
  162. package/chunks/{server-BV5TZUMU.js → server-7PA5QGIA.js} +11037 -8747
  163. package/chunks/{session-OIBXFSGD.js → session-WNVWRYAH.js} +194 -57
  164. package/chunks/{settings-WJTCBIRA.js → settings-YJH32TFF.js} +30 -27
  165. package/chunks/{shell-WC52IBHW.js → shell-YFLABOS5.js} +24 -23
  166. package/chunks/{skill-U7F7JR4M.js → skill-N3J7FUAY.js} +38 -11
  167. package/chunks/{spawnChannel-EI2E5BCW.js → spawnChannel-D6WVMFZJ.js} +26 -25
  168. package/chunks/{src-4F6FBZFI.js → src-IU5GDBEH.js} +88 -28
  169. package/chunks/{startInteractiveUI-SFRVB3CE.js → startInteractiveUI-QIPQTRT4.js} +2784 -2474
  170. package/chunks/{syntheticOutput-PPS3HDVA.js → syntheticOutput-T5YHQ6S2.js} +3 -3
  171. package/chunks/{task-create-OUYCA553.js → task-create-BLY7RHXX.js} +6 -6
  172. package/chunks/{task-list-WAX7I2IA.js → task-list-3QUYNVYR.js} +5 -5
  173. package/chunks/{task-stop-CAIL6FNH.js → task-stop-U4RATK2V.js} +2 -2
  174. package/chunks/{task-update-AHEO5OUT.js → task-update-U54O7KJX.js} +6 -6
  175. package/chunks/{team-create-3WC7CIIW.js → team-create-TP4CLLM3.js} +24 -23
  176. package/chunks/{team-delete-HGHFG23B.js → team-delete-LKBYPASD.js} +5 -5
  177. package/chunks/{theme-manager-DICFCT3P.js → theme-manager-N2TBIBZT.js} +25 -24
  178. package/chunks/{todoWrite-IFBMN3FH.js → todoWrite-OYXKTVYN.js} +4 -4
  179. package/chunks/{tool-search-L5K7HLER.js → tool-search-GBBSICYB.js} +101 -16
  180. package/chunks/trustedFolders-F7TBU5CD.js +76 -0
  181. package/chunks/types-QX5C3CHJ.js +12 -0
  182. package/chunks/{validateNonInterActiveAuth-GCH4Z6KI.js → validateNonInterActiveAuth-EQDQPSMI.js} +55 -50
  183. package/chunks/{web-fetch-B5IIQ5TT.js → web-fetch-PCVCML2X.js} +29 -15
  184. package/chunks/{workflow-OB3AND7I.js → workflow-ANJ4FYBK.js} +32 -30
  185. package/chunks/{workspace-providers-status-ZIR5EPOO.js → workspace-providers-status-462QQKQM.js} +32 -29
  186. package/chunks/workspace-service-VTG4G6CW.js +75 -0
  187. package/chunks/{write-file-SEXBNDZM.js → write-file-3P3WMQQW.js} +63 -27
  188. package/chunks/{zh-RBEGQVQT.js → zh-5EUYXASN.js} +8 -0
  189. package/chunks/{zh-TW-QGAVRXT3.js → zh-TW-TR3XYGE5.js} +8 -0
  190. package/cli-entry.js +20 -9
  191. package/cli.js +6 -6
  192. package/locales/ca.js +2 -0
  193. package/locales/de.js +2 -0
  194. package/locales/en.js +14 -0
  195. package/locales/fr.js +2 -0
  196. package/locales/ja.js +1 -0
  197. package/locales/pt.js +2 -0
  198. package/locales/ru.js +2 -0
  199. package/locales/zh-TW.js +12 -0
  200. package/locales/zh.js +12 -0
  201. package/node_modules/@qwen-code/audio-capture/dist/index.d.ts +35 -0
  202. package/node_modules/@qwen-code/audio-capture/dist/index.js +48 -0
  203. package/node_modules/@qwen-code/audio-capture/dist/index.js.map +1 -0
  204. package/node_modules/@qwen-code/audio-capture/dist/platform.d.ts +7 -0
  205. package/node_modules/@qwen-code/audio-capture/dist/platform.js +18 -0
  206. package/node_modules/@qwen-code/audio-capture/dist/platform.js.map +1 -0
  207. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/LICENSE +21 -0
  208. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/README.md +58 -0
  209. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/SECURITY.md +5 -0
  210. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/bin.js +84 -0
  211. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/build-test.js +19 -0
  212. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/index.js +6 -0
  213. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/node-gyp-build.js +207 -0
  214. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/optional.js +7 -0
  215. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/package.json +43 -0
  216. package/node_modules/@qwen-code/audio-capture/package.json +30 -0
  217. package/node_modules/@qwen-code/audio-capture/prebuilds/darwin-arm64/@qwen-code+audio-capture.node +0 -0
  218. package/node_modules/@qwen-code/audio-capture/prebuilds/darwin-x64/@qwen-code+audio-capture.node +0 -0
  219. package/node_modules/@qwen-code/audio-capture/prebuilds/linux-arm64/@qwen-code+audio-capture.node +0 -0
  220. package/node_modules/@qwen-code/audio-capture/prebuilds/linux-x64/@qwen-code+audio-capture.node +0 -0
  221. package/node_modules/@qwen-code/audio-capture/prebuilds/win32-x64/@qwen-code+audio-capture.node +0 -0
  222. package/package.json +18 -6
  223. package/patches/chrome-devtools-mcp+1.4.0.patch +31 -0
  224. package/postinstall.js +50 -0
  225. package/web-shell/assets/{arc-D_ae_Y9k.js → arc-DIemsO_F.js} +1 -1
  226. package/web-shell/assets/{architectureDiagram-3BPJPVTR-BMLRjppa.js → architectureDiagram-3BPJPVTR-CTlUvIQv.js} +1 -1
  227. package/web-shell/assets/{blockDiagram-GPEHLZMM-qVDQC8KL.js → blockDiagram-GPEHLZMM-DG0jmIZK.js} +1 -1
  228. package/web-shell/assets/{c4Diagram-AAUBKEIU-CxWS6MBd.js → c4Diagram-AAUBKEIU-WljDBi55.js} +1 -1
  229. package/web-shell/assets/channel-CbzRbdpA.js +1 -0
  230. package/web-shell/assets/{chunk-2J33WTMH-BtNuY5Yp.js → chunk-2J33WTMH-8nc6onr2.js} +1 -1
  231. package/web-shell/assets/{chunk-4BX2VUAB-BU-x368d.js → chunk-4BX2VUAB-EopXix8Z.js} +1 -1
  232. package/web-shell/assets/{chunk-55IACEB6-DRgTLvBu.js → chunk-55IACEB6-BE4Jz3N3.js} +1 -1
  233. package/web-shell/assets/{chunk-727SXJPM-D2aElv7q.js → chunk-727SXJPM-C_eErgDN.js} +1 -1
  234. package/web-shell/assets/{chunk-AQP2D5EJ-BwHCMRQ0.js → chunk-AQP2D5EJ-DFtVW-Is.js} +1 -1
  235. package/web-shell/assets/{chunk-FMBD7UC4-BMyPH-ku.js → chunk-FMBD7UC4-CJPyxIg9.js} +1 -1
  236. package/web-shell/assets/{chunk-ND2GUHAM-BNKTstUf.js → chunk-ND2GUHAM-Bk-xgj6M.js} +1 -1
  237. package/web-shell/assets/{chunk-QZHKN3VN-gD3vsFId.js → chunk-QZHKN3VN-p3Y4yaFB.js} +1 -1
  238. package/web-shell/assets/classDiagram-4FO5ZUOK-BFdyQ52h.js +1 -0
  239. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-BFdyQ52h.js +1 -0
  240. package/web-shell/assets/{cose-bilkent-S5V4N54A-BG9FAsXE.js → cose-bilkent-S5V4N54A-BCMO6Js3.js} +1 -1
  241. package/web-shell/assets/{dagre-BM42HDAG-Cy1sR7om.js → dagre-BM42HDAG-DUMrwASf.js} +1 -1
  242. package/web-shell/assets/default-aEtf0G7-.svg +1 -0
  243. package/web-shell/assets/{diagram-2AECGRRQ-Bxi1I_Vu.js → diagram-2AECGRRQ-C5d7qJbL.js} +1 -1
  244. package/web-shell/assets/{diagram-5GNKFQAL-BGCJjO6y.js → diagram-5GNKFQAL-CjLzMhbT.js} +1 -1
  245. package/web-shell/assets/{diagram-KO2AKTUF-CMTeLXp7.js → diagram-KO2AKTUF-RCoNWeAm.js} +1 -1
  246. package/web-shell/assets/{diagram-LMA3HP47-BN1wyAGh.js → diagram-LMA3HP47-KThXjaNV.js} +1 -1
  247. package/web-shell/assets/{diagram-OG6HWLK6-UYSG_zcp.js → diagram-OG6HWLK6-DKsC2BWz.js} +1 -1
  248. package/web-shell/assets/{erDiagram-TEJ5UH35-DqXL08lw.js → erDiagram-TEJ5UH35-DJ2ukmq0.js} +1 -1
  249. package/web-shell/assets/{flowDiagram-I6XJVG4X-BPJ9SFji.js → flowDiagram-I6XJVG4X-zzqaARRX.js} +1 -1
  250. package/web-shell/assets/{ganttDiagram-6RSMTGT7-BEd9Pnms.js → ganttDiagram-6RSMTGT7-kFUg-gqT.js} +1 -1
  251. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-DrNRH3oi.js → gitGraphDiagram-PVQCEYII-C6JnMVzD.js} +1 -1
  252. package/web-shell/assets/index-B3XUm7dw.js +713 -0
  253. package/web-shell/assets/index-CHmzAWys.css +5 -0
  254. package/web-shell/assets/{infoDiagram-5YYISTIA-CFYBrkVI.js → infoDiagram-5YYISTIA-XqPVhp89.js} +1 -1
  255. package/web-shell/assets/insert-DmRbh9Rv.svg +1 -0
  256. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-Dxsddth7.js → ishikawaDiagram-YF4QCWOH-D2k8sGpf.js} +1 -1
  257. package/web-shell/assets/{journeyDiagram-JHISSGLW-DxaDK80t.js → journeyDiagram-JHISSGLW-CQEST1GE.js} +1 -1
  258. package/web-shell/assets/{kanban-definition-UN3LZRKU-Q0jQCOct.js → kanban-definition-UN3LZRKU-DZ7kqVBC.js} +1 -1
  259. package/web-shell/assets/{linear-DGGM2kcP.js → linear-B6C_6q_E.js} +1 -1
  260. package/web-shell/assets/{mermaid.core-ByoxnWut.js → mermaid.core-CsyNP1qt.js} +5 -5
  261. package/web-shell/assets/{mindmap-definition-RKZ34NQL-C0ZseHsi.js → mindmap-definition-RKZ34NQL-B1VDIzJq.js} +1 -1
  262. package/web-shell/assets/{pieDiagram-4H26LBE5-MQXNhl5A.js → pieDiagram-4H26LBE5-DN0E7Jwu.js} +1 -1
  263. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-DIR4ee2A.js → quadrantDiagram-W4KKPZXB-UKTQdHKm.js} +1 -1
  264. package/web-shell/assets/queue-DWpnpFgW.svg +1 -0
  265. package/web-shell/assets/{requirementDiagram-4Y6WPE33-BTR0UdYQ.js → requirementDiagram-4Y6WPE33-BRGceQvN.js} +1 -1
  266. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-sfnhMELN.js → sankeyDiagram-5OEKKPKP-2DDyu41v.js} +1 -1
  267. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-DXczHOHH.js → sequenceDiagram-3UESZ5HK-CT5iE8ZU.js} +1 -1
  268. package/web-shell/assets/{stateDiagram-AJRCARHV-DdE_KQFH.js → stateDiagram-AJRCARHV-CqMQ_s4G.js} +1 -1
  269. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-CamhV5pM.js +1 -0
  270. package/web-shell/assets/{timeline-definition-PNZ67QCA-DIc61uE8.js → timeline-definition-PNZ67QCA-Di37QSZU.js} +1 -1
  271. package/web-shell/assets/{vennDiagram-CIIHVFJN-BF7ODmxB.js → vennDiagram-CIIHVFJN-DCXvpz5S.js} +1 -1
  272. package/web-shell/assets/{wardley-L42UT6IY-3pc1MEaw.js → wardley-L42UT6IY-CpUCk6OX.js} +1 -1
  273. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-9jnPcZuP.js → wardleyDiagram-YWT4CUSO-D01pVEBg.js} +1 -1
  274. package/web-shell/assets/{xychartDiagram-2RQKCTM6-DcthaZK6.js → xychartDiagram-2RQKCTM6-DOu5JDoz.js} +1 -1
  275. package/web-shell/index.html +2 -2
  276. package/chunks/chunk-B6HQGTYR.js +0 -410
  277. package/chunks/chunk-R2BXK7SX.js +0 -13
  278. package/chunks/chunk-RKIZXJMB.js +0 -13
  279. package/chunks/nonInteractiveCli-7575LBXP.js +0 -91
  280. package/chunks/workspace-service-OM5D4OI2.js +0 -60
  281. package/web-shell/assets/channel-DYPNiTww.js +0 -1
  282. package/web-shell/assets/classDiagram-4FO5ZUOK-p_g25Tni.js +0 -1
  283. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-p_g25Tni.js +0 -1
  284. package/web-shell/assets/index-CpOXWDPh.js +0 -714
  285. package/web-shell/assets/index-oVK7qhre.css +0 -5
  286. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-BHUSEndU.js +0 -1
@@ -2,9 +2,11 @@
2
2
  "use strict";
3
3
  import {
4
4
  isValidSessionId,
5
- require_undici,
6
5
  validateAuthMethod
7
- } from "./chunk-ZUAXI2OA.js";
6
+ } from "./chunk-BOJWHRMX.js";
7
+ import {
8
+ contextCommand
9
+ } from "./chunk-JYPQTRA3.js";
8
10
  import {
9
11
  VSCODE_SHIFT_ENTER_SEQUENCE,
10
12
  calculateCost,
@@ -15,40 +17,41 @@ import {
15
17
  getSystemInfoFields,
16
18
  useKeypress,
17
19
  writeOsc52
18
- } from "./chunk-JTYRZODB.js";
19
- import {
20
- Text
21
- } from "./chunk-UAARJR2G.js";
22
- import {
23
- isKittyProtocolEnabled
24
- } from "./chunk-JZSY4WP3.js";
25
- import {
26
- contextCommand
27
- } from "./chunk-TZM5JIAX.js";
20
+ } from "./chunk-FOOIZCWL.js";
28
21
  import {
29
22
  isTerminalGoalStatusKind
30
23
  } from "./chunk-KSPVDFE4.js";
24
+ import {
25
+ Text
26
+ } from "./chunk-WQT5SOI6.js";
31
27
  import {
32
28
  require_react
33
29
  } from "./chunk-KYMBIKIW.js";
30
+ import {
31
+ themeManager
32
+ } from "./chunk-I4H7PRWQ.js";
33
+ import {
34
+ isKittyProtocolEnabled
35
+ } from "./chunk-JZSY4WP3.js";
34
36
  import {
35
37
  getErrorMessage as getErrorMessage2
36
- } from "./chunk-5R4SBCX6.js";
38
+ } from "./chunk-SL5MOGQH.js";
37
39
  import {
38
- themeManager
39
- } from "./chunk-TMBPDHXD.js";
40
+ GITHUB_WORKFLOW_PATHS,
41
+ setupGithub
42
+ } from "./chunk-NDOC6M5S.js";
40
43
  import {
41
- formatUnsupportedVoiceModelMessage,
42
- isSelectableVoiceModel
43
- } from "./chunk-NYOHZYHM.js";
44
+ require_undici
45
+ } from "./chunk-M2U5NM24.js";
44
46
  import {
45
- stripUnsafeCharacters
46
- } from "./chunk-CGOMICBE.js";
47
+ stripUnsafeCharacters,
48
+ toCodePoints
49
+ } from "./chunk-BSZEQNUA.js";
47
50
  import {
48
51
  getExtendedSystemInfo,
49
52
  getGitVersion,
50
53
  getNpmVersion
51
- } from "./chunk-CI5O6SQL.js";
54
+ } from "./chunk-6FKEVYCD.js";
52
55
  import {
53
56
  formatDuration,
54
57
  formatMemoryUsage,
@@ -56,16 +59,22 @@ import {
56
59
  } from "./chunk-KHDZHZMH.js";
57
60
  import {
58
61
  parseAcpModelOption
59
- } from "./chunk-RS4HRC75.js";
62
+ } from "./chunk-QI2CFVRF.js";
63
+ import {
64
+ formatUnsupportedVoiceModelMessage,
65
+ getVoiceSettingsScope,
66
+ isSelectableVoiceModel,
67
+ isVoiceEnabled,
68
+ readVoiceMode,
69
+ readVoiceModel
70
+ } from "./chunk-5XQ4A26L.js";
60
71
  import {
61
72
  OUTPUT_LANGUAGE_AUTO,
62
73
  getPersistScopeForModelSelection,
63
74
  isAutoLanguage,
64
- isFolderTrustEnabled,
65
- loadTrustedFolders,
66
75
  resolveOutputLanguage,
67
76
  writeOutputLanguageAndRegisterPath
68
- } from "./chunk-OQHQHJRK.js";
77
+ } from "./chunk-HEVBZSXG.js";
69
78
  import {
70
79
  SUPPORTED_LANGUAGES,
71
80
  getCurrentLanguage,
@@ -73,10 +82,14 @@ import {
73
82
  resolveSupportedLanguage,
74
83
  setLanguageAsync,
75
84
  t
76
- } from "./chunk-5JZLXFPD.js";
85
+ } from "./chunk-MTHMXSNT.js";
86
+ import {
87
+ isFolderTrustEnabled,
88
+ loadTrustedFolders
89
+ } from "./chunk-ARYCHZ4B.js";
77
90
  import {
78
91
  require_strip_json_comments
79
- } from "./chunk-UN3C6GOR.js";
92
+ } from "./chunk-QYUE6W3T.js";
80
93
  import {
81
94
  APPROVAL_MODES,
82
95
  ArenaManager,
@@ -108,18 +121,21 @@ import {
108
121
  flatMapTextParts,
109
122
  generateSessionRecap,
110
123
  getActiveGoal,
124
+ getArenaSystemReminder,
111
125
  getExtensionDescription,
112
126
  getExtensionDisplayName,
113
127
  getIdeInstaller,
114
128
  getInsightPrompt,
115
129
  getLastGoalTerminal,
116
130
  getMCPServerPrompts,
131
+ getPlanModeSystemReminder,
117
132
  getProjectSummaryPrompt,
118
133
  getShellConfiguration,
119
134
  glob,
120
135
  hookEventSupportsMatcher,
121
136
  ideContextStore,
122
137
  isGitRepository,
138
+ isImageCapable,
123
139
  isSuccessStatus,
124
140
  isTerminalStatus,
125
141
  listSavedWorkflows,
@@ -143,21 +159,21 @@ import {
143
159
  stripStartupContext,
144
160
  tryGenerateSessionTitle,
145
161
  unregisterGoalHook
146
- } from "./chunk-PXFFKNCO.js";
162
+ } from "./chunk-RIP623NO.js";
147
163
  import {
148
164
  external_exports
149
165
  } from "./chunk-K5PGHDBN.js";
150
166
  import {
151
167
  runSideQuery
152
- } from "./chunk-BG4BIP7F.js";
168
+ } from "./chunk-SBBN4BWR.js";
153
169
  import {
154
170
  applySkillAllowedTools,
155
171
  buildSkillLlmContent
156
- } from "./chunk-OTBK43JR.js";
172
+ } from "./chunk-HYCC3XM3.js";
157
173
  import {
158
174
  HookEventName,
159
175
  sanitizeUserPromptExpansionAdditionalContext
160
- } from "./chunk-HGNSRCRB.js";
176
+ } from "./chunk-NL4C3H6C.js";
161
177
  import {
162
178
  IdeConnectionEvent,
163
179
  formatTokenUsageSummaryAsCsv,
@@ -167,16 +183,17 @@ import {
167
183
  logIdeConnection,
168
184
  queryTokenUsage,
169
185
  read,
186
+ recordSkillInvocation,
170
187
  resolveOpenAILogDir,
171
188
  uiTelemetryService
172
- } from "./chunk-WA5OJGFL.js";
189
+ } from "./chunk-SS6WJMQK.js";
173
190
  import {
174
191
  getAutoMemoryRoot,
175
192
  getUserAutoMemoryRoot
176
- } from "./chunk-BNXANYLH.js";
193
+ } from "./chunk-RD6YJJJ6.js";
177
194
  import {
178
195
  ToolNames
179
- } from "./chunk-TOEGRAVX.js";
196
+ } from "./chunk-BX5YO7UW.js";
180
197
  import {
181
198
  openBrowserSecurely
182
199
  } from "./chunk-22IFUCVR.js";
@@ -186,12 +203,12 @@ import {
186
203
  getErrorMessage,
187
204
  isSubpath,
188
205
  updateSymlink
189
- } from "./chunk-C4K3FEQ2.js";
206
+ } from "./chunk-UX4SGCGN.js";
190
207
  import {
191
208
  isCpuProfileRecording,
192
209
  startCpuProfile,
193
210
  stopCpuProfile
194
- } from "./chunk-PF523XJX.js";
211
+ } from "./chunk-HPGTGMP3.js";
195
212
  import {
196
213
  init_esbuild_shims
197
214
  } from "./chunk-A4BMJM77.js";
@@ -325,20 +342,26 @@ var getUrlOpenCommand = /* @__PURE__ */ __name(() => {
325
342
  }
326
343
  return openCmd;
327
344
  }, "getUrlOpenCommand");
345
+ function isMidInputCompletableCommand(cmd) {
346
+ return cmd.modelInvocable === true && !cmd.hidden;
347
+ }
348
+ __name(isMidInputCompletableCommand, "isMidInputCompletableCommand");
328
349
  function findMidInputSlashCommand(input, cursorOffset) {
329
350
  if (input.startsWith("/")) return null;
330
- const beforeCursor = input.slice(0, cursorOffset);
351
+ const codePoints = toCodePoints(input);
352
+ const beforeCursor = codePoints.slice(0, cursorOffset).join("");
331
353
  const match = beforeCursor.match(/\s\/([a-zA-Z0-9_:-]*)$/);
332
- if (!match || match.index === void 0) return null;
333
- const slashPos = match.index + 1;
334
- const textAfterSlash = input.slice(slashPos + 1);
354
+ if (!match) return null;
355
+ const partialCommand = match[1];
356
+ const slashPos = cursorOffset - 1 - partialCommand.length;
357
+ const textAfterSlash = codePoints.slice(slashPos + 1).join("");
335
358
  const commandMatch = textAfterSlash.match(/^[a-zA-Z0-9_:-]*/);
336
359
  const fullCommand = commandMatch ? commandMatch[0] : "";
337
360
  if (cursorOffset !== slashPos + 1 + fullCommand.length) return null;
338
361
  return {
339
362
  token: "/" + fullCommand,
340
363
  startPos: slashPos,
341
- partialCommand: input.slice(slashPos + 1, cursorOffset)
364
+ partialCommand
342
365
  };
343
366
  }
344
367
  __name(findMidInputSlashCommand, "findMidInputSlashCommand");
@@ -346,7 +369,7 @@ function getBestSlashCommandMatch(partialCommand, commands, recentCommands) {
346
369
  if (!partialCommand) return null;
347
370
  const query = partialCommand.toLowerCase();
348
371
  const matches = commands.filter((cmd) => {
349
- if (!cmd.modelInvocable) return false;
372
+ if (!isMidInputCompletableCommand(cmd)) return false;
350
373
  const name = cmd.name.toLowerCase();
351
374
  return name.startsWith(query) && (name !== query || !!cmd.argumentHint);
352
375
  }).sort((left, right) => {
@@ -2650,7 +2673,7 @@ init_esbuild_shims();
2650
2673
  // packages/cli/src/ui/hooks/useAutoAcceptIndicator.ts
2651
2674
  init_esbuild_shims();
2652
2675
  var import_react = __toESM(require_react(), 1);
2653
- var AUTO_MODE_FIRST_TIME_MESSAGE = "\u2728 Auto mode enabled.\n An LLM classifier evaluates each tool call and auto-approves safe actions,\n blocks risky ones. Most read-only operations and in-cwd edits skip the\n classifier for speed. To exit: Shift+Tab or /approval-mode default.\n (This notice will not appear again.)";
2676
+ var AUTO_MODE_FIRST_TIME_MESSAGE = "Auto mode enabled.\n An LLM classifier evaluates each tool call \u2014 safe actions auto-approve,\n risky ones are blocked. Exit: Shift+Tab or /approval-mode default.";
2654
2677
  function useAutoAcceptIndicator({
2655
2678
  config,
2656
2679
  settings,
@@ -3255,7 +3278,13 @@ var directoryCommand = {
3255
3278
  }
3256
3279
  if (added.length > 0) {
3257
3280
  try {
3258
- if (config.shouldLoadMemoryFromIncludeDirectories()) {
3281
+ if (config.isSafeMode()) {
3282
+ messages.push(
3283
+ t(
3284
+ "Safe mode active \u2014 skipping memory reload from include directories."
3285
+ )
3286
+ );
3287
+ } else if (config.shouldLoadMemoryFromIncludeDirectories()) {
3259
3288
  const {
3260
3289
  memoryContent,
3261
3290
  fileCount,
@@ -6788,7 +6817,7 @@ async function extractMetadata(conversation, config) {
6788
6817
  const gitBranch = firstRecord?.gitBranch;
6789
6818
  let gitRepo;
6790
6819
  if (cwd) {
6791
- const { getGitRepoName } = await import("./src-4F6FBZFI.js");
6820
+ const { getGitRepoName } = await import("./src-IU5GDBEH.js");
6792
6821
  gitRepo = getGitRepoName(cwd);
6793
6822
  }
6794
6823
  let model;
@@ -7382,10 +7411,10 @@ function formatToolCall(message) {
7382
7411
  lines.push(createCodeBlock(contentData.text, language));
7383
7412
  }
7384
7413
  } else if (item.type === "diff") {
7385
- const path21 = item["path"];
7414
+ const path20 = item["path"];
7386
7415
  const diffText = item["newText"];
7387
7416
  lines.push(`
7388
- *Diff for \`${sanitizeText(path21)}\`:*`);
7417
+ *Diff for \`${sanitizeText(path20)}\`:*`);
7389
7418
  lines.push(createCodeBlock(diffText, "diff"));
7390
7419
  }
7391
7420
  }
@@ -7422,8 +7451,8 @@ function buildFence(value) {
7422
7451
  return "`".repeat(fenceLength);
7423
7452
  }
7424
7453
  __name(buildFence, "buildFence");
7425
- function getLanguageFromPath(path21) {
7426
- const ext = path21.split(".").pop()?.toLowerCase();
7454
+ function getLanguageFromPath(path20) {
7455
+ const ext = path20.split(".").pop()?.toLowerCase();
7427
7456
  switch (ext) {
7428
7457
  case "ts":
7429
7458
  case "tsx":
@@ -10629,10 +10658,16 @@ var memoryCommand = {
10629
10658
 
10630
10659
  // packages/cli/src/ui/commands/modelCommand.ts
10631
10660
  init_esbuild_shims();
10661
+
10662
+ // packages/cli/src/ui/voice/voice-model.ts
10663
+ init_esbuild_shims();
10664
+
10665
+ // packages/cli/src/ui/commands/modelCommand.ts
10632
10666
  var MAIN_MODEL_CONFIGURATION_HINT = "Configure models in settings.modelProviders and ensure the required environment variables are set. In interactive mode, run /auth to configure or switch providers, or run /model without arguments to choose from configured models.";
10633
10667
  var FAST_MODEL_CONFIGURATION_HINT = "Configure models in settings.modelProviders and ensure the required environment variables are set. In interactive mode, run /auth to configure or switch providers, or run /model --fast without a model to choose from configured models.";
10634
- function persistSetting(settings, path21, value) {
10635
- settings.setValue(getPersistScopeForModelSelection(settings), path21, value);
10668
+ var VISION_MODEL_CONFIGURATION_HINT = "Configure an image-capable model in settings.modelProviders and ensure the required environment variables are set. Run /model --vision <model-id> to set it, or leave it unset to auto-pick a same-provider vision model.";
10669
+ function persistSetting(settings, path20, value) {
10670
+ settings.setValue(getPersistScopeForModelSelection(settings), path20, value);
10636
10671
  }
10637
10672
  __name(persistSetting, "persistSetting");
10638
10673
  async function switchMainModel(config, settings, currentAuthType, modelArg) {
@@ -10659,21 +10694,47 @@ function formatUnavailableModelMessage(kind, modelName, authType, availableModel
10659
10694
  new Set(availableModels.map((model) => model.id))
10660
10695
  );
10661
10696
  const availableModelsLine = availableModelIds.length === 0 ? `No models are configured for auth type '${authType}'.` : `Available models for '${authType}': ${availableModelIds.join(", ")}.`;
10697
+ const hint = kind === "Fast model" ? FAST_MODEL_CONFIGURATION_HINT : kind === "Vision model" ? VISION_MODEL_CONFIGURATION_HINT : MAIN_MODEL_CONFIGURATION_HINT;
10662
10698
  return `${kind} '${modelName}' is not available for auth type '${authType}'.
10663
10699
  ${availableModelsLine}
10664
- ` + (kind === "Fast model" ? FAST_MODEL_CONFIGURATION_HINT : MAIN_MODEL_CONFIGURATION_HINT);
10700
+ ` + hint;
10665
10701
  }
10666
10702
  __name(formatUnavailableModelMessage, "formatUnavailableModelMessage");
10667
- function formatUnavailableFastModelMessage(modelName, availableModels) {
10703
+ function formatUnavailableAuxModelMessage(label, modelName, availableModels, hint) {
10668
10704
  const availableModelIds = Array.from(
10669
10705
  new Set(availableModels.map((model) => model.id))
10670
10706
  );
10671
10707
  const availableModelsLine = availableModelIds.length === 0 ? "No models are configured." : `Configured models: ${availableModelIds.join(", ")}.`;
10672
- return `Fast model '${modelName}' is not configured for any auth type.
10708
+ return `${label} '${modelName}' is not configured for any auth type.
10673
10709
  ${availableModelsLine}
10674
- ` + FAST_MODEL_CONFIGURATION_HINT;
10710
+ ` + hint;
10711
+ }
10712
+ __name(formatUnavailableAuxModelMessage, "formatUnavailableAuxModelMessage");
10713
+ function formatUnavailableFastModelMessage(modelName, availableModels) {
10714
+ return formatUnavailableAuxModelMessage(
10715
+ "Fast model",
10716
+ modelName,
10717
+ availableModels,
10718
+ FAST_MODEL_CONFIGURATION_HINT
10719
+ );
10675
10720
  }
10676
10721
  __name(formatUnavailableFastModelMessage, "formatUnavailableFastModelMessage");
10722
+ function formatUnavailableVisionModelMessage(modelName, availableModels) {
10723
+ return formatUnavailableAuxModelMessage(
10724
+ "Vision model",
10725
+ modelName,
10726
+ availableModels,
10727
+ VISION_MODEL_CONFIGURATION_HINT
10728
+ );
10729
+ }
10730
+ __name(formatUnavailableVisionModelMessage, "formatUnavailableVisionModelMessage");
10731
+ function formatNonVisionModelWarning(modelName) {
10732
+ return t(
10733
+ "\u26A0 '{{model}}' is not a known image-capable model; the vision bridge may fail on images.",
10734
+ { model: modelName }
10735
+ );
10736
+ }
10737
+ __name(formatNonVisionModelWarning, "formatNonVisionModelWarning");
10677
10738
  function formatUnavailableVoiceModelMessage(modelName, availableModels) {
10678
10739
  const availableModelIds = Array.from(
10679
10740
  new Set(availableModels.map((model) => model.id))
@@ -10707,10 +10768,10 @@ var modelCommand = {
10707
10768
  completionPriority: 100,
10708
10769
  get description() {
10709
10770
  return t(
10710
- "Switch the model for this session (--fast for suggestion model, --voice for voice transcription model, [model-id] to switch immediately)."
10771
+ "Switch the model for this session (--fast for suggestion model, --voice for voice transcription model, --vision for the vision bridge model, [model-id] to switch immediately)."
10711
10772
  );
10712
10773
  },
10713
- argumentHint: "[--fast|--voice] [<model-id>]",
10774
+ argumentHint: "[--fast|--voice|--vision] [<model-id>]",
10714
10775
  kind: "built-in" /* BUILT_IN */,
10715
10776
  supportedModes: ["interactive", "non_interactive", "acp"],
10716
10777
  completion: /* @__PURE__ */ __name(async (context, partialArg) => {
@@ -10725,6 +10786,12 @@ var modelCommand = {
10725
10786
  {
10726
10787
  value: "--voice",
10727
10788
  description: t("Set the model for voice transcription")
10789
+ },
10790
+ {
10791
+ value: "--vision",
10792
+ description: t(
10793
+ "Set the image-capable model used to transcribe images for a text-only main model"
10794
+ )
10728
10795
  }
10729
10796
  ].filter((item) => item.value.startsWith(partialArg));
10730
10797
  if (flagCompletions.length > 0) {
@@ -10740,6 +10807,9 @@ var modelCommand = {
10740
10807
  } else if (trimmed.startsWith("--voice ")) {
10741
10808
  mode = "voice";
10742
10809
  modelPrefix = trimmed.slice("--voice ".length);
10810
+ } else if (trimmed.startsWith("--vision ")) {
10811
+ mode = "vision";
10812
+ modelPrefix = trimmed.slice("--vision ".length);
10743
10813
  }
10744
10814
  return getAvailableModelIds(context, mode).filter(
10745
10815
  (id) => id.startsWith(modelPrefix)
@@ -10893,6 +10963,83 @@ Use "/model --fast <model-id>" to set fast model.`
10893
10963
  content: t("Fast Model") + ": " + modelName2
10894
10964
  };
10895
10965
  }
10966
+ const isVisionModelCommand = args === "--vision" || args.startsWith("--vision ");
10967
+ if (isVisionModelCommand) {
10968
+ const modelName2 = args.replace("--vision", "").trim();
10969
+ if (!modelName2) {
10970
+ if (context.executionMode !== "interactive") {
10971
+ const visionModel = context.services.settings?.merged?.visionModel?.trim() || t("not set");
10972
+ return {
10973
+ type: "message",
10974
+ messageType: "info",
10975
+ content: t(
10976
+ 'Current vision model: {{visionModel}}\nUse "/model --vision <model-id>" to set the vision bridge model.',
10977
+ { visionModel }
10978
+ )
10979
+ };
10980
+ }
10981
+ return {
10982
+ type: "dialog",
10983
+ dialog: "vision-model"
10984
+ };
10985
+ }
10986
+ if (!settings) {
10987
+ return {
10988
+ type: "message",
10989
+ messageType: "error",
10990
+ content: t("Settings service not available.")
10991
+ };
10992
+ }
10993
+ const selector = (() => {
10994
+ try {
10995
+ return resolveModelId(modelName2);
10996
+ } catch {
10997
+ return void 0;
10998
+ }
10999
+ })();
11000
+ if (!selector) {
11001
+ return {
11002
+ type: "message",
11003
+ messageType: "error",
11004
+ content: formatUnavailableVisionModelMessage(modelName2, [])
11005
+ };
11006
+ }
11007
+ const availableModels = (selector.authType ? config.getAvailableModelsForAuthType(selector.authType) : config.getAllConfiguredModels()).filter((m) => !m.fastOnly && !m.voiceOnly);
11008
+ const matched = availableModels.find(
11009
+ (model) => model.id === selector.modelId
11010
+ );
11011
+ if (!matched) {
11012
+ return {
11013
+ type: "message",
11014
+ messageType: "error",
11015
+ content: selector.authType ? formatUnavailableModelMessage(
11016
+ "Vision model",
11017
+ selector.modelId,
11018
+ selector.authType,
11019
+ availableModels
11020
+ ) : formatUnavailableVisionModelMessage(modelName2, availableModels)
11021
+ };
11022
+ }
11023
+ if (config.isCurrentPrimaryModel(matched)) {
11024
+ return {
11025
+ type: "message",
11026
+ messageType: "error",
11027
+ content: t(
11028
+ "'{{model}}' is the current primary model and cannot be used as the vision bridge. Choose a different image-capable model.",
11029
+ { model: modelName2 }
11030
+ )
11031
+ };
11032
+ }
11033
+ persistSetting(settings, "visionModel", modelName2);
11034
+ config.setVisionModel(modelName2);
11035
+ const visionWarning = isImageCapable(matched) ? "" : `
11036
+ ${formatNonVisionModelWarning(modelName2)}`;
11037
+ return {
11038
+ type: "message",
11039
+ messageType: "info",
11040
+ content: t("Vision Model") + ": " + modelName2 + visionWarning
11041
+ };
11042
+ }
10896
11043
  const contentGeneratorConfig = config.getContentGeneratorConfig();
10897
11044
  if (!contentGeneratorConfig) {
10898
11045
  return {
@@ -10988,7 +11135,7 @@ var rememberCommand = {
10988
11135
  content: t("Config not loaded.")
10989
11136
  };
10990
11137
  }
10991
- const useManagedMemory = config?.getManagedAutoMemoryEnabled() ?? false;
11138
+ const useManagedMemory = config?.isManagedMemoryAvailable() ?? false;
10992
11139
  if (useManagedMemory) {
10993
11140
  const projectDir = config ? getAutoMemoryRoot(config.getProjectRoot()) : void 0;
10994
11141
  const userDir = getUserAutoMemoryRoot();
@@ -11711,6 +11858,12 @@ import * as fs11 from "node:fs/promises";
11711
11858
  import { randomUUID as randomUUID2 } from "node:crypto";
11712
11859
  import path13 from "node:path";
11713
11860
  var VALID_EXPORT_FORMATS = /* @__PURE__ */ new Set(["csv", "json"]);
11861
+ var EMPTY_SKILL_METRICS = {
11862
+ totalCalls: 0,
11863
+ totalSuccess: 0,
11864
+ totalFail: 0,
11865
+ byName: {}
11866
+ };
11714
11867
  function formatInteger(value) {
11715
11868
  return new Intl.NumberFormat(getCurrentLanguage()).format(value);
11716
11869
  }
@@ -11732,6 +11885,32 @@ function formatGroupLines(titleKey, groups) {
11732
11885
  ];
11733
11886
  }
11734
11887
  __name(formatGroupLines, "formatGroupLines");
11888
+ function formatSkillStats(skills) {
11889
+ const skillNames = Object.keys(skills.byName).sort((a, b) => {
11890
+ const countDelta = skills.byName[b].count - skills.byName[a].count;
11891
+ return countDelta !== 0 ? countDelta : a.localeCompare(b);
11892
+ });
11893
+ if (skillNames.length === 0) {
11894
+ return t("No skill usage data yet.");
11895
+ }
11896
+ return [
11897
+ t("Skill calls: {{total}} ({{success}} ok, {{fail}} fail)", {
11898
+ total: String(skills.totalCalls),
11899
+ success: String(skills.totalSuccess),
11900
+ fail: String(skills.totalFail)
11901
+ }),
11902
+ ...skillNames.map((name) => {
11903
+ const stats = skills.byName[name];
11904
+ return t(" {{name}}: {{count}} ({{success}} ok, {{fail}} fail)", {
11905
+ name,
11906
+ count: String(stats.count),
11907
+ success: String(stats.success),
11908
+ fail: String(stats.fail)
11909
+ });
11910
+ })
11911
+ ].join("\n");
11912
+ }
11913
+ __name(formatSkillStats, "formatSkillStats");
11735
11914
  function formatTokenUsageSummary(summary) {
11736
11915
  const label = summary.period === "day" ? t("Daily token usage for {{value}}", { value: summary.value }) : t("Monthly token usage for {{value}}", { value: summary.value });
11737
11916
  return [
@@ -12205,7 +12384,7 @@ var statsCommand = {
12205
12384
  get description() {
12206
12385
  return t("Show usage statistics dashboard.");
12207
12386
  },
12208
- argumentHint: "[model|tools|daily|monthly|export]",
12387
+ argumentHint: "[model|tools|skills|daily|monthly|export]",
12209
12388
  kind: "built-in" /* BUILT_IN */,
12210
12389
  supportedModes: ["interactive", "non_interactive", "acp"],
12211
12390
  action: /* @__PURE__ */ __name((context) => {
@@ -12325,6 +12504,30 @@ var statsCommand = {
12325
12504
  );
12326
12505
  }, "action")
12327
12506
  },
12507
+ {
12508
+ name: "skills",
12509
+ get description() {
12510
+ return t("Show skill-specific usage statistics.");
12511
+ },
12512
+ kind: "built-in" /* BUILT_IN */,
12513
+ supportedModes: ["interactive", "non_interactive", "acp"],
12514
+ action: /* @__PURE__ */ __name((context) => {
12515
+ if (context.executionMode !== "interactive") {
12516
+ const skills = context.session.stats.metrics.skills ?? EMPTY_SKILL_METRICS;
12517
+ return {
12518
+ type: "message",
12519
+ messageType: "info",
12520
+ content: formatSkillStats(skills)
12521
+ };
12522
+ }
12523
+ context.ui.addItem(
12524
+ {
12525
+ type: "skill_stats" /* SKILL_STATS */
12526
+ },
12527
+ Date.now()
12528
+ );
12529
+ }, "action")
12530
+ },
12328
12531
  {
12329
12532
  name: "daily",
12330
12533
  altNames: ["day"],
@@ -13018,27 +13221,6 @@ function getVoiceUnavailableReason(environment = {
13018
13221
  __name(getVoiceUnavailableReason, "getVoiceUnavailableReason");
13019
13222
 
13020
13223
  // packages/cli/src/ui/commands/voice-command.ts
13021
- function getVoiceModel(settings) {
13022
- const value = settings.merged?.voiceModel;
13023
- if (typeof value !== "string") {
13024
- return void 0;
13025
- }
13026
- const trimmed = value.trim();
13027
- return trimmed.length > 0 ? trimmed : void 0;
13028
- }
13029
- __name(getVoiceModel, "getVoiceModel");
13030
- function isVoiceEnabled(settings) {
13031
- return settings.merged?.general?.voice?.enabled === true;
13032
- }
13033
- __name(isVoiceEnabled, "isVoiceEnabled");
13034
- function getVoiceMode(settings) {
13035
- return settings.merged?.general?.voice?.mode === "tap" ? "tap" : "hold";
13036
- }
13037
- __name(getVoiceMode, "getVoiceMode");
13038
- function getVoiceScope(settings) {
13039
- return settings.isTrusted === true && typeof settings.workspace?.settings?.general?.voice?.enabled === "boolean" ? "Workspace" /* Workspace */ : "User" /* User */;
13040
- }
13041
- __name(getVoiceScope, "getVoiceScope");
13042
13224
  var voiceCommand = {
13043
13225
  name: "voice",
13044
13226
  get description() {
@@ -13051,7 +13233,7 @@ var voiceCommand = {
13051
13233
  const settings = context.services.settings;
13052
13234
  const command = args.trim().toLowerCase();
13053
13235
  if (command === "status") {
13054
- const voiceModel2 = getVoiceModel(settings);
13236
+ const voiceModel2 = readVoiceModel(settings);
13055
13237
  const status = isVoiceEnabled(settings) ? "enabled" : "disabled";
13056
13238
  const modelText = voiceModel2 ? t("model: {{voiceModel}}", { voiceModel: voiceModel2 }) : t("no voice model selected");
13057
13239
  return {
@@ -13061,7 +13243,7 @@ var voiceCommand = {
13061
13243
  "Voice dictation: {{status}} (mode: {{mode}}, {{modelText}}).",
13062
13244
  {
13063
13245
  status,
13064
- mode: getVoiceMode(settings),
13246
+ mode: readVoiceMode(settings),
13065
13247
  modelText
13066
13248
  }
13067
13249
  )
@@ -13069,7 +13251,7 @@ var voiceCommand = {
13069
13251
  }
13070
13252
  if (command === "off") {
13071
13253
  settings.setValue(
13072
- getVoiceScope(settings),
13254
+ getVoiceSettingsScope(settings),
13073
13255
  "general.voice.enabled",
13074
13256
  false
13075
13257
  );
@@ -13088,7 +13270,7 @@ var voiceCommand = {
13088
13270
  }
13089
13271
  if (command === "" && isVoiceEnabled(settings)) {
13090
13272
  settings.setValue(
13091
- getVoiceScope(settings),
13273
+ getVoiceSettingsScope(settings),
13092
13274
  "general.voice.enabled",
13093
13275
  false
13094
13276
  );
@@ -13098,7 +13280,7 @@ var voiceCommand = {
13098
13280
  content: t("Voice dictation disabled.")
13099
13281
  };
13100
13282
  }
13101
- const voiceModel = getVoiceModel(settings);
13283
+ const voiceModel = readVoiceModel(settings);
13102
13284
  if (!voiceModel) {
13103
13285
  return {
13104
13286
  type: "message",
@@ -13116,8 +13298,8 @@ var voiceCommand = {
13116
13298
  content: unavailableReason
13117
13299
  };
13118
13300
  }
13119
- const scope = getVoiceScope(settings);
13120
- const mode = command === "tap" ? "tap" : command === "hold" ? "hold" : getVoiceMode(settings);
13301
+ const scope = getVoiceSettingsScope(settings);
13302
+ const mode = command === "tap" ? "tap" : command === "hold" ? "hold" : readVoiceMode(settings);
13121
13303
  settings.setValue(scope, "general.voice.mode", mode);
13122
13304
  settings.setValue(scope, "general.voice.enabled", true);
13123
13305
  return {
@@ -13136,172 +13318,14 @@ var voiceCommand = {
13136
13318
 
13137
13319
  // packages/cli/src/ui/commands/setupGithubCommand.ts
13138
13320
  init_esbuild_shims();
13139
- var import_undici3 = __toESM(require_undici(), 1);
13140
- import path16 from "node:path";
13141
- import * as fs13 from "node:fs";
13142
- import { Writable } from "node:stream";
13143
-
13144
- // packages/cli/src/utils/gitUtils.ts
13145
- init_esbuild_shims();
13146
- var import_undici2 = __toESM(require_undici(), 1);
13147
- import { execSync as execSync2 } from "node:child_process";
13148
- var debugLogger13 = createDebugLogger("GIT");
13149
- var isGitHubRepository = /* @__PURE__ */ __name(() => {
13150
- try {
13151
- const remotes = (execSync2("git remote -v", {
13152
- encoding: "utf-8"
13153
- }) || "").trim();
13154
- return remotes.split("\n").some((line) => {
13155
- const remoteUrl = line.trim().split(/\s+/)[1];
13156
- return remoteUrl ? isGitHubRemoteUrl(remoteUrl) : false;
13157
- });
13158
- } catch (_error) {
13159
- debugLogger13.debug(`Failed to get git remote:`, _error);
13160
- return false;
13161
- }
13162
- }, "isGitHubRepository");
13163
- function isGitHubRemoteUrl(remoteUrl) {
13164
- if (remoteUrl.startsWith("git@github.com:")) {
13165
- return true;
13166
- }
13167
- if (remoteUrl.startsWith("git@")) {
13168
- return false;
13169
- }
13170
- try {
13171
- return new URL(remoteUrl).hostname === "github.com";
13172
- } catch {
13173
- return false;
13174
- }
13175
- }
13176
- __name(isGitHubRemoteUrl, "isGitHubRemoteUrl");
13177
- var getGitRepoRoot = /* @__PURE__ */ __name(() => {
13178
- const gitRepoRoot = (execSync2("git rev-parse --show-toplevel", {
13179
- encoding: "utf-8"
13180
- }) || "").trim();
13181
- if (!gitRepoRoot) {
13182
- throw new Error(`Git repo returned empty value`);
13183
- }
13184
- return gitRepoRoot;
13185
- }, "getGitRepoRoot");
13186
- var getLatestGitHubRelease = /* @__PURE__ */ __name(async (proxy) => {
13187
- try {
13188
- const controller = new AbortController();
13189
- const endpoint = `https://api.github.com/repos/QwenLM/qwen-code-action/releases/latest`;
13190
- const response = await fetch(endpoint, {
13191
- method: "GET",
13192
- headers: {
13193
- Accept: "application/vnd.github+json",
13194
- "Content-Type": "application/json",
13195
- "X-GitHub-Api-Version": "2022-11-28"
13196
- },
13197
- dispatcher: proxy ? new import_undici2.ProxyAgent(proxy) : void 0,
13198
- signal: AbortSignal.any([AbortSignal.timeout(3e4), controller.signal])
13199
- });
13200
- if (!response.ok) {
13201
- throw new Error(
13202
- `Invalid response code: ${response.status} - ${response.statusText}`
13203
- );
13204
- }
13205
- const releaseTag = (await response.json()).tag_name;
13206
- if (!releaseTag) {
13207
- throw new Error(`Response did not include tag_name field`);
13208
- }
13209
- return releaseTag;
13210
- } catch (_error) {
13211
- debugLogger13.debug(
13212
- `Failed to determine latest qwen-code-action release:`,
13213
- _error
13214
- );
13215
- throw new Error(
13216
- `Unable to determine the latest qwen-code-action release on GitHub.`
13217
- );
13218
- }
13219
- }, "getLatestGitHubRelease");
13220
- function getGitHubRepoInfo() {
13221
- const remoteUrl = execSync2("git remote get-url origin", {
13222
- encoding: "utf-8"
13223
- }).trim();
13224
- let urlToParse = remoteUrl;
13225
- if (remoteUrl.startsWith("git@github.com:")) {
13226
- urlToParse = remoteUrl.replace("git@github.com:", "");
13227
- } else if (remoteUrl.startsWith("git@")) {
13228
- throw new Error(
13229
- `Owner & repo could not be extracted from remote URL: ${remoteUrl}`
13230
- );
13231
- }
13232
- let parsedUrl;
13233
- try {
13234
- parsedUrl = new URL(urlToParse, "https://github.com");
13235
- } catch {
13236
- throw new Error(
13237
- `Owner & repo could not be extracted from remote URL: ${remoteUrl}`
13238
- );
13239
- }
13240
- if (parsedUrl.hostname !== "github.com") {
13241
- throw new Error(
13242
- `Owner & repo could not be extracted from remote URL: ${remoteUrl}`
13243
- );
13244
- }
13245
- const parts = parsedUrl.pathname.split("/").filter((part) => part !== "");
13246
- if (parts.length !== 2 || !parts[0] || !parts[1]) {
13247
- throw new Error(
13248
- `Owner & repo could not be extracted from remote URL: ${remoteUrl}`
13249
- );
13250
- }
13251
- return { owner: parts[0], repo: parts[1].replace(/\.git$/, "") };
13252
- }
13253
- __name(getGitHubRepoInfo, "getGitHubRepoInfo");
13254
-
13255
- // packages/cli/src/ui/commands/setupGithubCommand.ts
13256
- var debugLogger14 = createDebugLogger("SETUP_GITHUB");
13257
- var GITHUB_WORKFLOW_PATHS = [
13258
- "qwen-dispatch/qwen-dispatch.yml",
13259
- "qwen-assistant/qwen-invoke.yml",
13260
- "issue-triage/qwen-triage.yml",
13261
- "issue-triage/qwen-scheduled-triage.yml",
13262
- "pr-review/qwen-review.yml"
13263
- ];
13264
- function getOpenUrlsCommands(readmeUrl) {
13321
+ function getOpenUrlsCommands(readmeUrl, secretsUrl) {
13265
13322
  const openCmd = getUrlOpenCommand();
13266
13323
  const urlsToOpen = [readmeUrl];
13267
- const repoInfo = getGitHubRepoInfo();
13268
- if (repoInfo) {
13269
- urlsToOpen.push(
13270
- `https://github.com/${repoInfo.owner}/${repoInfo.repo}/settings/secrets/actions`
13271
- );
13272
- }
13324
+ if (secretsUrl) urlsToOpen.push(secretsUrl);
13273
13325
  const commands = urlsToOpen.map((url) => `${openCmd} "${url}"`);
13274
13326
  return commands;
13275
13327
  }
13276
13328
  __name(getOpenUrlsCommands, "getOpenUrlsCommands");
13277
- async function updateGitignore(gitRepoRoot) {
13278
- const gitignoreEntries = [".qwen/", "gha-creds-*.json"];
13279
- const gitignorePath = path16.join(gitRepoRoot, ".gitignore");
13280
- try {
13281
- let existingContent = "";
13282
- let fileExists = true;
13283
- try {
13284
- existingContent = await fs13.promises.readFile(gitignorePath, "utf8");
13285
- } catch (_error) {
13286
- fileExists = false;
13287
- }
13288
- if (!fileExists) {
13289
- const contentToWrite = gitignoreEntries.join("\n") + "\n";
13290
- await fs13.promises.writeFile(gitignorePath, contentToWrite);
13291
- } else {
13292
- const missingEntries = gitignoreEntries.filter(
13293
- (entry) => !existingContent.split(/\r?\n/).some((line) => line.split("#")[0].trim() === entry)
13294
- );
13295
- if (missingEntries.length > 0) {
13296
- const contentToAdd = "\n" + missingEntries.join("\n") + "\n";
13297
- await fs13.promises.appendFile(gitignorePath, contentToAdd);
13298
- }
13299
- }
13300
- } catch (error) {
13301
- debugLogger14.debug("Failed to update .gitignore:", error);
13302
- }
13303
- }
13304
- __name(updateGitignore, "updateGitignore");
13305
13329
  var setupGithubCommand = {
13306
13330
  name: "setup-github",
13307
13331
  get description() {
@@ -13318,84 +13342,17 @@ var setupGithubCommand = {
13318
13342
  { once: true }
13319
13343
  );
13320
13344
  }
13321
- if (!isGitHubRepository()) {
13322
- throw new Error(
13323
- "Unable to determine the GitHub repository. /setup-github must be run from a git repository."
13324
- );
13325
- }
13326
- let gitRepoRoot;
13327
- try {
13328
- gitRepoRoot = getGitRepoRoot();
13329
- } catch (_error) {
13330
- debugLogger14.debug(`Failed to get git repo root:`, _error);
13331
- throw new Error(
13332
- "Unable to determine the GitHub repository. /setup-github must be run from a git repository."
13333
- );
13334
- }
13335
13345
  const proxy = context?.services?.config?.getProxy();
13336
- const releaseTag = await getLatestGitHubRelease(proxy);
13337
- const readmeUrl = `https://github.com/QwenLM/qwen-code-action/blob/${releaseTag}/README.md#quick-start`;
13338
- const githubWorkflowsDir = path16.join(gitRepoRoot, ".github", "workflows");
13339
- try {
13340
- await fs13.promises.mkdir(githubWorkflowsDir, { recursive: true });
13341
- } catch (_error) {
13342
- debugLogger14.debug(
13343
- `Failed to create ${githubWorkflowsDir} directory:`,
13344
- _error
13345
- );
13346
- throw new Error(
13347
- `Unable to create ${githubWorkflowsDir} directory. Do you have file permissions in the current directory?`
13348
- );
13349
- }
13350
- const downloads = [];
13351
- for (const workflow of GITHUB_WORKFLOW_PATHS) {
13352
- downloads.push(
13353
- (async () => {
13354
- const endpoint = `https://raw.githubusercontent.com/QwenLM/qwen-code-action/refs/tags/${releaseTag}/examples/workflows/${workflow}`;
13355
- const response = await fetch(endpoint, {
13356
- method: "GET",
13357
- dispatcher: proxy ? new import_undici3.ProxyAgent(proxy) : void 0,
13358
- signal: AbortSignal.any([
13359
- AbortSignal.timeout(3e4),
13360
- abortController.signal
13361
- ])
13362
- });
13363
- if (!response.ok) {
13364
- throw new Error(
13365
- `Invalid response code downloading ${endpoint}: ${response.status} - ${response.statusText}`
13366
- );
13367
- }
13368
- const body = response.body;
13369
- if (!body) {
13370
- throw new Error(
13371
- `Empty body while downloading ${endpoint}: ${response.status} - ${response.statusText}`
13372
- );
13373
- }
13374
- const destination = path16.resolve(
13375
- githubWorkflowsDir,
13376
- path16.basename(workflow)
13377
- );
13378
- const fileStream = fs13.createWriteStream(destination, {
13379
- mode: 420,
13380
- // -rw-r--r--, user(rw), group(r), other(r)
13381
- flags: "w",
13382
- // write and overwrite
13383
- flush: true
13384
- });
13385
- await body.pipeTo(Writable.toWeb(fileStream));
13386
- })()
13387
- );
13388
- }
13389
- await Promise.all(downloads).finally(() => {
13390
- abortController.abort();
13391
- });
13392
- await updateGitignore(gitRepoRoot);
13346
+ const result = await setupGithub({
13347
+ proxy,
13348
+ abortSignal: abortController.signal
13349
+ }).finally(() => abortController.abort());
13393
13350
  const commands = [];
13394
13351
  commands.push("set -eEuo pipefail");
13395
13352
  commands.push(
13396
- `echo "Successfully downloaded ${GITHUB_WORKFLOW_PATHS.length} workflows and updated .gitignore. Follow the steps in ${readmeUrl} (skipping the /setup-github step) to complete setup."`
13353
+ `echo "Successfully downloaded ${GITHUB_WORKFLOW_PATHS.length} workflows and updated .gitignore. Follow the steps in ${result.readmeUrl} (skipping the /setup-github step) to complete setup."`
13397
13354
  );
13398
- commands.push(...getOpenUrlsCommands(readmeUrl));
13355
+ commands.push(...getOpenUrlsCommands(result.readmeUrl, result.secretsUrl));
13399
13356
  const command = `(${commands.join(" && ")})`;
13400
13357
  return {
13401
13358
  type: "tool",
@@ -13416,13 +13373,13 @@ import { pathToFileURL } from "node:url";
13416
13373
 
13417
13374
  // packages/cli/src/services/insight/generators/StaticInsightGenerator.ts
13418
13375
  init_esbuild_shims();
13419
- import fs15 from "fs/promises";
13420
- import path18 from "path";
13376
+ import fs14 from "fs/promises";
13377
+ import path17 from "path";
13421
13378
 
13422
13379
  // packages/cli/src/services/insight/generators/DataProcessor.ts
13423
13380
  init_esbuild_shims();
13424
- import fs14 from "fs/promises";
13425
- import path17 from "path";
13381
+ import fs13 from "fs/promises";
13382
+ import path16 from "path";
13426
13383
 
13427
13384
  // packages/cli/node_modules/p-limit/index.js
13428
13385
  init_esbuild_shims();
@@ -13577,8 +13534,8 @@ function pLimit(concurrency) {
13577
13534
  },
13578
13535
  map: {
13579
13536
  async value(iterable, function_) {
13580
- const promises2 = Array.from(iterable, (value, index) => this(function_, value, index));
13581
- return Promise.all(promises2);
13537
+ const promises = Array.from(iterable, (value, index) => this(function_, value, index));
13538
+ return Promise.all(promises);
13582
13539
  }
13583
13540
  }
13584
13541
  });
@@ -14376,19 +14333,19 @@ None captured`;
14376
14333
  async scanChatFiles(baseDir) {
14377
14334
  const allChatFiles = [];
14378
14335
  try {
14379
- const projectDirs = await fs14.readdir(baseDir);
14336
+ const projectDirs = await fs13.readdir(baseDir);
14380
14337
  for (const projectDir of projectDirs) {
14381
- const projectPath = path17.join(baseDir, projectDir);
14382
- const stats = await fs14.stat(projectPath);
14338
+ const projectPath = path16.join(baseDir, projectDir);
14339
+ const stats = await fs13.stat(projectPath);
14383
14340
  if (stats.isDirectory()) {
14384
- const chatsDir = path17.join(projectPath, "chats");
14341
+ const chatsDir = path16.join(projectPath, "chats");
14385
14342
  try {
14386
- const files = await fs14.readdir(chatsDir);
14343
+ const files = await fs13.readdir(chatsDir);
14387
14344
  const chatFiles = files.filter((file) => file.endsWith(".jsonl"));
14388
14345
  for (const file of chatFiles) {
14389
- const filePath = path17.join(chatsDir, file);
14346
+ const filePath = path16.join(chatsDir, file);
14390
14347
  try {
14391
- const fileStats = await fs14.stat(filePath);
14348
+ const fileStats = await fs13.stat(filePath);
14392
14349
  allChatFiles.push({ path: filePath, mtime: fileStats.mtimeMs });
14393
14350
  } catch (e) {
14394
14351
  logger.error(`Failed to stat file ${filePath}:`, e);
@@ -14566,12 +14523,12 @@ None captured`;
14566
14523
  if (records.length > 0 && facetsOutputDir) {
14567
14524
  const sessionId = records[0].sessionId;
14568
14525
  if (sessionId) {
14569
- const existingFacetPath = path17.join(
14526
+ const existingFacetPath = path16.join(
14570
14527
  facetsOutputDir,
14571
14528
  `${sessionId}.json`
14572
14529
  );
14573
14530
  try {
14574
- const existingData = await fs14.readFile(
14531
+ const existingData = await fs13.readFile(
14575
14532
  existingFacetPath,
14576
14533
  "utf-8"
14577
14534
  );
@@ -14589,7 +14546,7 @@ None captured`;
14589
14546
  const normalizedData = JSON.stringify(normalizedFacet, null, 2);
14590
14547
  if (existingData !== normalizedData) {
14591
14548
  try {
14592
- await fs14.writeFile(
14549
+ await fs13.writeFile(
14593
14550
  existingFacetPath,
14594
14551
  normalizedData,
14595
14552
  "utf-8"
@@ -14624,11 +14581,11 @@ None captured`;
14624
14581
  const facet = await this.analyzeSession(records);
14625
14582
  if (facet && facetsOutputDir) {
14626
14583
  try {
14627
- const facetPath = path17.join(
14584
+ const facetPath = path16.join(
14628
14585
  facetsOutputDir,
14629
14586
  `${facet.session_id}.json`
14630
14587
  );
14631
- await fs14.writeFile(
14588
+ await fs13.writeFile(
14632
14589
  facetPath,
14633
14590
  JSON.stringify(facet, null, 2),
14634
14591
  "utf-8"
@@ -14726,8 +14683,8 @@ var StaticInsightGenerator = class {
14726
14683
  }
14727
14684
  // Ensure the output directory exists
14728
14685
  async ensureOutputDirectory() {
14729
- const outputDir = path18.join(Storage.getRuntimeBaseDir(), "insights");
14730
- await fs15.mkdir(outputDir, { recursive: true });
14686
+ const outputDir = path17.join(Storage.getRuntimeBaseDir(), "insights");
14687
+ await fs14.mkdir(outputDir, { recursive: true });
14731
14688
  return outputDir;
14732
14689
  }
14733
14690
  // Generate timestamped filename with collision detection
@@ -14735,23 +14692,23 @@ var StaticInsightGenerator = class {
14735
14692
  const now = /* @__PURE__ */ new Date();
14736
14693
  const date = now.toISOString().split("T")[0];
14737
14694
  const time = now.toTimeString().slice(0, 8).replace(/:/g, "");
14738
- let outputPath = path18.join(outputDir, `insight-${date}.html`);
14695
+ let outputPath = path17.join(outputDir, `insight-${date}.html`);
14739
14696
  try {
14740
- await fs15.access(outputPath);
14741
- outputPath = path18.join(outputDir, `insight-${date}-${time}.html`);
14697
+ await fs14.access(outputPath);
14698
+ outputPath = path17.join(outputDir, `insight-${date}-${time}.html`);
14742
14699
  } catch {
14743
14700
  }
14744
14701
  return outputPath;
14745
14702
  }
14746
14703
  async updateInsightSymlink(outputDir, targetPath) {
14747
- const latestPath = path18.join(outputDir, "insight.html");
14704
+ const latestPath = path17.join(outputDir, "insight.html");
14748
14705
  await updateSymlink(latestPath, targetPath);
14749
14706
  }
14750
14707
  // Generate the static insight HTML file
14751
14708
  async generateStaticInsight(baseDir, onProgress) {
14752
14709
  const outputDir = await this.ensureOutputDirectory();
14753
- const facetsDir = path18.join(outputDir, "facets");
14754
- await fs15.mkdir(facetsDir, { recursive: true });
14710
+ const facetsDir = path17.join(outputDir, "facets");
14711
+ await fs14.mkdir(facetsDir, { recursive: true });
14755
14712
  const insights = await this.dataProcessor.generateInsights(
14756
14713
  baseDir,
14757
14714
  facetsDir,
@@ -14759,7 +14716,7 @@ var StaticInsightGenerator = class {
14759
14716
  );
14760
14717
  const html = await this.templateRenderer.renderInsightHTML(insights);
14761
14718
  const outputPath = await this.generateOutputPath(outputDir);
14762
- await fs15.writeFile(outputPath, html, "utf-8");
14719
+ await fs14.writeFile(outputPath, html, "utf-8");
14763
14720
  await this.updateInsightSymlink(outputDir, outputPath);
14764
14721
  return outputPath;
14765
14722
  }
@@ -15153,7 +15110,7 @@ var BuiltinCommandLoader = class {
15153
15110
  initCommand,
15154
15111
  languageCommand,
15155
15112
  mcpCommand,
15156
- ...this.config?.getManagedAutoMemoryEnabled() ? [dreamCommand, forgetCommand] : [],
15113
+ ...this.config?.isManagedMemoryAvailable() ? [dreamCommand, forgetCommand] : [],
15157
15114
  goalCommand,
15158
15115
  memoryCommand,
15159
15116
  modelCommand,
@@ -15194,7 +15151,7 @@ var BuiltinCommandLoader = class {
15194
15151
  // packages/cli/src/services/BundledSkillLoader.ts
15195
15152
  init_esbuild_shims();
15196
15153
  import { dirname as dirname4 } from "node:path";
15197
- var debugLogger15 = createDebugLogger("BUNDLED_SKILL_LOADER");
15154
+ var debugLogger13 = createDebugLogger("BUNDLED_SKILL_LOADER");
15198
15155
  var BundledSkillLoader = class {
15199
15156
  constructor(config) {
15200
15157
  this.config = config;
@@ -15204,12 +15161,12 @@ var BundledSkillLoader = class {
15204
15161
  }
15205
15162
  async loadCommands(_signal) {
15206
15163
  if (this.config?.getBareMode?.()) {
15207
- debugLogger15.debug("Bare mode enabled, skipping bundled skills");
15164
+ debugLogger13.debug("Bare mode enabled, skipping bundled skills");
15208
15165
  return [];
15209
15166
  }
15210
15167
  const skillManager = this.config?.getSkillManager();
15211
15168
  if (!skillManager) {
15212
- debugLogger15.debug("SkillManager not available, skipping bundled skills");
15169
+ debugLogger13.debug("SkillManager not available, skipping bundled skills");
15213
15170
  return [];
15214
15171
  }
15215
15172
  try {
@@ -15217,7 +15174,7 @@ var BundledSkillLoader = class {
15217
15174
  const cronEnabled = this.config?.isCronEnabled() ?? false;
15218
15175
  const cronVisible = allSkills.filter((skill) => {
15219
15176
  if (!cronEnabled && skill.allowedTools?.some((t2) => t2.startsWith("cron_"))) {
15220
- debugLogger15.debug(
15177
+ debugLogger13.debug(
15221
15178
  `Hiding skill "${skill.name}" because cron is not enabled`
15222
15179
  );
15223
15180
  return false;
@@ -15228,7 +15185,7 @@ var BundledSkillLoader = class {
15228
15185
  const skills = cronVisible.filter(
15229
15186
  (skill) => !disabled.has(skill.name.toLowerCase())
15230
15187
  );
15231
- debugLogger15.debug(
15188
+ debugLogger13.debug(
15232
15189
  `Loaded ${skills.length} bundled skill(s) as slash commands; ${cronVisible.length - skills.length} hidden by skills.disabled`
15233
15190
  );
15234
15191
  return skills.map((skill) => ({
@@ -15279,7 +15236,7 @@ ${body}`;
15279
15236
  }, "action")
15280
15237
  }));
15281
15238
  } catch (error) {
15282
- debugLogger15.error("Failed to load bundled skills:", error);
15239
+ debugLogger13.error("Failed to load bundled skills:", error);
15283
15240
  return [];
15284
15241
  }
15285
15242
  }
@@ -15288,9 +15245,9 @@ ${body}`;
15288
15245
  // packages/cli/src/services/FileCommandLoader.ts
15289
15246
  init_esbuild_shims();
15290
15247
  var import_toml = __toESM(require_toml(), 1);
15291
- import { promises as fs16 } from "node:fs";
15248
+ import { promises as fs15 } from "node:fs";
15292
15249
  import * as fsSync from "node:fs";
15293
- import path20 from "node:path";
15250
+ import path19 from "node:path";
15294
15251
 
15295
15252
  // packages/cli/src/services/markdown-command-parser.ts
15296
15253
  init_esbuild_shims();
@@ -15335,7 +15292,7 @@ __name(parseMarkdownCommand, "parseMarkdownCommand");
15335
15292
 
15336
15293
  // packages/cli/src/services/command-factory.ts
15337
15294
  init_esbuild_shims();
15338
- import path19 from "node:path";
15295
+ import path18 from "node:path";
15339
15296
 
15340
15297
  // packages/cli/src/services/prompt-processors/argumentProcessor.ts
15341
15298
  init_esbuild_shims();
@@ -15559,7 +15516,7 @@ var ShellProcessor = class {
15559
15516
 
15560
15517
  // packages/cli/src/services/prompt-processors/atFileProcessor.ts
15561
15518
  init_esbuild_shims();
15562
- var debugLogger16 = createDebugLogger("AT_FILE_PROCESSOR");
15519
+ var debugLogger14 = createDebugLogger("AT_FILE_PROCESSOR");
15563
15520
  var AtFileProcessor = class {
15564
15521
  constructor(commandName) {
15565
15522
  this.commandName = commandName;
@@ -15605,7 +15562,7 @@ var AtFileProcessor = class {
15605
15562
  } catch (error) {
15606
15563
  const message = error instanceof Error ? error.message : String(error);
15607
15564
  const uiMessage = `Failed to inject content for '@{${pathStr}}': ${message}`;
15608
- debugLogger16.error(
15565
+ debugLogger14.error(
15609
15566
  `[AtFileProcessor] ${uiMessage}. Leaving placeholder in prompt.`
15610
15567
  );
15611
15568
  context.ui.addItem(
@@ -15630,15 +15587,15 @@ var AtFileProcessor = class {
15630
15587
  };
15631
15588
 
15632
15589
  // packages/cli/src/services/command-factory.ts
15633
- var debugLogger17 = createDebugLogger("COMMAND_FACTORY");
15590
+ var debugLogger15 = createDebugLogger("COMMAND_FACTORY");
15634
15591
  function createSlashCommandFromDefinition(filePath, baseDir, definition, extensionName, fileExtension) {
15635
- const relativePathWithExt = path19.relative(baseDir, filePath);
15592
+ const relativePathWithExt = path18.relative(baseDir, filePath);
15636
15593
  const relativePath = relativePathWithExt.substring(
15637
15594
  0,
15638
15595
  relativePathWithExt.length - fileExtension.length
15639
15596
  );
15640
- const baseCommandName = relativePath.split(path19.sep).map((segment) => segment.replaceAll(":", "_")).join(":");
15641
- const defaultDescription = `Custom command from ${path19.basename(filePath)}`;
15597
+ const baseCommandName = relativePath.split(path18.sep).map((segment) => segment.replaceAll(":", "_")).join(":");
15598
+ const defaultDescription = `Custom command from ${path18.basename(filePath)}`;
15642
15599
  let description = definition.description || defaultDescription;
15643
15600
  if (extensionName) {
15644
15601
  description = `[${extensionName}] ${description}`;
@@ -15674,7 +15631,7 @@ function createSlashCommandFromDefinition(filePath, baseDir, definition, extensi
15674
15631
  whenToUse: definition.whenToUse,
15675
15632
  action: /* @__PURE__ */ __name(async (context, _args) => {
15676
15633
  if (!context.invocation) {
15677
- debugLogger17.error(
15634
+ debugLogger15.error(
15678
15635
  `[FileCommandLoader] Critical error: Command '${baseCommandName}' was executed without invocation context.`
15679
15636
  );
15680
15637
  return {
@@ -15712,7 +15669,7 @@ function createSlashCommandFromDefinition(filePath, baseDir, definition, extensi
15712
15669
  __name(createSlashCommandFromDefinition, "createSlashCommandFromDefinition");
15713
15670
 
15714
15671
  // packages/cli/src/services/FileCommandLoader.ts
15715
- var debugLogger18 = createDebugLogger("FILE_COMMAND_LOADER");
15672
+ var debugLogger16 = createDebugLogger("FILE_COMMAND_LOADER");
15716
15673
  var TomlCommandDefSchema = external_exports.object({
15717
15674
  prompt: external_exports.string({
15718
15675
  required_error: "The 'prompt' field is required.",
@@ -15746,7 +15703,7 @@ var FileCommandLoader = class {
15746
15703
  */
15747
15704
  async loadCommands(signal) {
15748
15705
  if (this.config?.getBareMode?.()) {
15749
- debugLogger18.debug("Bare mode enabled, skipping auto-discovered commands");
15706
+ debugLogger16.debug("Bare mode enabled, skipping auto-discovered commands");
15750
15707
  return [];
15751
15708
  }
15752
15709
  const allCommands = [];
@@ -15772,14 +15729,14 @@ var FileCommandLoader = class {
15772
15729
  }
15773
15730
  const tomlCommandPromises = tomlFiles.map(
15774
15731
  (file) => this.parseAndAdaptTomlFile(
15775
- path20.join(dirInfo.path, file),
15732
+ path19.join(dirInfo.path, file),
15776
15733
  dirInfo.path,
15777
15734
  dirInfo.extensionName
15778
15735
  )
15779
15736
  );
15780
15737
  const mdCommandPromises = mdFiles.map(
15781
15738
  (file) => this.parseAndAdaptMarkdownFile(
15782
- path20.join(dirInfo.path, file),
15739
+ path19.join(dirInfo.path, file),
15783
15740
  dirInfo.path,
15784
15741
  dirInfo.extensionName
15785
15742
  )
@@ -15790,7 +15747,7 @@ var FileCommandLoader = class {
15790
15747
  const isEnoent = error.code === "ENOENT";
15791
15748
  const isAbortError = error instanceof Error && error.name === "AbortError";
15792
15749
  if (!isEnoent && !isAbortError) {
15793
- debugLogger18.error(
15750
+ debugLogger16.error(
15794
15751
  `[FileCommandLoader] Error loading commands from ${dirInfo.path}:`,
15795
15752
  error
15796
15753
  );
@@ -15829,14 +15786,14 @@ var FileCommandLoader = class {
15829
15786
  */
15830
15787
  getExtensionCommandsPaths(ext) {
15831
15788
  try {
15832
- const configPath = path20.join(ext.path, EXTENSIONS_CONFIG_FILENAME);
15789
+ const configPath = path19.join(ext.path, EXTENSIONS_CONFIG_FILENAME);
15833
15790
  if (fsSync.existsSync(configPath)) {
15834
15791
  const configContent = fsSync.readFileSync(configPath, "utf-8");
15835
15792
  const config = JSON.parse(configContent);
15836
15793
  if (config.commands) {
15837
15794
  const commandsArray = Array.isArray(config.commands) ? config.commands : [config.commands];
15838
15795
  return commandsArray.map(
15839
- (cmdPath) => path20.isAbsolute(cmdPath) ? cmdPath : path20.join(ext.path, cmdPath)
15796
+ (cmdPath) => path19.isAbsolute(cmdPath) ? cmdPath : path19.join(ext.path, cmdPath)
15840
15797
  ).filter((cmdPath) => {
15841
15798
  try {
15842
15799
  return fsSync.existsSync(cmdPath);
@@ -15847,12 +15804,12 @@ var FileCommandLoader = class {
15847
15804
  }
15848
15805
  }
15849
15806
  } catch (error) {
15850
- debugLogger18.warn(
15807
+ debugLogger16.warn(
15851
15808
  `Failed to read extension config for ${ext.name}:`,
15852
15809
  error
15853
15810
  );
15854
15811
  }
15855
- const defaultPath = path20.join(ext.path, "commands");
15812
+ const defaultPath = path19.join(ext.path, "commands");
15856
15813
  try {
15857
15814
  if (fsSync.existsSync(defaultPath)) {
15858
15815
  return [defaultPath];
@@ -15871,9 +15828,9 @@ var FileCommandLoader = class {
15871
15828
  async parseAndAdaptTomlFile(filePath, baseDir, extensionName) {
15872
15829
  let fileContent;
15873
15830
  try {
15874
- fileContent = await fs16.readFile(filePath, "utf-8");
15831
+ fileContent = await fs15.readFile(filePath, "utf-8");
15875
15832
  } catch (error) {
15876
- debugLogger18.error(
15833
+ debugLogger16.error(
15877
15834
  `[FileCommandLoader] Failed to read file ${filePath}:`,
15878
15835
  error instanceof Error ? error.message : String(error)
15879
15836
  );
@@ -15883,7 +15840,7 @@ var FileCommandLoader = class {
15883
15840
  try {
15884
15841
  parsed = import_toml.default.parse(fileContent);
15885
15842
  } catch (error) {
15886
- debugLogger18.error(
15843
+ debugLogger16.error(
15887
15844
  `[FileCommandLoader] Failed to parse TOML file ${filePath}:`,
15888
15845
  error instanceof Error ? error.message : String(error)
15889
15846
  );
@@ -15891,7 +15848,7 @@ var FileCommandLoader = class {
15891
15848
  }
15892
15849
  const validationResult = TomlCommandDefSchema.safeParse(parsed);
15893
15850
  if (!validationResult.success) {
15894
- debugLogger18.error(
15851
+ debugLogger16.error(
15895
15852
  `[FileCommandLoader] Skipping invalid command file: ${filePath}. Validation errors:`,
15896
15853
  validationResult.error.flatten()
15897
15854
  );
@@ -15916,9 +15873,9 @@ var FileCommandLoader = class {
15916
15873
  async parseAndAdaptMarkdownFile(filePath, baseDir, extensionName) {
15917
15874
  let fileContent;
15918
15875
  try {
15919
- fileContent = await fs16.readFile(filePath, "utf-8");
15876
+ fileContent = await fs15.readFile(filePath, "utf-8");
15920
15877
  } catch (error) {
15921
- debugLogger18.error(
15878
+ debugLogger16.error(
15922
15879
  `[FileCommandLoader] Failed to read file ${filePath}:`,
15923
15880
  error instanceof Error ? error.message : String(error)
15924
15881
  );
@@ -15928,7 +15885,7 @@ var FileCommandLoader = class {
15928
15885
  try {
15929
15886
  parsed = parseMarkdownCommand(fileContent);
15930
15887
  } catch (error) {
15931
- debugLogger18.error(
15888
+ debugLogger16.error(
15932
15889
  `[FileCommandLoader] Failed to parse Markdown file ${filePath}:`,
15933
15890
  error instanceof Error ? error.message : String(error)
15934
15891
  );
@@ -15936,7 +15893,7 @@ var FileCommandLoader = class {
15936
15893
  }
15937
15894
  const validationResult = MarkdownCommandDefSchema.safeParse(parsed);
15938
15895
  if (!validationResult.success) {
15939
- debugLogger18.error(
15896
+ debugLogger16.error(
15940
15897
  `[FileCommandLoader] Skipping invalid command file: ${filePath}. Validation errors:`,
15941
15898
  validationResult.error.flatten()
15942
15899
  );
@@ -15962,7 +15919,7 @@ var FileCommandLoader = class {
15962
15919
 
15963
15920
  // packages/cli/src/services/saved-workflow-loader.ts
15964
15921
  init_esbuild_shims();
15965
- var debugLogger19 = createDebugLogger("SavedWorkflowLoader");
15922
+ var debugLogger17 = createDebugLogger("SavedWorkflowLoader");
15966
15923
  var SavedWorkflowLoader = class {
15967
15924
  constructor(config) {
15968
15925
  this.config = config;
@@ -15981,7 +15938,7 @@ var SavedWorkflowLoader = class {
15981
15938
  try {
15982
15939
  entries = await listSavedWorkflows(this.config);
15983
15940
  } catch (e) {
15984
- debugLogger19.debug(`listSavedWorkflows failed: ${e}`);
15941
+ debugLogger17.debug(`listSavedWorkflows failed: ${e}`);
15985
15942
  return [];
15986
15943
  }
15987
15944
  if (signal.aborted) return [];
@@ -16279,7 +16236,7 @@ var McpPromptLoader = class {
16279
16236
  // packages/cli/src/services/SkillCommandLoader.ts
16280
16237
  init_esbuild_shims();
16281
16238
  import { dirname as dirname5 } from "node:path";
16282
- var debugLogger20 = createDebugLogger("SKILL_COMMAND_LOADER");
16239
+ var debugLogger18 = createDebugLogger("SKILL_COMMAND_LOADER");
16283
16240
  var SkillCommandLoader = class {
16284
16241
  constructor(config) {
16285
16242
  this.config = config;
@@ -16289,12 +16246,12 @@ var SkillCommandLoader = class {
16289
16246
  }
16290
16247
  async loadCommands(_signal) {
16291
16248
  if (this.config?.getBareMode?.()) {
16292
- debugLogger20.debug("Bare mode enabled, skipping skill commands");
16249
+ debugLogger18.debug("Bare mode enabled, skipping skill commands");
16293
16250
  return [];
16294
16251
  }
16295
16252
  const skillManager = this.config?.getSkillManager();
16296
16253
  if (!skillManager) {
16297
- debugLogger20.debug("SkillManager not available, skipping skill commands");
16254
+ debugLogger18.debug("SkillManager not available, skipping skill commands");
16298
16255
  return [];
16299
16256
  }
16300
16257
  try {
@@ -16311,7 +16268,7 @@ var SkillCommandLoader = class {
16311
16268
  const nonUserInvocableCount = visibleSkills.filter(
16312
16269
  (skill) => skill.userInvocable === false
16313
16270
  ).length;
16314
- debugLogger20.debug(
16271
+ debugLogger18.debug(
16315
16272
  `Loaded ${userSkills.length} user + ${projectSkills.length} project + ${extensionSkills.length} extension skill(s) as slash commands; ${allSkills.length - visibleSkills.length} hidden by skills.disabled; ${nonUserInvocableCount} marked non-user-invocable`
16316
16273
  );
16317
16274
  return visibleSkills.map((skill) => {
@@ -16354,7 +16311,7 @@ var SkillCommandLoader = class {
16354
16311
  };
16355
16312
  });
16356
16313
  } catch (error) {
16357
- debugLogger20.error("Failed to load skill commands:", error);
16314
+ debugLogger18.error("Failed to load skill commands:", error);
16358
16315
  return [];
16359
16316
  }
16360
16317
  }
@@ -16429,7 +16386,11 @@ function formatUserPromptExpansionBlockedMessage(reason) {
16429
16386
  __name(formatUserPromptExpansionBlockedMessage, "formatUserPromptExpansionBlockedMessage");
16430
16387
 
16431
16388
  // packages/cli/src/nonInteractiveCliCommands.ts
16432
- var debugLogger21 = createDebugLogger("NON_INTERACTIVE_COMMANDS");
16389
+ var debugLogger19 = createDebugLogger("NON_INTERACTIVE_COMMANDS");
16390
+ function getSkillCommandName(command) {
16391
+ return command.skillDetail?.name ?? command.name;
16392
+ }
16393
+ __name(getSkillCommandName, "getSkillCommandName");
16433
16394
  function handleCommandResult(result, outputHistoryItems) {
16434
16395
  switch (result.type) {
16435
16396
  case "submit_prompt":
@@ -16697,7 +16658,25 @@ var handleSlashCommand = /* @__PURE__ */ __name(async (rawQuery, abortController
16697
16658
  args
16698
16659
  }
16699
16660
  };
16700
- const result = await commandToExecute.action(context, args);
16661
+ const isSkillCommand = commandToExecute.kind === "skill" /* SKILL */;
16662
+ let skillInvocationRecorded = false;
16663
+ const recordSkillCommandInvocation = /* @__PURE__ */ __name((success) => {
16664
+ if (!isSkillCommand || skillInvocationRecorded) {
16665
+ return;
16666
+ }
16667
+ recordSkillInvocation(config, {
16668
+ skillName: getSkillCommandName(commandToExecute),
16669
+ success
16670
+ });
16671
+ skillInvocationRecorded = true;
16672
+ }, "recordSkillCommandInvocation");
16673
+ let result;
16674
+ try {
16675
+ result = await commandToExecute.action(context, args);
16676
+ } catch (error) {
16677
+ recordSkillCommandInvocation(false);
16678
+ throw error;
16679
+ }
16701
16680
  if (!result) {
16702
16681
  return {
16703
16682
  type: "message",
@@ -16706,16 +16685,24 @@ var handleSlashCommand = /* @__PURE__ */ __name(async (rawQuery, abortController
16706
16685
  };
16707
16686
  }
16708
16687
  if (result.type === "submit_prompt") {
16709
- const hookResult = await fireUserPromptExpansionHook(
16710
- config,
16711
- commandToExecute.name,
16712
- args,
16713
- result.content,
16714
- abortController.signal
16715
- );
16688
+ let hookResult;
16689
+ try {
16690
+ hookResult = await fireUserPromptExpansionHook(
16691
+ config,
16692
+ commandToExecute.name,
16693
+ args,
16694
+ result.content,
16695
+ abortController.signal
16696
+ );
16697
+ } catch (error) {
16698
+ recordSkillCommandInvocation(false);
16699
+ throw error;
16700
+ }
16716
16701
  if (hookResult.blockedResult) {
16702
+ recordSkillCommandInvocation(false);
16717
16703
  return hookResult.blockedResult;
16718
16704
  }
16705
+ recordSkillCommandInvocation(true);
16719
16706
  return handleCommandResult(
16720
16707
  { ...result, content: hookResult.content },
16721
16708
  outputHistoryItems
@@ -16747,14 +16734,14 @@ var getAvailableCommands = /* @__PURE__ */ __name(async (config, abortSignal, mo
16747
16734
  );
16748
16735
  return commandService.getCommandsForMode(mode);
16749
16736
  } catch (error) {
16750
- debugLogger21.error("Error loading available commands:", error);
16737
+ debugLogger19.error("Error loading available commands:", error);
16751
16738
  return [];
16752
16739
  }
16753
16740
  }, "getAvailableCommands");
16754
16741
 
16755
16742
  // packages/cli/src/utils/nonInteractiveHelpers.ts
16756
16743
  init_esbuild_shims();
16757
- var debugLogger22 = createDebugLogger("NON_INTERACTIVE");
16744
+ var debugLogger20 = createDebugLogger("NON_INTERACTIVE");
16758
16745
  function normalizePartList(parts) {
16759
16746
  if (!parts) {
16760
16747
  return [];
@@ -16817,6 +16804,31 @@ function computeUsageFromMetrics(metrics) {
16817
16804
  return usage2;
16818
16805
  }
16819
16806
  __name(computeUsageFromMetrics, "computeUsageFromMetrics");
16807
+ function buildInitialSystemReminders(config) {
16808
+ const reminders = [];
16809
+ if (config.getApprovalMode() === "plan" /* PLAN */) {
16810
+ reminders.push({ text: getPlanModeSystemReminder(config.getSdkMode?.()) });
16811
+ }
16812
+ const arenaManager = config.getArenaManager?.();
16813
+ if (arenaManager) {
16814
+ try {
16815
+ const sessionDir = arenaManager.getArenaSessionDir();
16816
+ const configPath = `${sessionDir}/config.json`;
16817
+ reminders.push({ text: getArenaSystemReminder(configPath) });
16818
+ } catch {
16819
+ }
16820
+ }
16821
+ return reminders;
16822
+ }
16823
+ __name(buildInitialSystemReminders, "buildInitialSystemReminders");
16824
+ function insertAfterFunctionResponses(parts, additions) {
16825
+ const firstNonFunctionResponse = parts.findIndex(
16826
+ (part) => !part.functionResponse
16827
+ );
16828
+ const insertAt = firstNonFunctionResponse === -1 ? parts.length : firstNonFunctionResponse;
16829
+ return [...parts.slice(0, insertAt), ...additions, ...parts.slice(insertAt)];
16830
+ }
16831
+ __name(insertAfterFunctionResponses, "insertAfterFunctionResponses");
16820
16832
  async function loadSlashCommandNames(config) {
16821
16833
  const controller = new AbortController();
16822
16834
  try {
@@ -16827,7 +16839,7 @@ async function loadSlashCommandNames(config) {
16827
16839
  );
16828
16840
  return commands.map((cmd) => cmd.name).sort();
16829
16841
  } catch (error) {
16830
- debugLogger22.error(
16842
+ debugLogger20.error(
16831
16843
  "[buildSystemMessage] Failed to load slash commands:",
16832
16844
  error
16833
16845
  );
@@ -16852,7 +16864,7 @@ async function buildSystemMessage(config, sessionId, permissionMode) {
16852
16864
  const subagents = await subagentManager.listSubagents();
16853
16865
  agentNames = subagents.map((subagent) => subagent.name);
16854
16866
  } catch (error) {
16855
- debugLogger22.error("[buildSystemMessage] Failed to load subagents:", error);
16867
+ debugLogger20.error("[buildSystemMessage] Failed to load subagents:", error);
16856
16868
  }
16857
16869
  const systemMessage = {
16858
16870
  type: "system",
@@ -17024,6 +17036,7 @@ export {
17024
17036
  hasSlashCommandPathSeparator,
17025
17037
  isSlashCommand,
17026
17038
  isBtwCommand,
17039
+ isMidInputCompletableCommand,
17027
17040
  findMidInputSlashCommand,
17028
17041
  getBestSlashCommandMatch,
17029
17042
  findSlashCommandTokens,
@@ -17055,6 +17068,8 @@ export {
17055
17068
  normalizePartList,
17056
17069
  extractPartsFromUserMessage,
17057
17070
  computeUsageFromMetrics,
17071
+ buildInitialSystemReminders,
17072
+ insertAfterFunctionResponses,
17058
17073
  buildSystemMessage,
17059
17074
  createToolProgressHandler,
17060
17075
  createAgentToolProgressHandler,