fix(desktop): set default WebSocket username and prevent repeated calling of terminal spawn properly closing the terminal (#17061)

This commit is contained in:
OpeOginni
2026-03-12 07:48:44 +01:00
committed by GitHub
parent d481f64bde
commit c9c0318e0e
2 changed files with 7 additions and 5 deletions

View File

@@ -452,7 +452,7 @@ export const Terminal = (props: TerminalProps) => {
url.searchParams.set("directory", sdk.directory)
url.searchParams.set("cursor", String(start !== undefined ? start : restore ? -1 : 0))
url.protocol = url.protocol === "https:" ? "wss:" : "ws:"
url.username = server.current?.http.username ?? ""
url.username = server.current?.http.username ?? "opencode"
url.password = server.current?.http.password ?? ""
const socket = new WebSocket(url)