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.
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
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;
|
||||
@@ -12,11 +14,24 @@ type Props = {
|
||||
/**
|
||||
* A worker in the rail, and its sessions while it is the open conversation.
|
||||
*/
|
||||
export default function RailBotEntry({ bot, href, selected, workspace_id }: Props) {
|
||||
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}
|
||||
</>
|
||||
{selected ? (
|
||||
<>
|
||||
<RailBotSessions
|
||||
key={bot.id}
|
||||
bot={bot}
|
||||
workspace_id={workspace_id}
|
||||
/>
|
||||
</>
|
||||
) : null}
|
||||
</RailBotCard>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user