Browse Source

feat: close #1382 only clear memory btn in chat config

Yidadaa 1 year ago
parent
commit
05b1b8b240
2 changed files with 11 additions and 7 deletions
  1. 7 3
      app/components/chat.tsx
  2. 4 4
      app/locales/cn.ts

+ 7 - 3
app/components/chat.tsx

@@ -121,9 +121,13 @@ export function SessionConfigModel(props: { onClose: () => void }) {
             icon={<ResetIcon />}
             bordered
             text={Locale.Chat.Config.Reset}
-            onClick={() =>
-              confirm(Locale.Memory.ResetConfirm) && chatStore.resetSession()
-            }
+            onClick={() => {
+              if (confirm(Locale.Memory.ResetConfirm)) {
+                chatStore.updateCurrentSession(
+                  (session) => (session.memoryPrompt = ""),
+                );
+              }
+            }}
           />,
           <IconButton
             key="copy"

+ 4 - 4
app/locales/cn.ts

@@ -31,8 +31,8 @@ const cn = {
     },
     Send: "发送",
     Config: {
-      Reset: "重置默认",
-      SaveAs: "存为面具",
+      Reset: "清除记忆",
+      SaveAs: "存为面具",
     },
   },
   Export: {
@@ -47,8 +47,8 @@ const cn = {
     EmptyContent: "对话内容过短,无需总结",
     Send: "自动压缩聊天记录并作为上下文发送",
     Copy: "复制摘要",
-    Reset: "重置对话",
-    ResetConfirm: "重置后将清空当前对话记录以及历史摘要,确认重置?",
+    Reset: "[unused]",
+    ResetConfirm: "确认清空历史摘要?",
   },
   Home: {
     NewChat: "新的聊天",