diff options
| author | Brendan Allan <[email protected]> | 2026-02-18 23:03:24 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-02-18 23:03:24 +0800 |
| commit | 1bb8574179bbf7c49a34ad0e5df522a752af08c2 (patch) | |
| tree | d10e2ec54cc027dc8ffd76bb40031300f9eaeef8 /packages/app/src/context/global-sync/bootstrap.ts | |
| parent | 2611c35acc3dc64582e15ad1efca36c60a2883a8 (diff) | |
| download | opencode-1bb8574179bbf7c49a34ad0e5df522a752af08c2.tar.gz opencode-1bb8574179bbf7c49a34ad0e5df522a752af08c2.zip | |
app: refactor server management backend (#13813)
Diffstat (limited to 'packages/app/src/context/global-sync/bootstrap.ts')
| -rw-r--r-- | packages/app/src/context/global-sync/bootstrap.ts | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/packages/app/src/context/global-sync/bootstrap.ts b/packages/app/src/context/global-sync/bootstrap.ts index 40a30cba8..6e7714828 100644 --- a/packages/app/src/context/global-sync/bootstrap.ts +++ b/packages/app/src/context/global-sync/bootstrap.ts @@ -1,21 +1,21 @@ -import { - type Config, - type Path, - type PermissionRequest, - type Project, - type ProviderAuthResponse, - type ProviderListResponse, - type QuestionRequest, - type Todo, - createOpencodeClient, +import type { + Config, + OpencodeClient, + Path, + PermissionRequest, + Project, + ProviderAuthResponse, + ProviderListResponse, + QuestionRequest, + Todo, } from "@opencode-ai/sdk/v2/client" +import { showToast } from "@opencode-ai/ui/toast" +import { getFilename } from "@opencode-ai/util/path" +import { retry } from "@opencode-ai/util/retry" import { batch } from "solid-js" import { reconcile, type SetStoreFunction, type Store } from "solid-js/store" -import { retry } from "@opencode-ai/util/retry" -import { getFilename } from "@opencode-ai/util/path" -import { showToast } from "@opencode-ai/ui/toast" -import { cmp, normalizeProviderList } from "./utils" import type { State, VcsCache } from "./types" +import { cmp, normalizeProviderList } from "./utils" type GlobalStore = { ready: boolean @@ -31,7 +31,7 @@ type GlobalStore = { } export async function bootstrapGlobal(input: { - globalSDK: ReturnType<typeof createOpencodeClient> + globalSDK: OpencodeClient connectErrorTitle: string connectErrorDescription: string requestFailedTitle: string @@ -110,7 +110,7 @@ function groupBySession<T extends { id: string; sessionID: string }>(input: T[]) export async function bootstrapDirectory(input: { directory: string - sdk: ReturnType<typeof createOpencodeClient> + sdk: OpencodeClient store: Store<State> setStore: SetStoreFunction<State> vcsCache: VcsCache |
