diff --git a/vibn-frontend/app/api/mcp/route.ts b/vibn-frontend/app/api/mcp/route.ts index bcb6288a..421535ce 100644 --- a/vibn-frontend/app/api/mcp/route.ts +++ b/vibn-frontend/app/api/mcp/route.ts @@ -4576,16 +4576,11 @@ function normalizeFsPath( normalized = normalized.slice(2); } - // 3. Strip project slug prefix if the model hallucinates it (e.g. getacquired-2-0/src...) + // 3. Strip project slug prefix if the model hallucinates it if (projectSlug && normalized.startsWith(`${projectSlug}/`)) { normalized = normalized.slice(projectSlug.length + 1); } - // Handle any other legacy hardcoded occurrences - if (normalized.startsWith("getacquired-2-0/")) { - normalized = normalized.substring("getacquired-2-0/".length); - } - const projectRoot = FS_ROOT; const abs = `${projectRoot}/${normalized}`.replace(/\/+/g, "/"); const norm = abs.replace(/\/[^/]+\/\.\.(?=\/|$)/g, "").replace(/\/+/g, "/");