feat(scroll): implement instant scroll-to-bottom behavior for chat messages (#438)

This commit is contained in:
DigHuang
2026-03-12 17:02:43 +08:00
committed by GitHub
Unverified
parent c0c8701cc3
commit c0a3903377
6 changed files with 143 additions and 25 deletions

View File

@@ -1158,6 +1158,7 @@ export const useChatStore = create<ChatState>((set, get) => ({
// ── Switch session ──
switchSession: (key: string) => {
if (key === get().currentSessionKey) return;
set((s) => buildSessionSwitchPatch(s, key));
get().loadHistory();
},