-
Notifications
You must be signed in to change notification settings - Fork 8
feat: follow-up changes from the nuxt version #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| :is-streaming="part.state !== 'done'" | ||
| /> | ||
| <MarkdownRender | ||
| v-else-if="part.type === 'text'" |
There was a problem hiding this comment.
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
No description provided.