Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
fix: keep Call available during active turns
Locksley Lennoxc7e829e39816
diff --git a/docs/verification/assets/call-button-working/after-daylight.png b/docs/verification/assets/call-button-working/after-daylight.pngnew file mode 100644index 0000000000..2a99c2988bBinary files /dev/null and b/docs/verification/assets/call-button-working/after-daylight.png differdiff --git a/docs/verification/assets/call-button-working/after-midnight.png b/docs/verification/assets/call-button-working/after-midnight.pngnew file mode 100644index 0000000000..628665a2d8Binary files /dev/null and b/docs/verification/assets/call-button-working/after-midnight.png differdiff --git a/docs/verification/assets/call-button-working/before-daylight.png b/docs/verification/assets/call-button-working/before-daylight.pngnew file mode 100644index 0000000000..3020550609Binary files /dev/null and b/docs/verification/assets/call-button-working/before-daylight.png differdiff --git a/docs/verification/assets/call-button-working/before-midnight.png b/docs/verification/assets/call-button-working/before-midnight.pngnew file mode 100644index 0000000000..ee4b4ecc13Binary files /dev/null and b/docs/verification/assets/call-button-working/before-midnight.png differdiff --git a/src/components/Composer.simple.test.ts b/src/components/Composer.simple.test.tsindex d3ea543f74..3e4c60b650 100644--- a/src/components/Composer.simple.test.ts+++ b/src/components/Composer.simple.test.ts@@ -196,13 +196,13 @@ describe("the Simple composer in a bot chat", () => {expectBotButton(sendButton(), "yellow");});- it("turns its round button into Stop while the bot works, and keeps a quiet Stop beside Send while you type", () => {+ it("keeps Call beside Stop while the bot works, including while typing", () => {const busy = { ...bot, busy: true };render({ bot: busy });const slot = container.querySelector<HTMLButtonElement>('[data-composer-stop="slot"]')!;expect(slot.getAttribute("aria-label")).toBe("Stop this turn");expectBotButton(slot, "purple");- expect(fixture.call).toBeNull();+ expect(fixture.call).toMatchObject({ bot: { id: "atlas" }, placement: "composer" });click(slot);expect(fixture.dispatch).toHaveBeenCalledWith({ type: "interrupt", botId: "atlas", threadId: "atlas-thread" });@@ -210,6 +210,7 @@ describe("the Simple composer in a bot chat", () => {render({ bot: busy });expect(container.querySelector('[data-composer-stop="beside"]')).not.toBeNull();expect(container.querySelector('[data-composer-stop="slot"]')).toBeNull();+ expect(fixture.call).toMatchObject({ bot: { id: "atlas" }, placement: "composer" });});it("shows the approval level as a chip only while this conversation overrides the bot, in the panel's words", () => {diff --git a/src/components/Composer.tsx b/src/components/Composer.tsxindex cd4c2be2c2..55a8531b7e 100644--- a/src/components/Composer.tsx+++ b/src/components/Composer.tsx@@ -510,9 +510,8 @@ export function Composer({const calling = callTarget !== undefined && (onCall === callTarget || (isLiveCallRunning(media.phase) && media.botId === callTarget));const mayAct = useMayAct(), mayStop = !sharedChat || mayAct(profile?.tasks?.find((task) => task.threadId === threadId)?.askedBy);const stoppable = (busy || Boolean(!group && bot?.waitingForTeammates)) && mayStop;- // Simple mode's round button is the call, Send while there is text, and Stop while the bot works.const stopInSlot = simpleDock && stoppable && !locked && !hasContent && !calling;- const callShown = !simpleDock || (!hasContent && !stopInSlot);+ const callShown = !simpleDock || !hasContent || stoppable || calling;const slot = slotColors(bot?.color, Boolean(group));// A one-to-one bot at work: Enter does the chosen follow-up and Ctrl/⌘ with it the other one. Rooms keep their own queue.const followUpFor = (alternate: boolean) => resolveFollowUp({ running: busy && !group && Boolean(bot), alternate, preferred: followUpDefault, canSteer }) ?? undefined;