import Button from "@moduletrace/twui/layout/Button"; import Row from "@moduletrace/twui/layout/Row"; import Span from "@moduletrace/twui/layout/Span"; import Stack from "@moduletrace/twui/layout/Stack"; import { twMerge } from "tailwind-merge"; import type { BotSessionListItem } from "@/src/types"; import messagePreview from "@/src/utils/message-preview"; import relativeTime from "@/src/utils/relative-time"; type Props = { session: BotSessionListItem; loading?: boolean; disabled?: boolean; onOpen: () => void; /** * The session the page shows (`?session_id=`, else the active one): * marked Current and greyed out. */ current: boolean; }; /** * One session in the sessions modal: its title, the summary or last * message, how long and how recent. The one on screen is * Current (greyed out); any other opens on click (reopening a closed one, * going back to the active one). */ export default function BotSessionRow({ session, loading, disabled, onOpen, current }: Props) { const preview = session.summary || session.last_message_text || ""; const at = session.last_activity_at || session.created_at; return ( ); }