The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
refactor(desktop): spell the adopt guard as null-to-real; fix hidden-row comment
kshitijk4poor288ef25d7743
diff --git a/apps/desktop/src/lib/chat-messages/parts.ts b/apps/desktop/src/lib/chat-messages/parts.tsindex a4d6dd88033..07a06ad38c6 100644--- a/apps/desktop/src/lib/chat-messages/parts.ts+++ b/apps/desktop/src/lib/chat-messages/parts.ts@@ -73,7 +73,7 @@ export interface UnspokenTurnSpeech {* live-tail rewrite missed), do **not** fall back to index -1 — that replays* every earlier assistant turn as one speech string. Bound to the current* turn (assistant bubbles after the last user message) instead. Hidden user- * rows count: a widget intent or Bot Chat kickoff is a real turn for the+ * rows count: a widget intent (`display_kind: hidden`) is a real turn for the* agent even though no bubble renders. A slice with no user row (mid-turn* interims only) still collects those assistants.*/diff --git a/apps/desktop/src/lib/spoken-reply.ts b/apps/desktop/src/lib/spoken-reply.tsindex 8bf8f81e2a0..82f614f0ecb 100644--- a/apps/desktop/src/lib/spoken-reply.ts+++ b/apps/desktop/src/lib/spoken-reply.ts@@ -125,7 +125,7 @@ export function adoptSpokenReplySession(const fromKey = sessionKey(fromSessionId)const toKey = sessionKey(toSessionId)- if (fromKey === toKey || fromKey !== NO_SESSION) {+ if (fromKey !== NO_SESSION || toKey === NO_SESSION) {return}@@ -135,6 +135,7 @@ export function adoptSpokenReplySession(return}+ // Dropped even when not adopted below: the anchor belongs to this chat.lastSpokenBySession.delete(fromKey)if (!lastSpokenBySession.has(toKey)) {