@alivault/pico 0.11.0 → 0.13.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/.output/nitro.json +1 -1
- package/.output/public/assets/addon-fit-CMMXLNsg.js +1 -0
- package/.output/public/assets/{index-DPU34F0T.js → index-CW1T9dk-.js} +11 -10
- package/.output/public/assets/routes-2LboeUx4.js +2194 -0
- package/.output/public/assets/styles-B1ITYh-r.css +2 -0
- package/.output/public/assets/xterm-CCMwI7sy.js +36 -0
- package/.output/server/_libs/lucide-react.mjs +46 -1
- package/.output/server/_libs/xterm__addon-fit.mjs +44 -0
- package/.output/server/_libs/xterm__xterm.mjs +10234 -0
- package/.output/server/_ssr/{router-Ccz1kegF.mjs → router-l__gf5Y7.mjs} +866 -173
- package/.output/server/_ssr/{routes-D3Hu5M6D.mjs → routes-CuWg5WTI.mjs} +167 -27
- package/.output/server/_ssr/{routes-DGf2MDLT.mjs → routes-DySm_W8N.mjs} +1946 -631
- package/.output/server/_ssr/ssr.mjs +2 -2
- package/.output/server/{_tanstack-start-manifest_v-BWLjOj7J.mjs → _tanstack-start-manifest_v-CVoKKKc_.mjs} +5 -4
- package/.output/server/index.mjs +542 -528
- package/.output/server/node_modules/node-pty/LICENSE +69 -0
- package/.output/server/node_modules/node-pty/README.md +165 -0
- package/.output/server/node_modules/node-pty/binding.gyp +111 -0
- package/.output/server/node_modules/node-pty/build/Makefile +369 -0
- package/.output/server/node_modules/node-pty/build/Release/pty.node +0 -0
- package/.output/server/node_modules/node-pty/build/binding.Makefile +6 -0
- package/.output/server/node_modules/node-pty/build/pty.target.mk +168 -0
- package/.output/server/node_modules/node-pty/deps/.editorconfig +2 -0
- package/.output/server/node_modules/node-pty/deps/winpty/.drone.yml +17 -0
- package/.output/server/node_modules/node-pty/deps/winpty/.gitattributes +19 -0
- package/.output/server/node_modules/node-pty/deps/winpty/LICENSE +21 -0
- package/.output/server/node_modules/node-pty/deps/winpty/Makefile +166 -0
- package/.output/server/node_modules/node-pty/deps/winpty/README.md +151 -0
- package/.output/server/node_modules/node-pty/deps/winpty/RELEASES.md +280 -0
- package/.output/server/node_modules/node-pty/deps/winpty/VERSION.txt +1 -0
- package/.output/server/node_modules/node-pty/deps/winpty/configure +167 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/BufferResizeTests.cc +90 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/ChangeScreenBuffer.cc +53 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/ClearConsole.cc +72 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/ConinMode.cc +117 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/ConinMode.ps1 +116 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/ConoutMode.cc +113 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/DebugClient.py +42 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/DebugServer.py +63 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/DumpLines.py +5 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/EnableExtendedFlags.txt +46 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP437-Consolas.txt +528 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP437-Lucida.txt +633 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP932.txt +630 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP936.txt +630 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP949.txt +630 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP950.txt +630 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/MinimumWindowWidths.txt +16 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/Results.txt +4 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/Windows10SetFontBugginess.txt +144 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/FontSurvey.cc +100 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/FormatChar.h +21 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/FreezePerfTest.cc +62 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/GetCh.cc +20 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/GetConsolePos.cc +41 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/GetFont.cc +261 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/IdentifyConsoleWindow.ps1 +51 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/IsNewConsole.cc +87 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/MouseInputNotes.txt +90 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/MoveConsoleWindow.cc +34 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Notes.txt +219 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/OSVersion.cc +27 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/ScreenBufferFreezeInactive.cc +101 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/ScreenBufferTest.cc +671 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/ScreenBufferTest2.cc +151 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/SelectAllTest.cc +45 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/SetBufferSize.cc +32 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/SetCursorPos.cc +10 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/SetFont.cc +145 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/SetWindowRect.cc +36 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/ShowArgv.cc +12 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/ShowConsoleInput.cc +40 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Spew.py +5 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/TestUtil.cc +172 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/UnicodeDoubleWidthTest.cc +102 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/UnicodeWideTest1.cc +246 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/UnicodeWideTest2.cc +130 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/UnixEcho.cc +89 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Utf16Echo.cc +46 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/VeryLargeRead.cc +122 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/VkEscapeTest.cc +56 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Win10ResizeWhileFrozen.cc +52 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Win10WrapTest1.cc +57 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Win10WrapTest2.cc +30 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Win32Echo1.cc +26 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Win32Echo2.cc +19 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Win32Test1.cc +46 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Win32Test2.cc +70 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Win32Test3.cc +78 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Win32Write1.cc +44 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/WindowsBugCrashReader.cc +27 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/WriteConsole.cc +106 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/build32.sh +9 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/build64.sh +9 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/color-test.sh +212 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/font-notes.txt +300 -0
- package/.output/server/node_modules/node-pty/deps/winpty/misc/winbug-15048.cc +201 -0
- package/.output/server/node_modules/node-pty/deps/winpty/ship/build-pty4j-libpty.bat +36 -0
- package/.output/server/node_modules/node-pty/deps/winpty/ship/common_ship.py +53 -0
- package/.output/server/node_modules/node-pty/deps/winpty/ship/make_msvc_package.py +165 -0
- package/.output/server/node_modules/node-pty/deps/winpty/ship/ship.py +108 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/Agent.cc +613 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/Agent.h +103 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/AgentCreateDesktop.cc +84 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/AgentCreateDesktop.h +28 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/ConsoleFont.cc +632 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/ConsoleFont.h +28 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/ConsoleInput.cc +852 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/ConsoleInput.h +109 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/ConsoleInputReencoding.cc +121 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/ConsoleInputReencoding.h +36 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/ConsoleLine.cc +152 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/ConsoleLine.h +41 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/Coord.h +87 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/DebugShowInput.cc +239 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/DebugShowInput.h +32 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/DefaultInputMap.cc +422 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/DefaultInputMap.h +28 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/DsrSender.h +30 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/EventLoop.cc +99 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/EventLoop.h +47 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/InputMap.cc +246 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/InputMap.h +114 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/LargeConsoleRead.cc +71 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/LargeConsoleRead.h +68 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/NamedPipe.cc +378 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/NamedPipe.h +125 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/Scraper.cc +699 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/Scraper.h +103 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/SimplePool.h +75 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/SmallRect.h +143 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/Terminal.cc +535 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/Terminal.h +69 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/UnicodeEncoding.h +157 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/UnicodeEncodingTest.cc +189 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/Win32Console.cc +107 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/Win32Console.h +67 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/Win32ConsoleBuffer.cc +193 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/Win32ConsoleBuffer.h +99 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/main.cc +114 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/subdir.mk +61 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/configurations.gypi +60 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/debugserver/DebugServer.cc +117 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/debugserver/subdir.mk +41 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/include/winpty.h +242 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/include/winpty_constants.h +131 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/libwinpty/AgentLocation.cc +75 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/libwinpty/AgentLocation.h +28 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/libwinpty/LibWinptyException.h +54 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/libwinpty/WinptyInternal.h +72 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/libwinpty/subdir.mk +46 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/libwinpty/winpty.cc +970 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/AgentMsg.h +38 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/BackgroundDesktop.cc +122 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/BackgroundDesktop.h +73 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/Buffer.cc +103 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/Buffer.h +102 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/DebugClient.cc +187 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/DebugClient.h +38 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/GenRandom.cc +138 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/GenRandom.h +55 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/GetCommitHash.bat +13 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/Mutex.h +54 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/OsModule.h +63 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/OwnedHandle.cc +36 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/OwnedHandle.h +45 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/PrecompiledHeader.h +43 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/StringBuilder.h +227 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/StringBuilderTest.cc +114 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/StringUtil.cc +55 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/StringUtil.h +80 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/TimeMeasurement.h +63 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/UnixCtrlChars.h +45 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/UpdateGenVersion.bat +20 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/WindowsSecurity.cc +460 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/WindowsSecurity.h +104 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/WindowsVersion.cc +252 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/WindowsVersion.h +29 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/WinptyAssert.cc +55 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/WinptyAssert.h +64 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/WinptyException.cc +57 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/WinptyException.h +43 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/WinptyVersion.cc +42 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/WinptyVersion.h +27 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/winpty_snprintf.h +99 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/subdir.mk +5 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/tests/subdir.mk +28 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/tests/trivial_test.cc +158 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/unix-adapter/InputHandler.cc +114 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/unix-adapter/InputHandler.h +56 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/unix-adapter/OutputHandler.cc +80 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/unix-adapter/OutputHandler.h +53 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/unix-adapter/Util.cc +86 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/unix-adapter/Util.h +31 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/unix-adapter/WakeupFd.cc +70 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/unix-adapter/WakeupFd.h +42 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/unix-adapter/main.cc +729 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/unix-adapter/subdir.mk +41 -0
- package/.output/server/node_modules/node-pty/deps/winpty/src/winpty.gyp +234 -0
- package/.output/server/node_modules/node-pty/deps/winpty/vcbuild.bat +83 -0
- package/.output/server/node_modules/node-pty/lib/conpty_console_list_agent.js +16 -0
- package/.output/server/node_modules/node-pty/lib/conpty_console_list_agent.js.map +1 -0
- package/.output/server/node_modules/node-pty/lib/eventEmitter2.js +47 -0
- package/.output/server/node_modules/node-pty/lib/eventEmitter2.js.map +1 -0
- package/.output/server/node_modules/node-pty/lib/eventEmitter2.test.js +30 -0
- package/.output/server/node_modules/node-pty/lib/eventEmitter2.test.js.map +1 -0
- package/.output/server/node_modules/node-pty/lib/index.js +52 -0
- package/.output/server/node_modules/node-pty/lib/index.js.map +1 -0
- package/.output/server/node_modules/node-pty/lib/interfaces.js +7 -0
- package/.output/server/node_modules/node-pty/lib/interfaces.js.map +1 -0
- package/.output/server/node_modules/node-pty/lib/shared/conout.js +11 -0
- package/.output/server/node_modules/node-pty/lib/shared/conout.js.map +1 -0
- package/.output/server/node_modules/node-pty/lib/terminal.js +190 -0
- package/.output/server/node_modules/node-pty/lib/terminal.js.map +1 -0
- package/.output/server/node_modules/node-pty/lib/terminal.test.js +139 -0
- package/.output/server/node_modules/node-pty/lib/terminal.test.js.map +1 -0
- package/.output/server/node_modules/node-pty/lib/testUtils.test.js +28 -0
- package/.output/server/node_modules/node-pty/lib/testUtils.test.js.map +1 -0
- package/.output/server/node_modules/node-pty/lib/types.js +7 -0
- package/.output/server/node_modules/node-pty/lib/types.js.map +1 -0
- package/.output/server/node_modules/node-pty/lib/unixTerminal.js +346 -0
- package/.output/server/node_modules/node-pty/lib/unixTerminal.js.map +1 -0
- package/.output/server/node_modules/node-pty/lib/unixTerminal.test.js +351 -0
- package/.output/server/node_modules/node-pty/lib/unixTerminal.test.js.map +1 -0
- package/.output/server/node_modules/node-pty/lib/utils.js +39 -0
- package/.output/server/node_modules/node-pty/lib/utils.js.map +1 -0
- package/.output/server/node_modules/node-pty/lib/windowsConoutConnection.js +125 -0
- package/.output/server/node_modules/node-pty/lib/windowsConoutConnection.js.map +1 -0
- package/.output/server/node_modules/node-pty/lib/windowsPtyAgent.js +320 -0
- package/.output/server/node_modules/node-pty/lib/windowsPtyAgent.js.map +1 -0
- package/.output/server/node_modules/node-pty/lib/windowsPtyAgent.test.js +90 -0
- package/.output/server/node_modules/node-pty/lib/windowsPtyAgent.test.js.map +1 -0
- package/.output/server/node_modules/node-pty/lib/windowsTerminal.js +199 -0
- package/.output/server/node_modules/node-pty/lib/windowsTerminal.js.map +1 -0
- package/.output/server/node_modules/node-pty/lib/windowsTerminal.test.js +219 -0
- package/.output/server/node_modules/node-pty/lib/windowsTerminal.test.js.map +1 -0
- package/.output/server/node_modules/node-pty/lib/worker/conoutSocketWorker.js +22 -0
- package/.output/server/node_modules/node-pty/lib/worker/conoutSocketWorker.js.map +1 -0
- package/.output/server/node_modules/node-pty/package.json +64 -0
- package/.output/server/node_modules/node-pty/prebuilds/darwin-arm64/pty.node +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/darwin-arm64/spawn-helper +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/darwin-x64/pty.node +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/darwin-x64/spawn-helper +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-arm64/conpty/OpenConsole.exe +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-arm64/conpty/conpty.dll +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-arm64/conpty.node +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-arm64/conpty.pdb +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-arm64/conpty_console_list.node +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-arm64/conpty_console_list.pdb +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-arm64/pty.node +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-arm64/pty.pdb +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-arm64/winpty-agent.exe +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-arm64/winpty-agent.pdb +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-arm64/winpty.dll +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-arm64/winpty.pdb +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-x64/conpty/OpenConsole.exe +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-x64/conpty/conpty.dll +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-x64/conpty.node +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-x64/conpty.pdb +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-x64/conpty_console_list.node +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-x64/conpty_console_list.pdb +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-x64/pty.node +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-x64/pty.pdb +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-x64/winpty-agent.exe +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-x64/winpty-agent.pdb +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-x64/winpty.dll +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-x64/winpty.pdb +0 -0
- package/.output/server/node_modules/node-pty/scripts/gen-compile-commands.js +8 -0
- package/.output/server/node_modules/node-pty/scripts/increment-version.js +54 -0
- package/.output/server/node_modules/node-pty/scripts/post-install.js +80 -0
- package/.output/server/node_modules/node-pty/scripts/prebuild.js +34 -0
- package/.output/server/node_modules/node-pty/src/conpty_console_list_agent.ts +15 -0
- package/.output/server/node_modules/node-pty/src/eventEmitter2.test.ts +30 -0
- package/.output/server/node_modules/node-pty/src/eventEmitter2.ts +48 -0
- package/.output/server/node_modules/node-pty/src/index.ts +52 -0
- package/.output/server/node_modules/node-pty/src/interfaces.ts +130 -0
- package/.output/server/node_modules/node-pty/src/native.d.ts +54 -0
- package/.output/server/node_modules/node-pty/src/shared/conout.ts +15 -0
- package/.output/server/node_modules/node-pty/src/terminal.test.ts +119 -0
- package/.output/server/node_modules/node-pty/src/terminal.ts +211 -0
- package/.output/server/node_modules/node-pty/src/testUtils.test.ts +23 -0
- package/.output/server/node_modules/node-pty/src/tsconfig.json +22 -0
- package/.output/server/node_modules/node-pty/src/types.ts +15 -0
- package/.output/server/node_modules/node-pty/src/unix/pty.cc +799 -0
- package/.output/server/node_modules/node-pty/src/unix/spawn-helper.cc +23 -0
- package/.output/server/node_modules/node-pty/src/unixTerminal.test.ts +367 -0
- package/.output/server/node_modules/node-pty/src/unixTerminal.ts +388 -0
- package/.output/server/node_modules/node-pty/src/utils.ts +29 -0
- package/.output/server/node_modules/node-pty/src/win/conpty.cc +583 -0
- package/.output/server/node_modules/node-pty/src/win/conpty.h +41 -0
- package/.output/server/node_modules/node-pty/src/win/conpty_console_list.cc +44 -0
- package/.output/server/node_modules/node-pty/src/win/path_util.cc +95 -0
- package/.output/server/node_modules/node-pty/src/win/path_util.h +26 -0
- package/.output/server/node_modules/node-pty/src/win/winpty.cc +333 -0
- package/.output/server/node_modules/node-pty/src/windowsConoutConnection.ts +82 -0
- package/.output/server/node_modules/node-pty/src/windowsPtyAgent.test.ts +94 -0
- package/.output/server/node_modules/node-pty/src/windowsPtyAgent.ts +321 -0
- package/.output/server/node_modules/node-pty/src/windowsTerminal.test.ts +229 -0
- package/.output/server/node_modules/node-pty/src/windowsTerminal.ts +203 -0
- package/.output/server/node_modules/node-pty/src/worker/conoutSocketWorker.ts +22 -0
- package/.output/server/node_modules/node-pty/third_party/conpty/1.23.251008001/win10-arm64/OpenConsole.exe +0 -0
- package/.output/server/node_modules/node-pty/third_party/conpty/1.23.251008001/win10-arm64/conpty.dll +0 -0
- package/.output/server/node_modules/node-pty/third_party/conpty/1.23.251008001/win10-x64/OpenConsole.exe +0 -0
- package/.output/server/node_modules/node-pty/third_party/conpty/1.23.251008001/win10-x64/conpty.dll +0 -0
- package/.output/server/node_modules/node-pty/typings/node-pty.d.ts +211 -0
- package/.output/server/package.json +1 -0
- package/package.json +11 -4
- package/.output/public/assets/routes-CVlcrX-A.js +0 -2195
- package/.output/public/assets/styles-Chvsnn7o.css +0 -2
- package/scripts/patch-react-jsx-dev-runtime.mjs +0 -93
- /package/.output/public/assets/{wasm-CEUrWlVz.js → wasm-D_MQmneJ.js} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { i as __toESM } from "../_runtime.mjs";
|
|
2
2
|
import { $ as require_react, Q as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
|
|
3
3
|
import { a as createRouter, c as createRootRoute, n as Scripts, r as HeadContent, s as createFileRoute } from "../_libs/@tanstack/react-router+[...].mjs";
|
|
4
|
-
import {
|
|
5
|
-
import { B as
|
|
4
|
+
import { T as Info, a as TriangleAlert, y as OctagonX, z as CircleCheck } from "../_libs/lucide-react.mjs";
|
|
5
|
+
import { B as buildItemsFromSync, H as createCompactionSummaryItem, J as extractToolText, K as extractMessageImages, Lt as toolCategoryFromTool, P as TooltipProvider, R as appliedThemeClassColorMode, T as Spinner, Z as mergeAssistantBlocksForStreaming, f as PICO_SHIKI_VARIABLE_DEFAULTS, n as APPLIED_THEME_STORAGE_KEY, q as extractMessageText$1, t as APPLIED_THEME_CLASSES, u as PICO_CODE_SHIKI_THEME, x as Route$59, z as assistantBlocksFromMessage } from "./routes-CuWg5WTI.mjs";
|
|
6
6
|
import { t as QueryClient } from "../_libs/tanstack__query-core.mjs";
|
|
7
7
|
import { t as setupRouterSsrQueryIntegration } from "../_libs/@tanstack/react-router-ssr-query+[...].mjs";
|
|
8
8
|
import { n as HotkeysProvider } from "../_libs/tanstack__react-hotkeys.mjs";
|
|
@@ -11,16 +11,17 @@ import { t as Toaster } from "../_libs/sonner.mjs";
|
|
|
11
11
|
import { c as bundledLanguages, l as bundledLanguagesAlias, s as codeToHtml, u as createCssVariablesTheme } from "../_libs/@pierre/diffs+[...].mjs";
|
|
12
12
|
import { t as createTwoFilesPatch } from "../_libs/diff.mjs";
|
|
13
13
|
import { n as Debouncer } from "../_libs/tanstack__pacer.mjs";
|
|
14
|
+
import { createRequire } from "node:module";
|
|
14
15
|
import { createHash, randomUUID } from "node:crypto";
|
|
15
16
|
import fs, { constants, existsSync, readFileSync, watch } from "node:fs";
|
|
16
17
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
17
18
|
import path, { basename, dirname, isAbsolute, join, resolve } from "node:path";
|
|
18
|
-
import { access, mkdir, readFile, readdir, realpath, rename, stat, unlink, writeFile } from "node:fs/promises";
|
|
19
|
+
import { access, chmod, mkdir, readFile, readdir, realpath, rename, stat, unlink, writeFile } from "node:fs/promises";
|
|
19
20
|
import os, { homedir } from "node:os";
|
|
20
21
|
import { performance } from "node:perf_hooks";
|
|
21
22
|
import { isMainThread } from "node:worker_threads";
|
|
22
23
|
import { execSync, spawn } from "node:child_process";
|
|
23
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/router-
|
|
24
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/router-l__gf5Y7.js
|
|
24
25
|
var import_react = /* @__PURE__ */ __toESM(require_react());
|
|
25
26
|
var import_jsx_runtime = require_jsx_runtime();
|
|
26
27
|
function sonnerThemeFromAppliedTheme(theme) {
|
|
@@ -87,15 +88,19 @@ function AppProviders({ children }) {
|
|
|
87
88
|
})
|
|
88
89
|
});
|
|
89
90
|
}
|
|
90
|
-
var styles_default = "/assets/styles-
|
|
91
|
+
var styles_default = "/assets/styles-B1ITYh-r.css";
|
|
91
92
|
var TANSTACK_DEVTOOLS_SETTINGS_KEY = "tanstack_devtools_settings";
|
|
92
|
-
var TANSTACK_DEVTOOLS_DEFAULTS_STORAGE_KEY = "pico-tanstack-devtools-defaults-
|
|
93
|
+
var TANSTACK_DEVTOOLS_DEFAULTS_STORAGE_KEY = "pico-tanstack-devtools-defaults-v2";
|
|
93
94
|
var TANSTACK_DEVTOOLS_CONFIG = {
|
|
94
95
|
position: "bottom-right",
|
|
95
|
-
openHotkey: [
|
|
96
|
+
openHotkey: [
|
|
97
|
+
"Control",
|
|
98
|
+
"Shift",
|
|
99
|
+
"`"
|
|
100
|
+
],
|
|
96
101
|
triggerHidden: true
|
|
97
102
|
};
|
|
98
|
-
var Route$
|
|
103
|
+
var Route$58 = createRootRoute({
|
|
99
104
|
head: () => ({
|
|
100
105
|
meta: [
|
|
101
106
|
{ charSet: "utf-8" },
|
|
@@ -630,6 +635,312 @@ async function buildHighlightPayload(options) {
|
|
|
630
635
|
}))
|
|
631
636
|
};
|
|
632
637
|
}
|
|
638
|
+
var TERMINAL_BACKLOG_MAX_CHUNKS = 500;
|
|
639
|
+
var TERMINAL_BACKLOG_MAX_BYTES = 512 * 1024;
|
|
640
|
+
var TERMINAL_EXITED_TTL_MS = 1800 * 1e3;
|
|
641
|
+
var TERMINAL_CLEANUP_INTERVAL_MS = 60 * 1e3;
|
|
642
|
+
var TERMINAL_MIN_COLS = 20;
|
|
643
|
+
var TERMINAL_MAX_COLS = 500;
|
|
644
|
+
var TERMINAL_MIN_ROWS = 5;
|
|
645
|
+
var TERMINAL_MAX_ROWS = 200;
|
|
646
|
+
var TERMINAL_DEFAULT_COLS = 100;
|
|
647
|
+
var TERMINAL_DEFAULT_ROWS = 30;
|
|
648
|
+
var TERMINAL_KEY_MAX_LENGTH = 256;
|
|
649
|
+
var require = createRequire(import.meta.url);
|
|
650
|
+
var ensureSpawnHelperExecutablePromise;
|
|
651
|
+
function normalizeDimension(value, fallback, min, max) {
|
|
652
|
+
const numericValue = typeof value === "number" ? value : Number(value);
|
|
653
|
+
if (!Number.isFinite(numericValue)) return fallback;
|
|
654
|
+
return Math.min(max, Math.max(min, Math.round(numericValue)));
|
|
655
|
+
}
|
|
656
|
+
function createTerminalEnv() {
|
|
657
|
+
const env = {};
|
|
658
|
+
for (const [key, value] of Object.entries(process.env)) if (typeof value === "string") env[key] = value;
|
|
659
|
+
delete env.ZELLIJ;
|
|
660
|
+
delete env.ZELLIJ_SESSION_NAME;
|
|
661
|
+
delete env.TMUX;
|
|
662
|
+
delete env.TMUX_PANE;
|
|
663
|
+
env.TERM = "xterm-256color";
|
|
664
|
+
env.COLORTERM = "truecolor";
|
|
665
|
+
return env;
|
|
666
|
+
}
|
|
667
|
+
function defaultShell() {
|
|
668
|
+
if (process.platform === "win32") return process.env.COMSPEC || "powershell.exe";
|
|
669
|
+
return process.env.SHELL || "/bin/sh";
|
|
670
|
+
}
|
|
671
|
+
async function ensureNodePtySpawnHelperExecutable() {
|
|
672
|
+
if (process.platform === "win32") return;
|
|
673
|
+
ensureSpawnHelperExecutablePromise ??= (async () => {
|
|
674
|
+
try {
|
|
675
|
+
const helperPath = join(dirname(dirname(require.resolve("node-pty"))), "prebuilds", `${process.platform}-${process.arch}`, "spawn-helper");
|
|
676
|
+
const helperStat = await stat(helperPath).catch(() => null);
|
|
677
|
+
if (!helperStat) return;
|
|
678
|
+
if ((helperStat.mode & 73) !== 0) return;
|
|
679
|
+
await chmod(helperPath, helperStat.mode | 493);
|
|
680
|
+
} catch {}
|
|
681
|
+
})();
|
|
682
|
+
await ensureSpawnHelperExecutablePromise;
|
|
683
|
+
}
|
|
684
|
+
function terminalLabel(shell) {
|
|
685
|
+
return basename(shell) || shell;
|
|
686
|
+
}
|
|
687
|
+
function eventSize(event) {
|
|
688
|
+
if (event.type === "output") return event.data.length;
|
|
689
|
+
return JSON.stringify(event).length;
|
|
690
|
+
}
|
|
691
|
+
function formatTerminalError(error) {
|
|
692
|
+
if (error instanceof Error && error.message.trim()) return error.message;
|
|
693
|
+
if (typeof error === "string" && error.trim()) return error;
|
|
694
|
+
return "Unknown terminal error";
|
|
695
|
+
}
|
|
696
|
+
function sseFrame(event) {
|
|
697
|
+
return `data: ${JSON.stringify(event)}\n\n`;
|
|
698
|
+
}
|
|
699
|
+
function exitPayload(exitCode, signal) {
|
|
700
|
+
return typeof signal === "number" && signal > 0 ? {
|
|
701
|
+
exitCode,
|
|
702
|
+
signal
|
|
703
|
+
} : { exitCode };
|
|
704
|
+
}
|
|
705
|
+
function exitEvent(exitCode, signal) {
|
|
706
|
+
return {
|
|
707
|
+
type: "exit",
|
|
708
|
+
...exitPayload(exitCode, signal)
|
|
709
|
+
};
|
|
710
|
+
}
|
|
711
|
+
function normalizeTerminalKey(value) {
|
|
712
|
+
if (typeof value !== "string") return void 0;
|
|
713
|
+
const normalized = value.trim();
|
|
714
|
+
if (!normalized) return void 0;
|
|
715
|
+
return normalized.slice(0, TERMINAL_KEY_MAX_LENGTH);
|
|
716
|
+
}
|
|
717
|
+
function terminalLookupKey(scopeKey, terminalKey) {
|
|
718
|
+
return `${scopeKey}\0${terminalKey}`;
|
|
719
|
+
}
|
|
720
|
+
var PicoTerminalManager = class {
|
|
721
|
+
terminals = /* @__PURE__ */ new Map();
|
|
722
|
+
terminalKeys = /* @__PURE__ */ new Map();
|
|
723
|
+
encoder = new TextEncoder();
|
|
724
|
+
cleanupTimer;
|
|
725
|
+
constructor() {
|
|
726
|
+
this.cleanupTimer = setInterval(() => {
|
|
727
|
+
this.cleanupExitedTerminals();
|
|
728
|
+
}, TERMINAL_CLEANUP_INTERVAL_MS);
|
|
729
|
+
this.cleanupTimer.unref?.();
|
|
730
|
+
}
|
|
731
|
+
async createTerminal({ clientKey, cols, cwd, rows, scopeKey }) {
|
|
732
|
+
await ensureNodePtySpawnHelperExecutable();
|
|
733
|
+
const terminalKey = normalizeTerminalKey(clientKey);
|
|
734
|
+
const lookupKey = terminalKey ? terminalLookupKey(scopeKey, terminalKey) : void 0;
|
|
735
|
+
const existingId = lookupKey ? this.terminalKeys.get(lookupKey) : void 0;
|
|
736
|
+
const existingRecord = existingId ? this.terminals.get(existingId) : void 0;
|
|
737
|
+
if (existingRecord && !existingRecord.exited) {
|
|
738
|
+
existingRecord.lastUsedAt = Date.now();
|
|
739
|
+
return {
|
|
740
|
+
id: existingRecord.id,
|
|
741
|
+
backend: existingRecord.backend,
|
|
742
|
+
cwd: existingRecord.cwd,
|
|
743
|
+
shell: terminalLabel(existingRecord.shell),
|
|
744
|
+
reused: true
|
|
745
|
+
};
|
|
746
|
+
}
|
|
747
|
+
if (existingRecord) await this.disposeTerminalRecord(existingRecord.id);
|
|
748
|
+
const spawnConfig = this.createSpawnConfig();
|
|
749
|
+
const pty = await this.spawnPty(spawnConfig, cwd, cols, rows);
|
|
750
|
+
const id = randomUUID();
|
|
751
|
+
const now = Date.now();
|
|
752
|
+
const record = {
|
|
753
|
+
id,
|
|
754
|
+
args: spawnConfig.args,
|
|
755
|
+
backend: spawnConfig.backend,
|
|
756
|
+
command: spawnConfig.command,
|
|
757
|
+
scopeKey,
|
|
758
|
+
cwd,
|
|
759
|
+
shell: spawnConfig.shellLabel,
|
|
760
|
+
pty,
|
|
761
|
+
dataDisposable: { dispose: () => {} },
|
|
762
|
+
exitDisposable: { dispose: () => {} },
|
|
763
|
+
subscribers: /* @__PURE__ */ new Set(),
|
|
764
|
+
backlog: [],
|
|
765
|
+
backlogBytes: 0,
|
|
766
|
+
createdAt: now,
|
|
767
|
+
lastUsedAt: now
|
|
768
|
+
};
|
|
769
|
+
if (lookupKey) record.lookupKey = lookupKey;
|
|
770
|
+
if (terminalKey) record.terminalKey = terminalKey;
|
|
771
|
+
this.attachPtyHandlers(record);
|
|
772
|
+
this.terminals.set(id, record);
|
|
773
|
+
if (lookupKey) this.terminalKeys.set(lookupKey, id);
|
|
774
|
+
return {
|
|
775
|
+
id,
|
|
776
|
+
backend: record.backend,
|
|
777
|
+
cwd,
|
|
778
|
+
shell: terminalLabel(record.shell),
|
|
779
|
+
reused: false
|
|
780
|
+
};
|
|
781
|
+
}
|
|
782
|
+
createEventsResponse(id, scopeKey, signal) {
|
|
783
|
+
const record = this.assertTerminalScope(id, scopeKey);
|
|
784
|
+
record.lastUsedAt = Date.now();
|
|
785
|
+
let cleanupStream = () => {};
|
|
786
|
+
const stream = new ReadableStream({
|
|
787
|
+
start: (controller) => {
|
|
788
|
+
let closed = false;
|
|
789
|
+
const send = (event) => {
|
|
790
|
+
if (closed) return;
|
|
791
|
+
try {
|
|
792
|
+
controller.enqueue(this.encoder.encode(sseFrame(event)));
|
|
793
|
+
} catch {
|
|
794
|
+
cleanup();
|
|
795
|
+
}
|
|
796
|
+
};
|
|
797
|
+
const cleanup = () => {
|
|
798
|
+
if (closed) return;
|
|
799
|
+
closed = true;
|
|
800
|
+
record.subscribers.delete(send);
|
|
801
|
+
signal.removeEventListener("abort", cleanup);
|
|
802
|
+
try {
|
|
803
|
+
controller.close();
|
|
804
|
+
} catch {}
|
|
805
|
+
};
|
|
806
|
+
cleanupStream = cleanup;
|
|
807
|
+
record.subscribers.add(send);
|
|
808
|
+
signal.addEventListener("abort", cleanup, { once: true });
|
|
809
|
+
send({
|
|
810
|
+
type: "ready",
|
|
811
|
+
backend: record.backend,
|
|
812
|
+
id: record.id,
|
|
813
|
+
cwd: record.cwd,
|
|
814
|
+
shell: terminalLabel(record.shell)
|
|
815
|
+
});
|
|
816
|
+
for (const event of record.backlog) send(event);
|
|
817
|
+
if (record.exited) send(exitEvent(record.exited.exitCode, record.exited.signal));
|
|
818
|
+
},
|
|
819
|
+
cancel: () => {
|
|
820
|
+
cleanupStream();
|
|
821
|
+
}
|
|
822
|
+
});
|
|
823
|
+
return new Response(stream, { headers: {
|
|
824
|
+
"cache-control": "no-cache, no-transform",
|
|
825
|
+
connection: "keep-alive",
|
|
826
|
+
"content-type": "text/event-stream; charset=utf-8",
|
|
827
|
+
"x-accel-buffering": "no"
|
|
828
|
+
} });
|
|
829
|
+
}
|
|
830
|
+
writeTerminal(id, scopeKey, data) {
|
|
831
|
+
const record = this.assertTerminalScope(id, scopeKey);
|
|
832
|
+
if (record.exited) throw new Error("Terminal has exited.");
|
|
833
|
+
if (typeof data !== "string") throw new Error("Terminal input data is required.");
|
|
834
|
+
record.lastUsedAt = Date.now();
|
|
835
|
+
record.pty.write(data);
|
|
836
|
+
}
|
|
837
|
+
resizeTerminal(id, scopeKey, dimensions) {
|
|
838
|
+
const record = this.assertTerminalScope(id, scopeKey);
|
|
839
|
+
if (record.exited) return;
|
|
840
|
+
const cols = normalizeDimension(dimensions.cols, record.pty.cols, TERMINAL_MIN_COLS, TERMINAL_MAX_COLS);
|
|
841
|
+
const rows = normalizeDimension(dimensions.rows, record.pty.rows, TERMINAL_MIN_ROWS, TERMINAL_MAX_ROWS);
|
|
842
|
+
record.lastUsedAt = Date.now();
|
|
843
|
+
record.pty.resize(cols, rows);
|
|
844
|
+
}
|
|
845
|
+
async closeTerminal(id, scopeKey) {
|
|
846
|
+
this.assertTerminalScope(id, scopeKey);
|
|
847
|
+
await this.disposeTerminalRecord(id);
|
|
848
|
+
}
|
|
849
|
+
dispose() {
|
|
850
|
+
clearInterval(this.cleanupTimer);
|
|
851
|
+
for (const id of this.terminals.keys()) this.disposeTerminalRecord(id);
|
|
852
|
+
}
|
|
853
|
+
async spawnPty(spawnConfig, cwd, cols, rows) {
|
|
854
|
+
return (await import("node-pty")).spawn(spawnConfig.command, spawnConfig.args, {
|
|
855
|
+
cols: normalizeDimension(cols, TERMINAL_DEFAULT_COLS, TERMINAL_MIN_COLS, TERMINAL_MAX_COLS),
|
|
856
|
+
cwd,
|
|
857
|
+
env: createTerminalEnv(),
|
|
858
|
+
name: "xterm-256color",
|
|
859
|
+
rows: normalizeDimension(rows, TERMINAL_DEFAULT_ROWS, TERMINAL_MIN_ROWS, TERMINAL_MAX_ROWS)
|
|
860
|
+
});
|
|
861
|
+
}
|
|
862
|
+
attachPtyHandlers(record) {
|
|
863
|
+
record.dataDisposable = record.pty.onData((data) => {
|
|
864
|
+
this.publish(record, {
|
|
865
|
+
type: "output",
|
|
866
|
+
data
|
|
867
|
+
});
|
|
868
|
+
});
|
|
869
|
+
record.exitDisposable = record.pty.onExit((event) => {
|
|
870
|
+
this.handlePtyExit(record, event.exitCode, event.signal);
|
|
871
|
+
});
|
|
872
|
+
}
|
|
873
|
+
handlePtyExit(record, exitCode, signal) {
|
|
874
|
+
if (this.terminals.get(record.id) !== record) return;
|
|
875
|
+
record.exited = exitPayload(exitCode, signal);
|
|
876
|
+
this.publish(record, exitEvent(exitCode, signal));
|
|
877
|
+
}
|
|
878
|
+
createSpawnConfig() {
|
|
879
|
+
const shell = defaultShell();
|
|
880
|
+
return {
|
|
881
|
+
args: [],
|
|
882
|
+
backend: "shell",
|
|
883
|
+
command: shell,
|
|
884
|
+
shellLabel: shell
|
|
885
|
+
};
|
|
886
|
+
}
|
|
887
|
+
assertTerminalScope(id, scopeKey) {
|
|
888
|
+
const record = this.terminals.get(id);
|
|
889
|
+
if (!record) throw new Error("Terminal not found.");
|
|
890
|
+
if (record.scopeKey !== scopeKey) throw new Error("Terminal not found for this session.");
|
|
891
|
+
return record;
|
|
892
|
+
}
|
|
893
|
+
publish(record, event) {
|
|
894
|
+
record.lastUsedAt = Date.now();
|
|
895
|
+
this.rememberBacklog(record, event);
|
|
896
|
+
for (const subscriber of record.subscribers) try {
|
|
897
|
+
subscriber(event);
|
|
898
|
+
} catch {
|
|
899
|
+
record.subscribers.delete(subscriber);
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
rememberBacklog(record, event) {
|
|
903
|
+
if (event.type !== "output") return;
|
|
904
|
+
record.backlog.push(event);
|
|
905
|
+
record.backlogBytes += eventSize(event);
|
|
906
|
+
while (record.backlog.length > TERMINAL_BACKLOG_MAX_CHUNKS || record.backlogBytes > TERMINAL_BACKLOG_MAX_BYTES) {
|
|
907
|
+
const removed = record.backlog.shift();
|
|
908
|
+
if (!removed) break;
|
|
909
|
+
record.backlogBytes = Math.max(0, record.backlogBytes - eventSize(removed));
|
|
910
|
+
}
|
|
911
|
+
}
|
|
912
|
+
async disposeTerminalRecord(id) {
|
|
913
|
+
const record = this.terminals.get(id);
|
|
914
|
+
if (!record) return;
|
|
915
|
+
this.terminals.delete(id);
|
|
916
|
+
if (record.lookupKey) this.terminalKeys.delete(record.lookupKey);
|
|
917
|
+
record.subscribers.clear();
|
|
918
|
+
try {
|
|
919
|
+
record.dataDisposable.dispose();
|
|
920
|
+
} catch {}
|
|
921
|
+
try {
|
|
922
|
+
record.exitDisposable.dispose();
|
|
923
|
+
} catch {}
|
|
924
|
+
try {
|
|
925
|
+
record.pty.kill();
|
|
926
|
+
} catch (error) {
|
|
927
|
+
const message = formatTerminalError(error);
|
|
928
|
+
if (!record.exited) this.rememberBacklog(record, {
|
|
929
|
+
type: "error",
|
|
930
|
+
error: message
|
|
931
|
+
});
|
|
932
|
+
}
|
|
933
|
+
}
|
|
934
|
+
cleanupExitedTerminals() {
|
|
935
|
+
const now = Date.now();
|
|
936
|
+
for (const record of this.terminals.values()) {
|
|
937
|
+
if (record.subscribers.size > 0) continue;
|
|
938
|
+
if (!record.exited) continue;
|
|
939
|
+
if (now - record.lastUsedAt < TERMINAL_EXITED_TTL_MS) continue;
|
|
940
|
+
this.disposeTerminalRecord(record.id);
|
|
941
|
+
}
|
|
942
|
+
}
|
|
943
|
+
};
|
|
633
944
|
function messageItemIndex(item) {
|
|
634
945
|
const match = item.itemKey?.match(/^message:(\d+)$/);
|
|
635
946
|
if (!match) return -1;
|
|
@@ -2420,6 +2731,195 @@ async function readDirectoryGitChanges(cwd, { force = false } = {}) {
|
|
|
2420
2731
|
function uniqueGitActionPaths(paths) {
|
|
2421
2732
|
return Array.from(new Set(paths.filter((path) => Boolean(path))));
|
|
2422
2733
|
}
|
|
2734
|
+
async function gitRepositoryHasHead(cwd) {
|
|
2735
|
+
return (await runCommand("git", [
|
|
2736
|
+
"rev-parse",
|
|
2737
|
+
"--verify",
|
|
2738
|
+
"HEAD"
|
|
2739
|
+
], {
|
|
2740
|
+
cwd,
|
|
2741
|
+
timeoutMs: GIT_REPOSITORY_CHECK_TIMEOUT_MS
|
|
2742
|
+
})).code === 0;
|
|
2743
|
+
}
|
|
2744
|
+
function combineGitActionResults(results) {
|
|
2745
|
+
return {
|
|
2746
|
+
stdout: results.map((result) => result.stdout).filter(Boolean).join("\n"),
|
|
2747
|
+
stderr: results.map((result) => result.stderr).filter(Boolean).join("\n")
|
|
2748
|
+
};
|
|
2749
|
+
}
|
|
2750
|
+
async function stageDirectoryGitAll(cwd) {
|
|
2751
|
+
const normalizedCwd = normalizeGitCwd(cwd);
|
|
2752
|
+
if (!normalizedCwd) throw new Error("cwd is required");
|
|
2753
|
+
if (!await isInsideWorkTree(normalizedCwd)) throw new Error("No git repository detected");
|
|
2754
|
+
const result = await runCommand("git", [
|
|
2755
|
+
"add",
|
|
2756
|
+
"-A",
|
|
2757
|
+
"--",
|
|
2758
|
+
":/"
|
|
2759
|
+
], {
|
|
2760
|
+
cwd: normalizedCwd,
|
|
2761
|
+
timeoutMs: GIT_ACTION_TIMEOUT_MS
|
|
2762
|
+
});
|
|
2763
|
+
if (result.code !== 0) throw new Error(gitCommandErrorMessage("Failed to stage changes", result));
|
|
2764
|
+
invalidateDirectoryGitCaches(normalizedCwd);
|
|
2765
|
+
return {
|
|
2766
|
+
stdout: result.stdout,
|
|
2767
|
+
stderr: result.stderr
|
|
2768
|
+
};
|
|
2769
|
+
}
|
|
2770
|
+
async function unstageDirectoryGitAll(cwd) {
|
|
2771
|
+
const normalizedCwd = normalizeGitCwd(cwd);
|
|
2772
|
+
if (!normalizedCwd) throw new Error("cwd is required");
|
|
2773
|
+
if (!await isInsideWorkTree(normalizedCwd)) throw new Error("No git repository detected");
|
|
2774
|
+
const result = await gitRepositoryHasHead(normalizedCwd) ? await runCommand("git", [
|
|
2775
|
+
"restore",
|
|
2776
|
+
"--staged",
|
|
2777
|
+
"--",
|
|
2778
|
+
":/"
|
|
2779
|
+
], {
|
|
2780
|
+
cwd: normalizedCwd,
|
|
2781
|
+
timeoutMs: GIT_ACTION_TIMEOUT_MS
|
|
2782
|
+
}) : await runCommand("git", [
|
|
2783
|
+
"rm",
|
|
2784
|
+
"-r",
|
|
2785
|
+
"--cached",
|
|
2786
|
+
"--ignore-unmatch",
|
|
2787
|
+
"--",
|
|
2788
|
+
":/"
|
|
2789
|
+
], {
|
|
2790
|
+
cwd: normalizedCwd,
|
|
2791
|
+
timeoutMs: GIT_ACTION_TIMEOUT_MS
|
|
2792
|
+
});
|
|
2793
|
+
if (result.code !== 0) throw new Error(gitCommandErrorMessage("Failed to unstage changes", result));
|
|
2794
|
+
invalidateDirectoryGitCaches(normalizedCwd);
|
|
2795
|
+
return {
|
|
2796
|
+
stdout: result.stdout,
|
|
2797
|
+
stderr: result.stderr
|
|
2798
|
+
};
|
|
2799
|
+
}
|
|
2800
|
+
async function unstageDirectoryGitFile(cwd, path, previousPath) {
|
|
2801
|
+
const normalizedCwd = normalizeGitCwd(cwd);
|
|
2802
|
+
const normalizedPath = assertGitFilePath(path);
|
|
2803
|
+
const normalizedPreviousPath = previousPath ? assertGitFilePath(previousPath) : void 0;
|
|
2804
|
+
if (!normalizedCwd) throw new Error("cwd is required");
|
|
2805
|
+
if (!await isInsideWorkTree(normalizedCwd)) throw new Error("No git repository detected");
|
|
2806
|
+
const paths = uniqueGitActionPaths([normalizedPreviousPath, normalizedPath]);
|
|
2807
|
+
const result = await gitRepositoryHasHead(normalizedCwd) ? await runCommand("git", [
|
|
2808
|
+
"restore",
|
|
2809
|
+
"--staged",
|
|
2810
|
+
"--",
|
|
2811
|
+
...paths
|
|
2812
|
+
], {
|
|
2813
|
+
cwd: normalizedCwd,
|
|
2814
|
+
timeoutMs: GIT_ACTION_TIMEOUT_MS
|
|
2815
|
+
}) : await runCommand("git", [
|
|
2816
|
+
"rm",
|
|
2817
|
+
"-r",
|
|
2818
|
+
"--cached",
|
|
2819
|
+
"--ignore-unmatch",
|
|
2820
|
+
"--",
|
|
2821
|
+
...paths
|
|
2822
|
+
], {
|
|
2823
|
+
cwd: normalizedCwd,
|
|
2824
|
+
timeoutMs: GIT_ACTION_TIMEOUT_MS
|
|
2825
|
+
});
|
|
2826
|
+
if (result.code !== 0) throw new Error(gitCommandErrorMessage("Failed to unstage changes", result));
|
|
2827
|
+
invalidateDirectoryGitCaches(normalizedCwd);
|
|
2828
|
+
return {
|
|
2829
|
+
stdout: result.stdout,
|
|
2830
|
+
stderr: result.stderr
|
|
2831
|
+
};
|
|
2832
|
+
}
|
|
2833
|
+
async function discardDirectoryGitAll(cwd) {
|
|
2834
|
+
const normalizedCwd = normalizeGitCwd(cwd);
|
|
2835
|
+
if (!normalizedCwd) throw new Error("cwd is required");
|
|
2836
|
+
if (!await isInsideWorkTree(normalizedCwd)) throw new Error("No git repository detected");
|
|
2837
|
+
const restoreResult = await gitRepositoryHasHead(normalizedCwd) ? await runCommand("git", [
|
|
2838
|
+
"restore",
|
|
2839
|
+
"--source=HEAD",
|
|
2840
|
+
"--staged",
|
|
2841
|
+
"--worktree",
|
|
2842
|
+
"--",
|
|
2843
|
+
":/"
|
|
2844
|
+
], {
|
|
2845
|
+
cwd: normalizedCwd,
|
|
2846
|
+
timeoutMs: GIT_ACTION_TIMEOUT_MS
|
|
2847
|
+
}) : await runCommand("git", [
|
|
2848
|
+
"rm",
|
|
2849
|
+
"-r",
|
|
2850
|
+
"--cached",
|
|
2851
|
+
"--ignore-unmatch",
|
|
2852
|
+
"--",
|
|
2853
|
+
":/"
|
|
2854
|
+
], {
|
|
2855
|
+
cwd: normalizedCwd,
|
|
2856
|
+
timeoutMs: GIT_ACTION_TIMEOUT_MS
|
|
2857
|
+
});
|
|
2858
|
+
if (restoreResult.code !== 0) throw new Error(gitCommandErrorMessage("Failed to discard changes", restoreResult));
|
|
2859
|
+
const cleanResult = await runCommand("git", [
|
|
2860
|
+
"clean",
|
|
2861
|
+
"-fd",
|
|
2862
|
+
"--",
|
|
2863
|
+
":/"
|
|
2864
|
+
], {
|
|
2865
|
+
cwd: normalizedCwd,
|
|
2866
|
+
timeoutMs: GIT_ACTION_TIMEOUT_MS
|
|
2867
|
+
});
|
|
2868
|
+
if (cleanResult.code !== 0) throw new Error(gitCommandErrorMessage("Failed to discard changes", cleanResult));
|
|
2869
|
+
invalidateDirectoryGitCaches(normalizedCwd);
|
|
2870
|
+
return combineGitActionResults([{
|
|
2871
|
+
stdout: restoreResult.stdout,
|
|
2872
|
+
stderr: restoreResult.stderr
|
|
2873
|
+
}, {
|
|
2874
|
+
stdout: cleanResult.stdout,
|
|
2875
|
+
stderr: cleanResult.stderr
|
|
2876
|
+
}]);
|
|
2877
|
+
}
|
|
2878
|
+
async function nukeDirectoryGitWorkingTree(cwd) {
|
|
2879
|
+
const normalizedCwd = normalizeGitCwd(cwd);
|
|
2880
|
+
if (!normalizedCwd) throw new Error("cwd is required");
|
|
2881
|
+
if (!await isInsideWorkTree(normalizedCwd)) throw new Error("No git repository detected");
|
|
2882
|
+
const restoreResult = await gitRepositoryHasHead(normalizedCwd) ? await runCommand("git", [
|
|
2883
|
+
"restore",
|
|
2884
|
+
"--source=HEAD",
|
|
2885
|
+
"--staged",
|
|
2886
|
+
"--worktree",
|
|
2887
|
+
"--",
|
|
2888
|
+
":/"
|
|
2889
|
+
], {
|
|
2890
|
+
cwd: normalizedCwd,
|
|
2891
|
+
timeoutMs: GIT_ACTION_TIMEOUT_MS
|
|
2892
|
+
}) : await runCommand("git", [
|
|
2893
|
+
"rm",
|
|
2894
|
+
"-r",
|
|
2895
|
+
"--cached",
|
|
2896
|
+
"--ignore-unmatch",
|
|
2897
|
+
"--",
|
|
2898
|
+
":/"
|
|
2899
|
+
], {
|
|
2900
|
+
cwd: normalizedCwd,
|
|
2901
|
+
timeoutMs: GIT_ACTION_TIMEOUT_MS
|
|
2902
|
+
});
|
|
2903
|
+
if (restoreResult.code !== 0) throw new Error(gitCommandErrorMessage("Failed to nuke working tree", restoreResult));
|
|
2904
|
+
const cleanResult = await runCommand("git", [
|
|
2905
|
+
"clean",
|
|
2906
|
+
"-fdx",
|
|
2907
|
+
"--",
|
|
2908
|
+
":/"
|
|
2909
|
+
], {
|
|
2910
|
+
cwd: normalizedCwd,
|
|
2911
|
+
timeoutMs: GIT_ACTION_TIMEOUT_MS
|
|
2912
|
+
});
|
|
2913
|
+
if (cleanResult.code !== 0) throw new Error(gitCommandErrorMessage("Failed to nuke working tree", cleanResult));
|
|
2914
|
+
invalidateDirectoryGitCaches(normalizedCwd);
|
|
2915
|
+
return combineGitActionResults([{
|
|
2916
|
+
stdout: restoreResult.stdout,
|
|
2917
|
+
stderr: restoreResult.stderr
|
|
2918
|
+
}, {
|
|
2919
|
+
stdout: cleanResult.stdout,
|
|
2920
|
+
stderr: cleanResult.stderr
|
|
2921
|
+
}]);
|
|
2922
|
+
}
|
|
2423
2923
|
async function stageDirectoryGitFile(cwd, path, previousPath) {
|
|
2424
2924
|
const normalizedCwd = normalizeGitCwd(cwd);
|
|
2425
2925
|
const normalizedPath = assertGitFilePath(path);
|
|
@@ -3746,6 +4246,30 @@ function normalizeClientPendingId(value) {
|
|
|
3746
4246
|
if (pendingId.length > 128) return void 0;
|
|
3747
4247
|
return pendingId;
|
|
3748
4248
|
}
|
|
4249
|
+
function normalizePromptDraftOwnerKey(value) {
|
|
4250
|
+
if (typeof value !== "string") return "";
|
|
4251
|
+
const ownerKey = value.trim();
|
|
4252
|
+
if (!ownerKey.startsWith("draft:")) return "";
|
|
4253
|
+
if (ownerKey.length > 1024) return "";
|
|
4254
|
+
return ownerKey;
|
|
4255
|
+
}
|
|
4256
|
+
function normalizePromptDraftCwd(value) {
|
|
4257
|
+
if (typeof value !== "string") return void 0;
|
|
4258
|
+
return value.trim() || void 0;
|
|
4259
|
+
}
|
|
4260
|
+
function promptDraftOwnerKeyForCwd(cwd) {
|
|
4261
|
+
return `draft:${cwd?.trim() || "default"}`;
|
|
4262
|
+
}
|
|
4263
|
+
function promptDraftCwdFromOwnerKey(ownerKey) {
|
|
4264
|
+
if (!ownerKey || ownerKey === promptDraftOwnerKeyForCwd(void 0)) return;
|
|
4265
|
+
return ownerKey.slice(6).trim() || void 0;
|
|
4266
|
+
}
|
|
4267
|
+
function promptDraftTargetMatches(entry, target) {
|
|
4268
|
+
if (target.cwd && entry.cwd === target.cwd) return true;
|
|
4269
|
+
const entryOwnerKey = promptDraftOwnerKeyForCwd(entry.cwd);
|
|
4270
|
+
if (target.ownerKey === entryOwnerKey) return true;
|
|
4271
|
+
return target.ownerKey === promptDraftOwnerKeyForCwd(void 0);
|
|
4272
|
+
}
|
|
3749
4273
|
var PicoRuntime = class {
|
|
3750
4274
|
encoder = new TextEncoder();
|
|
3751
4275
|
contexts = /* @__PURE__ */ new Map();
|
|
@@ -3760,6 +4284,7 @@ var PicoRuntime = class {
|
|
|
3760
4284
|
gitWatchManager = new GitWatchManager((change) => {
|
|
3761
4285
|
this.handleGitWatchChange(change);
|
|
3762
4286
|
});
|
|
4287
|
+
terminalManager = new PicoTerminalManager();
|
|
3763
4288
|
sessionIndexCache;
|
|
3764
4289
|
sessionIndexPromise;
|
|
3765
4290
|
sdkPromise;
|
|
@@ -4689,6 +5214,32 @@ var PicoRuntime = class {
|
|
|
4689
5214
|
if (!entry || !this.isDraftEntry(entry)) return;
|
|
4690
5215
|
if (![...this.contexts.values()].some((context) => context.activeKey === entry.key || context.draftKey === entry.key)) await this.disposeSessionEntry(entry);
|
|
4691
5216
|
}
|
|
5217
|
+
async recoverMissingPromptDraftTarget(context, target) {
|
|
5218
|
+
if (!target.ownerKey && !target.cwd) return void 0;
|
|
5219
|
+
const matchesTarget = (entry) => Boolean(entry && this.isDraftEntry(entry) && promptDraftTargetMatches(entry, target));
|
|
5220
|
+
const recoveredCwd = target.cwd || promptDraftCwdFromOwnerKey(target.ownerKey) || (target.ownerKey === promptDraftOwnerKeyForCwd(void 0) ? resolveScopeCwd(context.sessionScope, process.cwd()) : void 0);
|
|
5221
|
+
const activeEntry = this.getActiveEntry(context);
|
|
5222
|
+
if (matchesTarget(activeEntry)) return activeEntry;
|
|
5223
|
+
if (activeEntry && recoveredCwd && activeEntry.cwd === recoveredCwd && this.getEntryStreamingState(activeEntry)) return activeEntry;
|
|
5224
|
+
const draftEntry = context.draftKey ? this.sessionEntries.get(context.draftKey) : void 0;
|
|
5225
|
+
if (draftEntry && matchesTarget(draftEntry)) {
|
|
5226
|
+
await this.activateContextSession(context, draftEntry);
|
|
5227
|
+
return draftEntry;
|
|
5228
|
+
}
|
|
5229
|
+
if (!recoveredCwd) return void 0;
|
|
5230
|
+
const nextEntry = await this.createNewSessionEntry(recoveredCwd, {
|
|
5231
|
+
draft: true,
|
|
5232
|
+
sessionDir: activeEntry && recoveredCwd === activeEntry.cwd ? activeEntry.session.sessionManager.getSessionDir?.() : void 0,
|
|
5233
|
+
sessionStartEvent: {
|
|
5234
|
+
type: "session_start",
|
|
5235
|
+
reason: "new",
|
|
5236
|
+
previousSessionFile: activeEntry?.session.sessionFile
|
|
5237
|
+
}
|
|
5238
|
+
});
|
|
5239
|
+
context.draftKey = nextEntry.key;
|
|
5240
|
+
await this.activateContextSession(context, nextEntry);
|
|
5241
|
+
return nextEntry;
|
|
5242
|
+
}
|
|
4692
5243
|
async clearContextDraft(context) {
|
|
4693
5244
|
await clearContextDraft({
|
|
4694
5245
|
context,
|
|
@@ -4802,6 +5353,9 @@ var PicoRuntime = class {
|
|
|
4802
5353
|
getBaseCwd(activeEntry, context) {
|
|
4803
5354
|
return activeEntry.cwd || resolveScopeCwd(context.sessionScope, process.cwd());
|
|
4804
5355
|
}
|
|
5356
|
+
getTerminalScopeKey(activeEntry, context) {
|
|
5357
|
+
return `${context.id}:${activeEntry.key}:${this.getBaseCwd(activeEntry, context)}`;
|
|
5358
|
+
}
|
|
4805
5359
|
async createSessionEntryFromRuntime(runtime, options) {
|
|
4806
5360
|
const startedAt = performance.now();
|
|
4807
5361
|
this.logRuntimeDiagnostics(runtime.diagnostics);
|
|
@@ -5549,7 +6103,33 @@ var PicoRuntime = class {
|
|
|
5549
6103
|
}
|
|
5550
6104
|
}
|
|
5551
6105
|
async prompt(request, body) {
|
|
5552
|
-
const
|
|
6106
|
+
const url = new URL(request.url);
|
|
6107
|
+
const requestedSessionKey = url.searchParams.get("sessionKey")?.trim() || "";
|
|
6108
|
+
const requestedDraftTarget = {
|
|
6109
|
+
ownerKey: normalizePromptDraftOwnerKey(body.draftOwnerKey),
|
|
6110
|
+
cwd: normalizePromptDraftCwd(body.draftCwd)
|
|
6111
|
+
};
|
|
6112
|
+
let resolvedContext;
|
|
6113
|
+
let resolvedActiveEntry;
|
|
6114
|
+
if (requestedSessionKey && !this.sessionEntries.has(requestedSessionKey)) {
|
|
6115
|
+
const context = this.ensureContext(url.searchParams.get("context") || "default");
|
|
6116
|
+
context.sessionScope = normalizeSessionScope(url.searchParams.get("scope"), process.cwd());
|
|
6117
|
+
const recoveredEntry = await this.recoverMissingPromptDraftTarget(context, requestedDraftTarget);
|
|
6118
|
+
if (!recoveredEntry) throw new Error("Requested session is no longer available.");
|
|
6119
|
+
this.logSessionLoadDebug("prompt:recovered_missing_draft_target", {
|
|
6120
|
+
requestedSessionKey,
|
|
6121
|
+
requestedDraftOwnerKey: requestedDraftTarget.ownerKey || void 0,
|
|
6122
|
+
requestedDraftCwd: requestedDraftTarget.cwd,
|
|
6123
|
+
...this.sessionDebugDetails(recoveredEntry)
|
|
6124
|
+
});
|
|
6125
|
+
resolvedContext = context;
|
|
6126
|
+
resolvedActiveEntry = recoveredEntry;
|
|
6127
|
+
}
|
|
6128
|
+
const { context, activeEntry } = resolvedActiveEntry ? {
|
|
6129
|
+
url,
|
|
6130
|
+
context: resolvedContext,
|
|
6131
|
+
activeEntry: resolvedActiveEntry
|
|
6132
|
+
} : await this.resolveRequest(request, {
|
|
5553
6133
|
preferActiveDraft: true,
|
|
5554
6134
|
preferActiveDraftOverRequestedSession: true
|
|
5555
6135
|
});
|
|
@@ -5726,7 +6306,9 @@ var PicoRuntime = class {
|
|
|
5726
6306
|
await this.activateContextSession(context, nextEntry);
|
|
5727
6307
|
return {
|
|
5728
6308
|
ok: true,
|
|
5729
|
-
draft: true
|
|
6309
|
+
draft: true,
|
|
6310
|
+
sessionKey: nextEntry.key,
|
|
6311
|
+
cwd: nextEntry.cwd
|
|
5730
6312
|
};
|
|
5731
6313
|
}
|
|
5732
6314
|
async selectSession(request) {
|
|
@@ -6500,6 +7082,39 @@ var PicoRuntime = class {
|
|
|
6500
7082
|
async resolveUiRequest(id, body) {
|
|
6501
7083
|
return resolvePendingUiRequest(this.pendingUiRequests, id, body);
|
|
6502
7084
|
}
|
|
7085
|
+
async createTerminal(request, body) {
|
|
7086
|
+
const { context, activeEntry } = await this.resolveRequest(request);
|
|
7087
|
+
const cwd = this.getBaseCwd(activeEntry, context);
|
|
7088
|
+
return {
|
|
7089
|
+
ok: true,
|
|
7090
|
+
...await this.terminalManager.createTerminal({
|
|
7091
|
+
clientKey: body.clientKey,
|
|
7092
|
+
cols: body.cols,
|
|
7093
|
+
cwd,
|
|
7094
|
+
rows: body.rows,
|
|
7095
|
+
scopeKey: this.getTerminalScopeKey(activeEntry, context)
|
|
7096
|
+
})
|
|
7097
|
+
};
|
|
7098
|
+
}
|
|
7099
|
+
async createTerminalEventsResponse(request, id) {
|
|
7100
|
+
const { context, activeEntry } = await this.resolveRequest(request);
|
|
7101
|
+
return this.terminalManager.createEventsResponse(id, this.getTerminalScopeKey(activeEntry, context), request.signal);
|
|
7102
|
+
}
|
|
7103
|
+
async writeTerminalInput(request, id, body) {
|
|
7104
|
+
const { context, activeEntry } = await this.resolveRequest(request);
|
|
7105
|
+
this.terminalManager.writeTerminal(id, this.getTerminalScopeKey(activeEntry, context), body.data);
|
|
7106
|
+
return { ok: true };
|
|
7107
|
+
}
|
|
7108
|
+
async resizeTerminal(request, id, body) {
|
|
7109
|
+
const { context, activeEntry } = await this.resolveRequest(request);
|
|
7110
|
+
this.terminalManager.resizeTerminal(id, this.getTerminalScopeKey(activeEntry, context), body);
|
|
7111
|
+
return { ok: true };
|
|
7112
|
+
}
|
|
7113
|
+
async closeTerminal(request, id) {
|
|
7114
|
+
const { context, activeEntry } = await this.resolveRequest(request);
|
|
7115
|
+
await this.terminalManager.closeTerminal(id, this.getTerminalScopeKey(activeEntry, context));
|
|
7116
|
+
return { ok: true };
|
|
7117
|
+
}
|
|
6503
7118
|
async highlightCode(code, language) {
|
|
6504
7119
|
const text = typeof code === "string" ? code : "";
|
|
6505
7120
|
try {
|
|
@@ -6557,6 +7172,7 @@ var PicoRuntime = class {
|
|
|
6557
7172
|
pending.resolve({ cancelled: true });
|
|
6558
7173
|
} catch {}
|
|
6559
7174
|
this.pendingUiRequests.clear();
|
|
7175
|
+
this.terminalManager.dispose();
|
|
6560
7176
|
await Promise.all([...this.sessionEntries.values()].map((entry) => this.disposeSessionEntry(entry)));
|
|
6561
7177
|
}
|
|
6562
7178
|
};
|
|
@@ -6564,7 +7180,7 @@ function getPicoRuntime() {
|
|
|
6564
7180
|
globalThis.__picoRuntime ??= new PicoRuntime();
|
|
6565
7181
|
return globalThis.__picoRuntime;
|
|
6566
7182
|
}
|
|
6567
|
-
var Route$
|
|
7183
|
+
var Route$57 = createFileRoute("/events")({ server: { handlers: { GET: ({ request }) => getPicoRuntime().createEventsResponse(request) } } });
|
|
6568
7184
|
function jsonResponse(data, init = 200) {
|
|
6569
7185
|
const responseInit = typeof init === "number" ? { status: init } : init;
|
|
6570
7186
|
const headers = new Headers(responseInit.headers);
|
|
@@ -6600,7 +7216,7 @@ function routeErrorResponse(error, fallbackMessage) {
|
|
|
6600
7216
|
async function readRequestJson(request) {
|
|
6601
7217
|
return await request.json().catch(() => ({}));
|
|
6602
7218
|
}
|
|
6603
|
-
var Route$
|
|
7219
|
+
var Route$56 = createFileRoute("/api/thinking")({ server: { handlers: { POST: async ({ request }) => {
|
|
6604
7220
|
try {
|
|
6605
7221
|
const body = await readRequestJson(request);
|
|
6606
7222
|
return jsonResponse(await getPicoRuntime().setThinking(request, body));
|
|
@@ -6608,7 +7224,15 @@ var Route$51 = createFileRoute("/api/thinking")({ server: { handlers: { POST: as
|
|
|
6608
7224
|
return routeErrorResponse(error, "Failed to update thinking level");
|
|
6609
7225
|
}
|
|
6610
7226
|
} } } });
|
|
6611
|
-
var Route$
|
|
7227
|
+
var Route$55 = createFileRoute("/api/terminal")({ server: { handlers: { POST: async ({ request }) => {
|
|
7228
|
+
try {
|
|
7229
|
+
const body = await readRequestJson(request);
|
|
7230
|
+
return jsonResponse(await getPicoRuntime().createTerminal(request, body));
|
|
7231
|
+
} catch (error) {
|
|
7232
|
+
return routeErrorResponse(error, "Failed to create terminal");
|
|
7233
|
+
}
|
|
7234
|
+
} } } });
|
|
7235
|
+
var Route$54 = createFileRoute("/api/slash-command")({ server: { handlers: { POST: async ({ request }) => {
|
|
6612
7236
|
try {
|
|
6613
7237
|
const body = await readRequestJson(request);
|
|
6614
7238
|
return jsonResponse(await getPicoRuntime().runSlashCommand(request, body));
|
|
@@ -6616,7 +7240,7 @@ var Route$50 = createFileRoute("/api/slash-command")({ server: { handlers: { POS
|
|
|
6616
7240
|
return routeErrorResponse(error, "Failed to run slash command");
|
|
6617
7241
|
}
|
|
6618
7242
|
} } } });
|
|
6619
|
-
var Route$
|
|
7243
|
+
var Route$53 = createFileRoute("/api/provider-usage")({ server: { handlers: { GET: async ({ request }) => {
|
|
6620
7244
|
const provider = new URL(request.url).searchParams.get("provider") || void 0;
|
|
6621
7245
|
try {
|
|
6622
7246
|
return jsonResponse({
|
|
@@ -6627,7 +7251,7 @@ var Route$49 = createFileRoute("/api/provider-usage")({ server: { handlers: { GE
|
|
|
6627
7251
|
return routeErrorResponse(error, "Failed to read provider usage");
|
|
6628
7252
|
}
|
|
6629
7253
|
} } } });
|
|
6630
|
-
var Route$
|
|
7254
|
+
var Route$52 = createFileRoute("/api/prompt")({ server: { handlers: { POST: async ({ request }) => {
|
|
6631
7255
|
try {
|
|
6632
7256
|
const body = await readRequestJson(request);
|
|
6633
7257
|
return jsonResponse(await getPicoRuntime().prompt(request, body));
|
|
@@ -7182,7 +7806,7 @@ async function listFileReferenceEntries(query, baseCwd, { isQuotedPrefix = false
|
|
|
7182
7806
|
};
|
|
7183
7807
|
});
|
|
7184
7808
|
}
|
|
7185
|
-
var Route$
|
|
7809
|
+
var Route$51 = createFileRoute("/api/path-completions")({ server: { handlers: { POST: async ({ request }) => {
|
|
7186
7810
|
try {
|
|
7187
7811
|
const body = await readRequestJson(request);
|
|
7188
7812
|
const { context, activeEntry } = await getPicoRuntime().resolveRequest(request);
|
|
@@ -7198,7 +7822,7 @@ var Route$47 = createFileRoute("/api/path-completions")({ server: { handlers: {
|
|
|
7198
7822
|
return routeErrorResponse(error, "Failed to list path completions");
|
|
7199
7823
|
}
|
|
7200
7824
|
} } } });
|
|
7201
|
-
var Route$
|
|
7825
|
+
var Route$50 = createFileRoute("/api/model")({ server: { handlers: { POST: async ({ request }) => {
|
|
7202
7826
|
try {
|
|
7203
7827
|
const body = await readRequestJson(request);
|
|
7204
7828
|
return jsonResponse(await getPicoRuntime().setModel(request, body));
|
|
@@ -7206,7 +7830,7 @@ var Route$46 = createFileRoute("/api/model")({ server: { handlers: { POST: async
|
|
|
7206
7830
|
return routeErrorResponse(error, "Failed to update model");
|
|
7207
7831
|
}
|
|
7208
7832
|
} } } });
|
|
7209
|
-
var Route$
|
|
7833
|
+
var Route$49 = createFileRoute("/api/highlight")({ server: { handlers: { POST: async ({ request }) => {
|
|
7210
7834
|
try {
|
|
7211
7835
|
const body = await readRequestJson(request);
|
|
7212
7836
|
return jsonResponse(await getPicoRuntime().highlightCode(body.code, body.language));
|
|
@@ -7214,7 +7838,7 @@ var Route$45 = createFileRoute("/api/highlight")({ server: { handlers: { POST: a
|
|
|
7214
7838
|
return routeErrorResponse(error, "Failed to highlight code");
|
|
7215
7839
|
}
|
|
7216
7840
|
} } } });
|
|
7217
|
-
var Route$
|
|
7841
|
+
var Route$48 = createFileRoute("/api/git-status")({ server: { handlers: { GET: async ({ request }) => {
|
|
7218
7842
|
const requestedCwd = new URL(request.url).searchParams.get("cwd") || "";
|
|
7219
7843
|
if (!requestedCwd.trim()) return errorResponse("cwd is required");
|
|
7220
7844
|
try {
|
|
@@ -7229,17 +7853,21 @@ var Route$44 = createFileRoute("/api/git-status")({ server: { handlers: { GET: a
|
|
|
7229
7853
|
return routeErrorResponse(error, "Failed to read git status");
|
|
7230
7854
|
}
|
|
7231
7855
|
} } } });
|
|
7232
|
-
var Route$
|
|
7856
|
+
var Route$47 = createFileRoute("/api/git-stage")({ server: { handlers: { POST: async ({ request }) => {
|
|
7857
|
+
let errorFallback = "Failed to stage changes";
|
|
7233
7858
|
try {
|
|
7234
7859
|
const body = await readRequestJson(request);
|
|
7860
|
+
const action = typeof body.action === "string" ? body.action : "";
|
|
7861
|
+
if (action === "unstage" || action === "unstage-all") errorFallback = "Failed to unstage changes";
|
|
7862
|
+
const all = body.all === true;
|
|
7235
7863
|
const requestedCwd = typeof body.cwd === "string" ? body.cwd : "";
|
|
7236
7864
|
const path = typeof body.path === "string" ? body.path : "";
|
|
7237
7865
|
const previousPath = typeof body.previousPath === "string" ? body.previousPath : "";
|
|
7238
7866
|
if (!requestedCwd.trim()) throw new Error("cwd is required");
|
|
7239
|
-
if (!path.trim()) throw new Error("file path is required");
|
|
7867
|
+
if (!path.trim() && !all && action !== "stage-all" && action !== "unstage-all") throw new Error("file path is required");
|
|
7240
7868
|
const { context, activeEntry } = await getPicoRuntime().resolveRequest(request);
|
|
7241
7869
|
const cwd = await resolveDirectoryPath(requestedCwd, getPicoRuntime().getBaseCwd(activeEntry, context));
|
|
7242
|
-
const result = await stageDirectoryGitFile(cwd, path, previousPath || void 0);
|
|
7870
|
+
const result = action === "unstage-all" ? await unstageDirectoryGitAll(cwd) : action === "unstage" ? await unstageDirectoryGitFile(cwd, path, previousPath || void 0) : all || action === "stage-all" ? await stageDirectoryGitAll(cwd) : await stageDirectoryGitFile(cwd, path, previousPath || void 0);
|
|
7243
7871
|
return jsonResponse({
|
|
7244
7872
|
ok: true,
|
|
7245
7873
|
cwd,
|
|
@@ -7247,10 +7875,10 @@ var Route$43 = createFileRoute("/api/git-stage")({ server: { handlers: { POST: a
|
|
|
7247
7875
|
stderr: result.stderr
|
|
7248
7876
|
});
|
|
7249
7877
|
} catch (error) {
|
|
7250
|
-
return routeErrorResponse(error,
|
|
7878
|
+
return routeErrorResponse(error, errorFallback);
|
|
7251
7879
|
}
|
|
7252
7880
|
} } } });
|
|
7253
|
-
var Route$
|
|
7881
|
+
var Route$46 = createFileRoute("/api/git-review")({ server: { handlers: { GET: async ({ request }) => {
|
|
7254
7882
|
const url = new URL(request.url);
|
|
7255
7883
|
const requestedCwd = url.searchParams.get("cwd") || "";
|
|
7256
7884
|
const requestedPath = url.searchParams.get("path") || "";
|
|
@@ -7273,7 +7901,7 @@ var Route$42 = createFileRoute("/api/git-review")({ server: { handlers: { GET: a
|
|
|
7273
7901
|
return routeErrorResponse(error, "Failed to read git review file");
|
|
7274
7902
|
}
|
|
7275
7903
|
} } } });
|
|
7276
|
-
var Route$
|
|
7904
|
+
var Route$45 = createFileRoute("/api/git-push")({ server: { handlers: { POST: async ({ request }) => {
|
|
7277
7905
|
try {
|
|
7278
7906
|
const body = await readRequestJson(request);
|
|
7279
7907
|
const requestedCwd = typeof body.cwd === "string" ? body.cwd : "";
|
|
@@ -7292,7 +7920,7 @@ var Route$41 = createFileRoute("/api/git-push")({ server: { handlers: { POST: as
|
|
|
7292
7920
|
return routeErrorResponse(error, "Failed to push changes");
|
|
7293
7921
|
}
|
|
7294
7922
|
} } } });
|
|
7295
|
-
var Route$
|
|
7923
|
+
var Route$44 = createFileRoute("/api/git-pull")({ server: { handlers: { POST: async ({ request }) => {
|
|
7296
7924
|
try {
|
|
7297
7925
|
const body = await readRequestJson(request);
|
|
7298
7926
|
const requestedCwd = typeof body.cwd === "string" ? body.cwd : "";
|
|
@@ -7310,18 +7938,20 @@ var Route$40 = createFileRoute("/api/git-pull")({ server: { handlers: { POST: as
|
|
|
7310
7938
|
return routeErrorResponse(error, "Failed to pull changes");
|
|
7311
7939
|
}
|
|
7312
7940
|
} } } });
|
|
7313
|
-
var Route$
|
|
7941
|
+
var Route$43 = createFileRoute("/api/git-discard")({ server: { handlers: { POST: async ({ request }) => {
|
|
7314
7942
|
try {
|
|
7315
7943
|
const body = await readRequestJson(request);
|
|
7944
|
+
const action = typeof body.action === "string" ? body.action : "";
|
|
7945
|
+
const all = body.all === true;
|
|
7316
7946
|
const requestedCwd = typeof body.cwd === "string" ? body.cwd : "";
|
|
7317
7947
|
const path = typeof body.path === "string" ? body.path : "";
|
|
7318
7948
|
const previousPath = typeof body.previousPath === "string" ? body.previousPath : "";
|
|
7319
7949
|
const status = typeof body.status === "string" ? body.status : "";
|
|
7320
7950
|
if (!requestedCwd.trim()) throw new Error("cwd is required");
|
|
7321
|
-
if (!path.trim()) throw new Error("file path is required");
|
|
7951
|
+
if (!path.trim() && !all && action !== "discard-all" && action !== "nuke-working-tree") throw new Error("file path is required");
|
|
7322
7952
|
const { context, activeEntry } = await getPicoRuntime().resolveRequest(request);
|
|
7323
7953
|
const cwd = await resolveDirectoryPath(requestedCwd, getPicoRuntime().getBaseCwd(activeEntry, context));
|
|
7324
|
-
const result = await discardDirectoryGitFile(cwd, path, previousPath || void 0, status || void 0);
|
|
7954
|
+
const result = action === "nuke-working-tree" ? await nukeDirectoryGitWorkingTree(cwd) : all || action === "discard-all" ? await discardDirectoryGitAll(cwd) : await discardDirectoryGitFile(cwd, path, previousPath || void 0, status || void 0);
|
|
7325
7955
|
return jsonResponse({
|
|
7326
7956
|
ok: true,
|
|
7327
7957
|
cwd,
|
|
@@ -7332,7 +7962,7 @@ var Route$39 = createFileRoute("/api/git-discard")({ server: { handlers: { POST:
|
|
|
7332
7962
|
return routeErrorResponse(error, "Failed to discard changes");
|
|
7333
7963
|
}
|
|
7334
7964
|
} } } });
|
|
7335
|
-
var Route$
|
|
7965
|
+
var Route$42 = createFileRoute("/api/git-diff")({ server: { handlers: { GET: async ({ request }) => {
|
|
7336
7966
|
const url = new URL(request.url);
|
|
7337
7967
|
const requestedCwd = url.searchParams.get("cwd") || "";
|
|
7338
7968
|
const requestedPath = url.searchParams.get("path") || "";
|
|
@@ -7352,7 +7982,7 @@ var Route$38 = createFileRoute("/api/git-diff")({ server: { handlers: { GET: asy
|
|
|
7352
7982
|
return routeErrorResponse(error, "Failed to read git diff");
|
|
7353
7983
|
}
|
|
7354
7984
|
} } } });
|
|
7355
|
-
var Route$
|
|
7985
|
+
var Route$41 = createFileRoute("/api/git-commit-remote-url")({ server: { handlers: { GET: async ({ request }) => {
|
|
7356
7986
|
try {
|
|
7357
7987
|
const url = new URL(request.url);
|
|
7358
7988
|
const requestedCwd = url.searchParams.get("cwd") || "";
|
|
@@ -7373,7 +8003,7 @@ var Route$37 = createFileRoute("/api/git-commit-remote-url")({ server: { handler
|
|
|
7373
8003
|
return routeErrorResponse(error, "Failed to read commit remote URL");
|
|
7374
8004
|
}
|
|
7375
8005
|
} } } });
|
|
7376
|
-
var Route$
|
|
8006
|
+
var Route$40 = createFileRoute("/api/git-commit-message")({ server: { handlers: { POST: async ({ request }) => {
|
|
7377
8007
|
try {
|
|
7378
8008
|
const body = await readRequestJson(request);
|
|
7379
8009
|
const requestedCwd = typeof body.cwd === "string" ? body.cwd : "";
|
|
@@ -7392,7 +8022,7 @@ var Route$36 = createFileRoute("/api/git-commit-message")({ server: { handlers:
|
|
|
7392
8022
|
return routeErrorResponse(error, "Failed to generate commit message");
|
|
7393
8023
|
}
|
|
7394
8024
|
} } } });
|
|
7395
|
-
var Route$
|
|
8025
|
+
var Route$39 = createFileRoute("/api/git-commit-files")({ server: { handlers: { GET: async ({ request }) => {
|
|
7396
8026
|
try {
|
|
7397
8027
|
const url = new URL(request.url);
|
|
7398
8028
|
const requestedCwd = url.searchParams.get("cwd") || "";
|
|
@@ -7415,7 +8045,7 @@ function normalizeGitCommitDiffMode(value) {
|
|
|
7415
8045
|
if (value === "head" || value === "previous") return value;
|
|
7416
8046
|
return "commit";
|
|
7417
8047
|
}
|
|
7418
|
-
var Route$
|
|
8048
|
+
var Route$38 = createFileRoute("/api/git-commit-diff")({ server: { handlers: { GET: async ({ request }) => {
|
|
7419
8049
|
try {
|
|
7420
8050
|
const url = new URL(request.url);
|
|
7421
8051
|
const requestedCwd = url.searchParams.get("cwd") || "";
|
|
@@ -7452,7 +8082,7 @@ var gitCommitActions = new Set([
|
|
|
7452
8082
|
"drop",
|
|
7453
8083
|
"squash"
|
|
7454
8084
|
]);
|
|
7455
|
-
var Route$
|
|
8085
|
+
var Route$37 = createFileRoute("/api/git-commit-action")({ server: { handlers: { POST: async ({ request }) => {
|
|
7456
8086
|
try {
|
|
7457
8087
|
const body = await readRequestJson(request);
|
|
7458
8088
|
const requestedCwd = typeof body.cwd === "string" ? body.cwd : "";
|
|
@@ -7478,7 +8108,7 @@ var Route$33 = createFileRoute("/api/git-commit-action")({ server: { handlers: {
|
|
|
7478
8108
|
return routeErrorResponse(error, "Failed to run commit action");
|
|
7479
8109
|
}
|
|
7480
8110
|
} } } });
|
|
7481
|
-
var Route$
|
|
8111
|
+
var Route$36 = createFileRoute("/api/git-commit")({ server: { handlers: { POST: async ({ request }) => {
|
|
7482
8112
|
try {
|
|
7483
8113
|
const body = await readRequestJson(request);
|
|
7484
8114
|
const requestedCwd = typeof body.cwd === "string" ? body.cwd : "";
|
|
@@ -7503,7 +8133,7 @@ var Route$32 = createFileRoute("/api/git-commit")({ server: { handlers: { POST:
|
|
|
7503
8133
|
return routeErrorResponse(error, "Failed to commit changes");
|
|
7504
8134
|
}
|
|
7505
8135
|
} } } });
|
|
7506
|
-
var Route$
|
|
8136
|
+
var Route$35 = createFileRoute("/api/git-checkout")({ server: { handlers: { POST: async ({ request }) => {
|
|
7507
8137
|
try {
|
|
7508
8138
|
const body = await readRequestJson(request);
|
|
7509
8139
|
const requestedCwd = typeof body.cwd === "string" ? body.cwd : "";
|
|
@@ -7553,7 +8183,7 @@ function getRuntimeRequestForGitChanges(request, url) {
|
|
|
7553
8183
|
method: request.method
|
|
7554
8184
|
});
|
|
7555
8185
|
}
|
|
7556
|
-
var Route$
|
|
8186
|
+
var Route$34 = createFileRoute("/api/git-changes")({ server: { handlers: { GET: async ({ request }) => {
|
|
7557
8187
|
const url = new URL(request.url);
|
|
7558
8188
|
const requestedCwd = url.searchParams.get("cwd") || "";
|
|
7559
8189
|
const gitScope = getGitChangesScope(url);
|
|
@@ -7623,7 +8253,7 @@ var Route$30 = createFileRoute("/api/git-changes")({ server: { handlers: { GET:
|
|
|
7623
8253
|
return routeErrorResponse(error, "Failed to read git changes");
|
|
7624
8254
|
}
|
|
7625
8255
|
} } } });
|
|
7626
|
-
var Route$
|
|
8256
|
+
var Route$33 = createFileRoute("/api/file-completions")({ server: { handlers: { POST: async ({ request }) => {
|
|
7627
8257
|
try {
|
|
7628
8258
|
const body = await readRequestJson(request);
|
|
7629
8259
|
const { context, activeEntry } = await getPicoRuntime().resolveRequest(request);
|
|
@@ -7640,7 +8270,7 @@ var Route$29 = createFileRoute("/api/file-completions")({ server: { handlers: {
|
|
|
7640
8270
|
return routeErrorResponse(error, "Failed to list file completions");
|
|
7641
8271
|
}
|
|
7642
8272
|
} } } });
|
|
7643
|
-
var Route$
|
|
8273
|
+
var Route$32 = createFileRoute("/api/directory-sessions-indexes")({ server: { handlers: { GET: async ({ request }) => {
|
|
7644
8274
|
const directories = new URL(request.url).searchParams.getAll("directory");
|
|
7645
8275
|
if (directories.length === 0) return errorResponse("at least one directory is required");
|
|
7646
8276
|
try {
|
|
@@ -7649,7 +8279,7 @@ var Route$28 = createFileRoute("/api/directory-sessions-indexes")({ server: { ha
|
|
|
7649
8279
|
return routeErrorResponse(error, "Failed to list directory session indexes");
|
|
7650
8280
|
}
|
|
7651
8281
|
} } } });
|
|
7652
|
-
var Route$
|
|
8282
|
+
var Route$31 = createFileRoute("/api/directory-sessions-index")({ server: { handlers: { GET: async ({ request }) => {
|
|
7653
8283
|
const directory = new URL(request.url).searchParams.get("directory") || "";
|
|
7654
8284
|
if (!directory.trim()) return errorResponse("directory is required");
|
|
7655
8285
|
try {
|
|
@@ -7658,7 +8288,7 @@ var Route$27 = createFileRoute("/api/directory-sessions-index")({ server: { hand
|
|
|
7658
8288
|
return routeErrorResponse(error, "Failed to list directory session index");
|
|
7659
8289
|
}
|
|
7660
8290
|
} } } });
|
|
7661
|
-
var Route$
|
|
8291
|
+
var Route$30 = createFileRoute("/api/directory-sessions")({ server: { handlers: { GET: async ({ request }) => {
|
|
7662
8292
|
const url = new URL(request.url);
|
|
7663
8293
|
const directory = url.searchParams.get("directory") || "";
|
|
7664
8294
|
const offset = Number.parseInt(url.searchParams.get("offset") || "0", 10);
|
|
@@ -7673,7 +8303,7 @@ var Route$26 = createFileRoute("/api/directory-sessions")({ server: { handlers:
|
|
|
7673
8303
|
return routeErrorResponse(error, "Failed to list directory sessions");
|
|
7674
8304
|
}
|
|
7675
8305
|
} } } });
|
|
7676
|
-
var Route$
|
|
8306
|
+
var Route$29 = createFileRoute("/api/directory-search")({ server: { handlers: { POST: async ({ request }) => {
|
|
7677
8307
|
try {
|
|
7678
8308
|
const body = await readRequestJson(request);
|
|
7679
8309
|
const { context, activeEntry } = await getPicoRuntime().resolveRequest(request);
|
|
@@ -7689,14 +8319,14 @@ var Route$25 = createFileRoute("/api/directory-search")({ server: { handlers: {
|
|
|
7689
8319
|
return routeErrorResponse(error, "Failed to search directories");
|
|
7690
8320
|
}
|
|
7691
8321
|
} } } });
|
|
7692
|
-
var Route$
|
|
8322
|
+
var Route$28 = createFileRoute("/api/abort")({ server: { handlers: { POST: async ({ request }) => {
|
|
7693
8323
|
try {
|
|
7694
8324
|
return jsonResponse(await getPicoRuntime().abort(request));
|
|
7695
8325
|
} catch (error) {
|
|
7696
8326
|
return routeErrorResponse(error, "Failed to abort session");
|
|
7697
8327
|
}
|
|
7698
8328
|
} } } });
|
|
7699
|
-
var Route$
|
|
8329
|
+
var Route$27 = createFileRoute("/api/ui/$id")({ server: { handlers: { POST: async ({ request, params }) => {
|
|
7700
8330
|
try {
|
|
7701
8331
|
const body = await readRequestJson(request);
|
|
7702
8332
|
return jsonResponse(await getPicoRuntime().resolveUiRequest(params.id, body));
|
|
@@ -7704,7 +8334,7 @@ var Route$23 = createFileRoute("/api/ui/$id")({ server: { handlers: { POST: asyn
|
|
|
7704
8334
|
return routeErrorResponse(error, "Failed to resolve UI request");
|
|
7705
8335
|
}
|
|
7706
8336
|
} } } });
|
|
7707
|
-
var Route$
|
|
8337
|
+
var Route$26 = createFileRoute("/api/settings/hide-thinking")({ server: { handlers: { POST: async ({ request }) => {
|
|
7708
8338
|
try {
|
|
7709
8339
|
const body = await readRequestJson(request);
|
|
7710
8340
|
return jsonResponse(await getPicoRuntime().setHideThinking(body));
|
|
@@ -7712,7 +8342,7 @@ var Route$22 = createFileRoute("/api/settings/hide-thinking")({ server: { handle
|
|
|
7712
8342
|
return routeErrorResponse(error, "Failed to update hide-thinking setting");
|
|
7713
8343
|
}
|
|
7714
8344
|
} } } });
|
|
7715
|
-
var Route$
|
|
8345
|
+
var Route$25 = createFileRoute("/api/sessions/delete")({ server: { handlers: { POST: async ({ request }) => {
|
|
7716
8346
|
try {
|
|
7717
8347
|
const body = await readRequestJson(request);
|
|
7718
8348
|
return jsonResponse(await getPicoRuntime().deleteSessions(request, body));
|
|
@@ -7720,7 +8350,7 @@ var Route$21 = createFileRoute("/api/sessions/delete")({ server: { handlers: { P
|
|
|
7720
8350
|
return routeErrorResponse(error, "Failed to delete sessions");
|
|
7721
8351
|
}
|
|
7722
8352
|
} } } });
|
|
7723
|
-
var Route$
|
|
8353
|
+
var Route$24 = createFileRoute("/api/session/tree")({ server: { handlers: {
|
|
7724
8354
|
GET: async ({ request }) => {
|
|
7725
8355
|
try {
|
|
7726
8356
|
return jsonResponse(await getPicoRuntime().getSessionTreeForRequest(request));
|
|
@@ -7737,14 +8367,14 @@ var Route$20 = createFileRoute("/api/session/tree")({ server: { handlers: {
|
|
|
7737
8367
|
}
|
|
7738
8368
|
}
|
|
7739
8369
|
} } });
|
|
7740
|
-
var Route$
|
|
8370
|
+
var Route$23 = createFileRoute("/api/session/select")({ server: { handlers: { POST: async ({ request }) => {
|
|
7741
8371
|
try {
|
|
7742
8372
|
return jsonResponse(await getPicoRuntime().selectSession(request));
|
|
7743
8373
|
} catch (error) {
|
|
7744
8374
|
return routeErrorResponse(error, "Failed to select session");
|
|
7745
8375
|
}
|
|
7746
8376
|
} } } });
|
|
7747
|
-
var Route$
|
|
8377
|
+
var Route$22 = createFileRoute("/api/session/rename")({ server: { handlers: { POST: async ({ request }) => {
|
|
7748
8378
|
try {
|
|
7749
8379
|
const body = await readRequestJson(request);
|
|
7750
8380
|
return jsonResponse(await getPicoRuntime().renameSession(body));
|
|
@@ -7752,7 +8382,7 @@ var Route$18 = createFileRoute("/api/session/rename")({ server: { handlers: { PO
|
|
|
7752
8382
|
return routeErrorResponse(error, "Failed to rename session");
|
|
7753
8383
|
}
|
|
7754
8384
|
} } } });
|
|
7755
|
-
var Route$
|
|
8385
|
+
var Route$21 = createFileRoute("/api/session/read-state")({ server: { handlers: { POST: async ({ request }) => {
|
|
7756
8386
|
try {
|
|
7757
8387
|
const body = await readRequestJson(request);
|
|
7758
8388
|
return jsonResponse(await getPicoRuntime().setSessionReadState(request, body));
|
|
@@ -7760,7 +8390,7 @@ var Route$17 = createFileRoute("/api/session/read-state")({ server: { handlers:
|
|
|
7760
8390
|
return routeErrorResponse(error, "Failed to update session read state");
|
|
7761
8391
|
}
|
|
7762
8392
|
} } } });
|
|
7763
|
-
var Route$
|
|
8393
|
+
var Route$20 = createFileRoute("/api/session/new")({ server: { handlers: { POST: async ({ request }) => {
|
|
7764
8394
|
try {
|
|
7765
8395
|
const body = await readRequestJson(request);
|
|
7766
8396
|
return jsonResponse(await getPicoRuntime().createNewSession(request, body));
|
|
@@ -7768,7 +8398,7 @@ var Route$16 = createFileRoute("/api/session/new")({ server: { handlers: { POST:
|
|
|
7768
8398
|
return routeErrorResponse(error, "Failed to create session");
|
|
7769
8399
|
}
|
|
7770
8400
|
} } } });
|
|
7771
|
-
var Route$
|
|
8401
|
+
var Route$19 = createFileRoute("/api/session/move")({ server: { handlers: { POST: async ({ request }) => {
|
|
7772
8402
|
try {
|
|
7773
8403
|
const body = await readRequestJson(request);
|
|
7774
8404
|
return jsonResponse(await getPicoRuntime().moveSession(request, body));
|
|
@@ -7776,7 +8406,7 @@ var Route$15 = createFileRoute("/api/session/move")({ server: { handlers: { POST
|
|
|
7776
8406
|
return routeErrorResponse(error, "Failed to move session");
|
|
7777
8407
|
}
|
|
7778
8408
|
} } } });
|
|
7779
|
-
var Route$
|
|
8409
|
+
var Route$18 = createFileRoute("/api/session/history")({ server: { handlers: { GET: async ({ request }) => {
|
|
7780
8410
|
try {
|
|
7781
8411
|
const url = new URL(request.url);
|
|
7782
8412
|
const before = Number(url.searchParams.get("before"));
|
|
@@ -7789,7 +8419,7 @@ var Route$14 = createFileRoute("/api/session/history")({ server: { handlers: { G
|
|
|
7789
8419
|
return routeErrorResponse(error, "Failed to load session history");
|
|
7790
8420
|
}
|
|
7791
8421
|
} } } });
|
|
7792
|
-
var Route$
|
|
8422
|
+
var Route$17 = createFileRoute("/api/session/fork")({ server: { handlers: {
|
|
7793
8423
|
GET: async ({ request }) => {
|
|
7794
8424
|
try {
|
|
7795
8425
|
return jsonResponse(await getPicoRuntime().getForkableMessages(request));
|
|
@@ -7806,7 +8436,7 @@ var Route$13 = createFileRoute("/api/session/fork")({ server: { handlers: {
|
|
|
7806
8436
|
}
|
|
7807
8437
|
}
|
|
7808
8438
|
} } });
|
|
7809
|
-
var Route$
|
|
8439
|
+
var Route$16 = createFileRoute("/api/session/delete")({ server: { handlers: { POST: async ({ request }) => {
|
|
7810
8440
|
try {
|
|
7811
8441
|
const body = await readRequestJson(request);
|
|
7812
8442
|
return jsonResponse(await getPicoRuntime().deleteSession(request, body));
|
|
@@ -7814,14 +8444,14 @@ var Route$12 = createFileRoute("/api/session/delete")({ server: { handlers: { PO
|
|
|
7814
8444
|
return routeErrorResponse(error, "Failed to delete session");
|
|
7815
8445
|
}
|
|
7816
8446
|
} } } });
|
|
7817
|
-
var Route$
|
|
8447
|
+
var Route$15 = createFileRoute("/api/session/clone")({ server: { handlers: { POST: async ({ request }) => {
|
|
7818
8448
|
try {
|
|
7819
8449
|
return jsonResponse(await getPicoRuntime().cloneSession(request));
|
|
7820
8450
|
} catch (error) {
|
|
7821
8451
|
return routeErrorResponse(error, "Failed to clone session");
|
|
7822
8452
|
}
|
|
7823
8453
|
} } } });
|
|
7824
|
-
var Route$
|
|
8454
|
+
var Route$14 = createFileRoute("/api/pending-messages/reorder")({ server: { handlers: { POST: async ({ request }) => {
|
|
7825
8455
|
try {
|
|
7826
8456
|
const body = await readRequestJson(request);
|
|
7827
8457
|
return jsonResponse(await getPicoRuntime().reorderPendingMessages(request, body));
|
|
@@ -7829,7 +8459,7 @@ var Route$10 = createFileRoute("/api/pending-messages/reorder")({ server: { hand
|
|
|
7829
8459
|
return routeErrorResponse(error, "Failed to update pending prompts");
|
|
7830
8460
|
}
|
|
7831
8461
|
} } } });
|
|
7832
|
-
var Route$
|
|
8462
|
+
var Route$13 = createFileRoute("/api/pending-message/remove")({ server: { handlers: { POST: async ({ request }) => {
|
|
7833
8463
|
try {
|
|
7834
8464
|
const body = await readRequestJson(request);
|
|
7835
8465
|
return jsonResponse(await getPicoRuntime().removePendingMessage(request, body));
|
|
@@ -7837,7 +8467,7 @@ var Route$9 = createFileRoute("/api/pending-message/remove")({ server: { handler
|
|
|
7837
8467
|
return routeErrorResponse(error, "Failed to remove pending prompt");
|
|
7838
8468
|
}
|
|
7839
8469
|
} } } });
|
|
7840
|
-
var Route$
|
|
8470
|
+
var Route$12 = createFileRoute("/api/files/tree")({ server: { handlers: { GET: async ({ request }) => {
|
|
7841
8471
|
const requestedCwd = new URL(request.url).searchParams.get("cwd") || "";
|
|
7842
8472
|
if (!requestedCwd.trim()) return errorResponse("cwd is required");
|
|
7843
8473
|
try {
|
|
@@ -7854,7 +8484,7 @@ var Route$8 = createFileRoute("/api/files/tree")({ server: { handlers: { GET: as
|
|
|
7854
8484
|
return routeErrorResponse(error, "Failed to read file tree");
|
|
7855
8485
|
}
|
|
7856
8486
|
} } } });
|
|
7857
|
-
var Route$
|
|
8487
|
+
var Route$11 = createFileRoute("/api/files/read")({ server: { handlers: { GET: async ({ request }) => {
|
|
7858
8488
|
const url = new URL(request.url);
|
|
7859
8489
|
const requestedCwd = url.searchParams.get("cwd") || "";
|
|
7860
8490
|
const requestedPath = url.searchParams.get("path") || "";
|
|
@@ -7874,7 +8504,7 @@ var Route$7 = createFileRoute("/api/files/read")({ server: { handlers: { GET: as
|
|
|
7874
8504
|
return routeErrorResponse(error, "Failed to read file");
|
|
7875
8505
|
}
|
|
7876
8506
|
} } } });
|
|
7877
|
-
var Route$
|
|
8507
|
+
var Route$10 = createFileRoute("/api/directory/resolve")({ server: { handlers: { POST: async ({ request }) => {
|
|
7878
8508
|
try {
|
|
7879
8509
|
const body = await readRequestJson(request);
|
|
7880
8510
|
const { context, activeEntry } = await getPicoRuntime().resolveRequest(request);
|
|
@@ -7886,7 +8516,7 @@ var Route$6 = createFileRoute("/api/directory/resolve")({ server: { handlers: {
|
|
|
7886
8516
|
return routeErrorResponse(error, "Failed to resolve directory");
|
|
7887
8517
|
}
|
|
7888
8518
|
} } } });
|
|
7889
|
-
var Route$
|
|
8519
|
+
var Route$9 = createFileRoute("/api/directory-sessions/cleanup")({ server: { handlers: { POST: async ({ request }) => {
|
|
7890
8520
|
try {
|
|
7891
8521
|
const body = await readRequestJson(request);
|
|
7892
8522
|
return jsonResponse(await getPicoRuntime().deleteOldDirectorySessions(request, body));
|
|
@@ -7894,14 +8524,14 @@ var Route$5 = createFileRoute("/api/directory-sessions/cleanup")({ server: { han
|
|
|
7894
8524
|
return routeErrorResponse(error, "Failed to clean up sessions");
|
|
7895
8525
|
}
|
|
7896
8526
|
} } } });
|
|
7897
|
-
var Route$
|
|
8527
|
+
var Route$8 = createFileRoute("/api/auth/providers")({ server: { handlers: { GET: async ({ request }) => {
|
|
7898
8528
|
try {
|
|
7899
8529
|
return jsonResponse(await getPicoRuntime().getAuthProviders(request));
|
|
7900
8530
|
} catch (error) {
|
|
7901
8531
|
return routeErrorResponse(error, "Failed to list auth providers");
|
|
7902
8532
|
}
|
|
7903
8533
|
} } } });
|
|
7904
|
-
var Route$
|
|
8534
|
+
var Route$7 = createFileRoute("/api/auth/oauth")({ server: { handlers: { POST: async ({ request }) => {
|
|
7905
8535
|
try {
|
|
7906
8536
|
const body = await readRequestJson(request);
|
|
7907
8537
|
return jsonResponse(await getPicoRuntime().loginProviderOAuth(request, body));
|
|
@@ -7909,7 +8539,7 @@ var Route$3 = createFileRoute("/api/auth/oauth")({ server: { handlers: { POST: a
|
|
|
7909
8539
|
return routeErrorResponse(error, "Failed to login to provider");
|
|
7910
8540
|
}
|
|
7911
8541
|
} } } });
|
|
7912
|
-
var Route$
|
|
8542
|
+
var Route$6 = createFileRoute("/api/auth/logout")({ server: { handlers: { POST: async ({ request }) => {
|
|
7913
8543
|
try {
|
|
7914
8544
|
const body = await readRequestJson(request);
|
|
7915
8545
|
return jsonResponse(await getPicoRuntime().logoutProvider(request, body));
|
|
@@ -7917,7 +8547,7 @@ var Route$2 = createFileRoute("/api/auth/logout")({ server: { handlers: { POST:
|
|
|
7917
8547
|
return routeErrorResponse(error, "Failed to logout from provider");
|
|
7918
8548
|
}
|
|
7919
8549
|
} } } });
|
|
7920
|
-
var Route$
|
|
8550
|
+
var Route$5 = createFileRoute("/api/auth/api-key")({ server: { handlers: { POST: async ({ request }) => {
|
|
7921
8551
|
try {
|
|
7922
8552
|
const body = await readRequestJson(request);
|
|
7923
8553
|
return jsonResponse(await getPicoRuntime().saveProviderApiKey(request, body));
|
|
@@ -7925,6 +8555,36 @@ var Route$1 = createFileRoute("/api/auth/api-key")({ server: { handlers: { POST:
|
|
|
7925
8555
|
return routeErrorResponse(error, "Failed to save provider API key");
|
|
7926
8556
|
}
|
|
7927
8557
|
} } } });
|
|
8558
|
+
var Route$4 = createFileRoute("/api/terminal/$id/resize")({ server: { handlers: { POST: async ({ request, params }) => {
|
|
8559
|
+
try {
|
|
8560
|
+
const body = await readRequestJson(request);
|
|
8561
|
+
return jsonResponse(await getPicoRuntime().resizeTerminal(request, params.id, body));
|
|
8562
|
+
} catch (error) {
|
|
8563
|
+
return routeErrorResponse(error, "Failed to resize terminal");
|
|
8564
|
+
}
|
|
8565
|
+
} } } });
|
|
8566
|
+
var Route$3 = createFileRoute("/api/terminal/$id/input")({ server: { handlers: { POST: async ({ request, params }) => {
|
|
8567
|
+
try {
|
|
8568
|
+
const body = await readRequestJson(request);
|
|
8569
|
+
return jsonResponse(await getPicoRuntime().writeTerminalInput(request, params.id, body));
|
|
8570
|
+
} catch (error) {
|
|
8571
|
+
return routeErrorResponse(error, "Failed to write terminal input");
|
|
8572
|
+
}
|
|
8573
|
+
} } } });
|
|
8574
|
+
var Route$2 = createFileRoute("/api/terminal/$id/events")({ server: { handlers: { GET: async ({ request, params }) => {
|
|
8575
|
+
try {
|
|
8576
|
+
return await getPicoRuntime().createTerminalEventsResponse(request, params.id);
|
|
8577
|
+
} catch (error) {
|
|
8578
|
+
return routeErrorResponse(error, "Failed to connect terminal");
|
|
8579
|
+
}
|
|
8580
|
+
} } } });
|
|
8581
|
+
var Route$1 = createFileRoute("/api/terminal/$id/close")({ server: { handlers: { POST: async ({ request, params }) => {
|
|
8582
|
+
try {
|
|
8583
|
+
return jsonResponse(await getPicoRuntime().closeTerminal(request, params.id));
|
|
8584
|
+
} catch (error) {
|
|
8585
|
+
return routeErrorResponse(error, "Failed to close terminal");
|
|
8586
|
+
}
|
|
8587
|
+
} } } });
|
|
7928
8588
|
var Route = createFileRoute("/api/session/tree/label")({ server: { handlers: { POST: async ({ request }) => {
|
|
7929
8589
|
try {
|
|
7930
8590
|
const body = await readRequestJson(request);
|
|
@@ -7933,270 +8593,295 @@ var Route = createFileRoute("/api/session/tree/label")({ server: { handlers: { P
|
|
|
7933
8593
|
return routeErrorResponse(error, "Failed to update tree label");
|
|
7934
8594
|
}
|
|
7935
8595
|
} } } });
|
|
7936
|
-
var EventsRoute = Route$
|
|
8596
|
+
var EventsRoute = Route$57.update({
|
|
7937
8597
|
id: "/events",
|
|
7938
8598
|
path: "/events",
|
|
7939
|
-
getParentRoute: () => Route$
|
|
8599
|
+
getParentRoute: () => Route$58
|
|
7940
8600
|
});
|
|
7941
|
-
var IndexRoute = Route$
|
|
8601
|
+
var IndexRoute = Route$59.update({
|
|
7942
8602
|
id: "/",
|
|
7943
8603
|
path: "/",
|
|
7944
|
-
getParentRoute: () => Route$
|
|
8604
|
+
getParentRoute: () => Route$58
|
|
7945
8605
|
});
|
|
7946
|
-
var ApiThinkingRoute = Route$
|
|
8606
|
+
var ApiThinkingRoute = Route$56.update({
|
|
7947
8607
|
id: "/api/thinking",
|
|
7948
8608
|
path: "/api/thinking",
|
|
7949
|
-
getParentRoute: () => Route$
|
|
8609
|
+
getParentRoute: () => Route$58
|
|
7950
8610
|
});
|
|
7951
|
-
var
|
|
8611
|
+
var ApiTerminalRoute = Route$55.update({
|
|
8612
|
+
id: "/api/terminal",
|
|
8613
|
+
path: "/api/terminal",
|
|
8614
|
+
getParentRoute: () => Route$58
|
|
8615
|
+
});
|
|
8616
|
+
var ApiSlashCommandRoute = Route$54.update({
|
|
7952
8617
|
id: "/api/slash-command",
|
|
7953
8618
|
path: "/api/slash-command",
|
|
7954
|
-
getParentRoute: () => Route$
|
|
8619
|
+
getParentRoute: () => Route$58
|
|
7955
8620
|
});
|
|
7956
|
-
var ApiProviderUsageRoute = Route$
|
|
8621
|
+
var ApiProviderUsageRoute = Route$53.update({
|
|
7957
8622
|
id: "/api/provider-usage",
|
|
7958
8623
|
path: "/api/provider-usage",
|
|
7959
|
-
getParentRoute: () => Route$
|
|
8624
|
+
getParentRoute: () => Route$58
|
|
7960
8625
|
});
|
|
7961
|
-
var ApiPromptRoute = Route$
|
|
8626
|
+
var ApiPromptRoute = Route$52.update({
|
|
7962
8627
|
id: "/api/prompt",
|
|
7963
8628
|
path: "/api/prompt",
|
|
7964
|
-
getParentRoute: () => Route$
|
|
8629
|
+
getParentRoute: () => Route$58
|
|
7965
8630
|
});
|
|
7966
|
-
var ApiPathCompletionsRoute = Route$
|
|
8631
|
+
var ApiPathCompletionsRoute = Route$51.update({
|
|
7967
8632
|
id: "/api/path-completions",
|
|
7968
8633
|
path: "/api/path-completions",
|
|
7969
|
-
getParentRoute: () => Route$
|
|
8634
|
+
getParentRoute: () => Route$58
|
|
7970
8635
|
});
|
|
7971
|
-
var ApiModelRoute = Route$
|
|
8636
|
+
var ApiModelRoute = Route$50.update({
|
|
7972
8637
|
id: "/api/model",
|
|
7973
8638
|
path: "/api/model",
|
|
7974
|
-
getParentRoute: () => Route$
|
|
8639
|
+
getParentRoute: () => Route$58
|
|
7975
8640
|
});
|
|
7976
|
-
var ApiHighlightRoute = Route$
|
|
8641
|
+
var ApiHighlightRoute = Route$49.update({
|
|
7977
8642
|
id: "/api/highlight",
|
|
7978
8643
|
path: "/api/highlight",
|
|
7979
|
-
getParentRoute: () => Route$
|
|
8644
|
+
getParentRoute: () => Route$58
|
|
7980
8645
|
});
|
|
7981
|
-
var ApiGitStatusRoute = Route$
|
|
8646
|
+
var ApiGitStatusRoute = Route$48.update({
|
|
7982
8647
|
id: "/api/git-status",
|
|
7983
8648
|
path: "/api/git-status",
|
|
7984
|
-
getParentRoute: () => Route$
|
|
8649
|
+
getParentRoute: () => Route$58
|
|
7985
8650
|
});
|
|
7986
|
-
var ApiGitStageRoute = Route$
|
|
8651
|
+
var ApiGitStageRoute = Route$47.update({
|
|
7987
8652
|
id: "/api/git-stage",
|
|
7988
8653
|
path: "/api/git-stage",
|
|
7989
|
-
getParentRoute: () => Route$
|
|
8654
|
+
getParentRoute: () => Route$58
|
|
7990
8655
|
});
|
|
7991
|
-
var ApiGitReviewRoute = Route$
|
|
8656
|
+
var ApiGitReviewRoute = Route$46.update({
|
|
7992
8657
|
id: "/api/git-review",
|
|
7993
8658
|
path: "/api/git-review",
|
|
7994
|
-
getParentRoute: () => Route$
|
|
8659
|
+
getParentRoute: () => Route$58
|
|
7995
8660
|
});
|
|
7996
|
-
var ApiGitPushRoute = Route$
|
|
8661
|
+
var ApiGitPushRoute = Route$45.update({
|
|
7997
8662
|
id: "/api/git-push",
|
|
7998
8663
|
path: "/api/git-push",
|
|
7999
|
-
getParentRoute: () => Route$
|
|
8664
|
+
getParentRoute: () => Route$58
|
|
8000
8665
|
});
|
|
8001
|
-
var ApiGitPullRoute = Route$
|
|
8666
|
+
var ApiGitPullRoute = Route$44.update({
|
|
8002
8667
|
id: "/api/git-pull",
|
|
8003
8668
|
path: "/api/git-pull",
|
|
8004
|
-
getParentRoute: () => Route$
|
|
8669
|
+
getParentRoute: () => Route$58
|
|
8005
8670
|
});
|
|
8006
|
-
var ApiGitDiscardRoute = Route$
|
|
8671
|
+
var ApiGitDiscardRoute = Route$43.update({
|
|
8007
8672
|
id: "/api/git-discard",
|
|
8008
8673
|
path: "/api/git-discard",
|
|
8009
|
-
getParentRoute: () => Route$
|
|
8674
|
+
getParentRoute: () => Route$58
|
|
8010
8675
|
});
|
|
8011
|
-
var ApiGitDiffRoute = Route$
|
|
8676
|
+
var ApiGitDiffRoute = Route$42.update({
|
|
8012
8677
|
id: "/api/git-diff",
|
|
8013
8678
|
path: "/api/git-diff",
|
|
8014
|
-
getParentRoute: () => Route$
|
|
8679
|
+
getParentRoute: () => Route$58
|
|
8015
8680
|
});
|
|
8016
|
-
var ApiGitCommitRemoteUrlRoute = Route$
|
|
8681
|
+
var ApiGitCommitRemoteUrlRoute = Route$41.update({
|
|
8017
8682
|
id: "/api/git-commit-remote-url",
|
|
8018
8683
|
path: "/api/git-commit-remote-url",
|
|
8019
|
-
getParentRoute: () => Route$
|
|
8684
|
+
getParentRoute: () => Route$58
|
|
8020
8685
|
});
|
|
8021
|
-
var ApiGitCommitMessageRoute = Route$
|
|
8686
|
+
var ApiGitCommitMessageRoute = Route$40.update({
|
|
8022
8687
|
id: "/api/git-commit-message",
|
|
8023
8688
|
path: "/api/git-commit-message",
|
|
8024
|
-
getParentRoute: () => Route$
|
|
8689
|
+
getParentRoute: () => Route$58
|
|
8025
8690
|
});
|
|
8026
|
-
var ApiGitCommitFilesRoute = Route$
|
|
8691
|
+
var ApiGitCommitFilesRoute = Route$39.update({
|
|
8027
8692
|
id: "/api/git-commit-files",
|
|
8028
8693
|
path: "/api/git-commit-files",
|
|
8029
|
-
getParentRoute: () => Route$
|
|
8694
|
+
getParentRoute: () => Route$58
|
|
8030
8695
|
});
|
|
8031
|
-
var ApiGitCommitDiffRoute = Route$
|
|
8696
|
+
var ApiGitCommitDiffRoute = Route$38.update({
|
|
8032
8697
|
id: "/api/git-commit-diff",
|
|
8033
8698
|
path: "/api/git-commit-diff",
|
|
8034
|
-
getParentRoute: () => Route$
|
|
8699
|
+
getParentRoute: () => Route$58
|
|
8035
8700
|
});
|
|
8036
|
-
var ApiGitCommitActionRoute = Route$
|
|
8701
|
+
var ApiGitCommitActionRoute = Route$37.update({
|
|
8037
8702
|
id: "/api/git-commit-action",
|
|
8038
8703
|
path: "/api/git-commit-action",
|
|
8039
|
-
getParentRoute: () => Route$
|
|
8704
|
+
getParentRoute: () => Route$58
|
|
8040
8705
|
});
|
|
8041
|
-
var ApiGitCommitRoute = Route$
|
|
8706
|
+
var ApiGitCommitRoute = Route$36.update({
|
|
8042
8707
|
id: "/api/git-commit",
|
|
8043
8708
|
path: "/api/git-commit",
|
|
8044
|
-
getParentRoute: () => Route$
|
|
8709
|
+
getParentRoute: () => Route$58
|
|
8045
8710
|
});
|
|
8046
|
-
var ApiGitCheckoutRoute = Route$
|
|
8711
|
+
var ApiGitCheckoutRoute = Route$35.update({
|
|
8047
8712
|
id: "/api/git-checkout",
|
|
8048
8713
|
path: "/api/git-checkout",
|
|
8049
|
-
getParentRoute: () => Route$
|
|
8714
|
+
getParentRoute: () => Route$58
|
|
8050
8715
|
});
|
|
8051
|
-
var ApiGitChangesRoute = Route$
|
|
8716
|
+
var ApiGitChangesRoute = Route$34.update({
|
|
8052
8717
|
id: "/api/git-changes",
|
|
8053
8718
|
path: "/api/git-changes",
|
|
8054
|
-
getParentRoute: () => Route$
|
|
8719
|
+
getParentRoute: () => Route$58
|
|
8055
8720
|
});
|
|
8056
|
-
var ApiFileCompletionsRoute = Route$
|
|
8721
|
+
var ApiFileCompletionsRoute = Route$33.update({
|
|
8057
8722
|
id: "/api/file-completions",
|
|
8058
8723
|
path: "/api/file-completions",
|
|
8059
|
-
getParentRoute: () => Route$
|
|
8724
|
+
getParentRoute: () => Route$58
|
|
8060
8725
|
});
|
|
8061
|
-
var ApiDirectorySessionsIndexesRoute = Route$
|
|
8726
|
+
var ApiDirectorySessionsIndexesRoute = Route$32.update({
|
|
8062
8727
|
id: "/api/directory-sessions-indexes",
|
|
8063
8728
|
path: "/api/directory-sessions-indexes",
|
|
8064
|
-
getParentRoute: () => Route$
|
|
8729
|
+
getParentRoute: () => Route$58
|
|
8065
8730
|
});
|
|
8066
|
-
var ApiDirectorySessionsIndexRoute = Route$
|
|
8731
|
+
var ApiDirectorySessionsIndexRoute = Route$31.update({
|
|
8067
8732
|
id: "/api/directory-sessions-index",
|
|
8068
8733
|
path: "/api/directory-sessions-index",
|
|
8069
|
-
getParentRoute: () => Route$
|
|
8734
|
+
getParentRoute: () => Route$58
|
|
8070
8735
|
});
|
|
8071
|
-
var ApiDirectorySessionsRoute = Route$
|
|
8736
|
+
var ApiDirectorySessionsRoute = Route$30.update({
|
|
8072
8737
|
id: "/api/directory-sessions",
|
|
8073
8738
|
path: "/api/directory-sessions",
|
|
8074
|
-
getParentRoute: () => Route$
|
|
8739
|
+
getParentRoute: () => Route$58
|
|
8075
8740
|
});
|
|
8076
|
-
var ApiDirectorySearchRoute = Route$
|
|
8741
|
+
var ApiDirectorySearchRoute = Route$29.update({
|
|
8077
8742
|
id: "/api/directory-search",
|
|
8078
8743
|
path: "/api/directory-search",
|
|
8079
|
-
getParentRoute: () => Route$
|
|
8744
|
+
getParentRoute: () => Route$58
|
|
8080
8745
|
});
|
|
8081
|
-
var ApiAbortRoute = Route$
|
|
8746
|
+
var ApiAbortRoute = Route$28.update({
|
|
8082
8747
|
id: "/api/abort",
|
|
8083
8748
|
path: "/api/abort",
|
|
8084
|
-
getParentRoute: () => Route$
|
|
8749
|
+
getParentRoute: () => Route$58
|
|
8085
8750
|
});
|
|
8086
|
-
var ApiUiIdRoute = Route$
|
|
8751
|
+
var ApiUiIdRoute = Route$27.update({
|
|
8087
8752
|
id: "/api/ui/$id",
|
|
8088
8753
|
path: "/api/ui/$id",
|
|
8089
|
-
getParentRoute: () => Route$
|
|
8754
|
+
getParentRoute: () => Route$58
|
|
8090
8755
|
});
|
|
8091
|
-
var ApiSettingsHideThinkingRoute = Route$
|
|
8756
|
+
var ApiSettingsHideThinkingRoute = Route$26.update({
|
|
8092
8757
|
id: "/api/settings/hide-thinking",
|
|
8093
8758
|
path: "/api/settings/hide-thinking",
|
|
8094
|
-
getParentRoute: () => Route$
|
|
8759
|
+
getParentRoute: () => Route$58
|
|
8095
8760
|
});
|
|
8096
|
-
var ApiSessionsDeleteRoute = Route$
|
|
8761
|
+
var ApiSessionsDeleteRoute = Route$25.update({
|
|
8097
8762
|
id: "/api/sessions/delete",
|
|
8098
8763
|
path: "/api/sessions/delete",
|
|
8099
|
-
getParentRoute: () => Route$
|
|
8764
|
+
getParentRoute: () => Route$58
|
|
8100
8765
|
});
|
|
8101
|
-
var ApiSessionTreeRoute = Route$
|
|
8766
|
+
var ApiSessionTreeRoute = Route$24.update({
|
|
8102
8767
|
id: "/api/session/tree",
|
|
8103
8768
|
path: "/api/session/tree",
|
|
8104
|
-
getParentRoute: () => Route$
|
|
8769
|
+
getParentRoute: () => Route$58
|
|
8105
8770
|
});
|
|
8106
|
-
var ApiSessionSelectRoute = Route$
|
|
8771
|
+
var ApiSessionSelectRoute = Route$23.update({
|
|
8107
8772
|
id: "/api/session/select",
|
|
8108
8773
|
path: "/api/session/select",
|
|
8109
|
-
getParentRoute: () => Route$
|
|
8774
|
+
getParentRoute: () => Route$58
|
|
8110
8775
|
});
|
|
8111
|
-
var ApiSessionRenameRoute = Route$
|
|
8776
|
+
var ApiSessionRenameRoute = Route$22.update({
|
|
8112
8777
|
id: "/api/session/rename",
|
|
8113
8778
|
path: "/api/session/rename",
|
|
8114
|
-
getParentRoute: () => Route$
|
|
8779
|
+
getParentRoute: () => Route$58
|
|
8115
8780
|
});
|
|
8116
|
-
var ApiSessionReadStateRoute = Route$
|
|
8781
|
+
var ApiSessionReadStateRoute = Route$21.update({
|
|
8117
8782
|
id: "/api/session/read-state",
|
|
8118
8783
|
path: "/api/session/read-state",
|
|
8119
|
-
getParentRoute: () => Route$
|
|
8784
|
+
getParentRoute: () => Route$58
|
|
8120
8785
|
});
|
|
8121
|
-
var ApiSessionNewRoute = Route$
|
|
8786
|
+
var ApiSessionNewRoute = Route$20.update({
|
|
8122
8787
|
id: "/api/session/new",
|
|
8123
8788
|
path: "/api/session/new",
|
|
8124
|
-
getParentRoute: () => Route$
|
|
8789
|
+
getParentRoute: () => Route$58
|
|
8125
8790
|
});
|
|
8126
|
-
var ApiSessionMoveRoute = Route$
|
|
8791
|
+
var ApiSessionMoveRoute = Route$19.update({
|
|
8127
8792
|
id: "/api/session/move",
|
|
8128
8793
|
path: "/api/session/move",
|
|
8129
|
-
getParentRoute: () => Route$
|
|
8794
|
+
getParentRoute: () => Route$58
|
|
8130
8795
|
});
|
|
8131
|
-
var ApiSessionHistoryRoute = Route$
|
|
8796
|
+
var ApiSessionHistoryRoute = Route$18.update({
|
|
8132
8797
|
id: "/api/session/history",
|
|
8133
8798
|
path: "/api/session/history",
|
|
8134
|
-
getParentRoute: () => Route$
|
|
8799
|
+
getParentRoute: () => Route$58
|
|
8135
8800
|
});
|
|
8136
|
-
var ApiSessionForkRoute = Route$
|
|
8801
|
+
var ApiSessionForkRoute = Route$17.update({
|
|
8137
8802
|
id: "/api/session/fork",
|
|
8138
8803
|
path: "/api/session/fork",
|
|
8139
|
-
getParentRoute: () => Route$
|
|
8804
|
+
getParentRoute: () => Route$58
|
|
8140
8805
|
});
|
|
8141
|
-
var ApiSessionDeleteRoute = Route$
|
|
8806
|
+
var ApiSessionDeleteRoute = Route$16.update({
|
|
8142
8807
|
id: "/api/session/delete",
|
|
8143
8808
|
path: "/api/session/delete",
|
|
8144
|
-
getParentRoute: () => Route$
|
|
8809
|
+
getParentRoute: () => Route$58
|
|
8145
8810
|
});
|
|
8146
|
-
var ApiSessionCloneRoute = Route$
|
|
8811
|
+
var ApiSessionCloneRoute = Route$15.update({
|
|
8147
8812
|
id: "/api/session/clone",
|
|
8148
8813
|
path: "/api/session/clone",
|
|
8149
|
-
getParentRoute: () => Route$
|
|
8814
|
+
getParentRoute: () => Route$58
|
|
8150
8815
|
});
|
|
8151
|
-
var ApiPendingMessagesReorderRoute = Route$
|
|
8816
|
+
var ApiPendingMessagesReorderRoute = Route$14.update({
|
|
8152
8817
|
id: "/api/pending-messages/reorder",
|
|
8153
8818
|
path: "/api/pending-messages/reorder",
|
|
8154
|
-
getParentRoute: () => Route$
|
|
8819
|
+
getParentRoute: () => Route$58
|
|
8155
8820
|
});
|
|
8156
|
-
var ApiPendingMessageRemoveRoute = Route$
|
|
8821
|
+
var ApiPendingMessageRemoveRoute = Route$13.update({
|
|
8157
8822
|
id: "/api/pending-message/remove",
|
|
8158
8823
|
path: "/api/pending-message/remove",
|
|
8159
|
-
getParentRoute: () => Route$
|
|
8824
|
+
getParentRoute: () => Route$58
|
|
8160
8825
|
});
|
|
8161
|
-
var ApiFilesTreeRoute = Route$
|
|
8826
|
+
var ApiFilesTreeRoute = Route$12.update({
|
|
8162
8827
|
id: "/api/files/tree",
|
|
8163
8828
|
path: "/api/files/tree",
|
|
8164
|
-
getParentRoute: () => Route$
|
|
8829
|
+
getParentRoute: () => Route$58
|
|
8165
8830
|
});
|
|
8166
|
-
var ApiFilesReadRoute = Route$
|
|
8831
|
+
var ApiFilesReadRoute = Route$11.update({
|
|
8167
8832
|
id: "/api/files/read",
|
|
8168
8833
|
path: "/api/files/read",
|
|
8169
|
-
getParentRoute: () => Route$
|
|
8834
|
+
getParentRoute: () => Route$58
|
|
8170
8835
|
});
|
|
8171
|
-
var ApiDirectoryResolveRoute = Route$
|
|
8836
|
+
var ApiDirectoryResolveRoute = Route$10.update({
|
|
8172
8837
|
id: "/api/directory/resolve",
|
|
8173
8838
|
path: "/api/directory/resolve",
|
|
8174
|
-
getParentRoute: () => Route$
|
|
8839
|
+
getParentRoute: () => Route$58
|
|
8175
8840
|
});
|
|
8176
|
-
var ApiDirectorySessionsCleanupRoute = Route$
|
|
8841
|
+
var ApiDirectorySessionsCleanupRoute = Route$9.update({
|
|
8177
8842
|
id: "/cleanup",
|
|
8178
8843
|
path: "/cleanup",
|
|
8179
8844
|
getParentRoute: () => ApiDirectorySessionsRoute
|
|
8180
8845
|
});
|
|
8181
|
-
var ApiAuthProvidersRoute = Route$
|
|
8846
|
+
var ApiAuthProvidersRoute = Route$8.update({
|
|
8182
8847
|
id: "/api/auth/providers",
|
|
8183
8848
|
path: "/api/auth/providers",
|
|
8184
|
-
getParentRoute: () => Route$
|
|
8849
|
+
getParentRoute: () => Route$58
|
|
8185
8850
|
});
|
|
8186
|
-
var ApiAuthOauthRoute = Route$
|
|
8851
|
+
var ApiAuthOauthRoute = Route$7.update({
|
|
8187
8852
|
id: "/api/auth/oauth",
|
|
8188
8853
|
path: "/api/auth/oauth",
|
|
8189
|
-
getParentRoute: () => Route$
|
|
8854
|
+
getParentRoute: () => Route$58
|
|
8190
8855
|
});
|
|
8191
|
-
var ApiAuthLogoutRoute = Route$
|
|
8856
|
+
var ApiAuthLogoutRoute = Route$6.update({
|
|
8192
8857
|
id: "/api/auth/logout",
|
|
8193
8858
|
path: "/api/auth/logout",
|
|
8194
|
-
getParentRoute: () => Route$
|
|
8859
|
+
getParentRoute: () => Route$58
|
|
8195
8860
|
});
|
|
8196
|
-
var ApiAuthApiKeyRoute = Route$
|
|
8861
|
+
var ApiAuthApiKeyRoute = Route$5.update({
|
|
8197
8862
|
id: "/api/auth/api-key",
|
|
8198
8863
|
path: "/api/auth/api-key",
|
|
8199
|
-
getParentRoute: () => Route$
|
|
8864
|
+
getParentRoute: () => Route$58
|
|
8865
|
+
});
|
|
8866
|
+
var ApiTerminalIdResizeRoute = Route$4.update({
|
|
8867
|
+
id: "/$id/resize",
|
|
8868
|
+
path: "/$id/resize",
|
|
8869
|
+
getParentRoute: () => ApiTerminalRoute
|
|
8870
|
+
});
|
|
8871
|
+
var ApiTerminalIdInputRoute = Route$3.update({
|
|
8872
|
+
id: "/$id/input",
|
|
8873
|
+
path: "/$id/input",
|
|
8874
|
+
getParentRoute: () => ApiTerminalRoute
|
|
8875
|
+
});
|
|
8876
|
+
var ApiTerminalIdEventsRoute = Route$2.update({
|
|
8877
|
+
id: "/$id/events",
|
|
8878
|
+
path: "/$id/events",
|
|
8879
|
+
getParentRoute: () => ApiTerminalRoute
|
|
8880
|
+
});
|
|
8881
|
+
var ApiTerminalIdCloseRoute = Route$1.update({
|
|
8882
|
+
id: "/$id/close",
|
|
8883
|
+
path: "/$id/close",
|
|
8884
|
+
getParentRoute: () => ApiTerminalRoute
|
|
8200
8885
|
});
|
|
8201
8886
|
var ApiSessionTreeLabelRoute = Route.update({
|
|
8202
8887
|
id: "/label",
|
|
@@ -8205,6 +8890,13 @@ var ApiSessionTreeLabelRoute = Route.update({
|
|
|
8205
8890
|
});
|
|
8206
8891
|
var ApiDirectorySessionsRouteChildren = { ApiDirectorySessionsCleanupRoute };
|
|
8207
8892
|
var ApiDirectorySessionsRouteWithChildren = ApiDirectorySessionsRoute._addFileChildren(ApiDirectorySessionsRouteChildren);
|
|
8893
|
+
var ApiTerminalRouteChildren = {
|
|
8894
|
+
ApiTerminalIdCloseRoute,
|
|
8895
|
+
ApiTerminalIdEventsRoute,
|
|
8896
|
+
ApiTerminalIdInputRoute,
|
|
8897
|
+
ApiTerminalIdResizeRoute
|
|
8898
|
+
};
|
|
8899
|
+
var ApiTerminalRouteWithChildren = ApiTerminalRoute._addFileChildren(ApiTerminalRouteChildren);
|
|
8208
8900
|
var ApiSessionTreeRouteChildren = { ApiSessionTreeLabelRoute };
|
|
8209
8901
|
var rootRouteChildren = {
|
|
8210
8902
|
IndexRoute,
|
|
@@ -8236,6 +8928,7 @@ var rootRouteChildren = {
|
|
|
8236
8928
|
ApiPromptRoute,
|
|
8237
8929
|
ApiProviderUsageRoute,
|
|
8238
8930
|
ApiSlashCommandRoute,
|
|
8931
|
+
ApiTerminalRoute: ApiTerminalRouteWithChildren,
|
|
8239
8932
|
ApiThinkingRoute,
|
|
8240
8933
|
ApiAuthApiKeyRoute,
|
|
8241
8934
|
ApiAuthLogoutRoute,
|
|
@@ -8260,7 +8953,7 @@ var rootRouteChildren = {
|
|
|
8260
8953
|
ApiSettingsHideThinkingRoute,
|
|
8261
8954
|
ApiUiIdRoute
|
|
8262
8955
|
};
|
|
8263
|
-
var routeTree = Route$
|
|
8956
|
+
var routeTree = Route$58._addFileChildren(rootRouteChildren)._addFileTypes();
|
|
8264
8957
|
function getRouter() {
|
|
8265
8958
|
const queryClient = new QueryClient({ defaultOptions: { queries: {
|
|
8266
8959
|
retry: 1,
|