@qwen-code/qwen-code 0.25.4-preview.0 → 0.25.4-preview.1
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/browser-use/runtime/native-host.js +0 -0
- package/bundled/browser-use/runtime/node_modules/playwright-core/bin/reinstall_chrome_beta_linux.sh +0 -0
- package/bundled/browser-use/runtime/node_modules/playwright-core/bin/reinstall_chrome_beta_mac.sh +0 -0
- package/bundled/browser-use/runtime/node_modules/playwright-core/bin/reinstall_chrome_stable_linux.sh +0 -0
- package/bundled/browser-use/runtime/node_modules/playwright-core/bin/reinstall_chrome_stable_mac.sh +0 -0
- package/bundled/browser-use/runtime/node_modules/playwright-core/bin/reinstall_msedge_beta_linux.sh +0 -0
- package/bundled/browser-use/runtime/node_modules/playwright-core/bin/reinstall_msedge_beta_mac.sh +0 -0
- package/bundled/browser-use/runtime/node_modules/playwright-core/bin/reinstall_msedge_dev_linux.sh +0 -0
- package/bundled/browser-use/runtime/node_modules/playwright-core/bin/reinstall_msedge_dev_mac.sh +0 -0
- package/bundled/browser-use/runtime/node_modules/playwright-core/bin/reinstall_msedge_stable_linux.sh +0 -0
- package/bundled/browser-use/runtime/node_modules/playwright-core/bin/reinstall_msedge_stable_mac.sh +0 -0
- package/bundled/browser-use/runtime/node_modules/playwright-core/cli.js +0 -0
- package/bundled/browser-use/runtime/node_modules/playwright-core/lib/webp_codec.wasm +0 -0
- package/bundled/browser-use/runtime/node_modules/playwright-core/lib/xdg-open +0 -0
- package/bundled/browser-use/runtime/scripts/native-host-setup.js +0 -0
- package/chunks/{MaxSizedBox-M27H235V.js → MaxSizedBox-E4RKSA7W.js} +1 -1
- package/chunks/{StandaloneSessionPicker-LWWDDYOW.js → StandaloneSessionPicker-2D3UKLVS.js} +1 -1
- package/chunks/{acp-subagent-executor-NUV52JVS.js → acp-subagent-executor-UQYUN6AB.js} +1 -1
- package/chunks/{acpAgent-IUJDXLZM.js → acpAgent-P7WGK2BP.js} +3 -3
- package/chunks/{advisor-MSOUBMJ6.js → advisor-GCH2MBXT.js} +1 -1
- package/chunks/{agent-H7XIWYWQ.js → agent-57T4YAYP.js} +1 -1
- package/chunks/{agent-headless-XDN3D3S3.js → agent-headless-IBON3A7N.js} +1 -1
- package/chunks/{agent-host-client-AZP3PZXS.js → agent-host-client-LE7P72FR.js} +1 -1
- package/chunks/{agent-host-connections-JRVX7I6I.js → agent-host-connections-4DM57L26.js} +1 -1
- package/chunks/{anthropicContentGenerator-N7TV53LD.js → anthropicContentGenerator-C4TPFXUK.js} +1 -1
- package/chunks/{batch-MKSJFJUH.js → batch-YJJGMJWO.js} +1 -1
- package/chunks/{bridge-GNMKKHQ4.js → bridge-FIO2ENBG.js} +1 -1
- package/chunks/{channel-settings-store-Y4YCS7JX.js → channel-settings-store-TEBCLK2B.js} +1 -1
- package/chunks/{chunk-GPOUP5OK.js → chunk-27MTSS3T.js} +1 -1
- package/chunks/{chunk-C4ANA47H.js → chunk-2MGCRPM3.js} +1 -1
- package/chunks/{chunk-6DQNNRRC.js → chunk-2WBKWPSO.js} +1 -1
- package/chunks/{chunk-CATL2PQS.js → chunk-34WLYVDK.js} +5 -5
- package/chunks/{chunk-B7CXPNCV.js → chunk-3J2YNEHG.js} +1 -1
- package/chunks/{chunk-VTNHPXNL.js → chunk-3TBFTELA.js} +1 -1
- package/chunks/{chunk-7JT34VGK.js → chunk-46I6JBVL.js} +1 -1
- package/chunks/{chunk-FEMWELCV.js → chunk-4ZKFLOEH.js} +1 -1
- package/chunks/{chunk-7AYXAVTZ.js → chunk-5DUJIOOX.js} +3 -3
- package/chunks/{chunk-6QLHJSVW.js → chunk-6PWOLWTH.js} +1 -1
- package/chunks/{chunk-OW4QBRSR.js → chunk-6UZ65Z2P.js} +1 -1
- package/chunks/{chunk-V2JZO5MS.js → chunk-7DSJE3CL.js} +1 -1
- package/chunks/{chunk-TJMHIEYI.js → chunk-7LCY7GGX.js} +1 -1
- package/chunks/{chunk-TLJHBK3A.js → chunk-7RNTXEWH.js} +1 -1
- package/chunks/{chunk-YZ7OO4AQ.js → chunk-A3IF6IOB.js} +1 -1
- package/chunks/{chunk-VTF6AVZB.js → chunk-A6OQSOUO.js} +1 -1
- package/chunks/{chunk-Y7YDHCON.js → chunk-AJ6JUUP7.js} +1 -1
- package/chunks/{chunk-QTMHQGWQ.js → chunk-AOMEBVFW.js} +1 -1
- package/chunks/{chunk-KVTG2ZNH.js → chunk-AUNAS7AS.js} +1 -1
- package/chunks/{chunk-BOFD4CN3.js → chunk-AVIDPC5K.js} +1 -1
- package/chunks/{chunk-ETYTRKB2.js → chunk-BOLPBPWC.js} +1 -1
- package/chunks/{chunk-OAPA66DR.js → chunk-BQQBFDBY.js} +1 -1
- package/chunks/{chunk-NOS2CNOI.js → chunk-CN22ATWU.js} +1 -1
- package/chunks/{chunk-XYBEQRSZ.js → chunk-DIHJELGW.js} +1 -1
- package/chunks/{chunk-XCEL3EDX.js → chunk-DJFCI7TU.js} +1 -1
- package/chunks/{chunk-VKEL2XTM.js → chunk-DQPDMFS3.js} +1 -1
- package/chunks/{chunk-DJRFEZBY.js → chunk-DSYKB77N.js} +1 -1
- package/chunks/{chunk-UEW7Q26E.js → chunk-EDNOGHMN.js} +2 -2
- package/chunks/{chunk-RXNGYG64.js → chunk-EE36D2EV.js} +1 -1
- package/chunks/{chunk-NZKX7HYL.js → chunk-EGQDN3FJ.js} +1 -1
- package/chunks/{chunk-DFRSQK5Q.js → chunk-FHFBCG6N.js} +1 -1
- package/chunks/{chunk-PECV2VVZ.js → chunk-GI6T3RBV.js} +1 -1
- package/chunks/{chunk-37BNHIUB.js → chunk-GOLT5JXA.js} +1 -1
- package/chunks/{chunk-KITFF4GL.js → chunk-IDGXHMNL.js} +1 -1
- package/chunks/{chunk-6HIOSLUM.js → chunk-IIZWK7ZP.js} +1 -1
- package/chunks/{chunk-MPGEAX4K.js → chunk-IJC6ZH2S.js} +1 -1
- package/chunks/{chunk-TLYJVB5H.js → chunk-IO6LSEPV.js} +1 -1
- package/chunks/{chunk-QIJKEZZR.js → chunk-IYVNCBMS.js} +1 -1
- package/chunks/{chunk-S4GOHFRN.js → chunk-JHGOWK7M.js} +1 -1
- package/chunks/{chunk-GHRD2MMC.js → chunk-JRJY343T.js} +1 -1
- package/chunks/{chunk-WCYZSCG7.js → chunk-JVUXQU3W.js} +1 -1
- package/chunks/{chunk-DMCTJUIJ.js → chunk-K2K2YYWO.js} +1 -1
- package/chunks/{chunk-37OHWQHB.js → chunk-KF6HU732.js} +2 -2
- package/chunks/{chunk-5LSV73BG.js → chunk-KVWUOBH7.js} +1 -1
- package/chunks/{chunk-7V4BAHFT.js → chunk-LBWBGFHD.js} +1 -1
- package/chunks/{chunk-RKPHDO42.js → chunk-LDXZT3SG.js} +5 -5
- package/chunks/{chunk-BGFA2SAQ.js → chunk-LFOZ6AIH.js} +1 -1
- package/chunks/{chunk-4322TZID.js → chunk-LGQHT42X.js} +2 -2
- package/chunks/{chunk-PDXZ2CUO.js → chunk-M3O2XDHA.js} +1 -1
- package/chunks/{chunk-47K2NMP6.js → chunk-M3UC46LS.js} +1 -1
- package/chunks/{chunk-UFRY7WND.js → chunk-M7JLPTQI.js} +1 -1
- package/chunks/{chunk-SATEKHQP.js → chunk-MBUXP3IS.js} +1 -1
- package/chunks/{chunk-RN6JS263.js → chunk-MEZA3VVH.js} +1 -1
- package/chunks/{chunk-OBFKP7RI.js → chunk-MWN6TR36.js} +1 -1
- package/chunks/{chunk-VHJ43ZYJ.js → chunk-O7XRQWCG.js} +1 -1
- package/chunks/{chunk-H224LNV3.js → chunk-OYFRLT5E.js} +1 -1
- package/chunks/{chunk-3NWFV2YF.js → chunk-PMBGV76N.js} +1 -1
- package/chunks/{chunk-YFAPACDE.js → chunk-PVM4IVFL.js} +6 -6
- package/chunks/{chunk-7WS2EYMQ.js → chunk-PWHD4NK3.js} +1 -1
- package/chunks/{chunk-JZIQSEFO.js → chunk-Q54NROBX.js} +1 -1
- package/chunks/{chunk-FCLAPJ22.js → chunk-QE7R4DPT.js} +1 -1
- package/chunks/{chunk-J6TW7GNF.js → chunk-QIUTQICH.js} +1 -1
- package/chunks/{chunk-TWDCN5H2.js → chunk-QK63EULE.js} +1 -1
- package/chunks/{chunk-HZZT75LI.js → chunk-QTAC4W7J.js} +1 -1
- package/chunks/{chunk-P7DIAJNX.js → chunk-R7HBR4QQ.js} +1 -1
- package/chunks/{chunk-U2FJSKS3.js → chunk-RHEMFKMX.js} +1 -1
- package/chunks/{chunk-TRRY3QMM.js → chunk-RL57IU47.js} +1 -1
- package/chunks/{chunk-SPWDYRDH.js → chunk-S2OOQRLJ.js} +1 -1
- package/chunks/{chunk-QBRADQ7L.js → chunk-SWTMWNTZ.js} +1 -1
- package/chunks/{chunk-AZUDF52L.js → chunk-SXTKQHFZ.js} +1 -1
- package/chunks/{chunk-5RQRSPPD.js → chunk-T5S3MJIK.js} +1 -1
- package/chunks/{chunk-I3ORWQ2U.js → chunk-UDGDEIBB.js} +1 -1
- package/chunks/{chunk-EMDEBV33.js → chunk-UIFBF3E7.js} +1 -1
- package/chunks/{chunk-BGEMWNES.js → chunk-UQDPWI7D.js} +1 -1
- package/chunks/{chunk-I5LKOTZT.js → chunk-VON4MVIM.js} +1 -1
- package/chunks/{chunk-HJPO6MEW.js → chunk-W5D2T2JK.js} +1 -1
- package/chunks/{chunk-F6YYDRMH.js → chunk-WNGYYU67.js} +1 -1
- package/chunks/{chunk-S2GKUZZZ.js → chunk-WO3F62ZD.js} +1 -1
- package/chunks/{chunk-K7KW3ZJQ.js → chunk-WVY5Q6YY.js} +1 -1
- package/chunks/{chunk-GH6DPLWU.js → chunk-Y4Q667BW.js} +1 -1
- package/chunks/{chunk-FH74N7Y7.js → chunk-YJLMFUCS.js} +2 -2
- package/chunks/{chunk-C3Y2S5AM.js → chunk-YKHRCSKP.js} +1 -1
- package/chunks/{chunk-P4UJ7CXJ.js → chunk-YLIS36QA.js} +1 -1
- package/chunks/{chunk-4QIFOIBS.js → chunk-YVZ4XZRB.js} +1 -1
- package/chunks/{chunk-KGRD6G5J.js → chunk-Z27JJPKN.js} +1 -1
- package/chunks/{chunk-KOHHDB2L.js → chunk-ZCIS6MJZ.js} +1 -1
- package/chunks/{chunk-QNNDZYVW.js → chunk-ZHLQ222N.js} +1 -1
- package/chunks/{chunk-KWRZ3WJO.js → chunk-ZP7MTWMR.js} +1 -1
- package/chunks/{codex-subagent-executor-H44VDB5E.js → codex-subagent-executor-6OJVGF2S.js} +1 -1
- package/chunks/{config-utils-4X4SV4RL.js → config-utils-FI3A4QAN.js} +1 -1
- package/chunks/{contextCommand-4KVOHTAJ.js → contextCommand-YEBZQHG4.js} +1 -1
- package/chunks/{core-runtime-4RARI4NX.js → core-runtime-CFMHUAS7.js} +1 -1
- package/chunks/{create-sub-session-CNSRJFYG.js → create-sub-session-G26337FT.js} +1 -1
- package/chunks/{daemon-git-worktree-guard-6XQQPP2H.js → daemon-git-worktree-guard-ITU6NQIV.js} +1 -1
- package/chunks/{daemon-status-provider-PRTEQT5T.js → daemon-status-provider-CSWRGMRX.js} +1 -1
- package/chunks/{daemon-trust-policy-GXKJVZDU.js → daemon-trust-policy-IYD7NOGK.js} +1 -1
- package/chunks/{daemon-trust-policy-monitor-L2ORKHMM.js → daemon-trust-policy-monitor-OWUP5SYB.js} +1 -1
- package/chunks/{deferred-core-runtime-RZQFUSPX.js → deferred-core-runtime-CVCQU7O4.js} +1 -1
- package/chunks/{edit-W44XQCIS.js → edit-7YBQLILC.js} +1 -1
- package/chunks/{enterPlanMode-B456A2XO.js → enterPlanMode-L3PVSD2P.js} +1 -1
- package/chunks/{environment-DSGQSQFS.js → environment-BVEOYQHO.js} +1 -1
- package/chunks/{errors-KL725247.js → errors-VQWBGR6D.js} +1 -1
- package/chunks/{execution-tool-KT3EBWHG.js → execution-tool-P7CBXSGZ.js} +1 -1
- package/chunks/{execution-worker-LPQ4HMN4.js → execution-worker-RZXNYK4B.js} +1 -1
- package/chunks/{exitPlanMode-JLKS76IA.js → exitPlanMode-MBUTM3NW.js} +1 -1
- package/chunks/{fast-path-5UD52IHH.js → fast-path-T2FDUSHV.js} +1 -1
- package/chunks/{glob-LYA2H6X3.js → glob-RH7XXSYE.js} +1 -1
- package/chunks/{goal-tools-SHSIDLZX.js → goal-tools-K6XBCE5E.js} +1 -1
- package/chunks/{handleAutoUpdate-T4RE6CZN.js → handleAutoUpdate-PG7R3KPH.js} +1 -1
- package/chunks/{i18n-5DK327WA.js → i18n-EGTBMA3N.js} +1 -1
- package/chunks/{initializer-TJGE4OJA.js → initializer-RIKH4PCP.js} +1 -1
- package/chunks/{installationInfo-MZ62GDIC.js → installationInfo-BBADHZLD.js} +1 -1
- package/chunks/{interactive-mod-session-YCUBQ6RM.js → interactive-mod-session-7RDKAHZ4.js} +1 -1
- package/chunks/{list-4L3LYDQM.js → list-YEGWEHJX.js} +1 -1
- package/chunks/{llm-3JQWBZXV.js → llm-D3LHPY27.js} +4 -4
- package/chunks/{llm-content-generator-6UPJWPOM.js → llm-content-generator-BLTBMV66.js} +1 -1
- package/chunks/{loadedSettingsAdapter-STPKAFJG.js → loadedSettingsAdapter-PLGMKMFO.js} +1 -1
- package/chunks/{local-execution-environment-IE5BOI7Y.js → local-execution-environment-4LDKFNC4.js} +1 -1
- package/chunks/{loggingContentGenerator-4KKWPZJA.js → loggingContentGenerator-376R7DRI.js} +1 -1
- package/chunks/{manage-memory-CRV5SXZZ.js → manage-memory-2ZTIVKNU.js} +1 -1
- package/chunks/{managed-execution-engine-FHLEWVND.js → managed-execution-engine-5LOM3MXG.js} +1 -1
- package/chunks/{managed-npm-update-BRHPOKDU.js → managed-npm-update-2C5JYEXW.js} +1 -1
- package/chunks/{managed-runtime-attestation-worker-GIQKZ5BH.js → managed-runtime-attestation-worker-R2FECMZK.js} +1 -1
- package/chunks/{managed-runtime-bootstrap-P72BT46H.js → managed-runtime-bootstrap-KPLGH4UE.js} +1 -1
- package/chunks/{managed-runtime-session-worker-IYCJDB5K.js → managed-runtime-session-worker-EVKNPK3V.js} +1 -1
- package/chunks/{managed-runtime-ssh-worker-ONT4V5ZG.js → managed-runtime-ssh-worker-IA4HZ3PD.js} +1 -1
- package/chunks/{mcp-NXCQVE2Y.js → mcp-S67IJLI6.js} +1 -1
- package/chunks/{model-call-collection-3DNL45M5.js → model-call-collection-6OGPDTPG.js} +1 -1
- package/chunks/{model-configuration-6HRNYBWV.js → model-configuration-6RWVBOQS.js} +1 -1
- package/chunks/{modelConfigUtils-SKBN64ZW.js → modelConfigUtils-M3TVVYAO.js} +1 -1
- package/chunks/{monitor-7I7Q73UR.js → monitor-ZHOFTN7N.js} +1 -1
- package/chunks/{nonInteractiveCli-YLYRJUBE.js → nonInteractiveCli-6SUGPTJ4.js} +1 -1
- package/chunks/{nonInteractiveToolExecutor-U2ASWT63.js → nonInteractiveToolExecutor-SAHBGO3A.js} +1 -1
- package/chunks/{notebook-edit-WAD7IQCF.js → notebook-edit-ETUOQH6G.js} +1 -1
- package/chunks/{omni-POUUDVU3.js → omni-HV2UBGMZ.js} +1 -1
- package/chunks/{openaiContentGenerator-L7X6IVPL.js → openaiContentGenerator-RZCG7E4M.js} +1 -1
- package/chunks/{openaiResponsesContentGenerator-7XCMFI6P.js → openaiResponsesContentGenerator-X23L5JV3.js} +1 -1
- package/chunks/{pidfile-MQQT2ZDA.js → pidfile-26WXQCHG.js} +1 -1
- package/chunks/{processUtils-OZLF72NC.js → processUtils-WXLFGNBT.js} +1 -1
- package/chunks/{prompt-terminal-ledger-IYUF6SUU.js → prompt-terminal-ledger-EIZZHF4A.js} +1 -1
- package/chunks/{qwenContentGenerator-DKH3ILUO.js → qwenContentGenerator-GOY7Y6KH.js} +1 -1
- package/chunks/{reactive-degrade-KSNGHMBN.js → reactive-degrade-MNMTTHO5.js} +1 -1
- package/chunks/{read-file-VEELW4OQ.js → read-file-OJNGPNTQ.js} +1 -1
- package/chunks/{resumeHistoryUtils-4SFDTBXU.js → resumeHistoryUtils-QWOWF4VY.js} +1 -1
- package/chunks/{review-QA6HRLVU.js → review-5S24HP2V.js} +1 -1
- package/chunks/{ripGrep-4J6ASSE3.js → ripGrep-Y4PY2MQF.js} +1 -1
- package/chunks/{run-qwen-serve-EJ67LA5O.js → run-qwen-serve-EOUUDZUK.js} +2 -2
- package/chunks/{runtime-6E2FSB5U.js → runtime-ZBPOQX6E.js} +1 -1
- package/chunks/{sandboxConfig-4VE4LNRI.js → sandboxConfig-R7KDS3P5.js} +1 -1
- package/chunks/{scheduled-tasks-GM5EJMK7.js → scheduled-tasks-Q6V7D6K6.js} +1 -1
- package/chunks/{scheduler-HOSVIIOE.js → scheduler-EBQY6BOK.js} +1 -1
- package/chunks/{search-memory-HEAQCHIK.js → search-memory-HX6E23JC.js} +1 -1
- package/chunks/{send-message-FAQ7XEZ5.js → send-message-OZCCCH2F.js} +1 -1
- package/chunks/{serve-VNKPOWSW.js → serve-CMGCI4BK.js} +1 -1
- package/chunks/{server-U2XBJLOV.js → server-7LOAKPDN.js} +3 -3
- package/chunks/{session-AZGROSFX.js → session-LVQYZSJE.js} +1 -1
- package/chunks/{session-attachments-root-6M2ECUNK.js → session-attachments-root-NWG7JOMN.js} +1 -1
- package/chunks/{session-execution-engine-selector-PYDVOSJF.js → session-execution-engine-selector-PHH47ZMA.js} +1 -1
- package/chunks/{session-pr-refresh-3IS7DLEV.js → session-pr-refresh-5IACZPCY.js} +1 -1
- package/chunks/{sessionService-3FWNA4ZB.js → sessionService-7PFAWLHC.js} +1 -1
- package/chunks/{settings-VHKT7JJC.js → settings-CPZBOHN5.js} +1 -1
- package/chunks/{shell-TYOPVB7H.js → shell-A7NLPS2W.js} +1 -1
- package/chunks/{skill-GJQIE5AX.js → skill-VGANGVOD.js} +1 -1
- package/chunks/{skill-settings-76NI6SF3.js → skill-settings-TSZO3X6N.js} +1 -1
- package/chunks/{spawnChannel-FMSYLDKB.js → spawnChannel-2JQYNQKT.js} +1 -1
- package/chunks/{standalone-update-BPZQDQHD.js → standalone-update-QXC3RM6I.js} +1 -1
- package/chunks/{start-opentui-ui-X7XYV5N3.js → start-opentui-ui-BKJ4JHVK.js} +1 -1
- package/chunks/{startInteractiveUI-UZDF4JUB.js → startInteractiveUI-4QIPR7ZY.js} +1 -1
- package/chunks/{team-create-RFZNEF76.js → team-create-5MU6BGXX.js} +1 -1
- package/chunks/{team-plan-approval-MGW3JGSC.js → team-plan-approval-NZUJ6FSA.js} +1 -1
- package/chunks/{terminal-image-renderer-3UED5GZV.js → terminal-image-renderer-CTMJULJ2.js} +1 -1
- package/chunks/{theme-manager-SF6FSSZW.js → theme-manager-6H7GA6QR.js} +1 -1
- package/chunks/{tool-call-W2CJR74U.js → tool-call-XG4CAD5X.js} +1 -1
- package/chunks/{tool-result-media-XSFON2ZQ.js → tool-result-media-RJ5ONO7R.js} +1 -1
- package/chunks/{tool-search-7GY5YTOU.js → tool-search-KBINGEWV.js} +1 -1
- package/chunks/{total-session-admission-OATGW6M5.js → total-session-admission-XNWYCO7G.js} +1 -1
- package/chunks/{trustedFolders-AM4PSGUB.js → trustedFolders-JT5MOB3A.js} +1 -1
- package/chunks/{update-relaunch-YKY52XUT.js → update-relaunch-HXMQI3HO.js} +1 -1
- package/chunks/{updateCheck-RKQ5CPZM.js → updateCheck-XWE3TWL5.js} +1 -1
- package/chunks/{upload-config-CBT7ARZY.js → upload-config-ET7NRHU7.js} +1 -1
- package/chunks/{useAutoAcceptIndicator-Z3YWPUNO.js → useAutoAcceptIndicator-TPMYKNJX.js} +1 -1
- package/chunks/{validateNonInterActiveAuth-7CQHU2RF.js → validateNonInterActiveAuth-U52KMEDS.js} +1 -1
- package/chunks/{version-N2OB6KWP.js → version-CW4RTJ3H.js} +1 -1
- package/chunks/{web-fetch-L5XCBCBA.js → web-fetch-UPMJ3XIZ.js} +1 -1
- package/chunks/{web-search-4EHUA3LJ.js → web-search-PXABWQVC.js} +1 -1
- package/chunks/{workflow-FGAUAYIP.js → workflow-UQ4V3NBZ.js} +1 -1
- package/chunks/{workflow-ancestor-trust-F7RRN6I3.js → workflow-ancestor-trust-QII5KTUJ.js} +1 -1
- package/chunks/{workspace-agents-QW4TKC52.js → workspace-agents-Q3KKMDX2.js} +1 -1
- package/chunks/{workspace-providers-status-MFSZT3YA.js → workspace-providers-status-3ASB64FB.js} +1 -1
- package/chunks/{workspace-registration-store-WQRDSIEI.js → workspace-registration-store-2NPD6U3B.js} +1 -1
- package/chunks/{workspace-registry-FXZFRSCH.js → workspace-registry-6QJKRCDR.js} +1 -1
- package/chunks/{workspace-runtime-coordinator-LJ5YAT3A.js → workspace-runtime-coordinator-ZXUWDQIB.js} +1 -1
- package/chunks/{workspace-service-U632SUWU.js → workspace-service-YPYTYYUN.js} +1 -1
- package/chunks/{workspace-skills-status-M7YXM3LF.js → workspace-skills-status-VTFHQ6R7.js} +1 -1
- package/chunks/{workspace-trust-reconciler-NLJGGI4K.js → workspace-trust-reconciler-52CZVPKH.js} +1 -1
- package/chunks/{write-file-BJCKSXX7.js → write-file-FDBR76G5.js} +1 -1
- package/chunks/{zoom-image-TLJPD4DB.js → zoom-image-MYKWCCXO.js} +1 -1
- package/cli.js +2 -2
- package/execution-worker.js +1 -1
- package/export-transcript-document.js +1 -1
- package/package.json +4 -4
- package/vendor/landlock-run/arm64-linux/qwen-landlock-run +0 -0
- package/vendor/landlock-run/x64-linux/qwen-landlock-run +0 -0
- package/vendor/ripgrep/arm64-darwin/rg +0 -0
- package/vendor/ripgrep/arm64-linux/rg +0 -0
- package/vendor/ripgrep/x64-darwin/rg +0 -0
- package/vendor/ripgrep/x64-linux/rg +0 -0
- package/vendor/tree-sitter/tree-sitter-bash.wasm +0 -0
- package/vendor/tree-sitter/tree-sitter.wasm +0 -0
- package/web-shell/assets/{PierreFilePreview-D9tbdFw8.js → PierreFilePreview-DGTp45Z4.js} +1 -1
- package/web-shell/assets/{SpreadsheetPreview-CeFAk2s-.js → SpreadsheetPreview-DVC_YVei.js} +1 -1
- package/web-shell/assets/{WorkspaceFileBrowser-iaURw8SR.js → WorkspaceFileBrowser-DaQNpS06.js} +1 -1
- package/web-shell/assets/{abnfDiagram-VCTEODGH-Z4CT1NCF.js → abnfDiagram-VCTEODGH-wJbiOoPK.js} +1 -1
- package/web-shell/assets/{agents-route-B7o2Rq-a.js → agents-route-DUhhA1KI.js} +1 -1
- package/web-shell/assets/{arc-DcHBdUJQ.js → arc-CvpNMy1d.js} +1 -1
- package/web-shell/assets/{architectureDiagram-5GKGNRK7-DRDhEC81.js → architectureDiagram-5GKGNRK7-DIhi3dIz.js} +1 -1
- package/web-shell/assets/{blockDiagram-NRAW4CY4-CYRE6WIc.js → blockDiagram-NRAW4CY4-CoeyTlVJ.js} +1 -1
- package/web-shell/assets/{c4Diagram-UCG6FXSJ-CIM8N_Sj.js → c4Diagram-UCG6FXSJ-BYoK_I9M.js} +1 -1
- package/web-shell/assets/channel-DvtGOCg6.js +1 -0
- package/web-shell/assets/{chunk-2Q5K7J3B-Bbfka9Fe.js → chunk-2Q5K7J3B-BeD4GwPg.js} +1 -1
- package/web-shell/assets/{chunk-5VM5RSS4-C02zF3RY.js → chunk-5VM5RSS4-BpkJsB_y.js} +1 -1
- package/web-shell/assets/{chunk-F27PBJKO-Dn0wRD2F.js → chunk-F27PBJKO-BROEWQ1J.js} +1 -1
- package/web-shell/assets/{chunk-G27WJ6UU-Dwpl3l0W.js → chunk-G27WJ6UU-DA8Wtppt.js} +1 -1
- package/web-shell/assets/{chunk-JWPE2WC7-sQbzSoTR.js → chunk-JWPE2WC7-GqB-QFh5.js} +1 -1
- package/web-shell/assets/{chunk-LCL6LL3I-DNlNDtfr.js → chunk-LCL6LL3I-DIPUwYsX.js} +1 -1
- package/web-shell/assets/{chunk-POPQ4Y6H-BOgf1Dl3.js → chunk-POPQ4Y6H-DbnU-jxX.js} +1 -1
- package/web-shell/assets/{chunk-SVP7TREG-DOofWP00.js → chunk-SVP7TREG-DvH7bQ-w.js} +1 -1
- package/web-shell/assets/{chunk-XXDRQBXY-Bj9FxhWU.js → chunk-XXDRQBXY-DdVWVo3U.js} +1 -1
- package/web-shell/assets/classDiagram-DTDB5LWJ-9NR5W1rE.js +1 -0
- package/web-shell/assets/classDiagram-v2-JRS7N3AN-9NR5W1rE.js +1 -0
- package/web-shell/assets/{cose-bilkent-JH36ORCC-CUlPjyww.js → cose-bilkent-JH36ORCC-JgMKxP9H.js} +1 -1
- package/web-shell/assets/{cynefin-OW5HDTMX-5noArzI7.js → cynefin-OW5HDTMX-BVUpNgVm.js} +1 -1
- package/web-shell/assets/{cynefinDiagram-5FMLGOSQ-DELvTqmf.js → cynefinDiagram-5FMLGOSQ-CxAdk-iS.js} +1 -1
- package/web-shell/assets/{dagre-3AP2YEHR-CAL6Z3hL.js → dagre-3AP2YEHR-CvXWkM86.js} +1 -1
- package/web-shell/assets/{diagram-S7CK7UJ4-DQC2gaIi.js → diagram-S7CK7UJ4-DD_PS4nm.js} +1 -1
- package/web-shell/assets/{diagram-UQ7AKVKN-CkU6M-3R.js → diagram-UQ7AKVKN-EVZkTODD.js} +1 -1
- package/web-shell/assets/{diagram-VSXAHHWV-CvHpHwVx.js → diagram-VSXAHHWV-CGZc1pZU.js} +1 -1
- package/web-shell/assets/{diagram-VX7I27RA-D9l5F9iB.js → diagram-VX7I27RA-DjNql499.js} +1 -1
- package/web-shell/assets/{diagram-Z3DM3KII-DW-VFvYx.js → diagram-Z3DM3KII-CCa0WtmR.js} +1 -1
- package/web-shell/assets/{docx-preview-8MQfOGQh.js → docx-preview-DpVElxvj.js} +1 -1
- package/web-shell/assets/{ebnfDiagram-PWID7BFC-C0Q71wC_.js → ebnfDiagram-PWID7BFC-W2hoOJZF.js} +1 -1
- package/web-shell/assets/{erDiagram-SSCWMZ5O-DWDLRh1S.js → erDiagram-SSCWMZ5O-Dz5NxxEb.js} +1 -1
- package/web-shell/assets/{flowDiagram-A5DVABFB-CVzJnl1P.js → flowDiagram-A5DVABFB-BTMAn8b5.js} +1 -1
- package/web-shell/assets/{ganttDiagram-EL5Y4UJY-B320pcgR.js → ganttDiagram-EL5Y4UJY-BaFrd5ZY.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-WWUBYQGX-Di4uZh-J.js → gitGraphDiagram-WWUBYQGX-IlmdUqRk.js} +1 -1
- package/web-shell/assets/{index-Csr8Hx_O.js → index-C2ez0ZjE.js} +1 -1
- package/web-shell/assets/{index-C9BecA_H.js → index-Cs-XBNmB.js} +101 -101
- package/web-shell/assets/{infoDiagram-RXCK75RN-CbafhxET.js → infoDiagram-RXCK75RN-BHs9kpar.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-5VMMS53U-DrQuIDeR.js → ishikawaDiagram-5VMMS53U-DWCEQ85v.js} +1 -1
- package/web-shell/assets/{journeyDiagram-EYS64GPL-BschmjBj.js → journeyDiagram-EYS64GPL-RTDAw9yc.js} +1 -1
- package/web-shell/assets/{kanban-definition-3QL26DDD-B7x9BU9N.js → kanban-definition-3QL26DDD-B7Nl9bq6.js} +1 -1
- package/web-shell/assets/{layout-BewPaOyO.js → layout-BabjFEb1.js} +1 -1
- package/web-shell/assets/{linear-CnLILCVp.js → linear-CZuGjuQd.js} +1 -1
- package/web-shell/assets/{mermaid.core-Csj9KPfJ.js → mermaid.core-CK78bIGt.js} +6 -6
- package/web-shell/assets/{mindmap-definition-FBJOCRG2-CIGTi5gg.js → mindmap-definition-FBJOCRG2-BbcCi_jP.js} +1 -1
- package/web-shell/assets/{pegDiagram-XKGWAZYB-CuWBRQzb.js → pegDiagram-XKGWAZYB-DpLQ7u8i.js} +1 -1
- package/web-shell/assets/{pieDiagram-E7YTZNPT-Co5ukXCE.js → pieDiagram-E7YTZNPT-BpWFVtM0.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-AXDQQJYC-B0hzjh6o.js → quadrantDiagram-AXDQQJYC-CGzYlaN1.js} +1 -1
- package/web-shell/assets/{railroadDiagram-O6MQD6OU-nhkJB0xD.js → railroadDiagram-O6MQD6OU-BNQYW-Zi.js} +1 -1
- package/web-shell/assets/{requirementDiagram-EFPCY7ZU-C7NpxjVR.js → requirementDiagram-EFPCY7ZU-C4fCdIDW.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-P5KCCOFB-CUWlnhZC.js → sankeyDiagram-P5KCCOFB-BvbbAnMA.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-WJ2MYXX4-BoykH0_J.js → sequenceDiagram-WJ2MYXX4-DGXNc6E1.js} +1 -1
- package/web-shell/assets/{sizeCapture-X5ZJPWSS-aF-PkSe5.js → sizeCapture-X5ZJPWSS-C4W45Xf5.js} +1 -1
- package/web-shell/assets/{stateDiagram-HBIQ2CUA-g5q0b922.js → stateDiagram-HBIQ2CUA-D3q0fen-.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-4QOOHH4V-XKoYIi05.js +1 -0
- package/web-shell/assets/{swimlanes-XN3QIQJK-BbASszfe.js → swimlanes-XN3QIQJK-D8n-ResR.js} +1 -1
- package/web-shell/assets/swimlanesDiagram-VK2B7HYN-C7qJMSzs.js +8 -0
- package/web-shell/assets/{timeline-definition-24CTP7MA-AXIV0TJJ.js → timeline-definition-24CTP7MA-Cio4y1mM.js} +1 -1
- package/web-shell/assets/{vennDiagram-4TSXK5OY-B-E0rj1h.js → vennDiagram-4TSXK5OY-DVlg0xnc.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-VM6X3IG4-DiOOYJ2D.js → wardleyDiagram-VM6X3IG4-CgeIsimQ.js} +1 -1
- package/web-shell/assets/{xychartDiagram-S5SC5T6Z-De_z7HkS.js → xychartDiagram-S5SC5T6Z-UXjyTLnU.js} +1 -1
- package/web-shell/index.html +1 -1
- package/web-shell/sw.js +1 -1
- package/web-shell/assets/channel-Bwr9aS_E.js +0 -1
- package/web-shell/assets/classDiagram-DTDB5LWJ-BmY8Mmyo.js +0 -1
- package/web-shell/assets/classDiagram-v2-JRS7N3AN-BmY8Mmyo.js +0 -1
- package/web-shell/assets/stateDiagram-v2-4QOOHH4V-CTOjUMow.js +0 -1
- package/web-shell/assets/swimlanesDiagram-VK2B7HYN-Bz6ia3oL.js +0 -8
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
-
import{formatDuration}from"./chunk-RIDELEM5.js";import{theme}from"./chunk-OWCYARAS.js";import{require_jsx_runtime}from"./chunk-REPFZQ7R.js";import{Box_default,Text,use_is_screen_reader_enabled_default,wrapAnsi}from"./chunk-XZQH4UBR.js";import{require_react}from"./chunk-5QKDV4CD.js";import{collectInlineImages,extractInlineContentRuns}from"./chunk-VRNYIKVL.js";import{formatHistoryGapNotice,indexGapsByChild}from"./chunk-DFO7LGQY.js";import{stringWidth}from"./chunk-GBO2C23J.js";import{t}from"./chunk-H45OX4VY.js";import{isGoalCheckpointBookkeepingRecord}from"./chunk-BOFD4CN3.js";import{GoalPersistenceUnavailableError,computeInitialTurnFromHistory,getToolResponseDisplayText}from"./chunk-RKPHDO42.js";import{projectUserTranscriptForDisplay}from"./chunk-BMSATZXW.js";import{parseGoalStateRecordPayloadV2}from"./chunk-F63ESLTI.js";import{ToolDisplayNames}from"./chunk-2UNFJQ2D.js";import{init_esbuild_shims}from"./chunk-VKDAXTCZ.js";import{__commonJS,__name,__toESM}from"./chunk-KBWJGX7I.js";var require_spinners=__commonJS({"node_modules/cli-spinners/spinners.json"(exports,module){module.exports={dots:{interval:80,frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"]},dots2:{interval:80,frames:["\u28FE","\u28FD","\u28FB","\u28BF","\u287F","\u28DF","\u28EF","\u28F7"]},dots3:{interval:80,frames:["\u280B","\u2819","\u281A","\u281E","\u2816","\u2826","\u2834","\u2832","\u2833","\u2813"]},dots4:{interval:80,frames:["\u2804","\u2806","\u2807","\u280B","\u2819","\u2838","\u2830","\u2820","\u2830","\u2838","\u2819","\u280B","\u2807","\u2806"]},dots5:{interval:80,frames:["\u280B","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B"]},dots6:{interval:80,frames:["\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2834","\u2832","\u2812","\u2802","\u2802","\u2812","\u281A","\u2819","\u2809","\u2801"]},dots7:{interval:80,frames:["\u2808","\u2809","\u280B","\u2813","\u2812","\u2810","\u2810","\u2812","\u2816","\u2826","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808"]},dots8:{interval:80,frames:["\u2801","\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808","\u2808"]},dots9:{interval:80,frames:["\u28B9","\u28BA","\u28BC","\u28F8","\u28C7","\u2867","\u2857","\u284F"]},dots10:{interval:80,frames:["\u2884","\u2882","\u2881","\u2841","\u2848","\u2850","\u2860"]},dots11:{interval:100,frames:["\u2801","\u2802","\u2804","\u2840","\u2880","\u2820","\u2810","\u2808"]},dots12:{interval:80,frames:["\u2880\u2800","\u2840\u2800","\u2804\u2800","\u2882\u2800","\u2842\u2800","\u2805\u2800","\u2883\u2800","\u2843\u2800","\u280D\u2800","\u288B\u2800","\u284B\u2800","\u280D\u2801","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2888\u2829","\u2840\u2899","\u2804\u2859","\u2882\u2829","\u2842\u2898","\u2805\u2858","\u2883\u2828","\u2843\u2890","\u280D\u2850","\u288B\u2820","\u284B\u2880","\u280D\u2841","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2808\u2829","\u2800\u2899","\u2800\u2859","\u2800\u2829","\u2800\u2898","\u2800\u2858","\u2800\u2828","\u2800\u2890","\u2800\u2850","\u2800\u2820","\u2800\u2880","\u2800\u2840"]},dots13:{interval:80,frames:["\u28FC","\u28F9","\u28BB","\u283F","\u285F","\u28CF","\u28E7","\u28F6"]},dots8Bit:{interval:80,frames:["\u2800","\u2801","\u2802","\u2803","\u2804","\u2805","\u2806","\u2807","\u2840","\u2841","\u2842","\u2843","\u2844","\u2845","\u2846","\u2847","\u2808","\u2809","\u280A","\u280B","\u280C","\u280D","\u280E","\u280F","\u2848","\u2849","\u284A","\u284B","\u284C","\u284D","\u284E","\u284F","\u2810","\u2811","\u2812","\u2813","\u2814","\u2815","\u2816","\u2817","\u2850","\u2851","\u2852","\u2853","\u2854","\u2855","\u2856","\u2857","\u2818","\u2819","\u281A","\u281B","\u281C","\u281D","\u281E","\u281F","\u2858","\u2859","\u285A","\u285B","\u285C","\u285D","\u285E","\u285F","\u2820","\u2821","\u2822","\u2823","\u2824","\u2825","\u2826","\u2827","\u2860","\u2861","\u2862","\u2863","\u2864","\u2865","\u2866","\u2867","\u2828","\u2829","\u282A","\u282B","\u282C","\u282D","\u282E","\u282F","\u2868","\u2869","\u286A","\u286B","\u286C","\u286D","\u286E","\u286F","\u2830","\u2831","\u2832","\u2833","\u2834","\u2835","\u2836","\u2837","\u2870","\u2871","\u2872","\u2873","\u2874","\u2875","\u2876","\u2877","\u2838","\u2839","\u283A","\u283B","\u283C","\u283D","\u283E","\u283F","\u2878","\u2879","\u287A","\u287B","\u287C","\u287D","\u287E","\u287F","\u2880","\u2881","\u2882","\u2883","\u2884","\u2885","\u2886","\u2887","\u28C0","\u28C1","\u28C2","\u28C3","\u28C4","\u28C5","\u28C6","\u28C7","\u2888","\u2889","\u288A","\u288B","\u288C","\u288D","\u288E","\u288F","\u28C8","\u28C9","\u28CA","\u28CB","\u28CC","\u28CD","\u28CE","\u28CF","\u2890","\u2891","\u2892","\u2893","\u2894","\u2895","\u2896","\u2897","\u28D0","\u28D1","\u28D2","\u28D3","\u28D4","\u28D5","\u28D6","\u28D7","\u2898","\u2899","\u289A","\u289B","\u289C","\u289D","\u289E","\u289F","\u28D8","\u28D9","\u28DA","\u28DB","\u28DC","\u28DD","\u28DE","\u28DF","\u28A0","\u28A1","\u28A2","\u28A3","\u28A4","\u28A5","\u28A6","\u28A7","\u28E0","\u28E1","\u28E2","\u28E3","\u28E4","\u28E5","\u28E6","\u28E7","\u28A8","\u28A9","\u28AA","\u28AB","\u28AC","\u28AD","\u28AE","\u28AF","\u28E8","\u28E9","\u28EA","\u28EB","\u28EC","\u28ED","\u28EE","\u28EF","\u28B0","\u28B1","\u28B2","\u28B3","\u28B4","\u28B5","\u28B6","\u28B7","\u28F0","\u28F1","\u28F2","\u28F3","\u28F4","\u28F5","\u28F6","\u28F7","\u28B8","\u28B9","\u28BA","\u28BB","\u28BC","\u28BD","\u28BE","\u28BF","\u28F8","\u28F9","\u28FA","\u28FB","\u28FC","\u28FD","\u28FE","\u28FF"]},sand:{interval:80,frames:["\u2801","\u2802","\u2804","\u2840","\u2848","\u2850","\u2860","\u28C0","\u28C1","\u28C2","\u28C4","\u28CC","\u28D4","\u28E4","\u28E5","\u28E6","\u28EE","\u28F6","\u28F7","\u28FF","\u287F","\u283F","\u289F","\u281F","\u285B","\u281B","\u282B","\u288B","\u280B","\u280D","\u2849","\u2809","\u2811","\u2821","\u2881"]},line:{interval:130,frames:["-","\\","|","/"]},line2:{interval:100,frames:["\u2802","-","\u2013","\u2014","\u2013","-"]},pipe:{interval:100,frames:["\u2524","\u2518","\u2534","\u2514","\u251C","\u250C","\u252C","\u2510"]},simpleDots:{interval:400,frames:[". ",".. ","..."," "]},simpleDotsScrolling:{interval:200,frames:[". ",".. ","..."," .."," ."," "]},star:{interval:70,frames:["\u2736","\u2738","\u2739","\u273A","\u2739","\u2737"]},star2:{interval:80,frames:["+","x","*"]},flip:{interval:70,frames:["_","_","_","-","`","`","'","\xB4","-","_","_","_"]},hamburger:{interval:100,frames:["\u2631","\u2632","\u2634"]},growVertical:{interval:120,frames:["\u2581","\u2583","\u2584","\u2585","\u2586","\u2587","\u2586","\u2585","\u2584","\u2583"]},growHorizontal:{interval:120,frames:["\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589","\u258A","\u258B","\u258C","\u258D","\u258E"]},balloon:{interval:140,frames:[" ",".","o","O","@","*"," "]},balloon2:{interval:120,frames:[".","o","O","\xB0","O","o","."]},noise:{interval:100,frames:["\u2593","\u2592","\u2591"]},bounce:{interval:120,frames:["\u2801","\u2802","\u2804","\u2802"]},boxBounce:{interval:120,frames:["\u2596","\u2598","\u259D","\u2597"]},boxBounce2:{interval:100,frames:["\u258C","\u2580","\u2590","\u2584"]},triangle:{interval:50,frames:["\u25E2","\u25E3","\u25E4","\u25E5"]},binary:{interval:80,frames:["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},arc:{interval:100,frames:["\u25DC","\u25E0","\u25DD","\u25DE","\u25E1","\u25DF"]},circle:{interval:120,frames:["\u25E1","\u2299","\u25E0"]},squareCorners:{interval:180,frames:["\u25F0","\u25F3","\u25F2","\u25F1"]},circleQuarters:{interval:120,frames:["\u25F4","\u25F7","\u25F6","\u25F5"]},circleHalves:{interval:50,frames:["\u25D0","\u25D3","\u25D1","\u25D2"]},squish:{interval:100,frames:["\u256B","\u256A"]},toggle:{interval:250,frames:["\u22B6","\u22B7"]},toggle2:{interval:80,frames:["\u25AB","\u25AA"]},toggle3:{interval:120,frames:["\u25A1","\u25A0"]},toggle4:{interval:100,frames:["\u25A0","\u25A1","\u25AA","\u25AB"]},toggle5:{interval:100,frames:["\u25AE","\u25AF"]},toggle6:{interval:300,frames:["\u101D","\u1040"]},toggle7:{interval:80,frames:["\u29BE","\u29BF"]},toggle8:{interval:100,frames:["\u25CD","\u25CC"]},toggle9:{interval:100,frames:["\u25C9","\u25CE"]},toggle10:{interval:100,frames:["\u3282","\u3280","\u3281"]},toggle11:{interval:50,frames:["\u29C7","\u29C6"]},toggle12:{interval:120,frames:["\u2617","\u2616"]},toggle13:{interval:80,frames:["=","*","-"]},arrow:{interval:100,frames:["\u2190","\u2196","\u2191","\u2197","\u2192","\u2198","\u2193","\u2199"]},arrow2:{interval:80,frames:["\u2B06\uFE0F ","\u2197\uFE0F ","\u27A1\uFE0F ","\u2198\uFE0F ","\u2B07\uFE0F ","\u2199\uFE0F ","\u2B05\uFE0F ","\u2196\uFE0F "]},arrow3:{interval:120,frames:["\u25B9\u25B9\u25B9\u25B9\u25B9","\u25B8\u25B9\u25B9\u25B9\u25B9","\u25B9\u25B8\u25B9\u25B9\u25B9","\u25B9\u25B9\u25B8\u25B9\u25B9","\u25B9\u25B9\u25B9\u25B8\u25B9","\u25B9\u25B9\u25B9\u25B9\u25B8"]},bouncingBar:{interval:80,frames:["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},bouncingBall:{interval:80,frames:["( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF)","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","(\u25CF )"]},smiley:{interval:200,frames:["\u{1F604} ","\u{1F61D} "]},monkey:{interval:300,frames:["\u{1F648} ","\u{1F648} ","\u{1F649} ","\u{1F64A} "]},hearts:{interval:100,frames:["\u{1F49B} ","\u{1F499} ","\u{1F49C} ","\u{1F49A} ","\u2764\uFE0F "]},clock:{interval:100,frames:["\u{1F55B} ","\u{1F550} ","\u{1F551} ","\u{1F552} ","\u{1F553} ","\u{1F554} ","\u{1F555} ","\u{1F556} ","\u{1F557} ","\u{1F558} ","\u{1F559} ","\u{1F55A} "]},earth:{interval:180,frames:["\u{1F30D} ","\u{1F30E} ","\u{1F30F} "]},material:{interval:17,frames:["\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581"]},moon:{interval:80,frames:["\u{1F311} ","\u{1F312} ","\u{1F313} ","\u{1F314} ","\u{1F315} ","\u{1F316} ","\u{1F317} ","\u{1F318} "]},runner:{interval:140,frames:["\u{1F6B6} ","\u{1F3C3} "]},pong:{interval:80,frames:["\u2590\u2802 \u258C","\u2590\u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802\u258C","\u2590 \u2820\u258C","\u2590 \u2840\u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590\u2820 \u258C"]},shark:{interval:120,frames:["\u2590|\\____________\u258C","\u2590_|\\___________\u258C","\u2590__|\\__________\u258C","\u2590___|\\_________\u258C","\u2590____|\\________\u258C","\u2590_____|\\_______\u258C","\u2590______|\\______\u258C","\u2590_______|\\_____\u258C","\u2590________|\\____\u258C","\u2590_________|\\___\u258C","\u2590__________|\\__\u258C","\u2590___________|\\_\u258C","\u2590____________|\\\u258C","\u2590____________/|\u258C","\u2590___________/|_\u258C","\u2590__________/|__\u258C","\u2590_________/|___\u258C","\u2590________/|____\u258C","\u2590_______/|_____\u258C","\u2590______/|______\u258C","\u2590_____/|_______\u258C","\u2590____/|________\u258C","\u2590___/|_________\u258C","\u2590__/|__________\u258C","\u2590_/|___________\u258C","\u2590/|____________\u258C"]},dqpb:{interval:100,frames:["d","q","p","b"]},weather:{interval:100,frames:["\u2600\uFE0F ","\u2600\uFE0F ","\u2600\uFE0F ","\u{1F324} ","\u26C5\uFE0F ","\u{1F325} ","\u2601\uFE0F ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u26C8 ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u2601\uFE0F ","\u{1F325} ","\u26C5\uFE0F ","\u{1F324} ","\u2600\uFE0F ","\u2600\uFE0F "]},christmas:{interval:400,frames:["\u{1F332}","\u{1F384}"]},grenade:{interval:80,frames:["\u060C ","\u2032 "," \xB4 "," \u203E "," \u2E0C"," \u2E0A"," |"," \u204E"," \u2055"," \u0DF4 "," \u2053"," "," "," "]},point:{interval:125,frames:["\u2219\u2219\u2219","\u25CF\u2219\u2219","\u2219\u25CF\u2219","\u2219\u2219\u25CF","\u2219\u2219\u2219"]},layer:{interval:150,frames:["-","=","\u2261"]},betaWave:{interval:80,frames:["\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1"]},fingerDance:{interval:160,frames:["\u{1F918} ","\u{1F91F} ","\u{1F596} ","\u270B ","\u{1F91A} ","\u{1F446} "]},fistBump:{interval:80,frames:["\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u3000\u{1F91C}\u3000\u3000\u{1F91B}\u3000 ","\u3000\u3000\u{1F91C}\u{1F91B}\u3000\u3000 ","\u3000\u{1F91C}\u2728\u{1F91B}\u3000\u3000 ","\u{1F91C}\u3000\u2728\u3000\u{1F91B}\u3000 "]},soccerHeader:{interval:80,frames:[" \u{1F9D1}\u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F\u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} "]},mindblown:{interval:160,frames:["\u{1F610} ","\u{1F610} ","\u{1F62E} ","\u{1F62E} ","\u{1F626} ","\u{1F626} ","\u{1F627} ","\u{1F627} ","\u{1F92F} ","\u{1F4A5} ","\u2728 ","\u3000 ","\u3000 ","\u3000 "]},speaker:{interval:160,frames:["\u{1F508} ","\u{1F509} ","\u{1F50A} ","\u{1F509} "]},orangePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} "]},bluePulse:{interval:100,frames:["\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},orangeBluePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} ","\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},timeTravel:{interval:100,frames:["\u{1F55B} ","\u{1F55A} ","\u{1F559} ","\u{1F558} ","\u{1F557} ","\u{1F556} ","\u{1F555} ","\u{1F554} ","\u{1F553} ","\u{1F552} ","\u{1F551} ","\u{1F550} "]},aesthetic:{interval:80,frames:["\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0","\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1"]},dwarfFortress:{interval:80,frames:[" \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A \u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A \xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A \xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\u2593\xA3 "," \u263A\u2593\xA3 "," \u263A\u2592\xA3 "," \u263A\u2592\xA3 "," \u263A\u2591\xA3 "," \u263A\u2591\xA3 "," \u263A \xA3 "," \u263A\xA3 "," \u263A\xA3 "," \u263A\u2593 "," \u263A\u2593 "," \u263A\u2592 "," \u263A\u2592 "," \u263A\u2591 "," \u263A\u2591 "," \u263A "," \u263A &"," \u263A \u263C&"," \u263A \u263C &"," \u263A\u263C &"," \u263A\u263C & "," \u203C & "," \u263A & "," \u203C & "," \u263A & "," \u203C & "," \u263A & ","\u203C & "," & "," & "," & \u2591 "," & \u2592 "," & \u2593 "," & \xA3 "," & \u2591\xA3 "," & \u2592\xA3 "," & \u2593\xA3 "," & \xA3\xA3 "," & \u2591\xA3\xA3 "," & \u2592\xA3\xA3 ","& \u2593\xA3\xA3 ","& \xA3\xA3\xA3 "," \u2591\xA3\xA3\xA3 "," \u2592\xA3\xA3\xA3 "," \u2593\xA3\xA3\xA3 "," \u2588\xA3\xA3\xA3 "," \u2591\u2588\xA3\xA3\xA3 "," \u2592\u2588\xA3\xA3\xA3 "," \u2593\u2588\xA3\xA3\xA3 "," \u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "]}}}});var require_cli_spinners=__commonJS({"node_modules/cli-spinners/index.js"(exports,module){"use strict";init_esbuild_shims();var spinners2=Object.assign({},require_spinners());var spinnersList=Object.keys(spinners2);Object.defineProperty(spinners2,"random",{get(){const randomIndex=Math.floor(Math.random()*spinnersList.length);const spinnerName=spinnersList[randomIndex];return spinners2[spinnerName]}});module.exports=spinners2}});init_esbuild_shims();import*as path from"node:path";init_esbuild_shims();init_esbuild_shims();var EstimatedArtWidth=59;var BoxBorderWidth=1;var BOX_PADDING_X=1;var UI_WIDTH=EstimatedArtWidth+BOX_PADDING_X*2+BoxBorderWidth*2;var SHELL_COMMAND_NAME="Shell Command";var SHELL_NAME="Shell";var TOOL_STATUS={SUCCESS:"\u2713",PENDING:"o",EXECUTING:"\u22B7",CONFIRMING:"?",CANCELED:"-",ERROR:"x"};var _VS15="\uFE0E";var ICON={DIAMOND:`\u25C6${_VS15}`,CIRCLE_FILLED:`\u25CF${_VS15}`,TRIANGLE:`\u25B3${_VS15}`,CIRCLE_EMPTY:`\u25CB${_VS15}`,BULLSEYE:`\u25CE${_VS15}`,REFERENCE:`\u203B${_VS15}`,THEREFORE:`\u2234${_VS15}`,BECAUSE:`\u2235${_VS15}`,STAR:`\u2605${_VS15}`,SPARKLE:`\u2733${_VS15}`,RADIO_FILLED:`\u25C9${_VS15}`,CIRCLE_LEFT_HALF:`\u25D0${_VS15}`,CHECK:`\u2713${_VS15}`,CROSS:`\u2716${_VS15}`};var SPINNER_FRAMES=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"];var SPINNER_INTERVAL_MS=80;var WAITING_SPINNER_FRAME="\u280F";init_esbuild_shims();init_esbuild_shims();var import_react3=__toESM(require_react(),1);init_esbuild_shims();var import_react=__toESM(require_react(),1);var import_cli_spinners=__toESM(require_cli_spinners(),1);function Spinner({type="dots"}){const[frame,setFrame]=(0,import_react.useState)(0);const spinner=import_cli_spinners.default[type];(0,import_react.useEffect)(()=>{const timer=setInterval(()=>{setFrame(previousFrame=>{const isLastFrame=previousFrame===spinner.frames.length-1;return isLastFrame?0:previousFrame+1})},spinner.interval);return()=>{clearInterval(timer)}},[spinner]);return import_react.default.createElement(Text,null,spinner.frames[frame])}__name(Spinner,"Spinner");var build_default=Spinner;init_esbuild_shims();var import_react2=__toESM(require_react(),1);var StreamingContext=(0,import_react2.createContext)(void 0);var useStreamingContext=__name(()=>{const context=import_react2.default.useContext(StreamingContext);if(context===void 0){throw new Error("useStreamingContext must be used within a StreamingContextProvider")}return context},"useStreamingContext");init_esbuild_shims();var SCREEN_READER_USER_PREFIX="User: ";var SCREEN_READER_MODEL_PREFIX="Model: ";var SCREEN_READER_LOADING="loading";var SCREEN_READER_RESPONDING="responding";var import_jsx_runtime=__toESM(require_jsx_runtime(),1);var TMUX_SPINNER_INTERVAL_MS=750;var TMUX_SPINNER_FRAMES=[". ",".."];var RespondingSpinner=__name(({nonRespondingDisplay,spinnerType="dots"})=>{const streamingState=useStreamingContext();const isScreenReaderEnabled=use_is_screen_reader_enabled_default();if(streamingState==="responding"){return(0,import_jsx_runtime.jsx)(Spinner2,{spinnerType,altText:SCREEN_READER_RESPONDING})}else if(nonRespondingDisplay){return isScreenReaderEnabled?(0,import_jsx_runtime.jsx)(Text,{children:SCREEN_READER_LOADING}):(0,import_jsx_runtime.jsx)(Text,{color:theme.text.primary,children:nonRespondingDisplay})}return null},"RespondingSpinner");var Spinner2=__name(({spinnerType="dots",altText})=>{const isScreenReaderEnabled=use_is_screen_reader_enabled_default();const isTmux=Boolean(process.env["TMUX"]);const[tmuxFrameIndex,setTmuxFrameIndex]=(0,import_react3.useState)(0);(0,import_react3.useEffect)(()=>{if(isScreenReaderEnabled||!isTmux){return}const interval=setInterval(()=>{setTmuxFrameIndex(index=>(index+1)%TMUX_SPINNER_FRAMES.length)},TMUX_SPINNER_INTERVAL_MS);return()=>clearInterval(interval)},[isScreenReaderEnabled,isTmux]);if(isScreenReaderEnabled){return(0,import_jsx_runtime.jsx)(Text,{children:altText})}if(isTmux){return(0,import_jsx_runtime.jsx)(Text,{color:theme.text.primary,children:TMUX_SPINNER_FRAMES[tmuxFrameIndex]})}return(0,import_jsx_runtime.jsx)(Text,{color:theme.text.primary,children:(0,import_jsx_runtime.jsx)(build_default,{type:spinnerType})})},"Spinner");var import_jsx_runtime2=__toESM(require_jsx_runtime(),1);var STATUS_INDICATOR_WIDTH=2;var ToolStatusIndicator=__name(({status,name})=>{const isShell=name===SHELL_COMMAND_NAME||name===SHELL_NAME;const statusColor=isShell?theme.ui.symbol:theme.status.warning;return(0,import_jsx_runtime2.jsxs)(Box_default,{minWidth:STATUS_INDICATOR_WIDTH,flexShrink:0,children:[status==="Pending"&&(0,import_jsx_runtime2.jsx)(Text,{color:theme.status.success,children:TOOL_STATUS.PENDING}),status==="Executing"&&(0,import_jsx_runtime2.jsx)(RespondingSpinner,{spinnerType:"toggle",nonRespondingDisplay:TOOL_STATUS.EXECUTING}),status==="Success"&&(0,import_jsx_runtime2.jsx)(Text,{color:theme.status.success,"aria-label":"Success:",children:TOOL_STATUS.SUCCESS}),status==="Confirming"&&(0,import_jsx_runtime2.jsx)(Text,{color:statusColor,"aria-label":"Confirming:",children:TOOL_STATUS.CONFIRMING}),status==="Canceled"&&(0,import_jsx_runtime2.jsx)(Text,{color:statusColor,"aria-label":"Canceled:",bold:true,children:TOOL_STATUS.CANCELED}),status==="Error"&&(0,import_jsx_runtime2.jsx)(Text,{color:theme.status.error,"aria-label":"Error:",bold:true,children:TOOL_STATUS.ERROR})]})},"ToolStatusIndicator");init_esbuild_shims();var import_react4=__toESM(require_react(),1);var import_jsx_runtime3=__toESM(require_jsx_runtime(),1);var ToolElapsedTime=__name(({status,executionStartTime,timeoutMs})=>{const[elapsedSeconds,setElapsedSeconds]=(0,import_react4.useState)(0);(0,import_react4.useEffect)(()=>{if(status!=="Executing"||!executionStartTime){setElapsedSeconds(0);return}setElapsedSeconds(Math.floor((Date.now()-executionStartTime)/1e3));const interval=setInterval(()=>{setElapsedSeconds(Math.floor((Date.now()-executionStartTime)/1e3))},1e3);return()=>clearInterval(interval)},[status,executionStartTime]);if(status!=="Executing")return null;const hasTimeout=timeoutMs!=null&&timeoutMs>0;if(!hasTimeout&&elapsedSeconds<3)return null;const elapsedStr=formatDuration(elapsedSeconds*1e3,{hideTrailingZeros:true});const label=hasTimeout?`(${elapsedStr} \xB7 timeout ${formatDuration(timeoutMs,{hideTrailingZeros:true})})`:elapsedStr;return(0,import_jsx_runtime3.jsx)(Box_default,{flexShrink:0,marginLeft:1,children:(0,import_jsx_runtime3.jsx)(Text,{color:theme.text.secondary,children:label})})},"ToolElapsedTime");var import_jsx_runtime4=__toESM(require_jsx_runtime(),1);var ELAPSED_TIME_MARGIN_LEFT=1;var EXECUTING_ELAPSED_TIME_RESERVED_LABEL="99h 59m 59s";function getOverallStatus(toolCalls){if(toolCalls.some(t2=>t2.status==="Confirming"))return"Confirming";if(toolCalls.some(t2=>t2.status==="Executing"))return"Executing";if(toolCalls.some(t2=>t2.status==="Error"))return"Error";if(toolCalls.some(t2=>t2.status==="Canceled"))return"Canceled";if(toolCalls.some(t2=>t2.status==="Pending"))return"Pending";return"Success"}__name(getOverallStatus,"getOverallStatus");function getActiveTool(toolCalls){return toolCalls.find(t2=>t2.status==="Confirming")??toolCalls.find(t2=>t2.status==="Executing")??toolCalls[toolCalls.length-1]}__name(getActiveTool,"getActiveTool");function getShellTimeoutMs(tool){const display=tool.resultDisplay;if(typeof display==="object"&&display!==null&&"ansiOutput"in display){return display.timeoutMs}return void 0}__name(getShellTimeoutMs,"getShellTimeoutMs");function isToolGroupActive(status){return status==="Executing"||status==="Pending"||status==="Confirming"}__name(isToolGroupActive,"isToolGroupActive");function getElapsedTimeReservedWidth(tool,status){if(status!=="Executing")return 0;const timeoutMs=getShellTimeoutMs(tool);let label=EXECUTING_ELAPSED_TIME_RESERVED_LABEL;if(timeoutMs!=null&&timeoutMs>0){const maxElapsedStr=formatDuration(timeoutMs,{hideTrailingZeros:true});label=`(${maxElapsedStr} \xB7 timeout ${maxElapsedStr})`}return ELAPSED_TIME_MARGIN_LEFT+stringWidth(label)}__name(getElapsedTimeReservedWidth,"getElapsedTimeReservedWidth");var TOOL_NAME_TO_CATEGORY={[ToolDisplayNames.READ_FILE]:"read",[ToolDisplayNames.EDIT]:"edit",[ToolDisplayNames.WRITE_FILE]:"write",[ToolDisplayNames.NOTEBOOK_EDIT]:"edit",[ToolDisplayNames.GREP]:"search",[ToolDisplayNames.GLOB]:"search",[ToolDisplayNames.LS]:"list",[ToolDisplayNames.SHELL]:"command",[SHELL_COMMAND_NAME]:"command",[ToolDisplayNames.AGENT]:"agent",[ToolDisplayNames.WORKFLOW]:"agent",[ToolDisplayNames.SEND_MESSAGE]:"agent","Read File":"read","Read File(s)":"read","Read Directory":"list",SearchFiles:"search",FindFiles:"search",ReadFolder:"list",Task:"agent",TodoWrite:"other"};var CATEGORY_TEMPLATES={read:{past:{one:"Read {{count}} file",many:"Read {{count}} files"},active:{one:"Reading {{count}} file",many:"Reading {{count}} files"},pastVerb:"Read",activeVerb:"Reading"},edit:{past:{one:"Edited {{count}} file",many:"Edited {{count}} files"},active:{one:"Editing {{count}} file",many:"Editing {{count}} files"},pastVerb:"Edited",activeVerb:"Editing"},write:{past:{one:"Wrote {{count}} file",many:"Wrote {{count}} files"},active:{one:"Writing {{count}} file",many:"Writing {{count}} files"},pastVerb:"Wrote",activeVerb:"Writing"},search:{past:{one:"Searched {{count}} pattern",many:"Searched {{count}} patterns"},active:{one:"Searching {{count}} pattern",many:"Searching {{count}} patterns"},pastVerb:"Searched",activeVerb:"Searching"},list:{past:{one:"Listed {{count}} directory",many:"Listed {{count}} directories"},active:{one:"Listing {{count}} directory",many:"Listing {{count}} directories"},pastVerb:"Listed",activeVerb:"Listing"},command:{past:{one:"Ran {{count}} command",many:"Ran {{count}} commands"},active:{one:"Running {{count}} command",many:"Running {{count}} commands"},pastVerb:"Ran",activeVerb:"Running"},agent:{past:{one:"Ran {{count}} agent",many:"Ran {{count}} agents"},active:{one:"Running {{count}} agent",many:"Running {{count}} agents"},pastVerb:"Ran",activeVerb:"Running"},other:{past:{one:"Used {{count}} tool",many:"Used {{count}} tools"},active:{one:"Using {{count}} tool",many:"Using {{count}} tools"},pastVerb:"Used",activeVerb:"Using"}};var CATEGORY_ORDER=["search","read","list","command","edit","write","agent","other"];var COLLAPSIBLE_CATEGORIES=new Set(["read","search","list"]);function getToolCategory(toolName){return TOOL_NAME_TO_CATEGORY[toolName]??"other"}__name(getToolCategory,"getToolCategory");function isCollapsibleTool(toolName){return COLLAPSIBLE_CATEGORIES.has(getToolCategory(toolName))}__name(isCollapsibleTool,"isCollapsibleTool");function safeDescription(raw){if(!raw)return void 0;const stripped=raw.replace(/\x1b\][^\x07]*\x07|\x1b[()][A-Z0-9]|\x1b\[[0-9;]*[a-zA-Z]|\x1b./g,"");const cleaned=stripped.replace(/[\x00-\x1f\x7f]/g," ").trim();if(cleaned.startsWith("{")||cleaned.startsWith("[")){try{const parsed=JSON.parse(cleaned);if(typeof parsed==="object"&&parsed!==null)return void 0}catch{}}return cleaned||void 0}__name(safeDescription,"safeDescription");function categoryShowsDescriptionsInline(toolCalls,category){const sameCategory=toolCalls.filter(tc=>getToolCategory(tc.name)===category);if(sameCategory.length>DESCRIPTION_INLINE_LIMIT)return false;return sameCategory.every(tc=>safeDescription(tc.description)!==void 0)}__name(categoryShowsDescriptionsInline,"categoryShowsDescriptionsInline");function getActiveToolHint(toolCalls){if(toolCalls.length<2)return void 0;const statuses=["Confirming","Executing","Pending"];for(const status of statuses){for(let index=toolCalls.length-1;index>=0;index--){const tool=toolCalls[index];if(tool.status===status){const category=getToolCategory(tool.name);const hasCategoryPeers=toolCalls.some((candidate,candidateIndex)=>candidateIndex!==index&&getToolCategory(candidate.name)===category);if(!hasCategoryPeers)return void 0;if(categoryShowsDescriptionsInline(toolCalls,category))return void 0;return safeDescription(tool.description)}}}return void 0}__name(getActiveToolHint,"getActiveToolHint");var DESCRIPTION_INLINE_LIMIT=3;var DESCRIPTION_PREVIEW_COUNT=2;function buildToolSummary(toolCalls,isActive){if(toolCalls.length===0)return"";const toolsByCategory=new Map;for(const tool of toolCalls){const cat=getToolCategory(tool.name);const arr=toolsByCategory.get(cat)??[];arr.push(tool);toolsByCategory.set(cat,arr)}const parts=[];for(const cat of CATEGORY_ORDER){const tools=toolsByCategory.get(cat);if(!tools||tools.length===0)continue;const template=CATEGORY_TEMPLATES[cat];const verb=isActive?template.activeVerb:template.pastVerb;let part;if(tools.length===1){const safeDesc=safeDescription(tools[0].description);if(safeDesc!==void 0){part=`${verb} ${safeDesc}`}else{part=t(isActive?template.active.one:template.past.one,{count:"1"})}}else if(tools.length<=DESCRIPTION_INLINE_LIMIT){const descriptions=tools.map(tc=>safeDescription(tc.description)).filter(d=>d!==void 0);if(descriptions.length===tools.length){part=`${verb} ${descriptions.join(", ")}`}else{const forms=isActive?template.active:template.past;part=t(forms.many,{count:String(tools.length)})}}else{const previewDescs=tools.slice(0,DESCRIPTION_PREVIEW_COUNT).map(tc=>safeDescription(tc.description)).filter(d=>d!==void 0);if(previewDescs.length===DESCRIPTION_PREVIEW_COUNT){const remaining=tools.length-DESCRIPTION_PREVIEW_COUNT;const morePhrase=t("... and {{count}} more",{count:String(remaining)});part=`${verb} ${previewDescs.join(", ")}, ${morePhrase}`}else{const forms=isActive?template.active:template.past;part=t(forms.many,{count:String(tools.length)})}}if(parts.length>0){part=part.charAt(0).toLowerCase()+part.slice(1)}parts.push(part)}return parts.join(", ")}__name(buildToolSummary,"buildToolSummary");function estimateCompactToolGroupHeight(toolCalls,contentWidth){if(toolCalls.length===0)return 0;const overallStatus=getOverallStatus(toolCalls);const activeTool=getActiveTool(toolCalls);const isActive=isToolGroupActive(overallStatus);const summary=`${buildToolSummary(toolCalls,isActive)}${isActive?"\u2026":""}`;const hint=getActiveToolHint(toolCalls);const summaryWidth=Math.max(1,contentWidth-STATUS_INDICATOR_WIDTH-getElapsedTimeReservedWidth(activeTool,overallStatus));const wrappedSummary=wrapAnsi(summary,summaryWidth,{hard:true,trim:false});return Math.max(1,wrappedSummary.split("\n").length)+(hint?1:0)}__name(estimateCompactToolGroupHeight,"estimateCompactToolGroupHeight");var CompactToolGroupDisplay=__name(({toolCalls,contentWidth})=>{if(toolCalls.length===0)return null;const overallStatus=getOverallStatus(toolCalls);const activeTool=getActiveTool(toolCalls);const isActive=isToolGroupActive(overallStatus);const hint=getActiveToolHint(toolCalls);return(0,import_jsx_runtime4.jsxs)(Box_default,{flexDirection:"column",width:contentWidth,gap:0,children:[(0,import_jsx_runtime4.jsxs)(Box_default,{flexDirection:"row",children:[(0,import_jsx_runtime4.jsx)(ToolStatusIndicator,{status:overallStatus,name:activeTool.name}),(0,import_jsx_runtime4.jsx)(Box_default,{flexGrow:1,children:(0,import_jsx_runtime4.jsxs)(Text,{wrap:"wrap",bold:true,children:[buildToolSummary(toolCalls,isActive),isActive&&(0,import_jsx_runtime4.jsx)(Text,{children:"\u2026"},"ellipsis")]})}),(0,import_jsx_runtime4.jsx)(ToolElapsedTime,{status:overallStatus,executionStartTime:activeTool.executionStartTime,timeoutMs:getShellTimeoutMs(activeTool)})]}),hint&&(0,import_jsx_runtime4.jsx)(Box_default,{paddingLeft:STATUS_INDICATOR_WIDTH,children:(0,import_jsx_runtime4.jsxs)(Text,{dimColor:true,wrap:"truncate-end",children:["\u23BF ",hint]})})]})},"CompactToolGroupDisplay");init_esbuild_shims();var SUPERSEDED_FINDINGS_MESSAGE="(findings replaced by a later report_findings call)";function isFindingsListDisplay(value){return typeof value==="object"&&value!==null&&"type"in value&&value.type==="findings_list"}__name(isFindingsListDisplay,"isFindingsListDisplay");function coalesceFindingsHistoryItems(items){let lastItem=-1;let lastTool=-1;for(let i=items.length-1;i>=0&&lastItem===-1;i-=1){const item=items[i];if(item.type!=="tool_group")continue;for(let j=item.tools.length-1;j>=0;j-=1){if(isFindingsListDisplay(item.tools[j].resultDisplay)){lastItem=i;lastTool=j;break}}}if(lastItem===-1)return items;let changed=false;const next=items.map((item,i)=>{if(item.type!=="tool_group")return item;let toolsChanged=false;const tools=item.tools.map((tool,j)=>{if(i===lastItem&&j===lastTool)return tool;if(!isFindingsListDisplay(tool.resultDisplay))return tool;toolsChanged=true;return{...tool,resultDisplay:SUPERSEDED_FINDINGS_MESSAGE,supersededFindingsDisplay:tool.supersededFindingsDisplay??tool.resultDisplay}});if(!toolsChanged)return item;changed=true;return{...item,tools}});return changed?next:items}__name(coalesceFindingsHistoryItems,"coalesceFindingsHistoryItems");function recoalesceFindingsHistoryItems(items){let restored=false;const next=items.map(item=>{if(item.type!=="tool_group")return item;let toolsChanged=false;const tools=item.tools.map(tool=>{if(tool.resultDisplay!==SUPERSEDED_FINDINGS_MESSAGE||!tool.supersededFindingsDisplay){return tool}toolsChanged=true;return{...tool,resultDisplay:tool.supersededFindingsDisplay,supersededFindingsDisplay:void 0}});if(!toolsChanged)return item;restored=true;return{...item,tools}});return coalesceFindingsHistoryItems(restored?next:items)}__name(recoalesceFindingsHistoryItems,"recoalesceFindingsHistoryItems");init_esbuild_shims();function shouldDisplayGoalStateCause(cause){switch(cause){case"turn_finished":case"checkpoint":case"verifier_accept":return false;case"verifier_reject":case"create":case"replace":case"edit":case"pause":case"resume":case"complete":case"blocked":case"usage_limited":case"clear":case"migrated":return true;default:{const exhaustive=cause;return exhaustive}}}__name(shouldDisplayGoalStateCause,"shouldDisplayGoalStateCause");async function waitForGoalRuntime(config,options={}){const awaitReady=__name(async()=>{try{await config.getGoalRuntimeReady()}catch(error){if(!(error instanceof GoalPersistenceUnavailableError))throw error}},"awaitReady");const{timeoutMs}=options;if(timeoutMs==null||timeoutMs<=0){await awaitReady();return true}let timer;const timeout=new Promise(resolve=>{timer=setTimeout(()=>resolve("timeout"),timeoutMs);timer.unref?.()});try{const winner=await Promise.race([awaitReady(),timeout]);return winner!=="timeout"}finally{if(timer)clearTimeout(timer)}}__name(waitForGoalRuntime,"waitForGoalRuntime");function extractTextFromParts(parts){if(!parts)return"";const textParts=[];for(const part of parts){if("text"in part&&part.text){if(!("thought"in part&&part.thought)){textParts.push(part.text)}}}return textParts.join("\n")}__name(extractTextFromParts,"extractTextFromParts");function extractThoughtTextFromParts(parts){if(!parts)return"";const thoughtParts=[];for(const part of parts){if("text"in part&&part.text&&"thought"in part&&part.thought){thoughtParts.push(part.text)}}return thoughtParts.join("\n")}__name(extractThoughtTextFromParts,"extractThoughtTextFromParts");function extractFunctionCalls(parts){if(!parts)return[];const calls=[];for(const part of parts){if("functionCall"in part&&part.functionCall){const fc=part.functionCall;calls.push({id:fc.id||`call-${calls.length}`,name:fc.name||"unknown",args:fc.args||{}})}}return calls}__name(extractFunctionCalls,"extractFunctionCalls");function getTool(config,name){if(!config)return void 0;const toolRegistry=config.getToolRegistry();return toolRegistry.getTool(name)}__name(getTool,"getTool");function formatToolDescription(tool,args){try{const invocation=tool.build(args);return invocation.getDescription()}catch{if(typeof args["description"]==="string"){return args["description"]}return""}}__name(formatToolDescription,"formatToolDescription");function restoreHistoryItem(raw){if(!raw||typeof raw!=="object"){return}const clone={...raw};if("timestamp"in clone){const ts=clone["timestamp"];if(typeof ts==="string"||typeof ts==="number"){clone["timestamp"]=new Date(ts)}}if(typeof clone["type"]!=="string"){return}return clone}__name(restoreHistoryItem,"restoreHistoryItem");function createHistoryGapItem(gap){return{type:"info",text:formatHistoryGapNotice(gap)}}__name(createHistoryGapItem,"createHistoryGapItem");function convertToHistoryItems(conversation,config,historyGaps){const items=[];const gapByChildUuid=indexGapsByChild(historyGaps);const pendingAtCommands=[];let atCommandCounter=0;let lastGoalStateSnapshot;let lastGoalStateCause;const pendingToolCalls=new Map;let currentToolGroup=[];const buildAtCommandDisplays=__name(payload=>{if(payload.status==="error"){atCommandCounter+=1;const filesLabel=payload.filesRead?.length?payload.filesRead.join(", "):"files";return[{callId:`at-command-${atCommandCounter}`,name:"Read File(s)",description:"Error attempting to read files",status:"Error",resultDisplay:payload.message||`Error reading files (${filesLabel})`,confirmationDetails:void 0}]}if(!payload.filesRead?.length){atCommandCounter+=1;return[{callId:`at-command-${atCommandCounter}`,name:"Read File",description:"Read File(s)",status:"Success",resultDisplay:void 0,confirmationDetails:void 0}]}return payload.filesRead.map(filePath=>{atCommandCounter+=1;const isDir=filePath.endsWith("/");return{callId:`at-command-${atCommandCounter}`,name:isDir?"Read Directory":"Read File",description:isDir?`Read directory ${path.basename(filePath)}`:`Read file ${path.basename(filePath)}`,status:"Success",resultDisplay:void 0,confirmationDetails:void 0}})},"buildAtCommandDisplays");for(const record of conversation.messages){const promptId=typeof record.promptId==="string"&&record.promptId.length>0?record.promptId:void 0;const gap=gapByChildUuid.get(record.uuid);if(gap){if(currentToolGroup.length>0){items.push({type:"tool_group",tools:[...currentToolGroup]});currentToolGroup=[]}pendingAtCommands.length=0;lastGoalStateSnapshot=void 0;lastGoalStateCause=void 0;items.push(createHistoryGapItem(gap))}if(record.type==="system"){if(record.subtype==="goal_state"){const payload=parseGoalStateRecordPayloadV2(record.systemPayload);if(payload){const bookkeepingOnly=isGoalCheckpointBookkeepingRecord({cause:payload.cause,previousCause:lastGoalStateCause,previous:lastGoalStateSnapshot,next:payload.snapshot});lastGoalStateCause=payload.cause;lastGoalStateSnapshot=payload.snapshot;if(shouldDisplayGoalStateCause(payload.cause)&&!bookkeepingOnly){if(currentToolGroup.length>0){items.push({type:"tool_group",tools:[...currentToolGroup]});currentToolGroup=[]}items.push({type:"goal_state",snapshot:payload.snapshot,cause:payload.cause})}}continue}if(record.subtype==="slash_command"){if(currentToolGroup.length>0){items.push({type:"tool_group",tools:[...currentToolGroup]});currentToolGroup=[]}const payload=record.systemPayload;if(!payload)continue;if(payload.phase==="invocation"&&payload.rawCommand&&!payload.hiddenInvocation){const sentToModel=typeof payload.sentToModel==="boolean"?payload.sentToModel:void 0;items.push({type:"user",text:payload.rawCommand,...sentToModel===void 0?{}:{sentToModel}})}if(payload.phase==="result"){const outputs=payload.outputHistoryItems??[];for(const raw of outputs){const restored=restoreHistoryItem(raw);if(restored){items.push(restored)}}}}if(record.subtype==="at_command"){const payload=record.systemPayload;if(!payload)continue;pendingAtCommands.push(payload)}if(record.subtype==="rewind"){items.push({type:"info",text:"Conversation rewound."})}continue}switch(record.type){case"user":{if(record.subtype==="goal_runtime")break;if(record.subtype==="notification"||record.subtype==="cron"){const payload2=record.systemPayload;const fallback=record.subtype==="cron"?"Cron job fired":"Background agent completed";const text2=payload2?.displayText||extractTextFromParts(record.message?.parts)||fallback;items.push({type:"notification",text:text2});break}if(record.subtype==="agent_mention"||record.subtype==="agent_message"){const payload2=record.systemPayload;const text2=payload2?.displayText;if(text2){if(record.subtype==="agent_mention"&&!payload2?.author){items.push({type:"user",text:text2,sentToModel:false})}else{const name=payload2?.author?.name??record.agentName;items.push({type:"notification",text:name?`${name}: ${text2}`:text2})}}break}if(record.subtype==="mid_turn_user_message"){const payload2=record.systemPayload;const hasAttachmentReferences2=Array.isArray(payload2?.attachmentReferences)&&payload2.attachmentReferences.length>0;const text2=payload2?.displayText||(hasAttachmentReferences2?"[User message with attachments]":extractTextFromParts(record.message?.parts));if(text2){items.push({type:"user",text:text2,sentToModel:false})}break}if(pendingAtCommands.length>0){if(currentToolGroup.length>0){items.push({type:"tool_group",tools:[...currentToolGroup]});currentToolGroup=[]}const payload2=pendingAtCommands.shift();const projection2=projectUserTranscriptForDisplay(record);const text2=payload2.userText||(projection2.displayText??extractTextFromParts(projection2.parts));if(text2){items.push({type:"user",text:text2,...promptId?{promptId}:{}})}const toolDisplays=buildAtCommandDisplays(payload2);if(toolDisplays.length>0){items.push({type:"tool_group",tools:toolDisplays})}break}if(currentToolGroup.length>0){items.push({type:"tool_group",tools:[...currentToolGroup]});currentToolGroup=[]}const projection=projectUserTranscriptForDisplay(record);const payload=record.systemPayload;const hasAttachmentReferences=Array.isArray(payload?.attachmentReferences)&&payload.attachmentReferences.length>0;const text=projection.displayText||(hasAttachmentReferences?"[User message with attachments]":extractTextFromParts(projection.parts));if(text){items.push({type:"user",text,...promptId?{promptId}:{}})}break}case"assistant":{const parts=record.message?.parts;const thoughtText=!config?extractThoughtTextFromParts(parts):"";const displayRuns=extractInlineContentRuns(parts,"\n");const functionCalls=extractFunctionCalls(parts);if(thoughtText){if(currentToolGroup.length>0){items.push({type:"tool_group",tools:[...currentToolGroup]});currentToolGroup=[]}items.push({type:"gemini_thought",text:thoughtText})}if(displayRuns.length>0){if(currentToolGroup.length>0){items.push({type:"tool_group",tools:[...currentToolGroup]});currentToolGroup=[]}for(const[index,run]of displayRuns.entries()){const type=index===0?"gemini":"gemini_content";const timestamp=index===0?{timestamp:new Date(record.timestamp).getTime()}:{};if(run.kind==="text"){items.push({type,text:run.text,...timestamp})}else if(run.kind==="image"){items.push({type,text:"",images:[run.image],...timestamp})}else{items.push({type,text:"",omittedImageCount:run.count,...timestamp})}}}for(const fc of functionCalls){const tool=getTool(config,fc.name);pendingToolCalls.set(fc.id,{name:fc.name,args:fc.args});currentToolGroup.push({callId:fc.id,name:tool?.displayName||fc.name,description:tool?formatToolDescription(tool,fc.args):"",args:fc.args,resultDisplay:void 0,status:"Success",confirmationDetails:void 0})}break}case"tool_result":{if(record.toolCallResult){const callId=record.toolCallResult.callId;const toolCall=currentToolGroup.find(t2=>t2.callId===callId);if(toolCall){const responseParts=record.toolCallResult.responseParts??record.message?.parts;const rawDisplay=record.toolCallResult.resultDisplay;toolCall.resultDisplay=rawDisplay;if(record.toolCallResult.visionBridgeNotice!==void 0){toolCall.visionBridgeNotice=record.toolCallResult.visionBridgeNotice}const rawStatus=record.toolCallResult["status"];toolCall.status=rawStatus==="error"?"Error":"Success";const{images,omittedImageCount}=collectInlineImages(responseParts);if(images.length>0){toolCall.images=images}if(omittedImageCount>0){toolCall.omittedImageCount=omittedImageCount}if(toolCall.status==="Success"&&isCollapsibleTool(toolCall.name)){toolCall.detailedDisplay=getToolResponseDisplayText(responseParts)}}pendingToolCalls.delete(callId||"")}break}default:break}}if(pendingAtCommands.length>0){for(const payload of pendingAtCommands){if(currentToolGroup.length>0){items.push({type:"tool_group",tools:[...currentToolGroup]});currentToolGroup=[]}const text=payload.userText;if(text){items.push({type:"user",text})}const toolDisplays=buildAtCommandDisplays(payload);if(toolDisplays.length>0){items.push({type:"tool_group",tools:toolDisplays})}}}if(currentToolGroup.length>0){items.push({type:"tool_group",tools:currentToolGroup})}return coalesceFindingsHistoryItems(items)}__name(convertToHistoryItems,"convertToHistoryItems");function buildResumedHistoryItems(sessionData,config,baseTimestamp=Date.now()){const items=[];let idCounter=1;const getNextId=__name(()=>baseTimestamp+idCounter++,"getNextId");const historyItems=convertToHistoryItems(sessionData.conversation,config,sessionData.historyGaps);for(const item of historyItems){items.push({...item,id:getNextId()})}return items}__name(buildResumedHistoryItems,"buildResumedHistoryItems");function applyResumeDisplayPolicy(items){return items.map(item=>({...item,display:{...item.display,suppressOnRestore:true}}))}__name(applyResumeDisplayPolicy,"applyResumeDisplayPolicy");function createHistoryCollapseSummaryItem(messageCount){const n=String(messageCount);return{type:"info",text:t("History collapsed: {{n}} messages hidden. Use /history expand-now to show.",{n}),display:{kind:"collapse-summary"}}}__name(createHistoryCollapseSummaryItem,"createHistoryCollapseSummaryItem");function stripSuppressOnRestore(item){if(!item.display?.suppressOnRestore)return item;const{suppressOnRestore:_,...rest}=item.display;return{...item,display:Object.keys(rest).length>0?rest:void 0}}__name(stripSuppressOnRestore,"stripSuppressOnRestore");function computeResumedPromptCountSeed(records,sessionId){const userTurnCount=records.filter(m=>m.type==="user"&&m.subtype!=="mid_turn_user_message"&&m.subtype!=="realtime_message").length;if(records.length===0){return 0}return Math.max(userTurnCount,computeInitialTurnFromHistory(records,sessionId)+1)}__name(computeResumedPromptCountSeed,"computeResumedPromptCountSeed");function expandCollapsedHistory(items){return items.filter(item=>item.display?.kind!=="collapse-summary").map(stripSuppressOnRestore)}__name(expandCollapsedHistory,"expandCollapsedHistory");function applyCollapsePolicyAndSummary(rawItems,collapseOnResume,collapsePreviewCount=0){if(!collapseOnResume)return rawItems;if(collapsePreviewCount===-1)return rawItems;let boundary=rawItems.length;if(collapsePreviewCount>0){let userTurnCount=0;for(let i=rawItems.length-1;i>=0;i--){const item=rawItems[i];if(item.type==="user"&&item.sentToModel!==false){userTurnCount++;if(userTurnCount===collapsePreviewCount){boundary=i;break}}}if(userTurnCount<collapsePreviewCount){boundary=0}}const hiddenItems=applyResumeDisplayPolicy(rawItems.slice(0,boundary));const visibleItems=rawItems.slice(boundary);const uiHistoryItems=[...hiddenItems,...visibleItems];if(boundary>0){const nextId=rawItems[rawItems.length-1].id+1;return[...uiHistoryItems,{id:nextId,...createHistoryCollapseSummaryItem(boundary)}]}return uiHistoryItems}__name(applyCollapsePolicyAndSummary,"applyCollapsePolicyAndSummary");export{SHELL_COMMAND_NAME,SHELL_NAME,TOOL_STATUS,ICON,SPINNER_FRAMES,SPINNER_INTERVAL_MS,WAITING_SPINNER_FRAME,SCREEN_READER_USER_PREFIX,SCREEN_READER_MODEL_PREFIX,build_default,StreamingContext,useStreamingContext,RespondingSpinner,Spinner2 as Spinner,STATUS_INDICATOR_WIDTH,ToolStatusIndicator,ToolElapsedTime,getOverallStatus,isCollapsibleTool,estimateCompactToolGroupHeight,CompactToolGroupDisplay,isFindingsListDisplay,coalesceFindingsHistoryItems,recoalesceFindingsHistoryItems,shouldDisplayGoalStateCause,waitForGoalRuntime,buildResumedHistoryItems,stripSuppressOnRestore,computeResumedPromptCountSeed,expandCollapsedHistory,applyCollapsePolicyAndSummary};
|
|
3
|
+
import{formatDuration}from"./chunk-RIDELEM5.js";import{theme}from"./chunk-OWCYARAS.js";import{require_jsx_runtime}from"./chunk-REPFZQ7R.js";import{Box_default,Text,use_is_screen_reader_enabled_default,wrapAnsi}from"./chunk-XZQH4UBR.js";import{require_react}from"./chunk-5QKDV4CD.js";import{collectInlineImages,extractInlineContentRuns}from"./chunk-VRNYIKVL.js";import{formatHistoryGapNotice,indexGapsByChild}from"./chunk-DFO7LGQY.js";import{stringWidth}from"./chunk-GBO2C23J.js";import{t}from"./chunk-H45OX4VY.js";import{isGoalCheckpointBookkeepingRecord}from"./chunk-AVIDPC5K.js";import{GoalPersistenceUnavailableError,computeInitialTurnFromHistory,getToolResponseDisplayText}from"./chunk-LDXZT3SG.js";import{projectUserTranscriptForDisplay}from"./chunk-BMSATZXW.js";import{parseGoalStateRecordPayloadV2}from"./chunk-F63ESLTI.js";import{ToolDisplayNames}from"./chunk-2UNFJQ2D.js";import{init_esbuild_shims}from"./chunk-VKDAXTCZ.js";import{__commonJS,__name,__toESM}from"./chunk-KBWJGX7I.js";var require_spinners=__commonJS({"node_modules/cli-spinners/spinners.json"(exports,module){module.exports={dots:{interval:80,frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"]},dots2:{interval:80,frames:["\u28FE","\u28FD","\u28FB","\u28BF","\u287F","\u28DF","\u28EF","\u28F7"]},dots3:{interval:80,frames:["\u280B","\u2819","\u281A","\u281E","\u2816","\u2826","\u2834","\u2832","\u2833","\u2813"]},dots4:{interval:80,frames:["\u2804","\u2806","\u2807","\u280B","\u2819","\u2838","\u2830","\u2820","\u2830","\u2838","\u2819","\u280B","\u2807","\u2806"]},dots5:{interval:80,frames:["\u280B","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B"]},dots6:{interval:80,frames:["\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2834","\u2832","\u2812","\u2802","\u2802","\u2812","\u281A","\u2819","\u2809","\u2801"]},dots7:{interval:80,frames:["\u2808","\u2809","\u280B","\u2813","\u2812","\u2810","\u2810","\u2812","\u2816","\u2826","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808"]},dots8:{interval:80,frames:["\u2801","\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808","\u2808"]},dots9:{interval:80,frames:["\u28B9","\u28BA","\u28BC","\u28F8","\u28C7","\u2867","\u2857","\u284F"]},dots10:{interval:80,frames:["\u2884","\u2882","\u2881","\u2841","\u2848","\u2850","\u2860"]},dots11:{interval:100,frames:["\u2801","\u2802","\u2804","\u2840","\u2880","\u2820","\u2810","\u2808"]},dots12:{interval:80,frames:["\u2880\u2800","\u2840\u2800","\u2804\u2800","\u2882\u2800","\u2842\u2800","\u2805\u2800","\u2883\u2800","\u2843\u2800","\u280D\u2800","\u288B\u2800","\u284B\u2800","\u280D\u2801","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2888\u2829","\u2840\u2899","\u2804\u2859","\u2882\u2829","\u2842\u2898","\u2805\u2858","\u2883\u2828","\u2843\u2890","\u280D\u2850","\u288B\u2820","\u284B\u2880","\u280D\u2841","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2808\u2829","\u2800\u2899","\u2800\u2859","\u2800\u2829","\u2800\u2898","\u2800\u2858","\u2800\u2828","\u2800\u2890","\u2800\u2850","\u2800\u2820","\u2800\u2880","\u2800\u2840"]},dots13:{interval:80,frames:["\u28FC","\u28F9","\u28BB","\u283F","\u285F","\u28CF","\u28E7","\u28F6"]},dots8Bit:{interval:80,frames:["\u2800","\u2801","\u2802","\u2803","\u2804","\u2805","\u2806","\u2807","\u2840","\u2841","\u2842","\u2843","\u2844","\u2845","\u2846","\u2847","\u2808","\u2809","\u280A","\u280B","\u280C","\u280D","\u280E","\u280F","\u2848","\u2849","\u284A","\u284B","\u284C","\u284D","\u284E","\u284F","\u2810","\u2811","\u2812","\u2813","\u2814","\u2815","\u2816","\u2817","\u2850","\u2851","\u2852","\u2853","\u2854","\u2855","\u2856","\u2857","\u2818","\u2819","\u281A","\u281B","\u281C","\u281D","\u281E","\u281F","\u2858","\u2859","\u285A","\u285B","\u285C","\u285D","\u285E","\u285F","\u2820","\u2821","\u2822","\u2823","\u2824","\u2825","\u2826","\u2827","\u2860","\u2861","\u2862","\u2863","\u2864","\u2865","\u2866","\u2867","\u2828","\u2829","\u282A","\u282B","\u282C","\u282D","\u282E","\u282F","\u2868","\u2869","\u286A","\u286B","\u286C","\u286D","\u286E","\u286F","\u2830","\u2831","\u2832","\u2833","\u2834","\u2835","\u2836","\u2837","\u2870","\u2871","\u2872","\u2873","\u2874","\u2875","\u2876","\u2877","\u2838","\u2839","\u283A","\u283B","\u283C","\u283D","\u283E","\u283F","\u2878","\u2879","\u287A","\u287B","\u287C","\u287D","\u287E","\u287F","\u2880","\u2881","\u2882","\u2883","\u2884","\u2885","\u2886","\u2887","\u28C0","\u28C1","\u28C2","\u28C3","\u28C4","\u28C5","\u28C6","\u28C7","\u2888","\u2889","\u288A","\u288B","\u288C","\u288D","\u288E","\u288F","\u28C8","\u28C9","\u28CA","\u28CB","\u28CC","\u28CD","\u28CE","\u28CF","\u2890","\u2891","\u2892","\u2893","\u2894","\u2895","\u2896","\u2897","\u28D0","\u28D1","\u28D2","\u28D3","\u28D4","\u28D5","\u28D6","\u28D7","\u2898","\u2899","\u289A","\u289B","\u289C","\u289D","\u289E","\u289F","\u28D8","\u28D9","\u28DA","\u28DB","\u28DC","\u28DD","\u28DE","\u28DF","\u28A0","\u28A1","\u28A2","\u28A3","\u28A4","\u28A5","\u28A6","\u28A7","\u28E0","\u28E1","\u28E2","\u28E3","\u28E4","\u28E5","\u28E6","\u28E7","\u28A8","\u28A9","\u28AA","\u28AB","\u28AC","\u28AD","\u28AE","\u28AF","\u28E8","\u28E9","\u28EA","\u28EB","\u28EC","\u28ED","\u28EE","\u28EF","\u28B0","\u28B1","\u28B2","\u28B3","\u28B4","\u28B5","\u28B6","\u28B7","\u28F0","\u28F1","\u28F2","\u28F3","\u28F4","\u28F5","\u28F6","\u28F7","\u28B8","\u28B9","\u28BA","\u28BB","\u28BC","\u28BD","\u28BE","\u28BF","\u28F8","\u28F9","\u28FA","\u28FB","\u28FC","\u28FD","\u28FE","\u28FF"]},sand:{interval:80,frames:["\u2801","\u2802","\u2804","\u2840","\u2848","\u2850","\u2860","\u28C0","\u28C1","\u28C2","\u28C4","\u28CC","\u28D4","\u28E4","\u28E5","\u28E6","\u28EE","\u28F6","\u28F7","\u28FF","\u287F","\u283F","\u289F","\u281F","\u285B","\u281B","\u282B","\u288B","\u280B","\u280D","\u2849","\u2809","\u2811","\u2821","\u2881"]},line:{interval:130,frames:["-","\\","|","/"]},line2:{interval:100,frames:["\u2802","-","\u2013","\u2014","\u2013","-"]},pipe:{interval:100,frames:["\u2524","\u2518","\u2534","\u2514","\u251C","\u250C","\u252C","\u2510"]},simpleDots:{interval:400,frames:[". ",".. ","..."," "]},simpleDotsScrolling:{interval:200,frames:[". ",".. ","..."," .."," ."," "]},star:{interval:70,frames:["\u2736","\u2738","\u2739","\u273A","\u2739","\u2737"]},star2:{interval:80,frames:["+","x","*"]},flip:{interval:70,frames:["_","_","_","-","`","`","'","\xB4","-","_","_","_"]},hamburger:{interval:100,frames:["\u2631","\u2632","\u2634"]},growVertical:{interval:120,frames:["\u2581","\u2583","\u2584","\u2585","\u2586","\u2587","\u2586","\u2585","\u2584","\u2583"]},growHorizontal:{interval:120,frames:["\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589","\u258A","\u258B","\u258C","\u258D","\u258E"]},balloon:{interval:140,frames:[" ",".","o","O","@","*"," "]},balloon2:{interval:120,frames:[".","o","O","\xB0","O","o","."]},noise:{interval:100,frames:["\u2593","\u2592","\u2591"]},bounce:{interval:120,frames:["\u2801","\u2802","\u2804","\u2802"]},boxBounce:{interval:120,frames:["\u2596","\u2598","\u259D","\u2597"]},boxBounce2:{interval:100,frames:["\u258C","\u2580","\u2590","\u2584"]},triangle:{interval:50,frames:["\u25E2","\u25E3","\u25E4","\u25E5"]},binary:{interval:80,frames:["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},arc:{interval:100,frames:["\u25DC","\u25E0","\u25DD","\u25DE","\u25E1","\u25DF"]},circle:{interval:120,frames:["\u25E1","\u2299","\u25E0"]},squareCorners:{interval:180,frames:["\u25F0","\u25F3","\u25F2","\u25F1"]},circleQuarters:{interval:120,frames:["\u25F4","\u25F7","\u25F6","\u25F5"]},circleHalves:{interval:50,frames:["\u25D0","\u25D3","\u25D1","\u25D2"]},squish:{interval:100,frames:["\u256B","\u256A"]},toggle:{interval:250,frames:["\u22B6","\u22B7"]},toggle2:{interval:80,frames:["\u25AB","\u25AA"]},toggle3:{interval:120,frames:["\u25A1","\u25A0"]},toggle4:{interval:100,frames:["\u25A0","\u25A1","\u25AA","\u25AB"]},toggle5:{interval:100,frames:["\u25AE","\u25AF"]},toggle6:{interval:300,frames:["\u101D","\u1040"]},toggle7:{interval:80,frames:["\u29BE","\u29BF"]},toggle8:{interval:100,frames:["\u25CD","\u25CC"]},toggle9:{interval:100,frames:["\u25C9","\u25CE"]},toggle10:{interval:100,frames:["\u3282","\u3280","\u3281"]},toggle11:{interval:50,frames:["\u29C7","\u29C6"]},toggle12:{interval:120,frames:["\u2617","\u2616"]},toggle13:{interval:80,frames:["=","*","-"]},arrow:{interval:100,frames:["\u2190","\u2196","\u2191","\u2197","\u2192","\u2198","\u2193","\u2199"]},arrow2:{interval:80,frames:["\u2B06\uFE0F ","\u2197\uFE0F ","\u27A1\uFE0F ","\u2198\uFE0F ","\u2B07\uFE0F ","\u2199\uFE0F ","\u2B05\uFE0F ","\u2196\uFE0F "]},arrow3:{interval:120,frames:["\u25B9\u25B9\u25B9\u25B9\u25B9","\u25B8\u25B9\u25B9\u25B9\u25B9","\u25B9\u25B8\u25B9\u25B9\u25B9","\u25B9\u25B9\u25B8\u25B9\u25B9","\u25B9\u25B9\u25B9\u25B8\u25B9","\u25B9\u25B9\u25B9\u25B9\u25B8"]},bouncingBar:{interval:80,frames:["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},bouncingBall:{interval:80,frames:["( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF)","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","(\u25CF )"]},smiley:{interval:200,frames:["\u{1F604} ","\u{1F61D} "]},monkey:{interval:300,frames:["\u{1F648} ","\u{1F648} ","\u{1F649} ","\u{1F64A} "]},hearts:{interval:100,frames:["\u{1F49B} ","\u{1F499} ","\u{1F49C} ","\u{1F49A} ","\u2764\uFE0F "]},clock:{interval:100,frames:["\u{1F55B} ","\u{1F550} ","\u{1F551} ","\u{1F552} ","\u{1F553} ","\u{1F554} ","\u{1F555} ","\u{1F556} ","\u{1F557} ","\u{1F558} ","\u{1F559} ","\u{1F55A} "]},earth:{interval:180,frames:["\u{1F30D} ","\u{1F30E} ","\u{1F30F} "]},material:{interval:17,frames:["\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581"]},moon:{interval:80,frames:["\u{1F311} ","\u{1F312} ","\u{1F313} ","\u{1F314} ","\u{1F315} ","\u{1F316} ","\u{1F317} ","\u{1F318} "]},runner:{interval:140,frames:["\u{1F6B6} ","\u{1F3C3} "]},pong:{interval:80,frames:["\u2590\u2802 \u258C","\u2590\u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802\u258C","\u2590 \u2820\u258C","\u2590 \u2840\u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590\u2820 \u258C"]},shark:{interval:120,frames:["\u2590|\\____________\u258C","\u2590_|\\___________\u258C","\u2590__|\\__________\u258C","\u2590___|\\_________\u258C","\u2590____|\\________\u258C","\u2590_____|\\_______\u258C","\u2590______|\\______\u258C","\u2590_______|\\_____\u258C","\u2590________|\\____\u258C","\u2590_________|\\___\u258C","\u2590__________|\\__\u258C","\u2590___________|\\_\u258C","\u2590____________|\\\u258C","\u2590____________/|\u258C","\u2590___________/|_\u258C","\u2590__________/|__\u258C","\u2590_________/|___\u258C","\u2590________/|____\u258C","\u2590_______/|_____\u258C","\u2590______/|______\u258C","\u2590_____/|_______\u258C","\u2590____/|________\u258C","\u2590___/|_________\u258C","\u2590__/|__________\u258C","\u2590_/|___________\u258C","\u2590/|____________\u258C"]},dqpb:{interval:100,frames:["d","q","p","b"]},weather:{interval:100,frames:["\u2600\uFE0F ","\u2600\uFE0F ","\u2600\uFE0F ","\u{1F324} ","\u26C5\uFE0F ","\u{1F325} ","\u2601\uFE0F ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u26C8 ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u2601\uFE0F ","\u{1F325} ","\u26C5\uFE0F ","\u{1F324} ","\u2600\uFE0F ","\u2600\uFE0F "]},christmas:{interval:400,frames:["\u{1F332}","\u{1F384}"]},grenade:{interval:80,frames:["\u060C ","\u2032 "," \xB4 "," \u203E "," \u2E0C"," \u2E0A"," |"," \u204E"," \u2055"," \u0DF4 "," \u2053"," "," "," "]},point:{interval:125,frames:["\u2219\u2219\u2219","\u25CF\u2219\u2219","\u2219\u25CF\u2219","\u2219\u2219\u25CF","\u2219\u2219\u2219"]},layer:{interval:150,frames:["-","=","\u2261"]},betaWave:{interval:80,frames:["\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1"]},fingerDance:{interval:160,frames:["\u{1F918} ","\u{1F91F} ","\u{1F596} ","\u270B ","\u{1F91A} ","\u{1F446} "]},fistBump:{interval:80,frames:["\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u3000\u{1F91C}\u3000\u3000\u{1F91B}\u3000 ","\u3000\u3000\u{1F91C}\u{1F91B}\u3000\u3000 ","\u3000\u{1F91C}\u2728\u{1F91B}\u3000\u3000 ","\u{1F91C}\u3000\u2728\u3000\u{1F91B}\u3000 "]},soccerHeader:{interval:80,frames:[" \u{1F9D1}\u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F\u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} "]},mindblown:{interval:160,frames:["\u{1F610} ","\u{1F610} ","\u{1F62E} ","\u{1F62E} ","\u{1F626} ","\u{1F626} ","\u{1F627} ","\u{1F627} ","\u{1F92F} ","\u{1F4A5} ","\u2728 ","\u3000 ","\u3000 ","\u3000 "]},speaker:{interval:160,frames:["\u{1F508} ","\u{1F509} ","\u{1F50A} ","\u{1F509} "]},orangePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} "]},bluePulse:{interval:100,frames:["\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},orangeBluePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} ","\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},timeTravel:{interval:100,frames:["\u{1F55B} ","\u{1F55A} ","\u{1F559} ","\u{1F558} ","\u{1F557} ","\u{1F556} ","\u{1F555} ","\u{1F554} ","\u{1F553} ","\u{1F552} ","\u{1F551} ","\u{1F550} "]},aesthetic:{interval:80,frames:["\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0","\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1"]},dwarfFortress:{interval:80,frames:[" \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A \u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A \xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A \xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\u2593\xA3 "," \u263A\u2593\xA3 "," \u263A\u2592\xA3 "," \u263A\u2592\xA3 "," \u263A\u2591\xA3 "," \u263A\u2591\xA3 "," \u263A \xA3 "," \u263A\xA3 "," \u263A\xA3 "," \u263A\u2593 "," \u263A\u2593 "," \u263A\u2592 "," \u263A\u2592 "," \u263A\u2591 "," \u263A\u2591 "," \u263A "," \u263A &"," \u263A \u263C&"," \u263A \u263C &"," \u263A\u263C &"," \u263A\u263C & "," \u203C & "," \u263A & "," \u203C & "," \u263A & "," \u203C & "," \u263A & ","\u203C & "," & "," & "," & \u2591 "," & \u2592 "," & \u2593 "," & \xA3 "," & \u2591\xA3 "," & \u2592\xA3 "," & \u2593\xA3 "," & \xA3\xA3 "," & \u2591\xA3\xA3 "," & \u2592\xA3\xA3 ","& \u2593\xA3\xA3 ","& \xA3\xA3\xA3 "," \u2591\xA3\xA3\xA3 "," \u2592\xA3\xA3\xA3 "," \u2593\xA3\xA3\xA3 "," \u2588\xA3\xA3\xA3 "," \u2591\u2588\xA3\xA3\xA3 "," \u2592\u2588\xA3\xA3\xA3 "," \u2593\u2588\xA3\xA3\xA3 "," \u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "]}}}});var require_cli_spinners=__commonJS({"node_modules/cli-spinners/index.js"(exports,module){"use strict";init_esbuild_shims();var spinners2=Object.assign({},require_spinners());var spinnersList=Object.keys(spinners2);Object.defineProperty(spinners2,"random",{get(){const randomIndex=Math.floor(Math.random()*spinnersList.length);const spinnerName=spinnersList[randomIndex];return spinners2[spinnerName]}});module.exports=spinners2}});init_esbuild_shims();import*as path from"node:path";init_esbuild_shims();init_esbuild_shims();var EstimatedArtWidth=59;var BoxBorderWidth=1;var BOX_PADDING_X=1;var UI_WIDTH=EstimatedArtWidth+BOX_PADDING_X*2+BoxBorderWidth*2;var SHELL_COMMAND_NAME="Shell Command";var SHELL_NAME="Shell";var TOOL_STATUS={SUCCESS:"\u2713",PENDING:"o",EXECUTING:"\u22B7",CONFIRMING:"?",CANCELED:"-",ERROR:"x"};var _VS15="\uFE0E";var ICON={DIAMOND:`\u25C6${_VS15}`,CIRCLE_FILLED:`\u25CF${_VS15}`,TRIANGLE:`\u25B3${_VS15}`,CIRCLE_EMPTY:`\u25CB${_VS15}`,BULLSEYE:`\u25CE${_VS15}`,REFERENCE:`\u203B${_VS15}`,THEREFORE:`\u2234${_VS15}`,BECAUSE:`\u2235${_VS15}`,STAR:`\u2605${_VS15}`,SPARKLE:`\u2733${_VS15}`,RADIO_FILLED:`\u25C9${_VS15}`,CIRCLE_LEFT_HALF:`\u25D0${_VS15}`,CHECK:`\u2713${_VS15}`,CROSS:`\u2716${_VS15}`};var SPINNER_FRAMES=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"];var SPINNER_INTERVAL_MS=80;var WAITING_SPINNER_FRAME="\u280F";init_esbuild_shims();init_esbuild_shims();var import_react3=__toESM(require_react(),1);init_esbuild_shims();var import_react=__toESM(require_react(),1);var import_cli_spinners=__toESM(require_cli_spinners(),1);function Spinner({type="dots"}){const[frame,setFrame]=(0,import_react.useState)(0);const spinner=import_cli_spinners.default[type];(0,import_react.useEffect)(()=>{const timer=setInterval(()=>{setFrame(previousFrame=>{const isLastFrame=previousFrame===spinner.frames.length-1;return isLastFrame?0:previousFrame+1})},spinner.interval);return()=>{clearInterval(timer)}},[spinner]);return import_react.default.createElement(Text,null,spinner.frames[frame])}__name(Spinner,"Spinner");var build_default=Spinner;init_esbuild_shims();var import_react2=__toESM(require_react(),1);var StreamingContext=(0,import_react2.createContext)(void 0);var useStreamingContext=__name(()=>{const context=import_react2.default.useContext(StreamingContext);if(context===void 0){throw new Error("useStreamingContext must be used within a StreamingContextProvider")}return context},"useStreamingContext");init_esbuild_shims();var SCREEN_READER_USER_PREFIX="User: ";var SCREEN_READER_MODEL_PREFIX="Model: ";var SCREEN_READER_LOADING="loading";var SCREEN_READER_RESPONDING="responding";var import_jsx_runtime=__toESM(require_jsx_runtime(),1);var TMUX_SPINNER_INTERVAL_MS=750;var TMUX_SPINNER_FRAMES=[". ",".."];var RespondingSpinner=__name(({nonRespondingDisplay,spinnerType="dots"})=>{const streamingState=useStreamingContext();const isScreenReaderEnabled=use_is_screen_reader_enabled_default();if(streamingState==="responding"){return(0,import_jsx_runtime.jsx)(Spinner2,{spinnerType,altText:SCREEN_READER_RESPONDING})}else if(nonRespondingDisplay){return isScreenReaderEnabled?(0,import_jsx_runtime.jsx)(Text,{children:SCREEN_READER_LOADING}):(0,import_jsx_runtime.jsx)(Text,{color:theme.text.primary,children:nonRespondingDisplay})}return null},"RespondingSpinner");var Spinner2=__name(({spinnerType="dots",altText})=>{const isScreenReaderEnabled=use_is_screen_reader_enabled_default();const isTmux=Boolean(process.env["TMUX"]);const[tmuxFrameIndex,setTmuxFrameIndex]=(0,import_react3.useState)(0);(0,import_react3.useEffect)(()=>{if(isScreenReaderEnabled||!isTmux){return}const interval=setInterval(()=>{setTmuxFrameIndex(index=>(index+1)%TMUX_SPINNER_FRAMES.length)},TMUX_SPINNER_INTERVAL_MS);return()=>clearInterval(interval)},[isScreenReaderEnabled,isTmux]);if(isScreenReaderEnabled){return(0,import_jsx_runtime.jsx)(Text,{children:altText})}if(isTmux){return(0,import_jsx_runtime.jsx)(Text,{color:theme.text.primary,children:TMUX_SPINNER_FRAMES[tmuxFrameIndex]})}return(0,import_jsx_runtime.jsx)(Text,{color:theme.text.primary,children:(0,import_jsx_runtime.jsx)(build_default,{type:spinnerType})})},"Spinner");var import_jsx_runtime2=__toESM(require_jsx_runtime(),1);var STATUS_INDICATOR_WIDTH=2;var ToolStatusIndicator=__name(({status,name})=>{const isShell=name===SHELL_COMMAND_NAME||name===SHELL_NAME;const statusColor=isShell?theme.ui.symbol:theme.status.warning;return(0,import_jsx_runtime2.jsxs)(Box_default,{minWidth:STATUS_INDICATOR_WIDTH,flexShrink:0,children:[status==="Pending"&&(0,import_jsx_runtime2.jsx)(Text,{color:theme.status.success,children:TOOL_STATUS.PENDING}),status==="Executing"&&(0,import_jsx_runtime2.jsx)(RespondingSpinner,{spinnerType:"toggle",nonRespondingDisplay:TOOL_STATUS.EXECUTING}),status==="Success"&&(0,import_jsx_runtime2.jsx)(Text,{color:theme.status.success,"aria-label":"Success:",children:TOOL_STATUS.SUCCESS}),status==="Confirming"&&(0,import_jsx_runtime2.jsx)(Text,{color:statusColor,"aria-label":"Confirming:",children:TOOL_STATUS.CONFIRMING}),status==="Canceled"&&(0,import_jsx_runtime2.jsx)(Text,{color:statusColor,"aria-label":"Canceled:",bold:true,children:TOOL_STATUS.CANCELED}),status==="Error"&&(0,import_jsx_runtime2.jsx)(Text,{color:theme.status.error,"aria-label":"Error:",bold:true,children:TOOL_STATUS.ERROR})]})},"ToolStatusIndicator");init_esbuild_shims();var import_react4=__toESM(require_react(),1);var import_jsx_runtime3=__toESM(require_jsx_runtime(),1);var ToolElapsedTime=__name(({status,executionStartTime,timeoutMs})=>{const[elapsedSeconds,setElapsedSeconds]=(0,import_react4.useState)(0);(0,import_react4.useEffect)(()=>{if(status!=="Executing"||!executionStartTime){setElapsedSeconds(0);return}setElapsedSeconds(Math.floor((Date.now()-executionStartTime)/1e3));const interval=setInterval(()=>{setElapsedSeconds(Math.floor((Date.now()-executionStartTime)/1e3))},1e3);return()=>clearInterval(interval)},[status,executionStartTime]);if(status!=="Executing")return null;const hasTimeout=timeoutMs!=null&&timeoutMs>0;if(!hasTimeout&&elapsedSeconds<3)return null;const elapsedStr=formatDuration(elapsedSeconds*1e3,{hideTrailingZeros:true});const label=hasTimeout?`(${elapsedStr} \xB7 timeout ${formatDuration(timeoutMs,{hideTrailingZeros:true})})`:elapsedStr;return(0,import_jsx_runtime3.jsx)(Box_default,{flexShrink:0,marginLeft:1,children:(0,import_jsx_runtime3.jsx)(Text,{color:theme.text.secondary,children:label})})},"ToolElapsedTime");var import_jsx_runtime4=__toESM(require_jsx_runtime(),1);var ELAPSED_TIME_MARGIN_LEFT=1;var EXECUTING_ELAPSED_TIME_RESERVED_LABEL="99h 59m 59s";function getOverallStatus(toolCalls){if(toolCalls.some(t2=>t2.status==="Confirming"))return"Confirming";if(toolCalls.some(t2=>t2.status==="Executing"))return"Executing";if(toolCalls.some(t2=>t2.status==="Error"))return"Error";if(toolCalls.some(t2=>t2.status==="Canceled"))return"Canceled";if(toolCalls.some(t2=>t2.status==="Pending"))return"Pending";return"Success"}__name(getOverallStatus,"getOverallStatus");function getActiveTool(toolCalls){return toolCalls.find(t2=>t2.status==="Confirming")??toolCalls.find(t2=>t2.status==="Executing")??toolCalls[toolCalls.length-1]}__name(getActiveTool,"getActiveTool");function getShellTimeoutMs(tool){const display=tool.resultDisplay;if(typeof display==="object"&&display!==null&&"ansiOutput"in display){return display.timeoutMs}return void 0}__name(getShellTimeoutMs,"getShellTimeoutMs");function isToolGroupActive(status){return status==="Executing"||status==="Pending"||status==="Confirming"}__name(isToolGroupActive,"isToolGroupActive");function getElapsedTimeReservedWidth(tool,status){if(status!=="Executing")return 0;const timeoutMs=getShellTimeoutMs(tool);let label=EXECUTING_ELAPSED_TIME_RESERVED_LABEL;if(timeoutMs!=null&&timeoutMs>0){const maxElapsedStr=formatDuration(timeoutMs,{hideTrailingZeros:true});label=`(${maxElapsedStr} \xB7 timeout ${maxElapsedStr})`}return ELAPSED_TIME_MARGIN_LEFT+stringWidth(label)}__name(getElapsedTimeReservedWidth,"getElapsedTimeReservedWidth");var TOOL_NAME_TO_CATEGORY={[ToolDisplayNames.READ_FILE]:"read",[ToolDisplayNames.EDIT]:"edit",[ToolDisplayNames.WRITE_FILE]:"write",[ToolDisplayNames.NOTEBOOK_EDIT]:"edit",[ToolDisplayNames.GREP]:"search",[ToolDisplayNames.GLOB]:"search",[ToolDisplayNames.LS]:"list",[ToolDisplayNames.SHELL]:"command",[SHELL_COMMAND_NAME]:"command",[ToolDisplayNames.AGENT]:"agent",[ToolDisplayNames.WORKFLOW]:"agent",[ToolDisplayNames.SEND_MESSAGE]:"agent","Read File":"read","Read File(s)":"read","Read Directory":"list",SearchFiles:"search",FindFiles:"search",ReadFolder:"list",Task:"agent",TodoWrite:"other"};var CATEGORY_TEMPLATES={read:{past:{one:"Read {{count}} file",many:"Read {{count}} files"},active:{one:"Reading {{count}} file",many:"Reading {{count}} files"},pastVerb:"Read",activeVerb:"Reading"},edit:{past:{one:"Edited {{count}} file",many:"Edited {{count}} files"},active:{one:"Editing {{count}} file",many:"Editing {{count}} files"},pastVerb:"Edited",activeVerb:"Editing"},write:{past:{one:"Wrote {{count}} file",many:"Wrote {{count}} files"},active:{one:"Writing {{count}} file",many:"Writing {{count}} files"},pastVerb:"Wrote",activeVerb:"Writing"},search:{past:{one:"Searched {{count}} pattern",many:"Searched {{count}} patterns"},active:{one:"Searching {{count}} pattern",many:"Searching {{count}} patterns"},pastVerb:"Searched",activeVerb:"Searching"},list:{past:{one:"Listed {{count}} directory",many:"Listed {{count}} directories"},active:{one:"Listing {{count}} directory",many:"Listing {{count}} directories"},pastVerb:"Listed",activeVerb:"Listing"},command:{past:{one:"Ran {{count}} command",many:"Ran {{count}} commands"},active:{one:"Running {{count}} command",many:"Running {{count}} commands"},pastVerb:"Ran",activeVerb:"Running"},agent:{past:{one:"Ran {{count}} agent",many:"Ran {{count}} agents"},active:{one:"Running {{count}} agent",many:"Running {{count}} agents"},pastVerb:"Ran",activeVerb:"Running"},other:{past:{one:"Used {{count}} tool",many:"Used {{count}} tools"},active:{one:"Using {{count}} tool",many:"Using {{count}} tools"},pastVerb:"Used",activeVerb:"Using"}};var CATEGORY_ORDER=["search","read","list","command","edit","write","agent","other"];var COLLAPSIBLE_CATEGORIES=new Set(["read","search","list"]);function getToolCategory(toolName){return TOOL_NAME_TO_CATEGORY[toolName]??"other"}__name(getToolCategory,"getToolCategory");function isCollapsibleTool(toolName){return COLLAPSIBLE_CATEGORIES.has(getToolCategory(toolName))}__name(isCollapsibleTool,"isCollapsibleTool");function safeDescription(raw){if(!raw)return void 0;const stripped=raw.replace(/\x1b\][^\x07]*\x07|\x1b[()][A-Z0-9]|\x1b\[[0-9;]*[a-zA-Z]|\x1b./g,"");const cleaned=stripped.replace(/[\x00-\x1f\x7f]/g," ").trim();if(cleaned.startsWith("{")||cleaned.startsWith("[")){try{const parsed=JSON.parse(cleaned);if(typeof parsed==="object"&&parsed!==null)return void 0}catch{}}return cleaned||void 0}__name(safeDescription,"safeDescription");function categoryShowsDescriptionsInline(toolCalls,category){const sameCategory=toolCalls.filter(tc=>getToolCategory(tc.name)===category);if(sameCategory.length>DESCRIPTION_INLINE_LIMIT)return false;return sameCategory.every(tc=>safeDescription(tc.description)!==void 0)}__name(categoryShowsDescriptionsInline,"categoryShowsDescriptionsInline");function getActiveToolHint(toolCalls){if(toolCalls.length<2)return void 0;const statuses=["Confirming","Executing","Pending"];for(const status of statuses){for(let index=toolCalls.length-1;index>=0;index--){const tool=toolCalls[index];if(tool.status===status){const category=getToolCategory(tool.name);const hasCategoryPeers=toolCalls.some((candidate,candidateIndex)=>candidateIndex!==index&&getToolCategory(candidate.name)===category);if(!hasCategoryPeers)return void 0;if(categoryShowsDescriptionsInline(toolCalls,category))return void 0;return safeDescription(tool.description)}}}return void 0}__name(getActiveToolHint,"getActiveToolHint");var DESCRIPTION_INLINE_LIMIT=3;var DESCRIPTION_PREVIEW_COUNT=2;function buildToolSummary(toolCalls,isActive){if(toolCalls.length===0)return"";const toolsByCategory=new Map;for(const tool of toolCalls){const cat=getToolCategory(tool.name);const arr=toolsByCategory.get(cat)??[];arr.push(tool);toolsByCategory.set(cat,arr)}const parts=[];for(const cat of CATEGORY_ORDER){const tools=toolsByCategory.get(cat);if(!tools||tools.length===0)continue;const template=CATEGORY_TEMPLATES[cat];const verb=isActive?template.activeVerb:template.pastVerb;let part;if(tools.length===1){const safeDesc=safeDescription(tools[0].description);if(safeDesc!==void 0){part=`${verb} ${safeDesc}`}else{part=t(isActive?template.active.one:template.past.one,{count:"1"})}}else if(tools.length<=DESCRIPTION_INLINE_LIMIT){const descriptions=tools.map(tc=>safeDescription(tc.description)).filter(d=>d!==void 0);if(descriptions.length===tools.length){part=`${verb} ${descriptions.join(", ")}`}else{const forms=isActive?template.active:template.past;part=t(forms.many,{count:String(tools.length)})}}else{const previewDescs=tools.slice(0,DESCRIPTION_PREVIEW_COUNT).map(tc=>safeDescription(tc.description)).filter(d=>d!==void 0);if(previewDescs.length===DESCRIPTION_PREVIEW_COUNT){const remaining=tools.length-DESCRIPTION_PREVIEW_COUNT;const morePhrase=t("... and {{count}} more",{count:String(remaining)});part=`${verb} ${previewDescs.join(", ")}, ${morePhrase}`}else{const forms=isActive?template.active:template.past;part=t(forms.many,{count:String(tools.length)})}}if(parts.length>0){part=part.charAt(0).toLowerCase()+part.slice(1)}parts.push(part)}return parts.join(", ")}__name(buildToolSummary,"buildToolSummary");function estimateCompactToolGroupHeight(toolCalls,contentWidth){if(toolCalls.length===0)return 0;const overallStatus=getOverallStatus(toolCalls);const activeTool=getActiveTool(toolCalls);const isActive=isToolGroupActive(overallStatus);const summary=`${buildToolSummary(toolCalls,isActive)}${isActive?"\u2026":""}`;const hint=getActiveToolHint(toolCalls);const summaryWidth=Math.max(1,contentWidth-STATUS_INDICATOR_WIDTH-getElapsedTimeReservedWidth(activeTool,overallStatus));const wrappedSummary=wrapAnsi(summary,summaryWidth,{hard:true,trim:false});return Math.max(1,wrappedSummary.split("\n").length)+(hint?1:0)}__name(estimateCompactToolGroupHeight,"estimateCompactToolGroupHeight");var CompactToolGroupDisplay=__name(({toolCalls,contentWidth})=>{if(toolCalls.length===0)return null;const overallStatus=getOverallStatus(toolCalls);const activeTool=getActiveTool(toolCalls);const isActive=isToolGroupActive(overallStatus);const hint=getActiveToolHint(toolCalls);return(0,import_jsx_runtime4.jsxs)(Box_default,{flexDirection:"column",width:contentWidth,gap:0,children:[(0,import_jsx_runtime4.jsxs)(Box_default,{flexDirection:"row",children:[(0,import_jsx_runtime4.jsx)(ToolStatusIndicator,{status:overallStatus,name:activeTool.name}),(0,import_jsx_runtime4.jsx)(Box_default,{flexGrow:1,children:(0,import_jsx_runtime4.jsxs)(Text,{wrap:"wrap",bold:true,children:[buildToolSummary(toolCalls,isActive),isActive&&(0,import_jsx_runtime4.jsx)(Text,{children:"\u2026"},"ellipsis")]})}),(0,import_jsx_runtime4.jsx)(ToolElapsedTime,{status:overallStatus,executionStartTime:activeTool.executionStartTime,timeoutMs:getShellTimeoutMs(activeTool)})]}),hint&&(0,import_jsx_runtime4.jsx)(Box_default,{paddingLeft:STATUS_INDICATOR_WIDTH,children:(0,import_jsx_runtime4.jsxs)(Text,{dimColor:true,wrap:"truncate-end",children:["\u23BF ",hint]})})]})},"CompactToolGroupDisplay");init_esbuild_shims();var SUPERSEDED_FINDINGS_MESSAGE="(findings replaced by a later report_findings call)";function isFindingsListDisplay(value){return typeof value==="object"&&value!==null&&"type"in value&&value.type==="findings_list"}__name(isFindingsListDisplay,"isFindingsListDisplay");function coalesceFindingsHistoryItems(items){let lastItem=-1;let lastTool=-1;for(let i=items.length-1;i>=0&&lastItem===-1;i-=1){const item=items[i];if(item.type!=="tool_group")continue;for(let j=item.tools.length-1;j>=0;j-=1){if(isFindingsListDisplay(item.tools[j].resultDisplay)){lastItem=i;lastTool=j;break}}}if(lastItem===-1)return items;let changed=false;const next=items.map((item,i)=>{if(item.type!=="tool_group")return item;let toolsChanged=false;const tools=item.tools.map((tool,j)=>{if(i===lastItem&&j===lastTool)return tool;if(!isFindingsListDisplay(tool.resultDisplay))return tool;toolsChanged=true;return{...tool,resultDisplay:SUPERSEDED_FINDINGS_MESSAGE,supersededFindingsDisplay:tool.supersededFindingsDisplay??tool.resultDisplay}});if(!toolsChanged)return item;changed=true;return{...item,tools}});return changed?next:items}__name(coalesceFindingsHistoryItems,"coalesceFindingsHistoryItems");function recoalesceFindingsHistoryItems(items){let restored=false;const next=items.map(item=>{if(item.type!=="tool_group")return item;let toolsChanged=false;const tools=item.tools.map(tool=>{if(tool.resultDisplay!==SUPERSEDED_FINDINGS_MESSAGE||!tool.supersededFindingsDisplay){return tool}toolsChanged=true;return{...tool,resultDisplay:tool.supersededFindingsDisplay,supersededFindingsDisplay:void 0}});if(!toolsChanged)return item;restored=true;return{...item,tools}});return coalesceFindingsHistoryItems(restored?next:items)}__name(recoalesceFindingsHistoryItems,"recoalesceFindingsHistoryItems");init_esbuild_shims();function shouldDisplayGoalStateCause(cause){switch(cause){case"turn_finished":case"checkpoint":case"verifier_accept":return false;case"verifier_reject":case"create":case"replace":case"edit":case"pause":case"resume":case"complete":case"blocked":case"usage_limited":case"clear":case"migrated":return true;default:{const exhaustive=cause;return exhaustive}}}__name(shouldDisplayGoalStateCause,"shouldDisplayGoalStateCause");async function waitForGoalRuntime(config,options={}){const awaitReady=__name(async()=>{try{await config.getGoalRuntimeReady()}catch(error){if(!(error instanceof GoalPersistenceUnavailableError))throw error}},"awaitReady");const{timeoutMs}=options;if(timeoutMs==null||timeoutMs<=0){await awaitReady();return true}let timer;const timeout=new Promise(resolve=>{timer=setTimeout(()=>resolve("timeout"),timeoutMs);timer.unref?.()});try{const winner=await Promise.race([awaitReady(),timeout]);return winner!=="timeout"}finally{if(timer)clearTimeout(timer)}}__name(waitForGoalRuntime,"waitForGoalRuntime");function extractTextFromParts(parts){if(!parts)return"";const textParts=[];for(const part of parts){if("text"in part&&part.text){if(!("thought"in part&&part.thought)){textParts.push(part.text)}}}return textParts.join("\n")}__name(extractTextFromParts,"extractTextFromParts");function extractThoughtTextFromParts(parts){if(!parts)return"";const thoughtParts=[];for(const part of parts){if("text"in part&&part.text&&"thought"in part&&part.thought){thoughtParts.push(part.text)}}return thoughtParts.join("\n")}__name(extractThoughtTextFromParts,"extractThoughtTextFromParts");function extractFunctionCalls(parts){if(!parts)return[];const calls=[];for(const part of parts){if("functionCall"in part&&part.functionCall){const fc=part.functionCall;calls.push({id:fc.id||`call-${calls.length}`,name:fc.name||"unknown",args:fc.args||{}})}}return calls}__name(extractFunctionCalls,"extractFunctionCalls");function getTool(config,name){if(!config)return void 0;const toolRegistry=config.getToolRegistry();return toolRegistry.getTool(name)}__name(getTool,"getTool");function formatToolDescription(tool,args){try{const invocation=tool.build(args);return invocation.getDescription()}catch{if(typeof args["description"]==="string"){return args["description"]}return""}}__name(formatToolDescription,"formatToolDescription");function restoreHistoryItem(raw){if(!raw||typeof raw!=="object"){return}const clone={...raw};if("timestamp"in clone){const ts=clone["timestamp"];if(typeof ts==="string"||typeof ts==="number"){clone["timestamp"]=new Date(ts)}}if(typeof clone["type"]!=="string"){return}return clone}__name(restoreHistoryItem,"restoreHistoryItem");function createHistoryGapItem(gap){return{type:"info",text:formatHistoryGapNotice(gap)}}__name(createHistoryGapItem,"createHistoryGapItem");function convertToHistoryItems(conversation,config,historyGaps){const items=[];const gapByChildUuid=indexGapsByChild(historyGaps);const pendingAtCommands=[];let atCommandCounter=0;let lastGoalStateSnapshot;let lastGoalStateCause;const pendingToolCalls=new Map;let currentToolGroup=[];const buildAtCommandDisplays=__name(payload=>{if(payload.status==="error"){atCommandCounter+=1;const filesLabel=payload.filesRead?.length?payload.filesRead.join(", "):"files";return[{callId:`at-command-${atCommandCounter}`,name:"Read File(s)",description:"Error attempting to read files",status:"Error",resultDisplay:payload.message||`Error reading files (${filesLabel})`,confirmationDetails:void 0}]}if(!payload.filesRead?.length){atCommandCounter+=1;return[{callId:`at-command-${atCommandCounter}`,name:"Read File",description:"Read File(s)",status:"Success",resultDisplay:void 0,confirmationDetails:void 0}]}return payload.filesRead.map(filePath=>{atCommandCounter+=1;const isDir=filePath.endsWith("/");return{callId:`at-command-${atCommandCounter}`,name:isDir?"Read Directory":"Read File",description:isDir?`Read directory ${path.basename(filePath)}`:`Read file ${path.basename(filePath)}`,status:"Success",resultDisplay:void 0,confirmationDetails:void 0}})},"buildAtCommandDisplays");for(const record of conversation.messages){const promptId=typeof record.promptId==="string"&&record.promptId.length>0?record.promptId:void 0;const gap=gapByChildUuid.get(record.uuid);if(gap){if(currentToolGroup.length>0){items.push({type:"tool_group",tools:[...currentToolGroup]});currentToolGroup=[]}pendingAtCommands.length=0;lastGoalStateSnapshot=void 0;lastGoalStateCause=void 0;items.push(createHistoryGapItem(gap))}if(record.type==="system"){if(record.subtype==="goal_state"){const payload=parseGoalStateRecordPayloadV2(record.systemPayload);if(payload){const bookkeepingOnly=isGoalCheckpointBookkeepingRecord({cause:payload.cause,previousCause:lastGoalStateCause,previous:lastGoalStateSnapshot,next:payload.snapshot});lastGoalStateCause=payload.cause;lastGoalStateSnapshot=payload.snapshot;if(shouldDisplayGoalStateCause(payload.cause)&&!bookkeepingOnly){if(currentToolGroup.length>0){items.push({type:"tool_group",tools:[...currentToolGroup]});currentToolGroup=[]}items.push({type:"goal_state",snapshot:payload.snapshot,cause:payload.cause})}}continue}if(record.subtype==="slash_command"){if(currentToolGroup.length>0){items.push({type:"tool_group",tools:[...currentToolGroup]});currentToolGroup=[]}const payload=record.systemPayload;if(!payload)continue;if(payload.phase==="invocation"&&payload.rawCommand&&!payload.hiddenInvocation){const sentToModel=typeof payload.sentToModel==="boolean"?payload.sentToModel:void 0;items.push({type:"user",text:payload.rawCommand,...sentToModel===void 0?{}:{sentToModel}})}if(payload.phase==="result"){const outputs=payload.outputHistoryItems??[];for(const raw of outputs){const restored=restoreHistoryItem(raw);if(restored){items.push(restored)}}}}if(record.subtype==="at_command"){const payload=record.systemPayload;if(!payload)continue;pendingAtCommands.push(payload)}if(record.subtype==="rewind"){items.push({type:"info",text:"Conversation rewound."})}continue}switch(record.type){case"user":{if(record.subtype==="goal_runtime")break;if(record.subtype==="notification"||record.subtype==="cron"){const payload2=record.systemPayload;const fallback=record.subtype==="cron"?"Cron job fired":"Background agent completed";const text2=payload2?.displayText||extractTextFromParts(record.message?.parts)||fallback;items.push({type:"notification",text:text2});break}if(record.subtype==="agent_mention"||record.subtype==="agent_message"){const payload2=record.systemPayload;const text2=payload2?.displayText;if(text2){if(record.subtype==="agent_mention"&&!payload2?.author){items.push({type:"user",text:text2,sentToModel:false})}else{const name=payload2?.author?.name??record.agentName;items.push({type:"notification",text:name?`${name}: ${text2}`:text2})}}break}if(record.subtype==="mid_turn_user_message"){const payload2=record.systemPayload;const hasAttachmentReferences2=Array.isArray(payload2?.attachmentReferences)&&payload2.attachmentReferences.length>0;const text2=payload2?.displayText||(hasAttachmentReferences2?"[User message with attachments]":extractTextFromParts(record.message?.parts));if(text2){items.push({type:"user",text:text2,sentToModel:false})}break}if(pendingAtCommands.length>0){if(currentToolGroup.length>0){items.push({type:"tool_group",tools:[...currentToolGroup]});currentToolGroup=[]}const payload2=pendingAtCommands.shift();const projection2=projectUserTranscriptForDisplay(record);const text2=payload2.userText||(projection2.displayText??extractTextFromParts(projection2.parts));if(text2){items.push({type:"user",text:text2,...promptId?{promptId}:{}})}const toolDisplays=buildAtCommandDisplays(payload2);if(toolDisplays.length>0){items.push({type:"tool_group",tools:toolDisplays})}break}if(currentToolGroup.length>0){items.push({type:"tool_group",tools:[...currentToolGroup]});currentToolGroup=[]}const projection=projectUserTranscriptForDisplay(record);const payload=record.systemPayload;const hasAttachmentReferences=Array.isArray(payload?.attachmentReferences)&&payload.attachmentReferences.length>0;const text=projection.displayText||(hasAttachmentReferences?"[User message with attachments]":extractTextFromParts(projection.parts));if(text){items.push({type:"user",text,...promptId?{promptId}:{}})}break}case"assistant":{const parts=record.message?.parts;const thoughtText=!config?extractThoughtTextFromParts(parts):"";const displayRuns=extractInlineContentRuns(parts,"\n");const functionCalls=extractFunctionCalls(parts);if(thoughtText){if(currentToolGroup.length>0){items.push({type:"tool_group",tools:[...currentToolGroup]});currentToolGroup=[]}items.push({type:"gemini_thought",text:thoughtText})}if(displayRuns.length>0){if(currentToolGroup.length>0){items.push({type:"tool_group",tools:[...currentToolGroup]});currentToolGroup=[]}for(const[index,run]of displayRuns.entries()){const type=index===0?"gemini":"gemini_content";const timestamp=index===0?{timestamp:new Date(record.timestamp).getTime()}:{};if(run.kind==="text"){items.push({type,text:run.text,...timestamp})}else if(run.kind==="image"){items.push({type,text:"",images:[run.image],...timestamp})}else{items.push({type,text:"",omittedImageCount:run.count,...timestamp})}}}for(const fc of functionCalls){const tool=getTool(config,fc.name);pendingToolCalls.set(fc.id,{name:fc.name,args:fc.args});currentToolGroup.push({callId:fc.id,name:tool?.displayName||fc.name,description:tool?formatToolDescription(tool,fc.args):"",args:fc.args,resultDisplay:void 0,status:"Success",confirmationDetails:void 0})}break}case"tool_result":{if(record.toolCallResult){const callId=record.toolCallResult.callId;const toolCall=currentToolGroup.find(t2=>t2.callId===callId);if(toolCall){const responseParts=record.toolCallResult.responseParts??record.message?.parts;const rawDisplay=record.toolCallResult.resultDisplay;toolCall.resultDisplay=rawDisplay;if(record.toolCallResult.visionBridgeNotice!==void 0){toolCall.visionBridgeNotice=record.toolCallResult.visionBridgeNotice}const rawStatus=record.toolCallResult["status"];toolCall.status=rawStatus==="error"?"Error":"Success";const{images,omittedImageCount}=collectInlineImages(responseParts);if(images.length>0){toolCall.images=images}if(omittedImageCount>0){toolCall.omittedImageCount=omittedImageCount}if(toolCall.status==="Success"&&isCollapsibleTool(toolCall.name)){toolCall.detailedDisplay=getToolResponseDisplayText(responseParts)}}pendingToolCalls.delete(callId||"")}break}default:break}}if(pendingAtCommands.length>0){for(const payload of pendingAtCommands){if(currentToolGroup.length>0){items.push({type:"tool_group",tools:[...currentToolGroup]});currentToolGroup=[]}const text=payload.userText;if(text){items.push({type:"user",text})}const toolDisplays=buildAtCommandDisplays(payload);if(toolDisplays.length>0){items.push({type:"tool_group",tools:toolDisplays})}}}if(currentToolGroup.length>0){items.push({type:"tool_group",tools:currentToolGroup})}return coalesceFindingsHistoryItems(items)}__name(convertToHistoryItems,"convertToHistoryItems");function buildResumedHistoryItems(sessionData,config,baseTimestamp=Date.now()){const items=[];let idCounter=1;const getNextId=__name(()=>baseTimestamp+idCounter++,"getNextId");const historyItems=convertToHistoryItems(sessionData.conversation,config,sessionData.historyGaps);for(const item of historyItems){items.push({...item,id:getNextId()})}return items}__name(buildResumedHistoryItems,"buildResumedHistoryItems");function applyResumeDisplayPolicy(items){return items.map(item=>({...item,display:{...item.display,suppressOnRestore:true}}))}__name(applyResumeDisplayPolicy,"applyResumeDisplayPolicy");function createHistoryCollapseSummaryItem(messageCount){const n=String(messageCount);return{type:"info",text:t("History collapsed: {{n}} messages hidden. Use /history expand-now to show.",{n}),display:{kind:"collapse-summary"}}}__name(createHistoryCollapseSummaryItem,"createHistoryCollapseSummaryItem");function stripSuppressOnRestore(item){if(!item.display?.suppressOnRestore)return item;const{suppressOnRestore:_,...rest}=item.display;return{...item,display:Object.keys(rest).length>0?rest:void 0}}__name(stripSuppressOnRestore,"stripSuppressOnRestore");function computeResumedPromptCountSeed(records,sessionId){const userTurnCount=records.filter(m=>m.type==="user"&&m.subtype!=="mid_turn_user_message"&&m.subtype!=="realtime_message").length;if(records.length===0){return 0}return Math.max(userTurnCount,computeInitialTurnFromHistory(records,sessionId)+1)}__name(computeResumedPromptCountSeed,"computeResumedPromptCountSeed");function expandCollapsedHistory(items){return items.filter(item=>item.display?.kind!=="collapse-summary").map(stripSuppressOnRestore)}__name(expandCollapsedHistory,"expandCollapsedHistory");function applyCollapsePolicyAndSummary(rawItems,collapseOnResume,collapsePreviewCount=0){if(!collapseOnResume)return rawItems;if(collapsePreviewCount===-1)return rawItems;let boundary=rawItems.length;if(collapsePreviewCount>0){let userTurnCount=0;for(let i=rawItems.length-1;i>=0;i--){const item=rawItems[i];if(item.type==="user"&&item.sentToModel!==false){userTurnCount++;if(userTurnCount===collapsePreviewCount){boundary=i;break}}}if(userTurnCount<collapsePreviewCount){boundary=0}}const hiddenItems=applyResumeDisplayPolicy(rawItems.slice(0,boundary));const visibleItems=rawItems.slice(boundary);const uiHistoryItems=[...hiddenItems,...visibleItems];if(boundary>0){const nextId=rawItems[rawItems.length-1].id+1;return[...uiHistoryItems,{id:nextId,...createHistoryCollapseSummaryItem(boundary)}]}return uiHistoryItems}__name(applyCollapsePolicyAndSummary,"applyCollapsePolicyAndSummary");export{SHELL_COMMAND_NAME,SHELL_NAME,TOOL_STATUS,ICON,SPINNER_FRAMES,SPINNER_INTERVAL_MS,WAITING_SPINNER_FRAME,SCREEN_READER_USER_PREFIX,SCREEN_READER_MODEL_PREFIX,build_default,StreamingContext,useStreamingContext,RespondingSpinner,Spinner2 as Spinner,STATUS_INDICATOR_WIDTH,ToolStatusIndicator,ToolElapsedTime,getOverallStatus,isCollapsibleTool,estimateCompactToolGroupHeight,CompactToolGroupDisplay,isFindingsListDisplay,coalesceFindingsHistoryItems,recoalesceFindingsHistoryItems,shouldDisplayGoalStateCause,waitForGoalRuntime,buildResumedHistoryItems,stripSuppressOnRestore,computeResumedPromptCountSeed,expandCollapsedHistory,applyCollapsePolicyAndSummary};
|
|
4
4
|
/**
|
|
5
5
|
* @license
|
|
6
6
|
* Copyright 2025 Google LLC
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
-
import{captureRuntimeFileVersion,writeRuntimeFile}from"./chunk-UFRY7WND.js";import{checkTeamMemorySecrets,checkWorkspaceTeamMemorySecrets}from"./chunk-GNQGJXST.js";import{buildWorkspaceArtifactCandidate,formatRecordArtifactReminder}from"./chunk-ERMPIC3B.js";import{CommitAttributionService,FileEncoding,checkPriorRead,createPatchSmart,detectLineEnding,getDiffStat,needsUtf8Bom}from"./chunk-RKPHDO42.js";import{FileOperationEvent,getLanguageFromFilePath,logFileOperation}from"./chunk-DR3HLUJ5.js";import{fileExists,getSpecificMimeType}from"./chunk-JU2HHQR5.js";import{isAnyAutoMemPath,isTeamAutoMemPath}from"./chunk-37KFLBKZ.js";import{BaseDeclarativeTool,BaseToolInvocation,StructuredToolError}from"./chunk-O5EKX7LG.js";import{ToolDisplayNames,ToolNames}from"./chunk-2UNFJQ2D.js";import{createDebugLogger}from"./chunk-JAUJI56S.js";import{makeRelative,shortenPath,unescapePath}from"./chunk-OKN3Z5C5.js";import{getErrorMessage,isNodeError}from"./chunk-XYB7GC5U.js";import{init_esbuild_shims}from"./chunk-VKDAXTCZ.js";import{__name}from"./chunk-KBWJGX7I.js";init_esbuild_shims();import fs from"node:fs";import path from"node:path";var debugLogger=createDebugLogger("WRITE_FILE");var WriteFileToolInvocation=class extends BaseToolInvocation{constructor(config,params){super(params);this.config=config}static{__name(this,"WriteFileToolInvocation")}toolLocations(){return[{path:this.params.file_path}]}getDescription(){const relativePath=makeRelative(this.params.file_path,this.config.getTargetDir());return`Writing to ${shortenPath(relativePath)}`}async getDefaultPermission(){if(this.config.getFileSystemService().textFileIo)return"ask";const projectRoot=this.config.getProjectRoot();const filePath=path.resolve(this.params.file_path);if(isTeamAutoMemPath(filePath,projectRoot)){return"ask"}if(isAnyAutoMemPath(filePath,projectRoot)){return"allow"}return"ask"}async getConfirmationDetails(_abortSignal){let originalContent="";let observation;try{observation=await this.config.getFileSystemService().textFileIo?.inspect(this.params.file_path,_abortSignal)}catch(error){if(isNodeError(error)&&error.code==="EISDIR")throw new StructuredToolError(`Path is a directory, not a file: ${this.params.file_path}`,"target_is_directory");throw error}let fileExists2=observation?observation.kind==="file":await fileExists(this.params.file_path);if(!this.config.getFileReadCacheDisabled()){const decision=await checkPriorRead(this.config.getFileReadCache(),this.params.file_path,"overwriting");if(!decision.ok){throw new StructuredToolError(decision.rawMessage,decision.type)}}if(fileExists2){try{const{content}=observation?.kind==="file"?observation.response:await this.config.getFileSystemService().readTextFile({path:this.params.file_path});originalContent=content}catch(err){if(isNodeError(err)&&err.code==="ENOENT"){fileExists2=false}else{throw new Error(`Error reading existing file for confirmation: ${getErrorMessage(err)}`)}}}if(fileExists2&&!this.config.getFileReadCacheDisabled()){const postDecision=await checkPriorRead(this.config.getFileReadCache(),this.params.file_path,"overwriting",{expectExisting:true});if(!postDecision.ok){debugLogger.warn("post-read TOCTOU rejection (confirmation)",{path:this.params.file_path,reason:postDecision.type});throw new StructuredToolError(postDecision.rawMessage,postDecision.type)}}const relativePath=makeRelative(this.params.file_path,this.config.getTargetDir());const fileName=path.basename(this.params.file_path);const fileDiff=createPatchSmart(fileName,originalContent,this.params.content,"Current","Proposed");const confirmationDetails={type:"edit",title:`Confirm Write: ${shortenPath(relativePath)}`,fileName,filePath:this.params.file_path,fileDiff,originalContent,newContent:this.params.content,onConfirm:__name(async outcome=>{if(outcome==="proceed_always"){this.config.setApprovalMode("auto-edit")}},"onConfirm")};return confirmationDetails}async execute(abortSignal){const io=this.config.getFileSystemService().textFileIo;if(!io)return this.executeObserved(abortSignal);try{return await io.withMutation(this.params.file_path,abortSignal,mutation=>this.executeObserved(abortSignal,mutation))}catch(error){if(abortSignal.aborted)throw error;return this.writeFailure(error)}}async executeObserved(abortSignal,mutation){const{file_path,content,ai_proposed_content,modified_by_user}=this.params;let sandboxFileVersion;try{sandboxFileVersion=captureRuntimeFileVersion(this.config,file_path)}catch(error){const message=`${file_path}: ${getErrorMessage(error)}`;return{llmContent:message,returnDisplay:message,error:{message,type:isNodeError(error)&&error.code==="EISDIR"?"target_is_directory":"file_write_failure"}}}let fileExists2=mutation?mutation.original.kind==="file":await fileExists(file_path);let originalContent="";let useBOM=false;let detectedEncoding;let detectedLineEnding;const dirName=path.dirname(file_path);const teamMemoryError=(this.config.getFileSystemService().textFileIo?checkWorkspaceTeamMemorySecrets:checkTeamMemorySecrets)(file_path,content,this.config.getProjectRoot());if(teamMemoryError){return{llmContent:`[ERROR: ${teamMemoryError}]`,returnDisplay:teamMemoryError,error:{message:teamMemoryError,type:"invalid_tool_params"}}}if(!this.config.getFileReadCacheDisabled()){const decision=await checkPriorRead(this.config.getFileReadCache(),file_path,"overwriting");if(!decision.ok){return{llmContent:decision.rawMessage,returnDisplay:`Error: ${decision.displayMessage}`,error:{message:decision.rawMessage,type:decision.type}}}}if(fileExists2){try{const fileInfo=mutation?.original.kind==="file"?mutation.original.response:await this.config.getFileSystemService().readTextFile({path:file_path});if(fileInfo._meta?.bom!==void 0){useBOM=fileInfo._meta.bom}else{useBOM=fileInfo.content.length>0&&fileInfo.content.codePointAt(0)===65279}detectedEncoding=fileInfo._meta?.encoding||"utf-8";detectedLineEnding=detectLineEnding(fileInfo.content);originalContent=fileInfo.content;fileExists2=true}catch(err){if(isNodeError(err)&&err.code==="ENOENT"){fileExists2=false}else{const error={message:getErrorMessage(err),code:isNodeError(err)?err.code:void 0};const errorMsg=error.code?`Error checking existing file '${file_path}': ${error.message} (${error.code})`:`Error checking existing file: ${error.message}`;return{llmContent:errorMsg,returnDisplay:errorMsg,error:{message:errorMsg,type:"file_write_failure"}}}}}if(fileExists2&&!this.config.getFileReadCacheDisabled()){const postDecision=await checkPriorRead(this.config.getFileReadCache(),file_path,"overwriting",{expectExisting:true});if(!postDecision.ok){debugLogger.warn("post-read TOCTOU rejection (execute)",{path:file_path,reason:postDecision.type});return{llmContent:postDecision.rawMessage,returnDisplay:`Error: ${postDecision.displayMessage}`,error:{message:postDecision.rawMessage,type:postDecision.type}}}}if(!fileExists2){const userEncoding=this.config.getDefaultFileEncoding();if(userEncoding===FileEncoding.UTF8_BOM){useBOM=true}else if(userEncoding===void 0){useBOM=needsUtf8Bom(file_path)}detectedEncoding=void 0}try{await this.config.getFileHistoryService().trackEdit(file_path)}catch{}if(!this.config.getFileReadCacheDisabled()){const writeDecision=await checkPriorRead(this.config.getFileReadCache(),file_path,"overwriting",{expectExisting:fileExists2});if(!writeDecision.ok){debugLogger.warn("pre-write TOCTOU rejection",{path:file_path,reason:writeDecision.type});return{llmContent:writeDecision.rawMessage,returnDisplay:`Error: ${writeDecision.displayMessage}`,error:{message:writeDecision.rawMessage,type:writeDecision.type}}}}if(!mutation&&!fileExists2&&!this.config.getShellExecutionSandbox?.()){fs.mkdirSync(dirName,{recursive:true})}try{const writeParams={path:file_path,content,toolWriteOrigin:"write_file",_meta:{bom:useBOM,encoding:detectedEncoding,lineEnding:detectedLineEnding}};const committedStats=mutation?await mutation.write(writeParams):(await writeRuntimeFile(this.config,writeParams,sandboxFileVersion,abortSignal),void 0);if(!mutation&&!modified_by_user){CommitAttributionService.getInstance().recordEdit(file_path,fileExists2?originalContent:null,content)}let postWriteSizeBytes;try{if(mutation&&!committedStats)throw new Error("Scoped file write returned no committed stats.");const postWriteStats=mutation?committedStats:fs.statSync(file_path);postWriteSizeBytes=postWriteStats.size;this.config.getFileReadCache().recordWrite(file_path,postWriteStats)}catch(error){if(mutation)throw error}const fileName=path.basename(file_path);const currentContentForDiff=originalContent;const fileDiff=createPatchSmart(fileName,currentContentForDiff,content,"Original","Written");const originallyProposedContent=ai_proposed_content||content;const diffStat=getDiffStat(fileName,currentContentForDiff,originallyProposedContent,content);const llmSuccessMessageParts=[!fileExists2?`Successfully created and wrote to new file: ${file_path}.`:`Successfully overwrote file: ${file_path}.`];if(modified_by_user){llmSuccessMessageParts.push(`User modified the \`content\` to be: ${content}`)}const artifact=buildWorkspaceArtifactCandidate(this.config,file_path,{recordAsArtifact:this.params.record_as_artifact,sizeBytes:postWriteSizeBytes});if(artifact&&!artifact.updateOnly){llmSuccessMessageParts.push(formatRecordArtifactReminder(artifact.workspacePath))}const mimetype=getSpecificMimeType(file_path);const programmingLanguage=getLanguageFromFilePath(file_path);const extension=path.extname(file_path);const operation=!fileExists2?"create":"update";const lineCount=content.split("\n").length;logFileOperation(this.config,new FileOperationEvent(WriteFileTool.Name,operation,lineCount,mimetype,extension,programmingLanguage));const displayResult={fileDiff,fileName,filePath:file_path,originalContent,newContent:content,diffStat};return{llmContent:llmSuccessMessageParts.join(" "),returnDisplay:displayResult,...artifact?{artifacts:[artifact]}:{}}}catch(error){return this.writeFailure(error)}}writeFailure(error){const file_path=this.params.file_path;let errorMsg;let errorType="file_write_failure";if(isNodeError(error)){errorMsg=`Error writing to file '${file_path}': ${error.message} (${error.code})`;if(error.code==="ESTALE"&&this.config.getShellExecutionSandbox?.()){errorType="file_changed_since_read"}else if(error.code==="EACCES"){errorMsg=`Permission denied writing to file: ${file_path} (${error.code})`;errorType="permission_denied"}else if(error.code==="ENOSPC"){errorMsg=`No space left on device: ${file_path} (${error.code})`;errorType="no_space_left"}else if(error.code==="EISDIR"){errorMsg=`Target is a directory, not a file: ${file_path} (${error.code})`;errorType="target_is_directory"}if(this.config.getDebugMode()&&error.stack){debugLogger.debug("Write file error stack:",error.stack)}}else{errorMsg=`Error writing to file: ${getErrorMessage(error)}`}return{llmContent:errorMsg,returnDisplay:errorMsg,error:{message:errorMsg,type:errorType}}}};var WRITE_FILE_ARTIFACT_DESCRIPTION="Artifact-like files such as HTML, PDF, images, notebooks, office documents, CSV, Markdown, JSON, SQL, and Python files are automatically registered as session artifacts. Set record_as_artifact=false for intermediates, such as HTML written only to print a PDF: that does not create an artifact, but one the session already has for the path is still refreshed. Files under .qwen/tmp/ are not registered. Delete intermediates when done.";var WriteFileTool=class _WriteFileTool extends BaseDeclarativeTool{constructor(config){super(_WriteFileTool.Name,ToolDisplayNames.WRITE_FILE,`Writes content to a specified file in the local filesystem. A request to create or generate a file does not establish that the target path is new. Unless the target's absence or current text contents have already been established in this session, you MUST use the ${ToolNames.READ_FILE} tool first; if the file does not exist, then create it. With prior-read enforcement enabled, blind overwrites are rejected. The file_path argument MUST be an absolute path. Always construct it by combining the project root with the file's relative path (e.g. project root '/path/to/project/' + relative 'foo/bar.txt' = '/path/to/project/foo/bar.txt'). If the user provides a relative path, resolve it against the project root first.
|
|
3
|
+
import{captureRuntimeFileVersion,writeRuntimeFile}from"./chunk-M7JLPTQI.js";import{checkTeamMemorySecrets,checkWorkspaceTeamMemorySecrets}from"./chunk-GNQGJXST.js";import{buildWorkspaceArtifactCandidate,formatRecordArtifactReminder}from"./chunk-ERMPIC3B.js";import{CommitAttributionService,FileEncoding,checkPriorRead,createPatchSmart,detectLineEnding,getDiffStat,needsUtf8Bom}from"./chunk-LDXZT3SG.js";import{FileOperationEvent,getLanguageFromFilePath,logFileOperation}from"./chunk-DR3HLUJ5.js";import{fileExists,getSpecificMimeType}from"./chunk-JU2HHQR5.js";import{isAnyAutoMemPath,isTeamAutoMemPath}from"./chunk-37KFLBKZ.js";import{BaseDeclarativeTool,BaseToolInvocation,StructuredToolError}from"./chunk-O5EKX7LG.js";import{ToolDisplayNames,ToolNames}from"./chunk-2UNFJQ2D.js";import{createDebugLogger}from"./chunk-JAUJI56S.js";import{makeRelative,shortenPath,unescapePath}from"./chunk-OKN3Z5C5.js";import{getErrorMessage,isNodeError}from"./chunk-XYB7GC5U.js";import{init_esbuild_shims}from"./chunk-VKDAXTCZ.js";import{__name}from"./chunk-KBWJGX7I.js";init_esbuild_shims();import fs from"node:fs";import path from"node:path";var debugLogger=createDebugLogger("WRITE_FILE");var WriteFileToolInvocation=class extends BaseToolInvocation{constructor(config,params){super(params);this.config=config}static{__name(this,"WriteFileToolInvocation")}toolLocations(){return[{path:this.params.file_path}]}getDescription(){const relativePath=makeRelative(this.params.file_path,this.config.getTargetDir());return`Writing to ${shortenPath(relativePath)}`}async getDefaultPermission(){if(this.config.getFileSystemService().textFileIo)return"ask";const projectRoot=this.config.getProjectRoot();const filePath=path.resolve(this.params.file_path);if(isTeamAutoMemPath(filePath,projectRoot)){return"ask"}if(isAnyAutoMemPath(filePath,projectRoot)){return"allow"}return"ask"}async getConfirmationDetails(_abortSignal){let originalContent="";let observation;try{observation=await this.config.getFileSystemService().textFileIo?.inspect(this.params.file_path,_abortSignal)}catch(error){if(isNodeError(error)&&error.code==="EISDIR")throw new StructuredToolError(`Path is a directory, not a file: ${this.params.file_path}`,"target_is_directory");throw error}let fileExists2=observation?observation.kind==="file":await fileExists(this.params.file_path);if(!this.config.getFileReadCacheDisabled()){const decision=await checkPriorRead(this.config.getFileReadCache(),this.params.file_path,"overwriting");if(!decision.ok){throw new StructuredToolError(decision.rawMessage,decision.type)}}if(fileExists2){try{const{content}=observation?.kind==="file"?observation.response:await this.config.getFileSystemService().readTextFile({path:this.params.file_path});originalContent=content}catch(err){if(isNodeError(err)&&err.code==="ENOENT"){fileExists2=false}else{throw new Error(`Error reading existing file for confirmation: ${getErrorMessage(err)}`)}}}if(fileExists2&&!this.config.getFileReadCacheDisabled()){const postDecision=await checkPriorRead(this.config.getFileReadCache(),this.params.file_path,"overwriting",{expectExisting:true});if(!postDecision.ok){debugLogger.warn("post-read TOCTOU rejection (confirmation)",{path:this.params.file_path,reason:postDecision.type});throw new StructuredToolError(postDecision.rawMessage,postDecision.type)}}const relativePath=makeRelative(this.params.file_path,this.config.getTargetDir());const fileName=path.basename(this.params.file_path);const fileDiff=createPatchSmart(fileName,originalContent,this.params.content,"Current","Proposed");const confirmationDetails={type:"edit",title:`Confirm Write: ${shortenPath(relativePath)}`,fileName,filePath:this.params.file_path,fileDiff,originalContent,newContent:this.params.content,onConfirm:__name(async outcome=>{if(outcome==="proceed_always"){this.config.setApprovalMode("auto-edit")}},"onConfirm")};return confirmationDetails}async execute(abortSignal){const io=this.config.getFileSystemService().textFileIo;if(!io)return this.executeObserved(abortSignal);try{return await io.withMutation(this.params.file_path,abortSignal,mutation=>this.executeObserved(abortSignal,mutation))}catch(error){if(abortSignal.aborted)throw error;return this.writeFailure(error)}}async executeObserved(abortSignal,mutation){const{file_path,content,ai_proposed_content,modified_by_user}=this.params;let sandboxFileVersion;try{sandboxFileVersion=captureRuntimeFileVersion(this.config,file_path)}catch(error){const message=`${file_path}: ${getErrorMessage(error)}`;return{llmContent:message,returnDisplay:message,error:{message,type:isNodeError(error)&&error.code==="EISDIR"?"target_is_directory":"file_write_failure"}}}let fileExists2=mutation?mutation.original.kind==="file":await fileExists(file_path);let originalContent="";let useBOM=false;let detectedEncoding;let detectedLineEnding;const dirName=path.dirname(file_path);const teamMemoryError=(this.config.getFileSystemService().textFileIo?checkWorkspaceTeamMemorySecrets:checkTeamMemorySecrets)(file_path,content,this.config.getProjectRoot());if(teamMemoryError){return{llmContent:`[ERROR: ${teamMemoryError}]`,returnDisplay:teamMemoryError,error:{message:teamMemoryError,type:"invalid_tool_params"}}}if(!this.config.getFileReadCacheDisabled()){const decision=await checkPriorRead(this.config.getFileReadCache(),file_path,"overwriting");if(!decision.ok){return{llmContent:decision.rawMessage,returnDisplay:`Error: ${decision.displayMessage}`,error:{message:decision.rawMessage,type:decision.type}}}}if(fileExists2){try{const fileInfo=mutation?.original.kind==="file"?mutation.original.response:await this.config.getFileSystemService().readTextFile({path:file_path});if(fileInfo._meta?.bom!==void 0){useBOM=fileInfo._meta.bom}else{useBOM=fileInfo.content.length>0&&fileInfo.content.codePointAt(0)===65279}detectedEncoding=fileInfo._meta?.encoding||"utf-8";detectedLineEnding=detectLineEnding(fileInfo.content);originalContent=fileInfo.content;fileExists2=true}catch(err){if(isNodeError(err)&&err.code==="ENOENT"){fileExists2=false}else{const error={message:getErrorMessage(err),code:isNodeError(err)?err.code:void 0};const errorMsg=error.code?`Error checking existing file '${file_path}': ${error.message} (${error.code})`:`Error checking existing file: ${error.message}`;return{llmContent:errorMsg,returnDisplay:errorMsg,error:{message:errorMsg,type:"file_write_failure"}}}}}if(fileExists2&&!this.config.getFileReadCacheDisabled()){const postDecision=await checkPriorRead(this.config.getFileReadCache(),file_path,"overwriting",{expectExisting:true});if(!postDecision.ok){debugLogger.warn("post-read TOCTOU rejection (execute)",{path:file_path,reason:postDecision.type});return{llmContent:postDecision.rawMessage,returnDisplay:`Error: ${postDecision.displayMessage}`,error:{message:postDecision.rawMessage,type:postDecision.type}}}}if(!fileExists2){const userEncoding=this.config.getDefaultFileEncoding();if(userEncoding===FileEncoding.UTF8_BOM){useBOM=true}else if(userEncoding===void 0){useBOM=needsUtf8Bom(file_path)}detectedEncoding=void 0}try{await this.config.getFileHistoryService().trackEdit(file_path)}catch{}if(!this.config.getFileReadCacheDisabled()){const writeDecision=await checkPriorRead(this.config.getFileReadCache(),file_path,"overwriting",{expectExisting:fileExists2});if(!writeDecision.ok){debugLogger.warn("pre-write TOCTOU rejection",{path:file_path,reason:writeDecision.type});return{llmContent:writeDecision.rawMessage,returnDisplay:`Error: ${writeDecision.displayMessage}`,error:{message:writeDecision.rawMessage,type:writeDecision.type}}}}if(!mutation&&!fileExists2&&!this.config.getShellExecutionSandbox?.()){fs.mkdirSync(dirName,{recursive:true})}try{const writeParams={path:file_path,content,toolWriteOrigin:"write_file",_meta:{bom:useBOM,encoding:detectedEncoding,lineEnding:detectedLineEnding}};const committedStats=mutation?await mutation.write(writeParams):(await writeRuntimeFile(this.config,writeParams,sandboxFileVersion,abortSignal),void 0);if(!mutation&&!modified_by_user){CommitAttributionService.getInstance().recordEdit(file_path,fileExists2?originalContent:null,content)}let postWriteSizeBytes;try{if(mutation&&!committedStats)throw new Error("Scoped file write returned no committed stats.");const postWriteStats=mutation?committedStats:fs.statSync(file_path);postWriteSizeBytes=postWriteStats.size;this.config.getFileReadCache().recordWrite(file_path,postWriteStats)}catch(error){if(mutation)throw error}const fileName=path.basename(file_path);const currentContentForDiff=originalContent;const fileDiff=createPatchSmart(fileName,currentContentForDiff,content,"Original","Written");const originallyProposedContent=ai_proposed_content||content;const diffStat=getDiffStat(fileName,currentContentForDiff,originallyProposedContent,content);const llmSuccessMessageParts=[!fileExists2?`Successfully created and wrote to new file: ${file_path}.`:`Successfully overwrote file: ${file_path}.`];if(modified_by_user){llmSuccessMessageParts.push(`User modified the \`content\` to be: ${content}`)}const artifact=buildWorkspaceArtifactCandidate(this.config,file_path,{recordAsArtifact:this.params.record_as_artifact,sizeBytes:postWriteSizeBytes});if(artifact&&!artifact.updateOnly){llmSuccessMessageParts.push(formatRecordArtifactReminder(artifact.workspacePath))}const mimetype=getSpecificMimeType(file_path);const programmingLanguage=getLanguageFromFilePath(file_path);const extension=path.extname(file_path);const operation=!fileExists2?"create":"update";const lineCount=content.split("\n").length;logFileOperation(this.config,new FileOperationEvent(WriteFileTool.Name,operation,lineCount,mimetype,extension,programmingLanguage));const displayResult={fileDiff,fileName,filePath:file_path,originalContent,newContent:content,diffStat};return{llmContent:llmSuccessMessageParts.join(" "),returnDisplay:displayResult,...artifact?{artifacts:[artifact]}:{}}}catch(error){return this.writeFailure(error)}}writeFailure(error){const file_path=this.params.file_path;let errorMsg;let errorType="file_write_failure";if(isNodeError(error)){errorMsg=`Error writing to file '${file_path}': ${error.message} (${error.code})`;if(error.code==="ESTALE"&&this.config.getShellExecutionSandbox?.()){errorType="file_changed_since_read"}else if(error.code==="EACCES"){errorMsg=`Permission denied writing to file: ${file_path} (${error.code})`;errorType="permission_denied"}else if(error.code==="ENOSPC"){errorMsg=`No space left on device: ${file_path} (${error.code})`;errorType="no_space_left"}else if(error.code==="EISDIR"){errorMsg=`Target is a directory, not a file: ${file_path} (${error.code})`;errorType="target_is_directory"}if(this.config.getDebugMode()&&error.stack){debugLogger.debug("Write file error stack:",error.stack)}}else{errorMsg=`Error writing to file: ${getErrorMessage(error)}`}return{llmContent:errorMsg,returnDisplay:errorMsg,error:{message:errorMsg,type:errorType}}}};var WRITE_FILE_ARTIFACT_DESCRIPTION="Artifact-like files such as HTML, PDF, images, notebooks, office documents, CSV, Markdown, JSON, SQL, and Python files are automatically registered as session artifacts. Set record_as_artifact=false for intermediates, such as HTML written only to print a PDF: that does not create an artifact, but one the session already has for the path is still refreshed. Files under .qwen/tmp/ are not registered. Delete intermediates when done.";var WriteFileTool=class _WriteFileTool extends BaseDeclarativeTool{constructor(config){super(_WriteFileTool.Name,ToolDisplayNames.WRITE_FILE,`Writes content to a specified file in the local filesystem. A request to create or generate a file does not establish that the target path is new. Unless the target's absence or current text contents have already been established in this session, you MUST use the ${ToolNames.READ_FILE} tool first; if the file does not exist, then create it. With prior-read enforcement enabled, blind overwrites are rejected. The file_path argument MUST be an absolute path. Always construct it by combining the project root with the file's relative path (e.g. project root '/path/to/project/' + relative 'foo/bar.txt' = '/path/to/project/foo/bar.txt'). If the user provides a relative path, resolve it against the project root first.
|
|
4
4
|
|
|
5
5
|
${WRITE_FILE_ARTIFACT_DESCRIPTION}
|
|
6
6
|
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
-
import{DEFAULT_DASHSCOPE_BASE_URL,DEFAULT_MAX_RETRIES,applyDeepSeekReasoningEffort,buildSessionAwareFetch,getBuiltinDeepSeekReasoning,getDashscopeProxyBaseUrl,getEffectiveReasoning,isOpenRouterHostname,resolveReasoningForModel,resolveRequestTimeout}from"./chunk-XYBEQRSZ.js";import{REASONING_EFFORT_TIERS,clampReasoningEffort,defaultOutputCeiling,getGptReasoningCapabilities,hasExplicitOutputLimit,isQwenFamilyWireModel,isReasoningEffortPlaceholder,isTieredEffortWireModel,parsePositiveIntegerEnvValue,tokenLimit}from"./chunk-TAAJ7TDB.js";import{buildRuntimeFetchOptions}from"./chunk-ZZZAYAJW.js";import{createDebugLogger}from"./chunk-JAUJI56S.js";import{OpenAI}from"./chunk-2UOMCYQG.js";import{init_esbuild_shims}from"./chunk-VKDAXTCZ.js";import{__name}from"./chunk-KBWJGX7I.js";init_esbuild_shims();var debugLogger=createDebugLogger("DefaultOpenAICompatibleProvider");var OPENAI_COMPATIBLE_EFFORTS=["low","medium","high","xhigh"];function isQwen3Model(model){return model.toLowerCase().includes("qwen3")}__name(isQwen3Model,"isQwen3Model");function mirrorReasoningContentToReasoning(message){if(message.role!=="assistant"){return message}const assistant=message;if(typeof assistant.reasoning_content!=="string"||assistant.reasoning_content.length===0||typeof assistant.reasoning==="string"){return message}return{...assistant,reasoning:assistant.reasoning_content}}__name(mirrorReasoningContentToReasoning,"mirrorReasoningContentToReasoning");var DefaultOpenAICompatibleProvider=class{static{__name(this,"DefaultOpenAICompatibleProvider")}contentGeneratorConfig;cliConfig;effortClampWarned=false;constructor(contentGeneratorConfig,cliConfig){this.cliConfig=cliConfig;this.contentGeneratorConfig=contentGeneratorConfig}buildHeaders(){const version=this.cliConfig.getCliVersion()||"unknown";const userAgent=`QwenCode/${version} (${process.platform}; ${process.arch})`;const{customHeaders}=this.contentGeneratorConfig;const defaultHeaders={"User-Agent":userAgent};return customHeaders?{...defaultHeaders,...customHeaders}:defaultHeaders}buildClient(){const{apiKey,baseUrl,maxRetries=DEFAULT_MAX_RETRIES}=this.contentGeneratorConfig;const timeout=resolveRequestTimeout(this.contentGeneratorConfig.timeout);const defaultHeaders=this.buildHeaders();const runtimeOptions=buildRuntimeFetchOptions("openai",this.cliConfig.getProxy());return new OpenAI({apiKey,baseURL:baseUrl,timeout,maxRetries,defaultHeaders,...runtimeOptions||{},fetch:buildSessionAwareFetch(runtimeOptions?.fetch,this.cliConfig,this.contentGeneratorConfig.customHeaders)})}supportedReasoningEffortsFor(model){const configured=this.getReasoningCapabilities(model);if(!configured?.profile&&!getGptReasoningCapabilities(model))return OPENAI_COMPATIBLE_EFFORTS;if(configured&&!configured.toggleOnly)return configured.efforts;return getGptReasoningCapabilities(model)?.efforts??OPENAI_COMPATIBLE_EFFORTS}getReasoningCapabilities(model){return resolveReasoningForModel(this.cliConfig,this.contentGeneratorConfig,model)}clampConfiguredReasoningEffort(request){if(this.contentGeneratorConfig.samplingParams?.["reasoning"]!==void 0||this.getReasoningCapabilities(request.model)?.profile){return request}const loose=request;const reasoning=loose["reasoning"];const effort=reasoning?.effort;if(typeof effort!=="string"||!REASONING_EFFORT_TIERS.includes(effort)){return request}const clamped=clampReasoningEffort(effort,this.supportedReasoningEffortsFor(loose["model"]??this.contentGeneratorConfig.model));if(clamped===effort){return request}if(!this.effortClampWarned){debugLogger.warn(`reasoning.effort='${effort}' is not accepted by this OpenAI-compatible endpoint; using '${clamped}'.`);this.effortClampWarned=true}return{...loose,reasoning:{...reasoning,effort:clamped}}}buildRequest(request,_userPromptId){const extraBody=this.contentGeneratorConfig.extra_body;const requestWithTokenLimits=this.clampConfiguredReasoningEffort(this.applyOutputTokenLimit(request));const profile=this.getReasoningCapabilities(request.model)?.profile;const messages=!profile&&isQwen3Model(request.model)||profile==="qwen-chat-template"?requestWithTokenLimits.messages.map(mirrorReasoningContentToReasoning):requestWithTokenLimits.messages;const result={...requestWithTokenLimits,messages,...extraBody?extraBody:{}};this.flattenGptReasoningEffort(result);return this.flattenDeepSeekReasoningEffort(result)}flattenDeepSeekReasoningEffort(body){const model=body.model;const resolved=this.getReasoningCapabilities(model);if(!getBuiltinDeepSeekReasoning({...this.contentGeneratorConfig,model})||!resolved||resolved.toggleOnly||resolved.profile!==void 0&&resolved.profile!=="deepseek-openai")return body;const reasoning=getEffectiveReasoning({...this.contentGeneratorConfig,model},resolved);const result=applyDeepSeekReasoningEffort(body,this.contentGeneratorConfig.baseUrl,(reasoning||void 0)?.effort);const loose=result;if(resolved.canDisable!==false&&(loose["reasoning_effort"]==="none"||(resolved.disableField==="thinking"?loose["thinking"]?.type==="disabled":loose["enable_thinking"]===false))){if(resolved.disableField==="thinking"){loose["thinking"]={type:"disabled"};delete loose["reasoning_effort"]}else if(resolved.disableField==="enable_thinking"){loose["enable_thinking"]=false;delete loose["reasoning_effort"]}}return result}flattenGptReasoningEffort(body){if(this.getReasoningCapabilities(body["model"])?.profile||!getGptReasoningCapabilities(body["model"])||isOpenRouterHostname(this.contentGeneratorConfig)||this.contentGeneratorConfig.samplingParams?.["reasoning"]!==void 0||this.contentGeneratorConfig.extra_body?.["reasoning"]!==void 0)return;const reasoning=body["reasoning"];if(typeof reasoning?.effort!=="string"||!reasoning.effort)return;if(isReasoningEffortPlaceholder(body["reasoning_effort"])){body["reasoning_effort"]=reasoning.effort}const{effort:_drop,...rest}=reasoning;if(Object.keys(rest).length>0)body["reasoning"]=rest;else delete body["reasoning"]}getDefaultGenerationConfig(){return{}}getResponseParsingOptions(model){return{contentOnlyThinkingTagLeaks:true,...model&&isQwen3Model(model)?{taggedThinkingTagsAfterReasoning:true}:{}}}applyOutputTokenLimit(request){if(this.contentGeneratorConfig.samplingParams!==void 0){return request}const userMaxTokens=request.max_tokens;const modelLimit=tokenLimit(request.model,"output");const isKnownModel=hasExplicitOutputLimit(request.model);let effectiveMaxTokens;if(userMaxTokens!==void 0&&userMaxTokens!==null){if(isKnownModel){effectiveMaxTokens=Math.min(userMaxTokens,modelLimit)}else{effectiveMaxTokens=userMaxTokens}}else{const envMaxTokens=parsePositiveIntegerEnvValue(process.env["QWEN_CODE_MAX_OUTPUT_TOKENS"]);if(envMaxTokens!==void 0){effectiveMaxTokens=isKnownModel?Math.min(envMaxTokens,modelLimit):envMaxTokens}else{effectiveMaxTokens=defaultOutputCeiling(request.model)}}return{...request,max_tokens:effectiveMaxTokens}}};init_esbuild_shims();var debugLogger2=createDebugLogger("DashScopeOpenAICompatibleProvider");var DASHSCOPE_TIERED_EFFORTS=["low","medium","high","xhigh"];function selectDashScopeThinkingKnob(model,extraBody,samplingParams,reasoningEffort,tieredModel=isTieredEffortWireModel(model)){if(!tieredModel){return void 0}const selectFromLayer=__name((source,layer)=>{if(layer?.["enable_thinking"]===false){return{source,field:"enable_thinking",value:false}}return selectValueFromLayer(source,layer)??selectOnSwitch(source,layer)},"selectFromLayer");const selectValueFromLayer=__name((source,layer)=>{if(layer?.["reasoning_effort"]!=null){return{source,field:"reasoning_effort",value:layer["reasoning_effort"]}}if(layer?.["thinking_budget"]!=null){return{source,field:"thinking_budget",value:layer["thinking_budget"]}}return void 0},"selectValueFromLayer");const selectOnSwitch=__name((source,layer)=>{if(layer?.["enable_thinking"]===true){return{source,field:"enable_thinking",value:true}}return void 0},"selectOnSwitch");const reasoningSelection=reasoningEffort!==void 0?{source:"reasoning",field:"reasoning_effort",value:reasoningEffort}:void 0;const extraBodySelection=selectFromLayer("extra_body",extraBody);if(extraBodySelection?.field==="enable_thinking"&&extraBodySelection.value===true){return selectValueFromLayer("samplingParams",samplingParams)??reasoningSelection??extraBodySelection}if(extraBodySelection){return extraBodySelection}const samplingSelection=selectFromLayer("samplingParams",samplingParams);return samplingSelection?.field==="enable_thinking"&&samplingSelection.value===true?reasoningSelection??samplingSelection:samplingSelection??reasoningSelection}__name(selectDashScopeThinkingKnob,"selectDashScopeThinkingKnob");function withoutNullishThinkingKnobs(layer){if(!layer){return void 0}const hasNullishEnableThinking="enable_thinking"in layer&&layer["enable_thinking"]==null;const hasNullishEffort="reasoning_effort"in layer&&layer["reasoning_effort"]==null;const hasNullishBudget="thinking_budget"in layer&&layer["thinking_budget"]==null;if(!hasNullishEnableThinking&&!hasNullishEffort&&!hasNullishBudget){return layer}const sanitized={...layer};if(hasNullishEnableThinking){delete sanitized["enable_thinking"]}if(hasNullishEffort){delete sanitized["reasoning_effort"]}if(hasNullishBudget){delete sanitized["thinking_budget"]}return sanitized}__name(withoutNullishThinkingKnobs,"withoutNullishThinkingKnobs");var DASHSCOPE_REGIONAL_HOSTS=["dashscope.aliyuncs.com","dashscope-intl.aliyuncs.com","dashscope-us.aliyuncs.com"];var QWENCLOUD_MAAS_HOSTS=["maas.qianwenaiapi.com","maas.qwencloudapi.com"];var DashScopeOpenAICompatibleProvider=class _DashScopeOpenAICompatibleProvider extends DefaultOpenAICompatibleProvider{static{__name(this,"DashScopeOpenAICompatibleProvider")}constructor(contentGeneratorConfig,cliConfig){super(contentGeneratorConfig,cliConfig)}static isDashScopeProvider(contentGeneratorConfig){const{authType,baseUrl}=contentGeneratorConfig;if(authType==="qwen-oauth")return true;if(!baseUrl)return true;const normalizedBaseUrl=baseUrl.endsWith("/")?baseUrl.slice(0,-1):baseUrl;let hostname=null;try{hostname=new URL(normalizedBaseUrl).hostname.toLowerCase()}catch{hostname=null}const isDashscopeOrigin=hostname!==null&&DASHSCOPE_REGIONAL_HOSTS.some(host=>hostname===host||hostname.endsWith("."+host));const isMaasOrigin=hostname!==null&&hostname.endsWith(".maas.aliyuncs.com");const isQwenCloudOrigin=hostname!==null&&QWENCLOUD_MAAS_HOSTS.some(host=>hostname===host||hostname.endsWith("."+host));const isInternalOrigin=hostname!==null&&(hostname.endsWith(".alibaba-inc.com")||hostname.endsWith(".aliyun-inc.com"));const isAliCloudApiOrigin=hostname!==null&&hostname.endsWith(".alicloudapi.com");const proxyBaseUrl=getDashscopeProxyBaseUrl();const normalizedProxyUrl=proxyBaseUrl?.endsWith("/")?proxyBaseUrl.slice(0,-1):proxyBaseUrl;const isProxyMatch=Boolean(normalizedProxyUrl&&normalizedBaseUrl.toLowerCase()===normalizedProxyUrl.toLowerCase());if(normalizedProxyUrl&&!isDashscopeOrigin&&!isMaasOrigin&&!isQwenCloudOrigin&&!isInternalOrigin&&!isAliCloudApiOrigin&&!isProxyMatch){debugLogger2.debug(`DASHSCOPE_PROXY_BASE_URL is configured but the request baseUrl does not match. DashScope headers/cache control will be skipped.`)}if(isInternalOrigin){debugLogger2.debug(`DashScope provider activated via internal origin: ${hostname}`)}if(isAliCloudApiOrigin){debugLogger2.debug(`DashScope provider activated via alicloudapi origin: ${hostname}`)}return isDashscopeOrigin||isMaasOrigin||isQwenCloudOrigin||isInternalOrigin||isAliCloudApiOrigin||isProxyMatch}buildHeaders(){const version=this.cliConfig.getCliVersion()||"unknown";const userAgent=`QwenCode/${version} (${process.platform}; ${process.arch})`;const{authType,customHeaders}=this.contentGeneratorConfig;const defaultHeaders={"User-Agent":userAgent,"X-DashScope-CacheControl":"enable","X-DashScope-UserAgent":userAgent,"X-DashScope-AuthType":authType};if(this.cliConfig.isOmniEnabled?.()){defaultHeaders["X-DashScope-OssResourceResolve"]="enable"}return customHeaders?{...defaultHeaders,...customHeaders}:defaultHeaders}buildClient(){const{apiKey,baseUrl=DEFAULT_DASHSCOPE_BASE_URL,maxRetries=DEFAULT_MAX_RETRIES}=this.contentGeneratorConfig;const timeout=resolveRequestTimeout(this.contentGeneratorConfig.timeout);const defaultHeaders=this.buildHeaders();const runtimeOptions=buildRuntimeFetchOptions("openai",this.cliConfig.getProxy());return new OpenAI({apiKey,baseURL:baseUrl,timeout,maxRetries,defaultHeaders,...runtimeOptions||{},fetch:buildSessionAwareFetch(runtimeOptions?.fetch,this.cliConfig,this.contentGeneratorConfig.customHeaders)})}buildRequest(request,userPromptId,reattachBlockCount=0){let messages=request.messages;const tools=request.tools;const flattenPlainTextForGlm=this.isGlmModel(request.model)&&!this.hasFunctionCallingContext(request);if(flattenPlainTextForGlm){messages=this.flattenTextContent(messages)}else if(this.shouldEnableCacheControl()){messages=this.addDashScopeCacheControl(request,request.stream?"all":"system_only",reattachBlockCount)}const requestWithTokenLimits=this.applyOutputTokenLimit(request);const isTieredQwenModel=this.isTieredEffortModel(request.model);const extraBody=isTieredQwenModel?withoutNullishThinkingKnobs(this.contentGeneratorConfig.extra_body):this.contentGeneratorConfig.extra_body;const qwenEffortConfig=this.buildQwenEffortConfig(request.model);const rawRequestParams=requestWithTokenLimits;const requestParams=isTieredQwenModel?withoutNullishThinkingKnobs(rawRequestParams):rawRequestParams;if("reasoning_effort"in requestParams&&"reasoning_effort"in qwenEffortConfig){qwenEffortConfig["reasoning_effort"]=requestParams["reasoning_effort"]}const hasQwenEffortConfig=Object.keys(qwenEffortConfig).length>0;const selectedThinkingKnob=isTieredQwenModel?selectDashScopeThinkingKnob(this.resolveWireModel(request.model),extraBody,requestParams,qwenEffortConfig["reasoning_effort"],isTieredQwenModel):void 0;if(this.isVisionModel(request.model)){const dashscopeExtras2={vl_high_resolution_images:true,preserve_thinking:true,...qwenEffortConfig};const visionResult={...requestParams,messages,...tools?{tools}:{},...this.buildRequestMetadata(request.model,userPromptId),...dashscopeExtras2};if(hasQwenEffortConfig&&"reasoning"in visionResult){delete visionResult["reasoning"]}return this.mergeExtraBodyAndResolveKnobs(hasQwenEffortConfig?visionResult:this.clampConfiguredReasoningEffort(visionResult),extraBody,request.model,selectedThinkingKnob)}const dashscopeExtras={preserve_thinking:true,...qwenEffortConfig};const result={...requestParams,messages,...tools?{tools}:{},...this.buildRequestMetadata(request.model,userPromptId),...dashscopeExtras};if(hasQwenEffortConfig&&"reasoning"in result){delete result["reasoning"]}return this.mergeExtraBodyAndResolveKnobs(hasQwenEffortConfig?result:this.clampConfiguredReasoningEffort(result),extraBody,request.model,selectedThinkingKnob)}mergeExtraBodyAndResolveKnobs(result,extraBody,model,selectedThinkingKnob){const merged={...result,...extraBody?extraBody:{}};const reasoningEffort=merged["reasoning_effort"];const dropped=new Set;if(selectedThinkingKnob?.field==="thinking_budget"){if(reasoningEffort!==void 0){dropped.add("reasoning_effort")}if(merged["enable_thinking"]===false){dropped.add("enable_thinking")}}if(selectedThinkingKnob?.field==="reasoning_effort"&&merged["thinking_budget"]!==void 0){dropped.add("thinking_budget")}for(const key of dropped){delete merged[key]}for(const key of this.dropConflictingThinkingKnobs(model,merged,selectedThinkingKnob)){dropped.add(key)}this.warnConflictingKnobDrop(model,reasoningEffort,[...dropped]);this.flattenGptReasoningEffort(merged);return this.flattenDeepSeekReasoningEffort(merged)}getConfiguredReasoning(model){return this.getReasoningCapabilities(model)}isTieredEffortModel(model){const configured=this.getConfiguredReasoning(model);if(configured?.profile)return configured.profile==="dashscope-effort";return isTieredEffortWireModel(model??this.contentGeneratorConfig.model,configured)}resolveWireModel(model){return(model??this.contentGeneratorConfig.model??"").toLowerCase()}buildQwenEffortConfig(model){const configured=this.getConfiguredReasoning(model);if(configured?.profile)return{};const reasoning=getEffectiveReasoning(this.contentGeneratorConfig,configured);if(!reasoning||reasoning.effort===void 0){return{}}const wireModel=this.resolveWireModel(model);if(this.isTieredEffortModel(model)){const configured2=this.getConfiguredReasoning(model);if(configured2&&!configured2.toggleOnly){return configured2.efforts.includes(reasoning.effort)?{reasoning_effort:reasoning.effort}:{}}return{reasoning_effort:this.clampTieredEffort(reasoning.effort)}}if(isQwenFamilyWireModel(wireModel)){return{enable_thinking:true}}return{}}clampTieredEffort(effort){const clamped=clampReasoningEffort(effort,DASHSCOPE_TIERED_EFFORTS);if(clamped!==effort&&!this.effortClampWarned){debugLogger2.warn(`reasoning.effort='${effort}' is not accepted by the DashScope tiered-effort family; using '${clamped}'.`);this.effortClampWarned=true}return clamped}dropConflictingThinkingKnobs(model,merged,selectedThinkingKnob){const wireModel=this.resolveWireModel(model);if(!isQwenFamilyWireModel(wireModel)){return[]}const isTieredEffortModel=this.isTieredEffortModel(model);if(isTieredEffortModel&&selectedThinkingKnob?.field==="enable_thinking"&&selectedThinkingKnob.value===false){merged["reasoning_effort"]="none";const dropped=["enable_thinking"];if(merged["thinking_budget"]!==void 0){dropped.push("thinking_budget")}for(const key of dropped){delete merged[key]}return dropped}const effort=merged["reasoning_effort"];if(typeof effort!=="string"){return[]}if(isTieredEffortModel&&effort==="none"){if(merged["thinking_budget"]===void 0){return[]}delete merged["thinking_budget"];return["thinking_budget"]}if(isTieredEffortModel){if(selectedThinkingKnob?.field==="reasoning_effort"&&"enable_thinking"in merged){delete merged["enable_thinking"];return["enable_thinking"]}return[]}if(merged["thinking_budget"]===void 0){return[]}delete merged["reasoning_effort"];return["reasoning_effort"]}warnConflictingKnobDrop(model,reasoningEffort,dropped){if(dropped.length===0){return}if(!this.conflictingKnobDropWarned){this.conflictingKnobDropWarned=true;debugLogger2.warn("DashScope: dropped conflicting thinking knobs",{model:this.resolveWireModel(model),reasoningEffort,dropped})}}conflictingKnobDropWarned=false;buildRequestMetadata(model,userPromptId){if(!this.shouldSendRequestMetadata(model)){return{}}return this.buildMetadata(userPromptId)||{}}shouldSendRequestMetadata(model){const configured=this.contentGeneratorConfig.enableRequestMetadata;if(typeof configured==="boolean"){return configured}return isQwenFamilyWireModel(this.resolveWireModel(model))}buildMetadata(userPromptId){const channel=this.cliConfig.getChannel?.();return{metadata:{sessionId:this.cliConfig.getSessionId?.(),promptId:userPromptId,...channel?{channel}:{}}}}getDefaultGenerationConfig(){return{}}addDashScopeCacheControl(request,cacheControl,reattachBlockCount=0){const messages=request.messages;const systemIndex=messages.findIndex(msg=>msg.role==="system");const lastIndex=messages.length-1;const stableBlock=reattachBlockCount>0&&lastIndex>=0?this.lastStableBlock(messages,reattachBlockCount):{messageIndex:lastIndex,excludeTail:0};const updatedMessages=messages.length===0?messages:messages.map((message,index)=>{const isConversationAnchor=stableBlock?.messageIndex===index&&cacheControl==="all";const shouldAddCacheControl=Boolean(index===systemIndex&&systemIndex!==-1||isConversationAnchor);if(!shouldAddCacheControl||!("content"in message)||message.content===null||message.content===void 0){return message}return{...message,content:this.addCacheControlToContent(message.content,isConversationAnchor&&stableBlock?stableBlock.excludeTail:0)}});return updatedMessages}lastStableBlock(messages,reattachBlockCount){let remaining=reattachBlockCount;for(let index=messages.length-1;index>=0;index--){const content=messages[index].content;const blockCount=typeof content==="string"?content.length>0?1:0:Array.isArray(content)?content.length:0;if(blockCount===0)continue;if(blockCount>remaining){return{messageIndex:index,excludeTail:remaining}}remaining-=blockCount}return void 0}addCacheControlToContent(content,excludeTail=0){const contentArray=this.normalizeContentToArray(content);return this.addCacheControlToContentArray(contentArray,excludeTail)}normalizeContentToArray(content){if(typeof content==="string"){return[{type:"text",text:content}]}return[...content]}addCacheControlToContentArray(contentArray,excludeTail=0){if(contentArray.length===0){return contentArray}let targetIndex=contentArray.length-1-excludeTail;if(targetIndex<0){return contentArray}if(excludeTail>0){while(targetIndex>0&&contentArray[targetIndex].type!=="text"){targetIndex-=1}}const lastItem=contentArray[targetIndex];contentArray[targetIndex]={...lastItem,cache_control:{type:"ephemeral"}};return contentArray}isGlmModel(model){return!!model&&model.toLowerCase().startsWith("glm-")}hasFunctionCallingContext(request){if(request.tools&&request.tools.length>0){return true}return request.messages.some(message=>{if(message.role==="tool"){return true}if(message.role==="assistant"){const toolCalls=message.tool_calls;return Array.isArray(toolCalls)&&toolCalls.length>0}return false})}flattenTextContent(messages){return messages.map(message=>{if(!("content"in message)||!Array.isArray(message.content)){return message}const parts=message.content;if(parts.length===0){return message}const isTextOnly=parts.every(part=>part&&part.type==="text");if(!isTextOnly){return message}const text=parts.map(part=>part.text??"").join("\n\n");return{...message,content:text}})}static VISION_MODEL_EXACT_MATCHES=new Set(["coder-model"]);static VISION_MODEL_PREFIX_PATTERNS=["qwen-vl","qwen3-vl-plus","qwen3.5-plus","qwen3.6-plus","qwen3.7-plus"];isVisionModel(model){if(!model){return false}const normalized=model.toLowerCase();if(_DashScopeOpenAICompatibleProvider.VISION_MODEL_EXACT_MATCHES.has(normalized)){return true}for(const prefix of _DashScopeOpenAICompatibleProvider.VISION_MODEL_PREFIX_PATTERNS){if(normalized.startsWith(prefix)){return true}}return false}shouldEnableCacheControl(){return this.cliConfig.getContentGeneratorConfig()?.enableCacheControl!==false}};export{DefaultOpenAICompatibleProvider,selectDashScopeThinkingKnob,DASHSCOPE_REGIONAL_HOSTS,QWENCLOUD_MAAS_HOSTS,DashScopeOpenAICompatibleProvider};
|
|
3
|
+
import{DEFAULT_DASHSCOPE_BASE_URL,DEFAULT_MAX_RETRIES,applyDeepSeekReasoningEffort,buildSessionAwareFetch,getBuiltinDeepSeekReasoning,getDashscopeProxyBaseUrl,getEffectiveReasoning,isOpenRouterHostname,resolveReasoningForModel,resolveRequestTimeout}from"./chunk-DIHJELGW.js";import{REASONING_EFFORT_TIERS,clampReasoningEffort,defaultOutputCeiling,getGptReasoningCapabilities,hasExplicitOutputLimit,isQwenFamilyWireModel,isReasoningEffortPlaceholder,isTieredEffortWireModel,parsePositiveIntegerEnvValue,tokenLimit}from"./chunk-TAAJ7TDB.js";import{buildRuntimeFetchOptions}from"./chunk-ZZZAYAJW.js";import{createDebugLogger}from"./chunk-JAUJI56S.js";import{OpenAI}from"./chunk-2UOMCYQG.js";import{init_esbuild_shims}from"./chunk-VKDAXTCZ.js";import{__name}from"./chunk-KBWJGX7I.js";init_esbuild_shims();var debugLogger=createDebugLogger("DefaultOpenAICompatibleProvider");var OPENAI_COMPATIBLE_EFFORTS=["low","medium","high","xhigh"];function isQwen3Model(model){return model.toLowerCase().includes("qwen3")}__name(isQwen3Model,"isQwen3Model");function mirrorReasoningContentToReasoning(message){if(message.role!=="assistant"){return message}const assistant=message;if(typeof assistant.reasoning_content!=="string"||assistant.reasoning_content.length===0||typeof assistant.reasoning==="string"){return message}return{...assistant,reasoning:assistant.reasoning_content}}__name(mirrorReasoningContentToReasoning,"mirrorReasoningContentToReasoning");var DefaultOpenAICompatibleProvider=class{static{__name(this,"DefaultOpenAICompatibleProvider")}contentGeneratorConfig;cliConfig;effortClampWarned=false;constructor(contentGeneratorConfig,cliConfig){this.cliConfig=cliConfig;this.contentGeneratorConfig=contentGeneratorConfig}buildHeaders(){const version=this.cliConfig.getCliVersion()||"unknown";const userAgent=`QwenCode/${version} (${process.platform}; ${process.arch})`;const{customHeaders}=this.contentGeneratorConfig;const defaultHeaders={"User-Agent":userAgent};return customHeaders?{...defaultHeaders,...customHeaders}:defaultHeaders}buildClient(){const{apiKey,baseUrl,maxRetries=DEFAULT_MAX_RETRIES}=this.contentGeneratorConfig;const timeout=resolveRequestTimeout(this.contentGeneratorConfig.timeout);const defaultHeaders=this.buildHeaders();const runtimeOptions=buildRuntimeFetchOptions("openai",this.cliConfig.getProxy());return new OpenAI({apiKey,baseURL:baseUrl,timeout,maxRetries,defaultHeaders,...runtimeOptions||{},fetch:buildSessionAwareFetch(runtimeOptions?.fetch,this.cliConfig,this.contentGeneratorConfig.customHeaders)})}supportedReasoningEffortsFor(model){const configured=this.getReasoningCapabilities(model);if(!configured?.profile&&!getGptReasoningCapabilities(model))return OPENAI_COMPATIBLE_EFFORTS;if(configured&&!configured.toggleOnly)return configured.efforts;return getGptReasoningCapabilities(model)?.efforts??OPENAI_COMPATIBLE_EFFORTS}getReasoningCapabilities(model){return resolveReasoningForModel(this.cliConfig,this.contentGeneratorConfig,model)}clampConfiguredReasoningEffort(request){if(this.contentGeneratorConfig.samplingParams?.["reasoning"]!==void 0||this.getReasoningCapabilities(request.model)?.profile){return request}const loose=request;const reasoning=loose["reasoning"];const effort=reasoning?.effort;if(typeof effort!=="string"||!REASONING_EFFORT_TIERS.includes(effort)){return request}const clamped=clampReasoningEffort(effort,this.supportedReasoningEffortsFor(loose["model"]??this.contentGeneratorConfig.model));if(clamped===effort){return request}if(!this.effortClampWarned){debugLogger.warn(`reasoning.effort='${effort}' is not accepted by this OpenAI-compatible endpoint; using '${clamped}'.`);this.effortClampWarned=true}return{...loose,reasoning:{...reasoning,effort:clamped}}}buildRequest(request,_userPromptId){const extraBody=this.contentGeneratorConfig.extra_body;const requestWithTokenLimits=this.clampConfiguredReasoningEffort(this.applyOutputTokenLimit(request));const profile=this.getReasoningCapabilities(request.model)?.profile;const messages=!profile&&isQwen3Model(request.model)||profile==="qwen-chat-template"?requestWithTokenLimits.messages.map(mirrorReasoningContentToReasoning):requestWithTokenLimits.messages;const result={...requestWithTokenLimits,messages,...extraBody?extraBody:{}};this.flattenGptReasoningEffort(result);return this.flattenDeepSeekReasoningEffort(result)}flattenDeepSeekReasoningEffort(body){const model=body.model;const resolved=this.getReasoningCapabilities(model);if(!getBuiltinDeepSeekReasoning({...this.contentGeneratorConfig,model})||!resolved||resolved.toggleOnly||resolved.profile!==void 0&&resolved.profile!=="deepseek-openai")return body;const reasoning=getEffectiveReasoning({...this.contentGeneratorConfig,model},resolved);const result=applyDeepSeekReasoningEffort(body,this.contentGeneratorConfig.baseUrl,(reasoning||void 0)?.effort);const loose=result;if(resolved.canDisable!==false&&(loose["reasoning_effort"]==="none"||(resolved.disableField==="thinking"?loose["thinking"]?.type==="disabled":loose["enable_thinking"]===false))){if(resolved.disableField==="thinking"){loose["thinking"]={type:"disabled"};delete loose["reasoning_effort"]}else if(resolved.disableField==="enable_thinking"){loose["enable_thinking"]=false;delete loose["reasoning_effort"]}}return result}flattenGptReasoningEffort(body){if(this.getReasoningCapabilities(body["model"])?.profile||!getGptReasoningCapabilities(body["model"])||isOpenRouterHostname(this.contentGeneratorConfig)||this.contentGeneratorConfig.samplingParams?.["reasoning"]!==void 0||this.contentGeneratorConfig.extra_body?.["reasoning"]!==void 0)return;const reasoning=body["reasoning"];if(typeof reasoning?.effort!=="string"||!reasoning.effort)return;if(isReasoningEffortPlaceholder(body["reasoning_effort"])){body["reasoning_effort"]=reasoning.effort}const{effort:_drop,...rest}=reasoning;if(Object.keys(rest).length>0)body["reasoning"]=rest;else delete body["reasoning"]}getDefaultGenerationConfig(){return{}}getResponseParsingOptions(model){return{contentOnlyThinkingTagLeaks:true,...model&&isQwen3Model(model)?{taggedThinkingTagsAfterReasoning:true}:{}}}applyOutputTokenLimit(request){if(this.contentGeneratorConfig.samplingParams!==void 0){return request}const userMaxTokens=request.max_tokens;const modelLimit=tokenLimit(request.model,"output");const isKnownModel=hasExplicitOutputLimit(request.model);let effectiveMaxTokens;if(userMaxTokens!==void 0&&userMaxTokens!==null){if(isKnownModel){effectiveMaxTokens=Math.min(userMaxTokens,modelLimit)}else{effectiveMaxTokens=userMaxTokens}}else{const envMaxTokens=parsePositiveIntegerEnvValue(process.env["QWEN_CODE_MAX_OUTPUT_TOKENS"]);if(envMaxTokens!==void 0){effectiveMaxTokens=isKnownModel?Math.min(envMaxTokens,modelLimit):envMaxTokens}else{effectiveMaxTokens=defaultOutputCeiling(request.model)}}return{...request,max_tokens:effectiveMaxTokens}}};init_esbuild_shims();var debugLogger2=createDebugLogger("DashScopeOpenAICompatibleProvider");var DASHSCOPE_TIERED_EFFORTS=["low","medium","high","xhigh"];function selectDashScopeThinkingKnob(model,extraBody,samplingParams,reasoningEffort,tieredModel=isTieredEffortWireModel(model)){if(!tieredModel){return void 0}const selectFromLayer=__name((source,layer)=>{if(layer?.["enable_thinking"]===false){return{source,field:"enable_thinking",value:false}}return selectValueFromLayer(source,layer)??selectOnSwitch(source,layer)},"selectFromLayer");const selectValueFromLayer=__name((source,layer)=>{if(layer?.["reasoning_effort"]!=null){return{source,field:"reasoning_effort",value:layer["reasoning_effort"]}}if(layer?.["thinking_budget"]!=null){return{source,field:"thinking_budget",value:layer["thinking_budget"]}}return void 0},"selectValueFromLayer");const selectOnSwitch=__name((source,layer)=>{if(layer?.["enable_thinking"]===true){return{source,field:"enable_thinking",value:true}}return void 0},"selectOnSwitch");const reasoningSelection=reasoningEffort!==void 0?{source:"reasoning",field:"reasoning_effort",value:reasoningEffort}:void 0;const extraBodySelection=selectFromLayer("extra_body",extraBody);if(extraBodySelection?.field==="enable_thinking"&&extraBodySelection.value===true){return selectValueFromLayer("samplingParams",samplingParams)??reasoningSelection??extraBodySelection}if(extraBodySelection){return extraBodySelection}const samplingSelection=selectFromLayer("samplingParams",samplingParams);return samplingSelection?.field==="enable_thinking"&&samplingSelection.value===true?reasoningSelection??samplingSelection:samplingSelection??reasoningSelection}__name(selectDashScopeThinkingKnob,"selectDashScopeThinkingKnob");function withoutNullishThinkingKnobs(layer){if(!layer){return void 0}const hasNullishEnableThinking="enable_thinking"in layer&&layer["enable_thinking"]==null;const hasNullishEffort="reasoning_effort"in layer&&layer["reasoning_effort"]==null;const hasNullishBudget="thinking_budget"in layer&&layer["thinking_budget"]==null;if(!hasNullishEnableThinking&&!hasNullishEffort&&!hasNullishBudget){return layer}const sanitized={...layer};if(hasNullishEnableThinking){delete sanitized["enable_thinking"]}if(hasNullishEffort){delete sanitized["reasoning_effort"]}if(hasNullishBudget){delete sanitized["thinking_budget"]}return sanitized}__name(withoutNullishThinkingKnobs,"withoutNullishThinkingKnobs");var DASHSCOPE_REGIONAL_HOSTS=["dashscope.aliyuncs.com","dashscope-intl.aliyuncs.com","dashscope-us.aliyuncs.com"];var QWENCLOUD_MAAS_HOSTS=["maas.qianwenaiapi.com","maas.qwencloudapi.com"];var DashScopeOpenAICompatibleProvider=class _DashScopeOpenAICompatibleProvider extends DefaultOpenAICompatibleProvider{static{__name(this,"DashScopeOpenAICompatibleProvider")}constructor(contentGeneratorConfig,cliConfig){super(contentGeneratorConfig,cliConfig)}static isDashScopeProvider(contentGeneratorConfig){const{authType,baseUrl}=contentGeneratorConfig;if(authType==="qwen-oauth")return true;if(!baseUrl)return true;const normalizedBaseUrl=baseUrl.endsWith("/")?baseUrl.slice(0,-1):baseUrl;let hostname=null;try{hostname=new URL(normalizedBaseUrl).hostname.toLowerCase()}catch{hostname=null}const isDashscopeOrigin=hostname!==null&&DASHSCOPE_REGIONAL_HOSTS.some(host=>hostname===host||hostname.endsWith("."+host));const isMaasOrigin=hostname!==null&&hostname.endsWith(".maas.aliyuncs.com");const isQwenCloudOrigin=hostname!==null&&QWENCLOUD_MAAS_HOSTS.some(host=>hostname===host||hostname.endsWith("."+host));const isInternalOrigin=hostname!==null&&(hostname.endsWith(".alibaba-inc.com")||hostname.endsWith(".aliyun-inc.com"));const isAliCloudApiOrigin=hostname!==null&&hostname.endsWith(".alicloudapi.com");const proxyBaseUrl=getDashscopeProxyBaseUrl();const normalizedProxyUrl=proxyBaseUrl?.endsWith("/")?proxyBaseUrl.slice(0,-1):proxyBaseUrl;const isProxyMatch=Boolean(normalizedProxyUrl&&normalizedBaseUrl.toLowerCase()===normalizedProxyUrl.toLowerCase());if(normalizedProxyUrl&&!isDashscopeOrigin&&!isMaasOrigin&&!isQwenCloudOrigin&&!isInternalOrigin&&!isAliCloudApiOrigin&&!isProxyMatch){debugLogger2.debug(`DASHSCOPE_PROXY_BASE_URL is configured but the request baseUrl does not match. DashScope headers/cache control will be skipped.`)}if(isInternalOrigin){debugLogger2.debug(`DashScope provider activated via internal origin: ${hostname}`)}if(isAliCloudApiOrigin){debugLogger2.debug(`DashScope provider activated via alicloudapi origin: ${hostname}`)}return isDashscopeOrigin||isMaasOrigin||isQwenCloudOrigin||isInternalOrigin||isAliCloudApiOrigin||isProxyMatch}buildHeaders(){const version=this.cliConfig.getCliVersion()||"unknown";const userAgent=`QwenCode/${version} (${process.platform}; ${process.arch})`;const{authType,customHeaders}=this.contentGeneratorConfig;const defaultHeaders={"User-Agent":userAgent,"X-DashScope-CacheControl":"enable","X-DashScope-UserAgent":userAgent,"X-DashScope-AuthType":authType};if(this.cliConfig.isOmniEnabled?.()){defaultHeaders["X-DashScope-OssResourceResolve"]="enable"}return customHeaders?{...defaultHeaders,...customHeaders}:defaultHeaders}buildClient(){const{apiKey,baseUrl=DEFAULT_DASHSCOPE_BASE_URL,maxRetries=DEFAULT_MAX_RETRIES}=this.contentGeneratorConfig;const timeout=resolveRequestTimeout(this.contentGeneratorConfig.timeout);const defaultHeaders=this.buildHeaders();const runtimeOptions=buildRuntimeFetchOptions("openai",this.cliConfig.getProxy());return new OpenAI({apiKey,baseURL:baseUrl,timeout,maxRetries,defaultHeaders,...runtimeOptions||{},fetch:buildSessionAwareFetch(runtimeOptions?.fetch,this.cliConfig,this.contentGeneratorConfig.customHeaders)})}buildRequest(request,userPromptId,reattachBlockCount=0){let messages=request.messages;const tools=request.tools;const flattenPlainTextForGlm=this.isGlmModel(request.model)&&!this.hasFunctionCallingContext(request);if(flattenPlainTextForGlm){messages=this.flattenTextContent(messages)}else if(this.shouldEnableCacheControl()){messages=this.addDashScopeCacheControl(request,request.stream?"all":"system_only",reattachBlockCount)}const requestWithTokenLimits=this.applyOutputTokenLimit(request);const isTieredQwenModel=this.isTieredEffortModel(request.model);const extraBody=isTieredQwenModel?withoutNullishThinkingKnobs(this.contentGeneratorConfig.extra_body):this.contentGeneratorConfig.extra_body;const qwenEffortConfig=this.buildQwenEffortConfig(request.model);const rawRequestParams=requestWithTokenLimits;const requestParams=isTieredQwenModel?withoutNullishThinkingKnobs(rawRequestParams):rawRequestParams;if("reasoning_effort"in requestParams&&"reasoning_effort"in qwenEffortConfig){qwenEffortConfig["reasoning_effort"]=requestParams["reasoning_effort"]}const hasQwenEffortConfig=Object.keys(qwenEffortConfig).length>0;const selectedThinkingKnob=isTieredQwenModel?selectDashScopeThinkingKnob(this.resolveWireModel(request.model),extraBody,requestParams,qwenEffortConfig["reasoning_effort"],isTieredQwenModel):void 0;if(this.isVisionModel(request.model)){const dashscopeExtras2={vl_high_resolution_images:true,preserve_thinking:true,...qwenEffortConfig};const visionResult={...requestParams,messages,...tools?{tools}:{},...this.buildRequestMetadata(request.model,userPromptId),...dashscopeExtras2};if(hasQwenEffortConfig&&"reasoning"in visionResult){delete visionResult["reasoning"]}return this.mergeExtraBodyAndResolveKnobs(hasQwenEffortConfig?visionResult:this.clampConfiguredReasoningEffort(visionResult),extraBody,request.model,selectedThinkingKnob)}const dashscopeExtras={preserve_thinking:true,...qwenEffortConfig};const result={...requestParams,messages,...tools?{tools}:{},...this.buildRequestMetadata(request.model,userPromptId),...dashscopeExtras};if(hasQwenEffortConfig&&"reasoning"in result){delete result["reasoning"]}return this.mergeExtraBodyAndResolveKnobs(hasQwenEffortConfig?result:this.clampConfiguredReasoningEffort(result),extraBody,request.model,selectedThinkingKnob)}mergeExtraBodyAndResolveKnobs(result,extraBody,model,selectedThinkingKnob){const merged={...result,...extraBody?extraBody:{}};const reasoningEffort=merged["reasoning_effort"];const dropped=new Set;if(selectedThinkingKnob?.field==="thinking_budget"){if(reasoningEffort!==void 0){dropped.add("reasoning_effort")}if(merged["enable_thinking"]===false){dropped.add("enable_thinking")}}if(selectedThinkingKnob?.field==="reasoning_effort"&&merged["thinking_budget"]!==void 0){dropped.add("thinking_budget")}for(const key of dropped){delete merged[key]}for(const key of this.dropConflictingThinkingKnobs(model,merged,selectedThinkingKnob)){dropped.add(key)}this.warnConflictingKnobDrop(model,reasoningEffort,[...dropped]);this.flattenGptReasoningEffort(merged);return this.flattenDeepSeekReasoningEffort(merged)}getConfiguredReasoning(model){return this.getReasoningCapabilities(model)}isTieredEffortModel(model){const configured=this.getConfiguredReasoning(model);if(configured?.profile)return configured.profile==="dashscope-effort";return isTieredEffortWireModel(model??this.contentGeneratorConfig.model,configured)}resolveWireModel(model){return(model??this.contentGeneratorConfig.model??"").toLowerCase()}buildQwenEffortConfig(model){const configured=this.getConfiguredReasoning(model);if(configured?.profile)return{};const reasoning=getEffectiveReasoning(this.contentGeneratorConfig,configured);if(!reasoning||reasoning.effort===void 0){return{}}const wireModel=this.resolveWireModel(model);if(this.isTieredEffortModel(model)){const configured2=this.getConfiguredReasoning(model);if(configured2&&!configured2.toggleOnly){return configured2.efforts.includes(reasoning.effort)?{reasoning_effort:reasoning.effort}:{}}return{reasoning_effort:this.clampTieredEffort(reasoning.effort)}}if(isQwenFamilyWireModel(wireModel)){return{enable_thinking:true}}return{}}clampTieredEffort(effort){const clamped=clampReasoningEffort(effort,DASHSCOPE_TIERED_EFFORTS);if(clamped!==effort&&!this.effortClampWarned){debugLogger2.warn(`reasoning.effort='${effort}' is not accepted by the DashScope tiered-effort family; using '${clamped}'.`);this.effortClampWarned=true}return clamped}dropConflictingThinkingKnobs(model,merged,selectedThinkingKnob){const wireModel=this.resolveWireModel(model);if(!isQwenFamilyWireModel(wireModel)){return[]}const isTieredEffortModel=this.isTieredEffortModel(model);if(isTieredEffortModel&&selectedThinkingKnob?.field==="enable_thinking"&&selectedThinkingKnob.value===false){merged["reasoning_effort"]="none";const dropped=["enable_thinking"];if(merged["thinking_budget"]!==void 0){dropped.push("thinking_budget")}for(const key of dropped){delete merged[key]}return dropped}const effort=merged["reasoning_effort"];if(typeof effort!=="string"){return[]}if(isTieredEffortModel&&effort==="none"){if(merged["thinking_budget"]===void 0){return[]}delete merged["thinking_budget"];return["thinking_budget"]}if(isTieredEffortModel){if(selectedThinkingKnob?.field==="reasoning_effort"&&"enable_thinking"in merged){delete merged["enable_thinking"];return["enable_thinking"]}return[]}if(merged["thinking_budget"]===void 0){return[]}delete merged["reasoning_effort"];return["reasoning_effort"]}warnConflictingKnobDrop(model,reasoningEffort,dropped){if(dropped.length===0){return}if(!this.conflictingKnobDropWarned){this.conflictingKnobDropWarned=true;debugLogger2.warn("DashScope: dropped conflicting thinking knobs",{model:this.resolveWireModel(model),reasoningEffort,dropped})}}conflictingKnobDropWarned=false;buildRequestMetadata(model,userPromptId){if(!this.shouldSendRequestMetadata(model)){return{}}return this.buildMetadata(userPromptId)||{}}shouldSendRequestMetadata(model){const configured=this.contentGeneratorConfig.enableRequestMetadata;if(typeof configured==="boolean"){return configured}return isQwenFamilyWireModel(this.resolveWireModel(model))}buildMetadata(userPromptId){const channel=this.cliConfig.getChannel?.();return{metadata:{sessionId:this.cliConfig.getSessionId?.(),promptId:userPromptId,...channel?{channel}:{}}}}getDefaultGenerationConfig(){return{}}addDashScopeCacheControl(request,cacheControl,reattachBlockCount=0){const messages=request.messages;const systemIndex=messages.findIndex(msg=>msg.role==="system");const lastIndex=messages.length-1;const stableBlock=reattachBlockCount>0&&lastIndex>=0?this.lastStableBlock(messages,reattachBlockCount):{messageIndex:lastIndex,excludeTail:0};const updatedMessages=messages.length===0?messages:messages.map((message,index)=>{const isConversationAnchor=stableBlock?.messageIndex===index&&cacheControl==="all";const shouldAddCacheControl=Boolean(index===systemIndex&&systemIndex!==-1||isConversationAnchor);if(!shouldAddCacheControl||!("content"in message)||message.content===null||message.content===void 0){return message}return{...message,content:this.addCacheControlToContent(message.content,isConversationAnchor&&stableBlock?stableBlock.excludeTail:0)}});return updatedMessages}lastStableBlock(messages,reattachBlockCount){let remaining=reattachBlockCount;for(let index=messages.length-1;index>=0;index--){const content=messages[index].content;const blockCount=typeof content==="string"?content.length>0?1:0:Array.isArray(content)?content.length:0;if(blockCount===0)continue;if(blockCount>remaining){return{messageIndex:index,excludeTail:remaining}}remaining-=blockCount}return void 0}addCacheControlToContent(content,excludeTail=0){const contentArray=this.normalizeContentToArray(content);return this.addCacheControlToContentArray(contentArray,excludeTail)}normalizeContentToArray(content){if(typeof content==="string"){return[{type:"text",text:content}]}return[...content]}addCacheControlToContentArray(contentArray,excludeTail=0){if(contentArray.length===0){return contentArray}let targetIndex=contentArray.length-1-excludeTail;if(targetIndex<0){return contentArray}if(excludeTail>0){while(targetIndex>0&&contentArray[targetIndex].type!=="text"){targetIndex-=1}}const lastItem=contentArray[targetIndex];contentArray[targetIndex]={...lastItem,cache_control:{type:"ephemeral"}};return contentArray}isGlmModel(model){return!!model&&model.toLowerCase().startsWith("glm-")}hasFunctionCallingContext(request){if(request.tools&&request.tools.length>0){return true}return request.messages.some(message=>{if(message.role==="tool"){return true}if(message.role==="assistant"){const toolCalls=message.tool_calls;return Array.isArray(toolCalls)&&toolCalls.length>0}return false})}flattenTextContent(messages){return messages.map(message=>{if(!("content"in message)||!Array.isArray(message.content)){return message}const parts=message.content;if(parts.length===0){return message}const isTextOnly=parts.every(part=>part&&part.type==="text");if(!isTextOnly){return message}const text=parts.map(part=>part.text??"").join("\n\n");return{...message,content:text}})}static VISION_MODEL_EXACT_MATCHES=new Set(["coder-model"]);static VISION_MODEL_PREFIX_PATTERNS=["qwen-vl","qwen3-vl-plus","qwen3.5-plus","qwen3.6-plus","qwen3.7-plus"];isVisionModel(model){if(!model){return false}const normalized=model.toLowerCase();if(_DashScopeOpenAICompatibleProvider.VISION_MODEL_EXACT_MATCHES.has(normalized)){return true}for(const prefix of _DashScopeOpenAICompatibleProvider.VISION_MODEL_PREFIX_PATTERNS){if(normalized.startsWith(prefix)){return true}}return false}shouldEnableCacheControl(){return this.cliConfig.getContentGeneratorConfig()?.enableCacheControl!==false}};export{DefaultOpenAICompatibleProvider,selectDashScopeThinkingKnob,DASHSCOPE_REGIONAL_HOSTS,QWENCLOUD_MAAS_HOSTS,DashScopeOpenAICompatibleProvider};
|