diff --git a/features/conversation-assistant/macos/Sources/Services/LocalWebServer.swift b/features/conversation-assistant/macos/Sources/Services/LocalWebServer.swift index e50766b62..4c566ccb6 100644 --- a/features/conversation-assistant/macos/Sources/Services/LocalWebServer.swift +++ b/features/conversation-assistant/macos/Sources/Services/LocalWebServer.swift @@ -31,7 +31,17 @@ class LocalWebServer { .appendingPathComponent("Resources/webapp") .path { NSLog("LocalWebServer: Serving static files from \(webappPath)") - server["/"] = shareFilesFromDirectory(webappPath) + + // Serve index.html for root path + let indexPath = webappPath + "/index.html" + server["/"] = { _ in + if let data = FileManager.default.contents(atPath: indexPath) { + return .ok(.data(data, contentType: "text/html")) + } + return .notFound + } + + // Serve other static files server["/:path"] = shareFilesFromDirectory(webappPath) } else { NSLog("LocalWebServer: Warning - webapp directory not found in bundle")