From b94e643052924d060b5c912fe28123d169573251 Mon Sep 17 00:00:00 2001 From: tranminhquang Date: Fri, 15 May 2026 13:55:04 +0700 Subject: [PATCH] fix: confirmation form renders toolConfirmation.payload instead of tool args The confirmation form was reading originalFunctionCall.args to populate the payload field, causing the agent to receive the wrong keys and crash with KeyError when it expected the payload schema defined by the developer. Now reads toolConfirmation.payload with a fallback to originalFunctionCall.args for cases where no payload is provided. Fixes https://github.com/google/adk-web/issues/439 --- .../long-running-response/long-running-response.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/components/long-running-response/long-running-response.ts b/src/app/components/long-running-response/long-running-response.ts index 8eab06cc..7a9b90cf 100644 --- a/src/app/components/long-running-response/long-running-response.ts +++ b/src/app/components/long-running-response/long-running-response.ts @@ -77,7 +77,11 @@ export class LongRunningResponseComponent implements OnChanges { if (this.isConfirmationRequest) { this.confirmationModel.confirmed = this.functionCall.args?.toolConfirmation?.confirmed || false; - this.confirmationModel.payload = JSON.stringify(this.functionCall.args?.originalFunctionCall?.args || {}, null, 2); + this.confirmationModel.payload = JSON.stringify( + this.functionCall.args?.toolConfirmation?.payload ?? + this.functionCall.args?.originalFunctionCall?.args ?? + {}, null, 2 + ); return; }