mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-08-04 14:57:42 +00:00
🧹 chore: Alias the Retry-Frame Set for the Effect Cleanup Lint Rule
This commit is contained in:
parent
851ae9b32a
commit
b28d8b127f
1 changed files with 6 additions and 2 deletions
|
|
@ -1882,6 +1882,10 @@ export default function useResumableSSE(
|
|||
|
||||
initStream();
|
||||
|
||||
/** The Set object itself is never reassigned, so this alias reads the
|
||||
* LIVE frame ids at cleanup time (satisfies react-hooks/exhaustive-deps
|
||||
* without changing behavior). */
|
||||
const activityLabelRetryFrames = activityLabelRetryFramesRef.current;
|
||||
return () => {
|
||||
logger.log('ResumableSSE', 'Cleanup - closing SSE, resetting UI state');
|
||||
startController.abort();
|
||||
|
|
@ -1896,10 +1900,10 @@ export default function useResumableSSE(
|
|||
cancelAnimationFrame(pendingActionRetryRef.current);
|
||||
pendingActionRetryRef.current = null;
|
||||
}
|
||||
for (const frameId of activityLabelRetryFramesRef.current) {
|
||||
for (const frameId of activityLabelRetryFrames) {
|
||||
cancelAnimationFrame(frameId);
|
||||
}
|
||||
activityLabelRetryFramesRef.current.clear();
|
||||
activityLabelRetryFrames.clear();
|
||||
if (steerRetryRef.current != null) {
|
||||
cancelAnimationFrame(steerRetryRef.current);
|
||||
steerRetryRef.current = null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue