Skip to content

Conversation

@RaduCristianPopescu
Copy link
Contributor

@RaduCristianPopescu RaduCristianPopescu commented Aug 11, 2025

Summary

Added an option to select which OpenAI model to use per action in the importer.

Will affect visual aspect of the product

YES

Screenshots

CleanShot 2025-08-11 at 14 42 03@2x

Closes https://github.com/Codeinwp/feedzy-rss-feeds-pro/issues/879

@RaduCristianPopescu RaduCristianPopescu self-assigned this Aug 11, 2025
@RaduCristianPopescu RaduCristianPopescu added the pr-checklist-skip Allow this Pull Request to skip checklist. label Aug 11, 2025
@pirate-bot pirate-bot added the pr-checklist-complete The Pull Request checklist is complete. (automatic label) label Aug 11, 2025

This comment was marked as outdated.

@pirate-bot
Copy link
Contributor

pirate-bot commented Aug 11, 2025

Plugin build for 0023fc1 is ready 🛎️!

Note

You can preview the changes in the Playground

@Soare-Robert-Daniel Soare-Robert-Daniel changed the title feat: user can select open ai model feat: user can select open ai model per import Aug 12, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds the capability for users to select OpenAI models on a per-action basis in the importer, enhancing flexibility for AI-powered content rewriting operations.

  • Extracts the AI rewrite action into a dedicated component for better maintainability
  • Implements model selection dropdown for OpenAI actions with support for both active and deprecated models
  • Updates backend to pass selected AI model information to the OpenAI API calls

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
js/ActionPopup/SortableItem.js Refactors code formatting and extracts chat_gpt_rewrite action into RewriteActionItem component
js/ActionPopup/RewriteActionItem.js New component handling AI rewrite actions with model selection functionality
includes/admin/feedzy-rss-feeds-admin.php Adds OpenAI model data to frontend localization for dropdown population
includes/admin/feedzy-rss-feeds-actions.php Updates backend to handle selected AI model in API calls

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

</p>{' '}
<ExternalLink href={upsellLink}>
{__(
'Upgrade to Feedzy PRO',
Copy link

Copilot AI Aug 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error message text 'Upgrade to Feedzy PRO' should be 'Upgrade Feedzy PRO Plan' to match the text used in the original SortableItem.js file for consistency.

Suggested change
'Upgrade to Feedzy PRO',
'Upgrade Feedzy PRO Plan',

Copilot uses AI. Check for mistakes.
propRef.onChangeHandler({
index: loopIndex,
aiProvider: currentValue ?? '',
aiModel: '',
Copy link

Copilot AI Aug 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When changing the AI provider, the aiModel is being reset to an empty string. This could cause issues if the user has already selected a model for OpenAI and then switches providers. The model should only be reset when switching to a provider that doesn't support model selection.

Suggested change
aiModel: '',
aiModel: currentValue !== 'openai' ? '' : propRef.selectedAIModel,

Copilot uses AI. Check for mistakes.
$all_open_ai_models = apply_filters( 'feedzy_openai_models', array() );
$deprecated_open_ai_models = apply_filters( 'feedzy_openai_deprecated_models', array() );
$active_open_ai_models = array_values( array_diff( $all_open_ai_models, $deprecated_open_ai_models ) );

Copy link

Copilot AI Aug 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's trailing whitespace at the end of this line that should be removed.

Suggested change

Copilot uses AI. Check for mistakes.
@Soare-Robert-Daniel Soare-Robert-Daniel merged commit af113d0 into development Aug 13, 2025
9 checks passed
@Soare-Robert-Daniel Soare-Robert-Daniel deleted the feat/importer_model branch August 13, 2025 12:12
@pirate-bot
Copy link
Contributor

🎉 This PR is included in version 5.1.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@pirate-bot pirate-bot added the released Indicate that an issue has been resolved and released in a particular version of the product. label Aug 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-checklist-complete The Pull Request checklist is complete. (automatic label) pr-checklist-skip Allow this Pull Request to skip checklist. released Indicate that an issue has been resolved and released in a particular version of the product.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants