@opencode-ai/sdk 1.0.63 → 1.0.64

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/client.js +10 -0
  2. package/package.json +1 -1
package/dist/client.js CHANGED
@@ -3,6 +3,16 @@ export { OpencodeClient };
3
3
  import { createClient } from "./gen/client/client.gen.js";
4
4
  import { OpencodeClient } from "./gen/sdk.gen.js";
5
5
  export function createOpencodeClient(config) {
6
+ if (!config?.fetch) {
7
+ config = {
8
+ ...config,
9
+ fetch: (req) => {
10
+ // @ts-ignore
11
+ req.timeout = false;
12
+ return fetch(req);
13
+ },
14
+ };
15
+ }
6
16
  const client = createClient(config);
7
17
  return new OpencodeClient({ client });
8
18
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@opencode-ai/sdk",
4
- "version": "1.0.63",
4
+ "version": "1.0.64",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "typecheck": "tsgo --noEmit",