feat(export): add text batch task performance breakdown

This commit is contained in:
tisonhuang
2026-03-02 17:14:57 +08:00
parent 7bd801cd01
commit 750d6ad7eb
4 changed files with 458 additions and 81 deletions

View File

@@ -276,7 +276,7 @@ contextBridge.exposeInMainWorld('electronAPI', {
ipcRenderer.invoke('export:pauseTask', taskId),
stopTask: (taskId: string) =>
ipcRenderer.invoke('export:stopTask', taskId),
onProgress: (callback: (payload: { current: number; total: number; currentSession: string; phase: string }) => void) => {
onProgress: (callback: (payload: { current: number; total: number; currentSession: string; currentSessionId?: string; phase: string }) => void) => {
ipcRenderer.on('export:progress', (_, payload) => callback(payload))
return () => ipcRenderer.removeAllListeners('export:progress')
}

View File

@@ -108,6 +108,7 @@ export interface ExportProgress {
current: number
total: number
currentSession: string
currentSessionId?: string
phase: 'preparing' | 'exporting' | 'exporting-media' | 'exporting-voice' | 'writing' | 'complete'
phaseProgress?: number
phaseTotal?: number
@@ -5299,7 +5300,8 @@ class ExportService {
...progress,
current: completedCount,
total: sessionIds.length,
currentSession: sessionInfo.displayName
currentSession: sessionInfo.displayName,
currentSessionId: sessionId
})
}
@@ -5411,6 +5413,7 @@ class ExportService {
current: sessionIds.length,
total: sessionIds.length,
currentSession: '',
currentSessionId: '',
phase: 'complete'
})