Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

fix(live): a direct thread snapshot without liveVoice clears the bot's call voice

AdityaUmaled49ae2e0e185
diff --git a/src/state/store.test.ts b/src/state/store.test.ts
index 0226aac70b..19fc4bbd0d 100644
--- a/src/state/store.test.ts
+++ b/src/state/store.test.ts
@@ -213,6 +213,13 @@ describe("independent bot threads", () => {
expect(switched.bots[0]?.liveVoice).toBeUndefined();
});
+ it("a direct thread snapshot without liveVoice clears the bot's own call voice", () => {
+ const voiced = reducer(start(), { type: "botPatched", bot: { ...bot, liveVoice: "marin" } });
+ const switched = reducer(voiced, { type: "taskSwitched", bot: { ...bot, threadId: "second", messages: [] } });
+ expect(switched.bots[0]).toMatchObject({ threadId: "second" });
+ expect(switched.bots[0]?.liveVoice).toBeUndefined();
+ });
+
it("keeps background bot frames from switching the visible transcript or clearing unread", () => {
const patched = reducer(start(), { type: "botPatched", bot: { ...bot, threadId: "second", messages: [], activeLeafId: "other" } });
expect(patched.bots[0]?.threadId).toBe("first");
diff --git a/src/state/store.tsx b/src/state/store.tsx
index adbe67e5b3..a759cc3286 100644
--- a/src/state/store.tsx
+++ b/src/state/store.tsx
@@ -1706,7 +1706,7 @@ export function reducer(state: AppState, action: Action): AppState {
...action.bot,
computer: action.bot.computer,
toolScope: action.bot.toolScope, managedSections: action.bot.managedSections,
- vpsAlias: action.bot.vpsAlias,
+ vpsAlias: action.bot.vpsAlias, liveVoice: action.bot.liveVoice,
messages: action.bot.messages ?? [],
hasMore: action.bot.hasMore,
awaitingThreadSnapshot: false,