diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 424cbed..8d81125 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -355,6 +355,23 @@ function getGraphArchImage(graphId: string): string | null { return null; } +function sanitizeConfigPath(path: string): string { + if (!path.trim()) { + return path; + } + const normalized = path.replace(/\\/g, "/"); + const marker = "/configs/"; + const markerIndex = normalized.lastIndexOf(marker); + if (markerIndex >= 0) { + return normalized.slice(markerIndex + 1); + } + const parts = normalized.split("/").filter(Boolean); + if (parts.length >= 2) { + return parts.slice(-2).join("/"); + } + return normalized; +} + function toEditable( config: GraphConfigReadResponse, draft: boolean @@ -1110,7 +1127,7 @@ export default function App() {

{mcpConfigPath ? (

- File: {mcpConfigPath} + File: {sanitizeConfigPath(mcpConfigPath)}

) : null}