feat: implement background process logging and cleanup

- Add persistent logging for backgrounded shell processes in ~/.gemini/tmp/background-processes
- Implement automatic cleanup of background logs older than 7 days on CLI startup
- Support real-time output syncing to log files for both PTY and child_process execution
- Update UI to indicate log file availability for background tasks
- Add comprehensive unit and integration tests for logging and cleanup logic
This commit is contained in:
galz10
2026-03-04 17:00:48 -08:00
parent fb32db5cd6
commit 127fbf9487
15 changed files with 767 additions and 103 deletions
@@ -76,7 +76,7 @@ export interface UIActions {
revealCleanUiDetailsTemporarily: (durationMs?: number) => void;
handleWarning: (message: string) => void;
setEmbeddedShellFocused: (value: boolean) => void;
dismissBackgroundShell: (pid: number) => void;
dismissBackgroundShell: (pid: number) => Promise<void>;
setActiveBackgroundShellPid: (pid: number) => void;
setIsBackgroundShellListOpen: (isOpen: boolean) => void;
setAuthContext: (context: { requiresRestart?: boolean }) => void;