From 47c72bf010553d62b53ab59c805cb2d6c776675d Mon Sep 17 00:00:00 2001 From: sijinhui Date: Tue, 1 Oct 2024 23:26:06 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A6=81=E7=94=A8=E4=BA=86=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E6=A1=86=E5=B0=B1=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/components/chat.tsx | 4 ++-- app/store/chat.ts | 2 +- app/utils/store.ts | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/components/chat.tsx b/app/components/chat.tsx index c50905d2e..601a184cb 100644 --- a/app/components/chat.tsx +++ b/app/components/chat.tsx @@ -2134,8 +2134,8 @@ function _Chat() { onInput={(e) => onInput(e.currentTarget.value)} value={userInput} onKeyDown={onInputKeyDown} - onFocus={scrollToBottom} - onClick={scrollToBottom} + // onFocus={scrollToBottom} + // onClick={scrollToBottom} onPaste={handlePaste} rows={inputRows} autoFocus={autoFocus} diff --git a/app/store/chat.ts b/app/store/chat.ts index dbc0b3849..366b0c054 100644 --- a/app/store/chat.ts +++ b/app/store/chat.ts @@ -324,7 +324,7 @@ export const useChatStore = createPersistStore( ); }, - currentSession() { + currentSession(): ChatSession { let index = get().currentSessionIndex; const sessions = get().sessions; diff --git a/app/utils/store.ts b/app/utils/store.ts index b3440b318..ff15bee14 100644 --- a/app/utils/store.ts +++ b/app/utils/store.ts @@ -34,7 +34,6 @@ export function createPersistStore( ) => M, persistOptions: SecondParam>>, ) { - // TODO: merge 报错,很离谱,后续再排查 persistOptions.storage = createJSONStorage(() => indexedDBStorage); const oldOonRehydrateStorage = persistOptions?.onRehydrateStorage; persistOptions.onRehydrateStorage = (state) => {