Skip to content

Commit b3c598c

Browse files
committed
Text wrap round for the prompt buttons
1 parent f6f2f68 commit b3c598c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

frontend/src/components/blocks/interview/ai-chat.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ interface AIChatProps {
1919
}
2020

2121
interface StoredChat {
22-
messages: ChatMessageType[];
22+
messages: Array<ChatMessageType>;
2323
questionDetails: string;
2424
}
2525

@@ -35,7 +35,7 @@ export const AIChat: React.FC<AIChatProps> = ({
3535
language = 'python',
3636
questionDetails = '',
3737
}) => {
38-
const [messages, setMessages] = useState<ChatMessageType[]>([]);
38+
const [messages, setMessages] = useState<Array<ChatMessageType>>([]);
3939
const [isLoading, setIsLoading] = useState<boolean>(false);
4040
const [error, setError] = useState<string | null>(null);
4141
const streamingTextRef = useRef<string>('');
@@ -179,7 +179,7 @@ export const AIChat: React.FC<AIChatProps> = ({
179179
title='AI Assistant'
180180
onClearHistory={handleClearHistory}
181181
CustomPlaceHolderElem={({ onSend }) => (
182-
<div className='flex flex-col gap-6 text-center'>
182+
<div className='flex w-full flex-col gap-6 text-center'>
183183
<MessageSquareIcon className='mx-auto size-12 opacity-50' />
184184
<p>No messages yet. Start a conversation, or use one of these prompts:</p>
185185
<div className='flex flex-wrap gap-4'>
@@ -188,7 +188,7 @@ export const AIChat: React.FC<AIChatProps> = ({
188188
key={index}
189189
variant='outline'
190190
size='sm'
191-
className='rounded-xl'
191+
className='max-w-full whitespace-normal break-words rounded-xl '
192192
onClick={() => onSend(value)}
193193
>
194194
<span>{value}</span>

0 commit comments

Comments
 (0)