refactor(tui): wire generated client reads (#34381)
This commit is contained in:
@@ -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 })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user