12 lines
358 B
TypeScript
12 lines
358 B
TypeScript
import { createOpencodeClient } from "@opencode-ai/sdk"
|
|
|
|
const client = await createOpencodeClient({
|
|
// baseUrl: "https://yccb64t1z-100.cnb.run",
|
|
// auth: async () => {
|
|
// return 'cm9vdDozR0I2MDg5ZGpYOE5oMDFjM1FteE5DWDd0ZkI='
|
|
// }
|
|
baseUrl: "http://localhost:4096",
|
|
})
|
|
|
|
const sessionList = await client.session.list()
|
|
console.log(sessionList.data) |