Skip to content

Commit f596303

Browse files
fix(adk): improve review-and-edit tool call wrapper response
Change-Id: I22b30575551f3f9d9b10a65ce11bcc2a92199a0b
1 parent d48b44f commit f596303

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

adk/common/tool/review_edit_wrapper.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,12 @@ func (i InvokableReviewEditTool) InvokableRun(ctx context.Context, argumentsInJS
104104
}
105105

106106
if result.EditedArgumentsInJSON != nil {
107-
return i.InvokableTool.InvokableRun(ctx, *result.EditedArgumentsInJSON, opts...)
107+
res, err := i.InvokableTool.InvokableRun(ctx, *result.EditedArgumentsInJSON, opts...)
108+
if err != nil {
109+
return "", err
110+
}
111+
return fmt.Sprintf("after presenting the tool call info to the user, the user explilcitly changed tool call arguments to %s. Tool called, final result: %s",
112+
*result.EditedArgumentsInJSON, res), nil
108113
}
109114

110115
return "", fmt.Errorf("invalid review result for tool '%s'", toolInfo.Name)

0 commit comments

Comments
 (0)