We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 745fbbe commit 880304cCopy full SHA for 880304c
packages/giselle/src/react/generations/generate-content-runner.tsx
@@ -67,6 +67,14 @@ export function GenerateContentRunner({
67
const messageUpdateQueue = useRef<Map<UIMessage["id"], UIMessage>>(new Map());
68
const pendingUpdate = useRef<number | null>(null);
69
70
+ // Reset lifecycle refs when generation changes
71
+ // biome-ignore lint/correctness/useExhaustiveDependencies: intentionally depend on generation.id only
72
+ useEffect(() => {
73
+ didPerformingContentGeneration.current = false;
74
+ didListeningContentGeneration.current = false;
75
+ reachedStreamEnd.current = false;
76
+ }, [generation.id]);
77
+
78
const flushMessageUpdates = useCallback(() => {
79
if (messageUpdateQueue.current.size === 0) return;
80
0 commit comments