woocommerce/plugins/woo-ai/src/utils/index.ts

10 lines
325 B
TypeScript
Raw Normal View History

export * from './productData';
export * from './shuffleArray';
export * from './recordTracksFactory';
export * from './get-post-id';
export * from './tiny-tools';
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 16:59:26 +00:00
export * from './productDataInstructionsGenerator';
export * from './categorySelector';
export * from './htmlEntities';
export * from './renderWrappedComponent';