Standardize to using runAbility to call our Abilities#228
Standardize to using runAbility to call our Abilities#228jeffpaul merged 6 commits intoWordPress:developfrom
runAbility to call our Abilities#228Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #228 +/- ##
=============================================
+ Coverage 56.69% 56.76% +0.06%
Complexity 505 505
=============================================
Files 32 32
Lines 2568 2565 -3
=============================================
Hits 1456 1456
+ Misses 1112 1109 -3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
I reviewed code changes, and they look good. I wanted to test with the latest changes on |
Yeah, have a few PRs open tracking this (#242, #249), though I think there are changes coming upstream we'll need to pull in.
I know there's an issue with OpenAI when running against the latest version of the WP AI Client, as we switch from the Chat Completions API to the Responses API and that no longer supports the I just tested again on WP 6.9.1 and title generation works fine with both OpenAI and Google, I don't have an Anthropic key to test with though. Curious which AI provider you're using? |
I used Antrophic key, so that would have to be fixed independently 👍🏻 |
Curious if you can test on the latest release of this plugin if it works? I would assume you'd get the same error as that shouldn't be something changed in this PR |
Yes, the issue isn't tied to this branch. I also see an error when testing with the AI experiments plugin installed on regular website:
|
|
I'll open a follow-up issue shortly for the bug noted above. |
|
Done, see: #264. |

What?
Move from using
apiFetchto using our customrunAbilityutility function (introduced here) to call our Abilities in our UI code.Why?
Ensures our codebase is standardized (no more fractured code that uses
apiFetchin some places andrunAbilityin others.Also ensures the Abilities JS API is used when available, falling back to using
apiFetchotherwise.How?
runAbilityand remove the direct use ofapiFetchpathJS localized dataUse of AI Tools
Used Cursor (running Composer 1.5) to give a first pass on making this change with final changes, plus review and testing, done by me
Testing Instructions