@qwen-code/qwen-code 0.19.12 → 0.20.0-nightly.20260721.cda0e0348

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 (280) hide show
  1. package/bundled/qc-helper/docs/configuration/settings.md +1 -1
  2. package/bundled/qc-helper/docs/features/commands.md +54 -0
  3. package/bundled/qc-helper/docs/integration-github-action.md +1 -1
  4. package/bundled/qc-helper/docs/qwen-serve.md +44 -6
  5. package/bundled/review/DESIGN.md +2 -2
  6. package/bundled/review/SKILL.md +13 -9
  7. package/chunks/{MaxSizedBox-QOXLJGAF.js → MaxSizedBox-EE76OHAP.js} +30 -27
  8. package/chunks/{StandaloneSessionPicker-FLV6CGYJ.js → StandaloneSessionPicker-WZH4PC3K.js} +50 -45
  9. package/chunks/{acpAgent-OB2CTF3P.js → acpAgent-2ATF4LMP.js} +437 -156
  10. package/chunks/{agent-CKSI7BTR.js → agent-KTOOFWMV.js} +22 -22
  11. package/chunks/{agent-headless-U36LIYTU.js → agent-headless-WVJCQ27D.js} +22 -22
  12. package/chunks/{anthropicContentGenerator-ZZRGFEES.js → anthropicContentGenerator-W4JLNYWQ.js} +6 -5
  13. package/chunks/{artifact-tool-PHO5XEGZ.js → artifact-tool-WBCAMD3O.js} +2 -2
  14. package/chunks/{askUserQuestion-CEPBT47X.js → askUserQuestion-6DZC4UV5.js} +2 -2
  15. package/chunks/{bridge-AIKTINJG.js → bridge-T4TLAZSJ.js} +25 -25
  16. package/chunks/build-SSCNEHZZ.js +62 -0
  17. package/chunks/{ca-2SL2BXTK.js → ca-ISKASTR5.js} +606 -200
  18. package/chunks/{channel-worker-group-NEUVTPB2.js → channel-worker-group-QZV2SP5U.js} +4 -4
  19. package/chunks/{channel-worker-manager-7CQVOVWV.js → channel-worker-manager-3GMAU45H.js} +4 -4
  20. package/chunks/{channel-worker-supervisor-3BU2KNCZ.js → channel-worker-supervisor-QCXSXCRY.js} +3 -3
  21. package/chunks/{chunk-6ETOSWAO.js → chunk-246TW4IX.js} +3 -3
  22. package/chunks/{chunk-2CCDMJM7.js → chunk-25Y6JSH2.js} +3 -3
  23. package/chunks/{chunk-XSEWNUMZ.js → chunk-2CWOJ2FA.js} +8 -8
  24. package/chunks/{chunk-UZC5VPOJ.js → chunk-2GFRA3MN.js} +3 -3
  25. package/chunks/chunk-2GOPPEHK.js +442 -0
  26. package/chunks/{chunk-MRE77ST5.js → chunk-2ITGJJE2.js} +69 -2216
  27. package/chunks/{chunk-BABX5XRO.js → chunk-2LI23QA6.js} +1 -1
  28. package/chunks/{chunk-EFAXBOQO.js → chunk-32F7BZSK.js} +7 -7
  29. package/chunks/chunk-43T5WDQ7.js +127 -0
  30. package/chunks/{chunk-DJ4VHAFJ.js → chunk-4CWPMWCD.js} +7 -3
  31. package/chunks/{chunk-GMUPIMHF.js → chunk-4RA7PWIY.js} +3 -3
  32. package/chunks/{chunk-6IITZE7O.js → chunk-5JX5EWR5.js} +7 -7
  33. package/chunks/{chunk-OBSLEYCD.js → chunk-5PZ6R37W.js} +29 -2
  34. package/chunks/{chunk-HTHUX2T5.js → chunk-5QWWOFGG.js} +0 -1
  35. package/chunks/{chunk-3DJY4IFO.js → chunk-5SCI6E3E.js} +1 -1
  36. package/chunks/{chunk-GSPWDTYY.js → chunk-5WG2K5RH.js} +53 -16
  37. package/chunks/{chunk-NPMVLWYL.js → chunk-5YVZ2XLV.js} +6 -6
  38. package/chunks/{chunk-TKASNYDS.js → chunk-6DHWO5ZF.js} +3 -3
  39. package/chunks/{chunk-4CHDYDG3.js → chunk-6EFTQYW7.js} +1 -1
  40. package/chunks/{chunk-RKUMFUFM.js → chunk-6MC5ASQK.js} +4 -4
  41. package/chunks/{chunk-HZ4M2UQD.js → chunk-6RVJRVQR.js} +1 -1
  42. package/chunks/{chunk-W6CQPLWM.js → chunk-6ZBPS62S.js} +1 -1
  43. package/chunks/chunk-7KGXAXF7.js +114 -0
  44. package/chunks/{chunk-PK7COE5O.js → chunk-ABIL4ZQU.js} +1 -1
  45. package/chunks/{chunk-OEHCAWUA.js → chunk-ACW3VNUE.js} +2 -2
  46. package/chunks/{chunk-APOFULHK.js → chunk-AWVS63WA.js} +7 -6
  47. package/chunks/{chunk-KGWA7XYL.js → chunk-AY3CSB6F.js} +6 -226
  48. package/chunks/{chunk-XAAEDML2.js → chunk-AYCDXHZB.js} +1 -1
  49. package/chunks/{chunk-42VIHAYT.js → chunk-B452RETY.js} +1 -1
  50. package/chunks/{chunk-VAJS2E2D.js → chunk-BDBMYST4.js} +1 -1
  51. package/chunks/{chunk-5N7M4XYN.js → chunk-BUKOHGBE.js} +5 -5
  52. package/chunks/{chunk-F2RR4HO2.js → chunk-BVLROR2T.js} +1 -1
  53. package/chunks/{chunk-WIYV7CSF.js → chunk-BWK3FX3K.js} +3 -3
  54. package/chunks/{chunk-UE5TZ55T.js → chunk-C27BYUX6.js} +29 -2
  55. package/chunks/{chunk-KRMARA3A.js → chunk-CG2HPAVD.js} +29 -13
  56. package/chunks/{chunk-UOA2IHRI.js → chunk-CPCVCKKF.js} +1 -1
  57. package/chunks/{chunk-HD6EGS5K.js → chunk-CUJX3F4X.js} +31 -6
  58. package/chunks/{chunk-4RPARQ5D.js → chunk-D2VIDMVM.js} +2 -2
  59. package/chunks/{chunk-PUKUUASO.js → chunk-DMRO4GU2.js} +1 -1
  60. package/chunks/{chunk-64GC5EMF.js → chunk-DZZIOIVF.js} +1 -1
  61. package/chunks/{chunk-FUSMC3SZ.js → chunk-E5QFCC4X.js} +13 -8
  62. package/chunks/{chunk-LKR7QQ63.js → chunk-EAUYY7SS.js} +3 -3
  63. package/chunks/{chunk-NE6HHLL3.js → chunk-EDMGFJ3E.js} +2 -2
  64. package/chunks/{chunk-J2MKYJKZ.js → chunk-EIAK6Q2B.js} +2 -2
  65. package/chunks/{chunk-WEPXQKGP.js → chunk-EZVDJFZ7.js} +1 -1
  66. package/chunks/{chunk-NALRQ3SG.js → chunk-FCUUJKZF.js} +394 -128
  67. package/chunks/{chunk-4XCVGEEX.js → chunk-FSL5W5TI.js} +3 -3
  68. package/chunks/{chunk-CHPQFLW6.js → chunk-FYA3Y5JR.js} +5 -5
  69. package/chunks/{chunk-V4PCIS25.js → chunk-FZVSFBNW.js} +69 -7
  70. package/chunks/{chunk-4MPYGENG.js → chunk-G45NOBV7.js} +6 -6
  71. package/chunks/{chunk-OSSDHJDU.js → chunk-G45X5TRN.js} +1 -1
  72. package/chunks/{chunk-3B6PSWHE.js → chunk-GH7OEOYU.js} +4 -4
  73. package/chunks/{chunk-KANTXY7B.js → chunk-GKY2OJ7R.js} +2 -2
  74. package/chunks/chunk-GMGDLUC7.js +37 -0
  75. package/chunks/{chunk-2476XGOU.js → chunk-GPILFVPY.js} +1 -1
  76. package/chunks/{chunk-EISVEV45.js → chunk-H24SOJIQ.js} +2 -2
  77. package/chunks/{chunk-J6NT5YTN.js → chunk-H2XVO6NE.js} +1 -289
  78. package/chunks/{chunk-QIFTJDBY.js → chunk-IM2A6YO3.js} +1 -1
  79. package/chunks/{chunk-R3EDIMYZ.js → chunk-IYZENXFW.js} +1 -1
  80. package/chunks/{chunk-LPHGXXZX.js → chunk-JD3MKVKL.js} +1 -1
  81. package/chunks/{chunk-NUHSLBJZ.js → chunk-JNWZQ27S.js} +15 -9
  82. package/chunks/{chunk-ETN2G32U.js → chunk-JPRLCXAO.js} +4 -4
  83. package/chunks/{chunk-WHQNBBWW.js → chunk-JQMBPGOU.js} +2 -2
  84. package/chunks/{chunk-5QSVANRT.js → chunk-JR6UJ24K.js} +2 -2
  85. package/chunks/{chunk-VLHQMOZK.js → chunk-JRW46GQX.js} +3 -3
  86. package/chunks/{chunk-DUR7BZYK.js → chunk-KRI4VCHX.js} +53 -28
  87. package/chunks/{chunk-PR5XQ73G.js → chunk-KTNIZG2C.js} +2 -2
  88. package/chunks/{chunk-QSG4ZFG4.js → chunk-KTUQMDEP.js} +1 -1
  89. package/chunks/{chunk-HVGJWOR6.js → chunk-L4YSPHR4.js} +2 -2
  90. package/chunks/{chunk-BEZPRKD3.js → chunk-LC5CAVMS.js} +160 -2
  91. package/chunks/{chunk-67Q33DQY.js → chunk-LLDGOZMJ.js} +4 -4
  92. package/chunks/{chunk-UCTCDLDS.js → chunk-LWQ4IAOJ.js} +136 -4
  93. package/chunks/{chunk-GEHSF7MS.js → chunk-NEEB7UEN.js} +2545 -1974
  94. package/chunks/{chunk-GCY7QTCE.js → chunk-NO6XTCYT.js} +1822 -424
  95. package/chunks/{chunk-JCJPZMJV.js → chunk-OOCI5VVU.js} +1 -1
  96. package/chunks/{chunk-XSPFQQRE.js → chunk-OONJNQ42.js} +3 -3
  97. package/chunks/{chunk-ANRANWVE.js → chunk-OP4MOGXF.js} +1 -1
  98. package/chunks/{chunk-GW7BONBU.js → chunk-OV2KB55J.js} +5 -5
  99. package/chunks/{chunk-CPU6I5YV.js → chunk-P64HXIC5.js} +115 -32
  100. package/chunks/{chunk-SGPFJMRP.js → chunk-PBATSWUQ.js} +1 -1
  101. package/chunks/{chunk-GXFYV7MP.js → chunk-PFKNXN67.js} +1106 -592
  102. package/chunks/{chunk-KNGZ5EYL.js → chunk-PYNCSQSI.js} +198 -120
  103. package/chunks/{chunk-I7RRHHYG.js → chunk-QKTHJXCS.js} +1 -1
  104. package/chunks/chunk-QKYTTBYW.js +624 -0
  105. package/chunks/{chunk-76BFY7AF.js → chunk-QTERJVPZ.js} +1 -6
  106. package/chunks/{chunk-W4UN42YP.js → chunk-R3VZNHRX.js} +85 -21
  107. package/chunks/chunk-R5N7NF5D.js +1187 -0
  108. package/chunks/{chunk-ZSDFNE6Y.js → chunk-RF34V75B.js} +3 -3
  109. package/chunks/{chunk-HCCR43AY.js → chunk-RFIAR4YL.js} +1 -1
  110. package/chunks/chunk-RS7MT2QG.js +305 -0
  111. package/chunks/{chunk-BKNPMEN6.js → chunk-RVLZCXEE.js} +162 -17
  112. package/chunks/chunk-SV5PQVQE.js +71 -0
  113. package/chunks/{chunk-3ESL7JXA.js → chunk-U4VGYZN7.js} +3 -3
  114. package/chunks/{chunk-4CA4WUMS.js → chunk-UEY4AYUL.js} +2 -2
  115. package/chunks/{chunk-ZGT623SG.js → chunk-USTF7LPI.js} +12 -12
  116. package/chunks/chunk-V7RNNPGC.js +44 -0
  117. package/chunks/{chunk-VEFR4XJQ.js → chunk-W3BKN3LO.js} +1 -1
  118. package/chunks/{chunk-4SJJT466.js → chunk-WQQDJE2P.js} +94 -177
  119. package/chunks/{chunk-KMJOMWHE.js → chunk-WRRF6TEQ.js} +1 -1
  120. package/chunks/{chunk-GLH2NTPB.js → chunk-XCHUDLER.js} +1 -1
  121. package/chunks/{chunk-7SX6WZNO.js → chunk-XVVH63JG.js} +3 -3
  122. package/chunks/{chunk-N47VAEAJ.js → chunk-XZOBDSDG.js} +2379 -1291
  123. package/chunks/chunk-YGIUIIIF.js +125 -0
  124. package/chunks/{chunk-335ECZTA.js → chunk-ZEOZL37W.js} +1 -1
  125. package/chunks/{computer-use-4PUGCUQK.js → computer-use-M6MGRJF2.js} +22 -22
  126. package/chunks/{config-utils-6PJUXHLI.js → config-utils-MOGE4EVB.js} +3 -3
  127. package/chunks/{contextCommand-C57KTWFV.js → contextCommand-HTRJJYNE.js} +25 -26
  128. package/chunks/{create-sub-session-5Q42XR6I.js → create-sub-session-MB35IHCR.js} +22 -22
  129. package/chunks/{create-sub-session-DIJOV6HV.js → create-sub-session-P26FE5GG.js} +2 -2
  130. package/chunks/{cron-create-X462ERYA.js → cron-create-JWFHBDRQ.js} +4 -4
  131. package/chunks/{cron-delete-SL5UJUM3.js → cron-delete-GDX4E26G.js} +4 -4
  132. package/chunks/{cron-list-3MD6SVXI.js → cron-list-USMAIWPT.js} +4 -4
  133. package/chunks/{daemon-ZW6LHOXT.js → daemon-KLPTQIE4.js} +287 -143
  134. package/chunks/{daemon-status-provider-YPV3UXHT.js → daemon-status-provider-67EKK6S3.js} +29 -29
  135. package/chunks/{dist-NUXRQHC5.js → dist-OAV7LJGJ.js} +1 -1
  136. package/chunks/{dist-XLE6ODMB.js → dist-OMW6WDEO.js} +1 -1
  137. package/chunks/{dist-J2H4KTLB.js → dist-PJLG2XYX.js} +1 -1
  138. package/chunks/{dist-IEQSDXS7.js → dist-UIFWIFRO.js} +2 -2
  139. package/chunks/{dist-IGZMVS5R.js → dist-VGJTZL4E.js} +33 -22
  140. package/chunks/{dist-3DQNQJ6H.js → dist-XBJVSWS2.js} +1 -1
  141. package/chunks/{earlyInputCapture-5VDWSYAM.js → earlyInputCapture-7QJX25AC.js} +23 -23
  142. package/chunks/{edit-GORZTX2U.js → edit-BTPQWGAA.js} +23 -23
  143. package/chunks/{enter-worktree-LJB2AW4L.js → enter-worktree-N3SEYKOO.js} +22 -22
  144. package/chunks/{enterPlanMode-LIIPP37T.js → enterPlanMode-TN2JV5MY.js} +28 -23
  145. package/chunks/{environment-HQ2UHJ35.js → environment-HP6RK262.js} +24 -24
  146. package/chunks/{errors-6JD5VMVQ.js → errors-VHGRDDOQ.js} +24 -24
  147. package/chunks/{exit-worktree-IEP2WHOV.js → exit-worktree-FI3SQY3U.js} +22 -22
  148. package/chunks/{exitPlanMode-U5Z6XBLO.js → exitPlanMode-NZWRVIIY.js} +22 -22
  149. package/chunks/{fast-path-HFKNMP23.js → fast-path-EGP7AXNR.js} +3 -2
  150. package/chunks/{gemini-C2SCJH3N.js → gemini-AN5YMD5O.js} +70 -68
  151. package/chunks/{geminiContentGenerator-ADZTXEKV.js → geminiContentGenerator-ABTMU4FE.js} +4 -4
  152. package/chunks/{glob-GOAPGD6G.js → glob-5YABOPJB.js} +22 -22
  153. package/chunks/{grep-HZLSTX7D.js → grep-U67FKUJT.js} +22 -22
  154. package/chunks/{handleAutoUpdate-UF74WGFE.js → handleAutoUpdate-OOKBP5VD.js} +27 -28
  155. package/chunks/{i18n-FMXIYUOC.js → i18n-GMQV324P.js} +23 -23
  156. package/chunks/{initializer-ERDBM3DU.js → initializer-NWALZGQ5.js} +28 -28
  157. package/chunks/{installationInfo-LROMXYLX.js → installationInfo-Y3M433E7.js} +25 -23
  158. package/chunks/{keychain-token-storage-K23CFKGN.js → keychain-token-storage-DWRJMNH3.js} +2 -2
  159. package/chunks/{list-6JPJROU5.js → list-CQDDWHTS.js} +30 -30
  160. package/chunks/{loadedSettingsAdapter-QCWYUBBF.js → loadedSettingsAdapter-I5KG37EI.js} +27 -27
  161. package/chunks/{loop-wakeup-6H7OENTB.js → loop-wakeup-5GLTUBHA.js} +5 -5
  162. package/chunks/{ls-APTSOOS5.js → ls-FHBY3Y7I.js} +4 -4
  163. package/chunks/{lsp-HPACPJAN.js → lsp-B6VMEW6Y.js} +2 -2
  164. package/chunks/{mcp-3P3KWYWO.js → mcp-24HHCBSP.js} +27 -27
  165. package/chunks/{monitor-LMYKCF6R.js → monitor-Z7NZNNRC.js} +22 -22
  166. package/chunks/nonInteractiveCli-GVF2XDJT.js +126 -0
  167. package/chunks/{notebook-edit-IBEOVZ6A.js → notebook-edit-GFOYAQAZ.js} +23 -23
  168. package/chunks/{openaiContentGenerator-42PZKET5.js → openaiContentGenerator-XAAYV6WR.js} +11 -11
  169. package/chunks/{pidfile-VTBDIGOH.js → pidfile-ILI37KRQ.js} +23 -23
  170. package/chunks/{processUtils-L7ZKOGDG.js → processUtils-LIPJMLVZ.js} +2 -2
  171. package/chunks/{qwenContentGenerator-VR2CNFGI.js → qwenContentGenerator-DLJ3KKGZ.js} +24 -24
  172. package/chunks/{qwenOAuth2-6LS2T3Q6.js → qwenOAuth2-J47FU5PW.js} +11 -11
  173. package/chunks/react-SG7JAQSZ.js +8 -0
  174. package/chunks/{read-file-VSKOE22I.js → read-file-LCQ2KNNP.js} +8 -8
  175. package/chunks/{read-mcp-resource-C6NT52T6.js → read-mcp-resource-AKCL7I43.js} +2 -2
  176. package/chunks/{record-artifact-ENCU7QCL.js → record-artifact-PEUB7727.js} +2 -2
  177. package/chunks/resumeHistoryUtils-PSCSAKA6.js +78 -0
  178. package/chunks/{ripGrep-5V5FLW2A.js → ripGrep-Y2XW4EFC.js} +22 -22
  179. package/chunks/{run-qwen-serve-LSOPP4R2.js → run-qwen-serve-DQ5ZIR36.js} +1459 -148
  180. package/chunks/{runtime-LT7R4CS5.js → runtime-6MQFF2A6.js} +33 -31
  181. package/chunks/{scheduler-YOWQ7KZP.js → scheduler-K4S7NY3G.js} +22 -22
  182. package/chunks/{send-message-5GZ4FX2V.js → send-message-3RHE7HSM.js} +3 -3
  183. package/chunks/{serve-VWLBXKGK.js → serve-JFAAPC5J.js} +27 -27
  184. package/chunks/{server-3RW3FYOH.js → server-QB6CHRZN.js} +866 -271
  185. package/chunks/{session-ZONXFOBQ.js → session-FKPVXAAB.js} +79 -163
  186. package/chunks/{settings-JC3VC53L.js → settings-CADELKSU.js} +26 -26
  187. package/chunks/{shell-2NGEMAVM.js → shell-EON6WVVH.js} +22 -22
  188. package/chunks/{skill-3U2T6H3E.js → skill-FKSYXJ5U.js} +10 -10
  189. package/chunks/{spawnChannel-QEAUPARQ.js → spawnChannel-VM5IHLJO.js} +24 -24
  190. package/chunks/{src-75ZPXO7B.js → src-Q4XB6SVD.js} +66 -22
  191. package/chunks/{standalone-update-UUJWJWYY.js → standalone-update-KGZHPBMA.js} +24 -24
  192. package/chunks/{startInteractiveUI-V7XISPQ6.js → startInteractiveUI-EYDJIIIZ.js} +5484 -2045
  193. package/chunks/{syntheticOutput-ULOVVLY4.js → syntheticOutput-FG5PQKIR.js} +3 -3
  194. package/chunks/{task-create-DUE2PMNI.js → task-create-HX32YXO7.js} +7 -7
  195. package/chunks/{task-list-WVPNX7BZ.js → task-list-QWSY4ZIU.js} +5 -5
  196. package/chunks/{task-stop-CPEQWOT6.js → task-stop-GWC6UWAL.js} +2 -2
  197. package/chunks/{task-update-HY2LNFFB.js → task-update-NCTAB73Q.js} +7 -7
  198. package/chunks/{team-create-R6AXDYPG.js → team-create-CYP3YKYT.js} +22 -22
  199. package/chunks/{team-delete-JJV6IUOA.js → team-delete-KK37HTOG.js} +5 -5
  200. package/chunks/{team-plan-approval-O2ZPPT64.js → team-plan-approval-5LXIFKNV.js} +22 -22
  201. package/chunks/{theme-manager-YIX2IC2D.js → theme-manager-QOUMDWMP.js} +23 -23
  202. package/chunks/{todoWrite-JHHIDOIV.js → todoWrite-ERCAMLFS.js} +4 -4
  203. package/chunks/{tool-search-5IE2VO7X.js → tool-search-Q27QHQU3.js} +9 -9
  204. package/chunks/{total-session-admission-K6APQYEF.js → total-session-admission-HWVCZ2WR.js} +25 -25
  205. package/chunks/{trustedFolders-GPSSPVBF.js → trustedFolders-C6664IQC.js} +23 -23
  206. package/chunks/{update-relaunch-4BVAPX6Y.js → update-relaunch-QC3E4FZW.js} +9 -9
  207. package/chunks/{updateCheck-AHTHWLAM.js → updateCheck-MVUKJMBX.js} +33 -26
  208. package/chunks/useAutoAcceptIndicator-J234IFIS.js +80 -0
  209. package/chunks/{validateNonInterActiveAuth-UKAPCWDM.js → validateNonInterActiveAuth-YPPEKX4N.js} +61 -63
  210. package/chunks/{version-EXGWKKQE.js → version-5IXFQ4PT.js} +1 -1
  211. package/chunks/{web-fetch-ZDNE6FF2.js → web-fetch-L62NQVKN.js} +10 -10
  212. package/chunks/{workflow-G7U6OQWS.js → workflow-6MHBBFQU.js} +23 -23
  213. package/chunks/{workspace-providers-status-W6CEA6YM.js → workspace-providers-status-ZTW2B5QU.js} +30 -30
  214. package/chunks/{workspace-registration-store-OGBMWCLC.js → workspace-registration-store-P6QHCSMU.js} +7 -1
  215. package/chunks/{workspace-registry-ZUWQM44P.js → workspace-registry-R54M5O3W.js} +25 -25
  216. package/chunks/{workspace-service-UXX5P7GU.js → workspace-service-WYLRGM4A.js} +32 -32
  217. package/chunks/{workspace-skills-status-635B5R7N.js → workspace-skills-status-NN5QFU3A.js} +28 -28
  218. package/chunks/{write-file-DR3HN7IH.js → write-file-EAT3CHUK.js} +23 -23
  219. package/cli.js +11 -11
  220. package/locales/ca.js +763 -201
  221. package/package.json +3 -3
  222. package/web-shell/assets/{arc-_dVIKMdB.js → arc-B0iTWRo2.js} +1 -1
  223. package/web-shell/assets/{architectureDiagram-3BPJPVTR-MuN3nKpL.js → architectureDiagram-3BPJPVTR-DSQP4-9D.js} +1 -1
  224. package/web-shell/assets/{blockDiagram-GPEHLZMM-BtmvJjzx.js → blockDiagram-GPEHLZMM-BNPVXVT3.js} +1 -1
  225. package/web-shell/assets/{c4Diagram-AAUBKEIU-Dvi58_BU.js → c4Diagram-AAUBKEIU-DEHfJFiD.js} +1 -1
  226. package/web-shell/assets/channel-tVz-qNSq.js +1 -0
  227. package/web-shell/assets/{chunk-2J33WTMH-YqxOVhS1.js → chunk-2J33WTMH-VZ0uL1p9.js} +1 -1
  228. package/web-shell/assets/{chunk-4BX2VUAB-DoBgbC9z.js → chunk-4BX2VUAB-D5TKmvwG.js} +1 -1
  229. package/web-shell/assets/{chunk-55IACEB6-3NEQrBAr.js → chunk-55IACEB6-BDW1Lcq-.js} +1 -1
  230. package/web-shell/assets/{chunk-727SXJPM-DrCZQxp0.js → chunk-727SXJPM-Cj4h85iM.js} +1 -1
  231. package/web-shell/assets/{chunk-AQP2D5EJ-m_g3zjgv.js → chunk-AQP2D5EJ-5LeqiOhZ.js} +1 -1
  232. package/web-shell/assets/{chunk-FMBD7UC4-D1_crABJ.js → chunk-FMBD7UC4-BaTgsco7.js} +1 -1
  233. package/web-shell/assets/{chunk-ND2GUHAM-BdhgVtBx.js → chunk-ND2GUHAM-t3uGlIUk.js} +1 -1
  234. package/web-shell/assets/{chunk-QZHKN3VN-BlmThhm-.js → chunk-QZHKN3VN-rOnNXL2Q.js} +1 -1
  235. package/web-shell/assets/classDiagram-4FO5ZUOK-CWuaBxYV.js +1 -0
  236. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-CWuaBxYV.js +1 -0
  237. package/web-shell/assets/{cose-bilkent-S5V4N54A-Cbjm_00Z.js → cose-bilkent-S5V4N54A-CcqXykgA.js} +1 -1
  238. package/web-shell/assets/{dagre-BM42HDAG-C39QNVgC.js → dagre-BM42HDAG-Dkjrchoy.js} +1 -1
  239. package/web-shell/assets/{diagram-2AECGRRQ-DNXSAixC.js → diagram-2AECGRRQ-B6lcra9M.js} +1 -1
  240. package/web-shell/assets/{diagram-5GNKFQAL-BCbGUPEA.js → diagram-5GNKFQAL-bAIzq3PT.js} +1 -1
  241. package/web-shell/assets/{diagram-KO2AKTUF-1eujKSDC.js → diagram-KO2AKTUF-G9MAZDNW.js} +1 -1
  242. package/web-shell/assets/{diagram-LMA3HP47-DUMKXgql.js → diagram-LMA3HP47-DVLF1uWZ.js} +1 -1
  243. package/web-shell/assets/{diagram-OG6HWLK6-BFktU3_u.js → diagram-OG6HWLK6-Cf7y20Tc.js} +1 -1
  244. package/web-shell/assets/{erDiagram-TEJ5UH35-BvJC7DLk.js → erDiagram-TEJ5UH35-C7ETZB3o.js} +1 -1
  245. package/web-shell/assets/{flowDiagram-I6XJVG4X-Cgu3PlOt.js → flowDiagram-I6XJVG4X-Cl2xgL6J.js} +1 -1
  246. package/web-shell/assets/{ganttDiagram-6RSMTGT7-DLNXN5Xh.js → ganttDiagram-6RSMTGT7-BgjbMs3q.js} +1 -1
  247. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-BQFRDv6R.js → gitGraphDiagram-PVQCEYII-JVX34Omm.js} +1 -1
  248. package/web-shell/assets/index-48bIcdqF.js +1197 -0
  249. package/web-shell/assets/{index-CdC3pjP3.js → index-BG7Zc4f_.js} +1 -1
  250. package/web-shell/assets/index-BI-JAO07.css +5 -0
  251. package/web-shell/assets/{infoDiagram-5YYISTIA-DT2mOSvp.js → infoDiagram-5YYISTIA-3NYyMeZU.js} +1 -1
  252. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-9fy_K4bd.js → ishikawaDiagram-YF4QCWOH-C03VCu-U.js} +1 -1
  253. package/web-shell/assets/{journeyDiagram-JHISSGLW-CoGSEuhE.js → journeyDiagram-JHISSGLW-C9PuBRZW.js} +1 -1
  254. package/web-shell/assets/{kanban-definition-UN3LZRKU-BP9hHYIj.js → kanban-definition-UN3LZRKU-C3LvioWR.js} +1 -1
  255. package/web-shell/assets/{linear-uIroDsmp.js → linear-Du6Yw8N_.js} +1 -1
  256. package/web-shell/assets/{mermaid.core-BUwoStsA.js → mermaid.core-BXY5D2-X.js} +5 -5
  257. package/web-shell/assets/{mindmap-definition-RKZ34NQL-DZB-FWim.js → mindmap-definition-RKZ34NQL-2UrHLaDp.js} +1 -1
  258. package/web-shell/assets/{pieDiagram-4H26LBE5-YPptloKl.js → pieDiagram-4H26LBE5-dC03ml45.js} +1 -1
  259. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-dgk3DSzm.js → quadrantDiagram-W4KKPZXB-CD6jARrp.js} +1 -1
  260. package/web-shell/assets/{requirementDiagram-4Y6WPE33-BH2En2i9.js → requirementDiagram-4Y6WPE33-BrK8aXfv.js} +1 -1
  261. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-BB98feeI.js → sankeyDiagram-5OEKKPKP-B5Vitki_.js} +1 -1
  262. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-CunAIGh8.js → sequenceDiagram-3UESZ5HK-CBy2t6Bo.js} +1 -1
  263. package/web-shell/assets/{stateDiagram-AJRCARHV-DTJs_-I2.js → stateDiagram-AJRCARHV-Enrka6T2.js} +1 -1
  264. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-DUtYfXpW.js +1 -0
  265. package/web-shell/assets/{timeline-definition-PNZ67QCA-Cd4AN7O0.js → timeline-definition-PNZ67QCA-CwFq78ss.js} +1 -1
  266. package/web-shell/assets/{vennDiagram-CIIHVFJN-xIG-rUU9.js → vennDiagram-CIIHVFJN-BkOidM0g.js} +1 -1
  267. package/web-shell/assets/{wardley-L42UT6IY-D1UyjIcG.js → wardley-L42UT6IY-D_j13hQW.js} +1 -1
  268. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-BVM0Mb99.js → wardleyDiagram-YWT4CUSO-7EveB1w6.js} +1 -1
  269. package/web-shell/assets/{xychartDiagram-2RQKCTM6-BX31JDSz.js → xychartDiagram-2RQKCTM6-DRkBhMXr.js} +1 -1
  270. package/web-shell/index.html +2 -2
  271. package/chunks/chunk-EDFD7VOX.js +0 -368
  272. package/chunks/chunk-GFYFLDEG.js +0 -709
  273. package/chunks/chunk-LUJQUNKY.js +0 -3288
  274. package/chunks/nonInteractiveCli-YURFHZV5.js +0 -129
  275. package/web-shell/assets/channel-Bi5TehaT.js +0 -1
  276. package/web-shell/assets/classDiagram-4FO5ZUOK-BKhhRdd1.js +0 -1
  277. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-BKhhRdd1.js +0 -1
  278. package/web-shell/assets/index-C_ouplMQ.js +0 -1187
  279. package/web-shell/assets/index-XGDFJE-X.css +0 -5
  280. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-DrfFMYta.js +0 -1
@@ -1,709 +0,0 @@
1
- // Force strict mode and setup for ESM
2
- "use strict";
3
- import {
4
- getEffectiveSupportedModes
5
- } from "./chunk-MRE77ST5.js";
6
- import {
7
- require_jsx_runtime
8
- } from "./chunk-GEHSF7MS.js";
9
- import {
10
- getCachedStringWidth
11
- } from "./chunk-J6NT5YTN.js";
12
- import {
13
- require_react
14
- } from "./chunk-HTHUX2T5.js";
15
- import {
16
- uiTelemetryService
17
- } from "./chunk-CPU6I5YV.js";
18
- import {
19
- init_esbuild_shims
20
- } from "./chunk-5O2XNYP6.js";
21
- import {
22
- __name,
23
- __toESM
24
- } from "./chunk-J2S4EL5Y.js";
25
-
26
- // packages/cli/src/ui/contexts/SessionContext.tsx
27
- init_esbuild_shims();
28
- var import_react = __toESM(require_react(), 1);
29
- var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
30
- var EMPTY_SKILL_METRICS = {
31
- totalCalls: 0,
32
- totalSuccess: 0,
33
- totalFail: 0,
34
- byName: {}
35
- };
36
- function areModelMetricsCoreEqual(a, b) {
37
- if (a.api.totalRequests !== b.api.totalRequests || a.api.totalErrors !== b.api.totalErrors || a.api.totalLatencyMs !== b.api.totalLatencyMs) {
38
- return false;
39
- }
40
- if (a.tokens.prompt !== b.tokens.prompt || a.tokens.candidates !== b.tokens.candidates || a.tokens.total !== b.tokens.total || a.tokens.cached !== b.tokens.cached || a.tokens.thoughts !== b.tokens.thoughts) {
41
- return false;
42
- }
43
- return true;
44
- }
45
- __name(areModelMetricsCoreEqual, "areModelMetricsCoreEqual");
46
- function areModelMetricsEqual(a, b) {
47
- if (!areModelMetricsCoreEqual(a, b)) return false;
48
- const aKeys = Object.keys(a.bySource);
49
- const bKeys = Object.keys(b.bySource);
50
- if (aKeys.length !== bKeys.length) return false;
51
- for (const key of aKeys) {
52
- const aSource = a.bySource[key];
53
- const bSource = b.bySource[key];
54
- if (!bSource || !areModelMetricsCoreEqual(aSource, bSource)) {
55
- return false;
56
- }
57
- }
58
- return true;
59
- }
60
- __name(areModelMetricsEqual, "areModelMetricsEqual");
61
- function areToolCallStatsEqual(a, b) {
62
- if (a.count !== b.count || a.success !== b.success || a.fail !== b.fail || a.durationMs !== b.durationMs) {
63
- return false;
64
- }
65
- if (a.decisions["accept" /* ACCEPT */] !== b.decisions["accept" /* ACCEPT */] || a.decisions["reject" /* REJECT */] !== b.decisions["reject" /* REJECT */] || a.decisions["modify" /* MODIFY */] !== b.decisions["modify" /* MODIFY */] || a.decisions["auto_accept" /* AUTO_ACCEPT */] !== b.decisions["auto_accept" /* AUTO_ACCEPT */]) {
66
- return false;
67
- }
68
- return true;
69
- }
70
- __name(areToolCallStatsEqual, "areToolCallStatsEqual");
71
- function areSkillCallStatsEqual(a, b) {
72
- return a.count === b.count && a.success === b.success && a.fail === b.fail;
73
- }
74
- __name(areSkillCallStatsEqual, "areSkillCallStatsEqual");
75
- function areSkillMetricsEqual(a, b) {
76
- if (a.totalCalls !== b.totalCalls || a.totalSuccess !== b.totalSuccess || a.totalFail !== b.totalFail) {
77
- return false;
78
- }
79
- const aKeys = Object.keys(a.byName);
80
- const bKeys = Object.keys(b.byName);
81
- if (aKeys.length !== bKeys.length) return false;
82
- for (const key of aKeys) {
83
- const skillA = a.byName[key];
84
- const skillB = b.byName[key];
85
- if (!skillB || !areSkillCallStatsEqual(skillA, skillB)) {
86
- return false;
87
- }
88
- }
89
- return true;
90
- }
91
- __name(areSkillMetricsEqual, "areSkillMetricsEqual");
92
- function areMetricsEqual(a, b) {
93
- if (a === b) return true;
94
- if (!a || !b) return false;
95
- if (a.files.totalLinesAdded !== b.files.totalLinesAdded || a.files.totalLinesRemoved !== b.files.totalLinesRemoved) {
96
- return false;
97
- }
98
- const toolsA = a.tools;
99
- const toolsB = b.tools;
100
- if (toolsA.totalCalls !== toolsB.totalCalls || toolsA.totalSuccess !== toolsB.totalSuccess || toolsA.totalFail !== toolsB.totalFail || toolsA.totalDurationMs !== toolsB.totalDurationMs) {
101
- return false;
102
- }
103
- if (toolsA.totalDecisions["accept" /* ACCEPT */] !== toolsB.totalDecisions["accept" /* ACCEPT */] || toolsA.totalDecisions["reject" /* REJECT */] !== toolsB.totalDecisions["reject" /* REJECT */] || toolsA.totalDecisions["modify" /* MODIFY */] !== toolsB.totalDecisions["modify" /* MODIFY */] || toolsA.totalDecisions["auto_accept" /* AUTO_ACCEPT */] !== toolsB.totalDecisions["auto_accept" /* AUTO_ACCEPT */]) {
104
- return false;
105
- }
106
- const toolsByNameAKeys = Object.keys(toolsA.byName);
107
- const toolsByNameBKeys = Object.keys(toolsB.byName);
108
- if (toolsByNameAKeys.length !== toolsByNameBKeys.length) return false;
109
- for (const key of toolsByNameAKeys) {
110
- const toolA = toolsA.byName[key];
111
- const toolB = toolsB.byName[key];
112
- if (!toolB || !areToolCallStatsEqual(toolA, toolB)) {
113
- return false;
114
- }
115
- }
116
- if (!areSkillMetricsEqual(
117
- a.skills ?? EMPTY_SKILL_METRICS,
118
- b.skills ?? EMPTY_SKILL_METRICS
119
- )) {
120
- return false;
121
- }
122
- const modelsAKeys = Object.keys(a.models);
123
- const modelsBKeys = Object.keys(b.models);
124
- if (modelsAKeys.length !== modelsBKeys.length) return false;
125
- for (const key of modelsAKeys) {
126
- if (!b.models[key] || !areModelMetricsEqual(a.models[key], b.models[key])) {
127
- return false;
128
- }
129
- }
130
- return true;
131
- }
132
- __name(areMetricsEqual, "areMetricsEqual");
133
- function cloneSessionMetrics(metrics) {
134
- return {
135
- models: Object.fromEntries(
136
- Object.entries(metrics.models).map(([name, model]) => [
137
- name,
138
- {
139
- api: { ...model.api },
140
- tokens: { ...model.tokens },
141
- bySource: Object.fromEntries(
142
- Object.entries(model.bySource).map(([source, sourceMetrics]) => [
143
- source,
144
- {
145
- api: { ...sourceMetrics.api },
146
- tokens: { ...sourceMetrics.tokens }
147
- }
148
- ])
149
- )
150
- }
151
- ])
152
- ),
153
- tools: {
154
- totalCalls: metrics.tools.totalCalls,
155
- totalSuccess: metrics.tools.totalSuccess,
156
- totalFail: metrics.tools.totalFail,
157
- totalDurationMs: metrics.tools.totalDurationMs,
158
- totalDecisions: { ...metrics.tools.totalDecisions },
159
- byName: Object.fromEntries(
160
- Object.entries(metrics.tools.byName).map(([name, stats]) => [
161
- name,
162
- {
163
- count: stats.count,
164
- success: stats.success,
165
- fail: stats.fail,
166
- durationMs: stats.durationMs,
167
- decisions: { ...stats.decisions }
168
- }
169
- ])
170
- )
171
- },
172
- files: {
173
- totalLinesAdded: metrics.files.totalLinesAdded,
174
- totalLinesRemoved: metrics.files.totalLinesRemoved
175
- },
176
- ...metrics.skills ? {
177
- skills: {
178
- totalCalls: metrics.skills.totalCalls,
179
- totalSuccess: metrics.skills.totalSuccess,
180
- totalFail: metrics.skills.totalFail,
181
- byName: Object.fromEntries(
182
- Object.entries(metrics.skills.byName).map(([name, stats]) => [
183
- name,
184
- {
185
- count: stats.count,
186
- success: stats.success,
187
- fail: stats.fail
188
- }
189
- ])
190
- )
191
- }
192
- } : {}
193
- };
194
- }
195
- __name(cloneSessionMetrics, "cloneSessionMetrics");
196
- function getMetricsForDisplay(sessionId) {
197
- return cloneSessionMetrics(
198
- sessionId ? uiTelemetryService.getMetricsForSession(sessionId) : uiTelemetryService.getMetrics()
199
- );
200
- }
201
- __name(getMetricsForDisplay, "getMetricsForDisplay");
202
- var SessionStatsContext = (0, import_react.createContext)(
203
- void 0
204
- );
205
- var createDefaultStats = /* @__PURE__ */ __name((sessionId = "") => ({
206
- sessionId,
207
- sessionStartTime: /* @__PURE__ */ new Date(),
208
- metrics: getMetricsForDisplay(sessionId),
209
- lastPromptTokenCount: 0,
210
- promptCount: 0
211
- }), "createDefaultStats");
212
- var SessionStatsProvider = /* @__PURE__ */ __name(({ sessionId, children }) => {
213
- const [stats, setStats] = (0, import_react.useState)(
214
- () => createDefaultStats(sessionId ?? "")
215
- );
216
- (0, import_react.useEffect)(() => {
217
- const handleUpdate = /* @__PURE__ */ __name(({
218
- metrics,
219
- lastPromptTokenCount
220
- }) => {
221
- setStats((prevState) => {
222
- const nextMetrics = prevState.sessionId ? getMetricsForDisplay(prevState.sessionId) : cloneSessionMetrics(metrics);
223
- if (prevState.lastPromptTokenCount === lastPromptTokenCount && areMetricsEqual(prevState.metrics, nextMetrics)) {
224
- return prevState;
225
- }
226
- return {
227
- ...prevState,
228
- metrics: nextMetrics,
229
- lastPromptTokenCount
230
- };
231
- });
232
- }, "handleUpdate");
233
- uiTelemetryService.on("update", handleUpdate);
234
- handleUpdate({
235
- metrics: uiTelemetryService.getMetrics(),
236
- lastPromptTokenCount: uiTelemetryService.getLastPromptTokenCount()
237
- });
238
- return () => {
239
- uiTelemetryService.off("update", handleUpdate);
240
- };
241
- }, []);
242
- const startNewSession = (0, import_react.useCallback)((sessionId2) => {
243
- setStats(() => ({
244
- ...createDefaultStats(sessionId2),
245
- lastPromptTokenCount: uiTelemetryService.getLastPromptTokenCount()
246
- }));
247
- }, []);
248
- const startNewPrompt = (0, import_react.useCallback)(() => {
249
- setStats((prevState) => ({
250
- ...prevState,
251
- promptCount: prevState.promptCount + 1
252
- }));
253
- }, []);
254
- const getPromptCount = (0, import_react.useCallback)(
255
- () => stats.promptCount,
256
- [stats.promptCount]
257
- );
258
- const seedPromptCount = (0, import_react.useCallback)((count) => {
259
- setStats((prevState) => ({
260
- ...prevState,
261
- promptCount: Math.max(prevState.promptCount, count)
262
- }));
263
- }, []);
264
- const value = (0, import_react.useMemo)(
265
- () => ({
266
- stats,
267
- startNewSession,
268
- startNewPrompt,
269
- getPromptCount,
270
- seedPromptCount
271
- }),
272
- [stats, startNewSession, startNewPrompt, getPromptCount, seedPromptCount]
273
- );
274
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SessionStatsContext.Provider, { value, children });
275
- }, "SessionStatsProvider");
276
- var useSessionStats = /* @__PURE__ */ __name(() => {
277
- const context = (0, import_react.useContext)(SessionStatsContext);
278
- if (context === void 0) {
279
- throw new Error(
280
- "useSessionStats must be used within a SessionStatsProvider"
281
- );
282
- }
283
- return context;
284
- }, "useSessionStats");
285
-
286
- // packages/cli/src/services/commandMetadata.ts
287
- init_esbuild_shims();
288
- function getCommandSourceBadge(command) {
289
- switch (command.source) {
290
- case "bundled-skill":
291
- return "[Skill]";
292
- case "skill-dir-command":
293
- if (command.sourceDetail === "user") {
294
- return "[User]";
295
- }
296
- if (command.sourceDetail === "project") {
297
- return "[Project]";
298
- }
299
- return "[Custom]";
300
- case "plugin-command":
301
- return command.sourceDetail === "extension" ? "[Extension]" : "[Plugin]";
302
- case "mcp-prompt":
303
- return "[MCP]";
304
- case "builtin-command":
305
- default:
306
- return null;
307
- }
308
- }
309
- __name(getCommandSourceBadge, "getCommandSourceBadge");
310
- function getCommandSourceGroup(command) {
311
- switch (command.source) {
312
- case "builtin-command":
313
- return { key: "built-in", title: "Built-in Commands", order: 0 };
314
- case "bundled-skill":
315
- return { key: "bundled-skill", title: "Bundled Skills", order: 1 };
316
- case "skill-dir-command":
317
- return { key: "custom", title: "Custom Commands", order: 2 };
318
- case "plugin-command":
319
- return { key: "plugin", title: "Plugin Commands", order: 3 };
320
- case "mcp-prompt":
321
- return { key: "mcp", title: "MCP Commands", order: 4 };
322
- default:
323
- return { key: "other", title: "Other Commands", order: 5 };
324
- }
325
- }
326
- __name(getCommandSourceGroup, "getCommandSourceGroup");
327
- function formatSupportedModes(command) {
328
- const modes = getEffectiveSupportedModes(command);
329
- const hasInteractive = modes.includes("interactive");
330
- const hasNonInteractive = modes.includes("non_interactive");
331
- const hasAcp = modes.includes("acp");
332
- if (hasInteractive && hasNonInteractive && hasAcp) {
333
- return "[all]";
334
- }
335
- if (!hasInteractive && hasNonInteractive && hasAcp) {
336
- return "[headless]";
337
- }
338
- if (hasInteractive && !hasNonInteractive && !hasAcp) {
339
- return "[interactive]";
340
- }
341
- return modes.map((mode) => {
342
- switch (mode) {
343
- case "interactive":
344
- return "[i]";
345
- case "non_interactive":
346
- return "[ni]";
347
- case "acp":
348
- return "[acp]";
349
- default:
350
- return `[${mode}]`;
351
- }
352
- }).join(" ");
353
- }
354
- __name(formatSupportedModes, "formatSupportedModes");
355
- function getCommandDisplayName(command, options = {}) {
356
- const prefix = options.prefix ?? "";
357
- const baseLabel = `${prefix}${command.name}`;
358
- if (options.matchedAlias) {
359
- return `${baseLabel} (alias: ${options.matchedAlias})`;
360
- }
361
- if (options.includeAliases === false) {
362
- return baseLabel;
363
- }
364
- const altNames = command.altNames?.filter(Boolean);
365
- if (!altNames || altNames.length === 0) {
366
- return baseLabel;
367
- }
368
- return `${baseLabel} (${altNames.join(", ")})`;
369
- }
370
- __name(getCommandDisplayName, "getCommandDisplayName");
371
- function getCommandSubcommandNames(command) {
372
- return command.subCommands?.filter((subCommand) => !subCommand.hidden).map((subCommand) => subCommand.name) ?? [];
373
- }
374
- __name(getCommandSubcommandNames, "getCommandSubcommandNames");
375
-
376
- // packages/cli/src/ui/utils/pending-rendered-height.ts
377
- init_esbuild_shims();
378
- var TABLE_CHROME_ROWS = 5;
379
- var TABLE_MAX_ROW_LINES = 4;
380
- var TABLE_ROW_RE = /^\s*\|(.+)\|\s*$/;
381
- var TABLE_SEPARATOR_RE = /^(?=.*\|)\s*\|?\s*(:?-+:?)\s*(\|\s*(:?-+:?)\s*)*\|?\s*$/;
382
- var CODE_FENCE_RE = /^ *(`{3,}|~{3,}) *([^`]*)$/;
383
- var INLINE_MATH_MAX_CHARS = 1024;
384
- var TABLE_INLINE_MATH_SPAN_RE = new RegExp(
385
- String.raw`(?<![\w$])\$(?![\s\d$])(?=[^$\n]{1,${INLINE_MATH_MAX_CHARS}}\S\$)[^$\n]{1,${INLINE_MATH_MAX_CHARS}}\$(?![\w$])`,
386
- "y"
387
- );
388
- function readTableInlineMathSpan(row, index) {
389
- TABLE_INLINE_MATH_SPAN_RE.lastIndex = index;
390
- return TABLE_INLINE_MATH_SPAN_RE.exec(row)?.[0] ?? null;
391
- }
392
- __name(readTableInlineMathSpan, "readTableInlineMathSpan");
393
- function splitMarkdownTableRow(row) {
394
- const cells = [];
395
- let current = "";
396
- let activeCodeFenceLength = 0;
397
- for (let index = 0; index < row.length; index++) {
398
- const char = row[index];
399
- if (char === "\\") {
400
- const next = row[index + 1];
401
- if (next === "|") {
402
- current += "|";
403
- index += 1;
404
- continue;
405
- }
406
- current += char;
407
- continue;
408
- }
409
- if (char === "`") {
410
- let runLength = 1;
411
- while (row[index + runLength] === "`") {
412
- runLength += 1;
413
- }
414
- if (activeCodeFenceLength === 0) {
415
- activeCodeFenceLength = runLength;
416
- } else if (runLength === activeCodeFenceLength) {
417
- activeCodeFenceLength = 0;
418
- }
419
- current += "`".repeat(runLength);
420
- index += runLength - 1;
421
- continue;
422
- }
423
- if (char === "$" && activeCodeFenceLength === 0) {
424
- const mathSpan = readTableInlineMathSpan(row, index);
425
- if (mathSpan) {
426
- current += mathSpan;
427
- index += mathSpan.length - 1;
428
- continue;
429
- }
430
- }
431
- if (char === "|" && activeCodeFenceLength === 0) {
432
- cells.push(current.trim());
433
- current = "";
434
- continue;
435
- }
436
- current += char;
437
- }
438
- cells.push(current.trim());
439
- return cells;
440
- }
441
- __name(splitMarkdownTableRow, "splitMarkdownTableRow");
442
- function estimateWrappedRows(line, width) {
443
- if (width <= 0) return 1;
444
- return Math.max(1, Math.ceil(getCachedStringWidth(line) / width));
445
- }
446
- __name(estimateWrappedRows, "estimateWrappedRows");
447
- function isTableStart(lines, i) {
448
- const header = lines[i];
449
- if (header === void 0 || i + 1 >= lines.length) return false;
450
- const headerMatch = TABLE_ROW_RE.exec(header);
451
- if (!headerMatch) return false;
452
- const separator = lines[i + 1];
453
- if (!TABLE_SEPARATOR_RE.test(separator)) return false;
454
- const headerCols = splitMarkdownTableRow(headerMatch[1]).length;
455
- const sepCols = splitMarkdownTableRow(separator).filter(
456
- (cell) => cell.length > 0
457
- ).length;
458
- return headerCols === sepCols;
459
- }
460
- __name(isTableStart, "isTableStart");
461
- function fitPendingSlice(allLines, contentWidth, budget, tableClampRows) {
462
- let rendered = 0;
463
- let kept = allLines.length;
464
- let codeFence = "";
465
- for (let i = 0; i < allLines.length; ) {
466
- const line = allLines[i];
467
- const fenceMatch = CODE_FENCE_RE.exec(line);
468
- if (codeFence) {
469
- if (fenceMatch && fenceMatch[1].startsWith(codeFence[0]) && fenceMatch[1].length >= codeFence.length) {
470
- codeFence = "";
471
- }
472
- rendered += estimateWrappedRows(line, contentWidth);
473
- if (rendered > budget) {
474
- kept = i;
475
- break;
476
- }
477
- i++;
478
- continue;
479
- }
480
- if (fenceMatch) {
481
- codeFence = fenceMatch[1];
482
- rendered += estimateWrappedRows(line, contentWidth);
483
- if (rendered > budget) {
484
- kept = i;
485
- break;
486
- }
487
- i++;
488
- continue;
489
- }
490
- if (isTableStart(allLines, i)) {
491
- let j = i + 2;
492
- while (j < allLines.length && TABLE_ROW_RE.test(allLines[j])) j++;
493
- const dataRows = j - (i + 2);
494
- const headerCells = splitMarkdownTableRow(
495
- TABLE_ROW_RE.exec(allLines[i])[1]
496
- );
497
- const colCount = headerCells.length;
498
- const minHorizontalWidth = Math.max(24, 6 * colCount + 5);
499
- const perColWidth = Math.max(
500
- 3,
501
- Math.floor((contentWidth - (1 + 3 * colCount) - 4) / colCount)
502
- );
503
- let contentRows = 0;
504
- let verticalRows = 0;
505
- let maxRowLines = 1;
506
- for (const label of headerCells) {
507
- maxRowLines = Math.max(
508
- maxRowLines,
509
- estimateWrappedRows(label, perColWidth)
510
- );
511
- }
512
- contentRows += maxRowLines;
513
- for (let r = i + 2; r < j; r++) {
514
- const cells = splitMarkdownTableRow(
515
- TABLE_ROW_RE.exec(allLines[r])[1]
516
- );
517
- let rowMax = 1;
518
- for (let colIdx = 0; colIdx < cells.length; colIdx++) {
519
- const value = cells[colIdx];
520
- rowMax = Math.max(rowMax, estimateWrappedRows(value, perColWidth));
521
- const label = headerCells[colIdx] ?? "";
522
- verticalRows += estimateWrappedRows(
523
- label ? `${label}: ${value}` : value,
524
- contentWidth
525
- );
526
- }
527
- contentRows += rowMax;
528
- if (r === i + 2) {
529
- maxRowLines = Math.max(maxRowLines, rowMax);
530
- }
531
- }
532
- const usesVertical = dataRows > 0 && (contentWidth < minHorizontalWidth || maxRowLines > TABLE_MAX_ROW_LINES);
533
- const rows = usesVertical ? verticalRows + Math.max(0, dataRows - 1) + 2 : contentRows + Math.max(0, dataRows - 1) + TABLE_CHROME_ROWS;
534
- const cost = Math.min(rows, tableClampRows + 2);
535
- if (rendered + cost > budget && i > 0) {
536
- kept = i;
537
- break;
538
- }
539
- rendered += cost;
540
- i = j;
541
- if (rendered >= budget) {
542
- kept = j;
543
- break;
544
- }
545
- } else {
546
- rendered += estimateWrappedRows(line, contentWidth);
547
- if (rendered > budget) {
548
- kept = i;
549
- break;
550
- }
551
- i++;
552
- }
553
- }
554
- return { keptLines: kept, clipped: kept < allLines.length };
555
- }
556
- __name(fitPendingSlice, "fitPendingSlice");
557
-
558
- // packages/cli/src/ui/utils/markdownUtilities.ts
559
- init_esbuild_shims();
560
- var findNextFence = /* @__PURE__ */ __name((content, from) => {
561
- const backtick = content.indexOf("```", from);
562
- const tilde = content.indexOf("~~~", from);
563
- if (backtick === -1 && tilde === -1) return null;
564
- let index;
565
- let char;
566
- if (tilde === -1 || backtick !== -1 && backtick < tilde) {
567
- index = backtick;
568
- char = "`";
569
- } else {
570
- index = tilde;
571
- char = "~";
572
- }
573
- let length = 0;
574
- while (content[index + length] === char) length++;
575
- return { index, char, length };
576
- }, "findNextFence");
577
- var getEnclosingFence = /* @__PURE__ */ __name((content, indexToTest) => {
578
- let open = null;
579
- let searchPos = 0;
580
- while (searchPos < content.length) {
581
- const fence = findNextFence(content, searchPos);
582
- if (!fence || fence.index >= indexToTest) break;
583
- if (!open) {
584
- open = { char: fence.char, len: fence.length, index: fence.index };
585
- } else if (fence.char === open.char && fence.length >= open.len) {
586
- open = null;
587
- }
588
- searchPos = fence.index + fence.length;
589
- }
590
- if (!open) return null;
591
- const newlineIndex = content.indexOf("\n", open.index);
592
- const fenceLineEnd = newlineIndex === -1 ? content.length : newlineIndex;
593
- return {
594
- startIndex: open.index,
595
- delimiter: content.slice(open.index, open.index + open.len),
596
- infoString: content.slice(open.index + open.len, fenceLineEnd)
597
- };
598
- }, "getEnclosingFence");
599
- var isIndexInsideCodeBlock = /* @__PURE__ */ __name((content, index) => getEnclosingFence(content, index) !== null, "isIndexInsideCodeBlock");
600
- var findEnclosingCodeBlockStart = /* @__PURE__ */ __name((content, index) => getEnclosingFence(content, index)?.startIndex ?? -1, "findEnclosingCodeBlockStart");
601
- var getEnclosingFenceInfo = /* @__PURE__ */ __name((content, index) => {
602
- const fence = getEnclosingFence(content, index);
603
- return fence ? parseCodeFenceInfo(fence.infoString) : null;
604
- }, "getEnclosingFenceInfo");
605
- var findLastSafeSplitPoint = /* @__PURE__ */ __name((content, idealMaxLength) => {
606
- const hasLengthCap = idealMaxLength !== void 0;
607
- const searchEnd = hasLengthCap ? Math.min(Math.max(idealMaxLength, 0), content.length) : content.length;
608
- if (hasLengthCap && content.length <= searchEnd) {
609
- return content.length;
610
- }
611
- const enclosingBlockStart = findEnclosingCodeBlockStart(content, searchEnd);
612
- if (enclosingBlockStart !== -1) {
613
- return hasLengthCap && enclosingBlockStart === 0 ? searchEnd : enclosingBlockStart;
614
- }
615
- let searchStartIndex = searchEnd;
616
- while (searchStartIndex >= 0) {
617
- const dnlIndex = content.lastIndexOf("\n\n", searchStartIndex);
618
- if (dnlIndex === -1) {
619
- break;
620
- }
621
- const potentialSplitPoint = dnlIndex + 2;
622
- if (potentialSplitPoint <= searchEnd && !isIndexInsideCodeBlock(content, potentialSplitPoint)) {
623
- return potentialSplitPoint;
624
- }
625
- searchStartIndex = dnlIndex - 1;
626
- }
627
- if (hasLengthCap) {
628
- searchStartIndex = searchEnd;
629
- while (searchStartIndex >= 0) {
630
- const nlIndex = content.lastIndexOf("\n", searchStartIndex);
631
- if (nlIndex === -1) {
632
- break;
633
- }
634
- const potentialSplitPoint = nlIndex + 1;
635
- if (potentialSplitPoint <= searchEnd && !isIndexInsideCodeBlock(content, potentialSplitPoint)) {
636
- return potentialSplitPoint;
637
- }
638
- searchStartIndex = nlIndex - 1;
639
- }
640
- }
641
- return hasLengthCap ? searchEnd : content.length;
642
- }, "findLastSafeSplitPoint");
643
- var START_LINE_DIRECTIVE_RE = /\s*\bqwen-code:start-line=(\d+)\b/;
644
- var parseCodeFenceInfo = /* @__PURE__ */ __name((info) => {
645
- const raw = info ?? "";
646
- const directive = raw.match(START_LINE_DIRECTIVE_RE);
647
- const startLine = directive ? Math.max(1, Number(directive[1])) : 1;
648
- const lang = raw.replace(START_LINE_DIRECTIVE_RE, "").trim().split(/\s+/)[0];
649
- return { lang: lang || null, startLine };
650
- }, "parseCodeFenceInfo");
651
- var countHeadContentLines = /* @__PURE__ */ __name((content, fenceStartIndex, splitPoint) => {
652
- const headFromFence = content.slice(fenceStartIndex, splitPoint);
653
- const newlineCount = (headFromFence.match(/\n/g) || []).length;
654
- return headFromFence.endsWith("\n") ? newlineCount - 1 : newlineCount;
655
- }, "countHeadContentLines");
656
- var splitFencedMarkdown = /* @__PURE__ */ __name((content, splitPoint) => {
657
- const before = content.slice(0, splitPoint);
658
- const after = content.slice(splitPoint);
659
- if (splitPoint <= 0 || splitPoint >= content.length) {
660
- return { before, after };
661
- }
662
- const fence = getEnclosingFence(content, splitPoint);
663
- if (!fence) {
664
- return { before, after };
665
- }
666
- const closingFence = fence.delimiter;
667
- const { startLine: headStart } = parseCodeFenceInfo(fence.infoString);
668
- const tailStart = headStart + countHeadContentLines(content, fence.startIndex, splitPoint);
669
- const baseInfo = fence.infoString.replace(START_LINE_DIRECTIVE_RE, "").replace(/\s+$/, "");
670
- const directive = `qwen-code:start-line=${tailStart}`;
671
- const reopeningFence = `${fence.delimiter}${baseInfo ? `${baseInfo} ${directive}` : directive}`;
672
- const beforeWithClose = before.endsWith("\n") ? `${before}${closingFence}
673
- ` : `${before}
674
- ${closingFence}
675
- `;
676
- const afterWithReopen = `${reopeningFence}
677
- ${after}`;
678
- return { before: beforeWithClose, after: afterWithReopen };
679
- }, "splitFencedMarkdown");
680
-
681
- export {
682
- TABLE_MAX_ROW_LINES,
683
- TABLE_ROW_RE,
684
- TABLE_SEPARATOR_RE,
685
- CODE_FENCE_RE,
686
- splitMarkdownTableRow,
687
- fitPendingSlice,
688
- getEnclosingFenceInfo,
689
- findLastSafeSplitPoint,
690
- parseCodeFenceInfo,
691
- splitFencedMarkdown,
692
- SessionStatsProvider,
693
- useSessionStats,
694
- getCommandSourceBadge,
695
- getCommandSourceGroup,
696
- formatSupportedModes,
697
- getCommandDisplayName,
698
- getCommandSubcommandNames
699
- };
700
- /**
701
- * @license
702
- * Copyright 2025 Google LLC
703
- * SPDX-License-Identifier: Apache-2.0
704
- */
705
- /**
706
- * @license
707
- * Copyright 2025 Qwen
708
- * SPDX-License-Identifier: Apache-2.0
709
- */