fix(core): call tool-level onEnd once on errors
JE
1d ago+49+49+01234567890123456789-8-8-0123456789
Summary
- remove the duplicated tool-level
onEndinvocation in the tool execution error path - add a regression test for failing tools
- add a patch changeset for
@voltagent/core
Testing
pnpm --filter @voltagent/core exec vitest run src/agent/agent.spec.ts --reporter=default
With issues #1536
Summary by cubic
Fixes the tool-level onEnd hook being called twice when a tool execution fails in @voltagent/core.
Summary by CodeRabbit
- Bug Fixes
- Fixed tool-level
onEndhooks so they are called exactly once when tool execution fails.
- Fixed tool-level