diff --git a/vibn-frontend/components/vibn-chat/chat-panel.tsx b/vibn-frontend/components/vibn-chat/chat-panel.tsx index 0024d793..26c46b46 100644 --- a/vibn-frontend/components/vibn-chat/chat-panel.tsx +++ b/vibn-frontend/components/vibn-chat/chat-panel.tsx @@ -1,6 +1,6 @@ "use client"; -import { +import React, { useEffect, useRef, useState, @@ -386,7 +386,11 @@ function ThinkingBubble({ thoughts }: { thoughts: string }) { ); } -function MessageBubble({ msg }: { msg: Message }) { +const MessageBubble = React.memo(function MessageBubble({ + msg, +}: { + msg: Message; +}) { const isUser = msg.role === "user"; const proseWrap: React.CSSProperties = { overflowWrap: "anywhere", @@ -485,7 +489,7 @@ function MessageBubble({ msg }: { msg: Message }) { ); -} +}); /** * Renders the chronological turn timeline: thoughts as their own