Update frontend/src/components/ChatInterface.jsx
Browse files
frontend/src/components/ChatInterface.jsx
CHANGED
|
@@ -18,9 +18,6 @@ saveBotResponse, toLogin }) => {
|
|
| 18 |
};
|
| 19 |
useEffect(scrollToBottom, [messages]);
|
| 20 |
|
| 21 |
-
const isMarkdown = (text) => {
|
| 22 |
-
return /(?:\*\*|__|##|\*|_|`|>|\d+\.\s|\-\s|\[.*\]\(.*\))/.test(text);
|
| 23 |
-
};
|
| 24 |
|
| 25 |
|
| 26 |
const streamResponse = (response) => {
|
|
@@ -121,8 +118,10 @@ const isMarkdown = (text) => {
|
|
| 121 |
if (textareaRef.current) textareaRef.current.style.height = 'auto';
|
| 122 |
};
|
| 123 |
|
| 124 |
-
const isMarkdown = (text) => /[#*_>`-]/.test(text);
|
| 125 |
|
|
|
|
|
|
|
|
|
|
| 126 |
return (
|
| 127 |
<div className="chat-container">
|
| 128 |
{messages.length === 0 ? (
|
|
|
|
| 18 |
};
|
| 19 |
useEffect(scrollToBottom, [messages]);
|
| 20 |
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
|
| 23 |
const streamResponse = (response) => {
|
|
|
|
| 118 |
if (textareaRef.current) textareaRef.current.style.height = 'auto';
|
| 119 |
};
|
| 120 |
|
|
|
|
| 121 |
|
| 122 |
+
const isMarkdown = (text) => {
|
| 123 |
+
return /(?:\*\*|__|##|\*|_|`|>|\d+\.\s|\-\s|\[.*\]\(.*\))/.test(text);
|
| 124 |
+
};
|
| 125 |
return (
|
| 126 |
<div className="chat-container">
|
| 127 |
{messages.length === 0 ? (
|