Repository navigation
feat(ai-components): bring the AI agent work to V10 - #3979
Open
isekovanic wants to merge 23 commits into
Open
isekovanic wants to merge 23 commits into
isekovanic wants to merge 23 commits into
Conversation
Ported from #3920 on v9-release.
…mple on the agents router Ported from #3921 on v9-release. The AI components read the chat SDK's V10 translation context, which the entry isolation check now allows.
…als) Ported from #3924 on v9-release.
…ll sign-in Ported from #3926 on v9-release.
Ported from #3928 on v9-release.
Ported from #3929 on v9-release. stream-chat 10 keeps mime_type, file_size and the AI fields under `custom`, so steps and messages read them through withCustomFields, as React does.
… fixes Ported from #3931 on v9-release.
Ported from #3933 on v9-release.
Ported from #3934 on v9-release.
Ported from #3936 on v9-release.
Ported from #3944 on v9-release. Pins @legendapp/list at 3.7.1, the version v9 resolves.
… message Ported from #3958 on v9-release.
Ported from #3957 on v9-release.
Ported from #3960 on v9-release.
Ported from #3963 on v9-release.
Ported from #3974 on v9-release.
…nd custom.uiAction Ported from #3975 on v9-release.
Ported from #3976 on v9-release.
The AI and A2UI strings use V10's catalog keys with their English inline, named after the React SDK's, and keys.ts is regenerated.
Both samples read messages from the channel's messagePaginator, and the AI fields from `custom`. The crew sample uploads voice memos with uploadChannelFile.
LegendList 3.7.2 keeps fewer rows mounted after a jump, so the test now compares only the rows that stay mounted and were reused for another reply.
AgentChat no longer copies the messages into a store of its own. It activates the channel, as <Channel> does, so the client reloads it after a reconnect, and the samples' own recovery goes.
Contributor
SDK Size
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ticket: https://linear.app/stream/issue/RN-485
🎯 Goal
Bring the AI agent work we shipped on
v9-releaseto V10: the same components, APIs and sample apps, adapted to stream-chat 10 and the V10 i18n.The long-press Copy/Edit menu on the person's own messages isn't here. It isn't on v9 either, and it comes later as a V10 feature.
🛠 Implementation details
The branch is one commit per v9 PR, in merge order, then the V10-only changes, so it can be reviewed commit by commit.
Ported from v9
AIAgentmodule for the install id and tool-call sign-inAIConversationon LegendListAIConversationControllerAIConversationin its own entry pointcustom.uiActiondocsWhere
develophad already changed the same lines (comment cleanups, the i18n move, a11y docs),develop's version wins.What's different on V10
custom. stream-chat 10 keepsmime_type,file_size,ai_generated,generating,ai_uiand the step fields undercustom.parseMessagePartsandfromStreamMessagelift them with a smallwithCustomFieldshelper, as the React SDK does.aiComponents.replyActions.copy.accessibilityLabel,a2ui.modal.close.label, …), andkeys.tsis regenerated.useAITranslationreturns core's typedt.@legendapp/listandreact-native-keyboard-controllerare AI-only packages.channel.messagePaginator, through a smalluseAgentMessageshook, and load older pages withtoTail(). A followed channel is activated, as<Channel>does, so the client reloads it after a reconnect, and the samples have no recovery code of their own. The only event they still listen to ismessage.updated, which feeds calypso'sLiveReasoning. The crew sample uploads voice memos withuploadChannelFile.@stream-io/state-storeanduse-sync-external-store, and pin@stream-io/state-storeto one copy intsconfigpaths.🎨 UI Changes
None compared with v9. The screenshots are in the v9 PRs above.
🧪 Testing
yarn lint,yarn typecheck,test:typecheck, the unit tests andyarn buildpass, and both samples typecheck.On an Android emulator and an iOS simulator:
sayand answered;Not tested here: voice mode (the simulator's speech recognition doesn't hear
say), dictation, Cal.com sign-in, and charts or photos in the ChatGPT sample.☑️ Checklist
developbranch