import React from "react" import type { HistoryItem } from "@roo-code/types" import { formatTimeAgo } from "@/utils/format" import { CopyButton } from "./CopyButton" import { ExportButton } from "./ExportButton" import { DeleteButton } from "./DeleteButton" import { StandardTooltip } from "../ui/standard-tooltip" import { useAppTranslation } from "@/i18n/TranslationContext" import { Split } from "lucide-react" export interface TaskItemFooterProps { item: HistoryItem variant: "compact" | "full" isSelectionMode?: boolean isSubtask?: boolean onDelete?: (taskId: string) => void } const TaskItemFooter: React.FC = ({ item, variant, isSelectionMode = false, isSubtask = false, onDelete, }) => { const { t } = useAppTranslation() return (
{/* Subtask tag */} {isSubtask && ( <> {t("history:subtaskTag")} · )} {/* Datetime with time-ago format */} {formatTimeAgo(item.ts)} {/* Cost */} {!!item.totalCost && ( <> · {"$" + item.totalCost.toFixed(2)} )}
{/* Action Buttons for non-compact view */} {!isSelectionMode && (
{variant === "full" && } {onDelete && }
)}
) } export default TaskItemFooter