Skip to content

Commit 8f8bb0c

Browse files
authored
Merge branch 'anomalyco:dev' into dev
2 parents 7902a14 + bf7af99 commit 8f8bb0c

4 files changed

Lines changed: 2 additions & 69 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

packages/desktop/src/index.tsx

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,6 @@ if (import.meta.env.DEV && !(root instanceof HTMLElement)) {
3030

3131
void initI18n()
3232

33-
// Floating UI can call getComputedStyle with non-elements (e.g., null refs, virtual elements).
34-
// This happens on all platforms (WebView2 on Windows, WKWebView on macOS), not just Windows.
35-
const originalGetComputedStyle = window.getComputedStyle
36-
window.getComputedStyle = ((elt: Element, pseudoElt?: string | null) => {
37-
if (!(elt instanceof Element)) {
38-
// Fall back to a safe element when a non-element is passed.
39-
return originalGetComputedStyle(document.documentElement, pseudoElt ?? undefined)
40-
}
41-
return originalGetComputedStyle(elt, pseudoElt ?? undefined)
42-
}) as typeof window.getComputedStyle
43-
4433
let update: Update | null = null
4534

4635
const deepLinkEvent = "opencode:deep-link"

0 commit comments

Comments
 (0)