fix: 修复 importSessions 中 result 变量重复声明导致编译失败

This commit is contained in:
thzxx
2026-04-07 02:10:01 +08:00
parent 0a476365b2
commit 4dcbb4f1e9
3 changed files with 33 additions and 5 deletions
+3 -3
View File
@@ -271,9 +271,9 @@ async function importSessions(filePath: string): Promise<void> {
return;
}
const result = await db.importSessions(sessions);
showToast(`导入完成:${result.imported} 个会话${result.skipped > 0 ? `,跳过 ${result.skipped}` : ''}`, 'success', 4000);
logSuccess(`导入完成: ${result.imported} 个, 跳过 ${result.skipped}`);
const importResult = await db.importSessions(sessions);
showToast(`导入完成:${importResult.imported} 个会话${importResult.skipped > 0 ? `,跳过 ${importResult.skipped}` : ''}`, 'success', 4000);
logSuccess(`导入完成: ${importResult.imported} 个, 跳过 ${importResult.skipped}`);
} catch (err) {
showToast(`导入失败: ${(err as Error).message}`, 'error');
logError('导入失败', (err as Error).message);