Feature/refine error handle#33
Merged
Merged
Conversation
…r message - Add 'error' role and optional detail field to the Message type. - Render role:'error' via a new ErrorMessage component (HeroUI Accordion, circle-x + text-danger, collapsed by default, no stack trace). - Emit role:'error' with provider error.message + i18n hint on request failure and guard the streaming-placeholder splice so constructor-time throws no longer swallow the user's message. - Filter role:'error' and role:'system' out of AIService before send so error and abort notices never reach the LLM (also fixes latent Anthropic/Google systemPrompt corruption from abort messages). - Add errorHeadline / errorHint keys to en, zh-hans, zh-hant locales. - Add tests for ErrorMessage rendering and AIService message filtering.
System messages were previously filtered alongside errors, dropping legitimate context from the LLM. Keep everything except role:"error".
…fault(true) issue
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.
Pull Request Template
Description
Please describe your changes and the motivation behind them.
Related Issue
Closes # (issue number)
Type of Change
Checklist