PluginProbe
Extendify / 3.2.3
Extendify v3.2.3
3.2.3 3.2.2 3.2.1 3.2.0 3.1.6 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.6 3.0.5 3.0.4 trunk 0.1.0 0.10.0 0.10.1 0.10.2 0.11.0 0.11.1 0.2.0 0.3.0 0.3.1 0.4.0 All 129 releases
extendify / src / Agent / follow-ups / cards / plugin-settings.js

plugin-settings.js in Extendify 3.2.3, at src/Agent/follow-ups/cards/plugin-settings.js

32 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { getPluginSetup } from '@agent/lib/redirects';
2 import { __, sprintf } from '@wordpress/i18n';
3
4 export default {
5 id: 'plugin-settings',
6 follows: ['recommend-plugins'],
7 data: ({ toolCalls }) =>
8 getPluginSetup(
9 toolCalls.findLast(({ id }) => id === 'install-plugin')?.inputs
10 ?.pluginSlug,
11 ),
12 score: ({ data }) => (data ? 3 : 0),
13 content: ({ title, url }) => ({
14 title: sprintf(
15 // translators: Title of a card in the AI Agent chat, shown after the agent installed a plugin. %s is the plugin's name.
16 __('Set up %s', 'extendify-local'),
17 title,
18 ),
19 // translators: Body of a card in the AI Agent chat, shown after the agent installed a plugin that has its own settings page.
20 body: __(
21 'Open its settings page to finish getting it ready.',
22 'extendify-local',
23 ),
24 action: {
25 // translators: Button on a card in the AI Agent chat that opens the settings page of a plugin the agent just installed.
26 label: __('Go to settings', 'extendify-local'),
27 url,
28 sameTab: true,
29 },
30 }),
31 };
32