mirror of
https://github.com/NovaOSS/nova-betterchat.git
synced 2024-11-29 10:53:59 +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 !== '' && (
|
{error !== '' && (
|
||||||
<div className='relative bg-red-600/50 p-2 rounded-sm w-3/5 mt-3 max-md:w-11/12'>
|
<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-900 dark:text-gray-300 text-sm whitespace-pre-line'>
|
<div className='text-gray-600 dark:text-gray-100 text-sm whitespace-pre-line'>
|
||||||
{error}
|
{error}
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
|
|
|
@ -29,9 +29,9 @@ const useSubmit = () => {
|
||||||
|
|
||||||
setChats(updatedChats);
|
setChats(updatedChats);
|
||||||
setGenerating(true);
|
setGenerating(true);
|
||||||
let stream;
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
let stream;
|
||||||
const messages = limitMessageTokens(
|
const messages = limitMessageTokens(
|
||||||
chats[currentChatIndex].messages,
|
chats[currentChatIndex].messages,
|
||||||
4000
|
4000
|
||||||
|
|
Loading…
Reference in a new issue