Docs(Programmatic Control): Added missing agentId, fixed imports and useEffect#4430
Closed
MalaikaAbb wants to merge 2 commits into
Closed
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
@MalaikaAbb is attempting to deploy a commit to the CopilotKit Team on Vercel. A member of the Team first needs to authorize it. |
marthakelly
added a commit
that referenced
this pull request
May 11, 2026
…useEffect (mirror of #4430) (#4450) Mirror of #4430 by @MalaikaAbb. Adds an agentId note for non-default agents, replaces `agent.id` with `agent.agentId`, corrects the `@copilotkit/shared/v2` import to `@copilotkit/shared`, and adds the missing `[agent]` dependency to a useEffect.
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.
Summary
Improved code snippets to add missing dependency in useEffect for Agent Events Subscriber. Also elaborated the use of agentId in case of missing default agent, and fixed accessing of agentId property on agent. Lastly, fixed a wrong import in Run The Agent step.
Changes
agentIdas props to useAgent() hook if the user has initialized a differently named agent because useAgent() searches for 'default' agent if not specificed.{agent.id}with{agent.agentId}since id does not exist on agent."@copilotkit/shared/v2"to"@copilotkit/shared"since v2 does not exist in copilotkit/shared package[agent]to useEffect dependency array in the 'Subscribing to Agent Events' Section because its required.