MCPcopy Create free account
hub / github.com/hashintel/hash / logProgress

Function logProgress

apps/hash-ai-worker-ts/src/activities/shared/log-progress.ts:58–82  ·  view source on GitHub ↗
(logs: StepProgressLog[])

Source from the content-addressed store, hash-verified

56export const flushLogs = sendLogSignal.flush;
57
58export const logProgress = (logs: StepProgressLog[]) => {
59 if (logs.length === 0) {
60 return;
61 }
62
63 const { workflowId, runId } = Context.current().info.workflowExecution ?? {};
64
65 if (!workflowId) {
66 throw new Error(
67 "No workflowId associated with the current workflow execution",
68 );
69 }
70
71 if (!runId) {
72 throw new Error("No runId associated with the current workflow execution");
73 }
74
75 const existingLogs = logQueueByRunId.get(runId) ?? [];
76
77 existingLogs.push(...logs);
78
79 logQueueByRunId.set(runId, existingLogs);
80
81 void sendLogSignal({ workflowId, runId });
82};

Callers 14

proposeEntitiesFunction · 0.85
persistEntityFunction · 0.85
getFileFromUrlActionFunction · 0.85
exploreResourceFunction · 0.85
linkFollowerAgentFunction · 0.85
runCoordinatingAgentFunction · 0.85
processToolCallsFunction · 0.85
handleStopReturnFunction · 0.85
getCheckpointFunction · 0.85
handleWebSearchToolCallFunction · 0.85
getToolCallResultsFunction · 0.85

Calls 3

getMethod · 0.65
pushMethod · 0.65
setMethod · 0.45

Tested by

no test coverage detected