fix(electrobun): replace tick() with requestAnimationFrame in AgentPane
tick() inside $effect triggers effect re-entry: flush_effects → tick → flushSync → flush_effects → infinite loop (effect_update_depth_exceeded). requestAnimationFrame defers DOM scroll to next frame outside the effect.
This commit is contained in:
parent
4a5e4d9733
commit
de59f0e4d0
1 changed files with 2 additions and 1 deletions
|
|
@ -40,7 +40,8 @@
|
||||||
|
|
||||||
$effect(() => {
|
$effect(() => {
|
||||||
void messages.length;
|
void messages.length;
|
||||||
tick().then(() => {
|
// Use requestAnimationFrame instead of tick() to avoid effect re-entry cycle
|
||||||
|
requestAnimationFrame(() => {
|
||||||
if (scrollEl) scrollEl.scrollTop = scrollEl.scrollHeight;
|
if (scrollEl) scrollEl.scrollTop = scrollEl.scrollHeight;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue