import type { RecordingResponseSchema } from "@/client/types.gen"; import { Label } from "@/components/ui/label"; import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"; interface TextOrAudioInputProps { type: 'text' | 'audio'; onTypeChange: (type: 'text' | 'audio') => void; recordingId: string; onRecordingIdChange: (id: string) => void; recordings?: RecordingResponseSchema[]; /** Rendered when type === 'text' */ children: React.ReactNode; } export function TextOrAudioInput({ type, onTypeChange, recordingId, onRecordingIdChange, recordings = [], children, }: TextOrAudioInputProps) { return ( <> onTypeChange(value as 'text' | 'audio')} className="flex items-center gap-4" >
{type === 'text' ? ( children ) : ( )} ); } interface RecordingSelectProps { value: string; onChange: (id: string) => void; recordings: RecordingResponseSchema[]; } /** * Dropdown to select a pre-recorded audio file. * Re-exported so callers that only need the dropdown (e.g. tool configs with * their own none/custom/audio radio) can use it directly. */ export function RecordingSelect({ value, onChange, recordings }: RecordingSelectProps) { return (
); }