From 7dd8b2b7f9e568b881dded27f5ce1625908d9c78 Mon Sep 17 00:00:00 2001 From: LukeParkerDev <10430890+Hona@users.noreply.github.com> Date: Mon, 4 May 2026 11:24:14 +1000 Subject: [PATCH] deslop --- packages/app/src/app.tsx | 1 - .../src/components/dialog-select-server.tsx | 29 +------------------ packages/app/src/context/platform.tsx | 6 ---- 3 files changed, 1 insertion(+), 35 deletions(-) diff --git a/packages/app/src/app.tsx b/packages/app/src/app.tsx index 2649260cf3..a15b65cd84 100644 --- a/packages/app/src/app.tsx +++ b/packages/app/src/app.tsx @@ -75,7 +75,6 @@ declare global { __OPENCODE__?: { updaterEnabled?: boolean deepLinks?: string[] - wsl?: boolean activeServer?: string } api?: { diff --git a/packages/app/src/components/dialog-select-server.tsx b/packages/app/src/components/dialog-select-server.tsx index 909d45ae71..7504eb86fa 100644 --- a/packages/app/src/components/dialog-select-server.tsx +++ b/packages/app/src/components/dialog-select-server.tsx @@ -20,29 +20,6 @@ import { type ServerHealth, useCheckServerHealth } from "@/utils/server-health" const DEFAULT_USERNAME = "opencode" -function versionOlderThan(current: string | null | undefined, expected: string | null | undefined) { - if (!current || !expected) return false - - const parse = (value: string) => { - const match = value.match(/v?(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?/) - if (!match) return - return { - major: Number(match[1]), - minor: Number(match[2]), - patch: Number(match[3]), - prerelease: match[4] ?? null, - } - } - - const left = parse(current) - const right = parse(expected) - if (!left || !right) return false - if (left.major !== right.major) return left.major < right.major - if (left.minor !== right.minor) return left.minor < right.minor - if (left.patch !== right.patch) return left.patch < right.patch - return !!left.prerelease && !right.prerelease -} - interface DialogSelectServerProps { onNavigateHome?: () => void } @@ -632,15 +609,11 @@ export function DialogSelectServer(props: DialogSelectServerProps = {}) { const blocked = () => health(key)?.healthy === false const canChangeDefault = () => defaultServer.canDefault() && i.type !== "ssh" const canRemove = () => i.type === "http" || wsl - const outdated = () => { - const check = wslCheck(i) - return versionOlderThan(check?.version, check?.expectedVersion) - } const opencodeAction = () => { const check = wslCheck(i) if (!check) return null if (!check.resolvedPath) return "Install OpenCode" - if (outdated()) return "Update OpenCode" + if (check.matchesDesktop === false) return "Update OpenCode" return null } const updating = () => { diff --git a/packages/app/src/context/platform.tsx b/packages/app/src/context/platform.tsx index 757c8e49a5..928ed5ee2e 100644 --- a/packages/app/src/context/platform.tsx +++ b/packages/app/src/context/platform.tsx @@ -147,12 +147,6 @@ export type Platform = { /** Set the default server URL to use on app startup (platform-specific) */ setDefaultServer?(url: ServerConnection.Key | null): Promise | void - /** Get the configured WSL integration (desktop only) */ - getWslEnabled?(): Promise - - /** Set the configured WSL integration (desktop only) */ - setWslEnabled?(config: boolean): Promise | void - /** Manage WSL sidecar servers (Electron on Windows only) */ wslServers?: WslServersPlatform