Refactor error handling and display stream errors in thread UI - #263
Merged
i-subham23 merged 7 commits intoMar 12, 2026
Merged
Conversation
- Detect and surface error objects in OpenAI stream adapters by yielding RUN_ERROR events instead of silently ignoring them - Propagate RUN_ERROR as thrown exceptions in processStreamedMessage so they reach the chat store's error handling - Add empty-response detection in createChatStore to catch cases where streaming completes without producing any messages - Introduce ThreadError component with Callout to display threadError in the Shell thread UI - Clean up SCSS formatting in cssUtils.scss (collapse multi-line var declarations) Made-with: Cursor
|
@i-subham23 is attempting to deploy a commit to the thesys-devs Team on Vercel. A member of the Team first needs to authorize it. |
…dling-and-formatting
- Remove redundant error checks in openAIAdapter and openAIReadableStreamAdapter. - Directly parse JSON data and access choices, improving code clarity and maintainability.
…dling-and-formatting
abhithesys
approved these changes
Mar 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
openai-completionsandopenai-readable-stream) to detecterrorobjects in streamed JSON responses and yieldRUN_ERRORevents instead of silently ignoring them.processStreamedMessageto throw onRUN_ERRORevents (instead of just console-logging), so errors properly propagate to the chat store's error handling.createChatStorethat detects when streaming completes without producing any new messages and throws a user-friendly error.ThreadErrorcomponent in the Shell thread that uses theCalloutcomponent to displaythreadErrorto users when something goes wrong.var()declarations incssUtils.scssinto single lines for consistency.Test plan