{{ formatJson(part) }}
+ {{ formatJson(part) }}
+
+
@@ -186,6 +195,9 @@ import ToolCallItem from "@/components/chat/message_list_comps/ToolCallItem.vue"
import ThemeAwareMarkdownCodeBlock from "@/components/shared/ThemeAwareMarkdownCodeBlock.vue";
import { useMediaHandling } from "@/composables/useMediaHandling";
import {
+ displayParts as displayMessageParts,
+ messageBlocks as buildMessageBlocks,
+ type MessageDisplayBlock,
useMessages,
type ChatRecord,
type MessagePart,
@@ -242,7 +254,6 @@ const {
isMessageStreaming,
isUserMessage,
messageContent,
- messageParts,
createLocalExchange,
sendMessageStream,
stopSession,
@@ -336,11 +347,25 @@ function buildOutgoingParts(text: string): MessagePart[] {
}
function hasNonReasoningContent(message: ChatRecord) {
- return messageParts(message).some((part) => {
- if (part.type === "reply") return false;
- if (part.type === "plain") return Boolean(String(part.text || "").trim());
- return true;
- });
+ return renderBlocks(message).some((block) => block.kind === "content");
+}
+
+function bubbleParts(message: ChatRecord) {
+ return displayMessageParts(messageContent(message));
+}
+
+function renderBlocks(message: ChatRecord): MessageDisplayBlock[] {
+ if (isUserMessage(message)) {
+ const parts = bubbleParts(message);
+ return parts.length ? [{ kind: "content", parts }] : [];
+ }
+ return buildMessageBlocks(messageContent(message));
+}
+
+function hasFollowingContentBlock(message: ChatRecord, blockIndex: number) {
+ return renderBlocks(message)
+ .slice(blockIndex + 1)
+ .some((block) => block.kind === "content");
}
async function stopCurrentSession() {
diff --git a/dashboard/src/components/chat/ThreadPanel.vue b/dashboard/src/components/chat/ThreadPanel.vue
index cd0431309b..bab1fe8d18 100644
--- a/dashboard/src/components/chat/ThreadPanel.vue
+++ b/dashboard/src/components/chat/ThreadPanel.vue
@@ -57,7 +57,20 @@
+
+
diff --git a/dashboard/src/components/chat/message_list_comps/ToolCallItem.vue b/dashboard/src/components/chat/message_list_comps/ToolCallItem.vue
index f3755da8a5..29cfb125bb 100644
--- a/dashboard/src/components/chat/message_list_comps/ToolCallItem.vue
+++ b/dashboard/src/components/chat/message_list_comps/ToolCallItem.vue
@@ -33,7 +33,8 @@ const toggleExpanded = () => {