@qwen-code/qwen-code 0.19.3 → 0.19.4-nightly.20260702.46814e4f1

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 (308) hide show
  1. package/bundled/loop/SKILL.md +22 -3
  2. package/bundled/loop/SKILL.test.ts +20 -0
  3. package/bundled/loop/autonomous-loop.test.ts +59 -0
  4. package/bundled/loop/autonomous-loop.ts +102 -0
  5. package/bundled/loop/loop-task-file.test.ts +1064 -0
  6. package/bundled/loop/loop-task-file.ts +404 -0
  7. package/bundled/loop/loop-tick-resolver.test.ts +906 -0
  8. package/bundled/loop/loop-tick-resolver.ts +416 -0
  9. package/bundled/qc-helper/SKILL.md +12 -5
  10. package/bundled/qc-helper/docs/configuration/auth.md +1 -1
  11. package/bundled/qc-helper/docs/configuration/settings.md +62 -32
  12. package/bundled/qc-helper/docs/features/approval-mode.md +3 -0
  13. package/bundled/qc-helper/docs/features/auto-mode.md +40 -0
  14. package/bundled/qc-helper/docs/features/channels/overview.md +81 -18
  15. package/bundled/qc-helper/docs/features/channels/plugins.md +1 -1
  16. package/bundled/qc-helper/docs/features/code-review.md +17 -61
  17. package/bundled/qc-helper/docs/features/commands.md +42 -40
  18. package/bundled/qc-helper/docs/features/headless.md +19 -18
  19. package/bundled/qc-helper/docs/features/hooks.md +6 -1
  20. package/bundled/qc-helper/docs/features/mcp.md +3 -1
  21. package/bundled/qc-helper/docs/features/memory.md +1 -1
  22. package/bundled/qc-helper/docs/features/scheduled-tasks.md +10 -0
  23. package/bundled/qc-helper/docs/features/status-line.md +3 -3
  24. package/bundled/qc-helper/docs/ide-integration/ide-integration.md +4 -4
  25. package/bundled/qc-helper/docs/qwen-serve.md +53 -0
  26. package/bundled/qc-helper/docs/support/troubleshooting.md +11 -0
  27. package/bundled/review/DESIGN.md +21 -26
  28. package/bundled/review/SKILL.md +45 -129
  29. package/chunks/MaxSizedBox-GHGRQ2OS.js +69 -0
  30. package/chunks/{StandaloneSessionPicker-Z52JTYST.js → StandaloneSessionPicker-G7YTTM27.js} +49 -42
  31. package/chunks/{acpAgent-7RZUOWOM.js → acpAgent-SDOILBSU.js} +1325 -365
  32. package/chunks/{agent-4FG7WTHJ.js → agent-NTSXGV4L.js} +31 -25
  33. package/chunks/agent-headless-WYURMSAB.js +62 -0
  34. package/chunks/{anthropicContentGenerator-PFITVL7Y.js → anthropicContentGenerator-WL3LJOUB.js} +110 -31
  35. package/chunks/{artifact-tool-D2X7G3C3.js → artifact-tool-W76WC2JX.js} +3 -3
  36. package/chunks/{askUserQuestion-UGETICJQ.js → askUserQuestion-J3P6TH3V.js} +2 -2
  37. package/chunks/bridge-AMOL4W4P.js +73 -0
  38. package/chunks/{ca-IUFWESZL.js → ca-HCMB2I54.js} +10 -9
  39. package/chunks/channel-worker-supervisor-C3IB63V7.js +659 -0
  40. package/chunks/{chunk-STUWFKGD.js → chunk-26JIREA5.js} +466 -543
  41. package/chunks/{chunk-SLNKLLEO.js → chunk-2MRV62AU.js} +37 -8
  42. package/chunks/{chunk-ODLIHNOY.js → chunk-2U4HUMOL.js} +1 -1
  43. package/chunks/{chunk-CKQA6AWF.js → chunk-4D73HUOP.js} +1 -1
  44. package/chunks/{chunk-M2U5NM24.js → chunk-54YZOP7P.js} +309 -72
  45. package/chunks/{chunk-J7FA27RO.js → chunk-5LKL3PAU.js} +3 -3
  46. package/chunks/chunk-5P5XGNYH.js +93 -0
  47. package/chunks/{chunk-UFLGERMB.js → chunk-6JE32BRB.js} +178 -124
  48. package/chunks/{chunk-FKAVULLM.js → chunk-75AVTQJ2.js} +74 -10
  49. package/chunks/{chunk-I2LYBGNI.js → chunk-7IOMIYOE.js} +1 -1
  50. package/chunks/{chunk-4LUZAKMK.js → chunk-7KXAGQJ2.js} +1 -1
  51. package/chunks/{chunk-BXSHL2SF.js → chunk-7LUOQJ3D.js} +1 -1
  52. package/chunks/{chunk-YAINVQ3Q.js → chunk-A5OPLHFM.js} +18693 -17055
  53. package/chunks/chunk-AHNXYU4O.js +24 -0
  54. package/chunks/{chunk-UX4SGCGN.js → chunk-AVQDCKNF.js} +96 -22
  55. package/chunks/{chunk-HYCC3XM3.js → chunk-B236XPGF.js} +1 -1
  56. package/chunks/chunk-B6SZLQAZ.js +3523 -0
  57. package/chunks/{chunk-5DWXLGOM.js → chunk-BJBWRCSK.js} +1 -1
  58. package/chunks/chunk-BPFJQGY7.js +193 -0
  59. package/chunks/{chunk-SKQZZVAV.js → chunk-BZHLWC6T.js} +2 -2
  60. package/chunks/{chunk-U3KSMM7G.js → chunk-D5KISTLW.js} +339 -383
  61. package/chunks/{chunk-GT2FGICD.js → chunk-DE7YXUR7.js} +1 -1
  62. package/chunks/{chunk-BUUQ5HPX.js → chunk-DG573EOO.js} +1 -1
  63. package/chunks/{chunk-VVLOGDB6.js → chunk-DX3TKXNT.js} +2 -2
  64. package/chunks/chunk-E5A7LHNN.js +51 -0
  65. package/chunks/{chunk-3PJXIDKI.js → chunk-E6US47KI.js} +3 -27
  66. package/chunks/{chunk-QBZ22PQX.js → chunk-EWALXUAD.js} +3 -1
  67. package/chunks/{chunk-PDE7CSDS.js → chunk-FXKI7OW6.js} +2 -2
  68. package/chunks/{chunk-F3ZYSEY6.js → chunk-FY4TT4L4.js} +3 -3
  69. package/chunks/{chunk-QLDPRILK.js → chunk-G7OQ3RFJ.js} +3 -3
  70. package/chunks/{chunk-R2BXK7SX.js → chunk-GHOTR7HL.js} +6 -1
  71. package/chunks/{chunk-KMGMKW5Q.js → chunk-GLPV75ES.js} +9 -3
  72. package/chunks/{chunk-LD2XBG6Z.js → chunk-GO6LNQXT.js} +1 -39
  73. package/chunks/{chunk-CNLEDYE3.js → chunk-H6TNLOLM.js} +5 -5
  74. package/chunks/{chunk-JVHEVCAU.js → chunk-HLW4EGKR.js} +31 -6
  75. package/chunks/{chunk-I4H7PRWQ.js → chunk-HTWHAN44.js} +1 -1
  76. package/chunks/{chunk-QE6KJYLT.js → chunk-IPYE5BIS.js} +123 -25
  77. package/chunks/{chunk-EJYJYJZ2.js → chunk-IRJWHZWU.js} +3 -70
  78. package/chunks/{chunk-EDMZZFDU.js → chunk-J3YPTTNL.js} +930 -798
  79. package/chunks/{chunk-GGBIN5K7.js → chunk-JGAJMIJZ.js} +1 -1
  80. package/chunks/{chunk-N4EJFBN5.js → chunk-JVLP5US5.js} +427 -263
  81. package/chunks/{chunk-R5OP2ATH.js → chunk-JZG7VB6C.js} +11 -11
  82. package/chunks/{chunk-QI7GOGJR.js → chunk-KKQWC6WS.js} +1 -1
  83. package/chunks/{chunk-ADCIHOQZ.js → chunk-KX5QZRW2.js} +142 -30
  84. package/chunks/{chunk-SBBN4BWR.js → chunk-L7OJ3ZO3.js} +1 -1
  85. package/chunks/{chunk-NDOC6M5S.js → chunk-L7QPM2YD.js} +2 -2
  86. package/chunks/{chunk-BVSVIN45.js → chunk-LKWAVAB5.js} +3 -3
  87. package/chunks/{chunk-T4T2FNV4.js → chunk-LOW52WYZ.js} +2 -2
  88. package/chunks/{chunk-4QK3O43S.js → chunk-LU7BIVWC.js} +4 -4
  89. package/chunks/{chunk-ZP6UKOPB.js → chunk-LWGLBVWA.js} +1 -1
  90. package/chunks/{chunk-L7OKCI7T.js → chunk-M7BLWURA.js} +15 -1
  91. package/chunks/{chunk-PR32FRT6.js → chunk-MIM62IXS.js} +3 -3
  92. package/chunks/{chunk-RD6YJJJ6.js → chunk-MOUXUCXQ.js} +1 -1
  93. package/chunks/{chunk-VBZ452JT.js → chunk-MSNGFH6L.js} +494 -114
  94. package/chunks/{chunk-BX5YO7UW.js → chunk-MTNTVOJR.js} +542 -370
  95. package/chunks/chunk-MX2YXRER.js +44 -0
  96. package/chunks/chunk-NIOPRZNN.js +27 -0
  97. package/chunks/{chunk-SMYQZVZ3.js → chunk-NOGSPTLJ.js} +1 -1
  98. package/chunks/{chunk-DDMOU62Q.js → chunk-NPQWQYU6.js} +1 -1
  99. package/chunks/{chunk-MNF6S5PR.js → chunk-P5THQV6A.js} +4 -4
  100. package/chunks/{chunk-6V4NZFUS.js → chunk-PCYOT4PK.js} +5 -5
  101. package/chunks/{chunk-CF6BB3LT.js → chunk-PPFWEV7G.js} +10 -1
  102. package/chunks/{chunk-FXKVLFFY.js → chunk-PSFDB5FZ.js} +3 -3
  103. package/chunks/{chunk-XJYUPHRC.js → chunk-QOMAHFYI.js} +3 -3
  104. package/chunks/{chunk-J37FGIOA.js → chunk-QXPI7FEC.js} +38 -4
  105. package/chunks/{chunk-RRFZXMYP.js → chunk-QZDBHNMV.js} +691 -164
  106. package/chunks/{chunk-S7AKE7HL.js → chunk-R6RI2HIC.js} +63 -9
  107. package/chunks/{chunk-HZT4UCFB.js → chunk-RB7S52NJ.js} +4 -4
  108. package/chunks/{chunk-J33ZR6OJ.js → chunk-RK22ACPP.js} +16 -16
  109. package/chunks/chunk-RM3PGSGL.js +66 -0
  110. package/chunks/chunk-RNBYOUGV.js +42 -0
  111. package/chunks/chunk-S6RLAIUR.js +23 -0
  112. package/chunks/{chunk-3TV3HUWZ.js → chunk-SCYK2YLI.js} +81 -30
  113. package/chunks/{chunk-HPZTOP4I.js → chunk-SEKRT4SD.js} +133 -23
  114. package/chunks/chunk-SEZC2725.js +36 -0
  115. package/chunks/chunk-SIUQ3YYX.js +78 -0
  116. package/chunks/{chunk-O2VBQ3Y2.js → chunk-SJBIFVD2.js} +2 -2
  117. package/chunks/chunk-SYCJMSIJ.js +82 -0
  118. package/chunks/{chunk-JE5FVRPC.js → chunk-T22H4V4R.js} +48 -23
  119. package/chunks/{chunk-3227DZO4.js → chunk-T42ACHFI.js} +1 -1
  120. package/chunks/{chunk-UO5GVXQE.js → chunk-TENOUWY2.js} +3 -3
  121. package/chunks/{chunk-JOLIREYR.js → chunk-TOAUDIS7.js} +1 -1
  122. package/chunks/{chunk-QNKBEJO2.js → chunk-UA6XBZT7.js} +2776 -1289
  123. package/chunks/{chunk-O75BHFQW.js → chunk-UQTYK5SS.js} +2 -2
  124. package/chunks/{chunk-Y6YMRS3U.js → chunk-UY2TCIZS.js} +17 -3
  125. package/chunks/{chunk-FNJ7BDPH.js → chunk-UY7ZAYTY.js} +10 -7
  126. package/chunks/{chunk-UYT3MWEB.js → chunk-UYHWM24C.js} +30 -2
  127. package/chunks/{chunk-SMXULRAN.js → chunk-VXGPYF7U.js} +1 -1
  128. package/chunks/{chunk-BTLJ2MF5.js → chunk-W7CG5HPC.js} +3 -3
  129. package/chunks/{chunk-JJXWTVSK.js → chunk-XHZKDN7M.js} +34 -1
  130. package/chunks/{chunk-K5XU6E4T.js → chunk-XKSCTXPK.js} +2 -2
  131. package/chunks/chunk-Y4LITCRB.js +367 -0
  132. package/chunks/chunk-YHTNWGRR.js +239 -0
  133. package/chunks/{chunk-BKXBARJZ.js → chunk-YPCPZSZB.js} +1 -1
  134. package/chunks/{chunk-QWFNTRH4.js → chunk-YSM24SCE.js} +1 -1
  135. package/chunks/chunk-YTFBURQD.js +313 -0
  136. package/chunks/{chunk-NL4C3H6C.js → chunk-YXK4GPYO.js} +1 -1
  137. package/chunks/{chunk-RYLJU2DY.js → chunk-ZN5T4BHI.js} +1 -1
  138. package/chunks/{computer-use-JGB36FDW.js → computer-use-MTSVPLPY.js} +34 -28
  139. package/chunks/contextCommand-VGJ3BPTK.js +67 -0
  140. package/chunks/{cron-create-SKEY55RG.js → cron-create-6YTCOX6P.js} +4 -4
  141. package/chunks/{cron-delete-I3NAT32Z.js → cron-delete-E3NIFSUK.js} +4 -4
  142. package/chunks/{cron-list-6XRRL6TH.js → cron-list-Q64MNQNE.js} +4 -4
  143. package/chunks/daemon-EEB2RYOL.js +8453 -0
  144. package/chunks/daemon-status-provider-H5SNMK42.js +71 -0
  145. package/chunks/{de-EOW5PVHF.js → de-PLLFDERI.js} +10 -9
  146. package/chunks/{dist-NHEYYB2B.js → dist-ADMIQGHI.js} +2 -2
  147. package/chunks/{dist-J37VXPLD.js → dist-BCQ7INM7.js} +40 -15
  148. package/chunks/{dist-663NZ6MI.js → dist-KNZFCY5F.js} +116 -11
  149. package/chunks/{dist-LB6OGPVM.js → dist-LHUWC3K6.js} +26 -5
  150. package/chunks/{dist-PQPZ5Q4N.js → dist-WBBZ76JZ.js} +20 -9
  151. package/chunks/{earlyInputCapture-44RISVVJ.js → earlyInputCapture-U4ZIQSQU.js} +32 -26
  152. package/chunks/{edit-NN6GM5DT.js → edit-SYIQ2KBI.js} +41 -38
  153. package/chunks/{en-HPWEJBTR.js → en-M4EBUBNU.js} +32 -10
  154. package/chunks/{enter-worktree-PB3O2C7D.js → enter-worktree-HPPOO244.js} +31 -25
  155. package/chunks/{enterPlanMode-YQFNNSUA.js → enterPlanMode-56YYO52U.js} +41 -25
  156. package/chunks/{errors-LS7XU5DZ.js → errors-EO4SXCFP.js} +33 -27
  157. package/chunks/{exit-worktree-E2FTNSBK.js → exit-worktree-UDM7E6XH.js} +31 -25
  158. package/chunks/{exitPlanMode-GLYK2BUB.js → exitPlanMode-M6P3AWLJ.js} +149 -33
  159. package/chunks/{fast-path-WQ6M7LI7.js → fast-path-42P4QYWI.js} +33 -14
  160. package/chunks/{fast-path-settings-OAGU3X5H.js → fast-path-settings-UQLRFDQP.js} +2 -2
  161. package/chunks/{fr-BN5NKSAC.js → fr-MBMNQSQ6.js} +10 -9
  162. package/chunks/{gemini-2YFLVA2M.js → gemini-NRLXS5J7.js} +84 -70
  163. package/chunks/{geminiContentGenerator-XV6SV6CD.js → geminiContentGenerator-DLJPYYPA.js} +41 -5
  164. package/chunks/{glob-2H6CDDMK.js → glob-JPY3F74Y.js} +31 -25
  165. package/chunks/{grep-VXIUXM3C.js → grep-HW23YES5.js} +31 -25
  166. package/chunks/initializer-HWOZTC4A.js +67 -0
  167. package/chunks/{ja-7DEUB2TS.js → ja-HFV5QCHR.js} +10 -9
  168. package/chunks/{keychain-token-storage-YLMDLKXT.js → keychain-token-storage-GPAKRDKQ.js} +2 -2
  169. package/chunks/list-OZGAGRDG.js +71 -0
  170. package/chunks/loadedSettingsAdapter-RUTZVVIA.js +66 -0
  171. package/chunks/{loop-wakeup-CITGGQHA.js → loop-wakeup-G2EHBRGR.js} +5 -5
  172. package/chunks/{ls-R5WP4BGZ.js → ls-IDHUVSAG.js} +4 -4
  173. package/chunks/{lsp-GSICJMMW.js → lsp-FSRYXGFT.js} +2 -2
  174. package/chunks/{monitor-HKLRS2HQ.js → monitor-QVWEIXU3.js} +33 -26
  175. package/chunks/nonInteractiveCli-RV2WYPML.js +109 -0
  176. package/chunks/{notebook-edit-Y6SKSGTT.js → notebook-edit-B26W3FFH.js} +37 -34
  177. package/chunks/{openaiContentGenerator-J7G2FYJT.js → openaiContentGenerator-6TH7AZGQ.js} +15 -13
  178. package/chunks/pidfile-KW2QQJZI.js +73 -0
  179. package/chunks/{pt-TNZRNLQB.js → pt-2THT3YHA.js} +10 -9
  180. package/chunks/{qwenContentGenerator-5XIEM5GV.js → qwenContentGenerator-5IQAC7RN.js} +33 -27
  181. package/chunks/{qwenOAuth2-AG3PFFLZ.js → qwenOAuth2-LWLA6MQG.js} +5 -4
  182. package/chunks/{read-file-J7D552ZJ.js → read-file-CWFAHOI2.js} +11 -10
  183. package/chunks/{read-mcp-resource-DQQW7H7T.js → read-mcp-resource-PIJF24RO.js} +2 -2
  184. package/chunks/ripGrep-FTZGDKY4.js +60 -0
  185. package/chunks/{ru-NIAUBKCN.js → ru-Z67YJHBG.js} +10 -9
  186. package/chunks/{run-qwen-serve-SGEEVMXD.js → run-qwen-serve-FN2SW5ZI.js} +545 -97
  187. package/chunks/{scheduler-7CQI3S4Q.js → scheduler-BMS23O3I.js} +31 -25
  188. package/chunks/{send-message-EE4TWKVU.js → send-message-33PYFMCT.js} +20 -4
  189. package/chunks/serve-PXFYKL65.js +71 -0
  190. package/chunks/{server-4QMUWXPW.js → server-BRKALJ4F.js} +4132 -1175
  191. package/chunks/{session-NRO7UFOY.js → session-AQMISBP4.js} +205 -64
  192. package/chunks/{settings-SGWRDQSC.js → settings-JCPVUZMB.js} +35 -29
  193. package/chunks/{shell-62ANGIHL.js → shell-POHCRVN2.js} +31 -25
  194. package/chunks/{skill-VWAQAWW6.js → skill-QPEVHS6H.js} +13 -12
  195. package/chunks/spawnChannel-V3QT62TE.js +69 -0
  196. package/chunks/{src-KUV5J5Q2.js → src-IZSP7L6Y.js} +127 -32
  197. package/chunks/{startInteractiveUI-6EYJN3JV.js → startInteractiveUI-63KATISO.js} +16762 -16075
  198. package/chunks/{syntheticOutput-T5YHQ6S2.js → syntheticOutput-YOSWIHDJ.js} +3 -3
  199. package/chunks/{task-create-BLY7RHXX.js → task-create-NHS2NGB3.js} +9 -7
  200. package/chunks/{task-list-3QUYNVYR.js → task-list-5UIB564R.js} +7 -6
  201. package/chunks/{task-stop-U4RATK2V.js → task-stop-HGXZ2VZ3.js} +2 -2
  202. package/chunks/{task-update-U54O7KJX.js → task-update-IYYWUILG.js} +40 -7
  203. package/chunks/{team-create-LPOGCPM7.js → team-create-E5O2F3CA.js} +31 -25
  204. package/chunks/{team-delete-LKBYPASD.js → team-delete-FEKJCU4P.js} +7 -6
  205. package/chunks/team-plan-approval-2TU4YROB.js +202 -0
  206. package/chunks/theme-manager-37KOGPJL.js +64 -0
  207. package/chunks/{todoWrite-OYXKTVYN.js → todoWrite-TKMVZ2HT.js} +4 -4
  208. package/chunks/{tool-search-YPUFJ3ZQ.js → tool-search-4ZTGNSFI.js} +38 -11
  209. package/chunks/{trustedFolders-5B24TMEA.js → trustedFolders-RJ5WXJ6L.js} +32 -26
  210. package/chunks/{validateNonInterActiveAuth-BTDTYOVT.js → validateNonInterActiveAuth-ZWMHZAOK.js} +66 -55
  211. package/chunks/{web-fetch-EEB5LZYU.js → web-fetch-J4PIW36Q.js} +5 -4
  212. package/chunks/{workflow-LAWIW5LI.js → workflow-6PG2PC5M.js} +68 -39
  213. package/chunks/workspace-providers-status-4QIZN2W4.js +68 -0
  214. package/chunks/workspace-service-CYMCOEIO.js +78 -0
  215. package/chunks/{write-file-PCV226DJ.js → write-file-R354LGQF.js} +41 -40
  216. package/chunks/{zh-5EUYXASN.js → zh-SLZNSSZB.js} +32 -10
  217. package/chunks/{zh-TW-TR3XYGE5.js → zh-TW-P53C2SL5.js} +32 -10
  218. package/cli.js +6 -6
  219. package/locales/ca.js +15 -13
  220. package/locales/de.js +15 -13
  221. package/locales/en.js +52 -15
  222. package/locales/fr.js +15 -14
  223. package/locales/ja.js +15 -14
  224. package/locales/pt.js +15 -13
  225. package/locales/ru.js +15 -13
  226. package/locales/zh-TW.js +50 -14
  227. package/locales/zh.js +50 -14
  228. package/node_modules/@qwen-code/audio-capture/package.json +1 -1
  229. package/node_modules/@qwen-code/audio-capture/prebuilds/darwin-arm64/@qwen-code+audio-capture.node +0 -0
  230. package/node_modules/@qwen-code/audio-capture/prebuilds/darwin-x64/@qwen-code+audio-capture.node +0 -0
  231. package/node_modules/@qwen-code/audio-capture/prebuilds/win32-x64/@qwen-code+audio-capture.node +0 -0
  232. package/package.json +15 -6
  233. package/patches/chrome-devtools-mcp+1.4.0.patch +31 -0
  234. package/postinstall.js +50 -0
  235. package/web-shell/assets/{arc-DA7r8Ueo.js → arc-Bd3048nX.js} +1 -1
  236. package/web-shell/assets/{architectureDiagram-3BPJPVTR-ZDUxPtZ2.js → architectureDiagram-3BPJPVTR-DyzbzABx.js} +1 -1
  237. package/web-shell/assets/{blockDiagram-GPEHLZMM-vrtOf1kJ.js → blockDiagram-GPEHLZMM-CTjxm9Sy.js} +1 -1
  238. package/web-shell/assets/{c4Diagram-AAUBKEIU-BHFjzIi4.js → c4Diagram-AAUBKEIU-DSOFWNU6.js} +1 -1
  239. package/web-shell/assets/channel-oVoup_Ci.js +1 -0
  240. package/web-shell/assets/{chunk-2J33WTMH-mdeQVz59.js → chunk-2J33WTMH-D_PFdjo2.js} +1 -1
  241. package/web-shell/assets/{chunk-4BX2VUAB-BkKMlwBX.js → chunk-4BX2VUAB-52eG6wOT.js} +1 -1
  242. package/web-shell/assets/{chunk-55IACEB6-B7bnXNfu.js → chunk-55IACEB6-CGTZfKkC.js} +1 -1
  243. package/web-shell/assets/{chunk-727SXJPM-DGz8Mm6i.js → chunk-727SXJPM-CZ-qfRUm.js} +1 -1
  244. package/web-shell/assets/{chunk-AQP2D5EJ-BQAydUNk.js → chunk-AQP2D5EJ-B2dSDcqM.js} +1 -1
  245. package/web-shell/assets/{chunk-FMBD7UC4-GHr2LN_p.js → chunk-FMBD7UC4-Cfy3tyA0.js} +1 -1
  246. package/web-shell/assets/{chunk-ND2GUHAM-7R91lnUx.js → chunk-ND2GUHAM-CApNUpUq.js} +1 -1
  247. package/web-shell/assets/{chunk-QZHKN3VN-aTJD3lSQ.js → chunk-QZHKN3VN-CVBG8kgg.js} +1 -1
  248. package/web-shell/assets/classDiagram-4FO5ZUOK-B8WsaT2G.js +1 -0
  249. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-B8WsaT2G.js +1 -0
  250. package/web-shell/assets/{cose-bilkent-S5V4N54A-BTf8t1RL.js → cose-bilkent-S5V4N54A-URd77-_-.js} +1 -1
  251. package/web-shell/assets/{dagre-BM42HDAG-_sgp3WuA.js → dagre-BM42HDAG-C07H4G9-.js} +1 -1
  252. package/web-shell/assets/{diagram-2AECGRRQ-CROtRy1w.js → diagram-2AECGRRQ-CYbpXrSn.js} +1 -1
  253. package/web-shell/assets/{diagram-5GNKFQAL-BqGRzwSc.js → diagram-5GNKFQAL-SI8s6fjX.js} +1 -1
  254. package/web-shell/assets/{diagram-KO2AKTUF-CMrcEtA7.js → diagram-KO2AKTUF-mBkC4RTW.js} +1 -1
  255. package/web-shell/assets/{diagram-LMA3HP47-BRydGNW5.js → diagram-LMA3HP47-CyBPDzWJ.js} +1 -1
  256. package/web-shell/assets/{diagram-OG6HWLK6-D0ilgNjV.js → diagram-OG6HWLK6-DwK7kBCu.js} +1 -1
  257. package/web-shell/assets/{erDiagram-TEJ5UH35-2lnQeJUM.js → erDiagram-TEJ5UH35-Ds1StEUd.js} +1 -1
  258. package/web-shell/assets/{flowDiagram-I6XJVG4X-C_ZMdQiC.js → flowDiagram-I6XJVG4X-BDC4-jHO.js} +1 -1
  259. package/web-shell/assets/{ganttDiagram-6RSMTGT7-Dw9V_Ny0.js → ganttDiagram-6RSMTGT7-CV2aHQqf.js} +1 -1
  260. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-HDXI-F1B.js → gitGraphDiagram-PVQCEYII-B8RcuV_L.js} +1 -1
  261. package/web-shell/assets/index-B5WZ0qP1.js +717 -0
  262. package/web-shell/assets/index-CYE1IMd1.css +5 -0
  263. package/web-shell/assets/{infoDiagram-5YYISTIA-CuB8Ebua.js → infoDiagram-5YYISTIA-DUPoTf50.js} +1 -1
  264. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-D_tyhVwh.js → ishikawaDiagram-YF4QCWOH-FDYOx9rf.js} +1 -1
  265. package/web-shell/assets/{journeyDiagram-JHISSGLW-CgCwJQNU.js → journeyDiagram-JHISSGLW-C5_ohMRp.js} +1 -1
  266. package/web-shell/assets/{kanban-definition-UN3LZRKU-PZUtcbPx.js → kanban-definition-UN3LZRKU-Bn4UnOMG.js} +1 -1
  267. package/web-shell/assets/{linear-CZqRdJIU.js → linear-Bl0pKQtY.js} +1 -1
  268. package/web-shell/assets/{mermaid.core-CPW_4UEF.js → mermaid.core-sevQFoji.js} +72 -72
  269. package/web-shell/assets/{mindmap-definition-RKZ34NQL-D_Y75ID7.js → mindmap-definition-RKZ34NQL-DSH4JZF9.js} +1 -1
  270. package/web-shell/assets/{pieDiagram-4H26LBE5-Q4dTyLeF.js → pieDiagram-4H26LBE5-acWvdQTD.js} +1 -1
  271. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-ckw329Ft.js → quadrantDiagram-W4KKPZXB-DlggX4Sm.js} +1 -1
  272. package/web-shell/assets/{requirementDiagram-4Y6WPE33-DbVDm4It.js → requirementDiagram-4Y6WPE33--mMqwmV8.js} +1 -1
  273. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-CHuZ_ecH.js → sankeyDiagram-5OEKKPKP-BtV9tZ77.js} +1 -1
  274. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-DU2YSpq-.js → sequenceDiagram-3UESZ5HK-iDQzPFlj.js} +1 -1
  275. package/web-shell/assets/{stateDiagram-AJRCARHV-CA9PEBUo.js → stateDiagram-AJRCARHV-CsCyQLZ3.js} +1 -1
  276. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-CPapECG9.js +1 -0
  277. package/web-shell/assets/{timeline-definition-PNZ67QCA-Bhlo4WVc.js → timeline-definition-PNZ67QCA-Dl0rnKvr.js} +1 -1
  278. package/web-shell/assets/{vennDiagram-CIIHVFJN-6xtPLsyl.js → vennDiagram-CIIHVFJN-qF7nTZzA.js} +1 -1
  279. package/web-shell/assets/{wardley-L42UT6IY-3eozmXPf.js → wardley-L42UT6IY-fWoK9i7F.js} +1 -1
  280. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-BOn6hKss.js → wardleyDiagram-YWT4CUSO-pHGfkMnc.js} +1 -1
  281. package/web-shell/assets/{xychartDiagram-2RQKCTM6-BsP4-I_y.js → xychartDiagram-2RQKCTM6-3Doc4Trz.js} +1 -1
  282. package/web-shell/index.html +18 -2
  283. package/chunks/MaxSizedBox-QNF3EIGU.js +0 -63
  284. package/chunks/agent-headless-RQ5BTX3G.js +0 -56
  285. package/chunks/bridge-JL2PMCIW.js +0 -66
  286. package/chunks/chunk-5GOVVXEV.js +0 -73
  287. package/chunks/chunk-BC3C4F3Q.js +0 -40
  288. package/chunks/chunk-BW4KCQFD.js +0 -1103
  289. package/chunks/chunk-RKIZXJMB.js +0 -13
  290. package/chunks/contextCommand-WYU6OQ2F.js +0 -61
  291. package/chunks/daemon-status-provider-HH2EC5FI.js +0 -65
  292. package/chunks/headlessSafetyWarnings-TBE35GJ4.js +0 -55
  293. package/chunks/initializer-2Y7SLOKV.js +0 -61
  294. package/chunks/list-ZAFHZ7OS.js +0 -65
  295. package/chunks/loadedSettingsAdapter-6KJXD6M3.js +0 -60
  296. package/chunks/nonInteractiveCli-5W4GIZQM.js +0 -96
  297. package/chunks/ripGrep-IEIFIWP4.js +0 -54
  298. package/chunks/serve-V6GVZR6U.js +0 -65
  299. package/chunks/spawnChannel-3VHW5EPY.js +0 -63
  300. package/chunks/theme-manager-LYLGAERF.js +0 -58
  301. package/chunks/workspace-providers-status-PIAFVYHA.js +0 -62
  302. package/chunks/workspace-service-YAIOD4HG.js +0 -71
  303. package/web-shell/assets/channel-iRo68q4Q.js +0 -1
  304. package/web-shell/assets/classDiagram-4FO5ZUOK-iHF24a8X.js +0 -1
  305. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-iHF24a8X.js +0 -1
  306. package/web-shell/assets/index-CHmzAWys.css +0 -5
  307. package/web-shell/assets/index-w6GTOHh1.js +0 -713
  308. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-t1LRI0oY.js +0 -1
@@ -2,16 +2,16 @@
2
2
  "use strict";
3
3
  import {
4
4
  getEffectiveSupportedModes
5
- } from "./chunk-3TV3HUWZ.js";
5
+ } from "./chunk-SCYK2YLI.js";
6
6
  import {
7
7
  require_jsx_runtime
8
- } from "./chunk-T4T2FNV4.js";
8
+ } from "./chunk-LOW52WYZ.js";
9
9
  import {
10
10
  require_react
11
11
  } from "./chunk-KYMBIKIW.js";
12
12
  import {
13
13
  uiTelemetryService
14
- } from "./chunk-QNKBEJO2.js";
14
+ } from "./chunk-UA6XBZT7.js";
15
15
  import {
16
16
  init_esbuild_shims
17
17
  } from "./chunk-A4BMJM77.js";
@@ -0,0 +1,93 @@
1
+ // Force strict mode and setup for ESM
2
+ "use strict";
3
+ import {
4
+ init_esbuild_shims
5
+ } from "./chunk-A4BMJM77.js";
6
+ import {
7
+ __commonJS,
8
+ __name
9
+ } from "./chunk-J2S4EL5Y.js";
10
+
11
+ // node_modules/wrappy/wrappy.js
12
+ var require_wrappy = __commonJS({
13
+ "node_modules/wrappy/wrappy.js"(exports, module) {
14
+ init_esbuild_shims();
15
+ module.exports = wrappy;
16
+ function wrappy(fn, cb) {
17
+ if (fn && cb) return wrappy(fn)(cb);
18
+ if (typeof fn !== "function")
19
+ throw new TypeError("need wrapper function");
20
+ Object.keys(fn).forEach(function(k) {
21
+ wrapper[k] = fn[k];
22
+ });
23
+ return wrapper;
24
+ function wrapper() {
25
+ var args = new Array(arguments.length);
26
+ for (var i = 0; i < args.length; i++) {
27
+ args[i] = arguments[i];
28
+ }
29
+ var ret = fn.apply(this, args);
30
+ var cb2 = args[args.length - 1];
31
+ if (typeof ret === "function" && ret !== cb2) {
32
+ Object.keys(cb2).forEach(function(k) {
33
+ ret[k] = cb2[k];
34
+ });
35
+ }
36
+ return ret;
37
+ }
38
+ __name(wrapper, "wrapper");
39
+ }
40
+ __name(wrappy, "wrappy");
41
+ }
42
+ });
43
+
44
+ // node_modules/once/once.js
45
+ var require_once = __commonJS({
46
+ "node_modules/once/once.js"(exports, module) {
47
+ init_esbuild_shims();
48
+ var wrappy = require_wrappy();
49
+ module.exports = wrappy(once);
50
+ module.exports.strict = wrappy(onceStrict);
51
+ once.proto = once(function() {
52
+ Object.defineProperty(Function.prototype, "once", {
53
+ value: /* @__PURE__ */ __name(function() {
54
+ return once(this);
55
+ }, "value"),
56
+ configurable: true
57
+ });
58
+ Object.defineProperty(Function.prototype, "onceStrict", {
59
+ value: /* @__PURE__ */ __name(function() {
60
+ return onceStrict(this);
61
+ }, "value"),
62
+ configurable: true
63
+ });
64
+ });
65
+ function once(fn) {
66
+ var f = /* @__PURE__ */ __name(function() {
67
+ if (f.called) return f.value;
68
+ f.called = true;
69
+ return f.value = fn.apply(this, arguments);
70
+ }, "f");
71
+ f.called = false;
72
+ return f;
73
+ }
74
+ __name(once, "once");
75
+ function onceStrict(fn) {
76
+ var f = /* @__PURE__ */ __name(function() {
77
+ if (f.called)
78
+ throw new Error(f.onceError);
79
+ f.called = true;
80
+ return f.value = fn.apply(this, arguments);
81
+ }, "f");
82
+ var name = fn.name || "Function wrapped with `once`";
83
+ f.onceError = name + " shouldn't be called more than once";
84
+ f.called = false;
85
+ return f;
86
+ }
87
+ __name(onceStrict, "onceStrict");
88
+ }
89
+ });
90
+
91
+ export {
92
+ require_once
93
+ };
@@ -1,27 +1,28 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
3
  import {
4
- Colors
5
- } from "./chunk-5GOVVXEV.js";
4
+ Colors,
5
+ RowMouseController
6
+ } from "./chunk-Y4LITCRB.js";
6
7
  import {
7
8
  theme
8
- } from "./chunk-SMXULRAN.js";
9
+ } from "./chunk-VXGPYF7U.js";
9
10
  import {
10
11
  Box_default,
11
12
  Text,
12
13
  require_jsx_runtime
13
- } from "./chunk-T4T2FNV4.js";
14
+ } from "./chunk-LOW52WYZ.js";
14
15
  import {
15
16
  require_react
16
17
  } from "./chunk-KYMBIKIW.js";
17
18
  import {
18
19
  t
19
- } from "./chunk-R5OP2ATH.js";
20
+ } from "./chunk-JZG7VB6C.js";
20
21
  import {
21
22
  readManyFiles,
22
23
  shouldRunVisionBridge,
23
24
  stripTerminalControlSequences
24
- } from "./chunk-YAINVQ3Q.js";
25
+ } from "./chunk-A5OPLHFM.js";
25
26
  import {
26
27
  emptyMcpResourceText,
27
28
  formatMcpResourceContents,
@@ -33,7 +34,7 @@ import {
33
34
  isNodeError,
34
35
  isSubpath,
35
36
  unescapePath
36
- } from "./chunk-UX4SGCGN.js";
37
+ } from "./chunk-AVQDCKNF.js";
37
38
  import {
38
39
  init_esbuild_shims
39
40
  } from "./chunk-A4BMJM77.js";
@@ -44,7 +45,7 @@ import {
44
45
 
45
46
  // packages/cli/src/ui/hooks/atCommandProcessor.ts
46
47
  init_esbuild_shims();
47
- import * as fs from "node:fs/promises";
48
+ import * as fs2 from "node:fs/promises";
48
49
  import * as path from "node:path";
49
50
 
50
51
  // packages/cli/src/ui/hooks/mcpResourceRef.ts
@@ -70,6 +71,7 @@ init_esbuild_shims();
70
71
 
71
72
  // packages/cli/src/ui/components/SuggestionsDisplay.tsx
72
73
  init_esbuild_shims();
74
+ var import_react2 = __toESM(require_react(), 1);
73
75
 
74
76
  // packages/cli/src/ui/components/PrepareLabel.tsx
75
77
  init_esbuild_shims();
@@ -158,8 +160,13 @@ function SuggestionsDisplay({
158
160
  scrollOffset,
159
161
  userInput,
160
162
  mode,
161
- expandedIndex
163
+ expandedIndex,
164
+ onHoverIndex,
165
+ onSelectIndex,
166
+ mouseEnabled
162
167
  }) {
168
+ const containerRef = (0, import_react2.useRef)(null);
169
+ const itemRefs = (0, import_react2.useRef)([]);
163
170
  if (isLoading) {
164
171
  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
172
  }
@@ -182,7 +189,17 @@ function SuggestionsDisplay({
182
189
  Math.max(...describedLabelLengths),
183
190
  Math.max(contentWidth - MIN_DESCRIPTION_WIDTH - 2, 1)
184
191
  ) : 0;
185
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Box_default, { flexDirection: "column", width, children: [
192
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Box_default, { flexDirection: "column", width, ref: containerRef, children: [
193
+ mouseEnabled && onHoverIndex && onSelectIndex && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
194
+ RowMouseController,
195
+ {
196
+ containerRef,
197
+ itemRefs,
198
+ scrollOffset: startIndex,
199
+ onHoverIndex,
200
+ onSelectIndex
201
+ }
202
+ ),
186
203
  scrollOffset > 0 && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { color: theme.text.primary, children: "\u25B2" }),
187
204
  visibleSuggestions.map((suggestion, index) => {
188
205
  const originalIndex = startIndex + index;
@@ -206,37 +223,47 @@ function SuggestionsDisplay({
206
223
  isExpanded
207
224
  }
208
225
  );
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}`);
226
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
227
+ Box_default,
228
+ {
229
+ flexDirection: "row",
230
+ ref: (node) => {
231
+ itemRefs.current[index] = node;
232
+ },
233
+ children: [
234
+ /* @__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 ? "> " : " " }) }),
235
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
236
+ Box_default,
237
+ {
238
+ ...mode === "slash" || suggestion.description ? { width: labelColumnWidth, flexShrink: 0 } : { flexShrink: 1 },
239
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Box_default, { children: [
240
+ labelElement,
241
+ suggestion.argumentHint && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Text, { color: theme.text.secondary, children: [
242
+ " ",
243
+ suggestion.argumentHint
244
+ ] }),
245
+ suggestion.sourceBadge && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Text, { color: textColor, children: [
246
+ " ",
247
+ suggestion.sourceBadge
248
+ ] })
249
+ ] })
250
+ }
251
+ ),
252
+ suggestion.description && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
253
+ Box_default,
254
+ {
255
+ width: descriptionColumnWidth,
256
+ flexGrow: 1,
257
+ flexShrink: 1,
258
+ paddingLeft: 2,
259
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { color: textColor, wrap: "truncate-end", children: normalizeDescription(suggestion.description) })
260
+ }
261
+ ),
262
+ 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 " }) })
263
+ ]
264
+ },
265
+ `${suggestion.value}-${originalIndex}`
266
+ );
240
267
  }),
241
268
  endIndex < suggestions.length && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { color: "gray", children: "\u25BC" }),
242
269
  suggestions.length > MAX_SUGGESTIONS_TO_SHOW && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Text, { color: "gray", children: [
@@ -250,8 +277,12 @@ function SuggestionsDisplay({
250
277
  }
251
278
  __name(SuggestionsDisplay, "SuggestionsDisplay");
252
279
 
253
- // packages/cli/src/ui/hooks/extension-mention-ref.ts
280
+ // packages/cli/src/utils/extension-mention.ts
281
+ init_esbuild_shims();
282
+ import * as fs from "node:fs/promises";
254
283
  var EXTENSION_REF_PREFIX = "ext:";
284
+ var EXTENSION_CONTEXT_BUDGET = 2e5;
285
+ var EXTENSION_CONTEXT_FILE_CAP = 5e4;
255
286
  function parseExtensionRef(pathName) {
256
287
  if (!pathName.startsWith(EXTENSION_REF_PREFIX)) return null;
257
288
  const name = pathName.slice(EXTENSION_REF_PREFIX.length);
@@ -276,37 +307,12 @@ function sanitizeDisplayText(raw) {
276
307
  return stripped.length > 0 ? stripped : null;
277
308
  }
278
309
  __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
- }));
310
+ function getExtensionDisplayName(extension) {
311
+ return sanitizeDisplayText(extension.displayName || extension.name) || extension.name;
306
312
  }
307
- __name(getExtensionSuggestions, "getExtensionSuggestions");
313
+ __name(getExtensionDisplayName, "getExtensionDisplayName");
308
314
  function buildExtensionContextText(extension) {
309
- const displayName = sanitizeDisplayText(extension.displayName || extension.name) || extension.name;
315
+ const displayName = getExtensionDisplayName(extension);
310
316
  const lines = [];
311
317
  lines.push(
312
318
  `--- Extension: ${displayName} (untrusted third-party content) ---`
@@ -340,6 +346,94 @@ function buildExtensionContextText(extension) {
340
346
  return lines.join("\n");
341
347
  }
342
348
  __name(buildExtensionContextText, "buildExtensionContextText");
349
+ async function buildExtensionMentionContext(extension, options) {
350
+ let contextText = buildExtensionContextText(extension);
351
+ let remainingBudget = options.remainingBudget;
352
+ if (extension.contextFiles.length === 0) {
353
+ return { text: contextText, remainingBudget };
354
+ }
355
+ const fileReads = await Promise.allSettled(
356
+ extension.contextFiles.map(async (contextFilePath) => {
357
+ let realPath;
358
+ let realExtPath;
359
+ try {
360
+ realPath = await fs.realpath(contextFilePath);
361
+ realExtPath = await fs.realpath(extension.path);
362
+ } catch {
363
+ options.onDebugMessage?.(
364
+ `Skipping unreadable context file: ${contextFilePath}`
365
+ );
366
+ return null;
367
+ }
368
+ if (!isSubpath(realExtPath, realPath)) {
369
+ options.onDebugMessage?.(
370
+ `Skipping context file outside extension directory: ${contextFilePath}`
371
+ );
372
+ return null;
373
+ }
374
+ return fs.readFile(realPath, {
375
+ encoding: "utf-8",
376
+ signal: options.signal
377
+ });
378
+ })
379
+ );
380
+ for (let i = 0; i < fileReads.length; i++) {
381
+ const outcome = fileReads[i];
382
+ if (outcome.status === "rejected") {
383
+ options.onDebugMessage?.(
384
+ `Failed to read extension context file ${extension.contextFiles[i]}: ${getErrorMessage(outcome.reason)}`
385
+ );
386
+ continue;
387
+ }
388
+ const content = outcome.value;
389
+ if (!content || !content.trim()) continue;
390
+ if (remainingBudget <= 0) {
391
+ options.onDebugMessage?.(
392
+ "Extension context budget exhausted, skipping remaining files."
393
+ );
394
+ break;
395
+ }
396
+ const cap = Math.min(EXTENSION_CONTEXT_FILE_CAP, remainingBudget);
397
+ const cappedContent = content.length > cap ? content.slice(0, cap) + "\n... (truncated)" : content;
398
+ contextText += `
399
+
400
+ ${cappedContent}`;
401
+ remainingBudget -= cappedContent.length;
402
+ }
403
+ return { text: contextText, remainingBudget };
404
+ }
405
+ __name(buildExtensionMentionContext, "buildExtensionMentionContext");
406
+
407
+ // packages/cli/src/ui/hooks/extension-mention-ref.ts
408
+ function getExtensionSuggestions(config, pattern) {
409
+ if (!config) return [];
410
+ if (config.isTrustedFolder?.() === false) return [];
411
+ const extensions = config.getActiveExtensions?.() ?? [];
412
+ if (extensions.length === 0) return [];
413
+ const query = pattern.toLowerCase();
414
+ return extensions.map((ext) => ({
415
+ ext,
416
+ safeLabel: sanitizeDisplayText(ext.displayName || ext.name) || ext.name
417
+ })).filter(({ safeLabel, ext }) => {
418
+ const label = safeLabel.toLowerCase();
419
+ const name = ext.name.toLowerCase();
420
+ return label.includes(query) || name.includes(query);
421
+ }).sort((a, b) => {
422
+ const aName = a.safeLabel.toLowerCase();
423
+ const bName = b.safeLabel.toLowerCase();
424
+ const aPrefix = aName.startsWith(query) ? 0 : 1;
425
+ const bPrefix = bName.startsWith(query) ? 0 : 1;
426
+ if (aPrefix !== bPrefix) return aPrefix - bPrefix;
427
+ return aName.localeCompare(bName);
428
+ }).slice(0, MAX_SUGGESTIONS_TO_SHOW).map(({ ext, safeLabel }) => ({
429
+ label: safeLabel,
430
+ value: buildExtensionRef(ext.name),
431
+ description: ext.config.description ? sanitizeDisplayText(ext.config.description) ?? void 0 : void 0,
432
+ sourceBadge: t("Extension"),
433
+ isDirectory: false
434
+ }));
435
+ }
436
+ __name(getExtensionSuggestions, "getExtensionSuggestions");
343
437
 
344
438
  // packages/cli/src/ui/hooks/atCommandProcessor.ts
345
439
  function parseAllAtCommands(query) {
@@ -489,7 +583,7 @@ async function resolveAtCommandQuery({
489
583
  let currentPathSpec = pathName;
490
584
  try {
491
585
  const absolutePath = path.resolve(dir, pathName);
492
- const stats = await fs.stat(absolutePath);
586
+ const stats = await fs2.stat(absolutePath);
493
587
  if (stats.isDirectory()) {
494
588
  currentPathSpec = pathName;
495
589
  onDebugMessage(`Path ${pathName} resolved to directory.`);
@@ -615,65 +709,21 @@ ${messages.join("\n")}`;
615
709
  shouldProceed: true
616
710
  };
617
711
  }
618
- const EXTENSION_CONTEXT_BUDGET = 2e5;
619
- const PER_FILE_CAP = 5e4;
620
712
  let extensionContextBudgetRemaining = EXTENSION_CONTEXT_BUDGET;
621
713
  const extensionParts = [];
622
714
  const extensionDisplays = [];
623
715
  const extensionLabels = [];
624
716
  for (let i = 0; i < extensionMentions.length; i++) {
625
717
  const { extension } = extensionMentions[i];
626
- const displayName = sanitizeDisplayText(extension.displayName || extension.name) || extension.name;
718
+ const displayName = getExtensionDisplayName(extension);
627
719
  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 });
720
+ const context = await buildExtensionMentionContext(extension, {
721
+ remainingBudget: extensionContextBudgetRemaining,
722
+ signal,
723
+ onDebugMessage
724
+ });
725
+ extensionContextBudgetRemaining = context.remainingBudget;
726
+ extensionParts.push({ text: context.text });
677
727
  extensionLabels.push(buildExtensionRef(extension.name));
678
728
  extensionDisplays.push({
679
729
  callId,
@@ -797,6 +847,10 @@ export {
797
847
  MAX_WIDTH,
798
848
  MAX_SUGGESTIONS_TO_SHOW,
799
849
  SuggestionsDisplay,
850
+ EXTENSION_CONTEXT_BUDGET,
851
+ parseExtensionRef,
852
+ matchExtensionByRef,
853
+ buildExtensionMentionContext,
800
854
  getExtensionSuggestions,
801
855
  resolveAtCommandQuery,
802
856
  handleAtCommand