@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
@@ -0,0 +1,840 @@
1
+ // Force strict mode and setup for ESM
2
+ "use strict";
3
+ import {
4
+ Colors
5
+ } from "./chunk-5GOVVXEV.js";
6
+ import {
7
+ theme
8
+ } from "./chunk-SMXULRAN.js";
9
+ import {
10
+ Box_default,
11
+ Text,
12
+ require_jsx_runtime
13
+ } from "./chunk-WQT5SOI6.js";
14
+ import {
15
+ require_react
16
+ } from "./chunk-KYMBIKIW.js";
17
+ import {
18
+ t
19
+ } from "./chunk-MTHMXSNT.js";
20
+ import {
21
+ readManyFiles,
22
+ shouldRunVisionBridge,
23
+ stripTerminalControlSequences
24
+ } from "./chunk-RIP623NO.js";
25
+ import {
26
+ emptyMcpResourceText,
27
+ formatMcpResourceContents,
28
+ summarizeMcpResource
29
+ } from "./chunk-LQ7TMOCE.js";
30
+ import {
31
+ Storage,
32
+ getErrorMessage,
33
+ isNodeError,
34
+ isSubpath,
35
+ unescapePath
36
+ } from "./chunk-UX4SGCGN.js";
37
+ import {
38
+ init_esbuild_shims
39
+ } from "./chunk-A4BMJM77.js";
40
+ import {
41
+ __name,
42
+ __toESM
43
+ } from "./chunk-J2S4EL5Y.js";
44
+
45
+ // packages/cli/src/ui/hooks/atCommandProcessor.ts
46
+ init_esbuild_shims();
47
+ import * as fs2 from "node:fs/promises";
48
+ import * as path from "node:path";
49
+
50
+ // packages/cli/src/ui/hooks/mcpResourceRef.ts
51
+ init_esbuild_shims();
52
+ function matchMcpServerPrefix(input, serverNames) {
53
+ let serverName = null;
54
+ for (const name of serverNames) {
55
+ if (input.startsWith(`${name}:`) && (serverName === null || name.length > serverName.length)) {
56
+ serverName = name;
57
+ }
58
+ }
59
+ if (serverName === null) return null;
60
+ return { serverName, rest: input.slice(serverName.length + 1) };
61
+ }
62
+ __name(matchMcpServerPrefix, "matchMcpServerPrefix");
63
+ function buildMcpResourceRef(serverName, uri) {
64
+ return `${serverName}:${uri}`;
65
+ }
66
+ __name(buildMcpResourceRef, "buildMcpResourceRef");
67
+
68
+ // packages/cli/src/ui/hooks/extension-mention-ref.ts
69
+ init_esbuild_shims();
70
+
71
+ // packages/cli/src/ui/components/SuggestionsDisplay.tsx
72
+ init_esbuild_shims();
73
+
74
+ // packages/cli/src/ui/components/PrepareLabel.tsx
75
+ init_esbuild_shims();
76
+ var import_react = __toESM(require_react(), 1);
77
+ var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
78
+ var MAX_WIDTH = 150;
79
+ var _PrepareLabel = /* @__PURE__ */ __name(({
80
+ label,
81
+ matchedIndex,
82
+ userInput,
83
+ textColor,
84
+ isExpanded = false
85
+ }) => {
86
+ const hasMatch = matchedIndex !== void 0 && matchedIndex >= 0 && matchedIndex < label.length && userInput.length > 0;
87
+ if (!hasMatch) {
88
+ const display = isExpanded ? label : label.length > MAX_WIDTH ? label.slice(0, MAX_WIDTH) + "..." : label;
89
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { wrap: "wrap", color: textColor, children: display });
90
+ }
91
+ const matchLength = userInput.length;
92
+ let before = "";
93
+ let match = "";
94
+ let after = "";
95
+ if (isExpanded || label.length <= MAX_WIDTH) {
96
+ before = label.slice(0, matchedIndex);
97
+ match = label.slice(matchedIndex, matchedIndex + matchLength);
98
+ after = label.slice(matchedIndex + matchLength);
99
+ } else if (matchLength >= MAX_WIDTH) {
100
+ match = label.slice(matchedIndex, matchedIndex + MAX_WIDTH - 1) + "...";
101
+ } else {
102
+ const contextSpace = MAX_WIDTH - matchLength;
103
+ const beforeSpace = Math.floor(contextSpace / 2);
104
+ const afterSpace = Math.ceil(contextSpace / 2);
105
+ let start = matchedIndex - beforeSpace;
106
+ let end = matchedIndex + matchLength + afterSpace;
107
+ if (start < 0) {
108
+ end += -start;
109
+ start = 0;
110
+ }
111
+ if (end > label.length) {
112
+ start -= end - label.length;
113
+ end = label.length;
114
+ }
115
+ start = Math.max(0, start);
116
+ const finalMatchIndex = matchedIndex - start;
117
+ const slicedLabel = label.slice(start, end);
118
+ before = slicedLabel.slice(0, finalMatchIndex);
119
+ match = slicedLabel.slice(finalMatchIndex, finalMatchIndex + matchLength);
120
+ after = slicedLabel.slice(finalMatchIndex + matchLength);
121
+ if (start > 0) {
122
+ before = before.length >= 3 ? "..." + before.slice(3) : "...";
123
+ }
124
+ if (end < label.length) {
125
+ after = after.length >= 3 ? after.slice(0, -3) + "..." : "...";
126
+ }
127
+ }
128
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, { color: textColor, wrap: "wrap", children: [
129
+ before,
130
+ match ? match.split(/(\s+)/).map((part, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
131
+ Text,
132
+ {
133
+ color: theme.background.primary,
134
+ backgroundColor: theme.text.primary,
135
+ children: part
136
+ },
137
+ `match-${index}`
138
+ )) : null,
139
+ after
140
+ ] });
141
+ }, "_PrepareLabel");
142
+ var PrepareLabel = import_react.default.memo(_PrepareLabel);
143
+
144
+ // packages/cli/src/ui/components/SuggestionsDisplay.tsx
145
+ var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
146
+ var MAX_SUGGESTIONS_TO_SHOW = 8;
147
+ var MIN_DESCRIPTION_WIDTH = 12;
148
+ var ACTIVE_MARKER_WIDTH = 2;
149
+ function normalizeDescription(description) {
150
+ return description.replace(/\s+/g, " ").trim();
151
+ }
152
+ __name(normalizeDescription, "normalizeDescription");
153
+ function SuggestionsDisplay({
154
+ suggestions,
155
+ activeIndex,
156
+ isLoading,
157
+ width,
158
+ scrollOffset,
159
+ userInput,
160
+ mode,
161
+ expandedIndex
162
+ }) {
163
+ if (isLoading) {
164
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Box_default, { width, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { color: "gray", children: t("Loading suggestions...") }) });
165
+ }
166
+ if (suggestions.length === 0) {
167
+ return null;
168
+ }
169
+ const startIndex = scrollOffset;
170
+ const endIndex = Math.min(
171
+ scrollOffset + MAX_SUGGESTIONS_TO_SHOW,
172
+ suggestions.length
173
+ );
174
+ const visibleSuggestions = suggestions.slice(startIndex, endIndex);
175
+ const getFullLabel = /* @__PURE__ */ __name((s) => [s.label, s.argumentHint, s.sourceBadge].filter(Boolean).join(" "), "getFullLabel");
176
+ const maxLabelLength = Math.max(
177
+ ...suggestions.map((s) => getFullLabel(s).length)
178
+ );
179
+ const describedLabelLengths = suggestions.filter((s) => s.description).map((s) => getFullLabel(s).length);
180
+ const contentWidth = Math.max(width - ACTIVE_MARKER_WIDTH, 1);
181
+ const labelColumnWidth = mode === "slash" ? Math.min(maxLabelLength, Math.floor(contentWidth * 0.5)) : describedLabelLengths.length > 0 ? Math.min(
182
+ Math.max(...describedLabelLengths),
183
+ Math.max(contentWidth - MIN_DESCRIPTION_WIDTH - 2, 1)
184
+ ) : 0;
185
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Box_default, { flexDirection: "column", width, children: [
186
+ scrollOffset > 0 && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { color: theme.text.primary, children: "\u25B2" }),
187
+ visibleSuggestions.map((suggestion, index) => {
188
+ const originalIndex = startIndex + index;
189
+ const isActive = originalIndex === activeIndex;
190
+ const isExpanded = originalIndex === expandedIndex;
191
+ const textColor = isActive ? theme.text.accent : theme.text.secondary;
192
+ const displayLabel = suggestion.label ?? suggestion.value;
193
+ const isLong = displayLabel.length >= MAX_WIDTH;
194
+ const expansionIndicatorWidth = isActive && isLong ? 3 : 0;
195
+ const descriptionColumnWidth = Math.max(
196
+ contentWidth - labelColumnWidth - 2 - expansionIndicatorWidth,
197
+ 1
198
+ );
199
+ const labelElement = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
200
+ PrepareLabel,
201
+ {
202
+ label: displayLabel,
203
+ matchedIndex: suggestion.matchedIndex,
204
+ userInput,
205
+ textColor,
206
+ isExpanded
207
+ }
208
+ );
209
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Box_default, { flexDirection: "row", children: [
210
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Box_default, { width: ACTIVE_MARKER_WIDTH, flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { color: textColor, children: isActive ? "> " : " " }) }),
211
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
212
+ Box_default,
213
+ {
214
+ ...mode === "slash" || suggestion.description ? { width: labelColumnWidth, flexShrink: 0 } : { flexShrink: 1 },
215
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Box_default, { children: [
216
+ labelElement,
217
+ suggestion.argumentHint && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Text, { color: theme.text.secondary, children: [
218
+ " ",
219
+ suggestion.argumentHint
220
+ ] }),
221
+ suggestion.sourceBadge && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Text, { color: textColor, children: [
222
+ " ",
223
+ suggestion.sourceBadge
224
+ ] })
225
+ ] })
226
+ }
227
+ ),
228
+ suggestion.description && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
229
+ Box_default,
230
+ {
231
+ width: descriptionColumnWidth,
232
+ flexGrow: 1,
233
+ flexShrink: 1,
234
+ paddingLeft: 2,
235
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { color: textColor, wrap: "truncate-end", children: normalizeDescription(suggestion.description) })
236
+ }
237
+ ),
238
+ isActive && isLong && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { color: Colors.Gray, children: isExpanded ? " \u2190 " : " \u2192 " }) })
239
+ ] }, `${suggestion.value}-${originalIndex}`);
240
+ }),
241
+ endIndex < suggestions.length && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { color: "gray", children: "\u25BC" }),
242
+ suggestions.length > MAX_SUGGESTIONS_TO_SHOW && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Text, { color: "gray", children: [
243
+ "(",
244
+ activeIndex + 1,
245
+ "/",
246
+ suggestions.length,
247
+ ")"
248
+ ] })
249
+ ] });
250
+ }
251
+ __name(SuggestionsDisplay, "SuggestionsDisplay");
252
+
253
+ // packages/cli/src/utils/extension-mention.ts
254
+ init_esbuild_shims();
255
+ import * as fs from "node:fs/promises";
256
+ var EXTENSION_REF_PREFIX = "ext:";
257
+ var EXTENSION_CONTEXT_BUDGET = 2e5;
258
+ var EXTENSION_CONTEXT_FILE_CAP = 5e4;
259
+ function parseExtensionRef(pathName) {
260
+ if (!pathName.startsWith(EXTENSION_REF_PREFIX)) return null;
261
+ const name = pathName.slice(EXTENSION_REF_PREFIX.length);
262
+ if (!name) return null;
263
+ return { name };
264
+ }
265
+ __name(parseExtensionRef, "parseExtensionRef");
266
+ function buildExtensionRef(extensionName) {
267
+ return `${EXTENSION_REF_PREFIX}${extensionName}`;
268
+ }
269
+ __name(buildExtensionRef, "buildExtensionRef");
270
+ function matchExtensionByRef(name, extensions) {
271
+ const lower = name.toLowerCase();
272
+ return extensions.find(
273
+ (ext) => ext.name.toLowerCase() === lower || ext.config.name.toLowerCase() === lower
274
+ );
275
+ }
276
+ __name(matchExtensionByRef, "matchExtensionByRef");
277
+ var BIDI_CONTROL_RE = /[‎‏؜⁦⁧⁨⁩‪‫‬‭‮]/g;
278
+ function sanitizeDisplayText(raw) {
279
+ const stripped = stripTerminalControlSequences(raw).replace(BIDI_CONTROL_RE, "").replace(/\s+/g, " ").trim();
280
+ return stripped.length > 0 ? stripped : null;
281
+ }
282
+ __name(sanitizeDisplayText, "sanitizeDisplayText");
283
+ function getExtensionDisplayName(extension) {
284
+ return sanitizeDisplayText(extension.displayName || extension.name) || extension.name;
285
+ }
286
+ __name(getExtensionDisplayName, "getExtensionDisplayName");
287
+ function buildExtensionContextText(extension) {
288
+ const displayName = getExtensionDisplayName(extension);
289
+ const lines = [];
290
+ lines.push(
291
+ `--- Extension: ${displayName} (untrusted third-party content) ---`
292
+ );
293
+ if (extension.config.description) {
294
+ const desc = sanitizeDisplayText(extension.config.description);
295
+ if (desc) {
296
+ lines.push(desc);
297
+ lines.push("");
298
+ }
299
+ }
300
+ const capabilities = [];
301
+ if (extension.skills && extension.skills.length > 0) {
302
+ const skillNames = extension.skills.map((s) => sanitizeDisplayText(s.name) || s.name).join(", ");
303
+ capabilities.push(`- Skills: ${skillNames} (invoke via /<skill-name>)`);
304
+ }
305
+ if (extension.mcpServers && Object.keys(extension.mcpServers).length > 0) {
306
+ const serverNames = Object.keys(extension.mcpServers).map((n) => sanitizeDisplayText(n) || n).join(", ");
307
+ capabilities.push(`- MCP Servers: ${serverNames}`);
308
+ }
309
+ if (extension.agents && extension.agents.length > 0) {
310
+ const agentNames = extension.agents.map((a) => sanitizeDisplayText(a.name) || a.name).join(", ");
311
+ capabilities.push(`- Agents: ${agentNames}`);
312
+ }
313
+ if (capabilities.length > 0) {
314
+ lines.push("Available capabilities from this extension:");
315
+ lines.push(...capabilities);
316
+ lines.push("");
317
+ }
318
+ lines.push(`--- End Extension: ${displayName} ---`);
319
+ return lines.join("\n");
320
+ }
321
+ __name(buildExtensionContextText, "buildExtensionContextText");
322
+ async function buildExtensionMentionContext(extension, options) {
323
+ let contextText = buildExtensionContextText(extension);
324
+ let remainingBudget = options.remainingBudget;
325
+ if (extension.contextFiles.length === 0) {
326
+ return { text: contextText, remainingBudget };
327
+ }
328
+ const fileReads = await Promise.allSettled(
329
+ extension.contextFiles.map(async (contextFilePath) => {
330
+ let realPath;
331
+ let realExtPath;
332
+ try {
333
+ realPath = await fs.realpath(contextFilePath);
334
+ realExtPath = await fs.realpath(extension.path);
335
+ } catch {
336
+ options.onDebugMessage?.(
337
+ `Skipping unreadable context file: ${contextFilePath}`
338
+ );
339
+ return null;
340
+ }
341
+ if (!isSubpath(realExtPath, realPath)) {
342
+ options.onDebugMessage?.(
343
+ `Skipping context file outside extension directory: ${contextFilePath}`
344
+ );
345
+ return null;
346
+ }
347
+ return fs.readFile(realPath, {
348
+ encoding: "utf-8",
349
+ signal: options.signal
350
+ });
351
+ })
352
+ );
353
+ for (let i = 0; i < fileReads.length; i++) {
354
+ const outcome = fileReads[i];
355
+ if (outcome.status === "rejected") {
356
+ options.onDebugMessage?.(
357
+ `Failed to read extension context file ${extension.contextFiles[i]}: ${getErrorMessage(outcome.reason)}`
358
+ );
359
+ continue;
360
+ }
361
+ const content = outcome.value;
362
+ if (!content || !content.trim()) continue;
363
+ if (remainingBudget <= 0) {
364
+ options.onDebugMessage?.(
365
+ "Extension context budget exhausted, skipping remaining files."
366
+ );
367
+ break;
368
+ }
369
+ const cap = Math.min(EXTENSION_CONTEXT_FILE_CAP, remainingBudget);
370
+ const cappedContent = content.length > cap ? content.slice(0, cap) + "\n... (truncated)" : content;
371
+ contextText += `
372
+
373
+ ${cappedContent}`;
374
+ remainingBudget -= cappedContent.length;
375
+ }
376
+ return { text: contextText, remainingBudget };
377
+ }
378
+ __name(buildExtensionMentionContext, "buildExtensionMentionContext");
379
+
380
+ // packages/cli/src/ui/hooks/extension-mention-ref.ts
381
+ function getExtensionSuggestions(config, pattern) {
382
+ if (!config) return [];
383
+ if (config.isTrustedFolder?.() === false) return [];
384
+ const extensions = config.getActiveExtensions?.() ?? [];
385
+ if (extensions.length === 0) return [];
386
+ const query = pattern.toLowerCase();
387
+ return extensions.map((ext) => ({
388
+ ext,
389
+ safeLabel: sanitizeDisplayText(ext.displayName || ext.name) || ext.name
390
+ })).filter(({ safeLabel, ext }) => {
391
+ const label = safeLabel.toLowerCase();
392
+ const name = ext.name.toLowerCase();
393
+ return label.includes(query) || name.includes(query);
394
+ }).sort((a, b) => {
395
+ const aName = a.safeLabel.toLowerCase();
396
+ const bName = b.safeLabel.toLowerCase();
397
+ const aPrefix = aName.startsWith(query) ? 0 : 1;
398
+ const bPrefix = bName.startsWith(query) ? 0 : 1;
399
+ if (aPrefix !== bPrefix) return aPrefix - bPrefix;
400
+ return aName.localeCompare(bName);
401
+ }).slice(0, MAX_SUGGESTIONS_TO_SHOW).map(({ ext, safeLabel }) => ({
402
+ label: safeLabel,
403
+ value: buildExtensionRef(ext.name),
404
+ description: ext.config.description ? sanitizeDisplayText(ext.config.description) ?? void 0 : void 0,
405
+ sourceBadge: t("Extension"),
406
+ isDirectory: false
407
+ }));
408
+ }
409
+ __name(getExtensionSuggestions, "getExtensionSuggestions");
410
+
411
+ // packages/cli/src/ui/hooks/atCommandProcessor.ts
412
+ function parseAllAtCommands(query) {
413
+ const parts = [];
414
+ let currentIndex = 0;
415
+ while (currentIndex < query.length) {
416
+ let atIndex = -1;
417
+ let nextSearchIndex = currentIndex;
418
+ while (nextSearchIndex < query.length) {
419
+ if (query[nextSearchIndex] === "@" && (nextSearchIndex === 0 || query[nextSearchIndex - 1] !== "\\")) {
420
+ atIndex = nextSearchIndex;
421
+ break;
422
+ }
423
+ nextSearchIndex++;
424
+ }
425
+ if (atIndex === -1) {
426
+ if (currentIndex < query.length) {
427
+ parts.push({ type: "text", content: query.substring(currentIndex) });
428
+ }
429
+ break;
430
+ }
431
+ if (atIndex > currentIndex) {
432
+ parts.push({
433
+ type: "text",
434
+ content: query.substring(currentIndex, atIndex)
435
+ });
436
+ }
437
+ let pathEndIndex = atIndex + 1;
438
+ let inEscape = false;
439
+ while (pathEndIndex < query.length) {
440
+ const char = query[pathEndIndex];
441
+ if (inEscape) {
442
+ inEscape = false;
443
+ } else if (char === "\\") {
444
+ inEscape = true;
445
+ } else if (/[,\s;!?()[\]{}]/.test(char)) {
446
+ break;
447
+ } else if (char === ".") {
448
+ const nextChar = pathEndIndex + 1 < query.length ? query[pathEndIndex + 1] : "";
449
+ if (nextChar === "" || /\s/.test(nextChar)) {
450
+ break;
451
+ }
452
+ }
453
+ pathEndIndex++;
454
+ }
455
+ const rawAtPath = query.substring(atIndex, pathEndIndex);
456
+ const atPath = unescapePath(rawAtPath);
457
+ parts.push({ type: "atPath", content: atPath });
458
+ currentIndex = pathEndIndex;
459
+ }
460
+ return parts.filter(
461
+ (part) => !(part.type === "text" && part.content.trim() === "")
462
+ );
463
+ }
464
+ __name(parseAllAtCommands, "parseAllAtCommands");
465
+ function parseMcpResourceRef(pathName, mcpServerNames) {
466
+ const match = matchMcpServerPrefix(pathName, mcpServerNames);
467
+ if (!match || !match.rest) return null;
468
+ return { serverName: match.serverName, uri: match.rest };
469
+ }
470
+ __name(parseMcpResourceRef, "parseMcpResourceRef");
471
+ async function resolveAtCommandQuery({
472
+ query,
473
+ config,
474
+ onDebugMessage,
475
+ messageId: userMessageTimestamp,
476
+ signal
477
+ }) {
478
+ const commandParts = parseAllAtCommands(query);
479
+ const atPathCommandParts = commandParts.filter(
480
+ (part) => part.type === "atPath"
481
+ );
482
+ if (atPathCommandParts.length === 0) {
483
+ return { processedQuery: [{ text: query }], shouldProceed: true };
484
+ }
485
+ const fileDiscovery = config.getFileService();
486
+ const respectFileIgnore = config.getFileFilteringOptions();
487
+ const pathSpecsToRead = [];
488
+ const atPathToResolvedSpecMap = /* @__PURE__ */ new Map();
489
+ const contentLabelsForDisplay = [];
490
+ const ignoredByReason = {
491
+ git: [],
492
+ qwen: [],
493
+ both: []
494
+ };
495
+ const mcpServerNames = new Set(Object.keys(config.getMcpServers() || {}));
496
+ const mcpResourceRefs = [];
497
+ const activeExtensions = config.getActiveExtensions?.() ?? [];
498
+ const extensionMentions = [];
499
+ for (const atPathPart of atPathCommandParts) {
500
+ const originalAtPath = atPathPart.content;
501
+ if (originalAtPath === "@") {
502
+ onDebugMessage(
503
+ "Lone @ detected, will be treated as text in the modified query."
504
+ );
505
+ continue;
506
+ }
507
+ const pathName = originalAtPath.substring(1);
508
+ const extRef = parseExtensionRef(pathName);
509
+ if (extRef) {
510
+ const extension = matchExtensionByRef(extRef.name, activeExtensions);
511
+ if (extension) {
512
+ if (!extensionMentions.some((m) => m.extension.name === extension.name)) {
513
+ extensionMentions.push({ originalAtPath, extension });
514
+ }
515
+ atPathToResolvedSpecMap.set(originalAtPath, pathName);
516
+ continue;
517
+ }
518
+ onDebugMessage(
519
+ `Extension "${extRef.name}" not found among active extensions. Available: ${activeExtensions.map((e) => e.name).join(", ") || "(none)"}`
520
+ );
521
+ continue;
522
+ }
523
+ const resourceRef = parseMcpResourceRef(pathName, mcpServerNames);
524
+ if (resourceRef) {
525
+ mcpResourceRefs.push({ originalAtPath, ...resourceRef });
526
+ atPathToResolvedSpecMap.set(originalAtPath, pathName);
527
+ continue;
528
+ }
529
+ const workspaceContext = config.getWorkspaceContext();
530
+ const projectTempDir = Storage.getGlobalTempDir();
531
+ const absolutePathName = path.isAbsolute(pathName) ? pathName : path.resolve(workspaceContext.getDirectories()[0] || "", pathName);
532
+ if (!isSubpath(projectTempDir, absolutePathName) && !workspaceContext.isPathWithinWorkspace(pathName)) {
533
+ onDebugMessage(
534
+ `Path ${pathName} is not in the workspace and will be skipped.`
535
+ );
536
+ continue;
537
+ }
538
+ const gitIgnored = respectFileIgnore.respectGitIgnore && fileDiscovery.shouldIgnoreFile(pathName, {
539
+ respectGitIgnore: true,
540
+ respectQwenIgnore: false
541
+ });
542
+ const qwenIgnored = respectFileIgnore.respectQwenIgnore && fileDiscovery.shouldIgnoreFile(pathName, {
543
+ respectGitIgnore: false,
544
+ respectQwenIgnore: true
545
+ });
546
+ if (gitIgnored || qwenIgnored) {
547
+ const reason = gitIgnored && qwenIgnored ? "both" : gitIgnored ? "git" : "qwen";
548
+ ignoredByReason[reason].push(pathName);
549
+ const reasonText = reason === "both" ? "ignored by both git and qwen" : reason === "git" ? "git-ignored" : "qwen-ignored";
550
+ onDebugMessage(`Path ${pathName} is ${reasonText} and will be skipped.`);
551
+ continue;
552
+ }
553
+ let resolvedSuccessfully = false;
554
+ let sawNotFound = false;
555
+ for (const dir of config.getWorkspaceContext().getDirectories()) {
556
+ let currentPathSpec = pathName;
557
+ try {
558
+ const absolutePath = path.resolve(dir, pathName);
559
+ const stats = await fs2.stat(absolutePath);
560
+ if (stats.isDirectory()) {
561
+ currentPathSpec = pathName;
562
+ onDebugMessage(`Path ${pathName} resolved to directory.`);
563
+ } else {
564
+ onDebugMessage(`Path ${pathName} resolved to file: ${absolutePath}`);
565
+ }
566
+ resolvedSuccessfully = true;
567
+ } catch (error) {
568
+ if (isNodeError(error) && error.code === "ENOENT") {
569
+ sawNotFound = true;
570
+ continue;
571
+ } else {
572
+ onDebugMessage(
573
+ `Error stating path ${pathName}: ${getErrorMessage(error)}. Path ${pathName} will be skipped.`
574
+ );
575
+ }
576
+ }
577
+ if (resolvedSuccessfully) {
578
+ pathSpecsToRead.push(currentPathSpec);
579
+ atPathToResolvedSpecMap.set(originalAtPath, currentPathSpec);
580
+ contentLabelsForDisplay.push(pathName);
581
+ break;
582
+ }
583
+ }
584
+ if (!resolvedSuccessfully && sawNotFound) {
585
+ onDebugMessage(
586
+ `Path ${pathName} not found. Path ${pathName} will be skipped.`
587
+ );
588
+ }
589
+ }
590
+ let initialQueryText = "";
591
+ for (let i = 0; i < commandParts.length; i++) {
592
+ const part = commandParts[i];
593
+ if (part.type === "text") {
594
+ initialQueryText += part.content;
595
+ } else {
596
+ const resolvedSpec = atPathToResolvedSpecMap.get(part.content);
597
+ if (i > 0 && initialQueryText.length > 0 && !initialQueryText.endsWith(" ")) {
598
+ const prevPart = commandParts[i - 1];
599
+ if (prevPart.type === "text" || prevPart.type === "atPath" && atPathToResolvedSpecMap.has(prevPart.content)) {
600
+ initialQueryText += " ";
601
+ }
602
+ }
603
+ if (resolvedSpec) {
604
+ initialQueryText += `@${resolvedSpec}`;
605
+ } else {
606
+ if (i > 0 && initialQueryText.length > 0 && !initialQueryText.endsWith(" ") && !part.content.startsWith(" ")) {
607
+ initialQueryText += " ";
608
+ }
609
+ initialQueryText += part.content;
610
+ }
611
+ }
612
+ }
613
+ initialQueryText = initialQueryText.trim();
614
+ const totalIgnored = ignoredByReason["git"].length + ignoredByReason["qwen"].length + ignoredByReason["both"].length;
615
+ if (totalIgnored > 0) {
616
+ const messages = [];
617
+ if (ignoredByReason["git"].length) {
618
+ messages.push(`Git-ignored: ${ignoredByReason["git"].join(", ")}`);
619
+ }
620
+ if (ignoredByReason["qwen"].length) {
621
+ messages.push(`Qwen-ignored: ${ignoredByReason["qwen"].join(", ")}`);
622
+ }
623
+ if (ignoredByReason["both"].length) {
624
+ messages.push(`Ignored by both: ${ignoredByReason["both"].join(", ")}`);
625
+ }
626
+ const message = `Ignored ${totalIgnored} files:
627
+ ${messages.join("\n")}`;
628
+ onDebugMessage(message);
629
+ }
630
+ const resourceReads = await Promise.allSettled(
631
+ mcpResourceRefs.map(
632
+ (ref) => config.getToolRegistry().readMcpResource(ref.serverName, ref.uri, { signal })
633
+ )
634
+ );
635
+ const resourceParts = [];
636
+ const resourceDisplays = [];
637
+ const resourceLabels = [];
638
+ for (let i = 0; i < mcpResourceRefs.length; i++) {
639
+ const ref = mcpResourceRefs[i];
640
+ const label = `${ref.serverName}:${ref.uri}`;
641
+ const callId = `client-mcp-resource-${userMessageTimestamp}-${i}`;
642
+ const outcome = resourceReads[i];
643
+ if (outcome.status === "rejected") {
644
+ onDebugMessage(
645
+ `Failed to read MCP resource ${label}: ${getErrorMessage(outcome.reason)}`
646
+ );
647
+ resourceDisplays.push({
648
+ callId,
649
+ name: "Read MCP Resource",
650
+ description: `Read resource ${label}`,
651
+ status: "Error" /* Error */,
652
+ resultDisplay: `Failed to read resource ${label}: ${getErrorMessage(outcome.reason)}`,
653
+ confirmationDetails: void 0
654
+ });
655
+ continue;
656
+ }
657
+ const formatted = formatMcpResourceContents(outcome.value, label);
658
+ if (formatted.parts.length > 0) {
659
+ resourceParts.push(...formatted.parts);
660
+ } else {
661
+ resourceParts.push({ text: emptyMcpResourceText(formatted, label) });
662
+ }
663
+ resourceLabels.push(label);
664
+ resourceDisplays.push({
665
+ callId,
666
+ name: "Read MCP Resource",
667
+ description: `Read resource ${label}`,
668
+ status: "Success" /* Success */,
669
+ resultDisplay: summarizeMcpResource(formatted),
670
+ confirmationDetails: void 0
671
+ });
672
+ }
673
+ if (pathSpecsToRead.length === 0 && mcpResourceRefs.length === 0 && extensionMentions.length === 0) {
674
+ onDebugMessage("No valid file paths found in @ commands to read.");
675
+ if (initialQueryText === "@" && query.trim() === "@") {
676
+ return { processedQuery: [{ text: query }], shouldProceed: true };
677
+ } else if (!initialQueryText && query) {
678
+ return { processedQuery: [{ text: query }], shouldProceed: true };
679
+ }
680
+ return {
681
+ processedQuery: [{ text: initialQueryText || query }],
682
+ shouldProceed: true
683
+ };
684
+ }
685
+ let extensionContextBudgetRemaining = EXTENSION_CONTEXT_BUDGET;
686
+ const extensionParts = [];
687
+ const extensionDisplays = [];
688
+ const extensionLabels = [];
689
+ for (let i = 0; i < extensionMentions.length; i++) {
690
+ const { extension } = extensionMentions[i];
691
+ const displayName = getExtensionDisplayName(extension);
692
+ const callId = `client-extension-${userMessageTimestamp}-${i}`;
693
+ const context = await buildExtensionMentionContext(extension, {
694
+ remainingBudget: extensionContextBudgetRemaining,
695
+ signal,
696
+ onDebugMessage
697
+ });
698
+ extensionContextBudgetRemaining = context.remainingBudget;
699
+ extensionParts.push({ text: context.text });
700
+ extensionLabels.push(buildExtensionRef(extension.name));
701
+ extensionDisplays.push({
702
+ callId,
703
+ name: "Activate Extension",
704
+ description: `Activated extension ${displayName}`,
705
+ status: "Success" /* Success */,
706
+ resultDisplay: void 0,
707
+ confirmationDetails: void 0
708
+ });
709
+ }
710
+ const fileParts = [];
711
+ let fileDisplays = [];
712
+ if (pathSpecsToRead.length > 0) {
713
+ try {
714
+ const result = await readManyFiles(config, {
715
+ paths: pathSpecsToRead,
716
+ signal,
717
+ preserveUnsupportedImageForBridge: shouldRunVisionBridge(config)
718
+ });
719
+ const parts = Array.isArray(result.contentParts) ? result.contentParts : [result.contentParts];
720
+ fileDisplays = result.files.map((file, index) => ({
721
+ callId: `client-read-${userMessageTimestamp}-${index}`,
722
+ name: file.isDirectory ? "Read Directory" : "Read File",
723
+ description: file.isDirectory ? `Read directory ${path.basename(file.filePath)}` : `Read file ${path.basename(file.filePath)}`,
724
+ status: file.error ? "Error" /* Error */ : "Success" /* Success */,
725
+ resultDisplay: file.error ? `Failed to read ${path.basename(file.filePath)}: ${file.error}` : void 0,
726
+ confirmationDetails: void 0
727
+ }));
728
+ if (parts.length > 0 && !result.error) {
729
+ for (const part of parts) {
730
+ fileParts.push(typeof part === "string" ? { text: part } : part);
731
+ }
732
+ } else {
733
+ onDebugMessage("readManyFiles returned no content or empty content.");
734
+ }
735
+ } catch (error) {
736
+ const errorToolCallDisplay = {
737
+ callId: `client-read-${userMessageTimestamp}`,
738
+ name: "Read File(s)",
739
+ description: "Error attempting to read files",
740
+ status: "Error" /* Error */,
741
+ resultDisplay: `Error reading files (${contentLabelsForDisplay.join(", ")}): ${getErrorMessage(error)}`,
742
+ confirmationDetails: void 0
743
+ };
744
+ const errorMessage = typeof errorToolCallDisplay.resultDisplay === "string" ? errorToolCallDisplay.resultDisplay : void 0;
745
+ const labelsOnError = [
746
+ ...extensionLabels,
747
+ ...contentLabelsForDisplay,
748
+ ...resourceLabels
749
+ ];
750
+ return {
751
+ processedQuery: null,
752
+ shouldProceed: false,
753
+ toolDisplays: [
754
+ ...extensionDisplays,
755
+ ...resourceDisplays,
756
+ errorToolCallDisplay
757
+ ],
758
+ filesRead: labelsOnError,
759
+ recording: {
760
+ filesRead: labelsOnError,
761
+ status: "error",
762
+ message: errorMessage
763
+ }
764
+ };
765
+ }
766
+ }
767
+ const processedQueryParts = [
768
+ { text: initialQueryText },
769
+ ...extensionParts,
770
+ ...fileParts,
771
+ ...resourceParts
772
+ ];
773
+ const allLabels = [
774
+ ...extensionLabels,
775
+ ...contentLabelsForDisplay,
776
+ ...resourceLabels
777
+ ];
778
+ return {
779
+ processedQuery: processedQueryParts,
780
+ shouldProceed: true,
781
+ toolDisplays: [...extensionDisplays, ...fileDisplays, ...resourceDisplays],
782
+ filesRead: allLabels,
783
+ recording: {
784
+ filesRead: allLabels,
785
+ status: "success"
786
+ }
787
+ };
788
+ }
789
+ __name(resolveAtCommandQuery, "resolveAtCommandQuery");
790
+ async function handleAtCommand(params) {
791
+ const result = await resolveAtCommandQuery(params);
792
+ if (result.recording) {
793
+ const chatRecorder = params.config.getChatRecordingService?.();
794
+ chatRecorder?.recordAtCommand({
795
+ filesRead: result.recording.filesRead,
796
+ status: result.recording.status,
797
+ ...result.recording.message ? { message: result.recording.message } : {},
798
+ userText: params.query
799
+ });
800
+ }
801
+ if (params.addItem && result.toolDisplays && result.toolDisplays.length > 0) {
802
+ const toolGroupItem = {
803
+ type: "tool_group",
804
+ tools: result.toolDisplays
805
+ };
806
+ params.addItem(toolGroupItem, params.messageId);
807
+ }
808
+ return {
809
+ processedQuery: result.processedQuery,
810
+ shouldProceed: result.shouldProceed,
811
+ toolDisplays: result.toolDisplays,
812
+ filesRead: result.filesRead
813
+ };
814
+ }
815
+ __name(handleAtCommand, "handleAtCommand");
816
+
817
+ export {
818
+ matchMcpServerPrefix,
819
+ buildMcpResourceRef,
820
+ MAX_WIDTH,
821
+ MAX_SUGGESTIONS_TO_SHOW,
822
+ SuggestionsDisplay,
823
+ EXTENSION_CONTEXT_BUDGET,
824
+ parseExtensionRef,
825
+ matchExtensionByRef,
826
+ buildExtensionMentionContext,
827
+ getExtensionSuggestions,
828
+ resolveAtCommandQuery,
829
+ handleAtCommand
830
+ };
831
+ /**
832
+ * @license
833
+ * Copyright 2025 Google LLC
834
+ * SPDX-License-Identifier: Apache-2.0
835
+ */
836
+ /**
837
+ * @license
838
+ * Copyright 2025 Qwen
839
+ * SPDX-License-Identifier: Apache-2.0
840
+ */