fix clear history with example

This commit is contained in:
2023-07-20 11:36:07 +08:00
parent 5f4b360b05
commit 1270568a08

View File

@@ -209,9 +209,10 @@ export default (props: {
)
)
return;
props.chatStore.history = [];
props.chatStore.history = props.chatStore.history.filter(
(msg) => msg.example && !msg.hide
);
props.chatStore.postBeginIndex = 0;
props.chatStore.totalTokens = 0;
props.setChatStore({ ...props.chatStore });
}}
>