Skip to content

fix: add error level handling to ErrorMessage class and constructor#41

Merged
janole merged 5 commits intomainfrom
feature/improve-error-handling
Sep 22, 2025
Merged

fix: add error level handling to ErrorMessage class and constructor#41
janole merged 5 commits intomainfrom
feature/improve-error-handling

Conversation

@janole
Copy link
Owner

@janole janole commented Sep 22, 2025

This pull request introduces a more structured error handling system by adding severity levels to error messages.

✨ New Features

  • Error messages now have a level property, which can be set to "debug", "warn", or "error".
  • Debug-level error messages are now hidden from the UI by default and will only be shown when the application is in debug mode.

⚙️ Under the Hood

  • The ErrorMessage class in src/ai/custom-messages.ts has been updated to include the new level property.
  • The error handling logic in src/ai/work.ts and src/ai/session/session.ts has been updated to use the new structured error messages, setting the level to "error".
  • The ErrorMessageView component in src/ui/messages/error-message-view.tsx now conditionally renders messages based on their level and the application's debug state.

@janole janole self-assigned this Sep 22, 2025
@janole janole marked this pull request as ready for review September 22, 2025 19:02
@janole janole merged commit ede4df3 into main Sep 22, 2025
1 check passed
@janole janole deleted the feature/improve-error-handling branch September 22, 2025 19:03
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