@qwen-code/qwen-code 0.19.2 → 0.19.3

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 (282) hide show
  1. package/bundled/extension-creator/SKILL.md +357 -0
  2. package/bundled/loop/SKILL.md +12 -7
  3. package/bundled/loop/SKILL.test.ts +32 -0
  4. package/bundled/qc-helper/SKILL.md +14 -14
  5. package/bundled/qc-helper/docs/configuration/auth.md +11 -11
  6. package/bundled/qc-helper/docs/configuration/model-providers.md +13 -13
  7. package/bundled/qc-helper/docs/configuration/settings.md +60 -60
  8. package/bundled/qc-helper/docs/features/commands.md +108 -77
  9. package/bundled/qc-helper/docs/features/memory.md +52 -0
  10. package/bundled/qc-helper/docs/qwen-serve.md +24 -2
  11. package/bundled/qc-helper/docs/support/tos-privacy.md +16 -3
  12. package/chunks/{MaxSizedBox-7RERNLFK.js → MaxSizedBox-QNF3EIGU.js} +29 -30
  13. package/chunks/{StandaloneSessionPicker-S22XBSN6.js → StandaloneSessionPicker-Z52JTYST.js} +42 -40
  14. package/chunks/{acpAgent-4MCETHF2.js → acpAgent-7RZUOWOM.js} +406 -118
  15. package/chunks/{agent-K3ENVYSB.js → agent-4FG7WTHJ.js} +24 -26
  16. package/chunks/{agent-headless-HO3V3A3A.js → agent-headless-RQ5BTX3G.js} +24 -26
  17. package/chunks/{anthropicContentGenerator-E3TQ5XJJ.js → anthropicContentGenerator-PFITVL7Y.js} +31 -13
  18. package/chunks/{artifact-tool-QA4KRO3B.js → artifact-tool-D2X7G3C3.js} +2 -2
  19. package/chunks/{askUserQuestion-HMWXW6VN.js → askUserQuestion-UGETICJQ.js} +2 -2
  20. package/chunks/{bridge-4LV2HBH2.js → bridge-JL2PMCIW.js} +29 -32
  21. package/chunks/{ca-7WC7ELX6.js → ca-IUFWESZL.js} +1 -0
  22. package/chunks/{chunk-3UALQ56H.js → chunk-3227DZO4.js} +1 -1
  23. package/chunks/{chunk-JTYRZODB.js → chunk-3TV3HUWZ.js} +16 -7
  24. package/chunks/{chunk-NYOHZYHM.js → chunk-4LUZAKMK.js} +45 -3
  25. package/chunks/{chunk-EL5IHQON.js → chunk-4QK3O43S.js} +6 -27
  26. package/chunks/chunk-5GOVVXEV.js +73 -0
  27. package/chunks/{chunk-R36VMVEP.js → chunk-6V4NZFUS.js} +5 -5
  28. package/chunks/{chunk-XKBP7M7A.js → chunk-ADCIHOQZ.js} +138 -28
  29. package/chunks/chunk-BC3C4F3Q.js +40 -0
  30. package/chunks/{chunk-CGEGHF2C.js → chunk-BKXBARJZ.js} +1 -1
  31. package/chunks/chunk-BMFMJINR.js +45 -0
  32. package/chunks/chunk-BTLJ2MF5.js +690 -0
  33. package/chunks/{chunk-OIC6S73E.js → chunk-BUUQ5HPX.js} +1 -1
  34. package/chunks/{chunk-2BIF2NVV.js → chunk-BVSVIN45.js} +2 -2
  35. package/chunks/{chunk-JXQ23SNT.js → chunk-BW4KCQFD.js} +54 -2
  36. package/chunks/{chunk-TOEGRAVX.js → chunk-BX5YO7UW.js} +17 -5
  37. package/chunks/{chunk-5RVSM6NW.js → chunk-BXSHL2SF.js} +1 -1
  38. package/chunks/{chunk-UN3C6GOR.js → chunk-CF6BB3LT.js} +0 -107
  39. package/chunks/{chunk-Z7XXFPGP.js → chunk-CKQA6AWF.js} +1 -1
  40. package/chunks/{chunk-I2RFAW6Q.js → chunk-CNLEDYE3.js} +7 -5
  41. package/chunks/{chunk-PRYMDRBV.js → chunk-DDMOU62Q.js} +1 -1
  42. package/chunks/chunk-EDMZZFDU.js +11213 -0
  43. package/chunks/{chunk-IRJWHZWU.js → chunk-EJYJYJZ2.js} +70 -3
  44. package/chunks/{chunk-OQHQHJRK.js → chunk-F3ZYSEY6.js} +151 -4775
  45. package/chunks/chunk-FKAVULLM.js +4909 -0
  46. package/chunks/{chunk-TZM5JIAX.js → chunk-FNJ7BDPH.js} +6 -6
  47. package/chunks/{chunk-EXMX5YHG.js → chunk-FXKVLFFY.js} +1 -1
  48. package/chunks/{chunk-EX4W6ZYG.js → chunk-GGBIN5K7.js} +1 -1
  49. package/chunks/{chunk-BS64PXY3.js → chunk-GT2FGICD.js} +1 -1
  50. package/chunks/{chunk-HG6YKEBI.js → chunk-HPZTOP4I.js} +75 -23
  51. package/chunks/{chunk-OTBK43JR.js → chunk-HYCC3XM3.js} +1 -1
  52. package/chunks/{chunk-3QFE4OTE.js → chunk-HZT4UCFB.js} +4 -4
  53. package/chunks/{chunk-GYZQA2FO.js → chunk-I2LYBGNI.js} +1 -1
  54. package/chunks/{chunk-TMBPDHXD.js → chunk-I4H7PRWQ.js} +1 -1
  55. package/chunks/{chunk-2BAQ3ACS.js → chunk-J33ZR6OJ.js} +404 -4
  56. package/chunks/{chunk-4W4T77MO.js → chunk-J7FA27RO.js} +109 -6
  57. package/chunks/{chunk-S566HKUS.js → chunk-JE5FVRPC.js} +38 -7
  58. package/chunks/{chunk-CGOMICBE.js → chunk-JJXWTVSK.js} +1 -1
  59. package/chunks/{chunk-EEEZIVFJ.js → chunk-JOLIREYR.js} +1 -1
  60. package/chunks/{chunk-DBZUXSSV.js → chunk-JVHEVCAU.js} +5 -5
  61. package/chunks/chunk-K5XU6E4T.js +167 -0
  62. package/chunks/{chunk-EW6C27XX.js → chunk-KMGMKW5Q.js} +1 -1
  63. package/chunks/{chunk-D5E5TMYH.js → chunk-L7OKCI7T.js} +4 -2
  64. package/chunks/{chunk-ZUAXI2OA.js → chunk-M2U5NM24.js} +188 -11366
  65. package/chunks/{chunk-CI5O6SQL.js → chunk-MNF6S5PR.js} +4 -4
  66. package/chunks/{chunk-FPACXT7T.js → chunk-N4EJFBN5.js} +421 -163
  67. package/chunks/chunk-NDOC6M5S.js +481 -0
  68. package/chunks/{chunk-HGNSRCRB.js → chunk-NL4C3H6C.js} +1 -1
  69. package/chunks/{chunk-GZCJS5WH.js → chunk-O2VBQ3Y2.js} +2 -2
  70. package/chunks/{chunk-VQRYPFCV.js → chunk-O75BHFQW.js} +10 -460
  71. package/chunks/{chunk-WGAEWQTF.js → chunk-ODLIHNOY.js} +1 -2
  72. package/chunks/{chunk-J6AW7O5D.js → chunk-PDE7CSDS.js} +2 -2
  73. package/chunks/{chunk-5R4SBCX6.js → chunk-PR32FRT6.js} +3 -3
  74. package/chunks/{chunk-LLFFKXZZ.js → chunk-QE6KJYLT.js} +56 -29
  75. package/chunks/{chunk-3RJ3ZPPR.js → chunk-QI7GOGJR.js} +7 -7
  76. package/chunks/{chunk-XU5P23GN.js → chunk-QLDPRILK.js} +3 -3
  77. package/chunks/{chunk-WA5OJGFL.js → chunk-QNKBEJO2.js} +359 -76
  78. package/chunks/{chunk-UAARVVBI.js → chunk-QWFNTRH4.js} +1 -1
  79. package/chunks/chunk-QYUE6W3T.js +123 -0
  80. package/chunks/{chunk-5JZLXFPD.js → chunk-R5OP2ATH.js} +11 -11
  81. package/chunks/{chunk-BNXANYLH.js → chunk-RD6YJJJ6.js} +81 -1
  82. package/chunks/{chunk-2TJ3YN6Q.js → chunk-RRFZXMYP.js} +380 -400
  83. package/chunks/{chunk-ZN5T4BHI.js → chunk-RYLJU2DY.js} +1 -1
  84. package/chunks/{chunk-ZD3NW5KL.js → chunk-S7AKE7HL.js} +3 -3
  85. package/chunks/{chunk-BG4BIP7F.js → chunk-SBBN4BWR.js} +4 -2
  86. package/chunks/{chunk-T2VDEFUU.js → chunk-SKQZZVAV.js} +2 -2
  87. package/chunks/{chunk-USGMPVOY.js → chunk-SLNKLLEO.js} +14 -9
  88. package/chunks/chunk-SMXULRAN.js +37 -0
  89. package/chunks/{chunk-PF523XJX.js → chunk-SMYQZVZ3.js} +1 -1
  90. package/chunks/{chunk-I5T6PIBQ.js → chunk-STUWFKGD.js} +1001 -887
  91. package/chunks/{chunk-UAARJR2G.js → chunk-T4T2FNV4.js} +2 -2
  92. package/chunks/{chunk-F6XNTYNE.js → chunk-U3KSMM7G.js} +8 -4
  93. package/chunks/chunk-UFLGERMB.js +813 -0
  94. package/chunks/{chunk-BGUDAULQ.js → chunk-UO5GVXQE.js} +5 -5
  95. package/chunks/{chunk-C4K3FEQ2.js → chunk-UX4SGCGN.js} +32 -3
  96. package/chunks/{chunk-RS4HRC75.js → chunk-UYT3MWEB.js} +85 -8
  97. package/chunks/{chunk-VYFMN7C6.js → chunk-VBZ452JT.js} +113 -24
  98. package/chunks/{chunk-KBXLIVWQ.js → chunk-VVLOGDB6.js} +2 -2
  99. package/chunks/{chunk-TXVGVZYR.js → chunk-XJYUPHRC.js} +3 -3
  100. package/chunks/{chunk-2JD55C6G.js → chunk-Y6YMRS3U.js} +2 -2
  101. package/chunks/{chunk-PXFFKNCO.js → chunk-YAINVQ3Q.js} +2961 -1349
  102. package/chunks/{chunk-X6EDWN44.js → chunk-ZP6UKOPB.js} +1 -1
  103. package/chunks/{computer-use-6BBRNT6S.js → computer-use-JGB36FDW.js} +103 -52
  104. package/chunks/{contextCommand-UJAJ6N57.js → contextCommand-WYU6OQ2F.js} +26 -28
  105. package/chunks/{cron-create-4KQE6YLH.js → cron-create-SKEY55RG.js} +4 -4
  106. package/chunks/{cron-delete-THME66UP.js → cron-delete-I3NAT32Z.js} +6 -6
  107. package/chunks/{cron-list-7A54SJ5N.js → cron-list-6XRRL6TH.js} +5 -5
  108. package/chunks/daemon-status-provider-HH2EC5FI.js +65 -0
  109. package/chunks/{de-ACHALDED.js → de-EOW5PVHF.js} +1 -0
  110. package/chunks/{dist-BOOH5JWN.js → dist-663NZ6MI.js} +1 -1
  111. package/chunks/{dist-QHJRBCMP.js → dist-J37VXPLD.js} +46 -5
  112. package/chunks/{dist-OD2FY543.js → dist-LB6OGPVM.js} +1 -1
  113. package/chunks/{dist-BD27IA3L.js → dist-NHEYYB2B.js} +2 -2
  114. package/chunks/{dist-QFFZWACU.js → dist-PQPZ5Q4N.js} +1 -1
  115. package/chunks/{earlyInputCapture-X6KMCSHD.js → earlyInputCapture-44RISVVJ.js} +25 -27
  116. package/chunks/{edit-7J6WXARF.js → edit-NN6GM5DT.js} +68 -30
  117. package/chunks/{en-NCUBOJOY.js → en-HPWEJBTR.js} +8 -0
  118. package/chunks/{enter-worktree-KULCKJPJ.js → enter-worktree-PB3O2C7D.js} +24 -26
  119. package/chunks/{enterPlanMode-H2CIOLMH.js → enterPlanMode-YQFNNSUA.js} +24 -26
  120. package/chunks/{errors-6G2JYR54.js → errors-LS7XU5DZ.js} +26 -28
  121. package/chunks/{exit-worktree-ECBWBVC5.js → exit-worktree-E2FTNSBK.js} +24 -26
  122. package/chunks/{exitPlanMode-DQV56GTW.js → exitPlanMode-GLYK2BUB.js} +24 -26
  123. package/chunks/{fast-path-35JJFS3C.js → fast-path-WQ6M7LI7.js} +4 -4
  124. package/chunks/{fast-path-settings-TSVI53EB.js → fast-path-settings-OAGU3X5H.js} +3 -2
  125. package/chunks/{fr-GVKZ27MF.js → fr-BN5NKSAC.js} +1 -0
  126. package/chunks/{gemini-NDTG7WAX.js → gemini-2YFLVA2M.js} +204 -103
  127. package/chunks/{geminiContentGenerator-XTG6SFLA.js → geminiContentGenerator-XV6SV6CD.js} +4 -4
  128. package/chunks/{glob-SJ2JBZK4.js → glob-2H6CDDMK.js} +24 -26
  129. package/chunks/{grep-BRMWFEWR.js → grep-VXIUXM3C.js} +24 -26
  130. package/chunks/{headlessSafetyWarnings-LJ6FJX77.js → headlessSafetyWarnings-TBE35GJ4.js} +24 -26
  131. package/chunks/initializer-2Y7SLOKV.js +61 -0
  132. package/chunks/{ja-FKZ2WZ4D.js → ja-7DEUB2TS.js} +1 -0
  133. package/chunks/{keychain-token-storage-CSYMNRPP.js → keychain-token-storage-YLMDLKXT.js} +2 -2
  134. package/chunks/list-ZAFHZ7OS.js +65 -0
  135. package/chunks/loadedSettingsAdapter-6KJXD6M3.js +60 -0
  136. package/chunks/{loop-wakeup-33GPXJLA.js → loop-wakeup-CITGGQHA.js} +7 -7
  137. package/chunks/{ls-BYQY7RVV.js → ls-R5WP4BGZ.js} +4 -4
  138. package/chunks/{lsp-X54RO4IV.js → lsp-GSICJMMW.js} +2 -2
  139. package/chunks/{monitor-DH7KFSJV.js → monitor-HKLRS2HQ.js} +24 -26
  140. package/chunks/nonInteractiveCli-5W4GIZQM.js +96 -0
  141. package/chunks/{notebook-edit-D4R4ZLMA.js → notebook-edit-Y6SKSGTT.js} +52 -26
  142. package/chunks/{openaiContentGenerator-F74IPQ6E.js → openaiContentGenerator-J7G2FYJT.js} +13 -14
  143. package/chunks/{pt-SY5NCFGR.js → pt-TNZRNLQB.js} +1 -0
  144. package/chunks/{qwenContentGenerator-ATTK5P4D.js → qwenContentGenerator-5XIEM5GV.js} +26 -28
  145. package/chunks/{qwenOAuth2-K4AASPCV.js → qwenOAuth2-AG3PFFLZ.js} +4 -4
  146. package/chunks/{read-file-767G23OY.js → read-file-J7D552ZJ.js} +9 -10
  147. package/chunks/{read-mcp-resource-I5HCZJ6X.js → read-mcp-resource-DQQW7H7T.js} +2 -2
  148. package/chunks/{ripGrep-4OMMGSWX.js → ripGrep-IEIFIWP4.js} +24 -26
  149. package/chunks/{ru-FWNXJG4F.js → ru-NIAUBKCN.js} +1 -0
  150. package/chunks/{run-qwen-serve-REKSTYRA.js → run-qwen-serve-SGEEVMXD.js} +149 -41
  151. package/chunks/{scheduler-UNTFDQLG.js → scheduler-7CQI3S4Q.js} +24 -26
  152. package/chunks/{send-message-2DAFXEYP.js → send-message-EE4TWKVU.js} +2 -2
  153. package/chunks/{serve-KZ56QB5S.js → serve-V6GVZR6U.js} +31 -31
  154. package/chunks/{server-BV5TZUMU.js → server-4QMUWXPW.js} +6996 -5864
  155. package/chunks/{session-OIBXFSGD.js → session-NRO7UFOY.js} +62 -57
  156. package/chunks/{settings-WJTCBIRA.js → settings-SGWRDQSC.js} +30 -30
  157. package/chunks/{shell-WC52IBHW.js → shell-62ANGIHL.js} +24 -26
  158. package/chunks/{skill-U7F7JR4M.js → skill-VWAQAWW6.js} +39 -13
  159. package/chunks/{spawnChannel-EI2E5BCW.js → spawnChannel-3VHW5EPY.js} +26 -28
  160. package/chunks/{src-4F6FBZFI.js → src-KUV5J5Q2.js} +52 -28
  161. package/chunks/{startInteractiveUI-SFRVB3CE.js → startInteractiveUI-6EYJN3JV.js} +2588 -2371
  162. package/chunks/{syntheticOutput-PPS3HDVA.js → syntheticOutput-T5YHQ6S2.js} +3 -3
  163. package/chunks/{task-create-OUYCA553.js → task-create-BLY7RHXX.js} +6 -6
  164. package/chunks/{task-list-WAX7I2IA.js → task-list-3QUYNVYR.js} +5 -5
  165. package/chunks/{task-stop-CAIL6FNH.js → task-stop-U4RATK2V.js} +2 -2
  166. package/chunks/{task-update-AHEO5OUT.js → task-update-U54O7KJX.js} +6 -6
  167. package/chunks/{team-create-3WC7CIIW.js → team-create-LPOGCPM7.js} +24 -26
  168. package/chunks/{team-delete-HGHFG23B.js → team-delete-LKBYPASD.js} +5 -5
  169. package/chunks/{theme-manager-DICFCT3P.js → theme-manager-LYLGAERF.js} +25 -27
  170. package/chunks/{todoWrite-IFBMN3FH.js → todoWrite-OYXKTVYN.js} +4 -4
  171. package/chunks/{tool-search-L5K7HLER.js → tool-search-YPUFJ3ZQ.js} +102 -18
  172. package/chunks/trustedFolders-5B24TMEA.js +73 -0
  173. package/chunks/types-QX5C3CHJ.js +12 -0
  174. package/chunks/{validateNonInterActiveAuth-GCH4Z6KI.js → validateNonInterActiveAuth-BTDTYOVT.js} +57 -54
  175. package/chunks/{web-fetch-B5IIQ5TT.js → web-fetch-EEB5LZYU.js} +28 -15
  176. package/chunks/{workflow-OB3AND7I.js → workflow-LAWIW5LI.js} +32 -33
  177. package/chunks/workspace-providers-status-PIAFVYHA.js +62 -0
  178. package/chunks/workspace-service-YAIOD4HG.js +71 -0
  179. package/chunks/{write-file-SEXBNDZM.js → write-file-PCV226DJ.js} +63 -30
  180. package/chunks/{zh-RBEGQVQT.js → zh-5EUYXASN.js} +8 -0
  181. package/chunks/{zh-TW-QGAVRXT3.js → zh-TW-TR3XYGE5.js} +8 -0
  182. package/cli-entry.js +20 -9
  183. package/cli.js +6 -6
  184. package/locales/ca.js +2 -0
  185. package/locales/de.js +2 -0
  186. package/locales/en.js +14 -0
  187. package/locales/fr.js +2 -0
  188. package/locales/ja.js +1 -0
  189. package/locales/pt.js +2 -0
  190. package/locales/ru.js +2 -0
  191. package/locales/zh-TW.js +12 -0
  192. package/locales/zh.js +12 -0
  193. package/node_modules/@qwen-code/audio-capture/dist/index.d.ts +35 -0
  194. package/node_modules/@qwen-code/audio-capture/dist/index.js +48 -0
  195. package/node_modules/@qwen-code/audio-capture/dist/index.js.map +1 -0
  196. package/node_modules/@qwen-code/audio-capture/dist/platform.d.ts +7 -0
  197. package/node_modules/@qwen-code/audio-capture/dist/platform.js +18 -0
  198. package/node_modules/@qwen-code/audio-capture/dist/platform.js.map +1 -0
  199. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/LICENSE +21 -0
  200. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/README.md +58 -0
  201. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/SECURITY.md +5 -0
  202. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/bin.js +84 -0
  203. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/build-test.js +19 -0
  204. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/index.js +6 -0
  205. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/node-gyp-build.js +207 -0
  206. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/optional.js +7 -0
  207. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/package.json +43 -0
  208. package/node_modules/@qwen-code/audio-capture/package.json +30 -0
  209. package/node_modules/@qwen-code/audio-capture/prebuilds/darwin-arm64/@qwen-code+audio-capture.node +0 -0
  210. package/node_modules/@qwen-code/audio-capture/prebuilds/darwin-x64/@qwen-code+audio-capture.node +0 -0
  211. package/node_modules/@qwen-code/audio-capture/prebuilds/linux-arm64/@qwen-code+audio-capture.node +0 -0
  212. package/node_modules/@qwen-code/audio-capture/prebuilds/linux-x64/@qwen-code+audio-capture.node +0 -0
  213. package/node_modules/@qwen-code/audio-capture/prebuilds/win32-x64/@qwen-code+audio-capture.node +0 -0
  214. package/package.json +6 -3
  215. package/web-shell/assets/{arc-D_ae_Y9k.js → arc-DA7r8Ueo.js} +1 -1
  216. package/web-shell/assets/{architectureDiagram-3BPJPVTR-BMLRjppa.js → architectureDiagram-3BPJPVTR-ZDUxPtZ2.js} +1 -1
  217. package/web-shell/assets/{blockDiagram-GPEHLZMM-qVDQC8KL.js → blockDiagram-GPEHLZMM-vrtOf1kJ.js} +1 -1
  218. package/web-shell/assets/{c4Diagram-AAUBKEIU-CxWS6MBd.js → c4Diagram-AAUBKEIU-BHFjzIi4.js} +1 -1
  219. package/web-shell/assets/channel-iRo68q4Q.js +1 -0
  220. package/web-shell/assets/{chunk-2J33WTMH-BtNuY5Yp.js → chunk-2J33WTMH-mdeQVz59.js} +1 -1
  221. package/web-shell/assets/{chunk-4BX2VUAB-BU-x368d.js → chunk-4BX2VUAB-BkKMlwBX.js} +1 -1
  222. package/web-shell/assets/{chunk-55IACEB6-DRgTLvBu.js → chunk-55IACEB6-B7bnXNfu.js} +1 -1
  223. package/web-shell/assets/{chunk-727SXJPM-D2aElv7q.js → chunk-727SXJPM-DGz8Mm6i.js} +1 -1
  224. package/web-shell/assets/{chunk-AQP2D5EJ-BwHCMRQ0.js → chunk-AQP2D5EJ-BQAydUNk.js} +1 -1
  225. package/web-shell/assets/{chunk-FMBD7UC4-BMyPH-ku.js → chunk-FMBD7UC4-GHr2LN_p.js} +1 -1
  226. package/web-shell/assets/{chunk-ND2GUHAM-BNKTstUf.js → chunk-ND2GUHAM-7R91lnUx.js} +1 -1
  227. package/web-shell/assets/{chunk-QZHKN3VN-gD3vsFId.js → chunk-QZHKN3VN-aTJD3lSQ.js} +1 -1
  228. package/web-shell/assets/classDiagram-4FO5ZUOK-iHF24a8X.js +1 -0
  229. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-iHF24a8X.js +1 -0
  230. package/web-shell/assets/{cose-bilkent-S5V4N54A-BG9FAsXE.js → cose-bilkent-S5V4N54A-BTf8t1RL.js} +1 -1
  231. package/web-shell/assets/{dagre-BM42HDAG-Cy1sR7om.js → dagre-BM42HDAG-_sgp3WuA.js} +1 -1
  232. package/web-shell/assets/default-aEtf0G7-.svg +1 -0
  233. package/web-shell/assets/{diagram-2AECGRRQ-Bxi1I_Vu.js → diagram-2AECGRRQ-CROtRy1w.js} +1 -1
  234. package/web-shell/assets/{diagram-5GNKFQAL-BGCJjO6y.js → diagram-5GNKFQAL-BqGRzwSc.js} +1 -1
  235. package/web-shell/assets/{diagram-KO2AKTUF-CMTeLXp7.js → diagram-KO2AKTUF-CMrcEtA7.js} +1 -1
  236. package/web-shell/assets/{diagram-LMA3HP47-BN1wyAGh.js → diagram-LMA3HP47-BRydGNW5.js} +1 -1
  237. package/web-shell/assets/{diagram-OG6HWLK6-UYSG_zcp.js → diagram-OG6HWLK6-D0ilgNjV.js} +1 -1
  238. package/web-shell/assets/{erDiagram-TEJ5UH35-DqXL08lw.js → erDiagram-TEJ5UH35-2lnQeJUM.js} +1 -1
  239. package/web-shell/assets/{flowDiagram-I6XJVG4X-BPJ9SFji.js → flowDiagram-I6XJVG4X-C_ZMdQiC.js} +1 -1
  240. package/web-shell/assets/{ganttDiagram-6RSMTGT7-BEd9Pnms.js → ganttDiagram-6RSMTGT7-Dw9V_Ny0.js} +1 -1
  241. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-DrNRH3oi.js → gitGraphDiagram-PVQCEYII-HDXI-F1B.js} +1 -1
  242. package/web-shell/assets/index-CHmzAWys.css +5 -0
  243. package/web-shell/assets/index-w6GTOHh1.js +713 -0
  244. package/web-shell/assets/{infoDiagram-5YYISTIA-CFYBrkVI.js → infoDiagram-5YYISTIA-CuB8Ebua.js} +1 -1
  245. package/web-shell/assets/insert-DmRbh9Rv.svg +1 -0
  246. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-Dxsddth7.js → ishikawaDiagram-YF4QCWOH-D_tyhVwh.js} +1 -1
  247. package/web-shell/assets/{journeyDiagram-JHISSGLW-DxaDK80t.js → journeyDiagram-JHISSGLW-CgCwJQNU.js} +1 -1
  248. package/web-shell/assets/{kanban-definition-UN3LZRKU-Q0jQCOct.js → kanban-definition-UN3LZRKU-PZUtcbPx.js} +1 -1
  249. package/web-shell/assets/{linear-DGGM2kcP.js → linear-CZqRdJIU.js} +1 -1
  250. package/web-shell/assets/{mermaid.core-ByoxnWut.js → mermaid.core-CPW_4UEF.js} +5 -5
  251. package/web-shell/assets/{mindmap-definition-RKZ34NQL-C0ZseHsi.js → mindmap-definition-RKZ34NQL-D_Y75ID7.js} +1 -1
  252. package/web-shell/assets/{pieDiagram-4H26LBE5-MQXNhl5A.js → pieDiagram-4H26LBE5-Q4dTyLeF.js} +1 -1
  253. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-DIR4ee2A.js → quadrantDiagram-W4KKPZXB-ckw329Ft.js} +1 -1
  254. package/web-shell/assets/queue-DWpnpFgW.svg +1 -0
  255. package/web-shell/assets/{requirementDiagram-4Y6WPE33-BTR0UdYQ.js → requirementDiagram-4Y6WPE33-DbVDm4It.js} +1 -1
  256. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-sfnhMELN.js → sankeyDiagram-5OEKKPKP-CHuZ_ecH.js} +1 -1
  257. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-DXczHOHH.js → sequenceDiagram-3UESZ5HK-DU2YSpq-.js} +1 -1
  258. package/web-shell/assets/{stateDiagram-AJRCARHV-DdE_KQFH.js → stateDiagram-AJRCARHV-CA9PEBUo.js} +1 -1
  259. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-t1LRI0oY.js +1 -0
  260. package/web-shell/assets/{timeline-definition-PNZ67QCA-DIc61uE8.js → timeline-definition-PNZ67QCA-Bhlo4WVc.js} +1 -1
  261. package/web-shell/assets/{vennDiagram-CIIHVFJN-BF7ODmxB.js → vennDiagram-CIIHVFJN-6xtPLsyl.js} +1 -1
  262. package/web-shell/assets/{wardley-L42UT6IY-3pc1MEaw.js → wardley-L42UT6IY-3eozmXPf.js} +1 -1
  263. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-9jnPcZuP.js → wardleyDiagram-YWT4CUSO-BOn6hKss.js} +1 -1
  264. package/web-shell/assets/{xychartDiagram-2RQKCTM6-DcthaZK6.js → xychartDiagram-2RQKCTM6-BsP4-I_y.js} +1 -1
  265. package/web-shell/index.html +2 -2
  266. package/chunks/chunk-5P5XGNYH.js +0 -93
  267. package/chunks/chunk-B6HQGTYR.js +0 -410
  268. package/chunks/chunk-SEZC2725.js +0 -36
  269. package/chunks/chunk-SYCJMSIJ.js +0 -82
  270. package/chunks/daemon-status-provider-CSL3BUOY.js +0 -68
  271. package/chunks/initializer-P5AXF7PV.js +0 -61
  272. package/chunks/list-6COK34BP.js +0 -65
  273. package/chunks/loadedSettingsAdapter-XIUTN245.js +0 -60
  274. package/chunks/nonInteractiveCli-7575LBXP.js +0 -91
  275. package/chunks/workspace-providers-status-ZIR5EPOO.js +0 -62
  276. package/chunks/workspace-service-OM5D4OI2.js +0 -60
  277. package/web-shell/assets/channel-DYPNiTww.js +0 -1
  278. package/web-shell/assets/classDiagram-4FO5ZUOK-p_g25Tni.js +0 -1
  279. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-p_g25Tni.js +0 -1
  280. package/web-shell/assets/index-CpOXWDPh.js +0 -714
  281. package/web-shell/assets/index-oVK7qhre.css +0 -5
  282. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-BHUSEndU.js +0 -1
@@ -0,0 +1,813 @@
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-T4T2FNV4.js";
14
+ import {
15
+ require_react
16
+ } from "./chunk-KYMBIKIW.js";
17
+ import {
18
+ t
19
+ } from "./chunk-R5OP2ATH.js";
20
+ import {
21
+ readManyFiles,
22
+ shouldRunVisionBridge,
23
+ stripTerminalControlSequences
24
+ } from "./chunk-YAINVQ3Q.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 fs 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/ui/hooks/extension-mention-ref.ts
254
+ var EXTENSION_REF_PREFIX = "ext:";
255
+ function parseExtensionRef(pathName) {
256
+ if (!pathName.startsWith(EXTENSION_REF_PREFIX)) return null;
257
+ const name = pathName.slice(EXTENSION_REF_PREFIX.length);
258
+ if (!name) return null;
259
+ return { name };
260
+ }
261
+ __name(parseExtensionRef, "parseExtensionRef");
262
+ function buildExtensionRef(extensionName) {
263
+ return `${EXTENSION_REF_PREFIX}${extensionName}`;
264
+ }
265
+ __name(buildExtensionRef, "buildExtensionRef");
266
+ function matchExtensionByRef(name, extensions) {
267
+ const lower = name.toLowerCase();
268
+ return extensions.find(
269
+ (ext) => ext.name.toLowerCase() === lower || ext.config.name.toLowerCase() === lower
270
+ );
271
+ }
272
+ __name(matchExtensionByRef, "matchExtensionByRef");
273
+ var BIDI_CONTROL_RE = /[‎‏؜⁦⁧⁨⁩‪‫‬‭‮]/g;
274
+ function sanitizeDisplayText(raw) {
275
+ const stripped = stripTerminalControlSequences(raw).replace(BIDI_CONTROL_RE, "").replace(/\s+/g, " ").trim();
276
+ return stripped.length > 0 ? stripped : null;
277
+ }
278
+ __name(sanitizeDisplayText, "sanitizeDisplayText");
279
+ function getExtensionSuggestions(config, pattern) {
280
+ if (!config) return [];
281
+ if (config.isTrustedFolder?.() === false) return [];
282
+ const extensions = config.getActiveExtensions?.() ?? [];
283
+ if (extensions.length === 0) return [];
284
+ const query = pattern.toLowerCase();
285
+ return extensions.map((ext) => ({
286
+ ext,
287
+ safeLabel: sanitizeDisplayText(ext.displayName || ext.name) || ext.name
288
+ })).filter(({ safeLabel, ext }) => {
289
+ const label = safeLabel.toLowerCase();
290
+ const name = ext.name.toLowerCase();
291
+ return label.includes(query) || name.includes(query);
292
+ }).sort((a, b) => {
293
+ const aName = a.safeLabel.toLowerCase();
294
+ const bName = b.safeLabel.toLowerCase();
295
+ const aPrefix = aName.startsWith(query) ? 0 : 1;
296
+ const bPrefix = bName.startsWith(query) ? 0 : 1;
297
+ if (aPrefix !== bPrefix) return aPrefix - bPrefix;
298
+ return aName.localeCompare(bName);
299
+ }).slice(0, MAX_SUGGESTIONS_TO_SHOW).map(({ ext, safeLabel }) => ({
300
+ label: safeLabel,
301
+ value: buildExtensionRef(ext.name),
302
+ description: ext.config.description ? sanitizeDisplayText(ext.config.description) ?? void 0 : void 0,
303
+ sourceBadge: t("Extension"),
304
+ isDirectory: false
305
+ }));
306
+ }
307
+ __name(getExtensionSuggestions, "getExtensionSuggestions");
308
+ function buildExtensionContextText(extension) {
309
+ const displayName = sanitizeDisplayText(extension.displayName || extension.name) || extension.name;
310
+ const lines = [];
311
+ lines.push(
312
+ `--- Extension: ${displayName} (untrusted third-party content) ---`
313
+ );
314
+ if (extension.config.description) {
315
+ const desc = sanitizeDisplayText(extension.config.description);
316
+ if (desc) {
317
+ lines.push(desc);
318
+ lines.push("");
319
+ }
320
+ }
321
+ const capabilities = [];
322
+ if (extension.skills && extension.skills.length > 0) {
323
+ const skillNames = extension.skills.map((s) => sanitizeDisplayText(s.name) || s.name).join(", ");
324
+ capabilities.push(`- Skills: ${skillNames} (invoke via /<skill-name>)`);
325
+ }
326
+ if (extension.mcpServers && Object.keys(extension.mcpServers).length > 0) {
327
+ const serverNames = Object.keys(extension.mcpServers).map((n) => sanitizeDisplayText(n) || n).join(", ");
328
+ capabilities.push(`- MCP Servers: ${serverNames}`);
329
+ }
330
+ if (extension.agents && extension.agents.length > 0) {
331
+ const agentNames = extension.agents.map((a) => sanitizeDisplayText(a.name) || a.name).join(", ");
332
+ capabilities.push(`- Agents: ${agentNames}`);
333
+ }
334
+ if (capabilities.length > 0) {
335
+ lines.push("Available capabilities from this extension:");
336
+ lines.push(...capabilities);
337
+ lines.push("");
338
+ }
339
+ lines.push(`--- End Extension: ${displayName} ---`);
340
+ return lines.join("\n");
341
+ }
342
+ __name(buildExtensionContextText, "buildExtensionContextText");
343
+
344
+ // packages/cli/src/ui/hooks/atCommandProcessor.ts
345
+ function parseAllAtCommands(query) {
346
+ const parts = [];
347
+ let currentIndex = 0;
348
+ while (currentIndex < query.length) {
349
+ let atIndex = -1;
350
+ let nextSearchIndex = currentIndex;
351
+ while (nextSearchIndex < query.length) {
352
+ if (query[nextSearchIndex] === "@" && (nextSearchIndex === 0 || query[nextSearchIndex - 1] !== "\\")) {
353
+ atIndex = nextSearchIndex;
354
+ break;
355
+ }
356
+ nextSearchIndex++;
357
+ }
358
+ if (atIndex === -1) {
359
+ if (currentIndex < query.length) {
360
+ parts.push({ type: "text", content: query.substring(currentIndex) });
361
+ }
362
+ break;
363
+ }
364
+ if (atIndex > currentIndex) {
365
+ parts.push({
366
+ type: "text",
367
+ content: query.substring(currentIndex, atIndex)
368
+ });
369
+ }
370
+ let pathEndIndex = atIndex + 1;
371
+ let inEscape = false;
372
+ while (pathEndIndex < query.length) {
373
+ const char = query[pathEndIndex];
374
+ if (inEscape) {
375
+ inEscape = false;
376
+ } else if (char === "\\") {
377
+ inEscape = true;
378
+ } else if (/[,\s;!?()[\]{}]/.test(char)) {
379
+ break;
380
+ } else if (char === ".") {
381
+ const nextChar = pathEndIndex + 1 < query.length ? query[pathEndIndex + 1] : "";
382
+ if (nextChar === "" || /\s/.test(nextChar)) {
383
+ break;
384
+ }
385
+ }
386
+ pathEndIndex++;
387
+ }
388
+ const rawAtPath = query.substring(atIndex, pathEndIndex);
389
+ const atPath = unescapePath(rawAtPath);
390
+ parts.push({ type: "atPath", content: atPath });
391
+ currentIndex = pathEndIndex;
392
+ }
393
+ return parts.filter(
394
+ (part) => !(part.type === "text" && part.content.trim() === "")
395
+ );
396
+ }
397
+ __name(parseAllAtCommands, "parseAllAtCommands");
398
+ function parseMcpResourceRef(pathName, mcpServerNames) {
399
+ const match = matchMcpServerPrefix(pathName, mcpServerNames);
400
+ if (!match || !match.rest) return null;
401
+ return { serverName: match.serverName, uri: match.rest };
402
+ }
403
+ __name(parseMcpResourceRef, "parseMcpResourceRef");
404
+ async function resolveAtCommandQuery({
405
+ query,
406
+ config,
407
+ onDebugMessage,
408
+ messageId: userMessageTimestamp,
409
+ signal
410
+ }) {
411
+ const commandParts = parseAllAtCommands(query);
412
+ const atPathCommandParts = commandParts.filter(
413
+ (part) => part.type === "atPath"
414
+ );
415
+ if (atPathCommandParts.length === 0) {
416
+ return { processedQuery: [{ text: query }], shouldProceed: true };
417
+ }
418
+ const fileDiscovery = config.getFileService();
419
+ const respectFileIgnore = config.getFileFilteringOptions();
420
+ const pathSpecsToRead = [];
421
+ const atPathToResolvedSpecMap = /* @__PURE__ */ new Map();
422
+ const contentLabelsForDisplay = [];
423
+ const ignoredByReason = {
424
+ git: [],
425
+ qwen: [],
426
+ both: []
427
+ };
428
+ const mcpServerNames = new Set(Object.keys(config.getMcpServers() || {}));
429
+ const mcpResourceRefs = [];
430
+ const activeExtensions = config.getActiveExtensions?.() ?? [];
431
+ const extensionMentions = [];
432
+ for (const atPathPart of atPathCommandParts) {
433
+ const originalAtPath = atPathPart.content;
434
+ if (originalAtPath === "@") {
435
+ onDebugMessage(
436
+ "Lone @ detected, will be treated as text in the modified query."
437
+ );
438
+ continue;
439
+ }
440
+ const pathName = originalAtPath.substring(1);
441
+ const extRef = parseExtensionRef(pathName);
442
+ if (extRef) {
443
+ const extension = matchExtensionByRef(extRef.name, activeExtensions);
444
+ if (extension) {
445
+ if (!extensionMentions.some((m) => m.extension.name === extension.name)) {
446
+ extensionMentions.push({ originalAtPath, extension });
447
+ }
448
+ atPathToResolvedSpecMap.set(originalAtPath, pathName);
449
+ continue;
450
+ }
451
+ onDebugMessage(
452
+ `Extension "${extRef.name}" not found among active extensions. Available: ${activeExtensions.map((e) => e.name).join(", ") || "(none)"}`
453
+ );
454
+ continue;
455
+ }
456
+ const resourceRef = parseMcpResourceRef(pathName, mcpServerNames);
457
+ if (resourceRef) {
458
+ mcpResourceRefs.push({ originalAtPath, ...resourceRef });
459
+ atPathToResolvedSpecMap.set(originalAtPath, pathName);
460
+ continue;
461
+ }
462
+ const workspaceContext = config.getWorkspaceContext();
463
+ const projectTempDir = Storage.getGlobalTempDir();
464
+ const absolutePathName = path.isAbsolute(pathName) ? pathName : path.resolve(workspaceContext.getDirectories()[0] || "", pathName);
465
+ if (!isSubpath(projectTempDir, absolutePathName) && !workspaceContext.isPathWithinWorkspace(pathName)) {
466
+ onDebugMessage(
467
+ `Path ${pathName} is not in the workspace and will be skipped.`
468
+ );
469
+ continue;
470
+ }
471
+ const gitIgnored = respectFileIgnore.respectGitIgnore && fileDiscovery.shouldIgnoreFile(pathName, {
472
+ respectGitIgnore: true,
473
+ respectQwenIgnore: false
474
+ });
475
+ const qwenIgnored = respectFileIgnore.respectQwenIgnore && fileDiscovery.shouldIgnoreFile(pathName, {
476
+ respectGitIgnore: false,
477
+ respectQwenIgnore: true
478
+ });
479
+ if (gitIgnored || qwenIgnored) {
480
+ const reason = gitIgnored && qwenIgnored ? "both" : gitIgnored ? "git" : "qwen";
481
+ ignoredByReason[reason].push(pathName);
482
+ const reasonText = reason === "both" ? "ignored by both git and qwen" : reason === "git" ? "git-ignored" : "qwen-ignored";
483
+ onDebugMessage(`Path ${pathName} is ${reasonText} and will be skipped.`);
484
+ continue;
485
+ }
486
+ let resolvedSuccessfully = false;
487
+ let sawNotFound = false;
488
+ for (const dir of config.getWorkspaceContext().getDirectories()) {
489
+ let currentPathSpec = pathName;
490
+ try {
491
+ const absolutePath = path.resolve(dir, pathName);
492
+ const stats = await fs.stat(absolutePath);
493
+ if (stats.isDirectory()) {
494
+ currentPathSpec = pathName;
495
+ onDebugMessage(`Path ${pathName} resolved to directory.`);
496
+ } else {
497
+ onDebugMessage(`Path ${pathName} resolved to file: ${absolutePath}`);
498
+ }
499
+ resolvedSuccessfully = true;
500
+ } catch (error) {
501
+ if (isNodeError(error) && error.code === "ENOENT") {
502
+ sawNotFound = true;
503
+ continue;
504
+ } else {
505
+ onDebugMessage(
506
+ `Error stating path ${pathName}: ${getErrorMessage(error)}. Path ${pathName} will be skipped.`
507
+ );
508
+ }
509
+ }
510
+ if (resolvedSuccessfully) {
511
+ pathSpecsToRead.push(currentPathSpec);
512
+ atPathToResolvedSpecMap.set(originalAtPath, currentPathSpec);
513
+ contentLabelsForDisplay.push(pathName);
514
+ break;
515
+ }
516
+ }
517
+ if (!resolvedSuccessfully && sawNotFound) {
518
+ onDebugMessage(
519
+ `Path ${pathName} not found. Path ${pathName} will be skipped.`
520
+ );
521
+ }
522
+ }
523
+ let initialQueryText = "";
524
+ for (let i = 0; i < commandParts.length; i++) {
525
+ const part = commandParts[i];
526
+ if (part.type === "text") {
527
+ initialQueryText += part.content;
528
+ } else {
529
+ const resolvedSpec = atPathToResolvedSpecMap.get(part.content);
530
+ if (i > 0 && initialQueryText.length > 0 && !initialQueryText.endsWith(" ")) {
531
+ const prevPart = commandParts[i - 1];
532
+ if (prevPart.type === "text" || prevPart.type === "atPath" && atPathToResolvedSpecMap.has(prevPart.content)) {
533
+ initialQueryText += " ";
534
+ }
535
+ }
536
+ if (resolvedSpec) {
537
+ initialQueryText += `@${resolvedSpec}`;
538
+ } else {
539
+ if (i > 0 && initialQueryText.length > 0 && !initialQueryText.endsWith(" ") && !part.content.startsWith(" ")) {
540
+ initialQueryText += " ";
541
+ }
542
+ initialQueryText += part.content;
543
+ }
544
+ }
545
+ }
546
+ initialQueryText = initialQueryText.trim();
547
+ const totalIgnored = ignoredByReason["git"].length + ignoredByReason["qwen"].length + ignoredByReason["both"].length;
548
+ if (totalIgnored > 0) {
549
+ const messages = [];
550
+ if (ignoredByReason["git"].length) {
551
+ messages.push(`Git-ignored: ${ignoredByReason["git"].join(", ")}`);
552
+ }
553
+ if (ignoredByReason["qwen"].length) {
554
+ messages.push(`Qwen-ignored: ${ignoredByReason["qwen"].join(", ")}`);
555
+ }
556
+ if (ignoredByReason["both"].length) {
557
+ messages.push(`Ignored by both: ${ignoredByReason["both"].join(", ")}`);
558
+ }
559
+ const message = `Ignored ${totalIgnored} files:
560
+ ${messages.join("\n")}`;
561
+ onDebugMessage(message);
562
+ }
563
+ const resourceReads = await Promise.allSettled(
564
+ mcpResourceRefs.map(
565
+ (ref) => config.getToolRegistry().readMcpResource(ref.serverName, ref.uri, { signal })
566
+ )
567
+ );
568
+ const resourceParts = [];
569
+ const resourceDisplays = [];
570
+ const resourceLabels = [];
571
+ for (let i = 0; i < mcpResourceRefs.length; i++) {
572
+ const ref = mcpResourceRefs[i];
573
+ const label = `${ref.serverName}:${ref.uri}`;
574
+ const callId = `client-mcp-resource-${userMessageTimestamp}-${i}`;
575
+ const outcome = resourceReads[i];
576
+ if (outcome.status === "rejected") {
577
+ onDebugMessage(
578
+ `Failed to read MCP resource ${label}: ${getErrorMessage(outcome.reason)}`
579
+ );
580
+ resourceDisplays.push({
581
+ callId,
582
+ name: "Read MCP Resource",
583
+ description: `Read resource ${label}`,
584
+ status: "Error" /* Error */,
585
+ resultDisplay: `Failed to read resource ${label}: ${getErrorMessage(outcome.reason)}`,
586
+ confirmationDetails: void 0
587
+ });
588
+ continue;
589
+ }
590
+ const formatted = formatMcpResourceContents(outcome.value, label);
591
+ if (formatted.parts.length > 0) {
592
+ resourceParts.push(...formatted.parts);
593
+ } else {
594
+ resourceParts.push({ text: emptyMcpResourceText(formatted, label) });
595
+ }
596
+ resourceLabels.push(label);
597
+ resourceDisplays.push({
598
+ callId,
599
+ name: "Read MCP Resource",
600
+ description: `Read resource ${label}`,
601
+ status: "Success" /* Success */,
602
+ resultDisplay: summarizeMcpResource(formatted),
603
+ confirmationDetails: void 0
604
+ });
605
+ }
606
+ if (pathSpecsToRead.length === 0 && mcpResourceRefs.length === 0 && extensionMentions.length === 0) {
607
+ onDebugMessage("No valid file paths found in @ commands to read.");
608
+ if (initialQueryText === "@" && query.trim() === "@") {
609
+ return { processedQuery: [{ text: query }], shouldProceed: true };
610
+ } else if (!initialQueryText && query) {
611
+ return { processedQuery: [{ text: query }], shouldProceed: true };
612
+ }
613
+ return {
614
+ processedQuery: [{ text: initialQueryText || query }],
615
+ shouldProceed: true
616
+ };
617
+ }
618
+ const EXTENSION_CONTEXT_BUDGET = 2e5;
619
+ const PER_FILE_CAP = 5e4;
620
+ let extensionContextBudgetRemaining = EXTENSION_CONTEXT_BUDGET;
621
+ const extensionParts = [];
622
+ const extensionDisplays = [];
623
+ const extensionLabels = [];
624
+ for (let i = 0; i < extensionMentions.length; i++) {
625
+ const { extension } = extensionMentions[i];
626
+ const displayName = sanitizeDisplayText(extension.displayName || extension.name) || extension.name;
627
+ const callId = `client-extension-${userMessageTimestamp}-${i}`;
628
+ let contextText = buildExtensionContextText(extension);
629
+ if (extension.contextFiles && extension.contextFiles.length > 0) {
630
+ const fileReads = await Promise.allSettled(
631
+ extension.contextFiles.map(async (contextFilePath) => {
632
+ let realPath;
633
+ let realExtPath;
634
+ try {
635
+ realPath = await fs.realpath(contextFilePath);
636
+ realExtPath = await fs.realpath(extension.path);
637
+ } catch {
638
+ onDebugMessage(
639
+ `Skipping unreadable context file: ${contextFilePath}`
640
+ );
641
+ return null;
642
+ }
643
+ if (!isSubpath(realExtPath, realPath)) {
644
+ onDebugMessage(
645
+ `Skipping context file outside extension directory: ${contextFilePath}`
646
+ );
647
+ return null;
648
+ }
649
+ return fs.readFile(realPath, { encoding: "utf-8", signal });
650
+ })
651
+ );
652
+ for (let j = 0; j < fileReads.length; j++) {
653
+ const outcome = fileReads[j];
654
+ if (outcome.status === "rejected") {
655
+ onDebugMessage(
656
+ `Failed to read extension context file ${extension.contextFiles[j]}: ${getErrorMessage(outcome.reason)}`
657
+ );
658
+ continue;
659
+ }
660
+ const content = outcome.value;
661
+ if (!content || !content.trim()) continue;
662
+ if (extensionContextBudgetRemaining <= 0) {
663
+ onDebugMessage(
664
+ `Extension context budget exhausted, skipping remaining files.`
665
+ );
666
+ break;
667
+ }
668
+ const cap = Math.min(PER_FILE_CAP, extensionContextBudgetRemaining);
669
+ const cappedContent = content.length > cap ? content.slice(0, cap) + "\n... (truncated)" : content;
670
+ contextText += `
671
+
672
+ ${cappedContent}`;
673
+ extensionContextBudgetRemaining -= cappedContent.length;
674
+ }
675
+ }
676
+ extensionParts.push({ text: contextText });
677
+ extensionLabels.push(buildExtensionRef(extension.name));
678
+ extensionDisplays.push({
679
+ callId,
680
+ name: "Activate Extension",
681
+ description: `Activated extension ${displayName}`,
682
+ status: "Success" /* Success */,
683
+ resultDisplay: void 0,
684
+ confirmationDetails: void 0
685
+ });
686
+ }
687
+ const fileParts = [];
688
+ let fileDisplays = [];
689
+ if (pathSpecsToRead.length > 0) {
690
+ try {
691
+ const result = await readManyFiles(config, {
692
+ paths: pathSpecsToRead,
693
+ signal,
694
+ preserveUnsupportedImageForBridge: shouldRunVisionBridge(config)
695
+ });
696
+ const parts = Array.isArray(result.contentParts) ? result.contentParts : [result.contentParts];
697
+ fileDisplays = result.files.map((file, index) => ({
698
+ callId: `client-read-${userMessageTimestamp}-${index}`,
699
+ name: file.isDirectory ? "Read Directory" : "Read File",
700
+ description: file.isDirectory ? `Read directory ${path.basename(file.filePath)}` : `Read file ${path.basename(file.filePath)}`,
701
+ status: file.error ? "Error" /* Error */ : "Success" /* Success */,
702
+ resultDisplay: file.error ? `Failed to read ${path.basename(file.filePath)}: ${file.error}` : void 0,
703
+ confirmationDetails: void 0
704
+ }));
705
+ if (parts.length > 0 && !result.error) {
706
+ for (const part of parts) {
707
+ fileParts.push(typeof part === "string" ? { text: part } : part);
708
+ }
709
+ } else {
710
+ onDebugMessage("readManyFiles returned no content or empty content.");
711
+ }
712
+ } catch (error) {
713
+ const errorToolCallDisplay = {
714
+ callId: `client-read-${userMessageTimestamp}`,
715
+ name: "Read File(s)",
716
+ description: "Error attempting to read files",
717
+ status: "Error" /* Error */,
718
+ resultDisplay: `Error reading files (${contentLabelsForDisplay.join(", ")}): ${getErrorMessage(error)}`,
719
+ confirmationDetails: void 0
720
+ };
721
+ const errorMessage = typeof errorToolCallDisplay.resultDisplay === "string" ? errorToolCallDisplay.resultDisplay : void 0;
722
+ const labelsOnError = [
723
+ ...extensionLabels,
724
+ ...contentLabelsForDisplay,
725
+ ...resourceLabels
726
+ ];
727
+ return {
728
+ processedQuery: null,
729
+ shouldProceed: false,
730
+ toolDisplays: [
731
+ ...extensionDisplays,
732
+ ...resourceDisplays,
733
+ errorToolCallDisplay
734
+ ],
735
+ filesRead: labelsOnError,
736
+ recording: {
737
+ filesRead: labelsOnError,
738
+ status: "error",
739
+ message: errorMessage
740
+ }
741
+ };
742
+ }
743
+ }
744
+ const processedQueryParts = [
745
+ { text: initialQueryText },
746
+ ...extensionParts,
747
+ ...fileParts,
748
+ ...resourceParts
749
+ ];
750
+ const allLabels = [
751
+ ...extensionLabels,
752
+ ...contentLabelsForDisplay,
753
+ ...resourceLabels
754
+ ];
755
+ return {
756
+ processedQuery: processedQueryParts,
757
+ shouldProceed: true,
758
+ toolDisplays: [...extensionDisplays, ...fileDisplays, ...resourceDisplays],
759
+ filesRead: allLabels,
760
+ recording: {
761
+ filesRead: allLabels,
762
+ status: "success"
763
+ }
764
+ };
765
+ }
766
+ __name(resolveAtCommandQuery, "resolveAtCommandQuery");
767
+ async function handleAtCommand(params) {
768
+ const result = await resolveAtCommandQuery(params);
769
+ if (result.recording) {
770
+ const chatRecorder = params.config.getChatRecordingService?.();
771
+ chatRecorder?.recordAtCommand({
772
+ filesRead: result.recording.filesRead,
773
+ status: result.recording.status,
774
+ ...result.recording.message ? { message: result.recording.message } : {},
775
+ userText: params.query
776
+ });
777
+ }
778
+ if (params.addItem && result.toolDisplays && result.toolDisplays.length > 0) {
779
+ const toolGroupItem = {
780
+ type: "tool_group",
781
+ tools: result.toolDisplays
782
+ };
783
+ params.addItem(toolGroupItem, params.messageId);
784
+ }
785
+ return {
786
+ processedQuery: result.processedQuery,
787
+ shouldProceed: result.shouldProceed,
788
+ toolDisplays: result.toolDisplays,
789
+ filesRead: result.filesRead
790
+ };
791
+ }
792
+ __name(handleAtCommand, "handleAtCommand");
793
+
794
+ export {
795
+ matchMcpServerPrefix,
796
+ buildMcpResourceRef,
797
+ MAX_WIDTH,
798
+ MAX_SUGGESTIONS_TO_SHOW,
799
+ SuggestionsDisplay,
800
+ getExtensionSuggestions,
801
+ resolveAtCommandQuery,
802
+ handleAtCommand
803
+ };
804
+ /**
805
+ * @license
806
+ * Copyright 2025 Google LLC
807
+ * SPDX-License-Identifier: Apache-2.0
808
+ */
809
+ /**
810
+ * @license
811
+ * Copyright 2025 Qwen
812
+ * SPDX-License-Identifier: Apache-2.0
813
+ */