From f3db02018fe000fb328b7837c3e9c65e84e2b41e Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sun, 14 Dec 2025 05:17:33 +0000 Subject: [PATCH] fix(chat-ui): reflect gateway connection --- .../ClawdisKit/Sources/ClawdisChatUI/ChatViewModel.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/shared/ClawdisKit/Sources/ClawdisChatUI/ChatViewModel.swift b/apps/shared/ClawdisKit/Sources/ClawdisChatUI/ChatViewModel.swift index b536b5223..b930793f4 100644 --- a/apps/shared/ClawdisKit/Sources/ClawdisChatUI/ChatViewModel.swift +++ b/apps/shared/ClawdisKit/Sources/ClawdisChatUI/ChatViewModel.swift @@ -22,7 +22,7 @@ public final class ClawdisChatViewModel { public private(set) var isSending = false public var errorText: String? public var attachments: [ClawdisPendingAttachment] = [] - public private(set) var healthOK: Bool = true + public private(set) var healthOK: Bool = false public private(set) var pendingRunCount: Int = 0 public let sessionKey: String @@ -89,6 +89,8 @@ public final class ClawdisChatViewModel { private func bootstrap() async { self.isLoading = true + self.errorText = nil + self.healthOK = false defer { self.isLoading = false } do { do { @@ -103,6 +105,7 @@ public final class ClawdisChatViewModel { self.thinkingLevel = level } await self.pollHealthIfNeeded(force: true) + self.errorText = nil } catch { self.errorText = error.localizedDescription chatUILogger.error("bootstrap failed \(error.localizedDescription, privacy: .public)")