@qwen-code/qwen-code 0.21.6-preview.0 → 0.21.7

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 (309) hide show
  1. package/bundled/qc-helper/docs/configuration/settings.md +19 -9
  2. package/bundled/qc-helper/docs/features/channels/dingtalk.md +1 -1
  3. package/bundled/qc-helper/docs/features/channels/github.md +31 -19
  4. package/bundled/qc-helper/docs/features/code-review.md +30 -1
  5. package/bundled/qc-helper/docs/qwen-serve.md +1 -1
  6. package/bundled/review/SKILL.md +59 -22
  7. package/chunks/{MaxSizedBox-A3UYJS6B.js → MaxSizedBox-ANWZBPTS.js} +38 -38
  8. package/chunks/{StandaloneSessionPicker-NGLY26I4.js → StandaloneSessionPicker-XKS3VU3A.js} +56 -55
  9. package/chunks/{acp-startup-profiler-3RICG2YW.js → acp-startup-profiler-ORIQ2CCQ.js} +2 -2
  10. package/chunks/{acpAgent-V54T2EEL.js → acpAgent-KUAZ3GCZ.js} +1091 -150
  11. package/chunks/{agent-2P53VL2L.js → agent-T6PTGX5R.js} +35 -35
  12. package/chunks/{agent-headless-6X4GCFRD.js → agent-headless-PR7YCB7S.js} +35 -35
  13. package/chunks/{anthropicContentGenerator-3CAHEZBM.js → anthropicContentGenerator-DTMVEL5M.js} +7 -7
  14. package/chunks/{artifact-tool-RROCCJDA.js → artifact-tool-U4VOZIK5.js} +2 -2
  15. package/chunks/{askUserQuestion-2EPPBPUZ.js → askUserQuestion-XOBQLPFA.js} +2 -2
  16. package/chunks/{bridge-TCFMLKHR.js → bridge-NU6YEEHK.js} +41 -41
  17. package/chunks/{channel-management-service-5XPPTWUQ.js → channel-management-service-FSQ7SHYI.js} +1 -1
  18. package/chunks/{channel-settings-store-B4HNMNQV.js → channel-settings-store-35VQVUVV.js} +42 -42
  19. package/chunks/{channel-worker-group-SVGPDH2C.js → channel-worker-group-JWQK224X.js} +5 -5
  20. package/chunks/{channel-worker-manager-72ZK2GTS.js → channel-worker-manager-77E3OXRQ.js} +5 -5
  21. package/chunks/{channel-worker-supervisor-NUEDVHX4.js → channel-worker-supervisor-62YWUGP2.js} +3 -3
  22. package/chunks/{chunk-XC656O42.js → chunk-22NBYCPD.js} +3 -3
  23. package/chunks/{chunk-WXS647W5.js → chunk-23RZCH76.js} +3 -3
  24. package/chunks/{chunk-O656RSMC.js → chunk-2U3WZGZG.js} +18 -10
  25. package/chunks/chunk-2VSTGY6M.js +107 -0
  26. package/chunks/{chunk-AU3XNTMV.js → chunk-33ACCIIY.js} +3 -3
  27. package/chunks/{chunk-MBEMTXQT.js → chunk-3K7FH2KQ.js} +1 -32
  28. package/chunks/{chunk-CJBRIJ7W.js → chunk-3NB7TSE2.js} +3 -3
  29. package/chunks/{chunk-QYPT3QUD.js → chunk-3ULCB3NE.js} +3 -3
  30. package/chunks/{chunk-7FUVSN4D.js → chunk-55LYDVPU.js} +1 -1
  31. package/chunks/{chunk-3ZRS2XNY.js → chunk-5KH532V7.js} +1 -1
  32. package/chunks/{chunk-P7LKADIT.js → chunk-6EOI4HOK.js} +7 -7
  33. package/chunks/{chunk-X6DV3WKN.js → chunk-6GONZVLS.js} +1 -1
  34. package/chunks/{chunk-T4XY5CT4.js → chunk-6HVUFDS2.js} +7 -7
  35. package/chunks/{chunk-5L6CQ4ZU.js → chunk-6M26GBKX.js} +2 -2
  36. package/chunks/{chunk-SPUDIAHX.js → chunk-6UWFTUQL.js} +530 -388
  37. package/chunks/{chunk-EKWNNQQD.js → chunk-6XJMFJ4D.js} +16 -10
  38. package/chunks/{chunk-72DZPDH4.js → chunk-6XU3PH66.js} +10 -5
  39. package/chunks/{chunk-WIPQR44Y.js → chunk-72LNFGUY.js} +3 -3
  40. package/chunks/{chunk-33FNCQSY.js → chunk-7MH4J33A.js} +2 -2
  41. package/chunks/{chunk-2AGOQ7QO.js → chunk-7UFKAV7Y.js} +118 -6
  42. package/chunks/{chunk-HKNSU4WX.js → chunk-AE77C5ZU.js} +198 -35
  43. package/chunks/{chunk-JELIWHXD.js → chunk-AOHJKPKL.js} +1 -1
  44. package/chunks/{chunk-GLNBDYUX.js → chunk-AXMWHKXA.js} +6 -2
  45. package/chunks/{chunk-H36SETQS.js → chunk-B2GJNDTV.js} +1 -1
  46. package/chunks/{chunk-QMBEW7EW.js → chunk-BGG4MBYD.js} +2 -2
  47. package/chunks/{chunk-QL4TN4HS.js → chunk-BRVWYMKV.js} +1 -1
  48. package/chunks/{chunk-6WBWIPBF.js → chunk-BVWVWGLE.js} +2 -2
  49. package/chunks/{chunk-WPKIU4PA.js → chunk-CB2464BK.js} +6 -6
  50. package/chunks/{chunk-2UISUFHQ.js → chunk-CJXIIILK.js} +3 -3
  51. package/chunks/{chunk-WK4TJUEA.js → chunk-CKASRHZI.js} +1 -1
  52. package/chunks/{chunk-Z7JILXGX.js → chunk-CNIID3TV.js} +3 -3
  53. package/chunks/{chunk-6KEN3RIC.js → chunk-CSZEXZBE.js} +3 -3
  54. package/chunks/{chunk-KKN2IE7Q.js → chunk-CTJLZLB5.js} +1 -1
  55. package/chunks/{chunk-5CDI4UOY.js → chunk-CXE7E23H.js} +131 -48
  56. package/chunks/{chunk-URJHXOSO.js → chunk-CYR3HI5X.js} +3 -3
  57. package/chunks/{chunk-546CDN6D.js → chunk-DBOFL3LQ.js} +3 -3
  58. package/chunks/{chunk-4LKVQFHM.js → chunk-DREZZAZM.js} +2 -2
  59. package/chunks/{chunk-2U7GPHA6.js → chunk-E33LOKRA.js} +1 -1
  60. package/chunks/{chunk-2DNKEBXY.js → chunk-EI3HZX6C.js} +1 -1
  61. package/chunks/{chunk-U25CMJYY.js → chunk-EKPKKXY2.js} +1 -1
  62. package/chunks/{chunk-QG2ACINA.js → chunk-EORNAQDT.js} +1 -1
  63. package/chunks/{chunk-432XCUHF.js → chunk-EQL65XGA.js} +1 -1
  64. package/chunks/{chunk-TYERNYH4.js → chunk-EUNWC2VS.js} +2 -2
  65. package/chunks/{chunk-CDHNGCJI.js → chunk-EUQTXRKZ.js} +7 -7
  66. package/chunks/{chunk-UH7Z7Y45.js → chunk-FOGU3LJX.js} +1 -1
  67. package/chunks/{chunk-BU4BRCPX.js → chunk-FPM27XN4.js} +5 -5
  68. package/chunks/{chunk-E4WHKETF.js → chunk-FVKHVJZQ.js} +2 -49
  69. package/chunks/{chunk-NKST54XA.js → chunk-FZBZSYKU.js} +1 -1
  70. package/chunks/{chunk-XZCMQUOF.js → chunk-GDXET5XU.js} +31 -3387
  71. package/chunks/{chunk-A5YZ3FA2.js → chunk-GM463R2B.js} +1 -1
  72. package/chunks/{chunk-MOHAWIAW.js → chunk-GNPNYXJB.js} +2 -2
  73. package/chunks/{chunk-AFZTZLFB.js → chunk-GSS34377.js} +3 -3
  74. package/chunks/{chunk-MVLM6PJK.js → chunk-H2UQ2M5Z.js} +6 -2
  75. package/chunks/{chunk-BK2UNYWD.js → chunk-HIBNSEJE.js} +12 -0
  76. package/chunks/{chunk-CXYBX4AL.js → chunk-HQB2KUAN.js} +1 -1
  77. package/chunks/{chunk-ZQL73PPE.js → chunk-HYRDKNUY.js} +2 -2
  78. package/chunks/{chunk-D7D7RXIJ.js → chunk-IC4Z6LX6.js} +1 -1
  79. package/chunks/{chunk-HU5TUALO.js → chunk-IIJEYBNH.js} +3 -3
  80. package/chunks/{chunk-DTAPI453.js → chunk-IUFV6FYU.js} +2 -2
  81. package/chunks/{chunk-MISUEWB4.js → chunk-J6SZID63.js} +12 -8
  82. package/chunks/{chunk-OWAK7LMW.js → chunk-KGJGEEVR.js} +7 -0
  83. package/chunks/{chunk-BFHXDAR7.js → chunk-KKBPOU75.js} +1 -1
  84. package/chunks/{chunk-XOZ2R6XI.js → chunk-KKJJB5X6.js} +3578 -1487
  85. package/chunks/{chunk-PQTK2FVO.js → chunk-KR4ZSC7K.js} +4 -4
  86. package/chunks/{chunk-NAYPZ72V.js → chunk-KXSDEOFU.js} +1 -1
  87. package/chunks/{chunk-MGSSJT27.js → chunk-L4N6TIP7.js} +5 -3
  88. package/chunks/{chunk-4T6QMNX2.js → chunk-LA7YLSR6.js} +185 -12
  89. package/chunks/{chunk-4E5PO6R7.js → chunk-LEMXGVEP.js} +4 -4
  90. package/chunks/{chunk-WVAESIM6.js → chunk-LZC3B5N2.js} +4 -4
  91. package/chunks/{chunk-6O5DVH27.js → chunk-M6HMMKVG.js} +1 -1
  92. package/chunks/{chunk-Z5S6KH2B.js → chunk-MAJS7AT4.js} +6 -6
  93. package/chunks/{chunk-XNZBXQCG.js → chunk-MKVZE4ZJ.js} +1 -1
  94. package/chunks/{chunk-I7JDGNG6.js → chunk-MVUQRLOH.js} +9 -5
  95. package/chunks/{chunk-GLWP3FDB.js → chunk-MZSJ43WV.js} +31 -2
  96. package/chunks/{chunk-ZPPP6VCL.js → chunk-NG2R4N5O.js} +1 -1
  97. package/chunks/chunk-NKLP3DCK.js +22 -0
  98. package/chunks/{chunk-WIRAPZ62.js → chunk-NLREQJFK.js} +7 -1
  99. package/chunks/{chunk-N47ZM2KI.js → chunk-OFI7IGST.js} +12 -12
  100. package/chunks/{chunk-DBIEZC7T.js → chunk-OH2VKQXH.js} +42 -16
  101. package/chunks/{chunk-C4GRKMUL.js → chunk-OHJLEW5J.js} +5 -5
  102. package/chunks/{chunk-3RXUYQJI.js → chunk-OIVKILPI.js} +49 -0
  103. package/chunks/{chunk-VDLXPEI5.js → chunk-OMKQH5C5.js} +3 -3
  104. package/chunks/{chunk-LBWNSLJK.js → chunk-ONSZH6VM.js} +2 -2
  105. package/chunks/{chunk-DYA25Y7U.js → chunk-OWMAZHIX.js} +1 -1
  106. package/chunks/{chunk-WAOLM6SQ.js → chunk-P2AJ7FTI.js} +1 -1
  107. package/chunks/{chunk-MFBUJMQ3.js → chunk-P3LEG54R.js} +4 -4
  108. package/chunks/{chunk-WVRJKSIG.js → chunk-PJOBIWUG.js} +1 -1
  109. package/chunks/{chunk-YUVTZ4UH.js → chunk-PQBHU2IA.js} +114 -18
  110. package/chunks/{chunk-GTM6IHBB.js → chunk-Q3JQ7OSU.js} +2 -1
  111. package/chunks/{chunk-IISDPZ5X.js → chunk-QETYKPMG.js} +1 -1
  112. package/chunks/{chunk-UKZEXS6K.js → chunk-R574ATRM.js} +11 -0
  113. package/chunks/{chunk-DOICUTPO.js → chunk-RERATVSK.js} +11 -10
  114. package/chunks/chunk-RGSBTHSU.js +3381 -0
  115. package/chunks/{chunk-6D6V55ZQ.js → chunk-RMH5OWLD.js} +1 -1
  116. package/chunks/{chunk-AVDEBBMI.js → chunk-RNVQB725.js} +2 -2
  117. package/chunks/{chunk-QWUYFMAR.js → chunk-RUL4S3K3.js} +87 -67
  118. package/chunks/{chunk-RTWF7FF7.js → chunk-RZHU3ILK.js} +5 -5
  119. package/chunks/{chunk-3DTM3RPU.js → chunk-S7CV4KO6.js} +3 -3
  120. package/chunks/{chunk-ZH7G3A4U.js → chunk-SCI7K3GM.js} +4 -4
  121. package/chunks/{chunk-YAVY33G4.js → chunk-SEZ556DZ.js} +1 -1
  122. package/chunks/{chunk-6KZP75GT.js → chunk-SHZYHGQH.js} +1 -1
  123. package/chunks/chunk-SOORFWKY.js +155 -0
  124. package/chunks/{chunk-NYZAL2W2.js → chunk-SPMY6CX6.js} +4 -4
  125. package/chunks/{chunk-EHMN6SEG.js → chunk-TDXGKHDN.js} +4 -4
  126. package/chunks/{chunk-XKTCA6BW.js → chunk-TLV2IMHR.js} +5 -5
  127. package/chunks/{chunk-XSGQKR37.js → chunk-TRLYP7OF.js} +358 -20
  128. package/chunks/{chunk-DG563ZCS.js → chunk-TYKC75AX.js} +3 -3
  129. package/chunks/{chunk-KVUBYJDM.js → chunk-TZEZYNYD.js} +1 -1
  130. package/chunks/{chunk-XC2VAFVZ.js → chunk-UVX4Y6IN.js} +1 -1
  131. package/chunks/{chunk-IKXE3AAC.js → chunk-VOARQPTA.js} +2 -2
  132. package/chunks/{chunk-TVFC3XF5.js → chunk-W4B7UBUS.js} +7 -7
  133. package/chunks/{chunk-M744OFVE.js → chunk-W7U4ESW2.js} +1 -1
  134. package/chunks/{chunk-URN76TKR.js → chunk-WCG5O7IP.js} +2 -2
  135. package/chunks/{chunk-A6SX5TAH.js → chunk-XCWO3SMQ.js} +9 -5
  136. package/chunks/{chunk-FDV3CXTD.js → chunk-Y4EWSQF7.js} +3 -3
  137. package/chunks/{chunk-3PRJYMXC.js → chunk-Y4NGLFGJ.js} +1 -1
  138. package/chunks/{chunk-DOA7MCDY.js → chunk-Y7E5LNLO.js} +973 -892
  139. package/chunks/{chunk-3LGZEYOF.js → chunk-YHEEE624.js} +2 -2
  140. package/chunks/{chunk-Y5HIDFKZ.js → chunk-YJQCUTT2.js} +4 -4
  141. package/chunks/{chunk-QONSRAEV.js → chunk-YP5KH5Y7.js} +1 -1
  142. package/chunks/{chunk-SQ3ZJOYL.js → chunk-ZJ3VGYHK.js} +20 -20
  143. package/chunks/{chunk-7GYP5COR.js → chunk-ZXU5UHMI.js} +1 -1
  144. package/chunks/{computer-use-GTOP2CVH.js → computer-use-KEAPATUY.js} +35 -35
  145. package/chunks/{config-utils-LIRO7NSU.js → config-utils-K7SCOWHD.js} +2 -2
  146. package/chunks/{contextCommand-K6T6RRF3.js → contextCommand-ZJA6A5K5.js} +38 -38
  147. package/chunks/{core-runtime-D2626QQU.js → core-runtime-QMJPWHCI.js} +35 -35
  148. package/chunks/create-sub-session-DJE6XICH.js +772 -0
  149. package/chunks/{create-sub-session-6EWLAZD5.js → create-sub-session-E4PBYXV5.js} +2 -2
  150. package/chunks/{cron-create-CCRIULJE.js → cron-create-GRBWYMIJ.js} +4 -4
  151. package/chunks/{cron-delete-FCFW6BGP.js → cron-delete-4CMKBR2M.js} +4 -4
  152. package/chunks/{cron-list-QDBVCHRF.js → cron-list-W7K4ASOA.js} +4 -4
  153. package/chunks/{daemon-CCIX4BMG.js → daemon-SCTQMM7Z.js} +165 -5
  154. package/chunks/{daemon-status-provider-2EHRZZVF.js → daemon-status-provider-FSWDPE2G.js} +45 -45
  155. package/chunks/{daemon-trust-policy-B3EPDJDR.js → daemon-trust-policy-P5L5VFAY.js} +41 -41
  156. package/chunks/{daemon-trust-policy-monitor-MFM5X26G.js → daemon-trust-policy-monitor-73JYN6ET.js} +41 -41
  157. package/chunks/{deferred-core-runtime-KXN7HLN7.js → deferred-core-runtime-BWRCCFTE.js} +35 -35
  158. package/chunks/discovery-XLHITE74.js +220 -0
  159. package/chunks/{display-image-GUJA352B.js → display-image-O2XFPQTC.js} +4 -4
  160. package/chunks/{dist-A7H2KKUC.js → dist-K4WWQBHS.js} +277 -98
  161. package/chunks/{dist-IKGVITP3.js → dist-KS4O2NKE.js} +99 -6
  162. package/chunks/{earlyInputCapture-WUNYYFOS.js → earlyInputCapture-L5ST23A6.js} +36 -36
  163. package/chunks/{edit-DMFCBP2D.js → edit-LHHRFNFK.js} +35 -35
  164. package/chunks/{enter-worktree-5SVBCXFC.js → enter-worktree-6NXCRZPF.js} +35 -35
  165. package/chunks/{enterPlanMode-QUIZFQ4M.js → enterPlanMode-ZVQT4U7D.js} +35 -35
  166. package/chunks/{environment-U6QP23VJ.js → environment-GJ2HWJOS.js} +38 -38
  167. package/chunks/{errors-GZWFA6ON.js → errors-6RLH3XXC.js} +38 -38
  168. package/chunks/{exit-worktree-FUB44KAF.js → exit-worktree-I2YLUHHY.js} +35 -35
  169. package/chunks/{exitPlanMode-XSHHYR73.js → exitPlanMode-7CCWKO7I.js} +35 -35
  170. package/chunks/{fast-path-JHQJSIMZ.js → fast-path-DVFD4HQD.js} +2 -2
  171. package/chunks/{gemini-O44ETOKT.js → gemini-7FWGOYD4.js} +78 -78
  172. package/chunks/{geminiContentGenerator-TTM4TZJM.js → geminiContentGenerator-V2WVLIXU.js} +6 -6
  173. package/chunks/{glob-YECOWTRW.js → glob-3N6GGI75.js} +35 -35
  174. package/chunks/{goal-tools-3AZKX5WQ.js → goal-tools-APOW6UXL.js} +3 -3
  175. package/chunks/{grep-BZO4LOTA.js → grep-V43ILZVX.js} +35 -35
  176. package/chunks/{handleAutoUpdate-TOO52D6H.js → handleAutoUpdate-A5WFVWIA.js} +40 -40
  177. package/chunks/{i18n-ARJYXZQ5.js → i18n-PLVQ4FBZ.js} +37 -37
  178. package/chunks/{image-gen-J6Q2YBEU.js → image-gen-7C6IK6DC.js} +9 -9
  179. package/chunks/{initializer-CEZ4RPQV.js → initializer-CVAIKZYL.js} +42 -42
  180. package/chunks/{installationInfo-AEGIIQAT.js → installationInfo-J6QDHNTK.js} +36 -36
  181. package/chunks/{keychain-token-storage-7BT4TQ2A.js → keychain-token-storage-TVAMTNP7.js} +2 -2
  182. package/chunks/{list-7XLPV5GC.js → list-ZZ4OUUWV.js} +44 -44
  183. package/chunks/{list-agents-GC4BRET7.js → list-agents-KFFIIS2G.js} +2 -2
  184. package/chunks/{loadedSettingsAdapter-YK5SBHOT.js → loadedSettingsAdapter-QRYRJSWL.js} +41 -41
  185. package/chunks/{loggingContentGenerator-I7QDXS43.js → loggingContentGenerator-OJCO75HM.js} +17 -17
  186. package/chunks/{loop-wakeup-SQQSBMEY.js → loop-wakeup-TLMJPMMP.js} +5 -5
  187. package/chunks/{ls-63CC3NNX.js → ls-UVVE2XGE.js} +4 -4
  188. package/chunks/{lsp-P6NVJVNT.js → lsp-QMEA2VLB.js} +2 -2
  189. package/chunks/{managed-npm-update-YSL7PA7G.js → managed-npm-update-PCOSCP2N.js} +48 -39
  190. package/chunks/{mcp-RKFQZXP6.js → mcp-M3WKKWKY.js} +41 -41
  191. package/chunks/{monitor-QHHJIKGL.js → monitor-GN24FH6C.js} +35 -35
  192. package/chunks/{nonInteractiveCli-XEBIE7MG.js → nonInteractiveCli-KPTU3VSQ.js} +75 -75
  193. package/chunks/{notebook-edit-SG7X2EQA.js → notebook-edit-4YM65BBO.js} +35 -35
  194. package/chunks/{openaiContentGenerator-63CVR33K.js → openaiContentGenerator-EDQT6GTV.js} +19 -19
  195. package/chunks/{pidfile-I3CXJGQD.js → pidfile-JOIIRN2C.js} +36 -36
  196. package/chunks/{processUtils-LJ3DSANX.js → processUtils-5SV4MX3Q.js} +2 -2
  197. package/chunks/{qwenContentGenerator-JINBVCH6.js → qwenContentGenerator-ODRJSUGR.js} +40 -40
  198. package/chunks/{qwenOAuth2-SY2O3NRR.js → qwenOAuth2-NESCMZ47.js} +8 -8
  199. package/chunks/{read-file-PGTXF25I.js → read-file-HPSODLPK.js} +10 -10
  200. package/chunks/{read-mcp-resource-RTSSEER5.js → read-mcp-resource-2TNSJTC3.js} +2 -2
  201. package/chunks/{record-artifact-E6AWQU2Z.js → record-artifact-RAON52FC.js} +3 -3
  202. package/chunks/{resumeHistoryUtils-FB2NFVZ2.js → resumeHistoryUtils-TXCOFFMQ.js} +42 -41
  203. package/chunks/{ripGrep-IY3KGPM6.js → ripGrep-ZKQGTQAO.js} +35 -35
  204. package/chunks/{run-qwen-serve-UYEMGPKA.js → run-qwen-serve-ZPKPKECF.js} +516 -87
  205. package/chunks/{runtime-CG3BKRFE.js → runtime-2FLNNM36.js} +44 -44
  206. package/chunks/{scheduler-VFUVGDE5.js → scheduler-365PJHNR.js} +35 -35
  207. package/chunks/{sdk-exporters-http-IL2346MJ.js → sdk-exporters-http-KHAB5JSD.js} +2 -2
  208. package/chunks/{sdk-impl-SYKGVWOZ.js → sdk-impl-KD7FSTC3.js} +2 -2
  209. package/chunks/{send-message-TL6FIMMN.js → send-message-ZM7MRUGP.js} +5 -5
  210. package/chunks/{serve-ZCCQ2G2L.js → serve-QD2RNLKJ.js} +42 -42
  211. package/chunks/{server-WS7LWXPP.js → server-XLJVLTYM.js} +7952 -611
  212. package/chunks/{session-IQLCT32T.js → session-3VTUHH4Q.js} +78 -78
  213. package/chunks/{settings-NX4EUIE6.js → settings-KULVPCQC.js} +40 -40
  214. package/chunks/{shell-THDYM4CS.js → shell-3SWW22MH.js} +35 -35
  215. package/chunks/{skill-OXXZBNQB.js → skill-KDHWYS7W.js} +14 -14
  216. package/chunks/{skill-settings-T3JZ33T2.js → skill-settings-NMY4JEJC.js} +40 -40
  217. package/chunks/{spawnChannel-COLJMSA7.js → spawnChannel-ZKS4Q5OU.js} +37 -37
  218. package/chunks/{standalone-update-ICW7H5IF.js → standalone-update-7CXPGAQ4.js} +38 -38
  219. package/chunks/{startInteractiveUI-6BDRXSMF.js → startInteractiveUI-2QQLEKM6.js} +473 -233
  220. package/chunks/{stdioHelpers-HGIYTWAY.js → stdioHelpers-7A2EE64Z.js} +5 -3
  221. package/chunks/{syntheticOutput-BN7E626U.js → syntheticOutput-ZLCUTKO2.js} +3 -3
  222. package/chunks/{task-create-2X4UP4F3.js → task-create-CQP5UEA3.js} +9 -9
  223. package/chunks/{task-list-WOLJPZ64.js → task-list-XLEZOJXP.js} +5 -5
  224. package/chunks/{task-stop-TNXRNAL2.js → task-stop-7ZQM5CFF.js} +2 -2
  225. package/chunks/{task-update-VDUSN36E.js → task-update-JA75U2SN.js} +9 -9
  226. package/chunks/{team-create-BCSMDK4Z.js → team-create-2WTNGAOX.js} +35 -35
  227. package/chunks/{team-delete-D2VMSDOT.js → team-delete-MHY3UZGY.js} +5 -5
  228. package/chunks/{team-plan-approval-B5YRLJFV.js → team-plan-approval-LZTYLEG4.js} +35 -35
  229. package/chunks/{terminal-image-renderer-PW6Z6VFY.js → terminal-image-renderer-R5HHAFJN.js} +41 -36
  230. package/chunks/{theme-manager-CMVKD2JH.js → theme-manager-PAUCSJFF.js} +36 -36
  231. package/chunks/{todoWrite-MHWHO5UO.js → todoWrite-UPVOHYGD.js} +4 -4
  232. package/chunks/{tool-search-SQTUSG6P.js → tool-search-2BFCGLI6.js} +13 -13
  233. package/chunks/{total-session-admission-XAXOSE46.js → total-session-admission-MK4SINFK.js} +41 -41
  234. package/chunks/{trustedFolders-Z2UAEG2V.js → trustedFolders-TJ5S26N7.js} +37 -37
  235. package/chunks/{update-relaunch-JBLI6LJF.js → update-relaunch-N7AYLARF.js} +6 -6
  236. package/chunks/{updateCheck-FDAVGOFT.js → updateCheck-QRZ3DVT5.js} +39 -39
  237. package/chunks/{useAutoAcceptIndicator-PDZFIYRM.js → useAutoAcceptIndicator-DBJ7Y5AF.js} +44 -44
  238. package/chunks/{validateNonInterActiveAuth-Q4763ONQ.js → validateNonInterActiveAuth-6ZQWUDS3.js} +72 -72
  239. package/chunks/{version-C7MPCGWD.js → version-AJQGQWXC.js} +1 -1
  240. package/chunks/{web-fetch-L7RAPOJB.js → web-fetch-QWJYRXFL.js} +13 -13
  241. package/chunks/{web-search-IDOYUOWX.js → web-search-2AOXJGHU.js} +9 -9
  242. package/chunks/web-shell-static-O73YPVVC.js +33 -0
  243. package/chunks/{workflow-HXURUJB5.js → workflow-ERH3SJG2.js} +36 -36
  244. package/chunks/{workspace-providers-status-JZ3GPWNU.js → workspace-providers-status-HZ474RA4.js} +44 -44
  245. package/chunks/{workspace-registration-store-SM2PWB6L.js → workspace-registration-store-6EUP4JXG.js} +1 -1
  246. package/chunks/{workspace-registry-6W4ES7BJ.js → workspace-registry-R4APRRNC.js} +41 -41
  247. package/chunks/{workspace-service-V47ZFJRX.js → workspace-service-HFIFDMU7.js} +46 -46
  248. package/chunks/{workspace-skills-status-6ZQ45XKA.js → workspace-skills-status-HAHEIHGK.js} +42 -42
  249. package/chunks/{workspace-trust-reconciler-6V25LMCN.js → workspace-trust-reconciler-65GTAGDK.js} +50 -50
  250. package/chunks/{write-file-H2QOF25K.js → write-file-B34CDELV.js} +35 -35
  251. package/chunks/{zoom-image-JTUSS43N.js → zoom-image-HPRBZHSS.js} +10 -10
  252. package/cli.js +15 -15
  253. package/package.json +3 -3
  254. package/web-shell/assets/{arc-DtI1rZcQ.js → arc-Ip-FFDJ0.js} +1 -1
  255. package/web-shell/assets/{architectureDiagram-3BPJPVTR-BPZwSVct.js → architectureDiagram-3BPJPVTR-CChqgwIb.js} +1 -1
  256. package/web-shell/assets/{blockDiagram-GPEHLZMM-BIQ03j4C.js → blockDiagram-GPEHLZMM-BHN-Tfss.js} +1 -1
  257. package/web-shell/assets/{c4Diagram-AAUBKEIU-CB0RyFGm.js → c4Diagram-AAUBKEIU-BhyjzDjN.js} +1 -1
  258. package/web-shell/assets/channel-Cu8qd6OB.js +1 -0
  259. package/web-shell/assets/{chunk-2J33WTMH-B3WoS-4H.js → chunk-2J33WTMH-BB9eyHrx.js} +1 -1
  260. package/web-shell/assets/{chunk-4BX2VUAB-C98xYZ1X.js → chunk-4BX2VUAB-BeV7ce_J.js} +1 -1
  261. package/web-shell/assets/{chunk-55IACEB6-CbTIWRwQ.js → chunk-55IACEB6-DO7kXDiV.js} +1 -1
  262. package/web-shell/assets/{chunk-727SXJPM-DWGnKTPu.js → chunk-727SXJPM-B27MPznD.js} +1 -1
  263. package/web-shell/assets/{chunk-AQP2D5EJ-4__QyCEX.js → chunk-AQP2D5EJ-DHIjqjD_.js} +1 -1
  264. package/web-shell/assets/{chunk-FMBD7UC4-DFtG1YCW.js → chunk-FMBD7UC4-DabMqyN2.js} +1 -1
  265. package/web-shell/assets/{chunk-ND2GUHAM-rvAhW51N.js → chunk-ND2GUHAM-Dw7Nnnxc.js} +1 -1
  266. package/web-shell/assets/{chunk-QZHKN3VN-DfiU9pwZ.js → chunk-QZHKN3VN-DdaZew1Q.js} +1 -1
  267. package/web-shell/assets/classDiagram-4FO5ZUOK-BI3KrXhq.js +1 -0
  268. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-BI3KrXhq.js +1 -0
  269. package/web-shell/assets/{cose-bilkent-S5V4N54A-Cc4EIdxu.js → cose-bilkent-S5V4N54A-CgBpCYH5.js} +1 -1
  270. package/web-shell/assets/{dagre-BM42HDAG-CZNj4dGW.js → dagre-BM42HDAG-BB4IU8G0.js} +1 -1
  271. package/web-shell/assets/{diagram-2AECGRRQ-D5tiqQCr.js → diagram-2AECGRRQ-BcUTHU37.js} +1 -1
  272. package/web-shell/assets/{diagram-5GNKFQAL-pwzw0jVO.js → diagram-5GNKFQAL-B6Lyihyv.js} +1 -1
  273. package/web-shell/assets/{diagram-KO2AKTUF-4CWiM00x.js → diagram-KO2AKTUF-CRIJOjpG.js} +1 -1
  274. package/web-shell/assets/{diagram-LMA3HP47-Dd7rc7Qf.js → diagram-LMA3HP47-DdNiwWWT.js} +1 -1
  275. package/web-shell/assets/{diagram-OG6HWLK6-_vzV52ml.js → diagram-OG6HWLK6-Dz4b32Do.js} +1 -1
  276. package/web-shell/assets/{erDiagram-TEJ5UH35-CqbE2bx_.js → erDiagram-TEJ5UH35-D-8NGw77.js} +1 -1
  277. package/web-shell/assets/{flowDiagram-I6XJVG4X-CaxNr7w4.js → flowDiagram-I6XJVG4X-Dun26LyM.js} +1 -1
  278. package/web-shell/assets/{ganttDiagram-6RSMTGT7-AGjrtfUA.js → ganttDiagram-6RSMTGT7-F10Hu1Gc.js} +1 -1
  279. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-ADG2zSkc.js → gitGraphDiagram-PVQCEYII-Bf8Ez6-D.js} +1 -1
  280. package/web-shell/assets/{index-BOryKCqt.js → index-BXqw-nGq.js} +1 -1
  281. package/web-shell/assets/index-QQlUCJGg.css +5 -0
  282. package/web-shell/assets/index-hcgjV7vS.js +1768 -0
  283. package/web-shell/assets/{infoDiagram-5YYISTIA-CE3B_IoZ.js → infoDiagram-5YYISTIA-DVgTMLvj.js} +1 -1
  284. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-CN-Frhoi.js → ishikawaDiagram-YF4QCWOH-uT-KepvK.js} +1 -1
  285. package/web-shell/assets/{journeyDiagram-JHISSGLW-CGgezS93.js → journeyDiagram-JHISSGLW-Vg_XadQf.js} +1 -1
  286. package/web-shell/assets/{kanban-definition-UN3LZRKU-BqWijky5.js → kanban-definition-UN3LZRKU-Dyv1ESBE.js} +1 -1
  287. package/web-shell/assets/{linear-D8sfpZf6.js → linear-BMIepYX3.js} +1 -1
  288. package/web-shell/assets/{mermaid.core-3PA4QrzM.js → mermaid.core-zA8pJ9ag.js} +5 -5
  289. package/web-shell/assets/{mindmap-definition-RKZ34NQL-D9QxwiCY.js → mindmap-definition-RKZ34NQL-BCW_BZ_5.js} +1 -1
  290. package/web-shell/assets/{pieDiagram-4H26LBE5-Bioaf6uE.js → pieDiagram-4H26LBE5-DseNEGp2.js} +1 -1
  291. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-DBb2AS73.js → quadrantDiagram-W4KKPZXB-6Z7wr1Fi.js} +1 -1
  292. package/web-shell/assets/{requirementDiagram-4Y6WPE33-DXOvZ3KB.js → requirementDiagram-4Y6WPE33-CVOlCRPf.js} +1 -1
  293. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-D9qg09Dm.js → sankeyDiagram-5OEKKPKP-CGhgrUJZ.js} +1 -1
  294. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-DSAUIfpw.js → sequenceDiagram-3UESZ5HK-dlqmpLuQ.js} +1 -1
  295. package/web-shell/assets/{stateDiagram-AJRCARHV-BPZkzfQ3.js → stateDiagram-AJRCARHV-B9EW10Xb.js} +1 -1
  296. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-CJTZJJ5X.js +1 -0
  297. package/web-shell/assets/{timeline-definition-PNZ67QCA-UDaQp9sP.js → timeline-definition-PNZ67QCA-BBRh0mgZ.js} +1 -1
  298. package/web-shell/assets/{vennDiagram-CIIHVFJN-2ouhAnHO.js → vennDiagram-CIIHVFJN-B8Gs-REP.js} +1 -1
  299. package/web-shell/assets/{wardley-L42UT6IY-Cq_WEvTK.js → wardley-L42UT6IY-D_y80Ur7.js} +1 -1
  300. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-Dt24aXOM.js → wardleyDiagram-YWT4CUSO-D-CNfHJ-.js} +1 -1
  301. package/web-shell/assets/{xychartDiagram-2RQKCTM6-A5Xk2WCH.js → xychartDiagram-2RQKCTM6-DQ5CvELo.js} +1 -1
  302. package/web-shell/index.html +2 -2
  303. package/chunks/create-sub-session-MWUWNBM6.js +0 -401
  304. package/web-shell/assets/channel-vfbVFuM1.js +0 -1
  305. package/web-shell/assets/classDiagram-4FO5ZUOK-Cvr8atq3.js +0 -1
  306. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-Cvr8atq3.js +0 -1
  307. package/web-shell/assets/index-Cb1LjsCv.css +0 -5
  308. package/web-shell/assets/index-CvJDaIy8.js +0 -1756
  309. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-DInOqnhZ.js +0 -1
@@ -3,93 +3,16 @@
3
3
  import {
4
4
  buildPermissionSuggestions
5
5
  } from "./chunk-43T5WDQ7.js";
6
- import {
7
- startPostRenderPrefetches
8
- } from "./chunk-N47ZM2KI.js";
9
- import {
10
- stopAndGetCapturedInput
11
- } from "./chunk-KVUBYJDM.js";
12
- import {
13
- useAutoAcceptIndicator
14
- } from "./chunk-WXS647W5.js";
15
- import {
16
- classifyApiError,
17
- fireSessionDeleteHook
18
- } from "./chunk-P5Y23G2L.js";
19
6
  import {
20
7
  TUI_CHAT_RECORDING_FAILURE_MESSAGE,
21
8
  reportChatRecordingFailureToAdapter
22
- } from "./chunk-CJBRIJ7W.js";
23
- import {
24
- MAX_SUGGESTIONS_TO_SHOW,
25
- SESSION_MENTION_PREFIX,
26
- buildMcpResourceRef,
27
- buildMcpServerRef,
28
- buildSessionRef,
29
- getExtensionSuggestions,
30
- handleAtCommand,
31
- matchMcpServerPrefix,
32
- resolveAtCommandQuery,
33
- sanitizeDisplayText
34
- } from "./chunk-PQTK2FVO.js";
9
+ } from "./chunk-3NB7TSE2.js";
35
10
  import {
36
11
  StreamJsonOutputAdapter
37
- } from "./chunk-WIPQR44Y.js";
12
+ } from "./chunk-72LNFGUY.js";
38
13
  import {
39
- BuiltinCommandLoader,
40
- BundledSkillLoader,
41
- CommandService,
42
- DISPLAY_HOOK_EVENTS,
43
- FileCommandLoader,
44
- MAX_STACKED_SKILLS,
45
- McpPromptLoader,
46
- SavedWorkflowLoader,
47
- SkillCommandLoader,
48
- addConfigToMatcherGroup,
49
- appendUserPromptExpansionAdditionalContext,
50
- copyToClipboard,
51
- createEmptyHookEventInfo,
52
- dayKey,
53
- findMidInputSlashCommand,
54
- findSlashCommandTokens,
55
- formatApprovalModeDescription,
56
- formatApprovalModeName,
57
- formatUserPromptExpansionBlockedMessage,
58
- getAllConfigs,
59
- getBestSlashCommandMatch,
60
- getTranslatedSourceDisplayMap,
61
- hasBlockingBackgroundWork,
62
- hasSlashCommandPathSeparator,
63
- isAtCommand,
64
- isBtwCommand,
65
- isMidInputCompletableCommand,
66
- isSlashCommand,
67
- isStackedSkillCompletableCommand,
68
- isValidStackedSkillPrefix,
69
- normalizePartList,
70
- parseDayKey,
71
- parseSlashCommand,
72
- parseStackedSlashCommands,
73
- recordAutoSkillCommandUsage,
74
- refreshExtensionContentRuntime,
75
- resetBackgroundStateForSessionSwitch,
76
- serializeUserPromptExpansionPrompt,
77
- supportsMatchers
78
- } from "./chunk-QWUYFMAR.js";
79
- import {
80
- EXTENSION_RELOAD_FAILED_REASON,
81
- ExtensionRefreshState,
82
- appEvents,
83
- cleanupReviewWorktreeLeases,
84
- loadHierarchicalGeminiMemory
85
- } from "./chunk-XOZ2R6XI.js";
86
- import {
87
- disableKittyProtocol,
88
- isKittyProtocolEnabled,
89
- isKittyProtocolSupported,
90
- pushKittyProtocolFlags
91
- } from "./chunk-NYX53SV4.js";
92
- import "./chunk-ZH7G3A4U.js";
14
+ startPostRenderPrefetches
15
+ } from "./chunk-OFI7IGST.js";
93
16
  import {
94
17
  AboutBox,
95
18
  BaseSelectionList,
@@ -167,21 +90,113 @@ import {
167
90
  useUIActions,
168
91
  useUIState,
169
92
  useVirtualViewport
170
- } from "./chunk-SPUDIAHX.js";
93
+ } from "./chunk-6UWFTUQL.js";
94
+ import {
95
+ GeminiRespondingSpinner,
96
+ GeminiSpinner,
97
+ ICON,
98
+ SCREEN_READER_USER_PREFIX,
99
+ SHELL_COMMAND_NAME,
100
+ StreamingContext,
101
+ applyCollapsePolicyAndSummary,
102
+ buildResumedHistoryItems,
103
+ build_default,
104
+ expandCollapsedHistory,
105
+ isCollapsibleTool,
106
+ shouldDisplayGoalStateCause,
107
+ useStreamingContext,
108
+ waitForGoalRuntime
109
+ } from "./chunk-OH2VKQXH.js";
110
+ import {
111
+ stopAndGetCapturedInput
112
+ } from "./chunk-TZEZYNYD.js";
113
+ import {
114
+ useAutoAcceptIndicator
115
+ } from "./chunk-23RZCH76.js";
171
116
  import {
172
117
  KeypressProvider,
173
118
  useFocus,
174
119
  useKeypress,
175
120
  useKeypressContext
176
- } from "./chunk-Z5S6KH2B.js";
121
+ } from "./chunk-MAJS7AT4.js";
122
+ import {
123
+ classifyApiError,
124
+ fireSessionDeleteHook
125
+ } from "./chunk-P5Y23G2L.js";
126
+ import {
127
+ MAX_SUGGESTIONS_TO_SHOW,
128
+ SESSION_MENTION_PREFIX,
129
+ buildMcpResourceRef,
130
+ buildMcpServerRef,
131
+ buildSessionRef,
132
+ getExtensionSuggestions,
133
+ handleAtCommand,
134
+ matchMcpServerPrefix,
135
+ resolveAtCommandQuery,
136
+ sanitizeDisplayText
137
+ } from "./chunk-KR4ZSC7K.js";
138
+ import {
139
+ BuiltinCommandLoader,
140
+ BundledSkillLoader,
141
+ CommandService,
142
+ DISPLAY_HOOK_EVENTS,
143
+ FileCommandLoader,
144
+ MAX_STACKED_SKILLS,
145
+ McpPromptLoader,
146
+ SavedWorkflowLoader,
147
+ SkillCommandLoader,
148
+ addConfigToMatcherGroup,
149
+ appendUserPromptExpansionAdditionalContext,
150
+ copyToClipboard,
151
+ createEmptyHookEventInfo,
152
+ dayKey,
153
+ findMidInputSlashCommand,
154
+ findSlashCommandTokens,
155
+ formatApprovalModeDescription,
156
+ formatApprovalModeName,
157
+ formatUserPromptExpansionBlockedMessage,
158
+ getAllConfigs,
159
+ getBestSlashCommandMatch,
160
+ getTranslatedSourceDisplayMap,
161
+ hasBlockingBackgroundWork,
162
+ hasSlashCommandPathSeparator,
163
+ isAtCommand,
164
+ isBtwCommand,
165
+ isMidInputCompletableCommand,
166
+ isSlashCommand,
167
+ isStackedSkillCompletableCommand,
168
+ isValidStackedSkillPrefix,
169
+ normalizePartList,
170
+ parseDayKey,
171
+ parseSlashCommand,
172
+ parseStackedSlashCommands,
173
+ recordAutoSkillCommandUsage,
174
+ refreshExtensionContentRuntime,
175
+ resetBackgroundStateForSessionSwitch,
176
+ serializeUserPromptExpansionPrompt,
177
+ supportsMatchers
178
+ } from "./chunk-RUL4S3K3.js";
179
+ import {
180
+ EXTENSION_RELOAD_FAILED_REASON,
181
+ ExtensionRefreshState,
182
+ appEvents,
183
+ cleanupReviewWorktreeLeases,
184
+ loadHierarchicalGeminiMemory
185
+ } from "./chunk-KKJJB5X6.js";
177
186
  import {
178
187
  getCommandDisplayName,
179
188
  getCommandSourceBadge
180
- } from "./chunk-IISDPZ5X.js";
189
+ } from "./chunk-QETYKPMG.js";
181
190
  import {
182
191
  computeSessionStats,
183
192
  levelLabel
184
- } from "./chunk-AVDEBBMI.js";
193
+ } from "./chunk-RNVQB725.js";
194
+ import {
195
+ disableKittyProtocol,
196
+ isKittyProtocolEnabled,
197
+ isKittyProtocolSupported,
198
+ pushKittyProtocolFlags
199
+ } from "./chunk-NYX53SV4.js";
185
200
  import {
186
201
  BEL,
187
202
  OSC_PREFIX,
@@ -194,32 +209,19 @@ import {
194
209
  oscKittyNotify,
195
210
  saveClipboardImage,
196
211
  writeOsc52
197
- } from "./chunk-3LGZEYOF.js";
212
+ } from "./chunk-YHEEE624.js";
213
+ import "./chunk-SCI7K3GM.js";
198
214
  import "./chunk-4WGODMVR.js";
215
+ import "./chunk-TLV2IMHR.js";
216
+ import "./chunk-KW7NOTN6.js";
199
217
  import {
200
218
  MaxSizedBox,
201
219
  OverflowProvider,
202
220
  useOverflowState
203
- } from "./chunk-LBWNSLJK.js";
204
- import {
205
- GeminiRespondingSpinner,
206
- GeminiSpinner,
207
- ICON,
208
- SCREEN_READER_USER_PREFIX,
209
- SHELL_COMMAND_NAME,
210
- StreamingContext,
211
- applyCollapsePolicyAndSummary,
212
- buildResumedHistoryItems,
213
- build_default,
214
- expandCollapsedHistory,
215
- isCollapsibleTool,
216
- shouldDisplayGoalStateCause,
217
- useStreamingContext,
218
- waitForGoalRuntime
219
- } from "./chunk-DBIEZC7T.js";
221
+ } from "./chunk-ONSZH6VM.js";
220
222
  import {
221
223
  theme
222
- } from "./chunk-U25CMJYY.js";
224
+ } from "./chunk-EKPKKXY2.js";
223
225
  import {
224
226
  require_jsx_runtime
225
227
  } from "./chunk-SV5PQVQE.js";
@@ -240,36 +242,40 @@ import {
240
242
  import {
241
243
  require_react
242
244
  } from "./chunk-5QWWOFGG.js";
243
- import "./chunk-2AGOQ7QO.js";
245
+ import "./chunk-Y4EWSQF7.js";
246
+ import "./chunk-7UFKAV7Y.js";
247
+ import {
248
+ MAX_INLINE_IMAGES_PER_ITEM,
249
+ collectInlineImages,
250
+ getInlineImageData
251
+ } from "./chunk-2VSTGY6M.js";
244
252
  import {
245
253
  relaunchApp
246
- } from "./chunk-CXYBX4AL.js";
254
+ } from "./chunk-HQB2KUAN.js";
247
255
  import {
248
256
  setUpdateHandler
249
- } from "./chunk-4E5PO6R7.js";
250
- import "./chunk-AFZTZLFB.js";
257
+ } from "./chunk-LEMXGVEP.js";
258
+ import "./chunk-GSS34377.js";
251
259
  import "./chunk-YAF2MQZ6.js";
252
- import "./chunk-XKTCA6BW.js";
253
260
  import {
254
261
  AUTO_THEME_NAME,
255
262
  DEFAULT_THEME,
256
263
  themeManager
257
- } from "./chunk-KKN2IE7Q.js";
258
- import "./chunk-KW7NOTN6.js";
259
- import "./chunk-WPKIU4PA.js";
264
+ } from "./chunk-CTJLZLB5.js";
265
+ import "./chunk-CB2464BK.js";
260
266
  import "./chunk-6H67XLET.js";
261
- import "./chunk-BU4BRCPX.js";
267
+ import "./chunk-FPM27XN4.js";
262
268
  import {
263
269
  getErrorMessage as getErrorMessage2
264
- } from "./chunk-EHMN6SEG.js";
265
- import "./chunk-FDV3CXTD.js";
270
+ } from "./chunk-TDXGKHDN.js";
266
271
  import {
267
272
  openQwenAsrRealtimeStream,
268
273
  openVoiceStream,
269
274
  openVoiceStreamWithRetry
270
- } from "./chunk-GTM6IHBB.js";
271
- import "./chunk-EKWNNQQD.js";
272
- import "./chunk-DYA25Y7U.js";
275
+ } from "./chunk-Q3JQ7OSU.js";
276
+ import "./chunk-6XJMFJ4D.js";
277
+ import "./chunk-OWMAZHIX.js";
278
+ import "./chunk-KXSDEOFU.js";
273
279
  import {
274
280
  cpLen,
275
281
  cpSlice,
@@ -282,7 +288,6 @@ import {
282
288
  stripUnsafeCharacters,
283
289
  toCodePoints
284
290
  } from "./chunk-4NFY2S7N.js";
285
- import "./chunk-NAYPZ72V.js";
286
291
  import {
287
292
  stringWidth
288
293
  } from "./chunk-2MIN6GRR.js";
@@ -293,65 +298,65 @@ import {
293
298
  import "./chunk-3Z43GZUQ.js";
294
299
  import "./chunk-RXFQM6FQ.js";
295
300
  import "./chunk-HGCQ5SE7.js";
301
+ import {
302
+ isInlineModelOverrideAllowed
303
+ } from "./chunk-CSZEXZBE.js";
296
304
  import {
297
305
  assertVoiceBaseUrlNetworkAllowed,
298
306
  isKeytermEcho,
299
307
  isStreamingVoiceModel,
300
308
  resolveVoiceStreamConfig,
301
309
  transcribeVoiceAudio
302
- } from "./chunk-HKNSU4WX.js";
310
+ } from "./chunk-AE77C5ZU.js";
303
311
  import {
304
312
  formatUnsupportedVoiceModelMessage,
305
313
  isSelectableVoiceModel
306
- } from "./chunk-7FUVSN4D.js";
307
- import "./chunk-JELIWHXD.js";
314
+ } from "./chunk-55LYDVPU.js";
315
+ import "./chunk-AOHJKPKL.js";
308
316
  import {
309
317
  computeWorkspaceSkillListUpdates,
310
318
  resolveSkillSettings,
311
319
  skillSettingStrings
312
320
  } from "./chunk-Z4X5MTRT.js";
313
- import "./chunk-CDHNGCJI.js";
321
+ import "./chunk-EUQTXRKZ.js";
314
322
  import {
315
323
  requestConsentInteractive,
316
324
  requestConsentOrFail
317
- } from "./chunk-C4GRKMUL.js";
325
+ } from "./chunk-OHJLEW5J.js";
318
326
  import "./chunk-57OAHC2Y.js";
319
327
  import {
320
328
  createLoadedSettingsAdapter
321
- } from "./chunk-3ZRS2XNY.js";
329
+ } from "./chunk-5KH532V7.js";
322
330
  import {
323
331
  getExtendedSystemInfo
324
- } from "./chunk-NYZAL2W2.js";
332
+ } from "./chunk-SPMY6CX6.js";
325
333
  import {
326
334
  formatDuration,
327
335
  formatRelativeTime,
328
336
  formatTokenCount
329
337
  } from "./chunk-3SH53ANB.js";
330
- import "./chunk-GLWP3FDB.js";
338
+ import "./chunk-MZSJ43WV.js";
331
339
  import "./chunk-XCGIMOLN.js";
332
- import {
333
- isInlineModelOverrideAllowed
334
- } from "./chunk-6KEN3RIC.js";
335
- import "./chunk-7GYP5COR.js";
340
+ import "./chunk-ZXU5UHMI.js";
336
341
  import "./chunk-VWOVHOTT.js";
337
- import "./chunk-DTAPI453.js";
342
+ import "./chunk-IUFV6FYU.js";
338
343
  import "./chunk-V6WHFGST.js";
339
344
  import "./chunk-DP3IHZGG.js";
340
345
  import "./chunk-6PLDPT2C.js";
341
346
  import "./chunk-FYJ7W2PI.js";
342
- import "./chunk-QONSRAEV.js";
347
+ import "./chunk-YP5KH5Y7.js";
343
348
  import "./chunk-24ER7UV4.js";
344
349
  import "./chunk-ALMR3E6Q.js";
345
- import "./chunk-BK2UNYWD.js";
350
+ import "./chunk-HIBNSEJE.js";
346
351
  import "./chunk-BKHCW2BI.js";
347
352
  import "./chunk-M5GB774H.js";
348
- import "./chunk-XC2VAFVZ.js";
353
+ import "./chunk-UVX4Y6IN.js";
349
354
  import "./chunk-WUC6ZFXO.js";
350
355
  import "./chunk-DIEFUBV6.js";
351
356
  import "./chunk-UDXSXLER.js";
352
357
  import {
353
358
  loadMcpApprovals
354
- } from "./chunk-T4XY5CT4.js";
359
+ } from "./chunk-6HVUFDS2.js";
355
360
  import {
356
361
  CORRUPTED_SUFFIX,
357
362
  SettingScope,
@@ -374,7 +379,7 @@ import {
374
379
  settingExistsInScope,
375
380
  validateSettingValue,
376
381
  writeOutputLanguageAndRegisterPath
377
- } from "./chunk-YUVTZ4UH.js";
382
+ } from "./chunk-PQBHU2IA.js";
378
383
  import "./chunk-RKUWKYED.js";
379
384
  import "./chunk-GOXKNSDZ.js";
380
385
  import "./chunk-IDS7MSUP.js";
@@ -383,18 +388,18 @@ import {
383
388
  localizeToolDisplayName,
384
389
  t,
385
390
  ta
386
- } from "./chunk-546CDN6D.js";
387
- import "./chunk-IKXE3AAC.js";
391
+ } from "./chunk-DBOFL3LQ.js";
392
+ import "./chunk-VOARQPTA.js";
388
393
  import "./chunk-6PEXNQTX.js";
389
- import "./chunk-ZQL73PPE.js";
394
+ import "./chunk-HYRDKNUY.js";
390
395
  import {
391
396
  getCliVersion
392
- } from "./chunk-NKST54XA.js";
397
+ } from "./chunk-FZBZSYKU.js";
393
398
  import "./chunk-VJNBRRZG.js";
394
399
  import {
395
400
  isWorkspaceTrusted,
396
401
  loadTrustedFolders
397
- } from "./chunk-72DZPDH4.js";
402
+ } from "./chunk-6XU3PH66.js";
398
403
  import {
399
404
  require_strip_json_comments
400
405
  } from "./chunk-ALGGS7UH.js";
@@ -503,65 +508,65 @@ import {
503
508
  validateWorkflowName,
504
509
  watchRepoBranch,
505
510
  writeRuntimeStatus
506
- } from "./chunk-DOA7MCDY.js";
511
+ } from "./chunk-Y7E5LNLO.js";
507
512
  import "./chunk-GOFAQQZA.js";
508
513
  import "./chunk-5M6IDOMF.js";
509
514
  import "./chunk-TWPJO254.js";
510
515
  import "./chunk-H6XPXXMH.js";
511
- import "./chunk-Z7JILXGX.js";
512
- import "./chunk-I7JDGNG6.js";
513
- import "./chunk-A6SX5TAH.js";
514
- import "./chunk-33FNCQSY.js";
516
+ import "./chunk-CNIID3TV.js";
517
+ import "./chunk-MVUQRLOH.js";
518
+ import "./chunk-XCWO3SMQ.js";
519
+ import "./chunk-7MH4J33A.js";
515
520
  import "./chunk-6PVPNMXU.js";
516
521
  import {
517
522
  resolveModelId
518
- } from "./chunk-6D6V55ZQ.js";
523
+ } from "./chunk-RMH5OWLD.js";
519
524
  import "./chunk-IRH27ZC2.js";
520
525
  import "./chunk-QHWCP53L.js";
521
- import "./chunk-MOHAWIAW.js";
522
- import "./chunk-3PRJYMXC.js";
526
+ import "./chunk-GNPNYXJB.js";
527
+ import "./chunk-Y4NGLFGJ.js";
523
528
  import {
524
529
  promptIdContext
525
530
  } from "./chunk-O6GEWCJA.js";
526
531
  import "./chunk-T26EAKDL.js";
527
532
  import "./chunk-ZPJWUGCS.js";
528
533
  import "./chunk-CPBF7KYF.js";
529
- import "./chunk-MISUEWB4.js";
534
+ import "./chunk-J6SZID63.js";
530
535
  import "./chunk-KRXPRVGL.js";
531
536
  import {
532
537
  HOOKS_CONFIG_FIELDS
533
- } from "./chunk-A5YZ3FA2.js";
534
- import "./chunk-YAVY33G4.js";
535
- import "./chunk-2UISUFHQ.js";
538
+ } from "./chunk-GM463R2B.js";
539
+ import "./chunk-SEZ556DZ.js";
540
+ import "./chunk-CJXIIILK.js";
536
541
  import {
537
542
  elapsedActiveTime,
538
543
  goalRequiresExactPermit
539
- } from "./chunk-MBEMTXQT.js";
544
+ } from "./chunk-3K7FH2KQ.js";
540
545
  import {
541
546
  APPROVAL_MODES,
542
547
  runOutsideAgentContext
543
- } from "./chunk-6WBWIPBF.js";
548
+ } from "./chunk-BVWVWGLE.js";
544
549
  import "./chunk-S6LOFUVP.js";
545
550
  import {
546
551
  getStartupContextLength,
547
552
  isSystemReminderContent
548
- } from "./chunk-WVAESIM6.js";
553
+ } from "./chunk-LZC3B5N2.js";
549
554
  import "./chunk-K623ENWT.js";
550
555
  import "./chunk-AQ37AY7B.js";
551
556
  import {
552
557
  isPathWithinRoot
553
- } from "./chunk-432XCUHF.js";
554
- import "./chunk-HU5TUALO.js";
558
+ } from "./chunk-EQL65XGA.js";
559
+ import "./chunk-IIJEYBNH.js";
555
560
  import {
556
561
  osc8Hyperlink,
557
562
  qwenOAuth2Events,
558
563
  sanitizeForOsc,
559
564
  supportsHyperlinks,
560
565
  wrapForMultiplexer
561
- } from "./chunk-XC656O42.js";
566
+ } from "./chunk-22NBYCPD.js";
562
567
  import "./chunk-NAVJD2PQ.js";
563
- import "./chunk-QYPT3QUD.js";
564
- import "./chunk-QMBEW7EW.js";
568
+ import "./chunk-3ULCB3NE.js";
569
+ import "./chunk-BGG4MBYD.js";
565
570
  import {
566
571
  REASONING_EFFORT_TIERS
567
572
  } from "./chunk-DGEIYUC3.js";
@@ -569,15 +574,15 @@ import {
569
574
  getUnsupportedImageFormatWarning,
570
575
  isSupportedImageMimeType
571
576
  } from "./chunk-MPHPFVKK.js";
572
- import "./chunk-GLNBDYUX.js";
577
+ import "./chunk-AXMWHKXA.js";
573
578
  import "./chunk-DJ2GSRLV.js";
574
- import "./chunk-AU3XNTMV.js";
575
- import "./chunk-MGSSJT27.js";
579
+ import "./chunk-33ACCIIY.js";
580
+ import "./chunk-L4N6TIP7.js";
576
581
  import "./chunk-2J3OJGTL.js";
577
582
  import "./chunk-P3QQPMQA.js";
578
- import "./chunk-6O5DVH27.js";
583
+ import "./chunk-M6HMMKVG.js";
579
584
  import "./chunk-GLCZKT5V.js";
580
- import "./chunk-2DNKEBXY.js";
585
+ import "./chunk-EI3HZX6C.js";
581
586
  import {
582
587
  ApiCancelEvent,
583
588
  AuthEvent,
@@ -618,7 +623,7 @@ import {
618
623
  runVisionBridge,
619
624
  shouldRunVisionBridge,
620
625
  splitImageParts
621
- } from "./chunk-O656RSMC.js";
626
+ } from "./chunk-2U3WZGZG.js";
622
627
  import "./chunk-WOJZWRAZ.js";
623
628
  import "./chunk-VGC4I5JJ.js";
624
629
  import {
@@ -627,25 +632,25 @@ import {
627
632
  getAutoMemoryRoot,
628
633
  getUserAutoMemoryRoot,
629
634
  isAnyAutoMemPath
630
- } from "./chunk-E4WHKETF.js";
631
- import "./chunk-ZPPP6VCL.js";
635
+ } from "./chunk-FVKHVJZQ.js";
636
+ import "./chunk-NG2R4N5O.js";
632
637
  import {
633
638
  ToolNames,
634
639
  isShellProgressData
635
- } from "./chunk-D7D7RXIJ.js";
640
+ } from "./chunk-IC4Z6LX6.js";
636
641
  import {
637
642
  MAINLINE_CODER_MODEL
638
- } from "./chunk-P7LKADIT.js";
643
+ } from "./chunk-6EOI4HOK.js";
639
644
  import "./chunk-46UV252V.js";
640
645
  import {
641
646
  DEFAULT_TOKEN_LIMIT
642
647
  } from "./chunk-ZBVS26BY.js";
643
- import "./chunk-BFHXDAR7.js";
644
- import "./chunk-TYERNYH4.js";
648
+ import "./chunk-KKBPOU75.js";
649
+ import "./chunk-EUNWC2VS.js";
645
650
  import {
646
651
  atomicWriteFileSync
647
- } from "./chunk-UH7Z7Y45.js";
648
- import "./chunk-5L6CQ4ZU.js";
652
+ } from "./chunk-FOGU3LJX.js";
653
+ import "./chunk-6M26GBKX.js";
649
654
  import "./chunk-W4RQUHY3.js";
650
655
  import "./chunk-LKRMNRSN.js";
651
656
  import {
@@ -659,9 +664,9 @@ import {
659
664
  isNodeError,
660
665
  shortenPath,
661
666
  tildeifyPath
662
- } from "./chunk-3RXUYQJI.js";
667
+ } from "./chunk-OIVKILPI.js";
663
668
  import "./chunk-VOQXFAY5.js";
664
- import "./chunk-WVRJKSIG.js";
669
+ import "./chunk-PJOBIWUG.js";
665
670
  import {
666
671
  finalizeStartupProfile,
667
672
  profileCheckpoint
@@ -670,12 +675,12 @@ import "./chunk-Q7YDKOGY.js";
670
675
  import {
671
676
  registerCleanup,
672
677
  runExitCleanup
673
- } from "./chunk-QG2ACINA.js";
678
+ } from "./chunk-EORNAQDT.js";
674
679
  import {
675
680
  clearScreen,
676
681
  writeStderrLine,
677
682
  writeStderrLineSafe
678
- } from "./chunk-OWAK7LMW.js";
683
+ } from "./chunk-KGJGEEVR.js";
679
684
  import "./chunk-75DOP5OR.js";
680
685
  import "./chunk-DMTGGOSA.js";
681
686
  import "./chunk-YQ3U5MUC.js";
@@ -33892,7 +33897,14 @@ function deriveFirstPrompt(messages) {
33892
33897
  }
33893
33898
  __name(deriveFirstPrompt, "deriveFirstPrompt");
33894
33899
  function useBranchCommand(options) {
33895
- const { config, historyManager, startNewSession, setSessionName, remount } = options;
33900
+ const {
33901
+ config,
33902
+ historyManager,
33903
+ startNewSession,
33904
+ clearPendingState,
33905
+ setSessionName,
33906
+ remount
33907
+ } = options;
33896
33908
  const handleBranch = (0, import_react125.useCallback)(
33897
33909
  async (name) => {
33898
33910
  if (!config) return;
@@ -33957,6 +33969,7 @@ function useBranchCommand(options) {
33957
33969
  collapsePreviewCount
33958
33970
  );
33959
33971
  startNewSession(newSessionId);
33972
+ clearPendingState?.();
33960
33973
  historyManager.clearItems();
33961
33974
  historyManager.loadHistory(uiHistoryItems);
33962
33975
  uiSwapped = true;
@@ -34016,6 +34029,7 @@ function useBranchCommand(options) {
34016
34029
  config,
34017
34030
  historyManager,
34018
34031
  startNewSession,
34032
+ clearPendingState,
34019
34033
  setSessionName,
34020
34034
  remount,
34021
34035
  options.settings.merged.ui?.history?.collapseOnResume,
@@ -34049,6 +34063,7 @@ function useResumeCommand(options) {
34049
34063
  settings,
34050
34064
  historyManager,
34051
34065
  startNewSession,
34066
+ clearPendingState,
34052
34067
  setSessionName,
34053
34068
  remount
34054
34069
  } = options;
@@ -34113,6 +34128,7 @@ function useResumeCommand(options) {
34113
34128
  }
34114
34129
  startNewSession(sessionId);
34115
34130
  setSessionName?.(customTitle ?? null);
34131
+ clearPendingState?.();
34116
34132
  clearItems();
34117
34133
  loadHistory(uiHistoryItems);
34118
34134
  if (recoveredBackgroundAgentsNotice) {
@@ -34157,6 +34173,7 @@ function useResumeCommand(options) {
34157
34173
  clearItems,
34158
34174
  loadHistory,
34159
34175
  startNewSession,
34176
+ clearPendingState,
34160
34177
  setSessionName,
34161
34178
  remount,
34162
34179
  settings.merged.ui?.history?.collapseOnResume,
@@ -34661,11 +34678,13 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history
34661
34678
  addItem,
34662
34679
  clear: /* @__PURE__ */ __name(() => {
34663
34680
  cancelBtw();
34681
+ actions.clearPendingState();
34664
34682
  clearItems();
34665
34683
  clearScreen();
34666
34684
  refreshStatic();
34667
34685
  setSessionName?.(null);
34668
34686
  }, "clear"),
34687
+ clearPendingState: actions.clearPendingState,
34669
34688
  loadHistory,
34670
34689
  refreshStatic,
34671
34690
  setDebugMessage: actions.setDebugMessage,
@@ -36158,8 +36177,9 @@ function mapToDisplay(toolOrTools, projectRoot) {
36158
36177
  projectRoot
36159
36178
  ) : void 0
36160
36179
  };
36180
+ const inlineImageCollection = trackedCall.status === "success" || trackedCall.status === "error" || trackedCall.status === "cancelled" ? collectInlineImages(trackedCall.response.responseParts) : null;
36161
36181
  switch (trackedCall.status) {
36162
- case "success":
36182
+ case "success": {
36163
36183
  return {
36164
36184
  ...baseDisplayProperties,
36165
36185
  status: mapCoreStatusToDisplayStatus(trackedCall.status),
@@ -36179,9 +36199,15 @@ function mapToDisplay(toolOrTools, projectRoot) {
36179
36199
  // that the renderer would never use. Mirrors ToolMessage's
36180
36200
  // `usingDetailedDisplay` gate, which also keys off the display name.
36181
36201
  detailedDisplay: isCollapsibleTool(displayName) ? getToolResponseDisplayText(trackedCall.response.responseParts) : void 0,
36202
+ ...inlineImageCollection?.images.length ? { images: inlineImageCollection.images } : {},
36203
+ ...inlineImageCollection?.omittedImageCount ? {
36204
+ omittedImageCount: inlineImageCollection.omittedImageCount
36205
+ } : {},
36182
36206
  confirmationDetails: void 0
36183
36207
  };
36208
+ }
36184
36209
  case "error":
36210
+ case "cancelled": {
36185
36211
  return {
36186
36212
  ...baseDisplayProperties,
36187
36213
  status: mapCoreStatusToDisplayStatus(trackedCall.status),
@@ -36191,20 +36217,13 @@ function mapToDisplay(toolOrTools, projectRoot) {
36191
36217
  ...trackedCall.response.visionBridgeNotice !== void 0 ? {
36192
36218
  visionBridgeNotice: trackedCall.response.visionBridgeNotice
36193
36219
  } : {},
36194
- confirmationDetails: void 0
36195
- };
36196
- case "cancelled":
36197
- return {
36198
- ...baseDisplayProperties,
36199
- status: mapCoreStatusToDisplayStatus(trackedCall.status),
36200
- resultDisplay: compactToolResultDisplayForHistory(
36201
- trackedCall.response.resultDisplay
36202
- ),
36203
- ...trackedCall.response.visionBridgeNotice !== void 0 ? {
36204
- visionBridgeNotice: trackedCall.response.visionBridgeNotice
36220
+ ...inlineImageCollection?.images.length ? { images: inlineImageCollection.images } : {},
36221
+ ...inlineImageCollection?.omittedImageCount ? {
36222
+ omittedImageCount: inlineImageCollection.omittedImageCount
36205
36223
  } : {},
36206
36224
  confirmationDetails: void 0
36207
36225
  };
36226
+ }
36208
36227
  case "awaiting_approval":
36209
36228
  return {
36210
36229
  ...baseDisplayProperties,
@@ -36749,6 +36768,40 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
36749
36768
  }, [history]);
36750
36769
  const auxiliaryAbortRefsRef = (0, import_react135.useRef)(/* @__PURE__ */ new Set());
36751
36770
  const [pendingHistoryItem, pendingHistoryItemRef, setPendingHistoryItem] = useStateAndRef(null);
36771
+ const [
36772
+ pendingAssistantItems,
36773
+ pendingAssistantItemsRef,
36774
+ setPendingAssistantItems
36775
+ ] = useStateAndRef([]);
36776
+ const commitPendingAssistantItems = (0, import_react135.useCallback)(
36777
+ (userMessageTimestamp) => {
36778
+ const items = pendingAssistantItemsRef.current;
36779
+ if (items.length === 0) {
36780
+ return;
36781
+ }
36782
+ for (const item of items) {
36783
+ commitItem(item, userMessageTimestamp);
36784
+ }
36785
+ setPendingAssistantItems([]);
36786
+ },
36787
+ [commitItem, pendingAssistantItemsRef, setPendingAssistantItems]
36788
+ );
36789
+ const commitItemInOrder = (0, import_react135.useCallback)(
36790
+ (item, userMessageTimestamp) => {
36791
+ commitPendingAssistantItems(userMessageTimestamp);
36792
+ return commitItem(item, userMessageTimestamp);
36793
+ },
36794
+ [commitItem, commitPendingAssistantItems]
36795
+ );
36796
+ const stagePendingAssistantItem = (0, import_react135.useCallback)(() => {
36797
+ const item = pendingHistoryItemRef.current;
36798
+ if (item?.type !== "gemini" && item?.type !== "gemini_content") {
36799
+ return false;
36800
+ }
36801
+ setPendingAssistantItems((items) => [...items, item]);
36802
+ setPendingHistoryItem(null);
36803
+ return true;
36804
+ }, [pendingHistoryItemRef, setPendingAssistantItems, setPendingHistoryItem]);
36752
36805
  const [pendingThoughtItem, pendingThoughtItemRef, setPendingThoughtItem] = useStateAndRef(null);
36753
36806
  const thoughtStartTimeRef = (0, import_react135.useRef)(null);
36754
36807
  const [
@@ -36761,6 +36814,15 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
36761
36814
  pendingRetryCountdownItemRef,
36762
36815
  setPendingRetryCountdownItem
36763
36816
  ] = useStateAndRef(null);
36817
+ const clearPendingState = (0, import_react135.useCallback)(() => {
36818
+ setPendingAssistantItems([]);
36819
+ setPendingHistoryItem(null);
36820
+ setPendingRetryErrorItem(null);
36821
+ }, [
36822
+ setPendingAssistantItems,
36823
+ setPendingHistoryItem,
36824
+ setPendingRetryErrorItem
36825
+ ]);
36764
36826
  const retryCountdownTimerRef = (0, import_react135.useRef)(
36765
36827
  null
36766
36828
  );
@@ -36964,7 +37026,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
36964
37026
  );
36965
37027
  logApiCancel(config, cancellationEvent);
36966
37028
  if (pendingHistoryItemRef.current) {
36967
- commitItem(pendingHistoryItemRef.current, Date.now());
37029
+ commitItemInOrder(pendingHistoryItemRef.current, Date.now());
36968
37030
  }
36969
37031
  addItem(
36970
37032
  {
@@ -36999,7 +37061,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
36999
37061
  }, [
37000
37062
  streamingState,
37001
37063
  addItem,
37002
- commitItem,
37064
+ commitItemInOrder,
37003
37065
  setPendingHistoryItem,
37004
37066
  onCancelSubmit,
37005
37067
  pendingHistoryItemRef,
@@ -37232,7 +37294,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
37232
37294
  ]
37233
37295
  );
37234
37296
  const handleContentEvent = (0, import_react135.useCallback)(
37235
- (eventValue, currentGeminiMessageBuffer, userMessageTimestamp) => {
37297
+ (eventValue, currentGeminiMessageBuffer, userMessageTimestamp, startAsContinuation = false) => {
37236
37298
  if (turnCancelledRef.current) {
37237
37299
  return "";
37238
37300
  }
@@ -37240,21 +37302,29 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
37240
37302
  setIsReceivingContent(true);
37241
37303
  turnSawContentEventRef.current = true;
37242
37304
  let newGeminiMessageBuffer = currentGeminiMessageBuffer + eventValue;
37305
+ const pendingItem = pendingHistoryItemRef.current;
37306
+ if ((pendingItem?.type === "gemini" || pendingItem?.type === "gemini_content") && (pendingItem.images?.length || pendingItem.omittedImageCount)) {
37307
+ if (newGeminiMessageBuffer.trim().length === 0) {
37308
+ return newGeminiMessageBuffer;
37309
+ }
37310
+ stagePendingAssistantItem();
37311
+ }
37243
37312
  if (pendingHistoryItemRef.current?.type !== "gemini" && pendingHistoryItemRef.current?.type !== "gemini_content") {
37244
37313
  if (newGeminiMessageBuffer.trim().length === 0) {
37245
37314
  return newGeminiMessageBuffer;
37246
37315
  }
37247
37316
  if (pendingHistoryItemRef.current) {
37248
- commitItem(pendingHistoryItemRef.current, userMessageTimestamp);
37317
+ commitItemInOrder(
37318
+ pendingHistoryItemRef.current,
37319
+ userMessageTimestamp
37320
+ );
37249
37321
  }
37250
- setPendingHistoryItem({
37251
- type: "gemini",
37252
- text: "",
37253
- timestamp: Date.now()
37254
- });
37322
+ setPendingHistoryItem(
37323
+ startAsContinuation ? { type: "gemini_content", text: "" } : { type: "gemini", text: "", timestamp: Date.now() }
37324
+ );
37255
37325
  newGeminiMessageBuffer = stripLeadingBlankLines(newGeminiMessageBuffer);
37256
37326
  }
37257
- let nextPendingType = pendingHistoryItemRef.current?.type;
37327
+ let nextPendingType = pendingHistoryItemRef.current?.type === "gemini_content" ? "gemini_content" : pendingHistoryItemRef.current?.type === "gemini" ? "gemini" : startAsContinuation ? "gemini_content" : "gemini";
37258
37328
  while (newGeminiMessageBuffer.length > STREAM_PENDING_ITEM_MAX_CHARS) {
37259
37329
  const splitPoint = findLastSafeSplitPoint(
37260
37330
  newGeminiMessageBuffer,
@@ -37265,7 +37335,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
37265
37335
  newGeminiMessageBuffer,
37266
37336
  safeSplitPoint
37267
37337
  );
37268
- commitItem(
37338
+ commitItemInOrder(
37269
37339
  {
37270
37340
  type: nextPendingType,
37271
37341
  text: beforeText
@@ -37324,7 +37394,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
37324
37394
  newGeminiMessageBuffer,
37325
37395
  splitPoint
37326
37396
  );
37327
- commitItem(
37397
+ commitItemInOrder(
37328
37398
  {
37329
37399
  type: nextPendingType,
37330
37400
  text: beforeText
@@ -37347,9 +37417,10 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
37347
37417
  return newGeminiMessageBuffer;
37348
37418
  },
37349
37419
  [
37350
- commitItem,
37420
+ commitItemInOrder,
37351
37421
  pendingHistoryItemRef,
37352
37422
  setPendingHistoryItem,
37423
+ stagePendingAssistantItem,
37353
37424
  terminalWidth,
37354
37425
  terminalHeight,
37355
37426
  availableTerminalHeightRef,
@@ -37479,7 +37550,10 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
37479
37550
  };
37480
37551
  addItem(pendingItem, userMessageTimestamp);
37481
37552
  } else {
37482
- commitItem(pendingHistoryItemRef.current, userMessageTimestamp);
37553
+ commitItemInOrder(
37554
+ pendingHistoryItemRef.current,
37555
+ userMessageTimestamp
37556
+ );
37483
37557
  }
37484
37558
  setPendingHistoryItem(null);
37485
37559
  }
@@ -37494,7 +37568,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
37494
37568
  [
37495
37569
  addItem,
37496
37570
  commitPendingThought,
37497
- commitItem,
37571
+ commitItemInOrder,
37498
37572
  pendingHistoryItemRef,
37499
37573
  setPendingHistoryItem,
37500
37574
  setThought,
@@ -37510,7 +37584,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
37510
37584
  }
37511
37585
  commitPendingThought(userMessageTimestamp);
37512
37586
  if (pendingHistoryItemRef.current) {
37513
- commitItem(pendingHistoryItemRef.current, userMessageTimestamp);
37587
+ commitItemInOrder(pendingHistoryItemRef.current, userMessageTimestamp);
37514
37588
  setPendingHistoryItem(null);
37515
37589
  }
37516
37590
  const isShowingAutoRetry = retryCountdownTimerRef.current !== null;
@@ -37539,7 +37613,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
37539
37613
  },
37540
37614
  [
37541
37615
  commitPendingThought,
37542
- commitItem,
37616
+ commitItemInOrder,
37543
37617
  pendingHistoryItemRef,
37544
37618
  setPendingHistoryItem,
37545
37619
  setPendingRetryErrorItem,
@@ -37554,14 +37628,14 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
37554
37628
  return;
37555
37629
  }
37556
37630
  if (pendingHistoryItemRef.current) {
37557
- commitItem(pendingHistoryItemRef.current, userMessageTimestamp);
37631
+ commitItemInOrder(pendingHistoryItemRef.current, userMessageTimestamp);
37558
37632
  setPendingHistoryItem(null);
37559
37633
  }
37560
37634
  addItem({ type: "info" /* INFO */, text }, userMessageTimestamp);
37561
37635
  },
37562
37636
  [
37563
37637
  addItem,
37564
- commitItem,
37638
+ commitItemInOrder,
37565
37639
  pendingHistoryItemRef,
37566
37640
  setPendingHistoryItem,
37567
37641
  settings
@@ -37613,7 +37687,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
37613
37687
  (eventValue, userMessageTimestamp) => {
37614
37688
  autonomousLoopTickResolverRef.current?.resetCache();
37615
37689
  if (pendingHistoryItemRef.current) {
37616
- commitItem(pendingHistoryItemRef.current, userMessageTimestamp);
37690
+ commitItemInOrder(pendingHistoryItemRef.current, userMessageTimestamp);
37617
37691
  setPendingHistoryItem(null);
37618
37692
  }
37619
37693
  const activeModel = modelOverrideRef.current ?? config.getModel();
@@ -37628,7 +37702,13 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
37628
37702
  Date.now()
37629
37703
  );
37630
37704
  },
37631
- [addItem, commitItem, config, pendingHistoryItemRef, setPendingHistoryItem]
37705
+ [
37706
+ addItem,
37707
+ commitItemInOrder,
37708
+ config,
37709
+ pendingHistoryItemRef,
37710
+ setPendingHistoryItem
37711
+ ]
37632
37712
  );
37633
37713
  const handleMaxSessionTurnsEvent = (0, import_react135.useCallback)(
37634
37714
  () => addItem(
@@ -37687,7 +37767,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
37687
37767
  const handleUserPromptSubmitBlockedEvent = (0, import_react135.useCallback)(
37688
37768
  (value, userMessageTimestamp) => {
37689
37769
  if (pendingHistoryItemRef.current) {
37690
- commitItem(pendingHistoryItemRef.current, userMessageTimestamp);
37770
+ commitItemInOrder(pendingHistoryItemRef.current, userMessageTimestamp);
37691
37771
  setPendingHistoryItem(null);
37692
37772
  }
37693
37773
  addItem(
@@ -37699,12 +37779,12 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
37699
37779
  userMessageTimestamp
37700
37780
  );
37701
37781
  },
37702
- [addItem, commitItem, pendingHistoryItemRef, setPendingHistoryItem]
37782
+ [addItem, commitItemInOrder, pendingHistoryItemRef, setPendingHistoryItem]
37703
37783
  );
37704
37784
  const handleStopHookLoopEvent = (0, import_react135.useCallback)(
37705
37785
  (value, userMessageTimestamp) => {
37706
37786
  if (pendingHistoryItemRef.current) {
37707
- commitItem(pendingHistoryItemRef.current, userMessageTimestamp);
37787
+ commitItemInOrder(pendingHistoryItemRef.current, userMessageTimestamp);
37708
37788
  setPendingHistoryItem(null);
37709
37789
  }
37710
37790
  addItem(
@@ -37717,13 +37797,21 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
37717
37797
  userMessageTimestamp
37718
37798
  );
37719
37799
  },
37720
- [addItem, commitItem, pendingHistoryItemRef, setPendingHistoryItem]
37800
+ [addItem, commitItemInOrder, pendingHistoryItemRef, setPendingHistoryItem]
37721
37801
  );
37722
37802
  const processGeminiStreamEvents = (0, import_react135.useCallback)(
37723
37803
  async (stream, userMessageTimestamp, signal, submitType, turnAdmission) => {
37724
37804
  let geminiMessageBuffer = "";
37725
37805
  let thoughtBuffer = "";
37726
37806
  let scheduledToolContinuation = false;
37807
+ let assistantOutputStarted = pendingHistoryItemRef.current?.type === "gemini" || pendingHistoryItemRef.current?.type === "gemini_content";
37808
+ let assistantInlineImageCount = [
37809
+ ...pendingAssistantItemsRef.current,
37810
+ pendingHistoryItemRef.current
37811
+ ].reduce(
37812
+ (count, item) => item?.type === "gemini" || item?.type === "gemini_content" ? count + (item.images?.length ?? 0) : count,
37813
+ 0
37814
+ );
37727
37815
  const toolCallRequests = [];
37728
37816
  const bufferedEvents = [];
37729
37817
  let flushTimer = null;
@@ -37756,8 +37844,59 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
37756
37844
  geminiMessageBuffer = handleContentEvent(
37757
37845
  contentParts.join(""),
37758
37846
  geminiMessageBuffer,
37759
- userMessageTimestamp
37847
+ userMessageTimestamp,
37848
+ assistantOutputStarted
37760
37849
  );
37850
+ if (contentParts.some((part) => part.trim().length > 0)) {
37851
+ assistantOutputStarted = true;
37852
+ }
37853
+ continue;
37854
+ }
37855
+ if (nextEvent.kind === "image") {
37856
+ if (turnCancelledRef.current) {
37857
+ continue;
37858
+ }
37859
+ setIsReceivingContent(true);
37860
+ turnSawContentEventRef.current = true;
37861
+ const pendingItem = pendingHistoryItemRef.current;
37862
+ const isOverflowOnlyItem = (pendingItem?.type === "gemini" || pendingItem?.type === "gemini_content") && pendingItem.text.length === 0 && !pendingItem.images?.length && Boolean(pendingItem.omittedImageCount);
37863
+ const shouldDisplayImage = assistantInlineImageCount < MAX_INLINE_IMAGES_PER_ITEM;
37864
+ if (!shouldDisplayImage && isOverflowOnlyItem) {
37865
+ setPendingHistoryItem({
37866
+ ...pendingItem,
37867
+ omittedImageCount: (pendingItem.omittedImageCount ?? 0) + 1
37868
+ });
37869
+ geminiMessageBuffer = "";
37870
+ assistantOutputStarted = true;
37871
+ continue;
37872
+ }
37873
+ if (pendingHistoryItemRef.current) {
37874
+ if (!stagePendingAssistantItem()) {
37875
+ commitItemInOrder(
37876
+ pendingHistoryItemRef.current,
37877
+ userMessageTimestamp
37878
+ );
37879
+ setPendingHistoryItem(null);
37880
+ }
37881
+ }
37882
+ geminiMessageBuffer = "";
37883
+ if (shouldDisplayImage) {
37884
+ setPendingHistoryItem({
37885
+ type: assistantOutputStarted ? "gemini_content" : "gemini",
37886
+ text: "",
37887
+ images: [nextEvent.value],
37888
+ ...!assistantOutputStarted ? { timestamp: Date.now() } : {}
37889
+ });
37890
+ assistantInlineImageCount++;
37891
+ } else {
37892
+ setPendingHistoryItem({
37893
+ type: assistantOutputStarted ? "gemini_content" : "gemini",
37894
+ text: "",
37895
+ omittedImageCount: 1,
37896
+ ...!assistantOutputStarted ? { timestamp: Date.now() } : {}
37897
+ });
37898
+ }
37899
+ assistantOutputStarted = true;
37761
37900
  continue;
37762
37901
  }
37763
37902
  let subject = nextEvent.value.subject;
@@ -37808,16 +37947,31 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
37808
37947
  scheduleBufferedStreamFlush();
37809
37948
  }
37810
37949
  break;
37811
- case "content" /* Content */:
37950
+ case "content" /* Content */: {
37812
37951
  if (pendingThoughtItemRef.current || bufferedEvents.some((e) => e.kind === "thought")) {
37813
37952
  flushBufferedStreamEvents();
37814
37953
  commitPendingThought(userMessageTimestamp);
37815
37954
  thoughtBuffer = "";
37816
37955
  }
37817
37956
  setThought((prev) => prev ? null : prev);
37818
- bufferedEvents.push({ kind: "content", value: event.value });
37957
+ const displayParts = event.parts ?? [{ text: event.value }];
37958
+ for (const part of displayParts) {
37959
+ if ("text" in part) {
37960
+ if (part.text.length > 0) {
37961
+ bufferedEvents.push({ kind: "content", value: part.text });
37962
+ }
37963
+ } else {
37964
+ const image = getInlineImageData({
37965
+ inlineData: part.inlineData
37966
+ });
37967
+ if (image) {
37968
+ bufferedEvents.push({ kind: "image", value: image });
37969
+ }
37970
+ }
37971
+ }
37819
37972
  scheduleBufferedStreamFlush();
37820
37973
  break;
37974
+ }
37821
37975
  case "tool_call_request" /* ToolCallRequest */:
37822
37976
  flushBufferedStreamEvents();
37823
37977
  commitPendingThought(userMessageTimestamp);
@@ -37853,6 +38007,8 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
37853
38007
  case "chat_compressed" /* ChatCompressed */:
37854
38008
  flushBufferedStreamEvents();
37855
38009
  handleChatCompressionEvent(event.value, userMessageTimestamp);
38010
+ geminiMessageBuffer = "";
38011
+ assistantOutputStarted = false;
37856
38012
  break;
37857
38013
  case "tool_call_confirmation" /* ToolCallConfirmation */:
37858
38014
  case "tool_call_response" /* ToolCallResponse */:
@@ -37860,30 +38016,57 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
37860
38016
  break;
37861
38017
  case "max_session_turns" /* MaxSessionTurns */:
37862
38018
  flushBufferedStreamEvents();
38019
+ if (pendingHistoryItemRef.current) {
38020
+ commitItemInOrder(
38021
+ pendingHistoryItemRef.current,
38022
+ userMessageTimestamp
38023
+ );
38024
+ setPendingHistoryItem(null);
38025
+ }
37863
38026
  handleMaxSessionTurnsEvent();
38027
+ geminiMessageBuffer = "";
38028
+ assistantOutputStarted = false;
37864
38029
  break;
37865
38030
  case "session_token_limit_exceeded" /* SessionTokenLimitExceeded */:
37866
38031
  flushBufferedStreamEvents();
38032
+ if (pendingHistoryItemRef.current) {
38033
+ commitItemInOrder(
38034
+ pendingHistoryItemRef.current,
38035
+ userMessageTimestamp
38036
+ );
38037
+ setPendingHistoryItem(null);
38038
+ }
37867
38039
  handleSessionTokenLimitExceededEvent(event.value);
38040
+ geminiMessageBuffer = "";
38041
+ assistantOutputStarted = false;
37868
38042
  break;
37869
38043
  case "finished" /* Finished */:
37870
38044
  flushBufferedStreamEvents();
37871
38045
  commitPendingThought(userMessageTimestamp);
37872
- handleFinishedEvent(
37873
- event,
37874
- userMessageTimestamp
37875
- );
37876
38046
  if (pendingHistoryItemRef.current) {
37877
- commitItem(pendingHistoryItemRef.current, userMessageTimestamp);
38047
+ commitItemInOrder(
38048
+ pendingHistoryItemRef.current,
38049
+ userMessageTimestamp
38050
+ );
37878
38051
  setPendingHistoryItem(null);
37879
38052
  }
37880
38053
  geminiMessageBuffer = "";
37881
38054
  thoughtBuffer = "";
38055
+ assistantOutputStarted = false;
38056
+ assistantInlineImageCount = 0;
37882
38057
  setThought(null);
38058
+ handleFinishedEvent(
38059
+ event,
38060
+ userMessageTimestamp
38061
+ );
37883
38062
  break;
37884
38063
  case "citation" /* Citation */:
37885
38064
  flushBufferedStreamEvents();
37886
38065
  handleCitationEvent(event.value, userMessageTimestamp);
38066
+ if (showCitations(settings)) {
38067
+ geminiMessageBuffer = "";
38068
+ assistantOutputStarted = false;
38069
+ }
37887
38070
  break;
37888
38071
  case "loop_detected" /* LoopDetected */:
37889
38072
  flushBufferedStreamEvents();
@@ -37892,6 +38075,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
37892
38075
  case "retry" /* Retry */:
37893
38076
  if (!event.isContinuation) {
37894
38077
  discardBufferedStreamEvents();
38078
+ setPendingAssistantItems([]);
37895
38079
  if (pendingHistoryItemRef.current) {
37896
38080
  setPendingHistoryItem(null);
37897
38081
  }
@@ -37899,6 +38083,8 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
37899
38083
  thoughtBuffer = "";
37900
38084
  setThought(null);
37901
38085
  geminiMessageBuffer = "";
38086
+ assistantOutputStarted = false;
38087
+ assistantInlineImageCount = 0;
37902
38088
  } else {
37903
38089
  flushBufferedStreamEvents();
37904
38090
  }
@@ -37911,6 +38097,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
37911
38097
  break;
37912
38098
  case "model_fallback" /* ModelFallback */: {
37913
38099
  discardBufferedStreamEvents();
38100
+ setPendingAssistantItems([]);
37914
38101
  if (pendingHistoryItemRef.current) {
37915
38102
  setPendingHistoryItem(null);
37916
38103
  }
@@ -37918,6 +38105,8 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
37918
38105
  thoughtBuffer = "";
37919
38106
  setThought(null);
37920
38107
  geminiMessageBuffer = "";
38108
+ assistantOutputStarted = false;
38109
+ assistantInlineImageCount = 0;
37921
38110
  toolCallRequests.length = 0;
37922
38111
  clearRetryCountdown();
37923
38112
  const fromModel = sanitizeDisplayText(event.fromModel) ?? "(unknown)";
@@ -37934,7 +38123,10 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
37934
38123
  case "hook_system_message" /* HookSystemMessage */:
37935
38124
  flushBufferedStreamEvents();
37936
38125
  if (pendingHistoryItemRef.current) {
37937
- commitItem(pendingHistoryItemRef.current, userMessageTimestamp);
38126
+ commitItemInOrder(
38127
+ pendingHistoryItemRef.current,
38128
+ userMessageTimestamp
38129
+ );
37938
38130
  setPendingHistoryItem(null);
37939
38131
  }
37940
38132
  addItem(
@@ -37944,6 +38136,8 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
37944
38136
  },
37945
38137
  userMessageTimestamp
37946
38138
  );
38139
+ geminiMessageBuffer = "";
38140
+ assistantOutputStarted = false;
37947
38141
  break;
37948
38142
  case "user_prompt_submit_blocked" /* UserPromptSubmitBlocked */:
37949
38143
  flushBufferedStreamEvents();
@@ -37951,10 +38145,14 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
37951
38145
  event.value,
37952
38146
  userMessageTimestamp
37953
38147
  );
38148
+ geminiMessageBuffer = "";
38149
+ assistantOutputStarted = false;
37954
38150
  break;
37955
38151
  case "stop_hook_loop" /* StopHookLoop */:
37956
38152
  flushBufferedStreamEvents();
37957
38153
  handleStopHookLoopEvent(event.value, userMessageTimestamp);
38154
+ geminiMessageBuffer = "";
38155
+ assistantOutputStarted = false;
37958
38156
  break;
37959
38157
  case "active_goal" /* ActiveGoal */:
37960
38158
  break;
@@ -37962,7 +38160,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
37962
38160
  if (event.cause && shouldDisplayGoalStateCause(event.cause)) {
37963
38161
  flushBufferedStreamEvents();
37964
38162
  if (pendingHistoryItemRef.current) {
37965
- commitItem(
38163
+ commitItemInOrder(
37966
38164
  pendingHistoryItemRef.current,
37967
38165
  userMessageTimestamp
37968
38166
  );
@@ -37976,6 +38174,8 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
37976
38174
  },
37977
38175
  userMessageTimestamp
37978
38176
  );
38177
+ geminiMessageBuffer = "";
38178
+ assistantOutputStarted = false;
37979
38179
  }
37980
38180
  break;
37981
38181
  default: {
@@ -38082,18 +38282,22 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
38082
38282
  handleMaxSessionTurnsEvent,
38083
38283
  handleSessionTokenLimitExceededEvent,
38084
38284
  handleCitationEvent,
38285
+ settings,
38085
38286
  startRetryCountdown,
38086
38287
  clearRetryCountdown,
38087
38288
  setThought,
38088
38289
  commitPendingThought,
38089
38290
  pendingHistoryItemRef,
38291
+ pendingAssistantItemsRef,
38090
38292
  pendingThoughtItemRef,
38091
38293
  setPendingHistoryItem,
38092
38294
  handleUserPromptSubmitBlockedEvent,
38093
38295
  handleStopHookLoopEvent,
38094
38296
  bindGoalTurn,
38095
38297
  addItem,
38096
- commitItem,
38298
+ commitItemInOrder,
38299
+ stagePendingAssistantItem,
38300
+ setPendingAssistantItems,
38097
38301
  dualOutput
38098
38302
  ]
38099
38303
  );
@@ -38351,6 +38555,21 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
38351
38555
  immediateDuplicateToolResponsesRef.current = null;
38352
38556
  }
38353
38557
  const userMessageTimestamp = Date.now();
38558
+ if (submitType === "retry" /* Retry */) {
38559
+ setPendingAssistantItems([]);
38560
+ const pendingItem = pendingHistoryItemRef.current;
38561
+ if (pendingItem?.type === "gemini" || pendingItem?.type === "gemini_content") {
38562
+ setPendingHistoryItem(null);
38563
+ }
38564
+ } else if (!isTurnContinuation && !allowConcurrentBtwDuringResponse) {
38565
+ const pendingItem = pendingHistoryItemRef.current;
38566
+ if (pendingItem?.type === "gemini" || pendingItem?.type === "gemini_content") {
38567
+ commitItemInOrder(pendingItem, userMessageTimestamp);
38568
+ setPendingHistoryItem(null);
38569
+ } else {
38570
+ commitPendingAssistantItems(userMessageTimestamp);
38571
+ }
38572
+ }
38354
38573
  if (!isTurnContinuation && submitType !== "notification" /* Notification */ && submitType !== "goal" /* Goal */ && !allowConcurrentBtwDuringResponse) {
38355
38574
  setModelSwitchedFromQuotaError(false);
38356
38575
  const droppingInlineOverrideOnRetry = submitType === "retry" /* Retry */ && inlineModelOverrideActiveRef.current;
@@ -38568,7 +38787,10 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
38568
38787
  return;
38569
38788
  }
38570
38789
  if (pendingHistoryItemRef.current) {
38571
- commitItem(pendingHistoryItemRef.current, userMessageTimestamp);
38790
+ commitItemInOrder(
38791
+ pendingHistoryItemRef.current,
38792
+ userMessageTimestamp
38793
+ );
38572
38794
  setPendingHistoryItem(null);
38573
38795
  }
38574
38796
  const immediateDuplicateToolResponses = immediateDuplicateToolResponsesRef.current;
@@ -38723,7 +38945,9 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
38723
38945
  processGeminiStreamEvents,
38724
38946
  pendingHistoryItemRef,
38725
38947
  addItem,
38726
- commitItem,
38948
+ commitPendingAssistantItems,
38949
+ commitItemInOrder,
38950
+ setPendingAssistantItems,
38727
38951
  setPendingHistoryItem,
38728
38952
  setInitError,
38729
38953
  geminiClient,
@@ -39309,6 +39533,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
39309
39533
  () => [
39310
39534
  // Reasoning renders above the streaming answer.
39311
39535
  pendingThoughtItem,
39536
+ ...pendingAssistantItems,
39312
39537
  pendingHistoryItem,
39313
39538
  pendingRetryErrorItem,
39314
39539
  pendingRetryCountdownItem,
@@ -39316,6 +39541,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
39316
39541
  ].filter((i) => i !== void 0 && i !== null),
39317
39542
  [
39318
39543
  pendingThoughtItem,
39544
+ pendingAssistantItems,
39319
39545
  pendingHistoryItem,
39320
39546
  pendingRetryErrorItem,
39321
39547
  pendingRetryCountdownItem,
@@ -39718,6 +39944,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
39718
39944
  submitQuery,
39719
39945
  initError,
39720
39946
  pendingHistoryItems,
39947
+ clearPendingState,
39721
39948
  thought,
39722
39949
  cancelOngoingRequest,
39723
39950
  preemptGoalTurn,
@@ -43393,7 +43620,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
43393
43620
  );
43394
43621
  historyManager.loadHistory(historyItems);
43395
43622
  const userTurnCount = resumedSessionData.conversation.messages.filter(
43396
- (m) => m.type === "user" && m.subtype !== "mid_turn_user_message"
43623
+ (m) => m.type === "user" && m.subtype !== "mid_turn_user_message" && m.subtype !== "realtime_message"
43397
43624
  ).length;
43398
43625
  if (userTurnCount > 0) {
43399
43626
  seedPromptCount(userTurnCount);
@@ -43739,6 +43966,12 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
43739
43966
  );
43740
43967
  });
43741
43968
  }, [addHistoryItem, config]);
43969
+ const clearPendingStateRef = (0, import_react161.useRef)(() => {
43970
+ });
43971
+ const clearPendingStateFromRef = (0, import_react161.useCallback)(
43972
+ () => clearPendingStateRef.current(),
43973
+ []
43974
+ );
43742
43975
  const {
43743
43976
  isResumeDialogOpen,
43744
43977
  resumeMatchedSessions,
@@ -43750,6 +43983,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
43750
43983
  settings,
43751
43984
  historyManager,
43752
43985
  startNewSession,
43986
+ clearPendingState: clearPendingStateFromRef,
43753
43987
  setSessionName,
43754
43988
  remount: refreshStatic
43755
43989
  });
@@ -43758,6 +43992,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
43758
43992
  settings,
43759
43993
  historyManager,
43760
43994
  startNewSession,
43995
+ clearPendingState: clearPendingStateFromRef,
43761
43996
  setSessionName,
43762
43997
  remount: refreshStatic
43763
43998
  });
@@ -43922,7 +44157,8 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
43922
44157
  handleResume,
43923
44158
  handleBranch,
43924
44159
  openDeleteDialog,
43925
- openHelpDialog
44160
+ openHelpDialog,
44161
+ clearPendingState: /* @__PURE__ */ __name(() => clearPendingStateRef.current(), "clearPendingState")
43926
44162
  }),
43927
44163
  [
43928
44164
  openAuthDialog,
@@ -44154,6 +44390,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
44154
44390
  submitQuery,
44155
44391
  initError,
44156
44392
  pendingHistoryItems: pendingGeminiHistoryItems,
44393
+ clearPendingState,
44157
44394
  thought,
44158
44395
  cancelOngoingRequest,
44159
44396
  preemptGoalTurn,
@@ -44192,6 +44429,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
44192
44429
  goalQueueRef
44193
44430
  );
44194
44431
  cancelOngoingRequestRef.current = cancelOngoingRequest;
44432
+ clearPendingStateRef.current = clearPendingState;
44195
44433
  isIdleRef.current = streamingState === "idle" /* Idle */;
44196
44434
  (0, import_react161.useEffect)(() => {
44197
44435
  if (streamingState === "idle" /* Idle */) {
@@ -44762,6 +45000,7 @@ ${currentText}` : popped.modelText
44762
45000
  ]
44763
45001
  );
44764
45002
  const handleClearScreen = (0, import_react161.useCallback)(() => {
45003
+ clearPendingStateRef.current();
44765
45004
  historyManager.clearItems();
44766
45005
  clearScreen();
44767
45006
  remountStaticHistory();
@@ -45179,6 +45418,7 @@ ${currentText}` : popped.modelText
45179
45418
  const truncatedUi = expandCollapsedHistory(
45180
45419
  originalHistory.filter((h) => h.id < userItem.id)
45181
45420
  );
45421
+ clearPendingStateRef.current();
45182
45422
  historyManager.loadHistory(truncatedUi);
45183
45423
  refreshStatic();
45184
45424
  if (userItem.type === "user" && userItem.text) {