File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
packages/giselle/src/react/generations Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -66,10 +66,13 @@ export function GenerateContentRunner({
66
66
const reachedStreamEnd = useRef ( false ) ;
67
67
const messageUpdateQueue = useRef < Map < UIMessage [ "id" ] , UIMessage > > ( new Map ( ) ) ;
68
68
const pendingUpdate = useRef < number | null > ( null ) ;
69
+ const prevGenerationId = useRef ( generation . id ) ;
69
70
70
71
// Reset lifecycle refs when generation changes
71
- // biome-ignore lint/correctness/useExhaustiveDependencies: intentionally depend on generation.id only
72
72
useEffect ( ( ) => {
73
+ if ( prevGenerationId . current === generation . id ) {
74
+ return ;
75
+ }
73
76
didPerformingContentGeneration . current = false ;
74
77
didListeningContentGeneration . current = false ;
75
78
reachedStreamEnd . current = false ;
You can’t perform that action at this time.
0 commit comments