Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
Keep ordinary chat rows' tree unchanged: name label as a plain helper
Bugfixer 2101cb9e2795e
diff --git a/src/components/ChatView.tsx b/src/components/ChatView.tsxindex 9ff2d45cc7..c63e070cd8 100644--- a/src/components/ChatView.tsx+++ b/src/components/ChatView.tsx@@ -53,7 +53,7 @@ import { TurnPresence } from "./TurnPresence";import { showToolCallsEnabled } from "@/lib/feature-flags";import { stateForBot } from "@/lib/mascot";import { flatPreview, peerLine, peerPreview, peerRequest } from "@/lib/peer-message"; import { PeerCompactRow, PeerLabel, PeerMessagesContext, PeerOpenedActions } from "./PeerExchange"; import { earlierAnswers } from "@/lib/check-rounds";-import { lastRequests } from "@/lib/automation-note"; import { automationNoteRow } from "./AutomationNoteRow"; import { TeammateNamed } from "./RoomClusterLabel";+import { lastRequests } from "@/lib/automation-note"; import { automationNoteRow } from "./AutomationNoteRow"; import { teammateNamed } from "./RoomClusterLabel";import { showWorkingDots } from "@/lib/turn-tail";import { lastNonReceipt } from "@/lib/receipts";import { useTurnLive } from "@/state/turn-status"; import { isLiveReply, StreamingReplyContext, streamedReply, useHasLiveReply, useLiveRow, useLiveTranscriptLayout } from "@/state/live-reply"; import { useTurnNow } from "./NowCard"; import { useThreadRoutineRun } from "@/state/older-routine-runs";@@ -686,8 +686,8 @@ const MessagesList = memo(function MessagesList({const peer = peerLine(m) ?? peerRequest(m, botId);const user = m.role === "user" && !peer;if (!user && isPureLeakedSystemHarnessMessage(m.text) && !m.attachments?.length) return null;- return (- <TeammateNamed message={m} botId={botId} bots={bots}><Bubble+ return teammateNamed(m, botId, bots, (+ <Bubblemessage={m}emerging={m.id === emergingId}eagerAttachments={m.id === newestMessageId || m.id === newestUserMessageId}@@ -703,8 +703,8 @@ const MessagesList = memo(function MessagesList({onRegenerate={m.id === lastBotTextId && !m.automation && canRetryLast ? onRegenerate : undefined}replyTarget={lookups.replyTarget(m)}onReply={onReply} forked={forked.has(m.id)} earlierRound={earlier.get(m.id)}- /></TeammateNamed>- );+ />+ ));}}})();diff --git a/src/components/RoomClusterLabel.tsx b/src/components/RoomClusterLabel.tsxindex 884396dc49..7472ce7725 100644--- a/src/components/RoomClusterLabel.tsx+++ b/src/components/RoomClusterLabel.tsx@@ -67,8 +67,8 @@ export const ClusterLabel = memo(function ClusterLabel({ bot, name, color, to =);}, sameLabel);-/** A reply another bot wrote in this bot's chat (a teammate the person tagged here) shows that bot's name above it. */-export function TeammateNamed({ message, botId, bots, children }: { message: Message; botId: string; bots: readonly Bot[]; children: ReactNode }) {- const from = message.role === "bot" && message.from?.botId !== botId ? message.from : undefined;- return from ? <><ClusterLabel bot={bots.find((one) => one.id === from.botId)} name={from.name} color={from.color} />{children}</> : children;+/** A reply another bot wrote in this bot's chat (a teammate the person tagged here) gets that bot's name above it; other rows keep their bubble as is. */+export function teammateNamed(message: Message, botId: string, bots: readonly Bot[], bubble: ReactNode): ReactNode {+ const from = message.role === "bot" && message.from && message.from.botId !== botId ? message.from : undefined;+ return from ? <><ClusterLabel bot={bots.find((one) => one.id === from.botId)} name={from.name} color={from.color} />{bubble}</> : bubble;}