Skip to content

Feature/refine error handle#33

Merged
Louis-7 merged 6 commits into
mainfrom
feature/refine-error-handle
Jul 23, 2026
Merged

Feature/refine error handle#33
Louis-7 merged 6 commits into
mainfrom
feature/refine-error-handle

Conversation

@Louis-7

@Louis-7 Louis-7 commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Pull Request Template

Description

Please describe your changes and the motivation behind them.

Related Issue

Closes # (issue number)

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Refactor
  • Other

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Louis-7 added 6 commits July 7, 2026 10:55
…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".
@Louis-7
Louis-7 merged commit 173226b into main Jul 23, 2026
4 of 5 checks passed
@Louis-7
Louis-7 deleted the feature/refine-error-handle branch July 23, 2026 03:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant