Skip to content

The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.

fix(group): keep a stopped speaker's text after the empty-answer check

purple7e3f9c9c43ef
diff --git a/src/hooks/useChat.ts b/src/hooks/useChat.ts
index 9efec067..c36463ee 100644
--- a/src/hooks/useChat.ts
+++ b/src/hooks/useChat.ts
@@ -384,7 +384,6 @@ async function runGroupTurn(convId: string, model: string, allModels: string[],
}
thinkClock.end()
frames.close()
- keepWhatWasWritten()
if (!abort.signal.aborted && !contentAcc.trim()) {
// Empty turn: say WHY, length-aware, not a flat "didn't return an answer".
// The bubble already labels the speaker, so no model prefix here.
@@ -394,6 +393,8 @@ async function runGroupTurn(convId: string, model: string, allModels: string[],
emptyAnswerExplanation({ finishReason: groupFinish, captured: !!thinkingAcc.trim(), keepThinking }),
)
}
+ // Only a stopped or skipped turn, so never together with the line above.
+ keepWhatWasWritten()
} catch (err) {
frames.close()
keepWhatWasWritten()