import type { ChatCompletionMessageParam } from "openai/resources/index"; import React from "react"; import Paper from "../Paper"; import Stack from "../../layout/Stack"; import AIPromptPreview from "./AIPromptPreview"; import Card from "../Card"; import Row from "../../layout/Row"; import Span from "../../layout/Span"; import { MessageCircleMore } from "lucide-react"; import AIPromptBlockInputSection from "./AIPromptBlockInputSection"; type Props = { model?: string; promptFn: (prompt: string) => void; history?: ChatCompletionMessageParam[]; loading?: boolean; mdRes?: string; setMdRes: React.Dispatch>; placeholder?: string; }; /** * @deprecated Use `elements/ai/AIChat`, which manages the conversation, * streaming, stop and regenerate itself. */ export default function AIPromptBlock({ model, promptFn, history = [], loading = false, mdRes = "", setMdRes, placeholder, }: Props) { const currentPromptRef = React.useRef(""); return ( {currentPromptRef.current && ( {currentPromptRef.current} )} ); }