Files
cobble/src/layouts/bots/(partials)/rail-bot-entry.tsx
T
tben 0aad723a50 Group the rail's open bot with its sessions
The active row and its session previews now share one highlighted card,
with a hairline thread from the bot's icon down to the last session.
2026-10-19 18:33:46 +01:00

38 lines
971 B
TypeScript

import type { BotWithLastMessage } from "@/src/types";
import BotRow from "./bot-row";
import RailBotCard from "./rail-bot-card";
import RailBotSessions from "./rail-bot-sessions";
import Divider from "@moduletrace/twui/layout/Divider";
type Props = {
bot: BotWithLastMessage;
href: string;
selected?: boolean;
workspace_id?: number | null;
};
/**
* A worker in the rail, and its sessions while it is the open conversation.
*/
export default function RailBotEntry({
bot,
href,
selected,
workspace_id,
}: Props) {
return (
<RailBotCard selected={selected}>
<BotRow bot={bot} href={href} selected={selected} />
{selected ? (
<>
<RailBotSessions
key={bot.id}
bot={bot}
workspace_id={workspace_id}
/>
</>
) : null}
</RailBotCard>
);
}