MCPcopy Index your code
hub / github.com/getsentry/XcodeBuildMCP / processItem

Function processItem

src/utils/renderers/cli-text-renderer.ts:194–367  ·  view source on GitHub ↗
(item: TextRenderableItem)

Source from the content-addressed store, hash-verified

192 }
193
194 function processItem(item: TextRenderableItem): void {
195 switch (item.type) {
196 case 'header': {
197 diagnosticBaseDir = deriveDiagnosticBaseDir(item);
198 hasDurableRuntimeContent = false;
199 writeSection(formatHeaderEvent(item, { includeDetails: includeHeaderDetails }));
200 lastVisibleEventType = 'header';
201 lastStatusLineLevel = null;
202 break;
203 }
204
205 case 'build-stage': {
206 // Build stages are progress indicators, rendered transiently in
207 // interactive terminals and dropped from non-interactive output
208 // (final snapshots shouldn't preserve transient progress).
209 if (interactive) {
210 pendingTransientRuntimeLine = formatBuildStageEvent(item);
211 sink.updateTransient(formatTransientBuildStageEvent(item));
212 }
213 break;
214 }
215
216 case 'status': {
217 const transient = interactive ? formatTransientStatusLineEvent(item) : null;
218 if (transient) {
219 pendingTransientRuntimeLine = formatStatusLineEvent(item);
220 sink.updateTransient(transient);
221 break;
222 }
223
224 const compact =
225 (lastVisibleEventType === 'status' &&
226 lastStatusLineLevel !== 'warning' &&
227 item.level !== 'warning') ||
228 lastVisibleEventType === 'summary';
229 if (compact) {
230 writeDurable(formatStatusLineEvent(item));
231 } else {
232 writeSection(formatStatusLineEvent(item));
233 }
234 lastVisibleEventType = 'status';
235 lastStatusLineLevel = item.level;
236 break;
237 }
238
239 case 'section': {
240 writeSection(formatSectionEvent(item));
241 lastVisibleEventType = 'section';
242 lastStatusLineLevel = null;
243 break;
244 }
245
246 case 'detail-tree': {
247 writeDurable(formatDetailTreeEvent(item, { filePathRenderStyle }));
248 lastVisibleEventType = 'detail-tree';
249 lastStatusLineLevel = null;
250 break;
251 }

Callers 3

drainParserStateFunction · 0.85
onFragmentFunction · 0.85
finalizeFunction · 0.85

Calls 15

deriveDiagnosticBaseDirFunction · 0.90
formatHeaderEventFunction · 0.90
formatBuildStageEventFunction · 0.90
formatStatusLineEventFunction · 0.90
formatSectionEventFunction · 0.90
formatDetailTreeEventFunction · 0.90
formatTableEventFunction · 0.90
formatFileRefEventFunction · 0.90
formatTestDiscoveryEventFunction · 0.90
formatTestProgressEventFunction · 0.90

Tested by

no test coverage detected