refactor(tui): remove legacy sdk client
This commit is contained in:
parent
4c45a5cf23
commit
36f8cb7054
36 changed files with 316 additions and 510 deletions
|
|
@ -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 })
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue