import React from "react"; import { useSessionUIStore } from '@/sync/session-ui-store'; import { cn } from "@/lib/utils"; import { useDirectorySync } from "@/sync/sync-context"; import type { Todo } from "@opencode-ai/sdk/v2/client"; import { useUIStore } from "@/stores/useUIStore"; import { useTodosPersistStore } from "@/stores/useTodosPersistStore"; import { isVSCodeRuntime } from "@/lib/desktop"; import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip"; import { Icon } from "@/components/icon/Icon"; import { useI18n } from "@/lib/i18n"; // The bar that sits in the composer stack: pending-changes accessory, abort // status, and the todos dropdown. Deliberately a separate component from // StatusRow — that one is the floating assistant-status chip above the // composer, and sharing markup meant every restyle of the chip (glass, // placement) silently restyled this bar and its dropdown too. type TodoItem = Todo & { id?: string }; const COMPOSER_STATUS_BAR_CONTAINER_STYLE = { containerType: "inline-size" as const, containerName: "composer-status-bar" }; const statusConfig = { in_progress: { textClassName: "text-foreground" }, pending: { textClassName: "text-foreground" }, completed: { textClassName: "text-muted-foreground line-through" }, cancelled: { textClassName: "text-muted-foreground line-through" }, }; const priorityClassName = { high: "text-[var(--status-warning)]", medium: "text-muted-foreground", low: "text-muted-foreground/70", }; const priorityIcon = { high: