MCPcopy Create free account
hub / github.com/ShipSecAI/studio / emitProgress

Function emitProgress

packages/component-sdk/src/context.ts:118–136  ·  view source on GitHub ↗
(progress: ProgressEventInput | string)

Source from the content-addressed store, hash-verified

116
117
118 const emitProgress = (progress: ProgressEventInput | string) => {
119 const normalized: ProgressEventInput =
120 typeof progress === 'string' ? { message: progress, level: 'info' } : progress;
121 const level = normalized.level ?? 'info';
122 const message = normalized.message;
123
124 console.log(`[${componentRef}] progress [${level}]: ${message}`);
125 if (scopedTrace) {
126 scopedTrace.record({
127 type: 'NODE_PROGRESS',
128 runId,
129 nodeRef: componentRef,
130 timestamp: new Date().toISOString(),
131 level,
132 message,
133 data: normalized.data,
134 });
135 }
136 };
137
138 const context: ExecutionContext = {
139 runId,

Callers

nothing calls this directly

Calls 1

recordMethod · 0.65

Tested by

no test coverage detected