MCPcopy
hub / github.com/coder/mux / formatProjectHierarchyLabel

Function formatProjectHierarchyLabel

src/common/utils/subProjects.ts:119–130  ·  view source on GitHub ↗
(
  projectPath: string,
  projects: Map<string, ProjectConfig>
)

Source from the content-addressed store, hash-verified

117}
118
119export function formatProjectHierarchyLabel(
120 projectPath: string,
121 projects: Map<string, ProjectConfig>
122): string {
123 const projectConfig = projects.get(projectPath);
124 const parentProjectPath = projectConfig?.parentProjectPath;
125 const projectName = getProjectDisplayName(projectPath, projectConfig);
126 if (!parentProjectPath) {
127 return projectName;
128 }
129 return `${getProjectDisplayName(parentProjectPath, projects.get(parentProjectPath))} / ${projectName}`;
130}

Callers 6

WorkspaceMenuBarFunction · 0.90
buildCoreSourcesFunction · 0.90
CreationControlsFunction · 0.90
SecretsSectionFunction · 0.90

Calls 2

getProjectDisplayNameFunction · 0.85
getMethod · 0.65

Tested by

no test coverage detected