@qwen-code/qwen-code 0.19.12 → 0.20.0-nightly.20260720.0c271659d

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 (276) hide show
  1. package/bundled/qc-helper/docs/integration-github-action.md +1 -1
  2. package/bundled/qc-helper/docs/qwen-serve.md +42 -5
  3. package/bundled/review/DESIGN.md +2 -2
  4. package/bundled/review/SKILL.md +13 -9
  5. package/chunks/{MaxSizedBox-QOXLJGAF.js → MaxSizedBox-ED3QND6V.js} +30 -27
  6. package/chunks/{StandaloneSessionPicker-FLV6CGYJ.js → StandaloneSessionPicker-NQVAOTKS.js} +50 -45
  7. package/chunks/{acpAgent-OB2CTF3P.js → acpAgent-HOBFF5B6.js} +353 -130
  8. package/chunks/{agent-CKSI7BTR.js → agent-J7EPFLA6.js} +22 -22
  9. package/chunks/{agent-headless-U36LIYTU.js → agent-headless-RRG3JU7Q.js} +22 -22
  10. package/chunks/{anthropicContentGenerator-ZZRGFEES.js → anthropicContentGenerator-HVKLXOOU.js} +6 -5
  11. package/chunks/{artifact-tool-PHO5XEGZ.js → artifact-tool-WBCAMD3O.js} +2 -2
  12. package/chunks/{askUserQuestion-CEPBT47X.js → askUserQuestion-6DZC4UV5.js} +2 -2
  13. package/chunks/{bridge-AIKTINJG.js → bridge-OW5FZ6BF.js} +25 -25
  14. package/chunks/build-SSCNEHZZ.js +62 -0
  15. package/chunks/{channel-worker-group-NEUVTPB2.js → channel-worker-group-53CMOPFT.js} +4 -4
  16. package/chunks/{channel-worker-manager-7CQVOVWV.js → channel-worker-manager-UTXILKC2.js} +4 -4
  17. package/chunks/{channel-worker-supervisor-3BU2KNCZ.js → channel-worker-supervisor-ZGO2W2MD.js} +3 -3
  18. package/chunks/chunk-27AJEU6G.js +442 -0
  19. package/chunks/{chunk-BABX5XRO.js → chunk-2HOVDT7W.js} +1 -1
  20. package/chunks/{chunk-GW7BONBU.js → chunk-2JOLZA6L.js} +5 -5
  21. package/chunks/{chunk-ZSDFNE6Y.js → chunk-2TDSM7I6.js} +3 -3
  22. package/chunks/{chunk-6IITZE7O.js → chunk-2YJLFCYI.js} +7 -7
  23. package/chunks/{chunk-VEFR4XJQ.js → chunk-37MGCVTS.js} +1 -1
  24. package/chunks/{chunk-3B6PSWHE.js → chunk-3ML52IFS.js} +4 -4
  25. package/chunks/{chunk-TKASNYDS.js → chunk-3QR5MOHP.js} +2 -2
  26. package/chunks/{chunk-KRMARA3A.js → chunk-3SNKL6L6.js} +29 -13
  27. package/chunks/{chunk-DJ4VHAFJ.js → chunk-3ZL6YMO2.js} +3 -3
  28. package/chunks/chunk-43T5WDQ7.js +127 -0
  29. package/chunks/{chunk-W6CQPLWM.js → chunk-4ODB7WIB.js} +1 -1
  30. package/chunks/{chunk-CHPQFLW6.js → chunk-4UH63YE5.js} +5 -5
  31. package/chunks/{chunk-2CCDMJM7.js → chunk-53OPIXUE.js} +3 -3
  32. package/chunks/{chunk-HTHUX2T5.js → chunk-5QWWOFGG.js} +0 -1
  33. package/chunks/{chunk-3DJY4IFO.js → chunk-5SCI6E3E.js} +1 -1
  34. package/chunks/{chunk-4CHDYDG3.js → chunk-6EFTQYW7.js} +1 -1
  35. package/chunks/{chunk-OBSLEYCD.js → chunk-6HQW55TM.js} +29 -2
  36. package/chunks/{chunk-N47VAEAJ.js → chunk-6MN6XJTR.js} +2379 -1291
  37. package/chunks/{chunk-UCTCDLDS.js → chunk-6VGRTGOG.js} +1 -1
  38. package/chunks/{chunk-KNGZ5EYL.js → chunk-7JQK6FXK.js} +198 -120
  39. package/chunks/{chunk-2476XGOU.js → chunk-A4TJMY65.js} +1 -1
  40. package/chunks/{chunk-67Q33DQY.js → chunk-AMRWCMX4.js} +4 -4
  41. package/chunks/{chunk-XAAEDML2.js → chunk-AYCDXHZB.js} +1 -1
  42. package/chunks/{chunk-VAJS2E2D.js → chunk-BDBMYST4.js} +1 -1
  43. package/chunks/{chunk-F2RR4HO2.js → chunk-BVLROR2T.js} +1 -1
  44. package/chunks/{chunk-UE5TZ55T.js → chunk-C27BYUX6.js} +29 -2
  45. package/chunks/{chunk-PK7COE5O.js → chunk-CL7IRYTA.js} +1 -1
  46. package/chunks/{chunk-KMJOMWHE.js → chunk-COWNNAWJ.js} +1 -1
  47. package/chunks/{chunk-UOA2IHRI.js → chunk-CPCVCKKF.js} +1 -1
  48. package/chunks/{chunk-4RPARQ5D.js → chunk-D2VIDMVM.js} +2 -2
  49. package/chunks/{chunk-4MPYGENG.js → chunk-DCCW7CRR.js} +6 -6
  50. package/chunks/chunk-DIKIJS6Z.js +114 -0
  51. package/chunks/{chunk-ETN2G32U.js → chunk-DR5AUNJ2.js} +4 -4
  52. package/chunks/{chunk-6ETOSWAO.js → chunk-DSBCU6JY.js} +3 -3
  53. package/chunks/{chunk-LKR7QQ63.js → chunk-EAUYY7SS.js} +3 -3
  54. package/chunks/{chunk-J2MKYJKZ.js → chunk-EIAK6Q2B.js} +2 -2
  55. package/chunks/{chunk-WEPXQKGP.js → chunk-EZVDJFZ7.js} +1 -1
  56. package/chunks/{chunk-WHQNBBWW.js → chunk-FLSVD6BS.js} +2 -2
  57. package/chunks/{chunk-3ESL7JXA.js → chunk-FODJ5Q5K.js} +3 -3
  58. package/chunks/{chunk-4XCVGEEX.js → chunk-FSL5W5TI.js} +3 -3
  59. package/chunks/{chunk-NE6HHLL3.js → chunk-FWT66O5E.js} +2 -2
  60. package/chunks/{chunk-OSSDHJDU.js → chunk-G45X5TRN.js} +1 -1
  61. package/chunks/{chunk-ZGT623SG.js → chunk-G6MDKXDP.js} +12 -12
  62. package/chunks/{chunk-KANTXY7B.js → chunk-GKY2OJ7R.js} +2 -2
  63. package/chunks/chunk-GMGDLUC7.js +37 -0
  64. package/chunks/{chunk-J6NT5YTN.js → chunk-H2XVO6NE.js} +1 -289
  65. package/chunks/{chunk-XSEWNUMZ.js → chunk-I4HZ4GOD.js} +8 -8
  66. package/chunks/{chunk-CPU6I5YV.js → chunk-I6JUVU7J.js} +34 -24
  67. package/chunks/{chunk-UZC5VPOJ.js → chunk-IDGTC5AS.js} +3 -3
  68. package/chunks/{chunk-QIFTJDBY.js → chunk-INL2RSLA.js} +1 -1
  69. package/chunks/{chunk-GSPWDTYY.js → chunk-INQQM52C.js} +18 -16
  70. package/chunks/{chunk-HVGJWOR6.js → chunk-JBCFW3IL.js} +2 -2
  71. package/chunks/{chunk-LPHGXXZX.js → chunk-JD3MKVKL.js} +1 -1
  72. package/chunks/{chunk-GCY7QTCE.js → chunk-JDPCOUZ3.js} +1602 -398
  73. package/chunks/{chunk-NUHSLBJZ.js → chunk-JNWZQ27S.js} +15 -9
  74. package/chunks/{chunk-KGWA7XYL.js → chunk-JRJ2LV6P.js} +6 -226
  75. package/chunks/{chunk-QSG4ZFG4.js → chunk-KTUQMDEP.js} +1 -1
  76. package/chunks/{chunk-RKUMFUFM.js → chunk-LTQ5C5AB.js} +4 -4
  77. package/chunks/{chunk-V4PCIS25.js → chunk-MAQQGNQ5.js} +44 -1
  78. package/chunks/{chunk-EISVEV45.js → chunk-NBMIC7DR.js} +2 -2
  79. package/chunks/{chunk-GEHSF7MS.js → chunk-NEEB7UEN.js} +2545 -1974
  80. package/chunks/{chunk-BKNPMEN6.js → chunk-NIJEXGV6.js} +93 -17
  81. package/chunks/{chunk-PR5XQ73G.js → chunk-NQVA6O7F.js} +2 -2
  82. package/chunks/{chunk-FUSMC3SZ.js → chunk-NT324EJ6.js} +13 -8
  83. package/chunks/{chunk-5N7M4XYN.js → chunk-O2SPEQFA.js} +5 -5
  84. package/chunks/{chunk-OEHCAWUA.js → chunk-OLMETXLX.js} +2 -2
  85. package/chunks/{chunk-JCJPZMJV.js → chunk-OOCI5VVU.js} +1 -1
  86. package/chunks/{chunk-XSPFQQRE.js → chunk-OONJNQ42.js} +3 -3
  87. package/chunks/{chunk-ANRANWVE.js → chunk-OP4MOGXF.js} +1 -1
  88. package/chunks/{chunk-SGPFJMRP.js → chunk-PBATSWUQ.js} +1 -1
  89. package/chunks/chunk-QKYTTBYW.js +624 -0
  90. package/chunks/{chunk-W4UN42YP.js → chunk-QOSKUG5P.js} +77 -20
  91. package/chunks/{chunk-76BFY7AF.js → chunk-QTERJVPZ.js} +1 -6
  92. package/chunks/{chunk-WIYV7CSF.js → chunk-RB7NXUP5.js} +3 -3
  93. package/chunks/{chunk-HCCR43AY.js → chunk-RFIAR4YL.js} +1 -1
  94. package/chunks/{chunk-GMUPIMHF.js → chunk-RS5JPH6Y.js} +3 -3
  95. package/chunks/chunk-RS7MT2QG.js +305 -0
  96. package/chunks/{chunk-GXFYV7MP.js → chunk-SG2PEESS.js} +1106 -592
  97. package/chunks/{chunk-PUKUUASO.js → chunk-SLLG5XXE.js} +1 -1
  98. package/chunks/{chunk-GLH2NTPB.js → chunk-SQMTULHJ.js} +1 -1
  99. package/chunks/{chunk-NPMVLWYL.js → chunk-STFP7PJR.js} +6 -6
  100. package/chunks/chunk-SV5PQVQE.js +71 -0
  101. package/chunks/{chunk-HZ4M2UQD.js → chunk-TFNZCC4B.js} +1 -1
  102. package/chunks/{chunk-5QSVANRT.js → chunk-THNJYTA6.js} +2 -2
  103. package/chunks/{chunk-MRE77ST5.js → chunk-TN2BYMNH.js} +69 -2216
  104. package/chunks/{chunk-64GC5EMF.js → chunk-TQBA6DVX.js} +1 -1
  105. package/chunks/{chunk-VLHQMOZK.js → chunk-U24E4R5U.js} +3 -3
  106. package/chunks/{chunk-4CA4WUMS.js → chunk-UEY4AYUL.js} +2 -2
  107. package/chunks/{chunk-42VIHAYT.js → chunk-UGRL5B5F.js} +1 -1
  108. package/chunks/chunk-V7RNNPGC.js +44 -0
  109. package/chunks/{chunk-R3EDIMYZ.js → chunk-VGFFYNBD.js} +1 -1
  110. package/chunks/chunk-VIOFKPPN.js +125 -0
  111. package/chunks/{chunk-BEZPRKD3.js → chunk-VLDBVLC4.js} +156 -2
  112. package/chunks/{chunk-HD6EGS5K.js → chunk-VWLLDHAY.js} +6 -6
  113. package/chunks/chunk-WCDH2CRI.js +1187 -0
  114. package/chunks/{chunk-7SX6WZNO.js → chunk-XVVH63JG.js} +3 -3
  115. package/chunks/{chunk-I7RRHHYG.js → chunk-Y2ENGUD6.js} +1 -1
  116. package/chunks/{chunk-NALRQ3SG.js → chunk-Y5534U4G.js} +332 -116
  117. package/chunks/{chunk-4SJJT466.js → chunk-YDZ6J2BY.js} +72 -159
  118. package/chunks/{chunk-APOFULHK.js → chunk-YNBP3YSU.js} +7 -6
  119. package/chunks/{chunk-EFAXBOQO.js → chunk-YWEW33JY.js} +7 -7
  120. package/chunks/{chunk-335ECZTA.js → chunk-ZEOZL37W.js} +1 -1
  121. package/chunks/{chunk-DUR7BZYK.js → chunk-ZGJ4LDD2.js} +53 -28
  122. package/chunks/{computer-use-4PUGCUQK.js → computer-use-ET5476VX.js} +22 -22
  123. package/chunks/{config-utils-6PJUXHLI.js → config-utils-AHQ6YZ66.js} +3 -3
  124. package/chunks/{contextCommand-C57KTWFV.js → contextCommand-QIULFDBF.js} +25 -26
  125. package/chunks/{create-sub-session-5Q42XR6I.js → create-sub-session-BVL2ZHTM.js} +22 -22
  126. package/chunks/{create-sub-session-DIJOV6HV.js → create-sub-session-P26FE5GG.js} +2 -2
  127. package/chunks/{cron-create-X462ERYA.js → cron-create-JWFHBDRQ.js} +4 -4
  128. package/chunks/{cron-delete-SL5UJUM3.js → cron-delete-GDX4E26G.js} +4 -4
  129. package/chunks/{cron-list-3MD6SVXI.js → cron-list-USMAIWPT.js} +4 -4
  130. package/chunks/{daemon-ZW6LHOXT.js → daemon-EE5T3KOW.js} +169 -84
  131. package/chunks/{daemon-status-provider-YPV3UXHT.js → daemon-status-provider-L5UW7TGV.js} +29 -29
  132. package/chunks/{dist-3DQNQJ6H.js → dist-2BHAYBKP.js} +1 -1
  133. package/chunks/{dist-J2H4KTLB.js → dist-2MIU4UUH.js} +1 -1
  134. package/chunks/{dist-IEQSDXS7.js → dist-53PZYC5B.js} +2 -2
  135. package/chunks/{dist-NUXRQHC5.js → dist-AU7NQQRP.js} +1 -1
  136. package/chunks/{dist-XLE6ODMB.js → dist-FUTEXY6A.js} +1 -1
  137. package/chunks/{dist-IGZMVS5R.js → dist-WGTQO7F2.js} +1 -1
  138. package/chunks/{earlyInputCapture-5VDWSYAM.js → earlyInputCapture-ZLAL5GTE.js} +23 -23
  139. package/chunks/{edit-GORZTX2U.js → edit-4ZOPT6OC.js} +23 -23
  140. package/chunks/{enter-worktree-LJB2AW4L.js → enter-worktree-DFP5CZYS.js} +22 -22
  141. package/chunks/{enterPlanMode-LIIPP37T.js → enterPlanMode-7VEJ7A2A.js} +22 -22
  142. package/chunks/{environment-HQ2UHJ35.js → environment-KHS35XJY.js} +24 -24
  143. package/chunks/{errors-6JD5VMVQ.js → errors-574WBU5R.js} +24 -24
  144. package/chunks/{exit-worktree-IEP2WHOV.js → exit-worktree-5Q7V6D4C.js} +22 -22
  145. package/chunks/{exitPlanMode-U5Z6XBLO.js → exitPlanMode-SX2F6PDJ.js} +22 -22
  146. package/chunks/{fast-path-HFKNMP23.js → fast-path-G7BLOZVF.js} +2 -2
  147. package/chunks/{gemini-C2SCJH3N.js → gemini-M4JWSTGU.js} +70 -68
  148. package/chunks/{geminiContentGenerator-ADZTXEKV.js → geminiContentGenerator-MKXLUFUH.js} +4 -4
  149. package/chunks/{glob-GOAPGD6G.js → glob-FPKZY5W6.js} +22 -22
  150. package/chunks/{grep-HZLSTX7D.js → grep-RS22OMZG.js} +22 -22
  151. package/chunks/{handleAutoUpdate-UF74WGFE.js → handleAutoUpdate-RFNQ36JC.js} +27 -28
  152. package/chunks/{i18n-FMXIYUOC.js → i18n-MAEWSKYF.js} +23 -23
  153. package/chunks/{initializer-ERDBM3DU.js → initializer-T2BFZJBP.js} +28 -28
  154. package/chunks/{installationInfo-LROMXYLX.js → installationInfo-3UETF773.js} +25 -23
  155. package/chunks/{keychain-token-storage-K23CFKGN.js → keychain-token-storage-DWRJMNH3.js} +2 -2
  156. package/chunks/{list-6JPJROU5.js → list-FWZUKWD2.js} +30 -30
  157. package/chunks/{loadedSettingsAdapter-QCWYUBBF.js → loadedSettingsAdapter-3DUNHAPX.js} +27 -27
  158. package/chunks/{loop-wakeup-6H7OENTB.js → loop-wakeup-5GLTUBHA.js} +5 -5
  159. package/chunks/{ls-APTSOOS5.js → ls-FHBY3Y7I.js} +4 -4
  160. package/chunks/{lsp-HPACPJAN.js → lsp-B6VMEW6Y.js} +2 -2
  161. package/chunks/{mcp-3P3KWYWO.js → mcp-POXS7QWD.js} +27 -27
  162. package/chunks/{monitor-LMYKCF6R.js → monitor-2ZZC2NKH.js} +22 -22
  163. package/chunks/nonInteractiveCli-WSJVCB2W.js +126 -0
  164. package/chunks/{notebook-edit-IBEOVZ6A.js → notebook-edit-BMQLME3Q.js} +23 -23
  165. package/chunks/{openaiContentGenerator-42PZKET5.js → openaiContentGenerator-GOREG72R.js} +11 -11
  166. package/chunks/{pidfile-VTBDIGOH.js → pidfile-MVZDE5TC.js} +23 -23
  167. package/chunks/{processUtils-L7ZKOGDG.js → processUtils-RH5KNLDH.js} +2 -2
  168. package/chunks/{qwenContentGenerator-VR2CNFGI.js → qwenContentGenerator-R55BCLRI.js} +24 -24
  169. package/chunks/{qwenOAuth2-6LS2T3Q6.js → qwenOAuth2-QZBI2SOZ.js} +11 -11
  170. package/chunks/react-SG7JAQSZ.js +8 -0
  171. package/chunks/{read-file-VSKOE22I.js → read-file-CPS2CYYG.js} +8 -8
  172. package/chunks/{read-mcp-resource-C6NT52T6.js → read-mcp-resource-AKCL7I43.js} +2 -2
  173. package/chunks/{record-artifact-ENCU7QCL.js → record-artifact-PEUB7727.js} +2 -2
  174. package/chunks/resumeHistoryUtils-YD6DSYHU.js +78 -0
  175. package/chunks/{ripGrep-5V5FLW2A.js → ripGrep-UKGJ7RHZ.js} +22 -22
  176. package/chunks/{run-qwen-serve-LSOPP4R2.js → run-qwen-serve-GFKSKLF6.js} +1442 -148
  177. package/chunks/{runtime-LT7R4CS5.js → runtime-4KGNL3TP.js} +31 -31
  178. package/chunks/{scheduler-YOWQ7KZP.js → scheduler-GJ3CELWI.js} +22 -22
  179. package/chunks/{send-message-5GZ4FX2V.js → send-message-3RHE7HSM.js} +3 -3
  180. package/chunks/{serve-VWLBXKGK.js → serve-UU6Z4C7W.js} +27 -27
  181. package/chunks/{server-3RW3FYOH.js → server-RTJUMN24.js} +393 -256
  182. package/chunks/{session-ZONXFOBQ.js → session-EYD3CEB5.js} +79 -163
  183. package/chunks/{settings-JC3VC53L.js → settings-H5O22TGQ.js} +26 -26
  184. package/chunks/{shell-2NGEMAVM.js → shell-KVNHDHMT.js} +22 -22
  185. package/chunks/{skill-3U2T6H3E.js → skill-32525KCE.js} +10 -10
  186. package/chunks/{spawnChannel-QEAUPARQ.js → spawnChannel-G7DUQKHL.js} +24 -24
  187. package/chunks/{src-75ZPXO7B.js → src-DUFUUEHE.js} +52 -22
  188. package/chunks/{standalone-update-UUJWJWYY.js → standalone-update-UC6CWBLH.js} +24 -24
  189. package/chunks/{startInteractiveUI-V7XISPQ6.js → startInteractiveUI-A5YYAWLF.js} +5451 -2045
  190. package/chunks/{syntheticOutput-ULOVVLY4.js → syntheticOutput-FG5PQKIR.js} +3 -3
  191. package/chunks/{task-create-DUE2PMNI.js → task-create-HX32YXO7.js} +7 -7
  192. package/chunks/{task-list-WVPNX7BZ.js → task-list-QWSY4ZIU.js} +5 -5
  193. package/chunks/{task-stop-CPEQWOT6.js → task-stop-GWC6UWAL.js} +2 -2
  194. package/chunks/{task-update-HY2LNFFB.js → task-update-NCTAB73Q.js} +7 -7
  195. package/chunks/{team-create-R6AXDYPG.js → team-create-LS2Q32Y4.js} +22 -22
  196. package/chunks/{team-delete-JJV6IUOA.js → team-delete-KK37HTOG.js} +5 -5
  197. package/chunks/{team-plan-approval-O2ZPPT64.js → team-plan-approval-DWCZABX6.js} +22 -22
  198. package/chunks/{theme-manager-YIX2IC2D.js → theme-manager-E22CNBIL.js} +23 -23
  199. package/chunks/{todoWrite-JHHIDOIV.js → todoWrite-ERCAMLFS.js} +4 -4
  200. package/chunks/{tool-search-5IE2VO7X.js → tool-search-MHXUDFD2.js} +9 -9
  201. package/chunks/{total-session-admission-K6APQYEF.js → total-session-admission-KOPTGDJZ.js} +25 -25
  202. package/chunks/{trustedFolders-GPSSPVBF.js → trustedFolders-ANQXYAQT.js} +23 -23
  203. package/chunks/{update-relaunch-4BVAPX6Y.js → update-relaunch-HFGRB7PE.js} +9 -9
  204. package/chunks/{updateCheck-AHTHWLAM.js → updateCheck-EKIPND4B.js} +33 -26
  205. package/chunks/useAutoAcceptIndicator-EE22V2F5.js +80 -0
  206. package/chunks/{validateNonInterActiveAuth-UKAPCWDM.js → validateNonInterActiveAuth-RUICXVPH.js} +61 -63
  207. package/chunks/{version-EXGWKKQE.js → version-QLT755OV.js} +1 -1
  208. package/chunks/{web-fetch-ZDNE6FF2.js → web-fetch-DINW4Z65.js} +10 -10
  209. package/chunks/{workflow-G7U6OQWS.js → workflow-GPMXRWKK.js} +23 -23
  210. package/chunks/{workspace-providers-status-W6CEA6YM.js → workspace-providers-status-XCQKBVSX.js} +30 -30
  211. package/chunks/{workspace-registration-store-OGBMWCLC.js → workspace-registration-store-4I4KL7TN.js} +1 -1
  212. package/chunks/{workspace-registry-ZUWQM44P.js → workspace-registry-N4J57SFQ.js} +25 -25
  213. package/chunks/{workspace-service-UXX5P7GU.js → workspace-service-JJNJWVH3.js} +32 -32
  214. package/chunks/{workspace-skills-status-635B5R7N.js → workspace-skills-status-CEHLAQ2Y.js} +28 -28
  215. package/chunks/{write-file-DR3HN7IH.js → write-file-XRGEJRCC.js} +23 -23
  216. package/cli.js +11 -11
  217. package/package.json +3 -3
  218. package/web-shell/assets/{arc-_dVIKMdB.js → arc-DwJhljn9.js} +1 -1
  219. package/web-shell/assets/{architectureDiagram-3BPJPVTR-MuN3nKpL.js → architectureDiagram-3BPJPVTR-qdxSRav-.js} +1 -1
  220. package/web-shell/assets/{blockDiagram-GPEHLZMM-BtmvJjzx.js → blockDiagram-GPEHLZMM-2-dKM5aM.js} +1 -1
  221. package/web-shell/assets/{c4Diagram-AAUBKEIU-Dvi58_BU.js → c4Diagram-AAUBKEIU-Dt_Nu2HD.js} +1 -1
  222. package/web-shell/assets/channel-C6uyh95L.js +1 -0
  223. package/web-shell/assets/{chunk-2J33WTMH-YqxOVhS1.js → chunk-2J33WTMH-CBCeeNfD.js} +1 -1
  224. package/web-shell/assets/{chunk-4BX2VUAB-DoBgbC9z.js → chunk-4BX2VUAB-DPAzjqNs.js} +1 -1
  225. package/web-shell/assets/{chunk-55IACEB6-3NEQrBAr.js → chunk-55IACEB6-yrqyxvIK.js} +1 -1
  226. package/web-shell/assets/{chunk-727SXJPM-DrCZQxp0.js → chunk-727SXJPM-DguD_BBT.js} +1 -1
  227. package/web-shell/assets/{chunk-AQP2D5EJ-m_g3zjgv.js → chunk-AQP2D5EJ-KRUOG9v0.js} +1 -1
  228. package/web-shell/assets/{chunk-FMBD7UC4-D1_crABJ.js → chunk-FMBD7UC4-C0lilT2U.js} +1 -1
  229. package/web-shell/assets/{chunk-ND2GUHAM-BdhgVtBx.js → chunk-ND2GUHAM-DG9epIWK.js} +1 -1
  230. package/web-shell/assets/{chunk-QZHKN3VN-BlmThhm-.js → chunk-QZHKN3VN-PdJDkYHw.js} +1 -1
  231. package/web-shell/assets/classDiagram-4FO5ZUOK-Cv8Ulf-B.js +1 -0
  232. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-Cv8Ulf-B.js +1 -0
  233. package/web-shell/assets/{cose-bilkent-S5V4N54A-Cbjm_00Z.js → cose-bilkent-S5V4N54A-BAOPPuJm.js} +1 -1
  234. package/web-shell/assets/{dagre-BM42HDAG-C39QNVgC.js → dagre-BM42HDAG-CDHJv82_.js} +1 -1
  235. package/web-shell/assets/{diagram-2AECGRRQ-DNXSAixC.js → diagram-2AECGRRQ-C_hkG5fN.js} +1 -1
  236. package/web-shell/assets/{diagram-5GNKFQAL-BCbGUPEA.js → diagram-5GNKFQAL-e9zo_eKt.js} +1 -1
  237. package/web-shell/assets/{diagram-KO2AKTUF-1eujKSDC.js → diagram-KO2AKTUF-BFN41SCb.js} +1 -1
  238. package/web-shell/assets/{diagram-LMA3HP47-DUMKXgql.js → diagram-LMA3HP47-DG72N0W0.js} +1 -1
  239. package/web-shell/assets/{diagram-OG6HWLK6-BFktU3_u.js → diagram-OG6HWLK6-Dkmp-tdv.js} +1 -1
  240. package/web-shell/assets/{erDiagram-TEJ5UH35-BvJC7DLk.js → erDiagram-TEJ5UH35-CyS0GnQV.js} +1 -1
  241. package/web-shell/assets/{flowDiagram-I6XJVG4X-Cgu3PlOt.js → flowDiagram-I6XJVG4X-Cg1SRmzV.js} +1 -1
  242. package/web-shell/assets/{ganttDiagram-6RSMTGT7-DLNXN5Xh.js → ganttDiagram-6RSMTGT7-CoNkSLs3.js} +1 -1
  243. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-BQFRDv6R.js → gitGraphDiagram-PVQCEYII-DEA6GWPa.js} +1 -1
  244. package/web-shell/assets/index-B49xd8_A.css +5 -0
  245. package/web-shell/assets/{index-CdC3pjP3.js → index-CMaZgs6B.js} +1 -1
  246. package/web-shell/assets/index-D-cDAZgO.js +1192 -0
  247. package/web-shell/assets/{infoDiagram-5YYISTIA-DT2mOSvp.js → infoDiagram-5YYISTIA-BZshyoGT.js} +1 -1
  248. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-9fy_K4bd.js → ishikawaDiagram-YF4QCWOH-CT2ssZqC.js} +1 -1
  249. package/web-shell/assets/{journeyDiagram-JHISSGLW-CoGSEuhE.js → journeyDiagram-JHISSGLW-BtMQ0rDG.js} +1 -1
  250. package/web-shell/assets/{kanban-definition-UN3LZRKU-BP9hHYIj.js → kanban-definition-UN3LZRKU-CoDbK5Db.js} +1 -1
  251. package/web-shell/assets/{linear-uIroDsmp.js → linear-CwhZ6u7u.js} +1 -1
  252. package/web-shell/assets/{mermaid.core-BUwoStsA.js → mermaid.core-C9nn0nrr.js} +5 -5
  253. package/web-shell/assets/{mindmap-definition-RKZ34NQL-DZB-FWim.js → mindmap-definition-RKZ34NQL-BXUbjTeL.js} +1 -1
  254. package/web-shell/assets/{pieDiagram-4H26LBE5-YPptloKl.js → pieDiagram-4H26LBE5-JddiYlWQ.js} +1 -1
  255. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-dgk3DSzm.js → quadrantDiagram-W4KKPZXB-DK5HKzXO.js} +1 -1
  256. package/web-shell/assets/{requirementDiagram-4Y6WPE33-BH2En2i9.js → requirementDiagram-4Y6WPE33-Y-uipa_6.js} +1 -1
  257. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-BB98feeI.js → sankeyDiagram-5OEKKPKP-BbWeqo8H.js} +1 -1
  258. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-CunAIGh8.js → sequenceDiagram-3UESZ5HK-tX2gOoo5.js} +1 -1
  259. package/web-shell/assets/{stateDiagram-AJRCARHV-DTJs_-I2.js → stateDiagram-AJRCARHV-CACN457G.js} +1 -1
  260. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-DaUeO2zt.js +1 -0
  261. package/web-shell/assets/{timeline-definition-PNZ67QCA-Cd4AN7O0.js → timeline-definition-PNZ67QCA-DnHWKSOq.js} +1 -1
  262. package/web-shell/assets/{vennDiagram-CIIHVFJN-xIG-rUU9.js → vennDiagram-CIIHVFJN-BO8Yl2FG.js} +1 -1
  263. package/web-shell/assets/{wardley-L42UT6IY-D1UyjIcG.js → wardley-L42UT6IY-1NMqqrBi.js} +1 -1
  264. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-BVM0Mb99.js → wardleyDiagram-YWT4CUSO-C3eWgIvD.js} +1 -1
  265. package/web-shell/assets/{xychartDiagram-2RQKCTM6-BX31JDSz.js → xychartDiagram-2RQKCTM6-D0h8FgFX.js} +1 -1
  266. package/web-shell/index.html +2 -2
  267. package/chunks/chunk-EDFD7VOX.js +0 -368
  268. package/chunks/chunk-GFYFLDEG.js +0 -709
  269. package/chunks/chunk-LUJQUNKY.js +0 -3288
  270. package/chunks/nonInteractiveCli-YURFHZV5.js +0 -129
  271. package/web-shell/assets/channel-Bi5TehaT.js +0 -1
  272. package/web-shell/assets/classDiagram-4FO5ZUOK-BKhhRdd1.js +0 -1
  273. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-BKhhRdd1.js +0 -1
  274. package/web-shell/assets/index-C_ouplMQ.js +0 -1187
  275. package/web-shell/assets/index-XGDFJE-X.css +0 -5
  276. 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
- */