Skip to content

Conversation

@tylerslaton
Copy link
Contributor

No description provided.

Copy link
Contributor

@mme mme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great solution & nice tests!

We need to also apply the headers in updateRuntimeConnection when creating ProxiedCopilotRuntimeAgent and we can remove setting headers in connectAgent and runAgent

this.localAgents = this.assignAgentIds(agents);
this.applyHeadersToAgents(this.localAgents);
this._agents = { ...this.localAgents, ...this.remoteAgents };
this.applyHeadersToAgents(this._agents);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applying to this._agents should be enough (it contains all agents)

}
this.applyHeadersToAgent(agent);
this._agents = { ...this.localAgents, ...this.remoteAgents };
this.applyHeadersToAgents(this._agents);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not needed here, since we are adding an agent and we just want to apply headers to this particular agent

this.headers = headers;
this.applyHeadersToAgents(this.localAgents);
this.applyHeadersToAgents(this.remoteAgents);
this.applyHeadersToAgents(this._agents);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this.applyHeadersToAgents(this._agents) is enough

@CopilotKit CopilotKit deleted a comment from claude bot Sep 25, 2025
@CopilotKit CopilotKit deleted a comment from claude bot Sep 25, 2025
@CopilotKit CopilotKit deleted a comment from claude bot Sep 25, 2025
@mme mme merged commit 98fae10 into main Sep 25, 2025
1 of 5 checks passed
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.

3 participants