移除未使用的 cnb 导出,更新依赖版本,添加 opencode 客户端示例

This commit is contained in:
xiongxiao
2026-03-13 01:56:22 +08:00
committed by cnb
parent 525f0af8ba
commit 176c82f1ac
5 changed files with 19 additions and 9 deletions

View File

@@ -0,0 +1,12 @@
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)