import { useState } from "react"; import { Listbox, ListboxButton, ListboxOption, ListboxOptions, } from "@headlessui/react"; import { ChevronUpDownIcon, CheckIcon, FolderIcon, CpuChipIcon, } from "@heroicons/react/16/solid"; type Choice = { id: string; label: string }; const DEFAULT_PROJECT: Choice = { id: "fabro-web", label: "fabro-web" }; const PROJECTS: Choice[] = [ DEFAULT_PROJECT, { id: "fabro-workflows", label: "fabro-workflows" }, { id: "fabro-cli", label: "fabro-cli" }, ]; const DEFAULT_BRANCH: Choice = { id: "main", label: "main" }; const BRANCHES: Choice[] = [ DEFAULT_BRANCH, { id: "develop", label: "develop" }, { id: "feature/start-page", label: "feature/start-page" }, ]; const DEFAULT_MODEL: Choice = { id: "claude-opus-4-7", label: "Claude Opus 4.7" }; const MODELS: Choice[] = [ DEFAULT_MODEL, { id: "claude-sonnet-4-6", label: "Claude Sonnet 4.6" }, { id: "gpt-5", label: "GPT-5" }, ]; function BranchIcon({ className }: { className?: string }) { return ( ); } type IconComponent = React.ComponentType<{ className?: string }>; function Chip({ options, value, onChange, Icon, }: { options: Choice[]; value: Choice; onChange: (c: Choice) => void; Icon: IconComponent; }) { return (
{value.label} {options.map((opt) => ( {opt.label} ))}
); } export default function ComposerChips() { const [project, setProject] = useState(DEFAULT_PROJECT); const [branch, setBranch] = useState(DEFAULT_BRANCH); const [model, setModel] = useState(DEFAULT_MODEL); return (
); }