"use client"; import { Dialog, DialogContent, DialogTitle } from "@/components/ui/dialog"; import type { PromptToolMode } from "@/lib/video-canvas/prompt-tools"; export function VideoPromptToolDialog({ mode, busy, error, output, source, currentPrompt, model, models, onModelChange, onOutputChange, onRun, onApply, onClose }: { mode: PromptToolMode; busy: boolean; error: string; output: string; source: string; currentPrompt: string; model: string; models: { id: string; label: string }[]; onModelChange: (value: string) => void; onOutputChange: (value: string) => void; onRun: () => void; onApply: () => void; onClose: () => void; }) { const title = mode === "optimize" ? "提示词优化" : "提示词翻译"; return ( { if (!open) onClose(); }}> event.stopPropagation()} className="flex max-h-[90dvh] w-[620px] max-w-full flex-col gap-4 overflow-y-auto rounded-2xl border border-white/10 bg-[#262626] p-5 text-white shadow-2xl">
{title}
查看原提示词

{source}

{error ?

{error}

: null}