import { useState } from "react"; import { useChatStore } from "@/app/store/chat"; import { List, ListItem, Modal } from "@/app/components/ui-lib"; import Locale from "@/app/locales"; import { IconButton } from "@/app/components/button"; import { ContextPrompts } from "@/app/components/mask"; import CancelIcon from "@/app/icons/cancel.svg"; import ConfirmIcon from "@/app/icons/confirm.svg"; export function EditMessageModal(props: { onClose: () => void }) { const chatStore = useChatStore(); const session = chatStore.currentSession(); const [messages, setMessages] = useState(session.messages.slice()); return (