From ddba845ce797e9f392982349ff5c2a56e3abe048 Mon Sep 17 00:00:00 2001 From: abearxiong Date: Tue, 20 Jan 2026 17:45:59 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9B=B4=E6=96=B0=E7=BC=93=E5=AD=98?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E8=B7=AF=E5=BE=84=E7=9A=84=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assistant/src/routes-simple/router.ts | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/assistant/src/routes-simple/router.ts b/assistant/src/routes-simple/router.ts index e9aaf7b..f30d045 100644 --- a/assistant/src/routes-simple/router.ts +++ b/assistant/src/routes-simple/router.ts @@ -1,10 +1,18 @@ import { simpleRouter } from '@/app.ts'; import http from 'http'; import { useContextKey } from '@kevisual/context'; -import { useFileStore } from '@kevisual/use-config'; export { simpleRouter }; - -export const cacheFilePath = useFileStore('cache-file', { needExists: true }); +import os from 'node:os'; +import path from 'node:path'; +import fs from 'node:fs'; +/** + * 缓存文件路径 + */ +const defaultCachePath = path.join(os.homedir(), '.envision', 'cache-file'); +if (!fs.existsSync(defaultCachePath)) { + fs.mkdirSync(defaultCachePath, { recursive: true }); +} +export const cacheFilePath = defaultCachePath; /** * 事件客户端