소스 검색

fix: #915 allow send 0 history messages

Yifei Zhang 2 년 전
부모
커밋
072a35b4ee
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      app/store/app.ts

+ 1 - 1
app/store/app.ts

@@ -478,7 +478,7 @@ export const useChatStore = create<ChatStore>()(
           n - config.historyMessageCount,
         );
         const longTermMemoryMessageIndex = session.lastSummarizeIndex;
-        const oldestIndex = Math.min(
+        const oldestIndex = Math.max(
           shortTermMemoryMessageIndex,
           longTermMemoryMessageIndex,
         );