fix: 修复桌面集成失效 + 清理死代码

- main.ts: window.__metonaBridge → window.metonaDesktop(与 preload.ts 对齐)
- 删除 DesktopBridge 接口和 __metonaBridge 类型(从未使用)
- 删除 extractDocument(定义了但无调用)
- 删除 logIPC(导出了但零引用)
- 删除 getMessagesContainer(导出了但无调用)
- SAFE_DATA_TYPES 去掉多余的 export
- vite.config.ts 移除未使用的 server 配置
This commit is contained in:
thzxx
2026-04-07 01:28:07 +08:00
parent e1e67dd285
commit 58ef272061
7 changed files with 2 additions and 34 deletions
@@ -58,10 +58,6 @@ function splitSentences(text: string): string[] {
return parts.filter(p => p.trim()).map(p => p.trim() + ' ');
}
export function extractDocument(content: string, filename: string): { text: string; filename: string } {
return { text: content, filename };
}
export function createChunkMetadata(chunk: string, index: number, docId: string, filename: string) {
return {
id: `${docId}_chunk_${index}`,
-1
View File
@@ -183,5 +183,4 @@ export function logSession(action: string, detail?: string): void { addLog('info
export function logMemory(action: string, detail?: string): void { addLog('debug', `记忆: ${action}`, detail); }
export function logRAG(action: string, detail?: string): void { addLog('info', `RAG: ${action}`, detail); }
export function logSetting(key: string, value: string): void { addLog('debug', `设置: ${key}`, value); }
export function logIPC(action: string, detail?: string): void { addLog('debug', `IPC: ${action}`, detail); }
export function logInit(msg: string): void { addLog('info', `初始化: ${msg}`); }