feat(export): fast accurate content session counts on cards

This commit is contained in:
tisonhuang
2026-03-02 19:07:17 +08:00
parent f0f70def8c
commit b6878aefd6
7 changed files with 721 additions and 5 deletions

View File

@@ -113,6 +113,28 @@ export interface ElectronAPI {
counts?: Record<string, number>
error?: string
}>
getExportContentSessionCounts: (options?: {
triggerRefresh?: boolean
forceRefresh?: boolean
}) => Promise<{
success: boolean
data?: {
totalSessions: number
textSessions: number
voiceSessions: number
imageSessions: number
videoSessions: number
emojiSessions: number
pendingMediaSessions: number
updatedAt: number
refreshing: boolean
}
error?: string
}>
refreshExportContentSessionCounts: (options?: { forceRefresh?: boolean }) => Promise<{
success: boolean
error?: string
}>
enrichSessionsContactInfo: (usernames: string[]) => Promise<{
success: boolean
contacts?: Record<string, { displayName?: string; avatarUrl?: string }>