@qwen-code/qwen-code 0.22.2 → 0.22.3-nightly.20260829.e5cb60ad48

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 (332) hide show
  1. package/bundled/computer-use/SKILL.md +3 -3
  2. package/bundled/qc-helper/docs/configuration/settings.md +37 -36
  3. package/bundled/qc-helper/docs/features/channels/dws.md +2 -0
  4. package/bundled/qc-helper/docs/features/channels/overview.md +34 -3
  5. package/bundled/qc-helper/docs/features/code-review.md +3 -3
  6. package/bundled/qc-helper/docs/features/computer-use.md +2 -2
  7. package/bundled/qc-helper/docs/features/tool-use-summaries.md +1 -1
  8. package/bundled/qc-helper/docs/qwen-serve.md +1 -1
  9. package/bundled/review/SKILL.md +81 -31
  10. package/bundled/review/references/persistence.md +7 -3
  11. package/bundled/review/references/posting.md +10 -4
  12. package/chunks/{MaxSizedBox-X5FZSNAJ.js → MaxSizedBox-JK4LFKJ3.js} +36 -37
  13. package/chunks/{StandaloneSessionPicker-AVLI6VJP.js → StandaloneSessionPicker-UA2MQCCS.js} +54 -55
  14. package/chunks/{acpAgent-MXEAN54C.js → acpAgent-ZKIVHQKW.js} +276 -191
  15. package/chunks/{agent-PJIPDWHB.js → agent-Z3Q5C3RX.js} +27 -28
  16. package/chunks/{agent-headless-B4JVD7UK.js → agent-headless-BIVZ3KYZ.js} +27 -28
  17. package/chunks/{anthropicContentGenerator-HGMBACVE.js → anthropicContentGenerator-YVTB6QX7.js} +43 -47
  18. package/chunks/{artifact-tool-5YT4QF7Y.js → artifact-tool-XSMPHZBT.js} +9 -1
  19. package/chunks/{askUserQuestion-4SWJY65V.js → askUserQuestion-66I3U2QX.js} +29 -5
  20. package/chunks/{bridge-FKZTVIS3.js → bridge-KDQTHAR7.js} +40 -41
  21. package/chunks/{channel-management-service-X4AZ6IXX.js → channel-management-service-HQ6KDS7C.js} +6 -6
  22. package/chunks/{channel-settings-store-4UFCLBBG.js → channel-settings-store-X4WWBVYW.js} +50 -46
  23. package/chunks/{channel-worker-group-27HMGD5S.js → channel-worker-group-6NA6BBZV.js} +5 -5
  24. package/chunks/{channel-worker-manager-QEGX646Z.js → channel-worker-manager-NEZ2J6RK.js} +5 -5
  25. package/chunks/{channel-worker-supervisor-UEW2WWCC.js → channel-worker-supervisor-FKU7DIHJ.js} +4 -4
  26. package/chunks/{chunk-V2NDP3I4.js → chunk-2AEHQRY2.js} +1 -1
  27. package/chunks/{chunk-EOGELB3H.js → chunk-2SXSLSQE.js} +1 -1
  28. package/chunks/chunk-36LGBEM6.js +130 -0
  29. package/chunks/{chunk-2K6ORIHJ.js → chunk-3CAI35FS.js} +11 -11
  30. package/chunks/{chunk-H2WDGQ6D.js → chunk-3JXM2CVW.js} +1 -1
  31. package/chunks/{chunk-JSHHYW6T.js → chunk-3WJLDA3X.js} +3 -3
  32. package/chunks/{chunk-HVEYF6VT.js → chunk-3WK3QDNV.js} +1 -1
  33. package/chunks/{chunk-5XBFCMWD.js → chunk-3XKLXHGK.js} +17 -9
  34. package/chunks/{chunk-SFPGAQUL.js → chunk-42IDLQWS.js} +24 -18
  35. package/chunks/{chunk-KEKZFOL6.js → chunk-44LKG3IY.js} +1 -1
  36. package/chunks/{chunk-43GGFFLY.js → chunk-4K7KNVWH.js} +1 -1
  37. package/chunks/{chunk-F6FV3C5K.js → chunk-4NDLQAY2.js} +24 -272
  38. package/chunks/{chunk-VVW4ZNFY.js → chunk-4QHPPXK2.js} +15 -7
  39. package/chunks/chunk-4VQBQLIZ.js +293 -0
  40. package/chunks/{chunk-ZFKOCECU.js → chunk-5CALJAH7.js} +2 -2
  41. package/chunks/{chunk-F7TNAPZ4.js → chunk-5SBVOOA2.js} +5 -5
  42. package/chunks/{chunk-IK5BW3CS.js → chunk-5ZJL3AIV.js} +2 -2
  43. package/chunks/{chunk-OIVXBW3W.js → chunk-62GQFYID.js} +1 -1
  44. package/chunks/{chunk-BRVWYMKV.js → chunk-6MBXY6WM.js} +1 -1
  45. package/chunks/{chunk-77RG5SFQ.js → chunk-6XOIV7MI.js} +1 -1
  46. package/chunks/{chunk-KGJGEEVR.js → chunk-7FA2II6K.js} +10 -1
  47. package/chunks/chunk-7GUOXWPY.js +2597 -0
  48. package/chunks/chunk-7J6OTNGO.js +424 -0
  49. package/chunks/{chunk-DIMEPKCW.js → chunk-7S226YTK.js} +1 -1
  50. package/chunks/{chunk-XRSOI3DL.js → chunk-A3LWD5MK.js} +1 -1
  51. package/chunks/{chunk-FBSSIAAQ.js → chunk-AMLXTTJJ.js} +7 -7
  52. package/chunks/{chunk-Z7FLBQPR.js → chunk-ARF6IJHM.js} +7 -7
  53. package/chunks/{chunk-4CDSK5AZ.js → chunk-AYFA7MZV.js} +2 -2
  54. package/chunks/{chunk-4JWNNLPT.js → chunk-B42A5ZHA.js} +3 -3
  55. package/chunks/{chunk-3JGZSIDA.js → chunk-B466ZSHZ.js} +1 -1
  56. package/chunks/{chunk-L6BZRIUL.js → chunk-B5PHIJGI.js} +182 -4
  57. package/chunks/{chunk-KUX5D6DK.js → chunk-BFYGL2XL.js} +11383 -11020
  58. package/chunks/{chunk-W5MJJ2V7.js → chunk-BIJEBAAQ.js} +1 -1
  59. package/chunks/{chunk-3I6UTTDX.js → chunk-BKWNKLZB.js} +19 -19
  60. package/chunks/{chunk-3FDFA4MZ.js → chunk-BOWFGCEU.js} +1 -1
  61. package/chunks/{chunk-F5SZP77N.js → chunk-BP5PTNCU.js} +79 -71
  62. package/chunks/{chunk-3AFMQUTI.js → chunk-C2X7KY45.js} +1 -1
  63. package/chunks/{chunk-FDY5RMGH.js → chunk-CFJY4DGX.js} +1 -1
  64. package/chunks/{chunk-LDP5OD6N.js → chunk-CLWO3B77.js} +2 -2
  65. package/chunks/{chunk-L6YT5H34.js → chunk-CVUBULIX.js} +4 -4
  66. package/chunks/{chunk-JU4EEXC7.js → chunk-CWQZUDB7.js} +2 -2
  67. package/chunks/chunk-DJBQCO2E.js +842 -0
  68. package/chunks/{chunk-4J657AJR.js → chunk-DJECZIJX.js} +40 -40
  69. package/chunks/{chunk-RUGNCYNO.js → chunk-DMLVSW7L.js} +532 -22
  70. package/chunks/{chunk-4FTKQNWJ.js → chunk-DYXFD5RO.js} +181 -2
  71. package/chunks/{chunk-PDMJ3KGS.js → chunk-EB6QRGHM.js} +1 -1
  72. package/chunks/{chunk-TGWAQ5RB.js → chunk-ECE3UYVO.js} +4704 -5894
  73. package/chunks/{chunk-5O72BNDD.js → chunk-F5RB4S23.js} +7 -7
  74. package/chunks/{chunk-IJKTMLBE.js → chunk-FIKYKQOO.js} +1 -1
  75. package/chunks/{chunk-BNMF3K5X.js → chunk-FKET6VOO.js} +52 -36
  76. package/chunks/{chunk-Z7TGYN5F.js → chunk-FROAFEFB.js} +2 -2
  77. package/chunks/{chunk-MZS7GEC7.js → chunk-FTF2YIZ5.js} +1 -1
  78. package/chunks/{chunk-Z7VOMGDC.js → chunk-FTJMWDND.js} +0 -24
  79. package/chunks/{chunk-43UYNAWX.js → chunk-G6FECKTJ.js} +2 -2
  80. package/chunks/{chunk-7UYV53BC.js → chunk-GIHXH2KO.js} +1 -1
  81. package/chunks/{chunk-V4QXXQJ2.js → chunk-H4LCV44K.js} +2 -2
  82. package/chunks/{chunk-LXIBMVRN.js → chunk-H5WQZTAW.js} +13 -7
  83. package/chunks/{chunk-Z4X5MTRT.js → chunk-HCOBAG2L.js} +2 -4
  84. package/chunks/{chunk-RJC5EIKY.js → chunk-HHQJANFM.js} +3 -3
  85. package/chunks/{chunk-7JPW6IYH.js → chunk-HVC3PNVC.js} +1 -1
  86. package/chunks/{chunk-TRZTNIQ6.js → chunk-I6LYRJPB.js} +2 -2
  87. package/chunks/{chunk-E55H6BZ7.js → chunk-ICURCKIU.js} +1335 -119
  88. package/chunks/{chunk-66KDY3LV.js → chunk-IJMEPQ5N.js} +2 -2
  89. package/chunks/{chunk-4HV6HH33.js → chunk-ISKH4QX3.js} +9 -9
  90. package/chunks/{chunk-6CGL7E7G.js → chunk-IZDKYNKN.js} +2 -2
  91. package/chunks/{chunk-A7YP63XN.js → chunk-J7SS77YW.js} +5 -5
  92. package/chunks/{chunk-XDFHY4R3.js → chunk-JCMS65DJ.js} +2 -2
  93. package/chunks/{chunk-6LFJEACX.js → chunk-JHDPOPQG.js} +7 -7
  94. package/chunks/{chunk-WKK5BQNP.js → chunk-JHYH6PYQ.js} +43 -420
  95. package/chunks/{chunk-PFCQ62V4.js → chunk-JWDMKJG5.js} +6 -6
  96. package/chunks/{chunk-6IUNAPLR.js → chunk-K5KXUXWC.js} +1 -1
  97. package/chunks/{chunk-Y6LSMB6J.js → chunk-K6CTN5TU.js} +1 -1
  98. package/chunks/{chunk-G34IR3D6.js → chunk-KEIMKAM4.js} +26 -109
  99. package/chunks/{chunk-JHS74YAB.js → chunk-KID24ZFN.js} +1 -1
  100. package/chunks/{chunk-EFUM7RVY.js → chunk-KJO2LBUK.js} +942 -16
  101. package/chunks/{chunk-B7CDU2SL.js → chunk-KYWTPLBJ.js} +17 -20
  102. package/chunks/chunk-LGO7DEXL.js +1186 -0
  103. package/chunks/{chunk-P2SU6ZTI.js → chunk-LUEHOUHM.js} +1 -1
  104. package/chunks/{chunk-P5GGM4KS.js → chunk-MAQ2W4IF.js} +3 -3
  105. package/chunks/{chunk-RIEFGNTP.js → chunk-MVDPFLWM.js} +207 -43
  106. package/chunks/{chunk-5PA6UEYA.js → chunk-MZCJWS5Y.js} +1 -1
  107. package/chunks/{chunk-BGXZBI5B.js → chunk-N4X7G4J2.js} +2 -1
  108. package/chunks/{chunk-BBWV7ONL.js → chunk-NEBSNUMX.js} +6 -6
  109. package/chunks/{chunk-3SGB2UHX.js → chunk-NENQE7VH.js} +23 -11
  110. package/chunks/{chunk-SJ3ZUWFK.js → chunk-NHDNYMBU.js} +4 -4
  111. package/chunks/{chunk-K2NQPH5D.js → chunk-OJEMXKA4.js} +3 -3
  112. package/chunks/{chunk-QP4C6WCE.js → chunk-PI6HYGBE.js} +2 -2
  113. package/chunks/{chunk-OIP7C4FE.js → chunk-PO6YCWIQ.js} +4 -4
  114. package/chunks/{chunk-SAH4BD2J.js → chunk-PQEISIKS.js} +67 -0
  115. package/chunks/{chunk-4MQEPP3Y.js → chunk-PQZBDDNG.js} +5 -119
  116. package/chunks/{chunk-SMPR7SPO.js → chunk-QJNDUTOL.js} +45 -239
  117. package/chunks/{chunk-L2M46FP5.js → chunk-QYMAKPY5.js} +5 -5
  118. package/chunks/{chunk-JVPFTDBK.js → chunk-RFIDDFAL.js} +1 -1
  119. package/chunks/{chunk-JSC3H3TD.js → chunk-RZKOA4JE.js} +14 -6
  120. package/chunks/{chunk-CPGJJJLU.js → chunk-SEDFP3ZI.js} +1 -1
  121. package/chunks/chunk-SEONHUS3.js +275 -0
  122. package/chunks/{chunk-ZGXYO7DY.js → chunk-SS4MRMKE.js} +122 -13
  123. package/chunks/{chunk-T32W2JHI.js → chunk-SS5SDCD3.js} +2 -2
  124. package/chunks/{chunk-MIIVI25Q.js → chunk-ST5V3ZOC.js} +2 -2
  125. package/chunks/{chunk-4K7NQDCG.js → chunk-T4EFG2P5.js} +18 -9
  126. package/chunks/{chunk-TWSKM647.js → chunk-T7KMERIX.js} +1 -1
  127. package/chunks/{chunk-BAJKAAOY.js → chunk-TGJ2PKCW.js} +4315 -1386
  128. package/chunks/{chunk-6LFTG244.js → chunk-TU6WVK67.js} +15 -5
  129. package/chunks/{chunk-T3WXYEZ4.js → chunk-U54AYGEC.js} +38 -5
  130. package/chunks/{chunk-CSMI4FP5.js → chunk-UAOTD2BN.js} +1 -1
  131. package/chunks/{chunk-CCBZDVUA.js → chunk-UI4DXRZW.js} +33 -20
  132. package/chunks/{chunk-JCQD3INC.js → chunk-URE3QBBB.js} +1 -1
  133. package/chunks/chunk-UVY67MSH.js +205 -0
  134. package/chunks/{chunk-Y3QL45LS.js → chunk-V4264FEG.js} +8 -8
  135. package/chunks/{chunk-R4PMVSR5.js → chunk-VBCPNIQD.js} +18 -20
  136. package/chunks/{chunk-Q26AYA62.js → chunk-VKCJPNGU.js} +2 -2
  137. package/chunks/{chunk-IOPCFOTF.js → chunk-VKIGT4OG.js} +2 -2
  138. package/chunks/{chunk-3DXFGHAJ.js → chunk-VNMZLAVG.js} +1 -1
  139. package/chunks/{chunk-FY76G3G5.js → chunk-W3CY4QIO.js} +4 -4
  140. package/chunks/{chunk-O2UN57NX.js → chunk-W4XG7IZ4.js} +19 -2
  141. package/chunks/{chunk-C6K43ZDE.js → chunk-W7HH77GN.js} +5 -5
  142. package/chunks/{chunk-2NYCN6F2.js → chunk-WD3WSEW3.js} +43 -26
  143. package/chunks/chunk-WLEYH7CD.js +332 -0
  144. package/chunks/{chunk-PKAYJDB3.js → chunk-WNPDGUJO.js} +21 -2
  145. package/chunks/{chunk-IZIVM7LZ.js → chunk-WXEA74YB.js} +1 -1
  146. package/chunks/{chunk-YRLW2MSX.js → chunk-XBVNNDPK.js} +11 -4
  147. package/chunks/{chunk-HVQ3B7FF.js → chunk-Y5S7LBOZ.js} +43 -6
  148. package/chunks/{chunk-AGR5UROZ.js → chunk-YN44TEOZ.js} +17 -29
  149. package/chunks/{chunk-DZWPESIF.js → chunk-Z44FUM77.js} +3 -3
  150. package/chunks/{chunk-XDLEZ5HX.js → chunk-ZZUKP7HV.js} +1 -1
  151. package/chunks/{config-utils-BBOCOGZW.js → config-utils-NOCNFTQP.js} +42 -41
  152. package/chunks/{contextCommand-EET67MQ2.js → contextCommand-DH2NOQBI.js} +39 -40
  153. package/chunks/{core-runtime-677KFX6Q.js → core-runtime-OLW4OXMV.js} +43 -44
  154. package/chunks/{create-sub-session-JKZAYZX7.js → create-sub-session-ZCGPQTIE.js} +37 -38
  155. package/chunks/{daemon-MJQUO7RA.js → daemon-3GNHB3M2.js} +495 -7
  156. package/chunks/{daemon-git-worktree-guard-6MVAAZZZ.js → daemon-git-worktree-guard-SHIU7MPJ.js} +36 -37
  157. package/chunks/{daemon-status-provider-RFKZOK3S.js → daemon-status-provider-WECDBDF7.js} +45 -46
  158. package/chunks/{daemon-trust-policy-DRZPFB4Q.js → daemon-trust-policy-MX4OYXF3.js} +44 -45
  159. package/chunks/{daemon-trust-policy-monitor-B5U6TQX5.js → daemon-trust-policy-monitor-73WXIKNL.js} +44 -45
  160. package/chunks/{deferred-core-runtime-BBVIOP24.js → deferred-core-runtime-BKS7O3D6.js} +36 -37
  161. package/chunks/{dist-DJBNNPLN.js → dist-4WXLCBDR.js} +1 -1
  162. package/chunks/{dist-TJUDJTCB.js → dist-5VXFRTWU.js} +280 -48
  163. package/chunks/{dist-QODVOVWI.js → dist-6BPYWHVD.js} +31 -30
  164. package/chunks/{dist-ZBVOXSKF.js → dist-GFN5DCBX.js} +74 -65
  165. package/chunks/{dist-SATKXKUR.js → dist-HZNT6GQS.js} +1 -1
  166. package/chunks/{dist-ILDBUWDB.js → dist-LVZCXVPF.js} +1 -1
  167. package/chunks/{dist-7CKN54NL.js → dist-N6W6E753.js} +71 -64
  168. package/chunks/{dist-4Q7NTUNB.js → dist-NSV4NBPK.js} +31 -14
  169. package/chunks/{dist-UQUFZDIY.js → dist-SWQMYP2Q.js} +18 -16
  170. package/chunks/{earlyInputCapture-2JOMMNQ4.js → earlyInputCapture-5NNZSVL7.js} +36 -37
  171. package/chunks/{edit-BSV6YRVW.js → edit-IGHPT4I2.js} +27 -28
  172. package/chunks/{enter-worktree-MQXFFPKM.js → enter-worktree-35QCAAFP.js} +3 -3
  173. package/chunks/{enterPlanMode-PKNF35FE.js → enterPlanMode-LVTPJSAA.js} +32 -33
  174. package/chunks/{environment-MOZMPUHR.js → environment-HC2PPYDO.js} +40 -41
  175. package/chunks/{errors-DMPQVYJL.js → errors-VCWSG25A.js} +39 -40
  176. package/chunks/{exit-worktree-L344UY7K.js → exit-worktree-XQD6D543.js} +3 -3
  177. package/chunks/{exitPlanMode-UE4FGCY4.js → exitPlanMode-RHI2K2O7.js} +27 -28
  178. package/chunks/{fast-path-773PV7PU.js → fast-path-IQNCJOPE.js} +4 -4
  179. package/chunks/{fast-path-settings-XMFBYFUH.js → fast-path-settings-XH426LUU.js} +3 -3
  180. package/chunks/{glob-CZHOWUEA.js → glob-EANAXPNR.js} +27 -28
  181. package/chunks/{goal-tools-YZQJXTGH.js → goal-tools-PTD3MBA7.js} +2 -1
  182. package/chunks/{grep-5GPICQBU.js → grep-3REG7TO6.js} +4 -2
  183. package/chunks/{handleAutoUpdate-SGXKTQM6.js → handleAutoUpdate-PVVFLDQ4.js} +41 -42
  184. package/chunks/{i18n-B42HKHKH.js → i18n-VOKX5QIF.js} +38 -39
  185. package/chunks/{image-gen-HAYOEQ4O.js → image-gen-J6FDGUZP.js} +4 -6
  186. package/chunks/{initializer-FB66WYR3.js → initializer-SZVVTGZL.js} +44 -45
  187. package/chunks/{installationInfo-Y7AULNMX.js → installationInfo-R22453J5.js} +37 -38
  188. package/chunks/{list-2HWGSVRA.js → list-LK5M5W2N.js} +47 -48
  189. package/chunks/{gemini-IP4FJAP5.js → llm-6RQJUVIS.js} +89 -85
  190. package/chunks/{geminiContentGenerator-PUNEBWJW.js → llm-content-generator-Q7JJDSJR.js} +25 -25
  191. package/chunks/{loadedSettingsAdapter-7Y7IEI6T.js → loadedSettingsAdapter-KF2ZPSPG.js} +44 -45
  192. package/chunks/{loggingContentGenerator-2GGZNGLG.js → loggingContentGenerator-SBCIJG2J.js} +307 -27
  193. package/chunks/{managed-npm-update-5TEV2E3J.js → managed-npm-update-UG324XFY.js} +37 -38
  194. package/chunks/{mcp-QGG5NMJJ.js → mcp-PUSCFGS5.js} +44 -45
  195. package/chunks/{monitor-FI7PY36Z.js → monitor-RJW5AP64.js} +27 -28
  196. package/chunks/{nonInteractiveCli-4LO2TL72.js → nonInteractiveCli-OIXN4WSR.js} +82 -81
  197. package/chunks/{notebook-edit-TPGMGBST.js → notebook-edit-5MWEIMS2.js} +27 -28
  198. package/chunks/{open-with-auth-4UI3KHUR.js → open-with-auth-YN3QZHVM.js} +1 -1
  199. package/chunks/{openaiContentGenerator-SUCYANUZ.js → openaiContentGenerator-AGTNYSCJ.js} +13 -15
  200. package/chunks/{pidfile-JMF2CLMY.js → pidfile-LTA6NT3P.js} +36 -37
  201. package/chunks/process-registry-OAEG6WGC.js +662 -0
  202. package/chunks/{processUtils-IQZBYWSB.js → processUtils-GY3Q66CJ.js} +2 -2
  203. package/chunks/{prompt-terminal-ledger-DCZO6S7C.js → prompt-terminal-ledger-3QS6TCMF.js} +37 -38
  204. package/chunks/{qwenContentGenerator-J4TXFGJT.js → qwenContentGenerator-NU6PCDA7.js} +31 -32
  205. package/chunks/{qwenOAuth2-RF33DNZW.js → qwenOAuth2-OF5WRBQT.js} +4 -6
  206. package/chunks/{read-file-QE2B5FTX.js → read-file-DTQL5V62.js} +5 -5
  207. package/chunks/{record-artifact-RZGZBENU.js → record-artifact-VW23GS4F.js} +2 -2
  208. package/chunks/{report-findings-Q3SYKKW5.js → report-findings-AO5VYFLR.js} +7 -3
  209. package/chunks/{resumeHistoryUtils-CZ4JRDVW.js → resumeHistoryUtils-PZ4BER55.js} +40 -41
  210. package/chunks/{ripGrep-R6B6HWPX.js → ripGrep-A2FGBZGY.js} +7 -7
  211. package/chunks/{run-qwen-serve-TPHZMSXJ.js → run-qwen-serve-AESOSKFC.js} +271 -86
  212. package/chunks/{runtime-TTIGSBM4.js → runtime-YQHSEKG4.js} +49 -50
  213. package/chunks/{scheduled-tasks-QB4ZVUQS.js → scheduled-tasks-XG6KK6NY.js} +42 -43
  214. package/chunks/{scheduler-YRUG22M7.js → scheduler-I4WKXWRZ.js} +38 -39
  215. package/chunks/{sdk-exporters-http-KCJ4ZFG7.js → sdk-exporters-http-TTU2CHBU.js} +1 -1
  216. package/chunks/{sdk-impl-HLSEDAEP.js → sdk-impl-UUMVYMAL.js} +10 -4
  217. package/chunks/{send-message-Y5I6NYAM.js → send-message-AJ4OCUBV.js} +18 -2
  218. package/chunks/{serve-MXXCDAQN.js → serve-MQDTVC7X.js} +44 -45
  219. package/chunks/{server-DFUSSSHI.js → server-L5ETIKEW.js} +4153 -3351
  220. package/chunks/{session-3TEHNENZ.js → session-LKKXRUJM.js} +87 -86
  221. package/chunks/session-pr-refresh-5OWA6MC2.js +365 -0
  222. package/chunks/{settings-VOZYKLTT.js → settings-S6KG7JST.js} +43 -44
  223. package/chunks/{shell-6RTKZVMI.js → shell-JEQE5AHC.js} +27 -28
  224. package/chunks/{skill-FEOKFX26.js → skill-QEGMZXKI.js} +58 -14
  225. package/chunks/{skill-settings-VA4XVYVL.js → skill-settings-EVY7QF4H.js} +44 -45
  226. package/chunks/{spawnChannel-F6WVP723.js → spawnChannel-AQP72WPN.js} +38 -39
  227. package/chunks/{standalone-update-RGILUQVK.js → standalone-update-JUJA4BKV.js} +39 -40
  228. package/chunks/{startInteractiveUI-WHJPFOGH.js → startInteractiveUI-5ZMSJZ3J.js} +408 -338
  229. package/chunks/{stdioHelpers-7A2EE64Z.js → stdioHelpers-AY6XCDY2.js} +3 -1
  230. package/chunks/{task-create-TMSV7RD5.js → task-create-QN4LYRSE.js} +3 -3
  231. package/chunks/{task-list-W55RBFRX.js → task-list-JPLGK45U.js} +2 -2
  232. package/chunks/{task-update-N536I4GQ.js → task-update-IWEOJFV2.js} +3 -3
  233. package/chunks/{team-create-QYSWCYCL.js → team-create-ZEGP7KVD.js} +27 -28
  234. package/chunks/{team-delete-FJRFX33M.js → team-delete-RZVVSGCY.js} +2 -2
  235. package/chunks/{team-plan-approval-P7DAD644.js → team-plan-approval-SXWT2WZN.js} +27 -28
  236. package/chunks/{terminal-image-renderer-SMQE46UJ.js → terminal-image-renderer-42B6N55E.js} +36 -37
  237. package/chunks/{theme-manager-RFO5WWFF.js → theme-manager-DDYUBC25.js} +36 -37
  238. package/chunks/{tool-search-F2EMIAPV.js → tool-search-GDDBA4X4.js} +9 -9
  239. package/chunks/{total-session-admission-HTVTP4BS.js → total-session-admission-6MYP4GBA.js} +40 -41
  240. package/chunks/{trustedFolders-7OCNMUQE.js → trustedFolders-LPEIY3GE.js} +38 -39
  241. package/chunks/{types-WYCFCEHR.js → types-HKLPXZB3.js} +1 -3
  242. package/chunks/{update-relaunch-4GF3OXMB.js → update-relaunch-BOIIZNT3.js} +6 -6
  243. package/chunks/{updateCheck-7QBDXZRT.js → updateCheck-KSVHYJYE.js} +40 -41
  244. package/chunks/{useAutoAcceptIndicator-UI4SNL2O.js → useAutoAcceptIndicator-43D2A4ZN.js} +46 -47
  245. package/chunks/{validateNonInterActiveAuth-BPPA563H.js → validateNonInterActiveAuth-WSD4SOIM.js} +79 -78
  246. package/chunks/{version-ANP4TS6O.js → version-B4CM7RNG.js} +1 -1
  247. package/chunks/{web-fetch-QJADSAH3.js → web-fetch-MOHILUZL.js} +8 -10
  248. package/chunks/{web-search-7TTQKEKM.js → web-search-G4HIMY2V.js} +5 -7
  249. package/chunks/{web-shell-static-A6QMUNNV.js → web-shell-static-HNB4FDOE.js} +2 -2
  250. package/chunks/{workflow-5XN6XSOT.js → workflow-H3PCYU5F.js} +50 -60
  251. package/chunks/{workspace-providers-status-PDFZWL5Q.js → workspace-providers-status-AAX7VWMT.js} +48 -49
  252. package/chunks/{workspace-registration-store-XKVW2YVH.js → workspace-registration-store-YTHZ6SL4.js} +1 -1
  253. package/chunks/{workspace-registry-23R7XRB5.js → workspace-registry-URHGBL4U.js} +40 -41
  254. package/chunks/{workspace-service-MUYO2QIC.js → workspace-service-XJMSLRCU.js} +49 -53
  255. package/chunks/{workspace-skills-status-IKECTOOQ.js → workspace-skills-status-JGEDANNT.js} +47 -48
  256. package/chunks/{workspace-trust-reconciler-KLGOB53D.js → workspace-trust-reconciler-ZHI5TDYB.js} +48 -49
  257. package/chunks/{write-file-GGRBB5TZ.js → write-file-5O4S63L6.js} +29 -30
  258. package/chunks/{zoom-image-6ASG6J4C.js → zoom-image-N2IBUVXE.js} +5 -5
  259. package/cli.js +128 -91
  260. package/package.json +3 -3
  261. package/web-shell/assets/{abnfDiagram-VCTEODGH-uS-vtfs3.js → abnfDiagram-VCTEODGH-OJQpqC9m.js} +1 -1
  262. package/web-shell/assets/{arc-BSTnk5pu.js → arc-BxH0YR17.js} +1 -1
  263. package/web-shell/assets/{architectureDiagram-5GKGNRK7-DCMyiqzy.js → architectureDiagram-5GKGNRK7-CxyWiGfF.js} +1 -1
  264. package/web-shell/assets/{blockDiagram-NRAW4CY4-C7_gt0r1.js → blockDiagram-NRAW4CY4-DukXbJQ7.js} +1 -1
  265. package/web-shell/assets/{c4Diagram-UCG6FXSJ-BeQg2L8B.js → c4Diagram-UCG6FXSJ-DvS1T6pK.js} +1 -1
  266. package/web-shell/assets/channel-Dbbg7P-u.js +1 -0
  267. package/web-shell/assets/{chunk-2Q5K7J3B-DnV9bKBe.js → chunk-2Q5K7J3B-qvqfJ7VZ.js} +1 -1
  268. package/web-shell/assets/{chunk-5VM5RSS4-rT1GAcT7.js → chunk-5VM5RSS4-BJ3kJYte.js} +1 -1
  269. package/web-shell/assets/{chunk-F27PBJKO-BcgSxqGA.js → chunk-F27PBJKO-BYPVESil.js} +1 -1
  270. package/web-shell/assets/{chunk-G27WJ6UU-Bw1ZhyZq.js → chunk-G27WJ6UU-B4UYFElk.js} +1 -1
  271. package/web-shell/assets/{chunk-JWPE2WC7-D4iDw-96.js → chunk-JWPE2WC7-8zGKVNUU.js} +1 -1
  272. package/web-shell/assets/{chunk-LCL6LL3I-D3MB3GTZ.js → chunk-LCL6LL3I-CbaHONpI.js} +1 -1
  273. package/web-shell/assets/{chunk-POPQ4Y6H-Cep2ndrS.js → chunk-POPQ4Y6H-f8kAjzlF.js} +1 -1
  274. package/web-shell/assets/{chunk-SVP7TREG-BuahMHJc.js → chunk-SVP7TREG-Dm8ahq7K.js} +1 -1
  275. package/web-shell/assets/{chunk-XXDRQBXY-BdujIvJY.js → chunk-XXDRQBXY-yrcLzv8z.js} +1 -1
  276. package/web-shell/assets/classDiagram-DTDB5LWJ-cDYs8iT0.js +1 -0
  277. package/web-shell/assets/classDiagram-v2-JRS7N3AN-cDYs8iT0.js +1 -0
  278. package/web-shell/assets/{cose-bilkent-JH36ORCC-CGLLUbF8.js → cose-bilkent-JH36ORCC-DN1C22IH.js} +1 -1
  279. package/web-shell/assets/{cynefin-OW5HDTMX-D6kDsRSh.js → cynefin-OW5HDTMX-B2oF7XD_.js} +1 -1
  280. package/web-shell/assets/{cynefinDiagram-5FMLGOSQ-CCy78qZx.js → cynefinDiagram-5FMLGOSQ-DGgIKpiM.js} +1 -1
  281. package/web-shell/assets/{dagre-3AP2YEHR-D5gJuJsf.js → dagre-3AP2YEHR-BHKawzoP.js} +1 -1
  282. package/web-shell/assets/{diagram-S7CK7UJ4-ZwEZ5W__.js → diagram-S7CK7UJ4-6UgKqreR.js} +1 -1
  283. package/web-shell/assets/{diagram-UQ7AKVKN-B036APjv.js → diagram-UQ7AKVKN-BXJbPJ6F.js} +1 -1
  284. package/web-shell/assets/{diagram-VSXAHHWV-BfDJ57Fq.js → diagram-VSXAHHWV-DVnYFPkS.js} +1 -1
  285. package/web-shell/assets/{diagram-VX7I27RA-Wha0p5rT.js → diagram-VX7I27RA-CjBoC0Rq.js} +1 -1
  286. package/web-shell/assets/{diagram-Z3DM3KII-L20bz2K1.js → diagram-Z3DM3KII-KZdUceQT.js} +1 -1
  287. package/web-shell/assets/{ebnfDiagram-PWID7BFC-D1ZM0Cp7.js → ebnfDiagram-PWID7BFC-5UekGScM.js} +1 -1
  288. package/web-shell/assets/{erDiagram-SSCWMZ5O-CMtA19v8.js → erDiagram-SSCWMZ5O-TRWexoj1.js} +1 -1
  289. package/web-shell/assets/{flowDiagram-A5DVABFB-D96m326S.js → flowDiagram-A5DVABFB-Di5bhBVo.js} +1 -1
  290. package/web-shell/assets/{ganttDiagram-EL5Y4UJY-BuHiYG2o.js → ganttDiagram-EL5Y4UJY-DpJUJ8Dp.js} +1 -1
  291. package/web-shell/assets/{gitGraphDiagram-WWUBYQGX-Ck3NmkSw.js → gitGraphDiagram-WWUBYQGX-b08xIx2C.js} +1 -1
  292. package/web-shell/assets/index-BvDpDHTN.css +36 -0
  293. package/web-shell/assets/index-Cg60lhnI.js +1913 -0
  294. package/web-shell/assets/{index-CBGz4Qjl.js → index-n6dFH09O.js} +1 -1
  295. package/web-shell/assets/{infoDiagram-RXCK75RN-B6DAOyXe.js → infoDiagram-RXCK75RN-Cz14FAt7.js} +1 -1
  296. package/web-shell/assets/{ishikawaDiagram-5VMMS53U-Bpg-joFo.js → ishikawaDiagram-5VMMS53U-7nxp2bIU.js} +1 -1
  297. package/web-shell/assets/{journeyDiagram-EYS64GPL-BclrHzGa.js → journeyDiagram-EYS64GPL-CjL47fk0.js} +1 -1
  298. package/web-shell/assets/{kanban-definition-3QL26DDD-5gJzNTYG.js → kanban-definition-3QL26DDD-CWFl-mHs.js} +1 -1
  299. package/web-shell/assets/{layout-CEz_1L8z.js → layout-BUP1BcwB.js} +1 -1
  300. package/web-shell/assets/{linear-CBjTq9Hc.js → linear-CqbwqSbW.js} +1 -1
  301. package/web-shell/assets/{mermaid.core-Dzhbxx_I.js → mermaid.core-C_50HLol.js} +6 -6
  302. package/web-shell/assets/{mindmap-definition-FBJOCRG2-DQdVqlBF.js → mindmap-definition-FBJOCRG2-DbyD_AoU.js} +1 -1
  303. package/web-shell/assets/{pegDiagram-XKGWAZYB-D1JZlYXL.js → pegDiagram-XKGWAZYB-VozWyqyY.js} +1 -1
  304. package/web-shell/assets/{pieDiagram-E7YTZNPT-BmkpYL0w.js → pieDiagram-E7YTZNPT-O7EKamBL.js} +1 -1
  305. package/web-shell/assets/{quadrantDiagram-AXDQQJYC-DRvD6co5.js → quadrantDiagram-AXDQQJYC-DOmPZxHg.js} +1 -1
  306. package/web-shell/assets/{railroadDiagram-O6MQD6OU-CEdjDuoo.js → railroadDiagram-O6MQD6OU-ElyfC2zE.js} +1 -1
  307. package/web-shell/assets/{requirementDiagram-EFPCY7ZU-BCHG-ie8.js → requirementDiagram-EFPCY7ZU-DbnqPbzR.js} +1 -1
  308. package/web-shell/assets/{sankeyDiagram-P5KCCOFB-C9cZMnye.js → sankeyDiagram-P5KCCOFB-yPWliSHr.js} +1 -1
  309. package/web-shell/assets/{sequenceDiagram-WJ2MYXX4-DYHRV4zL.js → sequenceDiagram-WJ2MYXX4-BImQFomC.js} +1 -1
  310. package/web-shell/assets/{sizeCapture-X5ZJPWSS-DlK21aye.js → sizeCapture-X5ZJPWSS-DEvqeEHo.js} +1 -1
  311. package/web-shell/assets/{stateDiagram-HBIQ2CUA-BrmZssvk.js → stateDiagram-HBIQ2CUA-BbLtiF9u.js} +1 -1
  312. package/web-shell/assets/stateDiagram-v2-4QOOHH4V-DGtlzdpx.js +1 -0
  313. package/web-shell/assets/{swimlanes-XN3QIQJK-D9xfcayR.js → swimlanes-XN3QIQJK-RFewDF6v.js} +1 -1
  314. package/web-shell/assets/swimlanesDiagram-VK2B7HYN-CITCVFdx.js +8 -0
  315. package/web-shell/assets/{timeline-definition-24CTP7MA-D4gdDL_d.js → timeline-definition-24CTP7MA-DF4L3-UR.js} +1 -1
  316. package/web-shell/assets/{vennDiagram-4TSXK5OY-DdhIExjI.js → vennDiagram-4TSXK5OY-BtlSJXaA.js} +1 -1
  317. package/web-shell/assets/{wardleyDiagram-VM6X3IG4-C9RS_Zof.js → wardleyDiagram-VM6X3IG4-C8ogG8Fh.js} +1 -1
  318. package/web-shell/assets/{xychartDiagram-S5SC5T6Z-orRgmxWk.js → xychartDiagram-S5SC5T6Z-C5QVfsGQ.js} +1 -1
  319. package/web-shell/index.html +3 -3
  320. package/chunks/chunk-7DJCPZE3.js +0 -945
  321. package/chunks/chunk-J2OSJFP3.js +0 -202
  322. package/chunks/chunk-K2OJUPOE.js +0 -78
  323. package/chunks/chunk-P3QQPMQA.js +0 -19
  324. package/chunks/chunk-T26EAKDL.js +0 -13
  325. package/chunks/process-registry-PMJOA5CO.js +0 -172
  326. package/web-shell/assets/channel-CENAhErJ.js +0 -1
  327. package/web-shell/assets/classDiagram-DTDB5LWJ-CM6FArGH.js +0 -1
  328. package/web-shell/assets/classDiagram-v2-JRS7N3AN-CM6FArGH.js +0 -1
  329. package/web-shell/assets/index-8hXIpvo4.js +0 -1865
  330. package/web-shell/assets/index-DclEv91i.css +0 -5
  331. package/web-shell/assets/stateDiagram-v2-4QOOHH4V-B2Q7XDaE.js +0 -1
  332. package/web-shell/assets/swimlanesDiagram-VK2B7HYN-DpZPOSbX.js +0 -8
@@ -1,22 +1,25 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
+ import {
4
+ buildPermissionSuggestions
5
+ } from "./chunk-BFSFJR3D.js";
3
6
  import {
4
7
  startPostRenderPrefetches
5
- } from "./chunk-2K6ORIHJ.js";
8
+ } from "./chunk-3CAI35FS.js";
9
+ import {
10
+ stopAndGetCapturedInput
11
+ } from "./chunk-M6FOJXW3.js";
6
12
  import {
7
13
  useAutoAcceptIndicator
8
- } from "./chunk-Z7TGYN5F.js";
14
+ } from "./chunk-FROAFEFB.js";
9
15
  import {
10
16
  classifyApiError,
11
17
  fireSessionDeleteHook
12
18
  } from "./chunk-P5Y23G2L.js";
13
- import {
14
- buildPermissionSuggestions
15
- } from "./chunk-BFSFJR3D.js";
16
19
  import {
17
20
  TUI_CHAT_RECORDING_FAILURE_MESSAGE,
18
21
  reportChatRecordingFailureToAdapter
19
- } from "./chunk-TRZTNIQ6.js";
22
+ } from "./chunk-I6LYRJPB.js";
20
23
  import {
21
24
  MAX_SUGGESTIONS_TO_SHOW,
22
25
  SESSION_MENTION_PREFIX,
@@ -29,10 +32,10 @@ import {
29
32
  normalizePartList,
30
33
  resolveAtCommandQuery,
31
34
  sanitizeDisplayText
32
- } from "./chunk-OIP7C4FE.js";
35
+ } from "./chunk-PO6YCWIQ.js";
33
36
  import {
34
37
  StreamJsonOutputAdapter
35
- } from "./chunk-6LFJEACX.js";
38
+ } from "./chunk-JHDPOPQG.js";
36
39
  import {
37
40
  BuiltinCommandLoader,
38
41
  BundledSkillLoader,
@@ -79,21 +82,21 @@ import {
79
82
  resetBackgroundStateForSessionSwitch,
80
83
  serializeUserPromptExpansionPrompt,
81
84
  supportsMatchers
82
- } from "./chunk-F5SZP77N.js";
85
+ } from "./chunk-BP5PTNCU.js";
83
86
  import {
84
87
  EXTENSION_RELOAD_FAILED_REASON,
85
88
  ExtensionRefreshState,
86
89
  appEvents,
87
90
  cleanupReviewWorktreeLeases,
88
- loadHierarchicalGeminiMemory
89
- } from "./chunk-BAJKAAOY.js";
91
+ loadHierarchicalMemory
92
+ } from "./chunk-TGJ2PKCW.js";
90
93
  import {
91
94
  disableKittyProtocol,
92
95
  isKittyProtocolEnabled,
93
96
  isKittyProtocolSupported,
94
97
  pushKittyProtocolFlags
95
98
  } from "./chunk-NYX53SV4.js";
96
- import "./chunk-AGR5UROZ.js";
99
+ import "./chunk-YN44TEOZ.js";
97
100
  import {
98
101
  AboutBox,
99
102
  BaseSelectionList,
@@ -171,21 +174,21 @@ import {
171
174
  useUIActions,
172
175
  useUIState,
173
176
  useVirtualViewport
174
- } from "./chunk-CCBZDVUA.js";
177
+ } from "./chunk-UI4DXRZW.js";
175
178
  import {
176
179
  KeypressProvider,
177
180
  useFocus,
178
181
  useKeypress,
179
182
  useKeypressContext
180
- } from "./chunk-T32W2JHI.js";
183
+ } from "./chunk-SS5SDCD3.js";
181
184
  import {
182
185
  getCommandDisplayName,
183
186
  getCommandSourceBadge
184
- } from "./chunk-IJKTMLBE.js";
187
+ } from "./chunk-FIKYKQOO.js";
185
188
  import {
186
189
  computeSessionStats,
187
190
  levelLabel
188
- } from "./chunk-K2NQPH5D.js";
191
+ } from "./chunk-OJEMXKA4.js";
189
192
  import {
190
193
  BEL,
191
194
  OSC_PREFIX,
@@ -198,7 +201,7 @@ import {
198
201
  oscKittyNotify,
199
202
  saveClipboardImage,
200
203
  writeOsc52
201
- } from "./chunk-FDY5RMGH.js";
204
+ } from "./chunk-CFJY4DGX.js";
202
205
  import "./chunk-4WGODMVR.js";
203
206
  import {
204
207
  MaxSizedBox,
@@ -206,11 +209,11 @@ import {
206
209
  useOverflowState
207
210
  } from "./chunk-NU7RKEZR.js";
208
211
  import {
209
- GeminiRespondingSpinner,
210
- GeminiSpinner,
211
212
  ICON,
213
+ RespondingSpinner,
212
214
  SCREEN_READER_USER_PREFIX,
213
215
  SHELL_COMMAND_NAME,
216
+ Spinner,
214
217
  StreamingContext,
215
218
  applyCollapsePolicyAndSummary,
216
219
  buildResumedHistoryItems,
@@ -222,7 +225,7 @@ import {
222
225
  useStreamingContext,
223
226
  waitForGoalRuntime,
224
227
  wrapAnsi
225
- } from "./chunk-2NYCN6F2.js";
228
+ } from "./chunk-WD3WSEW3.js";
226
229
  import {
227
230
  formatDuration,
228
231
  formatRelativeTime,
@@ -251,9 +254,7 @@ import {
251
254
  import {
252
255
  require_react
253
256
  } from "./chunk-5QWWOFGG.js";
254
- import {
255
- stopAndGetCapturedInput
256
- } from "./chunk-M6FOJXW3.js";
257
+ import "./chunk-IJMEPQ5N.js";
257
258
  import "./chunk-BXDAPVQU.js";
258
259
  import {
259
260
  MAX_INLINE_IMAGES_PER_ITEM,
@@ -262,35 +263,34 @@ import {
262
263
  } from "./chunk-TPI7O7HR.js";
263
264
  import {
264
265
  setUpdateHandler
265
- } from "./chunk-4JWNNLPT.js";
266
+ } from "./chunk-B42A5ZHA.js";
266
267
  import {
267
268
  isHistoryItemVisibleAfterRestore
268
269
  } from "./chunk-EKTCKZV5.js";
269
- import "./chunk-QP4C6WCE.js";
270
+ import "./chunk-PI6HYGBE.js";
270
271
  import "./chunk-YAF2MQZ6.js";
271
- import "./chunk-FY76G3G5.js";
272
+ import "./chunk-W3CY4QIO.js";
272
273
  import {
273
274
  AUTO_THEME_NAME,
274
275
  DEFAULT_THEME,
275
276
  themeManager
276
277
  } from "./chunk-QFCDF5PL.js";
277
278
  import "./chunk-KW7NOTN6.js";
278
- import "./chunk-C6K43ZDE.js";
279
+ import "./chunk-W7HH77GN.js";
279
280
  import "./chunk-6H67XLET.js";
280
- import "./chunk-A7YP63XN.js";
281
+ import "./chunk-J7SS77YW.js";
281
282
  import {
282
283
  getErrorMessage as getErrorMessage2
283
- } from "./chunk-L6YT5H34.js";
284
+ } from "./chunk-CVUBULIX.js";
284
285
  import {
285
286
  relaunchApp
286
- } from "./chunk-CSMI4FP5.js";
287
- import "./chunk-66KDY3LV.js";
287
+ } from "./chunk-UAOTD2BN.js";
288
288
  import {
289
289
  openQwenAsrRealtimeStream,
290
290
  openVoiceStream,
291
291
  openVoiceStreamWithRetry
292
292
  } from "./chunk-RU7BK6B3.js";
293
- import "./chunk-3SGB2UHX.js";
293
+ import "./chunk-NENQE7VH.js";
294
294
  import "./chunk-BFPESSTR.js";
295
295
  import {
296
296
  cpLen,
@@ -305,14 +305,15 @@ import {
305
305
  toCodePoints,
306
306
  truncateToWidth
307
307
  } from "./chunk-E7REAOTN.js";
308
- import "./chunk-XDLEZ5HX.js";
308
+ import "./chunk-ZZUKP7HV.js";
309
309
  import {
310
310
  stringWidth
311
311
  } from "./chunk-2MIN6GRR.js";
312
312
  import "./chunk-QHTIBUWB.js";
313
313
  import "./chunk-TXASDT2M.js";
314
- import "./chunk-UXEO7E3V.js";
314
+ import "./chunk-4VQBQLIZ.js";
315
315
  import "./chunk-RXFQM6FQ.js";
316
+ import "./chunk-UXEO7E3V.js";
316
317
  import {
317
318
  isValidSessionId
318
319
  } from "./chunk-ZEZKIS2K.js";
@@ -322,58 +323,58 @@ import {
322
323
  isStreamingVoiceModel,
323
324
  resolveVoiceStreamConfig,
324
325
  transcribeVoiceAudio
325
- } from "./chunk-JCQD3INC.js";
326
+ } from "./chunk-URE3QBBB.js";
326
327
  import {
327
328
  formatUnsupportedVoiceModelMessage,
328
329
  isSelectableVoiceModel
329
- } from "./chunk-XRSOI3DL.js";
330
+ } from "./chunk-A3LWD5MK.js";
330
331
  import "./chunk-YTDVNSUQ.js";
331
332
  import {
332
333
  getExtendedSystemInfo
333
- } from "./chunk-RJC5EIKY.js";
334
- import "./chunk-6CGL7E7G.js";
334
+ } from "./chunk-HHQJANFM.js";
335
+ import "./chunk-IZDKYNKN.js";
335
336
  import "./chunk-7U5G6JXI.js";
336
337
  import "./chunk-WCCLLK7X.js";
337
338
  import {
338
339
  isInlineModelOverrideAllowed
339
- } from "./chunk-Q26AYA62.js";
340
+ } from "./chunk-VKCJPNGU.js";
340
341
  import {
341
342
  computeWorkspaceSkillListUpdates,
342
343
  resolveSkillSettings,
343
344
  skillSettingStrings
344
- } from "./chunk-Z4X5MTRT.js";
345
- import "./chunk-FBSSIAAQ.js";
345
+ } from "./chunk-HCOBAG2L.js";
346
+ import "./chunk-AMLXTTJJ.js";
346
347
  import {
347
348
  requestConsentInteractive,
348
349
  requestConsentOrFail
349
- } from "./chunk-PFCQ62V4.js";
350
+ } from "./chunk-JWDMKJG5.js";
350
351
  import "./chunk-57OAHC2Y.js";
351
- import "./chunk-HVQ3B7FF.js";
352
- import "./chunk-7JPW6IYH.js";
353
- import "./chunk-5XBFCMWD.js";
352
+ import "./chunk-Y5S7LBOZ.js";
353
+ import "./chunk-3XKLXHGK.js";
354
+ import "./chunk-HVC3PNVC.js";
354
355
  import "./chunk-V6WHFGST.js";
355
356
  import {
356
357
  createLoadedSettingsAdapter
357
- } from "./chunk-CPGJJJLU.js";
358
- import "./chunk-MZS7GEC7.js";
358
+ } from "./chunk-SEDFP3ZI.js";
359
+ import "./chunk-FTF2YIZ5.js";
359
360
  import "./chunk-2AUM35J5.js";
360
361
  import "./chunk-OZ6KS6KW.js";
361
362
  import "./chunk-6PLDPT2C.js";
362
363
  import "./chunk-FYJ7W2PI.js";
363
364
  import "./chunk-STUJ7IMZ.js";
364
- import "./chunk-JVPFTDBK.js";
365
- import "./chunk-ALMR3E6Q.js";
366
365
  import "./chunk-GYTKQYDB.js";
366
+ import "./chunk-RFIDDFAL.js";
367
+ import "./chunk-ALMR3E6Q.js";
367
368
  import "./chunk-RKFGE7JH.js";
368
369
  import "./chunk-UDG5EZJI.js";
369
370
  import "./chunk-3VUENPWF.js";
370
371
  import "./chunk-M5GB774H.js";
371
372
  import "./chunk-7EQQR46F.js";
372
- import "./chunk-E55H6BZ7.js";
373
+ import "./chunk-ICURCKIU.js";
373
374
  import "./chunk-IW6RQPQB.js";
374
375
  import {
375
376
  loadMcpApprovals
376
- } from "./chunk-5O72BNDD.js";
377
+ } from "./chunk-F5RB4S23.js";
377
378
  import {
378
379
  CORRUPTED_SUFFIX,
379
380
  SettingScope,
@@ -395,11 +396,11 @@ import {
395
396
  settingExistsInScope,
396
397
  validateSettingValue,
397
398
  writeOutputLanguageAndRegisterPath
398
- } from "./chunk-F7TNAPZ4.js";
399
+ } from "./chunk-5SBVOOA2.js";
399
400
  import "./chunk-RKUWKYED.js";
400
401
  import {
401
402
  TOGGLE_TYPES
402
- } from "./chunk-JSC3H3TD.js";
403
+ } from "./chunk-RZKOA4JE.js";
403
404
  import "./chunk-GOXKNSDZ.js";
404
405
  import "./chunk-IDS7MSUP.js";
405
406
  import {
@@ -407,19 +408,19 @@ import {
407
408
  localizeToolDisplayName,
408
409
  t,
409
410
  ta
410
- } from "./chunk-LDP5OD6N.js";
411
+ } from "./chunk-CLWO3B77.js";
411
412
  import "./chunk-5EJZE3FP.js";
412
- import "./chunk-IK5BW3CS.js";
413
- import "./chunk-5PA6UEYA.js";
414
- import "./chunk-V2NDP3I4.js";
413
+ import "./chunk-5ZJL3AIV.js";
414
+ import "./chunk-MZCJWS5Y.js";
415
+ import "./chunk-2AEHQRY2.js";
415
416
  import {
416
417
  getCliVersion
417
- } from "./chunk-7UYV53BC.js";
418
+ } from "./chunk-GIHXH2KO.js";
418
419
  import "./chunk-W3N5XAZ6.js";
419
420
  import {
420
421
  isWorkspaceTrusted,
421
422
  loadTrustedFolders
422
- } from "./chunk-V4QXXQJ2.js";
423
+ } from "./chunk-H4LCV44K.js";
423
424
  import {
424
425
  require_strip_json_comments
425
426
  } from "./chunk-NPQ5ZKRP.js";
@@ -470,26 +471,26 @@ import {
470
471
  startSpeculation,
471
472
  subagentGenerator,
472
473
  watchRepoBranch
473
- } from "./chunk-KUX5D6DK.js";
474
+ } from "./chunk-BFYGL2XL.js";
474
475
  import {
475
476
  saveWorkflowScript,
476
477
  validateWorkflowName
477
- } from "./chunk-3DXFGHAJ.js";
478
+ } from "./chunk-VNMZLAVG.js";
478
479
  import "./chunk-XFSFZCM5.js";
479
480
  import "./chunk-2EAZ43JQ.js";
480
481
  import "./chunk-NF5J2WFA.js";
481
482
  import "./chunk-CQH5KTKC.js";
482
483
  import "./chunk-LJZSMWOH.js";
483
- import "./chunk-6LFTG244.js";
484
- import "./chunk-PKAYJDB3.js";
485
- import "./chunk-6IUNAPLR.js";
484
+ import "./chunk-TU6WVK67.js";
485
+ import "./chunk-WNPDGUJO.js";
486
+ import "./chunk-K5KXUXWC.js";
486
487
  import {
487
488
  clearWorktreeSession,
488
489
  isSessionRuntimeActive,
489
490
  readWorktreeSession,
490
491
  restoreWorktreeContext
491
- } from "./chunk-OIVXBW3W.js";
492
- import "./chunk-4CDSK5AZ.js";
492
+ } from "./chunk-62GQFYID.js";
493
+ import "./chunk-AYFA7MZV.js";
493
494
  import "./chunk-XQFT3QUF.js";
494
495
  import "./chunk-VTHREBQM.js";
495
496
  import "./chunk-ZPJWUGCS.js";
@@ -499,8 +500,8 @@ import {
499
500
  sanitizeForOsc,
500
501
  supportsHyperlinks,
501
502
  wrapForMultiplexer
502
- } from "./chunk-H2WDGQ6D.js";
503
- import "./chunk-MIIVI25Q.js";
503
+ } from "./chunk-3JXM2CVW.js";
504
+ import "./chunk-ST5V3ZOC.js";
504
505
  import {
505
506
  ConditionalRulesRegistry,
506
507
  CoreToolScheduler,
@@ -539,6 +540,7 @@ import {
539
540
  getExtensionDisplayName,
540
541
  getTimeRangeBounds,
541
542
  getToolResponseDisplayText,
543
+ goalToolResultProvenance,
542
544
  ideContextStore,
543
545
  isActiveWorkflowStatus,
544
546
  isClearedMediaPlaceholder,
@@ -567,7 +569,7 @@ import {
567
569
  refreshMemoryInstruction,
568
570
  registerSession,
569
571
  stripTerminalControlSequences
570
- } from "./chunk-TGWAQ5RB.js";
572
+ } from "./chunk-ECE3UYVO.js";
571
573
  import "./chunk-GOFAQQZA.js";
572
574
  import "./chunk-5M6IDOMF.js";
573
575
  import {
@@ -575,70 +577,70 @@ import {
575
577
  } from "./chunk-TWPJO254.js";
576
578
  import "./chunk-CQ35AJ4Z.js";
577
579
  import "./chunk-EKSCLBBF.js";
578
- import "./chunk-P2SU6ZTI.js";
579
- import "./chunk-IZIVM7LZ.js";
580
- import "./chunk-SFPGAQUL.js";
580
+ import "./chunk-LUEHOUHM.js";
581
+ import "./chunk-WXEA74YB.js";
582
+ import "./chunk-42IDLQWS.js";
581
583
  import "./chunk-6PVPNMXU.js";
582
584
  import {
583
585
  resolveModelId
584
586
  } from "./chunk-JB4JIVTJ.js";
587
+ import "./chunk-DJBQCO2E.js";
585
588
  import "./chunk-IRH27ZC2.js";
586
589
  import "./chunk-QHWCP53L.js";
587
590
  import "./chunk-D5LUXLUH.js";
588
591
  import {
589
592
  promptIdContext
590
593
  } from "./chunk-O6GEWCJA.js";
591
- import "./chunk-T26EAKDL.js";
594
+ import "./chunk-LGO7DEXL.js";
592
595
  import {
593
596
  GitWorktreeService,
594
597
  readWorktreeSessionMarker,
595
598
  writeRuntimeStatus
596
- } from "./chunk-EOGELB3H.js";
599
+ } from "./chunk-2SXSLSQE.js";
597
600
  import "./chunk-CPBF7KYF.js";
598
- import "./chunk-EFUM7RVY.js";
601
+ import "./chunk-KJO2LBUK.js";
599
602
  import {
600
603
  HOOKS_CONFIG_FIELDS
601
604
  } from "./chunk-TTX2JUE6.js";
602
- import "./chunk-43GGFFLY.js";
605
+ import "./chunk-4K7KNVWH.js";
603
606
  import {
604
- getGitBranch,
605
607
  glob
606
- } from "./chunk-SMPR7SPO.js";
608
+ } from "./chunk-QJNDUTOL.js";
609
+ import {
610
+ getGitBranch
611
+ } from "./chunk-UVY67MSH.js";
607
612
  import "./chunk-JWALNCLT.js";
608
613
  import "./chunk-NIFYWDYN.js";
609
- import "./chunk-3AFMQUTI.js";
614
+ import "./chunk-C2X7KY45.js";
610
615
  import {
611
616
  elapsedActiveTime,
612
617
  goalRequiresExactPermit
613
- } from "./chunk-WKK5BQNP.js";
618
+ } from "./chunk-JHYH6PYQ.js";
619
+ import "./chunk-7J6OTNGO.js";
614
620
  import {
615
621
  APPROVAL_MODES
616
622
  } from "./chunk-V5J4J5TP.js";
617
623
  import "./chunk-MLXTMF7H.js";
618
624
  import "./chunk-NAVJD2PQ.js";
619
- import "./chunk-3JGZSIDA.js";
620
- import "./chunk-VVW4ZNFY.js";
625
+ import "./chunk-B466ZSHZ.js";
626
+ import "./chunk-4QHPPXK2.js";
621
627
  import "./chunk-QHMLYMMS.js";
622
- import "./chunk-7DJCPZE3.js";
623
- import "./chunk-P3QQPMQA.js";
624
- import "./chunk-HVEYF6VT.js";
628
+ import "./chunk-3WK3QDNV.js";
625
629
  import "./chunk-VNOVK4I7.js";
626
- import "./chunk-SAH4BD2J.js";
627
- import "./chunk-PDMJ3KGS.js";
630
+ import "./chunk-PQEISIKS.js";
631
+ import "./chunk-EB6QRGHM.js";
628
632
  import {
629
633
  runOutsideAgentContext
630
634
  } from "./chunk-CMHFCLBU.js";
631
635
  import "./chunk-S6LOFUVP.js";
636
+ import "./chunk-CFKIH3D3.js";
632
637
  import {
633
638
  REASONING_EFFORT_TIERS,
634
639
  applyReasoningEffort
635
640
  } from "./chunk-2LD5U7Q3.js";
636
641
  import "./chunk-DJ2GSRLV.js";
637
- import "./chunk-J2OSJFP3.js";
638
- import "./chunk-K2OJUPOE.js";
639
- import "./chunk-CFKIH3D3.js";
640
- import "./chunk-4FTKQNWJ.js";
641
- import "./chunk-Y3QL45LS.js";
642
+ import "./chunk-DYXFD5RO.js";
643
+ import "./chunk-V4264FEG.js";
642
644
  import {
643
645
  ApiCancelEvent,
644
646
  AuthEvent,
@@ -677,14 +679,14 @@ import {
677
679
  runVisionBridge,
678
680
  shouldRunVisionBridge,
679
681
  splitImageParts
680
- } from "./chunk-L2M46FP5.js";
681
- import "./chunk-YRLW2MSX.js";
682
+ } from "./chunk-QYMAKPY5.js";
683
+ import "./chunk-XBVNNDPK.js";
682
684
  import "./chunk-VGC4I5JJ.js";
683
685
  import {
684
- getAllGeminiMdFilenames,
686
+ getAllMemoryFilenames,
685
687
  getUnsupportedImageFormatWarning,
686
688
  isSupportedImageMimeType
687
- } from "./chunk-3I6UTTDX.js";
689
+ } from "./chunk-BKWNKLZB.js";
688
690
  import {
689
691
  AUTO_MEMORY_INDEX_FILENAME,
690
692
  getAutoMemoryProjectStateDir,
@@ -702,7 +704,7 @@ import {
702
704
  import "./chunk-6DIGWMGT.js";
703
705
  import {
704
706
  MAINLINE_CODER_MODEL
705
- } from "./chunk-Z7FLBQPR.js";
707
+ } from "./chunk-ARF6IJHM.js";
706
708
  import "./chunk-XZA32HII.js";
707
709
  import {
708
710
  atomicWriteFileSync
@@ -714,7 +716,7 @@ import {
714
716
  getActiveInteractionSpan,
715
717
  isBinary,
716
718
  redactUrlCredentials
717
- } from "./chunk-L6BZRIUL.js";
719
+ } from "./chunk-B5PHIJGI.js";
718
720
  import "./chunk-74TONY4F.js";
719
721
  import "./chunk-XF63PKEN.js";
720
722
  import {
@@ -742,11 +744,12 @@ import {
742
744
  shortenPath,
743
745
  tildeifyPath
744
746
  } from "./chunk-UHQFIS7N.js";
745
- import "./chunk-W5MJJ2V7.js";
747
+ import "./chunk-BIJEBAAQ.js";
748
+ import "./chunk-WLEYH7CD.js";
746
749
  import {
747
750
  registerCleanup,
748
751
  runExitCleanup
749
- } from "./chunk-Y6LSMB6J.js";
752
+ } from "./chunk-K6CTN5TU.js";
750
753
  import {
751
754
  finalizeStartupProfile,
752
755
  profileCheckpoint
@@ -757,7 +760,7 @@ import {
757
760
  writeStderrLine,
758
761
  writeStderrLineSafe,
759
762
  writeStdoutLine
760
- } from "./chunk-KGJGEEVR.js";
763
+ } from "./chunk-7FA2II6K.js";
761
764
  import "./chunk-75DOP5OR.js";
762
765
  import "./chunk-DMTGGOSA.js";
763
766
  import "./chunk-YQ3U5MUC.js";
@@ -1368,7 +1371,7 @@ var RemoteInputWatcher = class {
1368
1371
  }
1369
1372
  /**
1370
1373
  * Register the TUI's submit function. Called from AppContainer
1371
- * once useGeminiStream's submitQuery is available.
1374
+ * once useLlmStream's submitQuery is available.
1372
1375
  */
1373
1376
  setSubmitFn(fn) {
1374
1377
  this.submitFn = fn;
@@ -4406,7 +4409,7 @@ var MainContent = /* @__PURE__ */ __name(({ footerRef }) => {
4406
4409
  terminalWidth,
4407
4410
  mainAreaWidth,
4408
4411
  availableTerminalHeight: uiState.constrainHeight ? staticAreaMaxItemHeight : void 0,
4409
- availableTerminalHeightGemini: uiState.constrainHeight ? MAX_GEMINI_MESSAGE_LINES : void 0,
4412
+ availableTerminalHeightLlm: uiState.constrainHeight ? MAX_GEMINI_MESSAGE_LINES : void 0,
4410
4413
  item,
4411
4414
  isPending: false,
4412
4415
  commands: uiState.slashCommands,
@@ -4482,7 +4485,7 @@ var MainContent = /* @__PURE__ */ __name(({ footerRef }) => {
4482
4485
  terminalWidth,
4483
4486
  mainAreaWidth,
4484
4487
  availableTerminalHeight: staticAreaMaxItemHeight,
4485
- availableTerminalHeightGemini: MAX_GEMINI_MESSAGE_LINES,
4488
+ availableTerminalHeightLlm: MAX_GEMINI_MESSAGE_LINES,
4486
4489
  item: h,
4487
4490
  isPending: false,
4488
4491
  commands: uiState.slashCommands,
@@ -13263,7 +13266,7 @@ var IdeTrustChangeDialog = /* @__PURE__ */ __name(({ reason }) => {
13263
13266
  }
13264
13267
  return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Box_default, { borderStyle: "round", borderColor: theme.status.warning, paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Text, { color: theme.status.warning, children: [
13265
13268
  message,
13266
- " Press 'r' to restart Gemini to apply the changes."
13269
+ " Press 'r' to restart Qwen Code and apply the changes."
13267
13270
  ] }) });
13268
13271
  }, "IdeTrustChangeDialog");
13269
13272
 
@@ -15607,10 +15610,8 @@ function SkillsManagerDialog({
15607
15610
  settings,
15608
15611
  "Workspace" /* Workspace */
15609
15612
  ).filter((name) => typeof name === "string");
15610
- const lockedNames = new Set(lockedSkills.map((skill) => lower(skill.name)));
15611
15613
  const { disabled, enabled, disabledChanged, enabledChanged } = computeWorkspaceSkillListUpdates(
15612
15614
  workspaceDisabled,
15613
- lockedNames,
15614
15615
  skillSettingStrings(settings, "Workspace" /* Workspace */, "enabled"),
15615
15616
  unlockedSkills.map((skill) => ({
15616
15617
  name: skill.name,
@@ -15673,7 +15674,6 @@ function SkillsManagerDialog({
15673
15674
  addItem,
15674
15675
  initialResolved,
15675
15676
  initialSelectedKeys,
15676
- lockedSkills,
15677
15677
  reloadCommands,
15678
15678
  selectedKeys,
15679
15679
  settings,
@@ -17632,9 +17632,9 @@ var AuthenticateStep = /* @__PURE__ */ __name(({
17632
17632
  })
17633
17633
  ]);
17634
17634
  }
17635
- const geminiClient = config.getGeminiClient();
17636
- if (geminiClient) {
17637
- await geminiClient.setTools();
17635
+ const llmClient = config.getLlmClient();
17636
+ if (llmClient) {
17637
+ await llmClient.setTools();
17638
17638
  }
17639
17639
  setMessages((prev) => [
17640
17640
  ...prev,
@@ -22701,7 +22701,7 @@ import { spawn } from "node:child_process";
22701
22701
  var import_jsx_runtime95 = __toESM(require_jsx_runtime(), 1);
22702
22702
  var DISPLAY_ENV_VARS = ["DISPLAY", "WAYLAND_DISPLAY", "MIR_SOCKET"];
22703
22703
  async function resolvePreferredMemoryFile(dir, fallbackFilename) {
22704
- for (const filename of getAllGeminiMdFilenames()) {
22704
+ for (const filename of getAllMemoryFilenames()) {
22705
22705
  const filePath = path4.join(dir, filename);
22706
22706
  try {
22707
22707
  await fs9.access(filePath);
@@ -22786,14 +22786,14 @@ function MemoryDialog({ onClose }) {
22786
22786
  const globalMemoryPath = (0, import_react73.useMemo)(
22787
22787
  () => path4.join(
22788
22788
  Storage.getGlobalQwenDir(),
22789
- getAllGeminiMdFilenames()[0] ?? "QWEN.md"
22789
+ getAllMemoryFilenames()[0] ?? "QWEN.md"
22790
22790
  ),
22791
22791
  []
22792
22792
  );
22793
22793
  const projectMemoryPath = (0, import_react73.useMemo)(
22794
22794
  () => path4.join(
22795
22795
  config.getWorkingDir(),
22796
- getAllGeminiMdFilenames()[0] ?? "QWEN.md"
22796
+ getAllMemoryFilenames()[0] ?? "QWEN.md"
22797
22797
  ),
22798
22798
  [config]
22799
22799
  );
@@ -22896,12 +22896,12 @@ function MemoryDialog({ onClose }) {
22896
22896
  case "project":
22897
22897
  return resolvePreferredMemoryFile(
22898
22898
  config.getWorkingDir(),
22899
- getAllGeminiMdFilenames()[0] ?? "QWEN.md"
22899
+ getAllMemoryFilenames()[0] ?? "QWEN.md"
22900
22900
  );
22901
22901
  case "global":
22902
22902
  return resolvePreferredMemoryFile(
22903
22903
  Storage.getGlobalQwenDir(),
22904
- getAllGeminiMdFilenames()[0] ?? "QWEN.md"
22904
+ getAllMemoryFilenames()[0] ?? "QWEN.md"
22905
22905
  );
22906
22906
  default: {
22907
22907
  const _exhaustive = item.value;
@@ -25694,7 +25694,7 @@ var LoadingIndicator = /* @__PURE__ */ __name(({
25694
25694
  children: [
25695
25695
  /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(Box_default, { children: [
25696
25696
  /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(Box_default, { marginRight: 1, children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
25697
- GeminiRespondingSpinner,
25697
+ RespondingSpinner,
25698
25698
  {
25699
25699
  nonRespondingDisplay: streamingState === "waiting_for_confirmation" /* WaitingForConfirmation */ ? "\u280F" : ""
25700
25700
  }
@@ -28225,7 +28225,8 @@ var DEFAULT_STATE2 = {
28225
28225
  agentShellFocused: false,
28226
28226
  agentInputBufferText: "",
28227
28227
  agentTabBarFocused: false,
28228
- agentApprovalModes: /* @__PURE__ */ new Map()
28228
+ agentApprovalModes: /* @__PURE__ */ new Map(),
28229
+ agentMessageQueues: /* @__PURE__ */ new Map()
28229
28230
  };
28230
28231
  var noop2 = /* @__PURE__ */ __name(() => {
28231
28232
  }, "noop");
@@ -28239,7 +28240,9 @@ var DEFAULT_ACTIONS2 = {
28239
28240
  setAgentShellFocused: noop2,
28240
28241
  setAgentInputBufferText: noop2,
28241
28242
  setAgentTabBarFocused: noop2,
28242
- setAgentApprovalMode: noop2
28243
+ setAgentApprovalMode: noop2,
28244
+ setAgentMessageQueue: noop2,
28245
+ appendToAgentMessageQueue: noop2
28243
28246
  };
28244
28247
  function useAgentViewState() {
28245
28248
  return (0, import_react95.useContext)(AgentViewStateContext) ?? DEFAULT_STATE2;
@@ -28261,6 +28264,8 @@ function AgentViewProvider({
28261
28264
  const [agentInputBufferText, setAgentInputBufferText] = (0, import_react95.useState)("");
28262
28265
  const [agentTabBarFocused, setAgentTabBarFocused] = (0, import_react95.useState)(false);
28263
28266
  const [agentApprovalModes, setAgentApprovalModes] = (0, import_react95.useState)(() => /* @__PURE__ */ new Map());
28267
+ const [agentMessageQueues, setAgentMessageQueues] = (0, import_react95.useState)(() => /* @__PURE__ */ new Map());
28268
+ const registeredIdsRef = (0, import_react95.useRef)(/* @__PURE__ */ new Set());
28264
28269
  const switchToAgent = (0, import_react95.useCallback)(
28265
28270
  (agentId) => {
28266
28271
  if (agents.has(agentId)) {
@@ -28294,6 +28299,7 @@ function AgentViewProvider({
28294
28299
  }, [activeView]);
28295
28300
  const registerAgent = (0, import_react95.useCallback)(
28296
28301
  (agentId, interactiveAgent, modelId, color, modelName) => {
28302
+ registeredIdsRef.current.add(agentId);
28297
28303
  setAgents((prev) => {
28298
28304
  const next = new Map(prev);
28299
28305
  next.set(agentId, {
@@ -28314,6 +28320,7 @@ function AgentViewProvider({
28314
28320
  []
28315
28321
  );
28316
28322
  const unregisterAgent = (0, import_react95.useCallback)((agentId) => {
28323
+ registeredIdsRef.current.delete(agentId);
28317
28324
  setAgents((prev) => {
28318
28325
  if (!prev.has(agentId)) return prev;
28319
28326
  const next = new Map(prev);
@@ -28326,11 +28333,19 @@ function AgentViewProvider({
28326
28333
  next.delete(agentId);
28327
28334
  return next;
28328
28335
  });
28336
+ setAgentMessageQueues((prev) => {
28337
+ if (!prev.has(agentId)) return prev;
28338
+ const next = new Map(prev);
28339
+ next.delete(agentId);
28340
+ return next;
28341
+ });
28329
28342
  setActiveView((current) => current === agentId ? "main" : current);
28330
28343
  }, []);
28331
28344
  const unregisterAll = (0, import_react95.useCallback)(() => {
28345
+ registeredIdsRef.current.clear();
28332
28346
  setAgents(/* @__PURE__ */ new Map());
28333
28347
  setAgentApprovalModes(/* @__PURE__ */ new Map());
28348
+ setAgentMessageQueues(/* @__PURE__ */ new Map());
28334
28349
  setActiveView("main");
28335
28350
  setAgentTabBarFocused(false);
28336
28351
  }, []);
@@ -28348,6 +28363,31 @@ function AgentViewProvider({
28348
28363
  },
28349
28364
  [agents]
28350
28365
  );
28366
+ const setAgentMessageQueue = (0, import_react95.useCallback)(
28367
+ (agentId, queue) => {
28368
+ setAgentMessageQueues((prev) => {
28369
+ const next = new Map(prev);
28370
+ if (queue.length === 0) {
28371
+ next.delete(agentId);
28372
+ } else {
28373
+ next.set(agentId, queue);
28374
+ }
28375
+ return next;
28376
+ });
28377
+ },
28378
+ []
28379
+ );
28380
+ const appendToAgentMessageQueue = (0, import_react95.useCallback)(
28381
+ (agentId, message) => {
28382
+ if (!registeredIdsRef.current.has(agentId)) return;
28383
+ setAgentMessageQueues((prev) => {
28384
+ const next = new Map(prev);
28385
+ next.set(agentId, [...next.get(agentId) ?? [], message]);
28386
+ return next;
28387
+ });
28388
+ },
28389
+ []
28390
+ );
28351
28391
  const state = (0, import_react95.useMemo)(
28352
28392
  () => ({
28353
28393
  activeView,
@@ -28355,7 +28395,8 @@ function AgentViewProvider({
28355
28395
  agentShellFocused,
28356
28396
  agentInputBufferText,
28357
28397
  agentTabBarFocused,
28358
- agentApprovalModes
28398
+ agentApprovalModes,
28399
+ agentMessageQueues
28359
28400
  }),
28360
28401
  [
28361
28402
  activeView,
@@ -28363,7 +28404,8 @@ function AgentViewProvider({
28363
28404
  agentShellFocused,
28364
28405
  agentInputBufferText,
28365
28406
  agentTabBarFocused,
28366
- agentApprovalModes
28407
+ agentApprovalModes,
28408
+ agentMessageQueues
28367
28409
  ]
28368
28410
  );
28369
28411
  const actions = (0, import_react95.useMemo)(
@@ -28377,7 +28419,9 @@ function AgentViewProvider({
28377
28419
  setAgentShellFocused,
28378
28420
  setAgentInputBufferText,
28379
28421
  setAgentTabBarFocused,
28380
- setAgentApprovalMode
28422
+ setAgentApprovalMode,
28423
+ setAgentMessageQueue,
28424
+ appendToAgentMessageQueue
28381
28425
  }),
28382
28426
  [
28383
28427
  switchToAgent,
@@ -28389,7 +28433,9 @@ function AgentViewProvider({
28389
28433
  setAgentShellFocused,
28390
28434
  setAgentInputBufferText,
28391
28435
  setAgentTabBarFocused,
28392
- setAgentApprovalMode
28436
+ setAgentApprovalMode,
28437
+ setAgentMessageQueue,
28438
+ appendToAgentMessageQueue
28393
28439
  ]
28394
28440
  );
28395
28441
  useArenaInProcess(config ?? null, actions);
@@ -30074,10 +30120,10 @@ var InputPrompt = /* @__PURE__ */ __name(({
30074
30120
  [bgEntries, liveAgentPanelMaxRows]
30075
30121
  );
30076
30122
  const hasActiveToolConfirmation = (0, import_react99.useMemo)(
30077
- () => Boolean(uiState.confirmationRequest) || (uiState.pendingGeminiHistoryItems ?? []).some(
30123
+ () => Boolean(uiState.confirmationRequest) || (uiState.pendingLlmHistoryItems ?? []).some(
30078
30124
  (item) => item.type === "tool_group" && item.tools.some((tool) => tool.confirmationDetails)
30079
30125
  ),
30080
- [uiState.confirmationRequest, uiState.pendingGeminiHistoryItems]
30126
+ [uiState.confirmationRequest, uiState.pendingLlmHistoryItems]
30081
30127
  );
30082
30128
  const [historyRestoredText, setHistoryRestoredText] = (0, import_react99.useState)(
30083
30129
  null
@@ -32350,11 +32396,11 @@ var Footer = /* @__PURE__ */ __name(({ containerRef }) => {
32350
32396
  const contextWindowSize = config.getContentGeneratorConfig()?.contextWindowSize;
32351
32397
  const suppressHint = statusLineLines.length > 0;
32352
32398
  const leftBottomContent = uiState.ctrlCPressedOnce ? /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(Text, { color: theme.status.warning, children: t("Press Ctrl+C again to exit.") }) : uiState.ctrlDPressedOnce ? /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(Text, { color: theme.status.warning, children: t("Press Ctrl+D again to exit.") }) : uiState.showEscapePrompt ? /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(Text, { color: theme.text.secondary, children: t("Press Esc again to clear.") }) : pasteProgress.active ? /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(PasteProgressBar, { progress: pasteProgress }) : uiState.rewindEscPending ? /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(Text, { color: theme.text.secondary, children: t("Press Esc again to rewind conversation.") }) : vimEnabled && vimMode === "INSERT" ? /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(Text, { color: theme.text.secondary, children: "-- INSERT --" }) : vimEnabled && vimMode === "NORMAL" ? /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(Text, { color: theme.text.secondary, children: "-- NORMAL --" }) : uiState.shellModeActive ? /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(ShellModeIndicator, {}) : configInitMessage ? /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(Text, { color: theme.text.secondary, children: [
32353
- /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(GeminiSpinner, {}),
32399
+ /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(Spinner, {}),
32354
32400
  " ",
32355
32401
  configInitMessage
32356
32402
  ] }) : uiState.startupIdeConnectionStatus.state === "connecting" ? /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(Text, { color: theme.text.secondary, children: [
32357
- /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(GeminiSpinner, {}),
32403
+ /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(Spinner, {}),
32358
32404
  " ",
32359
32405
  t("IDE connecting... context may be unavailable")
32360
32406
  ] }) : uiState.startupIdeConnectionStatus.state === "failed" ? /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(Text, { color: theme.status.warning, children: t("IDE connection unavailable: {{message}}", {
@@ -32478,7 +32524,8 @@ var import_jsx_runtime117 = __toESM(require_jsx_runtime(), 1);
32478
32524
  var MAX_DISPLAYED_QUEUED_MESSAGES = 3;
32479
32525
  var NUM_TIMES_QUEUE_HINT_SHOWN = 3;
32480
32526
  var QueuedMessageDisplay = /* @__PURE__ */ __name(({
32481
- messageQueue
32527
+ messageQueue,
32528
+ showHint: hintEnabled = true
32482
32529
  }) => {
32483
32530
  const hintSeenCountRef = (0, import_react107.useRef)(0);
32484
32531
  const wasEmptyRef = (0, import_react107.useRef)(true);
@@ -32490,7 +32537,7 @@ var QueuedMessageDisplay = /* @__PURE__ */ __name(({
32490
32537
  hintSeenCountRef.current++;
32491
32538
  wasEmptyRef.current = false;
32492
32539
  }
32493
- const showHint = hintSeenCountRef.current <= NUM_TIMES_QUEUE_HINT_SHOWN;
32540
+ const shouldShowHint = hintSeenCountRef.current <= NUM_TIMES_QUEUE_HINT_SHOWN;
32494
32541
  return /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
32495
32542
  messageQueue.slice(0, MAX_DISPLAYED_QUEUED_MESSAGES).map((message, index) => {
32496
32543
  const preview = message.replace(/\s+/g, " ");
@@ -32501,7 +32548,7 @@ var QueuedMessageDisplay = /* @__PURE__ */ __name(({
32501
32548
  messageQueue.length - MAX_DISPLAYED_QUEUED_MESSAGES,
32502
32549
  " more)"
32503
32550
  ] }) }),
32504
- showHint && /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(Box_default, { paddingLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(Text, { dimColor: true, italic: true, children: t("Ctrl+Q to queue \xB7 \u2191 to edit queued messages") }) })
32551
+ hintEnabled && shouldShowHint && /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(Box_default, { paddingLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(Text, { dimColor: true, italic: true, children: t("Ctrl+Q to queue \xB7 \u2191 to edit queued messages") }) })
32505
32552
  ] });
32506
32553
  }, "QueuedMessageDisplay");
32507
32554
 
@@ -33435,7 +33482,7 @@ var AgentChatContent = /* @__PURE__ */ __name(({
33435
33482
  },
33436
33483
  item.id
33437
33484
  )),
33438
- isRunning && /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Box_default, { marginX: 2, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(GeminiRespondingSpinner, {}) })
33485
+ isRunning && /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Box_default, { marginX: 2, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(RespondingSpinner, {}) })
33439
33486
  ] });
33440
33487
  }, "AgentChatContent");
33441
33488
  var AgentChatMissing = /* @__PURE__ */ __name(({ label }) => /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Box_default, { marginX: 2, children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Text, { color: theme.status.error, children: label }) }), "AgentChatMissing");
@@ -33693,12 +33740,21 @@ var AgentFooter = /* @__PURE__ */ __name(({
33693
33740
 
33694
33741
  // packages/cli/src/ui/components/agent-view/AgentComposer.tsx
33695
33742
  var import_jsx_runtime128 = __toESM(require_jsx_runtime(), 1);
33743
+ var EMPTY_MESSAGE_QUEUE = [];
33696
33744
  var AgentComposer = /* @__PURE__ */ __name(({ agentId }) => {
33697
- const { agents, agentTabBarFocused, agentShellFocused, agentApprovalModes } = useAgentViewState();
33745
+ const {
33746
+ agents,
33747
+ agentTabBarFocused,
33748
+ agentShellFocused,
33749
+ agentApprovalModes,
33750
+ agentMessageQueues
33751
+ } = useAgentViewState();
33698
33752
  const {
33699
33753
  setAgentInputBufferText,
33700
33754
  setAgentTabBarFocused,
33701
- setAgentApprovalMode
33755
+ setAgentApprovalMode,
33756
+ setAgentMessageQueue,
33757
+ appendToAgentMessageQueue
33702
33758
  } = useAgentViewActions();
33703
33759
  const agent = agents.get(agentId);
33704
33760
  const interactiveAgent = agent?.interactiveAgent;
@@ -33772,14 +33828,24 @@ var AgentComposer = /* @__PURE__ */ __name(({ agentId }) => {
33772
33828
  },
33773
33829
  [buffer, agentTabBarFocused, setAgentTabBarFocused]
33774
33830
  );
33775
- const [messageQueue, setMessageQueue] = (0, import_react114.useState)([]);
33831
+ const messageQueue = agentMessageQueues.get(agentId) ?? EMPTY_MESSAGE_QUEUE;
33832
+ const flushedQueueRef = (0, import_react114.useRef)(null);
33776
33833
  (0, import_react114.useEffect)(() => {
33777
33834
  if (streamingState === "idle" /* Idle */ && messageQueue.length > 0 && status !== void 0 && !isTerminalStatus(status)) {
33835
+ if (flushedQueueRef.current === messageQueue) return;
33836
+ flushedQueueRef.current = messageQueue;
33778
33837
  const combined = messageQueue.join("\n");
33779
- setMessageQueue([]);
33838
+ setAgentMessageQueue(agentId, []);
33780
33839
  interactiveAgent?.enqueueMessage(combined);
33781
33840
  }
33782
- }, [streamingState, messageQueue, interactiveAgent, status]);
33841
+ }, [
33842
+ streamingState,
33843
+ messageQueue,
33844
+ interactiveAgent,
33845
+ status,
33846
+ agentId,
33847
+ setAgentMessageQueue
33848
+ ]);
33783
33849
  const handleSubmit = (0, import_react114.useCallback)(
33784
33850
  (text) => {
33785
33851
  const trimmed = text.trim();
@@ -33787,10 +33853,10 @@ var AgentComposer = /* @__PURE__ */ __name(({ agentId }) => {
33787
33853
  if (streamingState === "idle" /* Idle */) {
33788
33854
  interactiveAgent.enqueueMessage(trimmed);
33789
33855
  } else {
33790
- setMessageQueue((prev) => [...prev, trimmed]);
33856
+ appendToAgentMessageQueue(agentId, trimmed);
33791
33857
  }
33792
33858
  },
33793
- [interactiveAgent, streamingState]
33859
+ [interactiveAgent, streamingState, agentId, appendToAgentMessageQueue]
33794
33860
  );
33795
33861
  const statusLabel = (0, import_react114.useMemo)(() => {
33796
33862
  switch (status) {
@@ -33826,7 +33892,7 @@ var AgentComposer = /* @__PURE__ */ __name(({ agentId }) => {
33826
33892
  }
33827
33893
  ),
33828
33894
  statusLabel && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Box_default, { marginLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Text, { color: statusLabel.color, children: statusLabel.text }) }),
33829
- /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(QueuedMessageDisplay, { messageQueue }),
33895
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(QueuedMessageDisplay, { messageQueue, showHint: false }),
33830
33896
  /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
33831
33897
  BaseTextInput,
33832
33898
  {
@@ -35098,7 +35164,7 @@ function useBranchCommand(options) {
35098
35164
  let swapOpened = false;
35099
35165
  let prevSessionData;
35100
35166
  try {
35101
- const telemetrySwapOpened = config.getGeminiClient()?.beginTelemetrySwap?.() ?? true;
35167
+ const telemetrySwapOpened = config.getLlmClient()?.beginTelemetrySwap?.() ?? true;
35102
35168
  if (!telemetrySwapOpened) {
35103
35169
  throw new Error(
35104
35170
  "A session switch is already in progress. Try again in a moment."
@@ -35141,7 +35207,7 @@ function useBranchCommand(options) {
35141
35207
  config.startNewSession(newSessionId, resumed);
35142
35208
  coreSwapped = true;
35143
35209
  await waitForGoalRuntime(config);
35144
- await config.getGeminiClient()?.initialize?.("branch" /* Branch */);
35210
+ await config.getLlmClient()?.initialize?.("branch" /* Branch */);
35145
35211
  const rawItems = buildResumedHistoryItems(resumed, config);
35146
35212
  const collapseOnResume = options.settings.merged.ui?.history?.collapseOnResume ?? false;
35147
35213
  const collapsePreviewCount = options.settings.merged.ui?.history?.collapsePreviewCount ?? 0;
@@ -35152,7 +35218,7 @@ function useBranchCommand(options) {
35152
35218
  );
35153
35219
  startNewSession(newSessionId);
35154
35220
  uiSwapped = true;
35155
- config.getGeminiClient()?.commitTelemetrySwap?.();
35221
+ config.getLlmClient()?.commitTelemetrySwap?.();
35156
35222
  clearPendingState?.();
35157
35223
  historyManager.clearItems();
35158
35224
  historyManager.loadHistory(uiHistoryItems);
@@ -35183,15 +35249,15 @@ function useBranchCommand(options) {
35183
35249
  if (coreSwapped && !uiSwapped) {
35184
35250
  try {
35185
35251
  config.startNewSession(oldSessionId, prevSessionData);
35186
- await config.getGeminiClient()?.initialize?.();
35252
+ await config.getLlmClient()?.initialize?.();
35187
35253
  } catch (rollbackErr) {
35188
35254
  config.getDebugLogger().warn(
35189
35255
  `Rollback after failed /branch init failed: ${rollbackErr}`
35190
35256
  );
35191
35257
  }
35192
- config.getGeminiClient()?.abortTelemetrySwap?.();
35258
+ config.getLlmClient()?.abortTelemetrySwap?.();
35193
35259
  } else if (swapOpened) {
35194
- config.getGeminiClient()?.commitTelemetrySwap?.();
35260
+ config.getLlmClient()?.commitTelemetrySwap?.();
35195
35261
  }
35196
35262
  if (forkCreated && !uiSwapped) {
35197
35263
  try {
@@ -35275,7 +35341,7 @@ function useResumeCommand(options) {
35275
35341
  }
35276
35342
  closeResumeDialog();
35277
35343
  let swapOpened = false;
35278
- const telemetrySwapOpened = config.getGeminiClient()?.beginTelemetrySwap?.() ?? true;
35344
+ const telemetrySwapOpened = config.getLlmClient()?.beginTelemetrySwap?.() ?? true;
35279
35345
  if (!telemetrySwapOpened) {
35280
35346
  addItem(
35281
35347
  {
@@ -35296,7 +35362,7 @@ function useResumeCommand(options) {
35296
35362
  const sessionService = new SessionService(cwd3);
35297
35363
  const sessionData = await sessionService.loadSession(sessionId);
35298
35364
  if (!sessionData) {
35299
- config.getGeminiClient()?.commitTelemetrySwap?.();
35365
+ config.getLlmClient()?.commitTelemetrySwap?.();
35300
35366
  return;
35301
35367
  }
35302
35368
  const customTitle = sessionService.getSessionTitle(sessionId);
@@ -35326,14 +35392,14 @@ function useResumeCommand(options) {
35326
35392
  coreSwapped = true;
35327
35393
  await waitForGoalRuntime(config);
35328
35394
  config.getChatRecordingService()?.rebuildTurnBoundaries(sessionData.conversation.messages);
35329
- await config.getGeminiClient()?.initialize?.();
35395
+ await config.getLlmClient()?.initialize?.();
35330
35396
  const recovered = await config.loadPausedBackgroundAgents(sessionId);
35331
35397
  if (recovered.length > 0) {
35332
35398
  recoveredBackgroundAgentsNotice = config.getBackgroundAgentResumeService().buildRecoveredBackgroundAgentsNotice(recovered.length);
35333
35399
  }
35334
35400
  startNewSession(sessionId);
35335
35401
  uiSwapped = true;
35336
- config.getGeminiClient()?.commitTelemetrySwap?.();
35402
+ config.getLlmClient()?.commitTelemetrySwap?.();
35337
35403
  setSessionName?.(customTitle ?? null);
35338
35404
  clearPendingState?.();
35339
35405
  clearItems();
@@ -35360,7 +35426,7 @@ function useResumeCommand(options) {
35360
35426
  } catch {
35361
35427
  }
35362
35428
  config.startNewSession(oldSessionId, prevSessionData);
35363
- await config.getGeminiClient()?.initialize?.();
35429
+ await config.getLlmClient()?.initialize?.();
35364
35430
  await config.loadPausedBackgroundAgents(oldSessionId).catch(() => {
35365
35431
  });
35366
35432
  } catch (rollbackErr) {
@@ -35368,9 +35434,9 @@ function useResumeCommand(options) {
35368
35434
  `Rollback after failed /resume init failed: ${rollbackErr}`
35369
35435
  );
35370
35436
  }
35371
- config.getGeminiClient()?.abortTelemetrySwap?.();
35437
+ config.getLlmClient()?.abortTelemetrySwap?.();
35372
35438
  } else if (swapOpened) {
35373
- config.getGeminiClient()?.commitTelemetrySwap?.();
35439
+ config.getLlmClient()?.commitTelemetrySwap?.();
35374
35440
  }
35375
35441
  addItem(
35376
35442
  {
@@ -35670,7 +35736,7 @@ function getSkillCommandName(command) {
35670
35736
  return command.skillDetail?.name ?? command.name;
35671
35737
  }
35672
35738
  __name(getSkillCommandName, "getSkillCommandName");
35673
- var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history, addItem, clearItems, loadHistory, refreshStatic, toggleVimEnabled, isProcessing, setIsProcessing, isIdleRef, setGeminiMdFileCount, actions, extensionsUpdateState, isConfigInitialized, logger, updateItem, setSessionName, extensionRefreshState) => {
35739
+ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history, addItem, clearItems, loadHistory, refreshStatic, toggleVimEnabled, isProcessing, setIsProcessing, isIdleRef, setMemoryFileCount, actions, extensionsUpdateState, isConfigInitialized, logger, updateItem, setSessionName, extensionRefreshState) => {
35674
35740
  const fallbackExtensionRefreshStateRef = (0, import_react130.useRef)(
35675
35741
  null
35676
35742
  );
@@ -35939,7 +36005,7 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history
35939
36005
  btwAbortControllerRef,
35940
36006
  isIdleRef,
35941
36007
  toggleVimEnabled,
35942
- setGeminiMdFileCount,
36008
+ setMemoryFileCount,
35943
36009
  reloadCommands,
35944
36010
  setSessionName: setSessionName ?? (() => {
35945
36011
  }),
@@ -35972,7 +36038,7 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history
35972
36038
  cancelBtw,
35973
36039
  toggleVimEnabled,
35974
36040
  sessionShellAllowlist,
35975
- setGeminiMdFileCount,
36041
+ setMemoryFileCount,
35976
36042
  reloadCommands,
35977
36043
  setSessionName,
35978
36044
  extensionsUpdateState,
@@ -36579,7 +36645,7 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history
36579
36645
  }
36580
36646
  }
36581
36647
  case "load_history": {
36582
- config?.getGeminiClient()?.setHistory(result.clientHistory);
36648
+ config?.getLlmClient()?.setHistory(result.clientHistory);
36583
36649
  fullCommandContext.ui.clear();
36584
36650
  result.history.forEach((item, index) => {
36585
36651
  fullCommandContext.ui.addItem(item, index);
@@ -36937,7 +37003,7 @@ var useLogger = /* @__PURE__ */ __name((storage, sessionId) => {
36937
37003
  return logger;
36938
37004
  }, "useLogger");
36939
37005
 
36940
- // packages/cli/src/ui/hooks/useGeminiStream.ts
37006
+ // packages/cli/src/ui/hooks/use-llm-stream.ts
36941
37007
  init_esbuild_shims();
36942
37008
  var import_react137 = __toESM(require_react(), 1);
36943
37009
 
@@ -36955,9 +37021,9 @@ function copyString(value) {
36955
37021
  return value.split("").join("");
36956
37022
  }
36957
37023
  __name(copyString, "copyString");
36958
- function addShellCommandToGeminiHistory(geminiClient, rawQuery, resultText) {
37024
+ function addShellCommandToLlmHistory(llmClient, rawQuery, resultText) {
36959
37025
  const modelContent = resultText.length > MAX_OUTPUT_LENGTH ? copyString(resultText.substring(0, MAX_OUTPUT_LENGTH)) + "\n... (truncated)" : resultText;
36960
- geminiClient.addHistory({
37026
+ llmClient.addHistory({
36961
37027
  role: "user",
36962
37028
  parts: [
36963
37029
  {
@@ -36974,8 +37040,8 @@ ${modelContent}
36974
37040
  ]
36975
37041
  });
36976
37042
  }
36977
- __name(addShellCommandToGeminiHistory, "addShellCommandToGeminiHistory");
36978
- var useShellCommandProcessor = /* @__PURE__ */ __name((addItemToHistory, setPendingHistoryItem, onExec, onDebugMessage, config, geminiClient, setShellInputFocused, terminalWidth, terminalHeight) => {
37043
+ __name(addShellCommandToLlmHistory, "addShellCommandToLlmHistory");
37044
+ var useShellCommandProcessor = /* @__PURE__ */ __name((addItemToHistory, setPendingHistoryItem, onExec, onDebugMessage, config, llmClient, setShellInputFocused, terminalWidth, terminalHeight) => {
36979
37045
  const [activeShellPtyId, setActiveShellPtyId] = (0, import_react133.useState)(null);
36980
37046
  const handleShellCommand = (0, import_react133.useCallback)(
36981
37047
  (rawQuery, abortSignal) => {
@@ -37166,11 +37232,7 @@ ${finalOutput}`;
37166
37232
  },
37167
37233
  userMessageTimestamp
37168
37234
  );
37169
- addShellCommandToGeminiHistory(
37170
- geminiClient,
37171
- rawQuery,
37172
- finalOutput
37173
- );
37235
+ addShellCommandToLlmHistory(llmClient, rawQuery, finalOutput);
37174
37236
  }).catch((err) => {
37175
37237
  setPendingHistoryItem(null);
37176
37238
  const errorMessage = err instanceof Error ? err.message : String(err);
@@ -37220,7 +37282,7 @@ ${finalOutput}`;
37220
37282
  addItemToHistory,
37221
37283
  setPendingHistoryItem,
37222
37284
  onExec,
37223
- geminiClient,
37285
+ llmClient,
37224
37286
  setShellInputFocused,
37225
37287
  terminalHeight,
37226
37288
  terminalWidth
@@ -37289,17 +37351,17 @@ function useReactToolScheduler(onComplete, config, getPreferredEditor, onEditorC
37289
37351
  const existingTrackedCall = prevTrackedCalls.find(
37290
37352
  (ptc) => ptc.request.callId === coreTc.request.callId
37291
37353
  );
37292
- const responseSubmittedToGemini = existingTrackedCall?.responseSubmittedToGemini ?? false;
37354
+ const responseSubmittedToLlm = existingTrackedCall?.responseSubmittedToLlm ?? false;
37293
37355
  if (coreTc.status === "executing") {
37294
37356
  return {
37295
37357
  ...coreTc,
37296
- responseSubmittedToGemini,
37358
+ responseSubmittedToLlm,
37297
37359
  liveOutput: existingTrackedCall?.liveOutput
37298
37360
  };
37299
37361
  }
37300
37362
  return {
37301
37363
  ...coreTc,
37302
- responseSubmittedToGemini,
37364
+ responseSubmittedToLlm,
37303
37365
  liveOutput: void 0,
37304
37366
  pid: void 0,
37305
37367
  promoteAbortController: void 0
@@ -37388,7 +37450,7 @@ function useReactToolScheduler(onComplete, config, getPreferredEditor, onEditorC
37388
37450
  (callIdsToMark) => {
37389
37451
  setToolCallsForDisplay(
37390
37452
  (prevCalls) => prevCalls.map(
37391
- (tc) => callIdsToMark.includes(tc.request.callId) ? { ...tc, responseSubmittedToGemini: true } : tc
37453
+ (tc) => callIdsToMark.includes(tc.request.callId) ? { ...tc, responseSubmittedToLlm: true } : tc
37392
37454
  )
37393
37455
  );
37394
37456
  },
@@ -37555,7 +37617,7 @@ function mapToDisplay(toolOrTools, projectRoot) {
37555
37617
  }
37556
37618
  __name(mapToDisplay, "mapToDisplay");
37557
37619
 
37558
- // packages/cli/src/ui/hooks/useGeminiStream.ts
37620
+ // packages/cli/src/ui/hooks/use-llm-stream.ts
37559
37621
  import { promises as fs17 } from "node:fs";
37560
37622
  import path12 from "node:path";
37561
37623
  import process16 from "node:process";
@@ -37633,6 +37695,7 @@ function useMessageQueue() {
37633
37695
  permit: { ...input.permit },
37634
37696
  turnKey: `goal-runtime:${input.permit.turnId}`,
37635
37697
  continuationContext: input.continuationContext,
37698
+ ...input.objectiveUpdated ? { objectiveUpdated: input.objectiveUpdated } : {},
37636
37699
  ...input.windDown ? { windDown: true } : {},
37637
37700
  ...input.verifierFeedback ? { verifierFeedback: input.verifierFeedback } : {}
37638
37701
  };
@@ -37822,7 +37885,7 @@ function useMessageQueue() {
37822
37885
  }
37823
37886
  __name(useMessageQueue, "useMessageQueue");
37824
37887
 
37825
- // packages/cli/src/ui/hooks/useGeminiStream.ts
37888
+ // packages/cli/src/ui/hooks/use-llm-stream.ts
37826
37889
  var debugLogger39 = createDebugLogger("GEMINI_STREAM");
37827
37890
  function applyModelOverride(modelOverrideRef, inlineActiveRef, value, isInline) {
37828
37891
  modelOverrideRef.current = value;
@@ -37977,7 +38040,7 @@ function charIndexAfterLine(text, keptLines) {
37977
38040
  return -1;
37978
38041
  }
37979
38042
  __name(charIndexAfterLine, "charIndexAfterLine");
37980
- var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, config, isConfigInitialized, settings, onDebugMessage, handleSlashCommand, shellModeActive, getPreferredEditor, onAuthError, performMemoryRefresh, modelSwitchedFromQuotaError, setModelSwitchedFromQuotaError, onEditorClose, onCancelSubmit, setShellInputFocused, terminalWidth, terminalHeight, midTurnDrainRef, logger, availableTerminalHeightRef, terminalWidthRef, midTurnRestoreRef, goalQueueRef) => {
38043
+ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config, isConfigInitialized, settings, onDebugMessage, handleSlashCommand, shellModeActive, getPreferredEditor, onAuthError, performMemoryRefresh, modelSwitchedFromQuotaError, setModelSwitchedFromQuotaError, onEditorClose, onCancelSubmit, setShellInputFocused, terminalWidth, terminalHeight, midTurnDrainRef, logger, availableTerminalHeightRef, terminalWidthRef, midTurnRestoreRef, goalQueueRef) => {
37981
38044
  const [initError, setInitError] = (0, import_react137.useState)(null);
37982
38045
  const abortControllerRef = (0, import_react137.useRef)(null);
37983
38046
  const activeInteractionPromptIdRef = (0, import_react137.useRef)(void 0);
@@ -38384,7 +38447,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
38384
38447
  onExec,
38385
38448
  onDebugMessage,
38386
38449
  config,
38387
- geminiClient,
38450
+ llmClient,
38388
38451
  setShellInputFocused,
38389
38452
  terminalWidth,
38390
38453
  terminalHeight
@@ -38407,7 +38470,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
38407
38470
  return "waiting_for_confirmation" /* WaitingForConfirmation */;
38408
38471
  }
38409
38472
  if (isResponding || toolCalls.some(
38410
- (tc) => tc.status === "executing" || tc.status === "scheduled" || tc.status === "validating" || (tc.status === "success" || tc.status === "error" || tc.status === "cancelled") && !tc.responseSubmittedToGemini
38473
+ (tc) => tc.status === "executing" || tc.status === "scheduled" || tc.status === "validating" || (tc.status === "success" || tc.status === "error" || tc.status === "cancelled") && !tc.responseSubmittedToLlm
38411
38474
  )) {
38412
38475
  return "responding" /* Responding */;
38413
38476
  }
@@ -38585,7 +38648,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
38585
38648
  },
38586
38649
  [addItem, config]
38587
38650
  );
38588
- const prepareQueryForGemini = (0, import_react137.useCallback)(
38651
+ const prepareQueryForLlm = (0, import_react137.useCallback)(
38589
38652
  async (query, userMessageTimestamp, abortSignal, prompt_id, submitType, submittedPrompt, preserveTurnOwnership) => {
38590
38653
  if (turnCancelledRef.current && !preserveTurnOwnership) {
38591
38654
  return { queryToSend: null, shouldProceed: false };
@@ -38596,7 +38659,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
38596
38659
  if (!preserveTurnOwnership) {
38597
38660
  lastTurnUserItemRef.current = null;
38598
38661
  }
38599
- let localQueryToSendToGemini = null;
38662
+ let localQueryToSendToLlm = null;
38600
38663
  if (typeof query === "string") {
38601
38664
  const trimmedQuery = query.trim();
38602
38665
  if (submitType === "notification" /* Notification */) {
@@ -38635,7 +38698,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
38635
38698
  };
38636
38699
  }
38637
38700
  case "submit_prompt": {
38638
- localQueryToSendToGemini = slashCommandResult.content;
38701
+ localQueryToSendToLlm = slashCommandResult.content;
38639
38702
  submitPromptOnCompleteRef.current = slashCommandResult.onComplete ?? null;
38640
38703
  refreshContextFilesOnWriteRef.current = Boolean(
38641
38704
  slashCommandResult.refreshContextFilesOnWrite
@@ -38658,16 +38721,16 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
38658
38721
  }
38659
38722
  }
38660
38723
  const bridgeResult2 = await applyVisionBridgeIfNeeded(
38661
- localQueryToSendToGemini,
38724
+ localQueryToSendToLlm,
38662
38725
  userMessageTimestamp,
38663
38726
  abortSignal
38664
38727
  );
38665
38728
  if (!bridgeResult2.shouldProceed) {
38666
38729
  return { queryToSend: null, shouldProceed: false };
38667
38730
  }
38668
- localQueryToSendToGemini = bridgeResult2.parts;
38731
+ localQueryToSendToLlm = bridgeResult2.parts;
38669
38732
  return {
38670
- queryToSend: localQueryToSendToGemini,
38733
+ queryToSend: localQueryToSendToLlm,
38671
38734
  shouldProceed: true
38672
38735
  };
38673
38736
  }
@@ -38685,7 +38748,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
38685
38748
  if (shellModeActive && handleShellCommand(trimmedQuery, abortSignal)) {
38686
38749
  return { queryToSend: null, shouldProceed: false };
38687
38750
  }
38688
- localQueryToSendToGemini = trimmedQuery;
38751
+ localQueryToSendToLlm = trimmedQuery;
38689
38752
  if (submitType !== "cron" /* Cron */) {
38690
38753
  const insertedId = addItem(
38691
38754
  {
@@ -38716,27 +38779,27 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
38716
38779
  if (!atCommandResult.shouldProceed) {
38717
38780
  return { queryToSend: null, shouldProceed: false };
38718
38781
  }
38719
- localQueryToSendToGemini = atCommandResult.processedQuery;
38782
+ localQueryToSendToLlm = atCommandResult.processedQuery;
38720
38783
  }
38721
38784
  const bridgeResult = await applyVisionBridgeIfNeeded(
38722
- localQueryToSendToGemini,
38785
+ localQueryToSendToLlm,
38723
38786
  userMessageTimestamp,
38724
38787
  abortSignal
38725
38788
  );
38726
38789
  if (!bridgeResult.shouldProceed) {
38727
38790
  return { queryToSend: null, shouldProceed: false };
38728
38791
  }
38729
- localQueryToSendToGemini = bridgeResult.parts;
38792
+ localQueryToSendToLlm = bridgeResult.parts;
38730
38793
  } else {
38731
- localQueryToSendToGemini = query;
38794
+ localQueryToSendToLlm = query;
38732
38795
  }
38733
- if (localQueryToSendToGemini === null) {
38796
+ if (localQueryToSendToLlm === null) {
38734
38797
  onDebugMessage(
38735
- "Query processing resulted in null, not sending to Gemini."
38798
+ "Query processing resulted in null, not sending to the model."
38736
38799
  );
38737
38800
  return { queryToSend: null, shouldProceed: false };
38738
38801
  }
38739
- return { queryToSend: localQueryToSendToGemini, shouldProceed: true };
38802
+ return { queryToSend: localQueryToSendToLlm, shouldProceed: true };
38740
38803
  },
38741
38804
  [
38742
38805
  config,
@@ -38752,24 +38815,24 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
38752
38815
  ]
38753
38816
  );
38754
38817
  const handleContentEvent = (0, import_react137.useCallback)(
38755
- (eventValue, currentGeminiMessageBuffer, userMessageTimestamp, startAsContinuation = false) => {
38818
+ (eventValue, currentLlmMessageBuffer, userMessageTimestamp, startAsContinuation = false) => {
38756
38819
  if (turnCancelledRef.current) {
38757
38820
  return "";
38758
38821
  }
38759
38822
  streamingResponseLengthRef.current += eventValue.length;
38760
38823
  setIsReceivingContent(true);
38761
38824
  turnSawContentEventRef.current = true;
38762
- let newGeminiMessageBuffer = currentGeminiMessageBuffer + eventValue;
38825
+ let newLlmMessageBuffer = currentLlmMessageBuffer + eventValue;
38763
38826
  const pendingItem = pendingHistoryItemRef.current;
38764
38827
  if ((pendingItem?.type === "gemini" || pendingItem?.type === "gemini_content") && (pendingItem.images?.length || pendingItem.omittedImageCount)) {
38765
- if (newGeminiMessageBuffer.trim().length === 0) {
38766
- return newGeminiMessageBuffer;
38828
+ if (newLlmMessageBuffer.trim().length === 0) {
38829
+ return newLlmMessageBuffer;
38767
38830
  }
38768
38831
  stagePendingAssistantItem();
38769
38832
  }
38770
38833
  if (pendingHistoryItemRef.current?.type !== "gemini" && pendingHistoryItemRef.current?.type !== "gemini_content") {
38771
- if (newGeminiMessageBuffer.trim().length === 0) {
38772
- return newGeminiMessageBuffer;
38834
+ if (newLlmMessageBuffer.trim().length === 0) {
38835
+ return newLlmMessageBuffer;
38773
38836
  }
38774
38837
  if (pendingHistoryItemRef.current) {
38775
38838
  commitItemInOrder(
@@ -38780,17 +38843,17 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
38780
38843
  setPendingHistoryItem(
38781
38844
  startAsContinuation ? { type: "gemini_content", text: "" } : { type: "gemini", text: "", timestamp: Date.now() }
38782
38845
  );
38783
- newGeminiMessageBuffer = stripLeadingBlankLines(newGeminiMessageBuffer);
38846
+ newLlmMessageBuffer = stripLeadingBlankLines(newLlmMessageBuffer);
38784
38847
  }
38785
38848
  let nextPendingType = pendingHistoryItemRef.current?.type === "gemini_content" ? "gemini_content" : pendingHistoryItemRef.current?.type === "gemini" ? "gemini" : startAsContinuation ? "gemini_content" : "gemini";
38786
- while (newGeminiMessageBuffer.length > STREAM_PENDING_ITEM_MAX_CHARS) {
38849
+ while (newLlmMessageBuffer.length > STREAM_PENDING_ITEM_MAX_CHARS) {
38787
38850
  const splitPoint = findLastSafeSplitPoint(
38788
- newGeminiMessageBuffer,
38851
+ newLlmMessageBuffer,
38789
38852
  STREAM_PENDING_ITEM_MAX_CHARS
38790
38853
  );
38791
- const safeSplitPoint = splitPoint > 0 && splitPoint < newGeminiMessageBuffer.length ? splitPoint : STREAM_PENDING_ITEM_MAX_CHARS;
38854
+ const safeSplitPoint = splitPoint > 0 && splitPoint < newLlmMessageBuffer.length ? splitPoint : STREAM_PENDING_ITEM_MAX_CHARS;
38792
38855
  const { before: beforeText, after: afterText } = splitFencedMarkdown(
38793
- newGeminiMessageBuffer,
38856
+ newLlmMessageBuffer,
38794
38857
  safeSplitPoint
38795
38858
  );
38796
38859
  commitItemInOrder(
@@ -38801,7 +38864,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
38801
38864
  userMessageTimestamp
38802
38865
  );
38803
38866
  nextPendingType = "gemini_content";
38804
- newGeminiMessageBuffer = afterText;
38867
+ newLlmMessageBuffer = afterText;
38805
38868
  }
38806
38869
  const viewportRows = (availableTerminalHeightRef?.current ?? 0) > 0 ? availableTerminalHeightRef.current : Math.max(4, terminalHeight - STREAM_PENDING_COMPOSER_RESERVE_ROWS);
38807
38870
  const commitWidth = (terminalWidthRef?.current ?? 0) > 0 ? terminalWidthRef.current : terminalWidth;
@@ -38811,7 +38874,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
38811
38874
  );
38812
38875
  const tableClampRows = Math.max(2, viewportRows - 3);
38813
38876
  while (true) {
38814
- const bufferLines = newGeminiMessageBuffer.split("\n");
38877
+ const bufferLines = newLlmMessageBuffer.split("\n");
38815
38878
  const { keptLines, clipped } = fitPendingSlice(
38816
38879
  bufferLines,
38817
38880
  commitWidth,
@@ -38828,28 +38891,22 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
38828
38891
  }
38829
38892
  let target;
38830
38893
  if (boundaryLine < 0) {
38831
- const capIndex = charIndexAfterLine(
38832
- newGeminiMessageBuffer,
38833
- keptLines
38834
- );
38835
- const fenceInfo = capIndex > 0 ? getEnclosingFenceInfo(newGeminiMessageBuffer, capIndex) : null;
38894
+ const capIndex = charIndexAfterLine(newLlmMessageBuffer, keptLines);
38895
+ const fenceInfo = capIndex > 0 ? getEnclosingFenceInfo(newLlmMessageBuffer, capIndex) : null;
38836
38896
  if (!fenceInfo || fenceInfo.lang?.toLowerCase() === "mermaid") {
38837
38897
  break;
38838
38898
  }
38839
38899
  target = capIndex;
38840
38900
  } else {
38841
- target = charIndexAfterLine(newGeminiMessageBuffer, boundaryLine + 1);
38901
+ target = charIndexAfterLine(newLlmMessageBuffer, boundaryLine + 1);
38842
38902
  if (target <= 0) break;
38843
38903
  }
38844
- const splitPoint = findLastSafeSplitPoint(
38845
- newGeminiMessageBuffer,
38846
- target
38847
- );
38848
- if (splitPoint <= 0 || splitPoint >= newGeminiMessageBuffer.length) {
38904
+ const splitPoint = findLastSafeSplitPoint(newLlmMessageBuffer, target);
38905
+ if (splitPoint <= 0 || splitPoint >= newLlmMessageBuffer.length) {
38849
38906
  break;
38850
38907
  }
38851
38908
  const { before: beforeText, after: afterText } = splitFencedMarkdown(
38852
- newGeminiMessageBuffer,
38909
+ newLlmMessageBuffer,
38853
38910
  splitPoint
38854
38911
  );
38855
38912
  commitItemInOrder(
@@ -38860,19 +38917,19 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
38860
38917
  userMessageTimestamp
38861
38918
  );
38862
38919
  nextPendingType = "gemini_content";
38863
- newGeminiMessageBuffer = afterText;
38920
+ newLlmMessageBuffer = afterText;
38864
38921
  }
38865
38922
  setPendingHistoryItem((item) => {
38866
38923
  const base = {
38867
38924
  type: nextPendingType,
38868
- text: newGeminiMessageBuffer
38925
+ text: newLlmMessageBuffer
38869
38926
  };
38870
38927
  if (item && "timestamp" in item) {
38871
38928
  base.timestamp = item.timestamp;
38872
38929
  }
38873
38930
  return base;
38874
38931
  });
38875
- return newGeminiMessageBuffer;
38932
+ return newLlmMessageBuffer;
38876
38933
  },
38877
38934
  [
38878
38935
  commitItemInOrder,
@@ -39198,7 +39255,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
39198
39255
  (result) => {
39199
39256
  setLoopDetectionConfirmationRequest(null);
39200
39257
  if (result.userSelection === "disable") {
39201
- config.getGeminiClient().getLoopDetectionService().disableForSession();
39258
+ config.getLlmClient().getLoopDetectionService().disableForSession();
39202
39259
  addItem(
39203
39260
  {
39204
39261
  type: "info",
@@ -39258,9 +39315,9 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
39258
39315
  },
39259
39316
  [addItem, commitItemInOrder, pendingHistoryItemRef, setPendingHistoryItem]
39260
39317
  );
39261
- const processGeminiStreamEvents = (0, import_react137.useCallback)(
39318
+ const processLlmStreamEvents = (0, import_react137.useCallback)(
39262
39319
  async (stream, userMessageTimestamp, signal, submitType, turnAdmission, promptId, trackInteractionOwner = true, toolContinuationOwner) => {
39263
- let geminiMessageBuffer = "";
39320
+ let llmMessageBuffer = "";
39264
39321
  let thoughtBuffer = "";
39265
39322
  let scheduledToolContinuation = false;
39266
39323
  let assistantOutputStarted = pendingHistoryItemRef.current?.type === "gemini" || pendingHistoryItemRef.current?.type === "gemini_content";
@@ -39301,9 +39358,9 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
39301
39358
  }
39302
39359
  contentParts.push(queuedContent.value);
39303
39360
  }
39304
- geminiMessageBuffer = handleContentEvent(
39361
+ llmMessageBuffer = handleContentEvent(
39305
39362
  contentParts.join(""),
39306
- geminiMessageBuffer,
39363
+ llmMessageBuffer,
39307
39364
  userMessageTimestamp,
39308
39365
  assistantOutputStarted
39309
39366
  );
@@ -39326,7 +39383,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
39326
39383
  ...pendingItem,
39327
39384
  omittedImageCount: (pendingItem.omittedImageCount ?? 0) + 1
39328
39385
  });
39329
- geminiMessageBuffer = "";
39386
+ llmMessageBuffer = "";
39330
39387
  assistantOutputStarted = true;
39331
39388
  continue;
39332
39389
  }
@@ -39339,7 +39396,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
39339
39396
  setPendingHistoryItem(null);
39340
39397
  }
39341
39398
  }
39342
- geminiMessageBuffer = "";
39399
+ llmMessageBuffer = "";
39343
39400
  if (shouldDisplayImage) {
39344
39401
  setPendingHistoryItem({
39345
39402
  type: assistantOutputStarted ? "gemini_content" : "gemini",
@@ -39473,7 +39530,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
39473
39530
  case "chat_compressed" /* ChatCompressed */:
39474
39531
  flushBufferedStreamEvents();
39475
39532
  handleChatCompressionEvent(event.value, userMessageTimestamp);
39476
- geminiMessageBuffer = "";
39533
+ llmMessageBuffer = "";
39477
39534
  assistantOutputStarted = false;
39478
39535
  break;
39479
39536
  case "tool_call_confirmation" /* ToolCallConfirmation */:
@@ -39490,7 +39547,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
39490
39547
  setPendingHistoryItem(null);
39491
39548
  }
39492
39549
  handleMaxSessionTurnsEvent();
39493
- geminiMessageBuffer = "";
39550
+ llmMessageBuffer = "";
39494
39551
  assistantOutputStarted = false;
39495
39552
  break;
39496
39553
  case "session_token_limit_exceeded" /* SessionTokenLimitExceeded */:
@@ -39503,7 +39560,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
39503
39560
  setPendingHistoryItem(null);
39504
39561
  }
39505
39562
  handleSessionTokenLimitExceededEvent(event.value);
39506
- geminiMessageBuffer = "";
39563
+ llmMessageBuffer = "";
39507
39564
  assistantOutputStarted = false;
39508
39565
  break;
39509
39566
  case "finished" /* Finished */:
@@ -39516,7 +39573,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
39516
39573
  );
39517
39574
  setPendingHistoryItem(null);
39518
39575
  }
39519
- geminiMessageBuffer = "";
39576
+ llmMessageBuffer = "";
39520
39577
  thoughtBuffer = "";
39521
39578
  assistantOutputStarted = false;
39522
39579
  assistantInlineImageCount = 0;
@@ -39530,7 +39587,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
39530
39587
  flushBufferedStreamEvents();
39531
39588
  handleCitationEvent(event.value, userMessageTimestamp);
39532
39589
  if (showCitations(settings)) {
39533
- geminiMessageBuffer = "";
39590
+ llmMessageBuffer = "";
39534
39591
  assistantOutputStarted = false;
39535
39592
  }
39536
39593
  break;
@@ -39548,7 +39605,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
39548
39605
  commitPendingThought(userMessageTimestamp);
39549
39606
  thoughtBuffer = "";
39550
39607
  setThought(null);
39551
- geminiMessageBuffer = "";
39608
+ llmMessageBuffer = "";
39552
39609
  assistantOutputStarted = false;
39553
39610
  assistantInlineImageCount = 0;
39554
39611
  } else {
@@ -39570,7 +39627,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
39570
39627
  commitPendingThought(userMessageTimestamp);
39571
39628
  thoughtBuffer = "";
39572
39629
  setThought(null);
39573
- geminiMessageBuffer = "";
39630
+ llmMessageBuffer = "";
39574
39631
  assistantOutputStarted = false;
39575
39632
  assistantInlineImageCount = 0;
39576
39633
  toolCallRequests.length = 0;
@@ -39602,7 +39659,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
39602
39659
  },
39603
39660
  userMessageTimestamp
39604
39661
  );
39605
- geminiMessageBuffer = "";
39662
+ llmMessageBuffer = "";
39606
39663
  assistantOutputStarted = false;
39607
39664
  break;
39608
39665
  case "user_prompt_submit_blocked" /* UserPromptSubmitBlocked */:
@@ -39611,13 +39668,13 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
39611
39668
  event.value,
39612
39669
  userMessageTimestamp
39613
39670
  );
39614
- geminiMessageBuffer = "";
39671
+ llmMessageBuffer = "";
39615
39672
  assistantOutputStarted = false;
39616
39673
  break;
39617
39674
  case "stop_hook_loop" /* StopHookLoop */:
39618
39675
  flushBufferedStreamEvents();
39619
39676
  handleStopHookLoopEvent(event.value, userMessageTimestamp);
39620
- geminiMessageBuffer = "";
39677
+ llmMessageBuffer = "";
39621
39678
  assistantOutputStarted = false;
39622
39679
  break;
39623
39680
  case "active_goal" /* ActiveGoal */:
@@ -39640,7 +39697,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
39640
39697
  },
39641
39698
  userMessageTimestamp
39642
39699
  );
39643
- geminiMessageBuffer = "";
39700
+ llmMessageBuffer = "";
39644
39701
  assistantOutputStarted = false;
39645
39702
  }
39646
39703
  break;
@@ -39662,7 +39719,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
39662
39719
  const duplicateResponses = [];
39663
39720
  let duplicatePromptId;
39664
39721
  const handledToolCallFingerprints = new Map(
39665
- geminiClient ? geminiClient.getHistoryToolCallFingerprints() : []
39722
+ llmClient ? llmClient.getHistoryToolCallFingerprints() : []
39666
39723
  );
39667
39724
  for (const [
39668
39725
  providerCallId,
@@ -39689,7 +39746,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
39689
39746
  );
39690
39747
  if (repeatedDuplicateRequest?.providerCallId) {
39691
39748
  debugLogger39.debug(
39692
- `[processGeminiStreamEvents] Dropping batch after repeated duplicate provider tool-call id: ${repeatedDuplicateRequest.providerCallId} (tool: ${repeatedDuplicateRequest.name})`
39749
+ `[processLlmStreamEvents] Dropping batch after repeated duplicate provider tool-call id: ${repeatedDuplicateRequest.providerCallId} (tool: ${repeatedDuplicateRequest.name})`
39693
39750
  );
39694
39751
  loopDetectedRef.current = true;
39695
39752
  return {
@@ -39710,7 +39767,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
39710
39767
  );
39711
39768
  const response = createDuplicateProviderToolCallResponse(request);
39712
39769
  debugLogger39.debug(
39713
- `[processGeminiStreamEvents] Suppressing duplicate provider tool-call id: ${providerCallId} (tool: ${request.name})`
39770
+ `[processLlmStreamEvents] Suppressing duplicate provider tool-call id: ${providerCallId} (tool: ${request.name})`
39714
39771
  );
39715
39772
  dualOutput?.emitToolResult(request, response);
39716
39773
  duplicateResponses.push({ request, response });
@@ -39789,7 +39846,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
39789
39846
  handleErrorEvent,
39790
39847
  registerToolBatch,
39791
39848
  scheduleToolCalls,
39792
- geminiClient,
39849
+ llmClient,
39793
39850
  handleChatCompressionEvent,
39794
39851
  handleFinishedEvent,
39795
39852
  handleMaxSessionTurnsEvent,
@@ -40146,11 +40203,12 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
40146
40203
  goalId: queuedGoal.permit.goalId,
40147
40204
  revision: queuedGoal.permit.revision,
40148
40205
  objective: queuedGoal.continuationContext,
40206
+ objectiveUpdated: queuedGoal.objectiveUpdated,
40149
40207
  windDown: queuedGoal.windDown,
40150
40208
  verifierFeedback: queuedGoal.verifierFeedback
40151
40209
  }),
40152
40210
  shouldProceed: true
40153
- } : { queryToSend: null, shouldProceed: false } : submitType === "retry" /* Retry */ ? { queryToSend: query, shouldProceed: true } : await prepareQueryForGemini(
40211
+ } : { queryToSend: null, shouldProceed: false } : submitType === "retry" /* Retry */ ? { queryToSend: query, shouldProceed: true } : await prepareQueryForLlm(
40154
40212
  query,
40155
40213
  userMessageTimestamp,
40156
40214
  abortSignal,
@@ -40304,8 +40362,14 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
40304
40362
  ...submittedPrompt !== void 0 ? { submittedPrompt } : {},
40305
40363
  ...!allowConcurrentBtwDuringResponse && !isDetachedToolContinuation && midTurnDrainRef ? { getSteerInput: drainSteerAtBoundary } : {}
40306
40364
  };
40365
+ if (submitType === "goal" /* Goal */ && goalBinding) {
40366
+ try {
40367
+ config.getGoalRuntime().markTurnDelivered(goalBinding.turnKey);
40368
+ } catch {
40369
+ }
40370
+ }
40307
40371
  const providerSignal = inheritedToolContinuationOwner ? processingSignal : abortSignal;
40308
- const stream = geminiClient.sendMessageStream(
40372
+ const stream = llmClient.sendMessageStream(
40309
40373
  finalQueryToSend,
40310
40374
  providerSignal,
40311
40375
  prompt_id,
@@ -40325,7 +40389,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
40325
40389
  } : {}
40326
40390
  }
40327
40391
  );
40328
- const processingResult = await processGeminiStreamEvents(
40392
+ const processingResult = await processLlmStreamEvents(
40329
40393
  stream,
40330
40394
  userMessageTimestamp,
40331
40395
  processingSignal,
@@ -40381,7 +40445,6 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
40381
40445
  );
40382
40446
  immediateDuplicateToolResponses.responses.forEach(
40383
40447
  ({ request, response }, index) => {
40384
- const goalContext = request.goalContext;
40385
40448
  config.getChatRecordingService?.()?.recordToolResult?.(
40386
40449
  finalized[index].responseParts,
40387
40450
  {
@@ -40394,10 +40457,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
40394
40457
  errorType: response.errorType,
40395
40458
  executionStatus: response.executionStatus
40396
40459
  },
40397
- goalContext ? request.name === ToolNames.GET_GOAL || request.name === ToolNames.UPDATE_GOAL ? {
40398
- goalContext: { ...goalContext },
40399
- provenance: "goal_runtime"
40400
- } : { goalContext: { ...goalContext } } : void 0
40460
+ goalToolResultProvenance(request)
40401
40461
  );
40402
40462
  }
40403
40463
  );
@@ -40434,8 +40494,8 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
40434
40494
  debugLogger39.error("onComplete callback failed:", err);
40435
40495
  });
40436
40496
  }
40437
- if (geminiClient) {
40438
- const memoryTaskPromises = geminiClient.consumePendingMemoryTaskPromises();
40497
+ if (llmClient) {
40498
+ const memoryTaskPromises = llmClient.consumePendingMemoryTaskPromises();
40439
40499
  for (const p of memoryTaskPromises) {
40440
40500
  void p.then((count) => {
40441
40501
  if (count > 0) {
@@ -40534,8 +40594,8 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
40534
40594
  [
40535
40595
  streamingState,
40536
40596
  setModelSwitchedFromQuotaError,
40537
- prepareQueryForGemini,
40538
- processGeminiStreamEvents,
40597
+ prepareQueryForLlm,
40598
+ processLlmStreamEvents,
40539
40599
  pendingHistoryItemRef,
40540
40600
  addItem,
40541
40601
  commitPendingAssistantItems,
@@ -40543,7 +40603,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
40543
40603
  setPendingAssistantItems,
40544
40604
  setPendingHistoryItem,
40545
40605
  setInitError,
40546
- geminiClient,
40606
+ llmClient,
40547
40607
  onAuthError,
40548
40608
  config,
40549
40609
  startNewPrompt,
@@ -40641,7 +40701,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
40641
40701
  return false;
40642
40702
  }
40643
40703
  );
40644
- const historyCallIdsWithResponse = geminiClient ? geminiClient.getHistoryFunctionResponseIds() : /* @__PURE__ */ new Set();
40704
+ const historyCallIdsWithResponse = llmClient ? llmClient.getHistoryFunctionResponseIds() : /* @__PURE__ */ new Set();
40645
40705
  const dedupedTools = completedAndReadyToSubmitTools.filter(
40646
40706
  (tc) => historyCallIdsWithResponse.has(tc.request.callId)
40647
40707
  );
@@ -40653,7 +40713,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
40653
40713
  for (const tc of dedupedTools) {
40654
40714
  if (tc.request.isClientInitiated) continue;
40655
40715
  if (tc.status === "cancelled") continue;
40656
- geminiClient?.recordCompletedToolCall(
40716
+ llmClient?.recordCompletedToolCall(
40657
40717
  tc.request.name,
40658
40718
  tc.request.args
40659
40719
  );
@@ -40721,7 +40781,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
40721
40781
  const newSuccessfulMemorySaves = completedAndReadyToSubmitTools.filter(
40722
40782
  (t2) => t2.request.name === "save_memory" && t2.status === "success" && !processedMemoryToolsRef.current.has(t2.request.callId)
40723
40783
  );
40724
- let geminiTools = completedAndReadyToSubmitTools.filter(
40784
+ let llmTools = completedAndReadyToSubmitTools.filter(
40725
40785
  (t2) => !t2.request.isClientInitiated && !historyCallIdsWithResponse.has(t2.request.callId)
40726
40786
  );
40727
40787
  const terminalPromptId = completedAndReadyToSubmitTools.find(
@@ -40734,14 +40794,14 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
40734
40794
  return owner && ownerPromptId && getActiveInteractionSpan(ownerPromptId) === owner ? owner : void 0;
40735
40795
  }, "liveOwnerForToolCall");
40736
40796
  const liveActiveInteractionOwner = activeInteractionPromptIdRef.current && activeInteractionOwnerRef.current && getActiveInteractionSpan(activeInteractionPromptIdRef.current) === activeInteractionOwnerRef.current ? activeInteractionOwnerRef.current : void 0;
40737
- const ownerToolCall = (liveActiveInteractionOwner ? geminiTools.find(
40797
+ const ownerToolCall = (liveActiveInteractionOwner ? llmTools.find(
40738
40798
  (toolCall) => liveOwnerForToolCall(toolCall) === liveActiveInteractionOwner
40739
- ) : void 0) ?? geminiTools.find((toolCall) => liveOwnerForToolCall(toolCall)) ?? geminiTools[0] ?? completedAndReadyToSubmitTools.find(
40799
+ ) : void 0) ?? llmTools.find((toolCall) => liveOwnerForToolCall(toolCall)) ?? llmTools[0] ?? completedAndReadyToSubmitTools.find(
40740
40800
  (toolCall) => !toolCall.request.isClientInitiated
40741
40801
  );
40742
40802
  const interactionOwner = ownerToolCall ? liveOwnerForToolCall(ownerToolCall) : void 0;
40743
40803
  const secondaryInteractionOwners = /* @__PURE__ */ new Map();
40744
- const secondaryTools = interactionOwner ? geminiTools.filter(
40804
+ const secondaryTools = interactionOwner ? llmTools.filter(
40745
40805
  (toolCall) => ownerForToolCall(toolCall) !== interactionOwner
40746
40806
  ) : [];
40747
40807
  for (const toolCall of secondaryTools) {
@@ -40753,7 +40813,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
40753
40813
  );
40754
40814
  }
40755
40815
  if (toolCall.status !== "cancelled") {
40756
- geminiClient?.recordCompletedToolCall(
40816
+ llmClient?.recordCompletedToolCall(
40757
40817
  toolCall.request.name,
40758
40818
  toolCall.request.args
40759
40819
  );
@@ -40765,7 +40825,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
40765
40825
  secondaryTools.map((toolCall) => toolCall.request.callId)
40766
40826
  );
40767
40827
  markToolsAsSubmitted([...secondaryCallIds2]);
40768
- geminiTools = geminiTools.filter(
40828
+ llmTools = llmTools.filter(
40769
40829
  (toolCall) => !secondaryCallIds2.has(toolCall.request.callId)
40770
40830
  );
40771
40831
  }
@@ -40805,13 +40865,13 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
40805
40865
  }
40806
40866
  }, "endToolInteraction");
40807
40867
  let toolGoalPermit;
40808
- const toolGoalContexts = geminiTools.map(
40868
+ const toolGoalContexts = llmTools.map(
40809
40869
  (toolCall) => toolCall.request.goalContext
40810
40870
  );
40811
40871
  try {
40812
40872
  toolGoalPermit = sharedGoalPermit(toolGoalContexts);
40813
40873
  } catch (error) {
40814
- const callIds = geminiTools.map((toolCall) => toolCall.request.callId);
40874
+ const callIds = llmTools.map((toolCall) => toolCall.request.callId);
40815
40875
  markToolsAsSubmitted(callIds);
40816
40876
  const reason = getErrorMessage(error);
40817
40877
  const bindings = /* @__PURE__ */ new Map();
@@ -40860,7 +40920,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
40860
40920
  }
40861
40921
  if (active && activeGoalPermitValid) {
40862
40922
  markToolsAsSubmitted(
40863
- geminiTools.map((toolCall) => toolCall.request.callId)
40923
+ llmTools.map((toolCall) => toolCall.request.callId)
40864
40924
  );
40865
40925
  const reason = "ToolResult batch is missing the active Goal context";
40866
40926
  await failClosedGoalTurn(active, reason);
@@ -40884,7 +40944,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
40884
40944
  const existing = goalTurnBindingsRef.current.get(toolGoalPermit.turnId);
40885
40945
  if (existing && !sameGoalPermit(existing.permit, toolGoalPermit)) {
40886
40946
  markToolsAsSubmitted(
40887
- geminiTools.map((toolCall) => toolCall.request.callId)
40947
+ llmTools.map((toolCall) => toolCall.request.callId)
40888
40948
  );
40889
40949
  const reason = "ToolResult batch has a stale Goal context";
40890
40950
  await failClosedGoalTurn(existing, reason);
@@ -40948,7 +41008,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
40948
41008
  );
40949
41009
  }
40950
41010
  const completedCallIds = new Set(
40951
- geminiTools.map((toolCall) => toolCall.request.callId)
41011
+ llmTools.map((toolCall) => toolCall.request.callId)
40952
41012
  );
40953
41013
  const secondaryCallIds = new Set(
40954
41014
  secondaryTools.map((toolCall) => toolCall.request.callId)
@@ -40973,13 +41033,13 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
40973
41033
  if (!promptId && pendingDuplicatePromptId) {
40974
41034
  promptId = pendingDuplicatePromptId;
40975
41035
  }
40976
- for (const toolCall of geminiTools) {
40977
- geminiClient?.recordCompletedToolCall(
41036
+ for (const toolCall of llmTools) {
41037
+ llmClient?.recordCompletedToolCall(
40978
41038
  toolCall.request.name,
40979
41039
  toolCall.request.args
40980
41040
  );
40981
41041
  }
40982
- if (geminiTools.length === 0 && pendingDuplicateResponses.length === 0) {
41042
+ if (llmTools.length === 0 && pendingDuplicateResponses.length === 0) {
40983
41043
  if (!promptId && terminalPromptId) {
40984
41044
  promptId = terminalPromptId;
40985
41045
  }
@@ -41007,7 +41067,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
41007
41067
  return;
41008
41068
  }
41009
41069
  const executableQueues = /* @__PURE__ */ new Map();
41010
- for (const toolCall of geminiTools) {
41070
+ for (const toolCall of llmTools) {
41011
41071
  const queue = executableQueues.get(toolCall.request.callId) ?? [];
41012
41072
  queue.push({
41013
41073
  request: toolCall.request,
@@ -41062,7 +41122,6 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
41062
41122
  (entry) => entry.responseParts
41063
41123
  );
41064
41124
  orderedResponses.forEach(({ request, response, status }, index) => {
41065
- const goalContext = request.goalContext;
41066
41125
  config.getChatRecordingService?.()?.recordToolResult?.(
41067
41126
  finalizedResponses[index].responseParts,
41068
41127
  {
@@ -41075,15 +41134,12 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
41075
41134
  errorType: response.errorType,
41076
41135
  executionStatus: response.executionStatus
41077
41136
  },
41078
- goalContext ? request.name === ToolNames.GET_GOAL || request.name === ToolNames.UPDATE_GOAL ? {
41079
- goalContext: { ...goalContext },
41080
- provenance: "goal_runtime"
41081
- } : { goalContext: { ...goalContext } } : void 0
41137
+ goalToolResultProvenance(request)
41082
41138
  );
41083
41139
  });
41084
41140
  if (continuationWasCancelled()) {
41085
41141
  markToolsAsSubmitted(
41086
- geminiTools.map((toolCall) => toolCall.request.callId)
41142
+ llmTools.map((toolCall) => toolCall.request.callId)
41087
41143
  );
41088
41144
  if (toolGoalBinding) {
41089
41145
  await failClosedGoalTurn(
@@ -41094,18 +41150,18 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
41094
41150
  endToolInteraction("cancelled");
41095
41151
  return;
41096
41152
  }
41097
- const allToolsCancelled = geminiTools.every(
41153
+ const allToolsCancelled = llmTools.every(
41098
41154
  (tc) => tc.status === "cancelled"
41099
41155
  );
41100
41156
  if (allToolsCancelled && pendingDuplicateResponses.length === 0) {
41101
- if (geminiClient) {
41102
- geminiClient.addHistory({
41157
+ if (llmClient) {
41158
+ llmClient.addHistory({
41103
41159
  role: "user",
41104
41160
  parts: responsesToSend
41105
41161
  });
41106
41162
  config.getArenaAgentClient()?.reportCancelled();
41107
41163
  }
41108
- const callIdsToMarkAsSubmitted2 = geminiTools.map(
41164
+ const callIdsToMarkAsSubmitted2 = llmTools.map(
41109
41165
  (toolCall) => toolCall.request.callId
41110
41166
  );
41111
41167
  markToolsAsSubmitted(callIdsToMarkAsSubmitted2);
@@ -41118,10 +41174,10 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
41118
41174
  endToolInteraction("cancelled");
41119
41175
  return;
41120
41176
  }
41121
- const callIdsToMarkAsSubmitted = geminiTools.map(
41177
+ const callIdsToMarkAsSubmitted = llmTools.map(
41122
41178
  (toolCall) => toolCall.request.callId
41123
41179
  );
41124
- for (const toolCall of geminiTools) {
41180
+ for (const toolCall of llmTools) {
41125
41181
  if ("modelOverride" in toolCall.response) {
41126
41182
  if (inlineModelOverrideActiveRef.current || modelOverrideRef.current?.endsWith("\0")) {
41127
41183
  debugLogger39.debug(
@@ -41140,16 +41196,16 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
41140
41196
  }
41141
41197
  }
41142
41198
  if (dualOutput) {
41143
- for (const toolCall of geminiTools) {
41199
+ for (const toolCall of llmTools) {
41144
41200
  dualOutput.emitToolResult(toolCall.request, toolCall.response);
41145
41201
  }
41146
41202
  }
41147
41203
  markToolsAsSubmitted(callIdsToMarkAsSubmitted);
41148
- const terminatesGoalTurn = geminiTools.some(
41204
+ const terminatesGoalTurn = llmTools.some(
41149
41205
  (toolCall) => toolCall.response.terminateTurn === true
41150
41206
  );
41151
41207
  if (terminatesGoalTurn && toolGoalBinding) {
41152
- geminiClient.addHistory({ role: "user", parts: responsesToSend });
41208
+ llmClient.addHistory({ role: "user", parts: responsesToSend });
41153
41209
  let goalFinishFailed = false;
41154
41210
  try {
41155
41211
  await config.getChatRecordingService()?.flush();
@@ -41192,7 +41248,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
41192
41248
  return;
41193
41249
  }
41194
41250
  if (config.getEmitToolUseSummaries()) {
41195
- const successfulTools = geminiTools.filter(
41251
+ const successfulTools = llmTools.filter(
41196
41252
  (tc) => tc.status === "success" && tc.request.name !== ToolNames.GET_GOAL && tc.request.name !== ToolNames.UPDATE_GOAL
41197
41253
  );
41198
41254
  if (successfulTools.length > 0) {
@@ -41250,12 +41306,12 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
41250
41306
  return;
41251
41307
  }
41252
41308
  const backgroundTaskRegistry = config.getBackgroundTaskRegistry();
41253
- const backgroundLaunchExhaustedCapacity = backgroundTaskRegistry.getMaxConcurrentBackgroundAgents() === 1 && !backgroundTaskRegistry.canStartBackgroundAgent() && geminiTools.some((toolCall) => {
41309
+ const backgroundLaunchExhaustedCapacity = backgroundTaskRegistry.getMaxConcurrentBackgroundAgents() === 1 && !backgroundTaskRegistry.canStartBackgroundAgent() && llmTools.some((toolCall) => {
41254
41310
  const display = toolCall.response.resultDisplay;
41255
41311
  return toolCall.request.name === ToolNames.AGENT && typeof display === "object" && display !== null && "type" in display && "status" in display && display.type === "task_execution" && display.status === "background";
41256
41312
  });
41257
41313
  if (backgroundLaunchExhaustedCapacity) {
41258
- geminiClient?.addHistory({ role: "user", parts: responsesToSend });
41314
+ llmClient?.addHistory({ role: "user", parts: responsesToSend });
41259
41315
  if (toolGoalBinding) {
41260
41316
  await failClosedGoalTurn(
41261
41317
  toolGoalBinding,
@@ -41340,7 +41396,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
41340
41396
  [
41341
41397
  submitQuery,
41342
41398
  markToolsAsSubmitted,
41343
- geminiClient,
41399
+ llmClient,
41344
41400
  performMemoryRefresh,
41345
41401
  modelSwitchedFromQuotaError,
41346
41402
  config,
@@ -41412,7 +41468,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
41412
41468
  const toolName = toolCall.request.name;
41413
41469
  const fileName = path12.basename(filePath);
41414
41470
  const toolCallWithSnapshotFileName = `${timestamp}-${fileName}-${toolName}.json`;
41415
- const clientHistory = geminiClient?.getHistoryShallow();
41471
+ const clientHistory = llmClient?.getHistoryShallow();
41416
41472
  const toolCallWithSnapshotFilePath = path12.join(
41417
41473
  checkpointDir,
41418
41474
  toolCallWithSnapshotFileName
@@ -41445,7 +41501,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
41445
41501
  }
41446
41502
  }, "saveRestorableToolCalls");
41447
41503
  saveRestorableToolCalls();
41448
- }, [toolCalls, config, onDebugMessage, history, geminiClient, storage]);
41504
+ }, [toolCalls, config, onDebugMessage, history, llmClient, storage]);
41449
41505
  const notificationQueueRef = (0, import_react137.useRef)([]);
41450
41506
  const [notificationTrigger, setNotificationTrigger] = (0, import_react137.useState)(0);
41451
41507
  const goalQueuePendingCount = goalQueueRef?.current?.getPendingSubmissionCount?.() ?? 0;
@@ -41783,7 +41839,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
41783
41839
  streamingResponseLengthRef,
41784
41840
  isReceivingContent
41785
41841
  };
41786
- }, "useGeminiStream");
41842
+ }, "useLlmStream");
41787
41843
 
41788
41844
  // packages/cli/src/ui/hooks/vim.ts
41789
41845
  init_esbuild_shims();
@@ -45023,6 +45079,7 @@ var import_jsx_runtime132 = __toESM(require_jsx_runtime(), 1);
45023
45079
  var MCP_BATCH_FLUSH_MS = 16;
45024
45080
  var STARTUP_PROFILE_FINALIZE_CAP_MS = 35e3;
45025
45081
  var CTRL_EXIT_PROMPT_DURATION_MS = 1e3;
45082
+ var GOAL_RUNTIME_STARTUP_TIMEOUT_MS = 5e3;
45026
45083
  var debugLogger42 = createDebugLogger("APP_CONTAINER");
45027
45084
  function isRenderModeToggleKey(key) {
45028
45085
  return keyMatchers["toggleRenderMode" /* TOGGLE_RENDER_MODE */](key) || key.name === "m" && key.meta && !key.ctrl && !key.paste;
@@ -45259,9 +45316,9 @@ function getSpeculativeToolResult(response) {
45259
45316
  };
45260
45317
  }
45261
45318
  __name(getSpeculativeToolResult, "getSpeculativeToolResult");
45262
- function getResponseCandidateTokens(pendingGeminiHistoryItems) {
45319
+ function getResponseCandidateTokens(pendingLlmHistoryItems) {
45263
45320
  let tokens = 0;
45264
- for (const item of pendingGeminiHistoryItems) {
45321
+ for (const item of pendingLlmHistoryItems) {
45265
45322
  if (item.type !== "tool_group") {
45266
45323
  continue;
45267
45324
  }
@@ -45329,8 +45386,8 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
45329
45386
  );
45330
45387
  const [isProcessing, setIsProcessing] = (0, import_react163.useState)(false);
45331
45388
  const [embeddedShellFocused, setEmbeddedShellFocused] = (0, import_react163.useState)(false);
45332
- const [geminiMdFileCount, setGeminiMdFileCount] = (0, import_react163.useState)(
45333
- initializationResult.geminiMdFileCount
45389
+ const [memoryFileCount, setMemoryFileCount] = (0, import_react163.useState)(
45390
+ initializationResult.memoryFileCount
45334
45391
  );
45335
45392
  const [shellModeActive, setShellModeActive] = (0, import_react163.useState)(false);
45336
45393
  const [modelSwitchedFromQuotaError, setModelSwitchedFromQuotaError] = (0, import_react163.useState)(false);
@@ -45489,9 +45546,22 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
45489
45546
  (async () => {
45490
45547
  profileCheckpoint("config_initialize_start");
45491
45548
  await config.initialize();
45492
- await waitForGoalRuntime(config);
45549
+ const goalRuntimeReady = await waitForGoalRuntime(config, {
45550
+ timeoutMs: GOAL_RUNTIME_STARTUP_TIMEOUT_MS
45551
+ });
45552
+ if (!goalRuntimeReady) {
45553
+ debugLogger42.warn(
45554
+ `Goal runtime did not settle within ${GOAL_RUNTIME_STARTUP_TIMEOUT_MS}ms (session writer lease contention?); continuing with goal features degraded.`
45555
+ );
45556
+ }
45493
45557
  setStartupWarnings(
45494
- (currentWarnings) => mergeStartupWarnings(currentWarnings, config.getWarnings())
45558
+ (currentWarnings) => mergeStartupWarnings(
45559
+ currentWarnings,
45560
+ goalRuntimeReady ? config.getWarnings() : [
45561
+ ...config.getWarnings(),
45562
+ `Goal features are degraded: the goal runtime did not settle within ${GOAL_RUNTIME_STARTUP_TIMEOUT_MS}ms at startup.`
45563
+ ]
45564
+ )
45495
45565
  );
45496
45566
  profileCheckpoint("config_initialize_end");
45497
45567
  setConfigInitialized(true);
@@ -45574,8 +45644,8 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
45574
45644
  }, [config]);
45575
45645
  (0, import_react163.useEffect)(() => {
45576
45646
  if (!isConfigInitialized) return void 0;
45577
- const geminiClient2 = config.getGeminiClient();
45578
- if (!geminiClient2) return void 0;
45647
+ const llmClient2 = config.getLlmClient();
45648
+ if (!llmClient2) return void 0;
45579
45649
  const manager = config.getToolRegistry().getMcpClientManager();
45580
45650
  let flushTimer = null;
45581
45651
  let finalized = false;
@@ -45589,7 +45659,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
45589
45659
  clearTimeout(flushTimer);
45590
45660
  flushTimer = null;
45591
45661
  }
45592
- return geminiClient2.setTools().catch((err) => {
45662
+ return llmClient2.setTools().catch((err) => {
45593
45663
  debugLogger42.error(
45594
45664
  `setTools() batch-flush failed: ${err instanceof Error ? err.message : String(err)}`
45595
45665
  );
@@ -46073,7 +46143,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
46073
46143
  debugLogger42.debug("Failed to cancel request while quitting:", error);
46074
46144
  }
46075
46145
  setQuittingMessages(messages);
46076
- config.getGeminiClient()?.requestShutdown();
46146
+ config.getLlmClient()?.requestShutdown();
46077
46147
  setTimeout(async () => {
46078
46148
  await runExitCleanup();
46079
46149
  process18.exit(0);
@@ -46154,7 +46224,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
46154
46224
  isProcessing,
46155
46225
  setIsProcessing,
46156
46226
  isIdleRef,
46157
- setGeminiMdFileCount,
46227
+ setMemoryFileCount,
46158
46228
  slashCommandActions,
46159
46229
  extensionsUpdateStateInternal,
46160
46230
  isConfigInitialized,
@@ -46237,12 +46307,12 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
46237
46307
  const performMemoryRefresh = (0, import_react163.useCallback)(async () => {
46238
46308
  if (config.isSafeMode()) {
46239
46309
  config.setUserMemory("");
46240
- config.setGeminiMdFileCount(0);
46310
+ config.setMemoryFileCount(0);
46241
46311
  config.setContextFilePaths([]);
46242
46312
  config.setConditionalRulesRegistry(
46243
46313
  new ConditionalRulesRegistry([], config.getWorkingDir())
46244
46314
  );
46245
- setGeminiMdFileCount(0);
46315
+ setMemoryFileCount(0);
46246
46316
  historyManager.addItem(
46247
46317
  {
46248
46318
  type: "info" /* INFO */,
@@ -46266,7 +46336,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
46266
46336
  contextFilePaths,
46267
46337
  conditionalRules,
46268
46338
  projectRoot
46269
- } = await loadHierarchicalGeminiMemory(
46339
+ } = await loadHierarchicalMemory(
46270
46340
  config.getWorkingDir(),
46271
46341
  settings.merged.context?.loadFromIncludeDirectories ? config.getWorkspaceContext().getDirectories() : [],
46272
46342
  config.getFileService(),
@@ -46283,12 +46353,12 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
46283
46353
  }
46284
46354
  );
46285
46355
  config.setUserMemory(memoryContent);
46286
- config.setGeminiMdFileCount(fileCount);
46356
+ config.setMemoryFileCount(fileCount);
46287
46357
  config.setContextFilePaths(contextFilePaths);
46288
46358
  config.setConditionalRulesRegistry(
46289
46359
  new ConditionalRulesRegistry(conditionalRules, projectRoot)
46290
46360
  );
46291
- setGeminiMdFileCount(fileCount);
46361
+ setMemoryFileCount(fileCount);
46292
46362
  historyManager.addItem(
46293
46363
  {
46294
46364
  type: "info" /* INFO */,
@@ -46335,7 +46405,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
46335
46405
  streamingState,
46336
46406
  submitQuery,
46337
46407
  initError,
46338
- pendingHistoryItems: pendingGeminiHistoryItems,
46408
+ pendingHistoryItems: pendingLlmHistoryItems,
46339
46409
  clearPendingState,
46340
46410
  thought,
46341
46411
  cancelOngoingRequest,
@@ -46347,8 +46417,8 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
46347
46417
  pendingToolCalls,
46348
46418
  streamingResponseLengthRef,
46349
46419
  isReceivingContent
46350
- } = useGeminiStream(
46351
- config.getGeminiClient(),
46420
+ } = useLlmStream(
46421
+ config.getLlmClient(),
46352
46422
  historyManager.history,
46353
46423
  historyManager.addItem,
46354
46424
  config,
@@ -46429,7 +46499,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
46429
46499
  speculationRef.current = IDLE_SPECULATION;
46430
46500
  }
46431
46501
  }, []);
46432
- const geminiClient = config.getGeminiClient();
46502
+ const llmClient = config.getLlmClient();
46433
46503
  const showAutoAcceptIndicator = useAutoAcceptIndicator({
46434
46504
  config,
46435
46505
  settings,
@@ -46747,7 +46817,7 @@ ${buildWorkflowSteeringNotice()}
46747
46817
  }
46748
46818
  const spec = speculationRef.current;
46749
46819
  if (spec.status !== "idle" && spec.suggestion === submittedValue && spec.status === "completed") {
46750
- acceptSpeculation(spec, geminiClient).then((result) => {
46820
+ acceptSpeculation(spec, llmClient).then((result) => {
46751
46821
  logSpeculation(
46752
46822
  config,
46753
46823
  new SpeculationEvent({
@@ -46850,7 +46920,7 @@ ${buildWorkflowSteeringNotice()}
46850
46920
  handleSlashCommand,
46851
46921
  slashCommands,
46852
46922
  config,
46853
- geminiClient,
46923
+ llmClient,
46854
46924
  historyManager,
46855
46925
  settings.merged.ui?.disableWorkflowKeywordTrigger,
46856
46926
  setBufferText,
@@ -46874,8 +46944,8 @@ ${buildWorkflowSteeringNotice()}
46874
46944
  handleWelcomeBackClose
46875
46945
  } = useWelcomeBack(config, handleFinalSubmit, buffer, settings.merged);
46876
46946
  const pendingHistoryItems = (0, import_react163.useMemo)(
46877
- () => [...pendingSlashCommandHistoryItems, ...pendingGeminiHistoryItems],
46878
- [pendingSlashCommandHistoryItems, pendingGeminiHistoryItems]
46947
+ () => [...pendingSlashCommandHistoryItems, ...pendingLlmHistoryItems],
46948
+ [pendingSlashCommandHistoryItems, pendingLlmHistoryItems]
46879
46949
  );
46880
46950
  const rawStickyTodos = (0, import_react163.useMemo)(
46881
46951
  () => getStickyTodos(historyManager.history, pendingHistoryItems),
@@ -46889,7 +46959,7 @@ ${buildWorkflowSteeringNotice()}
46889
46959
  (info) => {
46890
46960
  const pendingHistoryItems2 = [
46891
46961
  ...pendingSlashCommandHistoryItems,
46892
- ...pendingGeminiHistoryItems
46962
+ ...pendingLlmHistoryItems
46893
46963
  ];
46894
46964
  if (info?.pendingItem) {
46895
46965
  pendingHistoryItems2.push(info.pendingItem);
@@ -46910,7 +46980,7 @@ ${currentText}` : popped.modelText
46910
46980
  );
46911
46981
  }
46912
46982
  if (info?.wasGoalTurn) {
46913
- geminiClient?.stripOrphanedUserEntriesFromHistory?.();
46983
+ llmClient?.stripOrphanedUserEntriesFromHistory?.();
46914
46984
  }
46915
46985
  if (!draftWasEmpty) {
46916
46986
  debugLogger42.debug("auto-restore bail: buffer was non-empty");
@@ -46988,7 +47058,7 @@ ${currentText}` : popped.modelText
46988
47058
  historyManager.truncateToItem(lastUserItem.id);
46989
47059
  refreshStatic();
46990
47060
  restoreCancelledPrompt();
46991
- geminiClient?.stripOrphanedUserEntriesFromHistory?.();
47061
+ llmClient?.stripOrphanedUserEntriesFromHistory?.();
46992
47062
  if (info?.canUndoLastLoggedUserMessage) {
46993
47063
  void logger?.removeLastUserMessage().catch((err) => {
46994
47064
  debugLogger42.debug("Failed to undo cancelled prompt from log:", err);
@@ -47002,10 +47072,10 @@ ${currentText}` : popped.modelText
47002
47072
  removeGoalTurns,
47003
47073
  historyManager,
47004
47074
  logger,
47005
- geminiClient,
47075
+ llmClient,
47006
47076
  refreshStatic,
47007
47077
  pendingSlashCommandHistoryItems,
47008
- pendingGeminiHistoryItems
47078
+ pendingLlmHistoryItems
47009
47079
  ]
47010
47080
  );
47011
47081
  const handleClearScreen = (0, import_react163.useCallback)(() => {
@@ -47035,12 +47105,12 @@ ${currentText}` : popped.modelText
47035
47105
  });
47036
47106
  const contextFileNames = (0, import_react163.useMemo)(() => {
47037
47107
  const fromSettings = settings.merged.context?.fileName;
47038
- return fromSettings ? Array.isArray(fromSettings) ? fromSettings : [fromSettings] : getAllGeminiMdFilenames();
47108
+ return fromSettings ? Array.isArray(fromSettings) ? fromSettings : [fromSettings] : getAllMemoryFilenames();
47039
47109
  }, [settings.merged.context?.fileName]);
47040
47110
  const initialPrompt = (0, import_react163.useMemo)(() => config.getQuestion(), [config]);
47041
47111
  const initialPromptSubmitted = (0, import_react163.useRef)(false);
47042
47112
  (0, import_react163.useEffect)(() => {
47043
- if (initialPrompt && isConfigInitialized && !initialPromptSubmitted.current && !isAuthenticating && !isAuthDialogOpen && !isThemeDialogOpen && !isEditorDialogOpen && !showWelcomeBackDialog && welcomeBackChoice !== "restart" && geminiClient?.isInitialized?.()) {
47113
+ if (initialPrompt && isConfigInitialized && !initialPromptSubmitted.current && !isAuthenticating && !isAuthDialogOpen && !isThemeDialogOpen && !isEditorDialogOpen && !showWelcomeBackDialog && welcomeBackChoice !== "restart" && llmClient?.isInitialized?.()) {
47044
47114
  handleFinalSubmit(initialPrompt);
47045
47115
  initialPromptSubmitted.current = true;
47046
47116
  }
@@ -47054,7 +47124,7 @@ ${currentText}` : popped.modelText
47054
47124
  isEditorDialogOpen,
47055
47125
  showWelcomeBackDialog,
47056
47126
  welcomeBackChoice,
47057
- geminiClient
47127
+ llmClient
47058
47128
  ]);
47059
47129
  const followupSuggestionsEnabled = settings.merged.ui?.enableFollowupSuggestions !== false;
47060
47130
  (0, import_react163.useEffect)(() => {
@@ -47077,11 +47147,11 @@ ${currentText}` : popped.modelText
47077
47147
  }
47078
47148
  }
47079
47149
  if (followupSuggestionsEnabled && config.isInteractive() && !config.getSdkMode() && prevStreamingStateRef.current === "responding" /* Responding */ && streamingState === "idle" /* Idle */ && // Check both committed history and pending items for errors
47080
- // (API errors go to pendingGeminiHistoryItems, not historyManager.history)
47081
- historyManager.history[historyManager.history.length - 1]?.type !== "error" && !pendingGeminiHistoryItems.some((item) => item.type === "error") && !shellConfirmationRequest && !confirmationRequest && !loopDetectionConfirmationRequest && !isPermissionsDialogOpen && settingInputRequests.length === 0 && config.getApprovalMode() !== "plan" /* PLAN */) {
47150
+ // (API errors go to pendingLlmHistoryItems, not historyManager.history)
47151
+ historyManager.history[historyManager.history.length - 1]?.type !== "error" && !pendingLlmHistoryItems.some((item) => item.type === "error") && !shellConfirmationRequest && !confirmationRequest && !loopDetectionConfirmationRequest && !isPermissionsDialogOpen && settingInputRequests.length === 0 && config.getApprovalMode() !== "plan" /* PLAN */) {
47082
47152
  const ac = new AbortController();
47083
47153
  suggestionAbortRef.current = ac;
47084
- const conversationHistory = geminiClient.getHistoryTail(40, true);
47154
+ const conversationHistory = llmClient.getHistoryTail(40, true);
47085
47155
  generatePromptSuggestion(config, conversationHistory, ac.signal, {
47086
47156
  // On by default: the schema declares `default: true`, but
47087
47157
  // `mergeSettings` doesn't apply schema defaults, so an unset value is
@@ -47339,11 +47409,11 @@ ${currentText}` : popped.modelText
47339
47409
  async (userItem, option) => {
47340
47410
  try {
47341
47411
  const needsConversation = option === "conversation" || option === "both";
47342
- const geminiClient2 = needsConversation ? config.getGeminiClient() : null;
47412
+ const llmClient2 = needsConversation ? config.getLlmClient() : null;
47343
47413
  let apiTruncateIndex = -1;
47344
47414
  let conversationSkippedNoClient = false;
47345
47415
  if (needsConversation) {
47346
- if (!geminiClient2) {
47416
+ if (!llmClient2) {
47347
47417
  if (option === "conversation") {
47348
47418
  historyManager.addItem(
47349
47419
  {
@@ -47361,7 +47431,7 @@ ${currentText}` : popped.modelText
47361
47431
  apiTruncateIndex = computeApiTruncationIndex(
47362
47432
  historyManager.history,
47363
47433
  userItem.id,
47364
- geminiClient2.getHistoryShallow()
47434
+ llmClient2.getHistoryShallow()
47365
47435
  );
47366
47436
  if (apiTruncateIndex < 0) {
47367
47437
  historyManager.addItem(
@@ -47387,7 +47457,7 @@ ${currentText}` : popped.modelText
47387
47457
  const promptId = userItem.promptId;
47388
47458
  if (promptId) {
47389
47459
  try {
47390
- const truncateHistory = option === "both" && !!geminiClient2 && apiTruncateIndex >= 0;
47460
+ const truncateHistory = option === "both" && !!llmClient2 && apiTruncateIndex >= 0;
47391
47461
  const result = await config.getFileHistoryService().rewind(promptId, truncateHistory);
47392
47462
  if (result.filesChanged.length > 0) {
47393
47463
  fileRestoreMessage = t("Restored {{count}} file(s).", {
@@ -47419,7 +47489,7 @@ ${currentText}` : popped.modelText
47419
47489
  );
47420
47490
  }
47421
47491
  }
47422
- if (needsConversation && geminiClient2 && apiTruncateIndex >= 0 && !(option === "both" && hasRestoreFailure)) {
47492
+ if (needsConversation && llmClient2 && apiTruncateIndex >= 0 && !(option === "both" && hasRestoreFailure)) {
47423
47493
  const originalHistory = historyManager.history;
47424
47494
  const hasSummary = originalHistory.some(
47425
47495
  (h) => h.display?.kind === "collapse-summary"
@@ -47430,7 +47500,7 @@ ${currentText}` : popped.modelText
47430
47500
  if (h.id === userItem.id) break;
47431
47501
  if (isRealUserTurn(h)) targetTurnIndex++;
47432
47502
  }
47433
- geminiClient2.truncateHistory(apiTruncateIndex);
47503
+ llmClient2.truncateHistory(apiTruncateIndex);
47434
47504
  const truncatedUi = recoalesceFindingsHistoryItems(
47435
47505
  expandCollapsedHistory(
47436
47506
  originalHistory.filter((h) => h.id < userItem.id)
@@ -47592,7 +47662,7 @@ ${migrationResult.failedFiles.map((f) => ` \u2022 ${f.file}: ${f.error}`).join(
47592
47662
  [historyManager, setShowCommandMigrationNudge, config.storage]
47593
47663
  );
47594
47664
  const responseCandidateTokens = getResponseCandidateTokens(
47595
- pendingGeminiHistoryItems
47665
+ pendingLlmHistoryItems
47596
47666
  );
47597
47667
  const {
47598
47668
  elapsedTime,
@@ -47990,10 +48060,10 @@ ${migrationResult.failedFiles.map((f) => ` \u2022 ${f.file}: ${f.error}`).join(
47990
48060
  settingInputRequests,
47991
48061
  pluginChoiceRequests,
47992
48062
  loopDetectionConfirmationRequest,
47993
- geminiMdFileCount,
48063
+ memoryFileCount,
47994
48064
  streamingState,
47995
48065
  initError,
47996
- pendingGeminiHistoryItems,
48066
+ pendingLlmHistoryItems,
47997
48067
  thought,
47998
48068
  shellModeActive,
47999
48069
  userMessages,
@@ -48136,10 +48206,10 @@ ${migrationResult.failedFiles.map((f) => ` \u2022 ${f.file}: ${f.error}`).join(
48136
48206
  settingInputRequests,
48137
48207
  pluginChoiceRequests,
48138
48208
  loopDetectionConfirmationRequest,
48139
- geminiMdFileCount,
48209
+ memoryFileCount,
48140
48210
  streamingState,
48141
48211
  initError,
48142
- pendingGeminiHistoryItems,
48212
+ pendingLlmHistoryItems,
48143
48213
  thought,
48144
48214
  shellModeActive,
48145
48215
  userMessages,