File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -69,8 +69,11 @@ function PureMessages({
69
69
export const Messages = memo ( PureMessages , ( prevProps , nextProps ) => {
70
70
if ( prevProps . isArtifactVisible && nextProps . isArtifactVisible ) return true ;
71
71
72
+ const prevIsLoading = ( prevProps . status === 'submitted' || prevProps . status === 'streaming' ) ;
73
+ const nextIsLoading = ( nextProps . status === 'submitted' || nextProps . status === 'streaming' ) ;
74
+
72
75
if ( prevProps . status !== nextProps . status ) return false ;
73
- if ( prevProps . status && nextProps . status ) return false ;
76
+ if ( prevIsLoading && nextIsLoading ) return false ;
74
77
if ( prevProps . messages . length !== nextProps . messages . length ) return false ;
75
78
if ( ! equal ( prevProps . messages , nextProps . messages ) ) return false ;
76
79
if ( ! equal ( prevProps . votes , nextProps . votes ) ) return false ;
You can’t perform that action at this time.
0 commit comments