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"; // Compat aliases for old TodoItem shape type TodoItem = Todo & { id?: string }; type TodoStatus = string; type TodoPriority = string; import { useUIStore } from "@/stores/useUIStore"; import { useTodosPersistStore } from "@/stores/useTodosPersistStore"; import { WorkingPlaceholder } from "./message/parts/WorkingPlaceholder"; import { isVSCodeRuntime } from "@/lib/desktop"; import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip"; import { Icon } from "@/components/icon/Icon"; import { useI18n } from "@/lib/i18n"; const STATUS_ROW_CONTAINER_STYLE = { containerType: "inline-size" as const, containerName: "status-row" }; const statusConfig: Record = { 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: Record = { high: "text-[var(--status-warning)]", medium: "text-muted-foreground", low: "text-muted-foreground/70", }; const priorityIcon: Record = { high: