'use client'; import { memo, useMemo } from 'react'; import type { TaskState } from '@/lib/types/http'; import { truncateRepoPath } from '@/lib/utils'; import { TaskItem } from './task-item'; type DiffStats = { additions: number; deletions: number; }; type TaskSwitcherItem = { id: string; title: string; state?: TaskState; description?: string; workflowStepId?: string; repositoryPath?: string; diffStats?: DiffStats; updatedAt?: string; isArchived?: boolean; }; type TaskSwitcherProps = { tasks: TaskSwitcherItem[]; steps: Array<{ id: string; title: string; color?: string }>; activeTaskId: string | null; selectedTaskId: string | null; onSelectTask: (taskId: string) => void; onArchiveTask?: (taskId: string) => void; onDeleteTask?: (taskId: string) => void; deletingTaskId?: string | null; isLoading?: boolean; }; function TaskSwitcherSkeleton() { return (