fix(frontend): add missing React import for React.memo in chat-panel
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import {
|
import React, {
|
||||||
useEffect,
|
useEffect,
|
||||||
useRef,
|
useRef,
|
||||||
useState,
|
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 isUser = msg.role === "user";
|
||||||
const proseWrap: React.CSSProperties = {
|
const proseWrap: React.CSSProperties = {
|
||||||
overflowWrap: "anywhere",
|
overflowWrap: "anywhere",
|
||||||
@@ -485,7 +489,7 @@ function MessageBubble({ msg }: { msg: Message }) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Renders the chronological turn timeline: thoughts as their own
|
* Renders the chronological turn timeline: thoughts as their own
|
||||||
|
|||||||
Reference in New Issue
Block a user