import { useState } from "preact/hooks"; import { Dispatch, StateUpdater } from "preact/hooks"; import { Tr } from "@/translate"; import { calculate_token_length } from "@/chatgpt"; import { ChatStore } from "@/types/chatstore"; const AddToolMsg = (props: { setShowAddToolMsg: Dispatch>; chatStore: ChatStore; setChatStore: (cs: ChatStore) => void; update_total_tokens: () => void; }) => { const { setShowAddToolMsg, chatStore, update_total_tokens, setChatStore } = props; const [newToolCallID, setNewToolCallID] = useState(""); const [newToolContent, setNewToolContent] = useState(""); return (
{ setShowAddToolMsg(false); }} >
{ event.stopPropagation(); }} >

Add Tool Message


setNewToolCallID(event.target.value)} />
); }; export default AddToolMsg;