You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I’m building an internal service with ai-chatbot,
and first of all—thank you for releasing such a great open-source project. 🙌
I opened this issue because I’m unsure how to let users enter a new message after an error occurs during streaming.
Description
In the multimodal-input component the user can only submit a new message when status is 'ready'.
While a response is streaming, if an error occurs the status is set to 'error'.
At that point pressing Enter no longer triggers a submission, so the user is stuck until the page is refreshed.
I would appreciate guidance on the best-practice way to let the user send another message after an error.
// multimodal-input.tsx<Textareadata-testid="multimodal-input"ref={textareaRef}placeholder="Send a message..."value={input}onChange={handleInput}className={cx('min-h-[24px] max-h-[calc(75dvh)] overflow-hidden resize-none rounded-2xl !text-base bg-muted pb-10 dark:border-zinc-700',className,)}rows={2}autoFocusonKeyDown={(event)=>{if(event.key==='Enter'&&!event.shiftKey&&!event.nativeEvent.isComposing){event.preventDefault();if(status!=='ready'){// this pointtoast.error('Please wait for the model to finish its response!');}else{submitForm();}}}}/>
Approaches I’m considering
Automatically reset status
– After setting status to 'error', dispatch another state update that flips it back to 'ready' after a short delay.
Loosen the keyboard guard
– Change the onKeyDown condition to allow submission when status === 'error':
Uh oh!
There was an error while loading. Please reload this page.
Hello, I’m building an internal service with ai-chatbot,
and first of all—thank you for releasing such a great open-source project. 🙌
I opened this issue because I’m unsure how to let users enter a new message after an error occurs during streaming.
Description
In the multimodal-input component the user can only submit a new message when status is 'ready'.
While a response is streaming, if an error occurs the status is set to 'error'.
At that point pressing Enter no longer triggers a submission, so the user is stuck until the page is refreshed.
I would appreciate guidance on the best-practice way to let the user send another message after an error.
Approaches I’m considering
Automatically reset status
– After setting status to 'error', dispatch another state update that flips it back to 'ready' after a short delay.
Loosen the keyboard guard
– Change the onKeyDown condition to allow submission when status === 'error':
The text was updated successfully, but these errors were encountered: