MCPcopy Create free account
hub / github.com/freecodexyz/free-code / updateAgentProgress

Function updateAgentProgress

src/tasks/LocalAgentTask/LocalAgentTask.tsx:339–353  ·  view source on GitHub ↗
(taskId: string, progress: AgentProgress, setAppState: SetAppState)

Source from the content-addressed store, hash-verified

337 * results are not clobbered by progress updates from assistant messages.
338 */
339export function updateAgentProgress(taskId: string, progress: AgentProgress, setAppState: SetAppState): void {
340 updateTaskState<LocalAgentTaskState>(taskId, setAppState, task => {
341 if (task.status !== 'running') {
342 return task;
343 }
344 const existingSummary = task.progress?.summary;
345 return {
346 ...task,
347 progress: existingSummary ? {
348 ...progress,
349 summary: existingSummary
350 } : progress
351 };
352 });
353}
354
355/**
356 * Update the background summary for an agent task.

Callers

nothing calls this directly

Calls 1

updateTaskStateFunction · 0.50

Tested by

no test coverage detected