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; /** * 事件客户端