File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
client/packages/lowcoder/src/comps/comps/chatComp/components Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -87,10 +87,14 @@ export function ChatCoreMain({
8787 // Get messages for current thread
8888 const currentMessages = actions . getCurrentMessages ( ) ;
8989
90- // Notify parent component of conversation changes
90+ // Notify parent component of conversation changes - OPTIMIZED TIMING
9191 useEffect ( ( ) => {
92- onConversationUpdate ?.( currentMessages ) ;
93- } , [ currentMessages ] ) ;
92+ // Only update conversationHistory when we have complete conversations
93+ // Skip empty states and intermediate processing states
94+ if ( currentMessages . length > 0 && ! isRunning ) {
95+ onConversationUpdate ?.( currentMessages ) ;
96+ }
97+ } , [ currentMessages , isRunning ] ) ;
9498
9599 // Trigger component load event on mount
96100 useEffect ( ( ) => {
You can’t perform that action at this time.
0 commit comments