feat: 支持导出自定义目录并优化聊天记录读取

接入导出保存目录选择功能
修复导出路径摘要未同步更新
按时间范围查询聊天记录,避免全量扫描历史消息
增加跨分片消息查询支持验证
This commit is contained in:
电摇小子
2026-08-15 02:44:07 +08:00
parent 900e4c504c
commit 1fc39678ff
9 changed files with 29 additions and 16 deletions
+5
View File
@@ -1164,6 +1164,11 @@ app.whenReady().then(async () => {
if (!window) return { success: false, error: '窗口不可用' }
return runExport(request, window, voiceRecognition || undefined)
})
ipcMain.handle('export:selectDirectory', async (event) => {
const window = BrowserWindow.fromWebContents(event.sender)
const result = await dialog.showOpenDialog(window!, { properties: ['openDirectory', 'createDirectory'] })
return result.canceled ? { canceled: true } : { canceled: false, path: result.filePaths[0] }
})
ipcMain.handle('export:cancel', (_, jobId: string) => {
cancelExport(jobId)
return { success: true }