Fix/active session tracking (#176)

* refactor(chat): enhance scroll management

Add bottom detection with epsilon tolerance for precise positioning
Introduce pending anchor restoration for seamless session switching
Include active turn anchor and spacer height in message store
This commit is contained in:
Bohdan Triapitsyn
2026-01-19 02:48:56 +02:00
committed by GitHub
parent 3df362b220
commit 28d9324735
6 changed files with 217 additions and 295 deletions
@@ -44,7 +44,7 @@ const EMPTY_QUEUE: QueuedMessage[] = [];
interface ChatInputProps {
onOpenSettings?: () => void;
scrollToBottom?: (options?: { instant?: boolean; force?: boolean }) => void;
scrollToBottom?: (options?: { instant?: boolean; force?: boolean; clearAnchor?: boolean }) => void;
}
const isPrimaryMode = (mode?: string) => mode === 'primary' || mode === 'all' || mode === undefined || mode === null;