woocommerce/plugins/woo-ai/src/components
Nima Karimi 01dd039b21
Suggest product categories with AI (#39437)
* Accept arguments for the TinyContent getContent method.

Used to fetch the plain text version of the description.

* Add a class to the loading message content

* Set the max description length as global constant

* Create a MagicButton component and use it

* Get plain text description instead of HTML

* Return full category hierarchy (Parent > Child)

* Add method to return all available categories on the product edit page

* Helper function to generate product data instructions for the prompt

* Helper function to select category checkboxes on DOM

* Create component to display a list of suggestion items as pills

* Add product category suggestions to product edit page

* Use the AI package to get text completion

* Add tracks

* Add changelog

* Fix merge conflict

* Remove NoMatch state for category suggestions

* Get available categories using WC REST API

* Suggest new categories

* Run separate prompts for existing and new category generation

* Fix overflow in suggestion pills

* Don't include existing selected categories in prompt

* Add util to encode html entities

* Exclude "Uncategorized" category from product data

* Allow excluding properties from the product data instructions

* Create category from suggestion if it doesn't exist

* Show suggestions as links instead of pills

* Ask for feedback after suggestion selected

* Decode html entities in available categories results

* Don't encode html entities when comparing available categories

* Change feedback box style

* Suggest only one category

* Remove log

* Show feedback box after generating suggestions

Instead of showing it after a suggestion is selected

* Fix typo
2023-09-12 19:59:26 +03:00
..
info-modal Add Short Description "Write With AI" Button + Inform about automatic generation (#39805) 2023-09-06 12:36:14 +02:00
magic-button Suggest product categories with AI (#39437) 2023-09-12 19:59:26 +03:00
random-loading-message Suggest product categories with AI (#39437) 2023-09-12 19:59:26 +03:00
suggestion-pills Suggest product categories with AI (#39437) 2023-09-12 19:59:26 +03:00
tour-spotlight Add Short Description "Write With AI" Button + Inform about automatic generation (#39805) 2023-09-06 12:36:14 +02:00
description-completion-buttons.tsx Add Short Description "Write With AI" Button + Inform about automatic generation (#39805) 2023-09-06 12:36:14 +02:00
index.scss Suggest product categories with AI (#39437) 2023-09-12 19:59:26 +03:00
index.ts Suggest product categories with AI (#39437) 2023-09-12 19:59:26 +03:00