download
raw
721 Bytes
export * from "./gen/types.gen.js";
import { createClient } from "./gen/client/client.gen.js";
import { OpencodeClient } from "./gen/sdk.gen.js";
export { OpencodeClient };
export function createOpencodeClient(config) {
if (!config?.fetch) {
const customFetch = (req) => {
// @ts-ignore
req.timeout = false;
return fetch(req);
};
config = {
...config,
fetch: customFetch,
};
}
if (config?.directory) {
config.headers = {
...config.headers,
"x-opencode-directory": config.directory,
};
}
const client = createClient(config);
return new OpencodeClient({ client });
}

Xet Storage Details

Size:
721 Bytes
·
Xet hash:
8f7a56d71942d361a2c44d7a2ddd376687f6ca0f276ecfd032eb0947904b3cad

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.