Skip to content

Commit

Permalink
render errors red
Browse files Browse the repository at this point in the history
  • Loading branch information
neindochoh committed Jan 24, 2024
1 parent 470c46e commit 37237ee
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/widgets/LLMWidget/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { Problem } from '../../types';
interface Message {
content: string;
processing?: boolean;
isError?: boolean;
}

const LLMWidget: Widget = () => {
Expand Down Expand Up @@ -66,6 +67,7 @@ const LLMWidget: Widget = () => {
{
content: `${problem.title}\n${problem.detail}`,
processing: false,
isError: true,
},
];
});
Expand Down Expand Up @@ -94,6 +96,7 @@ const LLMWidget: Widget = () => {
{chat.map((message, i) => (
<div
tw="bg-gray-100 px-1 py-0.5 rounded whitespace-pre-wrap"
css={[message.isError && tw`bg-red-100`]}
key={i}
>
{message.content}
Expand Down

0 comments on commit 37237ee

Please sign in to comment.