(task: AppState['tasks'][string])
| 93 | const preservedAgentIds = new Set<string>() |
| 94 | const preservedLocalAgents: LocalAgentTaskState[] = [] |
| 95 | const shouldKillTask = (task: AppState['tasks'][string]): boolean => |
| 96 | 'isBackgrounded' in task && task.isBackgrounded === false |
| 97 | if (getAppState) { |
| 98 | for (const task of Object.values(getAppState().tasks)) { |
| 99 | if (shouldKillTask(task)) continue |