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

Example asset and transform for async content streaming #575

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

Conversation

cehan-Chloe
Copy link
Contributor

@cehan-Chloe cehan-Chloe commented Jan 16, 2025

Change Type (required)

Indicate the type of change your pull request is:

  • patch
  • minor
  • major
  • N/A

Does your PR have any documentation updates?

  • Updated docs
  • No Update needed
  • Unable to update docs

Release Notes

Player streaming enhancement

  1. Changes
  • Added new chat-message asset in ReferenceAssetsPlugin as async streaming example
  • Added generic function in AsyncNodePlugin to generate async asset transform
  1. New functionality
    Instead of adding {async: true} in content, replace it with a special type of asset, eg. chat-message and write a transform function.

@cehan-Chloe
Copy link
Contributor Author

/canary

Copy link

codecov bot commented Feb 20, 2025

Codecov Report

Attention: Patch coverage is 81.39535% with 16 lines in your changes missing coverage. Please review.

Project coverage is 89.72%. Comparing base (9864c7c) to head (7fc1607).
Report is 41 commits behind head on main.

Files with missing lines Patch % Lines
core/player/src/view/resolver/index.ts 33.33% 8 Missing ⚠️
plugins/async-node/core/src/transform.ts 87.50% 3 Missing ⚠️
...e-assets/core/src/assets/chat-message/transform.ts 70.00% 3 Missing ⚠️
plugins/reference-assets/core/src/assets/index.ts 0.00% 1 Missing ⚠️
plugins/reference-assets/core/src/plugin.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #575      +/-   ##
==========================================
- Coverage   89.75%   89.72%   -0.04%     
==========================================
  Files         331      334       +3     
  Lines       19840    19923      +83     
  Branches     1949     1956       +7     
==========================================
+ Hits        17808    17875      +67     
- Misses       2018     2034      +16     
  Partials       14       14              

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

@cehan-Chloe cehan-Chloe marked this pull request as ready for review February 20, 2025 21:49
@KetanReddy
Copy link
Member

Can we add some docs to the main site about how to author async assets?

@cehan-Chloe cehan-Chloe mentioned this pull request Feb 21, 2025
7 tasks
@cehan-Chloe
Copy link
Contributor Author

cehan-Chloe commented Feb 21, 2025

Can we add some docs to the main site about how to author async assets?

@KetanReddy ty for reviewing! i'm planning to have a separate pr for doc update including core, react, iOS and Android. this pr only contains change for core and react.

@KetanReddy
Copy link
Member

KetanReddy commented Feb 26, 2025

Can we add some docs to the main site about how to author async assets?

@KetanReddy ty for reviewing! i'm planning to have a separate pr for doc update including core, react, iOS and Android. this pr only contains change for core and react.

What is the work remaining on the other platforms? I see there is an iOS PR open but from my understanding this should mostly be a core PR. Ideally we would merge in all those portions + docs in the same PR

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.

4 participants