Skip to content

Commit

Permalink
feat: close ChatGPTNextWeb#1382 only clear memory btn in chat config
Browse files Browse the repository at this point in the history
  • Loading branch information
Yidadaa committed May 20, 2023
1 parent 0a0540e commit 8f23c8d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
10 changes: 7 additions & 3 deletions app/components/chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
8 changes: 4 additions & 4 deletions app/locales/cn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ const cn = {
},
Send: "发送",
Config: {
Reset: "重置默认",
SaveAs: "另存为面具",
Reset: "清除记忆",
SaveAs: "存为面具",
},
},
Export: {
Expand All @@ -47,8 +47,8 @@ const cn = {
EmptyContent: "对话内容过短,无需总结",
Send: "自动压缩聊天记录并作为上下文发送",
Copy: "复制摘要",
Reset: "重置对话",
ResetConfirm: "重置后将清空当前对话记录以及历史摘要,确认重置?",
Reset: "[unused]",
ResetConfirm: "确认清空历史摘要?",
},
Home: {
NewChat: "新的聊天",
Expand Down

0 comments on commit 8f23c8d

Please sign in to comment.