mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-06 00:12:11 +00:00
fix(app): provide pty socket auth if available from desktop (#8210)
This commit is contained in:
parent
f3b7d2f786
commit
35cb06e0e4
3 changed files with 8 additions and 5 deletions
|
|
@ -100,9 +100,12 @@ export const Terminal = (props: TerminalProps) => {
|
|||
const mod = await import("ghostty-web")
|
||||
ghostty = await mod.Ghostty.load()
|
||||
|
||||
const socket = new WebSocket(
|
||||
sdk.url + `/pty/${local.pty.id}/connect?directory=${encodeURIComponent(sdk.directory)}`,
|
||||
)
|
||||
const url = new URL(sdk.url + `/pty/${local.pty.id}/connect?directory=${encodeURIComponent(sdk.directory)}`)
|
||||
if (window.__OPENCODE__?.serverPassword) {
|
||||
url.username = "opencode"
|
||||
url.password = window.__OPENCODE__?.serverPassword
|
||||
}
|
||||
const socket = new WebSocket(url)
|
||||
ws = socket
|
||||
|
||||
const t = new mod.Terminal({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue