From 14d3a624d8d64f95eeef03c7d6b1f1a62cc15e04 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Tue, 9 Dec 2025 23:40:26 +0000 Subject: [PATCH] fix(webchat): load root path --- apps/macos/Sources/Clawdis/WebChatWindow.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/macos/Sources/Clawdis/WebChatWindow.swift b/apps/macos/Sources/Clawdis/WebChatWindow.swift index 94cda8df3..b6118d6d5 100644 --- a/apps/macos/Sources/Clawdis/WebChatWindow.swift +++ b/apps/macos/Sources/Clawdis/WebChatWindow.swift @@ -172,7 +172,10 @@ final class WebChatWindowController: NSWindowController, WKNavigationDelegate, N } private func loadWebChat(baseEndpoint: URL) { - var comps = URLComponents(url: baseEndpoint.appendingPathComponent("webchat/"), resolvingAgainstBaseURL: false) + var comps = URLComponents(url: baseEndpoint, resolvingAgainstBaseURL: false) + if comps?.path.isEmpty ?? true { + comps?.path = "/" + } var items = [URLQueryItem(name: "session", value: self.sessionKey)] if let hostName = Host.current().localizedName ?? Host.current().name { items.append(URLQueryItem(name: "host", value: hostName))