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

Refactor ChatFeed post hook #7722

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Refactor ChatFeed post hook #7722

wants to merge 4 commits into from

Conversation

ahuang11
Copy link
Contributor

As I was building out logs for Lumen, I noticed that depending on message = self._chat_log.objects[-1] was insufficient due to race conditions (i.e. needed a direct ref to the corresponding message for accuracy).

Also, I noticed that the post hook was prematurely being called before ChatStep finished streaming. Now, it depends on its status changing to success or failed, before triggering the post hook.

Semi-breaking change is stream no longer triggers post hook by default.

Copy link

codecov bot commented Feb 21, 2025

Codecov Report

Attention: Patch coverage is 95.45455% with 2 lines in your changes missing coverage. Please review.

Project coverage is 87.06%. Comparing base (8f9cc0f) to head (f0f2ff7).

Files with missing lines Patch % Lines
panel/chat/feed.py 93.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7722      +/-   ##
==========================================
+ Coverage   87.04%   87.06%   +0.02%     
==========================================
  Files         346      346              
  Lines       52711    52743      +32     
==========================================
+ Hits        45883    45922      +39     
+ Misses       6828     6821       -7     

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

@ahuang11 ahuang11 requested a review from philippjfr February 21, 2025 22:17
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