From 960d092a8d12c4e04d3625befe7af7104bc3a06f Mon Sep 17 00:00:00 2001 From: Bhargav Date: Wed, 22 Jul 2026 20:58:29 +0530 Subject: [PATCH] fix: type check fix (#13382) --- web/src/components/O2AIChat.vue | 9 ++++----- web/src/lib/core/ToggleGroup/OToggleGroupItem.vue | 4 +++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/web/src/components/O2AIChat.vue b/web/src/components/O2AIChat.vue index f584b7a779..a01ed703e5 100644 --- a/web/src/components/O2AIChat.vue +++ b/web/src/components/O2AIChat.vue @@ -5153,11 +5153,10 @@ export default defineComponent({ isLoading.value = false; activeToolCall.value = null; stopAnalyzingRotation(); - finalizeTextBlock(); - if (typewriterAnimationId.value) { - cancelAnimationFrame(typewriterAnimationId.value); - typewriterAnimationId.value = null; - } + // The owning instance's processStream already wrote the final text + // into the message blocks, so this instance only clears its own + // typewriter UI. + resetTypewriterState(); // Reflect the completed turn into the sync handshake + history so a // later mount reads the finished chat, not a mid-stream snapshot. store.dispatch("setCurrentChatTimestamp", currentChatId.value); diff --git a/web/src/lib/core/ToggleGroup/OToggleGroupItem.vue b/web/src/lib/core/ToggleGroup/OToggleGroupItem.vue index d15d076938..58ee34f5d2 100644 --- a/web/src/lib/core/ToggleGroup/OToggleGroupItem.vue +++ b/web/src/lib/core/ToggleGroup/OToggleGroupItem.vue @@ -26,7 +26,9 @@ const props = withDefaults(defineProps(), { const slots = defineSlots(); -const context = inject>( +// An item may be used standalone (no OToggleGroup parent), so the context is +// optional and every read below is guarded. +const context = inject | undefined>( TOGGLE_GROUP_CONTEXT_KEY, );