Skip to content

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

Comment on lines +138 to +140
background: '#fff3cd',
color: '#856404',
border: '1px solid #ffeaa7',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

custom style is redundant and can cause problem with themes

@allozaur allozaur closed this Sep 27, 2025
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

4 participants