@qwen-code/qwen-code 0.19.6 → 0.19.7-nightly.20260708.394c1a289

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 (267) hide show
  1. package/bundled/qc-helper/docs/configuration/model-providers.md +5 -1
  2. package/bundled/qc-helper/docs/configuration/settings.md +33 -1
  3. package/bundled/qc-helper/docs/features/channels/_meta.ts +1 -0
  4. package/bundled/qc-helper/docs/features/channels/overview.md +41 -31
  5. package/bundled/qc-helper/docs/features/channels/wecom.md +111 -0
  6. package/bundled/qc-helper/docs/features/code-review.md +16 -6
  7. package/bundled/qc-helper/docs/features/commands.md +1 -1
  8. package/bundled/qc-helper/docs/features/hooks.md +6 -0
  9. package/bundled/qc-helper/docs/features/skills.md +5 -3
  10. package/bundled/qc-helper/docs/integration-github-action.md +1 -1
  11. package/bundled/review/DESIGN.md +50 -18
  12. package/bundled/review/SKILL.md +102 -12
  13. package/chunks/{MaxSizedBox-SK7CUWZQ.js → MaxSizedBox-XS37LWTD.js} +31 -29
  14. package/chunks/{StandaloneSessionPicker-G44HGSAP.js → StandaloneSessionPicker-LPALJTKN.js} +44 -41
  15. package/chunks/{acpAgent-PKCTYWJV.js → acpAgent-4VE3FGJX.js} +769 -366
  16. package/chunks/{agent-IYMHUXWB.js → agent-CCHERW6L.js} +24 -24
  17. package/chunks/{agent-headless-L2DAW6I5.js → agent-headless-55N6UBUU.js} +24 -24
  18. package/chunks/{anthropicContentGenerator-H5ZOEENQ.js → anthropicContentGenerator-AKYPSZIV.js} +7 -7
  19. package/chunks/{artifact-tool-SLYPWG3C.js → artifact-tool-D233YJFH.js} +27 -8
  20. package/chunks/{askUserQuestion-OKPTECON.js → askUserQuestion-MKL5ZTMC.js} +2 -2
  21. package/chunks/{bridge-DF3IJQ5V.js → bridge-U6HXOHE7.js} +34 -32
  22. package/chunks/{channel-worker-supervisor-JUYQ5Z4R.js → channel-worker-supervisor-CRCVYQIE.js} +1 -1
  23. package/chunks/{chunk-AVQDCKNF.js → chunk-22MNNNXE.js} +4 -0
  24. package/chunks/chunk-2DYY5XUZ.js +8223 -0
  25. package/chunks/chunk-2FHWCKWA.js +262 -0
  26. package/chunks/{chunk-6BEOH4KK.js → chunk-2NPS2UDH.js} +767 -122
  27. package/chunks/{chunk-N2IJLN2L.js → chunk-2SWMCXVR.js} +13 -5
  28. package/chunks/{chunk-OBVBTAX5.js → chunk-2YELHTUE.js} +2 -2
  29. package/chunks/chunk-332PWN27.js +19 -0
  30. package/chunks/{chunk-CLQPBI4H.js → chunk-3B26UVCX.js} +132 -26
  31. package/chunks/{chunk-HCFSKO6K.js → chunk-3QDZDAJG.js} +1 -1
  32. package/chunks/{chunk-G7OQ3RFJ.js → chunk-42XGFRJS.js} +3 -3
  33. package/chunks/{chunk-SL2P3JUA.js → chunk-43W4YSO6.js} +1 -12
  34. package/chunks/{chunk-JA5KWZTJ.js → chunk-44NROQYV.js} +5 -3
  35. package/chunks/{chunk-BOAWGUY6.js → chunk-4AFOWB47.js} +121 -49
  36. package/chunks/{chunk-MOUXUCXQ.js → chunk-4KJ2BPIT.js} +1 -1
  37. package/chunks/{chunk-YTWX5TT2.js → chunk-5FL2K3ZB.js} +1 -1
  38. package/chunks/{chunk-UNXGEDX2.js → chunk-5OSSOBZC.js} +133 -25
  39. package/chunks/{chunk-JN2VJ33O.js → chunk-7I4MGFBN.js} +966 -121
  40. package/chunks/{chunk-T42ACHFI.js → chunk-7LTB54MK.js} +1 -1
  41. package/chunks/chunk-A2X3KLC3.js +3807 -0
  42. package/chunks/{chunk-EWALXUAD.js → chunk-AGHU5VRK.js} +8 -0
  43. package/chunks/{chunk-GLPV75ES.js → chunk-AHNJGLFV.js} +2 -2
  44. package/chunks/{chunk-IUSKVKH5.js → chunk-AXTPFMRS.js} +1 -1
  45. package/chunks/{chunk-T22H4V4R.js → chunk-B34OV7K2.js} +1 -1
  46. package/chunks/{chunk-FZ5NVRVK.js → chunk-B5FOCTEZ.js} +3 -3
  47. package/chunks/{chunk-3UC7ZC43.js → chunk-B6WUEODT.js} +7 -7
  48. package/chunks/{chunk-MJKEQSZI.js → chunk-BGL43SJ3.js} +1 -1
  49. package/chunks/{chunk-OAYOHSGP.js → chunk-BHRU4SDF.js} +4 -4
  50. package/chunks/{chunk-YPCPZSZB.js → chunk-CCGOFQV3.js} +56 -4
  51. package/chunks/{chunk-FDY3XOTM.js → chunk-CR5IU2RX.js} +4 -4
  52. package/chunks/{chunk-LWGLBVWA.js → chunk-CSOTA7KX.js} +1 -1
  53. package/chunks/{chunk-AGZF43UV.js → chunk-E7HM76PR.js} +7153 -4406
  54. package/chunks/{chunk-NIOPRZNN.js → chunk-E7KNELIZ.js} +1 -1
  55. package/chunks/{chunk-YSU33ACT.js → chunk-ELMPRVCB.js} +5 -13
  56. package/chunks/{chunk-SEZC2725.js → chunk-ER3BKOLB.js} +13 -0
  57. package/chunks/{chunk-3VJ7MT3N.js → chunk-EXPMGZZV.js} +14 -3
  58. package/chunks/{chunk-DBF3HTLT.js → chunk-FB2ULV4M.js} +4 -4
  59. package/chunks/{chunk-RZORUN6X.js → chunk-FEJ2FZ3U.js} +1 -1
  60. package/chunks/chunk-FK77ILF5.js +2477 -0
  61. package/chunks/{chunk-DMSNJDWG.js → chunk-FV7425LN.js} +38 -3
  62. package/chunks/{chunk-ALX6BUYW.js → chunk-G7ZG7CA6.js} +186 -27
  63. package/chunks/{chunk-2INJBYLJ.js → chunk-GIY6JTTC.js} +6 -6
  64. package/chunks/{chunk-D5KISTLW.js → chunk-H6EMK6QK.js} +1 -1
  65. package/chunks/{chunk-KYTQOCDE.js → chunk-HW4N45EE.js} +17 -46
  66. package/chunks/{chunk-VXGPYF7U.js → chunk-IFEWJXFS.js} +1 -1
  67. package/chunks/chunk-II73RK2S.js +158 -0
  68. package/chunks/{chunk-TENOUWY2.js → chunk-IJRL2S3D.js} +3 -3
  69. package/chunks/{chunk-GQBRGBLS.js → chunk-J43WPR6U.js} +9 -9
  70. package/chunks/{chunk-SRNPMG7J.js → chunk-JYOWO2F7.js} +16 -10
  71. package/chunks/{chunk-57NRQM3P.js → chunk-K34DD7FH.js} +2 -2
  72. package/chunks/{chunk-O2RJARYU.js → chunk-KKWO4IX2.js} +1409 -4088
  73. package/chunks/{chunk-SOT7OMGL.js → chunk-KT3SI3CQ.js} +2 -2
  74. package/chunks/{chunk-NUK2PFSU.js → chunk-L7IWK7JY.js} +1 -1
  75. package/chunks/{chunk-MHQKYQDS.js → chunk-LC4SMGYY.js} +158 -3
  76. package/chunks/chunk-LGFAYIKX.js +115 -0
  77. package/chunks/{chunk-MBWLP5OT.js → chunk-LKXDC3AW.js} +162 -40
  78. package/chunks/{chunk-7Z6UEJA4.js → chunk-ME344634.js} +5 -2
  79. package/chunks/{chunk-V6NH3CUC.js → chunk-MOQOAH7N.js} +3 -3
  80. package/chunks/{chunk-FPHA7WIZ.js → chunk-MYZWWRVW.js} +3 -3
  81. package/chunks/{chunk-YHTNWGRR.js → chunk-MZ7BABX3.js} +1 -1
  82. package/chunks/chunk-N74BA4VP.js +949 -0
  83. package/chunks/{chunk-B236XPGF.js → chunk-NQKLOAVJ.js} +29 -2
  84. package/chunks/{chunk-LXFCHX4X.js → chunk-OU6FPTJZ.js} +312 -25
  85. package/chunks/{chunk-HTWHAN44.js → chunk-PC4ZXHU2.js} +1 -1
  86. package/chunks/{chunk-3X76L4UF.js → chunk-PLGONYEL.js} +5 -5
  87. package/chunks/{chunk-WXUDZHOJ.js → chunk-PVXPDMGP.js} +10 -2
  88. package/chunks/{chunk-ZO5EA3XJ.js → chunk-QCSLZO6J.js} +1 -1
  89. package/chunks/{chunk-CEYA7K7C.js → chunk-QHT5USLK.js} +62 -12
  90. package/chunks/{chunk-NPQWQYU6.js → chunk-QYNNN7BK.js} +1 -1
  91. package/chunks/{chunk-N4YJQTRL.js → chunk-RFIL6REB.js} +71 -2
  92. package/chunks/{chunk-KSPVDFE4.js → chunk-SAIILPQ3.js} +0 -3
  93. package/chunks/{chunk-OIFSBXSP.js → chunk-SJHAUELE.js} +3 -3
  94. package/chunks/{chunk-BZHLWC6T.js → chunk-SUAKHHK7.js} +2 -2
  95. package/chunks/{chunk-QOKV6AO4.js → chunk-T2EJHSE3.js} +184 -147
  96. package/chunks/{chunk-ZI4MGBB5.js → chunk-TBAZMRW3.js} +1 -1
  97. package/chunks/{chunk-6QVRLKTZ.js → chunk-TBLJNMI7.js} +7 -7
  98. package/chunks/{chunk-J6ABRKAB.js → chunk-TDGF35EN.js} +2 -2
  99. package/chunks/chunk-TEYGKLIZ.js +167 -0
  100. package/chunks/{chunk-TOAUDIS7.js → chunk-TLWA7TPR.js} +6 -2
  101. package/chunks/chunk-UIDXQNMV.js +13 -0
  102. package/chunks/{chunk-MX7CTJHR.js → chunk-UZCT5OLN.js} +9 -9
  103. package/chunks/{chunk-LM3YCCZJ.js → chunk-VEB3NYSO.js} +1 -1
  104. package/chunks/{chunk-UTL7KABL.js → chunk-VQJ64BIQ.js} +7 -7
  105. package/chunks/{chunk-C2QKQZEQ.js → chunk-VTCPREC7.js} +3 -3
  106. package/chunks/{chunk-5ES5YPED.js → chunk-VZ7HY3YU.js} +1 -1
  107. package/chunks/{chunk-QOMAHFYI.js → chunk-W7EEOR7D.js} +3 -3
  108. package/chunks/{chunk-NVFJSIAX.js → chunk-WMPVYQ4P.js} +1 -1
  109. package/chunks/{chunk-V5VTULL5.js → chunk-X265R5C6.js} +3 -3
  110. package/chunks/{chunk-LKWAVAB5.js → chunk-X2XNQQJI.js} +2 -2
  111. package/chunks/{chunk-MJKMIQMK.js → chunk-X3YGAX7V.js} +1 -1
  112. package/chunks/{chunk-5WQF27GW.js → chunk-XQ2GVLNJ.js} +1 -1
  113. package/chunks/chunk-XUSONNJ4.js +28 -0
  114. package/chunks/{chunk-DXXNMPJH.js → chunk-YMWIKAEE.js} +460 -93
  115. package/chunks/{chunk-A34EPIUV.js → chunk-YYU6H66M.js} +18 -15
  116. package/chunks/{chunk-XH7H6YG4.js → chunk-ZK5EI6NR.js} +4 -107
  117. package/chunks/{computer-use-5S3NVXRA.js → computer-use-4CTF6WS3.js} +24 -24
  118. package/chunks/{contextCommand-DPBALZFK.js → contextCommand-Z3XWQCY6.js} +28 -27
  119. package/chunks/{cron-create-7JYUDTUY.js → cron-create-JSXEIPVS.js} +4 -4
  120. package/chunks/{cron-delete-YPULQQAK.js → cron-delete-OIFVEPGU.js} +4 -4
  121. package/chunks/{cron-list-HJIW5MHP.js → cron-list-D4ZX4IOE.js} +11 -7
  122. package/chunks/{daemon-7XYW4BC3.js → daemon-F3I2RXP6.js} +208 -63
  123. package/chunks/daemon-status-provider-6A4QCG6Q.js +74 -0
  124. package/chunks/dist-573HNSVO.js +3217 -0
  125. package/chunks/{dist-ABQ7VWRR.js → dist-FQ5WRJPL.js} +2 -2
  126. package/chunks/{dist-JPSVN367.js → dist-IMFFBMAT.js} +6 -3792
  127. package/chunks/{dist-BV56HW3W.js → dist-OT7G2WNM.js} +250 -1
  128. package/chunks/{dist-AW5ZYMUI.js → dist-PKFTNUHO.js} +10 -11
  129. package/chunks/{dist-AAO65DPC.js → dist-YTRKAVUB.js} +1 -1
  130. package/chunks/{earlyInputCapture-GGPV4IFT.js → earlyInputCapture-7O47HW62.js} +25 -25
  131. package/chunks/{edit-HJ7ISN4C.js → edit-E32KWLF2.js} +25 -25
  132. package/chunks/{en-XR3S5VWY.js → en-GA2RMXY5.js} +6 -1
  133. package/chunks/{enter-worktree-2BQT675D.js → enter-worktree-ZKFFMHUD.js} +24 -24
  134. package/chunks/{enterPlanMode-SJXHJ3WD.js → enterPlanMode-HLDC6NGX.js} +24 -24
  135. package/chunks/{errors-EVGER4AZ.js → errors-MTIDDXX7.js} +26 -26
  136. package/chunks/{exit-worktree-RPDDOSPM.js → exit-worktree-YHY72XA2.js} +24 -24
  137. package/chunks/{exitPlanMode-BQEROAJ7.js → exitPlanMode-JNXKBZ2C.js} +24 -24
  138. package/chunks/{fast-path-FX2ICJ2O.js → fast-path-DVAGBROV.js} +5 -2
  139. package/chunks/{fr-MBMNQSQ6.js → fr-GWNQG4XH.js} +4 -0
  140. package/chunks/{gemini-EHUXCOUI.js → gemini-2TMHJVRC.js} +444 -256
  141. package/chunks/{geminiContentGenerator-YDUUKAM2.js → geminiContentGenerator-WCH4GWD3.js} +4 -4
  142. package/chunks/{glob-3VIGV2DL.js → glob-I6Y4AGKO.js} +52 -28
  143. package/chunks/{grep-4D3S4NUC.js → grep-3P2J3LU5.js} +24 -24
  144. package/chunks/handleAutoUpdate-4IVRMRG4.js +65 -0
  145. package/chunks/{initializer-QZTZSSLW.js → initializer-DVNCPVTC.js} +31 -29
  146. package/chunks/{ja-HFV5QCHR.js → ja-2HOTA47X.js} +4 -0
  147. package/chunks/{keychain-token-storage-GPAKRDKQ.js → keychain-token-storage-UJV5XP4Z.js} +2 -2
  148. package/chunks/{list-WQ24EAMK.js → list-4D6QK2KZ.js} +30 -30
  149. package/chunks/{loadedSettingsAdapter-XV74KOSR.js → loadedSettingsAdapter-GNGELH6Q.js} +28 -28
  150. package/chunks/{loop-wakeup-34YK7T7O.js → loop-wakeup-OHWEMFP5.js} +5 -5
  151. package/chunks/{ls-MPD5OJUX.js → ls-L654WOAT.js} +4 -4
  152. package/chunks/{lsp-72PWTDW7.js → lsp-M35KE54Y.js} +2 -2
  153. package/chunks/{mcp-CO3MKM7N.js → mcp-2IL72YJP.js} +28 -28
  154. package/chunks/{monitor-GB56T65A.js → monitor-BLVCZAVX.js} +32 -27
  155. package/chunks/nonInteractiveCli-UD3V7UOO.js +116 -0
  156. package/chunks/{notebook-edit-VMXAAE3R.js → notebook-edit-5TVMWIWY.js} +25 -25
  157. package/chunks/{openaiContentGenerator-GM77FLII.js → openaiContentGenerator-5LJ5A7YY.js} +12 -12
  158. package/chunks/{pidfile-HFXSHR64.js → pidfile-AN5JQJ2T.js} +25 -25
  159. package/chunks/{qwenContentGenerator-QSCXQIKJ.js → qwenContentGenerator-E2JSB4FJ.js} +26 -26
  160. package/chunks/{qwenOAuth2-LWLA6MQG.js → qwenOAuth2-ZV7YLMND.js} +5 -5
  161. package/chunks/{read-file-SVH6CGQY.js → read-file-N5DEFUDU.js} +8 -8
  162. package/chunks/{read-mcp-resource-OWOBJY72.js → read-mcp-resource-CNQHBSJM.js} +2 -2
  163. package/chunks/{record-artifact-URK3YUDJ.js → record-artifact-PP3LKHTS.js} +2 -2
  164. package/chunks/{ripGrep-JD5O2FLX.js → ripGrep-BLJHTHKE.js} +24 -24
  165. package/chunks/{run-qwen-serve-FADLRJUN.js → run-qwen-serve-4JDO64RN.js} +785 -35
  166. package/chunks/{scheduler-Q65SB7DJ.js → scheduler-FQR4XA7J.js} +24 -24
  167. package/chunks/{send-message-L7OLQEKH.js → send-message-OA6MV4EU.js} +3 -3
  168. package/chunks/{serve-6ZXAMQ4M.js → serve-ZOCFC7YM.js} +29 -29
  169. package/chunks/{server-WKDQA6XR.js → server-GEOYEPYT.js} +2504 -439
  170. package/chunks/{session-STWOX7RA.js → session-NJCONHGX.js} +66 -61
  171. package/chunks/{settings-LC4CCWQQ.js → settings-QBGGXANI.js} +27 -27
  172. package/chunks/{shell-FEG3RLPW.js → shell-2DVPSEKT.js} +24 -24
  173. package/chunks/{skill-XTXAMDAP.js → skill-HIPXUHV7.js} +24 -12
  174. package/chunks/{spawnChannel-B6JJPBPV.js → spawnChannel-3JYXY52G.js} +27 -27
  175. package/chunks/{src-HITDGVRM.js → src-NLEX4CUC.js} +91 -36
  176. package/chunks/{startInteractiveUI-IT423PW4.js → startInteractiveUI-TYGZIU27.js} +6213 -14273
  177. package/chunks/{syntheticOutput-J3MLCQAR.js → syntheticOutput-F7LSDCAR.js} +3 -3
  178. package/chunks/{task-create-ELEBZ7H2.js → task-create-RPFZNB4B.js} +7 -7
  179. package/chunks/{task-list-IEUZLF3Y.js → task-list-TGGJX7EA.js} +5 -5
  180. package/chunks/{task-stop-QEZW3UDY.js → task-stop-W7NGTMYQ.js} +2 -2
  181. package/chunks/{task-update-DW36J5P5.js → task-update-5WUG5MVQ.js} +7 -7
  182. package/chunks/{team-create-DAG6SNHZ.js → team-create-MGX57SZJ.js} +24 -24
  183. package/chunks/{team-delete-SVITIMBO.js → team-delete-UHQQ2QQX.js} +5 -5
  184. package/chunks/{team-plan-approval-DRDY5OPC.js → team-plan-approval-BO2N7J3E.js} +24 -24
  185. package/chunks/{theme-manager-N67EZC6B.js → theme-manager-WU7LOA64.js} +25 -25
  186. package/chunks/{todoWrite-SFFQHZYY.js → todoWrite-C4ZAMSR3.js} +4 -4
  187. package/chunks/{tool-search-CMDJ5HGM.js → tool-search-CLBKVEVK.js} +11 -28
  188. package/chunks/{trustedFolders-JD4QX6UJ.js → trustedFolders-GAQM2GHB.js} +25 -25
  189. package/chunks/updateCheck-RIK2YIQE.js +65 -0
  190. package/chunks/{validateNonInterActiveAuth-ADDCGZ6A.js → validateNonInterActiveAuth-NS3GBIJZ.js} +61 -56
  191. package/chunks/{version-VAONYVE5.js → version-B3RSLP54.js} +2 -1
  192. package/chunks/{web-fetch-SXAXJHIO.js → web-fetch-UYGMOHW4.js} +5 -5
  193. package/chunks/{workflow-DG2BR42M.js → workflow-7APPIGND.js} +25 -25
  194. package/chunks/{workspace-providers-status-XGW5OZTD.js → workspace-providers-status-SC67GLMY.js} +30 -30
  195. package/chunks/{workspace-service-GX3GGZLU.js → workspace-service-ZJHF22WA.js} +35 -35
  196. package/chunks/{workspace-skills-status-LFK5WV2V.js → workspace-skills-status-NJEK6P6Y.js} +29 -29
  197. package/chunks/{write-file-UR7FXWOU.js → write-file-R6Z3VLRY.js} +25 -25
  198. package/chunks/{zh-FSVJTXA4.js → zh-7XVVRTDH.js} +6 -1
  199. package/chunks/{zh-TW-66MG4LWL.js → zh-TW-DPH554OG.js} +6 -1
  200. package/cli.js +19 -11
  201. package/locales/en.js +9 -2
  202. package/locales/fr.js +6 -0
  203. package/locales/ja.js +6 -0
  204. package/locales/zh-TW.js +9 -2
  205. package/locales/zh.js +9 -2
  206. package/node_modules/@qwen-code/audio-capture/package.json +1 -1
  207. package/node_modules/@qwen-code/audio-capture/prebuilds/darwin-arm64/@qwen-code+audio-capture.node +0 -0
  208. package/node_modules/@qwen-code/audio-capture/prebuilds/darwin-x64/@qwen-code+audio-capture.node +0 -0
  209. package/node_modules/@qwen-code/audio-capture/prebuilds/win32-x64/@qwen-code+audio-capture.node +0 -0
  210. package/package.json +3 -3
  211. package/web-shell/assets/{arc-CUpe0ibu.js → arc-C7hjaa7g.js} +1 -1
  212. package/web-shell/assets/{architectureDiagram-3BPJPVTR-JvyrY_mK.js → architectureDiagram-3BPJPVTR-pm9KtMZY.js} +1 -1
  213. package/web-shell/assets/{blockDiagram-GPEHLZMM-CK3Y_vom.js → blockDiagram-GPEHLZMM-CApElKsU.js} +1 -1
  214. package/web-shell/assets/{c4Diagram-AAUBKEIU-DprSnyrf.js → c4Diagram-AAUBKEIU-BeDe0-9N.js} +1 -1
  215. package/web-shell/assets/channel-BNf1dW-j.js +1 -0
  216. package/web-shell/assets/{chunk-2J33WTMH-DJtRJPmu.js → chunk-2J33WTMH-DJEkmLdl.js} +1 -1
  217. package/web-shell/assets/{chunk-4BX2VUAB-ON6Q2-BG.js → chunk-4BX2VUAB-DXX8gdpe.js} +1 -1
  218. package/web-shell/assets/{chunk-55IACEB6-c60ou5HZ.js → chunk-55IACEB6-DORmk1kQ.js} +1 -1
  219. package/web-shell/assets/{chunk-727SXJPM-BamtPKxx.js → chunk-727SXJPM-DWmO4mCZ.js} +1 -1
  220. package/web-shell/assets/{chunk-AQP2D5EJ-CsVgpu-T.js → chunk-AQP2D5EJ-C7LRaYw2.js} +1 -1
  221. package/web-shell/assets/{chunk-FMBD7UC4-vZrpjAx4.js → chunk-FMBD7UC4-CCdXgyC5.js} +1 -1
  222. package/web-shell/assets/{chunk-ND2GUHAM-qxyNOd5t.js → chunk-ND2GUHAM-SyL_xvWc.js} +1 -1
  223. package/web-shell/assets/{chunk-QZHKN3VN-BvTJSM_S.js → chunk-QZHKN3VN-BzOuCKxa.js} +1 -1
  224. package/web-shell/assets/classDiagram-4FO5ZUOK-uOIGlzgi.js +1 -0
  225. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-uOIGlzgi.js +1 -0
  226. package/web-shell/assets/{cose-bilkent-S5V4N54A-1tXB4pju.js → cose-bilkent-S5V4N54A-BMPWyDKc.js} +1 -1
  227. package/web-shell/assets/{dagre-BM42HDAG-DglBzme8.js → dagre-BM42HDAG-B_GnPWik.js} +1 -1
  228. package/web-shell/assets/{diagram-2AECGRRQ-DEJpqsWz.js → diagram-2AECGRRQ-fJqMc3S_.js} +1 -1
  229. package/web-shell/assets/{diagram-5GNKFQAL-CsQ1NrMG.js → diagram-5GNKFQAL-ximV3O9D.js} +1 -1
  230. package/web-shell/assets/{diagram-KO2AKTUF-Z-3codAi.js → diagram-KO2AKTUF-2vVyjzqw.js} +1 -1
  231. package/web-shell/assets/{diagram-LMA3HP47-mBuPTA2i.js → diagram-LMA3HP47-Dckcx1sT.js} +1 -1
  232. package/web-shell/assets/{diagram-OG6HWLK6-tcA3K3s9.js → diagram-OG6HWLK6-BAVv47ga.js} +1 -1
  233. package/web-shell/assets/{erDiagram-TEJ5UH35-D9bXFRyZ.js → erDiagram-TEJ5UH35-Bn3nf5J0.js} +1 -1
  234. package/web-shell/assets/{flowDiagram-I6XJVG4X-Ck0Py04s.js → flowDiagram-I6XJVG4X-BIbGF9JT.js} +1 -1
  235. package/web-shell/assets/{ganttDiagram-6RSMTGT7-rOevCekE.js → ganttDiagram-6RSMTGT7-CDbhb3AH.js} +1 -1
  236. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-CoPQaLj0.js → gitGraphDiagram-PVQCEYII-CbKG1a_w.js} +1 -1
  237. package/web-shell/assets/index-CnE2ur2L.js +779 -0
  238. package/web-shell/assets/index-hSKXrlSE.css +5 -0
  239. package/web-shell/assets/{infoDiagram-5YYISTIA-a77CUKoI.js → infoDiagram-5YYISTIA-DUFxTy8m.js} +1 -1
  240. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-DlLgUAO-.js → ishikawaDiagram-YF4QCWOH-D69hrBG8.js} +1 -1
  241. package/web-shell/assets/{journeyDiagram-JHISSGLW-BXR5kVAZ.js → journeyDiagram-JHISSGLW-DsvEw51Y.js} +1 -1
  242. package/web-shell/assets/{kanban-definition-UN3LZRKU-h5CoHZg7.js → kanban-definition-UN3LZRKU-lFFjZEYd.js} +1 -1
  243. package/web-shell/assets/{linear-BkaREbyD.js → linear-Bo5bWzvo.js} +1 -1
  244. package/web-shell/assets/{mermaid.core-Bkagz0ng.js → mermaid.core-C_HKMJx5.js} +5 -5
  245. package/web-shell/assets/{mindmap-definition-RKZ34NQL-D7EMKR_5.js → mindmap-definition-RKZ34NQL-DlV-NUTs.js} +1 -1
  246. package/web-shell/assets/{pieDiagram-4H26LBE5-DAmPOjsL.js → pieDiagram-4H26LBE5-B2e6FH2a.js} +1 -1
  247. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-e4WFQkQu.js → quadrantDiagram-W4KKPZXB-D75kSk-b.js} +1 -1
  248. package/web-shell/assets/{requirementDiagram-4Y6WPE33-v1zo7OiV.js → requirementDiagram-4Y6WPE33-CQ6xakhM.js} +1 -1
  249. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-Bstm4aW_.js → sankeyDiagram-5OEKKPKP-J_XTKrcY.js} +1 -1
  250. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-DzcZy6xN.js → sequenceDiagram-3UESZ5HK-D7jTcBtf.js} +1 -1
  251. package/web-shell/assets/{stateDiagram-AJRCARHV-BEJH6YbH.js → stateDiagram-AJRCARHV-CrlM_OT3.js} +1 -1
  252. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-Bs4TK_84.js +1 -0
  253. package/web-shell/assets/{timeline-definition-PNZ67QCA-TI1wH-Pm.js → timeline-definition-PNZ67QCA-5oZi76Ef.js} +1 -1
  254. package/web-shell/assets/{vennDiagram-CIIHVFJN-YaH8VDMS.js → vennDiagram-CIIHVFJN-DO5YptPK.js} +1 -1
  255. package/web-shell/assets/{wardley-L42UT6IY-B80co7OP.js → wardley-L42UT6IY-4t1eJDvM.js} +1 -1
  256. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-4fHNDEMl.js → wardleyDiagram-YWT4CUSO-DKZc661S.js} +1 -1
  257. package/web-shell/assets/{xychartDiagram-2RQKCTM6-DT3q4Z3J.js → xychartDiagram-2RQKCTM6-su9hp08G.js} +1 -1
  258. package/web-shell/index.html +2 -2
  259. package/chunks/chunk-L7QPM2YD.js +0 -481
  260. package/chunks/daemon-status-provider-2EWTHT7Y.js +0 -73
  261. package/chunks/nonInteractiveCli-HNZRIM5I.js +0 -111
  262. package/web-shell/assets/channel-BAxQ2-aZ.js +0 -1
  263. package/web-shell/assets/classDiagram-4FO5ZUOK-Cvd_xhZI.js +0 -1
  264. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-Cvd_xhZI.js +0 -1
  265. package/web-shell/assets/index-Cr7MYW6T.css +0 -5
  266. package/web-shell/assets/index-DCHPAUp3.js +0 -730
  267. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-BopifCBI.js +0 -1
@@ -3,27 +3,28 @@
3
3
  import {
4
4
  OpenAIContentConverter,
5
5
  TaggedThinkingParser,
6
+ getRateLimitErrorDetails,
6
7
  openaiRequestCaptureContext
7
- } from "./chunk-JN2VJ33O.js";
8
+ } from "./chunk-7I4MGFBN.js";
8
9
  import {
9
10
  RequestTokenizer
10
- } from "./chunk-JA5KWZTJ.js";
11
+ } from "./chunk-44NROQYV.js";
11
12
  import {
12
13
  DASHSCOPE_PROXY_BASE_URL,
13
14
  DEFAULT_DASHSCOPE_BASE_URL,
14
15
  DEFAULT_MAX_RETRIES,
15
16
  DEFAULT_STREAM_IDLE_TIMEOUT_MS,
16
- DEFAULT_TIMEOUT,
17
17
  MAX_STREAM_IDLE_TIMEOUT_MS,
18
18
  QWEN_STREAM_IDLE_TIMEOUT_MS_ENV,
19
19
  hasExplicitOutputLimit,
20
20
  parsePositiveIntegerEnvValue,
21
+ resolveRequestTimeout,
21
22
  tokenLimit
22
- } from "./chunk-KYTQOCDE.js";
23
+ } from "./chunk-HW4N45EE.js";
23
24
  import {
24
25
  runtimeDiagnostics,
25
26
  safeJsonParse
26
- } from "./chunk-YPCPZSZB.js";
27
+ } from "./chunk-CCGOFQV3.js";
27
28
  import {
28
29
  GenerateContentResponse
29
30
  } from "./chunk-55ZMG67I.js";
@@ -33,11 +34,13 @@ import {
33
34
  import {
34
35
  buildRuntimeFetchOptions,
35
36
  redactProxyError
36
- } from "./chunk-D5KISTLW.js";
37
+ } from "./chunk-H6EMK6QK.js";
37
38
  import {
38
39
  createDebugLogger,
40
+ getErrorStatus,
41
+ getErrorType,
39
42
  isAbortError
40
- } from "./chunk-AVQDCKNF.js";
43
+ } from "./chunk-22MNNNXE.js";
41
44
  import {
42
45
  init_esbuild_shims
43
46
  } from "./chunk-A4BMJM77.js";
@@ -6952,9 +6955,9 @@ var DefaultOpenAICompatibleProvider = class {
6952
6955
  const {
6953
6956
  apiKey,
6954
6957
  baseUrl,
6955
- timeout = DEFAULT_TIMEOUT,
6956
6958
  maxRetries = DEFAULT_MAX_RETRIES
6957
6959
  } = this.contentGeneratorConfig;
6960
+ const timeout = resolveRequestTimeout(this.contentGeneratorConfig.timeout);
6958
6961
  const defaultHeaders = this.buildHeaders();
6959
6962
  const runtimeOptions = buildRuntimeFetchOptions(
6960
6963
  "openai",
@@ -7143,9 +7146,9 @@ var DashScopeOpenAICompatibleProvider = class _DashScopeOpenAICompatibleProvider
7143
7146
  const {
7144
7147
  apiKey,
7145
7148
  baseUrl = DEFAULT_DASHSCOPE_BASE_URL,
7146
- timeout = DEFAULT_TIMEOUT,
7147
7149
  maxRetries = DEFAULT_MAX_RETRIES
7148
7150
  } = this.contentGeneratorConfig;
7151
+ const timeout = resolveRequestTimeout(this.contentGeneratorConfig.timeout);
7149
7152
  const defaultHeaders = this.buildHeaders();
7150
7153
  const runtimeOptions = buildRuntimeFetchOptions(
7151
7154
  "openai",
@@ -7813,11 +7816,17 @@ var StreamingToolCallParser = class {
7813
7816
  const existingBuffer = this.buffers.get(index);
7814
7817
  const existingDepth = this.depths.get(index);
7815
7818
  const existingMeta = this.toolCallMeta.get(index);
7816
- if (existingBuffer.trim() && existingDepth === 0 && existingMeta?.id && existingMeta.id !== id) {
7817
- try {
7818
- JSON.parse(existingBuffer);
7819
+ if (existingMeta?.name && existingDepth === 0 && existingMeta?.id && existingMeta.id !== id) {
7820
+ let existingComplete = true;
7821
+ if (existingBuffer.trim()) {
7822
+ try {
7823
+ JSON.parse(existingBuffer);
7824
+ } catch {
7825
+ existingComplete = false;
7826
+ }
7827
+ }
7828
+ if (existingComplete) {
7819
7829
  actualIndex = this.findNextAvailableIndex();
7820
- } catch {
7821
7830
  }
7822
7831
  }
7823
7832
  }
@@ -7848,14 +7857,21 @@ var StreamingToolCallParser = class {
7848
7857
  }
7849
7858
  const currentBuffer = this.buffers.get(actualIndex);
7850
7859
  const currentDepth = this.depths.get(actualIndex);
7851
- if (isKnownId && currentBuffer.trim() && currentDepth === 0) {
7852
- try {
7853
- JSON.parse(currentBuffer);
7860
+ if (isKnownId && currentDepth === 0) {
7861
+ if (currentBuffer.trim()) {
7862
+ try {
7863
+ JSON.parse(currentBuffer);
7864
+ debugLogger3.debug(
7865
+ `Ignoring replay chunk for completed toolCall id=${id}`
7866
+ );
7867
+ return { complete: false };
7868
+ } catch {
7869
+ }
7870
+ } else if (this.toolCallMeta.get(actualIndex)?.name && name && !chunk.trim()) {
7854
7871
  debugLogger3.debug(
7855
- `Ignoring replay chunk for completed toolCall id=${id}`
7872
+ `Ignoring replayed opener for no-argument toolCall id=${id}`
7856
7873
  );
7857
7874
  return { complete: false };
7858
- } catch {
7859
7875
  }
7860
7876
  }
7861
7877
  const meta = this.toolCallMeta.get(actualIndex);
@@ -7922,8 +7938,10 @@ var StreamingToolCallParser = class {
7922
7938
  * 2. Auto-close unclosed strings and retry
7923
7939
  * 3. Fallback to safeJsonParse for malformed data
7924
7940
  *
7925
- * Only returns tool calls with both name metadata and non-empty buffers.
7926
- * Should be called when streaming is complete (finish_reason is present).
7941
+ * Only returns tool calls with name metadata. An empty buffer yields
7942
+ * empty arguments ({}), matching the non-streaming path for no-argument
7943
+ * tools. Should be called when streaming is complete (finish_reason is
7944
+ * present).
7927
7945
  *
7928
7946
  * @returns Array of completed tool calls with their metadata and parsed arguments
7929
7947
  */
@@ -7932,7 +7950,7 @@ var StreamingToolCallParser = class {
7932
7950
  const emittedIds = /* @__PURE__ */ new Set();
7933
7951
  for (const [index, buffer] of this.buffers.entries()) {
7934
7952
  const meta = this.toolCallMeta.get(index);
7935
- if (meta?.name && buffer.trim()) {
7953
+ if (meta?.name) {
7936
7954
  if (meta.id) {
7937
7955
  if (emittedIds.has(meta.id)) {
7938
7956
  continue;
@@ -7940,19 +7958,31 @@ var StreamingToolCallParser = class {
7940
7958
  emittedIds.add(meta.id);
7941
7959
  }
7942
7960
  let args = {};
7943
- try {
7944
- args = JSON.parse(buffer);
7945
- } catch {
7946
- const inString = this.inStrings.get(index);
7947
- if (inString) {
7948
- try {
7949
- args = JSON.parse(buffer + '"');
7950
- } catch {
7961
+ if (buffer.trim()) {
7962
+ try {
7963
+ args = JSON.parse(buffer);
7964
+ } catch {
7965
+ const inString = this.inStrings.get(index);
7966
+ if (inString) {
7967
+ try {
7968
+ args = JSON.parse(buffer + '"');
7969
+ } catch {
7970
+ args = safeJsonParse(buffer, {});
7971
+ }
7972
+ } else {
7951
7973
  args = safeJsonParse(buffer, {});
7952
7974
  }
7953
- } else {
7954
- args = safeJsonParse(buffer, {});
7955
7975
  }
7976
+ if (typeof args !== "object" || args === null || Array.isArray(args)) {
7977
+ debugLogger3.debug(
7978
+ `Collapsing non-object arguments for tool call ${meta.name} (id=${meta.id}) at index ${index}; buffer likely polluted by a misrouted fragment`
7979
+ );
7980
+ args = {};
7981
+ }
7982
+ } else {
7983
+ debugLogger3.debug(
7984
+ `Emitting no-argument tool call ${meta.name} (id=${meta.id}) at index ${index} with empty buffer`
7985
+ );
7956
7986
  }
7957
7987
  completed.push({
7958
7988
  id: meta.id,
@@ -7968,8 +7998,9 @@ var StreamingToolCallParser = class {
7968
7998
  * Finds the next available index for a new tool call
7969
7999
  *
7970
8000
  * Scans indices starting from nextAvailableIndex to find one that's safe to use.
7971
- * Reuses indices with empty buffers or incomplete parsing states.
7972
- * Skips indices with complete, parseable tool call data to prevent overwriting.
8001
+ * Reuses indices never claimed by a named tool call or with incomplete
8002
+ * parsing states. Skips indices with complete tool call data including
8003
+ * no-argument calls with empty buffers — to prevent overwriting.
7973
8004
  *
7974
8005
  * @returns The next available index safe for storing a new tool call
7975
8006
  */
@@ -7978,17 +8009,15 @@ var StreamingToolCallParser = class {
7978
8009
  const buffer = this.buffers.get(this.nextAvailableIndex);
7979
8010
  const depth = this.depths.get(this.nextAvailableIndex);
7980
8011
  const meta = this.toolCallMeta.get(this.nextAvailableIndex);
7981
- if (!buffer.trim() || depth > 0 || !meta?.id) {
8012
+ if (!meta?.name || depth > 0 || !meta?.id) {
7982
8013
  return this.nextAvailableIndex;
7983
8014
  }
7984
- try {
7985
- JSON.parse(buffer);
7986
- if (depth === 0) {
7987
- this.nextAvailableIndex++;
7988
- continue;
8015
+ if (buffer.trim()) {
8016
+ try {
8017
+ JSON.parse(buffer);
8018
+ } catch {
8019
+ return this.nextAvailableIndex;
7989
8020
  }
7990
- } catch {
7991
- return this.nextAvailableIndex;
7992
8021
  }
7993
8022
  this.nextAvailableIndex++;
7994
8023
  }
@@ -7998,8 +8027,9 @@ var StreamingToolCallParser = class {
7998
8027
  * Finds the most recent incomplete tool call index
7999
8028
  *
8000
8029
  * Used when continuation chunks arrive without IDs. Scans existing tool calls
8001
- * to find the highest index with incomplete parsing state (depth > 0, empty buffer,
8002
- * or unparseable JSON). Falls back to creating a new index if none found.
8030
+ * to find the highest index with incomplete parsing state (depth > 0, empty
8031
+ * buffer with no name metadata yet, or unparseable JSON). Falls back to
8032
+ * creating a new index if none found.
8003
8033
  *
8004
8034
  * @returns The index of the most recent incomplete tool call, or a new available index
8005
8035
  */
@@ -8008,7 +8038,7 @@ var StreamingToolCallParser = class {
8008
8038
  for (const [index, buffer] of this.buffers.entries()) {
8009
8039
  const depth = this.depths.get(index);
8010
8040
  const meta = this.toolCallMeta.get(index);
8011
- if (meta?.id && (depth > 0 || !buffer.trim())) {
8041
+ if (meta?.id && (depth > 0 || !buffer.trim() && !meta?.name)) {
8012
8042
  maxIndex = Math.max(maxIndex, index);
8013
8043
  } else if (buffer.trim()) {
8014
8044
  try {
@@ -8431,10 +8461,19 @@ var ContentGenerationPipeline = class {
8431
8461
  if (reasoningDisabled) {
8432
8462
  const typed = providerRequest;
8433
8463
  const model = (context.model ?? "").toLowerCase();
8434
- if (DashScopeOpenAICompatibleProvider.isDashScopeProvider(
8435
- this.contentGeneratorConfig
8436
- ) && (model.startsWith("qwen") || model === "coder-model")) {
8437
- typed["enable_thinking"] = false;
8464
+ if (model.startsWith("qwen") || model === "coder-model") {
8465
+ if (DashScopeOpenAICompatibleProvider.isDashScopeProvider(
8466
+ this.contentGeneratorConfig
8467
+ )) {
8468
+ typed["enable_thinking"] = false;
8469
+ } else {
8470
+ delete typed["enable_thinking"];
8471
+ const existing = typed["chat_template_kwargs"] ?? {};
8472
+ typed["chat_template_kwargs"] = {
8473
+ ...existing,
8474
+ enable_thinking: false
8475
+ };
8476
+ }
8438
8477
  }
8439
8478
  if ("reasoning" in typed) {
8440
8479
  delete typed["reasoning"];
@@ -8574,7 +8613,11 @@ var EnhancedErrorHandler = class {
8574
8613
  isTimeoutError
8575
8614
  );
8576
8615
  if (!this.shouldSuppressErrorLogging(redactedError, request)) {
8577
- debugLogger5.error("OpenAI API Error:", errorMessage);
8616
+ debugLogger5.error(
8617
+ "OpenAI API Error:",
8618
+ errorMessage,
8619
+ this.buildDiagnostics(redactedError, context)
8620
+ );
8578
8621
  }
8579
8622
  if (isTimeoutError) {
8580
8623
  throw new Error(
@@ -8602,6 +8645,35 @@ ${this.getTimeoutTroubleshootingTips()}`
8602
8645
  }
8603
8646
  return error instanceof Error ? error.message : String(error);
8604
8647
  }
8648
+ buildDiagnostics(error, context) {
8649
+ const details = getRateLimitErrorDetails(error);
8650
+ const requestId = this.getRequestId(error) ?? details.requestId;
8651
+ const statusCode = getErrorStatus(error);
8652
+ return {
8653
+ model: context.model,
8654
+ durationMs: Date.now() - context.startTime,
8655
+ errorType: getErrorType(error),
8656
+ ...statusCode !== void 0 ? { statusCode } : {},
8657
+ ...details.providerCode !== void 0 ? { providerCode: details.providerCode } : {},
8658
+ ...details.providerMessage !== void 0 ? { providerMessage: details.providerMessage } : {},
8659
+ ...requestId !== void 0 ? { requestId } : {},
8660
+ ...details.transport !== "unknown" ? { transport: details.transport } : {}
8661
+ };
8662
+ }
8663
+ getRequestId(error) {
8664
+ if (!error || typeof error !== "object") return void 0;
8665
+ const source = error;
8666
+ for (const value of [
8667
+ source.requestID,
8668
+ source.request_id,
8669
+ source.response_id
8670
+ ]) {
8671
+ if (typeof value === "string" && value) {
8672
+ return value;
8673
+ }
8674
+ }
8675
+ return void 0;
8676
+ }
8605
8677
  getTimeoutTroubleshootingTips() {
8606
8678
  const tips = [
8607
8679
  "- Reduce input length or complexity",
@@ -5,7 +5,7 @@ import {
5
5
  Storage,
6
6
  resolvePath,
7
7
  sanitizeCwd
8
- } from "./chunk-AVQDCKNF.js";
8
+ } from "./chunk-22MNNNXE.js";
9
9
  import {
10
10
  init_esbuild_shims
11
11
  } from "./chunk-A4BMJM77.js";
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
  import {
4
4
  parseRule
5
- } from "./chunk-AGZF43UV.js";
5
+ } from "./chunk-E7HM76PR.js";
6
6
  import {
7
7
  init_esbuild_shims
8
8
  } from "./chunk-A4BMJM77.js";
@@ -3,26 +3,26 @@
3
3
  import {
4
4
  Colors,
5
5
  RowMouseController
6
- } from "./chunk-FPHA7WIZ.js";
6
+ } from "./chunk-MYZWWRVW.js";
7
7
  import {
8
8
  theme
9
- } from "./chunk-VXGPYF7U.js";
9
+ } from "./chunk-IFEWJXFS.js";
10
10
  import {
11
11
  Box_default,
12
12
  Text,
13
13
  require_jsx_runtime
14
- } from "./chunk-YSU33ACT.js";
14
+ } from "./chunk-ELMPRVCB.js";
15
15
  import {
16
16
  require_react
17
17
  } from "./chunk-KYMBIKIW.js";
18
18
  import {
19
19
  t
20
- } from "./chunk-6QVRLKTZ.js";
20
+ } from "./chunk-TBLJNMI7.js";
21
21
  import {
22
22
  readManyFiles,
23
23
  shouldRunVisionBridge,
24
24
  stripTerminalControlSequences
25
- } from "./chunk-AGZF43UV.js";
25
+ } from "./chunk-E7HM76PR.js";
26
26
  import {
27
27
  emptyMcpResourceText,
28
28
  formatMcpResourceContents,
@@ -34,7 +34,7 @@ import {
34
34
  isNodeError,
35
35
  isSubpath,
36
36
  unescapePath
37
- } from "./chunk-AVQDCKNF.js";
37
+ } from "./chunk-22MNNNXE.js";
38
38
  import {
39
39
  init_esbuild_shims
40
40
  } from "./chunk-A4BMJM77.js";
@@ -435,6 +435,52 @@ function getExtensionSuggestions(config, pattern) {
435
435
  }
436
436
  __name(getExtensionSuggestions, "getExtensionSuggestions");
437
437
 
438
+ // packages/cli/src/utils/mcp-server-mention.ts
439
+ init_esbuild_shims();
440
+ var MCP_SERVER_REF_PREFIX = "mcp:";
441
+ function parseMcpServerRef(pathName) {
442
+ if (!pathName.startsWith(MCP_SERVER_REF_PREFIX)) return null;
443
+ const name = pathName.slice(MCP_SERVER_REF_PREFIX.length);
444
+ if (!name) return null;
445
+ return { name };
446
+ }
447
+ __name(parseMcpServerRef, "parseMcpServerRef");
448
+ function buildMcpServerRef(serverName) {
449
+ return `${MCP_SERVER_REF_PREFIX}${serverName}`;
450
+ }
451
+ __name(buildMcpServerRef, "buildMcpServerRef");
452
+ function matchMcpServerByRef(name, servers) {
453
+ const lower = name.toLowerCase();
454
+ const matchedName = Object.keys(servers).find(
455
+ (serverName) => serverName.toLowerCase() === lower
456
+ );
457
+ if (!matchedName) return void 0;
458
+ return { serverName: matchedName, server: servers[matchedName] };
459
+ }
460
+ __name(matchMcpServerByRef, "matchMcpServerByRef");
461
+ function buildMcpServerContextText(config, serverName) {
462
+ const lines = [
463
+ `--- MCP Server: ${serverName} ---`,
464
+ `The user explicitly mentioned this MCP server. Prefer using tools and resources from this server when relevant for this turn. This is advisory context, not a hard restriction.`
465
+ ];
466
+ const prompts = config.getPromptRegistry?.()?.getPromptsByServer(serverName) ?? [];
467
+ const resources = config.getResourceRegistry?.()?.getResourcesByServer(serverName) ?? [];
468
+ const details = [];
469
+ if (resources.length > 0) {
470
+ details.push(`- Resources: ${resources.length}`);
471
+ }
472
+ if (prompts.length > 0) {
473
+ details.push(`- Prompts: ${prompts.length}`);
474
+ }
475
+ if (details.length > 0) {
476
+ lines.push("Available capabilities from this MCP server:");
477
+ lines.push(...details);
478
+ }
479
+ lines.push(`--- End MCP Server: ${serverName} ---`);
480
+ return lines.join("\n");
481
+ }
482
+ __name(buildMcpServerContextText, "buildMcpServerContextText");
483
+
438
484
  // packages/cli/src/ui/hooks/atCommandProcessor.ts
439
485
  function parseAllAtCommands(query) {
440
486
  const parts = [];
@@ -521,6 +567,7 @@ async function resolveAtCommandQuery({
521
567
  };
522
568
  const mcpServerNames = new Set(Object.keys(config.getMcpServers() || {}));
523
569
  const mcpResourceRefs = [];
570
+ const mcpServerMentions = [];
524
571
  const activeExtensions = config.getActiveExtensions?.() ?? [];
525
572
  const extensionMentions = [];
526
573
  for (const atPathPart of atPathCommandParts) {
@@ -553,6 +600,30 @@ async function resolveAtCommandQuery({
553
600
  atPathToResolvedSpecMap.set(originalAtPath, pathName);
554
601
  continue;
555
602
  }
603
+ const mcpServerRef = parseMcpServerRef(pathName);
604
+ if (mcpServerRef) {
605
+ const matched = matchMcpServerByRef(
606
+ mcpServerRef.name,
607
+ config.getMcpServers() || {}
608
+ );
609
+ if (matched) {
610
+ if (!mcpServerMentions.some((m) => m.serverName === matched.serverName)) {
611
+ mcpServerMentions.push({
612
+ originalAtPath,
613
+ serverName: matched.serverName
614
+ });
615
+ }
616
+ atPathToResolvedSpecMap.set(
617
+ originalAtPath,
618
+ buildMcpServerRef(matched.serverName)
619
+ );
620
+ continue;
621
+ }
622
+ onDebugMessage(
623
+ `MCP server "${mcpServerRef.name}" not found among configured MCP servers. Available: ${Object.keys(config.getMcpServers() || {}).join(", ") || "(none)"}`
624
+ );
625
+ continue;
626
+ }
556
627
  const workspaceContext = config.getWorkspaceContext();
557
628
  const projectTempDir = Storage.getGlobalTempDir();
558
629
  const absolutePathName = path.isAbsolute(pathName) ? pathName : path.resolve(workspaceContext.getDirectories()[0] || "", pathName);
@@ -697,7 +768,7 @@ ${messages.join("\n")}`;
697
768
  confirmationDetails: void 0
698
769
  });
699
770
  }
700
- if (pathSpecsToRead.length === 0 && mcpResourceRefs.length === 0 && extensionMentions.length === 0) {
771
+ if (pathSpecsToRead.length === 0 && mcpResourceRefs.length === 0 && mcpServerMentions.length === 0 && extensionMentions.length === 0) {
701
772
  onDebugMessage("No valid file paths found in @ commands to read.");
702
773
  if (initialQueryText === "@" && query.trim() === "@") {
703
774
  return { processedQuery: [{ text: query }], shouldProceed: true };
@@ -710,11 +781,9 @@ ${messages.join("\n")}`;
710
781
  };
711
782
  }
712
783
  let extensionContextBudgetRemaining = EXTENSION_CONTEXT_BUDGET;
713
- const extensionParts = [];
714
- const extensionDisplays = [];
715
- const extensionLabels = [];
784
+ const scopedMentionEntries = [];
716
785
  for (let i = 0; i < extensionMentions.length; i++) {
717
- const { extension } = extensionMentions[i];
786
+ const { originalAtPath, extension } = extensionMentions[i];
718
787
  const displayName = getExtensionDisplayName(extension);
719
788
  const callId = `client-extension-${userMessageTimestamp}-${i}`;
720
789
  const context = await buildExtensionMentionContext(extension, {
@@ -723,17 +792,47 @@ ${messages.join("\n")}`;
723
792
  onDebugMessage
724
793
  });
725
794
  extensionContextBudgetRemaining = context.remainingBudget;
726
- extensionParts.push({ text: context.text });
727
- extensionLabels.push(buildExtensionRef(extension.name));
728
- extensionDisplays.push({
729
- callId,
730
- name: "Activate Extension",
731
- description: `Activated extension ${displayName}`,
732
- status: "Success" /* Success */,
733
- resultDisplay: void 0,
734
- confirmationDetails: void 0
795
+ scopedMentionEntries.push({
796
+ originalAtPath,
797
+ part: { text: context.text },
798
+ label: buildExtensionRef(extension.name),
799
+ display: {
800
+ callId,
801
+ name: "Activate Extension",
802
+ description: `Activated extension ${displayName}`,
803
+ status: "Success" /* Success */,
804
+ resultDisplay: void 0,
805
+ confirmationDetails: void 0
806
+ }
735
807
  });
736
808
  }
809
+ for (let i = 0; i < mcpServerMentions.length; i++) {
810
+ const { originalAtPath, serverName } = mcpServerMentions[i];
811
+ scopedMentionEntries.push({
812
+ originalAtPath,
813
+ part: { text: buildMcpServerContextText(config, serverName) },
814
+ label: buildMcpServerRef(serverName),
815
+ display: {
816
+ callId: `client-mcp-server-${userMessageTimestamp}-${i}`,
817
+ name: "Activate MCP Server",
818
+ description: `Activated MCP server ${serverName}`,
819
+ status: "Success" /* Success */,
820
+ resultDisplay: void 0,
821
+ confirmationDetails: void 0
822
+ }
823
+ });
824
+ }
825
+ const scopedMentionOrder = new Map(
826
+ atPathCommandParts.map((part, index) => [part.content, index])
827
+ );
828
+ scopedMentionEntries.sort(
829
+ (a, b) => (scopedMentionOrder.get(a.originalAtPath) ?? Number.MAX_SAFE_INTEGER) - (scopedMentionOrder.get(b.originalAtPath) ?? Number.MAX_SAFE_INTEGER)
830
+ );
831
+ const scopedMentionParts = scopedMentionEntries.map((entry) => entry.part);
832
+ const scopedMentionLabels = scopedMentionEntries.map((entry) => entry.label);
833
+ const scopedMentionDisplays = scopedMentionEntries.map(
834
+ (entry) => entry.display
835
+ );
737
836
  const fileParts = [];
738
837
  let fileDisplays = [];
739
838
  if (pathSpecsToRead.length > 0) {
@@ -770,7 +869,7 @@ ${messages.join("\n")}`;
770
869
  };
771
870
  const errorMessage = typeof errorToolCallDisplay.resultDisplay === "string" ? errorToolCallDisplay.resultDisplay : void 0;
772
871
  const labelsOnError = [
773
- ...extensionLabels,
872
+ ...scopedMentionLabels,
774
873
  ...contentLabelsForDisplay,
775
874
  ...resourceLabels
776
875
  ];
@@ -778,7 +877,7 @@ ${messages.join("\n")}`;
778
877
  processedQuery: null,
779
878
  shouldProceed: false,
780
879
  toolDisplays: [
781
- ...extensionDisplays,
880
+ ...scopedMentionDisplays,
782
881
  ...resourceDisplays,
783
882
  errorToolCallDisplay
784
883
  ],
@@ -793,19 +892,23 @@ ${messages.join("\n")}`;
793
892
  }
794
893
  const processedQueryParts = [
795
894
  { text: initialQueryText },
796
- ...extensionParts,
895
+ ...scopedMentionParts,
797
896
  ...fileParts,
798
897
  ...resourceParts
799
898
  ];
800
899
  const allLabels = [
801
- ...extensionLabels,
900
+ ...scopedMentionLabels,
802
901
  ...contentLabelsForDisplay,
803
902
  ...resourceLabels
804
903
  ];
805
904
  return {
806
905
  processedQuery: processedQueryParts,
807
906
  shouldProceed: true,
808
- toolDisplays: [...extensionDisplays, ...fileDisplays, ...resourceDisplays],
907
+ toolDisplays: [
908
+ ...scopedMentionDisplays,
909
+ ...fileDisplays,
910
+ ...resourceDisplays
911
+ ],
809
912
  filesRead: allLabels,
810
913
  recording: {
811
914
  filesRead: allLabels,
@@ -850,8 +953,13 @@ export {
850
953
  EXTENSION_CONTEXT_BUDGET,
851
954
  parseExtensionRef,
852
955
  matchExtensionByRef,
956
+ sanitizeDisplayText,
853
957
  buildExtensionMentionContext,
854
958
  getExtensionSuggestions,
959
+ parseMcpServerRef,
960
+ buildMcpServerRef,
961
+ matchMcpServerByRef,
962
+ buildMcpServerContextText,
855
963
  resolveAtCommandQuery,
856
964
  handleAtCommand
857
965
  };