mirror of
https://github.com/NovaOSS/nova-betterchat.git
synced 2024-11-25 19:24:00 +01:00
style: error message + move stream to try block
This commit is contained in:
parent
9fedb3f169
commit
ae9499301a
|
@ -68,8 +68,8 @@ const ChatContent = () => {
|
|||
/>
|
||||
|
||||
{error !== '' && (
|
||||
<div className='relative bg-red-600/50 p-2 rounded-sm w-3/5 mt-3 max-md:w-11/12'>
|
||||
<div className='text-gray-900 dark:text-gray-300 text-sm whitespace-pre-line'>
|
||||
<div className='relative py-2 px-3 w-3/5 mt-3 max-md:w-11/12 border rounded-md border-red-500 bg-red-500/10'>
|
||||
<div className='text-gray-600 dark:text-gray-100 text-sm whitespace-pre-line'>
|
||||
{error}
|
||||
</div>
|
||||
<div
|
||||
|
|
|
@ -29,9 +29,9 @@ const useSubmit = () => {
|
|||
|
||||
setChats(updatedChats);
|
||||
setGenerating(true);
|
||||
let stream;
|
||||
|
||||
try {
|
||||
let stream;
|
||||
const messages = limitMessageTokens(
|
||||
chats[currentChatIndex].messages,
|
||||
4000
|
||||
|
|
Loading…
Reference in a new issue