|
|
@@ -2,14 +2,14 @@ import { run } from "@opencode-ai/tui"
|
|
|
import { TuiConfig } from "@opencode-ai/tui/config"
|
|
|
import { Effect } from "effect"
|
|
|
import { Global } from "@opencode-ai/core/global"
|
|
|
+import { createOpencodeClient } from "@opencode-ai/sdk/v2"
|
|
|
|
|
|
export function runTui(transport: { url: string; headers: RequestInit["headers"] }) {
|
|
|
const config = TuiConfig.resolve({}, { terminalSuspend: false })
|
|
|
return run({
|
|
|
- ...transport,
|
|
|
+ sdk: createOpencodeClient({ baseUrl: transport.url, headers: transport.headers, fetch: gracefulFetch }),
|
|
|
args: {},
|
|
|
config,
|
|
|
- fetch: gracefulFetch,
|
|
|
pluginHost: {
|
|
|
async start() {},
|
|
|
async dispose() {},
|