diff --git a/src/pages/content/src/ContentScriptApp/components/messageBox/ResponseMessageBox.tsx b/src/pages/content/src/ContentScriptApp/components/messageBox/ResponseMessageBox.tsx
index 15d6450..5575fbe 100644
--- a/src/pages/content/src/ContentScriptApp/components/messageBox/ResponseMessageBox.tsx
+++ b/src/pages/content/src/ContentScriptApp/components/messageBox/ResponseMessageBox.tsx
@@ -152,14 +152,14 @@ const ChatBox = ({
if (isLastAndResponse) {
return (
- {chat.content.trim()}
+ {chat.content}
);
}
if (chat.role === "error") {
return (
- {chat.content.trim()}
+ {chat.content}
);
}
@@ -168,7 +168,7 @@ const ChatBox = ({
return (
- {chat.content.trim()}
+ {chat.content}
);
diff --git a/src/shared/component/ChatText.tsx b/src/shared/component/ChatText.tsx
index 4249278..f689ad8 100644
--- a/src/shared/component/ChatText.tsx
+++ b/src/shared/component/ChatText.tsx
@@ -13,6 +13,7 @@ export default function ChatText({
bold,
padding = 6,
border = true,
+ children,
...restProps
}: ChatTextProps) {
return (
@@ -26,6 +27,8 @@ export default function ChatText({
lineHeight={1.3}
fontWeight={bold ? "bold" : "normal"}
{...restProps}
- />
+ >
+ {typeof children === "string" ? children.trim() : children}
+
);
}