@namzu/cli 51.0.0 → 51.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +35 -0
- package/dist/bin.js +1 -1
- package/dist/chunks/{acp-I75ITR7W.js → acp-YH3ORAMX.js} +129 -60
- package/dist/chunks/acp-YH3ORAMX.js.map +6 -0
- package/dist/chunks/{activity-command-6RM3I3CG.js → activity-command-6SLWX5O6.js} +13 -13
- package/dist/chunks/{add-X25CBZQM.js → add-5DU7SP37.js} +89 -23
- package/dist/chunks/add-5DU7SP37.js.map +6 -0
- package/dist/chunks/{agent-TIXCYM5Q.js → agent-IN76G7FR.js} +36 -36
- package/dist/chunks/agent-session-5T4QOI6T.js +69 -0
- package/dist/chunks/{archive-UFBZQWFO.js → archive-X5OO3HYU.js} +11 -11
- package/dist/chunks/{bin-main-5E4PLOSV.js → bin-main-MJURSFNJ.js} +8 -8
- package/dist/chunks/{binding-EGKCFUJN.js → binding-6EX5H32J.js} +3 -3
- package/dist/chunks/{browser-WSEOMG6B.js → browser-UUSAOFML.js} +7 -7
- package/dist/chunks/{chat-XGURQIQN.js → chat-J2DRST74.js} +16 -16
- package/dist/chunks/{chunk-TW56AJLJ.js → chunk-2OGJPIGN.js} +17 -17
- package/dist/chunks/{chunk-J6EAQ4XD.js → chunk-2XXEIH7D.js} +3 -3
- package/dist/chunks/{chunk-55KDC7DM.js → chunk-3KNUUOMF.js} +2 -2
- package/dist/chunks/{chunk-EBES22ZB.js → chunk-3MUNYBIF.js} +29 -4
- package/dist/chunks/{chunk-EBES22ZB.js.map → chunk-3MUNYBIF.js.map} +1 -1
- package/dist/chunks/{chunk-6I7YVWWO.js → chunk-3VKSD45U.js} +4 -4
- package/dist/chunks/{chunk-KZTKHIP5.js → chunk-4DYB42HG.js} +2 -2
- package/dist/chunks/{chunk-3I4UQCJZ.js → chunk-4GQ5ACCZ.js} +2 -2
- package/dist/chunks/{chunk-MNMG5JGZ.js → chunk-4MDH3G7P.js} +4 -4
- package/dist/chunks/{chunk-2MAMU7AX.js → chunk-5HS5WIS3.js} +2 -2
- package/dist/chunks/{chunk-ZXYCWNKE.js → chunk-64CDTVEM.js} +19 -19
- package/dist/chunks/{chunk-SDIFKDGI.js → chunk-6J6AEQA4.js} +3 -3
- package/dist/chunks/{chunk-POGVGWKL.js → chunk-76HAMOHW.js} +7 -7
- package/dist/chunks/{chunk-4JTXA7EU.js → chunk-AROJAFON.js} +9 -4
- package/dist/chunks/chunk-AROJAFON.js.map +6 -0
- package/dist/chunks/{chunk-QZRV5EOA.js → chunk-ASITCNWM.js} +4 -4
- package/dist/chunks/{chunk-GTFK7PLC.js → chunk-B4M4IEOE.js} +13 -10
- package/dist/chunks/chunk-B4M4IEOE.js.map +6 -0
- package/dist/chunks/{chunk-LNVTSRF3.js → chunk-BGT2BABA.js} +4 -4
- package/dist/chunks/{chunk-VRFKZSBH.js → chunk-BIWDWFAK.js} +8 -3
- package/dist/chunks/chunk-BIWDWFAK.js.map +6 -0
- package/dist/chunks/{chunk-BNEGQX4Q.js → chunk-BNIO5NNW.js} +47 -36
- package/dist/chunks/chunk-BNIO5NNW.js.map +6 -0
- package/dist/chunks/{chunk-WQ2S6BUX.js → chunk-BZC5JPMB.js} +3 -3
- package/dist/chunks/{chunk-EUMXN6FC.js → chunk-CB7VORLS.js} +4 -4
- package/dist/chunks/{chunk-PYYCH65R.js → chunk-CSWUOY5K.js} +124 -93
- package/dist/chunks/chunk-CSWUOY5K.js.map +6 -0
- package/dist/chunks/{chunk-NYYG7HAY.js → chunk-DE4WWSBB.js} +12 -12
- package/dist/chunks/{chunk-5GWSNJUP.js → chunk-DQGDG63U.js} +5 -5
- package/dist/chunks/{chunk-ZSNNS2V6.js → chunk-DXFPBLQV.js} +3 -3
- package/dist/chunks/{chunk-APKI7B7W.js → chunk-EK74R563.js} +4112 -1752
- package/dist/chunks/chunk-EK74R563.js.map +6 -0
- package/dist/chunks/{chunk-V6H2W6TZ.js → chunk-F2I6X667.js} +3 -3
- package/dist/chunks/{chunk-45LQJKMG.js → chunk-FI5EMDFZ.js} +3 -65
- package/dist/chunks/chunk-FI5EMDFZ.js.map +6 -0
- package/dist/chunks/{chunk-NEMRZKU7.js → chunk-FJZL4BJN.js} +2 -2
- package/dist/chunks/{chunk-YMWHDGCW.js → chunk-FTMONTUX.js} +3 -1
- package/dist/chunks/chunk-FTMONTUX.js.map +6 -0
- package/dist/chunks/{chunk-TH3PVZT3.js → chunk-G2DGASUC.js} +2 -2
- package/dist/chunks/{chunk-WYGUFPCK.js → chunk-GN4BLP6C.js} +9 -9
- package/dist/chunks/{chunk-TUNKUMWI.js → chunk-GTRG5VXA.js} +3 -3
- package/dist/chunks/{chunk-2UELHX7A.js → chunk-H32MIHLE.js} +2 -2
- package/dist/chunks/{chunk-I6WKUIVX.js → chunk-HAHNDC7N.js} +3 -3
- package/dist/chunks/{chunk-W3M6GZTY.js → chunk-HFLX3ZLT.js} +3 -3
- package/dist/chunks/{chunk-55LA4ARF.js → chunk-HSSTV5SF.js} +3 -3
- package/dist/chunks/{chunk-O53XPCC5.js → chunk-J267C5O6.js} +2 -2
- package/dist/chunks/{chunk-GFFWXLQI.js → chunk-J4QN36GJ.js} +11 -11
- package/dist/chunks/chunk-JBQATPG3.js +102 -0
- package/dist/chunks/chunk-JBQATPG3.js.map +6 -0
- package/dist/chunks/{chunk-TUBA7HB2.js → chunk-JE2S7MW2.js} +2 -2
- package/dist/chunks/{chunk-TXP6SOA7.js → chunk-JR6EFL7G.js} +5 -4
- package/dist/chunks/chunk-JR6EFL7G.js.map +6 -0
- package/dist/chunks/{chunk-TC3E4SKI.js → chunk-K4BMTUBH.js} +2 -2
- package/dist/chunks/{chunk-OQCZ27OE.js → chunk-KBLICB2N.js} +2 -2
- package/dist/chunks/{chunk-OY7K65K6.js → chunk-LJ4DIGHQ.js} +10 -10
- package/dist/chunks/{chunk-YICIG5QP.js → chunk-LNIM2TS3.js} +4 -4
- package/dist/chunks/{chunk-5MD7FSR4.js → chunk-LRLMZTZ3.js} +2 -2
- package/dist/chunks/{chunk-LM3JEI5Z.js → chunk-M3O7WEJF.js} +2 -2
- package/dist/chunks/{chunk-GBIYC3OF.js → chunk-MFRWOJCD.js} +2 -2
- package/dist/chunks/{chunk-WBCYE4JI.js → chunk-MJW6FQAW.js} +2 -2
- package/dist/chunks/{tui-2PVEZMXJ.js → chunk-MPLS4I5N.js} +655 -1383
- package/dist/chunks/chunk-MPLS4I5N.js.map +6 -0
- package/dist/chunks/{chunk-2H2TQCA5.js → chunk-MPUHBR73.js} +6 -2
- package/dist/chunks/chunk-MPUHBR73.js.map +6 -0
- package/dist/chunks/{chunk-ECYKNBHN.js → chunk-N7COW4QY.js} +10 -10
- package/dist/chunks/{chunk-ZUDMNBWB.js → chunk-NEKCM2HR.js} +6 -6
- package/dist/chunks/{chunk-4SQVWV4B.js → chunk-O6QJXKWZ.js} +5 -5
- package/dist/chunks/{chunk-HFY2647W.js → chunk-OG2MLME3.js} +2 -1
- package/dist/chunks/{chunk-HFY2647W.js.map → chunk-OG2MLME3.js.map} +1 -1
- package/dist/chunks/{chunk-LS2USKSX.js → chunk-P6CNFKJC.js} +5 -5
- package/dist/chunks/{chunk-PD2MTV6U.js → chunk-PR3HSIXG.js} +4 -4
- package/dist/chunks/{chunk-GVXKT3BV.js → chunk-PYRMWOCP.js} +4 -4
- package/dist/chunks/{chunk-I3DHWG5M.js → chunk-QN4WGK62.js} +3 -3
- package/dist/chunks/{chunk-UUZM4M2L.js → chunk-QZDNCVK4.js} +67 -44
- package/dist/chunks/chunk-QZDNCVK4.js.map +6 -0
- package/dist/chunks/{chunk-XBZJBXQY.js → chunk-R77WPUUF.js} +3 -3
- package/dist/chunks/{chunk-R2K5AFBF.js → chunk-RQKE2URW.js} +4 -4
- package/dist/chunks/{chunk-GMAPTJ3G.js → chunk-RZXNXGRE.js} +2 -2
- package/dist/chunks/{chunk-5JPQVU57.js → chunk-S4HDKI6L.js} +2 -2
- package/dist/chunks/{chunk-DQW7UPXP.js → chunk-SRBCU3IJ.js} +3 -3
- package/dist/chunks/{chunk-354BWCU6.js → chunk-TF6ZSM2M.js} +2 -2
- package/dist/chunks/{chunk-B3XETKYI.js → chunk-UHYZ64ET.js} +2 -2
- package/dist/chunks/{chunk-JQO2LGPA.js → chunk-VDQQE3Q6.js} +4 -4
- package/dist/chunks/{chunk-VIV4OF3E.js → chunk-VIJFICIC.js} +4 -4
- package/dist/chunks/{chunk-BMYWEYPI.js → chunk-VONTYDZ3.js} +3 -3
- package/dist/chunks/{chunk-NGHCVY4T.js → chunk-VPIFXAL6.js} +2 -2
- package/dist/chunks/{chunk-BMIFPELO.js → chunk-W5IR3SD3.js} +27 -6
- package/dist/chunks/chunk-W5IR3SD3.js.map +6 -0
- package/dist/chunks/{chunk-W2PMDZWZ.js → chunk-WWC6L5WC.js} +2 -2
- package/dist/chunks/{chunk-NSIV6WEI.js → chunk-XCDXSRY7.js} +2 -2
- package/dist/chunks/{chunk-W7NCIPEV.js → chunk-YOCPU3WT.js} +3 -3
- package/dist/chunks/{chunk-EPKNYAR5.js → chunk-YU65OZTC.js} +2 -2
- package/dist/chunks/chunk-YUDCUW4N.js +313 -0
- package/dist/chunks/chunk-YUDCUW4N.js.map +6 -0
- package/dist/chunks/{chunk-4ZWZ3UZ2.js → chunk-YWKZQABS.js} +8 -3
- package/dist/chunks/chunk-YWKZQABS.js.map +6 -0
- package/dist/chunks/{chunk-MPHLRHG6.js → chunk-ZJQYNG27.js} +2 -2
- package/dist/chunks/{chunk-RWMWDV5U.js → chunk-ZKOEUHCF.js} +3 -3
- package/dist/chunks/{chunk-C4YEWOFD.js → chunk-ZRM2NW77.js} +51 -93
- package/dist/chunks/chunk-ZRM2NW77.js.map +6 -0
- package/dist/chunks/{chunk-Y36X5RRN.js → chunk-ZYRABJ7J.js} +3 -3
- package/dist/chunks/{cli-runtime-6YUL7KO4.js → cli-runtime-YUFSSYYG.js} +12 -12
- package/dist/chunks/{commands-INKRVLL2.js → commands-J7XAMJC5.js} +6 -6
- package/dist/chunks/{computer-UE2AN7NW.js → computer-ZWTWBY67.js} +2 -2
- package/dist/chunks/{crash-report-W2LEW2CB.js → crash-report-3GPFLNQX.js} +6 -6
- package/dist/chunks/{dist-MSXSGG4O.js → dist-2EQ3MAWA.js} +2 -2
- package/dist/chunks/{dist-G66KFB6L.js → dist-4TO2X6U4.js} +2 -2
- package/dist/chunks/{dist-KNDQQ7NJ.js → dist-5LXAFF2H.js} +2 -2
- package/dist/chunks/{dist-YKMXFMEH.js → dist-CO47MPO4.js} +2 -2
- package/dist/chunks/{dist-CNCFMP4G.js → dist-EGCYKNFG.js} +92 -2
- package/dist/chunks/{dist-UH4FMDFC.js → dist-F36KOHDP.js} +2 -2
- package/dist/chunks/{dist-2WHW47YN.js → dist-IS662MSA.js} +2 -2
- package/dist/chunks/{dist-32QKP26R.js → dist-UXUFCGIX.js} +2 -2
- package/dist/chunks/{doctor-GUQ55L7P.js → doctor-YC6Z7P3P.js} +21 -21
- package/dist/chunks/{drain-W354CYLH.js → drain-5BQHD3KW.js} +10 -10
- package/dist/chunks/{entry-A6OLKTK4.js → entry-ZJWR3CSL.js} +6 -6
- package/dist/chunks/eval-JHNFGVGA.js +351 -0
- package/dist/chunks/eval-JHNFGVGA.js.map +6 -0
- package/dist/chunks/{exec-2GC33AL4.js → exec-YADZELFF.js} +71 -47
- package/dist/chunks/exec-YADZELFF.js.map +6 -0
- package/dist/chunks/{github-VCUDZDGI.js → github-FQAXV2KP.js} +2 -2
- package/dist/chunks/{home-T4OIF6S7.js → home-EBXWUU6C.js} +3 -3
- package/dist/chunks/{host-AVAUHFYK.js → host-JU76NQJY.js} +10 -10
- package/dist/chunks/{host-queries-DOTBOTRM.js → host-queries-6TO7AIZE.js} +15 -15
- package/dist/chunks/{learn-YMOECXWO.js → learn-YGTIACD6.js} +12 -12
- package/dist/chunks/{learn-builtin-BF6BC7VT.js → learn-builtin-FND7NEEV.js} +15 -15
- package/dist/chunks/{lifecycle-SCXNENNO.js → lifecycle-VBNEAO74.js} +33 -32
- package/dist/chunks/{list-A2TVECA4.js → list-GQEKL3MC.js} +26 -16
- package/dist/chunks/list-GQEKL3MC.js.map +6 -0
- package/dist/chunks/{live-GIKIVP5N.js → live-N3PPNKW6.js} +19 -19
- package/dist/chunks/{login-COY7ZU76.js → login-KEFAKXJZ.js} +14 -14
- package/dist/chunks/{logs-HN5ED3XC.js → logs-JZEIQMOQ.js} +7 -7
- package/dist/chunks/{mcp-KMFXTAEG.js → mcp-7CBDNNY3.js} +22 -22
- package/dist/chunks/{message-command-XJCX6GEH.js → message-command-JAKH5U6B.js} +43 -43
- package/dist/chunks/{open-7CKFU4GZ.js → open-Q63ZNCNO.js} +8 -8
- package/dist/chunks/{operator-tools-SBSUWAPM.js → operator-tools-SEK3DCMJ.js} +13 -13
- package/dist/chunks/{output-schema-OF7MU44K.js → output-schema-ROCYTWMQ.js} +3 -3
- package/dist/chunks/{pal-ANABYPQI.js → pal-XOMURPYQ.js} +17 -17
- package/dist/chunks/{peers-MQMTWBNF.js → peers-GY5QNN5F.js} +8 -8
- package/dist/chunks/{peers-45ERDPKF.js → peers-JILQNRCW.js} +6 -6
- package/dist/chunks/{providers-U2VOQPIQ.js → providers-NMMTLTEC.js} +11 -11
- package/dist/chunks/{pty-O3JUR6E6.js → pty-KR5RNX54.js} +3 -3
- package/dist/chunks/resume-A3XPV4Z5.js +23 -0
- package/dist/chunks/{resume-command-CTK2KZBA.js → resume-command-WOG47T6A.js} +6 -6
- package/dist/chunks/{schedule-QPTZKLTX.js → schedule-V3OHZVHK.js} +15 -10
- package/dist/chunks/schedule-V3OHZVHK.js.map +6 -0
- package/dist/chunks/{service-HV3GCDHA.js → service-XPJSCHPW.js} +37 -36
- package/dist/chunks/service-XPJSCHPW.js.map +6 -0
- package/dist/chunks/{skills-2AT7ET7J.js → skills-PGO6KGCD.js} +9 -9
- package/dist/chunks/{start-check-KLNGOTCH.js → start-check-CLSVKYRW.js} +2 -2
- package/dist/chunks/{startup-failure-LONKNDPE.js → startup-failure-WN5PCOIE.js} +2 -2
- package/dist/chunks/{state-NH64B6V6.js → state-W72YF7CF.js} +3 -3
- package/dist/chunks/{store-3UO335CU.js → store-4RNQ47OD.js} +6 -6
- package/dist/chunks/{store-FQVXZJIN.js → store-7SESBCUG.js} +3 -3
- package/dist/chunks/{store-UK2654YC.js → store-J4CYKAFS.js} +4 -4
- package/dist/chunks/{store-XEDK3ESU.js → store-SQINHTJO.js} +14 -10
- package/dist/chunks/tui-HYKE4V4J.js +1030 -0
- package/dist/chunks/tui-HYKE4V4J.js.map +6 -0
- package/dist/chunks/{upgrade-ERUCYWMK.js → upgrade-HE5NIE2M.js} +8 -8
- package/dist/chunks/watch-C5YQJNHV.js +978 -0
- package/dist/chunks/watch-C5YQJNHV.js.map +6 -0
- package/dist/chunks/{workspaces-YIBJSUGI.js → workspaces-CPOLSOKE.js} +16 -16
- package/dist/chunks/{worktree-4K2Y37SY.js → worktree-TUBWOHUQ.js} +13 -13
- package/dist/cli.d.ts.map +1 -1
- package/dist/commands/acp-provider-retry.d.ts +30 -0
- package/dist/commands/acp-provider-retry.d.ts.map +1 -1
- package/dist/commands/acp.d.ts.map +1 -1
- package/dist/commands/desktop-host.d.ts +3 -0
- package/dist/commands/desktop-host.d.ts.map +1 -1
- package/dist/commands/eval.d.ts.map +1 -1
- package/dist/commands/exec-flags.d.ts +2 -0
- package/dist/commands/exec-flags.d.ts.map +1 -1
- package/dist/commands/exec-json.d.ts.map +1 -1
- package/dist/commands/exec.d.ts.map +1 -1
- package/dist/commands/manifest.d.ts +1 -0
- package/dist/commands/manifest.d.ts.map +1 -1
- package/dist/commands/schedule.d.ts.map +1 -1
- package/dist/commands/watch.d.ts +41 -0
- package/dist/commands/watch.d.ts.map +1 -0
- package/dist/config/load.d.ts.map +1 -1
- package/dist/config/schema.d.ts +25 -0
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/settings-descriptors.d.ts.map +1 -1
- package/dist/config/turn-guards.d.ts +5 -2
- package/dist/config/turn-guards.d.ts.map +1 -1
- package/dist/exit-codes.d.ts +9 -1
- package/dist/exit-codes.d.ts.map +1 -1
- package/dist/index.js +29 -29
- package/dist/integrations/sessions/session-watch.d.ts +127 -0
- package/dist/integrations/sessions/session-watch.d.ts.map +1 -0
- package/dist/integrations/sessions/store.d.ts +7 -1
- package/dist/integrations/sessions/store.d.ts.map +1 -1
- package/dist/integrations/sessions/watch-view.d.ts +73 -0
- package/dist/integrations/sessions/watch-view.d.ts.map +1 -0
- package/dist/integrations/sessions/watch-wait.d.ts +32 -0
- package/dist/integrations/sessions/watch-wait.d.ts.map +1 -0
- package/dist/schedule/build.d.ts +12 -0
- package/dist/schedule/build.d.ts.map +1 -1
- package/dist/schedule/changes.d.ts.map +1 -1
- package/dist/schedule/commands/add.d.ts +1 -1
- package/dist/schedule/commands/add.d.ts.map +1 -1
- package/dist/schedule/commands/list.d.ts +2 -0
- package/dist/schedule/commands/list.d.ts.map +1 -1
- package/dist/schedule/daemon/daemon.d.ts.map +1 -1
- package/dist/schedule/daemon/notify.d.ts +7 -2
- package/dist/schedule/daemon/notify.d.ts.map +1 -1
- package/dist/schedule/delivery.d.ts.map +1 -1
- package/dist/schedule/fire/calls.d.ts +2 -0
- package/dist/schedule/fire/calls.d.ts.map +1 -1
- package/dist/schedule/fire/fire.d.ts +3 -0
- package/dist/schedule/fire/fire.d.ts.map +1 -1
- package/dist/schedule/fire/run-script.d.ts +4 -0
- package/dist/schedule/fire/run-script.d.ts.map +1 -1
- package/dist/schedule/fire/unattended-note.d.ts +5 -0
- package/dist/schedule/fire/unattended-note.d.ts.map +1 -1
- package/dist/schedule/gate.d.ts +73 -0
- package/dist/schedule/gate.d.ts.map +1 -0
- package/dist/schedule/store/jobs.d.ts +2 -2
- package/dist/schedule/store/jobs.d.ts.map +1 -1
- package/dist/schedule/types.d.ts +60 -1
- package/dist/schedule/types.d.ts.map +1 -1
- package/dist/tui/App.d.ts.map +1 -1
- package/dist/tui/Markdown.d.ts +5 -1
- package/dist/tui/Markdown.d.ts.map +1 -1
- package/dist/tui/ScheduleReviewOverlay.d.ts.map +1 -1
- package/dist/tui/agent.d.ts +14 -1
- package/dist/tui/agent.d.ts.map +1 -1
- package/dist/tui/conversation-in-use.d.ts +2 -2
- package/dist/tui/conversation-in-use.d.ts.map +1 -1
- package/dist/tui/fullscreen/markdown-rows.d.ts.map +1 -1
- package/dist/tui/markdown-structure.d.ts +24 -0
- package/dist/tui/markdown-structure.d.ts.map +1 -0
- package/dist/tui/markdownParser.d.ts +11 -0
- package/dist/tui/markdownParser.d.ts.map +1 -1
- package/dist/tui/outcome-line.d.ts +29 -1
- package/dist/tui/outcome-line.d.ts.map +1 -1
- package/dist/tui/restored-rows.d.ts +8 -1
- package/dist/tui/restored-rows.d.ts.map +1 -1
- package/dist/tui/schedule/host-commands.d.ts.map +1 -1
- package/dist/tui/schedule/source-deliveries.d.ts.map +1 -1
- package/dist/tui/schedule/tool-host.d.ts.map +1 -1
- package/dist/tui/tool-end-rows.d.ts +1 -1
- package/dist/tui/tool-end-rows.d.ts.map +1 -1
- package/dist/tui/types.d.ts +5 -1
- package/dist/tui/types.d.ts.map +1 -1
- package/package.json +5 -5
- package/skills/schedule-task/SKILL.md +8 -0
- package/dist/chunks/acp-I75ITR7W.js.map +0 -6
- package/dist/chunks/add-X25CBZQM.js.map +0 -6
- package/dist/chunks/agent-session-YXYFEYXB.js +0 -69
- package/dist/chunks/chunk-2H2TQCA5.js.map +0 -6
- package/dist/chunks/chunk-45LQJKMG.js.map +0 -6
- package/dist/chunks/chunk-4JTXA7EU.js.map +0 -6
- package/dist/chunks/chunk-4ZWZ3UZ2.js.map +0 -6
- package/dist/chunks/chunk-APKI7B7W.js.map +0 -6
- package/dist/chunks/chunk-BMIFPELO.js.map +0 -6
- package/dist/chunks/chunk-BNEGQX4Q.js.map +0 -6
- package/dist/chunks/chunk-C4YEWOFD.js.map +0 -6
- package/dist/chunks/chunk-GTFK7PLC.js.map +0 -6
- package/dist/chunks/chunk-PYYCH65R.js.map +0 -6
- package/dist/chunks/chunk-TXP6SOA7.js.map +0 -6
- package/dist/chunks/chunk-UUZM4M2L.js.map +0 -6
- package/dist/chunks/chunk-VRFKZSBH.js.map +0 -6
- package/dist/chunks/chunk-YMWHDGCW.js.map +0 -6
- package/dist/chunks/eval-4WUEX4J2.js +0 -187
- package/dist/chunks/eval-4WUEX4J2.js.map +0 -6
- package/dist/chunks/exec-2GC33AL4.js.map +0 -6
- package/dist/chunks/list-A2TVECA4.js.map +0 -6
- package/dist/chunks/resume-SAA3MLKU.js +0 -23
- package/dist/chunks/schedule-QPTZKLTX.js.map +0 -6
- package/dist/chunks/service-HV3GCDHA.js.map +0 -6
- package/dist/chunks/tui-2PVEZMXJ.js.map +0 -6
- /package/dist/chunks/{activity-command-6RM3I3CG.js.map → activity-command-6SLWX5O6.js.map} +0 -0
- /package/dist/chunks/{agent-TIXCYM5Q.js.map → agent-IN76G7FR.js.map} +0 -0
- /package/dist/chunks/{agent-session-YXYFEYXB.js.map → agent-session-5T4QOI6T.js.map} +0 -0
- /package/dist/chunks/{archive-UFBZQWFO.js.map → archive-X5OO3HYU.js.map} +0 -0
- /package/dist/chunks/{bin-main-5E4PLOSV.js.map → bin-main-MJURSFNJ.js.map} +0 -0
- /package/dist/chunks/{binding-EGKCFUJN.js.map → binding-6EX5H32J.js.map} +0 -0
- /package/dist/chunks/{browser-WSEOMG6B.js.map → browser-UUSAOFML.js.map} +0 -0
- /package/dist/chunks/{chat-XGURQIQN.js.map → chat-J2DRST74.js.map} +0 -0
- /package/dist/chunks/{chunk-TW56AJLJ.js.map → chunk-2OGJPIGN.js.map} +0 -0
- /package/dist/chunks/{chunk-J6EAQ4XD.js.map → chunk-2XXEIH7D.js.map} +0 -0
- /package/dist/chunks/{chunk-55KDC7DM.js.map → chunk-3KNUUOMF.js.map} +0 -0
- /package/dist/chunks/{chunk-6I7YVWWO.js.map → chunk-3VKSD45U.js.map} +0 -0
- /package/dist/chunks/{chunk-KZTKHIP5.js.map → chunk-4DYB42HG.js.map} +0 -0
- /package/dist/chunks/{chunk-3I4UQCJZ.js.map → chunk-4GQ5ACCZ.js.map} +0 -0
- /package/dist/chunks/{chunk-MNMG5JGZ.js.map → chunk-4MDH3G7P.js.map} +0 -0
- /package/dist/chunks/{chunk-2MAMU7AX.js.map → chunk-5HS5WIS3.js.map} +0 -0
- /package/dist/chunks/{chunk-ZXYCWNKE.js.map → chunk-64CDTVEM.js.map} +0 -0
- /package/dist/chunks/{chunk-SDIFKDGI.js.map → chunk-6J6AEQA4.js.map} +0 -0
- /package/dist/chunks/{chunk-POGVGWKL.js.map → chunk-76HAMOHW.js.map} +0 -0
- /package/dist/chunks/{chunk-QZRV5EOA.js.map → chunk-ASITCNWM.js.map} +0 -0
- /package/dist/chunks/{chunk-LNVTSRF3.js.map → chunk-BGT2BABA.js.map} +0 -0
- /package/dist/chunks/{chunk-WQ2S6BUX.js.map → chunk-BZC5JPMB.js.map} +0 -0
- /package/dist/chunks/{chunk-EUMXN6FC.js.map → chunk-CB7VORLS.js.map} +0 -0
- /package/dist/chunks/{chunk-NYYG7HAY.js.map → chunk-DE4WWSBB.js.map} +0 -0
- /package/dist/chunks/{chunk-5GWSNJUP.js.map → chunk-DQGDG63U.js.map} +0 -0
- /package/dist/chunks/{chunk-ZSNNS2V6.js.map → chunk-DXFPBLQV.js.map} +0 -0
- /package/dist/chunks/{chunk-V6H2W6TZ.js.map → chunk-F2I6X667.js.map} +0 -0
- /package/dist/chunks/{chunk-NEMRZKU7.js.map → chunk-FJZL4BJN.js.map} +0 -0
- /package/dist/chunks/{chunk-TH3PVZT3.js.map → chunk-G2DGASUC.js.map} +0 -0
- /package/dist/chunks/{chunk-WYGUFPCK.js.map → chunk-GN4BLP6C.js.map} +0 -0
- /package/dist/chunks/{chunk-TUNKUMWI.js.map → chunk-GTRG5VXA.js.map} +0 -0
- /package/dist/chunks/{chunk-2UELHX7A.js.map → chunk-H32MIHLE.js.map} +0 -0
- /package/dist/chunks/{chunk-I6WKUIVX.js.map → chunk-HAHNDC7N.js.map} +0 -0
- /package/dist/chunks/{chunk-W3M6GZTY.js.map → chunk-HFLX3ZLT.js.map} +0 -0
- /package/dist/chunks/{chunk-55LA4ARF.js.map → chunk-HSSTV5SF.js.map} +0 -0
- /package/dist/chunks/{chunk-O53XPCC5.js.map → chunk-J267C5O6.js.map} +0 -0
- /package/dist/chunks/{chunk-GFFWXLQI.js.map → chunk-J4QN36GJ.js.map} +0 -0
- /package/dist/chunks/{chunk-TUBA7HB2.js.map → chunk-JE2S7MW2.js.map} +0 -0
- /package/dist/chunks/{chunk-TC3E4SKI.js.map → chunk-K4BMTUBH.js.map} +0 -0
- /package/dist/chunks/{chunk-OQCZ27OE.js.map → chunk-KBLICB2N.js.map} +0 -0
- /package/dist/chunks/{chunk-OY7K65K6.js.map → chunk-LJ4DIGHQ.js.map} +0 -0
- /package/dist/chunks/{chunk-YICIG5QP.js.map → chunk-LNIM2TS3.js.map} +0 -0
- /package/dist/chunks/{chunk-5MD7FSR4.js.map → chunk-LRLMZTZ3.js.map} +0 -0
- /package/dist/chunks/{chunk-LM3JEI5Z.js.map → chunk-M3O7WEJF.js.map} +0 -0
- /package/dist/chunks/{chunk-GBIYC3OF.js.map → chunk-MFRWOJCD.js.map} +0 -0
- /package/dist/chunks/{chunk-WBCYE4JI.js.map → chunk-MJW6FQAW.js.map} +0 -0
- /package/dist/chunks/{chunk-ECYKNBHN.js.map → chunk-N7COW4QY.js.map} +0 -0
- /package/dist/chunks/{chunk-ZUDMNBWB.js.map → chunk-NEKCM2HR.js.map} +0 -0
- /package/dist/chunks/{chunk-4SQVWV4B.js.map → chunk-O6QJXKWZ.js.map} +0 -0
- /package/dist/chunks/{chunk-LS2USKSX.js.map → chunk-P6CNFKJC.js.map} +0 -0
- /package/dist/chunks/{chunk-PD2MTV6U.js.map → chunk-PR3HSIXG.js.map} +0 -0
- /package/dist/chunks/{chunk-GVXKT3BV.js.map → chunk-PYRMWOCP.js.map} +0 -0
- /package/dist/chunks/{chunk-I3DHWG5M.js.map → chunk-QN4WGK62.js.map} +0 -0
- /package/dist/chunks/{chunk-XBZJBXQY.js.map → chunk-R77WPUUF.js.map} +0 -0
- /package/dist/chunks/{chunk-R2K5AFBF.js.map → chunk-RQKE2URW.js.map} +0 -0
- /package/dist/chunks/{chunk-GMAPTJ3G.js.map → chunk-RZXNXGRE.js.map} +0 -0
- /package/dist/chunks/{chunk-5JPQVU57.js.map → chunk-S4HDKI6L.js.map} +0 -0
- /package/dist/chunks/{chunk-DQW7UPXP.js.map → chunk-SRBCU3IJ.js.map} +0 -0
- /package/dist/chunks/{chunk-354BWCU6.js.map → chunk-TF6ZSM2M.js.map} +0 -0
- /package/dist/chunks/{chunk-B3XETKYI.js.map → chunk-UHYZ64ET.js.map} +0 -0
- /package/dist/chunks/{chunk-JQO2LGPA.js.map → chunk-VDQQE3Q6.js.map} +0 -0
- /package/dist/chunks/{chunk-VIV4OF3E.js.map → chunk-VIJFICIC.js.map} +0 -0
- /package/dist/chunks/{chunk-BMYWEYPI.js.map → chunk-VONTYDZ3.js.map} +0 -0
- /package/dist/chunks/{chunk-NGHCVY4T.js.map → chunk-VPIFXAL6.js.map} +0 -0
- /package/dist/chunks/{chunk-W2PMDZWZ.js.map → chunk-WWC6L5WC.js.map} +0 -0
- /package/dist/chunks/{chunk-NSIV6WEI.js.map → chunk-XCDXSRY7.js.map} +0 -0
- /package/dist/chunks/{chunk-W7NCIPEV.js.map → chunk-YOCPU3WT.js.map} +0 -0
- /package/dist/chunks/{chunk-EPKNYAR5.js.map → chunk-YU65OZTC.js.map} +0 -0
- /package/dist/chunks/{chunk-MPHLRHG6.js.map → chunk-ZJQYNG27.js.map} +0 -0
- /package/dist/chunks/{chunk-RWMWDV5U.js.map → chunk-ZKOEUHCF.js.map} +0 -0
- /package/dist/chunks/{chunk-Y36X5RRN.js.map → chunk-ZYRABJ7J.js.map} +0 -0
- /package/dist/chunks/{cli-runtime-6YUL7KO4.js.map → cli-runtime-YUFSSYYG.js.map} +0 -0
- /package/dist/chunks/{commands-INKRVLL2.js.map → commands-J7XAMJC5.js.map} +0 -0
- /package/dist/chunks/{computer-UE2AN7NW.js.map → computer-ZWTWBY67.js.map} +0 -0
- /package/dist/chunks/{crash-report-W2LEW2CB.js.map → crash-report-3GPFLNQX.js.map} +0 -0
- /package/dist/chunks/{dist-MSXSGG4O.js.map → dist-2EQ3MAWA.js.map} +0 -0
- /package/dist/chunks/{dist-G66KFB6L.js.map → dist-4TO2X6U4.js.map} +0 -0
- /package/dist/chunks/{dist-KNDQQ7NJ.js.map → dist-5LXAFF2H.js.map} +0 -0
- /package/dist/chunks/{dist-YKMXFMEH.js.map → dist-CO47MPO4.js.map} +0 -0
- /package/dist/chunks/{dist-CNCFMP4G.js.map → dist-EGCYKNFG.js.map} +0 -0
- /package/dist/chunks/{dist-UH4FMDFC.js.map → dist-F36KOHDP.js.map} +0 -0
- /package/dist/chunks/{dist-2WHW47YN.js.map → dist-IS662MSA.js.map} +0 -0
- /package/dist/chunks/{dist-32QKP26R.js.map → dist-UXUFCGIX.js.map} +0 -0
- /package/dist/chunks/{doctor-GUQ55L7P.js.map → doctor-YC6Z7P3P.js.map} +0 -0
- /package/dist/chunks/{drain-W354CYLH.js.map → drain-5BQHD3KW.js.map} +0 -0
- /package/dist/chunks/{entry-A6OLKTK4.js.map → entry-ZJWR3CSL.js.map} +0 -0
- /package/dist/chunks/{github-VCUDZDGI.js.map → github-FQAXV2KP.js.map} +0 -0
- /package/dist/chunks/{home-T4OIF6S7.js.map → home-EBXWUU6C.js.map} +0 -0
- /package/dist/chunks/{host-AVAUHFYK.js.map → host-JU76NQJY.js.map} +0 -0
- /package/dist/chunks/{host-queries-DOTBOTRM.js.map → host-queries-6TO7AIZE.js.map} +0 -0
- /package/dist/chunks/{learn-YMOECXWO.js.map → learn-YGTIACD6.js.map} +0 -0
- /package/dist/chunks/{learn-builtin-BF6BC7VT.js.map → learn-builtin-FND7NEEV.js.map} +0 -0
- /package/dist/chunks/{lifecycle-SCXNENNO.js.map → lifecycle-VBNEAO74.js.map} +0 -0
- /package/dist/chunks/{live-GIKIVP5N.js.map → live-N3PPNKW6.js.map} +0 -0
- /package/dist/chunks/{login-COY7ZU76.js.map → login-KEFAKXJZ.js.map} +0 -0
- /package/dist/chunks/{logs-HN5ED3XC.js.map → logs-JZEIQMOQ.js.map} +0 -0
- /package/dist/chunks/{mcp-KMFXTAEG.js.map → mcp-7CBDNNY3.js.map} +0 -0
- /package/dist/chunks/{message-command-XJCX6GEH.js.map → message-command-JAKH5U6B.js.map} +0 -0
- /package/dist/chunks/{open-7CKFU4GZ.js.map → open-Q63ZNCNO.js.map} +0 -0
- /package/dist/chunks/{operator-tools-SBSUWAPM.js.map → operator-tools-SEK3DCMJ.js.map} +0 -0
- /package/dist/chunks/{output-schema-OF7MU44K.js.map → output-schema-ROCYTWMQ.js.map} +0 -0
- /package/dist/chunks/{pal-ANABYPQI.js.map → pal-XOMURPYQ.js.map} +0 -0
- /package/dist/chunks/{peers-MQMTWBNF.js.map → peers-GY5QNN5F.js.map} +0 -0
- /package/dist/chunks/{peers-45ERDPKF.js.map → peers-JILQNRCW.js.map} +0 -0
- /package/dist/chunks/{providers-U2VOQPIQ.js.map → providers-NMMTLTEC.js.map} +0 -0
- /package/dist/chunks/{pty-O3JUR6E6.js.map → pty-KR5RNX54.js.map} +0 -0
- /package/dist/chunks/{resume-SAA3MLKU.js.map → resume-A3XPV4Z5.js.map} +0 -0
- /package/dist/chunks/{resume-command-CTK2KZBA.js.map → resume-command-WOG47T6A.js.map} +0 -0
- /package/dist/chunks/{skills-2AT7ET7J.js.map → skills-PGO6KGCD.js.map} +0 -0
- /package/dist/chunks/{start-check-KLNGOTCH.js.map → start-check-CLSVKYRW.js.map} +0 -0
- /package/dist/chunks/{startup-failure-LONKNDPE.js.map → startup-failure-WN5PCOIE.js.map} +0 -0
- /package/dist/chunks/{state-NH64B6V6.js.map → state-W72YF7CF.js.map} +0 -0
- /package/dist/chunks/{store-3UO335CU.js.map → store-4RNQ47OD.js.map} +0 -0
- /package/dist/chunks/{store-FQVXZJIN.js.map → store-7SESBCUG.js.map} +0 -0
- /package/dist/chunks/{store-UK2654YC.js.map → store-J4CYKAFS.js.map} +0 -0
- /package/dist/chunks/{store-XEDK3ESU.js.map → store-SQINHTJO.js.map} +0 -0
- /package/dist/chunks/{upgrade-ERUCYWMK.js.map → upgrade-HE5NIE2M.js.map} +0 -0
- /package/dist/chunks/{workspaces-YIBJSUGI.js.map → workspaces-CPOLSOKE.js.map} +0 -0
- /package/dist/chunks/{worktree-4K2Y37SY.js.map → worktree-TUBWOHUQ.js.map} +0 -0
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { createRequire as __namzuCreateRequire } from 'node:module';
|
|
2
2
|
const require = __namzuCreateRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
selectDesktopBackend
|
|
5
|
+
} from "./chunk-UHYZ64ET.js";
|
|
3
6
|
import {
|
|
4
7
|
NAMZU_COMPACT_WORDMARK,
|
|
5
8
|
NAMZU_WORDMARK,
|
|
@@ -11,13 +14,10 @@ import {
|
|
|
11
14
|
confirmationView,
|
|
12
15
|
describeChanges,
|
|
13
16
|
permissionsChanged
|
|
14
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-YWKZQABS.js";
|
|
15
18
|
import {
|
|
16
19
|
visibleScheduleMessage
|
|
17
20
|
} from "./chunk-NADQQMMG.js";
|
|
18
|
-
import {
|
|
19
|
-
selectDesktopBackend
|
|
20
|
-
} from "./chunk-B3XETKYI.js";
|
|
21
21
|
import {
|
|
22
22
|
TURN_LIMIT_FIELDS,
|
|
23
23
|
ThemeEpochContext,
|
|
@@ -47,18 +47,13 @@ import {
|
|
|
47
47
|
saveTheme,
|
|
48
48
|
savedThemeSetting,
|
|
49
49
|
setThemePreview,
|
|
50
|
-
setThemeSetting,
|
|
51
50
|
shownTheme,
|
|
52
51
|
slashTiming,
|
|
53
52
|
toolServerRow,
|
|
54
53
|
turnLimitCommands,
|
|
55
54
|
useThemeEpoch,
|
|
56
55
|
useThemeSubscription
|
|
57
|
-
} from "./chunk-
|
|
58
|
-
import {
|
|
59
|
-
handleTerminationSignals
|
|
60
|
-
} from "./chunk-354BWCU6.js";
|
|
61
|
-
import "./chunk-R66H2G5R.js";
|
|
56
|
+
} from "./chunk-J4QN36GJ.js";
|
|
62
57
|
import {
|
|
63
58
|
describeAllCredentialsLogout,
|
|
64
59
|
describeApiKeyLogout,
|
|
@@ -69,36 +64,15 @@ import {
|
|
|
69
64
|
} from "./chunk-MDK4RMBQ.js";
|
|
70
65
|
import {
|
|
71
66
|
applyProviderFlags
|
|
72
|
-
} from "./chunk-
|
|
73
|
-
import {
|
|
74
|
-
reportCrash
|
|
75
|
-
} from "./chunk-TC3E4SKI.js";
|
|
76
|
-
import {
|
|
77
|
-
BYPASS_CONSENT_BODY,
|
|
78
|
-
BYPASS_CONSENT_TITLE,
|
|
79
|
-
acknowledgeBypass,
|
|
80
|
-
hasAcknowledgedBypass
|
|
81
|
-
} from "./chunk-5MD7FSR4.js";
|
|
82
|
-
import {
|
|
83
|
-
applyFallbackFlag,
|
|
84
|
-
capChoiceLines,
|
|
85
|
-
choiceDisplayText,
|
|
86
|
-
choiceDisplayWidth,
|
|
87
|
-
eraseLastChoiceGrapheme,
|
|
88
|
-
truncateAtSeparator,
|
|
89
|
-
truncateChoiceText,
|
|
90
|
-
wrapBalancedText,
|
|
91
|
-
wrapChoiceText
|
|
92
|
-
} from "./chunk-B5AIMVRI.js";
|
|
67
|
+
} from "./chunk-BIWDWFAK.js";
|
|
93
68
|
import {
|
|
94
69
|
settleAnsweredPark
|
|
95
|
-
} from "./chunk-
|
|
96
|
-
import "./chunk-GWQEMJFS.js";
|
|
70
|
+
} from "./chunk-2OGJPIGN.js";
|
|
97
71
|
import {
|
|
98
72
|
DELIVERY_READ_LIMIT,
|
|
99
73
|
readSourceDeliveryPage,
|
|
100
74
|
takeSuppressedCount
|
|
101
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-CSWUOY5K.js";
|
|
102
76
|
import {
|
|
103
77
|
DEFAULT_MAX_ITERATIONS,
|
|
104
78
|
DEFAULT_TIMEOUT_MS,
|
|
@@ -108,40 +82,54 @@ import {
|
|
|
108
82
|
confirmJob,
|
|
109
83
|
editedJob,
|
|
110
84
|
previewLines,
|
|
111
|
-
runsPerDay
|
|
112
|
-
|
|
113
|
-
verifyScheduledScript
|
|
114
|
-
} from "./chunk-C4YEWOFD.js";
|
|
85
|
+
runsPerDay
|
|
86
|
+
} from "./chunk-ZRM2NW77.js";
|
|
115
87
|
import {
|
|
116
88
|
callsCount
|
|
117
|
-
} from "./chunk-
|
|
118
|
-
import
|
|
89
|
+
} from "./chunk-OG2MLME3.js";
|
|
90
|
+
import {
|
|
91
|
+
gateLines,
|
|
92
|
+
gateRefusal,
|
|
93
|
+
scriptShellUnavailableReason,
|
|
94
|
+
verifyScheduledScript
|
|
95
|
+
} from "./chunk-YUDCUW4N.js";
|
|
119
96
|
import {
|
|
120
97
|
allowsCommands,
|
|
121
98
|
compileJobPolicy,
|
|
122
99
|
compileScriptCheckPolicy,
|
|
123
100
|
isPresetName
|
|
124
|
-
} from "./chunk-
|
|
125
|
-
import
|
|
101
|
+
} from "./chunk-BGT2BABA.js";
|
|
102
|
+
import {
|
|
103
|
+
callEndpoint,
|
|
104
|
+
readEndpoint
|
|
105
|
+
} from "./chunk-6YG7D7U4.js";
|
|
106
|
+
import {
|
|
107
|
+
BYPASS_CONSENT_BODY,
|
|
108
|
+
BYPASS_CONSENT_TITLE,
|
|
109
|
+
acknowledgeBypass,
|
|
110
|
+
hasAcknowledgedBypass
|
|
111
|
+
} from "./chunk-LRLMZTZ3.js";
|
|
112
|
+
import {
|
|
113
|
+
applyFallbackFlag,
|
|
114
|
+
capChoiceLines,
|
|
115
|
+
choiceDisplayText,
|
|
116
|
+
choiceDisplayWidth,
|
|
117
|
+
eraseLastChoiceGrapheme,
|
|
118
|
+
truncateAtSeparator,
|
|
119
|
+
truncateChoiceText,
|
|
120
|
+
wrapBalancedText,
|
|
121
|
+
wrapChoiceText
|
|
122
|
+
} from "./chunk-B5AIMVRI.js";
|
|
126
123
|
import {
|
|
127
|
-
formatResumeShellCommand,
|
|
128
124
|
parkedRunWords,
|
|
129
125
|
resumeCommand
|
|
130
|
-
} from "./chunk-
|
|
126
|
+
} from "./chunk-ZYRABJ7J.js";
|
|
131
127
|
import {
|
|
132
128
|
appendHistory,
|
|
133
129
|
nextFireOf,
|
|
134
130
|
readHistory,
|
|
135
131
|
readState
|
|
136
|
-
} from "./chunk-
|
|
137
|
-
import {
|
|
138
|
-
callEndpoint,
|
|
139
|
-
readEndpoint
|
|
140
|
-
} from "./chunk-6YG7D7U4.js";
|
|
141
|
-
import {
|
|
142
|
-
backgroundFromColorFgBg,
|
|
143
|
-
queryTerminalBackground
|
|
144
|
-
} from "./chunk-6ULKBT6P.js";
|
|
132
|
+
} from "./chunk-SRBCU3IJ.js";
|
|
145
133
|
import {
|
|
146
134
|
CLIPBOARD_KILL_SWITCH,
|
|
147
135
|
ClickCounter,
|
|
@@ -150,69 +138,62 @@ import {
|
|
|
150
138
|
createClipboardCopier,
|
|
151
139
|
describeCopy,
|
|
152
140
|
hostSlot,
|
|
153
|
-
hostedByHost,
|
|
154
141
|
lineAt,
|
|
155
142
|
orderRange,
|
|
156
143
|
snapRange,
|
|
157
|
-
wordAt
|
|
158
|
-
|
|
159
|
-
} from "./chunk-3I4UQCJZ.js";
|
|
144
|
+
wordAt
|
|
145
|
+
} from "./chunk-4GQ5ACCZ.js";
|
|
160
146
|
import {
|
|
161
147
|
motionAllowed,
|
|
162
148
|
reducedMotion,
|
|
163
149
|
require_react,
|
|
164
|
-
setReducedMotion,
|
|
165
150
|
useReducedMotion
|
|
166
151
|
} from "./chunk-HREK4V2O.js";
|
|
167
|
-
import {
|
|
168
|
-
MOUSE_OFF,
|
|
169
|
-
mouseOn,
|
|
170
|
-
resolveMouseMode,
|
|
171
|
-
writeLaunchMouseReset
|
|
172
|
-
} from "./chunk-DH4X2E6M.js";
|
|
173
152
|
import {
|
|
174
153
|
buildPeerTools,
|
|
175
154
|
openLivePeers,
|
|
176
155
|
peerMailLabel,
|
|
177
156
|
peerMailMessage
|
|
178
|
-
} from "./chunk-
|
|
157
|
+
} from "./chunk-ZKOEUHCF.js";
|
|
179
158
|
import {
|
|
180
159
|
AUTO_CHOICE_ID,
|
|
181
|
-
NOTHING_TOLD,
|
|
182
160
|
PR_NONE,
|
|
183
161
|
PrPoller,
|
|
184
162
|
conversationMarkdown,
|
|
185
163
|
hasBothGroups,
|
|
186
164
|
isAutoChoice,
|
|
187
165
|
modelStep,
|
|
188
|
-
outcomeNotice,
|
|
189
166
|
rawDetail,
|
|
190
167
|
rowSection,
|
|
191
168
|
sectionHeading,
|
|
192
169
|
withAutoChoice,
|
|
193
170
|
writeConversationExport
|
|
194
|
-
} from "./chunk-
|
|
171
|
+
} from "./chunk-FI5EMDFZ.js";
|
|
195
172
|
import {
|
|
196
173
|
tuiPalDefinition,
|
|
197
174
|
tuiPalEnvironment,
|
|
198
175
|
tuiPalOwner,
|
|
199
176
|
tuiPalPreferences
|
|
200
|
-
} from "./chunk-
|
|
177
|
+
} from "./chunk-DQGDG63U.js";
|
|
201
178
|
import {
|
|
202
179
|
isModelOnlyContext,
|
|
203
180
|
runtimeContextLabel
|
|
204
181
|
} from "./chunk-JETLWXUE.js";
|
|
182
|
+
import {
|
|
183
|
+
NOTHING_TOLD,
|
|
184
|
+
claimMismatchLine,
|
|
185
|
+
goalEndingLine,
|
|
186
|
+
handedBackLines,
|
|
187
|
+
outcomeNotice
|
|
188
|
+
} from "./chunk-JBQATPG3.js";
|
|
205
189
|
import {
|
|
206
190
|
deleteUserConfigValue,
|
|
207
191
|
setUserConfigValue
|
|
208
|
-
} from "./chunk-
|
|
209
|
-
import "./chunk-WQ2S6BUX.js";
|
|
210
|
-
import "./chunk-ECYKNBHN.js";
|
|
211
|
-
import "./chunk-ZUDMNBWB.js";
|
|
192
|
+
} from "./chunk-HFLX3ZLT.js";
|
|
212
193
|
import {
|
|
213
194
|
claimPalConversation,
|
|
214
195
|
listPalConversations
|
|
215
|
-
} from "./chunk-
|
|
196
|
+
} from "./chunk-3VKSD45U.js";
|
|
216
197
|
import {
|
|
217
198
|
CLICK_EXPAND_HINT,
|
|
218
199
|
CLICK_FOLD_HINT,
|
|
@@ -322,12 +303,11 @@ import {
|
|
|
322
303
|
webLiveStatus,
|
|
323
304
|
webSettledLine,
|
|
324
305
|
withDebugDetail
|
|
325
|
-
} from "./chunk-
|
|
306
|
+
} from "./chunk-QZDNCVK4.js";
|
|
326
307
|
import {
|
|
327
308
|
openManagedWorktrees,
|
|
328
309
|
worktreeOpenHint
|
|
329
|
-
} from "./chunk-
|
|
330
|
-
import "./chunk-V6H2W6TZ.js";
|
|
310
|
+
} from "./chunk-4MDH3G7P.js";
|
|
331
311
|
import {
|
|
332
312
|
SAVE_SKILL_TOOL_NAME,
|
|
333
313
|
SKILL_CREATOR_SKILL,
|
|
@@ -351,28 +331,25 @@ import {
|
|
|
351
331
|
runTokens,
|
|
352
332
|
sandboxRunsShellUnasked,
|
|
353
333
|
settledElapsed
|
|
354
|
-
} from "./chunk-
|
|
355
|
-
import "./chunk-I3DHWG5M.js";
|
|
356
|
-
import "./chunk-PD2MTV6U.js";
|
|
334
|
+
} from "./chunk-AROJAFON.js";
|
|
357
335
|
import {
|
|
358
336
|
MCP_OUTPUT_CHARS,
|
|
359
337
|
boundedMcpText,
|
|
360
338
|
validatePromptArguments
|
|
361
|
-
} from "./chunk-
|
|
339
|
+
} from "./chunk-VDQQE3Q6.js";
|
|
362
340
|
import {
|
|
363
341
|
openInBrowser
|
|
364
|
-
} from "./chunk-
|
|
342
|
+
} from "./chunk-G2DGASUC.js";
|
|
343
|
+
import {
|
|
344
|
+
describeBrowserStatus
|
|
345
|
+
} from "./chunk-WHODOMXA.js";
|
|
365
346
|
import {
|
|
366
347
|
describePlainInterruption,
|
|
367
348
|
describeProviderWait,
|
|
368
349
|
describeProviderWaitClock,
|
|
369
350
|
isSelfMending,
|
|
370
351
|
isSpentAllowance
|
|
371
|
-
} from "./chunk-
|
|
372
|
-
import "./chunk-QZRV5EOA.js";
|
|
373
|
-
import {
|
|
374
|
-
describeBrowserStatus
|
|
375
|
-
} from "./chunk-WHODOMXA.js";
|
|
352
|
+
} from "./chunk-B4M4IEOE.js";
|
|
376
353
|
import {
|
|
377
354
|
PAUSED_TURN_LINES,
|
|
378
355
|
currentTimeLine,
|
|
@@ -381,7 +358,7 @@ import {
|
|
|
381
358
|
handoffContinuationNote,
|
|
382
359
|
refusalDetail,
|
|
383
360
|
retryAfterMs
|
|
384
|
-
} from "./chunk-
|
|
361
|
+
} from "./chunk-MPUHBR73.js";
|
|
385
362
|
import {
|
|
386
363
|
MAY_BE_LIMITED_WINDOW_MS,
|
|
387
364
|
accountProductName,
|
|
@@ -401,7 +378,7 @@ import {
|
|
|
401
378
|
permissionModeDescription,
|
|
402
379
|
permissionModeLabel,
|
|
403
380
|
permissionModeName
|
|
404
|
-
} from "./chunk-
|
|
381
|
+
} from "./chunk-KBLICB2N.js";
|
|
405
382
|
import {
|
|
406
383
|
expandTabs,
|
|
407
384
|
scriptText,
|
|
@@ -414,25 +391,23 @@ import {
|
|
|
414
391
|
loadSkillBody,
|
|
415
392
|
renderSkillRoster,
|
|
416
393
|
skillTierLabel
|
|
417
|
-
} from "./chunk-
|
|
418
|
-
import "./chunk-ZWA2JRJV.js";
|
|
419
|
-
import "./chunk-NUGPLXVK.js";
|
|
394
|
+
} from "./chunk-HAHNDC7N.js";
|
|
420
395
|
import {
|
|
421
396
|
beginSubscriptionLogin,
|
|
422
397
|
parsePastedInput
|
|
423
|
-
} from "./chunk-
|
|
398
|
+
} from "./chunk-O6QJXKWZ.js";
|
|
424
399
|
import {
|
|
425
400
|
apiKeyLogoutWord,
|
|
426
401
|
isApiKeyLogoutTarget
|
|
427
|
-
} from "./chunk-
|
|
402
|
+
} from "./chunk-GTRG5VXA.js";
|
|
428
403
|
import {
|
|
429
404
|
API_KEY_ACCOUNT_PROVIDERS,
|
|
430
405
|
openCliAccounts,
|
|
431
406
|
storedAccountSignedIn
|
|
432
|
-
} from "./chunk-
|
|
407
|
+
} from "./chunk-P6CNFKJC.js";
|
|
433
408
|
import {
|
|
434
409
|
beginCodexDeviceLogin
|
|
435
|
-
} from "./chunk-
|
|
410
|
+
} from "./chunk-LNIM2TS3.js";
|
|
436
411
|
import {
|
|
437
412
|
ConversationIndexRefreshError,
|
|
438
413
|
activeConversationTurn,
|
|
@@ -462,29 +437,25 @@ import {
|
|
|
462
437
|
typedTextOf,
|
|
463
438
|
unansweredReviewPark,
|
|
464
439
|
unarchiveConversation
|
|
465
|
-
} from "./chunk-
|
|
466
|
-
import "./chunk-XBZJBXQY.js";
|
|
467
|
-
import "./chunk-JQIBPPOL.js";
|
|
468
|
-
import "./chunk-GVXKT3BV.js";
|
|
440
|
+
} from "./chunk-W5IR3SD3.js";
|
|
469
441
|
import {
|
|
470
442
|
isTrusted,
|
|
471
443
|
trustDir
|
|
472
|
-
} from "./chunk-
|
|
444
|
+
} from "./chunk-JE2S7MW2.js";
|
|
473
445
|
import {
|
|
474
446
|
bindAccount,
|
|
475
447
|
findAccountByName,
|
|
476
448
|
isDefaultAccountId
|
|
477
|
-
} from "./chunk-
|
|
449
|
+
} from "./chunk-S4HDKI6L.js";
|
|
478
450
|
import {
|
|
479
451
|
startAutoUpdate
|
|
480
|
-
} from "./chunk-
|
|
481
|
-
import {
|
|
482
|
-
resolveNpmInvocation
|
|
483
|
-
} from "./chunk-GBIYC3OF.js";
|
|
452
|
+
} from "./chunk-DXFPBLQV.js";
|
|
484
453
|
import {
|
|
485
454
|
readManifest
|
|
486
455
|
} from "./chunk-AK2U3N2A.js";
|
|
487
|
-
import
|
|
456
|
+
import {
|
|
457
|
+
resolveNpmInvocation
|
|
458
|
+
} from "./chunk-MFRWOJCD.js";
|
|
488
459
|
import {
|
|
489
460
|
ScheduleConflictError,
|
|
490
461
|
confirmationHolds,
|
|
@@ -493,28 +464,25 @@ import {
|
|
|
493
464
|
findJob,
|
|
494
465
|
listJobs,
|
|
495
466
|
updateJob
|
|
496
|
-
} from "./chunk-
|
|
497
|
-
import {
|
|
498
|
-
schedulePaths
|
|
499
|
-
} from "./chunk-A22MBIYU.js";
|
|
467
|
+
} from "./chunk-JR6EFL7G.js";
|
|
500
468
|
import {
|
|
501
469
|
writeJsonAtomic
|
|
502
470
|
} from "./chunk-OEW7CJKK.js";
|
|
503
|
-
import
|
|
471
|
+
import {
|
|
472
|
+
schedulePaths
|
|
473
|
+
} from "./chunk-A22MBIYU.js";
|
|
504
474
|
import {
|
|
505
475
|
pinTrustedProjectPath,
|
|
506
476
|
resolveTrustedProjectContext
|
|
507
477
|
} from "./chunk-CHIEVVQ2.js";
|
|
508
|
-
import "./chunk-HE7WUOX2.js";
|
|
509
|
-
import {
|
|
510
|
-
debugRequested
|
|
511
|
-
} from "./chunk-GNBMKISG.js";
|
|
512
478
|
import {
|
|
513
479
|
describeCacheLifetime,
|
|
514
480
|
promptCacheTtl,
|
|
515
481
|
providerOffersCacheLifetime
|
|
516
|
-
} from "./chunk-
|
|
517
|
-
import
|
|
482
|
+
} from "./chunk-HSSTV5SF.js";
|
|
483
|
+
import {
|
|
484
|
+
debugRequested
|
|
485
|
+
} from "./chunk-GNBMKISG.js";
|
|
518
486
|
import {
|
|
519
487
|
COMPOSER_TRIGGER_DEFAULTS,
|
|
520
488
|
COMPOSER_TRIGGER_IDS,
|
|
@@ -544,19 +512,11 @@ import {
|
|
|
544
512
|
saveDecisionKey,
|
|
545
513
|
shouldOfferDecisionSetup,
|
|
546
514
|
writeConnection
|
|
547
|
-
} from "./chunk-
|
|
548
|
-
import "./chunk-KONYGNG6.js";
|
|
549
|
-
import "./chunk-LCGXWCVU.js";
|
|
550
|
-
import "./chunk-SDIFKDGI.js";
|
|
551
|
-
import {
|
|
552
|
-
contextLogging,
|
|
553
|
-
installCliLogging
|
|
554
|
-
} from "./chunk-NSIV6WEI.js";
|
|
515
|
+
} from "./chunk-3MUNYBIF.js";
|
|
555
516
|
import {
|
|
556
517
|
PROJECT_MCP_FILE,
|
|
557
518
|
parseMcpServerFile
|
|
558
519
|
} from "./chunk-SIG7WHBU.js";
|
|
559
|
-
import "./chunk-LVVD32KJ.js";
|
|
560
520
|
import {
|
|
561
521
|
displayPath,
|
|
562
522
|
formatSize,
|
|
@@ -568,20 +528,16 @@ import {
|
|
|
568
528
|
import {
|
|
569
529
|
THEME_CHOICES
|
|
570
530
|
} from "./chunk-QLDUL46Z.js";
|
|
571
|
-
import "./chunk-WMEZTDLT.js";
|
|
572
531
|
import {
|
|
573
532
|
isFullWidth,
|
|
574
533
|
isWide,
|
|
575
534
|
stringWidth,
|
|
576
535
|
stripAnsi
|
|
577
536
|
} from "./chunk-U5UV2YRE.js";
|
|
578
|
-
import {
|
|
579
|
-
EXIT_INTERNAL_ERROR
|
|
580
|
-
} from "./chunk-YMWHDGCW.js";
|
|
581
537
|
import {
|
|
582
538
|
primaryProvider,
|
|
583
539
|
writePreferences
|
|
584
|
-
} from "./chunk-
|
|
540
|
+
} from "./chunk-DE4WWSBB.js";
|
|
585
541
|
import {
|
|
586
542
|
automaticChoice,
|
|
587
543
|
automaticKind,
|
|
@@ -590,8 +546,7 @@ import {
|
|
|
590
546
|
discoverProviders,
|
|
591
547
|
hasApiCredential,
|
|
592
548
|
signedInSubscriptionProviders
|
|
593
|
-
} from "./chunk-
|
|
594
|
-
import "./chunk-4QIWRKJO.js";
|
|
549
|
+
} from "./chunk-VIJFICIC.js";
|
|
595
550
|
import {
|
|
596
551
|
ALL_PROVIDER_IDS,
|
|
597
552
|
PROVIDER_REGISTRY,
|
|
@@ -599,15 +554,10 @@ import {
|
|
|
599
554
|
providerEntriesOfVendor,
|
|
600
555
|
unsupportedProviderMessage
|
|
601
556
|
} from "./chunk-G6YSAHKC.js";
|
|
602
|
-
import "./chunk-KTPFUCRU.js";
|
|
603
|
-
import "./chunk-RI2KAZJO.js";
|
|
604
557
|
import {
|
|
605
558
|
isAnthropicOAuthToken,
|
|
606
559
|
readCodexCredentialFile
|
|
607
|
-
} from "./chunk-
|
|
608
|
-
import "./chunk-GMAPTJ3G.js";
|
|
609
|
-
import "./chunk-EPKNYAR5.js";
|
|
610
|
-
import "./chunk-JORONMD3.js";
|
|
560
|
+
} from "./chunk-H32MIHLE.js";
|
|
611
561
|
import {
|
|
612
562
|
apiKeysPath,
|
|
613
563
|
clearAllStoredApiKeys,
|
|
@@ -625,10 +575,10 @@ import {
|
|
|
625
575
|
readStoredSubscriptionCredential,
|
|
626
576
|
writeStoredApiKey,
|
|
627
577
|
writeStoredGeminiApiKey
|
|
628
|
-
} from "./chunk-
|
|
578
|
+
} from "./chunk-5HS5WIS3.js";
|
|
629
579
|
import {
|
|
630
580
|
namzuHomePath
|
|
631
|
-
} from "./chunk-
|
|
581
|
+
} from "./chunk-WWC6L5WC.js";
|
|
632
582
|
import {
|
|
633
583
|
ACCEPT_EDITS_TOOLS,
|
|
634
584
|
AccountRegistryError,
|
|
@@ -638,6 +588,8 @@ import {
|
|
|
638
588
|
DiskMessageFeedbackStore,
|
|
639
589
|
DiskSessionLog,
|
|
640
590
|
GoalRoundLimitError,
|
|
591
|
+
HAND_BACK_RECEIPT,
|
|
592
|
+
HAND_BACK_TOOL_NAME,
|
|
641
593
|
HostCommandRegistry,
|
|
642
594
|
MONITOR_TOOL_NAME,
|
|
643
595
|
NOOP_LOGGER,
|
|
@@ -652,6 +604,7 @@ import {
|
|
|
652
604
|
asSessionId,
|
|
653
605
|
buildScheduleTools,
|
|
654
606
|
buildSessionLoopTools,
|
|
607
|
+
compareAnswerToOutcome,
|
|
655
608
|
createAssistantMessage,
|
|
656
609
|
createRuntimeContextMessage,
|
|
657
610
|
createTempDir,
|
|
@@ -667,15 +620,14 @@ import {
|
|
|
667
620
|
hostTimeZone,
|
|
668
621
|
installedCommandShellForDialect,
|
|
669
622
|
isCompactionMessage,
|
|
670
|
-
jsonLinesSink,
|
|
671
623
|
kernelHostCommands,
|
|
672
624
|
mustAskPerson,
|
|
673
625
|
nextFireTime,
|
|
674
626
|
parseAccountId,
|
|
627
|
+
parseHandBack,
|
|
675
628
|
parseScheduleSpec,
|
|
676
629
|
parseTurnOutcome,
|
|
677
630
|
parseWorkflowMeta,
|
|
678
|
-
prettySink,
|
|
679
631
|
resolveBoundAccount,
|
|
680
632
|
resolveNamzuHome,
|
|
681
633
|
resolveTriggerThreshold,
|
|
@@ -685,7 +637,7 @@ import {
|
|
|
685
637
|
validateTimeZone,
|
|
686
638
|
wakeBudgetFromEnv,
|
|
687
639
|
wrapUntrusted
|
|
688
|
-
} from "./chunk-
|
|
640
|
+
} from "./chunk-EK74R563.js";
|
|
689
641
|
import {
|
|
690
642
|
__commonJS,
|
|
691
643
|
__export,
|
|
@@ -2563,8 +2515,8 @@ var require_react_reconciler_production = __commonJS({
|
|
|
2563
2515
|
currentEntangledActionThenable = {
|
|
2564
2516
|
status: "pending",
|
|
2565
2517
|
value: void 0,
|
|
2566
|
-
then: /* @__PURE__ */ __name(function(
|
|
2567
|
-
entangledListeners.push(
|
|
2518
|
+
then: /* @__PURE__ */ __name(function(resolve9) {
|
|
2519
|
+
entangledListeners.push(resolve9);
|
|
2568
2520
|
}, "then")
|
|
2569
2521
|
};
|
|
2570
2522
|
}
|
|
@@ -2589,8 +2541,8 @@ var require_react_reconciler_production = __commonJS({
|
|
|
2589
2541
|
status: "pending",
|
|
2590
2542
|
value: null,
|
|
2591
2543
|
reason: null,
|
|
2592
|
-
then: /* @__PURE__ */ __name(function(
|
|
2593
|
-
listeners.push(
|
|
2544
|
+
then: /* @__PURE__ */ __name(function(resolve9) {
|
|
2545
|
+
listeners.push(resolve9);
|
|
2594
2546
|
}, "then")
|
|
2595
2547
|
};
|
|
2596
2548
|
thenable.then(
|
|
@@ -9234,14 +9186,14 @@ var require_react_reconciler_production = __commonJS({
|
|
|
9234
9186
|
__name(markRetryLaneIfNotHydrated, "markRetryLaneIfNotHydrated");
|
|
9235
9187
|
var exports2 = {};
|
|
9236
9188
|
"use strict";
|
|
9237
|
-
var
|
|
9189
|
+
var React11 = require_react(), Scheduler2 = require_scheduler(), assign = Object.assign, REACT_LEGACY_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.element"), REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo"), REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
|
|
9238
9190
|
/* @__PURE__ */ Symbol.for("react.scope");
|
|
9239
9191
|
var REACT_ACTIVITY_TYPE = /* @__PURE__ */ Symbol.for("react.activity");
|
|
9240
9192
|
/* @__PURE__ */ Symbol.for("react.legacy_hidden");
|
|
9241
9193
|
/* @__PURE__ */ Symbol.for("react.tracing_marker");
|
|
9242
9194
|
var REACT_MEMO_CACHE_SENTINEL = /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel");
|
|
9243
9195
|
/* @__PURE__ */ Symbol.for("react.view_transition");
|
|
9244
|
-
var MAYBE_ITERATOR_SYMBOL = Symbol.iterator, REACT_CLIENT_REFERENCE = /* @__PURE__ */ Symbol.for("react.client.reference"), isArrayImpl = Array.isArray, ReactSharedInternals =
|
|
9196
|
+
var MAYBE_ITERATOR_SYMBOL = Symbol.iterator, REACT_CLIENT_REFERENCE = /* @__PURE__ */ Symbol.for("react.client.reference"), isArrayImpl = Array.isArray, ReactSharedInternals = React11.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, rendererVersion = $$$config.rendererVersion, rendererPackageName = $$$config.rendererPackageName, extraDevToolsConfig = $$$config.extraDevToolsConfig, getPublicInstance = $$$config.getPublicInstance, getRootHostContext = $$$config.getRootHostContext, getChildHostContext = $$$config.getChildHostContext, prepareForCommit = $$$config.prepareForCommit, resetAfterCommit = $$$config.resetAfterCommit, createInstance = $$$config.createInstance;
|
|
9245
9197
|
$$$config.cloneMutableInstance;
|
|
9246
9198
|
var appendInitialChild = $$$config.appendInitialChild, finalizeInitialChildren = $$$config.finalizeInitialChildren, shouldSetTextContent = $$$config.shouldSetTextContent, createTextInstance = $$$config.createTextInstance;
|
|
9247
9199
|
$$$config.cloneMutableTextInstance;
|
|
@@ -12631,8 +12583,8 @@ var require_react_reconciler_development = __commonJS({
|
|
|
12631
12583
|
currentEntangledActionThenable = {
|
|
12632
12584
|
status: "pending",
|
|
12633
12585
|
value: void 0,
|
|
12634
|
-
then: /* @__PURE__ */ __name(function(
|
|
12635
|
-
entangledListeners.push(
|
|
12586
|
+
then: /* @__PURE__ */ __name(function(resolve9) {
|
|
12587
|
+
entangledListeners.push(resolve9);
|
|
12636
12588
|
}, "then")
|
|
12637
12589
|
};
|
|
12638
12590
|
}
|
|
@@ -12657,8 +12609,8 @@ var require_react_reconciler_development = __commonJS({
|
|
|
12657
12609
|
status: "pending",
|
|
12658
12610
|
value: null,
|
|
12659
12611
|
reason: null,
|
|
12660
|
-
then: /* @__PURE__ */ __name(function(
|
|
12661
|
-
listeners.push(
|
|
12612
|
+
then: /* @__PURE__ */ __name(function(resolve9) {
|
|
12613
|
+
listeners.push(resolve9);
|
|
12662
12614
|
}, "then")
|
|
12663
12615
|
};
|
|
12664
12616
|
thenable.then(
|
|
@@ -22347,14 +22299,14 @@ var require_react_reconciler_development = __commonJS({
|
|
|
22347
22299
|
__name(getCurrentFiberForDevTools, "getCurrentFiberForDevTools");
|
|
22348
22300
|
var exports2 = {};
|
|
22349
22301
|
"use strict";
|
|
22350
|
-
var
|
|
22302
|
+
var React11 = require_react(), Scheduler2 = require_scheduler(), assign = Object.assign, REACT_LEGACY_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.element"), REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo"), REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
|
|
22351
22303
|
/* @__PURE__ */ Symbol.for("react.scope");
|
|
22352
22304
|
var REACT_ACTIVITY_TYPE = /* @__PURE__ */ Symbol.for("react.activity");
|
|
22353
22305
|
/* @__PURE__ */ Symbol.for("react.legacy_hidden");
|
|
22354
22306
|
/* @__PURE__ */ Symbol.for("react.tracing_marker");
|
|
22355
22307
|
var REACT_MEMO_CACHE_SENTINEL = /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel");
|
|
22356
22308
|
/* @__PURE__ */ Symbol.for("react.view_transition");
|
|
22357
|
-
var MAYBE_ITERATOR_SYMBOL = Symbol.iterator, REACT_CLIENT_REFERENCE = /* @__PURE__ */ Symbol.for("react.client.reference"), isArrayImpl = Array.isArray, ReactSharedInternals =
|
|
22309
|
+
var MAYBE_ITERATOR_SYMBOL = Symbol.iterator, REACT_CLIENT_REFERENCE = /* @__PURE__ */ Symbol.for("react.client.reference"), isArrayImpl = Array.isArray, ReactSharedInternals = React11.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, rendererVersion = $$$config.rendererVersion, rendererPackageName = $$$config.rendererPackageName, extraDevToolsConfig = $$$config.extraDevToolsConfig, getPublicInstance = $$$config.getPublicInstance, getRootHostContext = $$$config.getRootHostContext, getChildHostContext = $$$config.getChildHostContext, prepareForCommit = $$$config.prepareForCommit, resetAfterCommit = $$$config.resetAfterCommit, createInstance = $$$config.createInstance;
|
|
22358
22310
|
$$$config.cloneMutableInstance;
|
|
22359
22311
|
var appendInitialChild = $$$config.appendInitialChild, finalizeInitialChildren = $$$config.finalizeInitialChildren, shouldSetTextContent = $$$config.shouldSetTextContent, createTextInstance = $$$config.createTextInstance;
|
|
22360
22312
|
$$$config.cloneMutableTextInstance;
|
|
@@ -24904,18 +24856,18 @@ var require_react_jsx_runtime_development = __commonJS({
|
|
|
24904
24856
|
return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
24905
24857
|
}
|
|
24906
24858
|
__name(isValidElement, "isValidElement");
|
|
24907
|
-
var
|
|
24859
|
+
var React11 = require_react(), REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo"), REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = /* @__PURE__ */ Symbol.for("react.activity"), REACT_CLIENT_REFERENCE = /* @__PURE__ */ Symbol.for("react.client.reference"), ReactSharedInternals = React11.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, hasOwnProperty = Object.prototype.hasOwnProperty, isArrayImpl = Array.isArray, createTask = console.createTask ? console.createTask : function() {
|
|
24908
24860
|
return null;
|
|
24909
24861
|
};
|
|
24910
|
-
|
|
24862
|
+
React11 = {
|
|
24911
24863
|
react_stack_bottom_frame: /* @__PURE__ */ __name(function(callStackForError) {
|
|
24912
24864
|
return callStackForError();
|
|
24913
24865
|
}, "react_stack_bottom_frame")
|
|
24914
24866
|
};
|
|
24915
24867
|
var specialPropKeyWarningShown;
|
|
24916
24868
|
var didWarnAboutElementRef = {};
|
|
24917
|
-
var unknownOwnerDebugStack =
|
|
24918
|
-
|
|
24869
|
+
var unknownOwnerDebugStack = React11.react_stack_bottom_frame.bind(
|
|
24870
|
+
React11,
|
|
24919
24871
|
UnknownOwner
|
|
24920
24872
|
)();
|
|
24921
24873
|
var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
|
|
@@ -24959,9 +24911,6 @@ var require_jsx_runtime = __commonJS({
|
|
|
24959
24911
|
}
|
|
24960
24912
|
});
|
|
24961
24913
|
|
|
24962
|
-
// src/tui/index.tsx
|
|
24963
|
-
import { resolve as resolve9 } from "node:path";
|
|
24964
|
-
|
|
24965
24914
|
// ../../node_modules/.pnpm/ink@7.0.3_@types+react@19.2.15_react@19.2.6/node_modules/ink/build/render.js
|
|
24966
24915
|
import { Stream } from "node:stream";
|
|
24967
24916
|
import process13 from "node:process";
|
|
@@ -32599,8 +32548,8 @@ var kittyModifiers = {
|
|
|
32599
32548
|
var noop = /* @__PURE__ */ __name(() => {
|
|
32600
32549
|
}, "noop");
|
|
32601
32550
|
var textEncoder = new TextEncoder();
|
|
32602
|
-
var yieldImmediate = /* @__PURE__ */ __name(async () => new Promise((
|
|
32603
|
-
setImmediate(
|
|
32551
|
+
var yieldImmediate = /* @__PURE__ */ __name(async () => new Promise((resolve9) => {
|
|
32552
|
+
setImmediate(resolve9);
|
|
32604
32553
|
}), "yieldImmediate");
|
|
32605
32554
|
var kittyQueryEscapeByte = 27;
|
|
32606
32555
|
var kittyQueryOpenBracketByte = 91;
|
|
@@ -32808,8 +32757,8 @@ var Ink = class {
|
|
|
32808
32757
|
};
|
|
32809
32758
|
}
|
|
32810
32759
|
this.initKittyKeyboard();
|
|
32811
|
-
this.exitPromise = new Promise((
|
|
32812
|
-
this.resolveExitPromise =
|
|
32760
|
+
this.exitPromise = new Promise((resolve9, reject) => {
|
|
32761
|
+
this.resolveExitPromise = resolve9;
|
|
32813
32762
|
this.rejectExitPromise = reject;
|
|
32814
32763
|
});
|
|
32815
32764
|
void this.exitPromise.catch(noop);
|
|
@@ -33106,9 +33055,9 @@ var Ink = class {
|
|
|
33106
33055
|
settleThrottle(this.throttledOnRender, canWriteToStdout);
|
|
33107
33056
|
settleThrottle(this.throttledLog, canWriteToStdout);
|
|
33108
33057
|
if (canWriteToStdout && hasWritableState) {
|
|
33109
|
-
await new Promise((
|
|
33058
|
+
await new Promise((resolve9) => {
|
|
33110
33059
|
this.options.stdout.write("", () => {
|
|
33111
|
-
|
|
33060
|
+
resolve9();
|
|
33112
33061
|
});
|
|
33113
33062
|
});
|
|
33114
33063
|
return;
|
|
@@ -33175,8 +33124,8 @@ var Ink = class {
|
|
|
33175
33124
|
async awaitNextRender() {
|
|
33176
33125
|
if (!this.nextRenderCommit) {
|
|
33177
33126
|
let resolveRender;
|
|
33178
|
-
const promise = new Promise((
|
|
33179
|
-
resolveRender =
|
|
33127
|
+
const promise = new Promise((resolve9) => {
|
|
33128
|
+
resolveRender = resolve9;
|
|
33180
33129
|
});
|
|
33181
33130
|
this.nextRenderCommit = { promise, resolve: resolveRender };
|
|
33182
33131
|
}
|
|
@@ -34097,8 +34046,43 @@ var measureElement = /* @__PURE__ */ __name((node) => ({
|
|
|
34097
34046
|
}), "measureElement");
|
|
34098
34047
|
var measure_element_default = measureElement;
|
|
34099
34048
|
|
|
34100
|
-
// src/tui/
|
|
34101
|
-
var
|
|
34049
|
+
// src/tui/terminal-focus.ts
|
|
34050
|
+
var import_react34 = __toESM(require_react(), 1);
|
|
34051
|
+
function createTerminalFocus(now = Date.now) {
|
|
34052
|
+
let state = "unknown";
|
|
34053
|
+
let gainedAt = 0;
|
|
34054
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
34055
|
+
const emit = /* @__PURE__ */ __name(() => {
|
|
34056
|
+
for (const listener of [...listeners]) listener();
|
|
34057
|
+
}, "emit");
|
|
34058
|
+
const set = /* @__PURE__ */ __name((focused) => {
|
|
34059
|
+
if (focused) gainedAt = now();
|
|
34060
|
+
if (!focused && state === "blurred") return;
|
|
34061
|
+
state = focused ? "focused" : "blurred";
|
|
34062
|
+
emit();
|
|
34063
|
+
}, "set");
|
|
34064
|
+
return {
|
|
34065
|
+
state: /* @__PURE__ */ __name(() => state, "state"),
|
|
34066
|
+
isFocused: /* @__PURE__ */ __name(() => state !== "blurred", "isFocused"),
|
|
34067
|
+
gainedAt: /* @__PURE__ */ __name(() => gainedAt, "gainedAt"),
|
|
34068
|
+
set,
|
|
34069
|
+
noteInput: /* @__PURE__ */ __name(() => {
|
|
34070
|
+
if (state === "blurred") set(true);
|
|
34071
|
+
}, "noteInput"),
|
|
34072
|
+
subscribe: /* @__PURE__ */ __name((listener) => {
|
|
34073
|
+
listeners.add(listener);
|
|
34074
|
+
return () => {
|
|
34075
|
+
listeners.delete(listener);
|
|
34076
|
+
};
|
|
34077
|
+
}, "subscribe")
|
|
34078
|
+
};
|
|
34079
|
+
}
|
|
34080
|
+
__name(createTerminalFocus, "createTerminalFocus");
|
|
34081
|
+
var terminalFocus = createTerminalFocus();
|
|
34082
|
+
function useTerminalFocused(store = terminalFocus) {
|
|
34083
|
+
return (0, import_react34.useSyncExternalStore)(store.subscribe, store.isFocused, store.isFocused);
|
|
34084
|
+
}
|
|
34085
|
+
__name(useTerminalFocused, "useTerminalFocused");
|
|
34102
34086
|
|
|
34103
34087
|
// src/tui/App.tsx
|
|
34104
34088
|
import { existsSync as existsSync4, rmSync as rmSync2 } from "node:fs";
|
|
@@ -34172,7 +34156,7 @@ function goalRoundHeadline(round, max) {
|
|
|
34172
34156
|
__name(goalRoundHeadline, "goalRoundHeadline");
|
|
34173
34157
|
|
|
34174
34158
|
// src/tui/AgentExplorer.tsx
|
|
34175
|
-
var
|
|
34159
|
+
var import_react35 = __toESM(require_react(), 1);
|
|
34176
34160
|
|
|
34177
34161
|
// src/tui/key-hints.ts
|
|
34178
34162
|
function boxedHintWidth(columns) {
|
|
@@ -34557,22 +34541,22 @@ function workflowRowVariants(workflow, now) {
|
|
|
34557
34541
|
const spent = workflow.tokens === void 0 ? void 0 : formatCompactCount(workflow.tokens);
|
|
34558
34542
|
const tokens = spent && `\u2193 ${spent} tokens`;
|
|
34559
34543
|
const warning = workflow.large ? LARGE_WORKFLOW_WARNING : void 0;
|
|
34560
|
-
const
|
|
34544
|
+
const join11 = /* @__PURE__ */ __name((parts) => parts.filter((part) => part !== void 0).join(" \xB7 "), "join");
|
|
34561
34545
|
const [wide, ...narrower] = WORKFLOW_BAR_WIDTHS;
|
|
34562
34546
|
const few = WORKFLOW_BAR_WIDTHS[WORKFLOW_BAR_WIDTHS.length - 1];
|
|
34563
34547
|
const variants = [
|
|
34564
34548
|
...railPhaseTexts(workflow.runningPhases).map((phases) => ({
|
|
34565
34549
|
barWidth: wide,
|
|
34566
|
-
text:
|
|
34550
|
+
text: join11([count2, elapsed2, tokens, warning, phases])
|
|
34567
34551
|
})),
|
|
34568
|
-
{ barWidth: wide, text:
|
|
34552
|
+
{ barWidth: wide, text: join11([count2, elapsed2, tokens, warning]) },
|
|
34569
34553
|
...narrower.map((barWidth) => ({
|
|
34570
34554
|
barWidth,
|
|
34571
|
-
text:
|
|
34555
|
+
text: join11([count2, elapsed2, tokens, warning])
|
|
34572
34556
|
})),
|
|
34573
|
-
{ barWidth: few, text:
|
|
34574
|
-
{ barWidth: few, text:
|
|
34575
|
-
{ barWidth: 0, text:
|
|
34557
|
+
{ barWidth: few, text: join11([count2, elapsed2, warning]) },
|
|
34558
|
+
{ barWidth: few, text: join11([count2, elapsed2]) },
|
|
34559
|
+
{ barWidth: 0, text: join11([count2, elapsed2]) },
|
|
34576
34560
|
{ barWidth: 0, text: count2 }
|
|
34577
34561
|
];
|
|
34578
34562
|
return variants.filter(
|
|
@@ -35140,7 +35124,7 @@ function WorkflowDetail({
|
|
|
35140
35124
|
const index = phaseWindow.start + offset;
|
|
35141
35125
|
const active = index === selectedPhaseIndex;
|
|
35142
35126
|
const glyph = phaseGlyph(item, index);
|
|
35143
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
35127
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react35.Fragment, { children: [
|
|
35144
35128
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Box_default, { children: [
|
|
35145
35129
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Box_default, { width: 2, flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { color: theme.accent.assistant, children: active ? "\u276F" : " " }) }),
|
|
35146
35130
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Box_default, { width: 3, flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { color: glyph.color, children: glyph.text }) }),
|
|
@@ -35798,8 +35782,8 @@ function rowColor(row2) {
|
|
|
35798
35782
|
}
|
|
35799
35783
|
__name(rowColor, "rowColor");
|
|
35800
35784
|
function useLiveNow(active) {
|
|
35801
|
-
const [now, setNow] = (0,
|
|
35802
|
-
(0,
|
|
35785
|
+
const [now, setNow] = (0, import_react35.useState)(() => Date.now());
|
|
35786
|
+
(0, import_react35.useEffect)(() => {
|
|
35803
35787
|
if (!active) return;
|
|
35804
35788
|
const timer = setInterval(() => setNow(Date.now()), 1e3);
|
|
35805
35789
|
timer.unref?.();
|
|
@@ -35810,7 +35794,7 @@ function useLiveNow(active) {
|
|
|
35810
35794
|
__name(useLiveNow, "useLiveNow");
|
|
35811
35795
|
|
|
35812
35796
|
// src/tui/LiveActivity.tsx
|
|
35813
|
-
var
|
|
35797
|
+
var import_react37 = __toESM(require_react(), 1);
|
|
35814
35798
|
|
|
35815
35799
|
// src/tui/foreground-handoff.ts
|
|
35816
35800
|
function backgroundHint(env3 = process.env) {
|
|
@@ -36028,7 +36012,7 @@ function blendTowardStall(base, amount) {
|
|
|
36028
36012
|
__name(blendTowardStall, "blendTowardStall");
|
|
36029
36013
|
|
|
36030
36014
|
// src/tui/thinking-label.ts
|
|
36031
|
-
var
|
|
36015
|
+
var import_react36 = __toESM(require_react(), 1);
|
|
36032
36016
|
var STILL_AFTER_MS = 1e4;
|
|
36033
36017
|
var MORE_AFTER_MS = 2e4;
|
|
36034
36018
|
var SOME_MORE_AFTER_MS = 3e4;
|
|
@@ -36047,11 +36031,11 @@ function thoughtForLabel(ms) {
|
|
|
36047
36031
|
}
|
|
36048
36032
|
__name(thoughtForLabel, "thoughtForLabel");
|
|
36049
36033
|
function useThinkingRow(reasoning, active) {
|
|
36050
|
-
const state = (0,
|
|
36034
|
+
const state = (0, import_react36.useRef)({
|
|
36051
36035
|
start: null,
|
|
36052
36036
|
settled: null
|
|
36053
36037
|
});
|
|
36054
|
-
const [, redraw] = (0,
|
|
36038
|
+
const [, redraw] = (0, import_react36.useState)(0);
|
|
36055
36039
|
const now = Date.now();
|
|
36056
36040
|
const s = state.current;
|
|
36057
36041
|
if (!active) {
|
|
@@ -36066,7 +36050,7 @@ function useThinkingRow(reasoning, active) {
|
|
|
36066
36050
|
}
|
|
36067
36051
|
if (s.settled !== null && now >= s.settled.until) s.settled = null;
|
|
36068
36052
|
const until = s.settled?.until ?? null;
|
|
36069
|
-
(0,
|
|
36053
|
+
(0, import_react36.useEffect)(() => {
|
|
36070
36054
|
if (until === null) return;
|
|
36071
36055
|
const timer = setTimeout(() => redraw((n) => n + 1), Math.max(0, until - Date.now()));
|
|
36072
36056
|
return () => clearTimeout(timer);
|
|
@@ -36081,8 +36065,8 @@ __name(useThinkingRow, "useThinkingRow");
|
|
|
36081
36065
|
// src/tui/LiveActivity.tsx
|
|
36082
36066
|
var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
|
|
36083
36067
|
function useSecondTick(active) {
|
|
36084
|
-
const [, setTick] = (0,
|
|
36085
|
-
(0,
|
|
36068
|
+
const [, setTick] = (0, import_react37.useState)(0);
|
|
36069
|
+
(0, import_react37.useEffect)(() => {
|
|
36086
36070
|
if (!active) return;
|
|
36087
36071
|
const timer = setInterval(() => setTick((n) => n + 1), 1e3);
|
|
36088
36072
|
return () => clearInterval(timer);
|
|
@@ -36111,8 +36095,8 @@ function LiveActivity({
|
|
|
36111
36095
|
useReducedMotion();
|
|
36112
36096
|
const motion = animate && stdout.isTTY === true && !screenReader && motionAllowed();
|
|
36113
36097
|
const active = activeTools.length > 0 || working;
|
|
36114
|
-
const startedAtRef = (0,
|
|
36115
|
-
const pausedRef = (0,
|
|
36098
|
+
const startedAtRef = (0, import_react37.useRef)(null);
|
|
36099
|
+
const pausedRef = (0, import_react37.useRef)({ total: 0, since: null });
|
|
36116
36100
|
if (active && startedAtRef.current === null) {
|
|
36117
36101
|
startedAtRef.current = Date.now();
|
|
36118
36102
|
pausedRef.current = { total: 0, since: null };
|
|
@@ -36125,7 +36109,7 @@ function LiveActivity({
|
|
|
36125
36109
|
pausedRef.current.since = null;
|
|
36126
36110
|
}
|
|
36127
36111
|
useSecondTick(waitNotice?.retryAt !== void 0);
|
|
36128
|
-
const progressRef = (0,
|
|
36112
|
+
const progressRef = (0, import_react37.useRef)({
|
|
36129
36113
|
key: "",
|
|
36130
36114
|
at: Date.now(),
|
|
36131
36115
|
stall: 0,
|
|
@@ -37903,7 +37887,7 @@ function BackgroundJobsPanel({
|
|
|
37903
37887
|
__name(BackgroundJobsPanel, "BackgroundJobsPanel");
|
|
37904
37888
|
|
|
37905
37889
|
// src/tui/ProviderSetup.tsx
|
|
37906
|
-
var
|
|
37890
|
+
var import_react38 = __toESM(require_react(), 1);
|
|
37907
37891
|
|
|
37908
37892
|
// src/integrations/providers/setup.ts
|
|
37909
37893
|
import { execFile, spawn } from "node:child_process";
|
|
@@ -37964,7 +37948,7 @@ function versionFromProbe(output) {
|
|
|
37964
37948
|
__name(versionFromProbe, "versionFromProbe");
|
|
37965
37949
|
function runSetupCommand(command, args, options) {
|
|
37966
37950
|
options.signal.throwIfAborted();
|
|
37967
|
-
return new Promise((
|
|
37951
|
+
return new Promise((resolve9, reject) => {
|
|
37968
37952
|
const invocation = resolveNpmInvocation(command, args);
|
|
37969
37953
|
const child = spawn(invocation.executable, [...invocation.args], {
|
|
37970
37954
|
cwd: options.cwd,
|
|
@@ -38035,7 +38019,7 @@ function runSetupCommand(command, args, options) {
|
|
|
38035
38019
|
options.signal.removeEventListener("abort", stop);
|
|
38036
38020
|
void (stopCompletion ?? Promise.resolve()).then(() => {
|
|
38037
38021
|
if (stopError) reject(stopError);
|
|
38038
|
-
else
|
|
38022
|
+
else resolve9({ code: stopped ? null : code, output, missing });
|
|
38039
38023
|
});
|
|
38040
38024
|
}, "finish");
|
|
38041
38025
|
child.on("error", (error) => {
|
|
@@ -38125,19 +38109,19 @@ function ProviderSetup({
|
|
|
38125
38109
|
onConnect
|
|
38126
38110
|
}) {
|
|
38127
38111
|
const terminal = use_window_size_default();
|
|
38128
|
-
const [rows, setRows] = (0,
|
|
38129
|
-
const [selected, setSelected] = (0,
|
|
38130
|
-
const [confirm, setConfirm] = (0,
|
|
38131
|
-
const [busy, setBusy] = (0,
|
|
38132
|
-
const [output, setOutput] = (0,
|
|
38133
|
-
const lifetime2 = (0,
|
|
38134
|
-
const operation = (0,
|
|
38112
|
+
const [rows, setRows] = (0, import_react38.useState)([]);
|
|
38113
|
+
const [selected, setSelected] = (0, import_react38.useState)(0);
|
|
38114
|
+
const [confirm, setConfirm] = (0, import_react38.useState)(false);
|
|
38115
|
+
const [busy, setBusy] = (0, import_react38.useState)(true);
|
|
38116
|
+
const [output, setOutput] = (0, import_react38.useState)("Checking installations and credential sources\u2026");
|
|
38117
|
+
const lifetime2 = (0, import_react38.useRef)(null);
|
|
38118
|
+
const operation = (0, import_react38.useRef)(null);
|
|
38135
38119
|
const refresh = /* @__PURE__ */ __name(async (signal) => {
|
|
38136
38120
|
const detected = await discoverProviders({ skipProbes: true });
|
|
38137
38121
|
const next = await probeHarnesses(detected, cwd2, signal);
|
|
38138
38122
|
if (!signal.aborted) setRows(next);
|
|
38139
38123
|
}, "refresh");
|
|
38140
|
-
(0,
|
|
38124
|
+
(0, import_react38.useEffect)(() => {
|
|
38141
38125
|
const controller = new AbortController();
|
|
38142
38126
|
lifetime2.current = controller;
|
|
38143
38127
|
void refresh(controller.signal).then(() => {
|
|
@@ -38273,16 +38257,18 @@ function ProviderSetup({
|
|
|
38273
38257
|
__name(ProviderSetup, "ProviderSetup");
|
|
38274
38258
|
|
|
38275
38259
|
// src/tui/TranscriptScreen.tsx
|
|
38276
|
-
var
|
|
38260
|
+
var import_react42 = __toESM(require_react(), 1);
|
|
38277
38261
|
|
|
38278
38262
|
// src/tui/Markdown.tsx
|
|
38279
|
-
var
|
|
38263
|
+
var import_react39 = __toESM(require_react(), 1);
|
|
38280
38264
|
|
|
38281
38265
|
// src/tui/markdownParser.ts
|
|
38282
38266
|
var FENCE = /^```(\w*)\s*$/;
|
|
38283
38267
|
var HEADING = /^(#{1,6})\s+(.+?)\s*#*$/;
|
|
38284
38268
|
var BULLET = /^(\s*)([-*+]|\d+[.)])\s+(.+)$/;
|
|
38285
|
-
var BLOCKQUOTE = /^\s
|
|
38269
|
+
var BLOCKQUOTE = /^\s*>/;
|
|
38270
|
+
var QUOTE_MARK = /^\s*>[ \t]?/;
|
|
38271
|
+
var RULE = /^\s*(?:(?:-[ \t]*){3,}|(?:\*[ \t]*){3,}|(?:_[ \t]*){3,})$/;
|
|
38286
38272
|
var TABLE_ROW = /^\s*\|.*\|\s*$/;
|
|
38287
38273
|
var TABLE_SEP = /^\s*\|?[\s:|-]*-[\s:|-]*\|?\s*$/;
|
|
38288
38274
|
function tableCells(line) {
|
|
@@ -38305,10 +38291,12 @@ function continuesTable(line) {
|
|
|
38305
38291
|
return line.includes("|") && line.trim().length > 0 && !FENCE.test(line) && !HEADING.test(line) && !BULLET.test(line) && !BLOCKQUOTE.test(line);
|
|
38306
38292
|
}
|
|
38307
38293
|
__name(continuesTable, "continuesTable");
|
|
38308
|
-
function classify(line, next) {
|
|
38294
|
+
function classify(line, next, terminated) {
|
|
38309
38295
|
if (FENCE.test(line)) return "code";
|
|
38310
38296
|
if (TABLE_ROW.test(line) && next !== void 0 && TABLE_SEP.test(next)) return "table";
|
|
38311
38297
|
if (HEADING.test(line)) return "heading";
|
|
38298
|
+
if (terminated && RULE.test(line)) return "rule";
|
|
38299
|
+
if (BLOCKQUOTE.test(line)) return "quote";
|
|
38312
38300
|
if (BULLET.test(line)) return "bullet";
|
|
38313
38301
|
if (line.trim().length === 0) return "blank";
|
|
38314
38302
|
return "text";
|
|
@@ -38320,7 +38308,7 @@ function scanBlocks(src) {
|
|
|
38320
38308
|
let i = 0;
|
|
38321
38309
|
while (i < lines2.length) {
|
|
38322
38310
|
const line = lines2[i] ?? "";
|
|
38323
|
-
switch (classify(line, lines2[i + 1])) {
|
|
38311
|
+
switch (classify(line, lines2[i + 1], i < lines2.length - 1)) {
|
|
38324
38312
|
case "blank":
|
|
38325
38313
|
i++;
|
|
38326
38314
|
break;
|
|
@@ -38339,6 +38327,18 @@ function scanBlocks(src) {
|
|
|
38339
38327
|
i = end;
|
|
38340
38328
|
break;
|
|
38341
38329
|
}
|
|
38330
|
+
case "quote": {
|
|
38331
|
+
let end = i;
|
|
38332
|
+
while (end < lines2.length && BLOCKQUOTE.test(lines2[end] ?? "")) end++;
|
|
38333
|
+
segments.push(lines2.slice(i, end).join("\n"));
|
|
38334
|
+
i = end;
|
|
38335
|
+
break;
|
|
38336
|
+
}
|
|
38337
|
+
case "rule":
|
|
38338
|
+
segments.push(`${line}
|
|
38339
|
+
`);
|
|
38340
|
+
i++;
|
|
38341
|
+
break;
|
|
38342
38342
|
case "heading":
|
|
38343
38343
|
case "bullet":
|
|
38344
38344
|
segments.push(line);
|
|
@@ -38346,7 +38346,8 @@ function scanBlocks(src) {
|
|
|
38346
38346
|
break;
|
|
38347
38347
|
default: {
|
|
38348
38348
|
let end = i;
|
|
38349
|
-
while (end < lines2.length && classify(lines2[end] ?? "", lines2[end + 1]) === "text")
|
|
38349
|
+
while (end < lines2.length && classify(lines2[end] ?? "", lines2[end + 1], end < lines2.length - 1) === "text")
|
|
38350
|
+
end++;
|
|
38350
38351
|
segments.push(lines2.slice(i, end).join("\n"));
|
|
38351
38352
|
i = end;
|
|
38352
38353
|
break;
|
|
@@ -38359,7 +38360,7 @@ __name(scanBlocks, "scanBlocks");
|
|
|
38359
38360
|
function parseBlock(raw) {
|
|
38360
38361
|
const lines2 = raw.split("\n");
|
|
38361
38362
|
const first = lines2[0] ?? "";
|
|
38362
|
-
switch (classify(first, lines2[1])) {
|
|
38363
|
+
switch (classify(first, lines2[1], lines2.length > 1)) {
|
|
38363
38364
|
case "code": {
|
|
38364
38365
|
const lang = FENCE.exec(first)?.[1];
|
|
38365
38366
|
const closed = FENCE.test(lines2[lines2.length - 1] ?? "");
|
|
@@ -38382,6 +38383,13 @@ function parseBlock(raw) {
|
|
|
38382
38383
|
const heading = HEADING.exec(first);
|
|
38383
38384
|
return { type: "heading", level: heading?.[1]?.length ?? 1, text: heading?.[2] ?? "" };
|
|
38384
38385
|
}
|
|
38386
|
+
case "rule":
|
|
38387
|
+
return { type: "rule" };
|
|
38388
|
+
case "quote":
|
|
38389
|
+
return {
|
|
38390
|
+
type: "quote",
|
|
38391
|
+
blocks: parseMarkdown(lines2.map((l) => l.replace(QUOTE_MARK, "")).join("\n"))
|
|
38392
|
+
};
|
|
38385
38393
|
case "bullet": {
|
|
38386
38394
|
const bullet = BULLET.exec(first);
|
|
38387
38395
|
const rawMarker = bullet?.[2] ?? "-";
|
|
@@ -38456,6 +38464,22 @@ function createBlockCache() {
|
|
|
38456
38464
|
}
|
|
38457
38465
|
__name(createBlockCache, "createBlockCache");
|
|
38458
38466
|
|
|
38467
|
+
// src/tui/markdown-structure.ts
|
|
38468
|
+
function headingStyle(level) {
|
|
38469
|
+
if (level <= 1) return { color: "accent", underline: true };
|
|
38470
|
+
if (level === 2) return { color: "accent", underline: false };
|
|
38471
|
+
if (level === 3) return { color: "body", underline: false };
|
|
38472
|
+
return { color: "muted", underline: false };
|
|
38473
|
+
}
|
|
38474
|
+
__name(headingStyle, "headingStyle");
|
|
38475
|
+
var QUOTE_BAR = "\u2502";
|
|
38476
|
+
var QUOTE_BAR_WIDTH = stringWidth(QUOTE_BAR) + 1;
|
|
38477
|
+
var RULE_MAX = 40;
|
|
38478
|
+
function ruleWidth(width) {
|
|
38479
|
+
return Math.max(1, Math.min(RULE_MAX, width));
|
|
38480
|
+
}
|
|
38481
|
+
__name(ruleWidth, "ruleWidth");
|
|
38482
|
+
|
|
38459
38483
|
// src/tui/terminal-hyperlinks.ts
|
|
38460
38484
|
import { isAbsolute } from "node:path";
|
|
38461
38485
|
import { pathToFileURL } from "node:url";
|
|
@@ -38790,16 +38814,26 @@ __name(tableHeight, "tableHeight");
|
|
|
38790
38814
|
|
|
38791
38815
|
// src/tui/Markdown.tsx
|
|
38792
38816
|
var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
|
|
38793
|
-
var ContentWidth = (0,
|
|
38817
|
+
var ContentWidth = (0, import_react39.createContext)(76);
|
|
38794
38818
|
function useContentWidth() {
|
|
38795
|
-
return Math.max(10, (0,
|
|
38819
|
+
return Math.max(10, (0, import_react39.useContext)(ContentWidth));
|
|
38796
38820
|
}
|
|
38797
38821
|
__name(useContentWidth, "useContentWidth");
|
|
38798
38822
|
function Markdown({ text, color = theme.text.primary, hyperlinks = false }) {
|
|
38799
|
-
const cache3 = (0,
|
|
38823
|
+
const cache3 = (0, import_react39.useRef)(void 0);
|
|
38800
38824
|
cache3.current ??= createBlockCache();
|
|
38801
38825
|
const blocks = cache3.current.parse(terminalDisplayText(text));
|
|
38802
38826
|
const width = useContentWidth();
|
|
38827
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(BlockList, { blocks, color, hyperlinks, width });
|
|
38828
|
+
}
|
|
38829
|
+
__name(Markdown, "Markdown");
|
|
38830
|
+
function BlockList({
|
|
38831
|
+
blocks,
|
|
38832
|
+
color,
|
|
38833
|
+
hyperlinks,
|
|
38834
|
+
width,
|
|
38835
|
+
italic = false
|
|
38836
|
+
}) {
|
|
38803
38837
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Box_default, { flexDirection: "column", children: blocks.map((block, i) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
38804
38838
|
BlockView,
|
|
38805
38839
|
{
|
|
@@ -38807,32 +38841,62 @@ function Markdown({ text, color = theme.text.primary, hyperlinks = false }) {
|
|
|
38807
38841
|
prev: blocks[i - 1],
|
|
38808
38842
|
color,
|
|
38809
38843
|
hyperlinks,
|
|
38810
|
-
width
|
|
38844
|
+
width,
|
|
38845
|
+
italic
|
|
38811
38846
|
},
|
|
38812
38847
|
`b-${i}`
|
|
38813
38848
|
)) });
|
|
38814
38849
|
}
|
|
38815
|
-
__name(
|
|
38816
|
-
var BlockView = (0,
|
|
38850
|
+
__name(BlockList, "BlockList");
|
|
38851
|
+
var BlockView = (0, import_react39.memo)(/* @__PURE__ */ __name(function BlockView2({
|
|
38817
38852
|
block,
|
|
38818
38853
|
prev,
|
|
38819
38854
|
color,
|
|
38820
38855
|
hyperlinks,
|
|
38821
|
-
width
|
|
38856
|
+
width,
|
|
38857
|
+
italic
|
|
38822
38858
|
}) {
|
|
38823
38859
|
useThemeEpoch();
|
|
38824
38860
|
const gap = !prev || block.type === "bullet" && prev.type === "bullet" ? 0 : 1;
|
|
38825
38861
|
switch (block.type) {
|
|
38826
|
-
case "heading":
|
|
38827
|
-
|
|
38862
|
+
case "heading": {
|
|
38863
|
+
const style = headingStyle(block.level);
|
|
38864
|
+
const headingColor = style.color === "accent" ? theme.accent.user : style.color === "muted" ? theme.text.muted : color;
|
|
38865
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Box_default, { marginTop: gap, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { bold: true, underline: style.underline, italic, color: headingColor, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
38828
38866
|
WrappedInline,
|
|
38829
38867
|
{
|
|
38830
38868
|
source: block.text,
|
|
38831
38869
|
width,
|
|
38832
|
-
color,
|
|
38870
|
+
color: headingColor,
|
|
38833
38871
|
hyperlinks
|
|
38834
38872
|
}
|
|
38835
38873
|
) }) });
|
|
38874
|
+
}
|
|
38875
|
+
case "rule":
|
|
38876
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Box_default, { marginTop: gap, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: theme.border.default, children: "\u2500".repeat(ruleWidth(width)) }) });
|
|
38877
|
+
case "quote":
|
|
38878
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
38879
|
+
Box_default,
|
|
38880
|
+
{
|
|
38881
|
+
marginTop: gap,
|
|
38882
|
+
borderStyle: "single",
|
|
38883
|
+
borderColor: theme.border.default,
|
|
38884
|
+
borderTop: false,
|
|
38885
|
+
borderBottom: false,
|
|
38886
|
+
borderRight: false,
|
|
38887
|
+
paddingLeft: QUOTE_BAR_WIDTH - 1,
|
|
38888
|
+
children: block.blocks.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
38889
|
+
BlockList,
|
|
38890
|
+
{
|
|
38891
|
+
blocks: block.blocks,
|
|
38892
|
+
color,
|
|
38893
|
+
hyperlinks,
|
|
38894
|
+
width: width - QUOTE_BAR_WIDTH,
|
|
38895
|
+
italic: true
|
|
38896
|
+
}
|
|
38897
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { children: " " })
|
|
38898
|
+
}
|
|
38899
|
+
);
|
|
38836
38900
|
case "bullet": {
|
|
38837
38901
|
const marker = block.ordered ? `${block.marker}.` : block.marker;
|
|
38838
38902
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { marginTop: gap, flexDirection: "row", children: [
|
|
@@ -38840,7 +38904,7 @@ var BlockView = (0, import_react38.memo)(/* @__PURE__ */ __name(function BlockVi
|
|
|
38840
38904
|
marker,
|
|
38841
38905
|
" "
|
|
38842
38906
|
] }) }),
|
|
38843
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Box_default, { flexGrow: 1, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color, wrap: "wrap", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
38907
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Box_default, { flexGrow: 1, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color, italic, wrap: "wrap", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
38844
38908
|
WrappedInline,
|
|
38845
38909
|
{
|
|
38846
38910
|
source: block.text,
|
|
@@ -38859,7 +38923,7 @@ var BlockView = (0, import_react38.memo)(/* @__PURE__ */ __name(function BlockVi
|
|
|
38859
38923
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: theme.status.ok, children: line.length > 0 ? line : " " }, `c-${i}`)
|
|
38860
38924
|
)) });
|
|
38861
38925
|
default:
|
|
38862
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Box_default, { marginTop: gap, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color, wrap: "wrap", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
38926
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Box_default, { marginTop: gap, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color, italic, wrap: "wrap", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
38863
38927
|
WrappedInline,
|
|
38864
38928
|
{
|
|
38865
38929
|
source: block.text,
|
|
@@ -38917,7 +38981,7 @@ function WrappedSpans({
|
|
|
38917
38981
|
const lines2 = wrapSpans(spans, width);
|
|
38918
38982
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_jsx_runtime5.Fragment, { children: lines2.map((line, i) => (
|
|
38919
38983
|
// biome-ignore lint/suspicious/noArrayIndexKey: rows are positional.
|
|
38920
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
38984
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react39.Fragment, { children: [
|
|
38921
38985
|
line.map((span, j) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
38922
38986
|
SpanView,
|
|
38923
38987
|
{
|
|
@@ -38951,7 +39015,7 @@ function SpanView({
|
|
|
38951
39015
|
__name(SpanView, "SpanView");
|
|
38952
39016
|
|
|
38953
39017
|
// src/tui/Transcript.tsx
|
|
38954
|
-
var
|
|
39018
|
+
var import_react41 = __toESM(require_react(), 1);
|
|
38955
39019
|
|
|
38956
39020
|
// src/tui/user-text-view.ts
|
|
38957
39021
|
var USER_TEXT_LIMIT = 1e4;
|
|
@@ -39425,7 +39489,7 @@ function ContextGridRow({ view }) {
|
|
|
39425
39489
|
__name(ContextGridRow, "ContextGridRow");
|
|
39426
39490
|
|
|
39427
39491
|
// src/tui/ReadSearchGroup.tsx
|
|
39428
|
-
var
|
|
39492
|
+
var import_react40 = __toESM(require_react(), 1);
|
|
39429
39493
|
var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
|
|
39430
39494
|
function ReadSearchGroup({
|
|
39431
39495
|
message,
|
|
@@ -39439,9 +39503,9 @@ function ReadSearchGroup({
|
|
|
39439
39503
|
const screenReader = use_is_screen_reader_enabled_default();
|
|
39440
39504
|
const motion = live && stdout.isTTY === true && !screenReader && motionAllowed();
|
|
39441
39505
|
const { frame } = useAnimation({ isActive: motion, interval: 300 });
|
|
39442
|
-
const [, setTick] = (0,
|
|
39506
|
+
const [, setTick] = (0, import_react40.useState)(0);
|
|
39443
39507
|
const queued = live && state?.hintQueued !== void 0 ? state.hintShownAt : void 0;
|
|
39444
|
-
(0,
|
|
39508
|
+
(0, import_react40.useEffect)(() => {
|
|
39445
39509
|
if (queued === void 0) return;
|
|
39446
39510
|
const timer = setTimeout(
|
|
39447
39511
|
() => setTick((n) => n + 1),
|
|
@@ -39832,7 +39896,7 @@ function Transcript({
|
|
|
39832
39896
|
] }) });
|
|
39833
39897
|
}
|
|
39834
39898
|
__name(Transcript, "Transcript");
|
|
39835
|
-
var LiveRow = (0,
|
|
39899
|
+
var LiveRow = (0, import_react41.memo)(MessageRow);
|
|
39836
39900
|
function RawMessageRow({
|
|
39837
39901
|
message,
|
|
39838
39902
|
prev
|
|
@@ -40278,17 +40342,17 @@ function TranscriptScreen({
|
|
|
40278
40342
|
hyperlinks = false,
|
|
40279
40343
|
onClose
|
|
40280
40344
|
}) {
|
|
40281
|
-
const [showAll, setShowAll] = (0,
|
|
40282
|
-
const [offset, setOffset] = (0,
|
|
40283
|
-
const [contentRows, setContentRows] = (0,
|
|
40284
|
-
const content = (0,
|
|
40345
|
+
const [showAll, setShowAll] = (0, import_react42.useState)(false);
|
|
40346
|
+
const [offset, setOffset] = (0, import_react42.useState)(0);
|
|
40347
|
+
const [contentRows, setContentRows] = (0, import_react42.useState)(0);
|
|
40348
|
+
const content = (0, import_react42.useRef)(null);
|
|
40285
40349
|
const height = Math.max(3, rows - FOOTER_ROWS - SCREEN_SLACK);
|
|
40286
40350
|
const maxOffset = Math.max(0, contentRows - height);
|
|
40287
40351
|
const at = Math.min(Math.max(pendingAt ?? messages.length, 0), messages.length);
|
|
40288
40352
|
const ordered = pending ? [...messages.slice(0, at), pending, ...messages.slice(at)] : messages;
|
|
40289
40353
|
const { hiddenCount, shown } = screenWindow(ordered, showAll);
|
|
40290
40354
|
const divider = screenDivider(hiddenCount, showAll);
|
|
40291
|
-
(0,
|
|
40355
|
+
(0, import_react42.useEffect)(() => {
|
|
40292
40356
|
if (content.current) {
|
|
40293
40357
|
const measured = measure_element_default(content.current).height;
|
|
40294
40358
|
if (measured !== contentRows) setContentRows(measured);
|
|
@@ -42100,7 +42164,7 @@ function ChoicePicker({
|
|
|
42100
42164
|
__name(ChoicePicker, "ChoicePicker");
|
|
42101
42165
|
|
|
42102
42166
|
// src/tui/Composer.tsx
|
|
42103
|
-
var
|
|
42167
|
+
var import_react43 = __toESM(require_react(), 1);
|
|
42104
42168
|
|
|
42105
42169
|
// src/integrations/clipboard/image-paths.ts
|
|
42106
42170
|
import { readFile, stat } from "node:fs/promises";
|
|
@@ -42436,9 +42500,9 @@ var MAX_CLIPBOARD_BYTES = 64 * 1024 * 1024;
|
|
|
42436
42500
|
var TOOL_TIMEOUT_MS = 3e3;
|
|
42437
42501
|
var POWERSHELL_TIMEOUT_MS = 1e4;
|
|
42438
42502
|
var CLIPBOARD_PROGRAMS = /(?:^|[\\/])(?:xclip|wl-paste|pbpaste|osascript|powershell(?:\.exe)?)$/i;
|
|
42439
|
-
var runCommand = /* @__PURE__ */ __name((file, args, options) => new Promise((
|
|
42503
|
+
var runCommand = /* @__PURE__ */ __name((file, args, options) => new Promise((resolve9) => {
|
|
42440
42504
|
if (process.env[CLIPBOARD_KILL_SWITCH] === "1" && CLIPBOARD_PROGRAMS.test(file)) {
|
|
42441
|
-
|
|
42505
|
+
resolve9({ code: null, stdout: Buffer.alloc(0), timedOut: false, spawnFailed: true });
|
|
42442
42506
|
return;
|
|
42443
42507
|
}
|
|
42444
42508
|
const chunks = [];
|
|
@@ -42449,13 +42513,13 @@ var runCommand = /* @__PURE__ */ __name((file, args, options) => new Promise((re
|
|
|
42449
42513
|
if (settled2) return;
|
|
42450
42514
|
settled2 = true;
|
|
42451
42515
|
clearTimeout(timer);
|
|
42452
|
-
|
|
42516
|
+
resolve9({ ...result, stdout: Buffer.concat(chunks), timedOut });
|
|
42453
42517
|
}, "finish");
|
|
42454
42518
|
let child;
|
|
42455
42519
|
try {
|
|
42456
42520
|
child = spawn3(file, [...args], { stdio: ["ignore", "pipe", "ignore"], windowsHide: true });
|
|
42457
42521
|
} catch {
|
|
42458
|
-
|
|
42522
|
+
resolve9({ code: null, stdout: Buffer.alloc(0), timedOut: false, spawnFailed: true });
|
|
42459
42523
|
return;
|
|
42460
42524
|
}
|
|
42461
42525
|
const timer = setTimeout(() => {
|
|
@@ -44576,40 +44640,40 @@ function Composer({
|
|
|
44576
44640
|
turnActive = false
|
|
44577
44641
|
}) {
|
|
44578
44642
|
const terminal = use_window_size_default();
|
|
44579
|
-
const [value, setValueState] = (0,
|
|
44580
|
-
const leftGestureRef = (0,
|
|
44581
|
-
const valueRef = (0,
|
|
44582
|
-
const [cursor, setCursorState] = (0,
|
|
44583
|
-
const cursorRef = (0,
|
|
44584
|
-
const [, setHistoryIndexState] = (0,
|
|
44585
|
-
const historyIndexRef = (0,
|
|
44586
|
-
const historyDraftRef = (0,
|
|
44587
|
-
const spansRef = (0,
|
|
44588
|
-
const overridesRef = (0,
|
|
44589
|
-
const [triggerVersion, setTriggerVersion] = (0,
|
|
44590
|
-
const [historySearch, setHistorySearchState] = (0,
|
|
44591
|
-
const historySearchRef = (0,
|
|
44592
|
-
const verticalColumnRef = (0,
|
|
44593
|
-
const killBufferRef = (0,
|
|
44594
|
-
const [selected, setSelected] = (0,
|
|
44595
|
-
const selectedRef = (0,
|
|
44596
|
-
const pasteStoreRef = (0,
|
|
44597
|
-
const nextPasteIdRef = (0,
|
|
44598
|
-
const [queuedHintEpisode, setQueuedHintEpisode] = (0,
|
|
44643
|
+
const [value, setValueState] = (0, import_react43.useState)("");
|
|
44644
|
+
const leftGestureRef = (0, import_react43.useRef)(new LeftGesture());
|
|
44645
|
+
const valueRef = (0, import_react43.useRef)("");
|
|
44646
|
+
const [cursor, setCursorState] = (0, import_react43.useState)(0);
|
|
44647
|
+
const cursorRef = (0, import_react43.useRef)(0);
|
|
44648
|
+
const [, setHistoryIndexState] = (0, import_react43.useState)(-1);
|
|
44649
|
+
const historyIndexRef = (0, import_react43.useRef)(-1);
|
|
44650
|
+
const historyDraftRef = (0, import_react43.useRef)(null);
|
|
44651
|
+
const spansRef = (0, import_react43.useRef)([]);
|
|
44652
|
+
const overridesRef = (0, import_react43.useRef)([]);
|
|
44653
|
+
const [triggerVersion, setTriggerVersion] = (0, import_react43.useState)(0);
|
|
44654
|
+
const [historySearch, setHistorySearchState] = (0, import_react43.useState)(null);
|
|
44655
|
+
const historySearchRef = (0, import_react43.useRef)(null);
|
|
44656
|
+
const verticalColumnRef = (0, import_react43.useRef)(null);
|
|
44657
|
+
const killBufferRef = (0, import_react43.useRef)("");
|
|
44658
|
+
const [selected, setSelected] = (0, import_react43.useState)(0);
|
|
44659
|
+
const selectedRef = (0, import_react43.useRef)(0);
|
|
44660
|
+
const pasteStoreRef = (0, import_react43.useRef)(/* @__PURE__ */ new Map());
|
|
44661
|
+
const nextPasteIdRef = (0, import_react43.useRef)(1);
|
|
44662
|
+
const [queuedHintEpisode, setQueuedHintEpisode] = (0, import_react43.useState)(() => ({
|
|
44599
44663
|
active: false,
|
|
44600
44664
|
show: false,
|
|
44601
44665
|
count: queuedHintCount?.read() ?? 0
|
|
44602
44666
|
}));
|
|
44603
|
-
const clearPastes = (0,
|
|
44667
|
+
const clearPastes = (0, import_react43.useCallback)(() => {
|
|
44604
44668
|
pasteStoreRef.current = /* @__PURE__ */ new Map();
|
|
44605
44669
|
nextPasteIdRef.current = 1;
|
|
44606
44670
|
}, []);
|
|
44607
|
-
const [attachments, setAttachments] = (0,
|
|
44608
|
-
const attachmentsRef = (0,
|
|
44609
|
-
const attachmentIdsRef = (0,
|
|
44610
|
-
const attachmentHighRef = (0,
|
|
44611
|
-
const attachmentFloorRef = (0,
|
|
44612
|
-
const idFor = (0,
|
|
44671
|
+
const [attachments, setAttachments] = (0, import_react43.useState)([]);
|
|
44672
|
+
const attachmentsRef = (0, import_react43.useRef)([]);
|
|
44673
|
+
const attachmentIdsRef = (0, import_react43.useRef)(/* @__PURE__ */ new WeakMap());
|
|
44674
|
+
const attachmentHighRef = (0, import_react43.useRef)(attachmentFloor);
|
|
44675
|
+
const attachmentFloorRef = (0, import_react43.useRef)(attachmentFloor);
|
|
44676
|
+
const idFor = (0, import_react43.useCallback)((attachment) => {
|
|
44613
44677
|
let id = attachmentIdsRef.current.get(attachment);
|
|
44614
44678
|
if (id === void 0) {
|
|
44615
44679
|
id = Math.max(attachmentHighRef.current, attachmentFloorRef.current) + 1;
|
|
@@ -44618,7 +44682,7 @@ function Composer({
|
|
|
44618
44682
|
}
|
|
44619
44683
|
return id;
|
|
44620
44684
|
}, []);
|
|
44621
|
-
(0,
|
|
44685
|
+
(0, import_react43.useLayoutEffect)(() => {
|
|
44622
44686
|
const before = attachmentFloorRef.current;
|
|
44623
44687
|
attachmentFloorRef.current = attachmentFloor;
|
|
44624
44688
|
if (attachmentFloor >= before) {
|
|
@@ -44632,7 +44696,7 @@ function Composer({
|
|
|
44632
44696
|
}
|
|
44633
44697
|
attachmentHighRef.current = high;
|
|
44634
44698
|
}, [attachmentFloor]);
|
|
44635
|
-
const replaceAttachments = (0,
|
|
44699
|
+
const replaceAttachments = (0, import_react43.useCallback)(
|
|
44636
44700
|
(next) => {
|
|
44637
44701
|
const resolved = typeof next === "function" ? next(attachmentsRef.current) : next;
|
|
44638
44702
|
attachmentsRef.current = resolved;
|
|
@@ -44640,43 +44704,43 @@ function Composer({
|
|
|
44640
44704
|
},
|
|
44641
44705
|
[]
|
|
44642
44706
|
);
|
|
44643
|
-
const editPreviousTimerRef = (0,
|
|
44644
|
-
const setEditPreviousArmed = (0,
|
|
44707
|
+
const editPreviousTimerRef = (0, import_react43.useRef)(null);
|
|
44708
|
+
const setEditPreviousArmed = (0, import_react43.useCallback)((armed2) => {
|
|
44645
44709
|
if (editPreviousTimerRef.current) clearTimeout(editPreviousTimerRef.current);
|
|
44646
44710
|
editPreviousTimerRef.current = armed2 ? setTimeout(() => {
|
|
44647
44711
|
editPreviousTimerRef.current = null;
|
|
44648
44712
|
}, REWIND_DOUBLE_ESC_MS) : null;
|
|
44649
44713
|
}, []);
|
|
44650
|
-
const clearArmRef = (0,
|
|
44651
|
-
const disarmClear = (0,
|
|
44714
|
+
const clearArmRef = (0, import_react43.useRef)(null);
|
|
44715
|
+
const disarmClear = (0, import_react43.useCallback)(() => {
|
|
44652
44716
|
if (clearArmRef.current === null) return;
|
|
44653
44717
|
clearTimeout(clearArmRef.current);
|
|
44654
44718
|
clearArmRef.current = null;
|
|
44655
44719
|
onFooterNoticeRemove?.(ESC_CLEAR_KEY);
|
|
44656
44720
|
}, [onFooterNoticeRemove]);
|
|
44657
|
-
(0,
|
|
44721
|
+
(0, import_react43.useEffect)(
|
|
44658
44722
|
() => () => {
|
|
44659
44723
|
if (editPreviousTimerRef.current) clearTimeout(editPreviousTimerRef.current);
|
|
44660
44724
|
if (clearArmRef.current !== null) clearTimeout(clearArmRef.current);
|
|
44661
44725
|
},
|
|
44662
44726
|
[]
|
|
44663
44727
|
);
|
|
44664
|
-
const restoredTokenRef = (0,
|
|
44665
|
-
const draftPresenceRef = (0,
|
|
44666
|
-
(0,
|
|
44728
|
+
const restoredTokenRef = (0, import_react43.useRef)(null);
|
|
44729
|
+
const draftPresenceRef = (0, import_react43.useRef)(false);
|
|
44730
|
+
(0, import_react43.useEffect)(() => {
|
|
44667
44731
|
onDraftChange?.({
|
|
44668
44732
|
text: expandChips(value, pasteStoreRef.current),
|
|
44669
44733
|
...attachments.length ? { attachments } : {}
|
|
44670
44734
|
});
|
|
44671
44735
|
}, [attachments, onDraftChange, value]);
|
|
44672
|
-
(0,
|
|
44736
|
+
(0, import_react43.useEffect)(() => {
|
|
44673
44737
|
const current = valueRef.current;
|
|
44674
44738
|
const kept = attachmentsRef.current.filter(
|
|
44675
44739
|
(attachment) => current.includes(chipFor(attachment, idFor(attachment)))
|
|
44676
44740
|
);
|
|
44677
44741
|
if (kept.length !== attachmentsRef.current.length) replaceAttachments(kept);
|
|
44678
44742
|
}, [idFor, replaceAttachments, value]);
|
|
44679
|
-
(0,
|
|
44743
|
+
(0, import_react43.useEffect)(() => {
|
|
44680
44744
|
const hasDraft = value.trim().length > 0 || attachments.length > 0;
|
|
44681
44745
|
if (hasDraft === draftPresenceRef.current) return;
|
|
44682
44746
|
draftPresenceRef.current = hasDraft;
|
|
@@ -44714,7 +44778,7 @@ function Composer({
|
|
|
44714
44778
|
);
|
|
44715
44779
|
const menuTextWidth = Math.max(1, (terminal.columns ?? 80) - 6);
|
|
44716
44780
|
const descriptionWidth = Math.max(8, menuTextWidth - commandColumnWidth - 1);
|
|
44717
|
-
const setBuffer = (0,
|
|
44781
|
+
const setBuffer = (0, import_react43.useCallback)(
|
|
44718
44782
|
(nextValue, nextCursor = nextValue.length, origin = "recalled", spans) => {
|
|
44719
44783
|
if (valueRef.current.length > 0 && nextValue.length === 0)
|
|
44720
44784
|
leftGestureRef.current.noteEmptied();
|
|
@@ -44728,15 +44792,15 @@ function Composer({
|
|
|
44728
44792
|
},
|
|
44729
44793
|
[]
|
|
44730
44794
|
);
|
|
44731
|
-
const setHistoryIndex = (0,
|
|
44795
|
+
const setHistoryIndex = (0, import_react43.useCallback)((next) => {
|
|
44732
44796
|
historyIndexRef.current = next;
|
|
44733
44797
|
setHistoryIndexState(next);
|
|
44734
44798
|
}, []);
|
|
44735
|
-
const setHistorySearch = (0,
|
|
44799
|
+
const setHistorySearch = (0, import_react43.useCallback)((next) => {
|
|
44736
44800
|
historySearchRef.current = next;
|
|
44737
44801
|
setHistorySearchState(next);
|
|
44738
44802
|
}, []);
|
|
44739
|
-
const setSelectedIndex = (0,
|
|
44803
|
+
const setSelectedIndex = (0, import_react43.useCallback)((next) => {
|
|
44740
44804
|
const resolved = typeof next === "function" ? next(selectedRef.current) : next;
|
|
44741
44805
|
selectedRef.current = resolved;
|
|
44742
44806
|
setSelected(resolved);
|
|
@@ -44765,7 +44829,7 @@ function Composer({
|
|
|
44765
44829
|
else if (nearest.state === "suggested") setOverride(nearest, "armed");
|
|
44766
44830
|
else setOverride(nearest, "dropped");
|
|
44767
44831
|
}, "toggleNearestTrigger");
|
|
44768
|
-
const chipsNow = (0,
|
|
44832
|
+
const chipsNow = (0, import_react43.useCallback)(
|
|
44769
44833
|
() => chipRanges(valueRef.current, {
|
|
44770
44834
|
attachments: new Set(
|
|
44771
44835
|
attachmentsRef.current.map((attachment) => chipFor(attachment, idFor(attachment)))
|
|
@@ -44780,9 +44844,9 @@ function Composer({
|
|
|
44780
44844
|
setCursorState(at);
|
|
44781
44845
|
}, "placeCursor");
|
|
44782
44846
|
const wholeRange = /* @__PURE__ */ __name((start, end) => widenOverChips(chipsNow(), start, end), "wholeRange");
|
|
44783
|
-
const undoRef = (0,
|
|
44784
|
-
const stashRef = (0,
|
|
44785
|
-
const recordUndo = (0,
|
|
44847
|
+
const undoRef = (0, import_react43.useRef)(createUndoStack());
|
|
44848
|
+
const stashRef = (0, import_react43.useRef)(null);
|
|
44849
|
+
const recordUndo = (0, import_react43.useCallback)((after, typed) => {
|
|
44786
44850
|
undoRef.current.record(
|
|
44787
44851
|
{
|
|
44788
44852
|
value: valueRef.current,
|
|
@@ -44794,7 +44858,7 @@ function Composer({
|
|
|
44794
44858
|
typed
|
|
44795
44859
|
);
|
|
44796
44860
|
}, []);
|
|
44797
|
-
const editBuffer = (0,
|
|
44861
|
+
const editBuffer = (0, import_react43.useCallback)(
|
|
44798
44862
|
(initialValue, initialCursor = initialValue.length, origin = "typed") => {
|
|
44799
44863
|
let nextValue = initialValue;
|
|
44800
44864
|
let nextCursor = initialCursor;
|
|
@@ -44830,7 +44894,7 @@ function Composer({
|
|
|
44830
44894
|
},
|
|
44831
44895
|
[chipsNow, recordUndo, setBuffer, setHistoryIndex, setHistorySearch]
|
|
44832
44896
|
);
|
|
44833
|
-
const reset = (0,
|
|
44897
|
+
const reset = (0, import_react43.useCallback)(() => {
|
|
44834
44898
|
undoRef.current.clear();
|
|
44835
44899
|
verticalColumnRef.current = null;
|
|
44836
44900
|
historyDraftRef.current = null;
|
|
@@ -44851,8 +44915,8 @@ function Composer({
|
|
|
44851
44915
|
setHistorySearch,
|
|
44852
44916
|
setSelectedIndex
|
|
44853
44917
|
]);
|
|
44854
|
-
const sendNowChordRef = (0,
|
|
44855
|
-
const restoreDraft = (0,
|
|
44918
|
+
const sendNowChordRef = (0, import_react43.useRef)(false);
|
|
44919
|
+
const restoreDraft = (0, import_react43.useCallback)(
|
|
44856
44920
|
(draft) => {
|
|
44857
44921
|
let restoredText = draft.text;
|
|
44858
44922
|
const restoredAttachments = draft.attachments ? [...draft.attachments] : [];
|
|
@@ -44903,7 +44967,7 @@ function Composer({
|
|
|
44903
44967
|
triggers
|
|
44904
44968
|
]
|
|
44905
44969
|
);
|
|
44906
|
-
(0,
|
|
44970
|
+
(0, import_react43.useLayoutEffect)(() => {
|
|
44907
44971
|
if (!draftToRestore || restoredTokenRef.current === draftToRestore.token) return;
|
|
44908
44972
|
restoredTokenRef.current = draftToRestore.token;
|
|
44909
44973
|
restoreDraft(draftToRestore);
|
|
@@ -44942,10 +45006,10 @@ function Composer({
|
|
|
44942
45006
|
replaceAttachments((p) => [...p, ...images]);
|
|
44943
45007
|
editBuffer(value2, position, "pasted");
|
|
44944
45008
|
}, "attachImages");
|
|
44945
|
-
const imageReadRef = (0,
|
|
44946
|
-
const deferredEnterRef = (0,
|
|
44947
|
-
const keyHandlerRef = (0,
|
|
44948
|
-
const lastEmptyPasteRef = (0,
|
|
45009
|
+
const imageReadRef = (0, import_react43.useRef)(false);
|
|
45010
|
+
const deferredEnterRef = (0, import_react43.useRef)(null);
|
|
45011
|
+
const keyHandlerRef = (0, import_react43.useRef)(null);
|
|
45012
|
+
const lastEmptyPasteRef = (0, import_react43.useRef)(0);
|
|
44949
45013
|
const finishImageRead = /* @__PURE__ */ __name(() => {
|
|
44950
45014
|
imageReadRef.current = false;
|
|
44951
45015
|
const deferred = deferredEnterRef.current;
|
|
@@ -45629,7 +45693,7 @@ function Composer({
|
|
|
45629
45693
|
const queuedHintWanted = (!disabled || railFocused) && value.length === 0 && queuedEdit?.available === true;
|
|
45630
45694
|
const settledEpisode = nextQueuedHintEpisode(queuedHintEpisode, queuedHintWanted);
|
|
45631
45695
|
if (settledEpisode !== queuedHintEpisode) setQueuedHintEpisode(settledEpisode);
|
|
45632
|
-
(0,
|
|
45696
|
+
(0, import_react43.useEffect)(() => {
|
|
45633
45697
|
if (queuedHintEpisode.active && queuedHintEpisode.show)
|
|
45634
45698
|
queuedHintCount?.write(queuedHintEpisode.count);
|
|
45635
45699
|
}, [queuedHintEpisode, queuedHintCount]);
|
|
@@ -45771,7 +45835,7 @@ function isDocumentLike(attachment) {
|
|
|
45771
45835
|
__name(isDocumentLike, "isDocumentLike");
|
|
45772
45836
|
|
|
45773
45837
|
// src/tui/ComposerFrame.tsx
|
|
45774
|
-
var
|
|
45838
|
+
var import_react44 = __toESM(require_react(), 1);
|
|
45775
45839
|
var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
|
|
45776
45840
|
var HYPERMODE_GLOW_MS = 880;
|
|
45777
45841
|
function ComposerFrame({
|
|
@@ -45790,13 +45854,13 @@ function ComposerFrame({
|
|
|
45790
45854
|
const showMode = mode !== void 0 && frameColumns >= mode.length + 5;
|
|
45791
45855
|
const ruleColumns = Math.max(1, frameColumns - (showMode ? mode.length + 3 : 0));
|
|
45792
45856
|
const motion = animate && stdout.isTTY === true && !screenReader && showMode && motionAllowed();
|
|
45793
|
-
const [igniting, setIgniting] = (0,
|
|
45794
|
-
const previousActivation = (0,
|
|
45857
|
+
const [igniting, setIgniting] = (0, import_react44.useState)(false);
|
|
45858
|
+
const previousActivation = (0, import_react44.useRef)(activation);
|
|
45795
45859
|
const { time, reset } = useAnimation({
|
|
45796
45860
|
isActive: igniting && motion && !hidden,
|
|
45797
45861
|
interval: 80
|
|
45798
45862
|
});
|
|
45799
|
-
(0,
|
|
45863
|
+
(0, import_react44.useEffect)(() => {
|
|
45800
45864
|
if (previousActivation.current === activation) return;
|
|
45801
45865
|
previousActivation.current = activation;
|
|
45802
45866
|
if (motion && !hidden) {
|
|
@@ -45804,7 +45868,7 @@ function ComposerFrame({
|
|
|
45804
45868
|
setIgniting(true);
|
|
45805
45869
|
} else setIgniting(false);
|
|
45806
45870
|
}, [activation, hidden, motion, reset]);
|
|
45807
|
-
(0,
|
|
45871
|
+
(0, import_react44.useEffect)(() => {
|
|
45808
45872
|
if (igniting && (time >= HYPERMODE_GLOW_MS || !motion || hidden)) setIgniting(false);
|
|
45809
45873
|
}, [hidden, igniting, motion, time]);
|
|
45810
45874
|
const glowTime = igniting && motion && !hidden && time < HYPERMODE_GLOW_MS ? time : void 0;
|
|
@@ -46570,7 +46634,7 @@ function PermissionOverlay({
|
|
|
46570
46634
|
__name(PermissionOverlay, "PermissionOverlay");
|
|
46571
46635
|
|
|
46572
46636
|
// src/tui/Picker.tsx
|
|
46573
|
-
var
|
|
46637
|
+
var import_react46 = __toESM(require_react(), 1);
|
|
46574
46638
|
|
|
46575
46639
|
// src/tui/credential-entry.ts
|
|
46576
46640
|
function classifyCredential(entry, key) {
|
|
@@ -46761,11 +46825,11 @@ function initialProviderRow(rows, currentProvider, keyEntryFor) {
|
|
|
46761
46825
|
__name(initialProviderRow, "initialProviderRow");
|
|
46762
46826
|
|
|
46763
46827
|
// src/tui/use-selection-index.ts
|
|
46764
|
-
var
|
|
46828
|
+
var import_react45 = __toESM(require_react(), 1);
|
|
46765
46829
|
function useSelectionIndex(initial) {
|
|
46766
|
-
const [selection, setSelectionState] = (0,
|
|
46767
|
-
const selectionRef = (0,
|
|
46768
|
-
const setSelection = (0,
|
|
46830
|
+
const [selection, setSelectionState] = (0, import_react45.useState)(initial);
|
|
46831
|
+
const selectionRef = (0, import_react45.useRef)(initial);
|
|
46832
|
+
const setSelection = (0, import_react45.useCallback)((next) => {
|
|
46769
46833
|
const resolved = typeof next === "function" ? next(selectionRef.current) : next;
|
|
46770
46834
|
selectionRef.current = resolved;
|
|
46771
46835
|
setSelectionState(resolved);
|
|
@@ -46870,14 +46934,14 @@ function Picker({
|
|
|
46870
46934
|
notice,
|
|
46871
46935
|
cancelExits = false
|
|
46872
46936
|
}) {
|
|
46873
|
-
const operationGenerationRef = (0,
|
|
46874
|
-
const operationRef = (0,
|
|
46875
|
-
const invalidateOperation = (0,
|
|
46937
|
+
const operationGenerationRef = (0, import_react46.useRef)(0);
|
|
46938
|
+
const operationRef = (0, import_react46.useRef)(null);
|
|
46939
|
+
const invalidateOperation = (0, import_react46.useCallback)(() => {
|
|
46876
46940
|
operationGenerationRef.current += 1;
|
|
46877
46941
|
operationRef.current?.controller.abort(new Error("The picker operation was cancelled."));
|
|
46878
46942
|
operationRef.current = null;
|
|
46879
46943
|
}, []);
|
|
46880
|
-
const beginOperation = (0,
|
|
46944
|
+
const beginOperation = (0, import_react46.useCallback)(() => {
|
|
46881
46945
|
invalidateOperation();
|
|
46882
46946
|
const operation = {
|
|
46883
46947
|
generation: operationGenerationRef.current,
|
|
@@ -46886,17 +46950,17 @@ function Picker({
|
|
|
46886
46950
|
operationRef.current = operation;
|
|
46887
46951
|
return operation;
|
|
46888
46952
|
}, [invalidateOperation]);
|
|
46889
|
-
const ownsOperation = (0,
|
|
46953
|
+
const ownsOperation = (0, import_react46.useCallback)(
|
|
46890
46954
|
(operation) => operationRef.current === operation && operationGenerationRef.current === operation.generation && !operation.controller.signal.aborted,
|
|
46891
46955
|
[]
|
|
46892
46956
|
);
|
|
46893
|
-
const finishOperation = (0,
|
|
46957
|
+
const finishOperation = (0, import_react46.useCallback)(
|
|
46894
46958
|
(operation) => {
|
|
46895
46959
|
if (operationRef.current === operation) operationRef.current = null;
|
|
46896
46960
|
},
|
|
46897
46961
|
[]
|
|
46898
46962
|
);
|
|
46899
|
-
(0,
|
|
46963
|
+
(0, import_react46.useEffect)(() => invalidateOperation, [invalidateOperation]);
|
|
46900
46964
|
const rows = providerListRows(detected, selectionKind !== "signed-in-subscription");
|
|
46901
46965
|
const keyEntryOffered = onCredential !== void 0 && selectionKind !== "signed-in-subscription";
|
|
46902
46966
|
const initialSelection = initialView === "subscriptions" ? 0 : initialProviderRow(rows, currentProvider, keyEntryFor);
|
|
@@ -46908,20 +46972,20 @@ function Picker({
|
|
|
46908
46972
|
const terminal = use_window_size_default();
|
|
46909
46973
|
const contentWidth = pickerContentWidth(terminal.columns ?? 80);
|
|
46910
46974
|
const noticeLines = notice ? wrapChoiceText(notice, contentWidth).length : 0;
|
|
46911
|
-
const [errorHint, setErrorHint] = (0,
|
|
46912
|
-
const [modelQuery, setModelQuery] = (0,
|
|
46913
|
-
const modelQueryRef = (0,
|
|
46914
|
-
const [modelPhase, setModelPhase] = (0,
|
|
46915
|
-
const [loginPhase, setLoginPhase] = (0,
|
|
46916
|
-
(0,
|
|
46975
|
+
const [errorHint, setErrorHint] = (0, import_react46.useState)(null);
|
|
46976
|
+
const [modelQuery, setModelQuery] = (0, import_react46.useState)(null);
|
|
46977
|
+
const modelQueryRef = (0, import_react46.useRef)(null);
|
|
46978
|
+
const [modelPhase, setModelPhase] = (0, import_react46.useState)(null);
|
|
46979
|
+
const [loginPhase, setLoginPhase] = (0, import_react46.useState)(initialView === "subscriptions");
|
|
46980
|
+
(0, import_react46.useEffect)(() => {
|
|
46917
46981
|
setLoginPhase(initialView === "subscriptions");
|
|
46918
46982
|
if (initialView !== "models") setModelPhase(null);
|
|
46919
46983
|
}, [initialView]);
|
|
46920
|
-
const [loginEntry, setLoginEntry] = (0,
|
|
46921
|
-
const [keyEntry, setKeyEntry] = (0,
|
|
46922
|
-
const [pathVendor, setPathVendor] = (0,
|
|
46984
|
+
const [loginEntry, setLoginEntry] = (0, import_react46.useState)(null);
|
|
46985
|
+
const [keyEntry, setKeyEntry] = (0, import_react46.useState)(null);
|
|
46986
|
+
const [pathVendor, setPathVendor] = (0, import_react46.useState)(null);
|
|
46923
46987
|
const pathRow = pathVendor === null ? null : rows.find((row2) => row2.vendor === pathVendor) ?? null;
|
|
46924
|
-
const openModels = (0,
|
|
46988
|
+
const openModels = (0, import_react46.useCallback)(
|
|
46925
46989
|
(current, returnToProviders = true) => {
|
|
46926
46990
|
const operation = beginOperation();
|
|
46927
46991
|
modelQueryRef.current = null;
|
|
@@ -46971,8 +47035,8 @@ function Picker({
|
|
|
46971
47035
|
setCursor
|
|
46972
47036
|
]
|
|
46973
47037
|
);
|
|
46974
|
-
const initialModelsOpened = (0,
|
|
46975
|
-
(0,
|
|
47038
|
+
const initialModelsOpened = (0, import_react46.useRef)(false);
|
|
47039
|
+
(0, import_react46.useEffect)(() => {
|
|
46976
47040
|
if (initialView !== "models" || initialModelsOpened.current) return;
|
|
46977
47041
|
initialModelsOpened.current = true;
|
|
46978
47042
|
const current = detected.find((provider) => provider.entry.id === currentProvider);
|
|
@@ -47851,7 +47915,7 @@ function ProviderSetupRows({
|
|
|
47851
47915
|
const index = visible.start + offset;
|
|
47852
47916
|
const heading = firstUndetected !== -1 && (index === firstUndetected || offset === 0 && index > firstUndetected) ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Box_default, { marginTop: offset === 0 ? 0 : 1, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { color: theme.text.muted, children: NOT_DETECTED_HEADING }) }, "heading") : null;
|
|
47853
47917
|
const detected = row2.detected.length > 0;
|
|
47854
|
-
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
47918
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_react46.Fragment, { children: [
|
|
47855
47919
|
heading,
|
|
47856
47920
|
detected ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
47857
47921
|
DetectedVendorRow,
|
|
@@ -48147,7 +48211,7 @@ function describeSource(d) {
|
|
|
48147
48211
|
__name(describeSource, "describeSource");
|
|
48148
48212
|
|
|
48149
48213
|
// src/tui/PlanApprovalOverlay.tsx
|
|
48150
|
-
var
|
|
48214
|
+
var import_react47 = __toESM(require_react(), 1);
|
|
48151
48215
|
|
|
48152
48216
|
// src/tui/consent-timing.ts
|
|
48153
48217
|
var APPROVAL_SETTLE_MS = 350;
|
|
@@ -48174,10 +48238,10 @@ function PlanApprovalOverlay({
|
|
|
48174
48238
|
}) {
|
|
48175
48239
|
const choices2 = planApprovalRows(request.bypassAvailable);
|
|
48176
48240
|
const textRow = choices2.length - 1;
|
|
48177
|
-
const [cursor, setCursor] = (0,
|
|
48178
|
-
const [text, setText] = (0,
|
|
48179
|
-
const [offset, setOffset] = (0,
|
|
48180
|
-
const shownAt = (0,
|
|
48241
|
+
const [cursor, setCursor] = (0, import_react47.useState)(0);
|
|
48242
|
+
const [text, setText] = (0, import_react47.useState)("");
|
|
48243
|
+
const [offset, setOffset] = (0, import_react47.useState)(0);
|
|
48244
|
+
const shownAt = (0, import_react47.useRef)(now());
|
|
48181
48245
|
const pageRows2 = planPageRows(terminalRows);
|
|
48182
48246
|
const planRows = permissionReviewRows(request.plan.trimEnd(), columns);
|
|
48183
48247
|
const maxOffset = Math.max(0, planRows.length - pageRows2);
|
|
@@ -48324,7 +48388,7 @@ function PlanApprovalOverlay({
|
|
|
48324
48388
|
__name(PlanApprovalOverlay, "PlanApprovalOverlay");
|
|
48325
48389
|
|
|
48326
48390
|
// src/tui/QuestionDialog.tsx
|
|
48327
|
-
var
|
|
48391
|
+
var import_react48 = __toESM(require_react(), 1);
|
|
48328
48392
|
|
|
48329
48393
|
// src/tui/question-dialog.ts
|
|
48330
48394
|
function dialogQuestions(question) {
|
|
@@ -48401,7 +48465,7 @@ function QuestionDialog({ question, columns, onAnswer }) {
|
|
|
48401
48465
|
const count2 = items.length;
|
|
48402
48466
|
const lone = count2 === 1;
|
|
48403
48467
|
const width = Math.max(10, (columns ?? terminal.columns ?? 80) - 4);
|
|
48404
|
-
const state = (0,
|
|
48468
|
+
const state = (0, import_react48.useRef)({
|
|
48405
48469
|
tab: 0,
|
|
48406
48470
|
cursors: items.map(() => 0),
|
|
48407
48471
|
picked: items.map(() => []),
|
|
@@ -48409,8 +48473,8 @@ function QuestionDialog({ question, columns, onAnswer }) {
|
|
|
48409
48473
|
typing: null,
|
|
48410
48474
|
reviewCursor: 0
|
|
48411
48475
|
});
|
|
48412
|
-
const [, redraw] = (0,
|
|
48413
|
-
const done = (0,
|
|
48476
|
+
const [, redraw] = (0, import_react48.useState)(0);
|
|
48477
|
+
const done = (0, import_react48.useRef)(false);
|
|
48414
48478
|
const s = state.current;
|
|
48415
48479
|
const picks = /* @__PURE__ */ __name(() => ({ picked: s.picked, text: s.text }), "picks");
|
|
48416
48480
|
const finish = /* @__PURE__ */ __name((answer, summary2 = []) => {
|
|
@@ -49249,7 +49313,7 @@ function RewindConfirm({ rows, state, options, now }) {
|
|
|
49249
49313
|
__name(RewindConfirm, "RewindConfirm");
|
|
49250
49314
|
|
|
49251
49315
|
// src/tui/SaveSkillOverlay.tsx
|
|
49252
|
-
var
|
|
49316
|
+
var import_react49 = __toESM(require_react(), 1);
|
|
49253
49317
|
var import_jsx_runtime26 = __toESM(require_jsx_runtime(), 1);
|
|
49254
49318
|
var SAVE_SKILL_CHOICES = [
|
|
49255
49319
|
{ answer: "user", label: "Save to user" },
|
|
@@ -49287,8 +49351,8 @@ function targetLines(target, cwd2, suggested) {
|
|
|
49287
49351
|
__name(targetLines, "targetLines");
|
|
49288
49352
|
function SaveSkillOverlay({ request, cwd: cwd2, columns, rows, onAnswer }) {
|
|
49289
49353
|
const width = Math.max(20, (columns ?? 80) - 4);
|
|
49290
|
-
const [selected, setSelected] = (0,
|
|
49291
|
-
const [offset, setOffset] = (0,
|
|
49354
|
+
const [selected, setSelected] = (0, import_react49.useState)(SAVE_SKILL_CHOICES.length - 1);
|
|
49355
|
+
const [offset, setOffset] = (0, import_react49.useState)(0);
|
|
49292
49356
|
const header = [
|
|
49293
49357
|
`Save skill "${request.draft.name}"? PROPOSED BY THE MODEL \u2014 a skill is read by every later conversation that loads it.`,
|
|
49294
49358
|
`Origin ${request.draft.origin}`,
|
|
@@ -49377,7 +49441,7 @@ function SaveSkillOverlay({ request, cwd: cwd2, columns, rows, onAnswer }) {
|
|
|
49377
49441
|
__name(SaveSkillOverlay, "SaveSkillOverlay");
|
|
49378
49442
|
|
|
49379
49443
|
// src/tui/ScheduleReviewOverlay.tsx
|
|
49380
|
-
var
|
|
49444
|
+
var import_react50 = __toESM(require_react(), 1);
|
|
49381
49445
|
var import_jsx_runtime27 = __toESM(require_jsx_runtime(), 1);
|
|
49382
49446
|
function choices(action) {
|
|
49383
49447
|
return action === "create" ? [
|
|
@@ -49417,6 +49481,9 @@ function scheduleReviewSummary(request) {
|
|
|
49417
49481
|
`Tokens ${preview3.budget.tokenBudget === 0 ? "No token limit per run" : `Up to ${preview3.budget.tokenBudget.toLocaleString("en-US")} per run`}`
|
|
49418
49482
|
],
|
|
49419
49483
|
...preview3.script?.report === "json-v1" ? ["Script report JSON v1: quiet/changed; optional scheduler state."] : [],
|
|
49484
|
+
...preview3.gate ? [
|
|
49485
|
+
"Gate A command runs before every run on your computer as you; the model is called only when it exits 0 and prints something. Read it below."
|
|
49486
|
+
] : [],
|
|
49420
49487
|
...preview3.networkAccess ? ["Network This run can reach the network."] : [],
|
|
49421
49488
|
...preview3.notifyOnFinish === false ? ["Notices Generic success notices off; failures still notify."] : [],
|
|
49422
49489
|
...request.permissionsChange ? ["Permissions change from the next run."] : [],
|
|
@@ -49456,6 +49523,7 @@ function compactSummary(request) {
|
|
|
49456
49523
|
preview3.workspace === "none" ? "Host script \xB7 private no-project workspace; host authority" : "Host script \xB7 folder is cwd, not a write boundary"
|
|
49457
49524
|
] : [`When ${preview3.schedule}`],
|
|
49458
49525
|
...script ? ["Shell checks only; interpreter code needs review"] : [],
|
|
49526
|
+
...preview3.gate ? ["Gate command runs first on your computer; read it below"] : [],
|
|
49459
49527
|
...preview3.script?.report === "json-v1" ? ["JSON v1 report \xB7 quiet/changed"] : [],
|
|
49460
49528
|
`${preview3.networkAccess ? "Network access \xB7 " : ""}${warningCount} warning${warningCount === 1 ? "" : "s"} \xB7 read details`
|
|
49461
49529
|
];
|
|
@@ -49469,9 +49537,9 @@ function ScheduleReviewOverlay({
|
|
|
49469
49537
|
}) {
|
|
49470
49538
|
const width = Math.max(20, (columns ?? 80) - 4);
|
|
49471
49539
|
const options = choices(request.action);
|
|
49472
|
-
const [selected, setSelected] = (0,
|
|
49473
|
-
const [offset, setOffset] = (0,
|
|
49474
|
-
const [reachedEnd, setReachedEnd] = (0,
|
|
49540
|
+
const [selected, setSelected] = (0, import_react50.useState)(0);
|
|
49541
|
+
const [offset, setOffset] = (0, import_react50.useState)(0);
|
|
49542
|
+
const [reachedEnd, setReachedEnd] = (0, import_react50.useState)(false);
|
|
49475
49543
|
const terminalRows = rows ?? 24;
|
|
49476
49544
|
const canReview = terminalRows >= 14 && (columns ?? 80) >= 60;
|
|
49477
49545
|
const summary2 = scheduleReviewSummary(request);
|
|
@@ -49481,7 +49549,7 @@ function ScheduleReviewOverlay({
|
|
|
49481
49549
|
text: truncateChoiceText(terminalDisplayText(line), width),
|
|
49482
49550
|
continued: false
|
|
49483
49551
|
}));
|
|
49484
|
-
const body = (0,
|
|
49552
|
+
const body = (0, import_react50.useMemo)(() => wrapExact(request.fullText, width - 2), [request.fullText, width]);
|
|
49485
49553
|
const chrome = summaryRows.length + 5;
|
|
49486
49554
|
const window2 = Math.max(1, terminalRows - chrome);
|
|
49487
49555
|
const last = Math.max(0, body.length - window2);
|
|
@@ -49966,7 +50034,7 @@ function TaskList({ tasks, expanded = false }) {
|
|
|
49966
50034
|
__name(TaskList, "TaskList");
|
|
49967
50035
|
|
|
49968
50036
|
// src/tui/TextPrompt.tsx
|
|
49969
|
-
var
|
|
50037
|
+
var import_react51 = __toESM(require_react(), 1);
|
|
49970
50038
|
var import_jsx_runtime30 = __toESM(require_jsx_runtime(), 1);
|
|
49971
50039
|
var graphemeSegmenter2 = new Intl.Segmenter(void 0, {
|
|
49972
50040
|
granularity: "grapheme"
|
|
@@ -50057,19 +50125,19 @@ function TextPrompt({
|
|
|
50057
50125
|
const terminal = use_window_size_default();
|
|
50058
50126
|
const contentWidth = Math.max(1, (columns ?? terminal.columns ?? 80) - 4);
|
|
50059
50127
|
const inputWidth = Math.max(1, contentWidth - 2);
|
|
50060
|
-
const [value, setValueState] = (0,
|
|
50061
|
-
const valueRef = (0,
|
|
50062
|
-
const [cursor, setCursorState] = (0,
|
|
50063
|
-
const cursorRef = (0,
|
|
50064
|
-
const [notice, setNotice] = (0,
|
|
50065
|
-
const setBuffer = (0,
|
|
50128
|
+
const [value, setValueState] = (0, import_react51.useState)(initialValue);
|
|
50129
|
+
const valueRef = (0, import_react51.useRef)(initialValue);
|
|
50130
|
+
const [cursor, setCursorState] = (0, import_react51.useState)(initialValue.length);
|
|
50131
|
+
const cursorRef = (0, import_react51.useRef)(initialValue.length);
|
|
50132
|
+
const [notice, setNotice] = (0, import_react51.useState)(null);
|
|
50133
|
+
const setBuffer = (0, import_react51.useCallback)((next, nextCursor = next.length) => {
|
|
50066
50134
|
valueRef.current = next;
|
|
50067
50135
|
cursorRef.current = nextCursor;
|
|
50068
50136
|
setValueState(next);
|
|
50069
50137
|
setCursorState(nextCursor);
|
|
50070
50138
|
setNotice(null);
|
|
50071
50139
|
}, []);
|
|
50072
|
-
const setCursor = (0,
|
|
50140
|
+
const setCursor = (0, import_react51.useCallback)((next) => {
|
|
50073
50141
|
cursorRef.current = next;
|
|
50074
50142
|
setCursorState(next);
|
|
50075
50143
|
}, []);
|
|
@@ -50217,7 +50285,7 @@ function ThemeSample({ width }) {
|
|
|
50217
50285
|
__name(ThemeSample, "ThemeSample");
|
|
50218
50286
|
|
|
50219
50287
|
// src/tui/TranscriptScrollView.tsx
|
|
50220
|
-
var
|
|
50288
|
+
var import_react52 = __toESM(require_react(), 1);
|
|
50221
50289
|
|
|
50222
50290
|
// src/tui/transcript-scroll.ts
|
|
50223
50291
|
var GUTTER = 2;
|
|
@@ -50386,13 +50454,13 @@ function TranscriptScrollView({
|
|
|
50386
50454
|
columns,
|
|
50387
50455
|
onClose
|
|
50388
50456
|
}) {
|
|
50389
|
-
const rows = (0,
|
|
50457
|
+
const rows = (0, import_react52.useMemo)(
|
|
50390
50458
|
() => transcriptScrollRows(messages, pending, pendingAt, columns),
|
|
50391
50459
|
[messages, pending, pendingAt, columns]
|
|
50392
50460
|
);
|
|
50393
|
-
const [state, setState] = (0,
|
|
50461
|
+
const [state, setState] = (0, import_react52.useState)(() => openScroll(rows, height));
|
|
50394
50462
|
const view = state === null ? "latest" : syncScroll(state, rows, height);
|
|
50395
|
-
(0,
|
|
50463
|
+
(0, import_react52.useEffect)(() => {
|
|
50396
50464
|
if (view === "latest") {
|
|
50397
50465
|
onClose();
|
|
50398
50466
|
return;
|
|
@@ -51762,7 +51830,7 @@ __name(editDraftInExternalEditor, "editDraftInExternalEditor");
|
|
|
51762
51830
|
async function runEditorProcess(command, draftPath, options) {
|
|
51763
51831
|
const executable = command[0];
|
|
51764
51832
|
if (!executable) throw new ExternalEditorError("the editor command is empty");
|
|
51765
|
-
await new Promise((
|
|
51833
|
+
await new Promise((resolve9, reject) => {
|
|
51766
51834
|
let settled2 = false;
|
|
51767
51835
|
const settle = /* @__PURE__ */ __name((action) => {
|
|
51768
51836
|
if (settled2) return;
|
|
@@ -51789,7 +51857,7 @@ async function runEditorProcess(command, draftPath, options) {
|
|
|
51789
51857
|
child.once(
|
|
51790
51858
|
"exit",
|
|
51791
51859
|
(code, signal) => settle(() => {
|
|
51792
|
-
if (code === 0)
|
|
51860
|
+
if (code === 0) resolve9();
|
|
51793
51861
|
else if (signal) reject(new ExternalEditorError(`the editor stopped on signal ${signal}`));
|
|
51794
51862
|
else reject(new ExternalEditorError(`the editor exited with status ${code ?? "unknown"}`));
|
|
51795
51863
|
})
|
|
@@ -51808,7 +51876,7 @@ async function fastModeBlocker(providerId, model, now = Date.now(), otherHost =
|
|
|
51808
51876
|
return `Fast mode is offered on the vendor's own endpoint only, and requests here go to ${otherHost}.`;
|
|
51809
51877
|
}
|
|
51810
51878
|
if (!model) return "Fast mode needs a model; pick one with /model.";
|
|
51811
|
-
const { resolveFastModeVerdict } = await import("./dist-
|
|
51879
|
+
const { resolveFastModeVerdict } = await import("./dist-F36KOHDP.js");
|
|
51812
51880
|
const verdict = resolveFastModeVerdict(model, now);
|
|
51813
51881
|
return verdict.ok ? void 0 : verdict.reason;
|
|
51814
51882
|
}
|
|
@@ -51831,7 +51899,7 @@ function fastDroppedMessage(reason) {
|
|
|
51831
51899
|
__name(fastDroppedMessage, "fastDroppedMessage");
|
|
51832
51900
|
|
|
51833
51901
|
// src/tui/fullscreen/FullscreenTranscript.tsx
|
|
51834
|
-
var
|
|
51902
|
+
var import_react54 = __toESM(require_react(), 1);
|
|
51835
51903
|
|
|
51836
51904
|
// src/tui/fullscreen/joiners.ts
|
|
51837
51905
|
var BLANK = /^\s$/u;
|
|
@@ -51858,7 +51926,7 @@ function wrapJoiners(source, rows) {
|
|
|
51858
51926
|
__name(wrapJoiners, "wrapJoiners");
|
|
51859
51927
|
|
|
51860
51928
|
// src/tui/fullscreen/markdown-rows.ts
|
|
51861
|
-
var
|
|
51929
|
+
var import_react53 = __toESM(require_react(), 1);
|
|
51862
51930
|
|
|
51863
51931
|
// src/tui/fullscreen/rows.ts
|
|
51864
51932
|
function plainRow(row2, joins = null) {
|
|
@@ -51919,22 +51987,42 @@ __name(wrappedRows, "wrappedRows");
|
|
|
51919
51987
|
function codeLine2(line, width) {
|
|
51920
51988
|
if (stringWidth(line) <= width) return [line];
|
|
51921
51989
|
const drawn = render_to_string_default(
|
|
51922
|
-
(0,
|
|
51990
|
+
(0, import_react53.createElement)(Box_default, { width }, (0, import_react53.createElement)(Text, { wrap: "wrap" }, line)),
|
|
51923
51991
|
{ columns: width }
|
|
51924
51992
|
);
|
|
51925
51993
|
return drawn.split("\n");
|
|
51926
51994
|
}
|
|
51927
51995
|
__name(codeLine2, "codeLine");
|
|
51928
|
-
function blockRows(block, width, color) {
|
|
51996
|
+
function blockRows(block, width, color, italic) {
|
|
51997
|
+
const prose = /* @__PURE__ */ __name((s) => italic ? { ...s, italic: true } : s, "prose");
|
|
51929
51998
|
switch (block.type) {
|
|
51930
51999
|
case "heading": {
|
|
51931
|
-
const
|
|
52000
|
+
const style = headingStyle(block.level);
|
|
52001
|
+
const headingColor = style.color === "accent" ? theme.accent.user : style.color === "muted" ? theme.text.muted : color;
|
|
52002
|
+
const { lines: lines2, joins } = wrappedRows(
|
|
52003
|
+
block.text,
|
|
52004
|
+
width,
|
|
52005
|
+
headingColor,
|
|
52006
|
+
(s) => prose({ ...s, bold: true, ...style.underline ? { underline: true } : {} })
|
|
52007
|
+
);
|
|
51932
52008
|
return lines2.map((line, i) => row(line, joins[i] ?? null));
|
|
51933
52009
|
}
|
|
52010
|
+
case "rule":
|
|
52011
|
+
return [row([{ text: "\u2500".repeat(ruleWidth(width)), color: theme.border.default }])];
|
|
52012
|
+
case "quote": {
|
|
52013
|
+
const inner = block.blocks.length > 0 ? blocksRows(block.blocks, width - QUOTE_BAR_WIDTH, color, true) : [row([])];
|
|
52014
|
+
return inner.map(
|
|
52015
|
+
(r) => row(
|
|
52016
|
+
[{ text: QUOTE_BAR, color: theme.border.default }, { text: " " }, ...r.spans],
|
|
52017
|
+
r.joins,
|
|
52018
|
+
r.lead + QUOTE_BAR_WIDTH
|
|
52019
|
+
)
|
|
52020
|
+
);
|
|
52021
|
+
}
|
|
51934
52022
|
case "bullet": {
|
|
51935
52023
|
const marker = block.ordered ? `${block.marker}.` : block.marker;
|
|
51936
52024
|
const lead = marker.length + 1;
|
|
51937
|
-
const { lines: lines2, joins } = wrappedRows(block.text, width - lead, color,
|
|
52025
|
+
const { lines: lines2, joins } = wrappedRows(block.text, width - lead, color, prose);
|
|
51938
52026
|
return lines2.map(
|
|
51939
52027
|
(line, i) => row(
|
|
51940
52028
|
[
|
|
@@ -51962,23 +52050,26 @@ function blockRows(block, width, color) {
|
|
|
51962
52050
|
);
|
|
51963
52051
|
});
|
|
51964
52052
|
default: {
|
|
51965
|
-
const { lines: lines2, joins } = wrappedRows(block.text, width, color,
|
|
52053
|
+
const { lines: lines2, joins } = wrappedRows(block.text, width, color, prose);
|
|
51966
52054
|
return lines2.map((line, i) => row(line, joins[i] ?? null));
|
|
51967
52055
|
}
|
|
51968
52056
|
}
|
|
51969
52057
|
}
|
|
51970
52058
|
__name(blockRows, "blockRows");
|
|
51971
|
-
function
|
|
51972
|
-
const blocks = parseMarkdown(terminalDisplayText(text));
|
|
52059
|
+
function blocksRows(blocks, width, color, italic) {
|
|
51973
52060
|
const rows = [];
|
|
51974
52061
|
blocks.forEach((block, i) => {
|
|
51975
52062
|
const prev = blocks[i - 1];
|
|
51976
52063
|
const gap = !prev || block.type === "bullet" && prev.type === "bullet" ? 0 : 1;
|
|
51977
52064
|
if (gap) rows.push(row([]));
|
|
51978
|
-
rows.push(...blockRows(block, width, color));
|
|
52065
|
+
rows.push(...blockRows(block, width, color, italic));
|
|
51979
52066
|
});
|
|
51980
52067
|
return rows;
|
|
51981
52068
|
}
|
|
52069
|
+
__name(blocksRows, "blocksRows");
|
|
52070
|
+
function markdownRows(text, width, color) {
|
|
52071
|
+
return blocksRows(parseMarkdown(terminalDisplayText(text)), width, color, false);
|
|
52072
|
+
}
|
|
51982
52073
|
__name(markdownRows, "markdownRows");
|
|
51983
52074
|
|
|
51984
52075
|
// src/tui/fullscreen/viewport.ts
|
|
@@ -52534,16 +52625,16 @@ function FullscreenTranscript({
|
|
|
52534
52625
|
control,
|
|
52535
52626
|
noteMs
|
|
52536
52627
|
}) {
|
|
52537
|
-
const cache3 = (0,
|
|
52628
|
+
const cache3 = (0, import_react54.useRef)(createLayoutCache()).current;
|
|
52538
52629
|
const epoch = useThemeEpoch();
|
|
52539
52630
|
const click = subscribePointer !== void 0;
|
|
52540
|
-
const [open, setOpen] = (0,
|
|
52541
|
-
const openRef = (0,
|
|
52542
|
-
const { rows, index } = (0,
|
|
52631
|
+
const [open, setOpen] = (0, import_react54.useState)(() => /* @__PURE__ */ new Set());
|
|
52632
|
+
const openRef = (0, import_react54.useRef)(open);
|
|
52633
|
+
const { rows, index } = (0, import_react54.useMemo)(
|
|
52543
52634
|
() => layoutTranscript(messages, pending, pendingAt, columns, cache3, { click, open }),
|
|
52544
52635
|
[messages, pending, pendingAt, columns, cache3, epoch, click, open]
|
|
52545
52636
|
);
|
|
52546
|
-
(0,
|
|
52637
|
+
(0, import_react54.useEffect)(() => {
|
|
52547
52638
|
if (open.size === 0) return;
|
|
52548
52639
|
const present = new Set(index.ids);
|
|
52549
52640
|
const kept = [...open].filter((id) => present.has(id));
|
|
@@ -52552,10 +52643,10 @@ function FullscreenTranscript({
|
|
|
52552
52643
|
openRef.current = next;
|
|
52553
52644
|
setOpen(next);
|
|
52554
52645
|
}, [open, index]);
|
|
52555
|
-
const [view, setView] = (0,
|
|
52556
|
-
const boxRef = (0,
|
|
52557
|
-
const roomRef = (0,
|
|
52558
|
-
const room = (0,
|
|
52646
|
+
const [view, setView] = (0, import_react54.useState)(FOLLOWING);
|
|
52647
|
+
const boxRef = (0, import_react54.useRef)(null);
|
|
52648
|
+
const roomRef = (0, import_react54.useRef)(maxRows);
|
|
52649
|
+
const room = (0, import_react54.useCallback)(() => {
|
|
52559
52650
|
const node = boxRef.current;
|
|
52560
52651
|
if (node) {
|
|
52561
52652
|
const measured = measure_element_default(node).height;
|
|
@@ -52564,32 +52655,32 @@ function FullscreenTranscript({
|
|
|
52564
52655
|
return Math.max(1, Math.min(roomRef.current, maxRows) - 1);
|
|
52565
52656
|
}, [maxRows]);
|
|
52566
52657
|
const synced = syncView(view, index, Math.max(1, roomRef.current - 1));
|
|
52567
|
-
(0,
|
|
52658
|
+
(0, import_react54.useEffect)(() => {
|
|
52568
52659
|
if (synced !== view) setView(synced);
|
|
52569
52660
|
}, [synced, view]);
|
|
52570
|
-
const latest = (0,
|
|
52661
|
+
const latest = (0, import_react54.useRef)({ synced, index, rows, messages, pending, pendingAt, columns });
|
|
52571
52662
|
latest.current = { synced, index, rows, messages, pending, pendingAt, columns };
|
|
52572
|
-
const scroll = (0,
|
|
52663
|
+
const scroll = (0, import_react54.useCallback)(
|
|
52573
52664
|
(move) => {
|
|
52574
52665
|
const { synced: state, index: now } = latest.current;
|
|
52575
52666
|
setView(moveView(state, move, now, room()));
|
|
52576
52667
|
},
|
|
52577
52668
|
[room]
|
|
52578
52669
|
);
|
|
52579
|
-
(0,
|
|
52670
|
+
(0, import_react54.useEffect)(
|
|
52580
52671
|
() => subscribeWheel((direction) => scroll(direction === "up" ? "line-up" : "line-down")),
|
|
52581
52672
|
[subscribeWheel, scroll]
|
|
52582
52673
|
);
|
|
52583
52674
|
const textWidth = Math.max(1, columns - GUTTER2);
|
|
52584
|
-
const [selection, setSelection] = (0,
|
|
52585
|
-
const selectionRef = (0,
|
|
52586
|
-
const updateSelection = (0,
|
|
52675
|
+
const [selection, setSelection] = (0, import_react54.useState)(null);
|
|
52676
|
+
const selectionRef = (0, import_react54.useRef)(null);
|
|
52677
|
+
const updateSelection = (0, import_react54.useCallback)((next) => {
|
|
52587
52678
|
selectionRef.current = next;
|
|
52588
52679
|
setSelection(next);
|
|
52589
52680
|
}, []);
|
|
52590
|
-
const [note, setNote] = (0,
|
|
52591
|
-
const noteTimer = (0,
|
|
52592
|
-
const showNote = (0,
|
|
52681
|
+
const [note, setNote] = (0, import_react54.useState)(null);
|
|
52682
|
+
const noteTimer = (0, import_react54.useRef)(null);
|
|
52683
|
+
const showNote = (0, import_react54.useCallback)(
|
|
52593
52684
|
(report) => {
|
|
52594
52685
|
setNote(report);
|
|
52595
52686
|
if (noteTimer.current) clearTimeout(noteTimer.current);
|
|
@@ -52603,19 +52694,19 @@ function FullscreenTranscript({
|
|
|
52603
52694
|
},
|
|
52604
52695
|
[noteMs]
|
|
52605
52696
|
);
|
|
52606
|
-
(0,
|
|
52697
|
+
(0, import_react54.useEffect)(
|
|
52607
52698
|
() => () => {
|
|
52608
52699
|
if (noteTimer.current) clearTimeout(noteTimer.current);
|
|
52609
52700
|
},
|
|
52610
52701
|
[]
|
|
52611
52702
|
);
|
|
52612
|
-
const widthRef = (0,
|
|
52613
|
-
(0,
|
|
52703
|
+
const widthRef = (0, import_react54.useRef)(textWidth);
|
|
52704
|
+
(0, import_react54.useEffect)(() => {
|
|
52614
52705
|
if (widthRef.current === textWidth) return;
|
|
52615
52706
|
widthRef.current = textWidth;
|
|
52616
52707
|
if (selectionRef.current) updateSelection(null);
|
|
52617
52708
|
}, [textWidth, updateSelection]);
|
|
52618
|
-
const copySelection = (0,
|
|
52709
|
+
const copySelection = (0, import_react54.useCallback)(
|
|
52619
52710
|
(dragging) => {
|
|
52620
52711
|
const { rows: now } = latest.current;
|
|
52621
52712
|
const text = selectedText(now, textWidth, dragging.selection);
|
|
@@ -52627,8 +52718,8 @@ function FullscreenTranscript({
|
|
|
52627
52718
|
},
|
|
52628
52719
|
[copy, showNote, textWidth, updateSelection]
|
|
52629
52720
|
);
|
|
52630
|
-
const clicks = (0,
|
|
52631
|
-
const geometryRef = (0,
|
|
52721
|
+
const clicks = (0, import_react54.useRef)(new ClickCounter(() => Date.now(), DOUBLE_CLICK_MS)).current;
|
|
52722
|
+
const geometryRef = (0, import_react54.useRef)({
|
|
52632
52723
|
top: 1,
|
|
52633
52724
|
height: maxRows,
|
|
52634
52725
|
from: 0,
|
|
@@ -52637,7 +52728,7 @@ function FullscreenTranscript({
|
|
|
52637
52728
|
left: 1 + SCREEN_PADDING + GUTTER2,
|
|
52638
52729
|
cols: textWidth
|
|
52639
52730
|
});
|
|
52640
|
-
const toggleAt = (0,
|
|
52731
|
+
const toggleAt = (0, import_react54.useCallback)(
|
|
52641
52732
|
(line) => {
|
|
52642
52733
|
const now = latest.current;
|
|
52643
52734
|
const { id, offset } = anchorAt(now.index, line);
|
|
@@ -52659,7 +52750,7 @@ function FullscreenTranscript({
|
|
|
52659
52750
|
},
|
|
52660
52751
|
[cache3, click, room]
|
|
52661
52752
|
);
|
|
52662
|
-
const pointer = (0,
|
|
52753
|
+
const pointer = (0, import_react54.useCallback)(
|
|
52663
52754
|
(report) => {
|
|
52664
52755
|
const node = boxRef.current;
|
|
52665
52756
|
const geometry = {
|
|
@@ -52714,19 +52805,19 @@ function FullscreenTranscript({
|
|
|
52714
52805
|
},
|
|
52715
52806
|
[clicks, click, copyOnSelect, copySelection, scroll, showNote, toggleAt, updateSelection]
|
|
52716
52807
|
);
|
|
52717
|
-
(0,
|
|
52808
|
+
(0, import_react54.useEffect)(
|
|
52718
52809
|
() => subscribePointer ? subscribePointer(pointer) : void 0,
|
|
52719
52810
|
[subscribePointer, pointer]
|
|
52720
52811
|
);
|
|
52721
|
-
const [search, setSearch] = (0,
|
|
52722
|
-
const searchRef = (0,
|
|
52723
|
-
const savedView = (0,
|
|
52724
|
-
const matches = (0,
|
|
52812
|
+
const [search, setSearch] = (0, import_react54.useState)(null);
|
|
52813
|
+
const searchRef = (0, import_react54.useRef)(null);
|
|
52814
|
+
const savedView = (0, import_react54.useRef)(FOLLOWING);
|
|
52815
|
+
const matches = (0, import_react54.useMemo)(
|
|
52725
52816
|
() => search ? findMatches(rows, search.query) : [],
|
|
52726
52817
|
[rows, search]
|
|
52727
52818
|
);
|
|
52728
52819
|
const currentIndex = search?.cursor ? matches.findIndex((m) => m.row === search.cursor?.row && m.from === search.cursor?.from) : -1;
|
|
52729
|
-
const updateSearch = (0,
|
|
52820
|
+
const updateSearch = (0, import_react54.useCallback)(
|
|
52730
52821
|
(next) => {
|
|
52731
52822
|
const was = searchRef.current !== null;
|
|
52732
52823
|
searchRef.current = next;
|
|
@@ -52735,7 +52826,7 @@ function FullscreenTranscript({
|
|
|
52735
52826
|
},
|
|
52736
52827
|
[onSearchChange]
|
|
52737
52828
|
);
|
|
52738
|
-
const goTo = (0,
|
|
52829
|
+
const goTo = (0, import_react54.useCallback)(
|
|
52739
52830
|
(match) => {
|
|
52740
52831
|
if (!match) return;
|
|
52741
52832
|
const { synced: state, index: now } = latest.current;
|
|
@@ -52743,15 +52834,15 @@ function FullscreenTranscript({
|
|
|
52743
52834
|
},
|
|
52744
52835
|
[room]
|
|
52745
52836
|
);
|
|
52746
|
-
const openSearch = (0,
|
|
52837
|
+
const openSearch = (0, import_react54.useCallback)(() => {
|
|
52747
52838
|
savedView.current = latest.current.synced;
|
|
52748
52839
|
updateSearch({ query: "", cursor: null });
|
|
52749
52840
|
}, [updateSearch]);
|
|
52750
|
-
const closeSearch = (0,
|
|
52841
|
+
const closeSearch = (0, import_react54.useCallback)(() => {
|
|
52751
52842
|
setView(savedView.current.follow ? FOLLOWING : savedView.current);
|
|
52752
52843
|
updateSearch(null);
|
|
52753
52844
|
}, [updateSearch]);
|
|
52754
|
-
(0,
|
|
52845
|
+
(0, import_react54.useEffect)(() => {
|
|
52755
52846
|
control.current = {
|
|
52756
52847
|
scroll,
|
|
52757
52848
|
takeEscape: /* @__PURE__ */ __name(() => {
|
|
@@ -52778,7 +52869,7 @@ function FullscreenTranscript({
|
|
|
52778
52869
|
control.current = null;
|
|
52779
52870
|
};
|
|
52780
52871
|
}, [control, scroll, closeSearch, updateSelection, copyOnSelect, copySelection]);
|
|
52781
|
-
(0,
|
|
52872
|
+
(0, import_react54.useEffect)(() => {
|
|
52782
52873
|
if (!keysActive && searchRef.current) closeSearch();
|
|
52783
52874
|
}, [keysActive, closeSearch]);
|
|
52784
52875
|
use_input_default(
|
|
@@ -53392,11 +53483,11 @@ var AskQueue = class {
|
|
|
53392
53483
|
enqueue(value, options = {}) {
|
|
53393
53484
|
const signal = options.signal;
|
|
53394
53485
|
if (signal?.aborted) return Promise.resolve(CLOSED_QUESTION);
|
|
53395
|
-
return new Promise((
|
|
53486
|
+
return new Promise((resolve9) => {
|
|
53396
53487
|
const onAbort = /* @__PURE__ */ __name(() => this.#close(ask, CLOSED_QUESTION), "onAbort");
|
|
53397
53488
|
const ask = {
|
|
53398
53489
|
value,
|
|
53399
|
-
resolve:
|
|
53490
|
+
resolve: resolve9,
|
|
53400
53491
|
background: options.background === true,
|
|
53401
53492
|
detach: /* @__PURE__ */ __name(() => signal?.removeEventListener("abort", onAbort), "detach")
|
|
53402
53493
|
};
|
|
@@ -54415,7 +54506,7 @@ async function listScheduleJobs(ctx) {
|
|
|
54415
54506
|
const tz = job.schedule.kind === "cron" ? job.schedule.tz : hostTimeZone();
|
|
54416
54507
|
const state = readState(paths, job.id);
|
|
54417
54508
|
const mark = state.activeRun?.status === "awaiting-approval" ? state.activeRun.handoff ? ` [${parkedRunWords(state.activeRun)}]` : " [waiting for your approval]" : job.state === "pending-confirmation" ? " [needs confirmation]" : job.state === "active" && !confirmationHolds(job) ? " [on hold: changed outside namzu]" : state.activeRun?.status === "running" ? " [running]" : "";
|
|
54418
|
-
const kind = job.runKind === "script" ? " [script, 0 tokens]" : job.runKind === "script+agent" ? " [script+agent]" : "";
|
|
54509
|
+
const kind = job.runKind === "script" ? " [script, 0 tokens]" : job.runKind === "script+agent" ? " [script+agent]" : job.gate ? " [gate]" : "";
|
|
54419
54510
|
lines2.push(
|
|
54420
54511
|
`${job.name} [${job.state}]${kind}${mark}
|
|
54421
54512
|
${describeSchedule(job.schedule, { tz })} \xB7 next ${when(nextFireOf(job, state), tz)}${state.lastRun ? ` \xB7 last ${state.lastRun.status}${callsCount(state.lastRun) ? ` (${callsCount(state.lastRun)})` : ""} ${when(state.lastRun.endedAt, tz)}` : ""}
|
|
@@ -54487,6 +54578,11 @@ async function confirmInTui(ctx, job, verb) {
|
|
|
54487
54578
|
return "cancel";
|
|
54488
54579
|
}
|
|
54489
54580
|
}
|
|
54581
|
+
const gateProblem = gateRefusal(job, layers, paths.home);
|
|
54582
|
+
if (gateProblem) {
|
|
54583
|
+
say(`${gateProblem.charAt(0).toUpperCase()}${gateProblem.slice(1)}`);
|
|
54584
|
+
return "cancel";
|
|
54585
|
+
}
|
|
54490
54586
|
const scriptSection = runKind !== "agent" && job.script ? [
|
|
54491
54587
|
`${runKind === "script" ? "Script" : "Wake-gate script"} (exactly as it will run, ${job.script.shell}; shell commands checked against the scheduled-run floor and deny rules)`,
|
|
54492
54588
|
...job.script.body.split("\n").map((line) => ` \u2502 ${line}`),
|
|
@@ -54501,6 +54597,7 @@ async function confirmInTui(ctx, job, verb) {
|
|
|
54501
54597
|
...previewLines(job, policy, now),
|
|
54502
54598
|
...changesBlock(changesSinceConfirmed(readHistory(paths, job.id))),
|
|
54503
54599
|
...scriptSection,
|
|
54600
|
+
...job.gate ? gateLines(job.gate) : [],
|
|
54504
54601
|
...runKind === "script" ? [] : [
|
|
54505
54602
|
runKind === "script+agent" ? "Prompt (used only when the wake-gate says wake: true)" : "Prompt",
|
|
54506
54603
|
...job.prompt.split("\n").map((l) => ` \u2502 ${l}`)
|
|
@@ -54525,6 +54622,7 @@ async function confirmInTui(ctx, job, verb) {
|
|
|
54525
54622
|
prompt: job.prompt,
|
|
54526
54623
|
...hasScript ? { runKind } : {},
|
|
54527
54624
|
...job.script ? { script: job.script } : {},
|
|
54625
|
+
...job.gate ? { gate: job.gate } : {},
|
|
54528
54626
|
schedule: describeSchedule(job.schedule, { tz }),
|
|
54529
54627
|
nextFireTimes: upcomingFireTimes(job.schedule, now, 3).map((fire) => fire.toISOString()),
|
|
54530
54628
|
rules: policy.lines,
|
|
@@ -55202,6 +55300,10 @@ function confirmationBody(p, findings, lines2) {
|
|
|
55202
55300
|
] : [],
|
|
55203
55301
|
p.runKind === "script" ? "Runs exactly as shown; code passed to another interpreter is not parsed by the shell checker and must be reviewed here" : "Runs exactly as shown; code passed to another interpreter is not parsed by the shell checker, and the permission set governs the agent phase"
|
|
55204
55302
|
] : [];
|
|
55303
|
+
const gateSection = p.gate ? [
|
|
55304
|
+
`Gate (set by the operator, run before every run, exactly as it will run, ${p.gate.shell}, up to ${p.gate.timeoutMs / 1e3} s; the model is called only if it exits 0 and prints something)`,
|
|
55305
|
+
...p.gate.command.split("\n").map((l) => ` \u2502 ${l}`)
|
|
55306
|
+
] : [];
|
|
55205
55307
|
const promptSection = p.prompt.trim() ? [
|
|
55206
55308
|
p.runKind === "script+agent" ? "Prompt (used only when the wake-gate says wake: true)" : "Prompt (exactly as the run will read it)",
|
|
55207
55309
|
...p.prompt.split("\n").map((l) => ` \u2502 ${l}`)
|
|
@@ -55212,6 +55314,7 @@ function confirmationBody(p, findings, lines2) {
|
|
|
55212
55314
|
...p.warnings.filter((w) => !(p.networkAccess && w === "This run can reach the network.")).map((w) => `Warning ${w}`),
|
|
55213
55315
|
...findings.map((f) => `Warning ${f}`),
|
|
55214
55316
|
...scriptSection,
|
|
55317
|
+
...gateSection,
|
|
55215
55318
|
...promptSection
|
|
55216
55319
|
];
|
|
55217
55320
|
}
|
|
@@ -55296,6 +55399,10 @@ function updateRequest(current, changes, cwd2, fallbackModel) {
|
|
|
55296
55399
|
...runKind ? { runKind } : {},
|
|
55297
55400
|
...script ? { script } : {},
|
|
55298
55401
|
...runKind === "script+agent" && current.wakeGate ? { wakeGate: current.wakeGate } : {},
|
|
55402
|
+
// The tool never sets or changes a gate; the job's own is carried
|
|
55403
|
+
// through unchanged, so an update that touches nothing else keeps it
|
|
55404
|
+
// (and `buildJob` refuses a kind change that would strand it).
|
|
55405
|
+
...current.gate ? { gate: current.gate } : {},
|
|
55299
55406
|
permissions,
|
|
55300
55407
|
budget: { ...current.budget, ...changes.budget ?? {} },
|
|
55301
55408
|
...runKind === "script" ? {} : current.model ? {
|
|
@@ -55380,11 +55487,14 @@ function createScheduleToolHost(ui) {
|
|
|
55380
55487
|
);
|
|
55381
55488
|
}
|
|
55382
55489
|
}
|
|
55490
|
+
const gateProblem = gateRefusal(job, layers, ui.home());
|
|
55491
|
+
if (gateProblem)
|
|
55492
|
+
throw new Error(`${gateProblem.charAt(0).toUpperCase()}${gateProblem.slice(1)}`);
|
|
55383
55493
|
const roots = [ui.cwd(), ...ui.extraRoots()];
|
|
55384
55494
|
const outside = job.workspace !== "none" && !roots.some((root) => within(root, job.folder.canonical));
|
|
55385
55495
|
const perDay = runsPerDay(job.schedule, now);
|
|
55386
55496
|
const hasScriptPhase = job.runKind === "script" || job.runKind === "script+agent";
|
|
55387
|
-
const networkCapable = policy.network || job.permissions.execution === "host" && (hasScriptPhase || allowsCommands(job.permissions));
|
|
55497
|
+
const networkCapable = policy.network || job.permissions.execution === "host" && (hasScriptPhase || job.gate !== void 0 || allowsCommands(job.permissions));
|
|
55388
55498
|
const warnings = [
|
|
55389
55499
|
...outside ? ["The folder is outside this conversation\u2019s working directory and added directories."] : [],
|
|
55390
55500
|
...networkCapable ? ["This run can reach the network."] : [],
|
|
@@ -55402,6 +55512,7 @@ function createScheduleToolHost(ui) {
|
|
|
55402
55512
|
prompt: job.prompt,
|
|
55403
55513
|
...job.runKind && job.runKind !== "agent" ? { runKind: job.runKind } : {},
|
|
55404
55514
|
...job.script ? { script: job.script } : {},
|
|
55515
|
+
...job.gate ? { gate: job.gate } : {},
|
|
55405
55516
|
schedule: describeSchedule(job.schedule, {
|
|
55406
55517
|
tz: job.schedule.kind === "cron" ? job.schedule.tz : hostTimeZone()
|
|
55407
55518
|
}),
|
|
@@ -55921,10 +56032,13 @@ var DELIVERY_OUTCOME = {
|
|
|
55921
56032
|
"timed-out": "failed",
|
|
55922
56033
|
"blocked-config": "failed",
|
|
55923
56034
|
"check-failed": "failed",
|
|
56035
|
+
"needs-a-person": "failed",
|
|
55924
56036
|
"awaiting-approval": "stopped",
|
|
55925
56037
|
"approval-expired": "stopped",
|
|
55926
56038
|
interrupted: "stopped",
|
|
55927
|
-
cancelled: "stopped"
|
|
56039
|
+
cancelled: "stopped",
|
|
56040
|
+
// Never delivered (a skipped run has nothing to say); listed for the type.
|
|
56041
|
+
skipped: "stopped"
|
|
55928
56042
|
};
|
|
55929
56043
|
var RUN_ENDINGS = {
|
|
55930
56044
|
completed: END_WORDS.finished,
|
|
@@ -55935,7 +56049,9 @@ var RUN_ENDINGS = {
|
|
|
55935
56049
|
"timed-out": "timed out",
|
|
55936
56050
|
"blocked-config": "could not start because its settings need attention",
|
|
55937
56051
|
cancelled: `was ${END_WORDS.stopped}`,
|
|
55938
|
-
"check-failed": "failed its check"
|
|
56052
|
+
"check-failed": "failed its check",
|
|
56053
|
+
skipped: "was skipped by its gate",
|
|
56054
|
+
"needs-a-person": "needs a person: the model handed the task back"
|
|
55939
56055
|
};
|
|
55940
56056
|
function deliveryLevel(status) {
|
|
55941
56057
|
return endLevel(DELIVERY_OUTCOME[status] ?? "stopped");
|
|
@@ -56538,7 +56654,7 @@ function keepAccountKeyForStartup(provider, apiKey, baseUrl, home) {
|
|
|
56538
56654
|
__name(keepAccountKeyForStartup, "keepAccountKeyForStartup");
|
|
56539
56655
|
|
|
56540
56656
|
// src/tui/use-spinner-tip.ts
|
|
56541
|
-
var
|
|
56657
|
+
var import_react55 = __toESM(require_react(), 1);
|
|
56542
56658
|
|
|
56543
56659
|
// src/tui/spinner-tips.ts
|
|
56544
56660
|
var NEVER = /* @__PURE__ */ __name((command, from) => (ctx) => ctx.used(command) === 0 && ctx.launch >= from, "NEVER");
|
|
@@ -56700,12 +56816,12 @@ __name(pickTip, "pickTip");
|
|
|
56700
56816
|
|
|
56701
56817
|
// src/tui/use-spinner-tip.ts
|
|
56702
56818
|
function useSpinnerTip(input) {
|
|
56703
|
-
const [tip, setTip] = (0,
|
|
56704
|
-
const wasBusy = (0,
|
|
56705
|
-
const failed = (0,
|
|
56706
|
-
const latest = (0,
|
|
56819
|
+
const [tip, setTip] = (0, import_react55.useState)(void 0);
|
|
56820
|
+
const wasBusy = (0, import_react55.useRef)(false);
|
|
56821
|
+
const failed = (0, import_react55.useRef)(/* @__PURE__ */ new Set());
|
|
56822
|
+
const latest = (0, import_react55.useRef)(input);
|
|
56707
56823
|
latest.current = input;
|
|
56708
|
-
(0,
|
|
56824
|
+
(0, import_react55.useEffect)(() => {
|
|
56709
56825
|
if (!input.enabled) {
|
|
56710
56826
|
setTip(void 0);
|
|
56711
56827
|
return;
|
|
@@ -57227,13 +57343,13 @@ function isExampleFile(path) {
|
|
|
57227
57343
|
}
|
|
57228
57344
|
__name(isExampleFile, "isExampleFile");
|
|
57229
57345
|
function frequentlyModifiedFile(cwd2, signal) {
|
|
57230
|
-
return new Promise((
|
|
57346
|
+
return new Promise((resolve9) => {
|
|
57231
57347
|
execFile3(
|
|
57232
57348
|
"git",
|
|
57233
57349
|
["log", "--name-only", "--pretty=format:", "-n", "200"],
|
|
57234
57350
|
{ cwd: cwd2, signal, maxBuffer: 4 * 1024 * 1024, timeout: 5e3 },
|
|
57235
57351
|
(error, stdout) => {
|
|
57236
|
-
if (error) return
|
|
57352
|
+
if (error) return resolve9(void 0);
|
|
57237
57353
|
const counts2 = /* @__PURE__ */ new Map();
|
|
57238
57354
|
for (const line of stdout.split("\n")) {
|
|
57239
57355
|
const path = line.trim();
|
|
@@ -57247,7 +57363,7 @@ function frequentlyModifiedFile(cwd2, signal) {
|
|
|
57247
57363
|
bestCount = count2;
|
|
57248
57364
|
}
|
|
57249
57365
|
}
|
|
57250
|
-
|
|
57366
|
+
resolve9(best);
|
|
57251
57367
|
}
|
|
57252
57368
|
);
|
|
57253
57369
|
});
|
|
@@ -57366,7 +57482,7 @@ function usedMemoriesOf(raw) {
|
|
|
57366
57482
|
return out;
|
|
57367
57483
|
}
|
|
57368
57484
|
__name(usedMemoriesOf, "usedMemoriesOf");
|
|
57369
|
-
function trailFromRecords(records) {
|
|
57485
|
+
function trailFromRecords(records, options) {
|
|
57370
57486
|
if (!records || records.length === 0) return NO_TRAIL;
|
|
57371
57487
|
const calls = /* @__PURE__ */ new Map();
|
|
57372
57488
|
const turns = /* @__PURE__ */ new Map();
|
|
@@ -57457,7 +57573,13 @@ function trailFromRecords(records) {
|
|
|
57457
57573
|
const index = agents?.indexOf(false) ?? -1;
|
|
57458
57574
|
if (agents && index >= 0) agents[index] = true;
|
|
57459
57575
|
}
|
|
57460
|
-
return {
|
|
57576
|
+
return {
|
|
57577
|
+
calls,
|
|
57578
|
+
turns,
|
|
57579
|
+
turnOfMessage,
|
|
57580
|
+
recalled,
|
|
57581
|
+
...options?.liveTurnId !== void 0 ? { liveTurnId: options.liveTurnId } : {}
|
|
57582
|
+
};
|
|
57461
57583
|
}
|
|
57462
57584
|
__name(trailFromRecords, "trailFromRecords");
|
|
57463
57585
|
function parseInput(call) {
|
|
@@ -57566,6 +57688,9 @@ function restoredToolRows(turnId, call, results, trail, presenter, cwd2) {
|
|
|
57566
57688
|
const interrupted = saved?.end === void 0 && (!message || text.startsWith(INTERRUPTED_RESULT));
|
|
57567
57689
|
const start = startOf(started);
|
|
57568
57690
|
if (interrupted) {
|
|
57691
|
+
if (turnId !== void 0 && trail.liveTurnId === turnId) {
|
|
57692
|
+
return [{ role: "tool", content: start.label, glyph: "\u25CB", pending: true }];
|
|
57693
|
+
}
|
|
57569
57694
|
const journaled = turnId !== void 0 && trail.turns.get(turnId)?.journaled === true;
|
|
57570
57695
|
return saved?.start === void 0 && (saved?.asked === true || journaled) ? notRunRows(start.label, saved?.asked === true) : interruptedRows(start.label);
|
|
57571
57696
|
}
|
|
@@ -57604,20 +57729,52 @@ function createRestoredTurnWriter(messages, nextId, options) {
|
|
|
57604
57729
|
const shownMemories = /* @__PURE__ */ new Set();
|
|
57605
57730
|
const atTurn = /* @__PURE__ */ __name((turnId) => trail.turns.get(turnId)?.startedAt ?? Date.now(), "atTurn");
|
|
57606
57731
|
let telling = options.telling ?? NOTHING_TOLD;
|
|
57607
|
-
const
|
|
57608
|
-
|
|
57732
|
+
const answers = /* @__PURE__ */ new Map();
|
|
57733
|
+
const handedBack = /* @__PURE__ */ new Map();
|
|
57734
|
+
let chain;
|
|
57735
|
+
const noteAnswer = /* @__PURE__ */ __name((message, turnId) => {
|
|
57736
|
+
if (message.role !== "assistant" || !turnId) {
|
|
57737
|
+
chain = void 0;
|
|
57738
|
+
return;
|
|
57739
|
+
}
|
|
57740
|
+
const text = typeof message.content === "string" ? message.content : "";
|
|
57741
|
+
chain = chain && chain.turnId === turnId ? { turnId, text: chain.text + text } : { turnId, text };
|
|
57742
|
+
answers.set(turnId, chain.text);
|
|
57743
|
+
}, "noteAnswer");
|
|
57744
|
+
const outcomeRows = /* @__PURE__ */ __name((turnId, turn) => {
|
|
57745
|
+
if (turn.completed !== true) return [];
|
|
57609
57746
|
const said = outcomeNotice(turn.outcome, telling, options.cannotTellReason);
|
|
57610
57747
|
telling = said.telling;
|
|
57611
|
-
if (!said.line) return void 0;
|
|
57612
57748
|
const style = systemRowStyle("notice");
|
|
57613
|
-
|
|
57749
|
+
const notice = /* @__PURE__ */ __name((content) => ({
|
|
57614
57750
|
id: nextId(),
|
|
57615
57751
|
role: "system",
|
|
57616
|
-
content
|
|
57752
|
+
content,
|
|
57617
57753
|
glyph: style.glyph,
|
|
57618
57754
|
glyphColor: style.color
|
|
57619
|
-
};
|
|
57620
|
-
|
|
57755
|
+
}), "notice");
|
|
57756
|
+
const rows = [];
|
|
57757
|
+
if (said.line) rows.push(notice(said.line));
|
|
57758
|
+
const answer = answers.get(turnId);
|
|
57759
|
+
const handBack = handedBack.get(turnId);
|
|
57760
|
+
const claim = claimMismatchLine(
|
|
57761
|
+
answer !== void 0 && handBack === void 0 ? compareAnswerToOutcome(answer, turn.outcome) : void 0
|
|
57762
|
+
);
|
|
57763
|
+
if (claim) rows.push(notice(claim));
|
|
57764
|
+
const handed = handedBackLines(handBack);
|
|
57765
|
+
if (handed) {
|
|
57766
|
+
const warning = systemRowStyle("warning");
|
|
57767
|
+
rows.push({
|
|
57768
|
+
id: nextId(),
|
|
57769
|
+
role: "system",
|
|
57770
|
+
content: handed.line,
|
|
57771
|
+
glyph: warning.glyph,
|
|
57772
|
+
glyphColor: warning.color
|
|
57773
|
+
});
|
|
57774
|
+
for (const line of handed.model) rows.push(notice(line));
|
|
57775
|
+
}
|
|
57776
|
+
return rows;
|
|
57777
|
+
}, "outcomeRows");
|
|
57621
57778
|
const closing = /* @__PURE__ */ __name((turnId) => {
|
|
57622
57779
|
if (!turnId) return [];
|
|
57623
57780
|
const turn = trail.turns.get(turnId);
|
|
@@ -57625,8 +57782,7 @@ function createRestoredTurnWriter(messages, nextId, options) {
|
|
|
57625
57782
|
const rows = [];
|
|
57626
57783
|
if (turn.stopReason === "cancelled" && turn.cancelCause === "user") {
|
|
57627
57784
|
rows.push({ id: nextId(), role: "system", content: "Interrupted." });
|
|
57628
|
-
|
|
57629
|
-
if (said2) rows.push(said2);
|
|
57785
|
+
rows.push(...outcomeRows(turnId, turn));
|
|
57630
57786
|
return rows;
|
|
57631
57787
|
}
|
|
57632
57788
|
const notice = describeTurnStop(
|
|
@@ -57634,8 +57790,7 @@ function createRestoredTurnWriter(messages, nextId, options) {
|
|
|
57634
57790
|
turn.budget
|
|
57635
57791
|
);
|
|
57636
57792
|
if (notice) rows.push({ id: nextId(), role: "system", content: notice, glyph: "\u25A0" });
|
|
57637
|
-
|
|
57638
|
-
if (said) rows.push(said);
|
|
57793
|
+
rows.push(...outcomeRows(turnId, turn));
|
|
57639
57794
|
const completed = turn.stopReason === void 0 || turn.stopReason === "end_turn";
|
|
57640
57795
|
if (turn.startedAt !== void 0 && turn.endedAt !== void 0) {
|
|
57641
57796
|
const stand = turn.agents.map(
|
|
@@ -57661,6 +57816,12 @@ function createRestoredTurnWriter(messages, nextId, options) {
|
|
|
57661
57816
|
let launched = false;
|
|
57662
57817
|
for (const call of message.toolCalls) {
|
|
57663
57818
|
if (call.function.name.toLowerCase() === "agent") launched = true;
|
|
57819
|
+
if (turnId && call.function.name === HAND_BACK_TOOL_NAME) {
|
|
57820
|
+
const said = results.get(call.id);
|
|
57821
|
+
const read = parseHandBack(call.function.arguments);
|
|
57822
|
+
if (read && typeof said?.content === "string" && said.content.startsWith(HAND_BACK_RECEIPT))
|
|
57823
|
+
handedBack.set(turnId, read);
|
|
57824
|
+
}
|
|
57664
57825
|
for (const row2 of restoredToolRows(
|
|
57665
57826
|
turnId,
|
|
57666
57827
|
call,
|
|
@@ -57696,6 +57857,7 @@ function createRestoredTurnWriter(messages, nextId, options) {
|
|
|
57696
57857
|
},
|
|
57697
57858
|
enter(message) {
|
|
57698
57859
|
const turnId = message.id ? trail.turnOfMessage.get(message.id) : void 0;
|
|
57860
|
+
noteAnswer(message, turnId);
|
|
57699
57861
|
if (!turnId || turnId === current) return [];
|
|
57700
57862
|
const before = closing(current);
|
|
57701
57863
|
current = turnId;
|
|
@@ -57956,7 +58118,7 @@ function StatusLineRows({
|
|
|
57956
58118
|
__name(StatusLineRows, "StatusLineRows");
|
|
57957
58119
|
|
|
57958
58120
|
// src/tui/status-line/useStatusLine.ts
|
|
57959
|
-
var
|
|
58121
|
+
var import_react56 = __toESM(require_react(), 1);
|
|
57960
58122
|
|
|
57961
58123
|
// src/tui/status-line/controller.ts
|
|
57962
58124
|
var STATUS_LINE_DEBOUNCE_MS = 300;
|
|
@@ -58126,8 +58288,8 @@ import { spawn as spawn5 } from "node:child_process";
|
|
|
58126
58288
|
var STATUS_LINE_TIMEOUT_MS = 6e5;
|
|
58127
58289
|
var MAX_OUTPUT_BYTES = 64 * 1024;
|
|
58128
58290
|
function runStatusLineCommand(options) {
|
|
58129
|
-
return new Promise((
|
|
58130
|
-
if (options.signal.aborted) return
|
|
58291
|
+
return new Promise((resolve9) => {
|
|
58292
|
+
if (options.signal.aborted) return resolve9(void 0);
|
|
58131
58293
|
const run4 = options.spawnImpl ?? spawn5;
|
|
58132
58294
|
let child;
|
|
58133
58295
|
try {
|
|
@@ -58143,7 +58305,7 @@ function runStatusLineCommand(options) {
|
|
|
58143
58305
|
detached: process.platform !== "win32"
|
|
58144
58306
|
});
|
|
58145
58307
|
} catch {
|
|
58146
|
-
return
|
|
58308
|
+
return resolve9(void 0);
|
|
58147
58309
|
}
|
|
58148
58310
|
let out = "";
|
|
58149
58311
|
let settled2 = false;
|
|
@@ -58152,7 +58314,7 @@ function runStatusLineCommand(options) {
|
|
|
58152
58314
|
settled2 = true;
|
|
58153
58315
|
clearTimeout(timer);
|
|
58154
58316
|
options.signal.removeEventListener("abort", onAbort);
|
|
58155
|
-
|
|
58317
|
+
resolve9(value);
|
|
58156
58318
|
}, "finish");
|
|
58157
58319
|
const kill = /* @__PURE__ */ __name(() => {
|
|
58158
58320
|
try {
|
|
@@ -58231,10 +58393,10 @@ __name(readWorkspaceGit, "readWorkspaceGit");
|
|
|
58231
58393
|
|
|
58232
58394
|
// src/tui/status-line/useStatusLine.ts
|
|
58233
58395
|
function useStatusLine(options) {
|
|
58234
|
-
const [text, setText] = (0,
|
|
58235
|
-
const latest = (0,
|
|
58396
|
+
const [text, setText] = (0, import_react56.useState)(void 0);
|
|
58397
|
+
const latest = (0, import_react56.useRef)(options);
|
|
58236
58398
|
latest.current = options;
|
|
58237
|
-
const controllerRef = (0,
|
|
58399
|
+
const controllerRef = (0, import_react56.useRef)(null);
|
|
58238
58400
|
if (controllerRef.current === null) {
|
|
58239
58401
|
controllerRef.current = new StatusLineController({
|
|
58240
58402
|
onText: setText,
|
|
@@ -58259,13 +58421,13 @@ function useStatusLine(options) {
|
|
|
58259
58421
|
}
|
|
58260
58422
|
const command = options.enabled ? options.config?.command : void 0;
|
|
58261
58423
|
const refresh = options.config?.refreshInterval;
|
|
58262
|
-
(0,
|
|
58424
|
+
(0, import_react56.useEffect)(() => {
|
|
58263
58425
|
controllerRef.current?.update(
|
|
58264
58426
|
command === void 0 ? null : { command, refreshIntervalSeconds: refresh },
|
|
58265
58427
|
options.triggers
|
|
58266
58428
|
);
|
|
58267
58429
|
}, [command, refresh, ...options.triggers]);
|
|
58268
|
-
(0,
|
|
58430
|
+
(0, import_react56.useEffect)(() => () => controllerRef.current?.stop(), []);
|
|
58269
58431
|
return command === void 0 ? void 0 : text;
|
|
58270
58432
|
}
|
|
58271
58433
|
__name(useStatusLine, "useStatusLine");
|
|
@@ -58349,44 +58511,6 @@ function backticksBalanced(text) {
|
|
|
58349
58511
|
}
|
|
58350
58512
|
__name(backticksBalanced, "backticksBalanced");
|
|
58351
58513
|
|
|
58352
|
-
// src/tui/terminal-focus.ts
|
|
58353
|
-
var import_react56 = __toESM(require_react(), 1);
|
|
58354
|
-
function createTerminalFocus(now = Date.now) {
|
|
58355
|
-
let state = "unknown";
|
|
58356
|
-
let gainedAt = 0;
|
|
58357
|
-
const listeners = /* @__PURE__ */ new Set();
|
|
58358
|
-
const emit = /* @__PURE__ */ __name(() => {
|
|
58359
|
-
for (const listener of [...listeners]) listener();
|
|
58360
|
-
}, "emit");
|
|
58361
|
-
const set = /* @__PURE__ */ __name((focused) => {
|
|
58362
|
-
if (focused) gainedAt = now();
|
|
58363
|
-
if (!focused && state === "blurred") return;
|
|
58364
|
-
state = focused ? "focused" : "blurred";
|
|
58365
|
-
emit();
|
|
58366
|
-
}, "set");
|
|
58367
|
-
return {
|
|
58368
|
-
state: /* @__PURE__ */ __name(() => state, "state"),
|
|
58369
|
-
isFocused: /* @__PURE__ */ __name(() => state !== "blurred", "isFocused"),
|
|
58370
|
-
gainedAt: /* @__PURE__ */ __name(() => gainedAt, "gainedAt"),
|
|
58371
|
-
set,
|
|
58372
|
-
noteInput: /* @__PURE__ */ __name(() => {
|
|
58373
|
-
if (state === "blurred") set(true);
|
|
58374
|
-
}, "noteInput"),
|
|
58375
|
-
subscribe: /* @__PURE__ */ __name((listener) => {
|
|
58376
|
-
listeners.add(listener);
|
|
58377
|
-
return () => {
|
|
58378
|
-
listeners.delete(listener);
|
|
58379
|
-
};
|
|
58380
|
-
}, "subscribe")
|
|
58381
|
-
};
|
|
58382
|
-
}
|
|
58383
|
-
__name(createTerminalFocus, "createTerminalFocus");
|
|
58384
|
-
var terminalFocus = createTerminalFocus();
|
|
58385
|
-
function useTerminalFocused(store = terminalFocus) {
|
|
58386
|
-
return (0, import_react56.useSyncExternalStore)(store.subscribe, store.isFocused, store.isFocused);
|
|
58387
|
-
}
|
|
58388
|
-
__name(useTerminalFocused, "useTerminalFocused");
|
|
58389
|
-
|
|
58390
58514
|
// src/tui/terminal-title.ts
|
|
58391
58515
|
var DEFAULT_TERMINAL_TITLE = "Namzu";
|
|
58392
58516
|
var IDLE_TITLE_GLYPH = "\u2733";
|
|
@@ -59296,10 +59420,10 @@ function AppBody({
|
|
|
59296
59420
|
const resolveQuestion = (0, import_react62.useCallback)((answer) => {
|
|
59297
59421
|
const pending = questionRef.current;
|
|
59298
59422
|
if (!pending?.resolve) return;
|
|
59299
|
-
const
|
|
59423
|
+
const resolve9 = pending.resolve;
|
|
59300
59424
|
pending.resolve = null;
|
|
59301
59425
|
questionRef.current = null;
|
|
59302
|
-
|
|
59426
|
+
resolve9(answer);
|
|
59303
59427
|
}, []);
|
|
59304
59428
|
const [permissionReviewOffset, setPermissionReviewOffsetState] = (0, import_react62.useState)(0);
|
|
59305
59429
|
const permissionReviewOffsetRef = (0, import_react62.useRef)(0);
|
|
@@ -60287,9 +60411,9 @@ ${blocks.join("\n\n")}`;
|
|
|
60287
60411
|
cwd: /* @__PURE__ */ __name(() => ctxRef.current.cwd, "cwd"),
|
|
60288
60412
|
config: /* @__PURE__ */ __name(() => ctxRef.current.skills, "config"),
|
|
60289
60413
|
sessionId: /* @__PURE__ */ __name(() => conversationMaterializedRef.current ? scopeRef.current?.sessionId : void 0, "sessionId"),
|
|
60290
|
-
confirm: /* @__PURE__ */ __name((request, signal) => new Promise((
|
|
60414
|
+
confirm: /* @__PURE__ */ __name((request, signal) => new Promise((resolve9) => {
|
|
60291
60415
|
if (signal?.aborted) {
|
|
60292
|
-
|
|
60416
|
+
resolve9("cancel");
|
|
60293
60417
|
return;
|
|
60294
60418
|
}
|
|
60295
60419
|
const entry = {
|
|
@@ -60299,7 +60423,7 @@ ${blocks.join("\n\n")}`;
|
|
|
60299
60423
|
queueMicrotask(() => {
|
|
60300
60424
|
if (saveSkillPromptRef.current === entry) setSaveSkillPrompt(null);
|
|
60301
60425
|
});
|
|
60302
|
-
|
|
60426
|
+
resolve9(answer);
|
|
60303
60427
|
}, "resolve")
|
|
60304
60428
|
};
|
|
60305
60429
|
const onAbort = /* @__PURE__ */ __name(() => entry.resolve("cancel"), "onAbort");
|
|
@@ -60320,7 +60444,7 @@ ${blocks.join("\n\n")}`;
|
|
|
60320
60444
|
const closing = Promise.all([session?.close(), peersRef.current?.close()]);
|
|
60321
60445
|
const bounded = Promise.race([
|
|
60322
60446
|
closing,
|
|
60323
|
-
new Promise((
|
|
60447
|
+
new Promise((resolve9) => setTimeout(resolve9, SESSION_CLOSE_ON_EXIT_MS).unref?.())
|
|
60324
60448
|
]);
|
|
60325
60449
|
void bounded.catch(() => void 0).then(() => beforeExit?.()).catch(() => void 0).finally(() => exit());
|
|
60326
60450
|
}, [beforeExit, cancelPendingModelSwitch, exit, session]);
|
|
@@ -60464,13 +60588,13 @@ ${blocks.join("\n\n")}`;
|
|
|
60464
60588
|
if (externalEditorRequestRef.current) {
|
|
60465
60589
|
return Promise.reject(new Error("an external editor is already open"));
|
|
60466
60590
|
}
|
|
60467
|
-
return new Promise((
|
|
60591
|
+
return new Promise((resolve9, reject) => {
|
|
60468
60592
|
const request = {
|
|
60469
60593
|
token: {},
|
|
60470
60594
|
seed,
|
|
60471
60595
|
...pressed !== void 0 ? { pressed } : {},
|
|
60472
60596
|
controller: new AbortController(),
|
|
60473
|
-
resolve:
|
|
60597
|
+
resolve: resolve9,
|
|
60474
60598
|
reject
|
|
60475
60599
|
};
|
|
60476
60600
|
externalEditorRequestRef.current = request;
|
|
@@ -60484,7 +60608,7 @@ ${blocks.join("\n\n")}`;
|
|
|
60484
60608
|
if (!request || externalEditorStartedRef.current === request.token) return;
|
|
60485
60609
|
externalEditorStartedRef.current = request.token;
|
|
60486
60610
|
void (async () => {
|
|
60487
|
-
await new Promise((
|
|
60611
|
+
await new Promise((resolve9) => setImmediate(resolve9));
|
|
60488
60612
|
if (request.controller.signal.aborted) return;
|
|
60489
60613
|
if (stdout.isTTY) writeStdout(fullscreenOn ? "\x1B[?1049l\x1B[2J\x1B[H" : "\x1B[2J\x1B[H");
|
|
60490
60614
|
let edited;
|
|
@@ -62419,8 +62543,10 @@ ${blocks.join("\n\n")}`;
|
|
|
62419
62543
|
...activeCtx.appendSystem ? { appendSystem: activeCtx.appendSystem } : {},
|
|
62420
62544
|
...sessionsRef.current ? {
|
|
62421
62545
|
sessionGoals: sessionsRef.current.goals,
|
|
62546
|
+
...activeCtx.goal?.confirmedBy ? { goalConfirmedBy: activeCtx.goal.confirmedBy } : {},
|
|
62422
62547
|
conversationSessions: sessionsRef.current
|
|
62423
62548
|
} : {},
|
|
62549
|
+
...activeCtx.handBack?.enabled === true ? { handBack: true } : {},
|
|
62424
62550
|
...activeCtx.mcpServers ? { mcpServers: activeCtx.mcpServers } : {},
|
|
62425
62551
|
// The composer is ready at once; each server's tools join as it connects.
|
|
62426
62552
|
toolServers: "background",
|
|
@@ -63461,7 +63587,7 @@ ${blocks.join("\n\n")}`;
|
|
|
63461
63587
|
doctorRunningRef.current = true;
|
|
63462
63588
|
const progressId = pushMessage("system", "Checking\u2026");
|
|
63463
63589
|
try {
|
|
63464
|
-
const { runLiveDoctor } = await import("./live-
|
|
63590
|
+
const { runLiveDoctor } = await import("./live-N3PPNKW6.js");
|
|
63465
63591
|
const { describePlainDoctor } = await import("./plain-report-XVPBQDLE.js");
|
|
63466
63592
|
const report = await runLiveDoctor({
|
|
63467
63593
|
...ctxRef.current.telemetry ? { telemetry: ctxRef.current.telemetry } : {}
|
|
@@ -64909,13 +65035,13 @@ ${plain(err)}`
|
|
|
64909
65035
|
[announceApproval]
|
|
64910
65036
|
);
|
|
64911
65037
|
const askQuestion = (0, import_react62.useCallback)(
|
|
64912
|
-
(question, signal) => new Promise((
|
|
65038
|
+
(question, signal) => new Promise((resolve9) => {
|
|
64913
65039
|
if (signal?.aborted) {
|
|
64914
|
-
|
|
65040
|
+
resolve9({ kind: "abort" });
|
|
64915
65041
|
return;
|
|
64916
65042
|
}
|
|
64917
65043
|
closeLiveReply();
|
|
64918
|
-
questionRef.current = { question, resolve:
|
|
65044
|
+
questionRef.current = { question, resolve: resolve9 };
|
|
64919
65045
|
if (needsQuestionDialog(question)) {
|
|
64920
65046
|
questionDialogTokenRef.current += 1;
|
|
64921
65047
|
const entry = { token: questionDialogTokenRef.current, question };
|
|
@@ -64975,9 +65101,9 @@ ${plain(err)}`
|
|
|
64975
65101
|
]
|
|
64976
65102
|
);
|
|
64977
65103
|
const askPlanApproval = (0, import_react62.useCallback)(
|
|
64978
|
-
(request, signal) => new Promise((
|
|
65104
|
+
(request, signal) => new Promise((resolve9) => {
|
|
64979
65105
|
if (signal?.aborted) {
|
|
64980
|
-
|
|
65106
|
+
resolve9({ kind: "keep-planning" });
|
|
64981
65107
|
return;
|
|
64982
65108
|
}
|
|
64983
65109
|
closeLiveReply();
|
|
@@ -65002,7 +65128,7 @@ ${plain(err)}`
|
|
|
65002
65128
|
} else if (answer.feedback) {
|
|
65003
65129
|
pushMessage("system", `Changes asked for \xB7 ${answer.feedback}`);
|
|
65004
65130
|
}
|
|
65005
|
-
|
|
65131
|
+
resolve9(answer);
|
|
65006
65132
|
}, "finish");
|
|
65007
65133
|
const entry = { request, resolve: finish };
|
|
65008
65134
|
const onAbort = /* @__PURE__ */ __name(() => finish({ kind: "keep-planning" }), "onAbort");
|
|
@@ -65075,9 +65201,9 @@ ${plain(err)}`
|
|
|
65075
65201
|
[activeSkills, appLifetime.signal, handleAutoModeLimit, onPermission, session]
|
|
65076
65202
|
);
|
|
65077
65203
|
const reviewSchedule = (0, import_react62.useCallback)(
|
|
65078
|
-
(request, signal) => new Promise((
|
|
65204
|
+
(request, signal) => new Promise((resolve9) => {
|
|
65079
65205
|
if (signal?.aborted) {
|
|
65080
|
-
|
|
65206
|
+
resolve9("cancel");
|
|
65081
65207
|
return;
|
|
65082
65208
|
}
|
|
65083
65209
|
closeLiveReply();
|
|
@@ -65093,7 +65219,7 @@ ${plain(err)}`
|
|
|
65093
65219
|
queueMicrotask(() => {
|
|
65094
65220
|
if (scheduleReviewPromptRef.current === entry) setScheduleReviewPrompt(null);
|
|
65095
65221
|
});
|
|
65096
|
-
|
|
65222
|
+
resolve9(answer);
|
|
65097
65223
|
}, "resolve")
|
|
65098
65224
|
};
|
|
65099
65225
|
const onAbort = /* @__PURE__ */ __name(() => entry.resolve("cancel"), "onAbort");
|
|
@@ -65624,6 +65750,19 @@ ${plain(err)}`
|
|
|
65624
65750
|
);
|
|
65625
65751
|
outcomeToldRef.current.telling = said.telling;
|
|
65626
65752
|
if (said.line) pushSystem("notice", said.line);
|
|
65753
|
+
const claimLine = claimMismatchLine(event.claimMismatch);
|
|
65754
|
+
if (claimLine) pushSystem("notice", claimLine);
|
|
65755
|
+
const handed = handedBackLines(event.handedBack);
|
|
65756
|
+
if (handed) {
|
|
65757
|
+
pushSystem("warning", handed.line);
|
|
65758
|
+
for (const line of handed.model) pushSystem("notice", line);
|
|
65759
|
+
}
|
|
65760
|
+
const goalLine = goalEndingLine(event.goalEnding);
|
|
65761
|
+
if (goalLine)
|
|
65762
|
+
pushSystem(
|
|
65763
|
+
event.goalEnding?.ending === "not-confirmed" ? "warning" : "notice",
|
|
65764
|
+
goalLine
|
|
65765
|
+
);
|
|
65627
65766
|
if (st.startedAt !== void 0) {
|
|
65628
65767
|
const since = st.startedAt;
|
|
65629
65768
|
const delegated = subagentsRef.current.filter(
|
|
@@ -66028,14 +66167,14 @@ ${jobLines.map(([, line]) => `- ${line}`).join("\n")}`] : []
|
|
|
66028
66167
|
waitForOperator(signal) {
|
|
66029
66168
|
if (signal.aborted) return Promise.reject(signal.reason);
|
|
66030
66169
|
if (inboxOpen && inboxEntries.length > 0) return Promise.resolve();
|
|
66031
|
-
return new Promise((
|
|
66170
|
+
return new Promise((resolve9, reject) => {
|
|
66032
66171
|
const cleanup = /* @__PURE__ */ __name(() => {
|
|
66033
66172
|
operatorWaiters.delete(wake);
|
|
66034
66173
|
signal.removeEventListener("abort", abort);
|
|
66035
66174
|
}, "cleanup");
|
|
66036
66175
|
const wake = /* @__PURE__ */ __name(() => {
|
|
66037
66176
|
cleanup();
|
|
66038
|
-
|
|
66177
|
+
resolve9();
|
|
66039
66178
|
}, "wake");
|
|
66040
66179
|
const abort = /* @__PURE__ */ __name(() => {
|
|
66041
66180
|
cleanup();
|
|
@@ -66049,14 +66188,14 @@ ${jobLines.map(([, line]) => `- ${line}`).join("\n")}`] : []
|
|
|
66049
66188
|
if (signal.aborted) return Promise.reject(signal.reason);
|
|
66050
66189
|
if (!inboxOpen || inboxEntries.length > 0 || wakeLedgerRef.current.hasUnsnapshottedDirectChild(wakeSnapshot) || peersRef.current?.enabled && peersRef.current.pending > 0)
|
|
66051
66190
|
return Promise.resolve();
|
|
66052
|
-
return new Promise((
|
|
66191
|
+
return new Promise((resolve9, reject) => {
|
|
66053
66192
|
const cleanup = /* @__PURE__ */ __name(() => {
|
|
66054
66193
|
inputWaiters.delete(wake);
|
|
66055
66194
|
signal.removeEventListener("abort", abort);
|
|
66056
66195
|
}, "cleanup");
|
|
66057
66196
|
const wake = /* @__PURE__ */ __name(() => {
|
|
66058
66197
|
cleanup();
|
|
66059
|
-
|
|
66198
|
+
resolve9();
|
|
66060
66199
|
}, "wake");
|
|
66061
66200
|
const abort = /* @__PURE__ */ __name(() => {
|
|
66062
66201
|
cleanup();
|
|
@@ -68461,7 +68600,8 @@ ${plugins.map((plugin) => {
|
|
|
68461
68600
|
store: durableSessions.goals,
|
|
68462
68601
|
sessionId: sessionScope.sessionId,
|
|
68463
68602
|
tenantId: durableSessions.tenantId,
|
|
68464
|
-
activation: goalActivation
|
|
68603
|
+
activation: goalActivation,
|
|
68604
|
+
...ctxRef.current.goal?.confirmedBy ? { defaultConfirmedBy: ctxRef.current.goal.confirmedBy } : {}
|
|
68465
68605
|
}
|
|
68466
68606
|
} : {}
|
|
68467
68607
|
})
|
|
@@ -71586,881 +71726,13 @@ function summaryDetail(summary2) {
|
|
|
71586
71726
|
}
|
|
71587
71727
|
__name(summaryDetail, "summaryDetail");
|
|
71588
71728
|
|
|
71589
|
-
// src/tui/console-input.ts
|
|
71590
|
-
import { closeSync as closeSync2, openSync as openSync2 } from "node:fs";
|
|
71591
|
-
import { ReadStream } from "node:tty";
|
|
71592
|
-
var CONSOLE_INPUT_DEVICE = String.raw`\\.\CONIN$`;
|
|
71593
|
-
function openConsoleInput(streams = process, platform2 = process.platform, io = {
|
|
71594
|
-
open: /* @__PURE__ */ __name((path) => openSync2(path, "r+"), "open"),
|
|
71595
|
-
close: closeSync2,
|
|
71596
|
-
stream: /* @__PURE__ */ __name((fd) => new ReadStream(fd), "stream")
|
|
71597
|
-
}) {
|
|
71598
|
-
if (platform2 !== "win32" || streams.stdin.isTTY === true || streams.stdout.isTTY !== true)
|
|
71599
|
-
return void 0;
|
|
71600
|
-
let fd;
|
|
71601
|
-
try {
|
|
71602
|
-
fd = io.open(CONSOLE_INPUT_DEVICE);
|
|
71603
|
-
} catch {
|
|
71604
|
-
return void 0;
|
|
71605
|
-
}
|
|
71606
|
-
try {
|
|
71607
|
-
const stream2 = io.stream(fd);
|
|
71608
|
-
return { stream: stream2, release: /* @__PURE__ */ __name(() => stream2.destroy(), "release") };
|
|
71609
|
-
} catch {
|
|
71610
|
-
try {
|
|
71611
|
-
io.close(fd);
|
|
71612
|
-
} catch {
|
|
71613
|
-
}
|
|
71614
|
-
return void 0;
|
|
71615
|
-
}
|
|
71616
|
-
}
|
|
71617
|
-
__name(openConsoleInput, "openConsoleInput");
|
|
71618
|
-
|
|
71619
|
-
// src/tui/exit-summary.ts
|
|
71620
|
-
function publicCommand(command) {
|
|
71621
|
-
return command && command.length === 1 ? command : ["namzu"];
|
|
71622
|
-
}
|
|
71623
|
-
__name(publicCommand, "publicCommand");
|
|
71624
|
-
function formatTuiExitSummary(summary2, invocation = {}, platform2 = process.platform) {
|
|
71625
|
-
if (!summary2?.conversationId) return "";
|
|
71626
|
-
const palId = summary2.palId ?? invocation.palId;
|
|
71627
|
-
const args = [
|
|
71628
|
-
...publicCommand(invocation.command),
|
|
71629
|
-
...palId ? ["pal", "chat", palId, "--resume", summary2.conversationId] : ["resume", summary2.conversationId]
|
|
71630
|
-
];
|
|
71631
|
-
const cwd2 = !palId && invocation.cwd && invocation.cwd !== process.cwd() ? invocation.cwd : void 0;
|
|
71632
|
-
const command = formatResumeShellCommand(args, { platform: platform2, cwd: cwd2 });
|
|
71633
|
-
if (platform2 === "win32") {
|
|
71634
|
-
return `
|
|
71635
|
-
To resume this conversation, run in PowerShell:
|
|
71636
|
-
${command}
|
|
71637
|
-
`;
|
|
71638
|
-
}
|
|
71639
|
-
return `
|
|
71640
|
-
To resume this conversation, run:
|
|
71641
|
-
${command}
|
|
71642
|
-
`;
|
|
71643
|
-
}
|
|
71644
|
-
__name(formatTuiExitSummary, "formatTuiExitSummary");
|
|
71645
|
-
|
|
71646
|
-
// src/tui/focus-reporting.ts
|
|
71647
|
-
var FOCUS_REPORTING_ENABLE = "\x1B[?1004h";
|
|
71648
|
-
var FOCUS_REPORTING_DISABLE = "\x1B[?1004l";
|
|
71649
|
-
var FOCUS_IN = "\x1B[I";
|
|
71650
|
-
var FOCUS_OUT = "\x1B[O";
|
|
71651
|
-
function stripFocusReports(chunk) {
|
|
71652
|
-
if (!chunk.includes("\x1B[")) return { text: chunk, events: [] };
|
|
71653
|
-
const events = [];
|
|
71654
|
-
let text = "";
|
|
71655
|
-
let from = 0;
|
|
71656
|
-
for (let i = 0; i < chunk.length - 2; i += 1) {
|
|
71657
|
-
if (chunk.charCodeAt(i) !== 27) continue;
|
|
71658
|
-
const token = chunk.slice(i, i + 3);
|
|
71659
|
-
if (token !== FOCUS_IN && token !== FOCUS_OUT) continue;
|
|
71660
|
-
text += chunk.slice(from, i);
|
|
71661
|
-
events.push(token === FOCUS_IN ? "in" : "out");
|
|
71662
|
-
from = i + 3;
|
|
71663
|
-
i += 2;
|
|
71664
|
-
}
|
|
71665
|
-
return { text: text + chunk.slice(from), events };
|
|
71666
|
-
}
|
|
71667
|
-
__name(stripFocusReports, "stripFocusReports");
|
|
71668
|
-
function installFocusReporting(stdin, stdout, onFocus) {
|
|
71669
|
-
if (stdin.isTTY !== true || stdout.isTTY !== true || typeof stdin.setRawMode !== "function") {
|
|
71670
|
-
return () => void 0;
|
|
71671
|
-
}
|
|
71672
|
-
const originalRead = stdin.read;
|
|
71673
|
-
const originalSetRawMode = stdin.setRawMode;
|
|
71674
|
-
let enabled = false;
|
|
71675
|
-
const write = /* @__PURE__ */ __name((text) => {
|
|
71676
|
-
try {
|
|
71677
|
-
stdout.write(text);
|
|
71678
|
-
} catch {
|
|
71679
|
-
}
|
|
71680
|
-
}, "write");
|
|
71681
|
-
stdin.read = /* @__PURE__ */ __name(function patchedRead(...args) {
|
|
71682
|
-
const chunk = originalRead.apply(this, args);
|
|
71683
|
-
if (typeof chunk !== "string") return chunk;
|
|
71684
|
-
const stripped = stripFocusReports(chunk);
|
|
71685
|
-
for (const event of stripped.events) onFocus(event === "in");
|
|
71686
|
-
return stripped.text;
|
|
71687
|
-
}, "patchedRead");
|
|
71688
|
-
stdin.setRawMode = /* @__PURE__ */ __name(function patchedSetRawMode(mode) {
|
|
71689
|
-
const result = originalSetRawMode.call(this, mode);
|
|
71690
|
-
if (mode && !enabled) {
|
|
71691
|
-
enabled = true;
|
|
71692
|
-
write(FOCUS_REPORTING_ENABLE);
|
|
71693
|
-
} else if (!mode && enabled) {
|
|
71694
|
-
enabled = false;
|
|
71695
|
-
write(FOCUS_REPORTING_DISABLE);
|
|
71696
|
-
}
|
|
71697
|
-
return result;
|
|
71698
|
-
}, "patchedSetRawMode");
|
|
71699
|
-
let removed = false;
|
|
71700
|
-
return () => {
|
|
71701
|
-
if (removed) return;
|
|
71702
|
-
removed = true;
|
|
71703
|
-
stdin.read = originalRead;
|
|
71704
|
-
stdin.setRawMode = originalSetRawMode;
|
|
71705
|
-
enabled = false;
|
|
71706
|
-
write(FOCUS_REPORTING_DISABLE);
|
|
71707
|
-
};
|
|
71708
|
-
}
|
|
71709
|
-
__name(installFocusReporting, "installFocusReporting");
|
|
71710
|
-
|
|
71711
|
-
// src/tui/fullscreen/mode.ts
|
|
71712
|
-
var OFF = /* @__PURE__ */ new Set(["", "0", "false", "no", "off"]);
|
|
71713
|
-
function fullscreenFromEnv(env3) {
|
|
71714
|
-
const raw = env3.NAMZU_FULLSCREEN;
|
|
71715
|
-
if (raw === void 0) return void 0;
|
|
71716
|
-
return !OFF.has(raw.trim().toLowerCase());
|
|
71717
|
-
}
|
|
71718
|
-
__name(fullscreenFromEnv, "fullscreenFromEnv");
|
|
71719
|
-
function resolveFullscreen(world) {
|
|
71720
|
-
if (!world.interactive || world.hosted) return false;
|
|
71721
|
-
return fullscreenFromEnv(world.env) ?? world.setting ?? false;
|
|
71722
|
-
}
|
|
71723
|
-
__name(resolveFullscreen, "resolveFullscreen");
|
|
71724
|
-
|
|
71725
|
-
// src/tui/fullscreen/mouse-wheel.ts
|
|
71726
|
-
var REPORT = /\u001b\[<(\d+);(\d+);(\d+)([Mm])/g;
|
|
71727
|
-
var UNFINISHED = /\u001b\[<[\d;]*$/;
|
|
71728
|
-
function wheelOf(code) {
|
|
71729
|
-
if ((code & 64) === 0) return null;
|
|
71730
|
-
return (code & 3) === 0 ? "up" : (code & 3) === 1 ? "down" : null;
|
|
71731
|
-
}
|
|
71732
|
-
__name(wheelOf, "wheelOf");
|
|
71733
|
-
function pointerOf(code, x, y, kind) {
|
|
71734
|
-
if ((code & 3) !== 0 || (code & 64) !== 0) return null;
|
|
71735
|
-
if (kind === "m") return { kind: "release", x, y };
|
|
71736
|
-
return { kind: (code & 32) !== 0 ? "drag" : "press", x, y };
|
|
71737
|
-
}
|
|
71738
|
-
__name(pointerOf, "pointerOf");
|
|
71739
|
-
function createMouseFilter() {
|
|
71740
|
-
let held = "";
|
|
71741
|
-
return {
|
|
71742
|
-
feed(chunk) {
|
|
71743
|
-
const input = held + chunk;
|
|
71744
|
-
held = "";
|
|
71745
|
-
if (!input.includes("\x1B[<")) return { text: input, wheel: [], pointer: [] };
|
|
71746
|
-
const wheel = [];
|
|
71747
|
-
const pointer = [];
|
|
71748
|
-
let text = input.replace(REPORT, (_all, code, x, y, kind) => {
|
|
71749
|
-
const direction = kind === "M" ? wheelOf(Number(code)) : null;
|
|
71750
|
-
if (direction) wheel.push(direction);
|
|
71751
|
-
else {
|
|
71752
|
-
const report = pointerOf(Number(code), Number(x), Number(y), kind);
|
|
71753
|
-
if (report) pointer.push(report);
|
|
71754
|
-
}
|
|
71755
|
-
return "";
|
|
71756
|
-
});
|
|
71757
|
-
const tail2 = UNFINISHED.exec(text);
|
|
71758
|
-
if (tail2) {
|
|
71759
|
-
held = tail2[0];
|
|
71760
|
-
text = text.slice(0, tail2.index);
|
|
71761
|
-
}
|
|
71762
|
-
return { text, wheel, pointer };
|
|
71763
|
-
}
|
|
71764
|
-
};
|
|
71765
|
-
}
|
|
71766
|
-
__name(createMouseFilter, "createMouseFilter");
|
|
71767
|
-
function installMouseWheel(stdin, stdout, onWheel, onPointer) {
|
|
71768
|
-
if (stdin.isTTY !== true || stdout.isTTY !== true) return () => void 0;
|
|
71769
|
-
const filter = createMouseFilter();
|
|
71770
|
-
const originalRead = stdin.read;
|
|
71771
|
-
const write = /* @__PURE__ */ __name((text) => {
|
|
71772
|
-
try {
|
|
71773
|
-
stdout.write(text);
|
|
71774
|
-
} catch {
|
|
71775
|
-
}
|
|
71776
|
-
}, "write");
|
|
71777
|
-
stdin.read = /* @__PURE__ */ __name(function patchedRead(...args) {
|
|
71778
|
-
const chunk = originalRead.apply(this, args);
|
|
71779
|
-
if (typeof chunk !== "string") return chunk;
|
|
71780
|
-
const filtered = filter.feed(chunk);
|
|
71781
|
-
for (const direction of filtered.wheel) onWheel(direction);
|
|
71782
|
-
if (onPointer) for (const report of filtered.pointer) onPointer(report);
|
|
71783
|
-
return filtered.text;
|
|
71784
|
-
}, "patchedRead");
|
|
71785
|
-
write(mouseOn(onPointer ? "full" : "scroll"));
|
|
71786
|
-
let removed = false;
|
|
71787
|
-
return () => {
|
|
71788
|
-
if (removed) return;
|
|
71789
|
-
removed = true;
|
|
71790
|
-
stdin.read = originalRead;
|
|
71791
|
-
write(MOUSE_OFF);
|
|
71792
|
-
};
|
|
71793
|
-
}
|
|
71794
|
-
__name(installMouseWheel, "installMouseWheel");
|
|
71795
|
-
var FULLSCREEN_PANIC_RESET = `${MOUSE_OFF}\x1B[?2004l\x1B[?25h`;
|
|
71796
|
-
|
|
71797
|
-
// src/tui/hint-counts.ts
|
|
71798
|
-
import { randomUUID } from "node:crypto";
|
|
71799
|
-
import { mkdirSync as mkdirSync5, readFileSync as readFileSync8, renameSync as renameSync4, rmSync as rmSync3, writeFileSync as writeFileSync4 } from "node:fs";
|
|
71800
|
-
import { dirname as dirname2, join as join11 } from "node:path";
|
|
71801
|
-
var FILE_MODE = 384;
|
|
71802
|
-
var DIR_MODE = 448;
|
|
71803
|
-
function hintCountsPath(home) {
|
|
71804
|
-
return join11(namzuHomePath(home), "hint-counts.json");
|
|
71805
|
-
}
|
|
71806
|
-
__name(hintCountsPath, "hintCountsPath");
|
|
71807
|
-
function readAll(path) {
|
|
71808
|
-
try {
|
|
71809
|
-
const parsed = JSON.parse(readFileSync8(path, "utf8"));
|
|
71810
|
-
if (typeof parsed !== "object" || parsed === null) return {};
|
|
71811
|
-
const counts2 = {};
|
|
71812
|
-
for (const [key, value] of Object.entries(parsed)) {
|
|
71813
|
-
if (typeof value === "number" && Number.isInteger(value) && value >= 0) counts2[key] = value;
|
|
71814
|
-
}
|
|
71815
|
-
return counts2;
|
|
71816
|
-
} catch {
|
|
71817
|
-
return {};
|
|
71818
|
-
}
|
|
71819
|
-
}
|
|
71820
|
-
__name(readAll, "readAll");
|
|
71821
|
-
function readHintCount(name, home) {
|
|
71822
|
-
return readAll(hintCountsPath(home))[name] ?? 0;
|
|
71823
|
-
}
|
|
71824
|
-
__name(readHintCount, "readHintCount");
|
|
71825
|
-
function writeHintCount(name, count2, home) {
|
|
71826
|
-
const path = hintCountsPath(home);
|
|
71827
|
-
const temp = `${path}.${randomUUID()}.tmp`;
|
|
71828
|
-
try {
|
|
71829
|
-
mkdirSync5(dirname2(path), { recursive: true, mode: DIR_MODE });
|
|
71830
|
-
writeFileSync4(temp, `${JSON.stringify({ ...readAll(path), [name]: count2 }, null, 2)}
|
|
71831
|
-
`, {
|
|
71832
|
-
mode: FILE_MODE
|
|
71833
|
-
});
|
|
71834
|
-
renameSync4(temp, path);
|
|
71835
|
-
} catch {
|
|
71836
|
-
rmSync3(temp, { force: true });
|
|
71837
|
-
}
|
|
71838
|
-
}
|
|
71839
|
-
__name(writeHintCount, "writeHintCount");
|
|
71840
|
-
function fileQueuedHintCount(home) {
|
|
71841
|
-
return {
|
|
71842
|
-
read: /* @__PURE__ */ __name(() => readHintCount("queuedMessagesHint", home), "read"),
|
|
71843
|
-
write: /* @__PURE__ */ __name((count2) => writeHintCount("queuedMessagesHint", count2, home), "write")
|
|
71844
|
-
};
|
|
71845
|
-
}
|
|
71846
|
-
__name(fileQueuedHintCount, "fileQueuedHintCount");
|
|
71847
|
-
|
|
71848
|
-
// src/tui/log-pane.tsx
|
|
71849
|
-
var RING_CAPACITY = 512;
|
|
71850
|
-
function createRingBufferSink(capacity) {
|
|
71851
|
-
const buffer = [];
|
|
71852
|
-
return {
|
|
71853
|
-
emit(record3) {
|
|
71854
|
-
buffer.push(record3);
|
|
71855
|
-
if (buffer.length > capacity) buffer.shift();
|
|
71856
|
-
},
|
|
71857
|
-
drain() {
|
|
71858
|
-
return buffer.splice(0, buffer.length);
|
|
71859
|
-
}
|
|
71860
|
-
};
|
|
71861
|
-
}
|
|
71862
|
-
__name(createRingBufferSink, "createRingBufferSink");
|
|
71863
|
-
function installTuiLogSink(logging) {
|
|
71864
|
-
const resolved = contextLogging({ logging });
|
|
71865
|
-
const ring = createRingBufferSink(RING_CAPACITY);
|
|
71866
|
-
installCliLogging(ring, resolved.level);
|
|
71867
|
-
let settled2 = false;
|
|
71868
|
-
const detach = /* @__PURE__ */ __name(() => {
|
|
71869
|
-
process.removeListener("uncaughtException", onFatal);
|
|
71870
|
-
process.removeListener("unhandledRejection", onFatal);
|
|
71871
|
-
}, "detach");
|
|
71872
|
-
const collectDiagnostics = /* @__PURE__ */ __name(() => {
|
|
71873
|
-
if (settled2) return "";
|
|
71874
|
-
settled2 = true;
|
|
71875
|
-
detach();
|
|
71876
|
-
let text = "";
|
|
71877
|
-
const sink = {
|
|
71878
|
-
write: /* @__PURE__ */ __name((chunk) => {
|
|
71879
|
-
text += String(chunk);
|
|
71880
|
-
return true;
|
|
71881
|
-
}, "write")
|
|
71882
|
-
};
|
|
71883
|
-
const out = resolved.format === "json" ? jsonLinesSink(sink) : prettySink(sink);
|
|
71884
|
-
for (const record3 of ring.drain()) out.emit(record3);
|
|
71885
|
-
return text;
|
|
71886
|
-
}, "collectDiagnostics");
|
|
71887
|
-
const flush = /* @__PURE__ */ __name(() => {
|
|
71888
|
-
if (settled2) return;
|
|
71889
|
-
settled2 = true;
|
|
71890
|
-
detach();
|
|
71891
|
-
const out = resolved.format === "json" ? jsonLinesSink(process.stderr) : prettySink(process.stderr);
|
|
71892
|
-
for (const record3 of ring.drain()) out.emit(record3);
|
|
71893
|
-
}, "flush");
|
|
71894
|
-
const close = /* @__PURE__ */ __name(() => {
|
|
71895
|
-
if (settled2) return;
|
|
71896
|
-
settled2 = true;
|
|
71897
|
-
detach();
|
|
71898
|
-
ring.drain();
|
|
71899
|
-
}, "close");
|
|
71900
|
-
const onFatal = /* @__PURE__ */ __name((err) => {
|
|
71901
|
-
const diagnostics = collectDiagnostics();
|
|
71902
|
-
process.stderr.write(reportCrash(err, { extra: diagnostics }));
|
|
71903
|
-
process.exit(EXIT_INTERNAL_ERROR);
|
|
71904
|
-
}, "onFatal");
|
|
71905
|
-
process.once("uncaughtException", onFatal);
|
|
71906
|
-
process.once("unhandledRejection", onFatal);
|
|
71907
|
-
return { close, flush };
|
|
71908
|
-
}
|
|
71909
|
-
__name(installTuiLogSink, "installTuiLogSink");
|
|
71910
|
-
|
|
71911
|
-
// src/tui/output-size-watch.ts
|
|
71912
|
-
var SIZE_WATCH_INTERVAL_MS = 250;
|
|
71913
|
-
function watchOutputSize(output, platform2 = process.platform, timers = { setInterval, clearInterval }) {
|
|
71914
|
-
if (platform2 !== "win32" || output.isTTY !== true) return void 0;
|
|
71915
|
-
if (typeof output._refreshSize !== "function") return void 0;
|
|
71916
|
-
const handle = timers.setInterval(() => {
|
|
71917
|
-
try {
|
|
71918
|
-
output._refreshSize?.();
|
|
71919
|
-
} catch {
|
|
71920
|
-
}
|
|
71921
|
-
}, SIZE_WATCH_INTERVAL_MS);
|
|
71922
|
-
handle?.unref?.();
|
|
71923
|
-
return () => timers.clearInterval(handle);
|
|
71924
|
-
}
|
|
71925
|
-
__name(watchOutputSize, "watchOutputSize");
|
|
71926
|
-
|
|
71927
|
-
// src/tui/paste-marker-guard.ts
|
|
71928
|
-
var ESC4 = "\x1B";
|
|
71929
|
-
var MARKERS = [`${ESC4}[200~`, `${ESC4}[201~`];
|
|
71930
|
-
var SHARED_PREFIX_MS = 200;
|
|
71931
|
-
var MARKER_PREFIX_MS = 2e3;
|
|
71932
|
-
function heldTailLength(text) {
|
|
71933
|
-
const longest = Math.min(text.length, MARKERS[0].length - 1);
|
|
71934
|
-
for (let length = longest; length >= 2; length -= 1) {
|
|
71935
|
-
const tail2 = text.slice(-length);
|
|
71936
|
-
if (MARKERS.some((marker) => marker.startsWith(tail2))) return length;
|
|
71937
|
-
}
|
|
71938
|
-
return 0;
|
|
71939
|
-
}
|
|
71940
|
-
__name(heldTailLength, "heldTailLength");
|
|
71941
|
-
function createPasteMarkerGuard(onRelease) {
|
|
71942
|
-
let held = "";
|
|
71943
|
-
let ready = "";
|
|
71944
|
-
let timer;
|
|
71945
|
-
const stop = /* @__PURE__ */ __name(() => {
|
|
71946
|
-
if (timer === void 0) return;
|
|
71947
|
-
clearTimeout(timer);
|
|
71948
|
-
timer = void 0;
|
|
71949
|
-
}, "stop");
|
|
71950
|
-
return {
|
|
71951
|
-
read(chunk) {
|
|
71952
|
-
if (chunk === null) {
|
|
71953
|
-
const out2 = ready;
|
|
71954
|
-
ready = "";
|
|
71955
|
-
return out2 === "" ? null : out2;
|
|
71956
|
-
}
|
|
71957
|
-
stop();
|
|
71958
|
-
const input = ready + held + chunk;
|
|
71959
|
-
ready = "";
|
|
71960
|
-
held = "";
|
|
71961
|
-
const keep = heldTailLength(input);
|
|
71962
|
-
if (keep > 0) {
|
|
71963
|
-
held = input.slice(input.length - keep);
|
|
71964
|
-
const bound = keep >= 4 ? MARKER_PREFIX_MS : SHARED_PREFIX_MS;
|
|
71965
|
-
timer = setTimeout(() => {
|
|
71966
|
-
timer = void 0;
|
|
71967
|
-
ready = held;
|
|
71968
|
-
held = "";
|
|
71969
|
-
onRelease();
|
|
71970
|
-
}, bound);
|
|
71971
|
-
}
|
|
71972
|
-
const out = input.slice(0, input.length - keep);
|
|
71973
|
-
return out === "" ? null : out;
|
|
71974
|
-
},
|
|
71975
|
-
dispose() {
|
|
71976
|
-
stop();
|
|
71977
|
-
}
|
|
71978
|
-
};
|
|
71979
|
-
}
|
|
71980
|
-
__name(createPasteMarkerGuard, "createPasteMarkerGuard");
|
|
71981
|
-
function installPasteMarkerGuard(stdin) {
|
|
71982
|
-
const originalRead = stdin.read;
|
|
71983
|
-
const guard = createPasteMarkerGuard(() => stdin.emit("readable"));
|
|
71984
|
-
stdin.read = /* @__PURE__ */ __name(function patchedRead(...args) {
|
|
71985
|
-
for (; ; ) {
|
|
71986
|
-
const chunk = originalRead.apply(this, args);
|
|
71987
|
-
if (chunk !== null && typeof chunk !== "string") return chunk;
|
|
71988
|
-
const passed = guard.read(chunk);
|
|
71989
|
-
if (passed !== null || chunk === null) return passed;
|
|
71990
|
-
}
|
|
71991
|
-
}, "patchedRead");
|
|
71992
|
-
let removed = false;
|
|
71993
|
-
return () => {
|
|
71994
|
-
if (removed) return;
|
|
71995
|
-
removed = true;
|
|
71996
|
-
guard.dispose();
|
|
71997
|
-
stdin.read = originalRead;
|
|
71998
|
-
};
|
|
71999
|
-
}
|
|
72000
|
-
__name(installPasteMarkerGuard, "installPasteMarkerGuard");
|
|
72001
|
-
|
|
72002
|
-
// src/tui/render-mode.ts
|
|
72003
|
-
function liveRenderOption(stdout, input, inputIsConsole) {
|
|
72004
|
-
return stdout.isTTY === true && (input.isTTY === true || inputIsConsole) ? { interactive: true } : {};
|
|
72005
|
-
}
|
|
72006
|
-
__name(liveRenderOption, "liveRenderOption");
|
|
72007
|
-
|
|
72008
|
-
// src/tui/theme-launch.ts
|
|
72009
|
-
var BACKGROUND_QUERY_WAIT_MS = 250;
|
|
72010
|
-
function applyLaunchTheme(tui, streams, env3 = process.env) {
|
|
72011
|
-
setReducedMotion(tui?.reducedMotion === true);
|
|
72012
|
-
const setting = tui?.theme ?? "dark";
|
|
72013
|
-
if (setting !== "auto") {
|
|
72014
|
-
setThemeSetting(setting, { env: env3 });
|
|
72015
|
-
return void 0;
|
|
72016
|
-
}
|
|
72017
|
-
const settle = /* @__PURE__ */ __name((reported) => {
|
|
72018
|
-
const answer = reported ?? backgroundFromColorFgBg(env3.COLORFGBG);
|
|
72019
|
-
setThemeSetting("auto", { env: env3, ...answer ? { reported: answer } : {} });
|
|
72020
|
-
}, "settle");
|
|
72021
|
-
if (!streams) {
|
|
72022
|
-
settle(void 0);
|
|
72023
|
-
return void 0;
|
|
72024
|
-
}
|
|
72025
|
-
return askTerminal(streams).then(settle);
|
|
72026
|
-
}
|
|
72027
|
-
__name(applyLaunchTheme, "applyLaunchTheme");
|
|
72028
|
-
async function askTerminal(streams) {
|
|
72029
|
-
let timer;
|
|
72030
|
-
const giveUp = new Promise((resolve10) => {
|
|
72031
|
-
timer = setTimeout(resolve10, BACKGROUND_QUERY_WAIT_MS);
|
|
72032
|
-
});
|
|
72033
|
-
try {
|
|
72034
|
-
return await queryTerminalBackground(streams, giveUp);
|
|
72035
|
-
} finally {
|
|
72036
|
-
clearTimeout(timer);
|
|
72037
|
-
}
|
|
72038
|
-
}
|
|
72039
|
-
__name(askTerminal, "askTerminal");
|
|
72040
|
-
|
|
72041
|
-
// src/tui/tip-history.ts
|
|
72042
|
-
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
72043
|
-
import { mkdirSync as mkdirSync6, readFileSync as readFileSync9, renameSync as renameSync5, rmSync as rmSync4, writeFileSync as writeFileSync5 } from "node:fs";
|
|
72044
|
-
import { dirname as dirname3, join as join12 } from "node:path";
|
|
72045
|
-
var FILE_MODE2 = 384;
|
|
72046
|
-
var DIR_MODE2 = 448;
|
|
72047
|
-
var EMPTY_TIP_HISTORY = { launches: 0, shown: {}, used: {} };
|
|
72048
|
-
function tipHistoryPath(home) {
|
|
72049
|
-
return join12(namzuHomePath(home), "tip-history.json");
|
|
72050
|
-
}
|
|
72051
|
-
__name(tipHistoryPath, "tipHistoryPath");
|
|
72052
|
-
function wholeNumber(value) {
|
|
72053
|
-
return typeof value === "number" && Number.isInteger(value) && value >= 0;
|
|
72054
|
-
}
|
|
72055
|
-
__name(wholeNumber, "wholeNumber");
|
|
72056
|
-
function readTipHistory(path) {
|
|
72057
|
-
try {
|
|
72058
|
-
const parsed = JSON.parse(readFileSync9(path, "utf8"));
|
|
72059
|
-
if (typeof parsed !== "object" || parsed === null) return EMPTY_TIP_HISTORY;
|
|
72060
|
-
const raw = parsed;
|
|
72061
|
-
const shown = {};
|
|
72062
|
-
if (typeof raw.shown === "object" && raw.shown !== null) {
|
|
72063
|
-
for (const [id, entry] of Object.entries(raw.shown)) {
|
|
72064
|
-
const e = entry;
|
|
72065
|
-
if (e && wholeNumber(e.lastLaunch) && wholeNumber(e.total))
|
|
72066
|
-
shown[id] = { lastLaunch: e.lastLaunch, total: e.total };
|
|
72067
|
-
}
|
|
72068
|
-
}
|
|
72069
|
-
const used = {};
|
|
72070
|
-
if (typeof raw.used === "object" && raw.used !== null) {
|
|
72071
|
-
for (const [name, count2] of Object.entries(raw.used))
|
|
72072
|
-
if (wholeNumber(count2)) used[name] = count2;
|
|
72073
|
-
}
|
|
72074
|
-
return { launches: wholeNumber(raw.launches) ? raw.launches : 0, shown, used };
|
|
72075
|
-
} catch {
|
|
72076
|
-
return EMPTY_TIP_HISTORY;
|
|
72077
|
-
}
|
|
72078
|
-
}
|
|
72079
|
-
__name(readTipHistory, "readTipHistory");
|
|
72080
|
-
function writeTipHistory(path, history) {
|
|
72081
|
-
const temp = `${path}.${randomUUID2()}.tmp`;
|
|
72082
|
-
try {
|
|
72083
|
-
mkdirSync6(dirname3(path), { recursive: true, mode: DIR_MODE2 });
|
|
72084
|
-
writeFileSync5(temp, `${JSON.stringify(history, null, 2)}
|
|
72085
|
-
`, { mode: FILE_MODE2 });
|
|
72086
|
-
renameSync5(temp, path);
|
|
72087
|
-
} catch {
|
|
72088
|
-
try {
|
|
72089
|
-
rmSync4(temp, { force: true });
|
|
72090
|
-
} catch {
|
|
72091
|
-
}
|
|
72092
|
-
}
|
|
72093
|
-
}
|
|
72094
|
-
__name(writeTipHistory, "writeTipHistory");
|
|
72095
|
-
function fileTipHistory(home) {
|
|
72096
|
-
const path = tipHistoryPath(home);
|
|
72097
|
-
const update = /* @__PURE__ */ __name((change) => writeTipHistory(path, change(readTipHistory(path))), "update");
|
|
72098
|
-
return {
|
|
72099
|
-
read: /* @__PURE__ */ __name(() => readTipHistory(path), "read"),
|
|
72100
|
-
recordLaunch: /* @__PURE__ */ __name(() => update((h) => ({ ...h, launches: h.launches + 1 })), "recordLaunch"),
|
|
72101
|
-
// Idempotent within a launch: a tip counts once per start, however often it is picked.
|
|
72102
|
-
recordShown: /* @__PURE__ */ __name((id) => update(
|
|
72103
|
-
(h) => h.shown[id]?.lastLaunch === h.launches ? h : {
|
|
72104
|
-
...h,
|
|
72105
|
-
shown: {
|
|
72106
|
-
...h.shown,
|
|
72107
|
-
[id]: { lastLaunch: h.launches, total: (h.shown[id]?.total ?? 0) + 1 }
|
|
72108
|
-
}
|
|
72109
|
-
}
|
|
72110
|
-
), "recordShown"),
|
|
72111
|
-
recordUse: /* @__PURE__ */ __name((command) => update((h) => ({ ...h, used: { ...h.used, [command]: (h.used[command] ?? 0) + 1 } })), "recordUse")
|
|
72112
|
-
};
|
|
72113
|
-
}
|
|
72114
|
-
__name(fileTipHistory, "fileTipHistory");
|
|
72115
|
-
|
|
72116
|
-
// src/tui/zoom/leave.ts
|
|
72117
|
-
async function leaveWorkspacesBounded(options) {
|
|
72118
|
-
let wanted = true;
|
|
72119
|
-
let timer;
|
|
72120
|
-
const hand = /* @__PURE__ */ __name(async () => {
|
|
72121
|
-
if (await options.release(() => wanted)) {
|
|
72122
|
-
if (wanted) await options.flush();
|
|
72123
|
-
}
|
|
72124
|
-
}, "hand");
|
|
72125
|
-
try {
|
|
72126
|
-
await Promise.race([
|
|
72127
|
-
hand().catch(() => void 0),
|
|
72128
|
-
new Promise((resolve10) => {
|
|
72129
|
-
timer = setTimeout(resolve10, options.limitMs);
|
|
72130
|
-
})
|
|
72131
|
-
]);
|
|
72132
|
-
} finally {
|
|
72133
|
-
wanted = false;
|
|
72134
|
-
clearTimeout(timer);
|
|
72135
|
-
}
|
|
72136
|
-
}
|
|
72137
|
-
__name(leaveWorkspacesBounded, "leaveWorkspacesBounded");
|
|
72138
|
-
|
|
72139
|
-
// src/tui/zoom/proxy.ts
|
|
72140
|
-
import { EventEmitter as EventEmitter3 } from "node:events";
|
|
72141
|
-
var HIDE = "\x1B[?25l";
|
|
72142
|
-
var SHOW = "\x1B[?25h";
|
|
72143
|
-
var PASTE_ON = "\x1B[?2004h";
|
|
72144
|
-
var PASTE_OFF = "\x1B[?2004l";
|
|
72145
|
-
var RESIZE = "resize";
|
|
72146
|
-
function createTerminalProxy(realOut, realIn) {
|
|
72147
|
-
let zoomed = null;
|
|
72148
|
-
let keyHandler = null;
|
|
72149
|
-
const realResizes = /* @__PURE__ */ new Set();
|
|
72150
|
-
const injected = [];
|
|
72151
|
-
let announced = false;
|
|
72152
|
-
let cursorHidden = false;
|
|
72153
|
-
let bracketedPaste = false;
|
|
72154
|
-
const resizes = new EventEmitter3();
|
|
72155
|
-
let subscribed = false;
|
|
72156
|
-
const noteModes = /* @__PURE__ */ __name((chunk) => {
|
|
72157
|
-
if (typeof chunk !== "string") return;
|
|
72158
|
-
if (chunk.includes("\x1B[?25")) {
|
|
72159
|
-
const hide = chunk.lastIndexOf(HIDE);
|
|
72160
|
-
const show2 = chunk.lastIndexOf(SHOW);
|
|
72161
|
-
if (hide !== show2) cursorHidden = hide > show2;
|
|
72162
|
-
}
|
|
72163
|
-
if (chunk.includes("\x1B[?2004")) {
|
|
72164
|
-
const on = chunk.lastIndexOf(PASTE_ON);
|
|
72165
|
-
const off = chunk.lastIndexOf(PASTE_OFF);
|
|
72166
|
-
if (on !== off) bracketedPaste = on > off;
|
|
72167
|
-
}
|
|
72168
|
-
}, "noteModes");
|
|
72169
|
-
const subscribe = /* @__PURE__ */ __name(() => {
|
|
72170
|
-
if (subscribed) return;
|
|
72171
|
-
subscribed = true;
|
|
72172
|
-
realOut.on(RESIZE, () => {
|
|
72173
|
-
if (zoomed) for (const listener of [...realResizes]) listener();
|
|
72174
|
-
else resizes.emit(RESIZE);
|
|
72175
|
-
});
|
|
72176
|
-
}, "subscribe");
|
|
72177
|
-
const out = new Proxy(realOut, {
|
|
72178
|
-
get(target, prop) {
|
|
72179
|
-
if (prop === "write") {
|
|
72180
|
-
return (chunk, ...rest) => {
|
|
72181
|
-
noteModes(chunk);
|
|
72182
|
-
if (zoomed === null)
|
|
72183
|
-
return Reflect.apply(target.write, target, [chunk, ...rest]);
|
|
72184
|
-
zoomed.write(typeof chunk === "string" ? chunk : String(chunk));
|
|
72185
|
-
const done = rest.find((r) => typeof r === "function");
|
|
72186
|
-
done?.();
|
|
72187
|
-
return true;
|
|
72188
|
-
};
|
|
72189
|
-
}
|
|
72190
|
-
if (prop === "columns") return zoomed ? zoomed.columns : target.columns;
|
|
72191
|
-
if (prop === "rows") return zoomed ? zoomed.rows : target.rows;
|
|
72192
|
-
if (prop === "getWindowSize") {
|
|
72193
|
-
return () => zoomed ? [zoomed.columns, zoomed.rows] : target.getWindowSize();
|
|
72194
|
-
}
|
|
72195
|
-
if (prop === "on" || prop === "addListener" || prop === "once" || prop === "off" || prop === "removeListener") {
|
|
72196
|
-
return (event, listener) => {
|
|
72197
|
-
if (event !== RESIZE) {
|
|
72198
|
-
Reflect.apply(target[prop], target, [event, listener]);
|
|
72199
|
-
return out;
|
|
72200
|
-
}
|
|
72201
|
-
subscribe();
|
|
72202
|
-
resizes[prop](event, listener);
|
|
72203
|
-
return out;
|
|
72204
|
-
};
|
|
72205
|
-
}
|
|
72206
|
-
const value = Reflect.get(target, prop, target);
|
|
72207
|
-
return typeof value === "function" ? value.bind(target) : value;
|
|
72208
|
-
}
|
|
72209
|
-
});
|
|
72210
|
-
const inn = new Proxy(realIn, {
|
|
72211
|
-
get(target, prop) {
|
|
72212
|
-
if (prop === "read") {
|
|
72213
|
-
return (...args) => {
|
|
72214
|
-
for (; ; ) {
|
|
72215
|
-
const next = injected.shift();
|
|
72216
|
-
if (next !== void 0) return next;
|
|
72217
|
-
const chunk = Reflect.apply(target.read, target, args);
|
|
72218
|
-
if (typeof chunk !== "string") return chunk;
|
|
72219
|
-
if (zoomed !== null && keyHandler !== null) {
|
|
72220
|
-
const kept = keyHandler(chunk);
|
|
72221
|
-
if (kept !== null) return kept;
|
|
72222
|
-
continue;
|
|
72223
|
-
}
|
|
72224
|
-
return chunk;
|
|
72225
|
-
}
|
|
72226
|
-
};
|
|
72227
|
-
}
|
|
72228
|
-
const value = Reflect.get(target, prop, target);
|
|
72229
|
-
return typeof value === "function" ? value.bind(target) : value;
|
|
72230
|
-
}
|
|
72231
|
-
});
|
|
72232
|
-
return {
|
|
72233
|
-
stdout: out,
|
|
72234
|
-
stdin: inn,
|
|
72235
|
-
get mode() {
|
|
72236
|
-
return zoomed ? "zoomed" : "direct";
|
|
72237
|
-
},
|
|
72238
|
-
get cursorHidden() {
|
|
72239
|
-
return cursorHidden;
|
|
72240
|
-
},
|
|
72241
|
-
get bracketedPaste() {
|
|
72242
|
-
return bracketedPaste;
|
|
72243
|
-
},
|
|
72244
|
-
enterZoomed(output, onKey) {
|
|
72245
|
-
zoomed = output;
|
|
72246
|
-
keyHandler = onKey;
|
|
72247
|
-
resizes.emit(RESIZE);
|
|
72248
|
-
},
|
|
72249
|
-
leaveZoomed() {
|
|
72250
|
-
zoomed = null;
|
|
72251
|
-
keyHandler = null;
|
|
72252
|
-
resizes.emit(RESIZE);
|
|
72253
|
-
},
|
|
72254
|
-
resizeZoomed(columns, rows) {
|
|
72255
|
-
if (!zoomed) return;
|
|
72256
|
-
zoomed.columns = columns;
|
|
72257
|
-
zoomed.rows = rows;
|
|
72258
|
-
resizes.emit(RESIZE);
|
|
72259
|
-
},
|
|
72260
|
-
onRealResize(listener) {
|
|
72261
|
-
realResizes.add(listener);
|
|
72262
|
-
subscribe();
|
|
72263
|
-
return () => {
|
|
72264
|
-
realResizes.delete(listener);
|
|
72265
|
-
};
|
|
72266
|
-
},
|
|
72267
|
-
inject(chunk) {
|
|
72268
|
-
injected.push(chunk);
|
|
72269
|
-
if (announced) return;
|
|
72270
|
-
announced = true;
|
|
72271
|
-
queueMicrotask(() => {
|
|
72272
|
-
announced = false;
|
|
72273
|
-
if (injected.length > 0) realIn.emit("readable");
|
|
72274
|
-
});
|
|
72275
|
-
}
|
|
72276
|
-
};
|
|
72277
|
-
}
|
|
72278
|
-
__name(createTerminalProxy, "createTerminalProxy");
|
|
72279
|
-
|
|
72280
|
-
// src/tui/index.tsx
|
|
72281
|
-
var LEAVE_WORKSPACES_MS = 2e3;
|
|
72282
|
-
async function launchTui(ctx, options = {}) {
|
|
72283
|
-
const invocation = {
|
|
72284
|
-
cwd: resolve9(ctx.cwd),
|
|
72285
|
-
command: options.resumeCommand,
|
|
72286
|
-
...ctx.palId ? { palId: ctx.palId } : {}
|
|
72287
|
-
};
|
|
72288
|
-
const logs = installTuiLogSink(ctx.logging);
|
|
72289
|
-
const tipHistory = fileTipHistory();
|
|
72290
|
-
tipHistory.recordLaunch();
|
|
72291
|
-
let exitSummary = null;
|
|
72292
|
-
writeLaunchMouseReset(process.stdout, hostedByHost(process.env, process.ppid));
|
|
72293
|
-
const fullscreen = resolveFullscreen({
|
|
72294
|
-
env: process.env,
|
|
72295
|
-
...ctx.tui?.fullscreen !== void 0 ? { setting: ctx.tui.fullscreen } : {},
|
|
72296
|
-
interactive: process.stdout.isTTY === true && process.stdin.isTTY === true,
|
|
72297
|
-
hosted: hostedByHost(process.env, process.ppid)
|
|
72298
|
-
});
|
|
72299
|
-
if (process.stdout.isTTY && !fullscreen) {
|
|
72300
|
-
process.stdout.write("\x1B[2J\x1B[3J\x1B[H");
|
|
72301
|
-
}
|
|
72302
|
-
const termination = handleTerminationSignals();
|
|
72303
|
-
const consoleInput = openConsoleInput();
|
|
72304
|
-
const stopSizeWatch = watchOutputSize(process.stdout);
|
|
72305
|
-
const themeReady = applyLaunchTheme(
|
|
72306
|
-
ctx.tui,
|
|
72307
|
-
consoleInput === void 0 ? { input: process.stdin, output: process.stdout } : void 0
|
|
72308
|
-
);
|
|
72309
|
-
if (themeReady) await themeReady;
|
|
72310
|
-
const inputStream = consoleInput?.stream ?? process.stdin;
|
|
72311
|
-
const stopPasteMarkerGuard = installPasteMarkerGuard(inputStream);
|
|
72312
|
-
const stopFocusReporting = installFocusReporting(
|
|
72313
|
-
inputStream,
|
|
72314
|
-
process.stdout,
|
|
72315
|
-
(focused) => terminalFocus.set(focused)
|
|
72316
|
-
);
|
|
72317
|
-
const hosted = hostedByHost(process.env, process.ppid);
|
|
72318
|
-
const proxy = !hosted && !fullscreen && consoleInput === void 0 && process.platform !== "win32" && process.stdout.isTTY === true && inputStream.isTTY === true ? createTerminalProxy(process.stdout, inputStream) : null;
|
|
72319
|
-
const terminationExit = { current: null };
|
|
72320
|
-
const repaint = { current: null };
|
|
72321
|
-
const workspaces = {
|
|
72322
|
-
current: null
|
|
72323
|
-
};
|
|
72324
|
-
const workspacesEntry = /* @__PURE__ */ __name(() => {
|
|
72325
|
-
workspaces.current ??= import("./entry-A6OLKTK4.js").then(
|
|
72326
|
-
(m) => m.createWorkspacesEntry({
|
|
72327
|
-
proxy,
|
|
72328
|
-
realOut: process.stdout,
|
|
72329
|
-
env: process.env,
|
|
72330
|
-
cwd: process.cwd(),
|
|
72331
|
-
entry: process.argv[1],
|
|
72332
|
-
prefixSetting: ctx.tui?.workspacesPrefix ?? ctx.tui?.spacesPrefix,
|
|
72333
|
-
...ctx.tui?.mouse !== void 0 ? { mouseSetting: ctx.tui.mouse } : {},
|
|
72334
|
-
...ctx.tui?.copyOnSelect !== void 0 ? { copyOnSelect: ctx.tui.copyOnSelect } : {},
|
|
72335
|
-
requestExit: /* @__PURE__ */ __name(() => terminationExit.current ? terminationExit.current() : instance.unmount(), "requestExit"),
|
|
72336
|
-
repaint: /* @__PURE__ */ __name(() => repaint.current?.(), "repaint")
|
|
72337
|
-
})
|
|
72338
|
-
);
|
|
72339
|
-
return workspaces.current;
|
|
72340
|
-
}, "workspacesEntry");
|
|
72341
|
-
const onOpenWorkspaces = hosted ? () => {
|
|
72342
|
-
process.stdout.write(workspacesSignal("zoom-out"));
|
|
72343
|
-
return Promise.resolve(true);
|
|
72344
|
-
} : proxy !== null ? async () => {
|
|
72345
|
-
try {
|
|
72346
|
-
return await (await workspacesEntry()).open();
|
|
72347
|
-
} catch {
|
|
72348
|
-
return false;
|
|
72349
|
-
}
|
|
72350
|
-
} : void 0;
|
|
72351
|
-
const onConfirmExit = !hosted && proxy !== null ? async () => {
|
|
72352
|
-
try {
|
|
72353
|
-
return workspaces.current === null ? true : await (await workspaces.current).confirmExit();
|
|
72354
|
-
} catch {
|
|
72355
|
-
return true;
|
|
72356
|
-
}
|
|
72357
|
-
} : void 0;
|
|
72358
|
-
const beforeExit = !hosted && proxy !== null ? async () => {
|
|
72359
|
-
if (workspaces.current === null) return;
|
|
72360
|
-
await leaveWorkspacesBounded({
|
|
72361
|
-
release: /* @__PURE__ */ __name((stillWanted) => workspaces.current.then(
|
|
72362
|
-
(entry) => entry.release(stillWanted)
|
|
72363
|
-
), "release"),
|
|
72364
|
-
flush: /* @__PURE__ */ __name(() => instance.waitUntilRenderFlush(), "flush"),
|
|
72365
|
-
limitMs: LEAVE_WORKSPACES_MS
|
|
72366
|
-
});
|
|
72367
|
-
} : void 0;
|
|
72368
|
-
let terminatedBy = null;
|
|
72369
|
-
const wheelListeners = /* @__PURE__ */ new Set();
|
|
72370
|
-
const pointerListeners = /* @__PURE__ */ new Set();
|
|
72371
|
-
const selectable = fullscreen && resolveMouseMode(process.env, ctx.tui?.mouse) === "full";
|
|
72372
|
-
const fullscreenHost = fullscreen ? {
|
|
72373
|
-
...selectable ? {
|
|
72374
|
-
subscribePointer: /* @__PURE__ */ __name((listener) => {
|
|
72375
|
-
pointerListeners.add(listener);
|
|
72376
|
-
return () => {
|
|
72377
|
-
pointerListeners.delete(listener);
|
|
72378
|
-
};
|
|
72379
|
-
}, "subscribePointer")
|
|
72380
|
-
} : {},
|
|
72381
|
-
...ctx.tui?.copyOnSelect !== void 0 ? { copyOnSelect: ctx.tui.copyOnSelect } : {},
|
|
72382
|
-
subscribeWheel: /* @__PURE__ */ __name((listener) => {
|
|
72383
|
-
wheelListeners.add(listener);
|
|
72384
|
-
return () => {
|
|
72385
|
-
wheelListeners.delete(listener);
|
|
72386
|
-
};
|
|
72387
|
-
}, "subscribeWheel")
|
|
72388
|
-
} : void 0;
|
|
72389
|
-
const instance = render_default(
|
|
72390
|
-
import_react63.default.createElement(App2, {
|
|
72391
|
-
ctx,
|
|
72392
|
-
onExitSummary: /* @__PURE__ */ __name((summary2) => {
|
|
72393
|
-
exitSummary = summary2;
|
|
72394
|
-
}, "onExitSummary"),
|
|
72395
|
-
terminationExit,
|
|
72396
|
-
repaint,
|
|
72397
|
-
...fullscreenHost ? { fullscreen: fullscreenHost } : {},
|
|
72398
|
-
...onOpenWorkspaces ? { onOpenWorkspaces } : {},
|
|
72399
|
-
...onConfirmExit ? { onConfirmExit } : {},
|
|
72400
|
-
...beforeExit ? { beforeExit } : {},
|
|
72401
|
-
examplePrompts: true,
|
|
72402
|
-
decisionSetup: {},
|
|
72403
|
-
queuedHintCount: fileQueuedHintCount(),
|
|
72404
|
-
tipHistory
|
|
72405
|
-
}),
|
|
72406
|
-
{
|
|
72407
|
-
stdout: proxy?.stdout ?? process.stdout,
|
|
72408
|
-
stderr: process.stderr,
|
|
72409
|
-
stdin: proxy?.stdin ?? inputStream,
|
|
72410
|
-
exitOnCtrlC: false,
|
|
72411
|
-
// A CI marker in the environment must not blank a real terminal (see render-mode.ts).
|
|
72412
|
-
...liveRenderOption(process.stdout, process.stdin, consoleInput !== void 0),
|
|
72413
|
-
// Ink enters the alternate screen here and leaves it on every way out
|
|
72414
|
-
// (unmount, a signal, a crash). It repaints only the lines that changed.
|
|
72415
|
-
...fullscreen ? { alternateScreen: true, incrementalRendering: true } : {},
|
|
72416
|
-
kittyKeyboard: {
|
|
72417
|
-
mode: "auto",
|
|
72418
|
-
flags: ["disambiguateEscapeCodes"]
|
|
72419
|
-
}
|
|
72420
|
-
}
|
|
72421
|
-
);
|
|
72422
|
-
const stopWheel = fullscreen ? installMouseWheel(
|
|
72423
|
-
inputStream,
|
|
72424
|
-
process.stdout,
|
|
72425
|
-
(direction) => {
|
|
72426
|
-
for (const listener of wheelListeners) listener(direction);
|
|
72427
|
-
},
|
|
72428
|
-
selectable ? (report) => {
|
|
72429
|
-
for (const listener of pointerListeners) listener(report);
|
|
72430
|
-
} : void 0
|
|
72431
|
-
) : void 0;
|
|
72432
|
-
const panicReset = fullscreen ? () => process.stdout.write(FULLSCREEN_PANIC_RESET) : void 0;
|
|
72433
|
-
if (panicReset) process.on("exit", panicReset);
|
|
72434
|
-
termination.onTerminate(async (signal) => {
|
|
72435
|
-
terminatedBy = signal;
|
|
72436
|
-
if (signal === "SIGHUP") {
|
|
72437
|
-
process.stdout.on("error", () => void 0);
|
|
72438
|
-
process.stderr.on("error", () => void 0);
|
|
72439
|
-
}
|
|
72440
|
-
if (terminationExit.current) terminationExit.current();
|
|
72441
|
-
else instance.unmount();
|
|
72442
|
-
await instance.waitUntilExit();
|
|
72443
|
-
if (workspaces.current !== null) await (await workspaces.current).shutdown();
|
|
72444
|
-
});
|
|
72445
|
-
try {
|
|
72446
|
-
await instance.waitUntilExit();
|
|
72447
|
-
} finally {
|
|
72448
|
-
if (workspaces.current !== null) await (await workspaces.current).shutdown();
|
|
72449
|
-
termination.dispose();
|
|
72450
|
-
stopSizeWatch?.();
|
|
72451
|
-
stopFocusReporting();
|
|
72452
|
-
stopWheel?.();
|
|
72453
|
-
stopPasteMarkerGuard();
|
|
72454
|
-
if (panicReset) process.off("exit", panicReset);
|
|
72455
|
-
consoleInput?.release();
|
|
72456
|
-
logs.close();
|
|
72457
|
-
const summary2 = terminatedBy === "SIGHUP" ? "" : formatTuiExitSummary(exitSummary, invocation);
|
|
72458
|
-
if (summary2.length > 0) process.stdout.write(summary2);
|
|
72459
|
-
}
|
|
72460
|
-
}
|
|
72461
|
-
__name(launchTui, "launchTui");
|
|
72462
71729
|
export {
|
|
72463
|
-
|
|
71730
|
+
render_default,
|
|
71731
|
+
glyphForRole,
|
|
71732
|
+
terminalFocus,
|
|
71733
|
+
trailFromRecords,
|
|
71734
|
+
projectConversation,
|
|
71735
|
+
App2 as App
|
|
72464
71736
|
};
|
|
72465
71737
|
/*! Bundled license information:
|
|
72466
71738
|
|
|
@@ -72552,4 +71824,4 @@ react/cjs/react-jsx-runtime.development.js:
|
|
|
72552
71824
|
* LICENSE file in the root directory of this source tree.
|
|
72553
71825
|
*)
|
|
72554
71826
|
*/
|
|
72555
|
-
//# sourceMappingURL=
|
|
71827
|
+
//# sourceMappingURL=chunk-MPLS4I5N.js.map
|