import { CircleAlert, GitFork, LoaderCircle, Plus } from "lucide-react"; import { useState } from "react"; import { ConversationPanel } from "@/components/work-os/conversation-panel"; import { EmptyState } from "@/components/work-os/empty-state"; import { SignalsPanel } from "@/components/work-os/signals-panel"; import { WorkOsComposer } from "@/components/work-os/work-os-composer"; import { WorkOsHeader } from "@/components/work-os/work-os-header"; import { WorkUnitCard } from "@/components/work-os/work-unit-card"; import { WorkUnitDetail } from "@/components/work-os/work-unit-detail"; import { useWorkOs } from "@/hooks/work-os/use-work-os"; import type { WorkOsState } from "@/hooks/work-os/use-work-os"; type CardData = WorkOsState["workUnitCards"][number]; type IssueId = WorkOsState["selectedIssueId"]; interface ProjectOption { readonly host?: string; readonly id: string; readonly name: string; } const toProjectOption = (project: { readonly id: string; readonly name: string; readonly sources: readonly { readonly host?: string }[]; }): ProjectOption => ({ host: project.sources[0]?.host, id: project.id, name: project.name, }); const LoadingLine = ({ label }: { readonly label: string }) => (
{label}
); const isAgentBusy = (status: string): boolean => status === "connecting" || status === "submitted" || status === "streaming"; const CONVERSATION_COPY = { projectHint: "Describe what you want Zopu to work on. Work Units created from the conversation will appear in the right panel.", projectTitle: "Project conversation", workUnitHint: "Send a message to continue this Work Unit. The project manager agent will pick up the existing context.", workUnitTitle: "Work Unit conversation", } as const; interface IssueComposerProps { readonly body: string; readonly busy: boolean; readonly onBodyChange: (value: string) => void; readonly onSubmit: () => void; readonly onTitleChange: (value: string) => void; readonly title: string; } const IssueComposer = ({ body, busy, onBodyChange, onSubmit, onTitleChange, title, }: IssueComposerProps) => (
{ event.preventDefault(); onSubmit(); }} >

Create a Work Unit

onTitleChange(event.target.value)} placeholder="Outcome title" required value={title} />