diff --git a/src/lib/components/chat/Overview.svelte b/src/lib/components/chat/Overview.svelte index 0c2a376e8..0dba53ea0 100644 --- a/src/lib/components/chat/Overview.svelte +++ b/src/lib/components/chat/Overview.svelte @@ -38,13 +38,16 @@ $: if (history && history.currentId) { focusNode(); - selectedMessageId = null; } const focusNode = async () => { if (selectedMessageId === null) { await fitView({ nodes: [{ id: history.currentId }] }); + } else { + await fitView({ nodes: [{ id: selectedMessageId }] }); } + + selectedMessageId = null; }; const drawFlow = async () => {