Skip to content

Conversation

@HugoRCD
Copy link
Member

@HugoRCD HugoRCD commented Oct 29, 2025

No description provided.

@benjamincanac benjamincanac changed the title follow-up changes from the nuxt version feat: follow-up changes from the nuxt version Oct 31, 2025
:is-streaming="part.state !== 'done'"
/>
<MarkdownRender
v-else-if="part.type === 'text'"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The MarkdownRender component is being rendered inside the message.parts loop with the entire message text instead of the individual part's text, which is inconsistent with how other part types are handled and will cause the message text to be rendered multiple times if there are multiple text parts in the message.

View Details
📝 Patch Details
diff --git a/src/pages/chat/[id].vue b/src/pages/chat/[id].vue
index 1aeb109..7c0830c 100644
--- a/src/pages/chat/[id].vue
+++ b/src/pages/chat/[id].vue
@@ -116,7 +116,7 @@ onMounted(() => {
               />
               <MarkdownRender
                 v-else-if="part.type === 'text'"
-                :content="getTextFromMessage(message)"
+                :content="part.text"
               />
               <ToolWeather
                 v-else-if="part.type === 'tool-weather'"

Analysis

MarkdownRender component renders combined text content multiple times for messages with multiple text parts

What fails: In src/pages/chat/[id].vue line 119, MarkdownRender receives :content="getTextFromMessage(message)" inside the message.parts loop, causing duplicate rendering when messages have multiple text parts.

How to reproduce:

// Test case - message with 2 text parts
const message = {
  parts: [
    { type: "text", text: "First part" },
    { type: "text", text: "Second part" }  
  ]
};
// getTextFromMessage(message) returns "FirstpartSecondpart" 
// This combined text renders TWICE (once per text part in the loop)

Result: Combined text content "FirstpartSecondpart" renders twice instead of each part rendering individually

Expected: Each text part should render its own content once, consistent with reasoning parts that use :text="part.text"

Fix: Change :content="getTextFromMessage(message)" to :content="part.text" to match the pattern used by other part types

@benjamincanac benjamincanac merged commit 6f9ef3f into main Oct 31, 2025
3 checks passed
@benjamincanac benjamincanac deleted the feat/add-tools-and-reasoning branch October 31, 2025 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants