MCPcopy Create free account
hub / github.com/getsentry/XcodeBuildMCP / formatDetailTreeLines

Function formatDetailTreeLines

src/utils/renderers/event-formatting.ts:136–165  ·  view source on GitHub ↗
(
  details: readonly DetailTreeItem[],
  options: DetailTreeFormattingOptions = {},
)

Source from the content-addressed store, hash-verified

134}
135
136function formatDetailTreeLines(
137 details: readonly DetailTreeItem[],
138 options: DetailTreeFormattingOptions = {},
139): string[] {
140 const valueDetails: DetailTreeValueItem[] = [];
141 const pathDetails: DetailTreePathItem[] = [];
142 for (const detail of details) {
143 if (isPathDetailItem(detail)) {
144 pathDetails.push(detail);
145 } else {
146 valueDetails.push(detail);
147 }
148 }
149
150 if (pathDetails.length === 0) {
151 return formatValueDetailTreeLines(valueDetails);
152 }
153
154 const pathLines =
155 options.filePathRenderStyle === 'list'
156 ? formatPathListLines(pathDetails)
157 : formatPathTree(pathDetails, { formatPath: displayPath });
158
159 const lines = valueDetails.map((detail) => ` ├ ${detail.label}: ${detail.value}`);
160 lines.push(' \u2514 Files:');
161 for (const line of pathLines) {
162 lines.push(` ${line}`);
163 }
164 return lines;
165}
166
167// --- Diagnostic path resolution ---
168

Callers 1

formatDetailTreeEventFunction · 0.85

Calls 5

formatPathTreeFunction · 0.90
isPathDetailItemFunction · 0.85
formatPathListLinesFunction · 0.85
pushMethod · 0.80

Tested by

no test coverage detected