refactor: use typed window.metonaDesktop in chat-db.ts

Replaced remaining '(window as any).metonaDesktop' with properly typed
'window.metonaDesktop' in chat-db.ts for consistency with the rest of
the codebase.
This commit is contained in:
thzxx
2026-04-24 14:04:31 +08:00
parent 9cb6c243a7
commit 2118ad727f
+2 -2
View File
@@ -7,12 +7,12 @@ import type { ChatSession, MemoryEntry } from '../types.js';
/** 检查是否在桌面环境 */ /** 检查是否在桌面环境 */
function isDesktop(): boolean { function isDesktop(): boolean {
return !!(window as any).metonaDesktop?.isDesktop; return !!window.metonaDesktop?.isDesktop;
} }
/** 桌面端 DB 桥接 */ /** 桌面端 DB 桥接 */
function dbBridge() { function dbBridge() {
return (window as any).metonaDesktop?.db; return window.metonaDesktop?.db;
} }
export class ChatDB { export class ChatDB {