@qwen-code/qwen-code 0.22.2 → 0.22.3
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/computer-use/SKILL.md +3 -3
- package/bundled/qc-helper/docs/configuration/settings.md +37 -36
- package/bundled/qc-helper/docs/features/channels/dws.md +2 -0
- package/bundled/qc-helper/docs/features/channels/overview.md +34 -3
- package/bundled/qc-helper/docs/features/code-review.md +3 -3
- package/bundled/qc-helper/docs/features/computer-use.md +2 -2
- package/bundled/qc-helper/docs/features/tool-use-summaries.md +1 -1
- package/bundled/qc-helper/docs/qwen-serve.md +1 -1
- package/bundled/review/SKILL.md +81 -31
- package/bundled/review/references/persistence.md +7 -3
- package/bundled/review/references/posting.md +10 -4
- package/chunks/{MaxSizedBox-X5FZSNAJ.js → MaxSizedBox-X42SXBJH.js} +33 -35
- package/chunks/{StandaloneSessionPicker-AVLI6VJP.js → StandaloneSessionPicker-2FJAOLGG.js} +51 -53
- package/chunks/{acpAgent-MXEAN54C.js → acpAgent-2ZMIJAFV.js} +268 -186
- package/chunks/{agent-PJIPDWHB.js → agent-X5WX3L2I.js} +24 -26
- package/chunks/{agent-headless-B4JVD7UK.js → agent-headless-IZM25LJA.js} +24 -26
- package/chunks/{anthropicContentGenerator-HGMBACVE.js → anthropicContentGenerator-YVTB6QX7.js} +43 -47
- package/chunks/{artifact-tool-5YT4QF7Y.js → artifact-tool-XSMPHZBT.js} +9 -1
- package/chunks/{bridge-FKZTVIS3.js → bridge-ME6QXZNA.js} +37 -39
- package/chunks/{channel-management-service-X4AZ6IXX.js → channel-management-service-HQ6KDS7C.js} +6 -6
- package/chunks/{channel-settings-store-4UFCLBBG.js → channel-settings-store-PEOI7XCG.js} +47 -44
- package/chunks/{channel-worker-group-27HMGD5S.js → channel-worker-group-6NA6BBZV.js} +5 -5
- package/chunks/{channel-worker-manager-QEGX646Z.js → channel-worker-manager-NEZ2J6RK.js} +5 -5
- package/chunks/{channel-worker-supervisor-UEW2WWCC.js → channel-worker-supervisor-FKU7DIHJ.js} +4 -4
- package/chunks/{chunk-P5GGM4KS.js → chunk-2HYKTO7V.js} +3 -3
- package/chunks/{chunk-XDFHY4R3.js → chunk-2LNNVAUV.js} +2 -2
- package/chunks/{chunk-ZFKOCECU.js → chunk-2OBKDPZZ.js} +2 -2
- package/chunks/{chunk-3DXFGHAJ.js → chunk-2OUD5T67.js} +1 -1
- package/chunks/{chunk-EOGELB3H.js → chunk-2SXSLSQE.js} +1 -1
- package/chunks/{chunk-4JWNNLPT.js → chunk-2YOHKHYR.js} +2 -2
- package/chunks/{chunk-JU4EEXC7.js → chunk-36GSQ3MM.js} +2 -2
- package/chunks/chunk-36LGBEM6.js +130 -0
- package/chunks/{chunk-H2WDGQ6D.js → chunk-3JXM2CVW.js} +1 -1
- package/chunks/{chunk-G34IR3D6.js → chunk-3SZC4VP4.js} +26 -109
- package/chunks/{chunk-HVEYF6VT.js → chunk-3WK3QDNV.js} +1 -1
- package/chunks/{chunk-5XBFCMWD.js → chunk-3XKLXHGK.js} +17 -9
- package/chunks/{chunk-SFPGAQUL.js → chunk-42IDLQWS.js} +24 -18
- package/chunks/{chunk-43GGFFLY.js → chunk-4K7KNVWH.js} +1 -1
- package/chunks/{chunk-F6FV3C5K.js → chunk-4NDLQAY2.js} +24 -272
- package/chunks/{chunk-VVW4ZNFY.js → chunk-4QHPPXK2.js} +15 -7
- package/chunks/{chunk-IJKTMLBE.js → chunk-4TT3IVGA.js} +1 -1
- package/chunks/{chunk-C6K43ZDE.js → chunk-4VPCTGH6.js} +5 -5
- package/chunks/chunk-4VQBQLIZ.js +293 -0
- package/chunks/{chunk-OIVXBW3W.js → chunk-62GQFYID.js} +1 -1
- package/chunks/{chunk-BRVWYMKV.js → chunk-6MBXY6WM.js} +1 -1
- package/chunks/{chunk-AGR5UROZ.js → chunk-6X7EU5TI.js} +17 -29
- package/chunks/{chunk-PFCQ62V4.js → chunk-6ZPDLGHN.js} +6 -6
- package/chunks/{chunk-RIEFGNTP.js → chunk-734C6JGI.js} +207 -43
- package/chunks/{chunk-FBSSIAAQ.js → chunk-73RM4POK.js} +7 -7
- package/chunks/{chunk-KGJGEEVR.js → chunk-7FA2II6K.js} +10 -1
- package/chunks/chunk-7J6OTNGO.js +424 -0
- package/chunks/{chunk-O2UN57NX.js → chunk-7LOELM2I.js} +19 -2
- package/chunks/{chunk-DIMEPKCW.js → chunk-7S226YTK.js} +1 -1
- package/chunks/{chunk-CPGJJJLU.js → chunk-7T52W4SW.js} +1 -1
- package/chunks/{chunk-5O72BNDD.js → chunk-7VMIMAVB.js} +7 -7
- package/chunks/{chunk-XRSOI3DL.js → chunk-A3LWD5MK.js} +1 -1
- package/chunks/{chunk-F7TNAPZ4.js → chunk-AIAOIFY4.js} +5 -5
- package/chunks/{chunk-4CDSK5AZ.js → chunk-AYFA7MZV.js} +2 -2
- package/chunks/{chunk-3JGZSIDA.js → chunk-B466ZSHZ.js} +1 -1
- package/chunks/{chunk-L6BZRIUL.js → chunk-B5PHIJGI.js} +182 -4
- package/chunks/{chunk-3I6UTTDX.js → chunk-BKWNKLZB.js} +19 -19
- package/chunks/{chunk-3FDFA4MZ.js → chunk-BOWFGCEU.js} +1 -1
- package/chunks/{chunk-3AFMQUTI.js → chunk-C2X7KY45.js} +1 -1
- package/chunks/{chunk-FY76G3G5.js → chunk-C3PEFRKD.js} +4 -4
- package/chunks/{chunk-FDY5RMGH.js → chunk-CFJY4DGX.js} +1 -1
- package/chunks/{chunk-CCBZDVUA.js → chunk-CIZCL2MW.js} +33 -20
- package/chunks/{chunk-LDP5OD6N.js → chunk-CLWO3B77.js} +2 -2
- package/chunks/chunk-DJBQCO2E.js +842 -0
- package/chunks/{chunk-4J657AJR.js → chunk-DJECZIJX.js} +40 -40
- package/chunks/{chunk-F5SZP77N.js → chunk-DJEZ55D4.js} +71 -65
- package/chunks/{chunk-BAJKAAOY.js → chunk-DJPASAUV.js} +3840 -1055
- package/chunks/{chunk-RUGNCYNO.js → chunk-DMLVSW7L.js} +532 -22
- package/chunks/{chunk-4FTKQNWJ.js → chunk-DYXFD5RO.js} +181 -2
- package/chunks/{chunk-PDMJ3KGS.js → chunk-EB6QRGHM.js} +1 -1
- package/chunks/{chunk-DZWPESIF.js → chunk-EFWRMA2I.js} +3 -3
- package/chunks/{chunk-4MQEPP3Y.js → chunk-EQSBPBZ3.js} +5 -119
- package/chunks/{chunk-Z7TGYN5F.js → chunk-FROAFEFB.js} +2 -2
- package/chunks/{chunk-MZS7GEC7.js → chunk-FTF2YIZ5.js} +1 -1
- package/chunks/{chunk-Z7VOMGDC.js → chunk-FTJMWDND.js} +0 -24
- package/chunks/{chunk-43UYNAWX.js → chunk-G6FECKTJ.js} +2 -2
- package/chunks/{chunk-SJ3ZUWFK.js → chunk-GBJBJ4HX.js} +4 -4
- package/chunks/{chunk-IOPCFOTF.js → chunk-GPGU4S2N.js} +2 -2
- package/chunks/{chunk-6LFJEACX.js → chunk-GVIVASYK.js} +7 -7
- package/chunks/{chunk-Z4X5MTRT.js → chunk-HCOBAG2L.js} +2 -4
- package/chunks/{chunk-A7YP63XN.js → chunk-HP5LR5HL.js} +5 -5
- package/chunks/{chunk-7JPW6IYH.js → chunk-HVC3PNVC.js} +1 -1
- package/chunks/{chunk-TRZTNIQ6.js → chunk-I6LYRJPB.js} +2 -2
- package/chunks/{chunk-E55H6BZ7.js → chunk-ICURCKIU.js} +1335 -119
- package/chunks/{chunk-4HV6HH33.js → chunk-ISKH4QX3.js} +9 -9
- package/chunks/{chunk-WKK5BQNP.js → chunk-JHYH6PYQ.js} +43 -420
- package/chunks/{chunk-6IUNAPLR.js → chunk-K5KXUXWC.js} +1 -1
- package/chunks/{chunk-JHS74YAB.js → chunk-KID24ZFN.js} +1 -1
- package/chunks/{chunk-EFUM7RVY.js → chunk-KJO2LBUK.js} +942 -16
- package/chunks/{chunk-B7CDU2SL.js → chunk-KYWTPLBJ.js} +17 -20
- package/chunks/{chunk-JSHHYW6T.js → chunk-LHBUKJG2.js} +3 -3
- package/chunks/{chunk-P2SU6ZTI.js → chunk-LUEHOUHM.js} +1 -1
- package/chunks/{chunk-66KDY3LV.js → chunk-M3QRM3DE.js} +1 -1
- package/chunks/{chunk-V4QXXQJ2.js → chunk-MF7HCQWZ.js} +2 -2
- package/chunks/{chunk-W5MJJ2V7.js → chunk-MK2GIB46.js} +1 -1
- package/chunks/{chunk-Y6LSMB6J.js → chunk-MO3FC2WT.js} +1 -1
- package/chunks/{chunk-L6YT5H34.js → chunk-MPNBVAEU.js} +4 -4
- package/chunks/{chunk-CSMI4FP5.js → chunk-MSBO7X2W.js} +1 -1
- package/chunks/{chunk-5PA6UEYA.js → chunk-MZCJWS5Y.js} +1 -1
- package/chunks/{chunk-BGXZBI5B.js → chunk-N4X7G4J2.js} +2 -1
- package/chunks/{chunk-6LFTG244.js → chunk-NMOD2FXQ.js} +15 -5
- package/chunks/{chunk-KUX5D6DK.js → chunk-NV55WWD6.js} +11330 -10971
- package/chunks/{chunk-Q26AYA62.js → chunk-OU5APVWO.js} +2 -2
- package/chunks/{chunk-2K6ORIHJ.js → chunk-P2G476QN.js} +11 -11
- package/chunks/{chunk-OIP7C4FE.js → chunk-PADPMMYM.js} +4 -4
- package/chunks/{chunk-SAH4BD2J.js → chunk-PQEISIKS.js} +67 -0
- package/chunks/{chunk-TGWAQ5RB.js → chunk-PZ66FRIC.js} +2071 -2124
- package/chunks/{chunk-7UYV53BC.js → chunk-Q2MSPKIJ.js} +1 -1
- package/chunks/{chunk-L2M46FP5.js → chunk-QYMAKPY5.js} +5 -5
- package/chunks/{chunk-JVPFTDBK.js → chunk-RFIDDFAL.js} +1 -1
- package/chunks/chunk-SEONHUS3.js +275 -0
- package/chunks/{chunk-ZGXYO7DY.js → chunk-SS4MRMKE.js} +122 -13
- package/chunks/{chunk-T32W2JHI.js → chunk-SS5SDCD3.js} +2 -2
- package/chunks/{chunk-3SGB2UHX.js → chunk-ST5MDGH3.js} +23 -11
- package/chunks/{chunk-MIIVI25Q.js → chunk-ST5V3ZOC.js} +2 -2
- package/chunks/{chunk-4K7NQDCG.js → chunk-T4EFG2P5.js} +18 -9
- package/chunks/{chunk-TWSKM647.js → chunk-T7KMERIX.js} +1 -1
- package/chunks/{chunk-77RG5SFQ.js → chunk-TEBDFQBZ.js} +1 -1
- package/chunks/{chunk-6CGL7E7G.js → chunk-TVC6HQ2U.js} +2 -2
- package/chunks/{chunk-BBWV7ONL.js → chunk-TZBSGJ6C.js} +6 -6
- package/chunks/{chunk-T3WXYEZ4.js → chunk-U54AYGEC.js} +38 -5
- package/chunks/{chunk-JCQD3INC.js → chunk-URE3QBBB.js} +1 -1
- package/chunks/{chunk-Y3QL45LS.js → chunk-V4264FEG.js} +8 -8
- package/chunks/{chunk-KEKZFOL6.js → chunk-V7EESTJV.js} +1 -1
- package/chunks/{chunk-R4PMVSR5.js → chunk-VBCPNIQD.js} +18 -20
- package/chunks/{chunk-RJC5EIKY.js → chunk-VGIFXISB.js} +3 -3
- package/chunks/{chunk-Z7FLBQPR.js → chunk-W3JH33JE.js} +7 -7
- package/chunks/{chunk-K2NQPH5D.js → chunk-WGY3AVGM.js} +3 -3
- package/chunks/{chunk-PKAYJDB3.js → chunk-WNPDGUJO.js} +21 -2
- package/chunks/{chunk-IZIVM7LZ.js → chunk-WXEA74YB.js} +1 -1
- package/chunks/{chunk-YRLW2MSX.js → chunk-XBVNNDPK.js} +11 -4
- package/chunks/{chunk-IK5BW3CS.js → chunk-XHF7WQ6B.js} +2 -2
- package/chunks/{chunk-2NYCN6F2.js → chunk-XSG6G3G6.js} +43 -26
- package/chunks/{chunk-HVQ3B7FF.js → chunk-Y5S7LBOZ.js} +43 -6
- package/chunks/{chunk-LXIBMVRN.js → chunk-YLSQLSH7.js} +13 -7
- package/chunks/{chunk-JSC3H3TD.js → chunk-ZEYFMJQA.js} +14 -6
- package/chunks/chunk-ZWJDJ6RU.js +2597 -0
- package/chunks/{chunk-QP4C6WCE.js → chunk-ZYMLPEZQ.js} +2 -2
- package/chunks/{chunk-BNMF3K5X.js → chunk-ZZMSC3RG.js} +52 -36
- package/chunks/{chunk-XDLEZ5HX.js → chunk-ZZUKP7HV.js} +1 -1
- package/chunks/{config-utils-BBOCOGZW.js → config-utils-R6M3TA34.js} +39 -39
- package/chunks/{contextCommand-EET67MQ2.js → contextCommand-ZCAP23J6.js} +36 -38
- package/chunks/{core-runtime-677KFX6Q.js → core-runtime-AXB6SK5D.js} +41 -43
- package/chunks/{create-sub-session-JKZAYZX7.js → create-sub-session-4QNE64MR.js} +34 -36
- package/chunks/{daemon-MJQUO7RA.js → daemon-3GNHB3M2.js} +495 -7
- package/chunks/{daemon-git-worktree-guard-6MVAAZZZ.js → daemon-git-worktree-guard-IVAJJWYK.js} +33 -35
- package/chunks/{daemon-status-provider-RFKZOK3S.js → daemon-status-provider-K3SJ5C2U.js} +42 -44
- package/chunks/{daemon-trust-policy-DRZPFB4Q.js → daemon-trust-policy-DOR3YG62.js} +41 -43
- package/chunks/{daemon-trust-policy-monitor-B5U6TQX5.js → daemon-trust-policy-monitor-KGGROSIV.js} +41 -43
- package/chunks/{deferred-core-runtime-BBVIOP24.js → deferred-core-runtime-WOYLUQQ7.js} +33 -35
- package/chunks/{dist-DJBNNPLN.js → dist-4WXLCBDR.js} +1 -1
- package/chunks/{dist-TJUDJTCB.js → dist-5VXFRTWU.js} +280 -48
- package/chunks/{dist-QODVOVWI.js → dist-6BPYWHVD.js} +31 -30
- package/chunks/{dist-ZBVOXSKF.js → dist-GFN5DCBX.js} +74 -65
- package/chunks/{dist-SATKXKUR.js → dist-HZNT6GQS.js} +1 -1
- package/chunks/{dist-ILDBUWDB.js → dist-LVZCXVPF.js} +1 -1
- package/chunks/{dist-7CKN54NL.js → dist-N6W6E753.js} +71 -64
- package/chunks/{dist-4Q7NTUNB.js → dist-NSV4NBPK.js} +31 -14
- package/chunks/{dist-UQUFZDIY.js → dist-SWQMYP2Q.js} +18 -16
- package/chunks/{earlyInputCapture-2JOMMNQ4.js → earlyInputCapture-OHBEVO4K.js} +33 -35
- package/chunks/{edit-BSV6YRVW.js → edit-LEQLAGPZ.js} +24 -26
- package/chunks/{enter-worktree-MQXFFPKM.js → enter-worktree-35QCAAFP.js} +3 -3
- package/chunks/{enterPlanMode-PKNF35FE.js → enterPlanMode-ONQN3WHE.js} +27 -29
- package/chunks/{environment-MOZMPUHR.js → environment-UANTR7A4.js} +37 -39
- package/chunks/{errors-DMPQVYJL.js → errors-WAK6KFBC.js} +36 -38
- package/chunks/{exit-worktree-L344UY7K.js → exit-worktree-XQD6D543.js} +3 -3
- package/chunks/{exitPlanMode-UE4FGCY4.js → exitPlanMode-UEYBG6P5.js} +24 -26
- package/chunks/{fast-path-773PV7PU.js → fast-path-WUL7UZ6H.js} +4 -4
- package/chunks/{fast-path-settings-XMFBYFUH.js → fast-path-settings-XH426LUU.js} +3 -3
- package/chunks/{glob-CZHOWUEA.js → glob-Y54QUWDY.js} +24 -26
- package/chunks/{goal-tools-YZQJXTGH.js → goal-tools-PTD3MBA7.js} +2 -1
- package/chunks/{handleAutoUpdate-SGXKTQM6.js → handleAutoUpdate-FP3NWNSG.js} +37 -39
- package/chunks/{i18n-B42HKHKH.js → i18n-INIU5X7A.js} +35 -37
- package/chunks/{image-gen-HAYOEQ4O.js → image-gen-J6FDGUZP.js} +4 -6
- package/chunks/{initializer-FB66WYR3.js → initializer-TYODV6GE.js} +41 -43
- package/chunks/{installationInfo-Y7AULNMX.js → installationInfo-AAPKYDSZ.js} +33 -35
- package/chunks/{list-2HWGSVRA.js → list-TUODDN6J.js} +44 -46
- package/chunks/{gemini-IP4FJAP5.js → llm-NSAVK5V3.js} +84 -82
- package/chunks/{geminiContentGenerator-PUNEBWJW.js → llm-content-generator-AY2QKXHE.js} +25 -25
- package/chunks/{loadedSettingsAdapter-7Y7IEI6T.js → loadedSettingsAdapter-KJCLZ3C4.js} +41 -43
- package/chunks/{loggingContentGenerator-2GGZNGLG.js → loggingContentGenerator-DSFQHXIF.js} +305 -27
- package/chunks/{managed-npm-update-5TEV2E3J.js → managed-npm-update-TSWENTK5.js} +33 -35
- package/chunks/{mcp-QGG5NMJJ.js → mcp-MWSAPFOL.js} +41 -43
- package/chunks/{monitor-FI7PY36Z.js → monitor-RW4GWJHB.js} +24 -26
- package/chunks/{nonInteractiveCli-4LO2TL72.js → nonInteractiveCli-JXKL343Q.js} +77 -78
- package/chunks/{notebook-edit-TPGMGBST.js → notebook-edit-CQNYS5OR.js} +24 -26
- package/chunks/{open-with-auth-4UI3KHUR.js → open-with-auth-YN3QZHVM.js} +1 -1
- package/chunks/{openaiContentGenerator-SUCYANUZ.js → openaiContentGenerator-J6QIF7EX.js} +13 -15
- package/chunks/{pidfile-JMF2CLMY.js → pidfile-QOIQZFT2.js} +33 -35
- package/chunks/process-registry-OAEG6WGC.js +662 -0
- package/chunks/{processUtils-IQZBYWSB.js → processUtils-GPHNANKZ.js} +2 -2
- package/chunks/{prompt-terminal-ledger-DCZO6S7C.js → prompt-terminal-ledger-FOMFTYOM.js} +34 -36
- package/chunks/{qwenContentGenerator-J4TXFGJT.js → qwenContentGenerator-WWDXPYQI.js} +28 -30
- package/chunks/{qwenOAuth2-RF33DNZW.js → qwenOAuth2-OF5WRBQT.js} +4 -6
- package/chunks/{read-file-QE2B5FTX.js → read-file-FQUQHC6N.js} +5 -5
- package/chunks/{record-artifact-RZGZBENU.js → record-artifact-VW23GS4F.js} +2 -2
- package/chunks/{report-findings-Q3SYKKW5.js → report-findings-AO5VYFLR.js} +7 -3
- package/chunks/{resumeHistoryUtils-CZ4JRDVW.js → resumeHistoryUtils-NSGF3UCB.js} +37 -39
- package/chunks/{ripGrep-R6B6HWPX.js → ripGrep-4CAT6SKV.js} +7 -7
- package/chunks/{run-qwen-serve-TPHZMSXJ.js → run-qwen-serve-5X6IDZER.js} +271 -86
- package/chunks/{runtime-TTIGSBM4.js → runtime-HK27GMPF.js} +46 -48
- package/chunks/{scheduled-tasks-QB4ZVUQS.js → scheduled-tasks-MN2ZZ5P6.js} +39 -41
- package/chunks/{scheduler-YRUG22M7.js → scheduler-WD4MHMO5.js} +35 -37
- package/chunks/{sdk-exporters-http-KCJ4ZFG7.js → sdk-exporters-http-TTU2CHBU.js} +1 -1
- package/chunks/{sdk-impl-HLSEDAEP.js → sdk-impl-UUMVYMAL.js} +10 -4
- package/chunks/{send-message-Y5I6NYAM.js → send-message-AJ4OCUBV.js} +18 -2
- package/chunks/{serve-MXXCDAQN.js → serve-2XCHPPGG.js} +41 -43
- package/chunks/{server-DFUSSSHI.js → server-GO2N5DH7.js} +4148 -3348
- package/chunks/{session-3TEHNENZ.js → session-IFNHTUBT.js} +81 -82
- package/chunks/session-pr-refresh-I3UBWMVP.js +364 -0
- package/chunks/{settings-VOZYKLTT.js → settings-L6N54CU6.js} +40 -42
- package/chunks/{shell-6RTKZVMI.js → shell-4Y5LLW6N.js} +24 -26
- package/chunks/{skill-FEOKFX26.js → skill-YOWTRAKQ.js} +58 -14
- package/chunks/{skill-settings-VA4XVYVL.js → skill-settings-ZL4JY5UE.js} +41 -43
- package/chunks/{spawnChannel-F6WVP723.js → spawnChannel-ZST6XJVJ.js} +35 -37
- package/chunks/{standalone-update-RGILUQVK.js → standalone-update-THVU3OKY.js} +36 -38
- package/chunks/{startInteractiveUI-WHJPFOGH.js → startInteractiveUI-XDFSHBZD.js} +401 -334
- package/chunks/{stdioHelpers-7A2EE64Z.js → stdioHelpers-AY6XCDY2.js} +3 -1
- package/chunks/{task-create-TMSV7RD5.js → task-create-QN4LYRSE.js} +3 -3
- package/chunks/{task-list-W55RBFRX.js → task-list-JPLGK45U.js} +2 -2
- package/chunks/{task-update-N536I4GQ.js → task-update-IWEOJFV2.js} +3 -3
- package/chunks/{team-create-QYSWCYCL.js → team-create-OOPXCDBA.js} +24 -26
- package/chunks/{team-delete-FJRFX33M.js → team-delete-RZVVSGCY.js} +2 -2
- package/chunks/{team-plan-approval-P7DAD644.js → team-plan-approval-DSX5EWAT.js} +24 -26
- package/chunks/{terminal-image-renderer-SMQE46UJ.js → terminal-image-renderer-KS25G33E.js} +33 -35
- package/chunks/{theme-manager-RFO5WWFF.js → theme-manager-YMZNG45F.js} +33 -35
- package/chunks/{tool-search-F2EMIAPV.js → tool-search-J5Q6U7DN.js} +9 -9
- package/chunks/{total-session-admission-HTVTP4BS.js → total-session-admission-PVN64JVV.js} +37 -39
- package/chunks/{trustedFolders-7OCNMUQE.js → trustedFolders-FATSC4YI.js} +35 -37
- package/chunks/{types-WYCFCEHR.js → types-HKLPXZB3.js} +1 -3
- package/chunks/{update-relaunch-4GF3OXMB.js → update-relaunch-SIKHLHVR.js} +6 -6
- package/chunks/{updateCheck-7QBDXZRT.js → updateCheck-D3YG2WCD.js} +36 -38
- package/chunks/{useAutoAcceptIndicator-UI4SNL2O.js → useAutoAcceptIndicator-ILINOSAS.js} +43 -45
- package/chunks/{validateNonInterActiveAuth-BPPA563H.js → validateNonInterActiveAuth-JUDQP6V4.js} +74 -75
- package/chunks/{version-ANP4TS6O.js → version-C63GDDWN.js} +1 -1
- package/chunks/{web-fetch-QJADSAH3.js → web-fetch-FOQZMNSC.js} +8 -10
- package/chunks/{web-search-7TTQKEKM.js → web-search-PUJTBFUC.js} +5 -7
- package/chunks/{web-shell-static-A6QMUNNV.js → web-shell-static-HNB4FDOE.js} +2 -2
- package/chunks/{workflow-5XN6XSOT.js → workflow-Y5IPINVH.js} +47 -58
- package/chunks/{workspace-providers-status-PDFZWL5Q.js → workspace-providers-status-IJ4VHFMB.js} +45 -47
- package/chunks/{workspace-registration-store-XKVW2YVH.js → workspace-registration-store-SMJWI2AI.js} +1 -1
- package/chunks/{workspace-registry-23R7XRB5.js → workspace-registry-BTGZIMPK.js} +37 -39
- package/chunks/{workspace-service-MUYO2QIC.js → workspace-service-SIN67ITC.js} +46 -51
- package/chunks/{workspace-skills-status-IKECTOOQ.js → workspace-skills-status-F3RKCUIX.js} +44 -46
- package/chunks/{workspace-trust-reconciler-KLGOB53D.js → workspace-trust-reconciler-PLIDLJZX.js} +45 -47
- package/chunks/{write-file-GGRBB5TZ.js → write-file-PAIGB33C.js} +26 -28
- package/chunks/{zoom-image-6ASG6J4C.js → zoom-image-LYQD7BQA.js} +5 -5
- package/cli.js +14 -14
- package/package.json +3 -3
- package/web-shell/assets/{abnfDiagram-VCTEODGH-uS-vtfs3.js → abnfDiagram-VCTEODGH-TRCMSA_6.js} +1 -1
- package/web-shell/assets/{arc-BSTnk5pu.js → arc-D9Uls5b3.js} +1 -1
- package/web-shell/assets/{architectureDiagram-5GKGNRK7-DCMyiqzy.js → architectureDiagram-5GKGNRK7-Bwb8jPXg.js} +1 -1
- package/web-shell/assets/{blockDiagram-NRAW4CY4-C7_gt0r1.js → blockDiagram-NRAW4CY4-DHj71TSX.js} +1 -1
- package/web-shell/assets/{c4Diagram-UCG6FXSJ-BeQg2L8B.js → c4Diagram-UCG6FXSJ-uKBBdbyr.js} +1 -1
- package/web-shell/assets/channel-CXjVLaBa.js +1 -0
- package/web-shell/assets/{chunk-2Q5K7J3B-DnV9bKBe.js → chunk-2Q5K7J3B-BZd0Phrl.js} +1 -1
- package/web-shell/assets/{chunk-5VM5RSS4-rT1GAcT7.js → chunk-5VM5RSS4-7KNeNBqN.js} +1 -1
- package/web-shell/assets/{chunk-F27PBJKO-BcgSxqGA.js → chunk-F27PBJKO-BeboS7Fi.js} +1 -1
- package/web-shell/assets/{chunk-G27WJ6UU-Bw1ZhyZq.js → chunk-G27WJ6UU-RV3JONoj.js} +1 -1
- package/web-shell/assets/{chunk-JWPE2WC7-D4iDw-96.js → chunk-JWPE2WC7-Yw9FCFsP.js} +1 -1
- package/web-shell/assets/{chunk-LCL6LL3I-D3MB3GTZ.js → chunk-LCL6LL3I-GIMnydDe.js} +1 -1
- package/web-shell/assets/{chunk-POPQ4Y6H-Cep2ndrS.js → chunk-POPQ4Y6H-Cfrux7bL.js} +1 -1
- package/web-shell/assets/{chunk-SVP7TREG-BuahMHJc.js → chunk-SVP7TREG-BlvIN0CO.js} +1 -1
- package/web-shell/assets/{chunk-XXDRQBXY-BdujIvJY.js → chunk-XXDRQBXY-DMs7Rr4t.js} +1 -1
- package/web-shell/assets/classDiagram-DTDB5LWJ-DANEijO3.js +1 -0
- package/web-shell/assets/classDiagram-v2-JRS7N3AN-DANEijO3.js +1 -0
- package/web-shell/assets/{cose-bilkent-JH36ORCC-CGLLUbF8.js → cose-bilkent-JH36ORCC-DNGqTNwI.js} +1 -1
- package/web-shell/assets/{cynefin-OW5HDTMX-D6kDsRSh.js → cynefin-OW5HDTMX-CojMpaoH.js} +1 -1
- package/web-shell/assets/{cynefinDiagram-5FMLGOSQ-CCy78qZx.js → cynefinDiagram-5FMLGOSQ-DF07YXGo.js} +1 -1
- package/web-shell/assets/{dagre-3AP2YEHR-D5gJuJsf.js → dagre-3AP2YEHR-17-4WtCH.js} +1 -1
- package/web-shell/assets/{diagram-S7CK7UJ4-ZwEZ5W__.js → diagram-S7CK7UJ4-G3Wuyz9m.js} +1 -1
- package/web-shell/assets/{diagram-UQ7AKVKN-B036APjv.js → diagram-UQ7AKVKN-nyWIKZ8P.js} +1 -1
- package/web-shell/assets/{diagram-VSXAHHWV-BfDJ57Fq.js → diagram-VSXAHHWV-tKHhmYSC.js} +1 -1
- package/web-shell/assets/{diagram-VX7I27RA-Wha0p5rT.js → diagram-VX7I27RA-CpDf1hYk.js} +1 -1
- package/web-shell/assets/{diagram-Z3DM3KII-L20bz2K1.js → diagram-Z3DM3KII-Cah2IFXG.js} +1 -1
- package/web-shell/assets/{ebnfDiagram-PWID7BFC-D1ZM0Cp7.js → ebnfDiagram-PWID7BFC-DNaCkgxy.js} +1 -1
- package/web-shell/assets/{erDiagram-SSCWMZ5O-CMtA19v8.js → erDiagram-SSCWMZ5O-CAdRgcf1.js} +1 -1
- package/web-shell/assets/{flowDiagram-A5DVABFB-D96m326S.js → flowDiagram-A5DVABFB-CMUJAShL.js} +1 -1
- package/web-shell/assets/{ganttDiagram-EL5Y4UJY-BuHiYG2o.js → ganttDiagram-EL5Y4UJY-o-_MUNey.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-WWUBYQGX-Ck3NmkSw.js → gitGraphDiagram-WWUBYQGX-_aG-2Z7O.js} +1 -1
- package/web-shell/assets/{index-CBGz4Qjl.js → index-BK_NKxiJ.js} +1 -1
- package/web-shell/assets/index-Ci-z4zWY.js +1913 -0
- package/web-shell/assets/index-LDlXZRHA.css +36 -0
- package/web-shell/assets/{infoDiagram-RXCK75RN-B6DAOyXe.js → infoDiagram-RXCK75RN-qJPeZbGP.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-5VMMS53U-Bpg-joFo.js → ishikawaDiagram-5VMMS53U-7Om4vNo1.js} +1 -1
- package/web-shell/assets/{journeyDiagram-EYS64GPL-BclrHzGa.js → journeyDiagram-EYS64GPL-BNtXqmBW.js} +1 -1
- package/web-shell/assets/{kanban-definition-3QL26DDD-5gJzNTYG.js → kanban-definition-3QL26DDD-COgFec8P.js} +1 -1
- package/web-shell/assets/{layout-CEz_1L8z.js → layout-B9n81PC9.js} +1 -1
- package/web-shell/assets/{linear-CBjTq9Hc.js → linear-Bb6nXZQq.js} +1 -1
- package/web-shell/assets/{mermaid.core-Dzhbxx_I.js → mermaid.core-Cgrm3JVT.js} +6 -6
- package/web-shell/assets/{mindmap-definition-FBJOCRG2-DQdVqlBF.js → mindmap-definition-FBJOCRG2-TKwLTjnG.js} +1 -1
- package/web-shell/assets/{pegDiagram-XKGWAZYB-D1JZlYXL.js → pegDiagram-XKGWAZYB-BJPuvlpi.js} +1 -1
- package/web-shell/assets/{pieDiagram-E7YTZNPT-BmkpYL0w.js → pieDiagram-E7YTZNPT-D01VkNsW.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-AXDQQJYC-DRvD6co5.js → quadrantDiagram-AXDQQJYC-C4hHsiv-.js} +1 -1
- package/web-shell/assets/{railroadDiagram-O6MQD6OU-CEdjDuoo.js → railroadDiagram-O6MQD6OU-CuEO4xK2.js} +1 -1
- package/web-shell/assets/{requirementDiagram-EFPCY7ZU-BCHG-ie8.js → requirementDiagram-EFPCY7ZU-D5J_vIo5.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-P5KCCOFB-C9cZMnye.js → sankeyDiagram-P5KCCOFB-DQKY223V.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-WJ2MYXX4-DYHRV4zL.js → sequenceDiagram-WJ2MYXX4-D27YV_cm.js} +1 -1
- package/web-shell/assets/{sizeCapture-X5ZJPWSS-DlK21aye.js → sizeCapture-X5ZJPWSS-TJg8UcwV.js} +1 -1
- package/web-shell/assets/{stateDiagram-HBIQ2CUA-BrmZssvk.js → stateDiagram-HBIQ2CUA-CmnPzUIx.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-4QOOHH4V-DNKPyrDc.js +1 -0
- package/web-shell/assets/{swimlanes-XN3QIQJK-D9xfcayR.js → swimlanes-XN3QIQJK-ByeP3_Nu.js} +1 -1
- package/web-shell/assets/swimlanesDiagram-VK2B7HYN-ZL1HPC6w.js +8 -0
- package/web-shell/assets/{timeline-definition-24CTP7MA-D4gdDL_d.js → timeline-definition-24CTP7MA-BsFA5juR.js} +1 -1
- package/web-shell/assets/{vennDiagram-4TSXK5OY-DdhIExjI.js → vennDiagram-4TSXK5OY-DREP2ECo.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-VM6X3IG4-C9RS_Zof.js → wardleyDiagram-VM6X3IG4-iyd9lKi2.js} +1 -1
- package/web-shell/assets/{xychartDiagram-S5SC5T6Z-orRgmxWk.js → xychartDiagram-S5SC5T6Z-CVr1_j9q.js} +1 -1
- package/web-shell/index.html +3 -3
- package/chunks/chunk-7DJCPZE3.js +0 -945
- package/chunks/chunk-J2OSJFP3.js +0 -202
- package/chunks/chunk-K2OJUPOE.js +0 -78
- package/chunks/chunk-P3QQPMQA.js +0 -19
- package/chunks/process-registry-PMJOA5CO.js +0 -172
- package/web-shell/assets/channel-CENAhErJ.js +0 -1
- package/web-shell/assets/classDiagram-DTDB5LWJ-CM6FArGH.js +0 -1
- package/web-shell/assets/classDiagram-v2-JRS7N3AN-CM6FArGH.js +0 -1
- package/web-shell/assets/index-8hXIpvo4.js +0 -1865
- package/web-shell/assets/index-DclEv91i.css +0 -5
- package/web-shell/assets/stateDiagram-v2-4QOOHH4V-B2Q7XDaE.js +0 -1
- package/web-shell/assets/swimlanesDiagram-VK2B7HYN-DpZPOSbX.js +0 -8
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
+
import {
|
|
4
|
+
buildPermissionSuggestions
|
|
5
|
+
} from "./chunk-BFSFJR3D.js";
|
|
3
6
|
import {
|
|
4
7
|
startPostRenderPrefetches
|
|
5
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-P2G476QN.js";
|
|
9
|
+
import {
|
|
10
|
+
stopAndGetCapturedInput
|
|
11
|
+
} from "./chunk-M6FOJXW3.js";
|
|
6
12
|
import {
|
|
7
13
|
useAutoAcceptIndicator
|
|
8
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-FROAFEFB.js";
|
|
9
15
|
import {
|
|
10
16
|
classifyApiError,
|
|
11
17
|
fireSessionDeleteHook
|
|
12
18
|
} from "./chunk-P5Y23G2L.js";
|
|
13
|
-
import {
|
|
14
|
-
buildPermissionSuggestions
|
|
15
|
-
} from "./chunk-BFSFJR3D.js";
|
|
16
19
|
import {
|
|
17
20
|
TUI_CHAT_RECORDING_FAILURE_MESSAGE,
|
|
18
21
|
reportChatRecordingFailureToAdapter
|
|
19
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-I6LYRJPB.js";
|
|
20
23
|
import {
|
|
21
24
|
MAX_SUGGESTIONS_TO_SHOW,
|
|
22
25
|
SESSION_MENTION_PREFIX,
|
|
@@ -29,10 +32,10 @@ import {
|
|
|
29
32
|
normalizePartList,
|
|
30
33
|
resolveAtCommandQuery,
|
|
31
34
|
sanitizeDisplayText
|
|
32
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-PADPMMYM.js";
|
|
33
36
|
import {
|
|
34
37
|
StreamJsonOutputAdapter
|
|
35
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-GVIVASYK.js";
|
|
36
39
|
import {
|
|
37
40
|
BuiltinCommandLoader,
|
|
38
41
|
BundledSkillLoader,
|
|
@@ -79,21 +82,21 @@ import {
|
|
|
79
82
|
resetBackgroundStateForSessionSwitch,
|
|
80
83
|
serializeUserPromptExpansionPrompt,
|
|
81
84
|
supportsMatchers
|
|
82
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-DJEZ55D4.js";
|
|
83
86
|
import {
|
|
84
87
|
EXTENSION_RELOAD_FAILED_REASON,
|
|
85
88
|
ExtensionRefreshState,
|
|
86
89
|
appEvents,
|
|
87
90
|
cleanupReviewWorktreeLeases,
|
|
88
|
-
|
|
89
|
-
} from "./chunk-
|
|
91
|
+
loadHierarchicalMemory
|
|
92
|
+
} from "./chunk-DJPASAUV.js";
|
|
90
93
|
import {
|
|
91
94
|
disableKittyProtocol,
|
|
92
95
|
isKittyProtocolEnabled,
|
|
93
96
|
isKittyProtocolSupported,
|
|
94
97
|
pushKittyProtocolFlags
|
|
95
98
|
} from "./chunk-NYX53SV4.js";
|
|
96
|
-
import "./chunk-
|
|
99
|
+
import "./chunk-6X7EU5TI.js";
|
|
97
100
|
import {
|
|
98
101
|
AboutBox,
|
|
99
102
|
BaseSelectionList,
|
|
@@ -171,21 +174,21 @@ import {
|
|
|
171
174
|
useUIActions,
|
|
172
175
|
useUIState,
|
|
173
176
|
useVirtualViewport
|
|
174
|
-
} from "./chunk-
|
|
177
|
+
} from "./chunk-CIZCL2MW.js";
|
|
175
178
|
import {
|
|
176
179
|
KeypressProvider,
|
|
177
180
|
useFocus,
|
|
178
181
|
useKeypress,
|
|
179
182
|
useKeypressContext
|
|
180
|
-
} from "./chunk-
|
|
183
|
+
} from "./chunk-SS5SDCD3.js";
|
|
181
184
|
import {
|
|
182
185
|
getCommandDisplayName,
|
|
183
186
|
getCommandSourceBadge
|
|
184
|
-
} from "./chunk-
|
|
187
|
+
} from "./chunk-4TT3IVGA.js";
|
|
185
188
|
import {
|
|
186
189
|
computeSessionStats,
|
|
187
190
|
levelLabel
|
|
188
|
-
} from "./chunk-
|
|
191
|
+
} from "./chunk-WGY3AVGM.js";
|
|
189
192
|
import {
|
|
190
193
|
BEL,
|
|
191
194
|
OSC_PREFIX,
|
|
@@ -198,7 +201,7 @@ import {
|
|
|
198
201
|
oscKittyNotify,
|
|
199
202
|
saveClipboardImage,
|
|
200
203
|
writeOsc52
|
|
201
|
-
} from "./chunk-
|
|
204
|
+
} from "./chunk-CFJY4DGX.js";
|
|
202
205
|
import "./chunk-4WGODMVR.js";
|
|
203
206
|
import {
|
|
204
207
|
MaxSizedBox,
|
|
@@ -206,11 +209,11 @@ import {
|
|
|
206
209
|
useOverflowState
|
|
207
210
|
} from "./chunk-NU7RKEZR.js";
|
|
208
211
|
import {
|
|
209
|
-
GeminiRespondingSpinner,
|
|
210
|
-
GeminiSpinner,
|
|
211
212
|
ICON,
|
|
213
|
+
RespondingSpinner,
|
|
212
214
|
SCREEN_READER_USER_PREFIX,
|
|
213
215
|
SHELL_COMMAND_NAME,
|
|
216
|
+
Spinner,
|
|
214
217
|
StreamingContext,
|
|
215
218
|
applyCollapsePolicyAndSummary,
|
|
216
219
|
buildResumedHistoryItems,
|
|
@@ -222,7 +225,7 @@ import {
|
|
|
222
225
|
useStreamingContext,
|
|
223
226
|
waitForGoalRuntime,
|
|
224
227
|
wrapAnsi
|
|
225
|
-
} from "./chunk-
|
|
228
|
+
} from "./chunk-XSG6G3G6.js";
|
|
226
229
|
import {
|
|
227
230
|
formatDuration,
|
|
228
231
|
formatRelativeTime,
|
|
@@ -251,9 +254,7 @@ import {
|
|
|
251
254
|
import {
|
|
252
255
|
require_react
|
|
253
256
|
} from "./chunk-5QWWOFGG.js";
|
|
254
|
-
import
|
|
255
|
-
stopAndGetCapturedInput
|
|
256
|
-
} from "./chunk-M6FOJXW3.js";
|
|
257
|
+
import "./chunk-M3QRM3DE.js";
|
|
257
258
|
import "./chunk-BXDAPVQU.js";
|
|
258
259
|
import {
|
|
259
260
|
MAX_INLINE_IMAGES_PER_ITEM,
|
|
@@ -262,35 +263,34 @@ import {
|
|
|
262
263
|
} from "./chunk-TPI7O7HR.js";
|
|
263
264
|
import {
|
|
264
265
|
setUpdateHandler
|
|
265
|
-
} from "./chunk-
|
|
266
|
+
} from "./chunk-2YOHKHYR.js";
|
|
266
267
|
import {
|
|
267
268
|
isHistoryItemVisibleAfterRestore
|
|
268
269
|
} from "./chunk-EKTCKZV5.js";
|
|
269
|
-
import "./chunk-
|
|
270
|
+
import "./chunk-ZYMLPEZQ.js";
|
|
270
271
|
import "./chunk-YAF2MQZ6.js";
|
|
271
|
-
import "./chunk-
|
|
272
|
+
import "./chunk-C3PEFRKD.js";
|
|
272
273
|
import {
|
|
273
274
|
AUTO_THEME_NAME,
|
|
274
275
|
DEFAULT_THEME,
|
|
275
276
|
themeManager
|
|
276
277
|
} from "./chunk-QFCDF5PL.js";
|
|
277
278
|
import "./chunk-KW7NOTN6.js";
|
|
278
|
-
import "./chunk-
|
|
279
|
+
import "./chunk-4VPCTGH6.js";
|
|
279
280
|
import "./chunk-6H67XLET.js";
|
|
280
|
-
import "./chunk-
|
|
281
|
+
import "./chunk-HP5LR5HL.js";
|
|
281
282
|
import {
|
|
282
283
|
getErrorMessage as getErrorMessage2
|
|
283
|
-
} from "./chunk-
|
|
284
|
+
} from "./chunk-MPNBVAEU.js";
|
|
284
285
|
import {
|
|
285
286
|
relaunchApp
|
|
286
|
-
} from "./chunk-
|
|
287
|
-
import "./chunk-66KDY3LV.js";
|
|
287
|
+
} from "./chunk-MSBO7X2W.js";
|
|
288
288
|
import {
|
|
289
289
|
openQwenAsrRealtimeStream,
|
|
290
290
|
openVoiceStream,
|
|
291
291
|
openVoiceStreamWithRetry
|
|
292
292
|
} from "./chunk-RU7BK6B3.js";
|
|
293
|
-
import "./chunk-
|
|
293
|
+
import "./chunk-ST5MDGH3.js";
|
|
294
294
|
import "./chunk-BFPESSTR.js";
|
|
295
295
|
import {
|
|
296
296
|
cpLen,
|
|
@@ -305,14 +305,15 @@ import {
|
|
|
305
305
|
toCodePoints,
|
|
306
306
|
truncateToWidth
|
|
307
307
|
} from "./chunk-E7REAOTN.js";
|
|
308
|
-
import "./chunk-
|
|
308
|
+
import "./chunk-ZZUKP7HV.js";
|
|
309
309
|
import {
|
|
310
310
|
stringWidth
|
|
311
311
|
} from "./chunk-2MIN6GRR.js";
|
|
312
312
|
import "./chunk-QHTIBUWB.js";
|
|
313
313
|
import "./chunk-TXASDT2M.js";
|
|
314
|
-
import "./chunk-
|
|
314
|
+
import "./chunk-4VQBQLIZ.js";
|
|
315
315
|
import "./chunk-RXFQM6FQ.js";
|
|
316
|
+
import "./chunk-UXEO7E3V.js";
|
|
316
317
|
import {
|
|
317
318
|
isValidSessionId
|
|
318
319
|
} from "./chunk-ZEZKIS2K.js";
|
|
@@ -322,58 +323,58 @@ import {
|
|
|
322
323
|
isStreamingVoiceModel,
|
|
323
324
|
resolveVoiceStreamConfig,
|
|
324
325
|
transcribeVoiceAudio
|
|
325
|
-
} from "./chunk-
|
|
326
|
+
} from "./chunk-URE3QBBB.js";
|
|
326
327
|
import {
|
|
327
328
|
formatUnsupportedVoiceModelMessage,
|
|
328
329
|
isSelectableVoiceModel
|
|
329
|
-
} from "./chunk-
|
|
330
|
+
} from "./chunk-A3LWD5MK.js";
|
|
330
331
|
import "./chunk-YTDVNSUQ.js";
|
|
331
332
|
import {
|
|
332
333
|
getExtendedSystemInfo
|
|
333
|
-
} from "./chunk-
|
|
334
|
-
import "./chunk-
|
|
334
|
+
} from "./chunk-VGIFXISB.js";
|
|
335
|
+
import "./chunk-TVC6HQ2U.js";
|
|
335
336
|
import "./chunk-7U5G6JXI.js";
|
|
336
337
|
import "./chunk-WCCLLK7X.js";
|
|
337
338
|
import {
|
|
338
339
|
isInlineModelOverrideAllowed
|
|
339
|
-
} from "./chunk-
|
|
340
|
+
} from "./chunk-OU5APVWO.js";
|
|
340
341
|
import {
|
|
341
342
|
computeWorkspaceSkillListUpdates,
|
|
342
343
|
resolveSkillSettings,
|
|
343
344
|
skillSettingStrings
|
|
344
|
-
} from "./chunk-
|
|
345
|
-
import "./chunk-
|
|
345
|
+
} from "./chunk-HCOBAG2L.js";
|
|
346
|
+
import "./chunk-73RM4POK.js";
|
|
346
347
|
import {
|
|
347
348
|
requestConsentInteractive,
|
|
348
349
|
requestConsentOrFail
|
|
349
|
-
} from "./chunk-
|
|
350
|
+
} from "./chunk-6ZPDLGHN.js";
|
|
350
351
|
import "./chunk-57OAHC2Y.js";
|
|
351
|
-
import "./chunk-
|
|
352
|
-
import "./chunk-
|
|
353
|
-
import "./chunk-
|
|
352
|
+
import "./chunk-Y5S7LBOZ.js";
|
|
353
|
+
import "./chunk-3XKLXHGK.js";
|
|
354
|
+
import "./chunk-HVC3PNVC.js";
|
|
354
355
|
import "./chunk-V6WHFGST.js";
|
|
355
356
|
import {
|
|
356
357
|
createLoadedSettingsAdapter
|
|
357
|
-
} from "./chunk-
|
|
358
|
-
import "./chunk-
|
|
358
|
+
} from "./chunk-7T52W4SW.js";
|
|
359
|
+
import "./chunk-FTF2YIZ5.js";
|
|
359
360
|
import "./chunk-2AUM35J5.js";
|
|
360
361
|
import "./chunk-OZ6KS6KW.js";
|
|
361
362
|
import "./chunk-6PLDPT2C.js";
|
|
362
363
|
import "./chunk-FYJ7W2PI.js";
|
|
363
364
|
import "./chunk-STUJ7IMZ.js";
|
|
364
|
-
import "./chunk-JVPFTDBK.js";
|
|
365
|
-
import "./chunk-ALMR3E6Q.js";
|
|
366
365
|
import "./chunk-GYTKQYDB.js";
|
|
366
|
+
import "./chunk-RFIDDFAL.js";
|
|
367
|
+
import "./chunk-ALMR3E6Q.js";
|
|
367
368
|
import "./chunk-RKFGE7JH.js";
|
|
368
369
|
import "./chunk-UDG5EZJI.js";
|
|
369
370
|
import "./chunk-3VUENPWF.js";
|
|
370
371
|
import "./chunk-M5GB774H.js";
|
|
371
372
|
import "./chunk-7EQQR46F.js";
|
|
372
|
-
import "./chunk-
|
|
373
|
+
import "./chunk-ICURCKIU.js";
|
|
373
374
|
import "./chunk-IW6RQPQB.js";
|
|
374
375
|
import {
|
|
375
376
|
loadMcpApprovals
|
|
376
|
-
} from "./chunk-
|
|
377
|
+
} from "./chunk-7VMIMAVB.js";
|
|
377
378
|
import {
|
|
378
379
|
CORRUPTED_SUFFIX,
|
|
379
380
|
SettingScope,
|
|
@@ -395,11 +396,11 @@ import {
|
|
|
395
396
|
settingExistsInScope,
|
|
396
397
|
validateSettingValue,
|
|
397
398
|
writeOutputLanguageAndRegisterPath
|
|
398
|
-
} from "./chunk-
|
|
399
|
+
} from "./chunk-AIAOIFY4.js";
|
|
399
400
|
import "./chunk-RKUWKYED.js";
|
|
400
401
|
import {
|
|
401
402
|
TOGGLE_TYPES
|
|
402
|
-
} from "./chunk-
|
|
403
|
+
} from "./chunk-ZEYFMJQA.js";
|
|
403
404
|
import "./chunk-GOXKNSDZ.js";
|
|
404
405
|
import "./chunk-IDS7MSUP.js";
|
|
405
406
|
import {
|
|
@@ -407,19 +408,19 @@ import {
|
|
|
407
408
|
localizeToolDisplayName,
|
|
408
409
|
t,
|
|
409
410
|
ta
|
|
410
|
-
} from "./chunk-
|
|
411
|
+
} from "./chunk-CLWO3B77.js";
|
|
411
412
|
import "./chunk-5EJZE3FP.js";
|
|
412
|
-
import "./chunk-
|
|
413
|
-
import "./chunk-
|
|
413
|
+
import "./chunk-XHF7WQ6B.js";
|
|
414
|
+
import "./chunk-MZCJWS5Y.js";
|
|
414
415
|
import "./chunk-V2NDP3I4.js";
|
|
415
416
|
import {
|
|
416
417
|
getCliVersion
|
|
417
|
-
} from "./chunk-
|
|
418
|
+
} from "./chunk-Q2MSPKIJ.js";
|
|
418
419
|
import "./chunk-W3N5XAZ6.js";
|
|
419
420
|
import {
|
|
420
421
|
isWorkspaceTrusted,
|
|
421
422
|
loadTrustedFolders
|
|
422
|
-
} from "./chunk-
|
|
423
|
+
} from "./chunk-MF7HCQWZ.js";
|
|
423
424
|
import {
|
|
424
425
|
require_strip_json_comments
|
|
425
426
|
} from "./chunk-NPQ5ZKRP.js";
|
|
@@ -470,26 +471,26 @@ import {
|
|
|
470
471
|
startSpeculation,
|
|
471
472
|
subagentGenerator,
|
|
472
473
|
watchRepoBranch
|
|
473
|
-
} from "./chunk-
|
|
474
|
+
} from "./chunk-NV55WWD6.js";
|
|
474
475
|
import {
|
|
475
476
|
saveWorkflowScript,
|
|
476
477
|
validateWorkflowName
|
|
477
|
-
} from "./chunk-
|
|
478
|
+
} from "./chunk-2OUD5T67.js";
|
|
478
479
|
import "./chunk-XFSFZCM5.js";
|
|
479
480
|
import "./chunk-2EAZ43JQ.js";
|
|
480
481
|
import "./chunk-NF5J2WFA.js";
|
|
481
482
|
import "./chunk-CQH5KTKC.js";
|
|
482
483
|
import "./chunk-LJZSMWOH.js";
|
|
483
|
-
import "./chunk-
|
|
484
|
-
import "./chunk-
|
|
485
|
-
import "./chunk-
|
|
484
|
+
import "./chunk-NMOD2FXQ.js";
|
|
485
|
+
import "./chunk-WNPDGUJO.js";
|
|
486
|
+
import "./chunk-K5KXUXWC.js";
|
|
486
487
|
import {
|
|
487
488
|
clearWorktreeSession,
|
|
488
489
|
isSessionRuntimeActive,
|
|
489
490
|
readWorktreeSession,
|
|
490
491
|
restoreWorktreeContext
|
|
491
|
-
} from "./chunk-
|
|
492
|
-
import "./chunk-
|
|
492
|
+
} from "./chunk-62GQFYID.js";
|
|
493
|
+
import "./chunk-AYFA7MZV.js";
|
|
493
494
|
import "./chunk-XQFT3QUF.js";
|
|
494
495
|
import "./chunk-VTHREBQM.js";
|
|
495
496
|
import "./chunk-ZPJWUGCS.js";
|
|
@@ -499,8 +500,8 @@ import {
|
|
|
499
500
|
sanitizeForOsc,
|
|
500
501
|
supportsHyperlinks,
|
|
501
502
|
wrapForMultiplexer
|
|
502
|
-
} from "./chunk-
|
|
503
|
-
import "./chunk-
|
|
503
|
+
} from "./chunk-3JXM2CVW.js";
|
|
504
|
+
import "./chunk-ST5V3ZOC.js";
|
|
504
505
|
import {
|
|
505
506
|
ConditionalRulesRegistry,
|
|
506
507
|
CoreToolScheduler,
|
|
@@ -539,6 +540,7 @@ import {
|
|
|
539
540
|
getExtensionDisplayName,
|
|
540
541
|
getTimeRangeBounds,
|
|
541
542
|
getToolResponseDisplayText,
|
|
543
|
+
goalToolResultProvenance,
|
|
542
544
|
ideContextStore,
|
|
543
545
|
isActiveWorkflowStatus,
|
|
544
546
|
isClearedMediaPlaceholder,
|
|
@@ -567,7 +569,7 @@ import {
|
|
|
567
569
|
refreshMemoryInstruction,
|
|
568
570
|
registerSession,
|
|
569
571
|
stripTerminalControlSequences
|
|
570
|
-
} from "./chunk-
|
|
572
|
+
} from "./chunk-PZ66FRIC.js";
|
|
571
573
|
import "./chunk-GOFAQQZA.js";
|
|
572
574
|
import "./chunk-5M6IDOMF.js";
|
|
573
575
|
import {
|
|
@@ -575,13 +577,14 @@ import {
|
|
|
575
577
|
} from "./chunk-TWPJO254.js";
|
|
576
578
|
import "./chunk-CQ35AJ4Z.js";
|
|
577
579
|
import "./chunk-EKSCLBBF.js";
|
|
578
|
-
import "./chunk-
|
|
579
|
-
import "./chunk-
|
|
580
|
-
import "./chunk-
|
|
580
|
+
import "./chunk-LUEHOUHM.js";
|
|
581
|
+
import "./chunk-WXEA74YB.js";
|
|
582
|
+
import "./chunk-42IDLQWS.js";
|
|
581
583
|
import "./chunk-6PVPNMXU.js";
|
|
582
584
|
import {
|
|
583
585
|
resolveModelId
|
|
584
586
|
} from "./chunk-JB4JIVTJ.js";
|
|
587
|
+
import "./chunk-DJBQCO2E.js";
|
|
585
588
|
import "./chunk-IRH27ZC2.js";
|
|
586
589
|
import "./chunk-QHWCP53L.js";
|
|
587
590
|
import "./chunk-D5LUXLUH.js";
|
|
@@ -593,52 +596,49 @@ import {
|
|
|
593
596
|
GitWorktreeService,
|
|
594
597
|
readWorktreeSessionMarker,
|
|
595
598
|
writeRuntimeStatus
|
|
596
|
-
} from "./chunk-
|
|
599
|
+
} from "./chunk-2SXSLSQE.js";
|
|
597
600
|
import "./chunk-CPBF7KYF.js";
|
|
598
|
-
import "./chunk-
|
|
601
|
+
import "./chunk-KJO2LBUK.js";
|
|
599
602
|
import {
|
|
600
603
|
HOOKS_CONFIG_FIELDS
|
|
601
604
|
} from "./chunk-TTX2JUE6.js";
|
|
602
|
-
import "./chunk-
|
|
605
|
+
import "./chunk-4K7KNVWH.js";
|
|
603
606
|
import {
|
|
604
607
|
getGitBranch,
|
|
605
608
|
glob
|
|
606
609
|
} from "./chunk-SMPR7SPO.js";
|
|
607
610
|
import "./chunk-JWALNCLT.js";
|
|
608
611
|
import "./chunk-NIFYWDYN.js";
|
|
609
|
-
import "./chunk-
|
|
612
|
+
import "./chunk-C2X7KY45.js";
|
|
610
613
|
import {
|
|
611
614
|
elapsedActiveTime,
|
|
612
615
|
goalRequiresExactPermit
|
|
613
|
-
} from "./chunk-
|
|
616
|
+
} from "./chunk-JHYH6PYQ.js";
|
|
617
|
+
import "./chunk-7J6OTNGO.js";
|
|
614
618
|
import {
|
|
615
619
|
APPROVAL_MODES
|
|
616
620
|
} from "./chunk-V5J4J5TP.js";
|
|
617
621
|
import "./chunk-MLXTMF7H.js";
|
|
618
622
|
import "./chunk-NAVJD2PQ.js";
|
|
619
|
-
import "./chunk-
|
|
620
|
-
import "./chunk-
|
|
623
|
+
import "./chunk-B466ZSHZ.js";
|
|
624
|
+
import "./chunk-4QHPPXK2.js";
|
|
621
625
|
import "./chunk-QHMLYMMS.js";
|
|
622
|
-
import "./chunk-
|
|
623
|
-
import "./chunk-P3QQPMQA.js";
|
|
624
|
-
import "./chunk-HVEYF6VT.js";
|
|
626
|
+
import "./chunk-3WK3QDNV.js";
|
|
625
627
|
import "./chunk-VNOVK4I7.js";
|
|
626
|
-
import "./chunk-
|
|
627
|
-
import "./chunk-
|
|
628
|
+
import "./chunk-PQEISIKS.js";
|
|
629
|
+
import "./chunk-EB6QRGHM.js";
|
|
628
630
|
import {
|
|
629
631
|
runOutsideAgentContext
|
|
630
632
|
} from "./chunk-CMHFCLBU.js";
|
|
631
633
|
import "./chunk-S6LOFUVP.js";
|
|
634
|
+
import "./chunk-CFKIH3D3.js";
|
|
632
635
|
import {
|
|
633
636
|
REASONING_EFFORT_TIERS,
|
|
634
637
|
applyReasoningEffort
|
|
635
638
|
} from "./chunk-2LD5U7Q3.js";
|
|
636
639
|
import "./chunk-DJ2GSRLV.js";
|
|
637
|
-
import "./chunk-
|
|
638
|
-
import "./chunk-
|
|
639
|
-
import "./chunk-CFKIH3D3.js";
|
|
640
|
-
import "./chunk-4FTKQNWJ.js";
|
|
641
|
-
import "./chunk-Y3QL45LS.js";
|
|
640
|
+
import "./chunk-DYXFD5RO.js";
|
|
641
|
+
import "./chunk-V4264FEG.js";
|
|
642
642
|
import {
|
|
643
643
|
ApiCancelEvent,
|
|
644
644
|
AuthEvent,
|
|
@@ -677,14 +677,14 @@ import {
|
|
|
677
677
|
runVisionBridge,
|
|
678
678
|
shouldRunVisionBridge,
|
|
679
679
|
splitImageParts
|
|
680
|
-
} from "./chunk-
|
|
681
|
-
import "./chunk-
|
|
680
|
+
} from "./chunk-QYMAKPY5.js";
|
|
681
|
+
import "./chunk-XBVNNDPK.js";
|
|
682
682
|
import "./chunk-VGC4I5JJ.js";
|
|
683
683
|
import {
|
|
684
|
-
|
|
684
|
+
getAllMemoryFilenames,
|
|
685
685
|
getUnsupportedImageFormatWarning,
|
|
686
686
|
isSupportedImageMimeType
|
|
687
|
-
} from "./chunk-
|
|
687
|
+
} from "./chunk-BKWNKLZB.js";
|
|
688
688
|
import {
|
|
689
689
|
AUTO_MEMORY_INDEX_FILENAME,
|
|
690
690
|
getAutoMemoryProjectStateDir,
|
|
@@ -702,7 +702,7 @@ import {
|
|
|
702
702
|
import "./chunk-6DIGWMGT.js";
|
|
703
703
|
import {
|
|
704
704
|
MAINLINE_CODER_MODEL
|
|
705
|
-
} from "./chunk-
|
|
705
|
+
} from "./chunk-W3JH33JE.js";
|
|
706
706
|
import "./chunk-XZA32HII.js";
|
|
707
707
|
import {
|
|
708
708
|
atomicWriteFileSync
|
|
@@ -714,7 +714,7 @@ import {
|
|
|
714
714
|
getActiveInteractionSpan,
|
|
715
715
|
isBinary,
|
|
716
716
|
redactUrlCredentials
|
|
717
|
-
} from "./chunk-
|
|
717
|
+
} from "./chunk-B5PHIJGI.js";
|
|
718
718
|
import "./chunk-74TONY4F.js";
|
|
719
719
|
import "./chunk-XF63PKEN.js";
|
|
720
720
|
import {
|
|
@@ -742,11 +742,11 @@ import {
|
|
|
742
742
|
shortenPath,
|
|
743
743
|
tildeifyPath
|
|
744
744
|
} from "./chunk-UHQFIS7N.js";
|
|
745
|
-
import "./chunk-
|
|
745
|
+
import "./chunk-MK2GIB46.js";
|
|
746
746
|
import {
|
|
747
747
|
registerCleanup,
|
|
748
748
|
runExitCleanup
|
|
749
|
-
} from "./chunk-
|
|
749
|
+
} from "./chunk-MO3FC2WT.js";
|
|
750
750
|
import {
|
|
751
751
|
finalizeStartupProfile,
|
|
752
752
|
profileCheckpoint
|
|
@@ -757,7 +757,7 @@ import {
|
|
|
757
757
|
writeStderrLine,
|
|
758
758
|
writeStderrLineSafe,
|
|
759
759
|
writeStdoutLine
|
|
760
|
-
} from "./chunk-
|
|
760
|
+
} from "./chunk-7FA2II6K.js";
|
|
761
761
|
import "./chunk-75DOP5OR.js";
|
|
762
762
|
import "./chunk-DMTGGOSA.js";
|
|
763
763
|
import "./chunk-YQ3U5MUC.js";
|
|
@@ -1368,7 +1368,7 @@ var RemoteInputWatcher = class {
|
|
|
1368
1368
|
}
|
|
1369
1369
|
/**
|
|
1370
1370
|
* Register the TUI's submit function. Called from AppContainer
|
|
1371
|
-
* once
|
|
1371
|
+
* once useLlmStream's submitQuery is available.
|
|
1372
1372
|
*/
|
|
1373
1373
|
setSubmitFn(fn) {
|
|
1374
1374
|
this.submitFn = fn;
|
|
@@ -4406,7 +4406,7 @@ var MainContent = /* @__PURE__ */ __name(({ footerRef }) => {
|
|
|
4406
4406
|
terminalWidth,
|
|
4407
4407
|
mainAreaWidth,
|
|
4408
4408
|
availableTerminalHeight: uiState.constrainHeight ? staticAreaMaxItemHeight : void 0,
|
|
4409
|
-
|
|
4409
|
+
availableTerminalHeightLlm: uiState.constrainHeight ? MAX_GEMINI_MESSAGE_LINES : void 0,
|
|
4410
4410
|
item,
|
|
4411
4411
|
isPending: false,
|
|
4412
4412
|
commands: uiState.slashCommands,
|
|
@@ -4482,7 +4482,7 @@ var MainContent = /* @__PURE__ */ __name(({ footerRef }) => {
|
|
|
4482
4482
|
terminalWidth,
|
|
4483
4483
|
mainAreaWidth,
|
|
4484
4484
|
availableTerminalHeight: staticAreaMaxItemHeight,
|
|
4485
|
-
|
|
4485
|
+
availableTerminalHeightLlm: MAX_GEMINI_MESSAGE_LINES,
|
|
4486
4486
|
item: h,
|
|
4487
4487
|
isPending: false,
|
|
4488
4488
|
commands: uiState.slashCommands,
|
|
@@ -13263,7 +13263,7 @@ var IdeTrustChangeDialog = /* @__PURE__ */ __name(({ reason }) => {
|
|
|
13263
13263
|
}
|
|
13264
13264
|
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Box_default, { borderStyle: "round", borderColor: theme.status.warning, paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Text, { color: theme.status.warning, children: [
|
|
13265
13265
|
message,
|
|
13266
|
-
" Press 'r' to restart
|
|
13266
|
+
" Press 'r' to restart Qwen Code and apply the changes."
|
|
13267
13267
|
] }) });
|
|
13268
13268
|
}, "IdeTrustChangeDialog");
|
|
13269
13269
|
|
|
@@ -15607,10 +15607,8 @@ function SkillsManagerDialog({
|
|
|
15607
15607
|
settings,
|
|
15608
15608
|
"Workspace" /* Workspace */
|
|
15609
15609
|
).filter((name) => typeof name === "string");
|
|
15610
|
-
const lockedNames = new Set(lockedSkills.map((skill) => lower(skill.name)));
|
|
15611
15610
|
const { disabled, enabled, disabledChanged, enabledChanged } = computeWorkspaceSkillListUpdates(
|
|
15612
15611
|
workspaceDisabled,
|
|
15613
|
-
lockedNames,
|
|
15614
15612
|
skillSettingStrings(settings, "Workspace" /* Workspace */, "enabled"),
|
|
15615
15613
|
unlockedSkills.map((skill) => ({
|
|
15616
15614
|
name: skill.name,
|
|
@@ -15673,7 +15671,6 @@ function SkillsManagerDialog({
|
|
|
15673
15671
|
addItem,
|
|
15674
15672
|
initialResolved,
|
|
15675
15673
|
initialSelectedKeys,
|
|
15676
|
-
lockedSkills,
|
|
15677
15674
|
reloadCommands,
|
|
15678
15675
|
selectedKeys,
|
|
15679
15676
|
settings,
|
|
@@ -17632,9 +17629,9 @@ var AuthenticateStep = /* @__PURE__ */ __name(({
|
|
|
17632
17629
|
})
|
|
17633
17630
|
]);
|
|
17634
17631
|
}
|
|
17635
|
-
const
|
|
17636
|
-
if (
|
|
17637
|
-
await
|
|
17632
|
+
const llmClient = config.getLlmClient();
|
|
17633
|
+
if (llmClient) {
|
|
17634
|
+
await llmClient.setTools();
|
|
17638
17635
|
}
|
|
17639
17636
|
setMessages((prev) => [
|
|
17640
17637
|
...prev,
|
|
@@ -22701,7 +22698,7 @@ import { spawn } from "node:child_process";
|
|
|
22701
22698
|
var import_jsx_runtime95 = __toESM(require_jsx_runtime(), 1);
|
|
22702
22699
|
var DISPLAY_ENV_VARS = ["DISPLAY", "WAYLAND_DISPLAY", "MIR_SOCKET"];
|
|
22703
22700
|
async function resolvePreferredMemoryFile(dir, fallbackFilename) {
|
|
22704
|
-
for (const filename of
|
|
22701
|
+
for (const filename of getAllMemoryFilenames()) {
|
|
22705
22702
|
const filePath = path4.join(dir, filename);
|
|
22706
22703
|
try {
|
|
22707
22704
|
await fs9.access(filePath);
|
|
@@ -22786,14 +22783,14 @@ function MemoryDialog({ onClose }) {
|
|
|
22786
22783
|
const globalMemoryPath = (0, import_react73.useMemo)(
|
|
22787
22784
|
() => path4.join(
|
|
22788
22785
|
Storage.getGlobalQwenDir(),
|
|
22789
|
-
|
|
22786
|
+
getAllMemoryFilenames()[0] ?? "QWEN.md"
|
|
22790
22787
|
),
|
|
22791
22788
|
[]
|
|
22792
22789
|
);
|
|
22793
22790
|
const projectMemoryPath = (0, import_react73.useMemo)(
|
|
22794
22791
|
() => path4.join(
|
|
22795
22792
|
config.getWorkingDir(),
|
|
22796
|
-
|
|
22793
|
+
getAllMemoryFilenames()[0] ?? "QWEN.md"
|
|
22797
22794
|
),
|
|
22798
22795
|
[config]
|
|
22799
22796
|
);
|
|
@@ -22896,12 +22893,12 @@ function MemoryDialog({ onClose }) {
|
|
|
22896
22893
|
case "project":
|
|
22897
22894
|
return resolvePreferredMemoryFile(
|
|
22898
22895
|
config.getWorkingDir(),
|
|
22899
|
-
|
|
22896
|
+
getAllMemoryFilenames()[0] ?? "QWEN.md"
|
|
22900
22897
|
);
|
|
22901
22898
|
case "global":
|
|
22902
22899
|
return resolvePreferredMemoryFile(
|
|
22903
22900
|
Storage.getGlobalQwenDir(),
|
|
22904
|
-
|
|
22901
|
+
getAllMemoryFilenames()[0] ?? "QWEN.md"
|
|
22905
22902
|
);
|
|
22906
22903
|
default: {
|
|
22907
22904
|
const _exhaustive = item.value;
|
|
@@ -25694,7 +25691,7 @@ var LoadingIndicator = /* @__PURE__ */ __name(({
|
|
|
25694
25691
|
children: [
|
|
25695
25692
|
/* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(Box_default, { children: [
|
|
25696
25693
|
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)(Box_default, { marginRight: 1, children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
25697
|
-
|
|
25694
|
+
RespondingSpinner,
|
|
25698
25695
|
{
|
|
25699
25696
|
nonRespondingDisplay: streamingState === "waiting_for_confirmation" /* WaitingForConfirmation */ ? "\u280F" : ""
|
|
25700
25697
|
}
|
|
@@ -28225,7 +28222,8 @@ var DEFAULT_STATE2 = {
|
|
|
28225
28222
|
agentShellFocused: false,
|
|
28226
28223
|
agentInputBufferText: "",
|
|
28227
28224
|
agentTabBarFocused: false,
|
|
28228
|
-
agentApprovalModes: /* @__PURE__ */ new Map()
|
|
28225
|
+
agentApprovalModes: /* @__PURE__ */ new Map(),
|
|
28226
|
+
agentMessageQueues: /* @__PURE__ */ new Map()
|
|
28229
28227
|
};
|
|
28230
28228
|
var noop2 = /* @__PURE__ */ __name(() => {
|
|
28231
28229
|
}, "noop");
|
|
@@ -28239,7 +28237,9 @@ var DEFAULT_ACTIONS2 = {
|
|
|
28239
28237
|
setAgentShellFocused: noop2,
|
|
28240
28238
|
setAgentInputBufferText: noop2,
|
|
28241
28239
|
setAgentTabBarFocused: noop2,
|
|
28242
|
-
setAgentApprovalMode: noop2
|
|
28240
|
+
setAgentApprovalMode: noop2,
|
|
28241
|
+
setAgentMessageQueue: noop2,
|
|
28242
|
+
appendToAgentMessageQueue: noop2
|
|
28243
28243
|
};
|
|
28244
28244
|
function useAgentViewState() {
|
|
28245
28245
|
return (0, import_react95.useContext)(AgentViewStateContext) ?? DEFAULT_STATE2;
|
|
@@ -28261,6 +28261,8 @@ function AgentViewProvider({
|
|
|
28261
28261
|
const [agentInputBufferText, setAgentInputBufferText] = (0, import_react95.useState)("");
|
|
28262
28262
|
const [agentTabBarFocused, setAgentTabBarFocused] = (0, import_react95.useState)(false);
|
|
28263
28263
|
const [agentApprovalModes, setAgentApprovalModes] = (0, import_react95.useState)(() => /* @__PURE__ */ new Map());
|
|
28264
|
+
const [agentMessageQueues, setAgentMessageQueues] = (0, import_react95.useState)(() => /* @__PURE__ */ new Map());
|
|
28265
|
+
const registeredIdsRef = (0, import_react95.useRef)(/* @__PURE__ */ new Set());
|
|
28264
28266
|
const switchToAgent = (0, import_react95.useCallback)(
|
|
28265
28267
|
(agentId) => {
|
|
28266
28268
|
if (agents.has(agentId)) {
|
|
@@ -28294,6 +28296,7 @@ function AgentViewProvider({
|
|
|
28294
28296
|
}, [activeView]);
|
|
28295
28297
|
const registerAgent = (0, import_react95.useCallback)(
|
|
28296
28298
|
(agentId, interactiveAgent, modelId, color, modelName) => {
|
|
28299
|
+
registeredIdsRef.current.add(agentId);
|
|
28297
28300
|
setAgents((prev) => {
|
|
28298
28301
|
const next = new Map(prev);
|
|
28299
28302
|
next.set(agentId, {
|
|
@@ -28314,6 +28317,7 @@ function AgentViewProvider({
|
|
|
28314
28317
|
[]
|
|
28315
28318
|
);
|
|
28316
28319
|
const unregisterAgent = (0, import_react95.useCallback)((agentId) => {
|
|
28320
|
+
registeredIdsRef.current.delete(agentId);
|
|
28317
28321
|
setAgents((prev) => {
|
|
28318
28322
|
if (!prev.has(agentId)) return prev;
|
|
28319
28323
|
const next = new Map(prev);
|
|
@@ -28326,11 +28330,19 @@ function AgentViewProvider({
|
|
|
28326
28330
|
next.delete(agentId);
|
|
28327
28331
|
return next;
|
|
28328
28332
|
});
|
|
28333
|
+
setAgentMessageQueues((prev) => {
|
|
28334
|
+
if (!prev.has(agentId)) return prev;
|
|
28335
|
+
const next = new Map(prev);
|
|
28336
|
+
next.delete(agentId);
|
|
28337
|
+
return next;
|
|
28338
|
+
});
|
|
28329
28339
|
setActiveView((current) => current === agentId ? "main" : current);
|
|
28330
28340
|
}, []);
|
|
28331
28341
|
const unregisterAll = (0, import_react95.useCallback)(() => {
|
|
28342
|
+
registeredIdsRef.current.clear();
|
|
28332
28343
|
setAgents(/* @__PURE__ */ new Map());
|
|
28333
28344
|
setAgentApprovalModes(/* @__PURE__ */ new Map());
|
|
28345
|
+
setAgentMessageQueues(/* @__PURE__ */ new Map());
|
|
28334
28346
|
setActiveView("main");
|
|
28335
28347
|
setAgentTabBarFocused(false);
|
|
28336
28348
|
}, []);
|
|
@@ -28348,6 +28360,31 @@ function AgentViewProvider({
|
|
|
28348
28360
|
},
|
|
28349
28361
|
[agents]
|
|
28350
28362
|
);
|
|
28363
|
+
const setAgentMessageQueue = (0, import_react95.useCallback)(
|
|
28364
|
+
(agentId, queue) => {
|
|
28365
|
+
setAgentMessageQueues((prev) => {
|
|
28366
|
+
const next = new Map(prev);
|
|
28367
|
+
if (queue.length === 0) {
|
|
28368
|
+
next.delete(agentId);
|
|
28369
|
+
} else {
|
|
28370
|
+
next.set(agentId, queue);
|
|
28371
|
+
}
|
|
28372
|
+
return next;
|
|
28373
|
+
});
|
|
28374
|
+
},
|
|
28375
|
+
[]
|
|
28376
|
+
);
|
|
28377
|
+
const appendToAgentMessageQueue = (0, import_react95.useCallback)(
|
|
28378
|
+
(agentId, message) => {
|
|
28379
|
+
if (!registeredIdsRef.current.has(agentId)) return;
|
|
28380
|
+
setAgentMessageQueues((prev) => {
|
|
28381
|
+
const next = new Map(prev);
|
|
28382
|
+
next.set(agentId, [...next.get(agentId) ?? [], message]);
|
|
28383
|
+
return next;
|
|
28384
|
+
});
|
|
28385
|
+
},
|
|
28386
|
+
[]
|
|
28387
|
+
);
|
|
28351
28388
|
const state = (0, import_react95.useMemo)(
|
|
28352
28389
|
() => ({
|
|
28353
28390
|
activeView,
|
|
@@ -28355,7 +28392,8 @@ function AgentViewProvider({
|
|
|
28355
28392
|
agentShellFocused,
|
|
28356
28393
|
agentInputBufferText,
|
|
28357
28394
|
agentTabBarFocused,
|
|
28358
|
-
agentApprovalModes
|
|
28395
|
+
agentApprovalModes,
|
|
28396
|
+
agentMessageQueues
|
|
28359
28397
|
}),
|
|
28360
28398
|
[
|
|
28361
28399
|
activeView,
|
|
@@ -28363,7 +28401,8 @@ function AgentViewProvider({
|
|
|
28363
28401
|
agentShellFocused,
|
|
28364
28402
|
agentInputBufferText,
|
|
28365
28403
|
agentTabBarFocused,
|
|
28366
|
-
agentApprovalModes
|
|
28404
|
+
agentApprovalModes,
|
|
28405
|
+
agentMessageQueues
|
|
28367
28406
|
]
|
|
28368
28407
|
);
|
|
28369
28408
|
const actions = (0, import_react95.useMemo)(
|
|
@@ -28377,7 +28416,9 @@ function AgentViewProvider({
|
|
|
28377
28416
|
setAgentShellFocused,
|
|
28378
28417
|
setAgentInputBufferText,
|
|
28379
28418
|
setAgentTabBarFocused,
|
|
28380
|
-
setAgentApprovalMode
|
|
28419
|
+
setAgentApprovalMode,
|
|
28420
|
+
setAgentMessageQueue,
|
|
28421
|
+
appendToAgentMessageQueue
|
|
28381
28422
|
}),
|
|
28382
28423
|
[
|
|
28383
28424
|
switchToAgent,
|
|
@@ -28389,7 +28430,9 @@ function AgentViewProvider({
|
|
|
28389
28430
|
setAgentShellFocused,
|
|
28390
28431
|
setAgentInputBufferText,
|
|
28391
28432
|
setAgentTabBarFocused,
|
|
28392
|
-
setAgentApprovalMode
|
|
28433
|
+
setAgentApprovalMode,
|
|
28434
|
+
setAgentMessageQueue,
|
|
28435
|
+
appendToAgentMessageQueue
|
|
28393
28436
|
]
|
|
28394
28437
|
);
|
|
28395
28438
|
useArenaInProcess(config ?? null, actions);
|
|
@@ -30074,10 +30117,10 @@ var InputPrompt = /* @__PURE__ */ __name(({
|
|
|
30074
30117
|
[bgEntries, liveAgentPanelMaxRows]
|
|
30075
30118
|
);
|
|
30076
30119
|
const hasActiveToolConfirmation = (0, import_react99.useMemo)(
|
|
30077
|
-
() => Boolean(uiState.confirmationRequest) || (uiState.
|
|
30120
|
+
() => Boolean(uiState.confirmationRequest) || (uiState.pendingLlmHistoryItems ?? []).some(
|
|
30078
30121
|
(item) => item.type === "tool_group" && item.tools.some((tool) => tool.confirmationDetails)
|
|
30079
30122
|
),
|
|
30080
|
-
[uiState.confirmationRequest, uiState.
|
|
30123
|
+
[uiState.confirmationRequest, uiState.pendingLlmHistoryItems]
|
|
30081
30124
|
);
|
|
30082
30125
|
const [historyRestoredText, setHistoryRestoredText] = (0, import_react99.useState)(
|
|
30083
30126
|
null
|
|
@@ -32350,11 +32393,11 @@ var Footer = /* @__PURE__ */ __name(({ containerRef }) => {
|
|
|
32350
32393
|
const contextWindowSize = config.getContentGeneratorConfig()?.contextWindowSize;
|
|
32351
32394
|
const suppressHint = statusLineLines.length > 0;
|
|
32352
32395
|
const leftBottomContent = uiState.ctrlCPressedOnce ? /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(Text, { color: theme.status.warning, children: t("Press Ctrl+C again to exit.") }) : uiState.ctrlDPressedOnce ? /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(Text, { color: theme.status.warning, children: t("Press Ctrl+D again to exit.") }) : uiState.showEscapePrompt ? /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(Text, { color: theme.text.secondary, children: t("Press Esc again to clear.") }) : pasteProgress.active ? /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(PasteProgressBar, { progress: pasteProgress }) : uiState.rewindEscPending ? /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(Text, { color: theme.text.secondary, children: t("Press Esc again to rewind conversation.") }) : vimEnabled && vimMode === "INSERT" ? /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(Text, { color: theme.text.secondary, children: "-- INSERT --" }) : vimEnabled && vimMode === "NORMAL" ? /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(Text, { color: theme.text.secondary, children: "-- NORMAL --" }) : uiState.shellModeActive ? /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(ShellModeIndicator, {}) : configInitMessage ? /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
32353
|
-
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
32396
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(Spinner, {}),
|
|
32354
32397
|
" ",
|
|
32355
32398
|
configInitMessage
|
|
32356
32399
|
] }) : uiState.startupIdeConnectionStatus.state === "connecting" ? /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
32357
|
-
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
32400
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(Spinner, {}),
|
|
32358
32401
|
" ",
|
|
32359
32402
|
t("IDE connecting... context may be unavailable")
|
|
32360
32403
|
] }) : uiState.startupIdeConnectionStatus.state === "failed" ? /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(Text, { color: theme.status.warning, children: t("IDE connection unavailable: {{message}}", {
|
|
@@ -32478,7 +32521,8 @@ var import_jsx_runtime117 = __toESM(require_jsx_runtime(), 1);
|
|
|
32478
32521
|
var MAX_DISPLAYED_QUEUED_MESSAGES = 3;
|
|
32479
32522
|
var NUM_TIMES_QUEUE_HINT_SHOWN = 3;
|
|
32480
32523
|
var QueuedMessageDisplay = /* @__PURE__ */ __name(({
|
|
32481
|
-
messageQueue
|
|
32524
|
+
messageQueue,
|
|
32525
|
+
showHint: hintEnabled = true
|
|
32482
32526
|
}) => {
|
|
32483
32527
|
const hintSeenCountRef = (0, import_react107.useRef)(0);
|
|
32484
32528
|
const wasEmptyRef = (0, import_react107.useRef)(true);
|
|
@@ -32490,7 +32534,7 @@ var QueuedMessageDisplay = /* @__PURE__ */ __name(({
|
|
|
32490
32534
|
hintSeenCountRef.current++;
|
|
32491
32535
|
wasEmptyRef.current = false;
|
|
32492
32536
|
}
|
|
32493
|
-
const
|
|
32537
|
+
const shouldShowHint = hintSeenCountRef.current <= NUM_TIMES_QUEUE_HINT_SHOWN;
|
|
32494
32538
|
return /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
32495
32539
|
messageQueue.slice(0, MAX_DISPLAYED_QUEUED_MESSAGES).map((message, index) => {
|
|
32496
32540
|
const preview = message.replace(/\s+/g, " ");
|
|
@@ -32501,7 +32545,7 @@ var QueuedMessageDisplay = /* @__PURE__ */ __name(({
|
|
|
32501
32545
|
messageQueue.length - MAX_DISPLAYED_QUEUED_MESSAGES,
|
|
32502
32546
|
" more)"
|
|
32503
32547
|
] }) }),
|
|
32504
|
-
|
|
32548
|
+
hintEnabled && shouldShowHint && /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(Box_default, { paddingLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(Text, { dimColor: true, italic: true, children: t("Ctrl+Q to queue \xB7 \u2191 to edit queued messages") }) })
|
|
32505
32549
|
] });
|
|
32506
32550
|
}, "QueuedMessageDisplay");
|
|
32507
32551
|
|
|
@@ -33435,7 +33479,7 @@ var AgentChatContent = /* @__PURE__ */ __name(({
|
|
|
33435
33479
|
},
|
|
33436
33480
|
item.id
|
|
33437
33481
|
)),
|
|
33438
|
-
isRunning && /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Box_default, { marginX: 2, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
33482
|
+
isRunning && /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Box_default, { marginX: 2, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(RespondingSpinner, {}) })
|
|
33439
33483
|
] });
|
|
33440
33484
|
}, "AgentChatContent");
|
|
33441
33485
|
var AgentChatMissing = /* @__PURE__ */ __name(({ label }) => /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Box_default, { marginX: 2, children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Text, { color: theme.status.error, children: label }) }), "AgentChatMissing");
|
|
@@ -33693,12 +33737,21 @@ var AgentFooter = /* @__PURE__ */ __name(({
|
|
|
33693
33737
|
|
|
33694
33738
|
// packages/cli/src/ui/components/agent-view/AgentComposer.tsx
|
|
33695
33739
|
var import_jsx_runtime128 = __toESM(require_jsx_runtime(), 1);
|
|
33740
|
+
var EMPTY_MESSAGE_QUEUE = [];
|
|
33696
33741
|
var AgentComposer = /* @__PURE__ */ __name(({ agentId }) => {
|
|
33697
|
-
const {
|
|
33742
|
+
const {
|
|
33743
|
+
agents,
|
|
33744
|
+
agentTabBarFocused,
|
|
33745
|
+
agentShellFocused,
|
|
33746
|
+
agentApprovalModes,
|
|
33747
|
+
agentMessageQueues
|
|
33748
|
+
} = useAgentViewState();
|
|
33698
33749
|
const {
|
|
33699
33750
|
setAgentInputBufferText,
|
|
33700
33751
|
setAgentTabBarFocused,
|
|
33701
|
-
setAgentApprovalMode
|
|
33752
|
+
setAgentApprovalMode,
|
|
33753
|
+
setAgentMessageQueue,
|
|
33754
|
+
appendToAgentMessageQueue
|
|
33702
33755
|
} = useAgentViewActions();
|
|
33703
33756
|
const agent = agents.get(agentId);
|
|
33704
33757
|
const interactiveAgent = agent?.interactiveAgent;
|
|
@@ -33772,14 +33825,24 @@ var AgentComposer = /* @__PURE__ */ __name(({ agentId }) => {
|
|
|
33772
33825
|
},
|
|
33773
33826
|
[buffer, agentTabBarFocused, setAgentTabBarFocused]
|
|
33774
33827
|
);
|
|
33775
|
-
const
|
|
33828
|
+
const messageQueue = agentMessageQueues.get(agentId) ?? EMPTY_MESSAGE_QUEUE;
|
|
33829
|
+
const flushedQueueRef = (0, import_react114.useRef)(null);
|
|
33776
33830
|
(0, import_react114.useEffect)(() => {
|
|
33777
33831
|
if (streamingState === "idle" /* Idle */ && messageQueue.length > 0 && status !== void 0 && !isTerminalStatus(status)) {
|
|
33832
|
+
if (flushedQueueRef.current === messageQueue) return;
|
|
33833
|
+
flushedQueueRef.current = messageQueue;
|
|
33778
33834
|
const combined = messageQueue.join("\n");
|
|
33779
|
-
|
|
33835
|
+
setAgentMessageQueue(agentId, []);
|
|
33780
33836
|
interactiveAgent?.enqueueMessage(combined);
|
|
33781
33837
|
}
|
|
33782
|
-
}, [
|
|
33838
|
+
}, [
|
|
33839
|
+
streamingState,
|
|
33840
|
+
messageQueue,
|
|
33841
|
+
interactiveAgent,
|
|
33842
|
+
status,
|
|
33843
|
+
agentId,
|
|
33844
|
+
setAgentMessageQueue
|
|
33845
|
+
]);
|
|
33783
33846
|
const handleSubmit = (0, import_react114.useCallback)(
|
|
33784
33847
|
(text) => {
|
|
33785
33848
|
const trimmed = text.trim();
|
|
@@ -33787,10 +33850,10 @@ var AgentComposer = /* @__PURE__ */ __name(({ agentId }) => {
|
|
|
33787
33850
|
if (streamingState === "idle" /* Idle */) {
|
|
33788
33851
|
interactiveAgent.enqueueMessage(trimmed);
|
|
33789
33852
|
} else {
|
|
33790
|
-
|
|
33853
|
+
appendToAgentMessageQueue(agentId, trimmed);
|
|
33791
33854
|
}
|
|
33792
33855
|
},
|
|
33793
|
-
[interactiveAgent, streamingState]
|
|
33856
|
+
[interactiveAgent, streamingState, agentId, appendToAgentMessageQueue]
|
|
33794
33857
|
);
|
|
33795
33858
|
const statusLabel = (0, import_react114.useMemo)(() => {
|
|
33796
33859
|
switch (status) {
|
|
@@ -33826,7 +33889,7 @@ var AgentComposer = /* @__PURE__ */ __name(({ agentId }) => {
|
|
|
33826
33889
|
}
|
|
33827
33890
|
),
|
|
33828
33891
|
statusLabel && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Box_default, { marginLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Text, { color: statusLabel.color, children: statusLabel.text }) }),
|
|
33829
|
-
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(QueuedMessageDisplay, { messageQueue }),
|
|
33892
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(QueuedMessageDisplay, { messageQueue, showHint: false }),
|
|
33830
33893
|
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
33831
33894
|
BaseTextInput,
|
|
33832
33895
|
{
|
|
@@ -35098,7 +35161,7 @@ function useBranchCommand(options) {
|
|
|
35098
35161
|
let swapOpened = false;
|
|
35099
35162
|
let prevSessionData;
|
|
35100
35163
|
try {
|
|
35101
|
-
const telemetrySwapOpened = config.
|
|
35164
|
+
const telemetrySwapOpened = config.getLlmClient()?.beginTelemetrySwap?.() ?? true;
|
|
35102
35165
|
if (!telemetrySwapOpened) {
|
|
35103
35166
|
throw new Error(
|
|
35104
35167
|
"A session switch is already in progress. Try again in a moment."
|
|
@@ -35141,7 +35204,7 @@ function useBranchCommand(options) {
|
|
|
35141
35204
|
config.startNewSession(newSessionId, resumed);
|
|
35142
35205
|
coreSwapped = true;
|
|
35143
35206
|
await waitForGoalRuntime(config);
|
|
35144
|
-
await config.
|
|
35207
|
+
await config.getLlmClient()?.initialize?.("branch" /* Branch */);
|
|
35145
35208
|
const rawItems = buildResumedHistoryItems(resumed, config);
|
|
35146
35209
|
const collapseOnResume = options.settings.merged.ui?.history?.collapseOnResume ?? false;
|
|
35147
35210
|
const collapsePreviewCount = options.settings.merged.ui?.history?.collapsePreviewCount ?? 0;
|
|
@@ -35152,7 +35215,7 @@ function useBranchCommand(options) {
|
|
|
35152
35215
|
);
|
|
35153
35216
|
startNewSession(newSessionId);
|
|
35154
35217
|
uiSwapped = true;
|
|
35155
|
-
config.
|
|
35218
|
+
config.getLlmClient()?.commitTelemetrySwap?.();
|
|
35156
35219
|
clearPendingState?.();
|
|
35157
35220
|
historyManager.clearItems();
|
|
35158
35221
|
historyManager.loadHistory(uiHistoryItems);
|
|
@@ -35183,15 +35246,15 @@ function useBranchCommand(options) {
|
|
|
35183
35246
|
if (coreSwapped && !uiSwapped) {
|
|
35184
35247
|
try {
|
|
35185
35248
|
config.startNewSession(oldSessionId, prevSessionData);
|
|
35186
|
-
await config.
|
|
35249
|
+
await config.getLlmClient()?.initialize?.();
|
|
35187
35250
|
} catch (rollbackErr) {
|
|
35188
35251
|
config.getDebugLogger().warn(
|
|
35189
35252
|
`Rollback after failed /branch init failed: ${rollbackErr}`
|
|
35190
35253
|
);
|
|
35191
35254
|
}
|
|
35192
|
-
config.
|
|
35255
|
+
config.getLlmClient()?.abortTelemetrySwap?.();
|
|
35193
35256
|
} else if (swapOpened) {
|
|
35194
|
-
config.
|
|
35257
|
+
config.getLlmClient()?.commitTelemetrySwap?.();
|
|
35195
35258
|
}
|
|
35196
35259
|
if (forkCreated && !uiSwapped) {
|
|
35197
35260
|
try {
|
|
@@ -35275,7 +35338,7 @@ function useResumeCommand(options) {
|
|
|
35275
35338
|
}
|
|
35276
35339
|
closeResumeDialog();
|
|
35277
35340
|
let swapOpened = false;
|
|
35278
|
-
const telemetrySwapOpened = config.
|
|
35341
|
+
const telemetrySwapOpened = config.getLlmClient()?.beginTelemetrySwap?.() ?? true;
|
|
35279
35342
|
if (!telemetrySwapOpened) {
|
|
35280
35343
|
addItem(
|
|
35281
35344
|
{
|
|
@@ -35296,7 +35359,7 @@ function useResumeCommand(options) {
|
|
|
35296
35359
|
const sessionService = new SessionService(cwd3);
|
|
35297
35360
|
const sessionData = await sessionService.loadSession(sessionId);
|
|
35298
35361
|
if (!sessionData) {
|
|
35299
|
-
config.
|
|
35362
|
+
config.getLlmClient()?.commitTelemetrySwap?.();
|
|
35300
35363
|
return;
|
|
35301
35364
|
}
|
|
35302
35365
|
const customTitle = sessionService.getSessionTitle(sessionId);
|
|
@@ -35326,14 +35389,14 @@ function useResumeCommand(options) {
|
|
|
35326
35389
|
coreSwapped = true;
|
|
35327
35390
|
await waitForGoalRuntime(config);
|
|
35328
35391
|
config.getChatRecordingService()?.rebuildTurnBoundaries(sessionData.conversation.messages);
|
|
35329
|
-
await config.
|
|
35392
|
+
await config.getLlmClient()?.initialize?.();
|
|
35330
35393
|
const recovered = await config.loadPausedBackgroundAgents(sessionId);
|
|
35331
35394
|
if (recovered.length > 0) {
|
|
35332
35395
|
recoveredBackgroundAgentsNotice = config.getBackgroundAgentResumeService().buildRecoveredBackgroundAgentsNotice(recovered.length);
|
|
35333
35396
|
}
|
|
35334
35397
|
startNewSession(sessionId);
|
|
35335
35398
|
uiSwapped = true;
|
|
35336
|
-
config.
|
|
35399
|
+
config.getLlmClient()?.commitTelemetrySwap?.();
|
|
35337
35400
|
setSessionName?.(customTitle ?? null);
|
|
35338
35401
|
clearPendingState?.();
|
|
35339
35402
|
clearItems();
|
|
@@ -35360,7 +35423,7 @@ function useResumeCommand(options) {
|
|
|
35360
35423
|
} catch {
|
|
35361
35424
|
}
|
|
35362
35425
|
config.startNewSession(oldSessionId, prevSessionData);
|
|
35363
|
-
await config.
|
|
35426
|
+
await config.getLlmClient()?.initialize?.();
|
|
35364
35427
|
await config.loadPausedBackgroundAgents(oldSessionId).catch(() => {
|
|
35365
35428
|
});
|
|
35366
35429
|
} catch (rollbackErr) {
|
|
@@ -35368,9 +35431,9 @@ function useResumeCommand(options) {
|
|
|
35368
35431
|
`Rollback after failed /resume init failed: ${rollbackErr}`
|
|
35369
35432
|
);
|
|
35370
35433
|
}
|
|
35371
|
-
config.
|
|
35434
|
+
config.getLlmClient()?.abortTelemetrySwap?.();
|
|
35372
35435
|
} else if (swapOpened) {
|
|
35373
|
-
config.
|
|
35436
|
+
config.getLlmClient()?.commitTelemetrySwap?.();
|
|
35374
35437
|
}
|
|
35375
35438
|
addItem(
|
|
35376
35439
|
{
|
|
@@ -35670,7 +35733,7 @@ function getSkillCommandName(command) {
|
|
|
35670
35733
|
return command.skillDetail?.name ?? command.name;
|
|
35671
35734
|
}
|
|
35672
35735
|
__name(getSkillCommandName, "getSkillCommandName");
|
|
35673
|
-
var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history, addItem, clearItems, loadHistory, refreshStatic, toggleVimEnabled, isProcessing, setIsProcessing, isIdleRef,
|
|
35736
|
+
var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history, addItem, clearItems, loadHistory, refreshStatic, toggleVimEnabled, isProcessing, setIsProcessing, isIdleRef, setMemoryFileCount, actions, extensionsUpdateState, isConfigInitialized, logger, updateItem, setSessionName, extensionRefreshState) => {
|
|
35674
35737
|
const fallbackExtensionRefreshStateRef = (0, import_react130.useRef)(
|
|
35675
35738
|
null
|
|
35676
35739
|
);
|
|
@@ -35939,7 +36002,7 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history
|
|
|
35939
36002
|
btwAbortControllerRef,
|
|
35940
36003
|
isIdleRef,
|
|
35941
36004
|
toggleVimEnabled,
|
|
35942
|
-
|
|
36005
|
+
setMemoryFileCount,
|
|
35943
36006
|
reloadCommands,
|
|
35944
36007
|
setSessionName: setSessionName ?? (() => {
|
|
35945
36008
|
}),
|
|
@@ -35972,7 +36035,7 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history
|
|
|
35972
36035
|
cancelBtw,
|
|
35973
36036
|
toggleVimEnabled,
|
|
35974
36037
|
sessionShellAllowlist,
|
|
35975
|
-
|
|
36038
|
+
setMemoryFileCount,
|
|
35976
36039
|
reloadCommands,
|
|
35977
36040
|
setSessionName,
|
|
35978
36041
|
extensionsUpdateState,
|
|
@@ -36579,7 +36642,7 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history
|
|
|
36579
36642
|
}
|
|
36580
36643
|
}
|
|
36581
36644
|
case "load_history": {
|
|
36582
|
-
config?.
|
|
36645
|
+
config?.getLlmClient()?.setHistory(result.clientHistory);
|
|
36583
36646
|
fullCommandContext.ui.clear();
|
|
36584
36647
|
result.history.forEach((item, index) => {
|
|
36585
36648
|
fullCommandContext.ui.addItem(item, index);
|
|
@@ -36937,7 +37000,7 @@ var useLogger = /* @__PURE__ */ __name((storage, sessionId) => {
|
|
|
36937
37000
|
return logger;
|
|
36938
37001
|
}, "useLogger");
|
|
36939
37002
|
|
|
36940
|
-
// packages/cli/src/ui/hooks/
|
|
37003
|
+
// packages/cli/src/ui/hooks/use-llm-stream.ts
|
|
36941
37004
|
init_esbuild_shims();
|
|
36942
37005
|
var import_react137 = __toESM(require_react(), 1);
|
|
36943
37006
|
|
|
@@ -36955,9 +37018,9 @@ function copyString(value) {
|
|
|
36955
37018
|
return value.split("").join("");
|
|
36956
37019
|
}
|
|
36957
37020
|
__name(copyString, "copyString");
|
|
36958
|
-
function
|
|
37021
|
+
function addShellCommandToLlmHistory(llmClient, rawQuery, resultText) {
|
|
36959
37022
|
const modelContent = resultText.length > MAX_OUTPUT_LENGTH ? copyString(resultText.substring(0, MAX_OUTPUT_LENGTH)) + "\n... (truncated)" : resultText;
|
|
36960
|
-
|
|
37023
|
+
llmClient.addHistory({
|
|
36961
37024
|
role: "user",
|
|
36962
37025
|
parts: [
|
|
36963
37026
|
{
|
|
@@ -36974,8 +37037,8 @@ ${modelContent}
|
|
|
36974
37037
|
]
|
|
36975
37038
|
});
|
|
36976
37039
|
}
|
|
36977
|
-
__name(
|
|
36978
|
-
var useShellCommandProcessor = /* @__PURE__ */ __name((addItemToHistory, setPendingHistoryItem, onExec, onDebugMessage, config,
|
|
37040
|
+
__name(addShellCommandToLlmHistory, "addShellCommandToLlmHistory");
|
|
37041
|
+
var useShellCommandProcessor = /* @__PURE__ */ __name((addItemToHistory, setPendingHistoryItem, onExec, onDebugMessage, config, llmClient, setShellInputFocused, terminalWidth, terminalHeight) => {
|
|
36979
37042
|
const [activeShellPtyId, setActiveShellPtyId] = (0, import_react133.useState)(null);
|
|
36980
37043
|
const handleShellCommand = (0, import_react133.useCallback)(
|
|
36981
37044
|
(rawQuery, abortSignal) => {
|
|
@@ -37166,11 +37229,7 @@ ${finalOutput}`;
|
|
|
37166
37229
|
},
|
|
37167
37230
|
userMessageTimestamp
|
|
37168
37231
|
);
|
|
37169
|
-
|
|
37170
|
-
geminiClient,
|
|
37171
|
-
rawQuery,
|
|
37172
|
-
finalOutput
|
|
37173
|
-
);
|
|
37232
|
+
addShellCommandToLlmHistory(llmClient, rawQuery, finalOutput);
|
|
37174
37233
|
}).catch((err) => {
|
|
37175
37234
|
setPendingHistoryItem(null);
|
|
37176
37235
|
const errorMessage = err instanceof Error ? err.message : String(err);
|
|
@@ -37220,7 +37279,7 @@ ${finalOutput}`;
|
|
|
37220
37279
|
addItemToHistory,
|
|
37221
37280
|
setPendingHistoryItem,
|
|
37222
37281
|
onExec,
|
|
37223
|
-
|
|
37282
|
+
llmClient,
|
|
37224
37283
|
setShellInputFocused,
|
|
37225
37284
|
terminalHeight,
|
|
37226
37285
|
terminalWidth
|
|
@@ -37289,17 +37348,17 @@ function useReactToolScheduler(onComplete, config, getPreferredEditor, onEditorC
|
|
|
37289
37348
|
const existingTrackedCall = prevTrackedCalls.find(
|
|
37290
37349
|
(ptc) => ptc.request.callId === coreTc.request.callId
|
|
37291
37350
|
);
|
|
37292
|
-
const
|
|
37351
|
+
const responseSubmittedToLlm = existingTrackedCall?.responseSubmittedToLlm ?? false;
|
|
37293
37352
|
if (coreTc.status === "executing") {
|
|
37294
37353
|
return {
|
|
37295
37354
|
...coreTc,
|
|
37296
|
-
|
|
37355
|
+
responseSubmittedToLlm,
|
|
37297
37356
|
liveOutput: existingTrackedCall?.liveOutput
|
|
37298
37357
|
};
|
|
37299
37358
|
}
|
|
37300
37359
|
return {
|
|
37301
37360
|
...coreTc,
|
|
37302
|
-
|
|
37361
|
+
responseSubmittedToLlm,
|
|
37303
37362
|
liveOutput: void 0,
|
|
37304
37363
|
pid: void 0,
|
|
37305
37364
|
promoteAbortController: void 0
|
|
@@ -37388,7 +37447,7 @@ function useReactToolScheduler(onComplete, config, getPreferredEditor, onEditorC
|
|
|
37388
37447
|
(callIdsToMark) => {
|
|
37389
37448
|
setToolCallsForDisplay(
|
|
37390
37449
|
(prevCalls) => prevCalls.map(
|
|
37391
|
-
(tc) => callIdsToMark.includes(tc.request.callId) ? { ...tc,
|
|
37450
|
+
(tc) => callIdsToMark.includes(tc.request.callId) ? { ...tc, responseSubmittedToLlm: true } : tc
|
|
37392
37451
|
)
|
|
37393
37452
|
);
|
|
37394
37453
|
},
|
|
@@ -37555,7 +37614,7 @@ function mapToDisplay(toolOrTools, projectRoot) {
|
|
|
37555
37614
|
}
|
|
37556
37615
|
__name(mapToDisplay, "mapToDisplay");
|
|
37557
37616
|
|
|
37558
|
-
// packages/cli/src/ui/hooks/
|
|
37617
|
+
// packages/cli/src/ui/hooks/use-llm-stream.ts
|
|
37559
37618
|
import { promises as fs17 } from "node:fs";
|
|
37560
37619
|
import path12 from "node:path";
|
|
37561
37620
|
import process16 from "node:process";
|
|
@@ -37633,6 +37692,7 @@ function useMessageQueue() {
|
|
|
37633
37692
|
permit: { ...input.permit },
|
|
37634
37693
|
turnKey: `goal-runtime:${input.permit.turnId}`,
|
|
37635
37694
|
continuationContext: input.continuationContext,
|
|
37695
|
+
...input.objectiveUpdated ? { objectiveUpdated: input.objectiveUpdated } : {},
|
|
37636
37696
|
...input.windDown ? { windDown: true } : {},
|
|
37637
37697
|
...input.verifierFeedback ? { verifierFeedback: input.verifierFeedback } : {}
|
|
37638
37698
|
};
|
|
@@ -37822,7 +37882,7 @@ function useMessageQueue() {
|
|
|
37822
37882
|
}
|
|
37823
37883
|
__name(useMessageQueue, "useMessageQueue");
|
|
37824
37884
|
|
|
37825
|
-
// packages/cli/src/ui/hooks/
|
|
37885
|
+
// packages/cli/src/ui/hooks/use-llm-stream.ts
|
|
37826
37886
|
var debugLogger39 = createDebugLogger("GEMINI_STREAM");
|
|
37827
37887
|
function applyModelOverride(modelOverrideRef, inlineActiveRef, value, isInline) {
|
|
37828
37888
|
modelOverrideRef.current = value;
|
|
@@ -37977,7 +38037,7 @@ function charIndexAfterLine(text, keptLines) {
|
|
|
37977
38037
|
return -1;
|
|
37978
38038
|
}
|
|
37979
38039
|
__name(charIndexAfterLine, "charIndexAfterLine");
|
|
37980
|
-
var
|
|
38040
|
+
var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config, isConfigInitialized, settings, onDebugMessage, handleSlashCommand, shellModeActive, getPreferredEditor, onAuthError, performMemoryRefresh, modelSwitchedFromQuotaError, setModelSwitchedFromQuotaError, onEditorClose, onCancelSubmit, setShellInputFocused, terminalWidth, terminalHeight, midTurnDrainRef, logger, availableTerminalHeightRef, terminalWidthRef, midTurnRestoreRef, goalQueueRef) => {
|
|
37981
38041
|
const [initError, setInitError] = (0, import_react137.useState)(null);
|
|
37982
38042
|
const abortControllerRef = (0, import_react137.useRef)(null);
|
|
37983
38043
|
const activeInteractionPromptIdRef = (0, import_react137.useRef)(void 0);
|
|
@@ -38384,7 +38444,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
38384
38444
|
onExec,
|
|
38385
38445
|
onDebugMessage,
|
|
38386
38446
|
config,
|
|
38387
|
-
|
|
38447
|
+
llmClient,
|
|
38388
38448
|
setShellInputFocused,
|
|
38389
38449
|
terminalWidth,
|
|
38390
38450
|
terminalHeight
|
|
@@ -38407,7 +38467,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
38407
38467
|
return "waiting_for_confirmation" /* WaitingForConfirmation */;
|
|
38408
38468
|
}
|
|
38409
38469
|
if (isResponding || toolCalls.some(
|
|
38410
|
-
(tc) => tc.status === "executing" || tc.status === "scheduled" || tc.status === "validating" || (tc.status === "success" || tc.status === "error" || tc.status === "cancelled") && !tc.
|
|
38470
|
+
(tc) => tc.status === "executing" || tc.status === "scheduled" || tc.status === "validating" || (tc.status === "success" || tc.status === "error" || tc.status === "cancelled") && !tc.responseSubmittedToLlm
|
|
38411
38471
|
)) {
|
|
38412
38472
|
return "responding" /* Responding */;
|
|
38413
38473
|
}
|
|
@@ -38585,7 +38645,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
38585
38645
|
},
|
|
38586
38646
|
[addItem, config]
|
|
38587
38647
|
);
|
|
38588
|
-
const
|
|
38648
|
+
const prepareQueryForLlm = (0, import_react137.useCallback)(
|
|
38589
38649
|
async (query, userMessageTimestamp, abortSignal, prompt_id, submitType, submittedPrompt, preserveTurnOwnership) => {
|
|
38590
38650
|
if (turnCancelledRef.current && !preserveTurnOwnership) {
|
|
38591
38651
|
return { queryToSend: null, shouldProceed: false };
|
|
@@ -38596,7 +38656,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
38596
38656
|
if (!preserveTurnOwnership) {
|
|
38597
38657
|
lastTurnUserItemRef.current = null;
|
|
38598
38658
|
}
|
|
38599
|
-
let
|
|
38659
|
+
let localQueryToSendToLlm = null;
|
|
38600
38660
|
if (typeof query === "string") {
|
|
38601
38661
|
const trimmedQuery = query.trim();
|
|
38602
38662
|
if (submitType === "notification" /* Notification */) {
|
|
@@ -38635,7 +38695,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
38635
38695
|
};
|
|
38636
38696
|
}
|
|
38637
38697
|
case "submit_prompt": {
|
|
38638
|
-
|
|
38698
|
+
localQueryToSendToLlm = slashCommandResult.content;
|
|
38639
38699
|
submitPromptOnCompleteRef.current = slashCommandResult.onComplete ?? null;
|
|
38640
38700
|
refreshContextFilesOnWriteRef.current = Boolean(
|
|
38641
38701
|
slashCommandResult.refreshContextFilesOnWrite
|
|
@@ -38658,16 +38718,16 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
38658
38718
|
}
|
|
38659
38719
|
}
|
|
38660
38720
|
const bridgeResult2 = await applyVisionBridgeIfNeeded(
|
|
38661
|
-
|
|
38721
|
+
localQueryToSendToLlm,
|
|
38662
38722
|
userMessageTimestamp,
|
|
38663
38723
|
abortSignal
|
|
38664
38724
|
);
|
|
38665
38725
|
if (!bridgeResult2.shouldProceed) {
|
|
38666
38726
|
return { queryToSend: null, shouldProceed: false };
|
|
38667
38727
|
}
|
|
38668
|
-
|
|
38728
|
+
localQueryToSendToLlm = bridgeResult2.parts;
|
|
38669
38729
|
return {
|
|
38670
|
-
queryToSend:
|
|
38730
|
+
queryToSend: localQueryToSendToLlm,
|
|
38671
38731
|
shouldProceed: true
|
|
38672
38732
|
};
|
|
38673
38733
|
}
|
|
@@ -38685,7 +38745,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
38685
38745
|
if (shellModeActive && handleShellCommand(trimmedQuery, abortSignal)) {
|
|
38686
38746
|
return { queryToSend: null, shouldProceed: false };
|
|
38687
38747
|
}
|
|
38688
|
-
|
|
38748
|
+
localQueryToSendToLlm = trimmedQuery;
|
|
38689
38749
|
if (submitType !== "cron" /* Cron */) {
|
|
38690
38750
|
const insertedId = addItem(
|
|
38691
38751
|
{
|
|
@@ -38716,27 +38776,27 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
38716
38776
|
if (!atCommandResult.shouldProceed) {
|
|
38717
38777
|
return { queryToSend: null, shouldProceed: false };
|
|
38718
38778
|
}
|
|
38719
|
-
|
|
38779
|
+
localQueryToSendToLlm = atCommandResult.processedQuery;
|
|
38720
38780
|
}
|
|
38721
38781
|
const bridgeResult = await applyVisionBridgeIfNeeded(
|
|
38722
|
-
|
|
38782
|
+
localQueryToSendToLlm,
|
|
38723
38783
|
userMessageTimestamp,
|
|
38724
38784
|
abortSignal
|
|
38725
38785
|
);
|
|
38726
38786
|
if (!bridgeResult.shouldProceed) {
|
|
38727
38787
|
return { queryToSend: null, shouldProceed: false };
|
|
38728
38788
|
}
|
|
38729
|
-
|
|
38789
|
+
localQueryToSendToLlm = bridgeResult.parts;
|
|
38730
38790
|
} else {
|
|
38731
|
-
|
|
38791
|
+
localQueryToSendToLlm = query;
|
|
38732
38792
|
}
|
|
38733
|
-
if (
|
|
38793
|
+
if (localQueryToSendToLlm === null) {
|
|
38734
38794
|
onDebugMessage(
|
|
38735
|
-
"Query processing resulted in null, not sending to
|
|
38795
|
+
"Query processing resulted in null, not sending to the model."
|
|
38736
38796
|
);
|
|
38737
38797
|
return { queryToSend: null, shouldProceed: false };
|
|
38738
38798
|
}
|
|
38739
|
-
return { queryToSend:
|
|
38799
|
+
return { queryToSend: localQueryToSendToLlm, shouldProceed: true };
|
|
38740
38800
|
},
|
|
38741
38801
|
[
|
|
38742
38802
|
config,
|
|
@@ -38752,24 +38812,24 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
38752
38812
|
]
|
|
38753
38813
|
);
|
|
38754
38814
|
const handleContentEvent = (0, import_react137.useCallback)(
|
|
38755
|
-
(eventValue,
|
|
38815
|
+
(eventValue, currentLlmMessageBuffer, userMessageTimestamp, startAsContinuation = false) => {
|
|
38756
38816
|
if (turnCancelledRef.current) {
|
|
38757
38817
|
return "";
|
|
38758
38818
|
}
|
|
38759
38819
|
streamingResponseLengthRef.current += eventValue.length;
|
|
38760
38820
|
setIsReceivingContent(true);
|
|
38761
38821
|
turnSawContentEventRef.current = true;
|
|
38762
|
-
let
|
|
38822
|
+
let newLlmMessageBuffer = currentLlmMessageBuffer + eventValue;
|
|
38763
38823
|
const pendingItem = pendingHistoryItemRef.current;
|
|
38764
38824
|
if ((pendingItem?.type === "gemini" || pendingItem?.type === "gemini_content") && (pendingItem.images?.length || pendingItem.omittedImageCount)) {
|
|
38765
|
-
if (
|
|
38766
|
-
return
|
|
38825
|
+
if (newLlmMessageBuffer.trim().length === 0) {
|
|
38826
|
+
return newLlmMessageBuffer;
|
|
38767
38827
|
}
|
|
38768
38828
|
stagePendingAssistantItem();
|
|
38769
38829
|
}
|
|
38770
38830
|
if (pendingHistoryItemRef.current?.type !== "gemini" && pendingHistoryItemRef.current?.type !== "gemini_content") {
|
|
38771
|
-
if (
|
|
38772
|
-
return
|
|
38831
|
+
if (newLlmMessageBuffer.trim().length === 0) {
|
|
38832
|
+
return newLlmMessageBuffer;
|
|
38773
38833
|
}
|
|
38774
38834
|
if (pendingHistoryItemRef.current) {
|
|
38775
38835
|
commitItemInOrder(
|
|
@@ -38780,17 +38840,17 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
38780
38840
|
setPendingHistoryItem(
|
|
38781
38841
|
startAsContinuation ? { type: "gemini_content", text: "" } : { type: "gemini", text: "", timestamp: Date.now() }
|
|
38782
38842
|
);
|
|
38783
|
-
|
|
38843
|
+
newLlmMessageBuffer = stripLeadingBlankLines(newLlmMessageBuffer);
|
|
38784
38844
|
}
|
|
38785
38845
|
let nextPendingType = pendingHistoryItemRef.current?.type === "gemini_content" ? "gemini_content" : pendingHistoryItemRef.current?.type === "gemini" ? "gemini" : startAsContinuation ? "gemini_content" : "gemini";
|
|
38786
|
-
while (
|
|
38846
|
+
while (newLlmMessageBuffer.length > STREAM_PENDING_ITEM_MAX_CHARS) {
|
|
38787
38847
|
const splitPoint = findLastSafeSplitPoint(
|
|
38788
|
-
|
|
38848
|
+
newLlmMessageBuffer,
|
|
38789
38849
|
STREAM_PENDING_ITEM_MAX_CHARS
|
|
38790
38850
|
);
|
|
38791
|
-
const safeSplitPoint = splitPoint > 0 && splitPoint <
|
|
38851
|
+
const safeSplitPoint = splitPoint > 0 && splitPoint < newLlmMessageBuffer.length ? splitPoint : STREAM_PENDING_ITEM_MAX_CHARS;
|
|
38792
38852
|
const { before: beforeText, after: afterText } = splitFencedMarkdown(
|
|
38793
|
-
|
|
38853
|
+
newLlmMessageBuffer,
|
|
38794
38854
|
safeSplitPoint
|
|
38795
38855
|
);
|
|
38796
38856
|
commitItemInOrder(
|
|
@@ -38801,7 +38861,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
38801
38861
|
userMessageTimestamp
|
|
38802
38862
|
);
|
|
38803
38863
|
nextPendingType = "gemini_content";
|
|
38804
|
-
|
|
38864
|
+
newLlmMessageBuffer = afterText;
|
|
38805
38865
|
}
|
|
38806
38866
|
const viewportRows = (availableTerminalHeightRef?.current ?? 0) > 0 ? availableTerminalHeightRef.current : Math.max(4, terminalHeight - STREAM_PENDING_COMPOSER_RESERVE_ROWS);
|
|
38807
38867
|
const commitWidth = (terminalWidthRef?.current ?? 0) > 0 ? terminalWidthRef.current : terminalWidth;
|
|
@@ -38811,7 +38871,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
38811
38871
|
);
|
|
38812
38872
|
const tableClampRows = Math.max(2, viewportRows - 3);
|
|
38813
38873
|
while (true) {
|
|
38814
|
-
const bufferLines =
|
|
38874
|
+
const bufferLines = newLlmMessageBuffer.split("\n");
|
|
38815
38875
|
const { keptLines, clipped } = fitPendingSlice(
|
|
38816
38876
|
bufferLines,
|
|
38817
38877
|
commitWidth,
|
|
@@ -38828,28 +38888,22 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
38828
38888
|
}
|
|
38829
38889
|
let target;
|
|
38830
38890
|
if (boundaryLine < 0) {
|
|
38831
|
-
const capIndex = charIndexAfterLine(
|
|
38832
|
-
|
|
38833
|
-
keptLines
|
|
38834
|
-
);
|
|
38835
|
-
const fenceInfo = capIndex > 0 ? getEnclosingFenceInfo(newGeminiMessageBuffer, capIndex) : null;
|
|
38891
|
+
const capIndex = charIndexAfterLine(newLlmMessageBuffer, keptLines);
|
|
38892
|
+
const fenceInfo = capIndex > 0 ? getEnclosingFenceInfo(newLlmMessageBuffer, capIndex) : null;
|
|
38836
38893
|
if (!fenceInfo || fenceInfo.lang?.toLowerCase() === "mermaid") {
|
|
38837
38894
|
break;
|
|
38838
38895
|
}
|
|
38839
38896
|
target = capIndex;
|
|
38840
38897
|
} else {
|
|
38841
|
-
target = charIndexAfterLine(
|
|
38898
|
+
target = charIndexAfterLine(newLlmMessageBuffer, boundaryLine + 1);
|
|
38842
38899
|
if (target <= 0) break;
|
|
38843
38900
|
}
|
|
38844
|
-
const splitPoint = findLastSafeSplitPoint(
|
|
38845
|
-
|
|
38846
|
-
target
|
|
38847
|
-
);
|
|
38848
|
-
if (splitPoint <= 0 || splitPoint >= newGeminiMessageBuffer.length) {
|
|
38901
|
+
const splitPoint = findLastSafeSplitPoint(newLlmMessageBuffer, target);
|
|
38902
|
+
if (splitPoint <= 0 || splitPoint >= newLlmMessageBuffer.length) {
|
|
38849
38903
|
break;
|
|
38850
38904
|
}
|
|
38851
38905
|
const { before: beforeText, after: afterText } = splitFencedMarkdown(
|
|
38852
|
-
|
|
38906
|
+
newLlmMessageBuffer,
|
|
38853
38907
|
splitPoint
|
|
38854
38908
|
);
|
|
38855
38909
|
commitItemInOrder(
|
|
@@ -38860,19 +38914,19 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
38860
38914
|
userMessageTimestamp
|
|
38861
38915
|
);
|
|
38862
38916
|
nextPendingType = "gemini_content";
|
|
38863
|
-
|
|
38917
|
+
newLlmMessageBuffer = afterText;
|
|
38864
38918
|
}
|
|
38865
38919
|
setPendingHistoryItem((item) => {
|
|
38866
38920
|
const base = {
|
|
38867
38921
|
type: nextPendingType,
|
|
38868
|
-
text:
|
|
38922
|
+
text: newLlmMessageBuffer
|
|
38869
38923
|
};
|
|
38870
38924
|
if (item && "timestamp" in item) {
|
|
38871
38925
|
base.timestamp = item.timestamp;
|
|
38872
38926
|
}
|
|
38873
38927
|
return base;
|
|
38874
38928
|
});
|
|
38875
|
-
return
|
|
38929
|
+
return newLlmMessageBuffer;
|
|
38876
38930
|
},
|
|
38877
38931
|
[
|
|
38878
38932
|
commitItemInOrder,
|
|
@@ -39198,7 +39252,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
39198
39252
|
(result) => {
|
|
39199
39253
|
setLoopDetectionConfirmationRequest(null);
|
|
39200
39254
|
if (result.userSelection === "disable") {
|
|
39201
|
-
config.
|
|
39255
|
+
config.getLlmClient().getLoopDetectionService().disableForSession();
|
|
39202
39256
|
addItem(
|
|
39203
39257
|
{
|
|
39204
39258
|
type: "info",
|
|
@@ -39258,9 +39312,9 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
39258
39312
|
},
|
|
39259
39313
|
[addItem, commitItemInOrder, pendingHistoryItemRef, setPendingHistoryItem]
|
|
39260
39314
|
);
|
|
39261
|
-
const
|
|
39315
|
+
const processLlmStreamEvents = (0, import_react137.useCallback)(
|
|
39262
39316
|
async (stream, userMessageTimestamp, signal, submitType, turnAdmission, promptId, trackInteractionOwner = true, toolContinuationOwner) => {
|
|
39263
|
-
let
|
|
39317
|
+
let llmMessageBuffer = "";
|
|
39264
39318
|
let thoughtBuffer = "";
|
|
39265
39319
|
let scheduledToolContinuation = false;
|
|
39266
39320
|
let assistantOutputStarted = pendingHistoryItemRef.current?.type === "gemini" || pendingHistoryItemRef.current?.type === "gemini_content";
|
|
@@ -39301,9 +39355,9 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
39301
39355
|
}
|
|
39302
39356
|
contentParts.push(queuedContent.value);
|
|
39303
39357
|
}
|
|
39304
|
-
|
|
39358
|
+
llmMessageBuffer = handleContentEvent(
|
|
39305
39359
|
contentParts.join(""),
|
|
39306
|
-
|
|
39360
|
+
llmMessageBuffer,
|
|
39307
39361
|
userMessageTimestamp,
|
|
39308
39362
|
assistantOutputStarted
|
|
39309
39363
|
);
|
|
@@ -39326,7 +39380,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
39326
39380
|
...pendingItem,
|
|
39327
39381
|
omittedImageCount: (pendingItem.omittedImageCount ?? 0) + 1
|
|
39328
39382
|
});
|
|
39329
|
-
|
|
39383
|
+
llmMessageBuffer = "";
|
|
39330
39384
|
assistantOutputStarted = true;
|
|
39331
39385
|
continue;
|
|
39332
39386
|
}
|
|
@@ -39339,7 +39393,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
39339
39393
|
setPendingHistoryItem(null);
|
|
39340
39394
|
}
|
|
39341
39395
|
}
|
|
39342
|
-
|
|
39396
|
+
llmMessageBuffer = "";
|
|
39343
39397
|
if (shouldDisplayImage) {
|
|
39344
39398
|
setPendingHistoryItem({
|
|
39345
39399
|
type: assistantOutputStarted ? "gemini_content" : "gemini",
|
|
@@ -39473,7 +39527,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
39473
39527
|
case "chat_compressed" /* ChatCompressed */:
|
|
39474
39528
|
flushBufferedStreamEvents();
|
|
39475
39529
|
handleChatCompressionEvent(event.value, userMessageTimestamp);
|
|
39476
|
-
|
|
39530
|
+
llmMessageBuffer = "";
|
|
39477
39531
|
assistantOutputStarted = false;
|
|
39478
39532
|
break;
|
|
39479
39533
|
case "tool_call_confirmation" /* ToolCallConfirmation */:
|
|
@@ -39490,7 +39544,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
39490
39544
|
setPendingHistoryItem(null);
|
|
39491
39545
|
}
|
|
39492
39546
|
handleMaxSessionTurnsEvent();
|
|
39493
|
-
|
|
39547
|
+
llmMessageBuffer = "";
|
|
39494
39548
|
assistantOutputStarted = false;
|
|
39495
39549
|
break;
|
|
39496
39550
|
case "session_token_limit_exceeded" /* SessionTokenLimitExceeded */:
|
|
@@ -39503,7 +39557,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
39503
39557
|
setPendingHistoryItem(null);
|
|
39504
39558
|
}
|
|
39505
39559
|
handleSessionTokenLimitExceededEvent(event.value);
|
|
39506
|
-
|
|
39560
|
+
llmMessageBuffer = "";
|
|
39507
39561
|
assistantOutputStarted = false;
|
|
39508
39562
|
break;
|
|
39509
39563
|
case "finished" /* Finished */:
|
|
@@ -39516,7 +39570,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
39516
39570
|
);
|
|
39517
39571
|
setPendingHistoryItem(null);
|
|
39518
39572
|
}
|
|
39519
|
-
|
|
39573
|
+
llmMessageBuffer = "";
|
|
39520
39574
|
thoughtBuffer = "";
|
|
39521
39575
|
assistantOutputStarted = false;
|
|
39522
39576
|
assistantInlineImageCount = 0;
|
|
@@ -39530,7 +39584,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
39530
39584
|
flushBufferedStreamEvents();
|
|
39531
39585
|
handleCitationEvent(event.value, userMessageTimestamp);
|
|
39532
39586
|
if (showCitations(settings)) {
|
|
39533
|
-
|
|
39587
|
+
llmMessageBuffer = "";
|
|
39534
39588
|
assistantOutputStarted = false;
|
|
39535
39589
|
}
|
|
39536
39590
|
break;
|
|
@@ -39548,7 +39602,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
39548
39602
|
commitPendingThought(userMessageTimestamp);
|
|
39549
39603
|
thoughtBuffer = "";
|
|
39550
39604
|
setThought(null);
|
|
39551
|
-
|
|
39605
|
+
llmMessageBuffer = "";
|
|
39552
39606
|
assistantOutputStarted = false;
|
|
39553
39607
|
assistantInlineImageCount = 0;
|
|
39554
39608
|
} else {
|
|
@@ -39570,7 +39624,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
39570
39624
|
commitPendingThought(userMessageTimestamp);
|
|
39571
39625
|
thoughtBuffer = "";
|
|
39572
39626
|
setThought(null);
|
|
39573
|
-
|
|
39627
|
+
llmMessageBuffer = "";
|
|
39574
39628
|
assistantOutputStarted = false;
|
|
39575
39629
|
assistantInlineImageCount = 0;
|
|
39576
39630
|
toolCallRequests.length = 0;
|
|
@@ -39602,7 +39656,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
39602
39656
|
},
|
|
39603
39657
|
userMessageTimestamp
|
|
39604
39658
|
);
|
|
39605
|
-
|
|
39659
|
+
llmMessageBuffer = "";
|
|
39606
39660
|
assistantOutputStarted = false;
|
|
39607
39661
|
break;
|
|
39608
39662
|
case "user_prompt_submit_blocked" /* UserPromptSubmitBlocked */:
|
|
@@ -39611,13 +39665,13 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
39611
39665
|
event.value,
|
|
39612
39666
|
userMessageTimestamp
|
|
39613
39667
|
);
|
|
39614
|
-
|
|
39668
|
+
llmMessageBuffer = "";
|
|
39615
39669
|
assistantOutputStarted = false;
|
|
39616
39670
|
break;
|
|
39617
39671
|
case "stop_hook_loop" /* StopHookLoop */:
|
|
39618
39672
|
flushBufferedStreamEvents();
|
|
39619
39673
|
handleStopHookLoopEvent(event.value, userMessageTimestamp);
|
|
39620
|
-
|
|
39674
|
+
llmMessageBuffer = "";
|
|
39621
39675
|
assistantOutputStarted = false;
|
|
39622
39676
|
break;
|
|
39623
39677
|
case "active_goal" /* ActiveGoal */:
|
|
@@ -39640,7 +39694,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
39640
39694
|
},
|
|
39641
39695
|
userMessageTimestamp
|
|
39642
39696
|
);
|
|
39643
|
-
|
|
39697
|
+
llmMessageBuffer = "";
|
|
39644
39698
|
assistantOutputStarted = false;
|
|
39645
39699
|
}
|
|
39646
39700
|
break;
|
|
@@ -39662,7 +39716,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
39662
39716
|
const duplicateResponses = [];
|
|
39663
39717
|
let duplicatePromptId;
|
|
39664
39718
|
const handledToolCallFingerprints = new Map(
|
|
39665
|
-
|
|
39719
|
+
llmClient ? llmClient.getHistoryToolCallFingerprints() : []
|
|
39666
39720
|
);
|
|
39667
39721
|
for (const [
|
|
39668
39722
|
providerCallId,
|
|
@@ -39689,7 +39743,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
39689
39743
|
);
|
|
39690
39744
|
if (repeatedDuplicateRequest?.providerCallId) {
|
|
39691
39745
|
debugLogger39.debug(
|
|
39692
|
-
`[
|
|
39746
|
+
`[processLlmStreamEvents] Dropping batch after repeated duplicate provider tool-call id: ${repeatedDuplicateRequest.providerCallId} (tool: ${repeatedDuplicateRequest.name})`
|
|
39693
39747
|
);
|
|
39694
39748
|
loopDetectedRef.current = true;
|
|
39695
39749
|
return {
|
|
@@ -39710,7 +39764,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
39710
39764
|
);
|
|
39711
39765
|
const response = createDuplicateProviderToolCallResponse(request);
|
|
39712
39766
|
debugLogger39.debug(
|
|
39713
|
-
`[
|
|
39767
|
+
`[processLlmStreamEvents] Suppressing duplicate provider tool-call id: ${providerCallId} (tool: ${request.name})`
|
|
39714
39768
|
);
|
|
39715
39769
|
dualOutput?.emitToolResult(request, response);
|
|
39716
39770
|
duplicateResponses.push({ request, response });
|
|
@@ -39789,7 +39843,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
39789
39843
|
handleErrorEvent,
|
|
39790
39844
|
registerToolBatch,
|
|
39791
39845
|
scheduleToolCalls,
|
|
39792
|
-
|
|
39846
|
+
llmClient,
|
|
39793
39847
|
handleChatCompressionEvent,
|
|
39794
39848
|
handleFinishedEvent,
|
|
39795
39849
|
handleMaxSessionTurnsEvent,
|
|
@@ -40146,11 +40200,12 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
40146
40200
|
goalId: queuedGoal.permit.goalId,
|
|
40147
40201
|
revision: queuedGoal.permit.revision,
|
|
40148
40202
|
objective: queuedGoal.continuationContext,
|
|
40203
|
+
objectiveUpdated: queuedGoal.objectiveUpdated,
|
|
40149
40204
|
windDown: queuedGoal.windDown,
|
|
40150
40205
|
verifierFeedback: queuedGoal.verifierFeedback
|
|
40151
40206
|
}),
|
|
40152
40207
|
shouldProceed: true
|
|
40153
|
-
} : { queryToSend: null, shouldProceed: false } : submitType === "retry" /* Retry */ ? { queryToSend: query, shouldProceed: true } : await
|
|
40208
|
+
} : { queryToSend: null, shouldProceed: false } : submitType === "retry" /* Retry */ ? { queryToSend: query, shouldProceed: true } : await prepareQueryForLlm(
|
|
40154
40209
|
query,
|
|
40155
40210
|
userMessageTimestamp,
|
|
40156
40211
|
abortSignal,
|
|
@@ -40304,8 +40359,14 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
40304
40359
|
...submittedPrompt !== void 0 ? { submittedPrompt } : {},
|
|
40305
40360
|
...!allowConcurrentBtwDuringResponse && !isDetachedToolContinuation && midTurnDrainRef ? { getSteerInput: drainSteerAtBoundary } : {}
|
|
40306
40361
|
};
|
|
40362
|
+
if (submitType === "goal" /* Goal */ && goalBinding) {
|
|
40363
|
+
try {
|
|
40364
|
+
config.getGoalRuntime().markTurnDelivered(goalBinding.turnKey);
|
|
40365
|
+
} catch {
|
|
40366
|
+
}
|
|
40367
|
+
}
|
|
40307
40368
|
const providerSignal = inheritedToolContinuationOwner ? processingSignal : abortSignal;
|
|
40308
|
-
const stream =
|
|
40369
|
+
const stream = llmClient.sendMessageStream(
|
|
40309
40370
|
finalQueryToSend,
|
|
40310
40371
|
providerSignal,
|
|
40311
40372
|
prompt_id,
|
|
@@ -40325,7 +40386,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
40325
40386
|
} : {}
|
|
40326
40387
|
}
|
|
40327
40388
|
);
|
|
40328
|
-
const processingResult = await
|
|
40389
|
+
const processingResult = await processLlmStreamEvents(
|
|
40329
40390
|
stream,
|
|
40330
40391
|
userMessageTimestamp,
|
|
40331
40392
|
processingSignal,
|
|
@@ -40381,7 +40442,6 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
40381
40442
|
);
|
|
40382
40443
|
immediateDuplicateToolResponses.responses.forEach(
|
|
40383
40444
|
({ request, response }, index) => {
|
|
40384
|
-
const goalContext = request.goalContext;
|
|
40385
40445
|
config.getChatRecordingService?.()?.recordToolResult?.(
|
|
40386
40446
|
finalized[index].responseParts,
|
|
40387
40447
|
{
|
|
@@ -40394,10 +40454,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
40394
40454
|
errorType: response.errorType,
|
|
40395
40455
|
executionStatus: response.executionStatus
|
|
40396
40456
|
},
|
|
40397
|
-
|
|
40398
|
-
goalContext: { ...goalContext },
|
|
40399
|
-
provenance: "goal_runtime"
|
|
40400
|
-
} : { goalContext: { ...goalContext } } : void 0
|
|
40457
|
+
goalToolResultProvenance(request)
|
|
40401
40458
|
);
|
|
40402
40459
|
}
|
|
40403
40460
|
);
|
|
@@ -40434,8 +40491,8 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
40434
40491
|
debugLogger39.error("onComplete callback failed:", err);
|
|
40435
40492
|
});
|
|
40436
40493
|
}
|
|
40437
|
-
if (
|
|
40438
|
-
const memoryTaskPromises =
|
|
40494
|
+
if (llmClient) {
|
|
40495
|
+
const memoryTaskPromises = llmClient.consumePendingMemoryTaskPromises();
|
|
40439
40496
|
for (const p of memoryTaskPromises) {
|
|
40440
40497
|
void p.then((count) => {
|
|
40441
40498
|
if (count > 0) {
|
|
@@ -40534,8 +40591,8 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
40534
40591
|
[
|
|
40535
40592
|
streamingState,
|
|
40536
40593
|
setModelSwitchedFromQuotaError,
|
|
40537
|
-
|
|
40538
|
-
|
|
40594
|
+
prepareQueryForLlm,
|
|
40595
|
+
processLlmStreamEvents,
|
|
40539
40596
|
pendingHistoryItemRef,
|
|
40540
40597
|
addItem,
|
|
40541
40598
|
commitPendingAssistantItems,
|
|
@@ -40543,7 +40600,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
40543
40600
|
setPendingAssistantItems,
|
|
40544
40601
|
setPendingHistoryItem,
|
|
40545
40602
|
setInitError,
|
|
40546
|
-
|
|
40603
|
+
llmClient,
|
|
40547
40604
|
onAuthError,
|
|
40548
40605
|
config,
|
|
40549
40606
|
startNewPrompt,
|
|
@@ -40641,7 +40698,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
40641
40698
|
return false;
|
|
40642
40699
|
}
|
|
40643
40700
|
);
|
|
40644
|
-
const historyCallIdsWithResponse =
|
|
40701
|
+
const historyCallIdsWithResponse = llmClient ? llmClient.getHistoryFunctionResponseIds() : /* @__PURE__ */ new Set();
|
|
40645
40702
|
const dedupedTools = completedAndReadyToSubmitTools.filter(
|
|
40646
40703
|
(tc) => historyCallIdsWithResponse.has(tc.request.callId)
|
|
40647
40704
|
);
|
|
@@ -40653,7 +40710,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
40653
40710
|
for (const tc of dedupedTools) {
|
|
40654
40711
|
if (tc.request.isClientInitiated) continue;
|
|
40655
40712
|
if (tc.status === "cancelled") continue;
|
|
40656
|
-
|
|
40713
|
+
llmClient?.recordCompletedToolCall(
|
|
40657
40714
|
tc.request.name,
|
|
40658
40715
|
tc.request.args
|
|
40659
40716
|
);
|
|
@@ -40721,7 +40778,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
40721
40778
|
const newSuccessfulMemorySaves = completedAndReadyToSubmitTools.filter(
|
|
40722
40779
|
(t2) => t2.request.name === "save_memory" && t2.status === "success" && !processedMemoryToolsRef.current.has(t2.request.callId)
|
|
40723
40780
|
);
|
|
40724
|
-
let
|
|
40781
|
+
let llmTools = completedAndReadyToSubmitTools.filter(
|
|
40725
40782
|
(t2) => !t2.request.isClientInitiated && !historyCallIdsWithResponse.has(t2.request.callId)
|
|
40726
40783
|
);
|
|
40727
40784
|
const terminalPromptId = completedAndReadyToSubmitTools.find(
|
|
@@ -40734,14 +40791,14 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
40734
40791
|
return owner && ownerPromptId && getActiveInteractionSpan(ownerPromptId) === owner ? owner : void 0;
|
|
40735
40792
|
}, "liveOwnerForToolCall");
|
|
40736
40793
|
const liveActiveInteractionOwner = activeInteractionPromptIdRef.current && activeInteractionOwnerRef.current && getActiveInteractionSpan(activeInteractionPromptIdRef.current) === activeInteractionOwnerRef.current ? activeInteractionOwnerRef.current : void 0;
|
|
40737
|
-
const ownerToolCall = (liveActiveInteractionOwner ?
|
|
40794
|
+
const ownerToolCall = (liveActiveInteractionOwner ? llmTools.find(
|
|
40738
40795
|
(toolCall) => liveOwnerForToolCall(toolCall) === liveActiveInteractionOwner
|
|
40739
|
-
) : void 0) ??
|
|
40796
|
+
) : void 0) ?? llmTools.find((toolCall) => liveOwnerForToolCall(toolCall)) ?? llmTools[0] ?? completedAndReadyToSubmitTools.find(
|
|
40740
40797
|
(toolCall) => !toolCall.request.isClientInitiated
|
|
40741
40798
|
);
|
|
40742
40799
|
const interactionOwner = ownerToolCall ? liveOwnerForToolCall(ownerToolCall) : void 0;
|
|
40743
40800
|
const secondaryInteractionOwners = /* @__PURE__ */ new Map();
|
|
40744
|
-
const secondaryTools = interactionOwner ?
|
|
40801
|
+
const secondaryTools = interactionOwner ? llmTools.filter(
|
|
40745
40802
|
(toolCall) => ownerForToolCall(toolCall) !== interactionOwner
|
|
40746
40803
|
) : [];
|
|
40747
40804
|
for (const toolCall of secondaryTools) {
|
|
@@ -40753,7 +40810,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
40753
40810
|
);
|
|
40754
40811
|
}
|
|
40755
40812
|
if (toolCall.status !== "cancelled") {
|
|
40756
|
-
|
|
40813
|
+
llmClient?.recordCompletedToolCall(
|
|
40757
40814
|
toolCall.request.name,
|
|
40758
40815
|
toolCall.request.args
|
|
40759
40816
|
);
|
|
@@ -40765,7 +40822,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
40765
40822
|
secondaryTools.map((toolCall) => toolCall.request.callId)
|
|
40766
40823
|
);
|
|
40767
40824
|
markToolsAsSubmitted([...secondaryCallIds2]);
|
|
40768
|
-
|
|
40825
|
+
llmTools = llmTools.filter(
|
|
40769
40826
|
(toolCall) => !secondaryCallIds2.has(toolCall.request.callId)
|
|
40770
40827
|
);
|
|
40771
40828
|
}
|
|
@@ -40805,13 +40862,13 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
40805
40862
|
}
|
|
40806
40863
|
}, "endToolInteraction");
|
|
40807
40864
|
let toolGoalPermit;
|
|
40808
|
-
const toolGoalContexts =
|
|
40865
|
+
const toolGoalContexts = llmTools.map(
|
|
40809
40866
|
(toolCall) => toolCall.request.goalContext
|
|
40810
40867
|
);
|
|
40811
40868
|
try {
|
|
40812
40869
|
toolGoalPermit = sharedGoalPermit(toolGoalContexts);
|
|
40813
40870
|
} catch (error) {
|
|
40814
|
-
const callIds =
|
|
40871
|
+
const callIds = llmTools.map((toolCall) => toolCall.request.callId);
|
|
40815
40872
|
markToolsAsSubmitted(callIds);
|
|
40816
40873
|
const reason = getErrorMessage(error);
|
|
40817
40874
|
const bindings = /* @__PURE__ */ new Map();
|
|
@@ -40860,7 +40917,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
40860
40917
|
}
|
|
40861
40918
|
if (active && activeGoalPermitValid) {
|
|
40862
40919
|
markToolsAsSubmitted(
|
|
40863
|
-
|
|
40920
|
+
llmTools.map((toolCall) => toolCall.request.callId)
|
|
40864
40921
|
);
|
|
40865
40922
|
const reason = "ToolResult batch is missing the active Goal context";
|
|
40866
40923
|
await failClosedGoalTurn(active, reason);
|
|
@@ -40884,7 +40941,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
40884
40941
|
const existing = goalTurnBindingsRef.current.get(toolGoalPermit.turnId);
|
|
40885
40942
|
if (existing && !sameGoalPermit(existing.permit, toolGoalPermit)) {
|
|
40886
40943
|
markToolsAsSubmitted(
|
|
40887
|
-
|
|
40944
|
+
llmTools.map((toolCall) => toolCall.request.callId)
|
|
40888
40945
|
);
|
|
40889
40946
|
const reason = "ToolResult batch has a stale Goal context";
|
|
40890
40947
|
await failClosedGoalTurn(existing, reason);
|
|
@@ -40948,7 +41005,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
40948
41005
|
);
|
|
40949
41006
|
}
|
|
40950
41007
|
const completedCallIds = new Set(
|
|
40951
|
-
|
|
41008
|
+
llmTools.map((toolCall) => toolCall.request.callId)
|
|
40952
41009
|
);
|
|
40953
41010
|
const secondaryCallIds = new Set(
|
|
40954
41011
|
secondaryTools.map((toolCall) => toolCall.request.callId)
|
|
@@ -40973,13 +41030,13 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
40973
41030
|
if (!promptId && pendingDuplicatePromptId) {
|
|
40974
41031
|
promptId = pendingDuplicatePromptId;
|
|
40975
41032
|
}
|
|
40976
|
-
for (const toolCall of
|
|
40977
|
-
|
|
41033
|
+
for (const toolCall of llmTools) {
|
|
41034
|
+
llmClient?.recordCompletedToolCall(
|
|
40978
41035
|
toolCall.request.name,
|
|
40979
41036
|
toolCall.request.args
|
|
40980
41037
|
);
|
|
40981
41038
|
}
|
|
40982
|
-
if (
|
|
41039
|
+
if (llmTools.length === 0 && pendingDuplicateResponses.length === 0) {
|
|
40983
41040
|
if (!promptId && terminalPromptId) {
|
|
40984
41041
|
promptId = terminalPromptId;
|
|
40985
41042
|
}
|
|
@@ -41007,7 +41064,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
41007
41064
|
return;
|
|
41008
41065
|
}
|
|
41009
41066
|
const executableQueues = /* @__PURE__ */ new Map();
|
|
41010
|
-
for (const toolCall of
|
|
41067
|
+
for (const toolCall of llmTools) {
|
|
41011
41068
|
const queue = executableQueues.get(toolCall.request.callId) ?? [];
|
|
41012
41069
|
queue.push({
|
|
41013
41070
|
request: toolCall.request,
|
|
@@ -41062,7 +41119,6 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
41062
41119
|
(entry) => entry.responseParts
|
|
41063
41120
|
);
|
|
41064
41121
|
orderedResponses.forEach(({ request, response, status }, index) => {
|
|
41065
|
-
const goalContext = request.goalContext;
|
|
41066
41122
|
config.getChatRecordingService?.()?.recordToolResult?.(
|
|
41067
41123
|
finalizedResponses[index].responseParts,
|
|
41068
41124
|
{
|
|
@@ -41075,15 +41131,12 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
41075
41131
|
errorType: response.errorType,
|
|
41076
41132
|
executionStatus: response.executionStatus
|
|
41077
41133
|
},
|
|
41078
|
-
|
|
41079
|
-
goalContext: { ...goalContext },
|
|
41080
|
-
provenance: "goal_runtime"
|
|
41081
|
-
} : { goalContext: { ...goalContext } } : void 0
|
|
41134
|
+
goalToolResultProvenance(request)
|
|
41082
41135
|
);
|
|
41083
41136
|
});
|
|
41084
41137
|
if (continuationWasCancelled()) {
|
|
41085
41138
|
markToolsAsSubmitted(
|
|
41086
|
-
|
|
41139
|
+
llmTools.map((toolCall) => toolCall.request.callId)
|
|
41087
41140
|
);
|
|
41088
41141
|
if (toolGoalBinding) {
|
|
41089
41142
|
await failClosedGoalTurn(
|
|
@@ -41094,18 +41147,18 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
41094
41147
|
endToolInteraction("cancelled");
|
|
41095
41148
|
return;
|
|
41096
41149
|
}
|
|
41097
|
-
const allToolsCancelled =
|
|
41150
|
+
const allToolsCancelled = llmTools.every(
|
|
41098
41151
|
(tc) => tc.status === "cancelled"
|
|
41099
41152
|
);
|
|
41100
41153
|
if (allToolsCancelled && pendingDuplicateResponses.length === 0) {
|
|
41101
|
-
if (
|
|
41102
|
-
|
|
41154
|
+
if (llmClient) {
|
|
41155
|
+
llmClient.addHistory({
|
|
41103
41156
|
role: "user",
|
|
41104
41157
|
parts: responsesToSend
|
|
41105
41158
|
});
|
|
41106
41159
|
config.getArenaAgentClient()?.reportCancelled();
|
|
41107
41160
|
}
|
|
41108
|
-
const callIdsToMarkAsSubmitted2 =
|
|
41161
|
+
const callIdsToMarkAsSubmitted2 = llmTools.map(
|
|
41109
41162
|
(toolCall) => toolCall.request.callId
|
|
41110
41163
|
);
|
|
41111
41164
|
markToolsAsSubmitted(callIdsToMarkAsSubmitted2);
|
|
@@ -41118,10 +41171,10 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
41118
41171
|
endToolInteraction("cancelled");
|
|
41119
41172
|
return;
|
|
41120
41173
|
}
|
|
41121
|
-
const callIdsToMarkAsSubmitted =
|
|
41174
|
+
const callIdsToMarkAsSubmitted = llmTools.map(
|
|
41122
41175
|
(toolCall) => toolCall.request.callId
|
|
41123
41176
|
);
|
|
41124
|
-
for (const toolCall of
|
|
41177
|
+
for (const toolCall of llmTools) {
|
|
41125
41178
|
if ("modelOverride" in toolCall.response) {
|
|
41126
41179
|
if (inlineModelOverrideActiveRef.current || modelOverrideRef.current?.endsWith("\0")) {
|
|
41127
41180
|
debugLogger39.debug(
|
|
@@ -41140,16 +41193,16 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
41140
41193
|
}
|
|
41141
41194
|
}
|
|
41142
41195
|
if (dualOutput) {
|
|
41143
|
-
for (const toolCall of
|
|
41196
|
+
for (const toolCall of llmTools) {
|
|
41144
41197
|
dualOutput.emitToolResult(toolCall.request, toolCall.response);
|
|
41145
41198
|
}
|
|
41146
41199
|
}
|
|
41147
41200
|
markToolsAsSubmitted(callIdsToMarkAsSubmitted);
|
|
41148
|
-
const terminatesGoalTurn =
|
|
41201
|
+
const terminatesGoalTurn = llmTools.some(
|
|
41149
41202
|
(toolCall) => toolCall.response.terminateTurn === true
|
|
41150
41203
|
);
|
|
41151
41204
|
if (terminatesGoalTurn && toolGoalBinding) {
|
|
41152
|
-
|
|
41205
|
+
llmClient.addHistory({ role: "user", parts: responsesToSend });
|
|
41153
41206
|
let goalFinishFailed = false;
|
|
41154
41207
|
try {
|
|
41155
41208
|
await config.getChatRecordingService()?.flush();
|
|
@@ -41192,7 +41245,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
41192
41245
|
return;
|
|
41193
41246
|
}
|
|
41194
41247
|
if (config.getEmitToolUseSummaries()) {
|
|
41195
|
-
const successfulTools =
|
|
41248
|
+
const successfulTools = llmTools.filter(
|
|
41196
41249
|
(tc) => tc.status === "success" && tc.request.name !== ToolNames.GET_GOAL && tc.request.name !== ToolNames.UPDATE_GOAL
|
|
41197
41250
|
);
|
|
41198
41251
|
if (successfulTools.length > 0) {
|
|
@@ -41250,12 +41303,12 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
41250
41303
|
return;
|
|
41251
41304
|
}
|
|
41252
41305
|
const backgroundTaskRegistry = config.getBackgroundTaskRegistry();
|
|
41253
|
-
const backgroundLaunchExhaustedCapacity = backgroundTaskRegistry.getMaxConcurrentBackgroundAgents() === 1 && !backgroundTaskRegistry.canStartBackgroundAgent() &&
|
|
41306
|
+
const backgroundLaunchExhaustedCapacity = backgroundTaskRegistry.getMaxConcurrentBackgroundAgents() === 1 && !backgroundTaskRegistry.canStartBackgroundAgent() && llmTools.some((toolCall) => {
|
|
41254
41307
|
const display = toolCall.response.resultDisplay;
|
|
41255
41308
|
return toolCall.request.name === ToolNames.AGENT && typeof display === "object" && display !== null && "type" in display && "status" in display && display.type === "task_execution" && display.status === "background";
|
|
41256
41309
|
});
|
|
41257
41310
|
if (backgroundLaunchExhaustedCapacity) {
|
|
41258
|
-
|
|
41311
|
+
llmClient?.addHistory({ role: "user", parts: responsesToSend });
|
|
41259
41312
|
if (toolGoalBinding) {
|
|
41260
41313
|
await failClosedGoalTurn(
|
|
41261
41314
|
toolGoalBinding,
|
|
@@ -41340,7 +41393,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
41340
41393
|
[
|
|
41341
41394
|
submitQuery,
|
|
41342
41395
|
markToolsAsSubmitted,
|
|
41343
|
-
|
|
41396
|
+
llmClient,
|
|
41344
41397
|
performMemoryRefresh,
|
|
41345
41398
|
modelSwitchedFromQuotaError,
|
|
41346
41399
|
config,
|
|
@@ -41412,7 +41465,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
41412
41465
|
const toolName = toolCall.request.name;
|
|
41413
41466
|
const fileName = path12.basename(filePath);
|
|
41414
41467
|
const toolCallWithSnapshotFileName = `${timestamp}-${fileName}-${toolName}.json`;
|
|
41415
|
-
const clientHistory =
|
|
41468
|
+
const clientHistory = llmClient?.getHistoryShallow();
|
|
41416
41469
|
const toolCallWithSnapshotFilePath = path12.join(
|
|
41417
41470
|
checkpointDir,
|
|
41418
41471
|
toolCallWithSnapshotFileName
|
|
@@ -41445,7 +41498,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
41445
41498
|
}
|
|
41446
41499
|
}, "saveRestorableToolCalls");
|
|
41447
41500
|
saveRestorableToolCalls();
|
|
41448
|
-
}, [toolCalls, config, onDebugMessage, history,
|
|
41501
|
+
}, [toolCalls, config, onDebugMessage, history, llmClient, storage]);
|
|
41449
41502
|
const notificationQueueRef = (0, import_react137.useRef)([]);
|
|
41450
41503
|
const [notificationTrigger, setNotificationTrigger] = (0, import_react137.useState)(0);
|
|
41451
41504
|
const goalQueuePendingCount = goalQueueRef?.current?.getPendingSubmissionCount?.() ?? 0;
|
|
@@ -41783,7 +41836,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
41783
41836
|
streamingResponseLengthRef,
|
|
41784
41837
|
isReceivingContent
|
|
41785
41838
|
};
|
|
41786
|
-
}, "
|
|
41839
|
+
}, "useLlmStream");
|
|
41787
41840
|
|
|
41788
41841
|
// packages/cli/src/ui/hooks/vim.ts
|
|
41789
41842
|
init_esbuild_shims();
|
|
@@ -45023,6 +45076,7 @@ var import_jsx_runtime132 = __toESM(require_jsx_runtime(), 1);
|
|
|
45023
45076
|
var MCP_BATCH_FLUSH_MS = 16;
|
|
45024
45077
|
var STARTUP_PROFILE_FINALIZE_CAP_MS = 35e3;
|
|
45025
45078
|
var CTRL_EXIT_PROMPT_DURATION_MS = 1e3;
|
|
45079
|
+
var GOAL_RUNTIME_STARTUP_TIMEOUT_MS = 5e3;
|
|
45026
45080
|
var debugLogger42 = createDebugLogger("APP_CONTAINER");
|
|
45027
45081
|
function isRenderModeToggleKey(key) {
|
|
45028
45082
|
return keyMatchers["toggleRenderMode" /* TOGGLE_RENDER_MODE */](key) || key.name === "m" && key.meta && !key.ctrl && !key.paste;
|
|
@@ -45259,9 +45313,9 @@ function getSpeculativeToolResult(response) {
|
|
|
45259
45313
|
};
|
|
45260
45314
|
}
|
|
45261
45315
|
__name(getSpeculativeToolResult, "getSpeculativeToolResult");
|
|
45262
|
-
function getResponseCandidateTokens(
|
|
45316
|
+
function getResponseCandidateTokens(pendingLlmHistoryItems) {
|
|
45263
45317
|
let tokens = 0;
|
|
45264
|
-
for (const item of
|
|
45318
|
+
for (const item of pendingLlmHistoryItems) {
|
|
45265
45319
|
if (item.type !== "tool_group") {
|
|
45266
45320
|
continue;
|
|
45267
45321
|
}
|
|
@@ -45329,8 +45383,8 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
45329
45383
|
);
|
|
45330
45384
|
const [isProcessing, setIsProcessing] = (0, import_react163.useState)(false);
|
|
45331
45385
|
const [embeddedShellFocused, setEmbeddedShellFocused] = (0, import_react163.useState)(false);
|
|
45332
|
-
const [
|
|
45333
|
-
initializationResult.
|
|
45386
|
+
const [memoryFileCount, setMemoryFileCount] = (0, import_react163.useState)(
|
|
45387
|
+
initializationResult.memoryFileCount
|
|
45334
45388
|
);
|
|
45335
45389
|
const [shellModeActive, setShellModeActive] = (0, import_react163.useState)(false);
|
|
45336
45390
|
const [modelSwitchedFromQuotaError, setModelSwitchedFromQuotaError] = (0, import_react163.useState)(false);
|
|
@@ -45489,9 +45543,22 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
45489
45543
|
(async () => {
|
|
45490
45544
|
profileCheckpoint("config_initialize_start");
|
|
45491
45545
|
await config.initialize();
|
|
45492
|
-
await waitForGoalRuntime(config
|
|
45546
|
+
const goalRuntimeReady = await waitForGoalRuntime(config, {
|
|
45547
|
+
timeoutMs: GOAL_RUNTIME_STARTUP_TIMEOUT_MS
|
|
45548
|
+
});
|
|
45549
|
+
if (!goalRuntimeReady) {
|
|
45550
|
+
debugLogger42.warn(
|
|
45551
|
+
`Goal runtime did not settle within ${GOAL_RUNTIME_STARTUP_TIMEOUT_MS}ms (session writer lease contention?); continuing with goal features degraded.`
|
|
45552
|
+
);
|
|
45553
|
+
}
|
|
45493
45554
|
setStartupWarnings(
|
|
45494
|
-
(currentWarnings) => mergeStartupWarnings(
|
|
45555
|
+
(currentWarnings) => mergeStartupWarnings(
|
|
45556
|
+
currentWarnings,
|
|
45557
|
+
goalRuntimeReady ? config.getWarnings() : [
|
|
45558
|
+
...config.getWarnings(),
|
|
45559
|
+
`Goal features are degraded: the goal runtime did not settle within ${GOAL_RUNTIME_STARTUP_TIMEOUT_MS}ms at startup.`
|
|
45560
|
+
]
|
|
45561
|
+
)
|
|
45495
45562
|
);
|
|
45496
45563
|
profileCheckpoint("config_initialize_end");
|
|
45497
45564
|
setConfigInitialized(true);
|
|
@@ -45574,8 +45641,8 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
45574
45641
|
}, [config]);
|
|
45575
45642
|
(0, import_react163.useEffect)(() => {
|
|
45576
45643
|
if (!isConfigInitialized) return void 0;
|
|
45577
|
-
const
|
|
45578
|
-
if (!
|
|
45644
|
+
const llmClient2 = config.getLlmClient();
|
|
45645
|
+
if (!llmClient2) return void 0;
|
|
45579
45646
|
const manager = config.getToolRegistry().getMcpClientManager();
|
|
45580
45647
|
let flushTimer = null;
|
|
45581
45648
|
let finalized = false;
|
|
@@ -45589,7 +45656,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
45589
45656
|
clearTimeout(flushTimer);
|
|
45590
45657
|
flushTimer = null;
|
|
45591
45658
|
}
|
|
45592
|
-
return
|
|
45659
|
+
return llmClient2.setTools().catch((err) => {
|
|
45593
45660
|
debugLogger42.error(
|
|
45594
45661
|
`setTools() batch-flush failed: ${err instanceof Error ? err.message : String(err)}`
|
|
45595
45662
|
);
|
|
@@ -46073,7 +46140,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
46073
46140
|
debugLogger42.debug("Failed to cancel request while quitting:", error);
|
|
46074
46141
|
}
|
|
46075
46142
|
setQuittingMessages(messages);
|
|
46076
|
-
config.
|
|
46143
|
+
config.getLlmClient()?.requestShutdown();
|
|
46077
46144
|
setTimeout(async () => {
|
|
46078
46145
|
await runExitCleanup();
|
|
46079
46146
|
process18.exit(0);
|
|
@@ -46154,7 +46221,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
46154
46221
|
isProcessing,
|
|
46155
46222
|
setIsProcessing,
|
|
46156
46223
|
isIdleRef,
|
|
46157
|
-
|
|
46224
|
+
setMemoryFileCount,
|
|
46158
46225
|
slashCommandActions,
|
|
46159
46226
|
extensionsUpdateStateInternal,
|
|
46160
46227
|
isConfigInitialized,
|
|
@@ -46237,12 +46304,12 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
46237
46304
|
const performMemoryRefresh = (0, import_react163.useCallback)(async () => {
|
|
46238
46305
|
if (config.isSafeMode()) {
|
|
46239
46306
|
config.setUserMemory("");
|
|
46240
|
-
config.
|
|
46307
|
+
config.setMemoryFileCount(0);
|
|
46241
46308
|
config.setContextFilePaths([]);
|
|
46242
46309
|
config.setConditionalRulesRegistry(
|
|
46243
46310
|
new ConditionalRulesRegistry([], config.getWorkingDir())
|
|
46244
46311
|
);
|
|
46245
|
-
|
|
46312
|
+
setMemoryFileCount(0);
|
|
46246
46313
|
historyManager.addItem(
|
|
46247
46314
|
{
|
|
46248
46315
|
type: "info" /* INFO */,
|
|
@@ -46266,7 +46333,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
46266
46333
|
contextFilePaths,
|
|
46267
46334
|
conditionalRules,
|
|
46268
46335
|
projectRoot
|
|
46269
|
-
} = await
|
|
46336
|
+
} = await loadHierarchicalMemory(
|
|
46270
46337
|
config.getWorkingDir(),
|
|
46271
46338
|
settings.merged.context?.loadFromIncludeDirectories ? config.getWorkspaceContext().getDirectories() : [],
|
|
46272
46339
|
config.getFileService(),
|
|
@@ -46283,12 +46350,12 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
46283
46350
|
}
|
|
46284
46351
|
);
|
|
46285
46352
|
config.setUserMemory(memoryContent);
|
|
46286
|
-
config.
|
|
46353
|
+
config.setMemoryFileCount(fileCount);
|
|
46287
46354
|
config.setContextFilePaths(contextFilePaths);
|
|
46288
46355
|
config.setConditionalRulesRegistry(
|
|
46289
46356
|
new ConditionalRulesRegistry(conditionalRules, projectRoot)
|
|
46290
46357
|
);
|
|
46291
|
-
|
|
46358
|
+
setMemoryFileCount(fileCount);
|
|
46292
46359
|
historyManager.addItem(
|
|
46293
46360
|
{
|
|
46294
46361
|
type: "info" /* INFO */,
|
|
@@ -46335,7 +46402,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
46335
46402
|
streamingState,
|
|
46336
46403
|
submitQuery,
|
|
46337
46404
|
initError,
|
|
46338
|
-
pendingHistoryItems:
|
|
46405
|
+
pendingHistoryItems: pendingLlmHistoryItems,
|
|
46339
46406
|
clearPendingState,
|
|
46340
46407
|
thought,
|
|
46341
46408
|
cancelOngoingRequest,
|
|
@@ -46347,8 +46414,8 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
46347
46414
|
pendingToolCalls,
|
|
46348
46415
|
streamingResponseLengthRef,
|
|
46349
46416
|
isReceivingContent
|
|
46350
|
-
} =
|
|
46351
|
-
config.
|
|
46417
|
+
} = useLlmStream(
|
|
46418
|
+
config.getLlmClient(),
|
|
46352
46419
|
historyManager.history,
|
|
46353
46420
|
historyManager.addItem,
|
|
46354
46421
|
config,
|
|
@@ -46429,7 +46496,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
46429
46496
|
speculationRef.current = IDLE_SPECULATION;
|
|
46430
46497
|
}
|
|
46431
46498
|
}, []);
|
|
46432
|
-
const
|
|
46499
|
+
const llmClient = config.getLlmClient();
|
|
46433
46500
|
const showAutoAcceptIndicator = useAutoAcceptIndicator({
|
|
46434
46501
|
config,
|
|
46435
46502
|
settings,
|
|
@@ -46747,7 +46814,7 @@ ${buildWorkflowSteeringNotice()}
|
|
|
46747
46814
|
}
|
|
46748
46815
|
const spec = speculationRef.current;
|
|
46749
46816
|
if (spec.status !== "idle" && spec.suggestion === submittedValue && spec.status === "completed") {
|
|
46750
|
-
acceptSpeculation(spec,
|
|
46817
|
+
acceptSpeculation(spec, llmClient).then((result) => {
|
|
46751
46818
|
logSpeculation(
|
|
46752
46819
|
config,
|
|
46753
46820
|
new SpeculationEvent({
|
|
@@ -46850,7 +46917,7 @@ ${buildWorkflowSteeringNotice()}
|
|
|
46850
46917
|
handleSlashCommand,
|
|
46851
46918
|
slashCommands,
|
|
46852
46919
|
config,
|
|
46853
|
-
|
|
46920
|
+
llmClient,
|
|
46854
46921
|
historyManager,
|
|
46855
46922
|
settings.merged.ui?.disableWorkflowKeywordTrigger,
|
|
46856
46923
|
setBufferText,
|
|
@@ -46874,8 +46941,8 @@ ${buildWorkflowSteeringNotice()}
|
|
|
46874
46941
|
handleWelcomeBackClose
|
|
46875
46942
|
} = useWelcomeBack(config, handleFinalSubmit, buffer, settings.merged);
|
|
46876
46943
|
const pendingHistoryItems = (0, import_react163.useMemo)(
|
|
46877
|
-
() => [...pendingSlashCommandHistoryItems, ...
|
|
46878
|
-
[pendingSlashCommandHistoryItems,
|
|
46944
|
+
() => [...pendingSlashCommandHistoryItems, ...pendingLlmHistoryItems],
|
|
46945
|
+
[pendingSlashCommandHistoryItems, pendingLlmHistoryItems]
|
|
46879
46946
|
);
|
|
46880
46947
|
const rawStickyTodos = (0, import_react163.useMemo)(
|
|
46881
46948
|
() => getStickyTodos(historyManager.history, pendingHistoryItems),
|
|
@@ -46889,7 +46956,7 @@ ${buildWorkflowSteeringNotice()}
|
|
|
46889
46956
|
(info) => {
|
|
46890
46957
|
const pendingHistoryItems2 = [
|
|
46891
46958
|
...pendingSlashCommandHistoryItems,
|
|
46892
|
-
...
|
|
46959
|
+
...pendingLlmHistoryItems
|
|
46893
46960
|
];
|
|
46894
46961
|
if (info?.pendingItem) {
|
|
46895
46962
|
pendingHistoryItems2.push(info.pendingItem);
|
|
@@ -46910,7 +46977,7 @@ ${currentText}` : popped.modelText
|
|
|
46910
46977
|
);
|
|
46911
46978
|
}
|
|
46912
46979
|
if (info?.wasGoalTurn) {
|
|
46913
|
-
|
|
46980
|
+
llmClient?.stripOrphanedUserEntriesFromHistory?.();
|
|
46914
46981
|
}
|
|
46915
46982
|
if (!draftWasEmpty) {
|
|
46916
46983
|
debugLogger42.debug("auto-restore bail: buffer was non-empty");
|
|
@@ -46988,7 +47055,7 @@ ${currentText}` : popped.modelText
|
|
|
46988
47055
|
historyManager.truncateToItem(lastUserItem.id);
|
|
46989
47056
|
refreshStatic();
|
|
46990
47057
|
restoreCancelledPrompt();
|
|
46991
|
-
|
|
47058
|
+
llmClient?.stripOrphanedUserEntriesFromHistory?.();
|
|
46992
47059
|
if (info?.canUndoLastLoggedUserMessage) {
|
|
46993
47060
|
void logger?.removeLastUserMessage().catch((err) => {
|
|
46994
47061
|
debugLogger42.debug("Failed to undo cancelled prompt from log:", err);
|
|
@@ -47002,10 +47069,10 @@ ${currentText}` : popped.modelText
|
|
|
47002
47069
|
removeGoalTurns,
|
|
47003
47070
|
historyManager,
|
|
47004
47071
|
logger,
|
|
47005
|
-
|
|
47072
|
+
llmClient,
|
|
47006
47073
|
refreshStatic,
|
|
47007
47074
|
pendingSlashCommandHistoryItems,
|
|
47008
|
-
|
|
47075
|
+
pendingLlmHistoryItems
|
|
47009
47076
|
]
|
|
47010
47077
|
);
|
|
47011
47078
|
const handleClearScreen = (0, import_react163.useCallback)(() => {
|
|
@@ -47035,12 +47102,12 @@ ${currentText}` : popped.modelText
|
|
|
47035
47102
|
});
|
|
47036
47103
|
const contextFileNames = (0, import_react163.useMemo)(() => {
|
|
47037
47104
|
const fromSettings = settings.merged.context?.fileName;
|
|
47038
|
-
return fromSettings ? Array.isArray(fromSettings) ? fromSettings : [fromSettings] :
|
|
47105
|
+
return fromSettings ? Array.isArray(fromSettings) ? fromSettings : [fromSettings] : getAllMemoryFilenames();
|
|
47039
47106
|
}, [settings.merged.context?.fileName]);
|
|
47040
47107
|
const initialPrompt = (0, import_react163.useMemo)(() => config.getQuestion(), [config]);
|
|
47041
47108
|
const initialPromptSubmitted = (0, import_react163.useRef)(false);
|
|
47042
47109
|
(0, import_react163.useEffect)(() => {
|
|
47043
|
-
if (initialPrompt && isConfigInitialized && !initialPromptSubmitted.current && !isAuthenticating && !isAuthDialogOpen && !isThemeDialogOpen && !isEditorDialogOpen && !showWelcomeBackDialog && welcomeBackChoice !== "restart" &&
|
|
47110
|
+
if (initialPrompt && isConfigInitialized && !initialPromptSubmitted.current && !isAuthenticating && !isAuthDialogOpen && !isThemeDialogOpen && !isEditorDialogOpen && !showWelcomeBackDialog && welcomeBackChoice !== "restart" && llmClient?.isInitialized?.()) {
|
|
47044
47111
|
handleFinalSubmit(initialPrompt);
|
|
47045
47112
|
initialPromptSubmitted.current = true;
|
|
47046
47113
|
}
|
|
@@ -47054,7 +47121,7 @@ ${currentText}` : popped.modelText
|
|
|
47054
47121
|
isEditorDialogOpen,
|
|
47055
47122
|
showWelcomeBackDialog,
|
|
47056
47123
|
welcomeBackChoice,
|
|
47057
|
-
|
|
47124
|
+
llmClient
|
|
47058
47125
|
]);
|
|
47059
47126
|
const followupSuggestionsEnabled = settings.merged.ui?.enableFollowupSuggestions !== false;
|
|
47060
47127
|
(0, import_react163.useEffect)(() => {
|
|
@@ -47077,11 +47144,11 @@ ${currentText}` : popped.modelText
|
|
|
47077
47144
|
}
|
|
47078
47145
|
}
|
|
47079
47146
|
if (followupSuggestionsEnabled && config.isInteractive() && !config.getSdkMode() && prevStreamingStateRef.current === "responding" /* Responding */ && streamingState === "idle" /* Idle */ && // Check both committed history and pending items for errors
|
|
47080
|
-
// (API errors go to
|
|
47081
|
-
historyManager.history[historyManager.history.length - 1]?.type !== "error" && !
|
|
47147
|
+
// (API errors go to pendingLlmHistoryItems, not historyManager.history)
|
|
47148
|
+
historyManager.history[historyManager.history.length - 1]?.type !== "error" && !pendingLlmHistoryItems.some((item) => item.type === "error") && !shellConfirmationRequest && !confirmationRequest && !loopDetectionConfirmationRequest && !isPermissionsDialogOpen && settingInputRequests.length === 0 && config.getApprovalMode() !== "plan" /* PLAN */) {
|
|
47082
47149
|
const ac = new AbortController();
|
|
47083
47150
|
suggestionAbortRef.current = ac;
|
|
47084
|
-
const conversationHistory =
|
|
47151
|
+
const conversationHistory = llmClient.getHistoryTail(40, true);
|
|
47085
47152
|
generatePromptSuggestion(config, conversationHistory, ac.signal, {
|
|
47086
47153
|
// On by default: the schema declares `default: true`, but
|
|
47087
47154
|
// `mergeSettings` doesn't apply schema defaults, so an unset value is
|
|
@@ -47339,11 +47406,11 @@ ${currentText}` : popped.modelText
|
|
|
47339
47406
|
async (userItem, option) => {
|
|
47340
47407
|
try {
|
|
47341
47408
|
const needsConversation = option === "conversation" || option === "both";
|
|
47342
|
-
const
|
|
47409
|
+
const llmClient2 = needsConversation ? config.getLlmClient() : null;
|
|
47343
47410
|
let apiTruncateIndex = -1;
|
|
47344
47411
|
let conversationSkippedNoClient = false;
|
|
47345
47412
|
if (needsConversation) {
|
|
47346
|
-
if (!
|
|
47413
|
+
if (!llmClient2) {
|
|
47347
47414
|
if (option === "conversation") {
|
|
47348
47415
|
historyManager.addItem(
|
|
47349
47416
|
{
|
|
@@ -47361,7 +47428,7 @@ ${currentText}` : popped.modelText
|
|
|
47361
47428
|
apiTruncateIndex = computeApiTruncationIndex(
|
|
47362
47429
|
historyManager.history,
|
|
47363
47430
|
userItem.id,
|
|
47364
|
-
|
|
47431
|
+
llmClient2.getHistoryShallow()
|
|
47365
47432
|
);
|
|
47366
47433
|
if (apiTruncateIndex < 0) {
|
|
47367
47434
|
historyManager.addItem(
|
|
@@ -47387,7 +47454,7 @@ ${currentText}` : popped.modelText
|
|
|
47387
47454
|
const promptId = userItem.promptId;
|
|
47388
47455
|
if (promptId) {
|
|
47389
47456
|
try {
|
|
47390
|
-
const truncateHistory = option === "both" && !!
|
|
47457
|
+
const truncateHistory = option === "both" && !!llmClient2 && apiTruncateIndex >= 0;
|
|
47391
47458
|
const result = await config.getFileHistoryService().rewind(promptId, truncateHistory);
|
|
47392
47459
|
if (result.filesChanged.length > 0) {
|
|
47393
47460
|
fileRestoreMessage = t("Restored {{count}} file(s).", {
|
|
@@ -47419,7 +47486,7 @@ ${currentText}` : popped.modelText
|
|
|
47419
47486
|
);
|
|
47420
47487
|
}
|
|
47421
47488
|
}
|
|
47422
|
-
if (needsConversation &&
|
|
47489
|
+
if (needsConversation && llmClient2 && apiTruncateIndex >= 0 && !(option === "both" && hasRestoreFailure)) {
|
|
47423
47490
|
const originalHistory = historyManager.history;
|
|
47424
47491
|
const hasSummary = originalHistory.some(
|
|
47425
47492
|
(h) => h.display?.kind === "collapse-summary"
|
|
@@ -47430,7 +47497,7 @@ ${currentText}` : popped.modelText
|
|
|
47430
47497
|
if (h.id === userItem.id) break;
|
|
47431
47498
|
if (isRealUserTurn(h)) targetTurnIndex++;
|
|
47432
47499
|
}
|
|
47433
|
-
|
|
47500
|
+
llmClient2.truncateHistory(apiTruncateIndex);
|
|
47434
47501
|
const truncatedUi = recoalesceFindingsHistoryItems(
|
|
47435
47502
|
expandCollapsedHistory(
|
|
47436
47503
|
originalHistory.filter((h) => h.id < userItem.id)
|
|
@@ -47592,7 +47659,7 @@ ${migrationResult.failedFiles.map((f) => ` \u2022 ${f.file}: ${f.error}`).join(
|
|
|
47592
47659
|
[historyManager, setShowCommandMigrationNudge, config.storage]
|
|
47593
47660
|
);
|
|
47594
47661
|
const responseCandidateTokens = getResponseCandidateTokens(
|
|
47595
|
-
|
|
47662
|
+
pendingLlmHistoryItems
|
|
47596
47663
|
);
|
|
47597
47664
|
const {
|
|
47598
47665
|
elapsedTime,
|
|
@@ -47990,10 +48057,10 @@ ${migrationResult.failedFiles.map((f) => ` \u2022 ${f.file}: ${f.error}`).join(
|
|
|
47990
48057
|
settingInputRequests,
|
|
47991
48058
|
pluginChoiceRequests,
|
|
47992
48059
|
loopDetectionConfirmationRequest,
|
|
47993
|
-
|
|
48060
|
+
memoryFileCount,
|
|
47994
48061
|
streamingState,
|
|
47995
48062
|
initError,
|
|
47996
|
-
|
|
48063
|
+
pendingLlmHistoryItems,
|
|
47997
48064
|
thought,
|
|
47998
48065
|
shellModeActive,
|
|
47999
48066
|
userMessages,
|
|
@@ -48136,10 +48203,10 @@ ${migrationResult.failedFiles.map((f) => ` \u2022 ${f.file}: ${f.error}`).join(
|
|
|
48136
48203
|
settingInputRequests,
|
|
48137
48204
|
pluginChoiceRequests,
|
|
48138
48205
|
loopDetectionConfirmationRequest,
|
|
48139
|
-
|
|
48206
|
+
memoryFileCount,
|
|
48140
48207
|
streamingState,
|
|
48141
48208
|
initError,
|
|
48142
|
-
|
|
48209
|
+
pendingLlmHistoryItems,
|
|
48143
48210
|
thought,
|
|
48144
48211
|
shellModeActive,
|
|
48145
48212
|
userMessages,
|