summaryrefslogtreecommitdiffhomepage
path: root/packages/app/src/context/platform.tsx
diff options
context:
space:
mode:
authorBrendan Allan <[email protected]>2026-03-12 16:10:52 +0800
committerGitHub <[email protected]>2026-03-12 08:10:52 +0000
commitb76ead3fe80a6159fdbfcc9b82c7c6318be68e7f (patch)
treebad16ba8185403eb9dc97b6c996bbfa78ae7918b /packages/app/src/context/platform.tsx
parent51835ecf90e23b34957f4dde843bbba1134f17fe (diff)
downloadopencode-b76ead3fe80a6159fdbfcc9b82c7c6318be68e7f.tar.gz
opencode-b76ead3fe80a6159fdbfcc9b82c7c6318be68e7f.zip
refactor(desktop): rework default server initialization and connection handling (#16965)
Diffstat (limited to 'packages/app/src/context/platform.tsx')
-rw-r--r--packages/app/src/context/platform.tsx5
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/app/src/context/platform.tsx b/packages/app/src/context/platform.tsx
index 86f3321e4..b8ed58e34 100644
--- a/packages/app/src/context/platform.tsx
+++ b/packages/app/src/context/platform.tsx
@@ -1,6 +1,7 @@
import { createSimpleContext } from "@opencode-ai/ui/context"
import type { AsyncStorage, SyncStorage } from "@solid-primitives/storage"
import type { Accessor } from "solid-js"
+import { ServerConnection } from "./server"
type PickerPaths = string | string[] | null
type OpenDirectoryPickerOptions = { title?: string; multiple?: boolean }
@@ -58,10 +59,10 @@ export type Platform = {
fetch?: typeof fetch
/** Get the configured default server URL (platform-specific) */
- getDefaultServerUrl?(): Promise<string | null>
+ getDefaultServer?(): Promise<ServerConnection.Key | null>
/** Set the default server URL to use on app startup (platform-specific) */
- setDefaultServerUrl?(url: string | null): Promise<void> | void
+ setDefaultServer?(url: ServerConnection.Key | null): Promise<void> | void
/** Get the configured WSL integration (desktop only) */
getWslEnabled?(): Promise<boolean>