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({
87
87
// Get messages for current thread
88
88
const currentMessages = actions . getCurrentMessages ( ) ;
89
89
90
- // Notify parent component of conversation changes
90
+ // Notify parent component of conversation changes - OPTIMIZED TIMING
91
91
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 ] ) ;
94
98
95
99
// Trigger component load event on mount
96
100
useEffect ( ( ) => {
You can’t perform that action at this time.
0 commit comments