移除未使用的 cnb 导出,更新依赖版本,添加 opencode 客户端示例
This commit is contained in:
@@ -22,8 +22,6 @@ try {
|
||||
process.exit(1)
|
||||
}
|
||||
await new Promise(resolve => setTimeout(resolve, 1000))
|
||||
export const cnbItem = await cnbManager.getCNB({ username: 'default' });
|
||||
export const cnb = cnbItem?.cnb;
|
||||
export const app = await useContextKey<App>('app', () => {
|
||||
return new App({})
|
||||
})
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { runAgent } from '@kevisual/ai/agent'
|
||||
import { app, notCNBCheck, cnbManager, cnb } from '../../app.ts';
|
||||
import { app, cnbManager } from '../../app.ts';
|
||||
import z from 'zod';
|
||||
|
||||
app.route({
|
||||
|
||||
12
agent/routes/opencode/index.ts
Normal file
12
agent/routes/opencode/index.ts
Normal 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)
|
||||
Reference in New Issue
Block a user