Skip to content

Commit bf7af99

Browse files
committed
fix(app): terminal URL issues
1 parent 7555742 commit bf7af99

3 files changed

Lines changed: 2 additions & 58 deletions

File tree

packages/app/src/components/terminal-url.test.ts

Lines changed: 0 additions & 44 deletions
This file was deleted.

packages/app/src/components/terminal-url.ts

Lines changed: 0 additions & 12 deletions
This file was deleted.

packages/app/src/components/terminal.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import { LocalPTY } from "@/context/terminal"
88
import { resolveThemeVariant, useTheme, withAlpha, type HexColor } from "@opencode-ai/ui/theme"
99
import { useLanguage } from "@/context/language"
1010
import { showToast } from "@opencode-ai/ui/toast"
11-
import { ptySocketUrl } from "./terminal-url"
1211

1312
export interface TerminalProps extends ComponentProps<"div"> {
1413
pty: LocalPTY
@@ -164,7 +163,8 @@ export const Terminal = (props: TerminalProps) => {
164163

165164
const once = { value: false }
166165

167-
const url = ptySocketUrl(sdk.url, local.pty.id, sdk.directory, window.location)
166+
const url = new URL(sdk.url + `/pty/${local.pty.id}/connect?directory=${encodeURIComponent(sdk.directory)}`)
167+
url.protocol = url.protocol === "https:" ? "wss:" : "ws:"
168168
if (window.__OPENCODE__?.serverPassword) {
169169
url.username = "opencode"
170170
url.password = window.__OPENCODE__?.serverPassword

0 commit comments

Comments
 (0)