feat(js/ai): expose restartTool/respondTool helper function in addition to tool.respond/restart#5046
Conversation
There was a problem hiding this comment.
Code Review
This pull request adds restartTool and respondTool utility functions to the js/ai and js/genkit packages. These functions facilitate re-triggering tool requests with updated inputs or providing manual tool responses independently of a ToolAction instance. I have no feedback to provide.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces respondTool and restartTool as standalone utility functions to handle tool interrupts and restarts, refactoring existing logic in implementTool to use these new helpers. The review feedback identifies several instances where logical OR (||) or simple truthiness checks are used for optional parameters; these should be replaced with nullish coalescing (??) or explicit undefined checks to correctly handle valid falsy values like 0, false, or empty strings.
f43948d to
5573649
Compare
…t-respond-restart-hlpers
…t-respond-restart-hlpers
No description provided.