PluginProbe
Extendify / 3.2.2
Extendify v3.2.2
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 0.5.0 All 128 releases
extendify / src / Agent / follow-ups / cards / agent-chat-notification.js

agent-chat-notification.js in Extendify 3.2.2, at src/Agent/follow-ups/cards/agent-chat-notification.js

26 lines 776 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { notificationSuggestion } from '@agent/lib/notification-suggestion';
2 import { track } from '@shared/lib/track';
3 import { __ } from '@wordpress/i18n';
4
5 export default {
6 id: 'agent-chat-notification',
7 follows: '*',
8 statuses: ['completed', 'canceled'],
9 data: notificationSuggestion,
10 score: ({ data }) => (data ? 0.04 : 0),
11 content: ({ message, content, ctaLabel, url }) => ({
12 title: message,
13 body: content,
14 action: {
15 label:
16 ctaLabel ||
17 // translators: Button on a card in the AI Agent chat that opens a partner's offer in a new tab.
18 __('Learn more', 'extendify-local'),
19 url,
20 },
21 }),
22 onView: ({ viewTelemetry }) =>
23 track(viewTelemetry.key, viewTelemetry.payload),
24 onClick: ({ telemetry }) => track(telemetry.key, telemetry.payload),
25 };
26