Standardize the Title Generation Ability to match our other Abilities#227
Standardize the Title Generation Ability to match our other Abilities#227dkotter wants to merge 4 commits intoWordPress:developfrom
Conversation
…the post ID via a context field. Can also pass in actual context in this field if desired. This matches how our other Abilities now work, ensuring consistency. Also makes the Ability more generic and easier to use in other situations
…ontext separately
|
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❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #227 +/- ##
=============================================
- Coverage 56.76% 56.64% -0.12%
- Complexity 505 507 +2
=============================================
Files 32 33 +1
Lines 2565 2572 +7
=============================================
+ Hits 1456 1457 +1
- Misses 1109 1115 +6
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:
|
What?
Modifies the input schema of the Title Generation Ability to match how we've set up our other Abilities.
Note
This is technically a backwards compat break as we're changing the schema from
post_idtocontext.We don't have to make this change but it does bring code consistency as all other Abilities we have function in this way. And it also makes the Title Generation Ability a little more generic and easier to use in all situations.
If we don't think that's worth it though, happy to close this out.
Why?
Ensures we have code consistency and also makes the Title Generation Ability more generic and easier to use in other situations where you may not want to pass in a post ID.
How?
post_idfield tocontextand allow either a post ID to be passed or specific contextcontextfield contains a post ID and if so, use that to get our context from that postUse of AI Tools
All code changes done by me. Cursor (using Composer 1.5) was used to update failing unit tests
Testing Instructions