Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(llc): add AI events #2057

Merged
merged 5 commits into from
Dec 4, 2024
Merged

feat(llc): add AI events #2057

merged 5 commits into from
Dec 4, 2024

Conversation

xsahil03x
Copy link
Member

@xsahil03x xsahil03x commented Dec 4, 2024

This pull request includes several changes to enhance the functionality and error handling of the stream_chat package. The most important changes include adding support for AI assistant states and events, improving error handling with stack traces, and updating various methods and classes to accommodate these new features.

AI Assistant Integration:

  • Added support for AI assistant states and events in CHANGELOG.md.
  • Introduced new AI-related fields (aiState, aiMessage, messageId) to the Event class and updated the serialization methods accordingly. [1] [2] [3] [4] [5]
  • Added new AI-related event types (aiIndicatorUpdate, aiIndicatorStop, aiIndicatorClear) to EventType.

Error Handling Improvements:

  • Enhanced StreamChatNetworkError to include an optional stack trace, improving error diagnostics. [1] [2] [3] [4] [5]
  • Updated AuthInterceptor and StreamChatDioError to capture and pass stack traces. [1] [2]

Method and Class Updates:

  • Added stopAIResponse method to the Channel class to handle stopping AI response generation.
  • Improved ChannelClientState to handle watchers and members more efficiently. [1] [2] [3] [4]

Test Enhancements:

  • Added tests for the new stopAIResponse method and AI-related fields in the Event class. [1] [2] [3] [4]

These changes collectively enhance the functionality, error handling, and test coverage of the stream_chat package.

Copy link

codecov bot commented Dec 4, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 7 lines in your changes missing coverage. Please review.

Project coverage is 60.30%. Comparing base (4b062b2) to head (5e7d3e6).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
packages/stream_chat/lib/src/client/channel.dart 37.50% 5 Missing ⚠️
...eam_chat/lib/src/core/error/stream_chat_error.dart 66.66% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2057      +/-   ##
==========================================
+ Coverage   60.29%   60.30%   +0.01%     
==========================================
  Files         318      318              
  Lines       18580    18586       +6     
==========================================
+ Hits        11202    11209       +7     
+ Misses       7378     7377       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kanat kanat merged commit 13c2e87 into master Dec 4, 2024
18 checks passed
@kanat kanat deleted the feat/ai-events branch December 4, 2024 14:30
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.

2 participants