anything-llm/embed/src/components/ResetChat/index.jsx
Timothy Carambat 245d1b878e
Patch Embed styles with prefixing ()
* Patch Embed styles with prefixing

* forgot files
2024-07-01 16:32:23 -07:00

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>
);
}