Update frontend/src/components/ChatInterface.jsx
Browse files
frontend/src/components/ChatInterface.jsx
CHANGED
@@ -173,17 +173,17 @@ const isMarkdown = (text) => {
|
|
173 |
<h2 className="chat-title">Medic.ial</h2>
|
174 |
</div>
|
175 |
<div className="messages-container">
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
</div>
|
184 |
</div>
|
185 |
-
|
186 |
-
|
|
|
187 |
{isStreaming && (
|
188 |
<div className="message bot">
|
189 |
<div className="message-content streaming-message">
|
|
|
173 |
<h2 className="chat-title">Medic.ial</h2>
|
174 |
</div>
|
175 |
<div className="messages-container">
|
176 |
+
{messages.map((msg, index) => {
|
177 |
+
if (msg.sender === 'bot-streaming') return null;
|
178 |
+
|
179 |
+
return (
|
180 |
+
<div key={index} className={`message ${msg.sender}`}>
|
181 |
+
<div className="message-content">
|
182 |
+
<ReactMarkdown>{msg.text}</ReactMarkdown>
|
|
|
183 |
</div>
|
184 |
+
</div>
|
185 |
+
);
|
186 |
+
})}
|
187 |
{isStreaming && (
|
188 |
<div className="message bot">
|
189 |
<div className="message-content streaming-message">
|