Skip to content

Commit

Permalink
Merge pull request #50 from Jonghakseo/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
Jonghakseo authored Mar 14, 2023
2 parents e9dae88 + c8f538a commit cf0d8b7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,14 @@ const ChatBox = ({
if (isLastAndResponse) {
return (
<AssistantChat>
<ChatText>{chat.content.trim()}</ChatText>
<ChatText>{chat.content}</ChatText>
</AssistantChat>
);
}
if (chat.role === "error") {
return (
<AssistantChat>
<ChatText isError>{chat.content.trim()}</ChatText>
<ChatText isError>{chat.content}</ChatText>
</AssistantChat>
);
}
Expand All @@ -168,7 +168,7 @@ const ChatBox = ({
return (
<ChatCollapse>
<AssistantChat>
<ChatText>{chat.content.trim()}</ChatText>
<ChatText>{chat.content}</ChatText>
</AssistantChat>
</ChatCollapse>
);
Expand Down
5 changes: 4 additions & 1 deletion src/shared/component/ChatText.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default function ChatText({
bold,
padding = 6,
border = true,
children,
...restProps
}: ChatTextProps) {
return (
Expand All @@ -26,6 +27,8 @@ export default function ChatText({
lineHeight={1.3}
fontWeight={bold ? "bold" : "normal"}
{...restProps}
/>
>
{typeof children === "string" ? children.trim() : children}
</Text>
);
}

0 comments on commit cf0d8b7

Please sign in to comment.