Skip to content

WP Cortex v0.10.0

Choose a tag to compare

@blonestar blonestar released this 12 Oct 21:23
· 50 commits to main since this release

Added

  • Chat tools can be added, changed or removed from a theme: PHP files in wp-cortex/tools/admin/ (admin chat) and wp-cortex/tools/public/ (visitor chat) return a new tool, the parts of a built-in tool to change (description, arguments, system prompt lines, availability or behavior) or false to remove it; a child theme file replaces the parent theme file with the same name. Plugins can do the same with the new wp_cortex_admin_chat_tools and wp_cortex_public_chat_tools filters. The visitor chat never accepts abilities or admin tools. See docs/chat-tools.md.

  • Settings > Chat tools: every tool of the admin and visitor chats with its source (Cortex, theme or plugin), its kind (an ability, also usable outside the chat, or a chat tool), a switch and a per-message call limit, and what else decides whether it is offered (for example the skills or issue report setting).

  • The admin chat can use abilities registered by WordPress and other plugins: Settings > Chat tools > WordPress abilities lists them with their category and kind (read-only, changes the site, destructive), and only checked abilities are offered. Abilities that are not read-only never run on the assistant's call: the chat shows them as an action card with the arguments, and they run only after you click Run (once, within an hour); the assistant then reports the outcome.

  • Admin chat editor tools: in the block editor you can ask the assistant to change the open post, or to suggest something and apply the suggestion you pick: the title, excerpt, slug and categories, tags and other terms (existing terms only, edit_post), the Yoast SEO title, meta description and focus keyphrase when Yoast SEO is active (edit_seo), ACF fields such as text, number, select or true/false (edit_fields), and the content: rewrite the text of paragraphs, headings, list items and buttons, insert new content or remove blocks (get_editor_content, edit_content). Changes appear in the editor right away but the post is not saved: review them and save the post as usual, or undo them. The assistant sees the post as it is in the editor, including unsaved changes. Each tool can be switched off under Settings > Chat tools.

  • The admin chat panel can be resized: drag the handle in the panel corner away from the chat button (double-click it to restore the default size). The size is kept in the browser and limited to what fits on the screen; on small screens the panel keeps its full-width layout.

Changed

  • Every chat tool is now its own class (src/Chat/Tools/Admin/, src/Chat/Tools/Public/), and both chats share one model/tool loop. The system prompt mentions a tool only while the tool is offered (for example no open_admin_page rules on the front end).