Merge pull request #1660 from Yidadaa/bugfix-0520

feat: close #1382 only clear memory btn in chat config
This commit is contained in:
Yifei Zhang 2023-05-21 02:06:01 +08:00 committed by GitHub
commit d3461dd69b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 7 deletions

View File

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

View File

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