( taskId: string, setAppState: SetAppState, )
| 104 | } |
| 105 | |
| 106 | export function completeDreamTask( |
| 107 | taskId: string, |
| 108 | setAppState: SetAppState, |
| 109 | ): void { |
| 110 | // notified: true immediately — dream has no model-facing notification path |
| 111 | // (it's UI-only), and eviction requires terminal + notified. The inline |
| 112 | // appendSystemMessage completion note IS the user surface. |
| 113 | updateTaskState<DreamTaskState>(taskId, setAppState, task => ({ |
| 114 | ...task, |
| 115 | status: 'completed', |
| 116 | endTime: Date.now(), |
| 117 | notified: true, |
| 118 | abortController: undefined, |
| 119 | })) |
| 120 | } |
| 121 | |
| 122 | export function failDreamTask(taskId: string, setAppState: SetAppState): void { |
| 123 | updateTaskState<DreamTaskState>(taskId, setAppState, task => ({ |
no test coverage detected