web command

This commit is contained in:
Dax Raad
2025-11-03 16:10:13 -05:00
parent 55d07a139c
commit 902763b47d
4 changed files with 53 additions and 3 deletions

View File

@@ -1,4 +1,5 @@
import { Server } from "../../server/server"
import { UI } from "../ui"
import { cmd } from "./cmd"
export const ServeCommand = cmd({
@@ -24,7 +25,12 @@ export const ServeCommand = cmd({
port,
hostname,
})
console.log(`opencode server listening on http://${server.hostname}:${server.port}`)
UI.println(
UI.Style.TEXT_NORMAL_BOLD,
"Web interface: ",
UI.Style.TEXT_NORMAL,
`https://desktop.dev.opencode.ai?url=${server.url}`,
)
await new Promise(() => {})
await server.stop()
},