更新 @opencode-ai/sdk 版本至 1.1.36,调整类型定义以支持 AssistantConfig
This commit is contained in:
@@ -8,6 +8,7 @@ import { runCode } from './run.ts';
|
||||
const codeDemoId = '0e700dc8-90dd-41b7-91dd-336ea51de3d2'
|
||||
import { filter } from "@kevisual/js-filter";
|
||||
import { getHash, getStringHash } from '../file-hash.ts';
|
||||
import { AssistantConfig } from '@/lib.ts';
|
||||
|
||||
const codeDemo = `// 这是一个示例代码文件
|
||||
import {App} from '@kevisual/router';
|
||||
@@ -36,7 +37,7 @@ const writeCodeDemo = async (appDir: string) => {
|
||||
|
||||
type opts = {
|
||||
router: QueryRouterServer | App
|
||||
config: AssistantInit
|
||||
config: AssistantConfig | AssistantInit
|
||||
sync?: boolean
|
||||
}
|
||||
type LightCodeFile = {
|
||||
@@ -45,7 +46,7 @@ type LightCodeFile = {
|
||||
export const initLightCode = async (opts: opts) => {
|
||||
// 注册 light-code 路由
|
||||
console.log('初始化 light-code 路由');
|
||||
const config = opts.config;
|
||||
const config = opts.config as AssistantInit;
|
||||
const app = opts.router;
|
||||
const token = config.getConfig()?.token || '';
|
||||
const query = config.query;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@kevisual/cli",
|
||||
"version": "0.0.92",
|
||||
"version": "0.0.93",
|
||||
"description": "envision 命令行工具",
|
||||
"type": "module",
|
||||
"basename": "/root/cli",
|
||||
@@ -49,7 +49,7 @@
|
||||
"@kevisual/auth": "^2.0.3",
|
||||
"@kevisual/context": "^0.0.4",
|
||||
"@kevisual/use-config": "^1.0.28",
|
||||
"@opencode-ai/sdk": "^1.1.35",
|
||||
"@opencode-ai/sdk": "^1.1.36",
|
||||
"@types/busboy": "^1.5.4",
|
||||
"busboy": "^1.6.0",
|
||||
"eventemitter3": "^5.0.4",
|
||||
@@ -91,4 +91,4 @@
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
9
pnpm-lock.yaml
generated
9
pnpm-lock.yaml
generated
@@ -24,8 +24,8 @@ importers:
|
||||
specifier: ^1.0.28
|
||||
version: 1.0.28(dotenv@17.2.3)
|
||||
'@opencode-ai/sdk':
|
||||
specifier: ^1.1.35
|
||||
version: 1.1.35
|
||||
specifier: ^1.1.36
|
||||
version: 1.1.36
|
||||
'@types/busboy':
|
||||
specifier: ^1.5.4
|
||||
version: 1.5.4
|
||||
@@ -1471,9 +1471,6 @@ packages:
|
||||
'@opencode-ai/plugin@1.1.36':
|
||||
resolution: {integrity: sha512-b2XWeFZN7UzgwkkzTIi6qSntkpEA9En2zvpqakQzZAGQm6QBdGAlv6r1u5hEnmF12Gzyj5umTMWr5GzVbP/oAA==}
|
||||
|
||||
'@opencode-ai/sdk@1.1.35':
|
||||
resolution: {integrity: sha512-1RfjXvc5nguurpGXyKk8aJ4Rb3ix1IZ5V7itPB3SMq7c6OkmbE/5wzN2KUT9zATWj7ZDjmShkxEjvkRsOhodtw==}
|
||||
|
||||
'@opencode-ai/sdk@1.1.36':
|
||||
resolution: {integrity: sha512-feNHWnbxhg03TI2QrWnw3Chc0eYrWSDSmHIy/ejpSVfcKlfXREw1Tpg0L4EjrpeSc4jB1eM673dh+WM/Ko2SFQ==}
|
||||
|
||||
@@ -6822,8 +6819,6 @@ snapshots:
|
||||
'@opencode-ai/sdk': 1.1.36
|
||||
zod: 4.1.8
|
||||
|
||||
'@opencode-ai/sdk@1.1.35': {}
|
||||
|
||||
'@opencode-ai/sdk@1.1.36': {}
|
||||
|
||||
'@oslojs/encoding@1.1.0': {}
|
||||
|
||||
Reference in New Issue
Block a user