Browse Source

Merge branch 'main' into prompt-edit

Yifei Zhang 1 year ago
parent
commit
328a903c24
2 changed files with 2 additions and 1 deletions
  1. 1 0
      app/locales/es.ts
  2. 1 1
      app/store/app.ts

+ 1 - 0
app/locales/es.ts

@@ -78,6 +78,7 @@ const es: LocaleType = {
     SendKey: "Tecla de envío",
     Theme: "Tema",
     TightBorder: "Borde ajustado",
+    SendPreviewBubble: "Send preview bubble",
     Prompt: {
       Disable: {
         Title: "Desactivar autocompletado",

+ 1 - 1
app/store/app.ts

@@ -386,7 +386,7 @@ export const useChatStore = create<ChatStore>()(
         const config = get().config;
         const n = session.messages.length;
         const recentMessages = session.messages.slice(
-          n - config.historyMessageCount,
+          Math.max(0, n - config.historyMessageCount),
         );
 
         const memoryPrompt = get().getMemoryPrompt();