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

This commit is contained in:
Yidadaa
2023-05-21 02:04:30 +08:00
parent 35cec0f1df
commit 05b1b8b240
2 changed files with 11 additions and 7 deletions

View File

@@ -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"