@@ -146,48 +146,48 @@ export default function Conversation({ uid, client, updateClient }) {
146
146
{
147
147
uid ?
148
148
< >
149
- < div className = "bubbles" ref = { bubblesRef } >
150
- { conversation . map ( ( { role, content} , idx ) => {
151
- return (
152
- < ConversationBubble
153
- key = { `conversation-history-${ uid } -${ idx } ` }
154
- role = { role } content = { content }
155
- />
156
- )
157
- } ) }
158
- < ConversationBubble
159
- role = { 'assistant' } content = { pending_message }
160
- hidden = { hide_pending } special = { true }
161
- />
162
- </ div >
163
- < form className = "send-message-form" onSubmit = { sendMessage } >
164
- < div className = "input-container" >
165
- {
166
- chat_functions . current && chat_functions . current . platform !== 'Wllama' &&
167
- < div className = "button-container file-upload" >
168
- {
169
- upload_file ?
170
- upload_file . type . startsWith ( "image" ) ?
171
- < FileImageFill className = "button-icon highlight" /> : < FileTextFill className = "button-icon highlight" /> :
172
- < Paperclip className = "button-icon" />
173
- }
174
- < input
175
- type = "file" className = "clickable"
176
- title = { upload_file ? `Append file ${ upload_file . name } ` : "Select file to append" }
177
- onChange = { evt => setUploadFile ( evt . target . files . length ? evt . target . files [ 0 ] : null ) } />
178
- </ div >
179
- }
180
- < input type = "text" value = { message } onChange = { messageOnChange } />
181
- < div className = "button-container" >
182
- {
183
- hide_pending ?
184
- < Send className = "button-icon animated" /> :
185
- < StopCircleFill className = "button-icon clickable" onClick = { chat_functions . current . abort } />
149
+ < div className = "bubbles" ref = { bubblesRef } >
150
+ { conversation . map ( ( { role, content} , idx ) => {
151
+ return (
152
+ < ConversationBubble
153
+ key = { `conversation-history-${ uid } -${ idx } ` }
154
+ role = { role } content = { content }
155
+ />
156
+ )
157
+ } ) }
158
+ < ConversationBubble
159
+ role = { 'assistant' } content = { pending_message }
160
+ hidden = { hide_pending } special = { true }
161
+ />
162
+ </ div >
163
+ < form className = "send-message-form" onSubmit = { sendMessage } >
164
+ < div className = "input-container" >
165
+ {
166
+ chat_functions . current && chat_functions . current . platform !== 'Wllama' &&
167
+ < div className = "button-container file-upload" >
168
+ {
169
+ upload_file ?
170
+ upload_file . type . startsWith ( "image" ) ?
171
+ < FileImageFill className = "button-icon highlight" /> : < FileTextFill className = "button-icon highlight" /> :
172
+ < Paperclip className = "button-icon" />
186
173
}
187
- < input type = 'submit' className = { `clickable${ ! hide_pending ?" disabled" :'' } ` } />
174
+ < input
175
+ type = "file" className = "clickable"
176
+ title = { upload_file ? `Append file ${ upload_file . name } ` : "Select file to append" }
177
+ onChange = { evt => setUploadFile ( evt . target . files . length ? evt . target . files [ 0 ] : null ) } />
188
178
</ div >
179
+ }
180
+ < input type = "text" value = { message } onChange = { messageOnChange } />
181
+ < div className = "button-container" >
182
+ {
183
+ hide_pending ?
184
+ < Send className = "button-icon animated" /> :
185
+ < StopCircleFill className = "button-icon clickable" onClick = { chat_functions . current . abort } />
186
+ }
187
+ < input type = 'submit' className = { `clickable${ ! hide_pending ?" disabled" :'' } ` } />
189
188
</ div >
190
- </ form >
189
+ </ div >
190
+ </ form >
191
191
</ > :
192
192
< div className = "no-conversation" > Please select a conversation or start a new one.</ div >
193
193
}
0 commit comments