fix(cli): pass initialized SDK to TUI
This commit is contained in:
parent
a7f335aec0
commit
20f6635ca0
1 changed files with 2 additions and 2 deletions
|
|
@ -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() {},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue