"use client"; import { useAppStore } from "@/components/state-provider"; import { selectOfficeAgentProfiles } from "@/lib/state/slices/office/selectors"; import { formatRelativeTime } from "@/lib/utils"; import { AgentAvatar } from "@/app/office/components/agent-avatar"; import type { TaskActivityEntry } from "@/app/office/tasks/[id]/types"; import { useTranslation } from "react-i18next"; type TaskActivityProps = { taskId: string; entries: TaskActivityEntry[]; }; function ActivityRow({ entry }: { entry: TaskActivityEntry }) { const { t } = useTranslation(); const agentName = useAppStore((s) => entry.actorType === "agent" ? (selectOfficeAgentProfiles(s).find((a) => a.id === entry.actorId)?.name ?? t("task:agent")) : "", ); let actorName = t("task:system"); if (entry.actorType === "user") actorName = t("task:you"); else if (entry.actorType === "agent") actorName = agentName; return (
{t("task:noActivityYet")}
; } return (