Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
Sidebar: Simple mode keeps a failed step instead of quoting an older bot line (#6105)
Bugfixer 2be5ced2be934
diff --git a/src/components/sidebar-preview.test.ts b/src/components/sidebar-preview.test.tsindex 1950313202..45260c7fc5 100644--- a/src/components/sidebar-preview.test.ts+++ b/src/components/sidebar-preview.test.ts@@ -33,6 +33,8 @@ describe("sidebar previews", () => {it("keeps a failed step's error line and a recovery or notice line as they are", () => {const failed = [message({ role: "user", text: "Tidy my inbox" }), message({ text: "On it." }), message({ kind: "activity", tool: { name: "error: Gmail is not connected", ok: false } } as Partial<Message>)];expect(botPreview(bot, failed, [], false)).toContain("Gmail is not connected");+ const failedTool = [message({ role: "user", text: "Tidy my inbox" }), message({ text: "On it." }), message({ kind: "activity", tool: { name: "Bash", ok: false } } as Partial<Message>)];+ expect(botPreview(bot, failedTool, [], false)).not.toBe("On it.");const notice = [message({ role: "user", text: "Tidy my inbox" }), message({ text: "On it." }), step("notice: Switched to a backup model")];expect(botPreview(bot, notice, [], false)).toBe("Switched to a backup model");});diff --git a/src/components/sidebar-preview.ts b/src/components/sidebar-preview.tsindex 9882463cb9..a3ff0c2c93 100644--- a/src/components/sidebar-preview.ts+++ b/src/components/sidebar-preview.ts@@ -27,7 +27,7 @@ export function botPreview(bot: Bot, visible: Message[], instances: InstanceInfofunction plainStep(message: Message): boolean {const tool = message.kind === "activity" ? message.tool : undefined;- return Boolean(tool) && !message.dataResult && failedTurnCause(tool!.name) === null && !isStoppedTurnName(tool!.name) && !STATUS_MARKER.test(tool!.name);+ return Boolean(tool) && tool!.ok !== false && !message.dataResult && failedTurnCause(tool!.name) === null && !isStoppedTurnName(tool!.name) && !STATUS_MARKER.test(tool!.name);}/** Simple mode quotes the bot: a step that went fine gives way to the newest thing said since the person last wrote. */