diff --git a/agent/routes/call.ts b/agent/routes/call.ts index 83622c3..b808d1d 100644 --- a/agent/routes/call.ts +++ b/agent/routes/call.ts @@ -62,10 +62,11 @@ export const callText = async (text: string): Promise => { app.route({ path: 'ha', key: 'ha-call', - description: 'Home Assistant 控制指令', + description: 'Home Assistant 控制指令, 参数为 text 例如 打开 阳台灯', }).define(async (ctx) => { const text = ctx.query?.text || '' + console.log('收到指令:', text); if (!text) { ctx.throw(400, '缺少 text 参数'); } diff --git a/package.json b/package.json index 4ccc339..4f44a2d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@kevisual/ha-api", - "version": "0.0.7", + "version": "0.0.8", "description": "", "main": "src/index.ts", "scripts": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8e6e4e4..be28555 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11,6 +11,13 @@ importers: '@kevisual/cache': specifier: ^0.0.5 version: 0.0.5 + fuse.js: + specifier: ^7.1.0 + version: 7.1.0 + lru-cache: + specifier: ^11.2.5 + version: 11.2.5 + devDependencies: '@kevisual/context': specifier: ^0.0.4 version: 0.0.4 @@ -20,13 +27,6 @@ importers: '@kevisual/use-config': specifier: ^1.0.28 version: 1.0.28(dotenv@17.2.3) - fuse.js: - specifier: ^7.1.0 - version: 7.1.0 - lru-cache: - specifier: ^11.2.5 - version: 11.2.5 - devDependencies: '@types/bun': specifier: ^1.3.8 version: 1.3.8