clear history

This commit is contained in:
2023-03-16 23:31:53 +08:00
parent 536db13ad1
commit 772e9ac612

View File

@@ -160,6 +160,21 @@ export default (props: {
>
Copy Link
</button>
<button
className="p-2 m-2 rounded bg-rose-600 text-white"
onClick={() => {
if (
!confirm(
`Are you sure to clear all ${props.chatStore.history.length} messages?`
)
)
return;
props.chatStore.history = [];
props.setChatStore({ ...props.chatStore });
}}
>
Clear History
</button>
<button
className="p-2 m-2 rounded bg-cyan-600 text-white"
onClick={() => {