@qwen-code/qwen-code 0.23.2 → 0.23.3

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 (373) hide show
  1. package/README.md +35 -15
  2. package/bundled/computer-use/SKILL.md +1 -1
  3. package/bundled/qc-helper/docs/configuration/model-providers.md +66 -28
  4. package/bundled/qc-helper/docs/configuration/settings.md +5 -3
  5. package/bundled/qc-helper/docs/features/_meta.ts +1 -0
  6. package/bundled/qc-helper/docs/features/channels/dws.md +7 -1
  7. package/bundled/qc-helper/docs/features/commands.md +57 -9
  8. package/bundled/qc-helper/docs/features/computer-use.md +1 -1
  9. package/bundled/qc-helper/docs/features/cross-session-protocol.md +320 -0
  10. package/bundled/qc-helper/docs/features/goals.md +1 -1
  11. package/bundled/qc-helper/docs/qwen-serve.md +16 -3
  12. package/bundled/review/SKILL.md +82 -79
  13. package/bundled/review/references/posting.md +31 -14
  14. package/chunks/{MaxSizedBox-4C3BKKKY.js → MaxSizedBox-D4LW7RZZ.js} +58 -51
  15. package/chunks/{StandaloneSessionPicker-TXVF65YW.js → StandaloneSessionPicker-ALTTRWUP.js} +80 -73
  16. package/chunks/acp-subagent-executor-LEUN3N7N.js +919 -0
  17. package/chunks/{acpAgent-H5XBKGB4.js → acpAgent-BBSW7XZG.js} +509 -201
  18. package/chunks/{agent-T5LEFJIU.js → agent-SQ6OY3QD.js} +42 -36
  19. package/chunks/{agent-headless-VZKSRH36.js → agent-headless-RI2THRQ7.js} +42 -36
  20. package/chunks/{anthropicContentGenerator-PRJWWVYJ.js → anthropicContentGenerator-JSKMKS6V.js} +66 -34
  21. package/chunks/{artifact-tool-G5LHNECG.js → artifact-tool-PMYZCYNH.js} +2 -2
  22. package/chunks/{askUserQuestion-I5W5S3D6.js → askUserQuestion-4M4YYIB4.js} +2 -2
  23. package/chunks/{bridge-AOX5IY44.js → bridge-DAFMI72L.js} +62 -55
  24. package/chunks/{channel-management-service-MWQGHPAS.js → channel-management-service-OWDXVL7R.js} +8 -8
  25. package/chunks/{channel-settings-store-XZCGDGHW.js → channel-settings-store-4I6JONT7.js} +69 -62
  26. package/chunks/{channel-worker-group-SQ5FRWOH.js → channel-worker-group-F2ZZMLNS.js} +8 -8
  27. package/chunks/{channel-worker-manager-TU4ZNWOE.js → channel-worker-manager-2SZLJJSJ.js} +18 -9
  28. package/chunks/{channel-worker-supervisor-EMITFMCP.js → channel-worker-supervisor-ZFNWMG6D.js} +6 -6
  29. package/chunks/{chunk-GNY7B3CA.js → chunk-2ALXPGB4.js} +1 -1
  30. package/chunks/{chunk-LUNC5KCL.js → chunk-2PJRI3EH.js} +7 -7
  31. package/chunks/{chunk-CLKE4IY3.js → chunk-2SZH22YO.js} +1 -1
  32. package/chunks/{chunk-RNAJVXUG.js → chunk-2ZN3O5FT.js} +6 -6
  33. package/chunks/{chunk-HIXUUCGY.js → chunk-36HCNKDS.js} +1 -1
  34. package/chunks/{chunk-FGHPZGOP.js → chunk-3BTSSIJO.js} +38 -54
  35. package/chunks/{chunk-VBLAI2HA.js → chunk-3FPYT6QC.js} +0 -31
  36. package/chunks/{chunk-QB3KS3N3.js → chunk-3I7W2POO.js} +1 -1
  37. package/chunks/{chunk-QTB4VP4K.js → chunk-3KQBQ6FM.js} +136 -11
  38. package/chunks/{chunk-JO77FGNZ.js → chunk-3UXUOFO6.js} +19 -7
  39. package/chunks/{chunk-WDN64MVT.js → chunk-3XLK2QMY.js} +82 -16
  40. package/chunks/chunk-532WHF4F.js +127 -0
  41. package/chunks/{chunk-NX7ZTXFF.js → chunk-53GWJOLP.js} +1 -1
  42. package/chunks/{chunk-QQK4L3UU.js → chunk-5GLDOLNQ.js} +131 -26
  43. package/chunks/{chunk-WK7P62DV.js → chunk-5KI7ZDTB.js} +6 -6
  44. package/chunks/{chunk-ERXNTINK.js → chunk-6JACAGYH.js} +1 -1
  45. package/chunks/{chunk-CMWU6P4D.js → chunk-6W4HBUA2.js} +1 -1
  46. package/chunks/{chunk-AUTUFD5X.js → chunk-76RGWKLS.js} +1 -1
  47. package/chunks/{chunk-PDN7FJZV.js → chunk-7APZIRH3.js} +2 -2
  48. package/chunks/{chunk-WBU2PIZ5.js → chunk-7BXXIQG4.js} +16 -16
  49. package/chunks/{chunk-APXIW2TF.js → chunk-7ICHPMBQ.js} +4 -4
  50. package/chunks/{chunk-CWVZBIZJ.js → chunk-7Q2AXRDJ.js} +1 -1
  51. package/chunks/{chunk-WDVV3LRM.js → chunk-7QYWGTHB.js} +1 -1
  52. package/chunks/{chunk-RM244SCQ.js → chunk-AC6KDLH3.js} +1 -1
  53. package/chunks/{chunk-2WC3Y7YY.js → chunk-AEY27Z35.js} +401 -23
  54. package/chunks/{chunk-XDNFODER.js → chunk-AXTFYDXT.js} +1 -1
  55. package/chunks/chunk-AYEJOTIU.js +43 -0
  56. package/chunks/{chunk-ZN5TKAVR.js → chunk-BV6Q5HMY.js} +3 -3
  57. package/chunks/{chunk-TOOOLHVS.js → chunk-BWAMMKIS.js} +3 -3
  58. package/chunks/{chunk-IRGDIDGJ.js → chunk-BWQLXU37.js} +26 -19
  59. package/chunks/{process-registry-OAEG6WGC.js → chunk-BYUAT5OC.js} +1 -0
  60. package/chunks/{chunk-GOEVQADN.js → chunk-BZM5U74J.js} +287 -169
  61. package/chunks/chunk-CF5KXZZX.js +150 -0
  62. package/chunks/{chunk-TGNNLRC3.js → chunk-CJ3DHN5I.js} +1 -0
  63. package/chunks/{chunk-PFKGV6PO.js → chunk-CUEXOHQH.js} +9 -9
  64. package/chunks/chunk-CXTPVBFA.js +937 -0
  65. package/chunks/{chunk-LEAOJ43M.js → chunk-DAWWT2ID.js} +62 -59
  66. package/chunks/{chunk-CALTQWTZ.js → chunk-DLH7YIX6.js} +2 -2
  67. package/chunks/chunk-DT75RKNH.js +691 -0
  68. package/chunks/{chunk-TRWQQBVH.js → chunk-DTNV6UZY.js} +1 -1
  69. package/chunks/{chunk-3OAXF3UK.js → chunk-DYFOSJHU.js} +3080 -933
  70. package/chunks/{chunk-GSFV5RQW.js → chunk-E4UEO3XM.js} +3 -2
  71. package/chunks/{chunk-A7EFXK7P.js → chunk-E7LB57MB.js} +5 -5
  72. package/chunks/{chunk-KEPC5BOL.js → chunk-EDMXGXAK.js} +9 -9
  73. package/chunks/chunk-ELRMZTPF.js +374 -0
  74. package/chunks/chunk-ERU3SDXT.js +27 -0
  75. package/chunks/{chunk-O2FEO2CB.js → chunk-EUURTIV6.js} +18 -2
  76. package/chunks/{chunk-QFJZAY7W.js → chunk-EVTNACMT.js} +3 -3
  77. package/chunks/{chunk-4HOEU2OR.js → chunk-EWJTAP3Y.js} +1 -19
  78. package/chunks/{chunk-YQGW3M6Z.js → chunk-F42YYSCK.js} +8 -8
  79. package/chunks/{chunk-7PD7ZMX5.js → chunk-FCQJLMA2.js} +98 -5
  80. package/chunks/{chunk-4VY3ITHR.js → chunk-FN3JNDRU.js} +3 -3
  81. package/chunks/{chunk-R457KFV7.js → chunk-GCDXVPFK.js} +3 -3
  82. package/chunks/{chunk-IR6JKBAP.js → chunk-GOXQL4YH.js} +2 -2
  83. package/chunks/{chunk-YLOHCA6I.js → chunk-GSILBZLN.js} +2 -2
  84. package/chunks/{chunk-LNYV4GXX.js → chunk-GSKX53AN.js} +0 -139
  85. package/chunks/{chunk-4WMGYG3F.js → chunk-HBQ2NXOU.js} +2 -2
  86. package/chunks/{chunk-F2NYVASI.js → chunk-HBU7EKY4.js} +14 -12
  87. package/chunks/{chunk-6G4V7SE4.js → chunk-HG46TTAG.js} +1 -1
  88. package/chunks/{chunk-G5VOXCRX.js → chunk-HGAELO7B.js} +2 -2
  89. package/chunks/{chunk-FETY36NQ.js → chunk-HGEUHUEV.js} +1 -1
  90. package/chunks/{chunk-E6TI726I.js → chunk-HUXPEUFL.js} +1 -1
  91. package/chunks/{chunk-LYT2OU7D.js → chunk-IAEXTMED.js} +1 -1
  92. package/chunks/{chunk-IW6RQPQB.js → chunk-IJOS26LH.js} +1 -3
  93. package/chunks/{chunk-ORFIYTI2.js → chunk-IK2MWJP5.js} +1 -1
  94. package/chunks/{chunk-WXD7INFV.js → chunk-IL5M5NYD.js} +8 -8
  95. package/chunks/{chunk-KA5HR3G2.js → chunk-IUVIBDKU.js} +2 -2
  96. package/chunks/{chunk-5DQ4YTIZ.js → chunk-IV7GDNKC.js} +1 -1
  97. package/chunks/chunk-JL6APGBX.js +43 -0
  98. package/chunks/{chunk-N6S3NUYJ.js → chunk-JXNIF2O5.js} +1 -1
  99. package/chunks/{chunk-DAI65CMX.js → chunk-JYKWOREU.js} +1 -1
  100. package/chunks/chunk-K2OJUPOE.js +78 -0
  101. package/chunks/{chunk-KFECPHLV.js → chunk-KFZYGSJN.js} +3 -3
  102. package/chunks/{chunk-BK7D2JR6.js → chunk-KOKPXIAN.js} +3 -3
  103. package/chunks/{chunk-4I3WFI3U.js → chunk-LDVNJZGH.js} +12 -12
  104. package/chunks/{chunk-WXFCI3O5.js → chunk-LG5Y4OWO.js} +2 -2
  105. package/chunks/{chunk-3LPJ776W.js → chunk-LILGKQ4B.js} +10 -7
  106. package/chunks/{chunk-X7LFJF5D.js → chunk-LK2WUCDQ.js} +36 -84
  107. package/chunks/{chunk-7LTCFO6T.js → chunk-MF6E7FSA.js} +6 -5
  108. package/chunks/{chunk-ELD3OBPU.js → chunk-MHAADZOZ.js} +3 -3
  109. package/chunks/{chunk-4JNHNVAZ.js → chunk-MLQNSPRZ.js} +4 -4
  110. package/chunks/{chunk-NPKCVSXX.js → chunk-MOS5OAOG.js} +10 -8
  111. package/chunks/{chunk-IWABUX6T.js → chunk-MSNHNAQZ.js} +6 -6
  112. package/chunks/{chunk-HJ5UJQQL.js → chunk-N7VWZDWW.js} +1699 -1312
  113. package/chunks/{chunk-NB3NDQQK.js → chunk-NE624IVP.js} +1 -1
  114. package/chunks/{chunk-SOA4HKRJ.js → chunk-NFYEQRLG.js} +2 -2
  115. package/chunks/{chunk-G3ZUMSFS.js → chunk-NHCZJQE4.js} +6 -6
  116. package/chunks/{chunk-B25JYXZE.js → chunk-NHJKAR6E.js} +4 -4
  117. package/chunks/{chunk-ZP5XDLSA.js → chunk-NJQTG2G3.js} +12 -12
  118. package/chunks/{chunk-DARWOZY6.js → chunk-NLNQNBZ2.js} +1 -1
  119. package/chunks/{chunk-CCBTNJB4.js → chunk-NMCDMLHL.js} +27 -27
  120. package/chunks/{chunk-AO2VMS72.js → chunk-NMRCXKQ5.js} +3 -3
  121. package/chunks/{chunk-5BH2AIEY.js → chunk-NOAG7N22.js} +2 -2
  122. package/chunks/{chunk-VJJXG73H.js → chunk-NRXWJXJ4.js} +15 -0
  123. package/chunks/chunk-NUQ4GK5I.js +315 -0
  124. package/chunks/{chunk-J3VZF2AL.js → chunk-NUQVB25K.js} +2 -2
  125. package/chunks/{chunk-U6REWGVR.js → chunk-OLTN767L.js} +2 -2
  126. package/chunks/{chunk-R3JIDRUL.js → chunk-OX7IZ2G5.js} +4 -4
  127. package/chunks/{chunk-QAZ2MGYT.js → chunk-PLLIWEM3.js} +2 -2
  128. package/chunks/{chunk-KCF2436G.js → chunk-POC3YMHG.js} +4 -4
  129. package/chunks/{chunk-HZ2HUXX7.js → chunk-Q2LVVIKF.js} +1 -1
  130. package/chunks/{chunk-7NDZKE2M.js → chunk-Q5BD56BW.js} +3 -3
  131. package/chunks/{chunk-22GORRNY.js → chunk-QMUYLYT5.js} +1 -1
  132. package/chunks/{chunk-MV5DTLJV.js → chunk-R4Q2PEFV.js} +1 -1
  133. package/chunks/{chunk-GOKAOSCN.js → chunk-RLLRJJDR.js} +1 -1
  134. package/chunks/{chunk-5OZUKLL7.js → chunk-RWVD5RRY.js} +4 -4
  135. package/chunks/{chunk-ULZECEIP.js → chunk-RZHU3K6M.js} +2 -2
  136. package/chunks/{chunk-UYDQYDW2.js → chunk-S6Q6Q4P2.js} +1 -1
  137. package/chunks/{chunk-PQEISIKS.js → chunk-SAH4BD2J.js} +0 -67
  138. package/chunks/{chunk-LWX4WDFF.js → chunk-SBRX4BDI.js} +43 -15
  139. package/chunks/{chunk-TODNHE76.js → chunk-SODMFNAR.js} +5 -5
  140. package/chunks/{chunk-FAJPLSYF.js → chunk-SSGAAWLY.js} +89 -85
  141. package/chunks/{chunk-46MMBZHI.js → chunk-SYLECP23.js} +4 -4
  142. package/chunks/{chunk-6RZX2HIH.js → chunk-TBEXLLAO.js} +2 -2
  143. package/chunks/{chunk-MWIO7MF6.js → chunk-TP6FYVQT.js} +2 -0
  144. package/chunks/{chunk-HRPFBHW7.js → chunk-TPKQIA7G.js} +1 -0
  145. package/chunks/{chunk-QHLHE2OT.js → chunk-TWUKBNWM.js} +1 -1
  146. package/chunks/{chunk-H3Q3RSKZ.js → chunk-U7O65WKL.js} +1 -1
  147. package/chunks/{chunk-S5QR6CB5.js → chunk-UKMWZ5NS.js} +108 -887
  148. package/chunks/{chunk-OXR34GCD.js → chunk-UKZ45TJL.js} +1851 -34
  149. package/chunks/{chunk-CALNF3Z3.js → chunk-V2P3DOQR.js} +1 -1
  150. package/chunks/{chunk-FV4DM2M4.js → chunk-VG3Q2NC4.js} +7 -7
  151. package/chunks/{chunk-QTNCGZHQ.js → chunk-VX63RJXE.js} +9 -0
  152. package/chunks/{chunk-CRZBDVP2.js → chunk-VZUCTJ2P.js} +4 -4
  153. package/chunks/{chunk-2BMXHB6N.js → chunk-W5FIP7FC.js} +7 -7
  154. package/chunks/{chunk-7VEYUF3N.js → chunk-W5ZQMAEM.js} +1 -1
  155. package/chunks/{chunk-XQ4RDO5B.js → chunk-WBCPROWX.js} +1 -1
  156. package/chunks/{chunk-JYGIJA4W.js → chunk-X6K77VHC.js} +1 -1
  157. package/chunks/{chunk-7SVM3RP2.js → chunk-X7UJKOHZ.js} +3 -3
  158. package/chunks/{chunk-WXPPUPHM.js → chunk-XBZTAGB7.js} +1 -1
  159. package/chunks/{chunk-TRQNRP2H.js → chunk-XGYHNWL3.js} +45 -2
  160. package/chunks/{chunk-2EKVPSIJ.js → chunk-Y2MYW47X.js} +1 -1
  161. package/chunks/{chunk-OFVAS4AR.js → chunk-YBUMTY7B.js} +1 -1
  162. package/chunks/{chunk-67XTVRVB.js → chunk-YQHLFCPU.js} +7 -7
  163. package/chunks/{chunk-G37O7YO6.js → chunk-Z3GF56ME.js} +2 -2
  164. package/chunks/{chunk-XBVNNDPK.js → chunk-ZHKTKHMO.js} +8 -1
  165. package/chunks/{chunk-OWCFKIFQ.js → chunk-ZKYR7QS4.js} +1 -1
  166. package/chunks/{chunk-YZTGGCEE.js → chunk-ZKZHSB5W.js} +1 -1
  167. package/chunks/{chunk-565U2ANU.js → chunk-ZTTC7T4X.js} +1 -1
  168. package/chunks/{chunk-XSOXPG2L.js → chunk-ZU47FBOC.js} +36 -7
  169. package/chunks/{chunk-7OCIQNKX.js → chunk-ZW2EUO2A.js} +1 -1
  170. package/chunks/{config-utils-GPLIABL2.js → config-utils-L6KLDYIV.js} +62 -55
  171. package/chunks/{contextCommand-NCUQUDBY.js → contextCommand-UYEH7NIU.js} +59 -52
  172. package/chunks/{core-runtime-WKYKWVYU.js → core-runtime-NVHT3Z3V.js} +61 -54
  173. package/chunks/{create-sub-session-TGIX63YU.js → create-sub-session-TIGCFGCS.js} +2 -2
  174. package/chunks/{create-sub-session-PPLXB3JJ.js → create-sub-session-YWASE5VH.js} +59 -52
  175. package/chunks/{cron-create-GTPVMJCF.js → cron-create-AKWX67FO.js} +1 -1
  176. package/chunks/{cron-delete-ZBK27Z4K.js → cron-delete-XPB6IYZJ.js} +1 -1
  177. package/chunks/{cron-list-KTFKFDKC.js → cron-list-XBKO4WU5.js} +1 -1
  178. package/chunks/{daemon-2CKIAO3I.js → daemon-G5TYKZD6.js} +2 -2
  179. package/chunks/{daemon-git-worktree-guard-73ZWOLKL.js → daemon-git-worktree-guard-FOW4RQSK.js} +60 -53
  180. package/chunks/{daemon-status-provider-OK7VONJG.js → daemon-status-provider-O5KQZYMP.js} +67 -60
  181. package/chunks/{daemon-trust-policy-CAUCREG2.js → daemon-trust-policy-3ATXEON7.js} +64 -57
  182. package/chunks/{daemon-trust-policy-monitor-3Y36OOEQ.js → daemon-trust-policy-monitor-7MCNDNEC.js} +64 -57
  183. package/chunks/{deferred-core-runtime-Q7WFWYD3.js → deferred-core-runtime-JK5IXL5K.js} +57 -50
  184. package/chunks/{display-image-CTNHJRZC.js → display-image-NAH3AZ63.js} +3 -3
  185. package/chunks/{dist-NP7QKLVG.js → dist-AHJYPSJL.js} +3 -3
  186. package/chunks/{dist-6YDUH3BB.js → dist-AIKC5E5P.js} +2 -2
  187. package/chunks/{dist-Y5KC3IHW.js → dist-F2DVGTL3.js} +225 -6
  188. package/chunks/{dist-BNQVF565.js → dist-GWNQVPZT.js} +5 -5
  189. package/chunks/{dist-F6JLAJLE.js → dist-H6G3K26N.js} +3 -3
  190. package/chunks/{dist-ZDNJK74R.js → dist-KJGRVIGJ.js} +2 -2
  191. package/chunks/{dist-F34J4FZX.js → dist-KLZ7XGEQ.js} +2 -2
  192. package/chunks/{dist-UFTFGI6I.js → dist-ZA52JXAS.js} +2 -2
  193. package/chunks/{dist-XLV33CLY.js → dist-ZXTZTE54.js} +2 -2
  194. package/chunks/{edit-YJD6IETK.js → edit-SY35KYIE.js} +45 -39
  195. package/chunks/{en-YJNRUQG4.js → en-CAJHTIQT.js} +1 -0
  196. package/chunks/{enter-worktree-YFTKHXHZ.js → enter-worktree-54L5QJ3N.js} +4 -4
  197. package/chunks/{enterPlanMode-EFPVTWIH.js → enterPlanMode-HXX6KQJR.js} +42 -36
  198. package/chunks/{environment-HP3AXFTB.js → environment-DKXHG4HB.js} +60 -53
  199. package/chunks/{errors-22ON46G7.js → errors-ADY7LQJJ.js} +59 -52
  200. package/chunks/{exit-worktree-NF2XEMES.js → exit-worktree-EORJDKDS.js} +4 -4
  201. package/chunks/{exitPlanMode-MOQUNCBH.js → exitPlanMode-HSK2CQI6.js} +42 -36
  202. package/chunks/{fast-path-2X7BPMXX.js → fast-path-U636VWN2.js} +6 -6
  203. package/chunks/{fast-path-settings-SATXY3PD.js → fast-path-settings-V7MI7EZJ.js} +2 -2
  204. package/chunks/{glob-Y7ACIB3P.js → glob-GUGGTH5L.js} +45 -39
  205. package/chunks/{goal-tools-DABMICUC.js → goal-tools-PXYRSQGX.js} +42 -36
  206. package/chunks/{grep-BLHF2S5D.js → grep-3PKFKLCA.js} +2 -2
  207. package/chunks/{handleAutoUpdate-MCAMHYDI.js → handleAutoUpdate-5KHS4HIN.js} +60 -53
  208. package/chunks/{i18n-C3GDCALP.js → i18n-KSGKMUPT.js} +58 -51
  209. package/chunks/{image-gen-XP4NNIYG.js → image-gen-OCCR2WWU.js} +5 -4
  210. package/chunks/{initializer-4URDQL2G.js → initializer-YYT5XEZF.js} +64 -57
  211. package/chunks/{installationInfo-LBOL6SBV.js → installationInfo-UNSBPYW2.js} +57 -50
  212. package/chunks/{list-JOGBAC2R.js → list-YL6LDQKQ.js} +67 -60
  213. package/chunks/{list-agents-2CXPGJUE.js → list-agents-QLDXS5OD.js} +17 -7
  214. package/chunks/{llm-2KPNSAVY.js → llm-XGGLBGPH.js} +126 -119
  215. package/chunks/{llm-content-generator-GR3FOHLB.js → llm-content-generator-ZHQQT5W7.js} +5 -4
  216. package/chunks/{loadedSettingsAdapter-DVKROEJD.js → loadedSettingsAdapter-3DXLASK7.js} +64 -57
  217. package/chunks/{loggingContentGenerator-P4K6K5W4.js → loggingContentGenerator-V72OCCJO.js} +64 -57
  218. package/chunks/{loop-wakeup-HL6XOWI4.js → loop-wakeup-HHMYIC7Z.js} +2 -2
  219. package/chunks/{ls-YV7RKLKY.js → ls-N7ABR6HI.js} +4 -4
  220. package/chunks/{lsp-NO3AMRZT.js → lsp-LTOFWG5P.js} +1 -1
  221. package/chunks/{managed-npm-update-VWBKHNIN.js → managed-npm-update-HV5LPZH2.js} +57 -50
  222. package/chunks/{mcp-6YYNSYLK.js → mcp-IYVSIW6O.js} +64 -57
  223. package/chunks/{monitor-A255TNZR.js → monitor-TLBNM4MV.js} +44 -38
  224. package/chunks/{nonInteractiveCli-LXGIKQAT.js → nonInteractiveCli-LSJSQ2W4.js} +110 -103
  225. package/chunks/{notebook-edit-5UYHS2DM.js → notebook-edit-OSPOLZP6.js} +43 -37
  226. package/chunks/openai-WX26N5OJ.js +47 -0
  227. package/chunks/{openaiContentGenerator-A6MAMEO5.js → openaiContentGenerator-BE4S5TRD.js} +29 -23
  228. package/chunks/openaiResponsesContentGenerator-RTCAJ5V5.js +1658 -0
  229. package/chunks/{pidfile-B7DZC4TP.js → pidfile-H32FEPWA.js} +57 -50
  230. package/chunks/process-registry-X6ZCASEN.js +10 -0
  231. package/chunks/{processUtils-BPZ2MCZS.js → processUtils-SSLIPDEA.js} +2 -2
  232. package/chunks/{prompt-terminal-ledger-FYYTAOXS.js → prompt-terminal-ledger-I5SLL6UF.js} +58 -51
  233. package/chunks/{qwenContentGenerator-4IOJFD4S.js → qwenContentGenerator-TMQC623Z.js} +55 -47
  234. package/chunks/{qwenOAuth2-KX6LVYQ3.js → qwenOAuth2-3ZRQHHTC.js} +4 -3
  235. package/chunks/{read-file-A4H4O3VQ.js → read-file-T2QAIZE2.js} +11 -9
  236. package/chunks/{read-mcp-resource-D3N75DGF.js → read-mcp-resource-B37WANAQ.js} +1 -1
  237. package/chunks/{record-artifact-Q5CRGJTP.js → record-artifact-OAXWXZ5D.js} +2 -2
  238. package/chunks/record-source-D7R7X3GT.js +22 -0
  239. package/chunks/{report-findings-TJ34R7QK.js → report-findings-AR3VC6EQ.js} +3 -3
  240. package/chunks/{request-shutdown-LRKMTBAD.js → request-shutdown-IKNWTX5M.js} +5 -5
  241. package/chunks/{resumeHistoryUtils-YQQ43E4N.js → resumeHistoryUtils-QLKDH5GY.js} +63 -56
  242. package/chunks/{ripGrep-W32NWFTA.js → ripGrep-YGWL7KCV.js} +15 -13
  243. package/chunks/{run-qwen-serve-WBSWWIRV.js → run-qwen-serve-26KZDECC.js} +127 -102
  244. package/chunks/{runtime-VRVBX2E5.js → runtime-BMEIVDDG.js} +70 -63
  245. package/chunks/{scheduled-tasks-D65KJDA3.js → scheduled-tasks-NCFPP6VQ.js} +64 -57
  246. package/chunks/{scheduler-M2YPN7Z7.js → scheduler-47TVMUVN.js} +59 -52
  247. package/chunks/{sdk-exporters-grpc-MXTVSE3C.js → sdk-exporters-grpc-Y2ZUQDUQ.js} +2 -2
  248. package/chunks/{sdk-exporters-http-7R2ARBPV.js → sdk-exporters-http-VWTF4W6K.js} +3 -3
  249. package/chunks/{sdk-impl-YOLO7LV4.js → sdk-impl-G6FVTBQZ.js} +9 -9
  250. package/chunks/{send-message-76BKWKFZ.js → send-message-TWOGWCBG.js} +12 -9
  251. package/chunks/{serve-BE3H2P6P.js → serve-KL3G6LQQ.js} +64 -57
  252. package/chunks/{server-FLY5JERG.js → server-LBPYXZ5G.js} +2931 -518
  253. package/chunks/{session-JVN62R5K.js → session-YG6742LO.js} +118 -111
  254. package/chunks/{session-attachments-root-7ACGLHXA.js → session-attachments-root-OUBQDYC4.js} +57 -50
  255. package/chunks/{session-pr-refresh-TQS57SDK.js → session-pr-refresh-EKGMYNAW.js} +64 -57
  256. package/chunks/{settings-D44YMZFT.js → settings-DDNHJX2L.js} +69 -62
  257. package/chunks/{shell-3VE6I4V5.js → shell-KUCXWITU.js} +42 -36
  258. package/chunks/{skill-FHEGRRZU.js → skill-JQLKPNWZ.js} +33 -23
  259. package/chunks/{skill-settings-VHEJMBFL.js → skill-settings-XERQCUXZ.js} +63 -56
  260. package/chunks/{spawnChannel-T6MX2ZDN.js → spawnChannel-GQ45QFGB.js} +60 -53
  261. package/chunks/{standalone-update-QUGHFMCS.js → standalone-update-PRF3ILGZ.js} +59 -52
  262. package/chunks/{start-opentui-ui-IHIIZ2LE.js → start-opentui-ui-JDSOZE3N.js} +174 -157
  263. package/chunks/{startInteractiveUI-LR7K2ARZ.js → startInteractiveUI-RRW3JVHN.js} +533 -1119
  264. package/chunks/{syntheticOutput-D2P5V6RG.js → syntheticOutput-F6F27JMK.js} +2 -2
  265. package/chunks/{task-create-MWXJFRRM.js → task-create-Y623TBHB.js} +8 -8
  266. package/chunks/{task-list-EYO3FE57.js → task-list-FCPEEGWL.js} +1 -1
  267. package/chunks/{task-stop-BFSKRTGV.js → task-stop-QTKZXLPH.js} +1 -1
  268. package/chunks/{task-update-2JJJRHMT.js → task-update-YLSXF25N.js} +8 -8
  269. package/chunks/{team-create-GY3VFY47.js → team-create-5DRLOLOE.js} +44 -38
  270. package/chunks/{team-delete-IQZ6XGFI.js → team-delete-S7TLHZCF.js} +1 -1
  271. package/chunks/{team-plan-approval-BQPGZOT5.js → team-plan-approval-MWSGAL5T.js} +42 -36
  272. package/chunks/{terminal-image-renderer-YNYW5CQG.js → terminal-image-renderer-H7PD4FQW.js} +59 -52
  273. package/chunks/{theme-manager-U6CIK3GM.js → theme-manager-7AV73D6R.js} +57 -50
  274. package/chunks/{todoWrite-5ERKFWAK.js → todoWrite-5QI2H2FW.js} +4 -4
  275. package/chunks/{tool-search-XI3QWD5I.js → tool-search-UGYTBLUV.js} +17 -15
  276. package/chunks/{total-session-admission-3SNSJJ32.js → total-session-admission-JIHSTJ5S.js} +62 -55
  277. package/chunks/{trustedFolders-OVAQKNV5.js → trustedFolders-5VCBXFOP.js} +58 -51
  278. package/chunks/{update-relaunch-XV5O74E3.js → update-relaunch-4LF3APCV.js} +5 -5
  279. package/chunks/{updateCheck-CHUYWD6L.js → updateCheck-4T3WUE5F.js} +59 -52
  280. package/chunks/{useAutoAcceptIndicator-VKSVIXZC.js → useAutoAcceptIndicator-UMGB64Z6.js} +67 -60
  281. package/chunks/{validateNonInterActiveAuth-ZNUTD3E5.js → validateNonInterActiveAuth-GFJ72U2C.js} +107 -100
  282. package/chunks/{version-EK7VAGSI.js → version-EAAZN4T2.js} +1 -1
  283. package/chunks/{web-fetch-24KZO763.js → web-fetch-VRU3A2NI.js} +13 -11
  284. package/chunks/{web-search-CRNXKZ2X.js → web-search-NEGYQNDJ.js} +14 -10
  285. package/chunks/{web-shell-static-BFDESDD4.js → web-shell-static-CCN4JZEE.js} +1 -1
  286. package/chunks/workflow-UHPFALVZ.js +1224 -0
  287. package/chunks/{workspace-providers-status-MAM42IZS.js → workspace-providers-status-AEYISSU2.js} +68 -61
  288. package/chunks/{workspace-registration-store-HKLJEDQX.js → workspace-registration-store-A7RGKW62.js} +3 -1
  289. package/chunks/{workspace-registry-7RDDOBLN.js → workspace-registry-C2NGE6SD.js} +62 -55
  290. package/chunks/{workspace-runtime-coordinator-LEPDPXJO.js → workspace-runtime-coordinator-QKMZ24YF.js} +63 -56
  291. package/chunks/{workspace-service-5IFDCNN3.js → workspace-service-RQTTAGGC.js} +70 -63
  292. package/chunks/{workspace-skills-status-FJ3HNH4H.js → workspace-skills-status-5HWZU3HX.js} +65 -58
  293. package/chunks/{workspace-trust-reconciler-PQFHIWLR.js → workspace-trust-reconciler-KFWATZUU.js} +69 -62
  294. package/chunks/{write-file-ERG67ZFX.js → write-file-DPVB2SBQ.js} +44 -38
  295. package/chunks/{zh-VBFCRQBL.js → zh-S5V3Z5CR.js} +1 -0
  296. package/chunks/{zh-TW-N2TBF2F2.js → zh-TW-2K2WRFPY.js} +1 -0
  297. package/chunks/{zoom-image-WQYEC3SR.js → zoom-image-S7AWLAPC.js} +12 -10
  298. package/cli.js +13 -13
  299. package/export-transcript-document.css +1 -0
  300. package/export-transcript-document.js +164 -165
  301. package/locales/en.js +1 -0
  302. package/locales/zh-TW.js +1 -0
  303. package/locales/zh.js +1 -0
  304. package/package.json +5 -4
  305. package/web-shell/assets/{abnfDiagram-VCTEODGH-BRLgQbnT.js → abnfDiagram-VCTEODGH-nU24rpIE.js} +1 -1
  306. package/web-shell/assets/{arc-qAF9_XsR.js → arc-D1hTu8QI.js} +1 -1
  307. package/web-shell/assets/{architectureDiagram-5GKGNRK7-BorUttEz.js → architectureDiagram-5GKGNRK7-B_fgkKe7.js} +1 -1
  308. package/web-shell/assets/{blockDiagram-NRAW4CY4-Bj0qZVxu.js → blockDiagram-NRAW4CY4-C3pddUNg.js} +1 -1
  309. package/web-shell/assets/{c4Diagram-UCG6FXSJ-BTqJis32.js → c4Diagram-UCG6FXSJ-kEFoC1ei.js} +1 -1
  310. package/web-shell/assets/channel-Blod4z1X.js +1 -0
  311. package/web-shell/assets/{chunk-2Q5K7J3B-RrQ5X8m-.js → chunk-2Q5K7J3B-DbT9wS7j.js} +1 -1
  312. package/web-shell/assets/{chunk-5VM5RSS4-uUjDl8wO.js → chunk-5VM5RSS4-CNbULt6O.js} +1 -1
  313. package/web-shell/assets/{chunk-F27PBJKO-C3JhpyzI.js → chunk-F27PBJKO-CbQRy4Tb.js} +1 -1
  314. package/web-shell/assets/{chunk-G27WJ6UU-C8ZNFs7F.js → chunk-G27WJ6UU-CVbXTxYk.js} +1 -1
  315. package/web-shell/assets/{chunk-JWPE2WC7-DNpXtEOs.js → chunk-JWPE2WC7-D89c_BXy.js} +1 -1
  316. package/web-shell/assets/{chunk-LCL6LL3I-DagA2ZLw.js → chunk-LCL6LL3I-B7-I_9KB.js} +1 -1
  317. package/web-shell/assets/{chunk-POPQ4Y6H-R23uH7Xm.js → chunk-POPQ4Y6H-DcLQFzS4.js} +1 -1
  318. package/web-shell/assets/{chunk-SVP7TREG-Qz9RN_BR.js → chunk-SVP7TREG-DyBb2Axj.js} +1 -1
  319. package/web-shell/assets/{chunk-XXDRQBXY-jYb1_hni.js → chunk-XXDRQBXY-BIA0eb5B.js} +1 -1
  320. package/web-shell/assets/classDiagram-DTDB5LWJ-D6hFDMqb.js +1 -0
  321. package/web-shell/assets/classDiagram-v2-JRS7N3AN-D6hFDMqb.js +1 -0
  322. package/web-shell/assets/{cose-bilkent-JH36ORCC-Cv2OunpE.js → cose-bilkent-JH36ORCC-Db2FYN85.js} +1 -1
  323. package/web-shell/assets/{cynefin-OW5HDTMX-LH42KFJx.js → cynefin-OW5HDTMX-i4GwmBVy.js} +1 -1
  324. package/web-shell/assets/{cynefinDiagram-5FMLGOSQ-Dha4_OoR.js → cynefinDiagram-5FMLGOSQ-LENf_IUy.js} +1 -1
  325. package/web-shell/assets/{dagre-3AP2YEHR-Br5lnUKD.js → dagre-3AP2YEHR-CF9XVrD9.js} +1 -1
  326. package/web-shell/assets/{diagram-S7CK7UJ4-dpKq2bBX.js → diagram-S7CK7UJ4-DD5PJfSm.js} +1 -1
  327. package/web-shell/assets/{diagram-UQ7AKVKN-BAgHWpXr.js → diagram-UQ7AKVKN-CjD_sBMj.js} +1 -1
  328. package/web-shell/assets/{diagram-VSXAHHWV-GRRzpyE2.js → diagram-VSXAHHWV-U5WwMqyA.js} +1 -1
  329. package/web-shell/assets/{diagram-VX7I27RA-BNFiaYpG.js → diagram-VX7I27RA-BujpHJJf.js} +1 -1
  330. package/web-shell/assets/{diagram-Z3DM3KII-BisZzB_h.js → diagram-Z3DM3KII-3ZLtKEXo.js} +1 -1
  331. package/web-shell/assets/{ebnfDiagram-PWID7BFC-B1xbwycf.js → ebnfDiagram-PWID7BFC-BGpiquRm.js} +1 -1
  332. package/web-shell/assets/{erDiagram-SSCWMZ5O-CQMzbGE5.js → erDiagram-SSCWMZ5O-D0besu_U.js} +1 -1
  333. package/web-shell/assets/{flowDiagram-A5DVABFB-CZ_Zondl.js → flowDiagram-A5DVABFB-9DwDuIyr.js} +1 -1
  334. package/web-shell/assets/{ganttDiagram-EL5Y4UJY-BTh2ShxS.js → ganttDiagram-EL5Y4UJY-CNlsAeNr.js} +1 -1
  335. package/web-shell/assets/{gitGraphDiagram-WWUBYQGX-oHOB-Uxt.js → gitGraphDiagram-WWUBYQGX-C_pPFiTR.js} +1 -1
  336. package/web-shell/assets/{index-DWoFMu5x.js → index-BYWs4JWq.js} +1 -1
  337. package/web-shell/assets/index-D3YS6KuJ.js +2173 -0
  338. package/web-shell/assets/index-eBxK3rs2.css +36 -0
  339. package/web-shell/assets/{infoDiagram-RXCK75RN-C0QpudbG.js → infoDiagram-RXCK75RN-Bpai64Ll.js} +1 -1
  340. package/web-shell/assets/{ishikawaDiagram-5VMMS53U-a6B741uT.js → ishikawaDiagram-5VMMS53U-ktpJFq4r.js} +1 -1
  341. package/web-shell/assets/{journeyDiagram-EYS64GPL-Dbht9ICp.js → journeyDiagram-EYS64GPL-iz_DKgFX.js} +1 -1
  342. package/web-shell/assets/{kanban-definition-3QL26DDD-D4OFR8-h.js → kanban-definition-3QL26DDD-m_gG00Yt.js} +1 -1
  343. package/web-shell/assets/{layout-Dvdh5jRH.js → layout-qEvKgnvU.js} +1 -1
  344. package/web-shell/assets/{linear-Dvc6KIW2.js → linear-C6lklGdq.js} +1 -1
  345. package/web-shell/assets/{mermaid.core-CB36RfIb.js → mermaid.core-DSCYB_2P.js} +6 -6
  346. package/web-shell/assets/{mindmap-definition-FBJOCRG2-Fmqo1CjP.js → mindmap-definition-FBJOCRG2-DRQbT8w-.js} +1 -1
  347. package/web-shell/assets/{pegDiagram-XKGWAZYB-CCxYBoA4.js → pegDiagram-XKGWAZYB-BhD0q0i6.js} +1 -1
  348. package/web-shell/assets/{pieDiagram-E7YTZNPT-BVHKQFzt.js → pieDiagram-E7YTZNPT-BvIGQCSd.js} +1 -1
  349. package/web-shell/assets/{quadrantDiagram-AXDQQJYC-l95IznwR.js → quadrantDiagram-AXDQQJYC-BDQtfpU-.js} +1 -1
  350. package/web-shell/assets/{railroadDiagram-O6MQD6OU-BlLdRdXp.js → railroadDiagram-O6MQD6OU-E1g2KIFK.js} +1 -1
  351. package/web-shell/assets/{requirementDiagram-EFPCY7ZU-BkDLBR5w.js → requirementDiagram-EFPCY7ZU-CuerYJOe.js} +1 -1
  352. package/web-shell/assets/{sankeyDiagram-P5KCCOFB-jAIqRp65.js → sankeyDiagram-P5KCCOFB-CqWyCZGA.js} +1 -1
  353. package/web-shell/assets/{sequenceDiagram-WJ2MYXX4-f-soZYPr.js → sequenceDiagram-WJ2MYXX4-B-YWb8x4.js} +1 -1
  354. package/web-shell/assets/{sizeCapture-X5ZJPWSS-BzOuAfB2.js → sizeCapture-X5ZJPWSS-BB7YY4Tl.js} +1 -1
  355. package/web-shell/assets/{stateDiagram-HBIQ2CUA-BPLSs12r.js → stateDiagram-HBIQ2CUA-C8LDpNHS.js} +1 -1
  356. package/web-shell/assets/stateDiagram-v2-4QOOHH4V-C4CbdvGa.js +1 -0
  357. package/web-shell/assets/{swimlanes-XN3QIQJK-D-9E_RIR.js → swimlanes-XN3QIQJK-D94vOoxZ.js} +1 -1
  358. package/web-shell/assets/swimlanesDiagram-VK2B7HYN--QNSIOC8.js +8 -0
  359. package/web-shell/assets/{timeline-definition-24CTP7MA-CT56K-gV.js → timeline-definition-24CTP7MA-C9C8uEYm.js} +1 -1
  360. package/web-shell/assets/{vennDiagram-4TSXK5OY-B-vi4IyO.js → vennDiagram-4TSXK5OY-CYzMHbVW.js} +1 -1
  361. package/web-shell/assets/{wardleyDiagram-VM6X3IG4-C9O7Ju98.js → wardleyDiagram-VM6X3IG4-G9nhtLES.js} +1 -1
  362. package/web-shell/assets/{xychartDiagram-S5SC5T6Z-6d8w3jg2.js → xychartDiagram-S5SC5T6Z-ruD2Wjhg.js} +1 -1
  363. package/web-shell/index.html +29 -5
  364. package/chunks/chunk-V7RNNPGC.js +0 -44
  365. package/chunks/workflow-HD5NYMW5.js +0 -2907
  366. package/web-shell/assets/channel-COIuCrVH.js +0 -1
  367. package/web-shell/assets/classDiagram-DTDB5LWJ-DoX6OYqu.js +0 -1
  368. package/web-shell/assets/classDiagram-v2-JRS7N3AN-DoX6OYqu.js +0 -1
  369. package/web-shell/assets/index-CI1ysIEv.js +0 -2154
  370. package/web-shell/assets/index-CpxXGH-8.css +0 -36
  371. package/web-shell/assets/stateDiagram-v2-4QOOHH4V-IRul-LaT.js +0 -1
  372. package/web-shell/assets/swimlanesDiagram-VK2B7HYN-D6lgKepA.js +0 -8
  373. /package/chunks/{chunk-JA5CBKRP.js → chunk-7NXSVSFB.js} +0 -0
@@ -1,5 +1,19 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
+ import {
4
+ buildPermissionSuggestions
5
+ } from "./chunk-BFSFJR3D.js";
6
+ import {
7
+ useAutoAcceptIndicator
8
+ } from "./chunk-HGAELO7B.js";
9
+ import {
10
+ MAX_ACCEPTED_BACKLOG,
11
+ PeerMessaging,
12
+ classifyApiError
13
+ } from "./chunk-DT75RKNH.js";
14
+ import {
15
+ normalizePartList
16
+ } from "./chunk-5IENVM7Z.js";
3
17
  import {
4
18
  DualOutputBridge,
5
19
  EDITOR_DISPLAY_NAMES,
@@ -41,17 +55,94 @@ import {
41
55
  useProviderSetupFlow,
42
56
  useShellCommandProcessor,
43
57
  writeTerminalTitle
44
- } from "./chunk-IRGDIDGJ.js";
45
- import {
46
- buildPermissionSuggestions
47
- } from "./chunk-BFSFJR3D.js";
58
+ } from "./chunk-BWQLXU37.js";
48
59
  import {
49
60
  TUI_CHAT_RECORDING_FAILURE_MESSAGE
50
- } from "./chunk-CALNF3Z3.js";
51
- import "./chunk-R3JIDRUL.js";
61
+ } from "./chunk-V2P3DOQR.js";
62
+ import "./chunk-OX7IZ2G5.js";
52
63
  import {
53
64
  startPostRenderPrefetches
54
- } from "./chunk-ZP5XDLSA.js";
65
+ } from "./chunk-NJQTG2G3.js";
66
+ import {
67
+ fireSessionDeleteHook
68
+ } from "./chunk-L34XSHIZ.js";
69
+ import {
70
+ MAX_SUGGESTIONS_TO_SHOW,
71
+ SESSION_MENTION_PREFIX,
72
+ buildMcpResourceRef,
73
+ buildMcpServerRef,
74
+ buildSessionRef,
75
+ getExtensionSuggestions,
76
+ handleAtCommand,
77
+ matchMcpServerPrefix,
78
+ resolveAtCommandQuery,
79
+ sanitizeDisplayText
80
+ } from "./chunk-MLQNSPRZ.js";
81
+ import {
82
+ BuiltinCommandLoader,
83
+ BundledSkillLoader,
84
+ CONTEXT_FILES_ANNOUNCEMENT_PREFIX,
85
+ CommandService,
86
+ DISPLAY_HOOK_EVENTS,
87
+ FileCommandLoader,
88
+ MAX_STACKED_SKILLS,
89
+ McpPromptLoader,
90
+ SLASH_COMMANDS_SKIP_RECORDING,
91
+ SavedWorkflowLoader,
92
+ SkillCommandLoader,
93
+ addConfigToMatcherGroup,
94
+ appendUserPromptExpansionAdditionalContext,
95
+ applyOutputStyleSelection,
96
+ buildBackgroundWorkBlockedMessage,
97
+ consumesContextAnnouncementLatch,
98
+ copyToClipboard,
99
+ createEmptyHookEventInfo,
100
+ dayKey,
101
+ findMidInputSlashCommand,
102
+ findSlashCommandTokens,
103
+ formatApprovalModeDescription,
104
+ formatApprovalModeName,
105
+ formatEffortChangeMessage,
106
+ formatUserPromptExpansionBlockedMessage,
107
+ getAllConfigs,
108
+ getBestSlashCommandMatch,
109
+ getTranslatedSourceDisplayMap,
110
+ hasBlockingBackgroundWork,
111
+ hasSlashCommandPathSeparator,
112
+ isAtCommand,
113
+ isBtwCommand,
114
+ isContextFilesAnnouncement,
115
+ isMidInputCompletableCommand,
116
+ isPickerOnlyModelInvocation,
117
+ isSlashCommand,
118
+ isStackedSkillCompletableCommand,
119
+ isValidStackedSkillPrefix,
120
+ loadSessionOutputStyles,
121
+ parseDayKey,
122
+ parseSlashCommand,
123
+ parseStackedSlashCommands,
124
+ quitCommand,
125
+ recordAutoSkillCommandUsage,
126
+ refreshExtensionContentRuntime,
127
+ resetBackgroundStateForSessionSwitch,
128
+ resolveOutputStyleChoice,
129
+ serializeUserPromptExpansionPrompt,
130
+ supportsMatchers
131
+ } from "./chunk-SSGAAWLY.js";
132
+ import {
133
+ EXTENSION_RELOAD_FAILED_REASON,
134
+ ExtensionRefreshState,
135
+ appEvents,
136
+ cleanupReviewWorktreeLeases,
137
+ loadHierarchicalMemory
138
+ } from "./chunk-DYFOSJHU.js";
139
+ import {
140
+ disableKittyProtocol,
141
+ isKittyProtocolEnabled,
142
+ isKittyProtocolSupported,
143
+ pushKittyProtocolFlags
144
+ } from "./chunk-NYX53SV4.js";
145
+ import "./chunk-W5FIP7FC.js";
55
146
  import {
56
147
  AboutBox,
57
148
  BaseSelectionList,
@@ -126,7 +217,13 @@ import {
126
217
  useUIActions,
127
218
  useUIState,
128
219
  useVirtualViewport
129
- } from "./chunk-LEAOJ43M.js";
220
+ } from "./chunk-DAWWT2ID.js";
221
+ import {
222
+ KeypressProvider,
223
+ useFocus,
224
+ useKeypress,
225
+ useKeypressContext
226
+ } from "./chunk-E7LB57MB.js";
130
227
  import {
131
228
  DEFAULT_STATUS_LINE_PRESET_CONFIG,
132
229
  STATUS_LINE_PRESET_ITEMS,
@@ -146,136 +243,15 @@ import {
146
243
  normalizeStatusLinePresetConfig,
147
244
  orderStatusLinePresetItems,
148
245
  useSessionStats
149
- } from "./chunk-B25JYXZE.js";
150
- import {
151
- ICON,
152
- RespondingSpinner,
153
- SCREEN_READER_USER_PREFIX,
154
- Spinner,
155
- StreamingContext,
156
- applyCollapsePolicyAndSummary,
157
- buildResumedHistoryItems,
158
- build_default,
159
- expandCollapsedHistory,
160
- isCollapsibleTool,
161
- recoalesceFindingsHistoryItems,
162
- shouldDisplayGoalStateCause,
163
- useStreamingContext,
164
- waitForGoalRuntime,
165
- wrapAnsi
166
- } from "./chunk-WXD7INFV.js";
167
- import {
168
- stopAndGetCapturedInput
169
- } from "./chunk-EWNKP4V4.js";
170
- import {
171
- useAutoAcceptIndicator
172
- } from "./chunk-G5VOXCRX.js";
173
- import {
174
- KeypressProvider,
175
- useFocus,
176
- useKeypress,
177
- useKeypressContext
178
- } from "./chunk-A7EFXK7P.js";
179
- import {
180
- classifyApiError
181
- } from "./chunk-V7RNNPGC.js";
182
- import {
183
- fireSessionDeleteHook
184
- } from "./chunk-L34XSHIZ.js";
185
- import {
186
- normalizePartList
187
- } from "./chunk-5IENVM7Z.js";
188
- import {
189
- MAX_SUGGESTIONS_TO_SHOW,
190
- SESSION_MENTION_PREFIX,
191
- buildMcpResourceRef,
192
- buildMcpServerRef,
193
- buildSessionRef,
194
- getExtensionSuggestions,
195
- handleAtCommand,
196
- matchMcpServerPrefix,
197
- resolveAtCommandQuery,
198
- sanitizeDisplayText
199
- } from "./chunk-4JNHNVAZ.js";
200
- import {
201
- BuiltinCommandLoader,
202
- BundledSkillLoader,
203
- CONTEXT_FILES_ANNOUNCEMENT_PREFIX,
204
- CommandService,
205
- DISPLAY_HOOK_EVENTS,
206
- FileCommandLoader,
207
- MAX_STACKED_SKILLS,
208
- McpPromptLoader,
209
- SLASH_COMMANDS_SKIP_RECORDING,
210
- SavedWorkflowLoader,
211
- SkillCommandLoader,
212
- addConfigToMatcherGroup,
213
- appendUserPromptExpansionAdditionalContext,
214
- applyOutputStyleSelection,
215
- buildBackgroundWorkBlockedMessage,
216
- consumesContextAnnouncementLatch,
217
- copyToClipboard,
218
- createEmptyHookEventInfo,
219
- dayKey,
220
- findMidInputSlashCommand,
221
- findSlashCommandTokens,
222
- formatApprovalModeDescription,
223
- formatApprovalModeName,
224
- formatEffortChangeMessage,
225
- formatUserPromptExpansionBlockedMessage,
226
- getAllConfigs,
227
- getBestSlashCommandMatch,
228
- getTranslatedSourceDisplayMap,
229
- hasBlockingBackgroundWork,
230
- hasSlashCommandPathSeparator,
231
- isAtCommand,
232
- isBtwCommand,
233
- isContextFilesAnnouncement,
234
- isMidInputCompletableCommand,
235
- isPickerOnlyModelInvocation,
236
- isSlashCommand,
237
- isStackedSkillCompletableCommand,
238
- isValidStackedSkillPrefix,
239
- loadSessionOutputStyles,
240
- parseDayKey,
241
- parseSlashCommand,
242
- parseStackedSlashCommands,
243
- quitCommand,
244
- recordAutoSkillCommandUsage,
245
- refreshExtensionContentRuntime,
246
- resetBackgroundStateForSessionSwitch,
247
- resolveOutputStyleChoice,
248
- serializeUserPromptExpansionPrompt,
249
- supportsMatchers
250
- } from "./chunk-FAJPLSYF.js";
251
- import {
252
- EXTENSION_RELOAD_FAILED_REASON,
253
- ExtensionRefreshState,
254
- appEvents,
255
- cleanupReviewWorktreeLeases,
256
- loadHierarchicalMemory
257
- } from "./chunk-3OAXF3UK.js";
246
+ } from "./chunk-NHJKAR6E.js";
258
247
  import {
259
248
  getCommandDisplayName,
260
249
  getCommandSourceBadge
261
- } from "./chunk-CWVZBIZJ.js";
250
+ } from "./chunk-7Q2AXRDJ.js";
262
251
  import {
263
252
  computeSessionStats,
264
253
  levelLabel
265
- } from "./chunk-TOOOLHVS.js";
266
- import {
267
- contextUsageLabel,
268
- formatDuration,
269
- formatPercentageUsed,
270
- formatRelativeTime,
271
- formatTokenCount
272
- } from "./chunk-22GORRNY.js";
273
- import {
274
- disableKittyProtocol,
275
- isKittyProtocolEnabled,
276
- isKittyProtocolSupported,
277
- pushKittyProtocolFlags
278
- } from "./chunk-NYX53SV4.js";
254
+ } from "./chunk-BWAMMKIS.js";
279
255
  import {
280
256
  BEL,
281
257
  OSC_PREFIX,
@@ -288,27 +264,43 @@ import {
288
264
  oscKittyNotify,
289
265
  saveClipboardImage,
290
266
  writeOsc52
291
- } from "./chunk-UYDQYDW2.js";
292
- import "./chunk-2BMXHB6N.js";
267
+ } from "./chunk-S6Q6Q4P2.js";
293
268
  import "./chunk-4WGODMVR.js";
294
- import "./chunk-AO2VMS72.js";
295
- import "./chunk-KW7NOTN6.js";
296
269
  import {
297
270
  MaxSizedBox,
298
271
  OverflowProvider,
299
272
  useOverflowState
300
273
  } from "./chunk-2UWQX4FP.js";
274
+ import {
275
+ ICON,
276
+ RespondingSpinner,
277
+ SCREEN_READER_USER_PREFIX,
278
+ Spinner,
279
+ StreamingContext,
280
+ applyCollapsePolicyAndSummary,
281
+ buildResumedHistoryItems,
282
+ build_default,
283
+ expandCollapsedHistory,
284
+ isCollapsibleTool,
285
+ recoalesceFindingsHistoryItems,
286
+ shouldDisplayGoalStateCause,
287
+ useStreamingContext,
288
+ waitForGoalRuntime,
289
+ wrapAnsi
290
+ } from "./chunk-IL5M5NYD.js";
291
+ import {
292
+ contextUsageLabel,
293
+ formatDuration,
294
+ formatPercentageUsed,
295
+ formatRelativeTime,
296
+ formatTokenCount
297
+ } from "./chunk-QMUYLYT5.js";
301
298
  import {
302
299
  theme
303
300
  } from "./chunk-4LIPOIXS.js";
304
301
  import {
305
302
  require_jsx_runtime
306
303
  } from "./chunk-SV5PQVQE.js";
307
- import {
308
- AUTO_THEME_NAME,
309
- DEFAULT_THEME,
310
- themeManager
311
- } from "./chunk-2XRE4KE4.js";
312
304
  import {
313
305
  Box_default,
314
306
  Static,
@@ -325,40 +317,49 @@ import {
325
317
  import {
326
318
  require_react
327
319
  } from "./chunk-5QWWOFGG.js";
328
- import "./chunk-46MMBZHI.js";
329
- import {
330
- getErrorMessage as getErrorMessage2
331
- } from "./chunk-R457KFV7.js";
332
320
  import {
333
- relaunchApp
334
- } from "./chunk-RM244SCQ.js";
335
- import "./chunk-5DQ4YTIZ.js";
336
- import "./chunk-WXFCI3O5.js";
321
+ stopAndGetCapturedInput
322
+ } from "./chunk-EWNKP4V4.js";
323
+ import "./chunk-LG5Y4OWO.js";
337
324
  import {
338
325
  MAX_INLINE_IMAGES_PER_ITEM,
339
326
  collectInlineImages,
340
327
  getInlineImageData
341
- } from "./chunk-XQ4RDO5B.js";
328
+ } from "./chunk-WBCPROWX.js";
342
329
  import {
343
330
  setUpdateHandler
344
- } from "./chunk-PDN7FJZV.js";
331
+ } from "./chunk-7APZIRH3.js";
345
332
  import {
346
333
  isHistoryItemVisibleAfterRestore
347
334
  } from "./chunk-EKTCKZV5.js";
348
- import "./chunk-IR6JKBAP.js";
335
+ import "./chunk-GOXQL4YH.js";
336
+ import "./chunk-NMRCXKQ5.js";
337
+ import {
338
+ AUTO_THEME_NAME,
339
+ DEFAULT_THEME,
340
+ themeManager
341
+ } from "./chunk-2XRE4KE4.js";
342
+ import "./chunk-KW7NOTN6.js";
343
+ import "./chunk-EVTNACMT.js";
344
+ import "./chunk-6H67XLET.js";
345
+ import "./chunk-SYLECP23.js";
346
+ import {
347
+ getErrorMessage as getErrorMessage2
348
+ } from "./chunk-GCDXVPFK.js";
349
+ import {
350
+ relaunchApp
351
+ } from "./chunk-AC6KDLH3.js";
352
+ import "./chunk-IV7GDNKC.js";
349
353
  import "./chunk-YAF2MQZ6.js";
350
354
  import "./chunk-24FVUD5P.js";
351
- import "./chunk-QFJZAY7W.js";
352
- import "./chunk-6H67XLET.js";
353
355
  import {
354
356
  openQwenAsrRealtimeStream,
355
357
  openVoiceStream,
356
358
  openVoiceStreamWithRetry
357
359
  } from "./chunk-Q2SAQTEJ.js";
358
- import "./chunk-WDN64MVT.js";
360
+ import "./chunk-3XLK2QMY.js";
359
361
  import "./chunk-M3JGHRMQ.js";
360
362
  import "./chunk-VFFQAOPR.js";
361
- import "./chunk-ERXNTINK.js";
362
363
  import {
363
364
  cpLen,
364
365
  cpSlice,
@@ -372,15 +373,15 @@ import {
372
373
  toCodePoints,
373
374
  truncateToWidth
374
375
  } from "./chunk-47ECGEJC.js";
376
+ import "./chunk-6JACAGYH.js";
375
377
  import {
376
378
  stringWidth
377
379
  } from "./chunk-2MIN6GRR.js";
378
380
  import "./chunk-QHTIBUWB.js";
379
381
  import "./chunk-TXASDT2M.js";
382
+ import "./chunk-4VQBQLIZ.js";
380
383
  import "./chunk-PB7JBAHF.js";
381
384
  import "./chunk-UXEO7E3V.js";
382
- import "./chunk-4VQBQLIZ.js";
383
- import "./chunk-DMEUXLSS.js";
384
385
  import {
385
386
  isValidSessionId
386
387
  } from "./chunk-ZEZKIS2K.js";
@@ -390,61 +391,59 @@ import {
390
391
  isStreamingVoiceModel,
391
392
  resolveVoiceStreamConfig,
392
393
  transcribeVoiceAudio
393
- } from "./chunk-GNY7B3CA.js";
394
+ } from "./chunk-2ALXPGB4.js";
394
395
  import {
395
396
  formatUnsupportedVoiceModelMessage,
396
397
  isSelectableVoiceModel
397
- } from "./chunk-NB3NDQQK.js";
398
+ } from "./chunk-NE624IVP.js";
398
399
  import "./chunk-Y53DG2HA.js";
400
+ import "./chunk-FCQJLMA2.js";
401
+ import "./chunk-DMEUXLSS.js";
402
+ import "./chunk-TWUKBNWM.js";
399
403
  import {
400
404
  getExtendedSystemInfo
401
- } from "./chunk-5OZUKLL7.js";
402
- import "./chunk-4WMGYG3F.js";
405
+ } from "./chunk-RWVD5RRY.js";
406
+ import "./chunk-HBQ2NXOU.js";
403
407
  import "./chunk-7U5G6JXI.js";
404
408
  import "./chunk-WCCLLK7X.js";
405
409
  import {
406
410
  getReasoningEffortsForConfig
407
- } from "./chunk-ZN5TKAVR.js";
411
+ } from "./chunk-BV6Q5HMY.js";
408
412
  import {
409
413
  isInlineModelOverrideAllowed
410
- } from "./chunk-7LTCFO6T.js";
414
+ } from "./chunk-MF6E7FSA.js";
411
415
  import {
412
416
  computeWorkspaceSkillListUpdates,
413
417
  skillSettingStrings
414
418
  } from "./chunk-HWVUSYSN.js";
415
- import "./chunk-7PD7ZMX5.js";
416
- import "./chunk-G3ZUMSFS.js";
419
+ import "./chunk-NHCZJQE4.js";
417
420
  import {
418
421
  requestConsentInteractive,
419
422
  requestConsentOrFail
420
- } from "./chunk-TODNHE76.js";
423
+ } from "./chunk-SODMFNAR.js";
421
424
  import "./chunk-57OAHC2Y.js";
422
- import "./chunk-ULZECEIP.js";
423
- import "./chunk-PFKGV6PO.js";
424
- import "./chunk-AUTUFD5X.js";
425
+ import "./chunk-RZHU3K6M.js";
426
+ import "./chunk-CUEXOHQH.js";
427
+ import "./chunk-76RGWKLS.js";
425
428
  import "./chunk-V6WHFGST.js";
426
- import "./chunk-QHLHE2OT.js";
427
- import "./chunk-JYGIJA4W.js";
428
- import "./chunk-2AUM35J5.js";
429
- import "./chunk-N6VQ37ZZ.js";
430
429
  import "./chunk-PSPAM24S.js";
431
- import "./chunk-6PLDPT2C.js";
432
430
  import "./chunk-FYJ7W2PI.js";
433
431
  import "./chunk-STUJ7IMZ.js";
434
- import "./chunk-DARWOZY6.js";
435
- import "./chunk-GYTKQYDB.js";
432
+ import "./chunk-NLNQNBZ2.js";
436
433
  import "./chunk-ALMR3E6Q.js";
434
+ import "./chunk-GYTKQYDB.js";
437
435
  import "./chunk-RKFGE7JH.js";
436
+ import "./chunk-CJ3DHN5I.js";
438
437
  import "./chunk-UDG5EZJI.js";
439
438
  import "./chunk-M5GB774H.js";
440
439
  import "./chunk-3VUENPWF.js";
441
- import "./chunk-TGNNLRC3.js";
442
- import "./chunk-WDVV3LRM.js";
443
- import "./chunk-IW6RQPQB.js";
444
440
  import "./chunk-NFXXBWSE.js";
441
+ import "./chunk-X6K77VHC.js";
442
+ import "./chunk-7QYWGTHB.js";
443
+ import "./chunk-IJOS26LH.js";
445
444
  import {
446
445
  loadMcpApprovals
447
- } from "./chunk-RNAJVXUG.js";
446
+ } from "./chunk-2ZN3O5FT.js";
448
447
  import {
449
448
  CORRUPTED_SUFFIX,
450
449
  getDefaultValue,
@@ -465,32 +464,36 @@ import {
465
464
  setPendingSettingValueAny,
466
465
  validateSettingValue,
467
466
  writeOutputLanguageAndRegisterPath
468
- } from "./chunk-WBU2PIZ5.js";
467
+ } from "./chunk-7BXXIQG4.js";
468
+ import "./chunk-RKUWKYED.js";
469
469
  import {
470
470
  TOGGLE_TYPES
471
- } from "./chunk-XSOXPG2L.js";
472
- import "./chunk-RKUWKYED.js";
471
+ } from "./chunk-ZU47FBOC.js";
472
+ import "./chunk-NOAG7N22.js";
473
+ import "./chunk-2AUM35J5.js";
474
+ import "./chunk-N6VQ37ZZ.js";
473
475
  import "./chunk-BW4333PP.js";
476
+ import "./chunk-VX63RJXE.js";
477
+ import "./chunk-6PLDPT2C.js";
474
478
  import "./chunk-IDS7MSUP.js";
475
479
  import {
476
480
  getCurrentLanguage,
477
481
  localizeToolDisplayName,
478
482
  t
479
- } from "./chunk-CRZBDVP2.js";
483
+ } from "./chunk-VZUCTJ2P.js";
480
484
  import "./chunk-5EJZE3FP.js";
481
- import "./chunk-5BH2AIEY.js";
482
- import "./chunk-QTNCGZHQ.js";
485
+ import "./chunk-XFSFZCM5.js";
483
486
  import "./chunk-2EAZ43JQ.js";
484
487
  import "./chunk-NF5J2WFA.js";
485
488
  import {
486
489
  formatVersionLabel,
487
490
  getCliVersion
488
- } from "./chunk-MV5DTLJV.js";
491
+ } from "./chunk-R4Q2PEFV.js";
489
492
  import "./chunk-W3N5XAZ6.js";
490
493
  import {
491
494
  isWorkspaceTrusted,
492
495
  loadTrustedFolders
493
- } from "./chunk-NX7ZTXFF.js";
496
+ } from "./chunk-53GWJOLP.js";
494
497
  import {
495
498
  require_strip_json_comments
496
499
  } from "./chunk-NPQ5ZKRP.js";
@@ -498,8 +501,6 @@ import "./chunk-MR3PXB6E.js";
498
501
  import {
499
502
  AsyncFzf,
500
503
  AutonomousLoopTickResolver,
501
- DropNoticeThrottle,
502
- DropReceiptCoalescer,
503
504
  DroppedNotificationTally,
504
505
  FileSearchFactory,
505
506
  IDLE_SPECULATION,
@@ -516,34 +517,17 @@ import {
516
517
  generateSessionRecap,
517
518
  generateToolUseSummary,
518
519
  getLastPeerInboxFailure,
519
- getPeerControllerRegistryPath,
520
520
  getProjectSummaryInfo,
521
521
  getWelcomeBackState,
522
522
  isApiUserPrompt,
523
523
  isWsl,
524
- readPeerControllerRegistrySync,
525
524
  renderGoalContinuationTurn,
526
- resolveControllerToken,
527
525
  saveWelcomeBackRestartChoice,
528
- startPeerInbox,
529
526
  startSpeculation,
530
527
  subagentGenerator
531
- } from "./chunk-GOEVQADN.js";
528
+ } from "./chunk-BZM5U74J.js";
532
529
  import "./chunk-GELRJXE2.js";
533
530
  import "./chunk-32CM56LO.js";
534
- import {
535
- saveWorkflowScript,
536
- validateWorkflowName
537
- } from "./chunk-OXR34GCD.js";
538
- import "./chunk-XFSFZCM5.js";
539
- import "./chunk-2EKVPSIJ.js";
540
- import "./chunk-LJZSMWOH.js";
541
- import {
542
- clearWorktreeSession,
543
- isSessionRuntimeActive,
544
- readWorktreeSession,
545
- restoreWorktreeContext
546
- } from "./chunk-YZTGGCEE.js";
547
531
  import {
548
532
  ALIBABA_PROVIDERS,
549
533
  THIRD_PARTY_PROVIDERS,
@@ -553,41 +537,35 @@ import {
553
537
  findProviderById,
554
538
  getDefaultModelIds,
555
539
  resolveMetadataKey
556
- } from "./chunk-2WC3Y7YY.js";
557
- import "./chunk-IWABUX6T.js";
540
+ } from "./chunk-AEY27Z35.js";
541
+ import "./chunk-Y2MYW47X.js";
542
+ import "./chunk-LJZSMWOH.js";
543
+ import "./chunk-F42YYSCK.js";
544
+ import "./chunk-NUQVB25K.js";
545
+ import {
546
+ clearWorktreeSession,
547
+ isSessionRuntimeActive,
548
+ readWorktreeSession,
549
+ restoreWorktreeContext
550
+ } from "./chunk-ZKZHSB5W.js";
551
+ import "./chunk-MSNHNAQZ.js";
558
552
  import "./chunk-DJXSOEFB.js";
559
- import "./chunk-YQGW3M6Z.js";
560
- import "./chunk-J3VZF2AL.js";
561
- import "./chunk-OWCFKIFQ.js";
553
+ import "./chunk-ZKYR7QS4.js";
554
+ import "./chunk-532WHF4F.js";
555
+ import "./chunk-BUQN5LTI.js";
562
556
  import "./chunk-ZPJWUGCS.js";
563
557
  import {
564
- InboundGate,
565
- MAX_HELD_MESSAGES,
566
558
  PEER_ADMISSION_LIMITS,
567
- canonicalizeMsgId,
568
559
  describeDeliveryStatus,
569
560
  describeDropReason,
570
561
  describeHoldCause,
571
- drainSendPacer,
572
- flattenPeerLabel,
573
- forgetSendPacerMessages,
574
- formatPeerDisplay,
575
- formatPeerEnvelope,
576
- parseHeldExpiry,
577
- peerSenderKey,
578
- refundSendPacerMessage,
579
- refundSendPacerToken,
580
- sendDeliveryStatus,
581
- settleSentPeerMessage
582
- } from "./chunk-X7LFJF5D.js";
583
- import "./chunk-BUQN5LTI.js";
562
+ parseHeldExpiry
563
+ } from "./chunk-LK2WUCDQ.js";
584
564
  import {
585
- osc8Hyperlink,
586
- supportsHyperlinks,
587
- wrapForMultiplexer
588
- } from "./chunk-XDNFODER.js";
589
- import "./chunk-GOKAOSCN.js";
590
- import "./chunk-VNOVK4I7.js";
565
+ saveWorkflowScript,
566
+ validateWorkflowName
567
+ } from "./chunk-UKZ45TJL.js";
568
+ import "./chunk-RLLRJJDR.js";
591
569
  import {
592
570
  ConditionalRulesRegistry,
593
571
  CoreToolScheduler,
@@ -651,27 +629,21 @@ import {
651
629
  recordHandledToolCall,
652
630
  refreshMemoryAfterManagedWrite,
653
631
  refreshMemoryInstruction
654
- } from "./chunk-HJ5UJQQL.js";
632
+ } from "./chunk-N7VWZDWW.js";
655
633
  import "./chunk-GOFAQQZA.js";
656
- import "./chunk-65I7S4Z3.js";
657
- import "./chunk-6HUXPLB5.js";
658
634
  import {
659
635
  stripAnsi
660
636
  } from "./chunk-TWPJO254.js";
661
637
  import "./chunk-CQ35AJ4Z.js";
662
- import "./chunk-XKBFYTCD.js";
663
- import "./chunk-LYT2OU7D.js";
638
+ import "./chunk-65I7S4Z3.js";
639
+ import "./chunk-6HUXPLB5.js";
664
640
  import "./chunk-7CLLH5TI.js";
665
- import {
666
- GitWorktreeService,
667
- readWorktreeSessionMarker,
668
- writeRuntimeStatus
669
- } from "./chunk-HIXUUCGY.js";
670
- import "./chunk-6PVPNMXU.js";
641
+ import "./chunk-XKBFYTCD.js";
671
642
  import {
672
643
  resolveModelId
673
- } from "./chunk-565U2ANU.js";
674
- import "./chunk-GSFV5RQW.js";
644
+ } from "./chunk-ZTTC7T4X.js";
645
+ import "./chunk-E4UEO3XM.js";
646
+ import "./chunk-IAEXTMED.js";
675
647
  import {
676
648
  parseCron
677
649
  } from "./chunk-IRH27ZC2.js";
@@ -680,55 +652,78 @@ import {
680
652
  readCronTasks,
681
653
  taskHasLegacyCondition
682
654
  } from "./chunk-F53KKZUD.js";
683
- import "./chunk-TRWQQBVH.js";
684
- import {
685
- glob
686
- } from "./chunk-QJNDUTOL.js";
687
- import "./chunk-N6S3NUYJ.js";
688
655
  import {
689
656
  promptIdContext
690
657
  } from "./chunk-O6GEWCJA.js";
658
+ import {
659
+ GitWorktreeService,
660
+ readWorktreeSessionMarker,
661
+ writeRuntimeStatus
662
+ } from "./chunk-36HCNKDS.js";
663
+ import "./chunk-6PVPNMXU.js";
664
+ import "./chunk-2SZH22YO.js";
665
+ import "./chunk-DTNV6UZY.js";
666
+ import {
667
+ glob
668
+ } from "./chunk-QJNDUTOL.js";
669
+ import "./chunk-JXNIF2O5.js";
670
+ import "./chunk-NFYEQRLG.js";
671
+ import "./chunk-ELRMZTPF.js";
691
672
  import "./chunk-CHEIIBT3.js";
692
- import "./chunk-QAZ2MGYT.js";
673
+ import "./chunk-PLLIWEM3.js";
693
674
  import {
675
+ flattenPeerLabel,
694
676
  registerSession
695
- } from "./chunk-QQK4L3UU.js";
677
+ } from "./chunk-5GLDOLNQ.js";
696
678
  import "./chunk-CH2YDT6X.js";
697
679
  import {
698
680
  APPROVAL_MODES
699
681
  } from "./chunk-JX6XHPTX.js";
700
- import "./chunk-CLKE4IY3.js";
701
682
  import "./chunk-ZSTCM3MX.js";
702
- import "./chunk-SOA4HKRJ.js";
703
683
  import "./chunk-MLXTMF7H.js";
704
684
  import {
705
685
  BUILT_IN_OUTPUT_STYLES
706
- } from "./chunk-3LPJ776W.js";
686
+ } from "./chunk-LILGKQ4B.js";
707
687
  import {
708
688
  getGitBranch
709
689
  } from "./chunk-3CZ2BQV6.js";
710
- import "./chunk-PQEISIKS.js";
711
- import "./chunk-S5QR6CB5.js";
690
+ import "./chunk-SAH4BD2J.js";
691
+ import "./chunk-CXTPVBFA.js";
712
692
  import {
713
693
  runOutsideAgentContext
714
- } from "./chunk-H3Q3RSKZ.js";
694
+ } from "./chunk-U7O65WKL.js";
715
695
  import "./chunk-S6LOFUVP.js";
696
+ import {
697
+ getStartupContextLength
698
+ } from "./chunk-FN3JNDRU.js";
699
+ import "./chunk-EUURTIV6.js";
700
+ import {
701
+ HOOKS_CONFIG_FIELDS
702
+ } from "./chunk-G6UUOCUT.js";
703
+ import {
704
+ isPathWithinRoot
705
+ } from "./chunk-IZ2U57NY.js";
706
+ import "./chunk-NUQ4GK5I.js";
707
+ import "./chunk-K2OJUPOE.js";
708
+ import {
709
+ osc8Hyperlink,
710
+ supportsHyperlinks,
711
+ wrapForMultiplexer
712
+ } from "./chunk-AXTFYDXT.js";
716
713
  import {
717
714
  openBrowserSecurely
718
715
  } from "./chunk-NAVJD2PQ.js";
719
- import "./chunk-OFVAS4AR.js";
716
+ import "./chunk-YBUMTY7B.js";
720
717
  import "./chunk-HNLMYDQE.js";
721
718
  import "./chunk-QHMLYMMS.js";
719
+ import "./chunk-VNOVK4I7.js";
722
720
  import "./chunk-CFKIH3D3.js";
723
- import {
724
- REASONING_EFFORT_TIERS,
725
- applyReasoningEffort
726
- } from "./chunk-VBLAI2HA.js";
721
+ import "./chunk-JL6APGBX.js";
727
722
  import "./chunk-DJ2GSRLV.js";
728
723
  import "./chunk-4ALNJDHL.js";
729
724
  import "./chunk-NOO4QFXM.js";
730
725
  import "./chunk-KFFCDLKV.js";
731
- import "./chunk-7OCIQNKX.js";
726
+ import "./chunk-ZW2EUO2A.js";
732
727
  import {
733
728
  ApiCancelEvent,
734
729
  ConversationFinishedEvent,
@@ -766,15 +761,10 @@ import {
766
761
  runVisionBridge,
767
762
  shouldRunVisionBridge,
768
763
  splitImageParts
769
- } from "./chunk-F2NYVASI.js";
764
+ } from "./chunk-HBU7EKY4.js";
770
765
  import "./chunk-5ETULJLP.js";
771
- import "./chunk-XBVNNDPK.js";
766
+ import "./chunk-ZHKTKHMO.js";
772
767
  import "./chunk-VGC4I5JJ.js";
773
- import {
774
- getAllMemoryFilenames,
775
- getUnsupportedImageFormatWarning,
776
- isSupportedImageMimeType
777
- } from "./chunk-J6MB5ZHZ.js";
778
768
  import {
779
769
  AUTO_MEMORY_INDEX_FILENAME,
780
770
  getAutoMemoryProjectStateDir,
@@ -783,40 +773,40 @@ import {
783
773
  isAnyAutoMemPath
784
774
  } from "./chunk-EDIDYZBT.js";
785
775
  import "./chunk-HD7O6WLV.js";
776
+ import {
777
+ getAllMemoryFilenames,
778
+ getUnsupportedImageFormatWarning,
779
+ isSupportedImageMimeType
780
+ } from "./chunk-J6MB5ZHZ.js";
786
781
  import "./chunk-WZAD4ZNJ.js";
782
+ import {
783
+ REASONING_EFFORT_TIERS,
784
+ applyReasoningEffort
785
+ } from "./chunk-3FPYT6QC.js";
787
786
  import {
788
787
  DEFAULT_TOKEN_LIMIT
789
788
  } from "./chunk-FPGTNKCP.js";
790
789
  import "./chunk-TIGXX4PA.js";
791
790
  import {
792
791
  MAINLINE_CODER_MODEL
793
- } from "./chunk-JO77FGNZ.js";
792
+ } from "./chunk-3UXUOFO6.js";
794
793
  import {
795
794
  atomicWriteFileSync
796
795
  } from "./chunk-XFFRI3WM.js";
797
- import "./chunk-4HOEU2OR.js";
796
+ import "./chunk-ERU3SDXT.js";
797
+ import "./chunk-EWJTAP3Y.js";
798
798
  import "./chunk-HHJLM3WQ.js";
799
799
  import {
800
800
  endInteractionSpan,
801
801
  getActiveInteractionSpan,
802
802
  redactUrlCredentials
803
- } from "./chunk-7VEYUF3N.js";
803
+ } from "./chunk-W5ZQMAEM.js";
804
804
  import "./chunk-74TONY4F.js";
805
- import "./chunk-E6TI726I.js";
806
- import {
807
- getStartupContextLength
808
- } from "./chunk-4VY3ITHR.js";
809
- import "./chunk-O2FEO2CB.js";
810
- import {
811
- HOOKS_CONFIG_FIELDS
812
- } from "./chunk-G6UUOCUT.js";
813
- import {
814
- isPathWithinRoot
815
- } from "./chunk-IZ2U57NY.js";
805
+ import "./chunk-HUXPEUFL.js";
816
806
  import {
817
807
  ToolNames,
818
808
  isShellProgressData
819
- } from "./chunk-MWIO7MF6.js";
809
+ } from "./chunk-TP6FYVQT.js";
820
810
  import {
821
811
  Storage,
822
812
  UnauthorizedError,
@@ -829,17 +819,14 @@ import {
829
819
  shortenPath,
830
820
  tildeifyPath
831
821
  } from "./chunk-ZAFYHRVY.js";
832
- import {
833
- MESSAGING_SOCKET_ENV,
834
- MESSAGING_TOKEN_ENV,
835
- clearInheritedPeerMessagingEnv
836
- } from "./chunk-V5U2NZNJ.js";
837
- import "./chunk-CMWU6P4D.js";
838
- import "./chunk-HRPFBHW7.js";
822
+ import "./chunk-TBWQLLFO.js";
823
+ import "./chunk-V5U2NZNJ.js";
824
+ import "./chunk-6W4HBUA2.js";
825
+ import "./chunk-TPKQIA7G.js";
839
826
  import {
840
827
  registerCleanup,
841
828
  runExitCleanup
842
- } from "./chunk-DAI65CMX.js";
829
+ } from "./chunk-JYKWOREU.js";
843
830
  import {
844
831
  finalizeStartupProfile,
845
832
  profileCheckpoint
@@ -851,6 +838,7 @@ import {
851
838
  writeStderrLineSafe,
852
839
  writeStdoutLine
853
840
  } from "./chunk-7FA2II6K.js";
841
+ import "./chunk-UKMWZ5NS.js";
854
842
  import "./chunk-75DOP5OR.js";
855
843
  import "./chunk-DMTGGOSA.js";
856
844
  import "./chunk-YQ3U5MUC.js";
@@ -860,7 +848,6 @@ import {
860
848
  import "./chunk-MATEIJZF.js";
861
849
  import "./chunk-J5TTWBZK.js";
862
850
  import "./chunk-RVIGZBIT.js";
863
- import "./chunk-TBWQLLFO.js";
864
851
  import {
865
852
  init_esbuild_shims
866
853
  } from "./chunk-5O2XNYP6.js";
@@ -875,599 +862,6 @@ import { stat as stat2 } from "node:fs/promises";
875
862
  import { basename as basename4 } from "node:path";
876
863
  var import_react161 = __toESM(require_react(), 1);
877
864
 
878
- // packages/cli/src/peerMessaging/peer-messaging.ts
879
- init_esbuild_shims();
880
- import { randomBytes } from "node:crypto";
881
- var debugLogger = createDebugLogger("PEER_MESSAGING");
882
- var MAX_ACCEPTED_BACKLOG = MAX_HELD_MESSAGES;
883
- var CLOSE_DROP_FLUSH_BOUND_MS = 1e3;
884
- var MAX_UNHEARD_DROP_NOTICES = 20;
885
- var RECEIVER_REFILL_MS = PEER_ADMISSION_LIMITS.bucketCapacity / PEER_ADMISSION_LIMITS.refillPerSecond * 1e3;
886
- var PeerMessaging = class _PeerMessaging {
887
- static {
888
- __name(this, "PeerMessaging");
889
- }
890
- inbox = null;
891
- gate = null;
892
- updateSessionRegistryIpcPath = /* @__PURE__ */ __name(async () => {
893
- }, "updateSessionRegistryIpcPath");
894
- getSessionId = null;
895
- settleSentMessage = settleSentPeerMessage;
896
- reassertSessionRecord = null;
897
- drainMirror = drainSendPacer;
898
- forgetMirror = forgetSendPacerMessages;
899
- refundMirror = refundSendPacerMessage;
900
- refundMirrorToken = refundSendPacerToken;
901
- receiptListeners = /* @__PURE__ */ new Set();
902
- dropListeners = /* @__PURE__ */ new Set();
903
- /** Notices raised before anything subscribed; see `onDropped`. */
904
- unheardDrops = [];
905
- /** Folds dropped receipts so a flood draws few connections, not many. */
906
- dropReceipts = null;
907
- submitFn = null;
908
- buffered = [];
909
- controllerRegistryPath = null;
910
- validControllerIds = null;
911
- /**
912
- * Accepted frames whose 'delivered' receipt has not been earned yet:
913
- * still buffered here or still queued in the session's input queue.
914
- * Settled with a corrective receipt at close.
915
- */
916
- outstanding = [];
917
- queuedPeerCount = null;
918
- heldListeners = /* @__PURE__ */ new Set();
919
- listedHeld = null;
920
- closed = false;
921
- // Options are consumed by `start`, which wires them into the gate and the
922
- // inbox; the instance itself holds none of them.
923
- constructor() {
924
- }
925
- /**
926
- * Bind the socket and start accepting messages.
927
- *
928
- * Returns null when the inbox could not be bound. Callers treat that as
929
- * "this session is not reachable" and carry on — it is never fatal.
930
- */
931
- static async start(options) {
932
- const messaging = new _PeerMessaging();
933
- const controllerRegistryPath = options.controllerRegistryPath ?? getPeerControllerRegistryPath();
934
- messaging.controllerRegistryPath = controllerRegistryPath;
935
- const dropReceipts = new DropReceiptCoalescer(
936
- ({ frame, reason, droppedMsgIds }) => {
937
- if (!frame.from) return;
938
- return sendDeliveryStatus(
939
- frame.from,
940
- {
941
- status: "dropped",
942
- origMsgId: frame.msgId,
943
- from: messaging.inbox?.socketPath,
944
- dropReason: reason,
945
- droppedMsgIds
946
- },
947
- frame.replyToken
948
- );
949
- },
950
- options.dropReceiptTrailMs !== void 0 ? { trailMs: options.dropReceiptTrailMs } : {}
951
- );
952
- messaging.dropReceipts = dropReceipts;
953
- const dropNotices = new DropNoticeThrottle(
954
- (notice) => messaging.emitDropped(notice)
955
- );
956
- const gate = new InboundGate({
957
- getApprovalMode: options.getApprovalMode,
958
- getPolicySetting: options.getPolicySetting,
959
- ...options.getHeldExpiryMs !== void 0 ? { getHeldExpiryMs: options.getHeldExpiryMs } : {},
960
- ...options.getPolicyScope ? { getPolicyScope: options.getPolicyScope } : {},
961
- isControllerValid: /* @__PURE__ */ __name((id) => messaging.validControllerIds?.has(id) ?? true, "isControllerValid"),
962
- ...options.admission ? { admission: options.admission } : {},
963
- getSessionId: options.getSessionId,
964
- deliver: /* @__PURE__ */ __name((frame, origin) => messaging.deliver(frame, origin), "deliver"),
965
- reportDropped: /* @__PURE__ */ __name((frame, reason, origin) => dropReceipts.note(frame, origin ?? { selfSent: false }, reason), "reportDropped"),
966
- onDropped: /* @__PURE__ */ __name((frame, origin, reason) => dropNotices.note(frame, origin, reason), "onDropped"),
967
- reportStatus: /* @__PURE__ */ __name((frame, status) => {
968
- if (!frame.from) return;
969
- return sendDeliveryStatus(
970
- frame.from,
971
- {
972
- status,
973
- origMsgId: frame.msgId,
974
- from: messaging.inbox?.socketPath
975
- },
976
- frame.replyToken
977
- );
978
- }, "reportStatus"),
979
- onHeldChange: /* @__PURE__ */ __name((held) => messaging.emitHeldChange(held), "onHeldChange")
980
- });
981
- messaging.gate = gate;
982
- messaging.getSessionId = options.getSessionId ?? null;
983
- messaging.settleSentMessage = options.settleSentMessage ?? settleSentPeerMessage;
984
- messaging.reassertSessionRecord = options.reassertSessionRecord ?? null;
985
- messaging.drainMirror = options.drainMirror ?? drainSendPacer;
986
- messaging.forgetMirror = options.forgetMirror ?? forgetSendPacerMessages;
987
- messaging.refundMirror = options.refundMirror ?? refundSendPacerMessage;
988
- messaging.refundMirrorToken = options.refundMirrorToken ?? refundSendPacerToken;
989
- clearInheritedPeerMessagingEnv();
990
- const ipcToken = options.ipcToken ?? randomBytes(32).toString("hex");
991
- const childToken = options.childToken ?? randomBytes(32).toString("hex");
992
- const inbox = await startPeerInbox({
993
- ...options.socketPath !== void 0 ? { socketPath: options.socketPath } : {},
994
- requiredToken: ipcToken,
995
- childToken,
996
- // Read from disk per auth line rather than captured here: a grant
997
- // the user mints or revokes mid-session must take effect on the
998
- // next connection, with nothing to restart.
999
- resolveController: /* @__PURE__ */ __name((presented) => resolveControllerToken(presented, controllerRegistryPath), "resolveController"),
1000
- onFrame: /* @__PURE__ */ __name((frame, auth, controller) => messaging.onFrame(frame, {
1001
- selfSent: auth === "child",
1002
- ...controller ? { controller } : {}
1003
- }), "onFrame")
1004
- });
1005
- if (!inbox) return null;
1006
- messaging.inbox = inbox;
1007
- messaging.updateSessionRegistryIpcPath = options.updateSessionRegistryIpcPath;
1008
- await messaging.updateSessionRegistryIpcPath(inbox.socketPath, ipcToken);
1009
- process.env[MESSAGING_SOCKET_ENV] = inbox.socketPath;
1010
- process.env[MESSAGING_TOKEN_ENV] = childToken;
1011
- return messaging;
1012
- }
1013
- get socketPath() {
1014
- return this.inbox?.socketPath;
1015
- }
1016
- /**
1017
- * Register the TUI's submit function and flush anything accepted before
1018
- * the queue existed.
1019
- */
1020
- setSubmitFn(fn) {
1021
- if (this.closed) return;
1022
- this.withControllerValidity(() => {
1023
- this.submitFn = fn;
1024
- while (this.buffered.length > 0) {
1025
- const head = this.buffered[0];
1026
- if (!head || !this.submit(head.frame, head.origin)) break;
1027
- this.buffered.shift();
1028
- }
1029
- });
1030
- }
1031
- /**
1032
- * Register a counter for the peer entries still waiting in the
1033
- * session's input queue. At close, that many of the most recently
1034
- * submitted frames are settled alongside the buffered ones: the queue
1035
- * drains in order, so the unconsumed tail is exactly the queue's
1036
- * current depth.
1037
- */
1038
- setQueuedPeerCount(fn) {
1039
- this.queuedPeerCount = fn;
1040
- }
1041
- getHeld() {
1042
- return this.withControllerValidity(() => this.gate?.getHeld() ?? []);
1043
- }
1044
- /**
1045
- * How long a held message has to live, in milliseconds, or null when
1046
- * holds do not expire. Used by `/peers` to show what is left.
1047
- */
1048
- getHeldExpiryMs() {
1049
- return this.gate?.getHeldExpiryMs() ?? null;
1050
- }
1051
- /**
1052
- * Remember the held entries the `/peers` listing just showed the user.
1053
- *
1054
- * Accept/deny decisions are bound to this snapshot: the held set moves
1055
- * between listing and decision (arrivals, evictions, releases), and a
1056
- * handle that uniquely named the message the user reviewed must not
1057
- * resolve to a different one by decide time. The snapshot pins each
1058
- * entry's `heldAt` as well as its id: once an id's eviction tombstone
1059
- * is pruned from the gate's bounded settled-memory, a peer can re-send
1060
- * it with a swapped body, and only the fresh hold timestamp tells the
1061
- * re-admitted entry apart from the one the user reviewed.
1062
- */
1063
- recordHeldListing(heldEntries) {
1064
- this.listedHeld = heldEntries.map((entry) => ({
1065
- id: entry.frame.msgId,
1066
- heldAt: entry.heldAt
1067
- }));
1068
- }
1069
- /**
1070
- * True when the held set no longer matches the last recorded listing.
1071
- *
1072
- * Entries *leaving* the set are not a change. The expiry timer removes
1073
- * them with no peer or user activity -- a fourth mover the rationale
1074
- * above does not name -- and a shrinking set can never make a printed
1075
- * handle resolve to a different message: `resolveHeld` prefix-matches
1076
- * over the current set, so removing entries only narrows it. Bouncing
1077
- * those refuses a decision that would have been correct, and tells the
1078
- * user the list changed when what they can still uniquely name is
1079
- * exactly what they reviewed.
1080
- *
1081
- * Dropping an expired entry is safe because the gate tombstones it
1082
- * before it leaves the set, so a re-admitted id arrives with a fresh
1083
- * `heldAt` and still mismatches the pin below.
1084
- *
1085
- * What must still bounce: an arrival, and a re-sent id whose body may
1086
- * have been swapped, which the `heldAt` pin is what catches.
1087
- */
1088
- heldSetChangedSinceListing() {
1089
- const listed = this.listedHeld;
1090
- if (listed === null) return true;
1091
- const pinned = new Map(listed.map((entry) => [entry.id, entry.heldAt]));
1092
- const current = this.getHeld();
1093
- if (current.some((entry) => pinned.get(entry.frame.msgId) !== entry.heldAt))
1094
- return true;
1095
- const liveIds = current.map(
1096
- (entry) => canonicalizeMsgId(entry.frame.msgId)
1097
- );
1098
- const liveSet = new Set(liveIds);
1099
- for (const id of pinned.keys()) {
1100
- const departed = canonicalizeMsgId(id);
1101
- if (liveSet.has(departed)) continue;
1102
- if (liveIds.some((live) => live.startsWith(departed))) return true;
1103
- }
1104
- return false;
1105
- }
1106
- decide(msgId, decision) {
1107
- return this.withControllerValidity(
1108
- () => this.gate?.decide(msgId, decision) ?? "gone"
1109
- );
1110
- }
1111
- /** Remove a revoked grant's authority from messages already waiting. */
1112
- forgetController(id) {
1113
- return this.withControllerValidity(
1114
- () => this.gate?.forgetController(id) ?? 0
1115
- );
1116
- }
1117
- /** Release everything the gate now considers acceptable. */
1118
- reevaluate(reason) {
1119
- return this.withControllerValidity(
1120
- () => this.gate?.reevaluate(reason) ?? 0
1121
- );
1122
- }
1123
- onHeldChange(listener) {
1124
- this.heldListeners.add(listener);
1125
- try {
1126
- listener(this.getHeld());
1127
- } catch (error) {
1128
- debugLogger.debug(
1129
- `held-change listener threw: ${error instanceof Error ? error.message : String(error)}`
1130
- );
1131
- }
1132
- return () => this.heldListeners.delete(listener);
1133
- }
1134
- /** Subscribe to receipts for messages this session sent. */
1135
- onReceipt(listener) {
1136
- this.receiptListeners.add(listener);
1137
- return () => this.receiptListeners.delete(listener);
1138
- }
1139
- /**
1140
- * Subscribe to notices about messages this session turned away.
1141
- *
1142
- * Already throttled when they get here: one per sender per minute,
1143
- * carrying the count of what it stands for.
1144
- */
1145
- onDropped(listener) {
1146
- const first = this.dropListeners.size === 0;
1147
- this.dropListeners.add(listener);
1148
- if (first && this.unheardDrops.length > 0) {
1149
- const unheard = this.unheardDrops.splice(0, this.unheardDrops.length);
1150
- for (const notice of unheard) {
1151
- try {
1152
- listener(notice);
1153
- } catch (error) {
1154
- debugLogger.debug(
1155
- `drop listener threw on replay: ${error instanceof Error ? error.message : String(error)}`
1156
- );
1157
- }
1158
- }
1159
- }
1160
- return () => this.dropListeners.delete(listener);
1161
- }
1162
- emitDropped(notice) {
1163
- if (this.dropListeners.size === 0) {
1164
- if (this.unheardDrops.length < MAX_UNHEARD_DROP_NOTICES) {
1165
- this.unheardDrops.push(notice);
1166
- }
1167
- return;
1168
- }
1169
- for (const listener of this.dropListeners) {
1170
- try {
1171
- listener(notice);
1172
- } catch (error) {
1173
- debugLogger.debug(
1174
- `drop listener threw: ${error instanceof Error ? error.message : String(error)}`
1175
- );
1176
- }
1177
- }
1178
- }
1179
- emitReceipt(receipt) {
1180
- for (const listener of this.receiptListeners) {
1181
- try {
1182
- listener(receipt);
1183
- } catch (error) {
1184
- debugLogger.debug(
1185
- `receipt listener threw: ${error instanceof Error ? error.message : String(error)}`
1186
- );
1187
- }
1188
- }
1189
- }
1190
- async close() {
1191
- if (this.closed) return;
1192
- this.closed = true;
1193
- const shuttingDown = this.gate?.shutdown();
1194
- await this.inbox?.close();
1195
- await shuttingDown;
1196
- await this.settleUnconsumed();
1197
- clearInheritedPeerMessagingEnv();
1198
- await this.updateSessionRegistryIpcPath(void 0);
1199
- await this.dropReceipts?.flush(CLOSE_DROP_FLUSH_BOUND_MS);
1200
- this.dropReceipts?.dispose();
1201
- }
1202
- /**
1203
- * Correct the 'delivered' receipts of accepted messages the session
1204
- * never consumed. Without this, a sender told "delivered" about a
1205
- * message that dies in the buffer or the input queue at exit cannot
1206
- * tell that from "delivered and read" — the distinction the receipts
1207
- * exist to carry.
1208
- */
1209
- async settleUnconsumed() {
1210
- const queued = this.queuedPeerCount?.() ?? 0;
1211
- const dropped = this.outstanding.slice(
1212
- Math.max(0, this.outstanding.length - this.buffered.length - queued)
1213
- );
1214
- const receipts = dropped.filter((frame) => frame.from !== void 0).map(
1215
- (frame) => sendDeliveryStatus(
1216
- frame.from,
1217
- {
1218
- status: "expired",
1219
- origMsgId: frame.msgId,
1220
- from: this.inbox?.socketPath
1221
- },
1222
- frame.replyToken
1223
- )
1224
- );
1225
- await Promise.allSettled(receipts);
1226
- }
1227
- /**
1228
- * Apply a receipt that says a burst of this session's messages was
1229
- * turned away at the far inbox.
1230
- *
1231
- * Every id it names is settled, but only ids this session actually sent
1232
- * and has not settled already — the same rule every other receipt
1233
- * follows, applied to a list. A receipt that moves nothing is noise
1234
- * from a stranger, or a repeat, and says nothing to the user.
1235
- *
1236
- * One notice for the whole batch: the point of folding the receipt was
1237
- * that a flood must not become a flood of lines, and unfolding it here
1238
- * would undo that.
1239
- */
1240
- onDroppedReceipt(frame) {
1241
- const ids = [frame.origMsgId, ...frame.droppedMsgIds ?? []];
1242
- let first;
1243
- let settledCount = 0;
1244
- const settledByPath = /* @__PURE__ */ new Map();
1245
- for (const id of ids) {
1246
- const settled = this.settleSentMessage(id, "dropped");
1247
- if (!settled) continue;
1248
- first ??= settled;
1249
- settledCount += 1;
1250
- const entry = settledByPath.get(settled.ipcPath) ?? {
1251
- ids: [],
1252
- freshestAgeMs: Number.POSITIVE_INFINITY
1253
- };
1254
- entry.ids.push(id);
1255
- entry.freshestAgeMs = Math.min(entry.freshestAgeMs, settled.ageMs);
1256
- settledByPath.set(settled.ipcPath, entry);
1257
- }
1258
- if (!first) {
1259
- debugLogger.debug(
1260
- `ignoring dropped receipt for ${frame.origMsgId}: unknown message or repeated receipt`
1261
- );
1262
- return;
1263
- }
1264
- debugLogger.debug(
1265
- `dropped receipt from ${first.address} (${frame.dropReason ?? "unspecified"}) settled ${settledCount} message(s)`
1266
- );
1267
- if (frame.dropReason === "duplicate") {
1268
- for (const [ipcPath, entry] of settledByPath) {
1269
- for (const id of entry.ids) this.refundMirrorToken(ipcPath, id);
1270
- }
1271
- } else {
1272
- for (const [ipcPath, entry] of settledByPath) {
1273
- this.forgetMirror(ipcPath, entry.ids);
1274
- }
1275
- }
1276
- if (frame.dropReason === "rate-limited") {
1277
- for (const [ipcPath, entry] of settledByPath) {
1278
- if (entry.freshestAgeMs <= RECEIVER_REFILL_MS)
1279
- this.drainMirror(ipcPath);
1280
- }
1281
- }
1282
- this.emitReceipt({
1283
- status: "dropped",
1284
- address: first.address,
1285
- origMsgId: frame.origMsgId,
1286
- // A drop can only follow `pending`; the ledger enforced that above.
1287
- previous: "pending",
1288
- ...frame.dropReason ? { dropReason: frame.dropReason } : {},
1289
- dropped: settledCount
1290
- });
1291
- }
1292
- /**
1293
- * `origin` is what the transport established from the connection's auth
1294
- * line — the child token, or a controller grant the user minted. None
1295
- * of it is ever read off the frame.
1296
- */
1297
- onFrame(frame, origin) {
1298
- if (frame.type === "control") {
1299
- if (frame.status === "dropped") {
1300
- this.onDroppedReceipt(frame);
1301
- return;
1302
- }
1303
- const settled = this.settleSentMessage(frame.origMsgId, frame.status);
1304
- if (!settled) {
1305
- debugLogger.debug(
1306
- `ignoring delivery status ${frame.status} for ${frame.origMsgId}: unknown message or repeated receipt`
1307
- );
1308
- return;
1309
- }
1310
- debugLogger.debug(
1311
- `delivery status from ${settled.address}: ${settled.previous} -> ${frame.status} for ${frame.origMsgId}`
1312
- );
1313
- if (frame.status !== "held" && frame.status !== "delivered") {
1314
- if (frame.status === "misaddressed") {
1315
- this.refundMirror(settled.ipcPath, frame.origMsgId);
1316
- } else {
1317
- this.forgetMirror(settled.ipcPath, [frame.origMsgId]);
1318
- }
1319
- }
1320
- this.emitReceipt({
1321
- status: frame.status,
1322
- address: settled.address,
1323
- origMsgId: frame.origMsgId,
1324
- previous: settled.previous
1325
- });
1326
- return;
1327
- }
1328
- const ownSessionId = this.getSessionId?.();
1329
- if (frame.toSessionId !== void 0 && ownSessionId !== void 0 && frame.toSessionId !== ownSessionId) {
1330
- debugLogger.debug(
1331
- `refusing peer message ${frame.msgId}: addressed to session ${frame.toSessionId}, this is ${ownSessionId}`
1332
- );
1333
- if (frame.from) {
1334
- void sendDeliveryStatus(
1335
- frame.from,
1336
- {
1337
- status: "misaddressed",
1338
- origMsgId: frame.msgId,
1339
- from: this.inbox?.socketPath
1340
- },
1341
- frame.replyToken
1342
- );
1343
- }
1344
- void this.reassertSessionRecord?.().catch((error) => {
1345
- debugLogger.debug(
1346
- `re-asserting the session record failed: ${error instanceof Error ? error.message : String(error)}`
1347
- );
1348
- });
1349
- return;
1350
- }
1351
- this.gate?.admit(frame, origin);
1352
- }
1353
- deliver(frame, origin) {
1354
- if (!this.submitFn) {
1355
- if (this.buffered.length >= MAX_ACCEPTED_BACKLOG) {
1356
- throw new Error("accepted-message backlog is full");
1357
- }
1358
- this.buffered.push({ frame, origin });
1359
- this.trackOutstanding(frame);
1360
- return;
1361
- }
1362
- if (this.buffered.length > 0) {
1363
- this.withControllerValidity(() => {
1364
- while (this.buffered.length > 0) {
1365
- const head = this.buffered[0];
1366
- if (!head || !this.submit(head.frame, head.origin)) {
1367
- throw new Error("accepted-message backlog is full");
1368
- }
1369
- this.buffered.shift();
1370
- }
1371
- });
1372
- }
1373
- if (!this.submit(frame, origin)) {
1374
- throw new Error("accepted-message backlog is full");
1375
- }
1376
- this.trackOutstanding(frame);
1377
- }
1378
- trackOutstanding(frame) {
1379
- this.outstanding.push(frame);
1380
- while (this.outstanding.length > 2 * MAX_ACCEPTED_BACKLOG) {
1381
- this.outstanding.shift();
1382
- }
1383
- }
1384
- withControllerValidity(action) {
1385
- if (this.controllerRegistryPath === null || this.validControllerIds) {
1386
- return action();
1387
- }
1388
- this.validControllerIds = new Set(
1389
- readPeerControllerRegistrySync(
1390
- this.controllerRegistryPath
1391
- ).controllers.map((controller) => controller.id)
1392
- );
1393
- for (const delivery of this.buffered) {
1394
- const controller = delivery.origin.controller;
1395
- if (controller && !this.validControllerIds.has(controller.id)) {
1396
- delete delivery.origin.controller;
1397
- }
1398
- }
1399
- try {
1400
- return action();
1401
- } finally {
1402
- this.validControllerIds = null;
1403
- }
1404
- }
1405
- submit(frame, origin) {
1406
- const from = frame.from ?? (origin.controller ? "controller" : origin.selfSent ? "own process" : "unknown session");
1407
- const attribution = {
1408
- selfSent: origin.selfSent,
1409
- ...origin.controller ? { controller: origin.controller } : {}
1410
- };
1411
- return this.submitFn?.(
1412
- formatPeerEnvelope({
1413
- from,
1414
- ...frame.fromName !== void 0 ? { fromName: frame.fromName } : {},
1415
- content: frame.message.content,
1416
- ...attribution
1417
- }),
1418
- formatPeerDisplay({
1419
- from,
1420
- ...frame.fromName !== void 0 ? { fromName: frame.fromName } : {},
1421
- content: frame.message.content,
1422
- ...attribution
1423
- }),
1424
- {
1425
- msgId: frame.msgId,
1426
- admissionKey: peerSenderKey(frame, origin),
1427
- ...frame.from !== void 0 ? { from: frame.from } : {},
1428
- ...frame.replyToken !== void 0 ? { replyToken: frame.replyToken } : {},
1429
- ...frame.toSessionId !== void 0 ? { toSessionId: frame.toSessionId } : {}
1430
- }
1431
- ) ?? false;
1432
- }
1433
- /** Drop a queued frame if an in-process session swap invalidated its pin. */
1434
- drainQueuedFrame(delivery) {
1435
- const ownSessionId = this.getSessionId?.();
1436
- if (delivery?.toSessionId === void 0 || ownSessionId === void 0 || delivery.toSessionId === ownSessionId) {
1437
- return true;
1438
- }
1439
- debugLogger.debug(
1440
- `dropping queued peer message ${delivery.msgId}: addressed to session ${delivery.toSessionId}, this is ${ownSessionId}`
1441
- );
1442
- if (delivery.from) {
1443
- void sendDeliveryStatus(
1444
- delivery.from,
1445
- {
1446
- status: "misaddressed",
1447
- origMsgId: delivery.msgId,
1448
- from: this.inbox?.socketPath
1449
- },
1450
- delivery.replyToken
1451
- );
1452
- }
1453
- if (delivery.admissionKey !== void 0) {
1454
- this.gate?.forgetAdmittedMessage(delivery.admissionKey, delivery.msgId);
1455
- }
1456
- return false;
1457
- }
1458
- emitHeldChange(held) {
1459
- for (const listener of this.heldListeners) {
1460
- try {
1461
- listener(held);
1462
- } catch (error) {
1463
- debugLogger.debug(
1464
- `held-change listener threw: ${error instanceof Error ? error.message : String(error)}`
1465
- );
1466
- }
1467
- }
1468
- }
1469
- };
1470
-
1471
865
  // packages/cli/src/peerMessaging/PeerMessagingContext.tsx
1472
866
  init_esbuild_shims();
1473
867
  var import_react = __toESM(require_react(), 1);
@@ -2414,7 +1808,7 @@ StaticRender.displayName = "StaticRender";
2414
1808
 
2415
1809
  // packages/cli/src/ui/components/shared/VirtualizedList.tsx
2416
1810
  var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
2417
- var debugLogger2 = createDebugLogger("VIRTUALIZED_LIST");
1811
+ var debugLogger = createDebugLogger("VIRTUALIZED_LIST");
2418
1812
  var SCROLL_TO_ITEM_END = Number.MAX_SAFE_INTEGER;
2419
1813
  function upperBound(arr, target) {
2420
1814
  let lo = 0;
@@ -2744,7 +2138,7 @@ function VirtualizedList(props, ref) {
2744
2138
  const bottomSpacerHeight = renderStatic ? 0 : totalHeight - (offsets[endIndex + 1] ?? totalHeight);
2745
2139
  const isReady = containerHeight > 0 || false || width !== void 0 && typeof width === "number";
2746
2140
  if (!isReady) {
2747
- debugLogger2.debug(
2141
+ debugLogger.debug(
2748
2142
  `viewport not ready (containerHeight=${containerHeight}, width=${String(width)}); rendering empty until measurement settles`
2749
2143
  );
2750
2144
  }
@@ -2764,7 +2158,7 @@ function VirtualizedList(props, ref) {
2764
2158
  try {
2765
2159
  content = renderItem({ item, index: i });
2766
2160
  } catch (err) {
2767
- debugLogger2.debug(`renderItem threw at index ${i}`, err);
2161
+ debugLogger.debug(`renderItem threw at index ${i}`, err);
2768
2162
  content = /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Box_default, { flexDirection: "column", flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text, { color: "red", children: "[render error]" }) });
2769
2163
  }
2770
2164
  const key = keyExtractor(item, i);
@@ -3474,7 +2868,7 @@ var sameViewportContent = /* @__PURE__ */ __name((previous, current, rect) => {
3474
2868
  }, "sameViewportContent");
3475
2869
  var sameViewportRect = /* @__PURE__ */ __name((previous, current) => previous !== null && current !== null && previous.x === current.x && previous.y === current.y && previous.width === current.width && previous.height === current.height, "sameViewportRect");
3476
2870
  var MULTI_CLICK_MS = 400;
3477
- var debugLogger3 = createDebugLogger("TEXT_SELECTION");
2871
+ var debugLogger2 = createDebugLogger("TEXT_SELECTION");
3478
2872
  function TextSelectionController(props) {
3479
2873
  const { stdout } = use_stdout_default();
3480
2874
  const selectionRef = (0, import_react14.useRef)(new SelectionState());
@@ -3542,7 +2936,7 @@ function TextSelectionController(props) {
3542
2936
  const text = normalized ? getSelectedText(getBuffer()?.frame ?? null, normalized) : "";
3543
2937
  if (text) {
3544
2938
  void copyToClipboard(text).catch((error) => {
3545
- debugLogger3.warn("Failed to copy selected text:", error);
2939
+ debugLogger2.warn("Failed to copy selected text:", error);
3546
2940
  });
3547
2941
  }
3548
2942
  }, [getBuffer]);
@@ -3765,7 +3159,7 @@ __name(TextSelectionController, "TextSelectionController");
3765
3159
  // packages/cli/src/ui/context-menu/ContentMouseController.tsx
3766
3160
  init_esbuild_shims();
3767
3161
  var import_react15 = __toESM(require_react(), 1);
3768
- var debugLogger4 = createDebugLogger("CONTENT_MOUSE");
3162
+ var debugLogger3 = createDebugLogger("CONTENT_MOUSE");
3769
3163
  function ContentMouseController(props) {
3770
3164
  const { stdout } = use_stdout_default();
3771
3165
  const { columns, rows } = useTerminalSize();
@@ -3805,7 +3199,7 @@ function ContentMouseController(props) {
3805
3199
  );
3806
3200
  }).catch((error) => {
3807
3201
  console.warn(`Unable to copy link to clipboard: ${url}`);
3808
- debugLogger4.warn("Clipboard copy failed:", error);
3202
+ debugLogger3.warn("Clipboard copy failed:", error);
3809
3203
  });
3810
3204
  }, []);
3811
3205
  const openLink = (0, import_react15.useCallback)(
@@ -3922,7 +3316,7 @@ function ContentMouseController(props) {
3922
3316
  label: "Copy Link Address",
3923
3317
  onSelect: /* @__PURE__ */ __name(() => {
3924
3318
  void copyToClipboard(url).catch((error) => {
3925
- debugLogger4.warn("Failed to copy link address:", error);
3319
+ debugLogger3.warn("Failed to copy link address:", error);
3926
3320
  });
3927
3321
  }, "onSelect")
3928
3322
  });
@@ -3936,7 +3330,7 @@ function ContentMouseController(props) {
3936
3330
  label: "Copy Selection",
3937
3331
  onSelect: /* @__PURE__ */ __name(() => {
3938
3332
  void copyToClipboard(selectionText).catch((error) => {
3939
- debugLogger4.warn("Failed to copy selected text:", error);
3333
+ debugLogger3.warn("Failed to copy selected text:", error);
3940
3334
  });
3941
3335
  }, "onSelect")
3942
3336
  });
@@ -6771,7 +6165,7 @@ var StatsDialog = /* @__PURE__ */ __name(({
6771
6165
 
6772
6166
  // packages/cli/src/ui/components/SettingsDialog.tsx
6773
6167
  var import_jsx_runtime28 = __toESM(require_jsx_runtime(), 1);
6774
- var debugLogger5 = createDebugLogger("SETTINGS_DIALOG");
6168
+ var debugLogger4 = createDebugLogger("SETTINGS_DIALOG");
6775
6169
  var maxItemsToShow = 8;
6776
6170
  var CONFIG_TAB_ORDER = ["settings", "status", "stats"];
6777
6171
  function configTabLabel(tab) {
@@ -6907,7 +6301,7 @@ function SettingsDialog({
6907
6301
  newValue,
6908
6302
  {}
6909
6303
  );
6910
- debugLogger5.debug(
6304
+ debugLogger4.debug(
6911
6305
  `[DEBUG SettingsDialog] Saving ${key} immediately with value:`,
6912
6306
  newValue
6913
6307
  );
@@ -6919,14 +6313,14 @@ function SettingsDialog({
6919
6313
  );
6920
6314
  if (key === "general.vimMode" && newValue !== vimEnabled) {
6921
6315
  toggleVimEnabled().catch((error) => {
6922
- debugLogger5.error("Failed to toggle vim mode:", error);
6316
+ debugLogger4.error("Failed to toggle vim mode:", error);
6923
6317
  });
6924
6318
  }
6925
6319
  if (key === "tools.approvalMode" && settings.merged.tools?.approvalMode) {
6926
6320
  try {
6927
6321
  config?.setApprovalMode(settings.merged.tools.approvalMode);
6928
6322
  } catch (error) {
6929
- debugLogger5.error(
6323
+ debugLogger4.error(
6930
6324
  "Failed to apply approval mode to current session:",
6931
6325
  error
6932
6326
  );
@@ -7025,7 +6419,7 @@ function SettingsDialog({
7025
6419
  setSystemInfo(info);
7026
6420
  }
7027
6421
  }).catch((err) => {
7028
- debugLogger5.error("Failed to load system info:", err);
6422
+ debugLogger4.error("Failed to load system info:", err);
7029
6423
  if (!cancelled) {
7030
6424
  setStatusError(true);
7031
6425
  }
@@ -7451,7 +6845,7 @@ function SettingsDialog({
7451
6845
  try {
7452
6846
  config?.setApprovalMode(settings.merged.tools.approvalMode);
7453
6847
  } catch (error) {
7454
- debugLogger5.error(
6848
+ debugLogger4.error(
7455
6849
  "Failed to apply approval mode to current session:",
7456
6850
  error
7457
6851
  );
@@ -8339,7 +7733,7 @@ var MODEL_DESCRIPTION_COLUMN = 28;
8339
7733
  var MODALITY_DISPLAY_ORDER = ["image", "video", "audio", "pdf"];
8340
7734
  var MODEL_CUSTOM_INPUT_FOCUS_INDEX = -2;
8341
7735
  var MODEL_SEARCH_INPUT_FOCUS_INDEX = -1;
8342
- var MAX_RECOMMENDED_MODELS_TO_SHOW = 8;
7736
+ var MAX_MODELS_TO_SHOW = 8;
8343
7737
  function formatModelOptionLabel(model) {
8344
7738
  const details = [];
8345
7739
  if (model.contextWindowSize) {
@@ -8380,11 +7774,22 @@ function mergeModelIds(customModelIdsText, selectedRecommendationKeys) {
8380
7774
  ]);
8381
7775
  }
8382
7776
  __name(mergeModelIds, "mergeModelIds");
7777
+ function orderSelectedModelKeys(selectedKeys, modelOptions, builtInModelIds) {
7778
+ const selected = new Set(selectedKeys);
7779
+ const builtIns = builtInModelIds.filter((id) => selected.has(id));
7780
+ const builtInSet = new Set(builtIns);
7781
+ return [
7782
+ ...builtIns,
7783
+ ...modelOptions.map((item) => item.key).filter((id) => selected.has(id) && !builtInSet.has(id))
7784
+ ];
7785
+ }
7786
+ __name(orderSelectedModelKeys, "orderSelectedModelKeys");
8383
7787
  function getRecommendedSelections(selectedModelIds, modelOptions, builtInModelIds) {
8384
7788
  const selectedSet = new Set(selectedModelIds);
8385
- return modelOptions.filter(
8386
- (item) => selectedSet.has(item.key) && builtInModelIds.has(item.key)
8387
- ).map((item) => item.key);
7789
+ const servedIds = new Set(modelOptions.map((item) => item.key));
7790
+ return builtInModelIds.filter(
7791
+ (id) => selectedSet.has(id) && servedIds.has(id)
7792
+ );
8388
7793
  }
8389
7794
  __name(getRecommendedSelections, "getRecommendedSelections");
8390
7795
  function getCustomModelIdsText(selectedModelIds, selectedRecommendationKeys) {
@@ -8414,7 +7819,7 @@ function ModelIdsStep({
8414
7819
  [models]
8415
7820
  );
8416
7821
  const builtInModelIds = (0, import_react28.useMemo)(
8417
- () => new Set(config.models?.map((model) => model.id) ?? []),
7822
+ () => config.models?.map((model) => model.id) ?? [],
8418
7823
  [config.models]
8419
7824
  );
8420
7825
  const [focusedModelIndex, setFocusedModelIndex] = (0, import_react28.useState)(
@@ -8436,20 +7841,16 @@ function ModelIdsStep({
8436
7841
  (item) => modelOptionSearchText(item).includes(normalizedQuery)
8437
7842
  );
8438
7843
  }, [modelOptions, modelSearchQuery]);
8439
- const firstOtherModelIndex = (0, import_react28.useMemo)(
8440
- () => filteredModelOptions.findIndex((item) => !builtInModelIds.has(item.key)),
8441
- [filteredModelOptions, builtInModelIds]
8442
- );
8443
7844
  const recommendedScrollOffset = focusedModelIndex < 0 ? 0 : Math.max(
8444
7845
  0,
8445
7846
  Math.min(
8446
- focusedModelIndex - MAX_RECOMMENDED_MODELS_TO_SHOW + 1,
8447
- filteredModelOptions.length - MAX_RECOMMENDED_MODELS_TO_SHOW
7847
+ focusedModelIndex - MAX_MODELS_TO_SHOW + 1,
7848
+ filteredModelOptions.length - MAX_MODELS_TO_SHOW
8448
7849
  )
8449
7850
  );
8450
7851
  const visibleModelOptions = filteredModelOptions.slice(
8451
7852
  recommendedScrollOffset,
8452
- recommendedScrollOffset + MAX_RECOMMENDED_MODELS_TO_SHOW
7853
+ recommendedScrollOffset + MAX_MODELS_TO_SHOW
8453
7854
  );
8454
7855
  const syncModelIds = (0, import_react28.useCallback)(
8455
7856
  (customText, recommendationKeys) => {
@@ -8487,13 +7888,18 @@ function ModelIdsStep({
8487
7888
  } else {
8488
7889
  nextSet.add(item.key);
8489
7890
  }
8490
- const nextKeys = modelOptions.filter((option) => nextSet.has(option.key)).map((option) => option.key);
7891
+ const nextKeys = orderSelectedModelKeys(
7892
+ nextSet,
7893
+ modelOptions,
7894
+ builtInModelIds
7895
+ );
8491
7896
  setSelectedRecommendationKeys(nextKeys);
8492
7897
  syncModelIds(customModelIdsText, nextKeys);
8493
7898
  },
8494
7899
  [
8495
7900
  customModelIdsText,
8496
7901
  filteredModelOptions,
7902
+ builtInModelIds,
8497
7903
  modelOptions,
8498
7904
  selectedRecommendationKeys,
8499
7905
  syncModelIds
@@ -8555,11 +7961,12 @@ function ModelIdsStep({
8555
7961
  "model-ids-input"
8556
7962
  ) }),
8557
7963
  /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Box_default, { marginTop: 0, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { color: theme.text.secondary, children: t(
8558
- "Checked recommended models are applied on submit but not copied into the input."
7964
+ recommendationSource === "provider" ? "Checked models are applied on submit but not copied into the input." : "Checked recommended models are applied on submit but not copied into the input."
8559
7965
  ) }) }),
8560
- firstOtherModelIndex !== 0 && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Text, { color: theme.text.secondary, children: [
8561
- t("Recommended models"),
8562
- recommendationSource === "provider" && t(" \xB7 from the provider"),
7966
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Text, { color: theme.text.secondary, children: [
7967
+ recommendationSource === "provider" ? t("Models \xB7 from the provider \xB7 {{count}} checked", {
7968
+ count: String(selectedRecommendationKeys.length)
7969
+ }) : t("Recommended models"),
8563
7970
  recommendationSource === "fallback" && t(" \xB7 provider list unavailable, showing built-ins")
8564
7971
  ] }) }),
8565
7972
  /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Box_default, { marginTop: 0, flexDirection: "column", children: [
@@ -8592,18 +7999,16 @@ function ModelIdsStep({
8592
7999
  const isFocused = focusedModelIndex === modelIndex;
8593
8000
  const isSelected = selectedRecommendationKeys.includes(item.key);
8594
8001
  const textColor = isFocused ? theme.status.success : isSelected ? theme.text.accent : theme.text.primary;
8595
- const showOtherModelsHeading = firstOtherModelIndex !== -1 && modelIndex >= firstOtherModelIndex && (visibleIndex === 0 || modelIndex === firstOtherModelIndex);
8596
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_react28.Fragment, { children: [
8597
- showOtherModelsHeading && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { color: theme.text.secondary, children: t("Other models from the provider") }) }),
8598
- /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Box_default, { alignItems: "flex-start", children: [
8599
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Box_default, { minWidth: 4, flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { color: textColor, children: isSelected ? ICON.RADIO_FILLED : ICON.CIRCLE_EMPTY }) }),
8600
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Box_default, { flexGrow: 1, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { color: textColor, children: item.label }) })
8601
- ] })
8002
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Box_default, { alignItems: "flex-start", children: [
8003
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Box_default, { minWidth: 4, flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { color: textColor, children: isSelected ? ICON.RADIO_FILLED : ICON.CIRCLE_EMPTY }) }),
8004
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Box_default, { flexGrow: 1, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { color: textColor, children: item.label }) })
8602
8005
  ] }, item.key);
8603
- }) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { color: theme.text.secondary, children: t("No recommended models match.") }) }),
8006
+ }) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { color: theme.text.secondary, children: t(
8007
+ recommendationSource === "provider" ? "No models match." : "No recommended models match."
8008
+ ) }) }),
8604
8009
  flow.state.modelIdsError && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { color: theme.status.error, children: flow.state.modelIdsError }) }),
8605
8010
  /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { color: theme.text.secondary, children: t(
8606
- "Enter to submit, \u2191\u2193/Tab to switch input, search, and recommendations, Space to toggle recommendations, Esc to go back"
8011
+ recommendationSource === "provider" ? "Enter to submit, \u2191\u2193/Tab to switch input, search, and models, Space to toggle models, Esc to go back" : "Enter to submit, \u2191\u2193/Tab to switch input, search, and recommendations, Space to toggle recommendations, Esc to go back"
8607
8012
  ) }) })
8608
8013
  ] });
8609
8014
  }
@@ -8822,6 +8227,13 @@ var PROTOCOL_ITEMS = [
8822
8227
  description: t("Standard OpenAI API format (most common)"),
8823
8228
  value: "openai" /* USE_OPENAI */
8824
8229
  },
8230
+ {
8231
+ key: "openai-responses" /* USE_OPENAI_RESPONSES */,
8232
+ title: t("OpenAI Responses"),
8233
+ label: t("OpenAI Responses"),
8234
+ description: t("OpenAI Responses API \u2014 streaming reasoning + tool use"),
8235
+ value: "openai-responses" /* USE_OPENAI_RESPONSES */
8236
+ },
8825
8237
  {
8826
8238
  key: "anthropic" /* USE_ANTHROPIC */,
8827
8239
  title: t("Anthropic-compatible"),
@@ -9189,7 +8601,7 @@ __name(AuthDialog, "AuthDialog");
9189
8601
  init_esbuild_shims();
9190
8602
  var import_react30 = __toESM(require_react(), 1);
9191
8603
  var import_jsx_runtime36 = __toESM(require_jsx_runtime(), 1);
9192
- var debugLogger6 = createDebugLogger("EDITOR_SETTINGS_DIALOG");
8604
+ var debugLogger5 = createDebugLogger("EDITOR_SETTINGS_DIALOG");
9193
8605
  function EditorSettingsDialog({
9194
8606
  onSelect,
9195
8607
  settings,
@@ -9216,7 +8628,7 @@ function EditorSettingsDialog({
9216
8628
  (item) => item.type === currentPreference
9217
8629
  ) : 0;
9218
8630
  if (editorIndex === -1) {
9219
- debugLogger6.error(`Editor is not supported: ${currentPreference}`);
8631
+ debugLogger5.error(`Editor is not supported: ${currentPreference}`);
9220
8632
  editorIndex = 0;
9221
8633
  }
9222
8634
  const handleEditorSelect = /* @__PURE__ */ __name((editorType) => {
@@ -10449,6 +9861,7 @@ function ModelDialog({
10449
9861
  const authTypeOrder = [
10450
9862
  "qwen-oauth" /* QWEN_OAUTH */,
10451
9863
  "openai" /* USE_OPENAI */,
9864
+ "openai-responses" /* USE_OPENAI_RESPONSES */,
10452
9865
  "anthropic" /* USE_ANTHROPIC */,
10453
9866
  "gemini" /* USE_GEMINI */,
10454
9867
  "vertex-ai" /* USE_VERTEX_AI */
@@ -11461,7 +10874,7 @@ __name(getDiffLineColor, "getDiffLineColor");
11461
10874
  init_esbuild_shims();
11462
10875
  var import_react36 = __toESM(require_react(), 1);
11463
10876
  var import_jsx_runtime42 = __toESM(require_jsx_runtime(), 1);
11464
- var debugLogger7 = createDebugLogger("ARENA_STOP_DIALOG");
10877
+ var debugLogger6 = createDebugLogger("ARENA_STOP_DIALOG");
11465
10878
  function ArenaStopDialog({
11466
10879
  config,
11467
10880
  addItem,
@@ -11533,7 +10946,7 @@ function ArenaStopDialog({
11533
10946
  }
11534
10947
  } catch (error) {
11535
10948
  const message = error instanceof Error ? error.message : String(error);
11536
- debugLogger7.error("Failed to stop Arena session:", error);
10949
+ debugLogger6.error("Failed to stop Arena session:", error);
11537
10950
  pushMessage({
11538
10951
  messageType: "error",
11539
10952
  content: `Failed to stop Arena session: ${message}`
@@ -12062,7 +11475,7 @@ import process10 from "node:process";
12062
11475
  // packages/cli/src/ui/components/IdeTrustChangeDialog.tsx
12063
11476
  init_esbuild_shims();
12064
11477
  var import_jsx_runtime47 = __toESM(require_jsx_runtime(), 1);
12065
- var debugLogger8 = createDebugLogger("IDE_TRUST_DIALOG");
11478
+ var debugLogger7 = createDebugLogger("IDE_TRUST_DIALOG");
12066
11479
  var IdeTrustChangeDialog = /* @__PURE__ */ __name(({ reason }) => {
12067
11480
  useKeypress(
12068
11481
  (key) => {
@@ -12074,7 +11487,7 @@ var IdeTrustChangeDialog = /* @__PURE__ */ __name(({ reason }) => {
12074
11487
  );
12075
11488
  let message = "Workspace trust has changed.";
12076
11489
  if (reason === "NONE") {
12077
- debugLogger8.error(
11490
+ debugLogger7.error(
12078
11491
  'IdeTrustChangeDialog rendered with unexpected reason "NONE"'
12079
11492
  );
12080
11493
  } else if (reason === "CONNECTION_CHANGE") {
@@ -13027,7 +12440,7 @@ __name(ColorSelector, "ColorSelector");
13027
12440
  init_esbuild_shims();
13028
12441
  var import_react44 = __toESM(require_react(), 1);
13029
12442
  var import_jsx_runtime55 = __toESM(require_jsx_runtime(), 1);
13030
- var debugLogger9 = createDebugLogger("SUBAGENT_CREATION_SUMMARY");
12443
+ var debugLogger8 = createDebugLogger("SUBAGENT_CREATION_SUMMARY");
13031
12444
  function CreationSummary({
13032
12445
  state,
13033
12446
  onPrevious: _onPrevious,
@@ -13083,7 +12496,7 @@ function CreationSummary({
13083
12496
  }
13084
12497
  }
13085
12498
  } catch (error) {
13086
- debugLogger9.warn("Error checking subagent name availability:", error);
12499
+ debugLogger8.warn("Error checking subagent name availability:", error);
13087
12500
  }
13088
12501
  if (state.generatedDescription.length > 1e3) {
13089
12502
  allWarnings.push(
@@ -13993,7 +13406,7 @@ __name(EditOptionsStep, "EditOptionsStep");
13993
13406
  // packages/cli/src/ui/components/subagents/manage/AgentDeleteStep.tsx
13994
13407
  init_esbuild_shims();
13995
13408
  var import_jsx_runtime62 = __toESM(require_jsx_runtime(), 1);
13996
- var debugLogger10 = createDebugLogger("AGENT_DELETE_STEP");
13409
+ var debugLogger9 = createDebugLogger("AGENT_DELETE_STEP");
13997
13410
  function AgentDeleteStep({
13998
13411
  selectedAgent,
13999
13412
  onDelete,
@@ -14006,7 +13419,7 @@ function AgentDeleteStep({
14006
13419
  try {
14007
13420
  await onDelete(selectedAgent);
14008
13421
  } catch (error) {
14009
- debugLogger10.error("Failed to delete agent:", error);
13422
+ debugLogger9.error("Failed to delete agent:", error);
14010
13423
  }
14011
13424
  } else if (key.name === "n") {
14012
13425
  onNavigateBack();
@@ -14025,7 +13438,7 @@ __name(AgentDeleteStep, "AgentDeleteStep");
14025
13438
 
14026
13439
  // packages/cli/src/ui/components/subagents/manage/AgentsManagerDialog.tsx
14027
13440
  var import_jsx_runtime63 = __toESM(require_jsx_runtime(), 1);
14028
- var debugLogger11 = createDebugLogger("AGENTS_MANAGER_DIALOG");
13441
+ var debugLogger10 = createDebugLogger("AGENTS_MANAGER_DIALOG");
14029
13442
  function AgentsManagerDialog({
14030
13443
  onClose,
14031
13444
  config
@@ -14081,7 +13494,7 @@ function AgentsManagerDialog({
14081
13494
  setNavigationStack([MANAGEMENT_STEPS.AGENT_SELECTION]);
14082
13495
  setSelectedAgentIndex(-1);
14083
13496
  } catch (error) {
14084
- debugLogger11.error("Failed to delete agent:", error);
13497
+ debugLogger10.error("Failed to delete agent:", error);
14085
13498
  throw error;
14086
13499
  }
14087
13500
  },
@@ -14187,7 +13600,7 @@ function AgentsManagerDialog({
14187
13600
  await loadAgents();
14188
13601
  handleNavigateBack();
14189
13602
  } catch (error) {
14190
- debugLogger11.error("Failed to save agent changes:", error);
13603
+ debugLogger10.error("Failed to save agent changes:", error);
14191
13604
  }
14192
13605
  }
14193
13606
  },
@@ -14212,7 +13625,7 @@ function AgentsManagerDialog({
14212
13625
  await loadAgents();
14213
13626
  handleNavigateBack();
14214
13627
  } catch (error) {
14215
- debugLogger11.error("Failed to save color changes:", error);
13628
+ debugLogger10.error("Failed to save color changes:", error);
14216
13629
  }
14217
13630
  }
14218
13631
  }
@@ -15245,7 +14658,7 @@ var open_default = open;
15245
14658
 
15246
14659
  // packages/cli/src/ui/components/extensions/tabs/DiscoverTab.tsx
15247
14660
  var import_jsx_runtime66 = __toESM(require_jsx_runtime(), 1);
15248
- var debugLogger12 = createDebugLogger("DISCOVER_TAB");
14661
+ var debugLogger11 = createDebugLogger("DISCOVER_TAB");
15249
14662
  function formatInstalls(n) {
15250
14663
  if (typeof n !== "number" || !Number.isFinite(n)) return null;
15251
14664
  if (n >= 1e6)
@@ -15327,7 +14740,7 @@ var DiscoverTab = /* @__PURE__ */ __name(({
15327
14740
  });
15328
14741
  }
15329
14742
  } catch (error) {
15330
- debugLogger12.error("Failed to discover plugins:", error);
14743
+ debugLogger11.error("Failed to discover plugins:", error);
15331
14744
  onStatus({ type: "error", text: getErrorMessage2(error) });
15332
14745
  } finally {
15333
14746
  setLoading(false);
@@ -15409,7 +14822,7 @@ var DiscoverTab = /* @__PURE__ */ __name(({
15409
14822
  warnings.push(
15410
14823
  `${plugin.name}: ${redactUrlCredentials(getErrorMessage2(scopeError))}`
15411
14824
  );
15412
- debugLogger12.error(
14825
+ debugLogger11.error(
15413
14826
  "Installed extension but failed to apply scope preference:",
15414
14827
  scopeError
15415
14828
  );
@@ -15428,7 +14841,7 @@ var DiscoverTab = /* @__PURE__ */ __name(({
15428
14841
  warnings.push(
15429
14842
  `${plugin.name}: ${redactUrlCredentials(getErrorMessage2(scopeError))}`
15430
14843
  );
15431
- debugLogger12.error(
14844
+ debugLogger11.error(
15432
14845
  "Installed extension but failed to apply scope preference:",
15433
14846
  scopeError
15434
14847
  );
@@ -16432,7 +15845,7 @@ var AuthenticateStep = /* @__PURE__ */ __name(({
16432
15845
 
16433
15846
  // packages/cli/src/ui/components/extensions/views/McpServerActionsView.tsx
16434
15847
  var import_jsx_runtime73 = __toESM(require_jsx_runtime(), 1);
16435
- var debugLogger13 = createDebugLogger("EXT_MCP_DETAIL");
15848
+ var debugLogger12 = createDebugLogger("EXT_MCP_DETAIL");
16436
15849
  var McpServerActionsView = /* @__PURE__ */ __name(({
16437
15850
  config,
16438
15851
  serverName,
@@ -16482,7 +15895,7 @@ var McpServerActionsView = /* @__PURE__ */ __name(({
16482
15895
  );
16483
15896
  hasOAuthTokens = credentials !== null;
16484
15897
  } catch (error) {
16485
- debugLogger13.warn("OAuth token lookup failed for", serverName, error);
15898
+ debugLogger12.warn("OAuth token lookup failed for", serverName, error);
16486
15899
  }
16487
15900
  return {
16488
15901
  name: serverName,
@@ -16517,7 +15930,7 @@ var McpServerActionsView = /* @__PURE__ */ __name(({
16517
15930
  try {
16518
15931
  setServer(freshen(await buildServer()));
16519
15932
  } catch (error) {
16520
- debugLogger13.error("Failed to load MCP server:", error);
15933
+ debugLogger12.error("Failed to load MCP server:", error);
16521
15934
  } finally {
16522
15935
  setLoading(false);
16523
15936
  }
@@ -16844,7 +16257,7 @@ var PluginDetailView = /* @__PURE__ */ __name(({
16844
16257
  // packages/cli/src/ui/components/extensions/steps/UninstallConfirmStep.tsx
16845
16258
  init_esbuild_shims();
16846
16259
  var import_jsx_runtime75 = __toESM(require_jsx_runtime(), 1);
16847
- var debugLogger14 = createDebugLogger("EXTENSION_UNINSTALL_STEP");
16260
+ var debugLogger13 = createDebugLogger("EXTENSION_UNINSTALL_STEP");
16848
16261
  function UninstallConfirmStep({
16849
16262
  selectedExtension,
16850
16263
  onConfirm,
@@ -16858,7 +16271,7 @@ function UninstallConfirmStep({
16858
16271
  try {
16859
16272
  await onConfirm(selectedExtension);
16860
16273
  } catch (error) {
16861
- debugLogger14.error("Failed to uninstall extension:", error);
16274
+ debugLogger13.error("Failed to uninstall extension:", error);
16862
16275
  }
16863
16276
  } else if (key.name === "n" || key.name === "escape") {
16864
16277
  onNavigateBack();
@@ -17171,7 +16584,7 @@ var ExtensionActionsView = /* @__PURE__ */ __name(({
17171
16584
 
17172
16585
  // packages/cli/src/ui/components/extensions/tabs/InstalledTab.tsx
17173
16586
  var import_jsx_runtime77 = __toESM(require_jsx_runtime(), 1);
17174
- var debugLogger15 = createDebugLogger("INSTALLED_TAB");
16587
+ var debugLogger14 = createDebugLogger("INSTALLED_TAB");
17175
16588
  var GROUP_ORDER = [
17176
16589
  "favorites",
17177
16590
  "user",
@@ -17348,7 +16761,7 @@ var InstalledTab = /* @__PURE__ */ __name(({
17348
16761
  return prev < all.length ? prev : 0;
17349
16762
  });
17350
16763
  } catch (error) {
17351
- debugLogger15.error("Failed to load installed items:", error);
16764
+ debugLogger14.error("Failed to load installed items:", error);
17352
16765
  } finally {
17353
16766
  setLoading(false);
17354
16767
  }
@@ -17764,7 +17177,7 @@ var InstalledTab = /* @__PURE__ */ __name(({
17764
17177
  init_esbuild_shims();
17765
17178
  var import_react61 = __toESM(require_react(), 1);
17766
17179
  var import_jsx_runtime78 = __toESM(require_jsx_runtime(), 1);
17767
- var debugLogger16 = createDebugLogger("SOURCES_TAB");
17180
+ var debugLogger15 = createDebugLogger("SOURCES_TAB");
17768
17181
  var INSTALLED_PREVIEW_LIMIT = 5;
17769
17182
  function formatDate(iso) {
17770
17183
  if (!iso) return null;
@@ -17800,7 +17213,7 @@ var SourcesTab = /* @__PURE__ */ __name(({
17800
17213
  try {
17801
17214
  await extensionManager.refreshCache();
17802
17215
  } catch (error) {
17803
- debugLogger16.error("Failed to refresh extensions:", error);
17216
+ debugLogger15.error("Failed to refresh extensions:", error);
17804
17217
  }
17805
17218
  setExtensions(extensionManager.getLoadedExtensions());
17806
17219
  setSources(extensionManager.getSources());
@@ -17930,7 +17343,7 @@ var SourcesTab = /* @__PURE__ */ __name(({
17930
17343
  const cfg = await extensionManager?.loadSource(source.source);
17931
17344
  setDetailConfig(cfg ?? null);
17932
17345
  } catch (error) {
17933
- debugLogger16.error("Failed to load marketplace detail:", error);
17346
+ debugLogger15.error("Failed to load marketplace detail:", error);
17934
17347
  } finally {
17935
17348
  setDetailLoading(false);
17936
17349
  }
@@ -17945,7 +17358,7 @@ var SourcesTab = /* @__PURE__ */ __name(({
17945
17358
  const cfg = await extensionManager.loadSource(detailSource.source);
17946
17359
  setDetailConfig(cfg ?? null);
17947
17360
  } catch (error) {
17948
- debugLogger16.error("Failed to load marketplace detail:", error);
17361
+ debugLogger15.error("Failed to load marketplace detail:", error);
17949
17362
  } finally {
17950
17363
  setDetailLoading(false);
17951
17364
  }
@@ -18663,7 +18076,7 @@ var DisableScopeSelectStep = /* @__PURE__ */ __name(({
18663
18076
 
18664
18077
  // packages/cli/src/ui/components/mcp/MCPManagementDialog.tsx
18665
18078
  var import_jsx_runtime82 = __toESM(require_jsx_runtime(), 1);
18666
- var debugLogger17 = createDebugLogger("MCP_DIALOG");
18079
+ var debugLogger16 = createDebugLogger("MCP_DIALOG");
18667
18080
  var MCPManagementDialog = /* @__PURE__ */ __name(({
18668
18081
  onClose
18669
18082
  }) => {
@@ -18759,7 +18172,7 @@ var MCPManagementDialog = /* @__PURE__ */ __name(({
18759
18172
  const serverInfos = await fetchServerData();
18760
18173
  setServers(serverInfos.map(restampStatus));
18761
18174
  } catch (error) {
18762
- debugLogger17.error("Error loading MCP servers:", error);
18175
+ debugLogger16.error("Error loading MCP servers:", error);
18763
18176
  } finally {
18764
18177
  setIsLoading(false);
18765
18178
  }
@@ -18883,7 +18296,7 @@ var MCPManagementDialog = /* @__PURE__ */ __name(({
18883
18296
  const serverInfos = await fetchServerData();
18884
18297
  setServers(serverInfos.map(restampStatus));
18885
18298
  } catch (error) {
18886
- debugLogger17.error("Error reloading MCP servers:", error);
18299
+ debugLogger16.error("Error reloading MCP servers:", error);
18887
18300
  } finally {
18888
18301
  setIsLoading(false);
18889
18302
  }
@@ -18894,7 +18307,7 @@ var MCPManagementDialog = /* @__PURE__ */ __name(({
18894
18307
  setIsLoading(true);
18895
18308
  const tokenStorage = new MCPOAuthTokenStorage();
18896
18309
  await tokenStorage.deleteCredentials(selectedServer.name);
18897
- debugLogger17.info(
18310
+ debugLogger16.info(
18898
18311
  `Cleared OAuth tokens for server '${selectedServer.name}'`
18899
18312
  );
18900
18313
  const toolRegistry = config.getToolRegistry();
@@ -18903,7 +18316,7 @@ var MCPManagementDialog = /* @__PURE__ */ __name(({
18903
18316
  }
18904
18317
  await reloadServers();
18905
18318
  } catch (error) {
18906
- debugLogger17.error(
18319
+ debugLogger16.error(
18907
18320
  `Error clearing OAuth tokens for server '${selectedServer.name}':`,
18908
18321
  error
18909
18322
  );
@@ -18921,7 +18334,7 @@ var MCPManagementDialog = /* @__PURE__ */ __name(({
18921
18334
  }
18922
18335
  await reloadServers();
18923
18336
  } catch (error) {
18924
- debugLogger17.error(
18337
+ debugLogger16.error(
18925
18338
  `Error reconnecting to server '${selectedServer.name}':`,
18926
18339
  error
18927
18340
  );
@@ -18948,7 +18361,7 @@ var MCPManagementDialog = /* @__PURE__ */ __name(({
18948
18361
  }
18949
18362
  await reloadServers();
18950
18363
  } catch (error) {
18951
- debugLogger17.error(
18364
+ debugLogger16.error(
18952
18365
  `Error approving server '${selectedServer.name}':`,
18953
18366
  error
18954
18367
  );
@@ -18987,7 +18400,7 @@ var MCPManagementDialog = /* @__PURE__ */ __name(({
18987
18400
  }
18988
18401
  await reloadServers();
18989
18402
  } catch (error) {
18990
- debugLogger17.error(
18403
+ debugLogger16.error(
18991
18404
  `Error enabling server '${selectedServer.name}':`,
18992
18405
  error
18993
18406
  );
@@ -19008,7 +18421,7 @@ var MCPManagementDialog = /* @__PURE__ */ __name(({
19008
18421
  const extensionName = server.config.extensionName;
19009
18422
  const manager = config.getExtensionManager();
19010
18423
  if (!extensionName || !manager) {
19011
- debugLogger17.warn(
18424
+ debugLogger16.warn(
19012
18425
  `Cannot disable extension MCP server '${server.name}'`
19013
18426
  );
19014
18427
  setIsLoading(false);
@@ -19043,7 +18456,7 @@ var MCPManagementDialog = /* @__PURE__ */ __name(({
19043
18456
  }
19044
18457
  await reloadServers();
19045
18458
  } catch (error) {
19046
- debugLogger17.error(
18459
+ debugLogger16.error(
19047
18460
  `Error disabling server '${selectedServer.name}':`,
19048
18461
  error
19049
18462
  );
@@ -19078,7 +18491,7 @@ var MCPManagementDialog = /* @__PURE__ */ __name(({
19078
18491
  await reloadServers();
19079
18492
  handleNavigateBack();
19080
18493
  } catch (error) {
19081
- debugLogger17.error(
18494
+ debugLogger16.error(
19082
18495
  `Error disabling server '${selectedServer.name}':`,
19083
18496
  error
19084
18497
  );
@@ -19853,7 +19266,7 @@ __name(HooksDisabledStep, "HooksDisabledStep");
19853
19266
 
19854
19267
  // packages/cli/src/ui/components/hooks/HooksManagementDialog.tsx
19855
19268
  var import_jsx_runtime92 = __toESM(require_jsx_runtime(), 1);
19856
- var debugLogger18 = createDebugLogger("HOOKS_DIALOG");
19269
+ var debugLogger17 = createDebugLogger("HOOKS_DIALOG");
19857
19270
  function isValidHookConfig(config) {
19858
19271
  if (typeof config !== "object" || config === null || !("type" in config)) {
19859
19272
  return false;
@@ -19922,7 +19335,7 @@ function getValidHookDefinitions(hooksRecord, eventName) {
19922
19335
  if (isValidHookDefinition(def)) {
19923
19336
  result.push(def);
19924
19337
  } else {
19925
- debugLogger18.warn(
19338
+ debugLogger17.warn(
19926
19339
  `Skipping invalid hook definition for ${eventName}:`,
19927
19340
  def
19928
19341
  );
@@ -20194,15 +19607,15 @@ function HooksManagementDialog({
20194
19607
  setIsLoading(true);
20195
19608
  setLoadError(null);
20196
19609
  try {
20197
- debugLogger18.debug("Fetching hooks data for dialog");
19610
+ debugLogger17.debug("Fetching hooks data for dialog");
20198
19611
  const hooksData = fetchHooksData();
20199
- debugLogger18.debug("Hooks data fetched:", hooksData.length, "events");
19612
+ debugLogger17.debug("Hooks data fetched:", hooksData.length, "events");
20200
19613
  if (!cancelled) {
20201
19614
  setHooks(hooksData);
20202
19615
  }
20203
19616
  } catch (error) {
20204
19617
  if (!cancelled) {
20205
- debugLogger18.error("Error loading hooks:", error);
19618
+ debugLogger17.error("Error loading hooks:", error);
20206
19619
  setLoadError(
20207
19620
  error instanceof Error ? error.message : "Failed to load hooks"
20208
19621
  );
@@ -20784,7 +20197,7 @@ var import_react70 = __toESM(require_react(), 1);
20784
20197
  // packages/cli/src/ui/hooks/useTurnDiffs.ts
20785
20198
  init_esbuild_shims();
20786
20199
  var import_react68 = __toESM(require_react(), 1);
20787
- var debugLogger19 = createDebugLogger("DiffDialog");
20200
+ var debugLogger18 = createDebugLogger("DiffDialog");
20788
20201
  var TURN_CONCURRENCY = 4;
20789
20202
  function useTurnDiffs(history, fileHistoryService, enabled) {
20790
20203
  const [turns, setTurns] = (0, import_react68.useState)([]);
@@ -20835,7 +20248,7 @@ function useTurnDiffs(history, fileHistoryService, enabled) {
20835
20248
  setTurns(entries);
20836
20249
  setLoading(false);
20837
20250
  }).catch((err) => {
20838
- debugLogger19.debug(`useTurnDiffs pipeline failed: ${err}`);
20251
+ debugLogger18.debug(`useTurnDiffs pipeline failed: ${err}`);
20839
20252
  if (!cancelled) setLoading(false);
20840
20253
  });
20841
20254
  return () => {
@@ -20858,7 +20271,7 @@ __name(previewOfUserItem, "previewOfUserItem");
20858
20271
  // packages/cli/src/ui/hooks/useDiffData.ts
20859
20272
  init_esbuild_shims();
20860
20273
  var import_react69 = __toESM(require_react(), 1);
20861
- var debugLogger20 = createDebugLogger("DiffDialog");
20274
+ var debugLogger19 = createDebugLogger("DiffDialog");
20862
20275
  function useDiffData(cwd3) {
20863
20276
  const [result, setResult] = (0, import_react69.useState)(null);
20864
20277
  const [hunks, setHunks] = (0, import_react69.useState)(/* @__PURE__ */ new Map());
@@ -20874,11 +20287,11 @@ function useDiffData(cwd3) {
20874
20287
  setLoading(true);
20875
20288
  Promise.all([
20876
20289
  fetchGitDiff(cwd3).catch((err) => {
20877
- debugLogger20.debug(`fetchGitDiff failed: ${err}`);
20290
+ debugLogger19.debug(`fetchGitDiff failed: ${err}`);
20878
20291
  return null;
20879
20292
  }),
20880
20293
  fetchGitDiffHunks(cwd3).catch((err) => {
20881
- debugLogger20.debug(`fetchGitDiffHunks failed: ${err}`);
20294
+ debugLogger19.debug(`fetchGitDiffHunks failed: ${err}`);
20882
20295
  return /* @__PURE__ */ new Map();
20883
20296
  })
20884
20297
  ]).then(([statsRes, hunksRes]) => {
@@ -20887,7 +20300,7 @@ function useDiffData(cwd3) {
20887
20300
  setHunks(hunksRes);
20888
20301
  setLoading(false);
20889
20302
  }).catch((err) => {
20890
- debugLogger20.debug(`useDiffData pipeline failed: ${err}`);
20303
+ debugLogger19.debug(`useDiffData pipeline failed: ${err}`);
20891
20304
  if (!cancelled) setLoading(false);
20892
20305
  });
20893
20306
  return () => {
@@ -21860,7 +21273,7 @@ init_esbuild_shims();
21860
21273
  var import_react72 = __toESM(require_react(), 1);
21861
21274
  import { promises as fs9, watch } from "node:fs";
21862
21275
  var import_jsx_runtime96 = __toESM(require_jsx_runtime(), 1);
21863
- var debugLogger21 = createDebugLogger("SKILL_REVIEW_DIALOG");
21276
+ var debugLogger20 = createDebugLogger("SKILL_REVIEW_DIALOG");
21864
21277
  var PREVIEW_MAX_HEIGHT = 12;
21865
21278
  var WATCH_DEBOUNCE_MS = 300;
21866
21279
  var PREVIEW_MAX_BYTES = 64 * 1024;
@@ -21933,7 +21346,7 @@ var SkillReviewDialog = /* @__PURE__ */ __name(({
21933
21346
  }
21934
21347
  }).catch((err) => {
21935
21348
  if (cancelled) return;
21936
- debugLogger21.warn(`skill preview read failed for ${stagedPath}:`, err);
21349
+ debugLogger20.warn(`skill preview read failed for ${stagedPath}:`, err);
21937
21350
  setPreview({ status: "error" });
21938
21351
  });
21939
21352
  return () => {
@@ -22337,7 +21750,7 @@ __name(useBackgroundTaskView, "useBackgroundTaskView");
22337
21750
 
22338
21751
  // packages/cli/src/ui/contexts/BackgroundTaskViewContext.tsx
22339
21752
  var import_jsx_runtime97 = __toESM(require_jsx_runtime(), 1);
22340
- var debugLogger22 = createDebugLogger("BG_TASK_VIEW");
21753
+ var debugLogger21 = createDebugLogger("BG_TASK_VIEW");
22341
21754
  var BackgroundTaskViewStateContext = (0, import_react74.createContext)(null);
22342
21755
  var BackgroundTaskViewActionsContext = (0, import_react74.createContext)(null);
22343
21756
  var DEFAULT_STATE = {
@@ -22456,7 +21869,7 @@ function BackgroundTaskViewProvider({
22456
21869
  case "dream": {
22457
21870
  const ok = config.getMemoryManager().cancelTask(target.dreamId);
22458
21871
  if (!ok) {
22459
- debugLogger22.warn(
21872
+ debugLogger21.warn(
22460
21873
  `cancelSelected: dream task ${target.dreamId} could not be cancelled (internal state inconsistency \u2014 see MemoryManager.cancelTask warn).`
22461
21874
  );
22462
21875
  }
@@ -24823,7 +24236,7 @@ var import_react83 = __toESM(require_react(), 1);
24823
24236
  import * as fs10 from "node:fs/promises";
24824
24237
  import * as path4 from "node:path";
24825
24238
  var MAX_HISTORY_LENGTH = 100;
24826
- var debugLogger23 = createDebugLogger("SHELL_HISTORY");
24239
+ var debugLogger22 = createDebugLogger("SHELL_HISTORY");
24827
24240
  async function getHistoryFilePath(projectRoot, configStorage) {
24828
24241
  const storage = configStorage ?? new Storage(projectRoot);
24829
24242
  return storage.getHistoryFilePath();
@@ -24837,7 +24250,7 @@ async function readHistoryFile(filePath) {
24837
24250
  return parseLegacyHistoryFile(text);
24838
24251
  } catch (err) {
24839
24252
  if (isNodeError(err) && err.code === "ENOENT") return [];
24840
- debugLogger23.error("Error reading history:", err);
24253
+ debugLogger22.error("Error reading history:", err);
24841
24254
  return [];
24842
24255
  }
24843
24256
  }
@@ -24876,7 +24289,7 @@ async function writeHistoryFile(filePath, history) {
24876
24289
  await fs10.mkdir(path4.dirname(filePath), { recursive: true });
24877
24290
  await fs10.writeFile(filePath, JSON.stringify(history));
24878
24291
  } catch (error) {
24879
- debugLogger23.error("Error writing shell history:", error);
24292
+ debugLogger22.error("Error writing shell history:", error);
24880
24293
  }
24881
24294
  }
24882
24295
  __name(writeHistoryFile, "writeHistoryFile");
@@ -25605,12 +25018,12 @@ __name(useAtCompletion, "useAtCompletion");
25605
25018
  // packages/cli/src/ui/hooks/useSlashCompletion.ts
25606
25019
  init_esbuild_shims();
25607
25020
  var import_react87 = __toESM(require_react(), 1);
25608
- var debugLogger24 = createDebugLogger("SLASH_COMPLETION");
25021
+ var debugLogger23 = createDebugLogger("SLASH_COMPLETION");
25609
25022
  function logErrorSafely(error, context) {
25610
25023
  if (error instanceof Error) {
25611
- debugLogger24.error(`[${context}]`, error);
25024
+ debugLogger23.error(`[${context}]`, error);
25612
25025
  } else {
25613
- debugLogger24.error(`[${context}] Non-error thrown:`, error);
25026
+ debugLogger23.error(`[${context}] Non-error thrown:`, error);
25614
25027
  }
25615
25028
  }
25616
25029
  __name(logErrorSafely, "logErrorSafely");
@@ -25789,7 +25202,7 @@ function useCommandSuggestions(parserResult, commandContext, getFzfForCommands,
25789
25202
  const fetchAndSetSuggestions = /* @__PURE__ */ __name(async () => {
25790
25203
  if (signal.aborted) return;
25791
25204
  if (!leafCommand?.completion) {
25792
- debugLogger24.warn(
25205
+ debugLogger23.warn(
25793
25206
  "Attempted argument completion without completion function"
25794
25207
  );
25795
25208
  return;
@@ -27799,7 +27212,7 @@ var VOICE_ERROR_RETRY_DELAY_MS = 2e3;
27799
27212
  var PREVIOUS_STOP_WAIT_TIMEOUT_MS = 5e3;
27800
27213
  var HOLD_FIRST_PRESS_RELEASE_MS = 800;
27801
27214
  var HOLD_REPEAT_RELEASE_MS = 250;
27802
- var debugLogger25 = createDebugLogger("VOICE_INPUT");
27215
+ var debugLogger24 = createDebugLogger("VOICE_INPUT");
27803
27216
  function formatError(error) {
27804
27217
  return error instanceof Error ? error.message : String(error);
27805
27218
  }
@@ -27834,7 +27247,7 @@ function isCancelKey(key) {
27834
27247
  }
27835
27248
  __name(isCancelKey, "isCancelKey");
27836
27249
  function logRecorderStopError(error) {
27837
- debugLogger25.warn("[voice] recorder stop failed:", error);
27250
+ debugLogger24.warn("[voice] recorder stop failed:", error);
27838
27251
  }
27839
27252
  __name(logRecorderStopError, "logRecorderStopError");
27840
27253
  function useVoiceInput({
@@ -28416,7 +27829,7 @@ __name(createArecordRecorder, "createArecordRecorder");
28416
27829
  // packages/cli/src/ui/voice/native-audio-recorder.ts
28417
27830
  init_esbuild_shims();
28418
27831
  var SILENCE_POLL_INTERVAL_MS = 200;
28419
- var debugLogger26 = createDebugLogger("VOICE_NATIVE_RECORDER");
27832
+ var debugLogger25 = createDebugLogger("VOICE_NATIVE_RECORDER");
28420
27833
  var AUDIO_CAPTURE_PACKAGE = "@qwen-code/audio-capture";
28421
27834
  var NativeAudioRecorder = class {
28422
27835
  constructor(loadBackend) {
@@ -28481,7 +27894,7 @@ var NativeAudioRecorder = class {
28481
27894
  }
28482
27895
  } catch (error) {
28483
27896
  this.clearSilencePoll();
28484
- debugLogger26.warn(
27897
+ debugLogger25.warn(
28485
27898
  "[voice] silence detection failed, auto-stopping:",
28486
27899
  error
28487
27900
  );
@@ -28519,7 +27932,7 @@ function explainMissingNativePackage(error) {
28519
27932
  if (!(error instanceof Error) || !isMissingNativePackageError(error)) {
28520
27933
  return error;
28521
27934
  }
28522
- debugLogger26.warn(
27935
+ debugLogger25.warn(
28523
27936
  "[voice] native package missing:",
28524
27937
  error.message,
28525
27938
  error.code
@@ -28680,7 +28093,7 @@ function createSoxRecorder() {
28680
28093
  __name(createSoxRecorder, "createSoxRecorder");
28681
28094
 
28682
28095
  // packages/cli/src/ui/voice/voice-recorder.ts
28683
- var debugLogger27 = createDebugLogger("VOICE_RECORDER");
28096
+ var debugLogger26 = createDebugLogger("VOICE_RECORDER");
28684
28097
  var FallbackVoiceRecorder = class {
28685
28098
  constructor(factories) {
28686
28099
  this.factories = factories;
@@ -28709,7 +28122,7 @@ var FallbackVoiceRecorder = class {
28709
28122
  } catch (error) {
28710
28123
  const message = error instanceof Error ? error.message : String(error);
28711
28124
  errors.push(message);
28712
- debugLogger27.warn(
28125
+ debugLogger26.warn(
28713
28126
  `[voice] recorder backend unavailable, trying fallback: ${message}`
28714
28127
  );
28715
28128
  }
@@ -28732,7 +28145,7 @@ var FallbackVoiceRecorder = class {
28732
28145
  try {
28733
28146
  await this.recorderFor(factory).warmup?.();
28734
28147
  } catch (error) {
28735
- debugLogger27.warn("[voice] recorder warmup failed:", error);
28148
+ debugLogger26.warn("[voice] recorder warmup failed:", error);
28736
28149
  }
28737
28150
  }
28738
28151
  }
@@ -28779,7 +28192,7 @@ init_esbuild_shims();
28779
28192
 
28780
28193
  // packages/cli/src/ui/voice/voice-refine.ts
28781
28194
  init_esbuild_shims();
28782
- var debugLogger28 = createDebugLogger("VOICE_REFINE");
28195
+ var debugLogger27 = createDebugLogger("VOICE_REFINE");
28783
28196
  var REFINE_TIMEOUT_MS = 2500;
28784
28197
  var MAX_GROWTH_FACTOR = 2;
28785
28198
  var REFINE_SYSTEM_INSTRUCTION = [
@@ -28816,22 +28229,22 @@ async function refineVoiceTranscript(config, raw, signal) {
28816
28229
  });
28817
28230
  const refined = text.trim();
28818
28231
  if (!refined) {
28819
- debugLogger28.debug("[voice] refinement returned empty; using raw");
28232
+ debugLogger27.debug("[voice] refinement returned empty; using raw");
28820
28233
  return raw;
28821
28234
  }
28822
28235
  const introducedCommand = refined.startsWith("/") || refined.startsWith("@");
28823
28236
  const ballooned = refined.length > raw.length * MAX_GROWTH_FACTOR;
28824
28237
  if (introducedCommand || ballooned) {
28825
- debugLogger28.warn("[voice] refinement looks unsafe; using raw", {
28238
+ debugLogger27.warn("[voice] refinement looks unsafe; using raw", {
28826
28239
  raw,
28827
28240
  refined
28828
28241
  });
28829
28242
  return raw;
28830
28243
  }
28831
- debugLogger28.debug("[voice] refined transcript", { raw, refined });
28244
+ debugLogger27.debug("[voice] refined transcript", { raw, refined });
28832
28245
  return refined;
28833
28246
  } catch (error) {
28834
- debugLogger28.warn("[voice] refinement failed; using raw transcript:", error);
28247
+ debugLogger27.warn("[voice] refinement failed; using raw transcript:", error);
28835
28248
  return raw;
28836
28249
  } finally {
28837
28250
  clearTimeout(timer);
@@ -28945,7 +28358,7 @@ function classifyPastedImagePaths(pasted) {
28945
28358
  return { imagePaths, allImages };
28946
28359
  }
28947
28360
  __name(classifyPastedImagePaths, "classifyPastedImagePaths");
28948
- var debugLogger29 = createDebugLogger("INPUT_PROMPT");
28361
+ var debugLogger28 = createDebugLogger("INPUT_PROMPT");
28949
28362
  function expandPendingPastePlaceholders(value, pendingPastes) {
28950
28363
  if (pendingPastes.size === 0) {
28951
28364
  return value;
@@ -29388,7 +28801,7 @@ ${finalValue.trim()}`;
29388
28801
  }
29389
28802
  }
29390
28803
  } catch (error) {
29391
- debugLogger29.error("Error handling clipboard image:", error);
28804
+ debugLogger28.error("Error handling clipboard image:", error);
29392
28805
  }
29393
28806
  },
29394
28807
  [reportClipboardUnavailable]
@@ -32432,7 +31845,7 @@ var AgentChatMissing = /* @__PURE__ */ __name(({ label }) => /* @__PURE__ */ (0,
32432
31845
 
32433
31846
  // packages/cli/src/ui/components/agent-view/AgentChatView.tsx
32434
31847
  var import_jsx_runtime126 = __toESM(require_jsx_runtime(), 1);
32435
- var debugLogger30 = createDebugLogger("AGENT_TAB_RENDER");
31848
+ var debugLogger29 = createDebugLogger("AGENT_TAB_RENDER");
32436
31849
  var AgentChatView = /* @__PURE__ */ __name(({ agentId }) => {
32437
31850
  const { agents } = useAgentViewState();
32438
31851
  const { setAgentShellFocused } = useAgentViewActions();
@@ -32462,7 +31875,7 @@ var AgentChatView = /* @__PURE__ */ __name(({ agentId }) => {
32462
31875
  ] }),
32463
31876
  onError: (error, info) => {
32464
31877
  setAgentShellFocused(false);
32465
- debugLogger30.error(
31878
+ debugLogger29.error(
32466
31879
  `[AGENT_TAB_RENDER_ERROR] agentId=${agentId} ${error.message}
32467
31880
  ${info.componentStack ?? ""}
32468
31881
  ${error.stack ?? ""}`
@@ -33223,7 +32636,7 @@ function installTerminalRedrawOptimizer(stdout, env = process.env) {
33223
32636
  __name(installTerminalRedrawOptimizer, "installTerminalRedrawOptimizer");
33224
32637
 
33225
32638
  // packages/cli/src/ui/utils/terminal-resize-reflow.ts
33226
- var debugLogger31 = createDebugLogger("RESIZE_REFLOW");
32639
+ var debugLogger30 = createDebugLogger("RESIZE_REFLOW");
33227
32640
  var CLEAR_VIEWPORT = base_exports.clearViewport;
33228
32641
  var ESC2 = "\x1B[";
33229
32642
  var CLEAR_TERMINAL = base_exports.clearTerminal;
@@ -33301,7 +32714,7 @@ function installTerminalResizeReflow(stdout, options = {}) {
33301
32714
  let barePrintableCount = 0;
33302
32715
  let handoffUntil = 0;
33303
32716
  let clearUntil = 0;
33304
- debugLogger31.debug("installed", { width: lastWidth, isVP });
32717
+ debugLogger30.debug("installed", { width: lastWidth, isVP });
33305
32718
  const modelFrame = /* @__PURE__ */ __name((content, bypassMin = false) => {
33306
32719
  if (!bypassMin && content.split("\n").length < MIN_FRAME_LINES) return;
33307
32720
  model.content = content;
@@ -33310,7 +32723,7 @@ function installTerminalResizeReflow(stdout, options = {}) {
33310
32723
  }, "modelFrame");
33311
32724
  const onResize = /* @__PURE__ */ __name(() => {
33312
32725
  const width = stdout.columns ?? lastWidth;
33313
- debugLogger31.debug("resize-event", {
32726
+ debugLogger30.debug("resize-event", {
33314
32727
  width,
33315
32728
  lastWidth,
33316
32729
  modeled: model.content.length > 0
@@ -33321,7 +32734,7 @@ function installTerminalResizeReflow(stdout, options = {}) {
33321
32734
  } else {
33322
32735
  pendingAmplify = reflowModel(model, width);
33323
32736
  }
33324
- debugLogger31.debug("shrink", {
32737
+ debugLogger30.debug("shrink", {
33325
32738
  from: lastWidth,
33326
32739
  to: width,
33327
32740
  pendingAmplify,
@@ -33349,9 +32762,9 @@ function installTerminalResizeReflow(stdout, options = {}) {
33349
32762
  barePrintableCount = 0;
33350
32763
  handoffUntil = Date.now() + HANDOFF_WINDOW_MS;
33351
32764
  }
33352
- debugLogger31.debug("match", { printable });
32765
+ debugLogger30.debug("match", { printable });
33353
32766
  if (isVP && Date.now() < clearUntil) {
33354
- debugLogger31.debug("clear-viewport");
32767
+ debugLogger30.debug("clear-viewport");
33355
32768
  chunk = chunk.slice(0, match.index) + CLEAR_VIEWPORT + chunk.slice(match.index + match[0].length);
33356
32769
  } else if (pendingAmplify > 0) {
33357
32770
  const count = countOccurrences(match[0], ERASE_LINE);
@@ -33363,7 +32776,7 @@ function installTerminalResizeReflow(stdout, options = {}) {
33363
32776
  CURSOR_DOWN_PATTERN,
33364
32777
  (_m, n) => `${ESC2}${Number(n) + delta}B`
33365
32778
  );
33366
- debugLogger31.debug("amplify", { original: count, target });
32779
+ debugLogger30.debug("amplify", { original: count, target });
33367
32780
  chunk = prefix + base_exports.eraseLines(target) + chunk.slice(match.index + match[0].length);
33368
32781
  }
33369
32782
  }
@@ -33416,7 +32829,7 @@ var import_react117 = __toESM(require_react(), 1);
33416
32829
  import process12 from "node:process";
33417
32830
  import os4 from "node:os";
33418
32831
  import v8 from "v8";
33419
- var debugLogger32 = createDebugLogger("MEMORY_MONITOR");
32832
+ var debugLogger31 = createDebugLogger("MEMORY_MONITOR");
33420
32833
  var MEMORY_WARNING_THRESHOLD = Math.min(
33421
32834
  7 * 1024 * 1024 * 1024,
33422
32835
  Math.floor(os4.totalmem() * 0.85)
@@ -33438,23 +32851,23 @@ var useMemoryMonitor = /* @__PURE__ */ __name(({
33438
32851
  const rss = memUsage.rss / 1024 / 1024;
33439
32852
  const external = memUsage.external / 1024 / 1024;
33440
32853
  const arrayBuffers = memUsage.arrayBuffers / 1024 / 1024;
33441
- if (debugLogger32.isEnabled()) {
33442
- debugLogger32.debug(
32854
+ if (debugLogger31.isEnabled()) {
32855
+ debugLogger31.debug(
33443
32856
  `[MEMORY_USAGE] heapUsed=${heapUsed.toFixed(1)}MB, heapTotal=${heapTotal.toFixed(1)}MB, rss=${rss.toFixed(1)}MB, external=${external.toFixed(1)}MB, arrayBuffers=${arrayBuffers.toFixed(1)}MB, heapUtilization=${(heapUsed / heapTotal * 100).toFixed(1)}%`
33444
32857
  );
33445
32858
  }
33446
32859
  const now = Date.now();
33447
32860
  if (compactOldItems && memUsage.heapUsed > MEMORY_UI_COMPACT_THRESHOLD() && now - lastCompactRef.current > UI_COMPACT_COOLDOWN_MS) {
33448
32861
  lastCompactRef.current = now;
33449
- if (debugLogger32.isEnabled()) {
33450
- debugLogger32.debug(
32862
+ if (debugLogger31.isEnabled()) {
32863
+ debugLogger31.debug(
33451
32864
  `[UI_COMPACT] heapUsed=${heapUsed.toFixed(1)}MB exceeds ${(MEMORY_UI_COMPACT_THRESHOLD() / 1024 / 1024).toFixed(0)}MB threshold, compacting UI history`
33452
32865
  );
33453
32866
  }
33454
32867
  try {
33455
32868
  compactOldItems();
33456
32869
  } catch (err) {
33457
- debugLogger32.error(
32870
+ debugLogger31.error(
33458
32871
  `[UI_COMPACT] compactOldItems failed: ${err instanceof Error ? err.message : String(err)}`
33459
32872
  );
33460
32873
  }
@@ -33463,7 +32876,7 @@ var useMemoryMonitor = /* @__PURE__ */ __name(({
33463
32876
  const warningIntervalId = setInterval(() => {
33464
32877
  const usage = process12.memoryUsage();
33465
32878
  if (usage.rss > MEMORY_WARNING_THRESHOLD) {
33466
- debugLogger32.warn(
32879
+ debugLogger31.warn(
33467
32880
  `[MEMORY_WARNING] High memory usage detected: ${(usage.rss / (1024 * 1024 * 1024)).toFixed(2)} GB`
33468
32881
  );
33469
32882
  addItem(
@@ -33616,7 +33029,7 @@ var FEEDBACK_SHOW_PROBABILITY = 0.25;
33616
33029
  var MIN_TOOL_CALLS = 10;
33617
33030
  var MIN_USER_MESSAGES = 5;
33618
33031
  var FEEDBACK_COOLDOWN_HOURS = 24;
33619
- var debugLogger33 = createDebugLogger("FEEDBACK_DIALOG");
33032
+ var debugLogger32 = createDebugLogger("FEEDBACK_DIALOG");
33620
33033
  var lastMessageIsAIResponse = /* @__PURE__ */ __name((history) => history.length > 0 && history[history.length - 1].type === "gemini" /* GEMINI */, "lastMessageIsAIResponse");
33621
33034
  var getFeedbackLastShownTimestampFromFile = /* @__PURE__ */ __name(() => {
33622
33035
  try {
@@ -33628,7 +33041,7 @@ var getFeedbackLastShownTimestampFromFile = /* @__PURE__ */ __name(() => {
33628
33041
  }
33629
33042
  } catch (error) {
33630
33043
  if (isNodeError(error) && error.code !== "ENOENT") {
33631
- debugLogger33.warn(
33044
+ debugLogger32.warn(
33632
33045
  "Failed to read feedbackLastShownTimestamp from settings file:",
33633
33046
  error
33634
33047
  );
@@ -33949,7 +33362,7 @@ var useEffortCommand = /* @__PURE__ */ __name((loadedSettings, config, addItem)
33949
33362
  // packages/cli/src/ui/hooks/use-output-style-command.ts
33950
33363
  init_esbuild_shims();
33951
33364
  var import_react126 = __toESM(require_react(), 1);
33952
- var debugLogger34 = createDebugLogger("OUTPUT_STYLE_COMMAND");
33365
+ var debugLogger33 = createDebugLogger("OUTPUT_STYLE_COMMAND");
33953
33366
  function containsStyle(styles, name) {
33954
33367
  const wanted = name.toLowerCase();
33955
33368
  return styles.some((style) => style.name.toLowerCase() === wanted);
@@ -33993,7 +33406,7 @@ var useOutputStyleCommand = /* @__PURE__ */ __name((loadedSettings, config, addI
33993
33406
  if (openGenerationRef.current !== generation) {
33994
33407
  return;
33995
33408
  }
33996
- debugLogger34.warn("Failed to load custom output styles:", error);
33409
+ debugLogger33.warn("Failed to load custom output styles:", error);
33997
33410
  setIsOutputStyleDialogOpen(false);
33998
33411
  report(
33999
33412
  "error" /* ERROR */,
@@ -34036,7 +33449,7 @@ var useOutputStyleCommand = /* @__PURE__ */ __name((loadedSettings, config, addI
34036
33449
  await applyOutputStyleSelection(config, loadedSettings, style)
34037
33450
  );
34038
33451
  } catch (error) {
34039
- debugLogger34.warn("Failed to apply output style:", error);
33452
+ debugLogger33.warn("Failed to apply output style:", error);
34040
33453
  report(
34041
33454
  "error" /* ERROR */,
34042
33455
  t('Failed to set "{{key}}": {{error}}', {
@@ -34631,7 +34044,7 @@ __name(useDeleteCommand, "useDeleteCommand");
34631
34044
  init_esbuild_shims();
34632
34045
  var import_react130 = __toESM(require_react(), 1);
34633
34046
  import process15 from "node:process";
34634
- var debugLogger35 = createDebugLogger("SLASH_COMMAND_PROCESSOR");
34047
+ var debugLogger34 = createDebugLogger("SLASH_COMMAND_PROCESSOR");
34635
34048
  function hasUserPromptExpansionHooks(config) {
34636
34049
  return !!config && !config.getDisableAllHooks?.() && (config.hasHooksForEvent?.("UserPromptExpansion") ?? false);
34637
34050
  }
@@ -35207,7 +34620,7 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history
35207
34620
  }
35208
34621
  setCommands(commandService.getCommandsForMode("interactive"));
35209
34622
  } catch (error) {
35210
- debugLogger35.error("Failed to load slash commands:", error);
34623
+ debugLogger34.error("Failed to load slash commands:", error);
35211
34624
  } finally {
35212
34625
  if (!controller.signal.aborted) {
35213
34626
  resolveCommandReloads(reloadTrigger);
@@ -35652,7 +35065,7 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history
35652
35065
  }
35653
35066
  invocationSentToModel = true;
35654
35067
  if (invocationItemId !== void 0) {
35655
- debugLogger35.debug(
35068
+ debugLogger34.debug(
35656
35069
  `Marked slash command invocation as model-sent: /${resolvedCommandPath.join(
35657
35070
  " "
35658
35071
  )}`
@@ -35802,7 +35215,7 @@ ${commandToExecute.subCommands.map((sc) => ` - ${sc.name}: ${sc.description ||
35802
35215
  });
35803
35216
  }
35804
35217
  } catch (recordError) {
35805
- debugLogger35.error(
35218
+ debugLogger34.error(
35806
35219
  "[slashCommand] Failed to record slash command:",
35807
35220
  recordError
35808
35221
  );
@@ -35919,7 +35332,7 @@ var useStateAndRef = /* @__PURE__ */ __name((initialValue) => {
35919
35332
  init_esbuild_shims();
35920
35333
  var import_react133 = __toESM(require_react(), 1);
35921
35334
  import * as path9 from "node:path";
35922
- var debugLogger36 = createDebugLogger("REACT_TOOL_SCHEDULER");
35335
+ var debugLogger35 = createDebugLogger("REACT_TOOL_SCHEDULER");
35923
35336
  function useReactToolScheduler(onComplete, config, getPreferredEditor, onEditorClose, onToolResultFullTurnModel) {
35924
35337
  const [toolCallsForDisplay, setToolCallsForDisplay] = (0, import_react133.useState)([]);
35925
35338
  const outputUpdateHandler = (0, import_react133.useCallback)(
@@ -35998,7 +35411,7 @@ function useReactToolScheduler(onComplete, config, getPreferredEditor, onEditorC
35998
35411
  if (!modelOverride?.endsWith("\0")) {
35999
35412
  void scheduler.schedule(request, signal).catch((error) => {
36000
35413
  if (signal.aborted) return;
36001
- debugLogger36.error(
35414
+ debugLogger35.error(
36002
35415
  `Tool scheduling failed: ${error instanceof Error ? error.message : String(error)}`
36003
35416
  );
36004
35417
  });
@@ -36011,7 +35424,7 @@ function useReactToolScheduler(onComplete, config, getPreferredEditor, onEditorC
36011
35424
  });
36012
35425
  await scheduler.schedule(request, signal, runtimeView);
36013
35426
  } catch (error) {
36014
- debugLogger36.error(
35427
+ debugLogger35.error(
36015
35428
  `Full-turn tool scheduling failed: ${error instanceof Error ? error.message : String(error)}`
36016
35429
  );
36017
35430
  const message = "Full-turn tool scheduling failed. The tool was not executed.";
@@ -36079,7 +35492,7 @@ function mapCoreStatusToDisplayStatus(coreStatus) {
36079
35492
  return "Pending" /* Pending */;
36080
35493
  default: {
36081
35494
  const exhaustiveCheck = coreStatus;
36082
- debugLogger36.warn(`Unknown core status encountered: ${exhaustiveCheck}`);
35495
+ debugLogger35.warn(`Unknown core status encountered: ${exhaustiveCheck}`);
36083
35496
  return "Error" /* Error */;
36084
35497
  }
36085
35498
  }
@@ -36492,11 +35905,11 @@ function useMessageQueue() {
36492
35905
  __name(useMessageQueue, "useMessageQueue");
36493
35906
 
36494
35907
  // packages/cli/src/ui/hooks/use-llm-stream.ts
36495
- var debugLogger37 = createDebugLogger("GEMINI_STREAM");
35908
+ var debugLogger36 = createDebugLogger("GEMINI_STREAM");
36496
35909
  function applyModelOverride(modelOverrideRef, inlineActiveRef, value, isInline) {
36497
35910
  modelOverrideRef.current = value;
36498
35911
  inlineActiveRef.current = isInline;
36499
- debugLogger37.debug(
35912
+ debugLogger36.debug(
36500
35913
  `model override ${value === void 0 ? "cleared" : `set to ${value}`} (inline=${isInline})`
36501
35914
  );
36502
35915
  }
@@ -36717,20 +36130,20 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
36717
36130
  reason: options?.pauseReason ?? (options?.userCancelled ? GOAL_PAUSE_REASON_USER_INTERRUPT : goalPauseReasonForFailure(""))
36718
36131
  });
36719
36132
  } catch (error) {
36720
- debugLogger37.warn("Failed to pause invalid Goal tool batch", error);
36133
+ debugLogger36.warn("Failed to pause invalid Goal tool batch", error);
36721
36134
  }
36722
36135
  }
36723
36136
  try {
36724
36137
  await config.getChatRecordingService()?.flush();
36725
36138
  } catch (error) {
36726
- debugLogger37.warn("Failed to flush invalid Goal tool batch", error);
36139
+ debugLogger36.warn("Failed to flush invalid Goal tool batch", error);
36727
36140
  }
36728
36141
  const currentPermit = runtime.permitForTurn(binding.turnKey);
36729
36142
  if (currentPermit && sameGoalPermit(currentPermit, binding.permit)) {
36730
36143
  await runtime.finishTurn(binding.permit);
36731
36144
  }
36732
36145
  } catch (error) {
36733
- debugLogger37.warn("Failed to close invalid Goal tool batch", error);
36146
+ debugLogger36.warn("Failed to close invalid Goal tool batch", error);
36734
36147
  } finally {
36735
36148
  releaseGoalTurn(binding);
36736
36149
  }
@@ -36744,7 +36157,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
36744
36157
  const runtime = await config.getGoalRuntimeReady();
36745
36158
  await runtime.releaseTurn(turnKey);
36746
36159
  } catch (error) {
36747
- debugLogger37.warn(
36160
+ debugLogger36.warn(
36748
36161
  `Failed to release undelivered Goal turn ${turnKey}`,
36749
36162
  error
36750
36163
  );
@@ -36788,7 +36201,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
36788
36201
  if (settled || entries.length === 0) return;
36789
36202
  settled = true;
36790
36203
  if (teammateQueueGenerationRef.current !== generation) {
36791
- debugLogger37.debug(
36204
+ debugLogger36.debug(
36792
36205
  `dropping ${entries.length} drained teammate message(s): team changed while in flight`
36793
36206
  );
36794
36207
  return;
@@ -37249,7 +36662,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
37249
36662
  if (signal.aborted) {
37250
36663
  return { parts: null, shouldProceed: false };
37251
36664
  }
37252
- debugLogger37.debug("vision bridge: gate matched, running conversion");
36665
+ debugLogger36.debug("vision bridge: gate matched, running conversion");
37253
36666
  const fullTurnModel = config.getDefaultVisionBridgeModel();
37254
36667
  if (fullTurnModel?.agentCapable) {
37255
36668
  const fullTurnParts = (Array.isArray(parts) ? parts : [parts]).map(
@@ -37274,7 +36687,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
37274
36687
  return { parts: fullTurnParts, shouldProceed: true };
37275
36688
  }
37276
36689
  const bridgeResult = await runVisionBridge({ config, parts, signal });
37277
- debugLogger37.debug(
36690
+ debugLogger36.debug(
37278
36691
  `vision bridge: status=${bridgeResult.status} applied=${bridgeResult.applied} model=${bridgeResult.modelId ?? "(none)"}`
37279
36692
  );
37280
36693
  if (bridgeResult.status !== "skipped" || bridgeResult.egressOccurred) {
@@ -37364,7 +36777,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
37364
36777
  true
37365
36778
  );
37366
36779
  } else {
37367
- debugLogger37.warn(
36780
+ debugLogger36.warn(
37368
36781
  `ignoring model override '${slashCommandResult.modelOverride}': not a model on the active provider`
37369
36782
  );
37370
36783
  }
@@ -37596,8 +37009,8 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
37596
37009
  setThought((prev) => {
37597
37010
  const incomingDescription = incoming.description ? clampLoadingThoughtDescription(incoming.description) : incoming.description;
37598
37011
  if (!prev) {
37599
- if (debugLogger37.isEnabled()) {
37600
- debugLogger37.debug(
37012
+ if (debugLogger36.isEnabled()) {
37013
+ debugLogger36.debug(
37601
37014
  `[THOUGHT_MERGE] New thought: subjectLength=${incoming.subject?.length ?? 0}, description length=${incomingDescription?.length ?? 0}`
37602
37015
  );
37603
37016
  }
@@ -37610,8 +37023,8 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
37610
37023
  const description = clampLoadingThoughtDescription(
37611
37024
  `${prev.description ?? ""}${incomingDescription ?? ""}`
37612
37025
  );
37613
- if (debugLogger37.isEnabled()) {
37614
- debugLogger37.debug(
37026
+ if (debugLogger36.isEnabled()) {
37027
+ debugLogger36.debug(
37615
37028
  `[THOUGHT_MERGE] Accumulating thought: prev length=${prev.description?.length ?? 0}, incoming length=${incomingDescription?.length ?? 0}, total length=${description.length}`
37616
37029
  );
37617
37030
  }
@@ -37772,7 +37185,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
37772
37185
  eventValue.error.message,
37773
37186
  formattedErrorText
37774
37187
  ).catch((err) => {
37775
- debugLogger37.warn(`StopFailure hook failed: ${err}`);
37188
+ debugLogger36.warn(`StopFailure hook failed: ${err}`);
37776
37189
  });
37777
37190
  },
37778
37191
  [
@@ -38397,7 +37810,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
38397
37810
  duplicateProviderToolCallResponseIdsRef.current
38398
37811
  );
38399
37812
  if (repeatedDuplicateRequest?.providerCallId) {
38400
- debugLogger37.debug(
37813
+ debugLogger36.debug(
38401
37814
  `[processLlmStreamEvents] Dropping batch after repeated duplicate provider tool-call id: ${repeatedDuplicateRequest.providerCallId} (tool: ${repeatedDuplicateRequest.name})`
38402
37815
  );
38403
37816
  loopDetectedRef.current = true;
@@ -38419,7 +37832,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
38419
37832
  duplicateProviderToolCallResponseIdsRef.current
38420
37833
  );
38421
37834
  const response = createDuplicateProviderToolCallResponse(request);
38422
- debugLogger37.debug(
37835
+ debugLogger36.debug(
38423
37836
  `[processLlmStreamEvents] Suppressing duplicate provider tool-call id: ${providerCallId} (tool: ${request.name})`
38424
37837
  );
38425
37838
  dualOutput?.emitToolResult(request, response);
@@ -39140,7 +38553,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
39140
38553
  if (onComplete) {
39141
38554
  submitPromptOnCompleteRef.current = null;
39142
38555
  void onComplete().catch((err) => {
39143
- debugLogger37.error("onComplete callback failed:", err);
38556
+ debugLogger36.error("onComplete callback failed:", err);
39144
38557
  });
39145
38558
  }
39146
38559
  if (llmClient) {
@@ -39300,7 +38713,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
39300
38713
  }
39301
38714
  }
39302
38715
  } catch (error) {
39303
- debugLogger37.warn(
38716
+ debugLogger36.warn(
39304
38717
  `Failed to capture pushed teammate entry for retry debt: ${error}`
39305
38718
  );
39306
38719
  }
@@ -39351,7 +38764,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
39351
38764
  orphanedEntries.push(parts);
39352
38765
  }
39353
38766
  } catch (error) {
39354
- debugLogger37.warn(
38767
+ debugLogger36.warn(
39355
38768
  `Failed to scan history for orphaned teammate envelopes: ${error}`
39356
38769
  );
39357
38770
  return { query, consumed: [] };
@@ -39475,7 +38888,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
39475
38888
  "proceed_once" /* ProceedOnce */
39476
38889
  );
39477
38890
  } catch (error) {
39478
- debugLogger37.error(
38891
+ debugLogger36.error(
39479
38892
  `Failed to auto-approve tool call ${call.request.callId}:`,
39480
38893
  error
39481
38894
  );
@@ -39504,7 +38917,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
39504
38917
  );
39505
38918
  const dedupedCallIds = dedupedTools.map((tc) => tc.request.callId);
39506
38919
  if (dedupedCallIds.length > 0) {
39507
- debugLogger37.warn(
38920
+ debugLogger36.warn(
39508
38921
  `[REPAIR] Dropping ${dedupedCallIds.length} late tool result(s) whose callId already has a functionResponse in history: ${dedupedCallIds.join(", ")}`
39509
38922
  );
39510
38923
  for (const tc of dedupedTools) {
@@ -39813,11 +39226,11 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
39813
39226
  memoryWriteCandidates,
39814
39227
  config.getProjectRoot()
39815
39228
  );
39816
- debugLogger37.debug(
39229
+ debugLogger36.debug(
39817
39230
  `Checked marked context-file memory tool batch; matched=${matchedContextFileWrite}`
39818
39231
  );
39819
39232
  if (matchedContextFileWrite) {
39820
- debugLogger37.debug(
39233
+ debugLogger36.debug(
39821
39234
  "Refreshing memory after context-file memory write"
39822
39235
  );
39823
39236
  await refreshMemoryInstruction(config, {
@@ -39828,7 +39241,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
39828
39241
  if (newSuccessfulMemorySaves.length > 0) {
39829
39242
  if (!didRefreshManagedMemory) {
39830
39243
  void performMemoryRefresh().catch((err) => {
39831
- debugLogger37.warn(`save_memory refresh failed: ${err}`);
39244
+ debugLogger36.warn(`save_memory refresh failed: ${err}`);
39832
39245
  });
39833
39246
  }
39834
39247
  newSuccessfulMemorySaves.forEach(
@@ -40014,7 +39427,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
40014
39427
  for (const toolCall of llmTools) {
40015
39428
  if ("modelOverride" in toolCall.response) {
40016
39429
  if (inlineModelOverrideActiveRef.current || modelOverrideRef.current?.endsWith("\0")) {
40017
- debugLogger37.debug(
39430
+ debugLogger36.debug(
40018
39431
  `skill-tool model override (${String(
40019
39432
  toolCall.response.modelOverride
40020
39433
  )}) blocked: ${inlineModelOverrideActiveRef.current ? "inline override active" : "full-turn override active"}`
@@ -40193,7 +39606,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
40193
39606
  let drainedTeammates;
40194
39607
  if (!continuationOwner?.survivesGenerationChange && !continuationWasCancelled() && teammateQueueRef.current.length > 0) {
40195
39608
  drainedTeammates = drainTeammateQueue();
40196
- debugLogger37.debug(
39609
+ debugLogger36.debug(
40197
39610
  `draining ${drainedTeammates.entries.length} teammate message(s) into tool-round submission`
40198
39611
  );
40199
39612
  responsesToSend.push(
@@ -40213,12 +39626,12 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
40213
39626
  if (accepted) {
40214
39627
  stripTrailingTextsFromLastPrompt(envelopeTexts);
40215
39628
  if (swapped) {
40216
- debugLogger37.debug(
39629
+ debugLogger36.debug(
40217
39630
  `dropping ${entries.length} accepted teammate message(s): team changed while in flight`
40218
39631
  );
40219
39632
  return;
40220
39633
  }
40221
- debugLogger37.debug(
39634
+ debugLogger36.debug(
40222
39635
  `recording ${entries.length} boundary-delivered teammate message(s)`
40223
39636
  );
40224
39637
  config.getChatRecordingService?.()?.recordNotification?.(
@@ -40236,7 +39649,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
40236
39649
  });
40237
39650
  return;
40238
39651
  }
40239
- debugLogger37.debug(
39652
+ debugLogger36.debug(
40240
39653
  `restoring ${entries.length} teammate message(s) after failed/cancelled submission`
40241
39654
  );
40242
39655
  restore();
@@ -40438,7 +39851,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
40438
39851
  isProtected: isProtectedNotification
40439
39852
  });
40440
39853
  if (admission.action === "drop") {
40441
- debugLogger37.warn(
39854
+ debugLogger36.warn(
40442
39855
  `Notification queue overflow: dropping task=${item.taskId ?? "unknown"} kind=${item.kind} because ${admission.reason === "all-protected" ? "every queued notification is protected" : "the next monitor pulse will supersede it"}`
40443
39856
  );
40444
39857
  droppedNotificationsRef.current.record(item);
@@ -40446,7 +39859,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
40446
39859
  }
40447
39860
  if (admission.action === "evict") {
40448
39861
  const [evicted] = queue.splice(admission.index, 1);
40449
- debugLogger37.warn(
39862
+ debugLogger36.warn(
40450
39863
  `Notification queue overflow: evicting task=${evicted?.taskId ?? "unknown"} kind=${evicted?.kind ?? "unknown"}`
40451
39864
  );
40452
39865
  if (evicted) {
@@ -40511,7 +39924,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
40511
39924
  try {
40512
39925
  await scheduler.enableDurable(cronSessionIdRef.current);
40513
39926
  } catch (err) {
40514
- debugLogger37.warn(
39927
+ debugLogger36.warn(
40515
39928
  `Durable cron init failed \u2014 persistent tasks will not fire in this session: ${err}`
40516
39929
  );
40517
39930
  }
@@ -40734,7 +40147,7 @@ ${text}` : text, "withDroppedSummary");
40734
40147
  setNotificationTrigger((n) => n + 1);
40735
40148
  }, "onGoalClaimDeferred")
40736
40149
  }).catch((error) => {
40737
- debugLogger37.warn("Failed to admit cron notification", error);
40150
+ debugLogger36.warn("Failed to admit cron notification", error);
40738
40151
  });
40739
40152
  return;
40740
40153
  }
@@ -40781,7 +40194,7 @@ ${text}` : text, "withDroppedSummary");
40781
40194
  }, "onRequestStarted")
40782
40195
  }
40783
40196
  ).catch((error) => {
40784
- debugLogger37.warn("Failed to admit background notification", error);
40197
+ debugLogger36.warn("Failed to admit background notification", error);
40785
40198
  });
40786
40199
  });
40787
40200
  return void 0;
@@ -40840,7 +40253,7 @@ ${text}` : text, "withDroppedSummary");
40840
40253
  claimGoalTurn: admission.claimGoalTurn,
40841
40254
  onGoalClaimDeferred: restore
40842
40255
  }).catch((error) => {
40843
- debugLogger37.warn("Failed to admit teammate notification", error);
40256
+ debugLogger36.warn("Failed to admit teammate notification", error);
40844
40257
  });
40845
40258
  });
40846
40259
  }
@@ -40879,7 +40292,7 @@ var DIGIT_MULTIPLIER = 10;
40879
40292
  var DEFAULT_COUNT = 1;
40880
40293
  var MAX_COUNT = 9999;
40881
40294
  var DIGIT_1_TO_9 = /^[1-9]$/;
40882
- var debugLogger38 = createDebugLogger("VIM_MODE");
40295
+ var debugLogger37 = createDebugLogger("VIM_MODE");
40883
40296
  var CMD_TYPES = {
40884
40297
  DELETE_WORD_FORWARD: "dw",
40885
40298
  DELETE_WORD_BACKWARD: "db",
@@ -41022,7 +40435,7 @@ function readClipboard() {
41022
40435
  }
41023
40436
  return "";
41024
40437
  } catch (e) {
41025
- debugLogger38.warn("readClipboard failed:", e);
40438
+ debugLogger37.warn("readClipboard failed:", e);
41026
40439
  return "";
41027
40440
  }
41028
40441
  }
@@ -41068,7 +40481,7 @@ function writeClipboard(text) {
41068
40481
  const [bin, ...args] = linuxWriteCmd;
41069
40482
  const child = execFile7(bin, args, { timeout: 500 }, (err) => {
41070
40483
  if (err && !writeOsc52(text)) {
41071
- debugLogger38.warn(
40484
+ debugLogger37.warn(
41072
40485
  "writeClipboard: cached tool and OSC 52 both failed"
41073
40486
  );
41074
40487
  }
@@ -41077,11 +40490,11 @@ function writeClipboard(text) {
41077
40490
  child.unref();
41078
40491
  } else {
41079
40492
  if (!writeOsc52(text)) {
41080
- debugLogger38.warn("OSC 52 clipboard write failed - no TTY available");
40493
+ debugLogger37.warn("OSC 52 clipboard write failed - no TTY available");
41081
40494
  }
41082
40495
  }
41083
40496
  } catch (e) {
41084
- debugLogger38.warn("writeClipboard failed:", e);
40497
+ debugLogger37.warn("writeClipboard failed:", e);
41085
40498
  }
41086
40499
  }
41087
40500
  __name(writeClipboard, "writeClipboard");
@@ -41796,7 +41209,7 @@ function useVim(buffer, onSubmit) {
41796
41209
  try {
41797
41210
  normalizedKey = normalizeKey(key);
41798
41211
  } catch (error) {
41799
- debugLogger38.warn("Malformed key input in vim mode:", key, error);
41212
+ debugLogger37.warn("Malformed key input in vim mode:", key, error);
41800
41213
  return false;
41801
41214
  }
41802
41215
  const s = stateRef.current;
@@ -43073,7 +42486,7 @@ __name(useCommandMigration, "useCommandMigration");
43073
42486
 
43074
42487
  // packages/cli/src/services/notificationService.ts
43075
42488
  init_esbuild_shims();
43076
- var debugLogger39 = createDebugLogger("NOTIFICATION_SERVICE");
42489
+ var debugLogger38 = createDebugLogger("NOTIFICATION_SERVICE");
43077
42490
  var DEFAULT_TITLE = "Qwen Code";
43078
42491
  function sendNotification(opts, terminal, enabled) {
43079
42492
  if (!enabled) {
@@ -43101,7 +42514,7 @@ function sendNotification(opts, terminal, enabled) {
43101
42514
  return "terminal_bell";
43102
42515
  }
43103
42516
  } catch (error) {
43104
- debugLogger39.warn("Failed to send notification:", error);
42517
+ debugLogger38.warn("Failed to send notification:", error);
43105
42518
  return "error";
43106
42519
  }
43107
42520
  }
@@ -44006,7 +43419,7 @@ var MCP_BATCH_FLUSH_MS = 16;
44006
43419
  var STARTUP_PROFILE_FINALIZE_CAP_MS = 35e3;
44007
43420
  var CTRL_EXIT_PROMPT_DURATION_MS = 1e3;
44008
43421
  var GOAL_RUNTIME_STARTUP_TIMEOUT_MS = 5e3;
44009
- var debugLogger40 = createDebugLogger("APP_CONTAINER");
43422
+ var debugLogger39 = createDebugLogger("APP_CONTAINER");
44010
43423
  function isRenderModeToggleKey(key) {
44011
43424
  return keyMatchers["toggleRenderMode" /* TOGGLE_RENDER_MODE */](key) || key.name === "m" && key.meta && !key.ctrl && !key.paste;
44012
43425
  }
@@ -44212,7 +43625,7 @@ function useQueuedSubmissionDrain({
44212
43625
  );
44213
43626
  }
44214
43627
  void Promise.resolve(request).catch((error) => {
44215
- debugLogger40.warn("Queued submission failed during admission", error);
43628
+ debugLogger39.warn("Queued submission failed during admission", error);
44216
43629
  }).finally(() => {
44217
43630
  queueDrainingRef.current = false;
44218
43631
  if (!admissionFailed) {
@@ -44511,7 +43924,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
44511
43924
  const staticExtraHeight = 3;
44512
43925
  (0, import_react159.useEffect)(() => {
44513
43926
  void loadLowlight().catch((err) => {
44514
- debugLogger40.warn(
43927
+ debugLogger39.warn(
44515
43928
  `Failed to load lowlight chunk; code blocks will render as plain text: ${err instanceof Error ? err.message : String(err)}`
44516
43929
  );
44517
43930
  });
@@ -44524,7 +43937,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
44524
43937
  timeoutMs: GOAL_RUNTIME_STARTUP_TIMEOUT_MS
44525
43938
  });
44526
43939
  if (!goalRuntimeReady) {
44527
- debugLogger40.warn(
43940
+ debugLogger39.warn(
44528
43941
  `Goal runtime did not settle within ${GOAL_RUNTIME_STARTUP_TIMEOUT_MS}ms (session writer lease contention?); continuing with goal features degraded.`
44529
43942
  );
44530
43943
  }
@@ -44534,7 +43947,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
44534
43947
  const durableTasks = await readCronTasks(config.getProjectRoot());
44535
43948
  activeScheduledTaskCount = countActiveScheduledTasks(durableTasks);
44536
43949
  } catch (error) {
44537
- debugLogger40.warn(
43950
+ debugLogger39.warn(
44538
43951
  `Failed to read scheduled tasks at startup: ${error}`
44539
43952
  );
44540
43953
  }
@@ -44629,9 +44042,9 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
44629
44042
  registerCleanup(async () => {
44630
44043
  try {
44631
44044
  await config.getHookSystem()?.fireSessionEndEvent("prompt_input_exit" /* PromptInputExit */);
44632
- debugLogger40.debug("SessionEnd event completed successfully!!!");
44045
+ debugLogger39.debug("SessionEnd event completed successfully!!!");
44633
44046
  } catch (err) {
44634
- debugLogger40.error(`SessionEnd hook failed: ${err}`);
44047
+ debugLogger39.error(`SessionEnd hook failed: ${err}`);
44635
44048
  }
44636
44049
  });
44637
44050
  registerCleanup(async () => {
@@ -44657,7 +44070,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
44657
44070
  flushTimer = null;
44658
44071
  }
44659
44072
  return llmClient2.setTools().catch((err) => {
44660
- debugLogger40.error(
44073
+ debugLogger39.error(
44661
44074
  `setTools() batch-flush failed: ${err instanceof Error ? err.message : String(err)}`
44662
44075
  );
44663
44076
  });
@@ -44675,7 +44088,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
44675
44088
  failureSurfaced = true;
44676
44089
  const failedNames = typeof config.getFailedMcpServerNames === "function" ? config.getFailedMcpServerNames() : [];
44677
44090
  if (failedNames.length > 0) {
44678
- debugLogger40.warn(
44091
+ debugLogger39.warn(
44679
44092
  `MCP server(s) failed to start: ${failedNames.join(", ")}. Continuing with built-in tools and any servers that did connect.`
44680
44093
  );
44681
44094
  }
@@ -45144,7 +44557,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
45144
44557
  try {
45145
44558
  cancelOngoingRequestRef.current();
45146
44559
  } catch (error) {
45147
- debugLogger40.debug("Failed to cancel request while quitting:", error);
44560
+ debugLogger39.debug("Failed to cancel request while quitting:", error);
45148
44561
  }
45149
44562
  setQuittingMessages(messages);
45150
44563
  config.getLlmClient()?.requestShutdown();
@@ -45371,7 +44784,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
45371
44784
  },
45372
44785
  Date.now()
45373
44786
  );
45374
- debugLogger40.debug(
44787
+ debugLogger39.debug(
45375
44788
  `[DEBUG] Refreshed memory content in config: ${memoryContent.substring(
45376
44789
  0,
45377
44790
  200
@@ -45386,7 +44799,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
45386
44799
  },
45387
44800
  Date.now()
45388
44801
  );
45389
- debugLogger40.error("Error refreshing memory:", error);
44802
+ debugLogger39.error("Error refreshing memory:", error);
45390
44803
  }
45391
44804
  }, [config, historyManager, settings.merged]);
45392
44805
  const cancelHandlerRef = (0, import_react159.useRef)(() => {
@@ -45559,7 +44972,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
45559
44972
  );
45560
44973
  });
45561
44974
  goalReservationSettlementRef.current = settlement.catch((error) => {
45562
- debugLogger40.warn(
44975
+ debugLogger39.warn(
45563
44976
  `Failed to release queued Goal turns: ${getErrorMessage(error)}`
45564
44977
  );
45565
44978
  });
@@ -45896,7 +45309,7 @@ ${buildWorkflowSteeringNotice()}
45896
45309
  }, "onAdmissionFailed")
45897
45310
  })
45898
45311
  ).catch((error) => {
45899
- debugLogger40.warn("Failed to admit /btw submission", error);
45312
+ debugLogger39.warn("Failed to admit /btw submission", error);
45900
45313
  });
45901
45314
  return;
45902
45315
  }
@@ -45980,7 +45393,7 @@ ${buildWorkflowSteeringNotice()}
45980
45393
  submittedPrompt === void 0 ? void 0 : { submittedPrompt }
45981
45394
  )
45982
45395
  ).catch((error) => {
45983
- debugLogger40.warn("Failed to admit slash command", error);
45396
+ debugLogger39.warn("Failed to admit slash command", error);
45984
45397
  });
45985
45398
  return;
45986
45399
  }
@@ -46058,18 +45471,18 @@ ${currentText}` : popped.modelText
46058
45471
  llmClient?.stripOrphanedUserEntriesFromHistory?.();
46059
45472
  }
46060
45473
  if (!draftWasEmpty) {
46061
- debugLogger40.debug("auto-restore bail: buffer was non-empty");
45474
+ debugLogger39.debug("auto-restore bail: buffer was non-empty");
46062
45475
  return;
46063
45476
  }
46064
45477
  if (popped !== null) {
46065
- debugLogger40.debug(
45478
+ debugLogger39.debug(
46066
45479
  "auto-restore bail: queue had items (drained to buffer)"
46067
45480
  );
46068
45481
  return;
46069
45482
  }
46070
45483
  const cancelledTurnUserItem = info?.lastTurnUserItem;
46071
45484
  if (cancelledTurnUserItem == null) {
46072
- debugLogger40.debug(
45485
+ debugLogger39.debug(
46073
45486
  "auto-restore bail: cancelled turn did not add a user history item"
46074
45487
  );
46075
45488
  return;
@@ -46083,20 +45496,20 @@ ${currentText}` : popped.modelText
46083
45496
  buffer.setText(cancelledTurnUserItem.text);
46084
45497
  }, "restoreCancelledPrompt");
46085
45498
  if (pendingHistoryItems2.some((item) => item.type === "tool_group")) {
46086
- debugLogger40.debug(
45499
+ debugLogger39.debug(
46087
45500
  "auto-restore bail: tool execution is pending or committed"
46088
45501
  );
46089
45502
  return;
46090
45503
  }
46091
45504
  if (info?.turnProducedMeaningfulContent) {
46092
- debugLogger40.debug(
45505
+ debugLogger39.debug(
46093
45506
  "auto-restore: preserving streamed output and restoring prompt text"
46094
45507
  );
46095
45508
  restoreCancelledPrompt();
46096
45509
  return;
46097
45510
  }
46098
45511
  if (pendingHistoryItems2.some((item) => !isSyntheticHistoryItem(item))) {
46099
- debugLogger40.debug(
45512
+ debugLogger39.debug(
46100
45513
  "auto-restore bail: pending stream item has meaningful content"
46101
45514
  );
46102
45515
  return;
@@ -46104,11 +45517,11 @@ ${currentText}` : popped.modelText
46104
45517
  const history = historyRef.current;
46105
45518
  const lastUserIdx = findLastUserItemIndex(history);
46106
45519
  if (lastUserIdx === -1) {
46107
- debugLogger40.debug("auto-restore bail: no user item in history");
45520
+ debugLogger39.debug("auto-restore bail: no user item in history");
46108
45521
  return;
46109
45522
  }
46110
45523
  if (!itemsAfterAreOnlySynthetic(history, lastUserIdx)) {
46111
- debugLogger40.debug(
45524
+ debugLogger39.debug(
46112
45525
  "auto-restore: preserving committed output and restoring prompt text"
46113
45526
  );
46114
45527
  restoreCancelledPrompt();
@@ -46116,18 +45529,18 @@ ${currentText}` : popped.modelText
46116
45529
  }
46117
45530
  const lastUserItem = history[lastUserIdx];
46118
45531
  if (lastUserItem.type !== "user") {
46119
- debugLogger40.debug(
45532
+ debugLogger39.debug(
46120
45533
  "auto-restore bail: lastUserItem type narrowing failed (unexpected)"
46121
45534
  );
46122
45535
  return;
46123
45536
  }
46124
45537
  if (lastUserItem.id !== cancelledTurnUserItem.id || lastUserItem.text !== cancelledTurnUserItem.text) {
46125
- debugLogger40.debug(
45538
+ debugLogger39.debug(
46126
45539
  "auto-restore bail: lastUserItem identity does not match cancelled-turn user item"
46127
45540
  );
46128
45541
  return;
46129
45542
  }
46130
- debugLogger40.debug(
45543
+ debugLogger39.debug(
46131
45544
  "auto-restore: rewinding cancelled turn and restoring prompt"
46132
45545
  );
46133
45546
  historyManager.truncateToItem(lastUserItem.id);
@@ -46136,7 +45549,7 @@ ${currentText}` : popped.modelText
46136
45549
  llmClient?.stripOrphanedUserEntriesFromHistory?.();
46137
45550
  if (info?.canUndoLastLoggedUserMessage) {
46138
45551
  void logger?.removeLastUserMessage().catch((err) => {
46139
- debugLogger40.debug("Failed to undo cancelled prompt from log:", err);
45552
+ debugLogger39.debug("Failed to undo cancelled prompt from log:", err);
46140
45553
  });
46141
45554
  }
46142
45555
  },
@@ -46874,7 +46287,7 @@ ${migrationResult.failedFiles.map((f) => ` \u2022 ${f.file}: ${f.error}`).join(
46874
46287
  const handleGlobalKeypress = (0, import_react159.useCallback)(
46875
46288
  (key) => {
46876
46289
  if (settings.merged.general?.debugKeystrokeLogging) {
46877
- debugLogger40.debug("[DEBUG] Keystroke:", JSON.stringify(key));
46290
+ debugLogger39.debug("[DEBUG] Keystroke:", JSON.stringify(key));
46878
46291
  }
46879
46292
  if (keyMatchers["toggleThinkingExpanded" /* TOGGLE_THINKING_EXPANDED */](key)) {
46880
46293
  setThoughtExpanded((prev) => !prev);
@@ -46995,7 +46408,7 @@ ${migrationResult.failedFiles.map((f) => ` \u2022 ${f.file}: ${f.error}`).join(
46995
46408
  );
46996
46409
  if (promotableShells.length === 1) {
46997
46410
  const executingShell = promotableShells[0];
46998
- debugLogger40.debug(
46411
+ debugLogger39.debug(
46999
46412
  `Ctrl+B promote: matched executing shell tool call ${executingShell.request.callId}`
47000
46413
  );
47001
46414
  executingShell.promoteAbortController.abort({
@@ -47003,7 +46416,7 @@ ${migrationResult.failedFiles.map((f) => ` \u2022 ${f.file}: ${f.error}`).join(
47003
46416
  });
47004
46417
  return;
47005
46418
  }
47006
- debugLogger40.debug(
46419
+ debugLogger39.debug(
47007
46420
  `Ctrl+B promote: expected exactly one executing shell tool call; falling through (streamingState=${streamingState}, pendingToolCalls=${pendingToolCallsRef.current.length}, promotableShells=${promotableShells.length})`
47008
46421
  );
47009
46422
  }
@@ -47711,7 +47124,7 @@ __name(installSynchronizedOutput, "installSynchronizedOutput");
47711
47124
 
47712
47125
  // packages/cli/src/ui/startInteractiveUI.tsx
47713
47126
  var import_jsx_runtime134 = __toESM(require_jsx_runtime(), 1);
47714
- var debugLogger41 = createDebugLogger("STARTUP");
47127
+ var debugLogger40 = createDebugLogger("STARTUP");
47715
47128
  var PRESSURE_CHECK_INTERVAL_MS = 3e4;
47716
47129
  async function startInteractiveUI(config, settings, startupWarnings, workspaceRoot = process.cwd(), initializationResult, options = {}) {
47717
47130
  const version = await getCliVersion();
@@ -47749,7 +47162,7 @@ async function startInteractiveUI(config, settings, startupWarnings, workspaceRo
47749
47162
  );
47750
47163
  }
47751
47164
  } catch (err) {
47752
- debugLogger41.error("Failed to initialize dual output bridge:", err);
47165
+ debugLogger40.error("Failed to initialize dual output bridge:", err);
47753
47166
  writeStderrLine(
47754
47167
  `Warning: dual output disabled \u2014 ${err instanceof Error ? err.message : String(err)}`
47755
47168
  );
@@ -47760,7 +47173,7 @@ async function startInteractiveUI(config, settings, startupWarnings, workspaceRo
47760
47173
  try {
47761
47174
  remoteInputWatcher = new RemoteInputWatcher(inputFile);
47762
47175
  } catch (err) {
47763
- debugLogger41.error("Failed to initialize remote input watcher:", err);
47176
+ debugLogger40.error("Failed to initialize remote input watcher:", err);
47764
47177
  writeStderrLine(
47765
47178
  `Warning: remote input disabled \u2014 ${err instanceof Error ? err.message : String(err)}`
47766
47179
  );
@@ -47831,7 +47244,7 @@ async function startInteractiveUI(config, settings, startupWarnings, workspaceRo
47831
47244
  {
47832
47245
  recordForExitEcho: true,
47833
47246
  onError: (error, info) => {
47834
- debugLogger41.error(
47247
+ debugLogger40.error(
47835
47248
  `[FATAL_RENDER_ERROR] ${error.message}
47836
47249
  ${info.componentStack ?? ""}
47837
47250
  ${error.stack ?? ""}`
@@ -47914,7 +47327,8 @@ qwen --resume ${sessionId}`
47914
47327
  registerSession({
47915
47328
  sessionId: config.getSessionId(),
47916
47329
  cwd: config.getTargetDir(),
47917
- qwenVersion: version
47330
+ qwenVersion: version,
47331
+ kind: "tui"
47918
47332
  })
47919
47333
  );
47920
47334
  if (settings.merged.agents?.crossSessionMessaging !== true) {
@@ -47946,7 +47360,7 @@ qwen --resume ${sessionId}`
47946
47360
  }
47947
47361
  return peerMessaging;
47948
47362
  } catch (error) {
47949
- debugLogger41.error("Failed to start cross-session messaging:", error);
47363
+ debugLogger40.error("Failed to start cross-session messaging:", error);
47950
47364
  return null;
47951
47365
  }
47952
47366
  })();