diff --git a/src/message.tsx b/src/message.tsx index 67fdbfc..8c99740 100644 --- a/src/message.tsx +++ b/src/message.tsx @@ -1,3 +1,4 @@ +import { useState } from "preact/hooks"; import { ChatStore } from "./app"; import { calculate_token_length } from "./chatgpt"; @@ -9,6 +10,7 @@ interface Props { export default function Message(props: Props) { const { chatStore, messageIndex, setChatStore } = props; const chat = chatStore.history[messageIndex]; + const [showEdit, setShowEdit] = useState(false); const DeleteIcon = () => ( + + {showEdit && ( +