Thanks to visit codestin.com
Credit goes to github.com

Skip to content

webui: preserve partial content when streaming errors occur #14374

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Aaryan-549
Copy link

Summary

Fixes #13709 - WebUI now preserves partial content when streaming errors occur instead of discarding the entire message.

Changes

  • Enhanced onChunk callback in ChatScreen.tsx to handle streaming errors
  • Added user-friendly toast notifications for different error scenarios
  • Preserves partial response content when connection is interrupted
  • Added try-catch blocks around message sending functions

Behavior

Before: When server is killed during generation (Ctrl+C), the entire message disappears
After: Partial content is preserved with a clear error indicator, similar to ChatGPT

Testing

  • Tested with server interruption during generation
  • Verified partial content is preserved
  • Error messages display correctly
  • No regression in normal operation

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature
  • Breaking change
  • Documentation update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: (webui) do not throw away message if there is error in stream
2 participants