The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
fix(chatDeltaCoalescer): handle empty delta in coalescing logic
Steven Enamakelebe3f41e54bd
diff --git a/app/src/services/chatDeltaCoalescer.ts b/app/src/services/chatDeltaCoalescer.tsindex 00ca91b673..25680d69ab 100644--- a/app/src/services/chatDeltaCoalescer.ts+++ b/app/src/services/chatDeltaCoalescer.ts@@ -46,11 +46,15 @@ export const frameScheduler: FlushScheduler = flush => {done = true;flush();};- const raf = typeof requestAnimationFrame === 'function' ? requestAnimationFrame(run) : undefined;+ const frames = typeof window === 'undefined' ? undefined : window;+ const raf =+ typeof frames?.requestAnimationFrame === 'function'+ ? frames.requestAnimationFrame(run)+ : undefined;const timer = setTimeout(run, 50);return () => {done = true;- if (raf !== undefined && typeof cancelAnimationFrame === 'function') cancelAnimationFrame(raf);+ if (raf !== undefined) frames?.cancelAnimationFrame(raf);clearTimeout(timer);};};