import { ChatStore, ChatStoreMessage } from "./app";
import { calculate_token_length } from "./chatgpt";
import { Tr } from "./translate";
interface Props {
chat: ChatStoreMessage;
chatStore: ChatStore;
setChatStore: (cs: ChatStore) => void;
setShowEdit: (se: boolean) => void;
}
export function EditMessageDetail({
chat,
chatStore,
setChatStore,
setShowEdit,
}: Props) {
if (typeof chat.content !== "object") return
error
;
return (
event.stopPropagation()}
>
{chat.content.map((mdt, index) => (
{mdt.type === "text" ? (
) : (
)}
))}
);
}