fix
Showing
2 changed files
with
3 additions
and
2 deletions
| ... | @@ -43,12 +43,12 @@ function App() { | ... | @@ -43,12 +43,12 @@ function App() { |
| 43 | async function handleSubmit(e){ | 43 | async function handleSubmit(e){ |
| 44 | e.preventDefault(); | 44 | e.preventDefault(); |
| 45 | // console.log(chatInput) | 45 | // console.log(chatInput) |
| 46 | const userInput = ['what', 'why', 'when', 'where' , 'which', 'did', 'do', 'how', 'can', 'are']; | 46 | const userInput = ['what', 'why', 'when', 'where' , 'which', 'did', 'do', 'how', 'can', 'are', 'who', 'hey']; |
| 47 | const userInputRegex = new RegExp(`\\b(${userInput.join('|')})\\b`, 'gi'); | 47 | const userInputRegex = new RegExp(`\\b(${userInput.join('|')})\\b`, 'gi'); |
| 48 | const inputMatches = chatInput.match(userInputRegex); | 48 | const inputMatches = chatInput.match(userInputRegex); |
| 49 | 49 | ||
| 50 | const userPunctuation = ['.', '?', '!', ':', ';', ',']; | 50 | const userPunctuation = ['.', '?', '!', ':', ';', ',']; |
| 51 | const userPunctuationRegex = new RegExp(`[${userPunctuation.join('')}]`, 'gi'); | 51 | const userPunctuationRegex = new RegExp(`${userPunctuation.join('')}$`, 'gi'); |
| 52 | const punctuationMatches = chatInput.match(userPunctuationRegex); | 52 | const punctuationMatches = chatInput.match(userPunctuationRegex); |
| 53 | 53 | ||
| 54 | // console.log(punctuationMatches) | 54 | // console.log(punctuationMatches) | ... | ... |
| ... | @@ -35,6 +35,7 @@ span.info { | ... | @@ -35,6 +35,7 @@ span.info { |
| 35 | color: #101827 !important; | 35 | color: #101827 !important; |
| 36 | font-size: 16px !important; | 36 | font-size: 16px !important; |
| 37 | box-shadow: 0px 7px 6px -6px black !important; | 37 | box-shadow: 0px 7px 6px -6px black !important; |
| 38 | height: 45px; | ||
| 38 | } | 39 | } |
| 39 | 40 | ||
| 40 | .chat-message.chatgpt { | 41 | .chat-message.chatgpt { | ... | ... |
-
Please register or sign in to post a comment