From 2118ad727ff545424d8322ae7fa22e3b39e8e764 Mon Sep 17 00:00:00 2001 From: thzxx Date: Fri, 24 Apr 2026 14:04:31 +0800 Subject: [PATCH] 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. --- src/renderer/db/chat-db.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderer/db/chat-db.ts b/src/renderer/db/chat-db.ts index 5bf303d..f6c999f 100644 --- a/src/renderer/db/chat-db.ts +++ b/src/renderer/db/chat-db.ts @@ -7,12 +7,12 @@ import type { ChatSession, MemoryEntry } from '../types.js'; /** 检查是否在桌面环境 */ function isDesktop(): boolean { - return !!(window as any).metonaDesktop?.isDesktop; + return !!window.metonaDesktop?.isDesktop; } /** 桌面端 DB 桥接 */ function dbBridge() { - return (window as any).metonaDesktop?.db; + return window.metonaDesktop?.db; } export class ChatDB {