release v1.22.0

This commit is contained in:
Bohdan Triapitsyn
2026-08-30 19:24:09 +03:00
parent b97f2d05bb
commit bdda3c36bc
12 changed files with 20 additions and 15 deletions
@@ -748,7 +748,11 @@ export const ChatContainer: React.FC<ChatContainerProps> = ({
// One gate per opened session; the scroll hook holds it until the
// viewport is pinned to the end so the first visible frame is already
// at the bottom.
const revealGate = React.useMemo(() => createTimelineRevealGate(), [currentSessionKey]);
const revealGateRef = React.useRef<{ key: string | null; gate: TimelineRevealGate } | null>(null);
if (revealGateRef.current?.key !== currentSessionKey) {
revealGateRef.current = { key: currentSessionKey, gate: createTimelineRevealGate() };
}
const revealGate = revealGateRef.current.gate;
const chatColumnSession = React.useMemo<ChatColumnSession>(
() => ({ sessionId: currentSessionId ?? null, directory: currentSessionId ? effectiveSessionDirectory ?? null : null }),
[currentSessionId, effectiveSessionDirectory],
@@ -962,7 +962,7 @@ const useMorphdomMarkdown = ({
// or re-decorating ordinary blocks.
refreshMermaidViewers();
}
}, [containerRef, text, streaming, imageMode, ctx, refreshMermaidViewers]);
}, [containerRef, text, streaming, imageMode, ctx, refreshMermaidViewers, revealGate]);
React.useEffect(() => () => {
mermaidViewerRef.current?.cleanup();