feat: enhance download pause/resume with progress persistence (#1034)

This commit is contained in:
Gauvain
2025-09-29 14:17:07 +02:00
committed by GitHub
parent 1733db6c28
commit 2273b7be0a
12 changed files with 515 additions and 103 deletions

View File

@@ -77,6 +77,17 @@ export const clearLogs = () => {
storage.delete("logs");
};
export const dumpDownloadDiagnostics = (extra: any = {}) => {
const diagnostics = {
timestamp: new Date().toISOString(),
processes: extra?.processes || [],
nativeTasks: extra?.nativeTasks || [],
focusedProcess: extra?.focusedProcess || null,
};
writeDebugLog("Download diagnostics", diagnostics);
return diagnostics;
};
export function useLog() {
const context = useContext(LogContext);
if (context === null) {