mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2024-11-11 01:10:11 +01:00
Hide regenButton properly
update confirm code for slash commands
This commit is contained in:
parent
275be6a0f3
commit
1e60cd57ff
@ -32,14 +32,13 @@ const Actions = ({
|
||||
<div className="flex w-full justify-between items-center">
|
||||
<div className="flex justify-start items-center gap-x-4">
|
||||
<CopyMessage message={message} />
|
||||
{isLastMessage &&
|
||||
!message?.includes("Workspace chat memory was reset!") && (
|
||||
<RegenerateMessage
|
||||
regenerateMessage={regenerateMessage}
|
||||
slug={slug}
|
||||
chatId={chatId}
|
||||
/>
|
||||
)}
|
||||
{isLastMessage && (
|
||||
<RegenerateMessage
|
||||
regenerateMessage={regenerateMessage}
|
||||
slug={slug}
|
||||
chatId={chatId}
|
||||
/>
|
||||
)}
|
||||
{chatId && (
|
||||
<>
|
||||
<FeedbackButton
|
||||
@ -127,6 +126,7 @@ function CopyMessage({ message }) {
|
||||
}
|
||||
|
||||
function RegenerateMessage({ regenerateMessage, chatId }) {
|
||||
if (!chatId) return null;
|
||||
return (
|
||||
<div className="mt-3 relative">
|
||||
<button
|
||||
|
@ -31,10 +31,7 @@ export default function EditPresetModal({
|
||||
};
|
||||
|
||||
const handleDelete = async () => {
|
||||
const confirmDelete = window.confirm(
|
||||
"Are you sure you want to delete this preset?"
|
||||
);
|
||||
if (!confirmDelete) return;
|
||||
if (!window.confirm("Are you sure you want to delete this preset?")) return;
|
||||
|
||||
setDeleting(true);
|
||||
await onDelete(preset.id);
|
||||
|
Loading…
Reference in New Issue
Block a user