MCPcopy Create free account
hub / github.com/Noumena-Network/code / markTaskNotified

Function markTaskNotified

src/tasks/RemoteAgentTask/RemoteAgentTask.tsx:192–205  ·  view source on GitHub ↗

* Atomically mark a task as notified. Returns true if this call flipped the * flag (caller should enqueue), false if already notified (caller should skip).

(taskId: string, setAppState: SetAppState)

Source from the content-addressed store, hash-verified

190 * flag (caller should enqueue), false if already notified (caller should skip).
191 */
192function markTaskNotified(taskId: string, setAppState: SetAppState): boolean {
193 let shouldEnqueue = false;
194 updateTaskState(taskId, setAppState, task => {
195 if (task.notified) {
196 return task;
197 }
198 shouldEnqueue = true;
199 return {
200 ...task,
201 notified: true
202 };
203 });
204 return shouldEnqueue;
205}
206
207/**
208 * Extract the plan content from the remote session log.

Calls 1

updateTaskStateFunction · 0.50

Tested by

no test coverage detected