import type { AgentInputDelivery } from "../api/client"; import type { AgentApprovalMode, AgentModelOption } from "../types"; import { AudioLines, CheckCircle2, ChevronDown, Shield, ShieldCheck, Sparkles, Zap } from "lucide-react"; import { AnimatePresence, motion, useReducedMotion } from "motion/react"; import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuTrigger } from "@/shared/ui/dropdown-menu"; import { Button } from "@/shared/ui/button"; import { cn } from "@/shared/ui/cn"; import type { AgentCommandPanelPresentation } from "./agent-command-panel"; const VOICE_WAVE_BARS = [ { height: 5, duration: 0.72, delay: 0.08 }, { height: 10, duration: 0.58, delay: 0 }, { height: 15, duration: 0.66, delay: 0.12 }, { height: 9, duration: 0.62, delay: 0.04 }, { height: 4, duration: 0.7, delay: 0.16 } ] as const; export function VoiceInputButton({ isListening, disabled, onClick }: { isListening: boolean; disabled: boolean; onClick: () => void; }) { const reduceMotion = useReducedMotion(); const label = isListening ? "停止语音输入" : "语音输入"; return ( {isListening ? ( ); } const AGENT_SELECT_ITEM_CLASS_NAME = "rounded-lg border border-transparent px-2.5 py-2 focus:border-[var(--action-border-hover)] focus:bg-[var(--action-selection-soft-hover)] data-[highlighted]:border-[var(--action-border-hover)] data-[highlighted]:bg-[var(--action-selection-soft-hover)] motion-reduce:transition-none"; function AgentToolbarCaret() { return