mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2025-04-30 16:21:38 +00:00
20 lines
630 B
JavaScript
20 lines
630 B
JavaScript
import ChatService from "@/models/chatService";
|
|
|
|
export default function ResetChat({ setChatHistory, settings, sessionId }) {
|
|
const handleChatReset = async () => {
|
|
await ChatService.resetEmbedChatSession(settings, sessionId);
|
|
setChatHistory([]);
|
|
};
|
|
|
|
return (
|
|
<div className="allm-w-full allm-flex allm-justify-center">
|
|
<button
|
|
style={{ color: "#7A7D7E" }}
|
|
className="hover:allm-cursor-pointer allm-border-none allm-text-sm allm-bg-transparent hover:allm-opacity-80 hover:allm-underline"
|
|
onClick={() => handleChatReset()}
|
|
>
|
|
Reset Chat
|
|
</button>
|
|
</div>
|
|
);
|
|
}
|