feat(desktop): terminal pane (#5081)

Co-authored-by: Github Action <action@github.com>
Co-authored-by: Dax Raad <d@ironbay.co>
This commit is contained in:
Adam
2025-12-04 15:37:29 -06:00
committed by GitHub
parent b1202ac6db
commit d763c11a6d
27 changed files with 2302 additions and 405 deletions

View File

@@ -5,6 +5,7 @@ import { Instance } from "@/project/instance"
import { InstanceBootstrap } from "@/project/bootstrap"
import { Rpc } from "@/util/rpc"
import { upgrade } from "@/cli/upgrade"
import type { BunWebSocketData } from "hono/bun"
await Log.init({
print: process.argv.includes("--print-logs"),
@@ -27,7 +28,7 @@ process.on("uncaughtException", (e) => {
})
})
let server: Bun.Server<undefined>
let server: Bun.Server<BunWebSocketData>
export const rpc = {
async server(input: { port: number; hostname: string }) {
if (server) await server.stop(true)
@@ -53,7 +54,9 @@ export const rpc = {
async shutdown() {
Log.Default.info("worker shutting down")
await Instance.disposeAll()
await server.stop(true)
// TODO: this should be awaited, but ws connections are
// causing this to hang, need to revisit this
server.stop(true)
},
}