diff options
| author | Aiden Cline <[email protected]> | 2025-11-13 14:25:47 -0600 |
|---|---|---|
| committer | Aiden Cline <[email protected]> | 2025-11-13 14:27:33 -0600 |
| commit | 779a27693a9d37ae212c27af353414ff4de07ea4 (patch) | |
| tree | 0fc65fe9eb72592d686d06ad71e32633010798b0 /packages/sdk/js/src | |
| parent | 829d86840ab793511cd98ad629014b6a08c8c369 (diff) | |
| download | opencode-779a27693a9d37ae212c27af353414ff4de07ea4.tar.gz opencode-779a27693a9d37ae212c27af353414ff4de07ea4.zip | |
fix: opencode run timeout
Diffstat (limited to 'packages/sdk/js/src')
| -rw-r--r-- | packages/sdk/js/src/client.ts | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/packages/sdk/js/src/client.ts b/packages/sdk/js/src/client.ts index 29b9de906..ac9aa1519 100644 --- a/packages/sdk/js/src/client.ts +++ b/packages/sdk/js/src/client.ts @@ -6,6 +6,17 @@ import { type Config } from "./gen/client/types.gen.js" import { OpencodeClient } from "./gen/sdk.gen.js" export function createOpencodeClient(config?: Config) { + if (!config?.fetch) { + config = { + ...config, + fetch: (req) => { + // @ts-ignore + req.timeout = false + return fetch(req) + }, + } + } + const client = createClient(config) return new OpencodeClient({ client }) } |
