refactor(tui): wire generated client reads (#34381)

This commit is contained in:
Kit Langton
2026-06-29 11:36:10 -04:00
committed by GitHub
parent e8ac44430b
commit 381d67572e
28 changed files with 508 additions and 426 deletions
+5
View File
@@ -1,3 +1,4 @@
import { OpenCode } from "@opencode-ai/client"
import { createOpencodeClient } from "@opencode-ai/sdk/v2"
import type { V2Event } from "@opencode-ai/sdk/v2"
@@ -117,3 +118,7 @@ export function createFetch(override?: FetchHandler, events?: ReturnType<typeof
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 })
}