@@ -55,7 +55,7 @@ struct ChatPanelMessages: View {
5555 }
5656 }
5757 }
58-
58+
5959 var body : some View {
6060 ScrollView {
6161 vstack {
@@ -90,7 +90,7 @@ struct ChatPanelMessages: View {
9090 . xcodeStyleFrame ( )
9191 . rotationEffect ( Angle ( degrees: 180 ) )
9292 }
93-
93+
9494 ForEach ( chat. history. reversed ( ) , id: \. id) { message in
9595 let text = message. text. isEmpty && !message. isUser ? " ... " : message
9696 . text
@@ -112,7 +112,6 @@ struct ChatPanelMessages: View {
112112 )
113113 . xcodeStyleFrame ( )
114114 . rotationEffect ( Angle ( degrees: 180 ) )
115-
116115 }
117116 }
118117 }
@@ -146,7 +145,10 @@ struct ChatPanelInputArea: View {
146145 if #available( macOS 13 . 0 , * ) {
147146 TextField ( " Type a message " , text: $typedMessage, axis: . vertical)
148147 } else {
149- TextField ( " Type a message " , text: $typedMessage)
148+ TextEditor ( text: $typedMessage)
149+ . frame ( height: 42 , alignment: . leading)
150+ . font ( . body)
151+ . background ( Color . clear)
150152 }
151153 }
152154 . focused ( $isInputAreaFocused)
@@ -251,7 +253,7 @@ struct ChatPanel_InputMultilineText_Preview: PreviewProvider {
251253 history: ChatPanel_Preview . history,
252254 isReceivingMessage: false
253255 ) ,
254- typedMessage: " Hello \n World "
256+ typedMessage: " Hello \n World \n Pikachu \n Cat "
255257 )
256258 . padding ( 8 )
257259 . background ( Color . contentBackground)
0 commit comments