import { useState, useRef, useEffect } from "react"; import { Listbox, ListboxButton, ListboxOption, ListboxOptions, } from "@headlessui/react"; import { ArrowUpIcon } from "@heroicons/react/24/solid"; import { ChevronUpDownIcon, FolderIcon, } from "@heroicons/react/16/solid"; import { BugAntIcon, CodeBracketIcon, MagnifyingGlassIcon, XMarkIcon, } from "@heroicons/react/24/outline"; import { useSystemInfo } from "../lib/queries"; export const handle = { hideHeader: true, wide: true }; export function meta({}: any) { return [{ title: "Start — Fabro" }]; } const projects = [ { id: "fabro-web", name: "fabro-web" }, { id: "fabro-workflows", name: "fabro-workflows" }, { id: "fabro-cli", name: "fabro-cli" }, ]; const branches = [ { id: "main", name: "main" }, { id: "develop", name: "develop" }, { id: "feature/start-page", name: "feature/start-page" }, ]; function BranchIcon({ className }: { className?: string }) { return ( ); } export default function Start() { const systemInfo = useSystemInfo(); const features = systemInfo.data?.features ?? { session_sandboxes: false, retros: false, }; const [prompt, setPrompt] = useState(""); const [project, setProject] = useState(projects[0]); const [branch, setBranch] = useState(branches[0]); const [openCategory, setOpenCategory] = useState(null); const textareaRef = useRef(null); useEffect(() => { textareaRef.current?.focus(); }, []); function autoResize() { const el = textareaRef.current; if (!el) return; el.style.height = "auto"; el.style.height = Math.min(el.scrollHeight, 280) + "px"; } function handleKeyDown(e: React.KeyboardEvent) { if (e.key === "Enter" && !e.shiftKey) { e.preventDefault(); if (prompt.trim()) handleSubmit(); } } function handleSubmit() { if (!prompt.trim()) return; // TODO: wire up submission } return (

What do you want to build?