@qwen-code/qwen-code 0.19.11 → 0.19.12-preview.0
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/batch/SKILL.md +6 -0
- package/bundled/qc-helper/docs/configuration/model-providers.md +11 -0
- package/bundled/qc-helper/docs/configuration/settings.md +11 -10
- package/bundled/qc-helper/docs/features/channels/overview.md +66 -11
- package/bundled/qc-helper/docs/features/sub-agents.md +8 -8
- package/bundled/qc-helper/docs/features/worktree.md +2 -2
- package/bundled/qc-helper/docs/qwen-serve-deploy-local.md +42 -7
- package/bundled/qc-helper/docs/qwen-serve.md +102 -40
- package/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +1 -1
- package/bundled/review/SKILL.md +60 -49
- package/bundled/simplify/SKILL.md +1 -1
- package/chunks/{MaxSizedBox-L6TGYDM3.js → MaxSizedBox-3KIWAU6Z.js} +31 -32
- package/chunks/{StandaloneSessionPicker-AKEQHU5P.js → StandaloneSessionPicker-TF626NO7.js} +45 -46
- package/chunks/acp-startup-profiler-N3RHHXJ3.js +25 -0
- package/chunks/{acpAgent-PTNBGJDN.js → acpAgent-JDVJXVBO.js} +1863 -507
- package/chunks/{agent-AJOMOZPJ.js → agent-BONWC4VY.js} +26 -27
- package/chunks/{agent-headless-CYKOMAXS.js → agent-headless-H7HKMGLZ.js} +26 -27
- package/chunks/{anthropicContentGenerator-HBRXJSP4.js → anthropicContentGenerator-ZZRGFEES.js} +35 -12
- package/chunks/{artifact-tool-MIZLXBLF.js → artifact-tool-PHO5XEGZ.js} +5 -5
- package/chunks/{askUserQuestion-XMJVPNWM.js → askUserQuestion-CEPBT47X.js} +2 -47
- package/chunks/{bridge-QKISWPCI.js → bridge-ATN2TLWJ.js} +31 -32
- package/chunks/{ca-CODEN7TD.js → ca-2SL2BXTK.js} +3 -2
- package/chunks/{channel-worker-group-SOUWTFHC.js → channel-worker-group-S3H5QHTI.js} +4 -4
- package/chunks/{channel-worker-manager-LOVSV3WW.js → channel-worker-manager-ZJ4HTMO2.js} +4 -4
- package/chunks/{channel-worker-supervisor-XW6MHJBQ.js → channel-worker-supervisor-JA6VZ5V5.js} +3 -3
- package/chunks/{chunk-ZIXOTAPZ.js → chunk-2DZ7E27L.js} +92 -3
- package/chunks/{chunk-L5U3ELZX.js → chunk-335ECZTA.js} +1 -1
- package/chunks/{chunk-2FO5GFKZ.js → chunk-3DJY4IFO.js} +1 -1
- package/chunks/{chunk-4AGTGMCQ.js → chunk-3PE7OY2G.js} +12 -12
- package/chunks/{chunk-QOTQH4CB.js → chunk-4AGBO6RB.js} +27 -10
- package/chunks/{chunk-Y66VOBRP.js → chunk-4CA4WUMS.js} +2 -2
- package/chunks/{chunk-LQIDP6K5.js → chunk-4CHDYDG3.js} +1 -1
- package/chunks/{chunk-574PTLMU.js → chunk-4OVECYBM.js} +407 -92
- package/chunks/{chunk-TV6K2FB4.js → chunk-4RPARQ5D.js} +2 -2
- package/chunks/{chunk-TL4R5TRK.js → chunk-4W55BHOC.js} +2 -2
- package/chunks/{chunk-RCEEXIOO.js → chunk-4XCVGEEX.js} +3 -3
- package/chunks/{chunk-3DWIFU7L.js → chunk-53UMEONK.js} +1 -1
- package/chunks/{chunk-AU3MFJPL.js → chunk-54KPEDM2.js} +8 -8
- package/chunks/{chunk-T76DGHGG.js → chunk-66F4IJ4L.js} +5 -5
- package/chunks/{chunk-YLSSEUAM.js → chunk-675SVDMD.js} +354 -278
- package/chunks/{chunk-NVTQZXR7.js → chunk-6QGZVKOO.js} +91 -52
- package/chunks/{chunk-NJOFRXTM.js → chunk-6TDA4EVC.js} +4200 -3450
- package/chunks/{chunk-BYH2JRK3.js → chunk-6WZZHJSZ.js} +5 -5
- package/chunks/{chunk-7X7TEQNX.js → chunk-76BFY7AF.js} +13 -0
- package/chunks/chunk-7KS72E2N.js +883 -0
- package/chunks/{chunk-CF5VJRGC.js → chunk-7LMAKIWE.js} +1 -1
- package/chunks/{chunk-WMNXXRGL.js → chunk-7O7WZH7N.js} +31 -31
- package/chunks/{chunk-7ZYHLN67.js → chunk-7OZGMFHC.js} +26 -75
- package/chunks/{chunk-6WPJRYLZ.js → chunk-7SX6WZNO.js} +3 -3
- package/chunks/{chunk-JGUT3LWZ.js → chunk-ANRANWVE.js} +4 -1
- package/chunks/{chunk-JD44PNGJ.js → chunk-AWOU24F6.js} +10 -5
- package/chunks/{chunk-6WGZDD67.js → chunk-BEFQGC6H.js} +2 -2
- package/chunks/{chunk-KXYJPRT5.js → chunk-BEZPRKD3.js} +28 -6
- package/chunks/{chunk-FYQ22K62.js → chunk-CHVH4DVN.js} +6 -5
- package/chunks/{chunk-LS56TX3M.js → chunk-CMHJEUVB.js} +1 -1
- package/chunks/{chunk-FXKOAEXP.js → chunk-CXWUXRD5.js} +14 -14
- package/chunks/{chunk-CAHY5ABC.js → chunk-DULSE2SH.js} +1 -1
- package/chunks/{chunk-SQ5BK3GO.js → chunk-DYUPBU7H.js} +1 -1
- package/chunks/{chunk-FNX3LGAK.js → chunk-E655RDRL.js} +1 -1
- package/chunks/{chunk-N5VIZTND.js → chunk-EWPLL4OT.js} +1 -1
- package/chunks/{chunk-FSA7ERJ2.js → chunk-F2RR4HO2.js} +1 -1
- package/chunks/{chunk-S63Z5V42.js → chunk-F2YCCUXI.js} +4 -4
- package/chunks/{chunk-3AYLDB6B.js → chunk-FEZXQXW2.js} +1 -1
- package/chunks/{chunk-OWT2CAEQ.js → chunk-GEHSF7MS.js} +105 -12
- package/chunks/{chunk-LXLTBIDP.js → chunk-HCCR43AY.js} +1 -1
- package/chunks/{chunk-7NMU22Q3.js → chunk-HQ7MDVBO.js} +18 -7
- package/chunks/{chunk-KSZKSE23.js → chunk-HVWPSGDY.js} +1 -1
- package/chunks/{chunk-YFVO2HOR.js → chunk-HZXU6YZW.js} +5 -5
- package/chunks/{chunk-HASK4LMI.js → chunk-IKLWU6YS.js} +13 -6
- package/chunks/{chunk-GNBBAQ6J.js → chunk-ILQ42UG6.js} +111 -40
- package/chunks/{chunk-THXDQSTA.js → chunk-IQRQVPGN.js} +49 -154
- package/chunks/{chunk-SPJQO2CE.js → chunk-J2MKYJKZ.js} +2 -2
- package/chunks/{chunk-SUARMD4Q.js → chunk-J6NT5YTN.js} +28 -2
- package/chunks/{chunk-TYLOFD2U.js → chunk-JCJPZMJV.js} +1 -1
- package/chunks/{chunk-BYB3GF2T.js → chunk-JCYMQU5F.js} +133 -6
- package/chunks/{chunk-6EDDYPI3.js → chunk-JUNVFQVY.js} +4 -4
- package/chunks/{chunk-CH2XVB47.js → chunk-K7P34F2J.js} +3 -3
- package/chunks/{chunk-5VWYKIMW.js → chunk-KANTXY7B.js} +2 -2
- package/chunks/{chunk-K7VD4XLT.js → chunk-LHEQDKAR.js} +1 -1
- package/chunks/{chunk-A2HWMJVO.js → chunk-LKR7QQ63.js} +3 -3
- package/chunks/{chunk-4HUDDSO5.js → chunk-LLIGYAQU.js} +4 -4
- package/chunks/{chunk-5Z452MMD.js → chunk-LODZMRXC.js} +154 -83
- package/chunks/{chunk-FBU7WRZI.js → chunk-LPHGXXZX.js} +6 -1
- package/chunks/{chunk-CPFIQVZJ.js → chunk-LYFDJTXE.js} +1 -1
- package/chunks/{chunk-TIOE2OPE.js → chunk-MCYZTKBV.js} +2 -2
- package/chunks/{chunk-ZQIYGQCG.js → chunk-MHEZV3OY.js} +506 -143
- package/chunks/{chunk-JWICTOXS.js → chunk-NGTQA57Y.js} +2 -2
- package/chunks/{chunk-5CNYZ7TN.js → chunk-NJQPQ4IO.js} +7 -7
- package/chunks/chunk-NSZJQACR.js +45 -0
- package/chunks/{chunk-DOPUYNXO.js → chunk-NUHSLBJZ.js} +7 -7
- package/chunks/{chunk-CITWNIXJ.js → chunk-NVUGS23Y.js} +5 -5
- package/chunks/{chunk-2Z5UX4KI.js → chunk-OSSDHJDU.js} +1 -1
- package/chunks/{chunk-YUZI3WAC.js → chunk-OWAK7LMW.js} +7 -0
- package/chunks/{chunk-Y3KFTWVX.js → chunk-OZWJAFFE.js} +6 -6
- package/chunks/{chunk-YGYSMY2R.js → chunk-PSISZNIT.js} +1629 -1142
- package/chunks/{chunk-4ROQY23C.js → chunk-PTXVHS2O.js} +7 -7
- package/chunks/{chunk-OKAIGAYW.js → chunk-QGONRHUS.js} +3 -3
- package/chunks/{chunk-PZL23GTM.js → chunk-QR6U5QPP.js} +8 -0
- package/chunks/chunk-QSG4ZFG4.js +257 -0
- package/chunks/{chunk-BXBDC476.js → chunk-R32BTEZY.js} +5 -5
- package/chunks/{chunk-AVEOWVOM.js → chunk-R3VWUU2E.js} +1 -1
- package/chunks/{chunk-RP5R7MB6.js → chunk-R4RIMOJL.js} +12 -12
- package/chunks/{chunk-ARKANCNX.js → chunk-SGPFJMRP.js} +1 -1
- package/chunks/{chunk-3M75MSVA.js → chunk-SMASS3CY.js} +1 -1
- package/chunks/{chunk-4IJMTYCB.js → chunk-SNONG66P.js} +818 -29
- package/chunks/chunk-TDKQP3M6.js +201 -0
- package/chunks/{chunk-VFX7EZIR.js → chunk-TFV3XVAZ.js} +8 -1
- package/chunks/{chunk-4LD5APFL.js → chunk-TYQMGACW.js} +1 -0
- package/chunks/{chunk-7NFB7LBQ.js → chunk-UE5TZ55T.js} +8 -0
- package/chunks/{chunk-F333XEAU.js → chunk-UOA2IHRI.js} +4 -3
- package/chunks/{chunk-VRR65QYW.js → chunk-V4PCIS25.js} +5 -1
- package/chunks/{chunk-WIEO4CWB.js → chunk-VAJS2E2D.js} +1 -1
- package/chunks/{chunk-GLNHPRZT.js → chunk-W4DFAUAO.js} +1 -1
- package/chunks/{chunk-STZQCNN3.js → chunk-W7H223ZZ.js} +1 -1
- package/chunks/{chunk-6Y6ORE2G.js → chunk-WACI4VES.js} +288 -20
- package/chunks/{chunk-WTNZ6DXB.js → chunk-WEPXQKGP.js} +1 -1
- package/chunks/{chunk-4BJVSIS3.js → chunk-WHQNBBWW.js} +2 -2
- package/chunks/{chunk-QDJ2R4CM.js → chunk-WTHRMVKB.js} +3 -3
- package/chunks/{chunk-L4Y55KIS.js → chunk-X6YQWCIJ.js} +1 -1
- package/chunks/{chunk-Q6TUALBE.js → chunk-XAAEDML2.js} +1 -1
- package/chunks/{chunk-BUAXJVNP.js → chunk-XACBIZJB.js} +3 -3
- package/chunks/{chunk-2OG646IN.js → chunk-XFJU7SVP.js} +4 -4
- package/chunks/{chunk-KKRTYONM.js → chunk-XSPFQQRE.js} +3 -3
- package/chunks/{chunk-V2DXTLUE.js → chunk-Y5UDBQYF.js} +3 -3
- package/chunks/{chunk-MQOVXZAF.js → chunk-YN2I5I42.js} +529 -61
- package/chunks/{chunk-FMNYGWOD.js → chunk-Z4ZCVYJ5.js} +14 -8
- package/chunks/{chunk-SY7NEYX4.js → chunk-ZFHHBRRA.js} +2 -2
- package/chunks/{chunk-QYG4BY6Q.js → chunk-ZPVGEMVC.js} +1 -1
- package/chunks/{computer-use-VZZMJEQ7.js → computer-use-UY4A72X7.js} +26 -27
- package/chunks/{config-utils-IQQT3GCI.js → config-utils-KWTRFP7D.js} +3 -3
- package/chunks/{contextCommand-PORKIZSY.js → contextCommand-3DZ2SVH6.js} +30 -31
- package/chunks/{create-sub-session-EAB2U5XW.js → create-sub-session-DIJOV6HV.js} +2 -2
- package/chunks/{create-sub-session-XVFKHAFW.js → create-sub-session-OT7WXLDO.js} +27 -28
- package/chunks/{cron-create-GMVKSXZT.js → cron-create-X462ERYA.js} +4 -4
- package/chunks/{cron-delete-VDZKUAVK.js → cron-delete-SL5UJUM3.js} +4 -4
- package/chunks/{cron-list-UG7C7RAR.js → cron-list-3MD6SVXI.js} +4 -4
- package/chunks/{daemon-IHR6WSPB.js → daemon-ZW6LHOXT.js} +91 -14
- package/chunks/{daemon-status-provider-ABLBA3UJ.js → daemon-status-provider-GTZOYSBO.js} +35 -36
- package/chunks/{de-NOXPCSYN.js → de-I7ZIYXZC.js} +3 -2
- package/chunks/{dist-PX2ERZ6I.js → dist-HCUUS6IH.js} +2 -2
- package/chunks/{dist-VYWUKURL.js → dist-O2IP3G5D.js} +1 -1
- package/chunks/{dist-GXJVCOS7.js → dist-RZBJT5O2.js} +2 -1
- package/chunks/{dist-V2YVLYOW.js → dist-Y54RURGT.js} +3 -1
- package/chunks/{dist-DOPL5LSQ.js → dist-YTPTCUAD.js} +1 -1
- package/chunks/{dist-4WCQEZIN.js → dist-ZJHKKWUD.js} +1 -1
- package/chunks/{earlyInputCapture-DJCU5SPU.js → earlyInputCapture-GGWVGBZ7.js} +27 -28
- package/chunks/{edit-O4VV5AO6.js → edit-JN467GIR.js} +27 -28
- package/chunks/{en-JFVULHTB.js → en-XE34GKAA.js} +7 -3
- package/chunks/{enter-worktree-XQYDDI2I.js → enter-worktree-MMO4VBQE.js} +26 -27
- package/chunks/{enterPlanMode-CESVMQBV.js → enterPlanMode-BRZOG4DB.js} +27 -30
- package/chunks/{environment-5KXOLZNR.js → environment-LOCDCWMZ.js} +29 -30
- package/chunks/{errors-EBUTCBAQ.js → errors-XXSL5HGG.js} +29 -30
- package/chunks/{exit-worktree-MWGNSPNX.js → exit-worktree-UD7PI5H5.js} +26 -27
- package/chunks/exitPlanMode-EIUETQI6.js +389 -0
- package/chunks/{fast-path-6V73F2T2.js → fast-path-ULGAEUVK.js} +2 -2
- package/chunks/{fr-HVFNU42H.js → fr-X7KDVZIY.js} +3 -2
- package/chunks/{gemini-TEFJZCIZ.js → gemini-KW3APZ4P.js} +133 -80
- package/chunks/{geminiContentGenerator-M56BEXWI.js → geminiContentGenerator-4BQ5QHPR.js} +5 -5
- package/chunks/{glob-DMYFEEAZ.js → glob-FPKAMR6B.js} +32 -28
- package/chunks/{grep-GYE47MD4.js → grep-MOGRCYB4.js} +32 -28
- package/chunks/{handleAutoUpdate-OLUY4L7L.js → handleAutoUpdate-QUMRZZOS.js} +33 -34
- package/chunks/{i18n-462JC7IY.js → i18n-F3W6YUYP.js} +28 -29
- package/chunks/{initializer-Y7WD4D2I.js → initializer-KLU2KAIZ.js} +33 -34
- package/chunks/{installationInfo-I2Z3BKCE.js → installationInfo-P3ZP2SIZ.js} +27 -28
- package/chunks/{ja-PY5AF544.js → ja-2ICT3KXF.js} +3 -2
- package/chunks/{keychain-token-storage-AU22CQI6.js → keychain-token-storage-K23CFKGN.js} +2 -2
- package/chunks/{list-XQ5MSAXP.js → list-4X6D5JD2.js} +35 -36
- package/chunks/{loadedSettingsAdapter-TQOWYE7C.js → loadedSettingsAdapter-446B6WKA.js} +32 -33
- package/chunks/{loop-wakeup-QXWZSCYM.js → loop-wakeup-6H7OENTB.js} +5 -5
- package/chunks/{ls-2OUTG3IZ.js → ls-APTSOOS5.js} +4 -4
- package/chunks/{lsp-4VMNXZW6.js → lsp-HPACPJAN.js} +2 -2
- package/chunks/{mcp-22LLEEVM.js → mcp-JYVOJZOD.js} +32 -33
- package/chunks/{monitor-VKG324X3.js → monitor-KY7YH7TL.js} +26 -27
- package/chunks/nonInteractiveCli-EK35TLVJ.js +129 -0
- package/chunks/{notebook-edit-FJJRBQ3S.js → notebook-edit-IHGW42QK.js} +27 -28
- package/chunks/{openaiContentGenerator-4T2OGTR5.js → openaiContentGenerator-FURUCKQJ.js} +13 -14
- package/chunks/{pidfile-XL3MDCBM.js → pidfile-WKUVXDMR.js} +27 -28
- package/chunks/{processUtils-7UCFN34D.js → processUtils-LHSRN76X.js} +2 -2
- package/chunks/{pt-A3PRQXMU.js → pt-JJ4XPIBP.js} +3 -2
- package/chunks/{qwenContentGenerator-PQUXJDIZ.js → qwenContentGenerator-NRLM7R36.js} +30 -31
- package/chunks/{qwenOAuth2-LEYOU7RU.js → qwenOAuth2-5FNX3AWH.js} +22 -5
- package/chunks/{read-file-3EYQML7E.js → read-file-VLEAEXFP.js} +9 -10
- package/chunks/{read-mcp-resource-JUFHCKSC.js → read-mcp-resource-C6NT52T6.js} +2 -2
- package/chunks/{record-artifact-DWSMBXYY.js → record-artifact-ENCU7QCL.js} +2 -2
- package/chunks/{ripGrep-S6WPGQNA.js → ripGrep-MT23EIDD.js} +26 -27
- package/chunks/{ru-IBCWUTOC.js → ru-STR4KTW7.js} +3 -2
- package/chunks/{run-qwen-serve-NSKBT3HU.js → run-qwen-serve-5HWOQFLI.js} +63 -47
- package/chunks/{runtime-LG5ZZ3VH.js → runtime-6IVKJSLW.js} +38 -37
- package/chunks/{scheduler-PLX3VVTB.js → scheduler-63GJG75U.js} +26 -27
- package/chunks/{send-message-JZ752NWD.js → send-message-5GZ4FX2V.js} +3 -3
- package/chunks/{serve-S2ZLRZZR.js → serve-3LL7RRDP.js} +32 -33
- package/chunks/{server-5ECMV4TM.js → server-AA24QLPA.js} +1672 -615
- package/chunks/{session-ILSONWG4.js → session-LRVCFQQQ.js} +102 -75
- package/chunks/{settings-BOE7WWSA.js → settings-ZX3OKUT4.js} +36 -37
- package/chunks/{shell-VW664JIZ.js → shell-KR3IMYH6.js} +26 -27
- package/chunks/{skill-COHV6625.js → skill-QLM2LSF7.js} +11 -12
- package/chunks/{spawnChannel-5UUR5XOZ.js → spawnChannel-6WFOK3SA.js} +28 -29
- package/chunks/{src-XPKFZ3RN.js → src-ADLNIPHD.js} +101 -72
- package/chunks/{standalone-update-IOOJ2NZQ.js → standalone-update-C54OTJWJ.js} +29 -30
- package/chunks/{startInteractiveUI-3NGJGXXS.js → startInteractiveUI-KFAOS6HC.js} +2342 -1796
- package/chunks/{stdioHelpers-UMY72QRP.js → stdioHelpers-HGIYTWAY.js} +3 -1
- package/chunks/{syntheticOutput-LELY6HAI.js → syntheticOutput-ULOVVLY4.js} +3 -3
- package/chunks/{task-create-QY3BIMNM.js → task-create-DUE2PMNI.js} +7 -7
- package/chunks/{task-list-D2U47WBJ.js → task-list-WVPNX7BZ.js} +5 -5
- package/chunks/{task-stop-N6E5IYLH.js → task-stop-CPEQWOT6.js} +2 -2
- package/chunks/{task-update-HJCQILLB.js → task-update-HY2LNFFB.js} +7 -7
- package/chunks/{team-create-UPLVZQFX.js → team-create-Q5B5M7UD.js} +26 -27
- package/chunks/{team-delete-RCWYDRF4.js → team-delete-JJV6IUOA.js} +5 -5
- package/chunks/{team-plan-approval-F5F432RO.js → team-plan-approval-J55PXNY2.js} +26 -27
- package/chunks/{theme-manager-JJE4BJ67.js → theme-manager-QWTDRPHV.js} +27 -28
- package/chunks/todoWrite-JHHIDOIV.js +358 -0
- package/chunks/{tool-search-LRXI4JLZ.js → tool-search-LSSKWZKH.js} +10 -11
- package/chunks/{total-session-admission-I4DHN6UP.js → total-session-admission-S6ATY5HY.js} +32 -33
- package/chunks/{trustedFolders-SEH7LNX2.js → trustedFolders-CY4TUPDJ.js} +28 -29
- package/chunks/turndown.cjs-FZHGMUTY.js +17670 -0
- package/chunks/{update-relaunch-T6ZKBUA6.js → update-relaunch-IOKOUV3K.js} +6 -6
- package/chunks/{updateCheck-FWLXZPRO.js → updateCheck-YNRFE4V7.js} +30 -31
- package/chunks/{validateNonInterActiveAuth-X6K2VWYT.js → validateNonInterActiveAuth-OXTECS4B.js} +68 -68
- package/chunks/{version-LIFSOGSE.js → version-2CZQQDL5.js} +1 -1
- package/chunks/web-fetch-7QTEGJI5.js +938 -0
- package/chunks/{workflow-NX2DFWGD.js → workflow-G3CZU256.js} +29 -30
- package/chunks/{workspace-providers-status-VYD6M2NE.js → workspace-providers-status-UHQOIPAZ.js} +35 -36
- package/chunks/{workspace-registration-store-2Y6PWOEL.js → workspace-registration-store-5WPCMX4F.js} +1 -1
- package/chunks/{workspace-registry-PKBDBWCA.js → workspace-registry-LAQCRQTH.js} +32 -33
- package/chunks/{workspace-service-HHORUHTS.js → workspace-service-6ZEUJY2Z.js} +38 -39
- package/chunks/{workspace-skills-status-O5Q26LIY.js → workspace-skills-status-YG6OITSM.js} +33 -34
- package/chunks/{write-file-NVAEZ3J2.js → write-file-E7T3PU3B.js} +60 -28
- package/chunks/{zh-PAUNIMHQ.js → zh-6ANG2HTL.js} +7 -3
- package/chunks/{zh-TW-GNEUIUFF.js → zh-TW-4RR3YHNN.js} +7 -3
- package/cli-entry.js +37 -2
- package/cli.js +17 -11
- package/locales/ca.js +3 -2
- package/locales/de.js +3 -2
- package/locales/en.js +10 -5
- package/locales/fr.js +3 -2
- package/locales/ja.js +3 -2
- package/locales/pt.js +3 -2
- package/locales/ru.js +3 -2
- package/locales/zh-TW.js +9 -3
- package/locales/zh.js +9 -3
- package/package.json +3 -3
- package/web-shell/assets/{arc-H74fE8UR.js → arc-_dVIKMdB.js} +1 -1
- package/web-shell/assets/{architectureDiagram-3BPJPVTR-DN3kEq-I.js → architectureDiagram-3BPJPVTR-MuN3nKpL.js} +1 -1
- package/web-shell/assets/{blockDiagram-GPEHLZMM-BrqbsFUF.js → blockDiagram-GPEHLZMM-BtmvJjzx.js} +1 -1
- package/web-shell/assets/{c4Diagram-AAUBKEIU-ClFhU1P-.js → c4Diagram-AAUBKEIU-Dvi58_BU.js} +1 -1
- package/web-shell/assets/channel-Bi5TehaT.js +1 -0
- package/web-shell/assets/{chunk-2J33WTMH-jCIcG0_M.js → chunk-2J33WTMH-YqxOVhS1.js} +1 -1
- package/web-shell/assets/{chunk-4BX2VUAB-DSkGe62-.js → chunk-4BX2VUAB-DoBgbC9z.js} +1 -1
- package/web-shell/assets/{chunk-55IACEB6-BxBHOGTd.js → chunk-55IACEB6-3NEQrBAr.js} +1 -1
- package/web-shell/assets/{chunk-727SXJPM-v_DS7dH7.js → chunk-727SXJPM-DrCZQxp0.js} +1 -1
- package/web-shell/assets/{chunk-AQP2D5EJ-1RzEKRPq.js → chunk-AQP2D5EJ-m_g3zjgv.js} +1 -1
- package/web-shell/assets/{chunk-FMBD7UC4-DyrSbLOX.js → chunk-FMBD7UC4-D1_crABJ.js} +1 -1
- package/web-shell/assets/{chunk-ND2GUHAM-BCmdsZiy.js → chunk-ND2GUHAM-BdhgVtBx.js} +1 -1
- package/web-shell/assets/{chunk-QZHKN3VN-CphHGW2D.js → chunk-QZHKN3VN-BlmThhm-.js} +1 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-BKhhRdd1.js +1 -0
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-BKhhRdd1.js +1 -0
- package/web-shell/assets/{cose-bilkent-S5V4N54A-D5kRC7Fi.js → cose-bilkent-S5V4N54A-Cbjm_00Z.js} +1 -1
- package/web-shell/assets/{dagre-BM42HDAG-DIiyJJ0U.js → dagre-BM42HDAG-C39QNVgC.js} +1 -1
- package/web-shell/assets/{diagram-2AECGRRQ-BOcuB8xU.js → diagram-2AECGRRQ-DNXSAixC.js} +1 -1
- package/web-shell/assets/{diagram-5GNKFQAL-CMgiZ4d3.js → diagram-5GNKFQAL-BCbGUPEA.js} +1 -1
- package/web-shell/assets/{diagram-KO2AKTUF-Ctx8pfN0.js → diagram-KO2AKTUF-1eujKSDC.js} +1 -1
- package/web-shell/assets/{diagram-LMA3HP47-BT5REAWC.js → diagram-LMA3HP47-DUMKXgql.js} +1 -1
- package/web-shell/assets/{diagram-OG6HWLK6-CJkUqXcp.js → diagram-OG6HWLK6-BFktU3_u.js} +1 -1
- package/web-shell/assets/{erDiagram-TEJ5UH35-DyvNNX6v.js → erDiagram-TEJ5UH35-BvJC7DLk.js} +1 -1
- package/web-shell/assets/{flowDiagram-I6XJVG4X-VBf8_My8.js → flowDiagram-I6XJVG4X-Cgu3PlOt.js} +1 -1
- package/web-shell/assets/{ganttDiagram-6RSMTGT7-CviJnR7B.js → ganttDiagram-6RSMTGT7-DLNXN5Xh.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-PVQCEYII-BY66_Oze.js → gitGraphDiagram-PVQCEYII-BQFRDv6R.js} +1 -1
- package/web-shell/assets/index-C_ouplMQ.js +1187 -0
- package/web-shell/assets/{index-DhYuvi3j.js → index-CdC3pjP3.js} +1 -1
- package/web-shell/assets/index-XGDFJE-X.css +5 -0
- package/web-shell/assets/{infoDiagram-5YYISTIA-D2jaewWZ.js → infoDiagram-5YYISTIA-DT2mOSvp.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-BpnNTyi5.js → ishikawaDiagram-YF4QCWOH-9fy_K4bd.js} +1 -1
- package/web-shell/assets/{journeyDiagram-JHISSGLW-CA55GNZF.js → journeyDiagram-JHISSGLW-CoGSEuhE.js} +1 -1
- package/web-shell/assets/{kanban-definition-UN3LZRKU-DyiSl_Ts.js → kanban-definition-UN3LZRKU-BP9hHYIj.js} +1 -1
- package/web-shell/assets/{linear-B-sN3dkV.js → linear-uIroDsmp.js} +1 -1
- package/web-shell/assets/{mermaid.core-xf9SXDdb.js → mermaid.core-BUwoStsA.js} +5 -5
- package/web-shell/assets/{mindmap-definition-RKZ34NQL-DXhr2kRk.js → mindmap-definition-RKZ34NQL-DZB-FWim.js} +1 -1
- package/web-shell/assets/{pieDiagram-4H26LBE5-DUXpbfGQ.js → pieDiagram-4H26LBE5-YPptloKl.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-W4KKPZXB-NeDQYeWw.js → quadrantDiagram-W4KKPZXB-dgk3DSzm.js} +1 -1
- package/web-shell/assets/{requirementDiagram-4Y6WPE33-BSbFRL1A.js → requirementDiagram-4Y6WPE33-BH2En2i9.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-5OEKKPKP-gg27cAaN.js → sankeyDiagram-5OEKKPKP-BB98feeI.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-3UESZ5HK-Bi_1TSs4.js → sequenceDiagram-3UESZ5HK-CunAIGh8.js} +1 -1
- package/web-shell/assets/{stateDiagram-AJRCARHV-CboCCRaf.js → stateDiagram-AJRCARHV-DTJs_-I2.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-DrfFMYta.js +1 -0
- package/web-shell/assets/{timeline-definition-PNZ67QCA-DrGpF_jn.js → timeline-definition-PNZ67QCA-Cd4AN7O0.js} +1 -1
- package/web-shell/assets/{vennDiagram-CIIHVFJN-DCaJU67x.js → vennDiagram-CIIHVFJN-xIG-rUU9.js} +1 -1
- package/web-shell/assets/{wardley-L42UT6IY-p0QcW1aP.js → wardley-L42UT6IY-D1UyjIcG.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-YWT4CUSO-DiEVxj1W.js → wardleyDiagram-YWT4CUSO-BVM0Mb99.js} +1 -1
- package/web-shell/assets/{xychartDiagram-2RQKCTM6-iQB8nSlA.js → xychartDiagram-2RQKCTM6-BX31JDSz.js} +1 -1
- package/web-shell/index.html +2 -2
- package/chunks/chunk-2HRYPZT5.js +0 -25
- package/chunks/chunk-QAW7PIHT.js +0 -168
- package/chunks/chunk-RTV5TUYB.js +0 -143
- package/chunks/chunk-ZPAHLFZU.js +0 -172
- package/chunks/exitPlanMode-HYQL4XMB.js +0 -909
- package/chunks/nonInteractiveCli-UMYUT643.js +0 -129
- package/chunks/todoWrite-FKCGATPJ.js +0 -531
- package/chunks/web-fetch-CFCWTCAP.js +0 -5673
- package/web-shell/assets/channel-NFC5ADAa.js +0 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-DHgwjz3X.js +0 -1
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-DHgwjz3X.js +0 -1
- package/web-shell/assets/index-8xIBbHV3.js +0 -1143
- package/web-shell/assets/index-DLyhlZZO.css +0 -5
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-CXRqms6P.js +0 -1
|
@@ -4,44 +4,51 @@ import {
|
|
|
4
4
|
handleAtCommand,
|
|
5
5
|
resolveAtCommandQuery,
|
|
6
6
|
sanitizeDisplayText
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-IKLWU6YS.js";
|
|
8
8
|
import {
|
|
9
9
|
isAtCommand,
|
|
10
10
|
isBtwCommand,
|
|
11
11
|
isSlashCommand,
|
|
12
|
-
normalizePartList
|
|
13
|
-
|
|
14
|
-
} from "./chunk-THXDQSTA.js";
|
|
12
|
+
normalizePartList
|
|
13
|
+
} from "./chunk-IQRQVPGN.js";
|
|
15
14
|
import {
|
|
15
|
+
findLastSafeSplitPoint,
|
|
16
16
|
fitPendingSlice,
|
|
17
|
+
getEnclosingFenceInfo,
|
|
18
|
+
splitFencedMarkdown,
|
|
17
19
|
useSessionStats
|
|
18
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-JCYMQU5F.js";
|
|
19
21
|
import {
|
|
20
22
|
SHELL_COMMAND_NAME,
|
|
21
23
|
isCollapsibleTool
|
|
22
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-6QGZVKOO.js";
|
|
25
|
+
import {
|
|
26
|
+
themeManager
|
|
27
|
+
} from "./chunk-XAAEDML2.js";
|
|
28
|
+
import {
|
|
29
|
+
recordGoalStatusItem
|
|
30
|
+
} from "./chunk-WACI4VES.js";
|
|
23
31
|
import {
|
|
24
32
|
require_react
|
|
25
33
|
} from "./chunk-HTHUX2T5.js";
|
|
26
|
-
import {
|
|
27
|
-
themeManager
|
|
28
|
-
} from "./chunk-Q6TUALBE.js";
|
|
29
34
|
import {
|
|
30
35
|
formatMemoryUsage
|
|
31
36
|
} from "./chunk-E5Z2AVNV.js";
|
|
32
37
|
import {
|
|
33
38
|
isInlineModelOverrideAllowed
|
|
34
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-2DZ7E27L.js";
|
|
35
40
|
import {
|
|
36
41
|
t
|
|
37
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-3PE7OY2G.js";
|
|
38
43
|
import {
|
|
39
44
|
AutonomousLoopTickResolver,
|
|
40
45
|
CoreToolScheduler,
|
|
41
46
|
ShellExecutionService,
|
|
42
47
|
activeGoalEquals,
|
|
48
|
+
clampInlineMediaPart,
|
|
43
49
|
clearActiveGoal,
|
|
44
50
|
compactToolResultDisplayForHistory,
|
|
51
|
+
convertToFunctionErrorResponse,
|
|
45
52
|
createDuplicateProviderToolCallResponse,
|
|
46
53
|
detectAutonomousSentinel,
|
|
47
54
|
findRepeatedDuplicateProviderToolCall,
|
|
@@ -54,13 +61,15 @@ import {
|
|
|
54
61
|
promptIdContext,
|
|
55
62
|
refreshMemoryAfterManagedWrite,
|
|
56
63
|
setActiveGoal
|
|
57
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-6TDA4EVC.js";
|
|
58
65
|
import {
|
|
59
66
|
ApiCancelEvent,
|
|
60
67
|
ConversationFinishedEvent,
|
|
61
68
|
UserPromptEvent,
|
|
62
69
|
UserRetryEvent,
|
|
70
|
+
formatFullTurnVisionNotice,
|
|
63
71
|
formatVisionBridgeNotice,
|
|
72
|
+
getFullTurnVisionModelSelector,
|
|
64
73
|
hasImageParts,
|
|
65
74
|
logApiCancel,
|
|
66
75
|
logConversationFinishedEvent,
|
|
@@ -69,27 +78,27 @@ import {
|
|
|
69
78
|
runVisionBridge,
|
|
70
79
|
shouldRunVisionBridge,
|
|
71
80
|
splitImageParts
|
|
72
|
-
} from "./chunk-
|
|
81
|
+
} from "./chunk-YN2I5I42.js";
|
|
73
82
|
import {
|
|
74
83
|
isAnyAutoMemPath
|
|
75
|
-
} from "./chunk-
|
|
84
|
+
} from "./chunk-LPHGXXZX.js";
|
|
76
85
|
import {
|
|
77
86
|
ToolNames,
|
|
78
87
|
isShellProgressData
|
|
79
|
-
} from "./chunk-
|
|
88
|
+
} from "./chunk-ANRANWVE.js";
|
|
80
89
|
import {
|
|
81
90
|
getUnsupportedImageFormatWarning,
|
|
82
91
|
isSupportedImageMimeType
|
|
83
92
|
} from "./chunk-FEOZBUMT.js";
|
|
84
93
|
import {
|
|
85
94
|
FinishReason
|
|
86
|
-
} from "./chunk-
|
|
95
|
+
} from "./chunk-TYQMGACW.js";
|
|
87
96
|
import {
|
|
88
97
|
UnauthorizedError,
|
|
89
98
|
createDebugLogger,
|
|
90
99
|
getErrorMessage,
|
|
91
100
|
isNodeError
|
|
92
|
-
} from "./chunk-
|
|
101
|
+
} from "./chunk-UE5TZ55T.js";
|
|
93
102
|
import {
|
|
94
103
|
init_esbuild_shims
|
|
95
104
|
} from "./chunk-5O2XNYP6.js";
|
|
@@ -107,31 +116,6 @@ function useDualOutput() {
|
|
|
107
116
|
}
|
|
108
117
|
__name(useDualOutput, "useDualOutput");
|
|
109
118
|
|
|
110
|
-
// packages/cli/src/utils/midTurnUserMessage.ts
|
|
111
|
-
init_esbuild_shims();
|
|
112
|
-
var MID_TURN_USER_MESSAGE_PREFIX = "\n[User message received during tool execution]: ";
|
|
113
|
-
function prefixMidTurnUserMessageParts(parts, displayText) {
|
|
114
|
-
const partArray = normalizePartList(parts);
|
|
115
|
-
if (partArray.length === 0) {
|
|
116
|
-
return [{ text: `${MID_TURN_USER_MESSAGE_PREFIX}${displayText}` }];
|
|
117
|
-
}
|
|
118
|
-
const [firstPart, ...rest] = partArray;
|
|
119
|
-
if ("text" in firstPart && typeof firstPart.text === "string") {
|
|
120
|
-
return [
|
|
121
|
-
{
|
|
122
|
-
...firstPart,
|
|
123
|
-
text: `${MID_TURN_USER_MESSAGE_PREFIX}${firstPart.text}`
|
|
124
|
-
},
|
|
125
|
-
...rest
|
|
126
|
-
];
|
|
127
|
-
}
|
|
128
|
-
return [
|
|
129
|
-
{ text: `${MID_TURN_USER_MESSAGE_PREFIX}${displayText}` },
|
|
130
|
-
...partArray
|
|
131
|
-
];
|
|
132
|
-
}
|
|
133
|
-
__name(prefixMidTurnUserMessageParts, "prefixMidTurnUserMessageParts");
|
|
134
|
-
|
|
135
119
|
// packages/cli/src/ui/hooks/useGeminiStream.ts
|
|
136
120
|
init_esbuild_shims();
|
|
137
121
|
var import_react5 = __toESM(require_react(), 1);
|
|
@@ -424,103 +408,6 @@ ${finalOutput}`;
|
|
|
424
408
|
return { handleShellCommand, activeShellPtyId };
|
|
425
409
|
}, "useShellCommandProcessor");
|
|
426
410
|
|
|
427
|
-
// packages/cli/src/ui/utils/markdownUtilities.ts
|
|
428
|
-
init_esbuild_shims();
|
|
429
|
-
var findNextFence = /* @__PURE__ */ __name((content, from) => {
|
|
430
|
-
const backtick = content.indexOf("```", from);
|
|
431
|
-
const tilde = content.indexOf("~~~", from);
|
|
432
|
-
if (backtick === -1 && tilde === -1) return null;
|
|
433
|
-
let index;
|
|
434
|
-
let char;
|
|
435
|
-
if (tilde === -1 || backtick !== -1 && backtick < tilde) {
|
|
436
|
-
index = backtick;
|
|
437
|
-
char = "`";
|
|
438
|
-
} else {
|
|
439
|
-
index = tilde;
|
|
440
|
-
char = "~";
|
|
441
|
-
}
|
|
442
|
-
let length = 0;
|
|
443
|
-
while (content[index + length] === char) length++;
|
|
444
|
-
return { index, char, length };
|
|
445
|
-
}, "findNextFence");
|
|
446
|
-
var isIndexInsideCodeBlock = /* @__PURE__ */ __name((content, indexToTest) => {
|
|
447
|
-
let openChar = "";
|
|
448
|
-
let openLen = 0;
|
|
449
|
-
let searchPos = 0;
|
|
450
|
-
while (searchPos < content.length) {
|
|
451
|
-
const fence = findNextFence(content, searchPos);
|
|
452
|
-
if (!fence || fence.index >= indexToTest) break;
|
|
453
|
-
if (openChar === "") {
|
|
454
|
-
openChar = fence.char;
|
|
455
|
-
openLen = fence.length;
|
|
456
|
-
} else if (fence.char === openChar && fence.length >= openLen) {
|
|
457
|
-
openChar = "";
|
|
458
|
-
openLen = 0;
|
|
459
|
-
}
|
|
460
|
-
searchPos = fence.index + fence.length;
|
|
461
|
-
}
|
|
462
|
-
return openChar !== "";
|
|
463
|
-
}, "isIndexInsideCodeBlock");
|
|
464
|
-
var findEnclosingCodeBlockStart = /* @__PURE__ */ __name((content, index) => {
|
|
465
|
-
let openChar = "";
|
|
466
|
-
let openLen = 0;
|
|
467
|
-
let openIndex = -1;
|
|
468
|
-
let searchPos = 0;
|
|
469
|
-
while (searchPos < content.length) {
|
|
470
|
-
const fence = findNextFence(content, searchPos);
|
|
471
|
-
if (!fence || fence.index >= index) break;
|
|
472
|
-
if (openChar === "") {
|
|
473
|
-
openChar = fence.char;
|
|
474
|
-
openLen = fence.length;
|
|
475
|
-
openIndex = fence.index;
|
|
476
|
-
} else if (fence.char === openChar && fence.length >= openLen) {
|
|
477
|
-
openChar = "";
|
|
478
|
-
openLen = 0;
|
|
479
|
-
openIndex = -1;
|
|
480
|
-
}
|
|
481
|
-
searchPos = fence.index + fence.length;
|
|
482
|
-
}
|
|
483
|
-
return openChar !== "" ? openIndex : -1;
|
|
484
|
-
}, "findEnclosingCodeBlockStart");
|
|
485
|
-
var findLastSafeSplitPoint = /* @__PURE__ */ __name((content, idealMaxLength) => {
|
|
486
|
-
const hasLengthCap = idealMaxLength !== void 0;
|
|
487
|
-
const searchEnd = hasLengthCap ? Math.min(Math.max(idealMaxLength, 0), content.length) : content.length;
|
|
488
|
-
if (hasLengthCap && content.length <= searchEnd) {
|
|
489
|
-
return content.length;
|
|
490
|
-
}
|
|
491
|
-
const enclosingBlockStart = findEnclosingCodeBlockStart(content, searchEnd);
|
|
492
|
-
if (enclosingBlockStart !== -1) {
|
|
493
|
-
return hasLengthCap && enclosingBlockStart === 0 ? searchEnd : enclosingBlockStart;
|
|
494
|
-
}
|
|
495
|
-
let searchStartIndex = searchEnd;
|
|
496
|
-
while (searchStartIndex >= 0) {
|
|
497
|
-
const dnlIndex = content.lastIndexOf("\n\n", searchStartIndex);
|
|
498
|
-
if (dnlIndex === -1) {
|
|
499
|
-
break;
|
|
500
|
-
}
|
|
501
|
-
const potentialSplitPoint = dnlIndex + 2;
|
|
502
|
-
if (potentialSplitPoint <= searchEnd && !isIndexInsideCodeBlock(content, potentialSplitPoint)) {
|
|
503
|
-
return potentialSplitPoint;
|
|
504
|
-
}
|
|
505
|
-
searchStartIndex = dnlIndex - 1;
|
|
506
|
-
}
|
|
507
|
-
if (hasLengthCap) {
|
|
508
|
-
searchStartIndex = searchEnd;
|
|
509
|
-
while (searchStartIndex >= 0) {
|
|
510
|
-
const nlIndex = content.lastIndexOf("\n", searchStartIndex);
|
|
511
|
-
if (nlIndex === -1) {
|
|
512
|
-
break;
|
|
513
|
-
}
|
|
514
|
-
const potentialSplitPoint = nlIndex + 1;
|
|
515
|
-
if (potentialSplitPoint <= searchEnd && !isIndexInsideCodeBlock(content, potentialSplitPoint)) {
|
|
516
|
-
return potentialSplitPoint;
|
|
517
|
-
}
|
|
518
|
-
searchStartIndex = nlIndex - 1;
|
|
519
|
-
}
|
|
520
|
-
}
|
|
521
|
-
return hasLengthCap ? searchEnd : content.length;
|
|
522
|
-
}, "findLastSafeSplitPoint");
|
|
523
|
-
|
|
524
411
|
// packages/cli/src/ui/hooks/useStateAndRef.ts
|
|
525
412
|
init_esbuild_shims();
|
|
526
413
|
var import_react3 = __toESM(require_react(), 1);
|
|
@@ -621,10 +508,60 @@ function useReactToolScheduler(onComplete, config, getPreferredEditor, onEditorC
|
|
|
621
508
|
]
|
|
622
509
|
);
|
|
623
510
|
const schedule = (0, import_react4.useCallback)(
|
|
624
|
-
(request, signal) => {
|
|
625
|
-
|
|
511
|
+
(request, signal, modelOverride) => {
|
|
512
|
+
if (!modelOverride?.endsWith("\0")) {
|
|
513
|
+
void scheduler.schedule(request, signal);
|
|
514
|
+
return;
|
|
515
|
+
}
|
|
516
|
+
void (async () => {
|
|
517
|
+
try {
|
|
518
|
+
const runtimeView = await config.getBaseLlmClient().resolveForModel(modelOverride.slice(0, -1), {
|
|
519
|
+
failClosed: true
|
|
520
|
+
});
|
|
521
|
+
await scheduler.schedule(request, signal, runtimeView);
|
|
522
|
+
} catch (error) {
|
|
523
|
+
debugLogger2.error(
|
|
524
|
+
`Full-turn tool scheduling failed: ${error instanceof Error ? error.message : String(error)}`
|
|
525
|
+
);
|
|
526
|
+
const message = "Full-turn tool scheduling failed. The tool was not executed.";
|
|
527
|
+
const requests = Array.isArray(request) ? request : [request];
|
|
528
|
+
const completedCalls = requests.map(
|
|
529
|
+
(toolRequest) => {
|
|
530
|
+
const toolError = new Error(message);
|
|
531
|
+
const responseParts = convertToFunctionErrorResponse(
|
|
532
|
+
toolRequest.name,
|
|
533
|
+
toolRequest.callId,
|
|
534
|
+
message,
|
|
535
|
+
message
|
|
536
|
+
);
|
|
537
|
+
config.getChatRecordingService()?.recordToolResult(responseParts, {
|
|
538
|
+
callId: toolRequest.callId,
|
|
539
|
+
status: "error",
|
|
540
|
+
resultDisplay: message,
|
|
541
|
+
error: toolError,
|
|
542
|
+
errorType: "unhandled_exception" /* UNHANDLED_EXCEPTION */
|
|
543
|
+
});
|
|
544
|
+
return {
|
|
545
|
+
status: "error",
|
|
546
|
+
request: toolRequest,
|
|
547
|
+
response: {
|
|
548
|
+
callId: toolRequest.callId,
|
|
549
|
+
responseParts,
|
|
550
|
+
resultDisplay: message,
|
|
551
|
+
error: toolError,
|
|
552
|
+
errorType: "unhandled_exception" /* UNHANDLED_EXCEPTION */,
|
|
553
|
+
contentLength: message.length
|
|
554
|
+
}
|
|
555
|
+
};
|
|
556
|
+
}
|
|
557
|
+
);
|
|
558
|
+
setToolCallsForDisplay((prev) => [...prev, ...completedCalls]);
|
|
559
|
+
await allToolCallsCompleteHandler(completedCalls);
|
|
560
|
+
return;
|
|
561
|
+
}
|
|
562
|
+
})();
|
|
626
563
|
},
|
|
627
|
-
[scheduler]
|
|
564
|
+
[allToolCallsCompleteHandler, config, scheduler]
|
|
628
565
|
);
|
|
629
566
|
const markToolsAsSubmitted = (0, import_react4.useCallback)(
|
|
630
567
|
(callIdsToMark) => {
|
|
@@ -957,7 +894,7 @@ function charIndexAfterLine(text, keptLines) {
|
|
|
957
894
|
return -1;
|
|
958
895
|
}
|
|
959
896
|
__name(charIndexAfterLine, "charIndexAfterLine");
|
|
960
|
-
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) => {
|
|
897
|
+
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) => {
|
|
961
898
|
const [initError, setInitError] = (0, import_react5.useState)(null);
|
|
962
899
|
const abortControllerRef = (0, import_react5.useRef)(null);
|
|
963
900
|
const flushBufferedStreamEventsRef = (0, import_react5.useRef)(/* @__PURE__ */ new Set());
|
|
@@ -1241,10 +1178,45 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
1241
1178
|
]);
|
|
1242
1179
|
const applyVisionBridgeIfNeeded = (0, import_react5.useCallback)(
|
|
1243
1180
|
async (parts, timestamp, signal) => {
|
|
1244
|
-
if (parts === null || !hasImageParts(parts)
|
|
1181
|
+
if (parts === null || !hasImageParts(parts)) {
|
|
1182
|
+
return { parts, shouldProceed: true };
|
|
1183
|
+
}
|
|
1184
|
+
if (modelOverrideRef.current?.endsWith("\0")) {
|
|
1185
|
+
return { parts, shouldProceed: true };
|
|
1186
|
+
}
|
|
1187
|
+
if (inlineModelOverrideActiveRef.current) {
|
|
1245
1188
|
return { parts, shouldProceed: true };
|
|
1246
1189
|
}
|
|
1190
|
+
if (!shouldRunVisionBridge(config)) {
|
|
1191
|
+
return { parts, shouldProceed: true };
|
|
1192
|
+
}
|
|
1193
|
+
if (signal.aborted) {
|
|
1194
|
+
return { parts: null, shouldProceed: false };
|
|
1195
|
+
}
|
|
1247
1196
|
debugLogger3.debug("vision bridge: gate matched, running conversion");
|
|
1197
|
+
const fullTurnModel = config.getDefaultVisionBridgeModel();
|
|
1198
|
+
if (fullTurnModel?.agentCapable) {
|
|
1199
|
+
const fullTurnParts = (Array.isArray(parts) ? parts : [parts]).map(
|
|
1200
|
+
(part) => typeof part === "string" ? { text: part } : clampInlineMediaPart(part)
|
|
1201
|
+
);
|
|
1202
|
+
if (!hasImageParts(fullTurnParts)) {
|
|
1203
|
+
return { parts: fullTurnParts, shouldProceed: true };
|
|
1204
|
+
}
|
|
1205
|
+
applyModelOverride(
|
|
1206
|
+
modelOverrideRef,
|
|
1207
|
+
inlineModelOverrideActiveRef,
|
|
1208
|
+
getFullTurnVisionModelSelector(fullTurnModel),
|
|
1209
|
+
false
|
|
1210
|
+
);
|
|
1211
|
+
addItem(
|
|
1212
|
+
{
|
|
1213
|
+
type: "vision_notice" /* VISION_NOTICE */,
|
|
1214
|
+
text: formatFullTurnVisionNotice(fullTurnModel)
|
|
1215
|
+
},
|
|
1216
|
+
timestamp
|
|
1217
|
+
);
|
|
1218
|
+
return { parts: fullTurnParts, shouldProceed: true };
|
|
1219
|
+
}
|
|
1248
1220
|
const bridgeResult = await runVisionBridge({ config, parts, signal });
|
|
1249
1221
|
debugLogger3.debug(
|
|
1250
1222
|
`vision bridge: status=${bridgeResult.status} applied=${bridgeResult.applied} model=${bridgeResult.modelId ?? "(none)"}`
|
|
@@ -1330,6 +1302,15 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
1330
1302
|
);
|
|
1331
1303
|
}
|
|
1332
1304
|
}
|
|
1305
|
+
const bridgeResult2 = await applyVisionBridgeIfNeeded(
|
|
1306
|
+
localQueryToSendToGemini,
|
|
1307
|
+
userMessageTimestamp,
|
|
1308
|
+
abortSignal
|
|
1309
|
+
);
|
|
1310
|
+
if (!bridgeResult2.shouldProceed) {
|
|
1311
|
+
return { queryToSend: null, shouldProceed: false };
|
|
1312
|
+
}
|
|
1313
|
+
localQueryToSendToGemini = bridgeResult2.parts;
|
|
1333
1314
|
return {
|
|
1334
1315
|
queryToSend: localQueryToSendToGemini,
|
|
1335
1316
|
shouldProceed: true
|
|
@@ -1441,8 +1422,10 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
1441
1422
|
STREAM_PENDING_ITEM_MAX_CHARS
|
|
1442
1423
|
);
|
|
1443
1424
|
const safeSplitPoint = splitPoint > 0 && splitPoint < newGeminiMessageBuffer.length ? splitPoint : STREAM_PENDING_ITEM_MAX_CHARS;
|
|
1444
|
-
const beforeText =
|
|
1445
|
-
|
|
1425
|
+
const { before: beforeText, after: afterText } = splitFencedMarkdown(
|
|
1426
|
+
newGeminiMessageBuffer,
|
|
1427
|
+
safeSplitPoint
|
|
1428
|
+
);
|
|
1446
1429
|
commitItem(
|
|
1447
1430
|
{
|
|
1448
1431
|
type: nextPendingType,
|
|
@@ -1476,12 +1459,21 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
1476
1459
|
break;
|
|
1477
1460
|
}
|
|
1478
1461
|
}
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1462
|
+
let target;
|
|
1463
|
+
if (boundaryLine < 0) {
|
|
1464
|
+
const capIndex = charIndexAfterLine(
|
|
1465
|
+
newGeminiMessageBuffer,
|
|
1466
|
+
keptLines
|
|
1467
|
+
);
|
|
1468
|
+
const fenceInfo = capIndex > 0 ? getEnclosingFenceInfo(newGeminiMessageBuffer, capIndex) : null;
|
|
1469
|
+
if (!fenceInfo || fenceInfo.lang?.toLowerCase() === "mermaid") {
|
|
1470
|
+
break;
|
|
1471
|
+
}
|
|
1472
|
+
target = capIndex;
|
|
1473
|
+
} else {
|
|
1474
|
+
target = charIndexAfterLine(newGeminiMessageBuffer, boundaryLine + 1);
|
|
1475
|
+
if (target <= 0) break;
|
|
1476
|
+
}
|
|
1485
1477
|
const splitPoint = findLastSafeSplitPoint(
|
|
1486
1478
|
newGeminiMessageBuffer,
|
|
1487
1479
|
target
|
|
@@ -1489,8 +1481,10 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
1489
1481
|
if (splitPoint <= 0 || splitPoint >= newGeminiMessageBuffer.length) {
|
|
1490
1482
|
break;
|
|
1491
1483
|
}
|
|
1492
|
-
const beforeText =
|
|
1493
|
-
|
|
1484
|
+
const { before: beforeText, after: afterText } = splitFencedMarkdown(
|
|
1485
|
+
newGeminiMessageBuffer,
|
|
1486
|
+
splitPoint
|
|
1487
|
+
);
|
|
1494
1488
|
commitItem(
|
|
1495
1489
|
{
|
|
1496
1490
|
type: nextPendingType,
|
|
@@ -1592,8 +1586,10 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
1592
1586
|
);
|
|
1593
1587
|
while (newThoughtBuffer.length > STREAM_PENDING_ITEM_MAX_CHARS) {
|
|
1594
1588
|
const safeSplitPoint = splitPoint > 0 && splitPoint < newThoughtBuffer.length ? splitPoint : STREAM_PENDING_ITEM_MAX_CHARS;
|
|
1595
|
-
const beforeText =
|
|
1596
|
-
|
|
1589
|
+
const { before: beforeText, after: afterText } = splitFencedMarkdown(
|
|
1590
|
+
newThoughtBuffer,
|
|
1591
|
+
safeSplitPoint
|
|
1592
|
+
);
|
|
1597
1593
|
addItem(
|
|
1598
1594
|
buildThoughtItem(pendingThoughtType, beforeText),
|
|
1599
1595
|
userMessageTimestamp
|
|
@@ -1873,6 +1869,9 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
1873
1869
|
kind: "checking",
|
|
1874
1870
|
condition: activeGoal.condition,
|
|
1875
1871
|
iterations: activeGoal.iterations,
|
|
1872
|
+
// Carried so a transcript truncated past its `set` card can still
|
|
1873
|
+
// restore the goal's original start time.
|
|
1874
|
+
setAt: activeGoal.setAt,
|
|
1876
1875
|
lastReason: activeGoal.lastReason ?? value.reasons[value.reasons.length - 1]
|
|
1877
1876
|
};
|
|
1878
1877
|
addItem(item, userMessageTimestamp);
|
|
@@ -2212,7 +2211,11 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
2212
2211
|
}
|
|
2213
2212
|
}
|
|
2214
2213
|
if (executableToolCallRequests.length > 0) {
|
|
2215
|
-
scheduleToolCalls(
|
|
2214
|
+
scheduleToolCalls(
|
|
2215
|
+
executableToolCallRequests,
|
|
2216
|
+
signal,
|
|
2217
|
+
modelOverrideRef.current
|
|
2218
|
+
);
|
|
2216
2219
|
}
|
|
2217
2220
|
}
|
|
2218
2221
|
return 0 /* Completed */;
|
|
@@ -2244,20 +2247,185 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
2244
2247
|
dualOutput
|
|
2245
2248
|
]
|
|
2246
2249
|
);
|
|
2250
|
+
const resolveSteeredMessages = (0, import_react5.useCallback)(
|
|
2251
|
+
async (messages, signal) => {
|
|
2252
|
+
const resolvedMessages = [];
|
|
2253
|
+
const resolvedForRecording = [];
|
|
2254
|
+
const timestamp = Date.now();
|
|
2255
|
+
for (let index = 0; index < messages.length; index += 1) {
|
|
2256
|
+
if (signal.aborted) break;
|
|
2257
|
+
const message = messages[index];
|
|
2258
|
+
const sideEffects = [];
|
|
2259
|
+
let resolvedQuery = [{ text: message }];
|
|
2260
|
+
if (isAtCommand(message)) {
|
|
2261
|
+
const timeout = new AbortController();
|
|
2262
|
+
const atCommandSignal = AbortSignal.any([signal, timeout.signal]);
|
|
2263
|
+
const timeoutId = setTimeout(() => {
|
|
2264
|
+
timeout.abort(
|
|
2265
|
+
new Error(MID_TURN_AT_COMMAND_RESOLVE_TIMEOUT_MESSAGE)
|
|
2266
|
+
);
|
|
2267
|
+
}, MID_TURN_AT_COMMAND_RESOLVE_TIMEOUT_MS);
|
|
2268
|
+
try {
|
|
2269
|
+
const atCommandResult = await resolveWithAbort(
|
|
2270
|
+
atCommandSignal,
|
|
2271
|
+
() => resolveAtCommandQuery({
|
|
2272
|
+
query: message,
|
|
2273
|
+
config,
|
|
2274
|
+
onDebugMessage,
|
|
2275
|
+
messageId: timestamp + index,
|
|
2276
|
+
signal: atCommandSignal
|
|
2277
|
+
})
|
|
2278
|
+
);
|
|
2279
|
+
const shouldSkipMessage = !atCommandResult.shouldProceed && (atCommandResult.toolDisplays?.length ?? 0) > 0;
|
|
2280
|
+
if (atCommandResult.shouldProceed && atCommandResult.processedQuery !== null) {
|
|
2281
|
+
resolvedQuery = atCommandResult.processedQuery;
|
|
2282
|
+
} else if (atCommandResult.toolDisplays?.length) {
|
|
2283
|
+
const toolDisplays = atCommandResult.toolDisplays;
|
|
2284
|
+
const showToolDisplays = /* @__PURE__ */ __name(() => addItem(
|
|
2285
|
+
{ type: "tool_group", tools: toolDisplays },
|
|
2286
|
+
timestamp + index
|
|
2287
|
+
), "showToolDisplays");
|
|
2288
|
+
if (shouldSkipMessage) showToolDisplays();
|
|
2289
|
+
else sideEffects.push(showToolDisplays);
|
|
2290
|
+
}
|
|
2291
|
+
if (atCommandResult.recording) {
|
|
2292
|
+
const recordAtCommand = /* @__PURE__ */ __name(() => config.getChatRecordingService?.()?.recordAtCommand?.({
|
|
2293
|
+
filesRead: atCommandResult.recording.filesRead,
|
|
2294
|
+
status: atCommandResult.recording.status,
|
|
2295
|
+
...atCommandResult.recording.message ? { message: atCommandResult.recording.message } : {},
|
|
2296
|
+
userText: message
|
|
2297
|
+
}), "recordAtCommand");
|
|
2298
|
+
if (shouldSkipMessage) recordAtCommand();
|
|
2299
|
+
else sideEffects.push(recordAtCommand);
|
|
2300
|
+
}
|
|
2301
|
+
if (shouldSkipMessage) continue;
|
|
2302
|
+
} catch (error) {
|
|
2303
|
+
const errorMessage = getErrorMessage(error);
|
|
2304
|
+
onDebugMessage(
|
|
2305
|
+
`Failed to resolve mid-turn @ command: ${errorMessage}`
|
|
2306
|
+
);
|
|
2307
|
+
if (!signal.aborted) {
|
|
2308
|
+
addItem(
|
|
2309
|
+
{
|
|
2310
|
+
type: "warning" /* WARNING */,
|
|
2311
|
+
text: `Could not attach file: ${errorMessage}`
|
|
2312
|
+
},
|
|
2313
|
+
Date.now()
|
|
2314
|
+
);
|
|
2315
|
+
}
|
|
2316
|
+
continue;
|
|
2317
|
+
} finally {
|
|
2318
|
+
clearTimeout(timeoutId);
|
|
2319
|
+
}
|
|
2320
|
+
if (signal.aborted) break;
|
|
2321
|
+
}
|
|
2322
|
+
const bridgeResult = await applyVisionBridgeIfNeeded(
|
|
2323
|
+
resolvedQuery,
|
|
2324
|
+
timestamp + index,
|
|
2325
|
+
signal
|
|
2326
|
+
);
|
|
2327
|
+
if (!bridgeResult.shouldProceed) {
|
|
2328
|
+
if (signal.aborted) break;
|
|
2329
|
+
continue;
|
|
2330
|
+
}
|
|
2331
|
+
const messageParts = normalizePartList(
|
|
2332
|
+
bridgeResult.parts ?? resolvedQuery
|
|
2333
|
+
);
|
|
2334
|
+
const formatCheck = checkImageFormatsSupport(messageParts);
|
|
2335
|
+
if (formatCheck.hasUnsupportedFormats) {
|
|
2336
|
+
sideEffects.push(
|
|
2337
|
+
() => addItem(
|
|
2338
|
+
{
|
|
2339
|
+
type: "info" /* INFO */,
|
|
2340
|
+
text: getUnsupportedImageFormatWarning()
|
|
2341
|
+
},
|
|
2342
|
+
Date.now()
|
|
2343
|
+
)
|
|
2344
|
+
);
|
|
2345
|
+
}
|
|
2346
|
+
if (resolvedMessages.length > 0 && messageParts.length > 0) {
|
|
2347
|
+
resolvedMessages.push({ text: "\n\n" });
|
|
2348
|
+
}
|
|
2349
|
+
resolvedMessages.push(...messageParts);
|
|
2350
|
+
resolvedForRecording.push({
|
|
2351
|
+
message,
|
|
2352
|
+
parts: messageParts,
|
|
2353
|
+
sideEffects
|
|
2354
|
+
});
|
|
2355
|
+
}
|
|
2356
|
+
if (signal.aborted) return void 0;
|
|
2357
|
+
return {
|
|
2358
|
+
parts: resolvedMessages,
|
|
2359
|
+
accept: /* @__PURE__ */ __name(() => {
|
|
2360
|
+
for (const { message, parts, sideEffects } of resolvedForRecording) {
|
|
2361
|
+
for (const sideEffect of sideEffects) sideEffect();
|
|
2362
|
+
config.getChatRecordingService?.()?.recordMidTurnUserMessage(parts, message);
|
|
2363
|
+
addItem(
|
|
2364
|
+
{ type: "notification" /* NOTIFICATION */, text: message },
|
|
2365
|
+
Date.now()
|
|
2366
|
+
);
|
|
2367
|
+
}
|
|
2368
|
+
}, "accept")
|
|
2369
|
+
};
|
|
2370
|
+
},
|
|
2371
|
+
[addItem, applyVisionBridgeIfNeeded, config, onDebugMessage]
|
|
2372
|
+
);
|
|
2373
|
+
const resolveDrainedSteerMessages = (0, import_react5.useCallback)(
|
|
2374
|
+
async (messages, signal) => {
|
|
2375
|
+
try {
|
|
2376
|
+
const resolved = await resolveSteeredMessages(messages, signal);
|
|
2377
|
+
if (signal.aborted) {
|
|
2378
|
+
midTurnRestoreRef?.current?.(messages);
|
|
2379
|
+
return void 0;
|
|
2380
|
+
}
|
|
2381
|
+
if (!resolved || resolved.parts.length === 0) return void 0;
|
|
2382
|
+
let settled = false;
|
|
2383
|
+
return {
|
|
2384
|
+
parts: resolved.parts,
|
|
2385
|
+
accept: /* @__PURE__ */ __name(() => {
|
|
2386
|
+
if (settled) return;
|
|
2387
|
+
settled = true;
|
|
2388
|
+
resolved.accept();
|
|
2389
|
+
}, "accept"),
|
|
2390
|
+
restore: /* @__PURE__ */ __name(() => {
|
|
2391
|
+
if (settled) return;
|
|
2392
|
+
settled = true;
|
|
2393
|
+
midTurnRestoreRef?.current?.(messages);
|
|
2394
|
+
}, "restore")
|
|
2395
|
+
};
|
|
2396
|
+
} catch (error) {
|
|
2397
|
+
midTurnRestoreRef?.current?.(messages);
|
|
2398
|
+
onDebugMessage(
|
|
2399
|
+
`Failed to prepare steer input: ${getErrorMessage(error)}`
|
|
2400
|
+
);
|
|
2401
|
+
return void 0;
|
|
2402
|
+
}
|
|
2403
|
+
},
|
|
2404
|
+
[midTurnRestoreRef, onDebugMessage, resolveSteeredMessages]
|
|
2405
|
+
);
|
|
2406
|
+
const drainSteerAtBoundary = (0, import_react5.useCallback)(
|
|
2407
|
+
async (signal) => {
|
|
2408
|
+
const messages = midTurnDrainRef?.current?.() ?? [];
|
|
2409
|
+
if (messages.length === 0) return void 0;
|
|
2410
|
+
return resolveDrainedSteerMessages(messages, signal);
|
|
2411
|
+
},
|
|
2412
|
+
[midTurnDrainRef, resolveDrainedSteerMessages]
|
|
2413
|
+
);
|
|
2247
2414
|
const submitQuery = (0, import_react5.useCallback)(
|
|
2248
2415
|
async (query, submitType = "userQuery" /* UserQuery */, prompt_id, metadata) => {
|
|
2249
2416
|
const allowConcurrentBtwDuringResponse = submitType === "userQuery" /* UserQuery */ && streamingState === "responding" /* Responding */ && typeof query === "string" && isBtwCommand(query);
|
|
2250
|
-
|
|
2417
|
+
const isTurnContinuation = submitType === "toolResult" /* ToolResult */ || submitType === "steer" /* Steer */;
|
|
2418
|
+
if (isSubmittingQueryRef.current && !isTurnContinuation && !allowConcurrentBtwDuringResponse) {
|
|
2251
2419
|
metadata?.onDeliveryFailed?.();
|
|
2252
2420
|
return;
|
|
2253
2421
|
}
|
|
2254
|
-
if ((streamingState === "responding" /* Responding */ || streamingState === "waiting_for_confirmation" /* WaitingForConfirmation */) &&
|
|
2422
|
+
if ((streamingState === "responding" /* Responding */ || streamingState === "waiting_for_confirmation" /* WaitingForConfirmation */) && !isTurnContinuation && !allowConcurrentBtwDuringResponse) {
|
|
2255
2423
|
metadata?.onDeliveryFailed?.();
|
|
2256
2424
|
return;
|
|
2257
2425
|
}
|
|
2258
2426
|
isSubmittingQueryRef.current = true;
|
|
2259
2427
|
loopDetectedRef.current = false;
|
|
2260
|
-
if (
|
|
2428
|
+
if (!isTurnContinuation && !allowConcurrentBtwDuringResponse) {
|
|
2261
2429
|
lastTurnUserItemRef.current = null;
|
|
2262
2430
|
turnSawContentEventRef.current = false;
|
|
2263
2431
|
handledProviderToolCallIdsRef.current.clear();
|
|
@@ -2266,7 +2434,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
2266
2434
|
immediateDuplicateToolResponsesRef.current = null;
|
|
2267
2435
|
}
|
|
2268
2436
|
const userMessageTimestamp = Date.now();
|
|
2269
|
-
if (submitType !== "
|
|
2437
|
+
if (!isTurnContinuation && submitType !== "notification" /* Notification */ && !allowConcurrentBtwDuringResponse) {
|
|
2270
2438
|
setModelSwitchedFromQuotaError(false);
|
|
2271
2439
|
const droppingInlineOverrideOnRetry = submitType === "retry" /* Retry */ && inlineModelOverrideActiveRef.current;
|
|
2272
2440
|
if (submitType !== "retry" /* Retry */ || inlineModelOverrideActiveRef.current) {
|
|
@@ -2351,7 +2519,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
2351
2519
|
setIsResponding(true);
|
|
2352
2520
|
setInitError(null);
|
|
2353
2521
|
setIsReceivingContent(false);
|
|
2354
|
-
if (
|
|
2522
|
+
if (!isTurnContinuation) {
|
|
2355
2523
|
streamingResponseLengthRef.current = 0;
|
|
2356
2524
|
}
|
|
2357
2525
|
try {
|
|
@@ -2369,7 +2537,9 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
2369
2537
|
{
|
|
2370
2538
|
type: submitType,
|
|
2371
2539
|
notificationDisplayText: metadata?.notificationDisplayText,
|
|
2372
|
-
modelOverride: modelOverrideRef.current
|
|
2540
|
+
modelOverride: modelOverrideRef.current,
|
|
2541
|
+
steerInput: metadata?.steerInput,
|
|
2542
|
+
...!allowConcurrentBtwDuringResponse && midTurnDrainRef ? { getSteerInput: drainSteerAtBoundary } : {}
|
|
2373
2543
|
}
|
|
2374
2544
|
);
|
|
2375
2545
|
const processingStatus = await processGeminiStreamEvents(
|
|
@@ -2399,7 +2569,8 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
2399
2569
|
if (retryCountdownTimerRef.current) {
|
|
2400
2570
|
clearRetryCountdown();
|
|
2401
2571
|
}
|
|
2402
|
-
|
|
2572
|
+
const loopDetected = loopDetectedRef.current;
|
|
2573
|
+
if (loopDetected) {
|
|
2403
2574
|
loopDetectedRef.current = false;
|
|
2404
2575
|
handleLoopDetectedEvent();
|
|
2405
2576
|
}
|
|
@@ -2482,7 +2653,9 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
2482
2653
|
pendingRetryErrorItemRef,
|
|
2483
2654
|
setPendingRetryErrorItem,
|
|
2484
2655
|
setPendingThoughtItem,
|
|
2485
|
-
dualOutput
|
|
2656
|
+
dualOutput,
|
|
2657
|
+
drainSteerAtBoundary,
|
|
2658
|
+
midTurnDrainRef
|
|
2486
2659
|
]
|
|
2487
2660
|
);
|
|
2488
2661
|
const retryLastPrompt = (0, import_react5.useCallback)(async () => {
|
|
@@ -2676,11 +2849,11 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
2676
2849
|
const promptId = prompt_ids[0] ?? pendingDuplicatePromptId;
|
|
2677
2850
|
for (const toolCall of geminiTools) {
|
|
2678
2851
|
if ("modelOverride" in toolCall.response) {
|
|
2679
|
-
if (inlineModelOverrideActiveRef.current) {
|
|
2852
|
+
if (inlineModelOverrideActiveRef.current || modelOverrideRef.current?.endsWith("\0")) {
|
|
2680
2853
|
debugLogger3.debug(
|
|
2681
2854
|
`skill-tool model override (${String(
|
|
2682
2855
|
toolCall.response.modelOverride
|
|
2683
|
-
)}) blocked: inline override active`
|
|
2856
|
+
)}) blocked: ${inlineModelOverrideActiveRef.current ? "inline override active" : "full-turn override active"}`
|
|
2684
2857
|
);
|
|
2685
2858
|
} else {
|
|
2686
2859
|
applyModelOverride(
|
|
@@ -2750,115 +2923,20 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
2750
2923
|
return;
|
|
2751
2924
|
}
|
|
2752
2925
|
const drained = turnCancelledRef.current || abortControllerRef.current?.signal.aborted ? [] : midTurnDrainRef?.current?.() ?? [];
|
|
2926
|
+
let drainedSteer;
|
|
2753
2927
|
if (drained.length > 0) {
|
|
2754
|
-
const midTurnTimestamp = Date.now();
|
|
2755
2928
|
const midTurnAbort = abortControllerRef.current ?? new AbortController();
|
|
2756
2929
|
const shouldTrackMidTurnAbort = !abortControllerRef.current;
|
|
2757
2930
|
if (shouldTrackMidTurnAbort) {
|
|
2758
2931
|
auxiliaryAbortRefsRef.current.add(midTurnAbort);
|
|
2759
2932
|
}
|
|
2760
2933
|
try {
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
if (isAtCommand(msg)) {
|
|
2768
|
-
const atCommandTimeout = new AbortController();
|
|
2769
|
-
const atCommandSignal = AbortSignal.any([
|
|
2770
|
-
midTurnAbort.signal,
|
|
2771
|
-
atCommandTimeout.signal
|
|
2772
|
-
]);
|
|
2773
|
-
const atCommandTimeoutId = setTimeout(() => {
|
|
2774
|
-
atCommandTimeout.abort(
|
|
2775
|
-
new Error(MID_TURN_AT_COMMAND_RESOLVE_TIMEOUT_MESSAGE)
|
|
2776
|
-
);
|
|
2777
|
-
}, MID_TURN_AT_COMMAND_RESOLVE_TIMEOUT_MS);
|
|
2778
|
-
try {
|
|
2779
|
-
const atCommandResult = await resolveWithAbort(
|
|
2780
|
-
atCommandSignal,
|
|
2781
|
-
() => resolveAtCommandQuery({
|
|
2782
|
-
query: msg,
|
|
2783
|
-
config,
|
|
2784
|
-
onDebugMessage,
|
|
2785
|
-
messageId: midTurnTimestamp + index,
|
|
2786
|
-
signal: atCommandSignal
|
|
2787
|
-
})
|
|
2788
|
-
);
|
|
2789
|
-
const shouldSkipMidTurnMessage = !atCommandResult.shouldProceed && (atCommandResult.toolDisplays?.length ?? 0) > 0;
|
|
2790
|
-
if (atCommandResult.shouldProceed && atCommandResult.processedQuery !== null) {
|
|
2791
|
-
resolvedMidTurnQuery = atCommandResult.processedQuery;
|
|
2792
|
-
} else if (atCommandResult.toolDisplays?.length) {
|
|
2793
|
-
addItem(
|
|
2794
|
-
{ type: "tool_group", tools: atCommandResult.toolDisplays },
|
|
2795
|
-
midTurnTimestamp + index
|
|
2796
|
-
);
|
|
2797
|
-
}
|
|
2798
|
-
if (atCommandResult.recording) {
|
|
2799
|
-
config.getChatRecordingService?.()?.recordAtCommand?.({
|
|
2800
|
-
filesRead: atCommandResult.recording.filesRead,
|
|
2801
|
-
status: atCommandResult.recording.status,
|
|
2802
|
-
...atCommandResult.recording.message ? { message: atCommandResult.recording.message } : {},
|
|
2803
|
-
userText: msg
|
|
2804
|
-
});
|
|
2805
|
-
}
|
|
2806
|
-
if (shouldSkipMidTurnMessage) {
|
|
2807
|
-
continue;
|
|
2808
|
-
}
|
|
2809
|
-
} catch (error) {
|
|
2810
|
-
const errorMessage = getErrorMessage(error);
|
|
2811
|
-
onDebugMessage(
|
|
2812
|
-
`Failed to resolve mid-turn @ command: ${errorMessage}`
|
|
2813
|
-
);
|
|
2814
|
-
if (!midTurnAbort.signal.aborted) {
|
|
2815
|
-
addItem(
|
|
2816
|
-
{
|
|
2817
|
-
type: "warning" /* WARNING */,
|
|
2818
|
-
text: `Could not attach file: ${errorMessage}`
|
|
2819
|
-
},
|
|
2820
|
-
Date.now()
|
|
2821
|
-
);
|
|
2822
|
-
}
|
|
2823
|
-
continue;
|
|
2824
|
-
} finally {
|
|
2825
|
-
clearTimeout(atCommandTimeoutId);
|
|
2826
|
-
}
|
|
2827
|
-
if (midTurnAbort.signal.aborted) {
|
|
2828
|
-
break;
|
|
2829
|
-
}
|
|
2830
|
-
}
|
|
2831
|
-
const bridgeResult = await applyVisionBridgeIfNeeded(
|
|
2832
|
-
resolvedMidTurnQuery,
|
|
2833
|
-
midTurnTimestamp + index,
|
|
2834
|
-
midTurnAbort.signal
|
|
2835
|
-
);
|
|
2836
|
-
if (!bridgeResult.shouldProceed) {
|
|
2837
|
-
if (midTurnAbort.signal.aborted) {
|
|
2838
|
-
break;
|
|
2839
|
-
}
|
|
2840
|
-
continue;
|
|
2841
|
-
}
|
|
2842
|
-
resolvedMidTurnQuery = bridgeResult.parts ?? resolvedMidTurnQuery;
|
|
2843
|
-
const midTurnUserMessageParts = prefixMidTurnUserMessageParts(
|
|
2844
|
-
resolvedMidTurnQuery,
|
|
2845
|
-
msg
|
|
2846
|
-
);
|
|
2847
|
-
const formatCheck = checkImageFormatsSupport(
|
|
2848
|
-
midTurnUserMessageParts
|
|
2849
|
-
);
|
|
2850
|
-
if (formatCheck.hasUnsupportedFormats) {
|
|
2851
|
-
addItem(
|
|
2852
|
-
{
|
|
2853
|
-
type: "info" /* INFO */,
|
|
2854
|
-
text: getUnsupportedImageFormatWarning()
|
|
2855
|
-
},
|
|
2856
|
-
Date.now()
|
|
2857
|
-
);
|
|
2858
|
-
}
|
|
2859
|
-
responsesToSend.push(...midTurnUserMessageParts);
|
|
2860
|
-
config.getChatRecordingService?.()?.recordMidTurnUserMessage(midTurnUserMessageParts, msg);
|
|
2861
|
-
addItem({ type: "notification" /* NOTIFICATION */, text: msg }, Date.now());
|
|
2934
|
+
drainedSteer = await resolveDrainedSteerMessages(
|
|
2935
|
+
drained,
|
|
2936
|
+
midTurnAbort.signal
|
|
2937
|
+
);
|
|
2938
|
+
if (drainedSteer) {
|
|
2939
|
+
responsesToSend.push(...drainedSteer.parts);
|
|
2862
2940
|
}
|
|
2863
2941
|
} finally {
|
|
2864
2942
|
if (shouldTrackMidTurnAbort) {
|
|
@@ -2868,9 +2946,14 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
2868
2946
|
}
|
|
2869
2947
|
}
|
|
2870
2948
|
if (turnCancelledRef.current || abortControllerRef.current?.signal.aborted) {
|
|
2949
|
+
drainedSteer?.restore();
|
|
2871
2950
|
return;
|
|
2872
2951
|
}
|
|
2873
|
-
submitQuery(responsesToSend, "toolResult" /* ToolResult */, promptId
|
|
2952
|
+
void submitQuery(responsesToSend, "toolResult" /* ToolResult */, promptId, {
|
|
2953
|
+
steerInput: drainedSteer,
|
|
2954
|
+
onDelivered: drainedSteer?.accept,
|
|
2955
|
+
onDeliveryFailed: drainedSteer?.restore
|
|
2956
|
+
});
|
|
2874
2957
|
},
|
|
2875
2958
|
[
|
|
2876
2959
|
submitQuery,
|
|
@@ -2882,8 +2965,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
2882
2965
|
midTurnDrainRef,
|
|
2883
2966
|
addItem,
|
|
2884
2967
|
dualOutput,
|
|
2885
|
-
|
|
2886
|
-
applyVisionBridgeIfNeeded
|
|
2968
|
+
resolveDrainedSteerMessages
|
|
2887
2969
|
]
|
|
2888
2970
|
);
|
|
2889
2971
|
const pendingHistoryItems = (0, import_react5.useMemo)(
|
|
@@ -3189,7 +3271,6 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
3189
3271
|
}, "useGeminiStream");
|
|
3190
3272
|
|
|
3191
3273
|
export {
|
|
3192
|
-
prefixMidTurnUserMessageParts,
|
|
3193
3274
|
DualOutputContext,
|
|
3194
3275
|
useDualOutput,
|
|
3195
3276
|
classifyApiError,
|
|
@@ -3200,11 +3281,6 @@ export {
|
|
|
3200
3281
|
* Copyright 2025 Qwen Team
|
|
3201
3282
|
* SPDX-License-Identifier: Apache-2.0
|
|
3202
3283
|
*/
|
|
3203
|
-
/**
|
|
3204
|
-
* @license
|
|
3205
|
-
* Copyright 2026 Qwen
|
|
3206
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
3207
|
-
*/
|
|
3208
3284
|
/**
|
|
3209
3285
|
* @license
|
|
3210
3286
|
* Copyright 2025 Google LLC
|