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

Function createProjectListItems

src/utils/renderers/domain-result-text.ts:972–1009  ·  view source on GitHub ↗
(
  result: Extract<ToolDomainResult, { kind: 'project-list' }>,
)

Source from the content-addressed store, hash-verified

970}
971
972function createProjectListItems(
973 result: Extract<ToolDomainResult, { kind: 'project-list' }>,
974): TextRenderableItem[] {
975 const items: TextRenderableItem[] = [
976 createHeader('Discover Projects', [
977 { label: 'Workspace root', value: displayPath(result.artifacts.workspaceRoot) },
978 { label: 'Scan path', value: displayPath(result.artifacts.scanPath) },
979 { label: 'Max depth', value: String(result.summary.maxDepth) },
980 ]),
981 ];
982
983 if (result.didError) {
984 items.push(...createFailureStatusWithDiagnostics(result, 'Failed to discover projects.'));
985 return items;
986 }
987
988 const projectCount = result.summary.projectCount ?? result.projects.length;
989 const workspaceCount = result.summary.workspaceCount ?? result.workspaces.length;
990 items.push(
991 createStatus(
992 'success',
993 `Found ${pluralize(projectCount, 'project')} and ${pluralize(workspaceCount, 'workspace')}`,
994 ),
995 );
996 items.push(
997 createSection(
998 'Projects:',
999 result.projects.map((project) => displayPath(project.path)),
1000 ),
1001 );
1002 items.push(
1003 createSection(
1004 'Workspaces:',
1005 result.workspaces.map((workspace) => displayPath(workspace.path)),
1006 ),
1007 );
1008 return items;
1009}
1010
1011function createScaffoldResultItems(
1012 result: Extract<ToolDomainResult, { kind: 'scaffold-result' }>,

Callers 1

createSpecialCaseItemsFunction · 0.85

Calls 7

displayPathFunction · 0.90
createHeaderFunction · 0.85
createStatusFunction · 0.85
createSectionFunction · 0.85
pushMethod · 0.80
pluralizeFunction · 0.70

Tested by

no test coverage detected