Skip to content

Commit 2ce996f

Browse files
committed
Update agent.ts
1 parent 05b9a4d commit 2ce996f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

integrations/a2a/typescript/src/agent.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export interface A2AAgentConfig extends AgentConfig {
2828
a2aClient: A2AClient;
2929
}
3030

31-
const A2A_UI_EXTENSION_URI = "https://a2ui.org/ext/a2a-ui/v0.1";
31+
const EXTENSION_URI = "https://a2ui.org/ext/a2a-ui/v0.1";
3232

3333
export class A2AAgent extends AbstractAgent {
3434
private readonly a2aClient: A2AClient;
@@ -43,7 +43,7 @@ export class A2AAgent extends AbstractAgent {
4343
super(rest);
4444

4545
this.a2aClient = a2aClient;
46-
this.initializeA2UIExtension(this.a2aClient);
46+
this.initializeExtension(this.a2aClient);
4747
}
4848

4949
clone() {
@@ -256,16 +256,16 @@ export class A2AAgent extends AbstractAgent {
256256
};
257257
}
258258

259-
private initializeA2UIExtension(client: A2AClient) {
259+
private initializeExtension(client: A2AClient) {
260260
const addExtensionHeader = (headers: Headers) => {
261261
const existingValue = headers.get("X-A2A-Extensions") ?? "";
262262
const values = existingValue
263263
.split(",")
264264
.map((value) => value.trim())
265265
.filter(Boolean);
266266

267-
if (!values.includes(A2A_UI_EXTENSION_URI)) {
268-
values.push(A2A_UI_EXTENSION_URI);
267+
if (!values.includes(EXTENSION_URI)) {
268+
values.push(EXTENSION_URI);
269269
headers.set("X-A2A-Extensions", values.join(", "));
270270
}
271271
};

0 commit comments

Comments
 (0)