Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

chore: I don't see a diff in your message — the Files, Stat, and Diff sections are all empty. Coul

Steven Enamakel04c106e79255
diff --git a/app/src/store/mascotSlice.ts b/app/src/store/mascotSlice.ts
index eb580c1608..b60b92bb2c 100644
--- a/app/src/store/mascotSlice.ts
+++ b/app/src/store/mascotSlice.ts
@@ -260,6 +260,13 @@ interface MascotState {
* no mic running.
*/
chatMascotListening: boolean;
+ /**
+ * Phase of the live voice-agent session running on the mascot stage:
+ * `off`, `connecting`, `listening` or `speaking`. Drives the overlay's
+ * listening pose and amplitude lip-sync, and silences speak-replies TTS while
+ * the live agent is talking. Transient — never persisted or restored.
+ */
+ chatMascotLiveVoicePhase: ChatMascotLiveVoicePhase;
/**
* Whether the mascot appears on the chat composer at all.
*
@@ -281,6 +288,12 @@ interface MascotState {
voiceMode: VoiceMode;
}
+/** Coarse live voice-agent phase published by the mascot stage. */
+export type ChatMascotLiveVoicePhase = 'off' | 'connecting' | 'listening' | 'speaking';
+
+const isLiveVoicePhase = (value: unknown): value is ChatMascotLiveVoicePhase =>
+ value === 'off' || value === 'connecting' || value === 'listening' || value === 'speaking';
+
/** Voice-chat implementation used by the mascot's voice stage. */
export type VoiceMode = 'classic' | 'realtime';
@@ -301,6 +314,7 @@ const initialState: MascotState = {
chatMascotExpanded: false,
speakReplies: true,
chatMascotListening: false,
+ chatMascotLiveVoicePhase: 'off',
chatMascotDismissed: false,
voiceMode: 'classic',
};
@@ -522,6 +536,12 @@ const mascotSlice = createSlice({
state.chatMascotListening = next;
mascotLog('[mascot][voice] listening=%s', next);
},
+ setChatMascotLiveVoicePhase(state, action: PayloadAction<ChatMascotLiveVoicePhase>) {
+ const next = isLiveVoicePhase(action.payload) ? action.payload : 'off';
+ if (state.chatMascotLiveVoicePhase === next) return;
+ state.chatMascotLiveVoicePhase = next;
+ mascotLog('[mascot][live-voice] phase=%s', next);
+ },
setVoiceMode(state, action: PayloadAction<VoiceMode>) {
if (isVoiceMode(action.payload)) {
state.voiceMode = action.payload;
@@ -632,6 +652,7 @@ const mascotSlice = createSlice({
: initialState.chatMascotDismissed;
// Never restored — see the field docs on `chatMascotListening`.
state.chatMascotListening = false;
+ state.chatMascotLiveVoicePhase = 'off';
const restoredVoiceMode = rehydrateAction.payload?.voiceMode;
state.voiceMode = isVoiceMode(restoredVoiceMode) ? restoredVoiceMode : 'classic';
});
@@ -670,6 +691,10 @@ export const selectChatMascotListening = (state: { mascot: MascotState }): boole
state.mascot.chatMascotListening ?? false;
/** Whether the user has dismissed the mascot from the composer. */
+export const selectChatMascotLiveVoicePhase = (state: {
+ mascot: MascotState;
+}): ChatMascotLiveVoicePhase => state.mascot.chatMascotLiveVoicePhase ?? 'off';
+
export const selectChatMascotDismissed = (state: { mascot: MascotState }): boolean =>
state.mascot.chatMascotDismissed ?? false;