* Return the task released back to stub form: retain dropped, messages * cleared, evictAfter set if terminal. Shared by exitTeammateView and * the switch-away path in enterTeammateView.
(task: LocalAgentTaskState)
| 26 | * the switch-away path in enterTeammateView. |
| 27 | */ |
| 28 | function release(task: LocalAgentTaskState): LocalAgentTaskState { |
| 29 | return { |
| 30 | ...task, |
| 31 | retain: false, |
| 32 | messages: undefined, |
| 33 | diskLoaded: false, |
| 34 | evictAfter: isTerminalTaskStatus(task.status) |
| 35 | ? Date.now() + PANEL_GRACE_MS |
| 36 | : undefined, |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | /** |
| 41 | * Transitions the UI to view a teammate's transcript. |
no test coverage detected