feat(a2a): Urgent fix - Process modelInfo agent message (#14315)

This commit is contained in:
Coco Sheng
2025-12-01 15:09:02 -05:00
committed by GitHub
parent 26f050ff10
commit 806cd112ac
3 changed files with 59 additions and 2 deletions
+6 -2
View File
@@ -66,6 +66,7 @@ export class Task {
eventBus?: ExecutionEventBus;
completedToolCalls: CompletedToolCall[];
skipFinalTrueAfterInlineEdit = false;
modelInfo?: string;
// For tool waiting logic
private pendingToolCalls: Map<string, string> = new Map(); //toolCallId --> status
@@ -135,7 +136,7 @@ export class Task {
id: this.id,
contextId: this.contextId,
taskState: this.taskState,
model: this.config.getModel(),
model: this.modelInfo || this.config.getModel(),
mcpServers: servers,
availableTools,
};
@@ -230,7 +231,7 @@ export class Task {
traceId?: string;
} = {
coderAgent: coderAgentMessage,
model: this.config.getModel(),
model: this.modelInfo || this.config.getModel(),
userTier: this.config.getUserTier(),
};
@@ -647,6 +648,9 @@ export class Task {
case GeminiEventType.Finished:
logger.info(`[Task ${this.id}] Agent finished its turn.`);
break;
case GeminiEventType.ModelInfo:
this.modelInfo = event.value;
break;
case GeminiEventType.Error:
default: {
// Block scope for lexical declaration