@qwen-code/qwen-code 0.19.11-nightly.20260718.767a32484 → 0.19.11
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 +0 -11
- package/bundled/qc-helper/docs/configuration/settings.md +9 -9
- package/bundled/qc-helper/docs/features/channels/overview.md +11 -24
- package/bundled/qc-helper/docs/qwen-serve-deploy-local.md +7 -42
- package/bundled/qc-helper/docs/qwen-serve.md +40 -66
- package/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +1 -1
- package/chunks/{MaxSizedBox-ZFHA4QEQ.js → MaxSizedBox-L6TGYDM3.js} +27 -27
- package/chunks/{StandaloneSessionPicker-YRWOQVQA.js → StandaloneSessionPicker-AKEQHU5P.js} +39 -39
- package/chunks/{acpAgent-U2P2IESZ.js → acpAgent-PTNBGJDN.js} +228 -501
- package/chunks/{agent-GQXX6X5Y.js → agent-AJOMOZPJ.js} +24 -24
- package/chunks/{agent-headless-3572NBCK.js → agent-headless-CYKOMAXS.js} +24 -24
- package/chunks/{anthropicContentGenerator-Y65DMM64.js → anthropicContentGenerator-HBRXJSP4.js} +6 -29
- package/chunks/{artifact-tool-WR7I2XON.js → artifact-tool-MIZLXBLF.js} +2 -2
- package/chunks/{askUserQuestion-B4FUTPHD.js → askUserQuestion-XMJVPNWM.js} +44 -2
- package/chunks/{bridge-N5RMGD7G.js → bridge-QKISWPCI.js} +29 -29
- package/chunks/{ca-M3GQQ26D.js → ca-CODEN7TD.js} +2 -2
- package/chunks/{channel-worker-group-HZVJKLGX.js → channel-worker-group-SOUWTFHC.js} +4 -4
- package/chunks/{channel-worker-manager-3WDK4HNS.js → channel-worker-manager-LOVSV3WW.js} +4 -4
- package/chunks/{channel-worker-supervisor-U2W6Q5F7.js → channel-worker-supervisor-XW6MHJBQ.js} +3 -3
- package/chunks/{chunk-3DJY4IFO.js → chunk-2FO5GFKZ.js} +1 -1
- package/chunks/chunk-2HRYPZT5.js +25 -0
- package/chunks/{chunk-LSFVUGXT.js → chunk-2OG646IN.js} +3 -3
- package/chunks/{chunk-OSSDHJDU.js → chunk-2Z5UX4KI.js} +1 -1
- package/chunks/{chunk-O2K6BLPZ.js → chunk-3AYLDB6B.js} +1 -1
- package/chunks/{chunk-MI2V6IWU.js → chunk-3DWIFU7L.js} +1 -1
- package/chunks/{chunk-AEKYFMYE.js → chunk-3M75MSVA.js} +1 -1
- package/chunks/{chunk-HIMIG6PI.js → chunk-4AGTGMCQ.js} +11 -11
- package/chunks/{chunk-V2FRLYHN.js → chunk-4BJVSIS3.js} +2 -2
- package/chunks/{chunk-64XGKNSI.js → chunk-4HUDDSO5.js} +3 -3
- package/chunks/{chunk-FSJGBUQI.js → chunk-4IJMTYCB.js} +28 -817
- package/chunks/{chunk-TYQMGACW.js → chunk-4LD5APFL.js} +0 -1
- package/chunks/{chunk-2XRGFF5K.js → chunk-4ROQY23C.js} +6 -6
- package/chunks/{chunk-KEVDWH3U.js → chunk-574PTLMU.js} +55 -207
- package/chunks/{chunk-Y72B36CP.js → chunk-5CNYZ7TN.js} +7 -7
- package/chunks/{chunk-DPSHAB47.js → chunk-5VWYKIMW.js} +1 -1
- package/chunks/{chunk-OXOEOOQU.js → chunk-5Z452MMD.js} +37 -64
- package/chunks/{chunk-U6OPT4H2.js → chunk-6EDDYPI3.js} +4 -4
- package/chunks/{chunk-XA7OKDWM.js → chunk-6WGZDD67.js} +2 -2
- package/chunks/{chunk-IENO2YAT.js → chunk-6WPJRYLZ.js} +3 -3
- package/chunks/{chunk-PWYLF7SS.js → chunk-6Y6ORE2G.js} +10 -7
- package/chunks/{chunk-UE5TZ55T.js → chunk-7NFB7LBQ.js} +0 -8
- package/chunks/{chunk-3CL5SEDT.js → chunk-7NMU22Q3.js} +6 -6
- package/chunks/{chunk-ECZFTRTP.js → chunk-7ZYHLN67.js} +75 -26
- package/chunks/{chunk-LKR7QQ63.js → chunk-A2HWMJVO.js} +3 -3
- package/chunks/{chunk-SGPFJMRP.js → chunk-ARKANCNX.js} +1 -1
- package/chunks/{chunk-5QRK2VZG.js → chunk-AU3MFJPL.js} +8 -8
- package/chunks/{chunk-R3VWUU2E.js → chunk-AVEOWVOM.js} +1 -1
- package/chunks/{chunk-6ITLKEOZ.js → chunk-BUAXJVNP.js} +3 -3
- package/chunks/{chunk-U4FJ26D2.js → chunk-BXBDC476.js} +2 -2
- package/chunks/{chunk-ZTSDZQZO.js → chunk-BYB3GF2T.js} +3 -130
- package/chunks/{chunk-4JBTZBCW.js → chunk-BYH2JRK3.js} +5 -5
- package/chunks/{chunk-4HCYNDMG.js → chunk-CAHY5ABC.js} +1 -1
- package/chunks/{chunk-JBAQ5BYX.js → chunk-CF5VJRGC.js} +1 -1
- package/chunks/{chunk-3NWYQ7FX.js → chunk-CH2XVB47.js} +2 -2
- package/chunks/{chunk-FHUXCRAF.js → chunk-CITWNIXJ.js} +4 -4
- package/chunks/{chunk-6YIRYY3P.js → chunk-CPFIQVZJ.js} +1 -1
- package/chunks/{chunk-EKG3BHQY.js → chunk-DOPUYNXO.js} +3 -3
- package/chunks/{chunk-VNN3JNYT.js → chunk-F333XEAU.js} +1 -1
- package/chunks/{chunk-FUTHTZVV.js → chunk-FBU7WRZI.js} +1 -1
- package/chunks/{chunk-OBYAX5QZ.js → chunk-FMNYGWOD.js} +6 -6
- package/chunks/{chunk-FZRES4GK.js → chunk-FNX3LGAK.js} +1 -1
- package/chunks/{chunk-F2RR4HO2.js → chunk-FSA7ERJ2.js} +1 -1
- package/chunks/{chunk-OPVIKLKK.js → chunk-FXKOAEXP.js} +14 -14
- package/chunks/{chunk-U2XBPBO3.js → chunk-FYQ22K62.js} +3 -4
- package/chunks/{chunk-KTKETHMY.js → chunk-GLNHPRZT.js} +1 -1
- package/chunks/{chunk-C5NSOSF4.js → chunk-GNBBAQ6J.js} +13 -30
- package/chunks/{chunk-GAQOQMHY.js → chunk-HASK4LMI.js} +6 -6
- package/chunks/{chunk-GG6RSNWS.js → chunk-JD44PNGJ.js} +4 -9
- package/chunks/{chunk-ANRANWVE.js → chunk-JGUT3LWZ.js} +1 -4
- package/chunks/{chunk-336KPNNV.js → chunk-JWICTOXS.js} +2 -2
- package/chunks/{chunk-57RWF6R7.js → chunk-K7VD4XLT.js} +1 -1
- package/chunks/{chunk-XSPFQQRE.js → chunk-KKRTYONM.js} +3 -3
- package/chunks/{chunk-JDIUK2Y3.js → chunk-KSZKSE23.js} +1 -1
- package/chunks/{chunk-HQXQCIT2.js → chunk-KXYJPRT5.js} +5 -25
- package/chunks/{chunk-X6YQWCIJ.js → chunk-L4Y55KIS.js} +1 -1
- package/chunks/{chunk-335ECZTA.js → chunk-L5U3ELZX.js} +1 -1
- package/chunks/{chunk-4CHDYDG3.js → chunk-LQIDP6K5.js} +1 -1
- package/chunks/{chunk-5O34IMY5.js → chunk-LS56TX3M.js} +1 -1
- package/chunks/{chunk-HCCR43AY.js → chunk-LXLTBIDP.js} +1 -1
- package/chunks/{chunk-66IT3EY2.js → chunk-MQOVXZAF.js} +48 -164
- package/chunks/{chunk-JUVTV4NF.js → chunk-N5VIZTND.js} +1 -1
- package/chunks/{chunk-3YJZ6WNY.js → chunk-NJOFRXTM.js} +593 -1317
- package/chunks/{chunk-CZSAIBUB.js → chunk-NVTQZXR7.js} +7 -7
- package/chunks/{chunk-G274ETR6.js → chunk-OKAIGAYW.js} +3 -3
- package/chunks/{chunk-TVYM3Q3J.js → chunk-OWT2CAEQ.js} +7 -100
- package/chunks/{chunk-T3W4SDRB.js → chunk-PZL23GTM.js} +0 -2
- package/chunks/{chunk-XAAEDML2.js → chunk-Q6TUALBE.js} +1 -1
- package/chunks/chunk-QAW7PIHT.js +168 -0
- package/chunks/{chunk-HT7L5FCZ.js → chunk-QDJ2R4CM.js} +3 -3
- package/chunks/{chunk-IX7O5WI3.js → chunk-QOTQH4CB.js} +8 -23
- package/chunks/{chunk-S4N3G4BB.js → chunk-QYG4BY6Q.js} +1 -1
- package/chunks/{chunk-4XCVGEEX.js → chunk-RCEEXIOO.js} +3 -3
- package/chunks/{chunk-IK5TYYVR.js → chunk-RP5R7MB6.js} +12 -12
- package/chunks/{chunk-U2LNTX56.js → chunk-RTV5TUYB.js} +1 -1
- package/chunks/{chunk-K2GBHL73.js → chunk-S63Z5V42.js} +4 -4
- package/chunks/{chunk-J2MKYJKZ.js → chunk-SPJQO2CE.js} +2 -2
- package/chunks/{chunk-LTD3CHGS.js → chunk-SQ5BK3GO.js} +1 -1
- package/chunks/{chunk-W7H223ZZ.js → chunk-STZQCNN3.js} +1 -1
- package/chunks/{chunk-2YSZE74N.js → chunk-SY7NEYX4.js} +2 -2
- package/chunks/{chunk-GA3WUOO7.js → chunk-T76DGHGG.js} +5 -5
- package/chunks/{chunk-QPRDXJIC.js → chunk-THXDQSTA.js} +29 -30
- package/chunks/{chunk-DASWPKXR.js → chunk-TIOE2OPE.js} +2 -2
- package/chunks/{chunk-F5XYN5VF.js → chunk-TL4R5TRK.js} +2 -2
- package/chunks/{chunk-4RPARQ5D.js → chunk-TV6K2FB4.js} +2 -2
- package/chunks/{chunk-JCJPZMJV.js → chunk-TYLOFD2U.js} +1 -1
- package/chunks/{chunk-632KROVU.js → chunk-V2DXTLUE.js} +3 -3
- package/chunks/{chunk-URP6O2PP.js → chunk-VFX7EZIR.js} +1 -1
- package/chunks/{chunk-CMVFTMRD.js → chunk-VRR65QYW.js} +1 -1
- package/chunks/{chunk-VAJS2E2D.js → chunk-WIEO4CWB.js} +1 -1
- package/chunks/{chunk-OCQ2QTFJ.js → chunk-WMNXXRGL.js} +25 -25
- package/chunks/{chunk-WEPXQKGP.js → chunk-WTNZ6DXB.js} +1 -1
- package/chunks/{chunk-LGY7PG7Q.js → chunk-Y3KFTWVX.js} +5 -5
- package/chunks/{chunk-4CA4WUMS.js → chunk-Y66VOBRP.js} +2 -2
- package/chunks/{chunk-IVKLDHU6.js → chunk-YFVO2HOR.js} +4 -4
- package/chunks/{chunk-GUNTLALV.js → chunk-YGYSMY2R.js} +47 -61
- package/chunks/{chunk-3X2CFOUM.js → chunk-YLSSEUAM.js} +274 -345
- package/chunks/{chunk-6Z5NRZVU.js → chunk-ZIXOTAPZ.js} +3 -92
- package/chunks/{chunk-Z2LBNX3R.js → chunk-ZPAHLFZU.js} +2 -2
- package/chunks/{chunk-ATJ7H5AS.js → chunk-ZQIYGQCG.js} +84 -230
- package/chunks/{computer-use-UIFBH25Y.js → computer-use-VZZMJEQ7.js} +24 -24
- package/chunks/{config-utils-2LHI7JXU.js → config-utils-IQQT3GCI.js} +3 -3
- package/chunks/{contextCommand-VGZHKEH2.js → contextCommand-PORKIZSY.js} +26 -26
- package/chunks/{create-sub-session-DIJOV6HV.js → create-sub-session-EAB2U5XW.js} +2 -2
- package/chunks/{create-sub-session-OFVI4H6I.js → create-sub-session-XVFKHAFW.js} +24 -24
- package/chunks/{cron-create-34GVLSW5.js → cron-create-GMVKSXZT.js} +4 -4
- package/chunks/{cron-delete-NMVKUL45.js → cron-delete-VDZKUAVK.js} +4 -4
- package/chunks/{cron-list-277ZOR7L.js → cron-list-UG7C7RAR.js} +4 -4
- package/chunks/{daemon-72MEV3TY.js → daemon-IHR6WSPB.js} +14 -59
- package/chunks/{daemon-status-provider-ZJJ6AOG2.js → daemon-status-provider-ABLBA3UJ.js} +33 -33
- package/chunks/{de-56TMDIKS.js → de-NOXPCSYN.js} +2 -2
- package/chunks/{dist-ILVRL322.js → dist-4WCQEZIN.js} +1 -1
- package/chunks/{dist-SVHAGOLN.js → dist-DOPL5LSQ.js} +1 -1
- package/chunks/{dist-LQHDHBPP.js → dist-GXJVCOS7.js} +1 -1
- package/chunks/{dist-KEZ5JWH4.js → dist-PX2ERZ6I.js} +2 -2
- package/chunks/{dist-G6QCGO2K.js → dist-V2YVLYOW.js} +1 -1
- package/chunks/{dist-4W3UGU2A.js → dist-VYWUKURL.js} +1 -1
- package/chunks/{earlyInputCapture-NPF4PVUE.js → earlyInputCapture-DJCU5SPU.js} +25 -25
- package/chunks/{edit-F7CT6NZH.js → edit-O4VV5AO6.js} +25 -25
- package/chunks/{en-AXS2N62H.js → en-JFVULHTB.js} +3 -6
- package/chunks/{enter-worktree-Z4ET3MZL.js → enter-worktree-XQYDDI2I.js} +24 -24
- package/chunks/{enterPlanMode-VYR7T5NX.js → enterPlanMode-CESVMQBV.js} +27 -25
- package/chunks/{environment-MBTXL57Q.js → environment-5KXOLZNR.js} +26 -26
- package/chunks/{errors-HN36J4FR.js → errors-EBUTCBAQ.js} +26 -26
- package/chunks/{exit-worktree-RU7JYFMF.js → exit-worktree-MWGNSPNX.js} +24 -24
- package/chunks/exitPlanMode-HYQL4XMB.js +909 -0
- package/chunks/{fast-path-RFT3CDNZ.js → fast-path-6V73F2T2.js} +2 -2
- package/chunks/{fr-ZJPE5OVN.js → fr-HVFNU42H.js} +2 -2
- package/chunks/{gemini-37NTNKZF.js → gemini-TEFJZCIZ.js} +70 -98
- package/chunks/{geminiContentGenerator-76HNOYNQ.js → geminiContentGenerator-M56BEXWI.js} +5 -5
- package/chunks/{glob-DWD7JCZE.js → glob-DMYFEEAZ.js} +25 -30
- package/chunks/{grep-NJRXFV5C.js → grep-GYE47MD4.js} +25 -30
- package/chunks/{handleAutoUpdate-7GBDXW6U.js → handleAutoUpdate-OLUY4L7L.js} +28 -28
- package/chunks/{i18n-MYD5VGED.js → i18n-462JC7IY.js} +25 -25
- package/chunks/{initializer-4DHPNAZG.js → initializer-Y7WD4D2I.js} +30 -30
- package/chunks/{installationInfo-RWOW6BZO.js → installationInfo-I2Z3BKCE.js} +25 -25
- package/chunks/{ja-57GG4QSL.js → ja-PY5AF544.js} +2 -2
- package/chunks/{keychain-token-storage-K23CFKGN.js → keychain-token-storage-AU22CQI6.js} +2 -2
- package/chunks/{list-MMCNNHE7.js → list-XQ5MSAXP.js} +32 -32
- package/chunks/{loadedSettingsAdapter-UK4JWPYU.js → loadedSettingsAdapter-TQOWYE7C.js} +29 -29
- package/chunks/{loop-wakeup-KCLY4XQM.js → loop-wakeup-QXWZSCYM.js} +5 -5
- package/chunks/{ls-UNI4LAJ3.js → ls-2OUTG3IZ.js} +4 -4
- package/chunks/{lsp-HPACPJAN.js → lsp-4VMNXZW6.js} +2 -2
- package/chunks/{mcp-AFCVA4UV.js → mcp-22LLEEVM.js} +29 -29
- package/chunks/{monitor-RK637BNO.js → monitor-VKG324X3.js} +24 -24
- package/chunks/nonInteractiveCli-UMYUT643.js +129 -0
- package/chunks/{notebook-edit-LY2X3CMF.js → notebook-edit-FJJRBQ3S.js} +25 -25
- package/chunks/{openaiContentGenerator-MDYDW7IA.js → openaiContentGenerator-4T2OGTR5.js} +13 -13
- package/chunks/{pidfile-2NUYRLKB.js → pidfile-XL3MDCBM.js} +25 -25
- package/chunks/{processUtils-7QH3VBVN.js → processUtils-7UCFN34D.js} +2 -2
- package/chunks/{pt-MCGZ3RZ4.js → pt-A3PRQXMU.js} +2 -2
- package/chunks/{qwenContentGenerator-3HT4TVDL.js → qwenContentGenerator-PQUXJDIZ.js} +26 -26
- package/chunks/{qwenOAuth2-3A4TJVZT.js → qwenOAuth2-LEYOU7RU.js} +5 -5
- package/chunks/{read-file-NE4FREFR.js → read-file-3EYQML7E.js} +10 -10
- package/chunks/{read-mcp-resource-C6NT52T6.js → read-mcp-resource-JUFHCKSC.js} +2 -2
- package/chunks/{record-artifact-ENCU7QCL.js → record-artifact-DWSMBXYY.js} +2 -2
- package/chunks/{ripGrep-DBLXWQCJ.js → ripGrep-S6WPGQNA.js} +24 -24
- package/chunks/{ru-GA3NZW5Q.js → ru-IBCWUTOC.js} +2 -2
- package/chunks/{run-qwen-serve-3NOCI6IL.js → run-qwen-serve-NSKBT3HU.js} +36 -52
- package/chunks/{runtime-ZI7DSZSS.js → runtime-LG5ZZ3VH.js} +33 -33
- package/chunks/{scheduler-SOVEP5K7.js → scheduler-PLX3VVTB.js} +24 -24
- package/chunks/{send-message-5IFPZTPE.js → send-message-JZ752NWD.js} +3 -3
- package/chunks/{serve-DB6OCXIA.js → serve-S2ZLRZZR.js} +29 -29
- package/chunks/{server-LDY4YVU4.js → server-5ECMV4TM.js} +679 -1413
- package/chunks/{session-D6OG5SKX.js → session-ILSONWG4.js} +66 -93
- package/chunks/{settings-L52ZV5LO.js → settings-BOE7WWSA.js} +28 -28
- package/chunks/{shell-IU27OY3Q.js → shell-VW664JIZ.js} +24 -24
- package/chunks/{skill-BSOJT7LE.js → skill-COHV6625.js} +12 -12
- package/chunks/{spawnChannel-HQAM25DD.js → spawnChannel-5UUR5XOZ.js} +26 -26
- package/chunks/{src-7ZBIMTJZ.js → src-XPKFZ3RN.js} +25 -43
- package/chunks/{standalone-update-77457VVK.js → standalone-update-IOOJ2NZQ.js} +26 -26
- package/chunks/{startInteractiveUI-S7WC6EZG.js → startInteractiveUI-3NGJGXXS.js} +1733 -2194
- package/chunks/{syntheticOutput-ULOVVLY4.js → syntheticOutput-LELY6HAI.js} +3 -3
- package/chunks/{task-create-V2DCDSET.js → task-create-QY3BIMNM.js} +7 -7
- package/chunks/{task-list-DPL5ZN55.js → task-list-D2U47WBJ.js} +5 -5
- package/chunks/{task-stop-CPEQWOT6.js → task-stop-N6E5IYLH.js} +2 -2
- package/chunks/{task-update-ZR45M5Q7.js → task-update-HJCQILLB.js} +7 -7
- package/chunks/{team-create-CO7HSUON.js → team-create-UPLVZQFX.js} +24 -24
- package/chunks/{team-delete-HIWXCWJU.js → team-delete-RCWYDRF4.js} +5 -5
- package/chunks/{team-plan-approval-QDZF5YZY.js → team-plan-approval-F5F432RO.js} +24 -24
- package/chunks/{theme-manager-UTUT3I4P.js → theme-manager-JJE4BJ67.js} +25 -25
- package/chunks/todoWrite-FKCGATPJ.js +531 -0
- package/chunks/{tool-search-2UUORA35.js → tool-search-LRXI4JLZ.js} +11 -11
- package/chunks/{total-session-admission-NTWG6G3F.js → total-session-admission-I4DHN6UP.js} +30 -30
- package/chunks/{trustedFolders-YF37ZCN5.js → trustedFolders-SEH7LNX2.js} +25 -25
- package/chunks/{update-relaunch-QFNHPMZZ.js → update-relaunch-T6ZKBUA6.js} +5 -5
- package/chunks/{updateCheck-B6O42VMD.js → updateCheck-FWLXZPRO.js} +26 -26
- package/chunks/{validateNonInterActiveAuth-SCIWJ4CX.js → validateNonInterActiveAuth-X6K2VWYT.js} +59 -59
- package/chunks/{version-7DA6LAI3.js → version-LIFSOGSE.js} +1 -1
- package/chunks/{web-fetch-B62SJXM2.js → web-fetch-CFCWTCAP.js} +5 -5
- package/chunks/{workflow-Q5WG4THP.js → workflow-NX2DFWGD.js} +25 -25
- package/chunks/{workspace-providers-status-WWLAGWQW.js → workspace-providers-status-VYD6M2NE.js} +32 -32
- package/chunks/{workspace-registration-store-BVYQVY2H.js → workspace-registration-store-2Y6PWOEL.js} +1 -1
- package/chunks/{workspace-registry-OD7ACADD.js → workspace-registry-PKBDBWCA.js} +30 -30
- package/chunks/{workspace-service-4LYJWS63.js → workspace-service-HHORUHTS.js} +35 -35
- package/chunks/{workspace-skills-status-P2AQLZZS.js → workspace-skills-status-O5Q26LIY.js} +30 -30
- package/chunks/{write-file-TEPGXNM3.js → write-file-NVAEZ3J2.js} +25 -58
- package/chunks/{zh-E34DZ2S3.js → zh-PAUNIMHQ.js} +3 -6
- package/chunks/{zh-TW-PEI2ZWUR.js → zh-TW-GNEUIUFF.js} +3 -6
- package/cli.js +11 -11
- package/locales/ca.js +2 -2
- package/locales/de.js +2 -2
- package/locales/en.js +5 -9
- package/locales/fr.js +2 -2
- package/locales/ja.js +2 -2
- package/locales/pt.js +2 -2
- package/locales/ru.js +2 -2
- package/locales/zh-TW.js +3 -8
- package/locales/zh.js +3 -8
- package/package.json +3 -3
- package/web-shell/assets/{arc-Dh-N5oEG.js → arc-H74fE8UR.js} +1 -1
- package/web-shell/assets/{architectureDiagram-3BPJPVTR-DBOQgtfF.js → architectureDiagram-3BPJPVTR-DN3kEq-I.js} +1 -1
- package/web-shell/assets/{blockDiagram-GPEHLZMM-Dyxbuyju.js → blockDiagram-GPEHLZMM-BrqbsFUF.js} +1 -1
- package/web-shell/assets/{c4Diagram-AAUBKEIU-DCJR5HPT.js → c4Diagram-AAUBKEIU-ClFhU1P-.js} +1 -1
- package/web-shell/assets/channel-NFC5ADAa.js +1 -0
- package/web-shell/assets/{chunk-2J33WTMH-BkMUcy3O.js → chunk-2J33WTMH-jCIcG0_M.js} +1 -1
- package/web-shell/assets/{chunk-4BX2VUAB-BSm4pLQk.js → chunk-4BX2VUAB-DSkGe62-.js} +1 -1
- package/web-shell/assets/{chunk-55IACEB6-CuRr-XgW.js → chunk-55IACEB6-BxBHOGTd.js} +1 -1
- package/web-shell/assets/{chunk-727SXJPM-CLv7-w3t.js → chunk-727SXJPM-v_DS7dH7.js} +1 -1
- package/web-shell/assets/{chunk-AQP2D5EJ-Cz_n3-JW.js → chunk-AQP2D5EJ-1RzEKRPq.js} +1 -1
- package/web-shell/assets/{chunk-FMBD7UC4-CFT_62Hq.js → chunk-FMBD7UC4-DyrSbLOX.js} +1 -1
- package/web-shell/assets/{chunk-ND2GUHAM-DWz6DOZ6.js → chunk-ND2GUHAM-BCmdsZiy.js} +1 -1
- package/web-shell/assets/{chunk-QZHKN3VN-C-mRhUzw.js → chunk-QZHKN3VN-CphHGW2D.js} +1 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-DHgwjz3X.js +1 -0
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-DHgwjz3X.js +1 -0
- package/web-shell/assets/{cose-bilkent-S5V4N54A-BqCZS3i1.js → cose-bilkent-S5V4N54A-D5kRC7Fi.js} +1 -1
- package/web-shell/assets/{dagre-BM42HDAG-BGasdP8i.js → dagre-BM42HDAG-DIiyJJ0U.js} +1 -1
- package/web-shell/assets/{diagram-2AECGRRQ-BSyLDkMy.js → diagram-2AECGRRQ-BOcuB8xU.js} +1 -1
- package/web-shell/assets/{diagram-5GNKFQAL-CM-ZJxWC.js → diagram-5GNKFQAL-CMgiZ4d3.js} +1 -1
- package/web-shell/assets/{diagram-KO2AKTUF-wJdzt_C5.js → diagram-KO2AKTUF-Ctx8pfN0.js} +1 -1
- package/web-shell/assets/{diagram-LMA3HP47-DiH2fhpL.js → diagram-LMA3HP47-BT5REAWC.js} +1 -1
- package/web-shell/assets/{diagram-OG6HWLK6-BZ9z1ZBl.js → diagram-OG6HWLK6-CJkUqXcp.js} +1 -1
- package/web-shell/assets/{erDiagram-TEJ5UH35-BsyWDziR.js → erDiagram-TEJ5UH35-DyvNNX6v.js} +1 -1
- package/web-shell/assets/{flowDiagram-I6XJVG4X-CzdkxIrq.js → flowDiagram-I6XJVG4X-VBf8_My8.js} +1 -1
- package/web-shell/assets/{ganttDiagram-6RSMTGT7-javIv2r2.js → ganttDiagram-6RSMTGT7-CviJnR7B.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-PVQCEYII-CjHstylC.js → gitGraphDiagram-PVQCEYII-BY66_Oze.js} +1 -1
- package/web-shell/assets/index-8xIBbHV3.js +1143 -0
- package/web-shell/assets/index-DLyhlZZO.css +5 -0
- package/web-shell/assets/{index-BnJGxpah.js → index-DhYuvi3j.js} +1 -1
- package/web-shell/assets/{infoDiagram-5YYISTIA-yXuQsomo.js → infoDiagram-5YYISTIA-D2jaewWZ.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-a85JhE6F.js → ishikawaDiagram-YF4QCWOH-BpnNTyi5.js} +1 -1
- package/web-shell/assets/{journeyDiagram-JHISSGLW-Dak_4BVj.js → journeyDiagram-JHISSGLW-CA55GNZF.js} +1 -1
- package/web-shell/assets/{kanban-definition-UN3LZRKU-COA-LuCV.js → kanban-definition-UN3LZRKU-DyiSl_Ts.js} +1 -1
- package/web-shell/assets/{linear-DNAAAQWq.js → linear-B-sN3dkV.js} +1 -1
- package/web-shell/assets/{mermaid.core-7Ff3aIUD.js → mermaid.core-xf9SXDdb.js} +5 -5
- package/web-shell/assets/{mindmap-definition-RKZ34NQL-_rCOIODU.js → mindmap-definition-RKZ34NQL-DXhr2kRk.js} +1 -1
- package/web-shell/assets/{pieDiagram-4H26LBE5-C9QCQ8EW.js → pieDiagram-4H26LBE5-DUXpbfGQ.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-W4KKPZXB-CsaE4FA8.js → quadrantDiagram-W4KKPZXB-NeDQYeWw.js} +1 -1
- package/web-shell/assets/{requirementDiagram-4Y6WPE33-tV78naTg.js → requirementDiagram-4Y6WPE33-BSbFRL1A.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-5OEKKPKP-Dk3Rw7BZ.js → sankeyDiagram-5OEKKPKP-gg27cAaN.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-3UESZ5HK-BGsAWcMX.js → sequenceDiagram-3UESZ5HK-Bi_1TSs4.js} +1 -1
- package/web-shell/assets/{stateDiagram-AJRCARHV-zSxdtdoB.js → stateDiagram-AJRCARHV-CboCCRaf.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-CXRqms6P.js +1 -0
- package/web-shell/assets/{timeline-definition-PNZ67QCA-j0BQh9Go.js → timeline-definition-PNZ67QCA-DrGpF_jn.js} +1 -1
- package/web-shell/assets/{vennDiagram-CIIHVFJN-CRaUFFIu.js → vennDiagram-CIIHVFJN-DCaJU67x.js} +1 -1
- package/web-shell/assets/{wardley-L42UT6IY-D7Py_ofm.js → wardley-L42UT6IY-p0QcW1aP.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-YWT4CUSO-BrDIAZcp.js → wardleyDiagram-YWT4CUSO-DiEVxj1W.js} +1 -1
- package/web-shell/assets/{xychartDiagram-2RQKCTM6-Cecdw-w2.js → xychartDiagram-2RQKCTM6-iQB8nSlA.js} +1 -1
- package/web-shell/index.html +2 -2
- package/chunks/chunk-QFEY6OXH.js +0 -45
- package/chunks/exitPlanMode-LUBAWMZQ.js +0 -390
- package/chunks/nonInteractiveCli-OUGWLHNV.js +0 -129
- package/chunks/todoWrite-HK6B3RHJ.js +0 -358
- package/web-shell/assets/channel-DY0fkcKT.js +0 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-DBvJ6PZo.js +0 -1
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-DBvJ6PZo.js +0 -1
- package/web-shell/assets/index-DhXB9nTa.js +0 -1161
- package/web-shell/assets/index-vYHgZ7bL.css +0 -5
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-vLEEtDpO.js +0 -1
|
@@ -4,49 +4,44 @@ import {
|
|
|
4
4
|
handleAtCommand,
|
|
5
5
|
resolveAtCommandQuery,
|
|
6
6
|
sanitizeDisplayText
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-HASK4LMI.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-THXDQSTA.js";
|
|
15
15
|
import {
|
|
16
|
-
findLastSafeSplitPoint,
|
|
17
16
|
fitPendingSlice,
|
|
18
|
-
getEnclosingFenceInfo,
|
|
19
|
-
splitFencedMarkdown,
|
|
20
17
|
useSessionStats
|
|
21
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-BYB3GF2T.js";
|
|
22
19
|
import {
|
|
23
20
|
SHELL_COMMAND_NAME,
|
|
24
21
|
isCollapsibleTool
|
|
25
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-NVTQZXR7.js";
|
|
26
23
|
import {
|
|
27
24
|
require_react
|
|
28
25
|
} from "./chunk-HTHUX2T5.js";
|
|
29
26
|
import {
|
|
30
27
|
themeManager
|
|
31
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-Q6TUALBE.js";
|
|
32
29
|
import {
|
|
33
30
|
formatMemoryUsage
|
|
34
31
|
} from "./chunk-E5Z2AVNV.js";
|
|
35
32
|
import {
|
|
36
33
|
isInlineModelOverrideAllowed
|
|
37
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-ZIXOTAPZ.js";
|
|
38
35
|
import {
|
|
39
36
|
t
|
|
40
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-4AGTGMCQ.js";
|
|
41
38
|
import {
|
|
42
39
|
AutonomousLoopTickResolver,
|
|
43
40
|
CoreToolScheduler,
|
|
44
41
|
ShellExecutionService,
|
|
45
42
|
activeGoalEquals,
|
|
46
|
-
clampInlineMediaPart,
|
|
47
43
|
clearActiveGoal,
|
|
48
44
|
compactToolResultDisplayForHistory,
|
|
49
|
-
convertToFunctionErrorResponse,
|
|
50
45
|
createDuplicateProviderToolCallResponse,
|
|
51
46
|
detectAutonomousSentinel,
|
|
52
47
|
findRepeatedDuplicateProviderToolCall,
|
|
@@ -59,15 +54,13 @@ import {
|
|
|
59
54
|
promptIdContext,
|
|
60
55
|
refreshMemoryAfterManagedWrite,
|
|
61
56
|
setActiveGoal
|
|
62
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-NJOFRXTM.js";
|
|
63
58
|
import {
|
|
64
59
|
ApiCancelEvent,
|
|
65
60
|
ConversationFinishedEvent,
|
|
66
61
|
UserPromptEvent,
|
|
67
62
|
UserRetryEvent,
|
|
68
|
-
formatFullTurnVisionNotice,
|
|
69
63
|
formatVisionBridgeNotice,
|
|
70
|
-
getFullTurnVisionModelSelector,
|
|
71
64
|
hasImageParts,
|
|
72
65
|
logApiCancel,
|
|
73
66
|
logConversationFinishedEvent,
|
|
@@ -76,27 +69,27 @@ import {
|
|
|
76
69
|
runVisionBridge,
|
|
77
70
|
shouldRunVisionBridge,
|
|
78
71
|
splitImageParts
|
|
79
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-MQOVXZAF.js";
|
|
80
73
|
import {
|
|
81
74
|
isAnyAutoMemPath
|
|
82
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-FBU7WRZI.js";
|
|
83
76
|
import {
|
|
84
77
|
ToolNames,
|
|
85
78
|
isShellProgressData
|
|
86
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-JGUT3LWZ.js";
|
|
87
80
|
import {
|
|
88
81
|
getUnsupportedImageFormatWarning,
|
|
89
82
|
isSupportedImageMimeType
|
|
90
83
|
} from "./chunk-FEOZBUMT.js";
|
|
91
84
|
import {
|
|
92
85
|
FinishReason
|
|
93
|
-
} from "./chunk-
|
|
86
|
+
} from "./chunk-4LD5APFL.js";
|
|
94
87
|
import {
|
|
95
88
|
UnauthorizedError,
|
|
96
89
|
createDebugLogger,
|
|
97
90
|
getErrorMessage,
|
|
98
91
|
isNodeError
|
|
99
|
-
} from "./chunk-
|
|
92
|
+
} from "./chunk-7NFB7LBQ.js";
|
|
100
93
|
import {
|
|
101
94
|
init_esbuild_shims
|
|
102
95
|
} from "./chunk-5O2XNYP6.js";
|
|
@@ -114,6 +107,31 @@ function useDualOutput() {
|
|
|
114
107
|
}
|
|
115
108
|
__name(useDualOutput, "useDualOutput");
|
|
116
109
|
|
|
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
|
+
|
|
117
135
|
// packages/cli/src/ui/hooks/useGeminiStream.ts
|
|
118
136
|
init_esbuild_shims();
|
|
119
137
|
var import_react5 = __toESM(require_react(), 1);
|
|
@@ -406,6 +424,103 @@ ${finalOutput}`;
|
|
|
406
424
|
return { handleShellCommand, activeShellPtyId };
|
|
407
425
|
}, "useShellCommandProcessor");
|
|
408
426
|
|
|
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
|
+
|
|
409
524
|
// packages/cli/src/ui/hooks/useStateAndRef.ts
|
|
410
525
|
init_esbuild_shims();
|
|
411
526
|
var import_react3 = __toESM(require_react(), 1);
|
|
@@ -506,60 +621,10 @@ function useReactToolScheduler(onComplete, config, getPreferredEditor, onEditorC
|
|
|
506
621
|
]
|
|
507
622
|
);
|
|
508
623
|
const schedule = (0, import_react4.useCallback)(
|
|
509
|
-
(request, signal
|
|
510
|
-
|
|
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
|
-
})();
|
|
624
|
+
(request, signal) => {
|
|
625
|
+
void scheduler.schedule(request, signal);
|
|
561
626
|
},
|
|
562
|
-
[
|
|
627
|
+
[scheduler]
|
|
563
628
|
);
|
|
564
629
|
const markToolsAsSubmitted = (0, import_react4.useCallback)(
|
|
565
630
|
(callIdsToMark) => {
|
|
@@ -892,7 +957,7 @@ function charIndexAfterLine(text, keptLines) {
|
|
|
892
957
|
return -1;
|
|
893
958
|
}
|
|
894
959
|
__name(charIndexAfterLine, "charIndexAfterLine");
|
|
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
|
|
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) => {
|
|
896
961
|
const [initError, setInitError] = (0, import_react5.useState)(null);
|
|
897
962
|
const abortControllerRef = (0, import_react5.useRef)(null);
|
|
898
963
|
const flushBufferedStreamEventsRef = (0, import_react5.useRef)(/* @__PURE__ */ new Set());
|
|
@@ -1176,45 +1241,10 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
1176
1241
|
]);
|
|
1177
1242
|
const applyVisionBridgeIfNeeded = (0, import_react5.useCallback)(
|
|
1178
1243
|
async (parts, timestamp, signal) => {
|
|
1179
|
-
if (parts === null || !hasImageParts(parts)) {
|
|
1180
|
-
return { parts, shouldProceed: true };
|
|
1181
|
-
}
|
|
1182
|
-
if (modelOverrideRef.current?.endsWith("\0")) {
|
|
1183
|
-
return { parts, shouldProceed: true };
|
|
1184
|
-
}
|
|
1185
|
-
if (inlineModelOverrideActiveRef.current) {
|
|
1244
|
+
if (parts === null || !hasImageParts(parts) || !shouldRunVisionBridge(config)) {
|
|
1186
1245
|
return { parts, shouldProceed: true };
|
|
1187
1246
|
}
|
|
1188
|
-
if (!shouldRunVisionBridge(config)) {
|
|
1189
|
-
return { parts, shouldProceed: true };
|
|
1190
|
-
}
|
|
1191
|
-
if (signal.aborted) {
|
|
1192
|
-
return { parts: null, shouldProceed: false };
|
|
1193
|
-
}
|
|
1194
1247
|
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
|
-
}
|
|
1218
1248
|
const bridgeResult = await runVisionBridge({ config, parts, signal });
|
|
1219
1249
|
debugLogger3.debug(
|
|
1220
1250
|
`vision bridge: status=${bridgeResult.status} applied=${bridgeResult.applied} model=${bridgeResult.modelId ?? "(none)"}`
|
|
@@ -1300,15 +1330,6 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
1300
1330
|
);
|
|
1301
1331
|
}
|
|
1302
1332
|
}
|
|
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;
|
|
1312
1333
|
return {
|
|
1313
1334
|
queryToSend: localQueryToSendToGemini,
|
|
1314
1335
|
shouldProceed: true
|
|
@@ -1420,10 +1441,8 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
1420
1441
|
STREAM_PENDING_ITEM_MAX_CHARS
|
|
1421
1442
|
);
|
|
1422
1443
|
const safeSplitPoint = splitPoint > 0 && splitPoint < newGeminiMessageBuffer.length ? splitPoint : STREAM_PENDING_ITEM_MAX_CHARS;
|
|
1423
|
-
const
|
|
1424
|
-
|
|
1425
|
-
safeSplitPoint
|
|
1426
|
-
);
|
|
1444
|
+
const beforeText = newGeminiMessageBuffer.substring(0, safeSplitPoint);
|
|
1445
|
+
const afterText = newGeminiMessageBuffer.substring(safeSplitPoint);
|
|
1427
1446
|
commitItem(
|
|
1428
1447
|
{
|
|
1429
1448
|
type: nextPendingType,
|
|
@@ -1457,21 +1476,12 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
1457
1476
|
break;
|
|
1458
1477
|
}
|
|
1459
1478
|
}
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
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
|
-
}
|
|
1479
|
+
if (boundaryLine < 0) break;
|
|
1480
|
+
const target = charIndexAfterLine(
|
|
1481
|
+
newGeminiMessageBuffer,
|
|
1482
|
+
boundaryLine + 1
|
|
1483
|
+
);
|
|
1484
|
+
if (target <= 0) break;
|
|
1475
1485
|
const splitPoint = findLastSafeSplitPoint(
|
|
1476
1486
|
newGeminiMessageBuffer,
|
|
1477
1487
|
target
|
|
@@ -1479,10 +1489,8 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
1479
1489
|
if (splitPoint <= 0 || splitPoint >= newGeminiMessageBuffer.length) {
|
|
1480
1490
|
break;
|
|
1481
1491
|
}
|
|
1482
|
-
const
|
|
1483
|
-
|
|
1484
|
-
splitPoint
|
|
1485
|
-
);
|
|
1492
|
+
const beforeText = newGeminiMessageBuffer.substring(0, splitPoint);
|
|
1493
|
+
const afterText = newGeminiMessageBuffer.substring(splitPoint);
|
|
1486
1494
|
commitItem(
|
|
1487
1495
|
{
|
|
1488
1496
|
type: nextPendingType,
|
|
@@ -1584,10 +1592,8 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
1584
1592
|
);
|
|
1585
1593
|
while (newThoughtBuffer.length > STREAM_PENDING_ITEM_MAX_CHARS) {
|
|
1586
1594
|
const safeSplitPoint = splitPoint > 0 && splitPoint < newThoughtBuffer.length ? splitPoint : STREAM_PENDING_ITEM_MAX_CHARS;
|
|
1587
|
-
const
|
|
1588
|
-
|
|
1589
|
-
safeSplitPoint
|
|
1590
|
-
);
|
|
1595
|
+
const beforeText = newThoughtBuffer.substring(0, safeSplitPoint);
|
|
1596
|
+
const afterText = newThoughtBuffer.substring(safeSplitPoint);
|
|
1591
1597
|
addItem(
|
|
1592
1598
|
buildThoughtItem(pendingThoughtType, beforeText),
|
|
1593
1599
|
userMessageTimestamp
|
|
@@ -2206,11 +2212,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
2206
2212
|
}
|
|
2207
2213
|
}
|
|
2208
2214
|
if (executableToolCallRequests.length > 0) {
|
|
2209
|
-
scheduleToolCalls(
|
|
2210
|
-
executableToolCallRequests,
|
|
2211
|
-
signal,
|
|
2212
|
-
modelOverrideRef.current
|
|
2213
|
-
);
|
|
2215
|
+
scheduleToolCalls(executableToolCallRequests, signal);
|
|
2214
2216
|
}
|
|
2215
2217
|
}
|
|
2216
2218
|
return 0 /* Completed */;
|
|
@@ -2242,185 +2244,20 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
2242
2244
|
dualOutput
|
|
2243
2245
|
]
|
|
2244
2246
|
);
|
|
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
|
-
);
|
|
2409
2247
|
const submitQuery = (0, import_react5.useCallback)(
|
|
2410
2248
|
async (query, submitType = "userQuery" /* UserQuery */, prompt_id, metadata) => {
|
|
2411
2249
|
const allowConcurrentBtwDuringResponse = submitType === "userQuery" /* UserQuery */ && streamingState === "responding" /* Responding */ && typeof query === "string" && isBtwCommand(query);
|
|
2412
|
-
|
|
2413
|
-
if (isSubmittingQueryRef.current && !isTurnContinuation && !allowConcurrentBtwDuringResponse) {
|
|
2250
|
+
if (isSubmittingQueryRef.current && submitType !== "toolResult" /* ToolResult */ && !allowConcurrentBtwDuringResponse) {
|
|
2414
2251
|
metadata?.onDeliveryFailed?.();
|
|
2415
2252
|
return;
|
|
2416
2253
|
}
|
|
2417
|
-
if ((streamingState === "responding" /* Responding */ || streamingState === "waiting_for_confirmation" /* WaitingForConfirmation */) &&
|
|
2254
|
+
if ((streamingState === "responding" /* Responding */ || streamingState === "waiting_for_confirmation" /* WaitingForConfirmation */) && submitType !== "toolResult" /* ToolResult */ && !allowConcurrentBtwDuringResponse) {
|
|
2418
2255
|
metadata?.onDeliveryFailed?.();
|
|
2419
2256
|
return;
|
|
2420
2257
|
}
|
|
2421
2258
|
isSubmittingQueryRef.current = true;
|
|
2422
2259
|
loopDetectedRef.current = false;
|
|
2423
|
-
if (
|
|
2260
|
+
if (submitType !== "toolResult" /* ToolResult */ && !allowConcurrentBtwDuringResponse) {
|
|
2424
2261
|
lastTurnUserItemRef.current = null;
|
|
2425
2262
|
turnSawContentEventRef.current = false;
|
|
2426
2263
|
handledProviderToolCallIdsRef.current.clear();
|
|
@@ -2429,7 +2266,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
2429
2266
|
immediateDuplicateToolResponsesRef.current = null;
|
|
2430
2267
|
}
|
|
2431
2268
|
const userMessageTimestamp = Date.now();
|
|
2432
|
-
if (
|
|
2269
|
+
if (submitType !== "toolResult" /* ToolResult */ && !allowConcurrentBtwDuringResponse) {
|
|
2433
2270
|
setModelSwitchedFromQuotaError(false);
|
|
2434
2271
|
const droppingInlineOverrideOnRetry = submitType === "retry" /* Retry */ && inlineModelOverrideActiveRef.current;
|
|
2435
2272
|
if (submitType !== "retry" /* Retry */ || inlineModelOverrideActiveRef.current) {
|
|
@@ -2514,7 +2351,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
2514
2351
|
setIsResponding(true);
|
|
2515
2352
|
setInitError(null);
|
|
2516
2353
|
setIsReceivingContent(false);
|
|
2517
|
-
if (
|
|
2354
|
+
if (submitType !== "toolResult" /* ToolResult */) {
|
|
2518
2355
|
streamingResponseLengthRef.current = 0;
|
|
2519
2356
|
}
|
|
2520
2357
|
try {
|
|
@@ -2532,9 +2369,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
2532
2369
|
{
|
|
2533
2370
|
type: submitType,
|
|
2534
2371
|
notificationDisplayText: metadata?.notificationDisplayText,
|
|
2535
|
-
modelOverride: modelOverrideRef.current
|
|
2536
|
-
steerInput: metadata?.steerInput,
|
|
2537
|
-
...!allowConcurrentBtwDuringResponse && midTurnDrainRef ? { getSteerInput: drainSteerAtBoundary } : {}
|
|
2372
|
+
modelOverride: modelOverrideRef.current
|
|
2538
2373
|
}
|
|
2539
2374
|
);
|
|
2540
2375
|
const processingStatus = await processGeminiStreamEvents(
|
|
@@ -2564,8 +2399,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
2564
2399
|
if (retryCountdownTimerRef.current) {
|
|
2565
2400
|
clearRetryCountdown();
|
|
2566
2401
|
}
|
|
2567
|
-
|
|
2568
|
-
if (loopDetected) {
|
|
2402
|
+
if (loopDetectedRef.current) {
|
|
2569
2403
|
loopDetectedRef.current = false;
|
|
2570
2404
|
handleLoopDetectedEvent();
|
|
2571
2405
|
}
|
|
@@ -2648,9 +2482,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
2648
2482
|
pendingRetryErrorItemRef,
|
|
2649
2483
|
setPendingRetryErrorItem,
|
|
2650
2484
|
setPendingThoughtItem,
|
|
2651
|
-
dualOutput
|
|
2652
|
-
drainSteerAtBoundary,
|
|
2653
|
-
midTurnDrainRef
|
|
2485
|
+
dualOutput
|
|
2654
2486
|
]
|
|
2655
2487
|
);
|
|
2656
2488
|
const retryLastPrompt = (0, import_react5.useCallback)(async () => {
|
|
@@ -2844,11 +2676,11 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
2844
2676
|
const promptId = prompt_ids[0] ?? pendingDuplicatePromptId;
|
|
2845
2677
|
for (const toolCall of geminiTools) {
|
|
2846
2678
|
if ("modelOverride" in toolCall.response) {
|
|
2847
|
-
if (inlineModelOverrideActiveRef.current
|
|
2679
|
+
if (inlineModelOverrideActiveRef.current) {
|
|
2848
2680
|
debugLogger3.debug(
|
|
2849
2681
|
`skill-tool model override (${String(
|
|
2850
2682
|
toolCall.response.modelOverride
|
|
2851
|
-
)}) blocked:
|
|
2683
|
+
)}) blocked: inline override active`
|
|
2852
2684
|
);
|
|
2853
2685
|
} else {
|
|
2854
2686
|
applyModelOverride(
|
|
@@ -2918,20 +2750,115 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
2918
2750
|
return;
|
|
2919
2751
|
}
|
|
2920
2752
|
const drained = turnCancelledRef.current || abortControllerRef.current?.signal.aborted ? [] : midTurnDrainRef?.current?.() ?? [];
|
|
2921
|
-
let drainedSteer;
|
|
2922
2753
|
if (drained.length > 0) {
|
|
2754
|
+
const midTurnTimestamp = Date.now();
|
|
2923
2755
|
const midTurnAbort = abortControllerRef.current ?? new AbortController();
|
|
2924
2756
|
const shouldTrackMidTurnAbort = !abortControllerRef.current;
|
|
2925
2757
|
if (shouldTrackMidTurnAbort) {
|
|
2926
2758
|
auxiliaryAbortRefsRef.current.add(midTurnAbort);
|
|
2927
2759
|
}
|
|
2928
2760
|
try {
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2761
|
+
for (let index = 0; index < drained.length; index += 1) {
|
|
2762
|
+
if (midTurnAbort.signal.aborted) {
|
|
2763
|
+
break;
|
|
2764
|
+
}
|
|
2765
|
+
const msg = drained[index];
|
|
2766
|
+
let resolvedMidTurnQuery = [{ text: msg }];
|
|
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());
|
|
2935
2862
|
}
|
|
2936
2863
|
} finally {
|
|
2937
2864
|
if (shouldTrackMidTurnAbort) {
|
|
@@ -2941,14 +2868,9 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
2941
2868
|
}
|
|
2942
2869
|
}
|
|
2943
2870
|
if (turnCancelledRef.current || abortControllerRef.current?.signal.aborted) {
|
|
2944
|
-
drainedSteer?.restore();
|
|
2945
2871
|
return;
|
|
2946
2872
|
}
|
|
2947
|
-
|
|
2948
|
-
steerInput: drainedSteer,
|
|
2949
|
-
onDelivered: drainedSteer?.accept,
|
|
2950
|
-
onDeliveryFailed: drainedSteer?.restore
|
|
2951
|
-
});
|
|
2873
|
+
submitQuery(responsesToSend, "toolResult" /* ToolResult */, promptId);
|
|
2952
2874
|
},
|
|
2953
2875
|
[
|
|
2954
2876
|
submitQuery,
|
|
@@ -2960,7 +2882,8 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
2960
2882
|
midTurnDrainRef,
|
|
2961
2883
|
addItem,
|
|
2962
2884
|
dualOutput,
|
|
2963
|
-
|
|
2885
|
+
onDebugMessage,
|
|
2886
|
+
applyVisionBridgeIfNeeded
|
|
2964
2887
|
]
|
|
2965
2888
|
);
|
|
2966
2889
|
const pendingHistoryItems = (0, import_react5.useMemo)(
|
|
@@ -3266,6 +3189,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
3266
3189
|
}, "useGeminiStream");
|
|
3267
3190
|
|
|
3268
3191
|
export {
|
|
3192
|
+
prefixMidTurnUserMessageParts,
|
|
3269
3193
|
DualOutputContext,
|
|
3270
3194
|
useDualOutput,
|
|
3271
3195
|
classifyApiError,
|
|
@@ -3276,6 +3200,11 @@ export {
|
|
|
3276
3200
|
* Copyright 2025 Qwen Team
|
|
3277
3201
|
* SPDX-License-Identifier: Apache-2.0
|
|
3278
3202
|
*/
|
|
3203
|
+
/**
|
|
3204
|
+
* @license
|
|
3205
|
+
* Copyright 2026 Qwen
|
|
3206
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
3207
|
+
*/
|
|
3279
3208
|
/**
|
|
3280
3209
|
* @license
|
|
3281
3210
|
* Copyright 2025 Google LLC
|