File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
client/packages/lowcoder/src/comps/comps/chatComp/components Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -146,13 +146,14 @@ export function ChatCoreMain({
146
146
attachments : completeAttachments ,
147
147
} ;
148
148
149
- onMessageUpdate ?.( text ) ;
150
149
await actions . addMessage ( state . currentThreadId , userMessage ) ;
151
150
setIsRunning ( true ) ;
152
151
153
152
try {
154
153
const response = await messageHandler . sendMessage ( userMessage ) ; // Send full message object with attachments
155
154
155
+ onMessageUpdate ?.( userMessage . text ) ;
156
+
156
157
const assistantMessage : ChatMessage = {
157
158
id : generateId ( ) ,
158
159
role : "assistant" ,
@@ -214,16 +215,15 @@ export function ChatCoreMain({
214
215
215
216
newMessages . push ( editedMessage ) ;
216
217
217
- // Expose message update to parent
218
- onMessageUpdate ?.( editedMessage . text ) ;
219
-
220
218
// Update state with edited context
221
219
await actions . updateMessages ( state . currentThreadId , newMessages ) ;
222
220
setIsRunning ( true ) ;
223
221
224
222
try {
225
223
const response = await messageHandler . sendMessage ( editedMessage ) ; // Send full message object with attachments
226
224
225
+ onMessageUpdate ?.( editedMessage . text ) ;
226
+
227
227
const assistantMessage : ChatMessage = {
228
228
id : generateId ( ) ,
229
229
role : "assistant" ,
You can’t perform that action at this time.
0 commit comments