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:
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user