import Row from "@moduletrace/twui/layout/Row"; import Span from "@moduletrace/twui/layout/Span"; import BotStone from "@/src/components/general/bot-stone"; import type { BotHue } from "@/src/dict/bot-dict"; import { BotReplyJobTitle, BotWaitingStatusLine } from "@/src/dict/bot-queue-dict"; import type { BotWithLastMessage } from "@/src/types"; type Props = { bot: BotWithLastMessage; }; /** * Under the last message while the bot is working on a reply (or waiting * for a model to come back), so a slow reply doesn't look like none. */ export default function BotThinkingRow({ bot }: Props) { const thinking = bot.face == "working" && bot.status_line == BotReplyJobTitle; const waiting = bot.face == "asleep" && bot.status_line == BotWaitingStatusLine; if (!thinking && !waiting) return null; return ( {thinking ? `${bot.name || "The bot"} is thinking…` : `${BotWaitingStatusLine}…`} ); }