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
← All changes | src/Agent/follow-ups/cards/optimize-image.js +17 -19 3.2.2 → 3.2.3 View file →
@@ -1,6 +1,6 @@
1 1 import { isAbilityTool } from '@agent/lib/abilities';
2 -import { __, sprintf } from '@wordpress/i18n';
2 +import { __ } from '@wordpress/i18n';
3 3
4 4 const placedImage = ({ id, inputs, result }) => {
5 5 if (id === 'acquire-image') return result?.id;
6 6 if (id !== 'block-patching') return null;
@@ -20,24 +20,22 @@
20 20 score: ({ data, context }) =>
21 21 data && context?.hasImagifyApiKey && isAbilityTool('imagify/optimize-media')
22 22 ? 3
23 23 : 0,
24 - content: ({ mediaId }) => ({
25 - // translators: Title of a card in the AI Agent chat, shown after the user added an image to their website.
26 - title: __('Optimize your new image', 'extendify-local'),
27 - // translators: Body of a card in the AI Agent chat. Imagify is the name of an image optimization plugin.
28 - body: __(
29 - 'Imagify can make the file smaller so your page loads faster.',
30 - 'extendify-local',
31 - ),
32 - action: {
33 - // translators: Button on a card in the AI Agent chat that starts optimizing an image with the Imagify plugin.
34 - label: __('Optimize image', 'extendify-local'),
35 - // The next run doesn't see this run's tool calls.
36 - message: sprintf(
37 - // translators: %d is the ID of an image in the WordPress media library. Shown in the AI Agent chat as the user's own request. Imagify is the name of an image optimization plugin.
38 - __('Optimize the image with ID %d using Imagify', 'extendify-local'),
39 - mediaId,
40 - ),
41 - },
24 + // translators: Title of a card in the AI Agent chat, shown after the user added an image to their website.
25 + title: __('Optimize your new image', 'extendify-local'),
26 + // translators: Body of a card in the AI Agent chat. Imagify is the name of an image optimization plugin.
27 + body: __(
28 + 'Imagify can make the file smaller so your page loads faster.',
29 + 'extendify-local',
30 + ),
31 + action: {
32 + // translators: Button on a card in the AI Agent chat that starts optimizing an image with the Imagify plugin.
33 + label: __('Optimize image', 'extendify-local'),
34 + // translators: Shown in the AI Agent chat as the user's own request, sent when they click the "Optimize image" button after adding an image. Imagify is the name of an image optimization plugin.
35 + message: __('Optimize the new image using Imagify', 'extendify-local'),
36 + },
37 + toolContext: ({ data }) => ({
38 + refersTo: { mediaId: data.mediaId },
39 + nextStep: 'Optimize this image using Imagify',
42 40 }),
43 41 };