fix(onboarding): restore bubbles and spacing

This commit is contained in:
Peter Steinberger
2025-12-20 21:56:03 +00:00
parent cd77dc9563
commit 9076d543f3
2 changed files with 15 additions and 3 deletions

View File

@@ -93,7 +93,7 @@ private struct ChatMessageBody: View {
if self.isUser {
fill = ClawdisChatTheme.userBubble
} else if self.style == .onboarding {
fill = ClawdisChatTheme.card
fill = ClawdisChatTheme.onboardingAssistantBubble
} else {
fill = ClawdisChatTheme.assistantBubble
}
@@ -239,12 +239,16 @@ private struct MarkdownTextView: View {
let textColor: Color
var body: some View {
if let attributed = try? AttributedString(markdown: self.text) {
let normalized = self.text.replacingOccurrences(
of: "(?<!\\n)\\n(?!\\n)",
with: " \\n",
options: .regularExpression)
if let attributed = try? AttributedString(markdown: normalized) {
Text(attributed)
.font(.system(size: 14))
.foregroundStyle(self.textColor)
} else {
Text(self.text)
Text(normalized)
.font(.system(size: 14))
.foregroundStyle(self.textColor)
}

View File

@@ -47,6 +47,14 @@ enum ClawdisChatTheme {
#endif
}
static var onboardingAssistantBubble: Color {
#if os(macOS)
Color(nsColor: .controlBackgroundColor).opacity(0.92)
#else
Color(uiColor: .secondarySystemBackground)
#endif
}
static var userText: Color { .white }
static var assistantText: Color {