@qwen-code/qwen-code 0.19.10 → 0.19.11-nightly.20260718.767a32484
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.
- package/bundled/qc-helper/docs/configuration/model-providers.md +11 -0
- package/bundled/qc-helper/docs/configuration/settings.md +15 -14
- package/bundled/qc-helper/docs/features/approval-mode.md +2 -2
- package/bundled/qc-helper/docs/features/channels/dingtalk.md +30 -0
- package/bundled/qc-helper/docs/features/channels/overview.md +66 -17
- package/bundled/qc-helper/docs/features/channels/wecom.md +8 -7
- package/bundled/qc-helper/docs/features/sandbox.md +2 -0
- package/bundled/qc-helper/docs/qwen-serve-deploy-local.md +42 -7
- package/bundled/qc-helper/docs/qwen-serve.md +77 -46
- package/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +1 -1
- package/bundled/review/SKILL.md +163 -403
- package/chunks/{MaxSizedBox-67ODZ4SZ.js → MaxSizedBox-ZFHA4QEQ.js} +30 -30
- package/chunks/{StandaloneSessionPicker-SIPBQT5Z.js → StandaloneSessionPicker-YRWOQVQA.js} +44 -44
- package/chunks/{acpAgent-VPZJXLFX.js → acpAgent-U2P2IESZ.js} +1423 -487
- package/chunks/{agent-Z7NWL6XL.js → agent-GQXX6X5Y.js} +26 -26
- package/chunks/{agent-headless-73HZ6ROQ.js → agent-headless-3572NBCK.js} +26 -26
- package/chunks/{anthropicContentGenerator-56U3YCP2.js → anthropicContentGenerator-Y65DMM64.js} +103 -18
- package/chunks/{artifact-tool-BWZZJ42H.js → artifact-tool-WR7I2XON.js} +2 -2
- package/chunks/{askUserQuestion-WU3S5A5T.js → askUserQuestion-B4FUTPHD.js} +2 -44
- package/chunks/{bridge-XFKW6S7Q.js → bridge-N5RMGD7G.js} +31 -33
- package/chunks/{ca-C2JTT2N5.js → ca-M3GQQ26D.js} +7 -2
- package/chunks/channel-worker-group-HZVJKLGX.js +21 -0
- package/chunks/{channel-worker-manager-5RWKSGEU.js → channel-worker-manager-3WDK4HNS.js} +34 -10
- package/chunks/{channel-worker-supervisor-PCDAZN4D.js → channel-worker-supervisor-U2W6Q5F7.js} +6 -4
- package/chunks/{chunk-YYPXHMWO.js → chunk-2XRGFF5K.js} +6 -6
- package/chunks/{chunk-ZKMGAFYV.js → chunk-2YSZE74N.js} +2 -2
- package/chunks/{chunk-L5U3ELZX.js → chunk-335ECZTA.js} +1 -1
- package/chunks/{chunk-5EBKKSBX.js → chunk-336KPNNV.js} +2 -2
- package/chunks/{chunk-Q5GLXH5Q.js → chunk-3CL5SEDT.js} +6 -6
- package/chunks/{chunk-2FO5GFKZ.js → chunk-3DJY4IFO.js} +1 -1
- package/chunks/{chunk-CJFNEBYB.js → chunk-3NWYQ7FX.js} +2 -2
- package/chunks/{chunk-WIASPMLX.js → chunk-3X2CFOUM.js} +358 -298
- package/chunks/{chunk-K7CRWKOE.js → chunk-3YJZ6WNY.js} +5812 -4520
- package/chunks/{chunk-Y66VOBRP.js → chunk-4CA4WUMS.js} +2 -2
- package/chunks/{chunk-LQIDP6K5.js → chunk-4CHDYDG3.js} +1 -1
- package/chunks/{chunk-TISZXPAX.js → chunk-4HCYNDMG.js} +1 -1
- package/chunks/chunk-4JBTZBCW.js +140 -0
- package/chunks/{chunk-TV6K2FB4.js → chunk-4RPARQ5D.js} +2 -2
- package/chunks/{chunk-RCEEXIOO.js → chunk-4XCVGEEX.js} +3 -3
- package/chunks/{chunk-N6FXRR6P.js → chunk-57RWF6R7.js} +1 -1
- package/chunks/chunk-5O34IMY5.js +59 -0
- package/chunks/{chunk-5LROA5W4.js → chunk-5QRK2VZG.js} +8 -8
- package/chunks/{chunk-7L4XBYVW.js → chunk-632KROVU.js} +10 -3
- package/chunks/{chunk-65N2J6V2.js → chunk-64XGKNSI.js} +3 -3
- package/chunks/{chunk-P6LART6G.js → chunk-66IT3EY2.js} +1059 -129
- package/chunks/{chunk-FXMC7SL2.js → chunk-6ITLKEOZ.js} +3 -3
- package/chunks/{chunk-F7NXQH4Y.js → chunk-6YIRYY3P.js} +1 -1
- package/chunks/{chunk-GGJII3FM.js → chunk-6Z5NRZVU.js} +92 -3
- package/chunks/{chunk-DPFBNG72.js → chunk-AEKYFMYE.js} +1 -1
- package/chunks/{chunk-2UUAIFQO.js → chunk-ANRANWVE.js} +9 -1
- package/chunks/{chunk-SXU3KKNI.js → chunk-ATJ7H5AS.js} +419 -76
- package/chunks/{chunk-6GETGQWP.js → chunk-C5NSOSF4.js} +64 -18
- package/chunks/{chunk-TQBODCFD.js → chunk-CMVFTMRD.js} +251 -3
- package/chunks/{chunk-DK33QJ3V.js → chunk-CZSAIBUB.js} +733 -14
- package/chunks/{chunk-3MX7D6QN.js → chunk-DASWPKXR.js} +32 -4
- package/chunks/{chunk-JSJFKYWT.js → chunk-DPSHAB47.js} +2 -2
- package/chunks/{chunk-7MJAZMXK.js → chunk-ECZFTRTP.js} +29 -78
- package/chunks/{chunk-H3FQOPPS.js → chunk-EKG3BHQY.js} +4 -4
- package/chunks/{chunk-FSA7ERJ2.js → chunk-F2RR4HO2.js} +1 -1
- package/chunks/{chunk-EQY6POVO.js → chunk-F5XYN5VF.js} +2 -2
- package/chunks/chunk-FEOZBUMT.js +77 -0
- package/chunks/{chunk-L62SEJWY.js → chunk-FHUXCRAF.js} +4 -4
- package/chunks/{chunk-OFEVHGVU.js → chunk-FSJGBUQI.js} +818 -31
- package/chunks/{chunk-FBU7WRZI.js → chunk-FUTHTZVV.js} +1 -1
- package/chunks/{chunk-ZRKBI3DP.js → chunk-FZRES4GK.js} +1 -1
- package/chunks/{chunk-OKAIGAYW.js → chunk-G274ETR6.js} +3 -3
- package/chunks/{chunk-6GKMJPOC.js → chunk-GA3WUOO7.js} +5 -5
- package/chunks/{chunk-X362TMXZ.js → chunk-GAQOQMHY.js} +8 -6
- package/chunks/{chunk-WLXYAKV7.js → chunk-GG6RSNWS.js} +9 -4
- package/chunks/{chunk-CEW4HDPK.js → chunk-GUNTLALV.js} +2484 -362
- package/chunks/{chunk-LXLTBIDP.js → chunk-HCCR43AY.js} +1 -1
- package/chunks/{chunk-RDRVMDWV.js → chunk-HIMIG6PI.js} +11 -11
- package/chunks/{chunk-MO7O5722.js → chunk-HQXQCIT2.js} +45 -5
- package/chunks/{chunk-LTNI523B.js → chunk-HT7L5FCZ.js} +28 -5
- package/chunks/{chunk-7NAWTFVY.js → chunk-IENO2YAT.js} +3 -3
- package/chunks/{chunk-3XJFUTNM.js → chunk-IK5TYYVR.js} +59 -12
- package/chunks/{chunk-AAR5SGMD.js → chunk-IVKLDHU6.js} +7 -5
- package/chunks/{chunk-6W6DI34P.js → chunk-IX7O5WI3.js} +180 -8
- package/chunks/{chunk-SPJQO2CE.js → chunk-J2MKYJKZ.js} +2 -2
- package/chunks/{chunk-SPUYQB4T.js → chunk-JBAQ5BYX.js} +1 -1
- package/chunks/{chunk-TYLOFD2U.js → chunk-JCJPZMJV.js} +1 -1
- package/chunks/chunk-JDIUK2Y3.js +226 -0
- package/chunks/{chunk-L37RC7MQ.js → chunk-JUVTV4NF.js} +1 -1
- package/chunks/{chunk-WDWJ4OQJ.js → chunk-K2GBHL73.js} +4 -4
- package/chunks/{chunk-HHEFI4RP.js → chunk-KEVDWH3U.js} +857 -137
- package/chunks/{chunk-YU56QGXX.js → chunk-KTKETHMY.js} +1 -1
- package/chunks/{chunk-WDW64OW3.js → chunk-LGY7PG7Q.js} +5 -5
- package/chunks/{chunk-E67NFMF4.js → chunk-LKR7QQ63.js} +37 -3
- package/chunks/{chunk-4YWLED2A.js → chunk-LSFVUGXT.js} +9 -6
- package/chunks/{chunk-W34A5MJH.js → chunk-LTD3CHGS.js} +1 -1
- package/chunks/chunk-LXXMOYPL.js +22 -0
- package/chunks/{chunk-BBNVFRGD.js → chunk-MI2V6IWU.js} +1 -1
- package/chunks/{chunk-UFOKA4PR.js → chunk-O2K6BLPZ.js} +114 -4
- package/chunks/{chunk-B5I2IIWY.js → chunk-OBYAX5QZ.js} +6 -6
- package/chunks/{chunk-V7EQTZYR.js → chunk-OCQ2QTFJ.js} +203 -47
- package/chunks/{chunk-VBRRNQB7.js → chunk-OPVIKLKK.js} +112 -25
- package/chunks/{chunk-2Z5UX4KI.js → chunk-OSSDHJDU.js} +1 -1
- package/chunks/{chunk-TTUO4DNG.js → chunk-OXOEOOQU.js} +126 -734
- package/chunks/{chunk-4FMG7EDJ.js → chunk-PWYLF7SS.js} +79 -16
- package/chunks/chunk-QFEY6OXH.js +45 -0
- package/chunks/{chunk-YX4LLZ3D.js → chunk-QPRDXJIC.js} +115 -40
- package/chunks/{chunk-7R4DPSRA.js → chunk-R3VWUU2E.js} +1 -1
- package/chunks/{chunk-XLIRF7IK.js → chunk-S4N3G4BB.js} +1 -1
- package/chunks/{chunk-ARKANCNX.js → chunk-SGPFJMRP.js} +1 -1
- package/chunks/{chunk-WTSXKLG5.js → chunk-SUARMD4Q.js} +1 -1
- package/chunks/{chunk-PZL23GTM.js → chunk-T3W4SDRB.js} +2 -0
- package/chunks/chunk-T4TZQJ7W.js +48 -0
- package/chunks/{chunk-K4PZ5F5T.js → chunk-TVYM3Q3J.js} +101 -8
- package/chunks/{chunk-4LD5APFL.js → chunk-TYQMGACW.js} +1 -0
- package/chunks/{chunk-6OATMEYN.js → chunk-U2LNTX56.js} +12 -4
- package/chunks/{chunk-422XAKCK.js → chunk-U2XBPBO3.js} +4 -3
- package/chunks/{chunk-LNUXFLLJ.js → chunk-U4FJ26D2.js} +54 -6
- package/chunks/{chunk-ZQTZXVHP.js → chunk-U6OPT4H2.js} +4 -18
- package/chunks/{chunk-7NFB7LBQ.js → chunk-UE5TZ55T.js} +8 -0
- package/chunks/{chunk-CUUXANEQ.js → chunk-URP6O2PP.js} +6 -1
- package/chunks/{chunk-GDQQRV43.js → chunk-V2FRLYHN.js} +3 -3
- package/chunks/{chunk-WIEO4CWB.js → chunk-VAJS2E2D.js} +1 -1
- package/chunks/{chunk-TXY2C3D2.js → chunk-VNN3JNYT.js} +1 -1
- package/chunks/{chunk-YHN5SUIJ.js → chunk-W7H223ZZ.js} +1 -1
- package/chunks/{chunk-WX6SD4IQ.js → chunk-WEPXQKGP.js} +1 -1
- package/chunks/{chunk-KSO42X3Z.js → chunk-X6YQWCIJ.js} +21 -2
- package/chunks/{chunk-URU5UEK6.js → chunk-XA7OKDWM.js} +135 -68
- package/chunks/{chunk-Q6TUALBE.js → chunk-XAAEDML2.js} +1 -1
- package/chunks/{chunk-KKRTYONM.js → chunk-XSPFQQRE.js} +3 -3
- package/chunks/{chunk-OATTJGPJ.js → chunk-Y72B36CP.js} +7 -7
- package/chunks/{chunk-ZPAHLFZU.js → chunk-Z2LBNX3R.js} +2 -2
- package/chunks/{chunk-XXJKGHZV.js → chunk-ZTSDZQZO.js} +131 -4
- package/chunks/{computer-use-IYTX45WA.js → computer-use-UIFBH25Y.js} +26 -26
- package/chunks/{config-utils-CFT33LTP.js → config-utils-2LHI7JXU.js} +3 -3
- package/chunks/{contextCommand-272V77WU.js → contextCommand-VGZHKEH2.js} +28 -28
- package/chunks/{create-sub-session-WNX2OQVX.js → create-sub-session-DIJOV6HV.js} +2 -2
- package/chunks/{create-sub-session-CBJMQLYP.js → create-sub-session-OFVI4H6I.js} +26 -26
- package/chunks/{cron-create-36TIFKRT.js → cron-create-34GVLSW5.js} +4 -4
- package/chunks/{cron-delete-OQD3WULU.js → cron-delete-NMVKUL45.js} +4 -4
- package/chunks/{cron-list-4533T2FH.js → cron-list-277ZOR7L.js} +4 -4
- package/chunks/{daemon-RNGFPMAB.js → daemon-72MEV3TY.js} +361 -84
- package/chunks/daemon-status-provider-ZJJ6AOG2.js +75 -0
- package/chunks/{de-2VCDRDGU.js → de-56TMDIKS.js} +7 -2
- package/chunks/{dist-3V3ZV6ML.js → dist-4W3UGU2A.js} +1 -1
- package/chunks/{dist-HNN7DR2L.js → dist-G6QCGO2K.js} +58 -30
- package/chunks/{dist-ERCPDVA6.js → dist-ILVRL322.js} +4 -51
- package/chunks/{dist-PHEPJLXD.js → dist-KEZ5JWH4.js} +2 -2
- package/chunks/{dist-JZE7F6YR.js → dist-LQHDHBPP.js} +1 -1
- package/chunks/{dist-MOEC47TR.js → dist-SVHAGOLN.js} +1 -1
- package/chunks/{earlyInputCapture-EN4BRREQ.js → earlyInputCapture-NPF4PVUE.js} +27 -27
- package/chunks/{edit-OMAF2QDR.js → edit-F7CT6NZH.js} +27 -27
- package/chunks/{en-NJCA3TAA.js → en-AXS2N62H.js} +12 -3
- package/chunks/{enter-worktree-BBZX52HG.js → enter-worktree-Z4ET3MZL.js} +26 -26
- package/chunks/{enterPlanMode-5NNFMBUY.js → enterPlanMode-VYR7T5NX.js} +27 -29
- package/chunks/{environment-7TEWMJYN.js → environment-MBTXL57Q.js} +28 -28
- package/chunks/{errors-I4VKVX3F.js → errors-HN36J4FR.js} +28 -28
- package/chunks/{exit-worktree-FUWRJI33.js → exit-worktree-RU7JYFMF.js} +26 -26
- package/chunks/exitPlanMode-LUBAWMZQ.js +390 -0
- package/chunks/{fast-path-ZA57TOH4.js → fast-path-RFT3CDNZ.js} +2 -2
- package/chunks/{fr-5F3E7WKD.js → fr-ZJPE5OVN.js} +7 -2
- package/chunks/{gemini-UOAKVXBG.js → gemini-37NTNKZF.js} +215 -231
- package/chunks/{geminiContentGenerator-G6UCE6MW.js → geminiContentGenerator-76HNOYNQ.js} +5 -5
- package/chunks/{glob-4GJQ2UFF.js → glob-DWD7JCZE.js} +32 -27
- package/chunks/{grep-5QSYXF2E.js → grep-NJRXFV5C.js} +32 -27
- package/chunks/{handleAutoUpdate-ULHNWL6R.js → handleAutoUpdate-7GBDXW6U.js} +30 -30
- package/chunks/{i18n-CYDUTF6F.js → i18n-MYD5VGED.js} +27 -27
- package/chunks/{initializer-NRFKUGIO.js → initializer-4DHPNAZG.js} +32 -32
- package/chunks/{installationInfo-WELKRHHE.js → installationInfo-RWOW6BZO.js} +27 -27
- package/chunks/{ja-66J6B53L.js → ja-57GG4QSL.js} +7 -2
- package/chunks/{keychain-token-storage-AU22CQI6.js → keychain-token-storage-K23CFKGN.js} +2 -2
- package/chunks/{list-JVDXEG2E.js → list-MMCNNHE7.js} +34 -34
- package/chunks/{loadedSettingsAdapter-WAM4VUTG.js → loadedSettingsAdapter-UK4JWPYU.js} +31 -31
- package/chunks/{loop-wakeup-MVUKDVCP.js → loop-wakeup-KCLY4XQM.js} +5 -5
- package/chunks/{ls-RXNIAQDE.js → ls-UNI4LAJ3.js} +4 -4
- package/chunks/{lsp-HB5LM5IL.js → lsp-HPACPJAN.js} +2 -2
- package/chunks/{mcp-YHOZN3ZM.js → mcp-AFCVA4UV.js} +31 -31
- package/chunks/{monitor-R7XZPJHQ.js → monitor-RK637BNO.js} +28 -27
- package/chunks/nonInteractiveCli-OUGWLHNV.js +129 -0
- package/chunks/{notebook-edit-6RNKE2L2.js → notebook-edit-LY2X3CMF.js} +27 -27
- package/chunks/{openaiContentGenerator-XNS5S64I.js → openaiContentGenerator-MDYDW7IA.js} +14 -14
- package/chunks/{pidfile-XE4RRR2P.js → pidfile-2NUYRLKB.js} +27 -27
- package/chunks/processUtils-7QH3VBVN.js +29 -0
- package/chunks/{pt-TFZO5Y6T.js → pt-MCGZ3RZ4.js} +7 -2
- package/chunks/{qwenContentGenerator-APDPJ3VN.js → qwenContentGenerator-3HT4TVDL.js} +28 -28
- package/chunks/{qwenOAuth2-LEYOU7RU.js → qwenOAuth2-3A4TJVZT.js} +5 -5
- package/chunks/{read-file-XSUWXSR7.js → read-file-NE4FREFR.js} +10 -10
- package/chunks/{read-mcp-resource-6LRTZKXI.js → read-mcp-resource-C6NT52T6.js} +2 -2
- package/chunks/{record-artifact-PMDTY4OS.js → record-artifact-ENCU7QCL.js} +2 -2
- package/chunks/{ripGrep-APB3CDMU.js → ripGrep-DBLXWQCJ.js} +26 -26
- package/chunks/{ru-4L4LFHIT.js → ru-GA3NZW5Q.js} +7 -2
- package/chunks/{run-qwen-serve-NWTGPERT.js → run-qwen-serve-3NOCI6IL.js} +63 -39
- package/chunks/{runtime-EIO3NQKR.js → runtime-ZI7DSZSS.js} +35 -35
- package/chunks/{scheduler-JJDZBDRN.js → scheduler-SOVEP5K7.js} +26 -26
- package/chunks/{send-message-SR4WSXP2.js → send-message-5IFPZTPE.js} +3 -3
- package/chunks/{serve-WTIPB3EI.js → serve-DB6OCXIA.js} +31 -31
- package/chunks/{server-NJPHQHLH.js → server-LDY4YVU4.js} +2257 -648
- package/chunks/{session-O4AO7FTS.js → session-D6OG5SKX.js} +99 -72
- package/chunks/{settings-HQNDK7TG.js → settings-L52ZV5LO.js} +30 -30
- package/chunks/{shell-UIXM6PWG.js → shell-IU27OY3Q.js} +28 -26
- package/chunks/{skill-3XMB4ULV.js → skill-BSOJT7LE.js} +12 -12
- package/chunks/{spawnChannel-3R632QRM.js → spawnChannel-HQAM25DD.js} +28 -29
- package/chunks/{src-USZKPUOC.js → src-7ZBIMTJZ.js} +130 -51
- package/chunks/{standalone-update-L5XW3D7K.js → standalone-update-77457VVK.js} +28 -28
- package/chunks/{startInteractiveUI-CPZOL2WB.js → startInteractiveUI-S7WC6EZG.js} +2310 -1835
- package/chunks/{syntheticOutput-YKFNUQZD.js → syntheticOutput-ULOVVLY4.js} +3 -3
- package/chunks/{task-create-NUFOHU53.js → task-create-V2DCDSET.js} +7 -7
- package/chunks/{task-list-Z2IKQY3S.js → task-list-DPL5ZN55.js} +5 -5
- package/chunks/{task-stop-KQFIVQTJ.js → task-stop-CPEQWOT6.js} +2 -2
- package/chunks/{task-update-HKADXSTD.js → task-update-ZR45M5Q7.js} +7 -7
- package/chunks/{team-create-XXPRF3IQ.js → team-create-CO7HSUON.js} +26 -26
- package/chunks/{team-delete-SDNTGZLG.js → team-delete-HIWXCWJU.js} +5 -5
- package/chunks/{team-plan-approval-EOTTKHDW.js → team-plan-approval-QDZF5YZY.js} +26 -26
- package/chunks/{theme-manager-P6UITO2L.js → theme-manager-UTUT3I4P.js} +27 -27
- package/chunks/todoWrite-HK6B3RHJ.js +358 -0
- package/chunks/{tool-search-DDNGK2LR.js → tool-search-2UUORA35.js} +11 -11
- package/chunks/{total-session-admission-PL5N7DNY.js → total-session-admission-NTWG6G3F.js} +32 -34
- package/chunks/{trustedFolders-C5LMF3UR.js → trustedFolders-YF37ZCN5.js} +27 -27
- package/chunks/update-relaunch-QFNHPMZZ.js +87 -0
- package/chunks/{updateCheck-QTVVISH7.js → updateCheck-B6O42VMD.js} +30 -28
- package/chunks/{validateNonInterActiveAuth-RY4RKBQG.js → validateNonInterActiveAuth-SCIWJ4CX.js} +65 -65
- package/chunks/{version-U45RYOSD.js → version-7DA6LAI3.js} +1 -1
- package/chunks/{web-fetch-ZSPR3PRR.js → web-fetch-B62SJXM2.js} +5 -6
- package/chunks/{workflow-TCIAQYOA.js → workflow-Q5WG4THP.js} +27 -27
- package/chunks/{workspace-providers-status-I3G2HYLY.js → workspace-providers-status-WWLAGWQW.js} +34 -34
- package/chunks/{workspace-registration-store-IH5GLZ6Y.js → workspace-registration-store-BVYQVY2H.js} +1 -1
- package/chunks/{workspace-registry-QEKBELIX.js → workspace-registry-OD7ACADD.js} +32 -34
- package/chunks/{workspace-service-ORKHGLP3.js → workspace-service-4LYJWS63.js} +37 -38
- package/chunks/{workspace-skills-status-D7QCNDYY.js → workspace-skills-status-P2AQLZZS.js} +32 -32
- package/chunks/{write-file-JGRQR5VM.js → write-file-TEPGXNM3.js} +60 -27
- package/chunks/{zh-FSAH32JB.js → zh-E34DZ2S3.js} +12 -3
- package/chunks/{zh-TW-D2YIE2LO.js → zh-TW-PEI2ZWUR.js} +12 -3
- package/cli-entry.js +92 -8
- package/cli.js +11 -11
- package/locales/ca.js +12 -2
- package/locales/de.js +12 -2
- package/locales/en.js +20 -5
- package/locales/fr.js +12 -2
- package/locales/ja.js +12 -2
- package/locales/pt.js +12 -2
- package/locales/ru.js +12 -2
- package/locales/zh-TW.js +19 -3
- package/locales/zh.js +19 -3
- package/package.json +3 -3
- package/web-shell/assets/{arc-CUeDlxvE.js → arc-Dh-N5oEG.js} +1 -1
- package/web-shell/assets/{architectureDiagram-3BPJPVTR-PiUszkQA.js → architectureDiagram-3BPJPVTR-DBOQgtfF.js} +1 -1
- package/web-shell/assets/{blockDiagram-GPEHLZMM-s2wYSO7e.js → blockDiagram-GPEHLZMM-Dyxbuyju.js} +1 -1
- package/web-shell/assets/{c4Diagram-AAUBKEIU-DyLxZoz9.js → c4Diagram-AAUBKEIU-DCJR5HPT.js} +1 -1
- package/web-shell/assets/channel-DY0fkcKT.js +1 -0
- package/web-shell/assets/{chunk-2J33WTMH-Dsdai7Tk.js → chunk-2J33WTMH-BkMUcy3O.js} +1 -1
- package/web-shell/assets/{chunk-4BX2VUAB-DEosOjV7.js → chunk-4BX2VUAB-BSm4pLQk.js} +1 -1
- package/web-shell/assets/{chunk-55IACEB6-sNsRLTXf.js → chunk-55IACEB6-CuRr-XgW.js} +1 -1
- package/web-shell/assets/{chunk-727SXJPM-DkRNZzmh.js → chunk-727SXJPM-CLv7-w3t.js} +1 -1
- package/web-shell/assets/{chunk-AQP2D5EJ-BrsRNpzd.js → chunk-AQP2D5EJ-Cz_n3-JW.js} +1 -1
- package/web-shell/assets/{chunk-FMBD7UC4-CI039lpl.js → chunk-FMBD7UC4-CFT_62Hq.js} +1 -1
- package/web-shell/assets/{chunk-ND2GUHAM-M-pkeIfu.js → chunk-ND2GUHAM-DWz6DOZ6.js} +1 -1
- package/web-shell/assets/{chunk-QZHKN3VN-C4ckGNbH.js → chunk-QZHKN3VN-C-mRhUzw.js} +1 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-DBvJ6PZo.js +1 -0
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-DBvJ6PZo.js +1 -0
- package/web-shell/assets/{cose-bilkent-S5V4N54A-BciKUAFq.js → cose-bilkent-S5V4N54A-BqCZS3i1.js} +1 -1
- package/web-shell/assets/{dagre-BM42HDAG-C1nTSgU6.js → dagre-BM42HDAG-BGasdP8i.js} +1 -1
- package/web-shell/assets/{diagram-2AECGRRQ-BDPNWr1m.js → diagram-2AECGRRQ-BSyLDkMy.js} +1 -1
- package/web-shell/assets/{diagram-5GNKFQAL-CNFhTszL.js → diagram-5GNKFQAL-CM-ZJxWC.js} +1 -1
- package/web-shell/assets/{diagram-KO2AKTUF-CjPa4p5a.js → diagram-KO2AKTUF-wJdzt_C5.js} +1 -1
- package/web-shell/assets/{diagram-LMA3HP47-ZzPykSyG.js → diagram-LMA3HP47-DiH2fhpL.js} +1 -1
- package/web-shell/assets/{diagram-OG6HWLK6-0UVtZ9A4.js → diagram-OG6HWLK6-BZ9z1ZBl.js} +1 -1
- package/web-shell/assets/{erDiagram-TEJ5UH35-CajDZCat.js → erDiagram-TEJ5UH35-BsyWDziR.js} +1 -1
- package/web-shell/assets/{flowDiagram-I6XJVG4X-BRuFBIvL.js → flowDiagram-I6XJVG4X-CzdkxIrq.js} +1 -1
- package/web-shell/assets/{ganttDiagram-6RSMTGT7-BevGmJqG.js → ganttDiagram-6RSMTGT7-javIv2r2.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-PVQCEYII-DvPMpBMb.js → gitGraphDiagram-PVQCEYII-CjHstylC.js} +1 -1
- package/web-shell/assets/{index-DzHwQkQq.js → index-BnJGxpah.js} +1 -1
- package/web-shell/assets/index-DhXB9nTa.js +1161 -0
- package/web-shell/assets/index-vYHgZ7bL.css +5 -0
- package/web-shell/assets/{infoDiagram-5YYISTIA-Oixn7tA9.js → infoDiagram-5YYISTIA-yXuQsomo.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-BgKpeg-j.js → ishikawaDiagram-YF4QCWOH-a85JhE6F.js} +1 -1
- package/web-shell/assets/{journeyDiagram-JHISSGLW-74mwxIaA.js → journeyDiagram-JHISSGLW-Dak_4BVj.js} +1 -1
- package/web-shell/assets/{kanban-definition-UN3LZRKU-D4D6cEqA.js → kanban-definition-UN3LZRKU-COA-LuCV.js} +1 -1
- package/web-shell/assets/{linear-atZRE_L2.js → linear-DNAAAQWq.js} +1 -1
- package/web-shell/assets/{mermaid.core-KKudX-JC.js → mermaid.core-7Ff3aIUD.js} +5 -5
- package/web-shell/assets/{mindmap-definition-RKZ34NQL-CMCej9yG.js → mindmap-definition-RKZ34NQL-_rCOIODU.js} +1 -1
- package/web-shell/assets/{pieDiagram-4H26LBE5-nhx40X7q.js → pieDiagram-4H26LBE5-C9QCQ8EW.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-W4KKPZXB-CUmVcN3M.js → quadrantDiagram-W4KKPZXB-CsaE4FA8.js} +1 -1
- package/web-shell/assets/{requirementDiagram-4Y6WPE33-C_vyEwyy.js → requirementDiagram-4Y6WPE33-tV78naTg.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-5OEKKPKP-DU6G4VWR.js → sankeyDiagram-5OEKKPKP-Dk3Rw7BZ.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-3UESZ5HK-DdeRR_KJ.js → sequenceDiagram-3UESZ5HK-BGsAWcMX.js} +1 -1
- package/web-shell/assets/{stateDiagram-AJRCARHV-C6iCI8ps.js → stateDiagram-AJRCARHV-zSxdtdoB.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-vLEEtDpO.js +1 -0
- package/web-shell/assets/{timeline-definition-PNZ67QCA-B_Ea8Cb7.js → timeline-definition-PNZ67QCA-j0BQh9Go.js} +1 -1
- package/web-shell/assets/{vennDiagram-CIIHVFJN-BPUVZEJA.js → vennDiagram-CIIHVFJN-CRaUFFIu.js} +1 -1
- package/web-shell/assets/{wardley-L42UT6IY-BWEj0lKY.js → wardley-L42UT6IY-D7Py_ofm.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-YWT4CUSO-BvDsdIQw.js → wardleyDiagram-YWT4CUSO-BrDIAZcp.js} +1 -1
- package/web-shell/assets/{xychartDiagram-2RQKCTM6-crz0QhF_.js → xychartDiagram-2RQKCTM6-Cecdw-w2.js} +1 -1
- package/web-shell/index.html +2 -2
- package/chunks/channel-worker-group-K7QKH6IG.js +0 -13
- package/chunks/chunk-2HRYPZT5.js +0 -25
- package/chunks/chunk-B7NUUEXC.js +0 -311
- package/chunks/chunk-CARU2RR2.js +0 -24
- package/chunks/chunk-GYTKQYDB.js +0 -23
- package/chunks/chunk-LQU7EVFA.js +0 -30
- package/chunks/chunk-OCPBI7J5.js +0 -18
- package/chunks/chunk-OJAMDVF5.js +0 -66
- package/chunks/chunk-QAW7PIHT.js +0 -168
- package/chunks/chunk-TEGEBB2I.js +0 -122
- package/chunks/daemon-status-provider-L4STG5VO.js +0 -76
- package/chunks/exitPlanMode-IHCJ5EEI.js +0 -909
- package/chunks/nonInteractiveCli-NSOB6D74.js +0 -129
- package/chunks/todoWrite-YNXB27GB.js +0 -531
- package/web-shell/assets/channel-DkuJJ0qd.js +0 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-CwqHc0TB.js +0 -1
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-CwqHc0TB.js +0 -1
- package/web-shell/assets/index-Cnvv4VcI.css +0 -5
- package/web-shell/assets/index-D1Uyklxa.js +0 -1088
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-C0_6nR6C.js +0 -1
|
@@ -4,90 +4,99 @@ import {
|
|
|
4
4
|
handleAtCommand,
|
|
5
5
|
resolveAtCommandQuery,
|
|
6
6
|
sanitizeDisplayText
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-GAQOQMHY.js";
|
|
8
8
|
import {
|
|
9
9
|
isAtCommand,
|
|
10
10
|
isBtwCommand,
|
|
11
11
|
isSlashCommand,
|
|
12
12
|
normalizePartList,
|
|
13
13
|
recordGoalStatusItem
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-QPRDXJIC.js";
|
|
15
15
|
import {
|
|
16
|
+
findLastSafeSplitPoint,
|
|
16
17
|
fitPendingSlice,
|
|
18
|
+
getEnclosingFenceInfo,
|
|
19
|
+
splitFencedMarkdown,
|
|
17
20
|
useSessionStats
|
|
18
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-ZTSDZQZO.js";
|
|
19
22
|
import {
|
|
20
23
|
SHELL_COMMAND_NAME,
|
|
21
24
|
isCollapsibleTool
|
|
22
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-CZSAIBUB.js";
|
|
23
26
|
import {
|
|
24
27
|
require_react
|
|
25
28
|
} from "./chunk-HTHUX2T5.js";
|
|
26
29
|
import {
|
|
27
30
|
themeManager
|
|
28
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-XAAEDML2.js";
|
|
29
32
|
import {
|
|
30
33
|
formatMemoryUsage
|
|
31
34
|
} from "./chunk-E5Z2AVNV.js";
|
|
32
35
|
import {
|
|
33
36
|
isInlineModelOverrideAllowed
|
|
34
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-6Z5NRZVU.js";
|
|
35
38
|
import {
|
|
36
39
|
t
|
|
37
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-HIMIG6PI.js";
|
|
38
41
|
import {
|
|
39
42
|
AutonomousLoopTickResolver,
|
|
40
43
|
CoreToolScheduler,
|
|
41
44
|
ShellExecutionService,
|
|
42
45
|
activeGoalEquals,
|
|
46
|
+
clampInlineMediaPart,
|
|
43
47
|
clearActiveGoal,
|
|
44
48
|
compactToolResultDisplayForHistory,
|
|
49
|
+
convertToFunctionErrorResponse,
|
|
45
50
|
createDuplicateProviderToolCallResponse,
|
|
46
51
|
detectAutonomousSentinel,
|
|
47
52
|
findRepeatedDuplicateProviderToolCall,
|
|
48
53
|
generateToolUseSummary,
|
|
49
54
|
getActiveGoal,
|
|
50
55
|
getToolResponseDisplayText,
|
|
51
|
-
hasImageParts,
|
|
52
56
|
isBinary,
|
|
53
57
|
markDuplicateProviderToolCallResponseSent,
|
|
54
58
|
parseAndFormatApiError,
|
|
55
59
|
promptIdContext,
|
|
56
60
|
refreshMemoryAfterManagedWrite,
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
shouldRunVisionBridge,
|
|
60
|
-
splitImageParts
|
|
61
|
-
} from "./chunk-K7CRWKOE.js";
|
|
61
|
+
setActiveGoal
|
|
62
|
+
} from "./chunk-3YJZ6WNY.js";
|
|
62
63
|
import {
|
|
63
64
|
ApiCancelEvent,
|
|
64
65
|
ConversationFinishedEvent,
|
|
65
66
|
UserPromptEvent,
|
|
66
67
|
UserRetryEvent,
|
|
68
|
+
formatFullTurnVisionNotice,
|
|
69
|
+
formatVisionBridgeNotice,
|
|
70
|
+
getFullTurnVisionModelSelector,
|
|
71
|
+
hasImageParts,
|
|
67
72
|
logApiCancel,
|
|
68
73
|
logConversationFinishedEvent,
|
|
69
74
|
logUserPrompt,
|
|
70
|
-
logUserRetry
|
|
71
|
-
|
|
75
|
+
logUserRetry,
|
|
76
|
+
runVisionBridge,
|
|
77
|
+
shouldRunVisionBridge,
|
|
78
|
+
splitImageParts
|
|
79
|
+
} from "./chunk-66IT3EY2.js";
|
|
72
80
|
import {
|
|
73
81
|
isAnyAutoMemPath
|
|
74
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-FUTHTZVV.js";
|
|
75
83
|
import {
|
|
76
|
-
ToolNames
|
|
77
|
-
|
|
84
|
+
ToolNames,
|
|
85
|
+
isShellProgressData
|
|
86
|
+
} from "./chunk-ANRANWVE.js";
|
|
78
87
|
import {
|
|
79
88
|
getUnsupportedImageFormatWarning,
|
|
80
89
|
isSupportedImageMimeType
|
|
81
|
-
} from "./chunk-
|
|
90
|
+
} from "./chunk-FEOZBUMT.js";
|
|
82
91
|
import {
|
|
83
92
|
FinishReason
|
|
84
|
-
} from "./chunk-
|
|
93
|
+
} from "./chunk-TYQMGACW.js";
|
|
85
94
|
import {
|
|
86
95
|
UnauthorizedError,
|
|
87
96
|
createDebugLogger,
|
|
88
97
|
getErrorMessage,
|
|
89
98
|
isNodeError
|
|
90
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-UE5TZ55T.js";
|
|
91
100
|
import {
|
|
92
101
|
init_esbuild_shims
|
|
93
102
|
} from "./chunk-5O2XNYP6.js";
|
|
@@ -105,31 +114,6 @@ function useDualOutput() {
|
|
|
105
114
|
}
|
|
106
115
|
__name(useDualOutput, "useDualOutput");
|
|
107
116
|
|
|
108
|
-
// packages/cli/src/utils/midTurnUserMessage.ts
|
|
109
|
-
init_esbuild_shims();
|
|
110
|
-
var MID_TURN_USER_MESSAGE_PREFIX = "\n[User message received during tool execution]: ";
|
|
111
|
-
function prefixMidTurnUserMessageParts(parts, displayText) {
|
|
112
|
-
const partArray = normalizePartList(parts);
|
|
113
|
-
if (partArray.length === 0) {
|
|
114
|
-
return [{ text: `${MID_TURN_USER_MESSAGE_PREFIX}${displayText}` }];
|
|
115
|
-
}
|
|
116
|
-
const [firstPart, ...rest] = partArray;
|
|
117
|
-
if ("text" in firstPart && typeof firstPart.text === "string") {
|
|
118
|
-
return [
|
|
119
|
-
{
|
|
120
|
-
...firstPart,
|
|
121
|
-
text: `${MID_TURN_USER_MESSAGE_PREFIX}${firstPart.text}`
|
|
122
|
-
},
|
|
123
|
-
...rest
|
|
124
|
-
];
|
|
125
|
-
}
|
|
126
|
-
return [
|
|
127
|
-
{ text: `${MID_TURN_USER_MESSAGE_PREFIX}${displayText}` },
|
|
128
|
-
...partArray
|
|
129
|
-
];
|
|
130
|
-
}
|
|
131
|
-
__name(prefixMidTurnUserMessageParts, "prefixMidTurnUserMessageParts");
|
|
132
|
-
|
|
133
117
|
// packages/cli/src/ui/hooks/useGeminiStream.ts
|
|
134
118
|
init_esbuild_shims();
|
|
135
119
|
var import_react5 = __toESM(require_react(), 1);
|
|
@@ -422,103 +406,6 @@ ${finalOutput}`;
|
|
|
422
406
|
return { handleShellCommand, activeShellPtyId };
|
|
423
407
|
}, "useShellCommandProcessor");
|
|
424
408
|
|
|
425
|
-
// packages/cli/src/ui/utils/markdownUtilities.ts
|
|
426
|
-
init_esbuild_shims();
|
|
427
|
-
var findNextFence = /* @__PURE__ */ __name((content, from) => {
|
|
428
|
-
const backtick = content.indexOf("```", from);
|
|
429
|
-
const tilde = content.indexOf("~~~", from);
|
|
430
|
-
if (backtick === -1 && tilde === -1) return null;
|
|
431
|
-
let index;
|
|
432
|
-
let char;
|
|
433
|
-
if (tilde === -1 || backtick !== -1 && backtick < tilde) {
|
|
434
|
-
index = backtick;
|
|
435
|
-
char = "`";
|
|
436
|
-
} else {
|
|
437
|
-
index = tilde;
|
|
438
|
-
char = "~";
|
|
439
|
-
}
|
|
440
|
-
let length = 0;
|
|
441
|
-
while (content[index + length] === char) length++;
|
|
442
|
-
return { index, char, length };
|
|
443
|
-
}, "findNextFence");
|
|
444
|
-
var isIndexInsideCodeBlock = /* @__PURE__ */ __name((content, indexToTest) => {
|
|
445
|
-
let openChar = "";
|
|
446
|
-
let openLen = 0;
|
|
447
|
-
let searchPos = 0;
|
|
448
|
-
while (searchPos < content.length) {
|
|
449
|
-
const fence = findNextFence(content, searchPos);
|
|
450
|
-
if (!fence || fence.index >= indexToTest) break;
|
|
451
|
-
if (openChar === "") {
|
|
452
|
-
openChar = fence.char;
|
|
453
|
-
openLen = fence.length;
|
|
454
|
-
} else if (fence.char === openChar && fence.length >= openLen) {
|
|
455
|
-
openChar = "";
|
|
456
|
-
openLen = 0;
|
|
457
|
-
}
|
|
458
|
-
searchPos = fence.index + fence.length;
|
|
459
|
-
}
|
|
460
|
-
return openChar !== "";
|
|
461
|
-
}, "isIndexInsideCodeBlock");
|
|
462
|
-
var findEnclosingCodeBlockStart = /* @__PURE__ */ __name((content, index) => {
|
|
463
|
-
let openChar = "";
|
|
464
|
-
let openLen = 0;
|
|
465
|
-
let openIndex = -1;
|
|
466
|
-
let searchPos = 0;
|
|
467
|
-
while (searchPos < content.length) {
|
|
468
|
-
const fence = findNextFence(content, searchPos);
|
|
469
|
-
if (!fence || fence.index >= index) break;
|
|
470
|
-
if (openChar === "") {
|
|
471
|
-
openChar = fence.char;
|
|
472
|
-
openLen = fence.length;
|
|
473
|
-
openIndex = fence.index;
|
|
474
|
-
} else if (fence.char === openChar && fence.length >= openLen) {
|
|
475
|
-
openChar = "";
|
|
476
|
-
openLen = 0;
|
|
477
|
-
openIndex = -1;
|
|
478
|
-
}
|
|
479
|
-
searchPos = fence.index + fence.length;
|
|
480
|
-
}
|
|
481
|
-
return openChar !== "" ? openIndex : -1;
|
|
482
|
-
}, "findEnclosingCodeBlockStart");
|
|
483
|
-
var findLastSafeSplitPoint = /* @__PURE__ */ __name((content, idealMaxLength) => {
|
|
484
|
-
const hasLengthCap = idealMaxLength !== void 0;
|
|
485
|
-
const searchEnd = hasLengthCap ? Math.min(Math.max(idealMaxLength, 0), content.length) : content.length;
|
|
486
|
-
if (hasLengthCap && content.length <= searchEnd) {
|
|
487
|
-
return content.length;
|
|
488
|
-
}
|
|
489
|
-
const enclosingBlockStart = findEnclosingCodeBlockStart(content, searchEnd);
|
|
490
|
-
if (enclosingBlockStart !== -1) {
|
|
491
|
-
return hasLengthCap && enclosingBlockStart === 0 ? searchEnd : enclosingBlockStart;
|
|
492
|
-
}
|
|
493
|
-
let searchStartIndex = searchEnd;
|
|
494
|
-
while (searchStartIndex >= 0) {
|
|
495
|
-
const dnlIndex = content.lastIndexOf("\n\n", searchStartIndex);
|
|
496
|
-
if (dnlIndex === -1) {
|
|
497
|
-
break;
|
|
498
|
-
}
|
|
499
|
-
const potentialSplitPoint = dnlIndex + 2;
|
|
500
|
-
if (potentialSplitPoint <= searchEnd && !isIndexInsideCodeBlock(content, potentialSplitPoint)) {
|
|
501
|
-
return potentialSplitPoint;
|
|
502
|
-
}
|
|
503
|
-
searchStartIndex = dnlIndex - 1;
|
|
504
|
-
}
|
|
505
|
-
if (hasLengthCap) {
|
|
506
|
-
searchStartIndex = searchEnd;
|
|
507
|
-
while (searchStartIndex >= 0) {
|
|
508
|
-
const nlIndex = content.lastIndexOf("\n", searchStartIndex);
|
|
509
|
-
if (nlIndex === -1) {
|
|
510
|
-
break;
|
|
511
|
-
}
|
|
512
|
-
const potentialSplitPoint = nlIndex + 1;
|
|
513
|
-
if (potentialSplitPoint <= searchEnd && !isIndexInsideCodeBlock(content, potentialSplitPoint)) {
|
|
514
|
-
return potentialSplitPoint;
|
|
515
|
-
}
|
|
516
|
-
searchStartIndex = nlIndex - 1;
|
|
517
|
-
}
|
|
518
|
-
}
|
|
519
|
-
return hasLengthCap ? searchEnd : content.length;
|
|
520
|
-
}, "findLastSafeSplitPoint");
|
|
521
|
-
|
|
522
409
|
// packages/cli/src/ui/hooks/useStateAndRef.ts
|
|
523
410
|
init_esbuild_shims();
|
|
524
411
|
var import_react3 = __toESM(require_react(), 1);
|
|
@@ -550,6 +437,9 @@ function useReactToolScheduler(onComplete, config, getPreferredEditor, onEditorC
|
|
|
550
437
|
const [toolCallsForDisplay, setToolCallsForDisplay] = (0, import_react4.useState)([]);
|
|
551
438
|
const outputUpdateHandler = (0, import_react4.useCallback)(
|
|
552
439
|
(toolCallId, outputChunk) => {
|
|
440
|
+
if (isShellProgressData(outputChunk)) {
|
|
441
|
+
return;
|
|
442
|
+
}
|
|
553
443
|
const compactOutput = compactToolResultDisplayForHistory(outputChunk);
|
|
554
444
|
setToolCallsForDisplay(
|
|
555
445
|
(prevCalls) => prevCalls.map((tc) => {
|
|
@@ -616,10 +506,60 @@ function useReactToolScheduler(onComplete, config, getPreferredEditor, onEditorC
|
|
|
616
506
|
]
|
|
617
507
|
);
|
|
618
508
|
const schedule = (0, import_react4.useCallback)(
|
|
619
|
-
(request, signal) => {
|
|
620
|
-
|
|
509
|
+
(request, signal, modelOverride) => {
|
|
510
|
+
if (!modelOverride?.endsWith("\0")) {
|
|
511
|
+
void scheduler.schedule(request, signal);
|
|
512
|
+
return;
|
|
513
|
+
}
|
|
514
|
+
void (async () => {
|
|
515
|
+
try {
|
|
516
|
+
const runtimeView = await config.getBaseLlmClient().resolveForModel(modelOverride.slice(0, -1), {
|
|
517
|
+
failClosed: true
|
|
518
|
+
});
|
|
519
|
+
await scheduler.schedule(request, signal, runtimeView);
|
|
520
|
+
} catch (error) {
|
|
521
|
+
debugLogger2.error(
|
|
522
|
+
`Full-turn tool scheduling failed: ${error instanceof Error ? error.message : String(error)}`
|
|
523
|
+
);
|
|
524
|
+
const message = "Full-turn tool scheduling failed. The tool was not executed.";
|
|
525
|
+
const requests = Array.isArray(request) ? request : [request];
|
|
526
|
+
const completedCalls = requests.map(
|
|
527
|
+
(toolRequest) => {
|
|
528
|
+
const toolError = new Error(message);
|
|
529
|
+
const responseParts = convertToFunctionErrorResponse(
|
|
530
|
+
toolRequest.name,
|
|
531
|
+
toolRequest.callId,
|
|
532
|
+
message,
|
|
533
|
+
message
|
|
534
|
+
);
|
|
535
|
+
config.getChatRecordingService()?.recordToolResult(responseParts, {
|
|
536
|
+
callId: toolRequest.callId,
|
|
537
|
+
status: "error",
|
|
538
|
+
resultDisplay: message,
|
|
539
|
+
error: toolError,
|
|
540
|
+
errorType: "unhandled_exception" /* UNHANDLED_EXCEPTION */
|
|
541
|
+
});
|
|
542
|
+
return {
|
|
543
|
+
status: "error",
|
|
544
|
+
request: toolRequest,
|
|
545
|
+
response: {
|
|
546
|
+
callId: toolRequest.callId,
|
|
547
|
+
responseParts,
|
|
548
|
+
resultDisplay: message,
|
|
549
|
+
error: toolError,
|
|
550
|
+
errorType: "unhandled_exception" /* UNHANDLED_EXCEPTION */,
|
|
551
|
+
contentLength: message.length
|
|
552
|
+
}
|
|
553
|
+
};
|
|
554
|
+
}
|
|
555
|
+
);
|
|
556
|
+
setToolCallsForDisplay((prev) => [...prev, ...completedCalls]);
|
|
557
|
+
await allToolCallsCompleteHandler(completedCalls);
|
|
558
|
+
return;
|
|
559
|
+
}
|
|
560
|
+
})();
|
|
621
561
|
},
|
|
622
|
-
[scheduler]
|
|
562
|
+
[allToolCallsCompleteHandler, config, scheduler]
|
|
623
563
|
);
|
|
624
564
|
const markToolsAsSubmitted = (0, import_react4.useCallback)(
|
|
625
565
|
(callIdsToMark) => {
|
|
@@ -802,22 +742,6 @@ function clearModelOverride(modelOverrideRef, inlineActiveRef) {
|
|
|
802
742
|
__name(clearModelOverride, "clearModelOverride");
|
|
803
743
|
var MID_TURN_AT_COMMAND_RESOLVE_TIMEOUT_MS = 1e4;
|
|
804
744
|
var MID_TURN_AT_COMMAND_RESOLVE_TIMEOUT_MESSAGE = "Mid-turn @ command resolution timed out";
|
|
805
|
-
function formatVisionBridgeNotice(result) {
|
|
806
|
-
const modelName = result.modelId ?? "vision model";
|
|
807
|
-
const target = result.modelEndpoint ? `${modelName} (${result.modelEndpoint})` : modelName;
|
|
808
|
-
const egressNote = result.egressOccurred ? ` Your image and prompt/context were sent to ${target}.` : "";
|
|
809
|
-
if (result.status === "failed") {
|
|
810
|
-
const reason = result.egressOccurred ? "the vision model request failed" : "the vision bridge could not run";
|
|
811
|
-
return `Vision bridge (${modelName}) failed: ${reason}.${egressNote} The image was not interpreted.`;
|
|
812
|
-
}
|
|
813
|
-
if (result.status === "skipped") {
|
|
814
|
-
return `Vision bridge cancelled.${egressNote}`;
|
|
815
|
-
}
|
|
816
|
-
const omitted = result.omittedCount > 0 ? ` (${result.omittedCount} image(s) omitted)` : "";
|
|
817
|
-
const header = `Converted ${result.convertedCount} image(s)${omitted} to text via ${target}. Your image and prompt/context were sent to that model.`;
|
|
818
|
-
return header;
|
|
819
|
-
}
|
|
820
|
-
__name(formatVisionBridgeNotice, "formatVisionBridgeNotice");
|
|
821
745
|
function extractLastAssistantText(history) {
|
|
822
746
|
for (let i = history.length - 1; i >= 0; i--) {
|
|
823
747
|
const item = history[i];
|
|
@@ -968,7 +892,7 @@ function charIndexAfterLine(text, keptLines) {
|
|
|
968
892
|
return -1;
|
|
969
893
|
}
|
|
970
894
|
__name(charIndexAfterLine, "charIndexAfterLine");
|
|
971
|
-
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) => {
|
|
895
|
+
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) => {
|
|
972
896
|
const [initError, setInitError] = (0, import_react5.useState)(null);
|
|
973
897
|
const abortControllerRef = (0, import_react5.useRef)(null);
|
|
974
898
|
const flushBufferedStreamEventsRef = (0, import_react5.useRef)(/* @__PURE__ */ new Set());
|
|
@@ -1252,10 +1176,45 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
1252
1176
|
]);
|
|
1253
1177
|
const applyVisionBridgeIfNeeded = (0, import_react5.useCallback)(
|
|
1254
1178
|
async (parts, timestamp, signal) => {
|
|
1255
|
-
if (parts === null || !hasImageParts(parts)
|
|
1179
|
+
if (parts === null || !hasImageParts(parts)) {
|
|
1256
1180
|
return { parts, shouldProceed: true };
|
|
1257
1181
|
}
|
|
1182
|
+
if (modelOverrideRef.current?.endsWith("\0")) {
|
|
1183
|
+
return { parts, shouldProceed: true };
|
|
1184
|
+
}
|
|
1185
|
+
if (inlineModelOverrideActiveRef.current) {
|
|
1186
|
+
return { parts, shouldProceed: true };
|
|
1187
|
+
}
|
|
1188
|
+
if (!shouldRunVisionBridge(config)) {
|
|
1189
|
+
return { parts, shouldProceed: true };
|
|
1190
|
+
}
|
|
1191
|
+
if (signal.aborted) {
|
|
1192
|
+
return { parts: null, shouldProceed: false };
|
|
1193
|
+
}
|
|
1258
1194
|
debugLogger3.debug("vision bridge: gate matched, running conversion");
|
|
1195
|
+
const fullTurnModel = config.getDefaultVisionBridgeModel();
|
|
1196
|
+
if (fullTurnModel?.agentCapable) {
|
|
1197
|
+
const fullTurnParts = (Array.isArray(parts) ? parts : [parts]).map(
|
|
1198
|
+
(part) => typeof part === "string" ? { text: part } : clampInlineMediaPart(part)
|
|
1199
|
+
);
|
|
1200
|
+
if (!hasImageParts(fullTurnParts)) {
|
|
1201
|
+
return { parts: fullTurnParts, shouldProceed: true };
|
|
1202
|
+
}
|
|
1203
|
+
applyModelOverride(
|
|
1204
|
+
modelOverrideRef,
|
|
1205
|
+
inlineModelOverrideActiveRef,
|
|
1206
|
+
getFullTurnVisionModelSelector(fullTurnModel),
|
|
1207
|
+
false
|
|
1208
|
+
);
|
|
1209
|
+
addItem(
|
|
1210
|
+
{
|
|
1211
|
+
type: "vision_notice" /* VISION_NOTICE */,
|
|
1212
|
+
text: formatFullTurnVisionNotice(fullTurnModel)
|
|
1213
|
+
},
|
|
1214
|
+
timestamp
|
|
1215
|
+
);
|
|
1216
|
+
return { parts: fullTurnParts, shouldProceed: true };
|
|
1217
|
+
}
|
|
1259
1218
|
const bridgeResult = await runVisionBridge({ config, parts, signal });
|
|
1260
1219
|
debugLogger3.debug(
|
|
1261
1220
|
`vision bridge: status=${bridgeResult.status} applied=${bridgeResult.applied} model=${bridgeResult.modelId ?? "(none)"}`
|
|
@@ -1341,6 +1300,15 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
1341
1300
|
);
|
|
1342
1301
|
}
|
|
1343
1302
|
}
|
|
1303
|
+
const bridgeResult2 = await applyVisionBridgeIfNeeded(
|
|
1304
|
+
localQueryToSendToGemini,
|
|
1305
|
+
userMessageTimestamp,
|
|
1306
|
+
abortSignal
|
|
1307
|
+
);
|
|
1308
|
+
if (!bridgeResult2.shouldProceed) {
|
|
1309
|
+
return { queryToSend: null, shouldProceed: false };
|
|
1310
|
+
}
|
|
1311
|
+
localQueryToSendToGemini = bridgeResult2.parts;
|
|
1344
1312
|
return {
|
|
1345
1313
|
queryToSend: localQueryToSendToGemini,
|
|
1346
1314
|
shouldProceed: true
|
|
@@ -1452,8 +1420,10 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
1452
1420
|
STREAM_PENDING_ITEM_MAX_CHARS
|
|
1453
1421
|
);
|
|
1454
1422
|
const safeSplitPoint = splitPoint > 0 && splitPoint < newGeminiMessageBuffer.length ? splitPoint : STREAM_PENDING_ITEM_MAX_CHARS;
|
|
1455
|
-
const beforeText =
|
|
1456
|
-
|
|
1423
|
+
const { before: beforeText, after: afterText } = splitFencedMarkdown(
|
|
1424
|
+
newGeminiMessageBuffer,
|
|
1425
|
+
safeSplitPoint
|
|
1426
|
+
);
|
|
1457
1427
|
commitItem(
|
|
1458
1428
|
{
|
|
1459
1429
|
type: nextPendingType,
|
|
@@ -1487,12 +1457,21 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
1487
1457
|
break;
|
|
1488
1458
|
}
|
|
1489
1459
|
}
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1460
|
+
let target;
|
|
1461
|
+
if (boundaryLine < 0) {
|
|
1462
|
+
const capIndex = charIndexAfterLine(
|
|
1463
|
+
newGeminiMessageBuffer,
|
|
1464
|
+
keptLines
|
|
1465
|
+
);
|
|
1466
|
+
const fenceInfo = capIndex > 0 ? getEnclosingFenceInfo(newGeminiMessageBuffer, capIndex) : null;
|
|
1467
|
+
if (!fenceInfo || fenceInfo.lang?.toLowerCase() === "mermaid") {
|
|
1468
|
+
break;
|
|
1469
|
+
}
|
|
1470
|
+
target = capIndex;
|
|
1471
|
+
} else {
|
|
1472
|
+
target = charIndexAfterLine(newGeminiMessageBuffer, boundaryLine + 1);
|
|
1473
|
+
if (target <= 0) break;
|
|
1474
|
+
}
|
|
1496
1475
|
const splitPoint = findLastSafeSplitPoint(
|
|
1497
1476
|
newGeminiMessageBuffer,
|
|
1498
1477
|
target
|
|
@@ -1500,8 +1479,10 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
1500
1479
|
if (splitPoint <= 0 || splitPoint >= newGeminiMessageBuffer.length) {
|
|
1501
1480
|
break;
|
|
1502
1481
|
}
|
|
1503
|
-
const beforeText =
|
|
1504
|
-
|
|
1482
|
+
const { before: beforeText, after: afterText } = splitFencedMarkdown(
|
|
1483
|
+
newGeminiMessageBuffer,
|
|
1484
|
+
splitPoint
|
|
1485
|
+
);
|
|
1505
1486
|
commitItem(
|
|
1506
1487
|
{
|
|
1507
1488
|
type: nextPendingType,
|
|
@@ -1603,8 +1584,10 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
1603
1584
|
);
|
|
1604
1585
|
while (newThoughtBuffer.length > STREAM_PENDING_ITEM_MAX_CHARS) {
|
|
1605
1586
|
const safeSplitPoint = splitPoint > 0 && splitPoint < newThoughtBuffer.length ? splitPoint : STREAM_PENDING_ITEM_MAX_CHARS;
|
|
1606
|
-
const beforeText =
|
|
1607
|
-
|
|
1587
|
+
const { before: beforeText, after: afterText } = splitFencedMarkdown(
|
|
1588
|
+
newThoughtBuffer,
|
|
1589
|
+
safeSplitPoint
|
|
1590
|
+
);
|
|
1608
1591
|
addItem(
|
|
1609
1592
|
buildThoughtItem(pendingThoughtType, beforeText),
|
|
1610
1593
|
userMessageTimestamp
|
|
@@ -2223,7 +2206,11 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
2223
2206
|
}
|
|
2224
2207
|
}
|
|
2225
2208
|
if (executableToolCallRequests.length > 0) {
|
|
2226
|
-
scheduleToolCalls(
|
|
2209
|
+
scheduleToolCalls(
|
|
2210
|
+
executableToolCallRequests,
|
|
2211
|
+
signal,
|
|
2212
|
+
modelOverrideRef.current
|
|
2213
|
+
);
|
|
2227
2214
|
}
|
|
2228
2215
|
}
|
|
2229
2216
|
return 0 /* Completed */;
|
|
@@ -2255,20 +2242,185 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
2255
2242
|
dualOutput
|
|
2256
2243
|
]
|
|
2257
2244
|
);
|
|
2245
|
+
const resolveSteeredMessages = (0, import_react5.useCallback)(
|
|
2246
|
+
async (messages, signal) => {
|
|
2247
|
+
const resolvedMessages = [];
|
|
2248
|
+
const resolvedForRecording = [];
|
|
2249
|
+
const timestamp = Date.now();
|
|
2250
|
+
for (let index = 0; index < messages.length; index += 1) {
|
|
2251
|
+
if (signal.aborted) break;
|
|
2252
|
+
const message = messages[index];
|
|
2253
|
+
const sideEffects = [];
|
|
2254
|
+
let resolvedQuery = [{ text: message }];
|
|
2255
|
+
if (isAtCommand(message)) {
|
|
2256
|
+
const timeout = new AbortController();
|
|
2257
|
+
const atCommandSignal = AbortSignal.any([signal, timeout.signal]);
|
|
2258
|
+
const timeoutId = setTimeout(() => {
|
|
2259
|
+
timeout.abort(
|
|
2260
|
+
new Error(MID_TURN_AT_COMMAND_RESOLVE_TIMEOUT_MESSAGE)
|
|
2261
|
+
);
|
|
2262
|
+
}, MID_TURN_AT_COMMAND_RESOLVE_TIMEOUT_MS);
|
|
2263
|
+
try {
|
|
2264
|
+
const atCommandResult = await resolveWithAbort(
|
|
2265
|
+
atCommandSignal,
|
|
2266
|
+
() => resolveAtCommandQuery({
|
|
2267
|
+
query: message,
|
|
2268
|
+
config,
|
|
2269
|
+
onDebugMessage,
|
|
2270
|
+
messageId: timestamp + index,
|
|
2271
|
+
signal: atCommandSignal
|
|
2272
|
+
})
|
|
2273
|
+
);
|
|
2274
|
+
const shouldSkipMessage = !atCommandResult.shouldProceed && (atCommandResult.toolDisplays?.length ?? 0) > 0;
|
|
2275
|
+
if (atCommandResult.shouldProceed && atCommandResult.processedQuery !== null) {
|
|
2276
|
+
resolvedQuery = atCommandResult.processedQuery;
|
|
2277
|
+
} else if (atCommandResult.toolDisplays?.length) {
|
|
2278
|
+
const toolDisplays = atCommandResult.toolDisplays;
|
|
2279
|
+
const showToolDisplays = /* @__PURE__ */ __name(() => addItem(
|
|
2280
|
+
{ type: "tool_group", tools: toolDisplays },
|
|
2281
|
+
timestamp + index
|
|
2282
|
+
), "showToolDisplays");
|
|
2283
|
+
if (shouldSkipMessage) showToolDisplays();
|
|
2284
|
+
else sideEffects.push(showToolDisplays);
|
|
2285
|
+
}
|
|
2286
|
+
if (atCommandResult.recording) {
|
|
2287
|
+
const recordAtCommand = /* @__PURE__ */ __name(() => config.getChatRecordingService?.()?.recordAtCommand?.({
|
|
2288
|
+
filesRead: atCommandResult.recording.filesRead,
|
|
2289
|
+
status: atCommandResult.recording.status,
|
|
2290
|
+
...atCommandResult.recording.message ? { message: atCommandResult.recording.message } : {},
|
|
2291
|
+
userText: message
|
|
2292
|
+
}), "recordAtCommand");
|
|
2293
|
+
if (shouldSkipMessage) recordAtCommand();
|
|
2294
|
+
else sideEffects.push(recordAtCommand);
|
|
2295
|
+
}
|
|
2296
|
+
if (shouldSkipMessage) continue;
|
|
2297
|
+
} catch (error) {
|
|
2298
|
+
const errorMessage = getErrorMessage(error);
|
|
2299
|
+
onDebugMessage(
|
|
2300
|
+
`Failed to resolve mid-turn @ command: ${errorMessage}`
|
|
2301
|
+
);
|
|
2302
|
+
if (!signal.aborted) {
|
|
2303
|
+
addItem(
|
|
2304
|
+
{
|
|
2305
|
+
type: "warning" /* WARNING */,
|
|
2306
|
+
text: `Could not attach file: ${errorMessage}`
|
|
2307
|
+
},
|
|
2308
|
+
Date.now()
|
|
2309
|
+
);
|
|
2310
|
+
}
|
|
2311
|
+
continue;
|
|
2312
|
+
} finally {
|
|
2313
|
+
clearTimeout(timeoutId);
|
|
2314
|
+
}
|
|
2315
|
+
if (signal.aborted) break;
|
|
2316
|
+
}
|
|
2317
|
+
const bridgeResult = await applyVisionBridgeIfNeeded(
|
|
2318
|
+
resolvedQuery,
|
|
2319
|
+
timestamp + index,
|
|
2320
|
+
signal
|
|
2321
|
+
);
|
|
2322
|
+
if (!bridgeResult.shouldProceed) {
|
|
2323
|
+
if (signal.aborted) break;
|
|
2324
|
+
continue;
|
|
2325
|
+
}
|
|
2326
|
+
const messageParts = normalizePartList(
|
|
2327
|
+
bridgeResult.parts ?? resolvedQuery
|
|
2328
|
+
);
|
|
2329
|
+
const formatCheck = checkImageFormatsSupport(messageParts);
|
|
2330
|
+
if (formatCheck.hasUnsupportedFormats) {
|
|
2331
|
+
sideEffects.push(
|
|
2332
|
+
() => addItem(
|
|
2333
|
+
{
|
|
2334
|
+
type: "info" /* INFO */,
|
|
2335
|
+
text: getUnsupportedImageFormatWarning()
|
|
2336
|
+
},
|
|
2337
|
+
Date.now()
|
|
2338
|
+
)
|
|
2339
|
+
);
|
|
2340
|
+
}
|
|
2341
|
+
if (resolvedMessages.length > 0 && messageParts.length > 0) {
|
|
2342
|
+
resolvedMessages.push({ text: "\n\n" });
|
|
2343
|
+
}
|
|
2344
|
+
resolvedMessages.push(...messageParts);
|
|
2345
|
+
resolvedForRecording.push({
|
|
2346
|
+
message,
|
|
2347
|
+
parts: messageParts,
|
|
2348
|
+
sideEffects
|
|
2349
|
+
});
|
|
2350
|
+
}
|
|
2351
|
+
if (signal.aborted) return void 0;
|
|
2352
|
+
return {
|
|
2353
|
+
parts: resolvedMessages,
|
|
2354
|
+
accept: /* @__PURE__ */ __name(() => {
|
|
2355
|
+
for (const { message, parts, sideEffects } of resolvedForRecording) {
|
|
2356
|
+
for (const sideEffect of sideEffects) sideEffect();
|
|
2357
|
+
config.getChatRecordingService?.()?.recordMidTurnUserMessage(parts, message);
|
|
2358
|
+
addItem(
|
|
2359
|
+
{ type: "notification" /* NOTIFICATION */, text: message },
|
|
2360
|
+
Date.now()
|
|
2361
|
+
);
|
|
2362
|
+
}
|
|
2363
|
+
}, "accept")
|
|
2364
|
+
};
|
|
2365
|
+
},
|
|
2366
|
+
[addItem, applyVisionBridgeIfNeeded, config, onDebugMessage]
|
|
2367
|
+
);
|
|
2368
|
+
const resolveDrainedSteerMessages = (0, import_react5.useCallback)(
|
|
2369
|
+
async (messages, signal) => {
|
|
2370
|
+
try {
|
|
2371
|
+
const resolved = await resolveSteeredMessages(messages, signal);
|
|
2372
|
+
if (signal.aborted) {
|
|
2373
|
+
midTurnRestoreRef?.current?.(messages);
|
|
2374
|
+
return void 0;
|
|
2375
|
+
}
|
|
2376
|
+
if (!resolved || resolved.parts.length === 0) return void 0;
|
|
2377
|
+
let settled = false;
|
|
2378
|
+
return {
|
|
2379
|
+
parts: resolved.parts,
|
|
2380
|
+
accept: /* @__PURE__ */ __name(() => {
|
|
2381
|
+
if (settled) return;
|
|
2382
|
+
settled = true;
|
|
2383
|
+
resolved.accept();
|
|
2384
|
+
}, "accept"),
|
|
2385
|
+
restore: /* @__PURE__ */ __name(() => {
|
|
2386
|
+
if (settled) return;
|
|
2387
|
+
settled = true;
|
|
2388
|
+
midTurnRestoreRef?.current?.(messages);
|
|
2389
|
+
}, "restore")
|
|
2390
|
+
};
|
|
2391
|
+
} catch (error) {
|
|
2392
|
+
midTurnRestoreRef?.current?.(messages);
|
|
2393
|
+
onDebugMessage(
|
|
2394
|
+
`Failed to prepare steer input: ${getErrorMessage(error)}`
|
|
2395
|
+
);
|
|
2396
|
+
return void 0;
|
|
2397
|
+
}
|
|
2398
|
+
},
|
|
2399
|
+
[midTurnRestoreRef, onDebugMessage, resolveSteeredMessages]
|
|
2400
|
+
);
|
|
2401
|
+
const drainSteerAtBoundary = (0, import_react5.useCallback)(
|
|
2402
|
+
async (signal) => {
|
|
2403
|
+
const messages = midTurnDrainRef?.current?.() ?? [];
|
|
2404
|
+
if (messages.length === 0) return void 0;
|
|
2405
|
+
return resolveDrainedSteerMessages(messages, signal);
|
|
2406
|
+
},
|
|
2407
|
+
[midTurnDrainRef, resolveDrainedSteerMessages]
|
|
2408
|
+
);
|
|
2258
2409
|
const submitQuery = (0, import_react5.useCallback)(
|
|
2259
2410
|
async (query, submitType = "userQuery" /* UserQuery */, prompt_id, metadata) => {
|
|
2260
2411
|
const allowConcurrentBtwDuringResponse = submitType === "userQuery" /* UserQuery */ && streamingState === "responding" /* Responding */ && typeof query === "string" && isBtwCommand(query);
|
|
2261
|
-
|
|
2412
|
+
const isTurnContinuation = submitType === "toolResult" /* ToolResult */ || submitType === "steer" /* Steer */;
|
|
2413
|
+
if (isSubmittingQueryRef.current && !isTurnContinuation && !allowConcurrentBtwDuringResponse) {
|
|
2262
2414
|
metadata?.onDeliveryFailed?.();
|
|
2263
2415
|
return;
|
|
2264
2416
|
}
|
|
2265
|
-
if ((streamingState === "responding" /* Responding */ || streamingState === "waiting_for_confirmation" /* WaitingForConfirmation */) &&
|
|
2417
|
+
if ((streamingState === "responding" /* Responding */ || streamingState === "waiting_for_confirmation" /* WaitingForConfirmation */) && !isTurnContinuation && !allowConcurrentBtwDuringResponse) {
|
|
2266
2418
|
metadata?.onDeliveryFailed?.();
|
|
2267
2419
|
return;
|
|
2268
2420
|
}
|
|
2269
2421
|
isSubmittingQueryRef.current = true;
|
|
2270
2422
|
loopDetectedRef.current = false;
|
|
2271
|
-
if (
|
|
2423
|
+
if (!isTurnContinuation && !allowConcurrentBtwDuringResponse) {
|
|
2272
2424
|
lastTurnUserItemRef.current = null;
|
|
2273
2425
|
turnSawContentEventRef.current = false;
|
|
2274
2426
|
handledProviderToolCallIdsRef.current.clear();
|
|
@@ -2277,7 +2429,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
2277
2429
|
immediateDuplicateToolResponsesRef.current = null;
|
|
2278
2430
|
}
|
|
2279
2431
|
const userMessageTimestamp = Date.now();
|
|
2280
|
-
if (submitType !== "
|
|
2432
|
+
if (!isTurnContinuation && submitType !== "notification" /* Notification */ && !allowConcurrentBtwDuringResponse) {
|
|
2281
2433
|
setModelSwitchedFromQuotaError(false);
|
|
2282
2434
|
const droppingInlineOverrideOnRetry = submitType === "retry" /* Retry */ && inlineModelOverrideActiveRef.current;
|
|
2283
2435
|
if (submitType !== "retry" /* Retry */ || inlineModelOverrideActiveRef.current) {
|
|
@@ -2362,7 +2514,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
2362
2514
|
setIsResponding(true);
|
|
2363
2515
|
setInitError(null);
|
|
2364
2516
|
setIsReceivingContent(false);
|
|
2365
|
-
if (
|
|
2517
|
+
if (!isTurnContinuation) {
|
|
2366
2518
|
streamingResponseLengthRef.current = 0;
|
|
2367
2519
|
}
|
|
2368
2520
|
try {
|
|
@@ -2380,7 +2532,9 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
2380
2532
|
{
|
|
2381
2533
|
type: submitType,
|
|
2382
2534
|
notificationDisplayText: metadata?.notificationDisplayText,
|
|
2383
|
-
modelOverride: modelOverrideRef.current
|
|
2535
|
+
modelOverride: modelOverrideRef.current,
|
|
2536
|
+
steerInput: metadata?.steerInput,
|
|
2537
|
+
...!allowConcurrentBtwDuringResponse && midTurnDrainRef ? { getSteerInput: drainSteerAtBoundary } : {}
|
|
2384
2538
|
}
|
|
2385
2539
|
);
|
|
2386
2540
|
const processingStatus = await processGeminiStreamEvents(
|
|
@@ -2410,7 +2564,8 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
2410
2564
|
if (retryCountdownTimerRef.current) {
|
|
2411
2565
|
clearRetryCountdown();
|
|
2412
2566
|
}
|
|
2413
|
-
|
|
2567
|
+
const loopDetected = loopDetectedRef.current;
|
|
2568
|
+
if (loopDetected) {
|
|
2414
2569
|
loopDetectedRef.current = false;
|
|
2415
2570
|
handleLoopDetectedEvent();
|
|
2416
2571
|
}
|
|
@@ -2493,7 +2648,9 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
2493
2648
|
pendingRetryErrorItemRef,
|
|
2494
2649
|
setPendingRetryErrorItem,
|
|
2495
2650
|
setPendingThoughtItem,
|
|
2496
|
-
dualOutput
|
|
2651
|
+
dualOutput,
|
|
2652
|
+
drainSteerAtBoundary,
|
|
2653
|
+
midTurnDrainRef
|
|
2497
2654
|
]
|
|
2498
2655
|
);
|
|
2499
2656
|
const retryLastPrompt = (0, import_react5.useCallback)(async () => {
|
|
@@ -2687,11 +2844,11 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
2687
2844
|
const promptId = prompt_ids[0] ?? pendingDuplicatePromptId;
|
|
2688
2845
|
for (const toolCall of geminiTools) {
|
|
2689
2846
|
if ("modelOverride" in toolCall.response) {
|
|
2690
|
-
if (inlineModelOverrideActiveRef.current) {
|
|
2847
|
+
if (inlineModelOverrideActiveRef.current || modelOverrideRef.current?.endsWith("\0")) {
|
|
2691
2848
|
debugLogger3.debug(
|
|
2692
2849
|
`skill-tool model override (${String(
|
|
2693
2850
|
toolCall.response.modelOverride
|
|
2694
|
-
)}) blocked: inline override active`
|
|
2851
|
+
)}) blocked: ${inlineModelOverrideActiveRef.current ? "inline override active" : "full-turn override active"}`
|
|
2695
2852
|
);
|
|
2696
2853
|
} else {
|
|
2697
2854
|
applyModelOverride(
|
|
@@ -2761,115 +2918,20 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
2761
2918
|
return;
|
|
2762
2919
|
}
|
|
2763
2920
|
const drained = turnCancelledRef.current || abortControllerRef.current?.signal.aborted ? [] : midTurnDrainRef?.current?.() ?? [];
|
|
2921
|
+
let drainedSteer;
|
|
2764
2922
|
if (drained.length > 0) {
|
|
2765
|
-
const midTurnTimestamp = Date.now();
|
|
2766
2923
|
const midTurnAbort = abortControllerRef.current ?? new AbortController();
|
|
2767
2924
|
const shouldTrackMidTurnAbort = !abortControllerRef.current;
|
|
2768
2925
|
if (shouldTrackMidTurnAbort) {
|
|
2769
2926
|
auxiliaryAbortRefsRef.current.add(midTurnAbort);
|
|
2770
2927
|
}
|
|
2771
2928
|
try {
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
if (isAtCommand(msg)) {
|
|
2779
|
-
const atCommandTimeout = new AbortController();
|
|
2780
|
-
const atCommandSignal = AbortSignal.any([
|
|
2781
|
-
midTurnAbort.signal,
|
|
2782
|
-
atCommandTimeout.signal
|
|
2783
|
-
]);
|
|
2784
|
-
const atCommandTimeoutId = setTimeout(() => {
|
|
2785
|
-
atCommandTimeout.abort(
|
|
2786
|
-
new Error(MID_TURN_AT_COMMAND_RESOLVE_TIMEOUT_MESSAGE)
|
|
2787
|
-
);
|
|
2788
|
-
}, MID_TURN_AT_COMMAND_RESOLVE_TIMEOUT_MS);
|
|
2789
|
-
try {
|
|
2790
|
-
const atCommandResult = await resolveWithAbort(
|
|
2791
|
-
atCommandSignal,
|
|
2792
|
-
() => resolveAtCommandQuery({
|
|
2793
|
-
query: msg,
|
|
2794
|
-
config,
|
|
2795
|
-
onDebugMessage,
|
|
2796
|
-
messageId: midTurnTimestamp + index,
|
|
2797
|
-
signal: atCommandSignal
|
|
2798
|
-
})
|
|
2799
|
-
);
|
|
2800
|
-
const shouldSkipMidTurnMessage = !atCommandResult.shouldProceed && (atCommandResult.toolDisplays?.length ?? 0) > 0;
|
|
2801
|
-
if (atCommandResult.shouldProceed && atCommandResult.processedQuery !== null) {
|
|
2802
|
-
resolvedMidTurnQuery = atCommandResult.processedQuery;
|
|
2803
|
-
} else if (atCommandResult.toolDisplays?.length) {
|
|
2804
|
-
addItem(
|
|
2805
|
-
{ type: "tool_group", tools: atCommandResult.toolDisplays },
|
|
2806
|
-
midTurnTimestamp + index
|
|
2807
|
-
);
|
|
2808
|
-
}
|
|
2809
|
-
if (atCommandResult.recording) {
|
|
2810
|
-
config.getChatRecordingService?.()?.recordAtCommand?.({
|
|
2811
|
-
filesRead: atCommandResult.recording.filesRead,
|
|
2812
|
-
status: atCommandResult.recording.status,
|
|
2813
|
-
...atCommandResult.recording.message ? { message: atCommandResult.recording.message } : {},
|
|
2814
|
-
userText: msg
|
|
2815
|
-
});
|
|
2816
|
-
}
|
|
2817
|
-
if (shouldSkipMidTurnMessage) {
|
|
2818
|
-
continue;
|
|
2819
|
-
}
|
|
2820
|
-
} catch (error) {
|
|
2821
|
-
const errorMessage = getErrorMessage(error);
|
|
2822
|
-
onDebugMessage(
|
|
2823
|
-
`Failed to resolve mid-turn @ command: ${errorMessage}`
|
|
2824
|
-
);
|
|
2825
|
-
if (!midTurnAbort.signal.aborted) {
|
|
2826
|
-
addItem(
|
|
2827
|
-
{
|
|
2828
|
-
type: "warning" /* WARNING */,
|
|
2829
|
-
text: `Could not attach file: ${errorMessage}`
|
|
2830
|
-
},
|
|
2831
|
-
Date.now()
|
|
2832
|
-
);
|
|
2833
|
-
}
|
|
2834
|
-
continue;
|
|
2835
|
-
} finally {
|
|
2836
|
-
clearTimeout(atCommandTimeoutId);
|
|
2837
|
-
}
|
|
2838
|
-
if (midTurnAbort.signal.aborted) {
|
|
2839
|
-
break;
|
|
2840
|
-
}
|
|
2841
|
-
}
|
|
2842
|
-
const bridgeResult = await applyVisionBridgeIfNeeded(
|
|
2843
|
-
resolvedMidTurnQuery,
|
|
2844
|
-
midTurnTimestamp + index,
|
|
2845
|
-
midTurnAbort.signal
|
|
2846
|
-
);
|
|
2847
|
-
if (!bridgeResult.shouldProceed) {
|
|
2848
|
-
if (midTurnAbort.signal.aborted) {
|
|
2849
|
-
break;
|
|
2850
|
-
}
|
|
2851
|
-
continue;
|
|
2852
|
-
}
|
|
2853
|
-
resolvedMidTurnQuery = bridgeResult.parts ?? resolvedMidTurnQuery;
|
|
2854
|
-
const midTurnUserMessageParts = prefixMidTurnUserMessageParts(
|
|
2855
|
-
resolvedMidTurnQuery,
|
|
2856
|
-
msg
|
|
2857
|
-
);
|
|
2858
|
-
const formatCheck = checkImageFormatsSupport(
|
|
2859
|
-
midTurnUserMessageParts
|
|
2860
|
-
);
|
|
2861
|
-
if (formatCheck.hasUnsupportedFormats) {
|
|
2862
|
-
addItem(
|
|
2863
|
-
{
|
|
2864
|
-
type: "info" /* INFO */,
|
|
2865
|
-
text: getUnsupportedImageFormatWarning()
|
|
2866
|
-
},
|
|
2867
|
-
Date.now()
|
|
2868
|
-
);
|
|
2869
|
-
}
|
|
2870
|
-
responsesToSend.push(...midTurnUserMessageParts);
|
|
2871
|
-
config.getChatRecordingService?.()?.recordMidTurnUserMessage(midTurnUserMessageParts, msg);
|
|
2872
|
-
addItem({ type: "notification" /* NOTIFICATION */, text: msg }, Date.now());
|
|
2929
|
+
drainedSteer = await resolveDrainedSteerMessages(
|
|
2930
|
+
drained,
|
|
2931
|
+
midTurnAbort.signal
|
|
2932
|
+
);
|
|
2933
|
+
if (drainedSteer) {
|
|
2934
|
+
responsesToSend.push(...drainedSteer.parts);
|
|
2873
2935
|
}
|
|
2874
2936
|
} finally {
|
|
2875
2937
|
if (shouldTrackMidTurnAbort) {
|
|
@@ -2879,9 +2941,14 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
2879
2941
|
}
|
|
2880
2942
|
}
|
|
2881
2943
|
if (turnCancelledRef.current || abortControllerRef.current?.signal.aborted) {
|
|
2944
|
+
drainedSteer?.restore();
|
|
2882
2945
|
return;
|
|
2883
2946
|
}
|
|
2884
|
-
submitQuery(responsesToSend, "toolResult" /* ToolResult */, promptId
|
|
2947
|
+
void submitQuery(responsesToSend, "toolResult" /* ToolResult */, promptId, {
|
|
2948
|
+
steerInput: drainedSteer,
|
|
2949
|
+
onDelivered: drainedSteer?.accept,
|
|
2950
|
+
onDeliveryFailed: drainedSteer?.restore
|
|
2951
|
+
});
|
|
2885
2952
|
},
|
|
2886
2953
|
[
|
|
2887
2954
|
submitQuery,
|
|
@@ -2893,8 +2960,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
2893
2960
|
midTurnDrainRef,
|
|
2894
2961
|
addItem,
|
|
2895
2962
|
dualOutput,
|
|
2896
|
-
|
|
2897
|
-
applyVisionBridgeIfNeeded
|
|
2963
|
+
resolveDrainedSteerMessages
|
|
2898
2964
|
]
|
|
2899
2965
|
);
|
|
2900
2966
|
const pendingHistoryItems = (0, import_react5.useMemo)(
|
|
@@ -3200,7 +3266,6 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
3200
3266
|
}, "useGeminiStream");
|
|
3201
3267
|
|
|
3202
3268
|
export {
|
|
3203
|
-
prefixMidTurnUserMessageParts,
|
|
3204
3269
|
DualOutputContext,
|
|
3205
3270
|
useDualOutput,
|
|
3206
3271
|
classifyApiError,
|
|
@@ -3211,11 +3276,6 @@ export {
|
|
|
3211
3276
|
* Copyright 2025 Qwen Team
|
|
3212
3277
|
* SPDX-License-Identifier: Apache-2.0
|
|
3213
3278
|
*/
|
|
3214
|
-
/**
|
|
3215
|
-
* @license
|
|
3216
|
-
* Copyright 2026 Qwen
|
|
3217
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
3218
|
-
*/
|
|
3219
3279
|
/**
|
|
3220
3280
|
* @license
|
|
3221
3281
|
* Copyright 2025 Google LLC
|