Skip to content

Commit 627d21a

Browse files
committed
fix(mockingbird): handle voice overlay close for all terminal states and response display priority
1 parent ed49a6b commit 627d21a

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

src/mockingbird/ui/stores/VoiceStore.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,15 @@ class VoiceStore {
133133
this.state.aiState = data.state || "idle";
134134
if (data.state === "thinking" || data.state === "executing_tool") {
135135
this._clearCaptureTimeout();
136+
this._clearCloseTimeout();
136137
this._startAITimeout();
137138
}
138-
if (data.state === "idle" && prevState === "speaking") {
139+
if (
140+
data.state === "idle" &&
141+
(prevState === "speaking" ||
142+
prevState === "thinking" ||
143+
prevState === "executing_tool")
144+
) {
139145
this._scheduleClose();
140146
}
141147
});
@@ -144,6 +150,14 @@ class VoiceStore {
144150
this.state.aiResponse = data.text || "";
145151
this._clearAITimeout();
146152
this.micLevelMovingAverage = 0;
153+
if (data.text) {
154+
this.state.showingVoiceConfirmation = false;
155+
this.state.error = null;
156+
this.state.friendlyError = "";
157+
if (this.state.aiState !== "idle") {
158+
this._clearCloseTimeout();
159+
}
160+
}
147161
});
148162

149163
onToolExecuted = action((data) => {

0 commit comments

Comments
 (0)