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

Function stopWorkflowAgent

src/tasks/LocalWorkflowTask/LocalWorkflowTask.tsx:379–392  ·  view source on GitHub ↗
(
  taskId: string,
  agentId: string,
  setAppState: SetAppState,
  summary?: string,
)

Source from the content-addressed store, hash-verified

377}
378
379export function stopWorkflowAgent(
380 taskId: string,
381 agentId: string,
382 setAppState: SetAppState,
383 summary?: string,
384): void {
385 updateWorkflowAgent(taskId, agentId, setAppState, agent => ({
386 ...agent,
387 status: agent.status === 'completed' ? agent.status : 'killed',
388 endTime: agent.endTime ?? Date.now(),
389 summary: summary ?? agent.summary,
390 }))
391 setWorkflowAgentController(taskId, agentId, undefined, setAppState)
392}
393
394export function finalizeWorkflowTask(
395 taskId: string,

Callers 2

runWorkflowAgentTaskFunction · 0.85
skipWorkflowAgentFunction · 0.85

Calls 2

updateWorkflowAgentFunction · 0.85

Tested by

no test coverage detected