From b38e3adc3c11036328251d010b0859c2df47a423 Mon Sep 17 00:00:00 2001 From: Aashish Patil Date: Tue, 12 Dec 2023 15:41:48 -0800 Subject: [PATCH 1/2] Fix background color of system chat bubble --- .../GenerativeAISample/ChatSample/Views/MessageView.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Examples/GenerativeAISample/ChatSample/Views/MessageView.swift b/Examples/GenerativeAISample/ChatSample/Views/MessageView.swift index 038ba81..3db7218 100644 --- a/Examples/GenerativeAISample/ChatSample/Views/MessageView.swift +++ b/Examples/GenerativeAISample/ChatSample/Views/MessageView.swift @@ -46,7 +46,7 @@ struct MessageContentView: View { .markdownTextStyle { FontFamilyVariant(.normal) FontSize(.em(0.85)) - ForegroundColor(.white) + ForegroundColor(message.participant == .system ? .black : .white) } .markdownBlockStyle(\.codeBlock) { configuration in configuration.label @@ -75,8 +75,8 @@ struct MessageView: View { } MessageContentView(message: message) .padding(10) - .background(.blue) - .foregroundColor(.white) + .background(message.participant == .system ? .gray.opacity(0.25) : .blue) + .foregroundColor(message.participant == .system ? .black : .white) .roundedCorner(10, corners: [ .topLeft, From 98feee9ed5d49e0e98bdb33872e6e0141e258b69 Mon Sep 17 00:00:00 2001 From: Aashish Patil Date: Tue, 12 Dec 2023 15:58:46 -0800 Subject: [PATCH 2/2] style fix --- Examples/GenerativeAISample/ChatSample/Views/MessageView.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Examples/GenerativeAISample/ChatSample/Views/MessageView.swift b/Examples/GenerativeAISample/ChatSample/Views/MessageView.swift index 3db7218..a210135 100644 --- a/Examples/GenerativeAISample/ChatSample/Views/MessageView.swift +++ b/Examples/GenerativeAISample/ChatSample/Views/MessageView.swift @@ -75,7 +75,7 @@ struct MessageView: View { } MessageContentView(message: message) .padding(10) - .background(message.participant == .system ? .gray.opacity(0.25) : .blue) + .background(message.participant == .system ? .gray.opacity(0.25) : .blue) .foregroundColor(message.participant == .system ? .black : .white) .roundedCorner(10, corners: [