refactor(tui): remove legacy sdk client

This commit is contained in:
Dax Raad 2026-07-13 16:12:58 -04:00
commit 36f8cb7054
36 changed files with 316 additions and 510 deletions

View file

@ -1,5 +1,4 @@
import { OpenCode, type OpenCodeEvent } from "@opencode-ai/client"
import { createOpencodeClient } from "@opencode-ai/sdk/v2"
export const worktree = "/tmp/opencode"
export const directory = `${worktree}/packages/tui`
@ -135,10 +134,6 @@ export function createFetch(override?: FetchHandler, events?: ReturnType<typeof
return { fetch, session }
}
export function createClient(fetch: typeof globalThis.fetch) {
return createOpencodeClient({ baseUrl: "http://test", fetch })
}
export function createApi(fetch: typeof globalThis.fetch) {
return OpenCode.make({ baseUrl: "http://test", fetch })
}