feat: extend file routes to include explorer API endpoints

This commit is contained in:
catlog22
2026-02-16 13:20:28 +08:00
parent 97ef7e1455
commit d7349f0540

View File

@@ -599,9 +599,10 @@ export async function startServer(options: ServerOptions = {}): Promise<http.Ser
if (await handleSessionRoutes(routeContext)) return; if (await handleSessionRoutes(routeContext)) return;
} }
// Files routes (/api/files, /api/file, /api/file-content, /api/update-claude-md) // Files routes (/api/files, /api/file, /api/file-content, /api/update-claude-md, /api/explorer/*)
if (pathname === '/api/files' || pathname === '/api/file' || if (pathname === '/api/files' || pathname === '/api/file' ||
pathname === '/api/file-content' || pathname === '/api/update-claude-md') { pathname === '/api/file-content' || pathname === '/api/update-claude-md' ||
pathname.startsWith('/api/explorer/')) {
if (await handleFilesRoutes(routeContext)) return; if (await handleFilesRoutes(routeContext)) return;
} }