allow importing sdk from @opencode-ai/sdk/server and @opencode-ai/sdk/client
This commit is contained in:
10
packages/sdk/js/src/client.ts
Normal file
10
packages/sdk/js/src/client.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { createClient } from "./gen/client/client.js"
|
||||
import { type Config } from "./gen/client/types.js"
|
||||
import { OpencodeClient } from "./gen/sdk.gen.js"
|
||||
export * from "./gen/types.gen.js"
|
||||
export { type Config, OpencodeClient }
|
||||
|
||||
export function createOpencodeClient(config?: Config) {
|
||||
const client = createClient(config)
|
||||
return new OpencodeClient({ client })
|
||||
}
|
||||
Reference in New Issue
Block a user