MCPcopy Create free account
hub / github.com/oboard/claude-code-rev / completeDreamTask

Function completeDreamTask

src/tasks/DreamTask/DreamTask.ts:106–120  ·  view source on GitHub ↗
(
  taskId: string,
  setAppState: SetAppState,
)

Source from the content-addressed store, hash-verified

104}
105
106export 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
122export function failDreamTask(taskId: string, setAppState: SetAppState): void {
123 updateTaskState<DreamTaskState>(taskId, setAppState, task => ({

Callers 1

initAutoDreamFunction · 0.85

Calls 1

updateTaskStateFunction · 0.50

Tested by

no test coverage detected