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
← All changes | src/Agent/components/messages/AgentMessage.jsx +1 -22 3.1.6 → 3.2.2 View file →
@@ -1,14 +1,12 @@
1 1 import { recordAgentActivity } from '@agent/api';
2 2 import { AnimateChunks } from '@agent/components/messages/AnimateChunks';
3 3 import { ReplyOptions } from '@agent/components/ReplyOptions';
4 -import { magic } from '@agent/icons';
5 4 import pageTours from '@agent/lib/page-tours';
6 5 import tours from '@agent/tours/tours';
7 6 import { SingleTour } from '@agent/workflows/misc/components/ToursList';
8 7 import { decodeEntities } from '@wordpress/html-entities';
9 8 import { __ } from '@wordpress/i18n';
10 -import { cog, Icon, lifesaver, pencil, styles } from '@wordpress/icons';
11 9 import ReactMarkdown from 'react-markdown';
12 10
13 11 const availableTours = Object.values(tours);
14 12 const adminPages = window.extAgentData.agentContext?.availableAdminPages || [];
@@ -23,15 +21,8 @@
23 21 },
24 22 ]),
25 23 ) || {};
26 24
27 -const agentIcons = {
28 - agent1: lifesaver,
29 - agent2: styles,
30 - agent3: pencil,
31 - agent4: cog,
32 -};
33 -
34 25 export const AgentMessage = ({ message, animate, active }) => {
35 26 const {
36 27 content,
37 28 role,
@@ -36,9 +27,8 @@
36 27 content,
37 28 role,
38 29 pageSuggestion,
39 30 qaSuggestions,
40 - agent,
41 31 sessionId = 'not-set',
42 32 } = message.details;
43 33 const containsCodeBlock = /```[\s\S]*?```/.test(content);
44 34 const blocks = containsCodeBlock
@@ -53,21 +43,10 @@
53 43
54 44 return (
55 45 <div
56 46 data-agent-message-role={role}
57 - className="flex w-full items-start gap-2.5 px-2.5 py-2"
47 + className="flex w-full items-start px-2.5 py-2"
58 48 >
59 - <div className="w-7 shrink-0">
60 - {agent?.avatar ? (
61 - <img className="mt-px" src={agent.avatar} alt={agent.name} />
62 - ) : (
63 - <Icon
64 - className="-mt-0.5 fill-gray-900"
65 - icon={agentIcons[agent?.id] ?? magic}
66 - size={28}
67 - />
68 - )}
69 - </div>
70 49 <div className="flex min-w-0 flex-1 flex-col gap-4">
71 50 <div className="extendify-agent-markdown w-full">
72 51 {animate ? (
73 52 <AnimateChunks words={blocks} delay={0.1} duration={0.35} />