@qwen-code/qwen-code 0.23.5-preview.0 → 0.24.0-nightly.20260917.f822124af5

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 (498) hide show
  1. package/bundled/goal-draft/SKILL.md +5 -5
  2. package/bundled/qc-helper/docs/configuration/auth.md +1 -0
  3. package/bundled/qc-helper/docs/configuration/model-providers.md +43 -14
  4. package/bundled/qc-helper/docs/configuration/settings.md +2 -1
  5. package/bundled/qc-helper/docs/extension/introduction.md +2 -0
  6. package/bundled/qc-helper/docs/features/_meta.ts +1 -0
  7. package/bundled/qc-helper/docs/features/goals.md +11 -11
  8. package/bundled/qc-helper/docs/features/hooks.md +8 -10
  9. package/bundled/qc-helper/docs/features/omni-fixed-policies-preset.json +242 -0
  10. package/bundled/qc-helper/docs/features/omni-media-policies.md +443 -0
  11. package/bundled/qc-helper/docs/overview.md +1 -1
  12. package/bundled/qc-helper/docs/quickstart.md +2 -3
  13. package/bundled/review/SKILL.md +1 -1
  14. package/bundled/workflow-authoring/SKILL.md +22 -7
  15. package/chunks/MaxSizedBox-4VDYUHUI.js +148 -0
  16. package/chunks/{StandaloneSessionPicker-V635V72I.js → StandaloneSessionPicker-SGMGJOH3.js} +115 -91
  17. package/chunks/acp-subagent-executor-EGAATYQA.js +164 -0
  18. package/chunks/{acpAgent-3DPWZTNC.js → acpAgent-2JQ2N2T5.js} +361 -229
  19. package/chunks/{agent-KIHGINKN.js → agent-QWNE3MPD.js} +59 -49
  20. package/chunks/agent-headless-GRSMZK5Z.js +104 -0
  21. package/chunks/{anthropicContentGenerator-4FGOM5LK.js → anthropicContentGenerator-INV24RMG.js} +30 -27
  22. package/chunks/{artifact-tool-MUTNH4NI.js → artifact-tool-3MWM6SN2.js} +11 -7
  23. package/chunks/{askUserQuestion-AKIRLVB5.js → askUserQuestion-YFFBB4K3.js} +6 -4
  24. package/chunks/bridge-R65BJ2YL.js +156 -0
  25. package/chunks/{build-5KWQBWEQ.js → build-5OQN7CDU.js} +1 -1
  26. package/chunks/caption-audio-UXXLI3JZ.js +443 -0
  27. package/chunks/caption-image-B7O4TUFP.js +247 -0
  28. package/chunks/{channel-management-service-RRILWSXX.js → channel-management-service-GRJG5R46.js} +1 -1
  29. package/chunks/channel-settings-store-TBLCDTV2.js +158 -0
  30. package/chunks/{channel-worker-group-3DUJFZJR.js → channel-worker-group-SCSKCSBJ.js} +4 -4
  31. package/chunks/{channel-worker-manager-E5UW2VLA.js → channel-worker-manager-AHCZCKON.js} +4 -4
  32. package/chunks/{channel-worker-supervisor-VN33GSEC.js → channel-worker-supervisor-BGUAVITB.js} +3 -3
  33. package/chunks/{chunk-5NUKK2DT.js → chunk-25FMWESU.js} +47 -8
  34. package/chunks/{chunk-VVI7MK3V.js → chunk-2A6RZKP2.js} +9 -7
  35. package/chunks/{chunk-3WWPEFMX.js → chunk-2FQM443D.js} +82 -4
  36. package/chunks/{chunk-D3KVGQUV.js → chunk-37XDTMFG.js} +4 -4
  37. package/chunks/{chunk-TDKUXSJO.js → chunk-3MW6PPA5.js} +1 -1
  38. package/chunks/{chunk-4LIPOIXS.js → chunk-3NHJLWOD.js} +1 -1
  39. package/chunks/{chunk-AQP3H22J.js → chunk-3ZGIRRAE.js} +1 -1
  40. package/chunks/{chunk-WSJI6ODG.js → chunk-422D2UIO.js} +210 -150
  41. package/chunks/chunk-43QUA4MC.js +135 -0
  42. package/chunks/{chunk-Q2SAQTEJ.js → chunk-4B7U3KQP.js} +1 -1
  43. package/chunks/{chunk-SFL6U7U7.js → chunk-4JFRCIMW.js} +2 -2
  44. package/chunks/{chunk-IVFTLUZD.js → chunk-4SZ2636R.js} +3 -3
  45. package/chunks/{chunk-6OTF7TTE.js → chunk-4VYTH6OF.js} +24 -1
  46. package/chunks/{chunk-7CLLH5TI.js → chunk-4YS7RMCB.js} +6 -4
  47. package/chunks/{chunk-BW2SMO6L.js → chunk-5FHOPPLZ.js} +1 -1
  48. package/chunks/{chunk-QIPLWW6Q.js → chunk-5MYQ66UF.js} +1 -1
  49. package/chunks/{chunk-TXTCM3TC.js → chunk-5VDOVBNG.js} +18 -14
  50. package/chunks/{chunk-L2A5VBDL.js → chunk-67ZCKSV6.js} +9 -9
  51. package/chunks/chunk-6C3D7BKK.js +153 -0
  52. package/chunks/{chunk-DC4ZNGH4.js → chunk-6DB6UHY3.js} +3 -3
  53. package/chunks/{chunk-AXPOOQAW.js → chunk-736AZVPL.js} +2 -2
  54. package/chunks/{chunk-M22WLKLI.js → chunk-77ORAIEF.js} +7 -7
  55. package/chunks/{chunk-BUQN5LTI.js → chunk-7PQ65Z5F.js} +2 -2
  56. package/chunks/{chunk-CXY6BICQ.js → chunk-A5EGR6ZS.js} +204 -120
  57. package/chunks/{chunk-VQDWCQOE.js → chunk-ANKISCKU.js} +1 -0
  58. package/chunks/{chunk-7D4CV7JH.js → chunk-APHDK7GV.js} +116 -4
  59. package/chunks/{chunk-B5TJK7B3.js → chunk-ARKOX7HM.js} +1 -1
  60. package/chunks/{chunk-NXUZFW3G.js → chunk-AUFTA63J.js} +1 -1
  61. package/chunks/{chunk-36SDZ2Q4.js → chunk-B3HGO6BB.js} +7 -5
  62. package/chunks/{chunk-6USYH3EU.js → chunk-B3XJFEEH.js} +5 -3
  63. package/chunks/{chunk-AEWCOE64.js → chunk-B5WYAQ4I.js} +2 -2
  64. package/chunks/{chunk-GSKX53AN.js → chunk-BA6AXQDA.js} +1 -1
  65. package/chunks/{chunk-Y2KJC55Y.js → chunk-BBHLWLIK.js} +4 -4
  66. package/chunks/chunk-BKVPLSEI.js +133 -0
  67. package/chunks/chunk-BQMSZSG6.js +21 -0
  68. package/chunks/{chunk-3LMDSCLU.js → chunk-C4FISGDN.js} +2 -2
  69. package/chunks/{chunk-SFHX5G2S.js → chunk-C4MMZVYX.js} +80 -15
  70. package/chunks/{chunk-4JFLRHNE.js → chunk-C4QWV63F.js} +1 -1
  71. package/chunks/{chunk-XFFRI3WM.js → chunk-CA63HYHU.js} +4 -2
  72. package/chunks/{chunk-FBY32737.js → chunk-CJNWKJFH.js} +4 -4
  73. package/chunks/{chunk-QT6Z2IBF.js → chunk-CYFQLCCG.js} +2 -2
  74. package/chunks/{chunk-X7AYIXC7.js → chunk-DJLCK66M.js} +5 -3
  75. package/chunks/chunk-DJYHML3Y.js +121 -0
  76. package/chunks/{chunk-MO4XID7S.js → chunk-DNDECZXY.js} +3 -3
  77. package/chunks/{chunk-H6L4NEAT.js → chunk-DQCGGSDO.js} +1 -1
  78. package/chunks/{chunk-347O2YZJ.js → chunk-DUWQ5Q6R.js} +115 -67
  79. package/chunks/{chunk-FEDFZBGR.js → chunk-E6A52AP2.js} +28 -17
  80. package/chunks/{chunk-TIGXX4PA.js → chunk-EKBQJ627.js} +2 -2
  81. package/chunks/{chunk-RSWBT7AZ.js → chunk-ERIBG3BX.js} +35 -551
  82. package/chunks/{chunk-PPJSG2PU.js → chunk-EVZT24AF.js} +6 -142
  83. package/chunks/{chunk-YZXSDPOQ.js → chunk-F7L4ZMKS.js} +84 -40
  84. package/chunks/{chunk-HX4WXX3H.js → chunk-FGAWVV4X.js} +101 -75
  85. package/chunks/chunk-FT3O44AZ.js +1635 -0
  86. package/chunks/chunk-FTKXJMQV.js +255 -0
  87. package/chunks/{chunk-5FK4MSHB.js → chunk-FWP5GZRY.js} +6 -4
  88. package/chunks/{chunk-TRZ22SG5.js → chunk-FXPP7VLM.js} +6 -4
  89. package/chunks/{chunk-INN5ORKX.js → chunk-G25IQMCV.js} +1 -1
  90. package/chunks/{chunk-OWUAZXXN.js → chunk-GHG4PQY2.js} +3 -3
  91. package/chunks/{chunk-FASYATAZ.js → chunk-GL5TRVMS.js} +1 -1
  92. package/chunks/{chunk-G45B3INR.js → chunk-GVTAFLWB.js} +2 -2
  93. package/chunks/{chunk-G6UUOCUT.js → chunk-GXNXX7A2.js} +7 -1
  94. package/chunks/{chunk-GI7SLDOI.js → chunk-HUUBCY33.js} +6 -6
  95. package/chunks/chunk-I7MIPRIQ.js +181 -0
  96. package/chunks/{chunk-NQ272MQG.js → chunk-IAKJXTGS.js} +7 -5
  97. package/chunks/{chunk-V4JJAVHQ.js → chunk-ID7XHHY5.js} +2 -2
  98. package/chunks/{chunk-IXO2OCIP.js → chunk-IIHFUREY.js} +12 -8
  99. package/chunks/{chunk-IZ2U57NY.js → chunk-IITTKFWM.js} +4 -2
  100. package/chunks/chunk-IVPSLX4P.js +578 -0
  101. package/chunks/{chunk-BTICBRPL.js → chunk-IWMYX5LB.js} +3 -3
  102. package/chunks/{chunk-UZSB57EV.js → chunk-JR2WFCQG.js} +29 -17
  103. package/chunks/{chunk-GJKP6XOB.js → chunk-JWV5GI77.js} +16 -19
  104. package/chunks/chunk-JYGESWZM.js +149 -0
  105. package/chunks/{chunk-KVC7HZWK.js → chunk-JYTJ5FCM.js} +1 -1
  106. package/chunks/{chunk-SOLRBF7L.js → chunk-JZUSFW64.js} +10 -10
  107. package/chunks/{chunk-CDDP4ONL.js → chunk-K2T5PKFS.js} +60 -134
  108. package/chunks/{chunk-EIBECN2J.js → chunk-K5VVDHDV.js} +5 -5
  109. package/chunks/{chunk-NKTMUPHJ.js → chunk-KDM4KSVG.js} +14 -4
  110. package/chunks/{chunk-3WILPKTJ.js → chunk-KKPIFWTZ.js} +11 -6
  111. package/chunks/{chunk-3HTUE6ZR.js → chunk-KPK6NQVR.js} +4 -4
  112. package/chunks/{chunk-CXONOVBN.js → chunk-KS6F6LZQ.js} +8 -6
  113. package/chunks/{chunk-D7JMO2GP.js → chunk-KSECLXYH.js} +1 -1
  114. package/chunks/chunk-KSEKRQJO.js +253 -0
  115. package/chunks/{chunk-KEM7MWS7.js → chunk-KWZ2DDOC.js} +765 -428
  116. package/chunks/{chunk-U4AASWUQ.js → chunk-L4GF4IK2.js} +3 -3
  117. package/chunks/{chunk-CQPM66MG.js → chunk-L7HFHYGB.js} +4 -4
  118. package/chunks/{chunk-DJXSOEFB.js → chunk-LAE6RY3L.js} +1 -1
  119. package/chunks/{chunk-WNQIJTOP.js → chunk-LDM3JQZF.js} +243 -17
  120. package/chunks/{chunk-KVQ3QL4K.js → chunk-LLTRNLK2.js} +3 -3
  121. package/chunks/{chunk-IKBEIDOH.js → chunk-LVXTBFWP.js} +13 -13
  122. package/chunks/{chunk-AKRSSKUT.js → chunk-LWALWKFU.js} +10 -10
  123. package/chunks/{chunk-WL36KHUQ.js → chunk-LWV4RLBT.js} +11 -9
  124. package/chunks/{chunk-3BZI5GDP.js → chunk-M5YIHMXP.js} +6 -4
  125. package/chunks/{chunk-6WXVEDT2.js → chunk-MC2RYJMU.js} +5 -3
  126. package/chunks/chunk-MNU36NGH.js +233 -0
  127. package/chunks/{chunk-ZMYKNKET.js → chunk-MQWZWHTY.js} +3 -3
  128. package/chunks/{chunk-M4U2LTD2.js → chunk-MS4SXNJ6.js} +1 -1
  129. package/chunks/{chunk-QHSOINX6.js → chunk-MZKXPQWL.js} +2 -2
  130. package/chunks/{chunk-36NRLIR6.js → chunk-NBLWUMYE.js} +13 -11
  131. package/chunks/{chunk-DRAX5YAI.js → chunk-NFC4WTY2.js} +6 -4
  132. package/chunks/chunk-NX6JUO42.js +102 -0
  133. package/chunks/chunk-O345BAI3.js +42 -0
  134. package/chunks/{chunk-YM6KUQ2S.js → chunk-O4A2B6V2.js} +3 -3
  135. package/chunks/chunk-O55EKI4S.js +7668 -0
  136. package/chunks/{chunk-3UGMLA4V.js → chunk-OA5H5PPQ.js} +10 -10
  137. package/chunks/{chunk-DX6JTDMR.js → chunk-OB57Y2WH.js} +1 -1
  138. package/chunks/{chunk-4QPVZA5J.js → chunk-OOSOAFCT.js} +3 -3
  139. package/chunks/{chunk-E2VSBAFA.js → chunk-OXBD7VUE.js} +5 -5
  140. package/chunks/{chunk-M23GFJ5B.js → chunk-OY5GQPMU.js} +1 -1
  141. package/chunks/chunk-PF3RVYRK.js +108 -0
  142. package/chunks/{chunk-XWJFDJZK.js → chunk-PJSZXERN.js} +1 -1
  143. package/chunks/{chunk-GSAOVDTH.js → chunk-POMFSBEC.js} +4 -4
  144. package/chunks/{chunk-EWNKP4V4.js → chunk-PPVM7YLS.js} +1 -1
  145. package/chunks/{chunk-WK6DEH3Q.js → chunk-PQQV3OBW.js} +6 -4
  146. package/chunks/{chunk-ZSTCM3MX.js → chunk-Q5N5NEVT.js} +1 -1
  147. package/chunks/{chunk-HYHSMTRA.js → chunk-QCTWNYL6.js} +4 -4
  148. package/chunks/{chunk-KFFCDLKV.js → chunk-QE36VXWP.js} +1 -1
  149. package/chunks/{chunk-3LLEB5CU.js → chunk-QG73VXTF.js} +2 -2
  150. package/chunks/{chunk-QMENOK5T.js → chunk-QJJN2VJY.js} +10 -8
  151. package/chunks/{chunk-XICCGDWF.js → chunk-QKYAXSNG.js} +2 -2
  152. package/chunks/{chunk-V545KI73.js → chunk-QPTE6BKL.js} +1 -1
  153. package/chunks/{chunk-2GP6BQ2J.js → chunk-RA6PKQVM.js} +2 -2
  154. package/chunks/{chunk-TPY6HW55.js → chunk-RFAX4WKE.js} +13 -7
  155. package/chunks/chunk-RSFNJ6UU.js +1252 -0
  156. package/chunks/{chunk-EDIDYZBT.js → chunk-RVT5L74D.js} +1 -1
  157. package/chunks/{chunk-FCPJXKDG.js → chunk-RXDTMGUH.js} +9 -9
  158. package/chunks/{chunk-P42KMMU6.js → chunk-RZZLNI74.js} +27 -25
  159. package/chunks/{chunk-ZFHKUQZ4.js → chunk-S2R4L34O.js} +12 -5
  160. package/chunks/chunk-S34QJ6IR.js +290 -0
  161. package/chunks/chunk-S5BHLTHK.js +190 -0
  162. package/chunks/{chunk-2XRE4KE4.js → chunk-S7BE3FMA.js} +1 -1
  163. package/chunks/{chunk-7O5PYQ3M.js → chunk-SBP43AO6.js} +1 -1
  164. package/chunks/chunk-SLHYLVRW.js +1377 -0
  165. package/chunks/{chunk-SSWTA7CH.js → chunk-SLV3GU2S.js} +12 -12
  166. package/chunks/chunk-SLVJ55G3.js +11397 -0
  167. package/chunks/{chunk-5VQR2DD7.js → chunk-SQRZJD25.js} +5 -3
  168. package/chunks/{chunk-K4XMAIRX.js → chunk-SRFYBJ4P.js} +14 -14
  169. package/chunks/{chunk-Y4NNIGYO.js → chunk-SSFOFDNL.js} +1 -1
  170. package/chunks/{chunk-NFXXBWSE.js → chunk-SU64336V.js} +2 -2
  171. package/chunks/{chunk-RRI764F7.js → chunk-SWHBXWVS.js} +45 -26
  172. package/chunks/{chunk-BHVF3R6B.js → chunk-TAMBGU42.js} +4 -4
  173. package/chunks/chunk-TFDCK56Y.js +154 -0
  174. package/chunks/{chunk-Q54O3EIA.js → chunk-TNTYSST7.js} +55 -33
  175. package/chunks/{chunk-JRHKM3YQ.js → chunk-TS4JJ7NN.js} +2 -2
  176. package/chunks/{chunk-VEXUA6DX.js → chunk-TWD6EZLA.js} +13 -11
  177. package/chunks/{chunk-WZWTY7SG.js → chunk-TZ4QKMPU.js} +6 -6
  178. package/chunks/{chunk-C4HBZQNH.js → chunk-U3MTHCJF.js} +1 -1
  179. package/chunks/{chunk-VU3XMZ5I.js → chunk-U3VIKF53.js} +3 -3
  180. package/chunks/{chunk-BHG3H6OZ.js → chunk-U4KO33OD.js} +1 -1
  181. package/chunks/{chunk-2C5TR6HN.js → chunk-UANUZBL2.js} +1 -1
  182. package/chunks/{chunk-Y53DG2HA.js → chunk-UIWUFHRJ.js} +1 -1
  183. package/chunks/{chunk-UQGRJTDK.js → chunk-UP3XL4VB.js} +3 -3
  184. package/chunks/{chunk-43Y26NPF.js → chunk-UR27ZXFZ.js} +3 -3
  185. package/chunks/{chunk-LO2UWNO5.js → chunk-UXC6MURF.js} +3 -3
  186. package/chunks/chunk-UXEI7POA.js +273 -0
  187. package/chunks/chunk-V2XJJTAB.js +228 -0
  188. package/chunks/chunk-VDNCKE2O.js +24 -0
  189. package/chunks/{chunk-YQQ2U7AS.js → chunk-VLBL6Q7X.js} +1 -1
  190. package/chunks/{chunk-HNFKYKHH.js → chunk-VNQTV5NC.js} +104 -26
  191. package/chunks/chunk-VPGRGNNH.js +578 -0
  192. package/chunks/{chunk-TKF4JINY.js → chunk-VVQ57VLE.js} +1 -1
  193. package/chunks/{chunk-AUX2FL5T.js → chunk-W2UTVLT2.js} +641 -11
  194. package/chunks/{chunk-SYMXYRM5.js → chunk-W7JWIIRC.js} +1 -1
  195. package/chunks/{chunk-WBSJ6VPZ.js → chunk-WDVSRQIQ.js} +3 -3
  196. package/chunks/{chunk-AZCTY64Z.js → chunk-WEUQIY3Q.js} +1 -1
  197. package/chunks/{chunk-FX6PZBOV.js → chunk-WHBL5HJF.js} +4 -4
  198. package/chunks/chunk-WL2V7PTE.js +78 -0
  199. package/chunks/{chunk-OSG23MR3.js → chunk-X3T5IOX6.js} +2 -2
  200. package/chunks/{chunk-OZEV3R3S.js → chunk-XYAB5R6E.js} +3 -3
  201. package/chunks/chunk-XZA32HII.js +19 -0
  202. package/chunks/{chunk-4FLUQWJ4.js → chunk-Y3Q5OK4D.js} +1 -1
  203. package/chunks/chunk-YDERQ7ZV.js +248 -0
  204. package/chunks/{chunk-QGEISOJ2.js → chunk-YKM7SY3N.js} +3 -3
  205. package/chunks/{chunk-HXUI5D4H.js → chunk-YRNAZIDX.js} +1 -1
  206. package/chunks/{chunk-MFDKHGTD.js → chunk-YRNLF4SV.js} +3 -1
  207. package/chunks/{chunk-3XBUCOWS.js → chunk-YSD6IY6F.js} +2 -2
  208. package/chunks/{chunk-CH2YDT6X.js → chunk-YVYK3JYU.js} +5 -3
  209. package/chunks/{chunk-YL3UJML3.js → chunk-YWDVNBGE.js} +4 -4
  210. package/chunks/{chunk-KAYC5FBN.js → chunk-Z3DLUFMT.js} +1595 -1399
  211. package/chunks/chunk-Z547XC3A.js +44 -0
  212. package/chunks/{chunk-B6RMK4ED.js → chunk-Z5UFM7P6.js} +9 -7
  213. package/chunks/chunk-ZAX2LW35.js +1330 -0
  214. package/chunks/{chunk-C3T6HPNM.js → chunk-ZGADNVME.js} +5 -5
  215. package/chunks/{chunk-M3JGHRMQ.js → chunk-ZJ7KIWG5.js} +1 -1
  216. package/chunks/{chunk-SYROIHU7.js → chunk-ZRQGTRHA.js} +4 -2
  217. package/chunks/{chunk-NCPFOLM2.js → chunk-ZTBP4SFC.js} +78 -18
  218. package/chunks/{chunk-ZAFYHRVY.js → chunk-ZYDMQCQP.js} +4 -274
  219. package/chunks/{chunk-YP2K3WOS.js → chunk-ZYLZNSBW.js} +7 -4
  220. package/chunks/clip-audio-SH4L7AEY.js +255 -0
  221. package/chunks/clip-image-BQRPECIS.js +239 -0
  222. package/chunks/clip-video-JIRMV5IH.js +277 -0
  223. package/chunks/{codex-subagent-executor-AEAIQZDC.js → codex-subagent-executor-BQZZ3Z4E.js} +92 -68
  224. package/chunks/config-3X4AXU45.js +21 -0
  225. package/chunks/config-T5RO4NJV.js +17 -0
  226. package/chunks/config-utils-65HZJG2Y.js +151 -0
  227. package/chunks/contextCommand-P2WZOTZP.js +144 -0
  228. package/chunks/convert-image-D52K2FFB.js +231 -0
  229. package/chunks/{core-runtime-ZI4RTOJQ.js → core-runtime-G7RWUDR5.js} +94 -67
  230. package/chunks/{create-sub-session-MSGNIM37.js → create-sub-session-6EDEANCD.js} +7 -5
  231. package/chunks/{create-sub-session-BBWFQARJ.js → create-sub-session-C6OHZMEI.js} +90 -66
  232. package/chunks/{cron-create-U2JJ5CCF.js → cron-create-GS7ORRO6.js} +8 -5
  233. package/chunks/{cron-delete-7DM4LJWD.js → cron-delete-3GGDNNXD.js} +8 -5
  234. package/chunks/{cron-list-VCUSZK2Y.js → cron-list-EX27DW4H.js} +8 -5
  235. package/chunks/{daemon-INCM4VBX.js → daemon-62G2N3ZH.js} +1 -1
  236. package/chunks/{daemon-git-worktree-guard-KECEMV6A.js → daemon-git-worktree-guard-Y5MRUXHR.js} +90 -66
  237. package/chunks/daemon-status-provider-ORUXPQJO.js +155 -0
  238. package/chunks/daemon-trust-policy-CG35YJC5.js +150 -0
  239. package/chunks/{daemon-trust-policy-monitor-546N5ZVL.js → daemon-trust-policy-monitor-PT2ZJL3A.js} +96 -72
  240. package/chunks/deferred-core-runtime-K74JXKVR.js +153 -0
  241. package/chunks/{display-image-QTHALY6N.js → display-image-L3A755PZ.js} +10 -7
  242. package/chunks/{dist-BNW423XT.js → dist-CXDHIHN4.js} +5 -0
  243. package/chunks/downsample-audio-LPDWX6GF.js +217 -0
  244. package/chunks/downsample-image-A5JEYIV5.js +249 -0
  245. package/chunks/downscale-video-4W5BX5KO.js +249 -0
  246. package/chunks/{earlyInputCapture-BXP7V2P3.js → earlyInputCapture-UJ3KFVZQ.js} +3 -2
  247. package/chunks/{edit-CMSQB7NP.js → edit-VBS2GF24.js} +68 -56
  248. package/chunks/{en-56QLKXS2.js → en-FCK6MBTI.js} +16 -0
  249. package/chunks/{enter-worktree-DA6A4XC5.js → enter-worktree-QK7DR5EF.js} +12 -9
  250. package/chunks/{enterPlanMode-UDPMNESD.js → enterPlanMode-WC33QFGB.js} +62 -51
  251. package/chunks/environment-HN47IXJZ.js +167 -0
  252. package/chunks/errors-JC3V3RJA.js +151 -0
  253. package/chunks/{exec-RPKEY6HP.js → exec-7CFNHYCV.js} +31 -9
  254. package/chunks/{exit-worktree-4H6Z2VQI.js → exit-worktree-62COYIHF.js} +14 -10
  255. package/chunks/exitPlanMode-7R7DYPUV.js +102 -0
  256. package/chunks/extract-audio-GSSZQV6G.js +229 -0
  257. package/chunks/extract-keyframes-Q6DRMQAJ.js +621 -0
  258. package/chunks/{fast-path-F2CYDDZ4.js → fast-path-WN7SASHV.js} +6 -6
  259. package/chunks/{fast-path-settings-N2VGRGDJ.js → fast-path-settings-ASPHHCAG.js} +2 -2
  260. package/chunks/ffmpeg-N4LIIVNR.js +21 -0
  261. package/chunks/{glob-Z2JMJKKN.js → glob-HHM36TVT.js} +63 -51
  262. package/chunks/{goal-tools-HXVVLGCV.js → goal-tools-JTF7S4FP.js} +59 -49
  263. package/chunks/{grep-H2I33VAO.js → grep-JB5DGQ3B.js} +13 -9
  264. package/chunks/handleAutoUpdate-GGFSWLAH.js +147 -0
  265. package/chunks/i18n-NYQWDZWJ.js +164 -0
  266. package/chunks/{image-gen-HIAZCB5T.js → image-gen-LX3C4V3R.js} +16 -11
  267. package/chunks/initializer-6IZ4SNMM.js +151 -0
  268. package/chunks/installationInfo-K4KMCK7Q.js +145 -0
  269. package/chunks/{keychain-token-storage-NQ5XWIPX.js → keychain-token-storage-ZZNRE6D4.js} +3 -2
  270. package/chunks/list-KAWCG4I6.js +154 -0
  271. package/chunks/{list-agents-EWDCEPIW.js → list-agents-HS6HH4DJ.js} +10 -7
  272. package/chunks/{llm-LSUBOJAR.js → llm-UAZU4HC5.js} +162 -135
  273. package/chunks/{llm-content-generator-MLIONRXE.js → llm-content-generator-M3MT4BP3.js} +11 -9
  274. package/chunks/loadedSettingsAdapter-XKUVLEYR.js +152 -0
  275. package/chunks/{loggingContentGenerator-TUPEXFMM.js → loggingContentGenerator-2WW2O46K.js} +74 -63
  276. package/chunks/{loop-wakeup-ZBVRI6VH.js → loop-wakeup-4B7OY3TV.js} +9 -6
  277. package/chunks/{ls-6ZB3BEIR.js → ls-EZ5PSWU2.js} +8 -5
  278. package/chunks/{lsp-M54FQARP.js → lsp-DYFFHKB3.js} +6 -3
  279. package/chunks/{managed-npm-update-WEA5XMFZ.js → managed-npm-update-VRSID5W3.js} +91 -67
  280. package/chunks/mcp-DQEPGE5B.js +148 -0
  281. package/chunks/memory-side-query-DRV7FXK4.js +221 -0
  282. package/chunks/model-call-collection-HXYIVZDO.js +171 -0
  283. package/chunks/model-configuration-5FJL5BJE.js +161 -0
  284. package/chunks/modelConfigUtils-UE3FDHG3.js +140 -0
  285. package/chunks/{monitor-CI7YE7MT.js → monitor-IRKGV3RU.js} +63 -51
  286. package/chunks/nonInteractiveCli-LF5DTTUJ.js +235 -0
  287. package/chunks/nonInteractiveToolExecutor-KGIGCNUC.js +101 -0
  288. package/chunks/{notebook-edit-3WCVRNGL.js → notebook-edit-E2NGGRVT.js} +63 -52
  289. package/chunks/ocr-image-Q4HYJ3U7.js +252 -0
  290. package/chunks/omni-EHZU5MVU.js +147 -0
  291. package/chunks/{openaiContentGenerator-OGILGUZE.js → openaiContentGenerator-VZ4QWOSU.js} +36 -31
  292. package/chunks/{openaiResponsesContentGenerator-NXOXUPFM.js → openaiResponsesContentGenerator-OQFPKE6V.js} +15 -12
  293. package/chunks/pidfile-OQREIPGE.js +151 -0
  294. package/chunks/{processUtils-O4II3RYH.js → processUtils-VFFEEP7L.js} +2 -2
  295. package/chunks/prompt-terminal-ledger-46ELXYOX.js +143 -0
  296. package/chunks/{qwenContentGenerator-I4LRYADV.js → qwenContentGenerator-H3CWSIV5.js} +70 -60
  297. package/chunks/{qwenOAuth2-3J66TOT5.js → qwenOAuth2-GD3UIYUP.js} +9 -8
  298. package/chunks/reactive-degrade-KRTLV22M.js +375 -0
  299. package/chunks/read-file-BSZJVJ4F.js +37 -0
  300. package/chunks/{read-mcp-resource-LPSWXVOD.js → read-mcp-resource-INJIV3UC.js} +8 -4
  301. package/chunks/recall-media-memory-tool-PEE2BWRY.js +198 -0
  302. package/chunks/{record-artifact-L3CFJOMA.js → record-artifact-KKW3AIMJ.js} +6 -4
  303. package/chunks/record-source-OZ7JQFJK.js +24 -0
  304. package/chunks/{report-findings-LY5HQY4K.js → report-findings-OZSLWYAS.js} +7 -5
  305. package/chunks/{request-shutdown-53SNYGVR.js → request-shutdown-NMWMWGNR.js} +12 -9
  306. package/chunks/resumeHistoryUtils-P33LLL4M.js +156 -0
  307. package/chunks/ripGrep-2FWQ6RU3.js +43 -0
  308. package/chunks/{run-qwen-serve-ZVEKGS7Y.js → run-qwen-serve-HMQ2QCS7.js} +85 -73
  309. package/chunks/runtime-5X746HBH.js +188 -0
  310. package/chunks/sandbox-5FENHQ3J.js +170 -0
  311. package/chunks/sandboxConfig-7V6K3L4N.js +138 -0
  312. package/chunks/scheduled-tasks-Z4YOCKQV.js +167 -0
  313. package/chunks/scheduler-64LTQG3P.js +160 -0
  314. package/chunks/{sdk-exporters-http-DR4G663K.js → sdk-exporters-http-SWXTEEVT.js} +3 -2
  315. package/chunks/{sdk-impl-SJR26MQF.js → sdk-impl-FK4JY6LX.js} +5 -4
  316. package/chunks/{send-message-DN76MXDX.js → send-message-SNCXOZA7.js} +16 -13
  317. package/chunks/serve-C56AM3HW.js +156 -0
  318. package/chunks/{server-UHMKPCAZ.js → server-5NPGYNJG.js} +2169 -529
  319. package/chunks/{session-ZLUK7E4P.js → session-JOY4PHTN.js} +152 -128
  320. package/chunks/session-attachments-root-765GPAJU.js +141 -0
  321. package/chunks/{session-pr-refresh-3OMTQWCZ.js → session-pr-refresh-JUKB3A7P.js} +95 -71
  322. package/chunks/{settings-P4DHIIUP.js → settings-P326ULSH.js} +95 -71
  323. package/chunks/{shell-IMFUVQQ5.js → shell-747O3UYW.js} +59 -49
  324. package/chunks/{skill-NB5RJGZW.js → skill-DOHHQC32.js} +22 -17
  325. package/chunks/skill-settings-RI5JR6ZG.js +164 -0
  326. package/chunks/spawnChannel-745P6IB6.js +152 -0
  327. package/chunks/standalone-update-JC4E4UEO.js +156 -0
  328. package/chunks/{start-opentui-ui-JKAIWGF7.js → start-opentui-ui-RC62XZUC.js} +1611 -800
  329. package/chunks/{startInteractiveUI-YRPOT6GH.js → startInteractiveUI-PIBA3ADH.js} +521 -374
  330. package/chunks/storage-VZECDJNX.js +17 -0
  331. package/chunks/{syntheticOutput-EX5L5GYI.js → syntheticOutput-SSXJ2NEY.js} +5 -3
  332. package/chunks/task-create-FD3EJI7F.js +30 -0
  333. package/chunks/{task-list-ZLJSMRFA.js → task-list-GA5GOR74.js} +9 -6
  334. package/chunks/{task-stop-MD7P6QGK.js → task-stop-3MXTDL7H.js} +6 -3
  335. package/chunks/{task-update-3LSYQDRW.js → task-update-YHFYE7L6.js} +16 -13
  336. package/chunks/{team-create-2XTBYRJF.js → team-create-PJYGG3AE.js} +62 -51
  337. package/chunks/{team-delete-RIDINW6I.js → team-delete-V2CROTI6.js} +9 -6
  338. package/chunks/{team-plan-approval-CFNWW7ZQ.js → team-plan-approval-B36IMXRL.js} +61 -50
  339. package/chunks/terminal-image-renderer-7OSAIRLS.js +156 -0
  340. package/chunks/theme-manager-PVMU3VN5.js +140 -0
  341. package/chunks/{todoWrite-XSTG2VT5.js → todoWrite-LT75PK2W.js} +8 -5
  342. package/chunks/tool-result-media-S6D7T7TZ.js +45 -0
  343. package/chunks/{tool-search-ZHTJU2MV.js → tool-search-MNRENFML.js} +43 -21
  344. package/chunks/total-session-admission-XOFLP43R.js +151 -0
  345. package/chunks/transcribe-audio-AJQZPNEV.js +30 -0
  346. package/chunks/trustedFolders-SBORXKH4.js +160 -0
  347. package/chunks/understand-video-segments-5TMRDQUB.js +438 -0
  348. package/chunks/{update-relaunch-LI7GRP36.js → update-relaunch-FVAD6CYB.js} +5 -5
  349. package/chunks/updateCheck-PK4QHA67.js +156 -0
  350. package/chunks/upload-cache-5YULQVZZ.js +17 -0
  351. package/chunks/upload-config-AZ63YJU2.js +25 -0
  352. package/chunks/useAutoAcceptIndicator-SPTOOUWR.js +158 -0
  353. package/chunks/{validateNonInterActiveAuth-YFPCYYNL.js → validateNonInterActiveAuth-XXHRLXWV.js} +144 -120
  354. package/chunks/{version-4MTL4JVU.js → version-AGTZHZNY.js} +1 -1
  355. package/chunks/{web-fetch-O6RG6ISB.js → web-fetch-KMXKLQKY.js} +27 -20
  356. package/chunks/{web-search-JHAXVEMD.js → web-search-OLBQWW2Y.js} +14 -11
  357. package/chunks/{web-shell-static-FFWCUUZS.js → web-shell-static-XSCCMXKQ.js} +3 -3
  358. package/chunks/{workflow-O7L6VDYU.js → workflow-2LC5ZV4Z.js} +214 -73
  359. package/chunks/workspace-providers-status-4IJHDGCM.js +154 -0
  360. package/chunks/{workspace-registration-store-7G4E7YPY.js → workspace-registration-store-M4LBEY5A.js} +1 -1
  361. package/chunks/workspace-registry-D4HQ3TWX.js +160 -0
  362. package/chunks/workspace-runtime-coordinator-ZG3IRRQ6.js +163 -0
  363. package/chunks/workspace-service-7ORHK4P4.js +165 -0
  364. package/chunks/workspace-skills-status-J43O7A5Q.js +151 -0
  365. package/chunks/{workspace-trust-reconciler-XEBW5FUL.js → workspace-trust-reconciler-7ZMDX27O.js} +99 -75
  366. package/chunks/write-file-MWN2PNMG.js +107 -0
  367. package/chunks/{zh-TW-S3YTQ4DS.js → zh-TW-SRB5QSER.js} +16 -0
  368. package/chunks/{zh-F76MZTL3.js → zh-UBQIFP4A.js} +16 -0
  369. package/chunks/{zoom-image-RDPRTP4B.js → zoom-image-H7MLEC2E.js} +18 -13
  370. package/cli.js +14 -14
  371. package/export-transcript-document.js +52 -52
  372. package/locales/en.js +18 -0
  373. package/locales/zh-TW.js +17 -0
  374. package/locales/zh.js +17 -0
  375. package/package.json +3 -3
  376. package/web-shell/assets/{abnfDiagram-VCTEODGH-RxykUDmi.js → abnfDiagram-VCTEODGH-L57MVQ_O.js} +1 -1
  377. package/web-shell/assets/{arc-CZpgGCJC.js → arc-Cdl4BCU9.js} +1 -1
  378. package/web-shell/assets/{architectureDiagram-5GKGNRK7-BHSMzNDT.js → architectureDiagram-5GKGNRK7-wLGfVuoB.js} +1 -1
  379. package/web-shell/assets/{blockDiagram-NRAW4CY4-Bn4mF9SZ.js → blockDiagram-NRAW4CY4-LXdTypiA.js} +1 -1
  380. package/web-shell/assets/{c4Diagram-UCG6FXSJ-CBM-Bj6t.js → c4Diagram-UCG6FXSJ-Ci95CJAD.js} +1 -1
  381. package/web-shell/assets/channel-DwdlDVan.js +1 -0
  382. package/web-shell/assets/{chunk-2Q5K7J3B-D5Fin58O.js → chunk-2Q5K7J3B-CTb0CG3P.js} +1 -1
  383. package/web-shell/assets/{chunk-5VM5RSS4-CY05weF7.js → chunk-5VM5RSS4-BIyA8dbi.js} +1 -1
  384. package/web-shell/assets/{chunk-F27PBJKO-3neZnj5Y.js → chunk-F27PBJKO-BlcPeoaN.js} +1 -1
  385. package/web-shell/assets/{chunk-G27WJ6UU-Cd7EU4BE.js → chunk-G27WJ6UU-KdH5H1ne.js} +1 -1
  386. package/web-shell/assets/{chunk-JWPE2WC7-DwK1mqFw.js → chunk-JWPE2WC7-DEh0r7ty.js} +1 -1
  387. package/web-shell/assets/{chunk-LCL6LL3I-Sl7vY22C.js → chunk-LCL6LL3I-DwD-l0mq.js} +1 -1
  388. package/web-shell/assets/{chunk-POPQ4Y6H-BXNzpbVg.js → chunk-POPQ4Y6H-D_ybAWGG.js} +1 -1
  389. package/web-shell/assets/{chunk-SVP7TREG-DjjButcp.js → chunk-SVP7TREG-Bk6Dq0yA.js} +1 -1
  390. package/web-shell/assets/{chunk-XXDRQBXY-DNOiCjOJ.js → chunk-XXDRQBXY-D4vL2YuW.js} +1 -1
  391. package/web-shell/assets/classDiagram-DTDB5LWJ-CIyD-qft.js +1 -0
  392. package/web-shell/assets/classDiagram-v2-JRS7N3AN-CIyD-qft.js +1 -0
  393. package/web-shell/assets/{cose-bilkent-JH36ORCC-BUnker7a.js → cose-bilkent-JH36ORCC-BditfMcM.js} +1 -1
  394. package/web-shell/assets/{cynefin-OW5HDTMX-DcUgdWE5.js → cynefin-OW5HDTMX-DAlaYMkD.js} +1 -1
  395. package/web-shell/assets/{cynefinDiagram-5FMLGOSQ-CvDKsZsL.js → cynefinDiagram-5FMLGOSQ-B9jOfS3X.js} +1 -1
  396. package/web-shell/assets/{dagre-3AP2YEHR-jpCmUbr1.js → dagre-3AP2YEHR-DO6EyeMX.js} +1 -1
  397. package/web-shell/assets/{diagram-S7CK7UJ4-DBe_bKE5.js → diagram-S7CK7UJ4-DIwGJ7mC.js} +1 -1
  398. package/web-shell/assets/{diagram-UQ7AKVKN-oXvPpDgs.js → diagram-UQ7AKVKN-DT5RqZBV.js} +1 -1
  399. package/web-shell/assets/{diagram-VSXAHHWV-BD7-_SGh.js → diagram-VSXAHHWV-DJBMayCs.js} +1 -1
  400. package/web-shell/assets/{diagram-VX7I27RA-DOJL0wub.js → diagram-VX7I27RA-BllSiq1w.js} +1 -1
  401. package/web-shell/assets/{diagram-Z3DM3KII-DRIiodDD.js → diagram-Z3DM3KII-Vw1NsAH3.js} +1 -1
  402. package/web-shell/assets/{ebnfDiagram-PWID7BFC-Db31Ulmb.js → ebnfDiagram-PWID7BFC-TY7loKI3.js} +1 -1
  403. package/web-shell/assets/{erDiagram-SSCWMZ5O-CVHhwI2_.js → erDiagram-SSCWMZ5O-BYrxi-FK.js} +1 -1
  404. package/web-shell/assets/{flowDiagram-A5DVABFB-DWOFy1FK.js → flowDiagram-A5DVABFB-BTQ4IRh-.js} +1 -1
  405. package/web-shell/assets/{ganttDiagram-EL5Y4UJY-C0sxQtPd.js → ganttDiagram-EL5Y4UJY-96GXN9_Z.js} +1 -1
  406. package/web-shell/assets/{gitGraphDiagram-WWUBYQGX-CNituBYC.js → gitGraphDiagram-WWUBYQGX-BgIxQjuh.js} +1 -1
  407. package/web-shell/assets/{index-B15NlwB8.js → index-BvmsVGIg.js} +472 -465
  408. package/web-shell/assets/{index-BSrS0tQ6.css → index-D0aLpdAG.css} +2 -2
  409. package/web-shell/assets/{index-gm9tLk7h.js → index-SPar5CcF.js} +1 -1
  410. package/web-shell/assets/{infoDiagram-RXCK75RN-CxhJYtIR.js → infoDiagram-RXCK75RN-BlyUMpEA.js} +1 -1
  411. package/web-shell/assets/{ishikawaDiagram-5VMMS53U-By2mchUy.js → ishikawaDiagram-5VMMS53U-94uLMZ3k.js} +1 -1
  412. package/web-shell/assets/{journeyDiagram-EYS64GPL-CVH-OweI.js → journeyDiagram-EYS64GPL-DbnJfG3S.js} +1 -1
  413. package/web-shell/assets/{kanban-definition-3QL26DDD-Cc9dQXLy.js → kanban-definition-3QL26DDD-gjWM2ioU.js} +1 -1
  414. package/web-shell/assets/{layout-C_60ysHw.js → layout-CmDpGoK-.js} +1 -1
  415. package/web-shell/assets/{linear-BvAVfqwu.js → linear-DksWgqn0.js} +1 -1
  416. package/web-shell/assets/{mermaid.core-C3CoBKAc.js → mermaid.core-DCpE5atR.js} +6 -6
  417. package/web-shell/assets/{mindmap-definition-FBJOCRG2-Cuu8Q8LM.js → mindmap-definition-FBJOCRG2-DanEOvck.js} +1 -1
  418. package/web-shell/assets/{pegDiagram-XKGWAZYB-DmAeyDO2.js → pegDiagram-XKGWAZYB-V2ee76OP.js} +1 -1
  419. package/web-shell/assets/{pieDiagram-E7YTZNPT-B7vbB_xv.js → pieDiagram-E7YTZNPT-CYvmbkkp.js} +1 -1
  420. package/web-shell/assets/{quadrantDiagram-AXDQQJYC-BqOBkRR7.js → quadrantDiagram-AXDQQJYC-BRkw6ha0.js} +1 -1
  421. package/web-shell/assets/{railroadDiagram-O6MQD6OU-sI06lZIu.js → railroadDiagram-O6MQD6OU-D_YmVT7T.js} +1 -1
  422. package/web-shell/assets/{requirementDiagram-EFPCY7ZU-Bg13d10S.js → requirementDiagram-EFPCY7ZU-DTF9UgWw.js} +1 -1
  423. package/web-shell/assets/{sankeyDiagram-P5KCCOFB-WFOzZHrR.js → sankeyDiagram-P5KCCOFB-znmuOvtK.js} +1 -1
  424. package/web-shell/assets/{sequenceDiagram-WJ2MYXX4-CCdRbA4E.js → sequenceDiagram-WJ2MYXX4-B8CE9gDr.js} +1 -1
  425. package/web-shell/assets/{sizeCapture-X5ZJPWSS-BH5F3bGg.js → sizeCapture-X5ZJPWSS-BqE_jooQ.js} +1 -1
  426. package/web-shell/assets/{stateDiagram-HBIQ2CUA-NwS2X3QB.js → stateDiagram-HBIQ2CUA-4AmlCOLW.js} +1 -1
  427. package/web-shell/assets/stateDiagram-v2-4QOOHH4V-DwExf4Jm.js +1 -0
  428. package/web-shell/assets/{swimlanes-XN3QIQJK-Bm38pM28.js → swimlanes-XN3QIQJK-B40gtZOq.js} +1 -1
  429. package/web-shell/assets/swimlanesDiagram-VK2B7HYN-CXXUsHPj.js +8 -0
  430. package/web-shell/assets/{timeline-definition-24CTP7MA-Do-agLSo.js → timeline-definition-24CTP7MA-B23KIwTc.js} +1 -1
  431. package/web-shell/assets/{vennDiagram-4TSXK5OY-aggLfZzl.js → vennDiagram-4TSXK5OY-eyJpBjg6.js} +1 -1
  432. package/web-shell/assets/{wardleyDiagram-VM6X3IG4-D5JR3mXX.js → wardleyDiagram-VM6X3IG4-BBjaaHeP.js} +1 -1
  433. package/web-shell/assets/{xychartDiagram-S5SC5T6Z-DhtLDuXs.js → xychartDiagram-S5SC5T6Z-Cq3Bnvj4.js} +1 -1
  434. package/web-shell/index.html +2 -2
  435. package/chunks/MaxSizedBox-FCF6M53W.js +0 -124
  436. package/chunks/acp-subagent-executor-TND6W2O5.js +0 -140
  437. package/chunks/agent-headless-EJ4QOUSM.js +0 -94
  438. package/chunks/bridge-MUX5YJZT.js +0 -132
  439. package/chunks/channel-settings-store-7CBIRZER.js +0 -134
  440. package/chunks/chunk-FIJODK52.js +0 -154
  441. package/chunks/chunk-OALXNGUA.js +0 -2137
  442. package/chunks/chunk-PF7GAP6K.js +0 -16861
  443. package/chunks/config-utils-KX2YS725.js +0 -127
  444. package/chunks/contextCommand-RV6Y5LNJ.js +0 -120
  445. package/chunks/daemon-status-provider-NULJNAEV.js +0 -131
  446. package/chunks/daemon-trust-policy-S4KWGPV3.js +0 -126
  447. package/chunks/deferred-core-runtime-T23ZT443.js +0 -128
  448. package/chunks/environment-TSQJUTPV.js +0 -143
  449. package/chunks/errors-RIVYJS6T.js +0 -127
  450. package/chunks/exitPlanMode-BYBBFN2T.js +0 -92
  451. package/chunks/handleAutoUpdate-FZP45KOR.js +0 -123
  452. package/chunks/i18n-OTB62AKW.js +0 -140
  453. package/chunks/initializer-4JXZEC4B.js +0 -127
  454. package/chunks/installationInfo-2IJV5QKC.js +0 -121
  455. package/chunks/list-KQSQ4A5G.js +0 -130
  456. package/chunks/loadedSettingsAdapter-TZTTNRHI.js +0 -124
  457. package/chunks/mcp-TFDTUPIA.js +0 -124
  458. package/chunks/model-configuration-ZCAKKIOF.js +0 -137
  459. package/chunks/modelConfigUtils-J3ZPW7ZK.js +0 -116
  460. package/chunks/nonInteractiveCli-GPT3TVOK.js +0 -211
  461. package/chunks/pidfile-GBTBIGHF.js +0 -127
  462. package/chunks/prompt-terminal-ledger-ILIXZI3E.js +0 -119
  463. package/chunks/read-file-G4XKW2CS.js +0 -31
  464. package/chunks/record-source-2GSY5JD5.js +0 -22
  465. package/chunks/resumeHistoryUtils-YPJU4XFE.js +0 -132
  466. package/chunks/ripGrep-AAKMALLM.js +0 -39
  467. package/chunks/runtime-SJCRYNPA.js +0 -164
  468. package/chunks/sandbox-UIXL423Z.js +0 -146
  469. package/chunks/sandboxConfig-CY343YNJ.js +0 -114
  470. package/chunks/scheduled-tasks-5UGBEVNZ.js +0 -143
  471. package/chunks/scheduler-GCZYLZ2P.js +0 -136
  472. package/chunks/serve-2XXQLVK2.js +0 -132
  473. package/chunks/session-attachments-root-DHQM5IEZ.js +0 -117
  474. package/chunks/skill-settings-IXG5CTQO.js +0 -140
  475. package/chunks/spawnChannel-Q3YALTCJ.js +0 -128
  476. package/chunks/standalone-update-H5OJ7MM7.js +0 -132
  477. package/chunks/task-create-75HVPEAH.js +0 -28
  478. package/chunks/terminal-image-renderer-UDPJPGPQ.js +0 -132
  479. package/chunks/theme-manager-SK57EKMO.js +0 -116
  480. package/chunks/total-session-admission-UUZBDQCG.js +0 -127
  481. package/chunks/trustedFolders-4LDBLNTS.js +0 -136
  482. package/chunks/updateCheck-PKSSORPO.js +0 -132
  483. package/chunks/useAutoAcceptIndicator-I32UEQPI.js +0 -134
  484. package/chunks/workspace-providers-status-WRX6CJM4.js +0 -130
  485. package/chunks/workspace-registry-SXIMGT4D.js +0 -136
  486. package/chunks/workspace-runtime-coordinator-7DOEHXYT.js +0 -139
  487. package/chunks/workspace-service-HDXOZMYC.js +0 -141
  488. package/chunks/workspace-skills-status-VN4L37CA.js +0 -127
  489. package/chunks/write-file-LKX4ETIO.js +0 -97
  490. package/web-shell/assets/channel-DFYs_LlK.js +0 -1
  491. package/web-shell/assets/classDiagram-DTDB5LWJ-DnGrKXoM.js +0 -1
  492. package/web-shell/assets/classDiagram-v2-JRS7N3AN-DnGrKXoM.js +0 -1
  493. package/web-shell/assets/stateDiagram-v2-4QOOHH4V-1aU2JZXO.js +0 -1
  494. package/web-shell/assets/swimlanesDiagram-VK2B7HYN-Dp-u6kQG.js +0 -8
  495. package/chunks/{chunk-XAJZFGD2.js → chunk-PXXYQOZO.js} +8 -8
  496. package/chunks/{chunk-WVURIAEE.js → chunk-SVWWF5TZ.js} +3 -3
  497. package/chunks/{dist-G5UMXIGF.js → dist-I6D6XOWV.js} +1 -1
  498. package/chunks/{dist-UXVNLQHG.js → dist-VIKOMAGG.js} +3 -3
@@ -1,2137 +0,0 @@
1
- // Force strict mode and setup for ESM
2
- "use strict";
3
- import {
4
- disableMouseEvents,
5
- enableMouseEvents,
6
- useKeypress,
7
- useKeypressContext
8
- } from "./chunk-M22WLKLI.js";
9
- import {
10
- ICON
11
- } from "./chunk-36NRLIR6.js";
12
- import {
13
- theme
14
- } from "./chunk-4LIPOIXS.js";
15
- import {
16
- require_jsx_runtime
17
- } from "./chunk-SV5PQVQE.js";
18
- import {
19
- Box_default,
20
- Text,
21
- use_stdin_default,
22
- use_stdout_default
23
- } from "./chunk-NCPFOLM2.js";
24
- import {
25
- require_react
26
- } from "./chunk-5QWWOFGG.js";
27
- import {
28
- sanitizeForOsc,
29
- wrapForMultiplexer
30
- } from "./chunk-DC4ZNGH4.js";
31
- import {
32
- MAIN_SOURCE,
33
- uiTelemetryService
34
- } from "./chunk-CDDP4ONL.js";
35
- import {
36
- ToolDisplayNames,
37
- ToolNames
38
- } from "./chunk-RSWBT7AZ.js";
39
- import {
40
- createDebugLogger
41
- } from "./chunk-ZAFYHRVY.js";
42
- import {
43
- init_esbuild_shims
44
- } from "./chunk-5O2XNYP6.js";
45
- import {
46
- __name,
47
- __toESM
48
- } from "./chunk-J2S4EL5Y.js";
49
-
50
- // packages/cli/src/ui/contexts/SettingsContext.tsx
51
- init_esbuild_shims();
52
- var import_react = __toESM(require_react(), 1);
53
- var SettingsContext = import_react.default.createContext(
54
- void 0
55
- );
56
- var useSettings = /* @__PURE__ */ __name(() => {
57
- const context = (0, import_react.useContext)(SettingsContext);
58
- if (context === void 0) {
59
- throw new Error("useSettings must be used within a SettingsProvider");
60
- }
61
- return context;
62
- }, "useSettings");
63
-
64
- // packages/cli/src/ui/contexts/SessionContext.tsx
65
- init_esbuild_shims();
66
- var import_react2 = __toESM(require_react(), 1);
67
- var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
68
- var EMPTY_SKILL_METRICS = {
69
- totalCalls: 0,
70
- totalSuccess: 0,
71
- totalFail: 0,
72
- byName: {}
73
- };
74
- function areModelMetricsCoreEqual(a, b) {
75
- if (a.api.totalRequests !== b.api.totalRequests || a.api.totalErrors !== b.api.totalErrors || a.api.totalLatencyMs !== b.api.totalLatencyMs) {
76
- return false;
77
- }
78
- 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) {
79
- return false;
80
- }
81
- return true;
82
- }
83
- __name(areModelMetricsCoreEqual, "areModelMetricsCoreEqual");
84
- function areModelMetricsEqual(a, b) {
85
- if (!areModelMetricsCoreEqual(a, b)) return false;
86
- const aKeys = Object.keys(a.bySource);
87
- const bKeys = Object.keys(b.bySource);
88
- if (aKeys.length !== bKeys.length) return false;
89
- for (const key of aKeys) {
90
- const aSource = a.bySource[key];
91
- const bSource = b.bySource[key];
92
- if (!bSource || !areModelMetricsCoreEqual(aSource, bSource)) {
93
- return false;
94
- }
95
- }
96
- return true;
97
- }
98
- __name(areModelMetricsEqual, "areModelMetricsEqual");
99
- function areToolCallStatsEqual(a, b) {
100
- if (a.count !== b.count || a.success !== b.success || a.fail !== b.fail || a.durationMs !== b.durationMs) {
101
- return false;
102
- }
103
- 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 */]) {
104
- return false;
105
- }
106
- return true;
107
- }
108
- __name(areToolCallStatsEqual, "areToolCallStatsEqual");
109
- function areSkillCallStatsEqual(a, b) {
110
- return a.count === b.count && a.success === b.success && a.fail === b.fail;
111
- }
112
- __name(areSkillCallStatsEqual, "areSkillCallStatsEqual");
113
- function areSkillMetricsEqual(a, b) {
114
- if (a.totalCalls !== b.totalCalls || a.totalSuccess !== b.totalSuccess || a.totalFail !== b.totalFail) {
115
- return false;
116
- }
117
- const aKeys = Object.keys(a.byName);
118
- const bKeys = Object.keys(b.byName);
119
- if (aKeys.length !== bKeys.length) return false;
120
- for (const key of aKeys) {
121
- const skillA = a.byName[key];
122
- const skillB = b.byName[key];
123
- if (!skillB || !areSkillCallStatsEqual(skillA, skillB)) {
124
- return false;
125
- }
126
- }
127
- return true;
128
- }
129
- __name(areSkillMetricsEqual, "areSkillMetricsEqual");
130
- function areGenerationMetricsEqual(a, b) {
131
- if (a === b) return true;
132
- if (!a || !b) return false;
133
- if (a.timedRequests !== b.timedRequests || a.totalTtftMs !== b.totalTtftMs || a.totalGenerationDurationMs !== b.totalGenerationDurationMs || a.totalThroughputOutputTokens !== b.totalThroughputOutputTokens) {
134
- return false;
135
- }
136
- if (a.last === b.last) return true;
137
- if (!a.last || !b.last) return false;
138
- return a.last.model === b.last.model && a.last.ttftMs === b.last.ttftMs && a.last.generationDurationMs === b.last.generationDurationMs && a.last.outputTokens === b.last.outputTokens;
139
- }
140
- __name(areGenerationMetricsEqual, "areGenerationMetricsEqual");
141
- function areMetricsEqual(a, b) {
142
- if (a === b) return true;
143
- if (!a || !b) return false;
144
- if (!areGenerationMetricsEqual(a.generation, b.generation)) {
145
- return false;
146
- }
147
- if (a.files.totalLinesAdded !== b.files.totalLinesAdded || a.files.totalLinesRemoved !== b.files.totalLinesRemoved) {
148
- return false;
149
- }
150
- const toolsA = a.tools;
151
- const toolsB = b.tools;
152
- if (toolsA.totalCalls !== toolsB.totalCalls || toolsA.totalSuccess !== toolsB.totalSuccess || toolsA.totalFail !== toolsB.totalFail || toolsA.totalDurationMs !== toolsB.totalDurationMs) {
153
- return false;
154
- }
155
- 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 */]) {
156
- return false;
157
- }
158
- const toolsByNameAKeys = Object.keys(toolsA.byName);
159
- const toolsByNameBKeys = Object.keys(toolsB.byName);
160
- if (toolsByNameAKeys.length !== toolsByNameBKeys.length) return false;
161
- for (const key of toolsByNameAKeys) {
162
- const toolA = toolsA.byName[key];
163
- const toolB = toolsB.byName[key];
164
- if (!toolB || !areToolCallStatsEqual(toolA, toolB)) {
165
- return false;
166
- }
167
- }
168
- if (!areSkillMetricsEqual(
169
- a.skills ?? EMPTY_SKILL_METRICS,
170
- b.skills ?? EMPTY_SKILL_METRICS
171
- )) {
172
- return false;
173
- }
174
- const modelsAKeys = Object.keys(a.models);
175
- const modelsBKeys = Object.keys(b.models);
176
- if (modelsAKeys.length !== modelsBKeys.length) return false;
177
- for (const key of modelsAKeys) {
178
- if (!b.models[key] || !areModelMetricsEqual(a.models[key], b.models[key])) {
179
- return false;
180
- }
181
- }
182
- return true;
183
- }
184
- __name(areMetricsEqual, "areMetricsEqual");
185
- function cloneSessionMetrics(metrics) {
186
- return {
187
- models: Object.fromEntries(
188
- Object.entries(metrics.models).map(([name, model]) => [
189
- name,
190
- {
191
- api: { ...model.api },
192
- tokens: { ...model.tokens },
193
- bySource: Object.fromEntries(
194
- Object.entries(model.bySource).map(([source, sourceMetrics]) => [
195
- source,
196
- {
197
- api: { ...sourceMetrics.api },
198
- tokens: { ...sourceMetrics.tokens }
199
- }
200
- ])
201
- )
202
- }
203
- ])
204
- ),
205
- ...metrics.generation ? {
206
- generation: {
207
- timedRequests: metrics.generation.timedRequests,
208
- totalTtftMs: metrics.generation.totalTtftMs,
209
- totalGenerationDurationMs: metrics.generation.totalGenerationDurationMs,
210
- totalThroughputOutputTokens: metrics.generation.totalThroughputOutputTokens,
211
- ...metrics.generation.last ? { last: { ...metrics.generation.last } } : {}
212
- }
213
- } : {},
214
- tools: {
215
- totalCalls: metrics.tools.totalCalls,
216
- totalSuccess: metrics.tools.totalSuccess,
217
- totalFail: metrics.tools.totalFail,
218
- totalDurationMs: metrics.tools.totalDurationMs,
219
- totalDecisions: { ...metrics.tools.totalDecisions },
220
- byName: Object.fromEntries(
221
- Object.entries(metrics.tools.byName).map(([name, stats]) => [
222
- name,
223
- {
224
- count: stats.count,
225
- success: stats.success,
226
- fail: stats.fail,
227
- durationMs: stats.durationMs,
228
- decisions: { ...stats.decisions }
229
- }
230
- ])
231
- )
232
- },
233
- files: {
234
- totalLinesAdded: metrics.files.totalLinesAdded,
235
- totalLinesRemoved: metrics.files.totalLinesRemoved
236
- },
237
- ...metrics.skills ? {
238
- skills: {
239
- totalCalls: metrics.skills.totalCalls,
240
- totalSuccess: metrics.skills.totalSuccess,
241
- totalFail: metrics.skills.totalFail,
242
- byName: Object.fromEntries(
243
- Object.entries(metrics.skills.byName).map(([name, stats]) => [
244
- name,
245
- {
246
- count: stats.count,
247
- success: stats.success,
248
- fail: stats.fail
249
- }
250
- ])
251
- )
252
- }
253
- } : {}
254
- };
255
- }
256
- __name(cloneSessionMetrics, "cloneSessionMetrics");
257
- function getMetricsForDisplay(sessionId) {
258
- return cloneSessionMetrics(
259
- sessionId ? uiTelemetryService.getMetricsForSession(sessionId) : uiTelemetryService.getMetrics()
260
- );
261
- }
262
- __name(getMetricsForDisplay, "getMetricsForDisplay");
263
- var SessionStatsContext = (0, import_react2.createContext)(
264
- void 0
265
- );
266
- var createDefaultStats = /* @__PURE__ */ __name((sessionId = "") => ({
267
- sessionId,
268
- sessionStartTime: /* @__PURE__ */ new Date(),
269
- metrics: getMetricsForDisplay(sessionId),
270
- lastPromptTokenCount: 0,
271
- promptCount: 0
272
- }), "createDefaultStats");
273
- var SessionStatsProvider = /* @__PURE__ */ __name(({ sessionId, children }) => {
274
- const [stats, setStats] = (0, import_react2.useState)(
275
- () => createDefaultStats(sessionId ?? "")
276
- );
277
- (0, import_react2.useEffect)(() => {
278
- const handleUpdate = /* @__PURE__ */ __name(({
279
- metrics,
280
- lastPromptTokenCount
281
- }) => {
282
- setStats((prevState) => {
283
- const nextMetrics = prevState.sessionId ? getMetricsForDisplay(prevState.sessionId) : cloneSessionMetrics(metrics);
284
- if (prevState.lastPromptTokenCount === lastPromptTokenCount && areMetricsEqual(prevState.metrics, nextMetrics)) {
285
- return prevState;
286
- }
287
- return {
288
- ...prevState,
289
- metrics: nextMetrics,
290
- lastPromptTokenCount
291
- };
292
- });
293
- }, "handleUpdate");
294
- uiTelemetryService.on("update", handleUpdate);
295
- handleUpdate({
296
- metrics: uiTelemetryService.getMetrics(),
297
- lastPromptTokenCount: uiTelemetryService.getLastPromptTokenCount()
298
- });
299
- return () => {
300
- uiTelemetryService.off("update", handleUpdate);
301
- };
302
- }, []);
303
- const startNewSession = (0, import_react2.useCallback)((sessionId2) => {
304
- setStats(() => ({
305
- ...createDefaultStats(sessionId2),
306
- lastPromptTokenCount: uiTelemetryService.getLastPromptTokenCount()
307
- }));
308
- }, []);
309
- const startNewPrompt = (0, import_react2.useCallback)(() => {
310
- setStats((prevState) => ({
311
- ...prevState,
312
- promptCount: prevState.promptCount + 1
313
- }));
314
- }, []);
315
- const getPromptCount = (0, import_react2.useCallback)(
316
- () => stats.promptCount,
317
- [stats.promptCount]
318
- );
319
- const seedPromptCount = (0, import_react2.useCallback)((count) => {
320
- setStats((prevState) => ({
321
- ...prevState,
322
- promptCount: Math.max(prevState.promptCount, count)
323
- }));
324
- }, []);
325
- const value = (0, import_react2.useMemo)(
326
- () => ({
327
- stats,
328
- startNewSession,
329
- startNewPrompt,
330
- getPromptCount,
331
- seedPromptCount
332
- }),
333
- [stats, startNewSession, startNewPrompt, getPromptCount, seedPromptCount]
334
- );
335
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SessionStatsContext.Provider, { value, children });
336
- }, "SessionStatsProvider");
337
- var useSessionStats = /* @__PURE__ */ __name(() => {
338
- const context = (0, import_react2.useContext)(SessionStatsContext);
339
- if (context === void 0) {
340
- throw new Error(
341
- "useSessionStats must be used within a SessionStatsProvider"
342
- );
343
- }
344
- return context;
345
- }, "useSessionStats");
346
-
347
- // packages/cli/src/ui/hooks/useTerminalSize.ts
348
- init_esbuild_shims();
349
- var import_react3 = __toESM(require_react(), 1);
350
- function getTerminalSize() {
351
- return {
352
- columns: process.stdout.columns || 80,
353
- rows: process.stdout.rows || 24
354
- };
355
- }
356
- __name(getTerminalSize, "getTerminalSize");
357
- var currentSize = getTerminalSize();
358
- var subscribers = /* @__PURE__ */ new Set();
359
- function handleResize() {
360
- currentSize = getTerminalSize();
361
- for (const notify of subscribers) {
362
- notify(currentSize);
363
- }
364
- }
365
- __name(handleResize, "handleResize");
366
- function subscribe(callback) {
367
- if (subscribers.size === 0) {
368
- currentSize = getTerminalSize();
369
- process.stdout.on("resize", handleResize);
370
- }
371
- subscribers.add(callback);
372
- return () => {
373
- subscribers.delete(callback);
374
- if (subscribers.size === 0) {
375
- process.stdout.off("resize", handleResize);
376
- }
377
- };
378
- }
379
- __name(subscribe, "subscribe");
380
- function useTerminalSize() {
381
- const [size, setSize] = (0, import_react3.useState)(getTerminalSize);
382
- (0, import_react3.useEffect)(() => {
383
- const unsubscribe = subscribe(setSize);
384
- setSize(currentSize);
385
- return unsubscribe;
386
- }, []);
387
- return size;
388
- }
389
- __name(useTerminalSize, "useTerminalSize");
390
-
391
- // packages/cli/src/ui/utils/osc8.ts
392
- init_esbuild_shims();
393
- function osc8Open(url) {
394
- return wrapForMultiplexer(`\x1B]8;;${sanitizeForOsc(url)}\x07`);
395
- }
396
- __name(osc8Open, "osc8Open");
397
- function osc8Close() {
398
- return wrapForMultiplexer(`\x1B]8;;\x07`);
399
- }
400
- __name(osc8Close, "osc8Close");
401
- var SAFE_OSC8_SCHEMES = /* @__PURE__ */ new Set([
402
- "http:",
403
- "https:",
404
- "mailto:",
405
- "ftp:",
406
- "ftps:",
407
- "sftp:",
408
- "ssh:"
409
- ]);
410
- function isSafeOscScheme(url) {
411
- const match = url.match(/^([a-z][a-z0-9+.-]*:)/i);
412
- if (!match) return false;
413
- return SAFE_OSC8_SCHEMES.has(match[1].toLowerCase());
414
- }
415
- __name(isSafeOscScheme, "isSafeOscScheme");
416
- var BARE_URL_BREAK_CHARACTERS = String.raw`\u3001-\u3004\u3008-\u3020\u302e-\u3030\u3036-\u3037\u303d-\u303f\uff01-\uff0f\uff1a-\uff20\uff3b-\uff40\uff5b-\uff65\ufe10-\ufe1f\ufe30-\ufe32\ufe35-\ufe6f`;
417
- var BARE_URL_BREAK_PATTERN = new RegExp(`[${BARE_URL_BREAK_CHARACTERS}]`);
418
- function trimTrailingUrlPunctuation(url, nextCharacter = "") {
419
- let openParen = 0;
420
- let openBracket = 0;
421
- let openBrace = 0;
422
- let closeParen = 0;
423
- let closeBracket = 0;
424
- let closeBrace = 0;
425
- for (let i = 0; i < url.length; i++) {
426
- const cc = url.charCodeAt(i);
427
- if (cc === 40) openParen++;
428
- else if (cc === 91) openBracket++;
429
- else if (cc === 123) openBrace++;
430
- else if (cc === 41) closeParen++;
431
- else if (cc === 93) closeBracket++;
432
- else if (cc === 125) closeBrace++;
433
- }
434
- let end = url.length;
435
- if (url.charCodeAt(end - 1) === 95 && BARE_URL_BREAK_PATTERN.test(nextCharacter)) {
436
- end--;
437
- }
438
- while (end > 0) {
439
- const c = url.charCodeAt(end - 1);
440
- if (c === 46 || c === 44 || c === 59 || c === 58 || c === 33 || c === 63 || c === 39 || c === 34 || c === 96 || c === 62) {
441
- end--;
442
- continue;
443
- }
444
- if (c === 41 && closeParen > openParen) {
445
- closeParen--;
446
- end--;
447
- continue;
448
- }
449
- if (c === 93 && closeBracket > openBracket) {
450
- closeBracket--;
451
- end--;
452
- continue;
453
- }
454
- if (c === 125 && closeBrace > openBrace) {
455
- closeBrace--;
456
- end--;
457
- continue;
458
- }
459
- break;
460
- }
461
- return url.slice(0, end);
462
- }
463
- __name(trimTrailingUrlPunctuation, "trimTrailingUrlPunctuation");
464
- var MD_LINK_PATTERN = String.raw`\[.*?\]\((?:[^()]|\([^()]*\))*\)`;
465
- var MD_LINK_CAPTURE = /^\[(.*?)\]\(((?:[^()]|\([^()]*\))*)\)$/;
466
- var BARE_URL_PATTERN = String.raw`https?:\/\/[^\s${BARE_URL_BREAK_CHARACTERS}]+`;
467
- function shouldWrapMarkdownLink(url, canHyperlink) {
468
- return canHyperlink && isSafeOscScheme(url) && !/\s/.test(url);
469
- }
470
- __name(shouldWrapMarkdownLink, "shouldWrapMarkdownLink");
471
- var HOST_LIKE_RE = /\b[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?)*\.[a-z]{2,}\b/gi;
472
- var IPV4_LIKE_RE = /\b(?:\d{1,3}\.){3}\d{1,3}\b/g;
473
- function targetHostname(url) {
474
- try {
475
- const u = new URL(url);
476
- if (u.protocol === "mailto:") {
477
- const at = u.pathname.lastIndexOf("@");
478
- return at >= 0 ? u.pathname.slice(at + 1).toLowerCase() || void 0 : void 0;
479
- }
480
- return u.hostname.toLowerCase() || void 0;
481
- } catch {
482
- return void 0;
483
- }
484
- }
485
- __name(targetHostname, "targetHostname");
486
- function labelMayDeceive(label, url) {
487
- if (label === url) return false;
488
- if (/:\/\//.test(label) || /^[a-z][a-z0-9+.-]*:/i.test(label.trim())) {
489
- return true;
490
- }
491
- const lower = label.toLowerCase();
492
- const labelHosts = [
493
- ...lower.match(HOST_LIKE_RE) ?? [],
494
- ...lower.match(IPV4_LIKE_RE) ?? []
495
- ];
496
- if (labelHosts.length === 0) return false;
497
- const target = targetHostname(url);
498
- if (!target) return true;
499
- return labelHosts.some((h) => h !== target);
500
- }
501
- __name(labelMayDeceive, "labelMayDeceive");
502
-
503
- // packages/cli/src/ui/utils/displayUtils.ts
504
- init_esbuild_shims();
505
- function getArenaStatusLabel(status) {
506
- switch (status) {
507
- case "idle" /* IDLE */:
508
- return { icon: "\u2713", text: "Idle", color: theme.status.success };
509
- case "completed" /* COMPLETED */:
510
- return { icon: "\u2713", text: "Done", color: theme.status.success };
511
- case "cancelled" /* CANCELLED */:
512
- return { icon: "\u2298", text: "Cancelled", color: theme.status.warning };
513
- case "failed" /* FAILED */:
514
- return { icon: "\u2717", text: "Failed", color: theme.status.error };
515
- case "running" /* RUNNING */:
516
- return {
517
- icon: ICON.CIRCLE_EMPTY,
518
- text: "Running",
519
- color: theme.text.secondary
520
- };
521
- case "initializing" /* INITIALIZING */:
522
- return {
523
- icon: ICON.CIRCLE_EMPTY,
524
- text: "Initializing",
525
- color: theme.text.secondary
526
- };
527
- default:
528
- return {
529
- icon: ICON.CIRCLE_EMPTY,
530
- text: status,
531
- color: theme.text.secondary
532
- };
533
- }
534
- }
535
- __name(getArenaStatusLabel, "getArenaStatusLabel");
536
- var TOOL_SUCCESS_RATE_HIGH = 95;
537
- var TOOL_SUCCESS_RATE_MEDIUM = 85;
538
- var USER_AGREEMENT_RATE_HIGH = 75;
539
- var USER_AGREEMENT_RATE_MEDIUM = 45;
540
- var getStatusColor = /* @__PURE__ */ __name((value, thresholds, options = {}) => {
541
- if (value >= thresholds.green) {
542
- return theme.status.success;
543
- }
544
- if (value >= thresholds.yellow) {
545
- return theme.status.warning;
546
- }
547
- if (thresholds.red != null && value >= thresholds.red) {
548
- return theme.status.error;
549
- }
550
- return options.defaultColor ?? theme.status.error;
551
- }, "getStatusColor");
552
- function formatDuration(ms) {
553
- const totalSeconds = Math.round(ms / 1e3);
554
- if (totalSeconds < 60) {
555
- return `${totalSeconds}s`;
556
- }
557
- const minutes = Math.floor(totalSeconds / 60);
558
- const seconds = totalSeconds % 60;
559
- return seconds > 0 ? `${minutes}m ${seconds}s` : `${minutes}m`;
560
- }
561
- __name(formatDuration, "formatDuration");
562
-
563
- // packages/cli/src/config/keyBindings.ts
564
- init_esbuild_shims();
565
- var Command = /* @__PURE__ */ ((Command2) => {
566
- Command2["RETURN"] = "return";
567
- Command2["ESCAPE"] = "escape";
568
- Command2["HOME"] = "home";
569
- Command2["END"] = "end";
570
- Command2["KILL_LINE_RIGHT"] = "killLineRight";
571
- Command2["KILL_LINE_LEFT"] = "killLineLeft";
572
- Command2["CLEAR_INPUT"] = "clearInput";
573
- Command2["DELETE_WORD_BACKWARD"] = "deleteWordBackward";
574
- Command2["CLEAR_SCREEN"] = "clearScreen";
575
- Command2["HISTORY_UP"] = "historyUp";
576
- Command2["HISTORY_DOWN"] = "historyDown";
577
- Command2["NAVIGATION_UP"] = "navigationUp";
578
- Command2["NAVIGATION_DOWN"] = "navigationDown";
579
- Command2["SELECTION_UP"] = "selectionUp";
580
- Command2["SELECTION_DOWN"] = "selectionDown";
581
- Command2["ACCEPT_SUGGESTION"] = "acceptSuggestion";
582
- Command2["COMPLETION_UP"] = "completionUp";
583
- Command2["COMPLETION_DOWN"] = "completionDown";
584
- Command2["COMPLETION_TAB_LEFT"] = "completionTabLeft";
585
- Command2["COMPLETION_TAB_RIGHT"] = "completionTabRight";
586
- Command2["SUBMIT"] = "submit";
587
- Command2["QUEUE_MESSAGE"] = "queueMessage";
588
- Command2["NEWLINE"] = "newline";
589
- Command2["VOICE_PUSH_TO_TALK"] = "voicePushToTalk";
590
- Command2["OPEN_EXTERNAL_EDITOR"] = "openExternalEditor";
591
- Command2["PASTE_CLIPBOARD_IMAGE"] = "pasteClipboardImage";
592
- Command2["TOGGLE_TOOL_DESCRIPTIONS"] = "toggleToolDescriptions";
593
- Command2["TOGGLE_IDE_CONTEXT_DETAIL"] = "toggleIDEContextDetail";
594
- Command2["QUIT"] = "quit";
595
- Command2["EXIT"] = "exit";
596
- Command2["SHOW_MORE_LINES"] = "showMoreLines";
597
- Command2["RETRY_LAST"] = "retryLast";
598
- Command2["TOGGLE_RENDER_MODE"] = "toggleRenderMode";
599
- Command2["PROMOTE_SHELL_TO_BACKGROUND"] = "promoteShellToBackground";
600
- Command2["REVERSE_SEARCH"] = "reverseSearch";
601
- Command2["SUBMIT_REVERSE_SEARCH"] = "submitReverseSearch";
602
- Command2["ACCEPT_SUGGESTION_REVERSE_SEARCH"] = "acceptSuggestionReverseSearch";
603
- Command2["TOGGLE_SHELL_INPUT_FOCUS"] = "toggleShellInputFocus";
604
- Command2["EXPAND_SUGGESTION"] = "expandSuggestion";
605
- Command2["COLLAPSE_SUGGESTION"] = "collapseSuggestion";
606
- Command2["TOGGLE_THINKING_EXPANDED"] = "toggleThinkingExpanded";
607
- Command2["SCROLL_UP"] = "scrollUp";
608
- Command2["SCROLL_DOWN"] = "scrollDown";
609
- Command2["PAGE_UP"] = "pageUp";
610
- Command2["PAGE_DOWN"] = "pageDown";
611
- Command2["SCROLL_HOME"] = "scrollHome";
612
- Command2["SCROLL_END"] = "scrollEnd";
613
- return Command2;
614
- })(Command || {});
615
- var defaultKeyBindings = {
616
- // Basic bindings
617
- ["return" /* RETURN */]: [{ key: "return" }],
618
- ["escape" /* ESCAPE */]: [{ key: "escape" }],
619
- // Cursor movement
620
- ["home" /* HOME */]: [{ key: "a", ctrl: true }],
621
- ["end" /* END */]: [{ key: "e", ctrl: true }],
622
- // Text deletion
623
- ["killLineRight" /* KILL_LINE_RIGHT */]: [{ key: "k", ctrl: true }],
624
- ["killLineLeft" /* KILL_LINE_LEFT */]: [{ key: "u", ctrl: true }],
625
- ["clearInput" /* CLEAR_INPUT */]: [{ key: "c", ctrl: true, shift: false }],
626
- // Added command (meta/alt/option) for mac compatibility
627
- ["deleteWordBackward" /* DELETE_WORD_BACKWARD */]: [
628
- { key: "backspace", ctrl: true },
629
- { key: "backspace", command: true },
630
- // MinTTY (Git Bash on Windows) emits the byte \x1f (ASCII Unit
631
- // Separator, rendered as "^_" by `cat -v`) for Ctrl+Backspace under
632
- // its standard Ctrl-modifies-meta-keys convention. The same byte is
633
- // the historical Ctrl-mapping of the Unit Separator on traditional
634
- // ANSI/VT terminals (Ctrl+_ and Ctrl+/ also emit it), but qwen-code
635
- // doesn't bind those keystrokes elsewhere so this entry is additive
636
- // and non-conflicting on every platform.
637
- { sequence: "" }
638
- ],
639
- // Screen control
640
- ["clearScreen" /* CLEAR_SCREEN */]: [{ key: "l", ctrl: true }],
641
- // History navigation
642
- ["historyUp" /* HISTORY_UP */]: [{ key: "p", ctrl: true }],
643
- ["historyDown" /* HISTORY_DOWN */]: [{ key: "n", ctrl: true }],
644
- ["navigationUp" /* NAVIGATION_UP */]: [{ key: "up", shift: false }],
645
- ["navigationDown" /* NAVIGATION_DOWN */]: [{ key: "down", shift: false }],
646
- // Selection-list nav: arrows + k/j + Ctrl+P/Ctrl+N
647
- // ctrl: false on bare k/j skips Ctrl+K and Ctrl+J
648
- ["selectionUp" /* SELECTION_UP */]: [
649
- { key: "up", shift: false },
650
- { key: "k", ctrl: false },
651
- { key: "p", ctrl: true }
652
- ],
653
- ["selectionDown" /* SELECTION_DOWN */]: [
654
- { key: "down", shift: false },
655
- { key: "j", ctrl: false },
656
- { key: "n", ctrl: true }
657
- ],
658
- // Auto-completion
659
- ["acceptSuggestion" /* ACCEPT_SUGGESTION */]: [
660
- { key: "tab" },
661
- { key: "return", ctrl: false, shift: false }
662
- ],
663
- // Completion navigation: arrows + readline/Vim-style Ctrl+P/Ctrl+N
664
- ["completionUp" /* COMPLETION_UP */]: [
665
- { key: "up", shift: false },
666
- { key: "p", ctrl: true }
667
- ],
668
- ["completionDown" /* COMPLETION_DOWN */]: [
669
- { key: "down", shift: false },
670
- { key: "n", ctrl: true }
671
- ],
672
- // Completion category tab switching (for the tabbed @ completion UI).
673
- // Bound to the BARE arrow keys: Ctrl+←/→ was the original binding but many
674
- // terminals intercept it for word-jump, and on macOS the system claims it
675
- // for Mission Control, so the documented gesture was unreachable for most
676
- // users (#8069).
677
- //
678
- // Tradeoff, accepted deliberately: while the `@` category tabs are visible,
679
- // the bare arrows no longer move the caret in the input buffer — press Esc
680
- // to dismiss the menu first. InputPrompt only renders and handles the tabs
681
- // when they own the arrows, so search and attachment navigation keep their
682
- // normal behavior.
683
- //
684
- // Modifiers are pinned false so Alt/Option+arrow word movement and any
685
- // Ctrl+arrow terminal binding fall through untouched.
686
- ["completionTabLeft" /* COMPLETION_TAB_LEFT */]: [
687
- { key: "left", shift: false, ctrl: false, meta: false }
688
- ],
689
- ["completionTabRight" /* COMPLETION_TAB_RIGHT */]: [
690
- { key: "right", shift: false, ctrl: false, meta: false }
691
- ],
692
- // Text input
693
- // Must also exclude shift to allow shift+enter for newline
694
- ["submit" /* SUBMIT */]: [
695
- {
696
- key: "return",
697
- ctrl: false,
698
- command: false,
699
- paste: false,
700
- shift: false
701
- }
702
- ],
703
- ["queueMessage" /* QUEUE_MESSAGE */]: [
704
- { key: "q", ctrl: true, command: false, shift: false, paste: false }
705
- ],
706
- // Split into multiple data-driven bindings
707
- // Now also includes shift+enter for multi-line input
708
- ["newline" /* NEWLINE */]: [
709
- { key: "return", ctrl: true },
710
- { key: "return", command: true },
711
- { key: "return", paste: true },
712
- { key: "return", shift: true },
713
- { key: "j", ctrl: true }
714
- ],
715
- ["voicePushToTalk" /* VOICE_PUSH_TO_TALK */]: [{ key: "space", ctrl: false, meta: false }],
716
- // External tools
717
- ["openExternalEditor" /* OPEN_EXTERNAL_EDITOR */]: [
718
- { key: "x", ctrl: true },
719
- { sequence: "", ctrl: true }
720
- ],
721
- ["pasteClipboardImage" /* PASTE_CLIPBOARD_IMAGE */]: process.platform === "win32" ? [
722
- { key: "v", command: true },
723
- { key: "v", meta: true }
724
- ] : [
725
- { key: "v", ctrl: true },
726
- { key: "v", command: true }
727
- ],
728
- // App level bindings
729
- ["toggleToolDescriptions" /* TOGGLE_TOOL_DESCRIPTIONS */]: [{ key: "t", ctrl: true }],
730
- ["toggleIDEContextDetail" /* TOGGLE_IDE_CONTEXT_DETAIL */]: [{ key: "g", ctrl: true }],
731
- ["quit" /* QUIT */]: [{ key: "c", ctrl: true, shift: false }],
732
- ["exit" /* EXIT */]: [{ key: "d", ctrl: true }],
733
- ["showMoreLines" /* SHOW_MORE_LINES */]: [{ key: "s", ctrl: true }],
734
- ["retryLast" /* RETRY_LAST */]: [{ key: "y", ctrl: true }],
735
- ["toggleRenderMode" /* TOGGLE_RENDER_MODE */]: [{ key: "m", meta: true }],
736
- ["promoteShellToBackground" /* PROMOTE_SHELL_TO_BACKGROUND */]: [{ key: "b", ctrl: true }],
737
- // Shell commands
738
- ["reverseSearch" /* REVERSE_SEARCH */]: [{ key: "r", ctrl: true }],
739
- // Note: original logic ONLY checked ctrl=false, ignored meta/shift/paste
740
- ["submitReverseSearch" /* SUBMIT_REVERSE_SEARCH */]: [{ key: "return", ctrl: false }],
741
- ["acceptSuggestionReverseSearch" /* ACCEPT_SUGGESTION_REVERSE_SEARCH */]: [{ key: "tab" }],
742
- ["toggleShellInputFocus" /* TOGGLE_SHELL_INPUT_FOCUS */]: [{ key: "f", ctrl: true }],
743
- // Suggestion expansion
744
- ["expandSuggestion" /* EXPAND_SUGGESTION */]: [{ key: "right" }],
745
- ["collapseSuggestion" /* COLLAPSE_SUGGESTION */]: [{ key: "left" }],
746
- // Thinking expansion (Ctrl+O primary, Alt+T legacy)
747
- ["toggleThinkingExpanded" /* TOGGLE_THINKING_EXPANDED */]: [
748
- { key: "o", ctrl: true },
749
- { key: "t", meta: true }
750
- ],
751
- // Scroll commands
752
- ["scrollUp" /* SCROLL_UP */]: [{ key: "up", shift: true }],
753
- ["scrollDown" /* SCROLL_DOWN */]: [{ key: "down", shift: true }],
754
- ["pageUp" /* PAGE_UP */]: [{ key: "pageup" }],
755
- ["pageDown" /* PAGE_DOWN */]: [{ key: "pagedown" }],
756
- ["scrollHome" /* SCROLL_HOME */]: [{ key: "home", ctrl: true }],
757
- ["scrollEnd" /* SCROLL_END */]: [{ key: "end", ctrl: true }]
758
- };
759
-
760
- // packages/cli/src/ui/keyMatchers.ts
761
- init_esbuild_shims();
762
- function matchKeyBinding(keyBinding, key) {
763
- let keyMatches = false;
764
- if (keyBinding.key !== void 0) {
765
- keyMatches = keyBinding.key === key.name;
766
- } else if (keyBinding.sequence !== void 0) {
767
- keyMatches = keyBinding.sequence === key.sequence;
768
- } else {
769
- return false;
770
- }
771
- if (!keyMatches) {
772
- return false;
773
- }
774
- if (keyBinding.ctrl !== void 0 && !!key.ctrl !== keyBinding.ctrl) {
775
- return false;
776
- }
777
- if (keyBinding.shift !== void 0 && !!key.shift !== keyBinding.shift) {
778
- return false;
779
- }
780
- if (keyBinding.command !== void 0 && !!key.meta !== keyBinding.command) {
781
- return false;
782
- }
783
- if (keyBinding.paste !== void 0 && !!key.paste !== keyBinding.paste) {
784
- return false;
785
- }
786
- if (keyBinding.meta !== void 0 && !!key.meta !== keyBinding.meta) {
787
- return false;
788
- }
789
- return true;
790
- }
791
- __name(matchKeyBinding, "matchKeyBinding");
792
- function matchCommand(command, key, config = defaultKeyBindings) {
793
- const bindings = config[command];
794
- return bindings.some((binding) => matchKeyBinding(binding, key));
795
- }
796
- __name(matchCommand, "matchCommand");
797
- function createKeyMatchers(config = defaultKeyBindings) {
798
- const matchers = {};
799
- for (const command of Object.values(Command)) {
800
- matchers[command] = (key) => matchCommand(command, key, config);
801
- }
802
- return matchers;
803
- }
804
- __name(createKeyMatchers, "createKeyMatchers");
805
- var keyMatchers = createKeyMatchers(defaultKeyBindings);
806
-
807
- // packages/cli/src/ui/contexts/VirtualViewportContext.tsx
808
- init_esbuild_shims();
809
- var import_react4 = __toESM(require_react(), 1);
810
- var VirtualViewportContext = (0, import_react4.createContext)(
811
- void 0
812
- );
813
- function useVirtualViewport(fallback) {
814
- return (0, import_react4.useContext)(VirtualViewportContext) ?? fallback ?? false;
815
- }
816
- __name(useVirtualViewport, "useVirtualViewport");
817
-
818
- // packages/cli/src/ui/context-menu/ContextMenuContext.tsx
819
- init_esbuild_shims();
820
- var import_react5 = __toESM(require_react(), 1);
821
- var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
822
- var ContextMenuContext = (0, import_react5.createContext)({
823
- menu: null,
824
- selectedIndex: 0,
825
- openMenu: /* @__PURE__ */ __name(() => {
826
- }, "openMenu"),
827
- closeMenu: /* @__PURE__ */ __name(() => {
828
- }, "closeMenu"),
829
- setSelectedIndex: /* @__PURE__ */ __name(() => {
830
- }, "setSelectedIndex"),
831
- executeIndex: /* @__PURE__ */ __name(() => {
832
- }, "executeIndex")
833
- });
834
- var ContextMenuProvider = /* @__PURE__ */ __name(({ children, onMenuChange }) => {
835
- const [menu, setMenu] = (0, import_react5.useState)(null);
836
- const [selectedIndex, setSelectedIndexState] = (0, import_react5.useState)(0);
837
- const menuRef = (0, import_react5.useRef)(null);
838
- menuRef.current = menu;
839
- const openMenu = (0, import_react5.useCallback)(
840
- (items, position) => {
841
- if (items.length === 0) return;
842
- setMenu({ items, position });
843
- setSelectedIndexState(0);
844
- },
845
- []
846
- );
847
- const closeMenu = (0, import_react5.useCallback)(() => {
848
- menuRef.current = null;
849
- setMenu(null);
850
- }, []);
851
- (0, import_react5.useEffect)(() => {
852
- onMenuChange?.(menu !== null);
853
- }, [menu, onMenuChange]);
854
- const setSelectedIndex = (0, import_react5.useCallback)((index) => {
855
- setSelectedIndexState(index);
856
- }, []);
857
- const executeIndex = (0, import_react5.useCallback)((index) => {
858
- const current = menuRef.current;
859
- menuRef.current = null;
860
- setMenu(null);
861
- current?.items[index]?.onSelect();
862
- }, []);
863
- const value = (0, import_react5.useMemo)(
864
- () => ({
865
- menu,
866
- selectedIndex,
867
- openMenu,
868
- closeMenu,
869
- setSelectedIndex,
870
- executeIndex
871
- }),
872
- [menu, selectedIndex, openMenu, closeMenu, setSelectedIndex, executeIndex]
873
- );
874
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ContextMenuContext.Provider, { value, children });
875
- }, "ContextMenuProvider");
876
- function useContextMenu() {
877
- return (0, import_react5.useContext)(ContextMenuContext);
878
- }
879
- __name(useContextMenu, "useContextMenu");
880
- function contextMenuSize(items) {
881
- const longest = items.reduce(
882
- (max, item) => Math.max(max, item.label.length),
883
- 0
884
- );
885
- return { width: longest + 4, height: items.length + 2 };
886
- }
887
- __name(contextMenuSize, "contextMenuSize");
888
- function clampMenuPosition(desired, size, terminalColumns, terminalRows) {
889
- return {
890
- x: Math.max(0, Math.min(desired.x, terminalColumns - size.width)),
891
- y: Math.max(0, Math.min(desired.y, terminalRows - size.height))
892
- };
893
- }
894
- __name(clampMenuPosition, "clampMenuPosition");
895
-
896
- // packages/cli/src/ui/hooks/use-mouse-tracking-enabled.ts
897
- init_esbuild_shims();
898
- var import_react6 = __toESM(require_react(), 1);
899
- function useMouseTrackingEnabled() {
900
- return (0, import_react6.useContext)(SettingsContext)?.merged.ui?.mouseTracking !== false;
901
- }
902
- __name(useMouseTrackingEnabled, "useMouseTrackingEnabled");
903
-
904
- // packages/cli/src/ui/components/shared/RadioButtonSelect.tsx
905
- init_esbuild_shims();
906
-
907
- // packages/cli/src/ui/components/shared/BaseSelectionList.tsx
908
- init_esbuild_shims();
909
- var import_react10 = __toESM(require_react(), 1);
910
-
911
- // packages/cli/src/ui/hooks/useSelectionList.ts
912
- init_esbuild_shims();
913
- var import_react7 = __toESM(require_react(), 1);
914
- var debugLogger = createDebugLogger("SELECTION_LIST");
915
- var NUMBER_INPUT_TIMEOUT_MS = 1e3;
916
- var findNextValidIndex = /* @__PURE__ */ __name((currentIndex, direction, items) => {
917
- const len = items.length;
918
- if (len === 0) return currentIndex;
919
- let nextIndex = currentIndex;
920
- const step = direction === "down" ? 1 : -1;
921
- for (let i = 0; i < len; i++) {
922
- nextIndex = (nextIndex + step + len) % len;
923
- if (!items[nextIndex]?.disabled) {
924
- return nextIndex;
925
- }
926
- }
927
- return currentIndex;
928
- }, "findNextValidIndex");
929
- var computeInitialIndex = /* @__PURE__ */ __name((initialIndex, items, initialKey) => {
930
- if (items.length === 0) {
931
- return 0;
932
- }
933
- if (initialKey !== void 0) {
934
- for (let i = 0; i < items.length; i++) {
935
- if (items[i].key === initialKey && !items[i].disabled) {
936
- return i;
937
- }
938
- }
939
- }
940
- let targetIndex = initialIndex;
941
- if (targetIndex < 0 || targetIndex >= items.length) {
942
- targetIndex = 0;
943
- }
944
- if (items[targetIndex]?.disabled) {
945
- const nextValid = findNextValidIndex(targetIndex, "down", items);
946
- targetIndex = nextValid;
947
- }
948
- return targetIndex;
949
- }, "computeInitialIndex");
950
- var areItemsStructurallyEqual = /* @__PURE__ */ __name((a, b) => {
951
- if (a === b) {
952
- return true;
953
- }
954
- if (a.length !== b.length) {
955
- return false;
956
- }
957
- for (let i = 0; i < a.length; i++) {
958
- if (a[i]?.key !== b[i]?.key || a[i]?.disabled !== b[i]?.disabled) {
959
- return false;
960
- }
961
- }
962
- return true;
963
- }, "areItemsStructurallyEqual");
964
- function selectionListReducer(state, action) {
965
- switch (action.type) {
966
- case "SET_ACTIVE_INDEX": {
967
- const { index, items } = action.payload;
968
- if (index === state.activeIndex) {
969
- return state;
970
- }
971
- if (index >= 0 && index < items.length) {
972
- return { ...state, activeIndex: index, pendingHighlight: true };
973
- }
974
- return state;
975
- }
976
- case "MOVE_UP": {
977
- const { items } = action.payload;
978
- const newIndex = findNextValidIndex(state.activeIndex, "up", items);
979
- if (newIndex !== state.activeIndex) {
980
- return { ...state, activeIndex: newIndex, pendingHighlight: true };
981
- }
982
- return state;
983
- }
984
- case "MOVE_DOWN": {
985
- const { items } = action.payload;
986
- const newIndex = findNextValidIndex(state.activeIndex, "down", items);
987
- if (newIndex !== state.activeIndex) {
988
- return { ...state, activeIndex: newIndex, pendingHighlight: true };
989
- }
990
- return state;
991
- }
992
- case "SELECT_CURRENT": {
993
- return { ...state, pendingSelect: true };
994
- }
995
- case "INITIALIZE": {
996
- const { initialIndex, items } = action.payload;
997
- const initialIndexChanged = initialIndex !== state.initialIndex;
998
- const activeKey = !initialIndexChanged && state.activeIndex !== state.initialIndex ? state.items[state.activeIndex]?.key : void 0;
999
- const targetIndex = computeInitialIndex(initialIndex, items, activeKey);
1000
- const itemsStructurallyEqual = areItemsStructurallyEqual(
1001
- items,
1002
- state.items
1003
- );
1004
- if (!initialIndexChanged && targetIndex === state.activeIndex && itemsStructurallyEqual) {
1005
- return state;
1006
- }
1007
- return {
1008
- ...state,
1009
- items: itemsStructurallyEqual ? state.items : items,
1010
- activeIndex: targetIndex,
1011
- initialIndex,
1012
- pendingHighlight: false
1013
- };
1014
- }
1015
- case "CLEAR_PENDING_FLAGS": {
1016
- return {
1017
- ...state,
1018
- pendingHighlight: false,
1019
- pendingSelect: false
1020
- };
1021
- }
1022
- default: {
1023
- const exhaustiveCheck = action;
1024
- debugLogger.error(`Unknown selection list action: ${exhaustiveCheck}`);
1025
- return state;
1026
- }
1027
- }
1028
- }
1029
- __name(selectionListReducer, "selectionListReducer");
1030
- function useSelectionList({
1031
- items,
1032
- initialIndex = 0,
1033
- onSelect,
1034
- onHighlight,
1035
- isFocused = true,
1036
- showNumbers = false,
1037
- disableVimNav = false
1038
- }) {
1039
- const [state, dispatch] = (0, import_react7.useReducer)(selectionListReducer, {
1040
- activeIndex: computeInitialIndex(initialIndex, items),
1041
- initialIndex,
1042
- pendingHighlight: false,
1043
- pendingSelect: false,
1044
- items
1045
- });
1046
- const numberInputRef = (0, import_react7.useRef)("");
1047
- const numberInputTimer = (0, import_react7.useRef)(null);
1048
- (0, import_react7.useEffect)(() => {
1049
- dispatch({ type: "INITIALIZE", payload: { initialIndex, items } });
1050
- }, [initialIndex, items]);
1051
- (0, import_react7.useEffect)(() => {
1052
- let needsClear = false;
1053
- if (state.pendingHighlight && items[state.activeIndex]) {
1054
- onHighlight?.(items[state.activeIndex].value);
1055
- needsClear = true;
1056
- }
1057
- if (state.pendingSelect && items[state.activeIndex]) {
1058
- const currentItem = items[state.activeIndex];
1059
- if (currentItem && !currentItem.disabled) {
1060
- onSelect(currentItem.value);
1061
- }
1062
- needsClear = true;
1063
- }
1064
- if (needsClear) {
1065
- dispatch({ type: "CLEAR_PENDING_FLAGS" });
1066
- }
1067
- }, [
1068
- state.pendingHighlight,
1069
- state.pendingSelect,
1070
- state.activeIndex,
1071
- items,
1072
- onHighlight,
1073
- onSelect
1074
- ]);
1075
- (0, import_react7.useEffect)(
1076
- () => () => {
1077
- if (numberInputTimer.current) {
1078
- clearTimeout(numberInputTimer.current);
1079
- }
1080
- },
1081
- []
1082
- );
1083
- useKeypress(
1084
- (key) => {
1085
- const { sequence, name } = key;
1086
- const isNumeric = showNumbers && /^[0-9]$/.test(sequence);
1087
- if (!isNumeric && numberInputTimer.current) {
1088
- clearTimeout(numberInputTimer.current);
1089
- numberInputRef.current = "";
1090
- }
1091
- if (keyMatchers["selectionUp" /* SELECTION_UP */](key)) {
1092
- if (disableVimNav && key.name === "k" && !key.ctrl) {
1093
- } else {
1094
- dispatch({ type: "MOVE_UP", payload: { items } });
1095
- return;
1096
- }
1097
- }
1098
- if (keyMatchers["selectionDown" /* SELECTION_DOWN */](key)) {
1099
- if (disableVimNav && key.name === "j" && !key.ctrl) {
1100
- } else {
1101
- dispatch({ type: "MOVE_DOWN", payload: { items } });
1102
- return;
1103
- }
1104
- }
1105
- if (name === "return") {
1106
- dispatch({ type: "SELECT_CURRENT", payload: { items } });
1107
- return;
1108
- }
1109
- if (isNumeric) {
1110
- if (numberInputTimer.current) {
1111
- clearTimeout(numberInputTimer.current);
1112
- }
1113
- const newNumberInput = numberInputRef.current + sequence;
1114
- numberInputRef.current = newNumberInput;
1115
- const targetIndex = Number.parseInt(newNumberInput, 10) - 1;
1116
- if (newNumberInput === "0") {
1117
- numberInputTimer.current = setTimeout(() => {
1118
- numberInputRef.current = "";
1119
- }, NUMBER_INPUT_TIMEOUT_MS);
1120
- return;
1121
- }
1122
- if (targetIndex >= 0 && targetIndex < items.length) {
1123
- dispatch({
1124
- type: "SET_ACTIVE_INDEX",
1125
- payload: { index: targetIndex, items }
1126
- });
1127
- const potentialNextNumber = Number.parseInt(newNumberInput + "0", 10);
1128
- if (potentialNextNumber > items.length) {
1129
- dispatch({
1130
- type: "SELECT_CURRENT",
1131
- payload: { items }
1132
- });
1133
- numberInputRef.current = "";
1134
- } else {
1135
- numberInputTimer.current = setTimeout(() => {
1136
- dispatch({
1137
- type: "SELECT_CURRENT",
1138
- payload: { items }
1139
- });
1140
- numberInputRef.current = "";
1141
- }, NUMBER_INPUT_TIMEOUT_MS);
1142
- }
1143
- } else {
1144
- numberInputRef.current = "";
1145
- }
1146
- }
1147
- },
1148
- { isActive: !!(isFocused && items.length > 0) }
1149
- );
1150
- const setActiveIndex = /* @__PURE__ */ __name((index) => {
1151
- dispatch({
1152
- type: "SET_ACTIVE_INDEX",
1153
- payload: { index, items }
1154
- });
1155
- }, "setActiveIndex");
1156
- const selectIndex = /* @__PURE__ */ __name((index) => {
1157
- if (items[index]?.disabled) return;
1158
- dispatch({ type: "SET_ACTIVE_INDEX", payload: { index, items } });
1159
- dispatch({ type: "SELECT_CURRENT", payload: { items } });
1160
- }, "selectIndex");
1161
- return {
1162
- activeIndex: state.activeIndex,
1163
- setActiveIndex,
1164
- selectIndex
1165
- };
1166
- }
1167
- __name(useSelectionList, "useSelectionList");
1168
-
1169
- // packages/cli/src/ui/components/shared/RowMouseController.tsx
1170
- init_esbuild_shims();
1171
- var import_react9 = __toESM(require_react(), 1);
1172
-
1173
- // packages/cli/src/ui/hooks/useMouseEvents.ts
1174
- init_esbuild_shims();
1175
- var import_react8 = __toESM(require_react(), 1);
1176
- var mouseModeRefs = /* @__PURE__ */ new Map();
1177
- function effectiveTracking(entry) {
1178
- if (entry.any > 0) return "any";
1179
- if (entry.button > 0) return "button";
1180
- return null;
1181
- }
1182
- __name(effectiveTracking, "effectiveTracking");
1183
- function reconcileMouseMode(stdout, entry) {
1184
- const desired = effectiveTracking(entry);
1185
- if (desired === entry.active) return;
1186
- if (entry.active) disableMouseEvents(stdout, entry.active);
1187
- if (desired) enableMouseEvents(stdout, desired);
1188
- entry.active = desired;
1189
- }
1190
- __name(reconcileMouseMode, "reconcileMouseMode");
1191
- var disableAllMouseModes = /* @__PURE__ */ __name(() => {
1192
- for (const [stdout, entry] of mouseModeRefs) {
1193
- if (entry.active) disableMouseEvents(stdout, entry.active);
1194
- }
1195
- mouseModeRefs.clear();
1196
- }, "disableAllMouseModes");
1197
- function acquireMouseMode(stdout, tracking) {
1198
- let entry = mouseModeRefs.get(stdout);
1199
- if (!entry) {
1200
- if (mouseModeRefs.size === 0) {
1201
- process.on("exit", disableAllMouseModes);
1202
- }
1203
- entry = { button: 0, any: 0, active: null };
1204
- mouseModeRefs.set(stdout, entry);
1205
- }
1206
- entry[tracking] += 1;
1207
- reconcileMouseMode(stdout, entry);
1208
- }
1209
- __name(acquireMouseMode, "acquireMouseMode");
1210
- function releaseMouseMode(stdout, tracking) {
1211
- const entry = mouseModeRefs.get(stdout);
1212
- if (!entry) return;
1213
- entry[tracking] = Math.max(0, entry[tracking] - 1);
1214
- reconcileMouseMode(stdout, entry);
1215
- if (entry.button === 0 && entry.any === 0) {
1216
- mouseModeRefs.delete(stdout);
1217
- if (mouseModeRefs.size === 0) {
1218
- process.removeListener("exit", disableAllMouseModes);
1219
- }
1220
- }
1221
- }
1222
- __name(releaseMouseMode, "releaseMouseMode");
1223
- function useMouseEvents(handler, { isActive, tracking = "button", bypassVpGate = false }) {
1224
- const { isRawModeSupported } = use_stdin_default();
1225
- const { stdout } = use_stdout_default();
1226
- const { subscribeMouse, unsubscribeMouse } = useKeypressContext();
1227
- const settings = (0, import_react8.useContext)(SettingsContext);
1228
- const isVpMode = useVirtualViewport(settings?.merged.ui?.useTerminalBuffer);
1229
- const vpGateOpen = isVpMode || bypassVpGate;
1230
- const handlerRef = (0, import_react8.useRef)(handler);
1231
- handlerRef.current = handler;
1232
- const mouseTrackingEnabled = useMouseTrackingEnabled();
1233
- const enabled = isActive && isRawModeSupported && vpGateOpen && mouseTrackingEnabled && Boolean(stdout.isTTY);
1234
- const enabledRef = (0, import_react8.useRef)(enabled);
1235
- enabledRef.current = enabled;
1236
- (0, import_react8.useEffect)(() => {
1237
- if (!enabled) return;
1238
- acquireMouseMode(stdout, tracking);
1239
- return () => {
1240
- releaseMouseMode(stdout, tracking);
1241
- };
1242
- }, [enabled, stdout, tracking]);
1243
- const mouseCallback = (0, import_react8.useCallback)((event) => {
1244
- if (!enabledRef.current) return;
1245
- handlerRef.current(event);
1246
- }, []);
1247
- (0, import_react8.useEffect)(() => {
1248
- if (!enabled) return;
1249
- subscribeMouse(mouseCallback);
1250
- return () => unsubscribeMouse(mouseCallback);
1251
- }, [enabled, subscribeMouse, unsubscribeMouse, mouseCallback]);
1252
- }
1253
- __name(useMouseEvents, "useMouseEvents");
1254
-
1255
- // packages/cli/src/ui/utils/mouse-hit.ts
1256
- init_esbuild_shims();
1257
-
1258
- // packages/cli/src/ui/utils/measure-element-position.ts
1259
- init_esbuild_shims();
1260
-
1261
- // packages/cli/src/ui/utils/list-mouse.ts
1262
- init_esbuild_shims();
1263
- function frameAnchor(terminalHeight, frameHeight) {
1264
- return Math.min(0, terminalHeight - frameHeight);
1265
- }
1266
- __name(frameAnchor, "frameAnchor");
1267
- function terminalRowToLayoutRow(terminalRow1Based, anchor) {
1268
- return terminalRow1Based - 1 - anchor;
1269
- }
1270
- __name(terminalRowToLayoutRow, "terminalRowToLayoutRow");
1271
- function findItemAtLayoutRow(rects, layoutRow) {
1272
- for (const rect of rects) {
1273
- if (layoutRow >= rect.top && layoutRow < rect.top + rect.height) {
1274
- return rect.index;
1275
- }
1276
- }
1277
- return null;
1278
- }
1279
- __name(findItemAtLayoutRow, "findItemAtLayoutRow");
1280
-
1281
- // packages/cli/src/ui/utils/measure-element-position.ts
1282
- function measureElementPosition(node) {
1283
- const { yogaNode } = node;
1284
- if (!yogaNode) {
1285
- return { x: 0, y: 0, width: 0, height: 0 };
1286
- }
1287
- let x = yogaNode.getComputedLeft();
1288
- let y = yogaNode.getComputedTop();
1289
- let current = node.parentNode;
1290
- while (current) {
1291
- if (current.yogaNode) {
1292
- x += current.yogaNode.getComputedLeft();
1293
- y += current.yogaNode.getComputedTop();
1294
- }
1295
- current = current.parentNode;
1296
- }
1297
- return {
1298
- x,
1299
- y,
1300
- width: yogaNode.getComputedWidth(),
1301
- height: yogaNode.getComputedHeight()
1302
- };
1303
- }
1304
- __name(measureElementPosition, "measureElementPosition");
1305
- function measureFrameHeight(node) {
1306
- let root = node;
1307
- let current = node;
1308
- while (current) {
1309
- root = current;
1310
- current = current.parentNode;
1311
- }
1312
- return root.yogaNode?.getComputedHeight() ?? 0;
1313
- }
1314
- __name(measureFrameHeight, "measureFrameHeight");
1315
- function layoutRowForEvent(node, terminalRow1Based, terminalHeight) {
1316
- const anchor = frameAnchor(terminalHeight, measureFrameHeight(node));
1317
- return terminalRowToLayoutRow(terminalRow1Based, anchor);
1318
- }
1319
- __name(layoutRowForEvent, "layoutRowForEvent");
1320
-
1321
- // packages/cli/src/ui/utils/mouse-hit.ts
1322
- function containsPoint(rect, point) {
1323
- const containsRow = point.y >= rect.y && point.y < rect.y + rect.height;
1324
- return containsRow && point.x >= rect.x && point.x < rect.x + rect.width;
1325
- }
1326
- __name(containsPoint, "containsPoint");
1327
- function findElementAtMouseEvent(container, elements, event, terminalHeight, mode, indexOffset = 0) {
1328
- if (!container) return null;
1329
- const point = {
1330
- x: event.col - 1,
1331
- y: layoutRowForEvent(container, event.row, terminalHeight)
1332
- };
1333
- const containerRect = measureElementPosition(container);
1334
- if (containerRect.width > 0 && (point.x < containerRect.x || point.x >= containerRect.x + containerRect.width)) {
1335
- return null;
1336
- }
1337
- if (mode === "row") {
1338
- const rects = [];
1339
- for (let index = 0; index < elements.length; index++) {
1340
- const element = elements[index];
1341
- if (!element) continue;
1342
- const rect = measureElementPosition(element);
1343
- if (rect.height <= 0) continue;
1344
- rects.push({
1345
- index: indexOffset + index,
1346
- top: rect.y,
1347
- height: rect.height
1348
- });
1349
- }
1350
- return findItemAtLayoutRow(rects, point.y);
1351
- }
1352
- for (let index = 0; index < elements.length; index++) {
1353
- const element = elements[index];
1354
- if (!element) continue;
1355
- const rect = measureElementPosition(element);
1356
- if (rect.height <= 0 || rect.width <= 0) continue;
1357
- if (containsPoint(rect, point)) return index;
1358
- }
1359
- return null;
1360
- }
1361
- __name(findElementAtMouseEvent, "findElementAtMouseEvent");
1362
-
1363
- // packages/cli/src/ui/components/shared/RowMouseController.tsx
1364
- function RowMouseController({
1365
- containerRef,
1366
- itemRefs,
1367
- scrollOffset,
1368
- isDisabled,
1369
- onHoverIndex,
1370
- onSelectIndex
1371
- }) {
1372
- const { rows: terminalHeight } = useTerminalSize();
1373
- const { menu: contextMenu } = useContextMenu();
1374
- const resolveIndex = (0, import_react9.useCallback)(
1375
- (event) => findElementAtMouseEvent(
1376
- containerRef.current,
1377
- itemRefs.current,
1378
- event,
1379
- terminalHeight,
1380
- "row",
1381
- scrollOffset
1382
- ),
1383
- [containerRef, itemRefs, scrollOffset, terminalHeight]
1384
- );
1385
- const handleMouse = (0, import_react9.useCallback)(
1386
- (event) => {
1387
- if (event.name !== "move" && event.name !== "left-press") return;
1388
- const index = resolveIndex(event);
1389
- if (index === null || isDisabled?.(index)) return;
1390
- if (event.name === "move") {
1391
- onHoverIndex(index);
1392
- } else {
1393
- onSelectIndex(index);
1394
- }
1395
- },
1396
- [resolveIndex, isDisabled, onHoverIndex, onSelectIndex]
1397
- );
1398
- useMouseEvents(handleMouse, {
1399
- isActive: contextMenu === null,
1400
- tracking: "any"
1401
- });
1402
- return null;
1403
- }
1404
- __name(RowMouseController, "RowMouseController");
1405
-
1406
- // packages/cli/src/ui/components/shared/BaseSelectionList.tsx
1407
- var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
1408
- function getScrollOffsetForIndex(activeIndex, itemCount, maxItemsToShow) {
1409
- return Math.max(
1410
- 0,
1411
- Math.min(activeIndex - maxItemsToShow + 1, itemCount - maxItemsToShow)
1412
- );
1413
- }
1414
- __name(getScrollOffsetForIndex, "getScrollOffsetForIndex");
1415
- function BaseSelectionList({
1416
- items,
1417
- initialIndex = 0,
1418
- onSelect,
1419
- onHighlight,
1420
- isFocused = true,
1421
- showNumbers = true,
1422
- showScrollArrows = false,
1423
- maxItemsToShow = 10,
1424
- itemGap = 0,
1425
- renderItem
1426
- }) {
1427
- const { activeIndex, setActiveIndex, selectIndex } = useSelectionList({
1428
- items,
1429
- initialIndex,
1430
- onSelect,
1431
- onHighlight,
1432
- isFocused,
1433
- showNumbers
1434
- });
1435
- const [scrollOffset, setScrollOffset] = (0, import_react10.useState)(
1436
- () => getScrollOffsetForIndex(activeIndex, items.length, maxItemsToShow)
1437
- );
1438
- (0, import_react10.useEffect)(() => {
1439
- const newScrollOffset = getScrollOffsetForIndex(
1440
- activeIndex,
1441
- items.length,
1442
- maxItemsToShow
1443
- );
1444
- if (activeIndex < scrollOffset) {
1445
- setScrollOffset(activeIndex);
1446
- } else if (activeIndex >= scrollOffset + maxItemsToShow) {
1447
- setScrollOffset(newScrollOffset);
1448
- }
1449
- }, [activeIndex, items.length, scrollOffset, maxItemsToShow]);
1450
- const settings = (0, import_react10.useContext)(SettingsContext);
1451
- const mouseTrackingEnabled = useMouseTrackingEnabled();
1452
- const mouseEnabled = useVirtualViewport(settings?.merged.ui?.useTerminalBuffer) && mouseTrackingEnabled;
1453
- const containerRef = (0, import_react10.useRef)(null);
1454
- const itemRefs = (0, import_react10.useRef)([]);
1455
- const visibleItems = items.slice(scrollOffset, scrollOffset + maxItemsToShow);
1456
- const numberColumnWidth = String(items.length).length;
1457
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Box_default, { ref: containerRef, flexDirection: "column", gap: itemGap, children: [
1458
- mouseEnabled && isFocused && items.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1459
- RowMouseController,
1460
- {
1461
- containerRef,
1462
- itemRefs,
1463
- scrollOffset,
1464
- isDisabled: (index) => !!items[index]?.disabled,
1465
- onHoverIndex: setActiveIndex,
1466
- onSelectIndex: selectIndex
1467
- }
1468
- ),
1469
- showScrollArrows && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1470
- Text,
1471
- {
1472
- color: scrollOffset > 0 ? theme.text.primary : theme.text.secondary,
1473
- children: "\u25B2"
1474
- }
1475
- ),
1476
- visibleItems.map((item, index) => {
1477
- const itemIndex = scrollOffset + index;
1478
- const isSelected = activeIndex === itemIndex;
1479
- let titleColor = theme.text.primary;
1480
- let numberColor = theme.text.primary;
1481
- if (isSelected) {
1482
- titleColor = theme.status.success;
1483
- numberColor = theme.status.success;
1484
- } else if (item.disabled) {
1485
- titleColor = theme.text.secondary;
1486
- numberColor = theme.text.secondary;
1487
- }
1488
- if (!isFocused && !item.disabled) {
1489
- numberColor = theme.text.secondary;
1490
- }
1491
- if (!showNumbers) {
1492
- numberColor = theme.text.secondary;
1493
- }
1494
- const itemNumberText = `${String(itemIndex + 1).padStart(
1495
- numberColumnWidth
1496
- )}.`;
1497
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1498
- Box_default,
1499
- {
1500
- alignItems: "flex-start",
1501
- ref: (node) => {
1502
- itemRefs.current[index] = node;
1503
- },
1504
- children: [
1505
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Box_default, { minWidth: 2, flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1506
- Text,
1507
- {
1508
- color: isSelected ? theme.status.success : theme.text.primary,
1509
- "aria-hidden": true,
1510
- children: isSelected ? "\u203A" : " "
1511
- }
1512
- ) }),
1513
- showNumbers && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1514
- Box_default,
1515
- {
1516
- marginRight: 1,
1517
- flexShrink: 0,
1518
- minWidth: itemNumberText.length,
1519
- "aria-state": { checked: isSelected },
1520
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Text, { color: numberColor, children: itemNumberText })
1521
- }
1522
- ),
1523
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Box_default, { flexGrow: 1, children: renderItem(item, {
1524
- isSelected,
1525
- titleColor,
1526
- numberColor
1527
- }) })
1528
- ]
1529
- },
1530
- item.key
1531
- );
1532
- }),
1533
- showScrollArrows && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1534
- Text,
1535
- {
1536
- color: scrollOffset + maxItemsToShow < items.length ? theme.text.primary : theme.text.secondary,
1537
- children: "\u25BC"
1538
- }
1539
- )
1540
- ] });
1541
- }
1542
- __name(BaseSelectionList, "BaseSelectionList");
1543
-
1544
- // packages/cli/src/ui/components/shared/RadioButtonSelect.tsx
1545
- var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
1546
- function RadioButtonSelect({
1547
- items,
1548
- initialIndex = 0,
1549
- onSelect,
1550
- onHighlight,
1551
- isFocused = true,
1552
- showScrollArrows = false,
1553
- maxItemsToShow = 10,
1554
- showNumbers = true
1555
- }) {
1556
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1557
- BaseSelectionList,
1558
- {
1559
- items,
1560
- initialIndex,
1561
- onSelect,
1562
- onHighlight,
1563
- isFocused,
1564
- showNumbers,
1565
- showScrollArrows,
1566
- maxItemsToShow,
1567
- renderItem: (item, { titleColor }) => {
1568
- if (item.themeNameDisplay && item.themeTypeDisplay) {
1569
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { color: titleColor, wrap: "truncate", children: [
1570
- item.themeNameDisplay,
1571
- " ",
1572
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: theme.text.secondary, children: item.themeTypeDisplay })
1573
- ] }, item.key);
1574
- }
1575
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: titleColor, wrap: "truncate", children: item.label });
1576
- }
1577
- }
1578
- );
1579
- }
1580
- __name(RadioButtonSelect, "RadioButtonSelect");
1581
-
1582
- // packages/cli/src/ui/utils/tool-display-map.ts
1583
- init_esbuild_shims();
1584
- var TOOL_DISPLAY_BY_NAME = Object.fromEntries(
1585
- Object.keys(ToolNames).map((key) => [
1586
- ToolNames[key],
1587
- ToolDisplayNames[key]
1588
- ])
1589
- );
1590
-
1591
- // packages/cli/src/ui/components/mcp/MCPServerApprovalDialog.tsx
1592
- init_esbuild_shims();
1593
- var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
1594
- var MCPServerApprovalDialog = /* @__PURE__ */ __name(({ serverName, summary, source, pendingServers, remaining, onSelect }) => {
1595
- useKeypress(
1596
- (key) => {
1597
- if (key.name === "escape") {
1598
- onSelect("reject" /* REJECT */);
1599
- }
1600
- },
1601
- { isActive: true }
1602
- );
1603
- const options = [
1604
- {
1605
- label: "Approve this server",
1606
- value: "approve" /* APPROVE */,
1607
- key: "approve"
1608
- },
1609
- {
1610
- label: "Approve all pending servers in this workspace",
1611
- value: "approve_all" /* APPROVE_ALL */,
1612
- key: "approve_all"
1613
- },
1614
- {
1615
- label: "Reject (esc)",
1616
- value: "reject" /* REJECT */,
1617
- key: "reject"
1618
- }
1619
- ];
1620
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Box_default, { flexDirection: "column", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
1621
- Box_default,
1622
- {
1623
- flexDirection: "column",
1624
- borderStyle: "round",
1625
- borderColor: theme.status.warning,
1626
- padding: 1,
1627
- width: "100%",
1628
- marginLeft: 1,
1629
- children: [
1630
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
1631
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { bold: true, color: theme.text.primary, children: `Untrusted MCP server in ${source}` }),
1632
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: theme.text.primary, children: `This workspace declares an MCP server. Approving lets Qwen Code start it and run its tools. Approval is bound to this exact configuration \u2014 if ${source} changes, you will be asked again.` })
1633
- ] }),
1634
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
1635
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { color: theme.text.primary, children: [
1636
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { bold: true, children: serverName }),
1637
- ` ${summary}`
1638
- ] }),
1639
- remaining > 0 && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
1640
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: theme.text.secondary, children: "Approve all will trust these servers:" }),
1641
- pendingServers.map((server) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: theme.text.secondary, children: ` ${server.name} ${server.summary}` }, server.name))
1642
- ] })
1643
- ] }),
1644
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(RadioButtonSelect, { items: options, onSelect, isFocused: true })
1645
- ]
1646
- }
1647
- ) });
1648
- }, "MCPServerApprovalDialog");
1649
-
1650
- // packages/cli/src/ui/statusLinePresets.ts
1651
- init_esbuild_shims();
1652
- import nodePath from "node:path";
1653
- var STATUS_LINE_PRESET_ITEM_IDS = [
1654
- "project-name",
1655
- "git-branch",
1656
- "model-with-reasoning",
1657
- "model",
1658
- "context-remaining",
1659
- "total-input-tokens",
1660
- "total-output-tokens",
1661
- "current-dir",
1662
- "pull-request-number",
1663
- "branch-changes",
1664
- "context-used",
1665
- "run-state",
1666
- "qwen-version",
1667
- "context-window-size",
1668
- "used-tokens",
1669
- "session-id"
1670
- ];
1671
- function aggregateModelTokens(metrics) {
1672
- let totalInputTokens = 0;
1673
- let totalOutputTokens = 0;
1674
- for (const modelMetrics of Object.values(metrics.models)) {
1675
- totalInputTokens += modelMetrics.tokens.prompt;
1676
- totalOutputTokens += modelMetrics.tokens.candidates;
1677
- }
1678
- return { totalInputTokens, totalOutputTokens };
1679
- }
1680
- __name(aggregateModelTokens, "aggregateModelTokens");
1681
- var STATUS_LINE_PRESET_ITEMS = [
1682
- {
1683
- id: "project-name",
1684
- label: "project-name",
1685
- description: "Project name when available",
1686
- defaultSelected: true
1687
- },
1688
- {
1689
- id: "git-branch",
1690
- label: "git-branch",
1691
- description: "Current Git branch when available",
1692
- defaultSelected: true
1693
- },
1694
- {
1695
- id: "model-with-reasoning",
1696
- label: "model-with-reasoning",
1697
- description: "Current model name with reasoning level when available",
1698
- defaultSelected: true
1699
- },
1700
- {
1701
- id: "model",
1702
- label: "model-only",
1703
- description: "Current model name without reasoning level"
1704
- },
1705
- {
1706
- id: "context-remaining",
1707
- label: "context-remaining",
1708
- description: "Percentage of context window remaining"
1709
- },
1710
- {
1711
- id: "total-input-tokens",
1712
- label: "total-input-tokens",
1713
- description: "Total input tokens used in session"
1714
- },
1715
- {
1716
- id: "total-output-tokens",
1717
- label: "total-output-tokens",
1718
- description: "Total output tokens used in session"
1719
- },
1720
- {
1721
- id: "current-dir",
1722
- label: "current-dir",
1723
- description: "Current working directory"
1724
- },
1725
- {
1726
- id: "pull-request-number",
1727
- label: "pull-request-number",
1728
- description: "Open pull request number for the current branch"
1729
- },
1730
- {
1731
- id: "branch-changes",
1732
- label: "branch-changes",
1733
- description: "Session file changes added and removed"
1734
- },
1735
- {
1736
- id: "context-used",
1737
- label: "context-used",
1738
- description: "Percentage of context window used",
1739
- defaultSelected: true
1740
- },
1741
- {
1742
- id: "run-state",
1743
- label: "run-state",
1744
- description: "Compact session run-state text"
1745
- },
1746
- {
1747
- id: "qwen-version",
1748
- label: "qwen-version",
1749
- description: "Qwen Code application version"
1750
- },
1751
- {
1752
- id: "context-window-size",
1753
- label: "context-window-size",
1754
- description: "Total context window size in tokens"
1755
- },
1756
- {
1757
- id: "used-tokens",
1758
- label: "used-tokens",
1759
- description: "Current prompt tokens used"
1760
- },
1761
- {
1762
- id: "session-id",
1763
- label: "session-id",
1764
- description: "Current session identifier"
1765
- }
1766
- ];
1767
- var STATUS_LINE_PRESET_ITEM_ID_SET = new Set(
1768
- STATUS_LINE_PRESET_ITEM_IDS
1769
- );
1770
- function orderStatusLinePresetItems(items) {
1771
- const selectedItems = new Set(
1772
- items.filter(
1773
- (item) => typeof item === "string" && STATUS_LINE_PRESET_ITEM_ID_SET.has(item)
1774
- )
1775
- );
1776
- return STATUS_LINE_PRESET_ITEM_IDS.filter((item) => selectedItems.has(item));
1777
- }
1778
- __name(orderStatusLinePresetItems, "orderStatusLinePresetItems");
1779
- var DEFAULT_STATUS_LINE_PRESET_CONFIG = {
1780
- type: "preset",
1781
- useThemeColors: true,
1782
- items: orderStatusLinePresetItems(
1783
- STATUS_LINE_PRESET_ITEMS.filter((item) => item.defaultSelected).map(
1784
- (item) => item.id
1785
- )
1786
- )
1787
- };
1788
- function normalizeStatusLinePresetConfig(raw) {
1789
- if (!raw || typeof raw !== "object" || Array.isArray(raw)) {
1790
- return void 0;
1791
- }
1792
- const candidate = raw;
1793
- if (candidate["type"] !== "preset") {
1794
- return void 0;
1795
- }
1796
- const hasItemsArray = Array.isArray(candidate["items"]);
1797
- const items = hasItemsArray ? orderStatusLinePresetItems(candidate["items"]) : [];
1798
- return {
1799
- type: "preset",
1800
- useThemeColors: typeof candidate["useThemeColors"] === "boolean" ? candidate["useThemeColors"] : true,
1801
- items: hasItemsArray ? items : [...DEFAULT_STATUS_LINE_PRESET_CONFIG.items],
1802
- hideContextIndicator: typeof candidate["hideContextIndicator"] === "boolean" ? candidate["hideContextIndicator"] : void 0
1803
- };
1804
- }
1805
- __name(normalizeStatusLinePresetConfig, "normalizeStatusLinePresetConfig");
1806
- function formatPercent(value) {
1807
- if (!Number.isFinite(value)) {
1808
- return "0%";
1809
- }
1810
- const rounded = Math.round(value * 10) / 10;
1811
- return `${Number.isInteger(rounded) ? rounded.toFixed(0) : rounded}%`;
1812
- }
1813
- __name(formatPercent, "formatPercent");
1814
- function formatTokenCount(value) {
1815
- if (!Number.isFinite(value) || value <= 0) {
1816
- return "0";
1817
- }
1818
- if (value >= 1e6) {
1819
- return `${(value / 1e6).toFixed(1)}m`;
1820
- }
1821
- if (value >= 1e3) {
1822
- return `${(value / 1e3).toFixed(1)}k`;
1823
- }
1824
- return String(Math.round(value));
1825
- }
1826
- __name(formatTokenCount, "formatTokenCount");
1827
- function getRunStateLabel(state) {
1828
- switch (state) {
1829
- case "idle" /* Idle */:
1830
- return "Ready";
1831
- case "responding" /* Responding */:
1832
- return "Working";
1833
- case "waiting_for_confirmation" /* WaitingForConfirmation */:
1834
- return "Confirm";
1835
- default:
1836
- return "Working";
1837
- }
1838
- }
1839
- __name(getRunStateLabel, "getRunStateLabel");
1840
- function stripProviderPrefix(name) {
1841
- return name.replace(/^\[[^\]]*\]\s*/, "");
1842
- }
1843
- __name(stripProviderPrefix, "stripProviderPrefix");
1844
- function formatModelWithReasoning(modelDisplayName, reasoning) {
1845
- const cleanName = stripProviderPrefix(modelDisplayName);
1846
- if (reasoning === false) {
1847
- return `${cleanName} reasoning off`;
1848
- }
1849
- if (reasoning?.effort) {
1850
- return `${cleanName} ${reasoning.effort}`;
1851
- }
1852
- return cleanName;
1853
- }
1854
- __name(formatModelWithReasoning, "formatModelWithReasoning");
1855
- function inferPullRequestNumber(branch) {
1856
- if (!branch) {
1857
- return void 0;
1858
- }
1859
- const match = branch.match(
1860
- /(?:^|[/_-])(?:pr|pull|pull-request)[/_-]?#?(\d+)(?:$|[/_-])/i
1861
- );
1862
- return match?.[1];
1863
- }
1864
- __name(inferPullRequestNumber, "inferPullRequestNumber");
1865
- function buildStatusLinePresetData(params) {
1866
- const usedPercentage = params.contextWindowSize > 0 ? Math.min(
1867
- 100,
1868
- Math.max(
1869
- 0,
1870
- Math.round(
1871
- params.currentUsage / params.contextWindowSize * 1e3
1872
- ) / 10
1873
- )
1874
- ) : 0;
1875
- return {
1876
- sessionId: params.sessionId,
1877
- version: params.version || "unknown",
1878
- modelDisplayName: params.modelDisplayName || "unknown",
1879
- reasoning: params.reasoning,
1880
- currentDir: params.currentDir,
1881
- projectName: nodePath.basename(params.currentDir) || void 0,
1882
- branch: params.branch,
1883
- pullRequestNumber: params.pullRequestNumber,
1884
- contextWindowSize: params.contextWindowSize,
1885
- usedPercentage,
1886
- remainingPercentage: Math.round((100 - usedPercentage) * 10) / 10,
1887
- currentUsage: params.currentUsage,
1888
- totalInputTokens: params.totalInputTokens,
1889
- totalOutputTokens: params.totalOutputTokens,
1890
- totalLinesAdded: params.totalLinesAdded,
1891
- totalLinesRemoved: params.totalLinesRemoved,
1892
- streamingState: params.streamingState
1893
- };
1894
- }
1895
- __name(buildStatusLinePresetData, "buildStatusLinePresetData");
1896
- function formatPresetItem(item, data) {
1897
- switch (item) {
1898
- case "model-with-reasoning":
1899
- return formatModelWithReasoning(data.modelDisplayName, data.reasoning);
1900
- case "model":
1901
- return stripProviderPrefix(data.modelDisplayName);
1902
- case "context-remaining":
1903
- if (data.contextWindowSize > 0) {
1904
- return `Context ${formatPercent(data.remainingPercentage)} left`;
1905
- }
1906
- return void 0;
1907
- case "current-dir":
1908
- return data.currentDir;
1909
- case "context-used":
1910
- if (data.contextWindowSize > 0 && data.usedPercentage > 0) {
1911
- return `${formatTokenCount(data.contextWindowSize)} Context ${formatPercent(data.usedPercentage)} used`;
1912
- }
1913
- return void 0;
1914
- case "git-branch":
1915
- if (data.branch) {
1916
- return `git:(${data.branch})`;
1917
- }
1918
- return void 0;
1919
- case "project-name":
1920
- if (data.projectName) {
1921
- return `\u279C ${data.projectName}`;
1922
- }
1923
- return void 0;
1924
- case "pull-request-number": {
1925
- const prNumber = data.pullRequestNumber ?? inferPullRequestNumber(data.branch);
1926
- if (prNumber) {
1927
- return `#${prNumber}`;
1928
- }
1929
- return void 0;
1930
- }
1931
- case "branch-changes":
1932
- if (data.totalLinesAdded > 0 || data.totalLinesRemoved > 0) {
1933
- return `+${data.totalLinesAdded} -${data.totalLinesRemoved}`;
1934
- }
1935
- return void 0;
1936
- case "run-state":
1937
- return getRunStateLabel(data.streamingState);
1938
- case "qwen-version":
1939
- return `v${data.version}`;
1940
- case "context-window-size":
1941
- if (data.contextWindowSize > 0) {
1942
- return `${formatTokenCount(data.contextWindowSize)} window`;
1943
- }
1944
- return void 0;
1945
- case "used-tokens":
1946
- if (data.currentUsage > 0) {
1947
- return `${formatTokenCount(data.currentUsage)} used`;
1948
- }
1949
- return void 0;
1950
- case "total-input-tokens":
1951
- return `${formatTokenCount(data.totalInputTokens)} total in`;
1952
- case "total-output-tokens":
1953
- return `${formatTokenCount(data.totalOutputTokens)} total out`;
1954
- case "session-id":
1955
- return data.sessionId || void 0;
1956
- default: {
1957
- item;
1958
- return void 0;
1959
- }
1960
- }
1961
- }
1962
- __name(formatPresetItem, "formatPresetItem");
1963
- function buildStatusLinePresetParts(config, data) {
1964
- const parts = [];
1965
- for (const item of orderStatusLinePresetItems(config.items)) {
1966
- const text = formatPresetItem(item, data);
1967
- if (text) {
1968
- parts.push(text);
1969
- }
1970
- }
1971
- return parts;
1972
- }
1973
- __name(buildStatusLinePresetParts, "buildStatusLinePresetParts");
1974
- function buildStatusLinePresetLines(config, data) {
1975
- const line = buildStatusLinePresetParts(config, data).join(" \xB7 ").replace(/[\n\r\v\f\u0085\u2028\u2029]+/g, " ");
1976
- return line ? [line] : [];
1977
- }
1978
- __name(buildStatusLinePresetLines, "buildStatusLinePresetLines");
1979
-
1980
- // packages/cli/src/ui/utils/modelsBySource.ts
1981
- init_esbuild_shims();
1982
- function flattenModelsBySource(models) {
1983
- const sessionHasNonMainSource = Object.values(models).some(
1984
- (modelMetrics) => Object.keys(modelMetrics.bySource).some((source) => source !== MAIN_SOURCE)
1985
- );
1986
- const result = [];
1987
- for (const [modelName, modelMetrics] of Object.entries(models)) {
1988
- if (modelMetrics.api.totalRequests <= 0) continue;
1989
- const displayName = normalizeModelName(modelName);
1990
- const sourceNames = Object.keys(modelMetrics.bySource);
1991
- if (sourceNames.length === 0) {
1992
- result.push({
1993
- key: modelName,
1994
- label: displayName,
1995
- metrics: modelMetrics
1996
- });
1997
- continue;
1998
- }
1999
- if (!sessionHasNonMainSource) {
2000
- result.push({
2001
- key: modelName,
2002
- label: displayName,
2003
- metrics: modelMetrics.bySource[MAIN_SOURCE] ?? modelMetrics
2004
- });
2005
- continue;
2006
- }
2007
- const sortedSources = sortSources(sourceNames);
2008
- for (const source of sortedSources) {
2009
- result.push({
2010
- key: `${modelName}::${source}`,
2011
- label: `${displayName} (${source})`,
2012
- metrics: modelMetrics.bySource[source]
2013
- });
2014
- }
2015
- }
2016
- return result;
2017
- }
2018
- __name(flattenModelsBySource, "flattenModelsBySource");
2019
- function normalizeModelName(modelName) {
2020
- return modelName.replace("-001", "");
2021
- }
2022
- __name(normalizeModelName, "normalizeModelName");
2023
- function sortSources(sources) {
2024
- const main = [];
2025
- const rest = [];
2026
- for (const source of sources) {
2027
- if (source === MAIN_SOURCE) {
2028
- main.push(source);
2029
- } else {
2030
- rest.push(source);
2031
- }
2032
- }
2033
- rest.sort((a, b) => a.localeCompare(b));
2034
- return [...main, ...rest];
2035
- }
2036
- __name(sortSources, "sortSources");
2037
-
2038
- export {
2039
- SettingsContext,
2040
- useSettings,
2041
- useTerminalSize,
2042
- osc8Open,
2043
- osc8Close,
2044
- isSafeOscScheme,
2045
- trimTrailingUrlPunctuation,
2046
- MD_LINK_PATTERN,
2047
- MD_LINK_CAPTURE,
2048
- BARE_URL_PATTERN,
2049
- shouldWrapMarkdownLink,
2050
- labelMayDeceive,
2051
- getArenaStatusLabel,
2052
- TOOL_SUCCESS_RATE_HIGH,
2053
- TOOL_SUCCESS_RATE_MEDIUM,
2054
- USER_AGREEMENT_RATE_HIGH,
2055
- USER_AGREEMENT_RATE_MEDIUM,
2056
- getStatusColor,
2057
- formatDuration,
2058
- keyMatchers,
2059
- useSelectionList,
2060
- VirtualViewportContext,
2061
- useVirtualViewport,
2062
- useMouseTrackingEnabled,
2063
- useMouseEvents,
2064
- ContextMenuProvider,
2065
- useContextMenu,
2066
- contextMenuSize,
2067
- clampMenuPosition,
2068
- frameAnchor,
2069
- measureElementPosition,
2070
- layoutRowForEvent,
2071
- findElementAtMouseEvent,
2072
- RowMouseController,
2073
- BaseSelectionList,
2074
- RadioButtonSelect,
2075
- TOOL_DISPLAY_BY_NAME,
2076
- SessionStatsProvider,
2077
- useSessionStats,
2078
- flattenModelsBySource,
2079
- MCPServerApprovalDialog,
2080
- aggregateModelTokens,
2081
- STATUS_LINE_PRESET_ITEMS,
2082
- orderStatusLinePresetItems,
2083
- DEFAULT_STATUS_LINE_PRESET_CONFIG,
2084
- normalizeStatusLinePresetConfig,
2085
- formatTokenCount,
2086
- buildStatusLinePresetData,
2087
- buildStatusLinePresetLines
2088
- };
2089
- /**
2090
- * @license
2091
- * Copyright 2025 Google LLC
2092
- * SPDX-License-Identifier: Apache-2.0
2093
- */
2094
- /**
2095
- * @license
2096
- * Copyright 2025 Qwen
2097
- * SPDX-License-Identifier: Apache-2.0
2098
- */
2099
- /**
2100
- * @license
2101
- * Copyright 2025 Qwen
2102
- * SPDX-License-Identifier: Apache-2.0
2103
- *
2104
- * Inspired by gemini-cli's MouseContext (Google LLC, Apache-2.0): enable SGR
2105
- * mouse mode while at least one subscriber is active, parse mouse sequences
2106
- * out of the KeypressContext pipeline, call each handler, restore on cleanup.
2107
- */
2108
- /**
2109
- * @license
2110
- * Copyright 2025 Qwen
2111
- * SPDX-License-Identifier: Apache-2.0
2112
- *
2113
- * Pure geometry helper for mapping a terminal mouse row onto a vertical list of
2114
- * items. The DOM measurement (reading yoga layout via measureElementPosition)
2115
- * lives in the component that owns the refs; this is pure arithmetic so it can
2116
- * be unit-tested without a renderer.
2117
- */
2118
- /**
2119
- * @license
2120
- * Copyright 2025 Qwen Team
2121
- * SPDX-License-Identifier: Apache-2.0
2122
- *
2123
- * Shim for ink PR #968 (vadimdemedes/ink#968): extends measureElement()
2124
- * to return {x, y, width, height}. Once the upstream PR is merged and
2125
- * ink is upgraded, replace usages with `measureElement` from 'ink'
2126
- * and delete this file.
2127
- */
2128
- /**
2129
- * @license
2130
- * Copyright 2025 Qwen Team
2131
- * SPDX-License-Identifier: Apache-2.0
2132
- */
2133
- /**
2134
- * @license
2135
- * Copyright 2026 Qwen
2136
- * SPDX-License-Identifier: Apache-2.0
2137
- */