Commit f56b7f7
committed
AI Client: Skip non-ability function calls in
`WP_AI_Client_Ability_Function_Resolver::execute_abilities()` should only respond to function calls that are ability calls. Previously, non-ability tool calls were passed to `execute_ability()` and received an `invalid_ability_call` response, preventing other tool handlers from processing them.
This updates `execute_abilities()` to mirror `has_ability_calls()` by checking `is_ability_call()` before executing, and adds regression coverage for mixed ability and non-ability calls.
Props khokansardar, jigar-bhanushali.
Fixes #65504.
git-svn-id: https://develop.svn.wordpress.org/trunk@62555 602fd350-edb4-49c9-b593-d223f7449a82execute_abilities()
1 parent 3cbba16 commit f56b7f7
2 files changed
Lines changed: 49 additions & 1 deletion
File tree
- src/wp-includes/ai-client
- tests/phpunit/tests/ai-client
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
193 | | - | |
| 193 | + | |
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
| |||
Lines changed: 48 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
666 | 666 | | |
667 | 667 | | |
668 | 668 | | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
669 | 717 | | |
670 | 718 | | |
671 | 719 | | |
| |||
0 commit comments