{{ formatJson(part) }}
+ {{ formatJson(part) }}
+
+
@@ -187,7 +196,8 @@ import ThemeAwareMarkdownCodeBlock from "@/components/shared/ThemeAwareMarkdownC
import { useMediaHandling } from "@/composables/useMediaHandling";
import {
displayParts as displayMessageParts,
- thinkingParts as extractThinkingParts,
+ messageBlocks as buildMessageBlocks,
+ type MessageDisplayBlock,
useMessages,
type ChatRecord,
type MessagePart,
@@ -337,19 +347,25 @@ function buildOutgoingParts(text: string): MessagePart[] {
}
function hasNonReasoningContent(message: ChatRecord) {
- return bubbleParts(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 thinkingPartsForMessage(message: ChatRecord) {
- return extractThinkingParts(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/message_list_comps/IPythonToolBlock.vue b/dashboard/src/components/chat/message_list_comps/IPythonToolBlock.vue
index c9842cdf3..716d8d1b0 100644
--- a/dashboard/src/components/chat/message_list_comps/IPythonToolBlock.vue
+++ b/dashboard/src/components/chat/message_list_comps/IPythonToolBlock.vue
@@ -115,6 +115,8 @@ onMounted(async () => {
.ipython-tool-block {
margin-bottom: 12px;
margin-top: 6px;
+ font-size: inherit;
+ line-height: inherit;
}
.ipython-tool-block.compact {
@@ -133,7 +135,7 @@ onMounted(async () => {
.code-highlighted {
border-radius: 6px;
overflow: hidden;
- font-size: 14px;
+ font-size: 12px;
line-height: 1.5;
overflow-x: auto;
}
@@ -157,7 +159,7 @@ onMounted(async () => {
padding: 12px;
border-radius: 6px;
overflow-x: auto;
- font-size: 13px;
+ font-size: 12px;
line-height: 1.5;
background-color: #f5f5f5;
}
@@ -183,7 +185,7 @@ onMounted(async () => {
padding: 12px;
border-radius: 6px;
overflow-x: auto;
- font-size: 13px;
+ font-size: 12px;
line-height: 1.5;
background-color: #f5f5f5;
max-height: 300px;
diff --git a/dashboard/src/components/chat/message_list_comps/ReasoningBlock.vue b/dashboard/src/components/chat/message_list_comps/ReasoningBlock.vue
index 291c8e392..c79799079 100644
--- a/dashboard/src/components/chat/message_list_comps/ReasoningBlock.vue
+++ b/dashboard/src/components/chat/message_list_comps/ReasoningBlock.vue
@@ -1,59 +1,32 @@