mirror of
https://github.com/google/adk-docs.git
synced 2026-09-14 16:16:59 +08:00
fb99006173
* Add Kotlin tabs to the tool confirmation page All three tab groups showed Python, TypeScript, Go and Java but not Kotlin, even though the API has existed since adk-kotlin v0.1.0. Kotlin turns out to sit closer to Python than to TypeScript here: the @Tool annotation carries a requireConfirmation flag, so the boolean case is a direct equivalent of FunctionTool(require_confirmation=True) rather than something callers hand-roll. The flag is a compile-time constant, though, so dynamic thresholds are evaluated inside the tool through ToolContext, the way ADK Java does it. The prose that previously singled out TypeScript for that now names Kotlin too. The advanced example reads the returned payload through Number rather than casting straight to Int, because the payload arrives decoded from JSON and its numeric type is not guaranteed - the same trap the Go tab calls out for float64. * Badge the confirmation page with the version the API shipped in The badge said Kotlin v0.8.0, the version adk-docs compiles against, rather than the introducing release. ToolConfirmation, ToolContext.requestConfirmation and the @Tool requireConfirmation flag were all present at v0.1.0. * Update confirmation.md --------- Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com>