@atlaskit/rovo-agent-components 5.0.0 → 5.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/dist/cjs/ui/agent-avatar/generated-avatars/index.compiled.css +2 -1
- package/dist/cjs/ui/agent-avatar/generated-avatars/index.js +6 -3
- package/dist/cjs/ui/agent-conversation-starters/index.compiled.css +2 -0
- package/dist/cjs/ui/agent-conversation-starters/index.js +9 -3
- package/dist/cjs/ui/agent-profile-info/index.js +20 -1
- package/dist/cjs/ui/agent-profile-info/messages.js +5 -0
- package/dist/es2019/ui/agent-avatar/generated-avatars/index.compiled.css +2 -1
- package/dist/es2019/ui/agent-avatar/generated-avatars/index.js +6 -3
- package/dist/es2019/ui/agent-conversation-starters/index.compiled.css +2 -0
- package/dist/es2019/ui/agent-conversation-starters/index.js +8 -3
- package/dist/es2019/ui/agent-profile-info/index.js +20 -1
- package/dist/es2019/ui/agent-profile-info/messages.js +5 -0
- package/dist/esm/ui/agent-avatar/generated-avatars/index.compiled.css +2 -1
- package/dist/esm/ui/agent-avatar/generated-avatars/index.js +6 -3
- package/dist/esm/ui/agent-conversation-starters/index.compiled.css +2 -0
- package/dist/esm/ui/agent-conversation-starters/index.js +9 -3
- package/dist/esm/ui/agent-profile-info/index.js +20 -1
- package/dist/esm/ui/agent-profile-info/messages.js +5 -0
- package/dist/types/ui/agent-avatar/generated-avatars/index.d.ts +6 -2
- package/dist/types/ui/agent-conversation-starters/index.d.ts +2 -1
- package/dist/types/ui/agent-profile-info/index.d.ts +1 -1
- package/dist/types/ui/agent-profile-info/messages.d.ts +5 -0
- package/dist/types-ts4.5/ui/agent-avatar/generated-avatars/index.d.ts +6 -2
- package/dist/types-ts4.5/ui/agent-conversation-starters/index.d.ts +2 -1
- package/dist/types-ts4.5/ui/agent-profile-info/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/agent-profile-info/messages.d.ts +5 -0
- package/package.json +8 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @atlaskit/rovo-agent-components
|
|
2
2
|
|
|
3
|
+
## 5.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`77d13ee041600`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/77d13ee041600) -
|
|
8
|
+
[ux] Update agent profile card design
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
14
|
+
## 5.1.0
|
|
15
|
+
|
|
16
|
+
### Minor Changes
|
|
17
|
+
|
|
18
|
+
- [`2a6f508e4e6d2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2a6f508e4e6d2) -
|
|
19
|
+
Hide Rovo logo, hide behaviour, and show 'Agent by …' for REMOTE_A2A agents on the agent profile
|
|
20
|
+
card and the browse agents modal view-agent panel.
|
|
21
|
+
|
|
3
22
|
## 5.0.0
|
|
4
23
|
|
|
5
24
|
### Major Changes
|
|
@@ -18,7 +18,8 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
18
18
|
var styles = {
|
|
19
19
|
image: "_5ral1dfr _4t3i1osq _1bsb1osq _1e0c1txw _1bah1h6o _4cvr1h6o",
|
|
20
20
|
banner: "_1bsb1osq",
|
|
21
|
-
bannerFillSpace: "_1bsb1osq _4t3i1osq _5ral1dfr"
|
|
21
|
+
bannerFillSpace: "_1bsb1osq _4t3i1osq _5ral1dfr",
|
|
22
|
+
bannerRemoteA2A: "_bfhk7qp0"
|
|
22
23
|
};
|
|
23
24
|
var Observer = function Observer(_ref) {
|
|
24
25
|
var onLoad = _ref.onLoad;
|
|
@@ -633,6 +634,7 @@ var AgentBanner = exports.AgentBanner = function AgentBanner(_ref4) {
|
|
|
633
634
|
agentId = _ref4.agentId,
|
|
634
635
|
agentIdentityAccountId = _ref4.agentIdentityAccountId,
|
|
635
636
|
isRovoDev = _ref4.isRovoDev,
|
|
637
|
+
creatorType = _ref4.creatorType,
|
|
636
638
|
height = _ref4.height,
|
|
637
639
|
fillSpace = _ref4.fillSpace;
|
|
638
640
|
var _getAvatarRender = getAvatarRender({
|
|
@@ -643,10 +645,11 @@ var AgentBanner = exports.AgentBanner = function AgentBanner(_ref4) {
|
|
|
643
645
|
size: 'medium'
|
|
644
646
|
}),
|
|
645
647
|
color = _getAvatarRender.color;
|
|
648
|
+
var isRemoteA2A = (0, _platformFeatureFlags.fg)('jira_improve_agent_profile_for_a2a') && creatorType === 'REMOTE_A2A';
|
|
646
649
|
return /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
647
|
-
xcss: (0, _css.cx)(styles.banner, fillSpace ? styles.bannerFillSpace : undefined),
|
|
650
|
+
xcss: (0, _css.cx)(styles.banner, fillSpace ? styles.bannerFillSpace : undefined, isRemoteA2A ? styles.bannerRemoteA2A : undefined),
|
|
648
651
|
style: {
|
|
649
|
-
backgroundColor: color.primary,
|
|
652
|
+
backgroundColor: isRemoteA2A ? undefined : color.primary,
|
|
650
653
|
height: height ? "".concat(height, "px") : undefined
|
|
651
654
|
}
|
|
652
655
|
});
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
._18m915vq{overflow-y:hidden}
|
|
5
5
|
._19bv12x7{padding-left:var(--ds-space-075,6px)}
|
|
6
6
|
._19bvidpf{padding-left:0}
|
|
7
|
+
._19pkze3t{margin-top:var(--ds-space-0,0)}
|
|
7
8
|
._1bsb1osq{width:100%}
|
|
8
9
|
._1bto1l2s{text-overflow:ellipsis}
|
|
9
10
|
._1o9zidpf{flex-shrink:0}
|
|
@@ -13,6 +14,7 @@
|
|
|
13
14
|
._bfhksm61{background-color:var(--ds-background-neutral-subtle,#00000000)}
|
|
14
15
|
._ca0q12x7{padding-top:var(--ds-space-075,6px)}
|
|
15
16
|
._ca0qidpf{padding-top:0}
|
|
17
|
+
._ca0qze3t{padding-top:var(--ds-space-0,0)}
|
|
16
18
|
._k48p1wq8{font-weight:var(--ds-font-weight-medium,500)}
|
|
17
19
|
._n3td12x7{padding-bottom:var(--ds-space-075,6px)}
|
|
18
20
|
._n3tdidpf{padding-bottom:0}
|
|
@@ -15,6 +15,7 @@ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers
|
|
|
15
15
|
var _react = _interopRequireWildcard(require("react"));
|
|
16
16
|
var _reactIntl = require("react-intl");
|
|
17
17
|
var _new = require("@atlaskit/button/new");
|
|
18
|
+
var _css = require("@atlaskit/css");
|
|
18
19
|
var _retry = _interopRequireDefault(require("@atlaskit/icon/core/retry"));
|
|
19
20
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
20
21
|
var _agentChatIcon = require("../../common/ui/agent-chat-icon");
|
|
@@ -24,6 +25,8 @@ var _excluded = ["userDefinedConversationStarters", "isAgentDefault"];
|
|
|
24
25
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
25
26
|
var styles = {
|
|
26
27
|
conversationStartersList: "_qtt8glyw _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _1bsb1osq",
|
|
28
|
+
conversationStartersListWithRefreshDesign: "_19pkze3t",
|
|
29
|
+
conversationStaterItem: "_ca0qze3t",
|
|
27
30
|
conversationStarterIcon: "_1o9zidpf",
|
|
28
31
|
conversationStarterText: "_1reo15vq _18m915vq _1bto1l2s _o5721q9c _1o9zkb7n _1ul9idpf",
|
|
29
32
|
button: "_11c8fhey _2rko12b0 _syazazsu _ca0q12x7 _u5f312x7 _n3td12x7 _19bv12x7 _k48p1wq8 _1bto1l2s _o5721q9c _1o9zkb7n _1bsb1osq _bfhksm61 _irr31dpa _1di6fcek"
|
|
@@ -103,16 +106,19 @@ var ConversationStarters = exports.ConversationStarters = function ConversationS
|
|
|
103
106
|
showReloadButton = _ref3$showReloadButto === void 0 ? false : _ref3$showReloadButto,
|
|
104
107
|
_ref3$onReloadButtonC = _ref3.onReloadButtonClick,
|
|
105
108
|
onReloadButtonClick = _ref3$onReloadButtonC === void 0 ? function () {} : _ref3$onReloadButtonC,
|
|
106
|
-
onBrowseAgentsClick = _ref3.onBrowseAgentsClick
|
|
109
|
+
onBrowseAgentsClick = _ref3.onBrowseAgentsClick,
|
|
110
|
+
_ref3$refreshDesignEn = _ref3.refreshDesignEnabled,
|
|
111
|
+
refreshDesignEnabled = _ref3$refreshDesignEn === void 0 ? false : _ref3$refreshDesignEn;
|
|
107
112
|
return /*#__PURE__*/_react.default.createElement(_compiled.Stack, {
|
|
108
113
|
as: "ul",
|
|
109
114
|
space: "space.050",
|
|
110
|
-
xcss: styles.conversationStartersList
|
|
115
|
+
xcss: (0, _css.cx)(styles.conversationStartersList, refreshDesignEnabled && styles.conversationStartersListWithRefreshDesign)
|
|
111
116
|
}, starters.map(function (starter, index) {
|
|
112
117
|
var isLastStarter = index === starters.length - 1;
|
|
113
118
|
var chatPill = /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
114
119
|
as: "li",
|
|
115
|
-
key: starter.message
|
|
120
|
+
key: starter.message,
|
|
121
|
+
xcss: refreshDesignEnabled && styles.conversationStaterItem
|
|
116
122
|
}, /*#__PURE__*/_react.default.createElement(_compiled.Pressable, {
|
|
117
123
|
xcss: styles.button,
|
|
118
124
|
onClick: function onClick() {
|
|
@@ -42,7 +42,8 @@ var getAgentCreator = exports.getAgentCreator = function getAgentCreator(_ref) {
|
|
|
42
42
|
if ((0, _platformFeatureFlags.fg)('rovo_agent_support_a2a_avatar') ? (0, _isForgeAgent.isForgeAgentByCreatorType)(creatorType) : creatorType === 'FORGE' || creatorType === 'THIRD_PARTY' // THIRD_PARTY is deprecated in convo-ai, use FORGE instead
|
|
43
43
|
) {
|
|
44
44
|
return {
|
|
45
|
-
|
|
45
|
+
// @todo: remove cast in rovo_agent_support_a2a_avatar cleanup
|
|
46
|
+
type: (0, _platformFeatureFlags.fg)('jira_improve_agent_profile_for_a2a') ? creatorType : 'FORGE',
|
|
46
47
|
name: forgeCreator !== null && forgeCreator !== void 0 ? forgeCreator : ''
|
|
47
48
|
};
|
|
48
49
|
}
|
|
@@ -115,6 +116,11 @@ var AgentProfileCreator = exports.AgentProfileCreator = function AgentProfileCre
|
|
|
115
116
|
}, creator.name, ' ', creator.status === 'inactive' && formatMessage(_messages.messages.agentDeactivated))
|
|
116
117
|
});
|
|
117
118
|
}
|
|
119
|
+
if (creator.type === 'REMOTE_A2A') {
|
|
120
|
+
return formatMessage(_messages.messages.remoteAgentCreatedBy, {
|
|
121
|
+
creatorNameWithLink: creator.name
|
|
122
|
+
});
|
|
123
|
+
}
|
|
118
124
|
|
|
119
125
|
// THIRD_PARTY is deprecated in convo-ai, use FORGE instead
|
|
120
126
|
if (creator.type === 'THIRD_PARTY' || creator.type === 'FORGE') {
|
|
@@ -125,6 +131,19 @@ var AgentProfileCreator = exports.AgentProfileCreator = function AgentProfileCre
|
|
|
125
131
|
return null;
|
|
126
132
|
};
|
|
127
133
|
var creatorRender = getCreatorRender();
|
|
134
|
+
if ((0, _platformFeatureFlags.fg)('jira_improve_agent_profile_for_a2a')) {
|
|
135
|
+
var showRovoIcon = (creator === null || creator === void 0 ? void 0 : creator.type) !== 'REMOTE_A2A';
|
|
136
|
+
return creatorRender ? /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
137
|
+
xcss: styles.clickableItem
|
|
138
|
+
}, showRovoIcon ? /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
139
|
+
xcss: styles.rovoIconWrapper,
|
|
140
|
+
testId: "rovo-icon-wrapper",
|
|
141
|
+
"aria-hidden": "true"
|
|
142
|
+
}, /*#__PURE__*/_react.default.createElement(_logo.RovoIcon, {
|
|
143
|
+
appearance: "brand",
|
|
144
|
+
size: "small"
|
|
145
|
+
})) : null, creatorRender) : null;
|
|
146
|
+
}
|
|
128
147
|
return creatorRender ? /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
129
148
|
xcss: styles.clickableItem
|
|
130
149
|
}, /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
@@ -11,6 +11,11 @@ var messages = exports.messages = (0, _reactIntl.defineMessages)({
|
|
|
11
11
|
defaultMessage: 'Rovo Agent by {creatorNameWithLink}',
|
|
12
12
|
description: 'Message to show who created this Rovo agent'
|
|
13
13
|
},
|
|
14
|
+
remoteAgentCreatedBy: {
|
|
15
|
+
id: 'ai-mate.agent-profile-info.agent-by',
|
|
16
|
+
defaultMessage: 'Agent by {creatorNameWithLink}',
|
|
17
|
+
description: 'Message to show who built a remote (third-party) agent, shown without the Rovo logo'
|
|
18
|
+
},
|
|
14
19
|
agentDeactivated: {
|
|
15
20
|
id: 'ai-mate.agent-profile-info.deactivated',
|
|
16
21
|
defaultMessage: '(deactivated)',
|
|
@@ -9,7 +9,8 @@ import { Box } from '@atlaskit/primitives/compiled';
|
|
|
9
9
|
const styles = {
|
|
10
10
|
image: "_5ral1dfr _4t3i1osq _1bsb1osq _1e0c1txw _1bah1h6o _4cvr1h6o",
|
|
11
11
|
banner: "_1bsb1osq",
|
|
12
|
-
bannerFillSpace: "_1bsb1osq _4t3i1osq _5ral1dfr"
|
|
12
|
+
bannerFillSpace: "_1bsb1osq _4t3i1osq _5ral1dfr",
|
|
13
|
+
bannerRemoteA2A: "_bfhk7qp0"
|
|
13
14
|
};
|
|
14
15
|
const Observer = ({
|
|
15
16
|
onLoad
|
|
@@ -425,6 +426,7 @@ export const AgentBanner = ({
|
|
|
425
426
|
agentId,
|
|
426
427
|
agentIdentityAccountId,
|
|
427
428
|
isRovoDev,
|
|
429
|
+
creatorType,
|
|
428
430
|
height,
|
|
429
431
|
fillSpace
|
|
430
432
|
}) => {
|
|
@@ -437,10 +439,11 @@ export const AgentBanner = ({
|
|
|
437
439
|
isRovoDev,
|
|
438
440
|
size: 'medium'
|
|
439
441
|
});
|
|
442
|
+
const isRemoteA2A = fg('jira_improve_agent_profile_for_a2a') && creatorType === 'REMOTE_A2A';
|
|
440
443
|
return /*#__PURE__*/React.createElement(Box, {
|
|
441
|
-
xcss: cx(styles.banner, fillSpace ? styles.bannerFillSpace : undefined),
|
|
444
|
+
xcss: cx(styles.banner, fillSpace ? styles.bannerFillSpace : undefined, isRemoteA2A ? styles.bannerRemoteA2A : undefined),
|
|
442
445
|
style: {
|
|
443
|
-
backgroundColor: color.primary,
|
|
446
|
+
backgroundColor: isRemoteA2A ? undefined : color.primary,
|
|
444
447
|
height: height ? `${height}px` : undefined
|
|
445
448
|
}
|
|
446
449
|
});
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
._18m915vq{overflow-y:hidden}
|
|
5
5
|
._19bv12x7{padding-left:var(--ds-space-075,6px)}
|
|
6
6
|
._19bvidpf{padding-left:0}
|
|
7
|
+
._19pkze3t{margin-top:var(--ds-space-0,0)}
|
|
7
8
|
._1bsb1osq{width:100%}
|
|
8
9
|
._1bto1l2s{text-overflow:ellipsis}
|
|
9
10
|
._1o9zidpf{flex-shrink:0}
|
|
@@ -13,6 +14,7 @@
|
|
|
13
14
|
._bfhksm61{background-color:var(--ds-background-neutral-subtle,#00000000)}
|
|
14
15
|
._ca0q12x7{padding-top:var(--ds-space-075,6px)}
|
|
15
16
|
._ca0qidpf{padding-top:0}
|
|
17
|
+
._ca0qze3t{padding-top:var(--ds-space-0,0)}
|
|
16
18
|
._k48p1wq8{font-weight:var(--ds-font-weight-medium,500)}
|
|
17
19
|
._n3td12x7{padding-bottom:var(--ds-space-075,6px)}
|
|
18
20
|
._n3tdidpf{padding-bottom:0}
|
|
@@ -5,6 +5,7 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
5
5
|
import React, { useMemo } from 'react';
|
|
6
6
|
import { useIntl } from 'react-intl';
|
|
7
7
|
import { IconButton } from '@atlaskit/button/new';
|
|
8
|
+
import { cx } from '@atlaskit/css';
|
|
8
9
|
import RetryIcon from '@atlaskit/icon/core/retry';
|
|
9
10
|
import { Box, Inline, Pressable, Stack } from '@atlaskit/primitives/compiled';
|
|
10
11
|
import { AgentChatIcon } from '../../common/ui/agent-chat-icon';
|
|
@@ -12,6 +13,8 @@ import { BrowseAgentsPill } from '../../common/ui/chat-pill';
|
|
|
12
13
|
import { messages } from './messages';
|
|
13
14
|
const styles = {
|
|
14
15
|
conversationStartersList: "_qtt8glyw _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _1bsb1osq",
|
|
16
|
+
conversationStartersListWithRefreshDesign: "_19pkze3t",
|
|
17
|
+
conversationStaterItem: "_ca0qze3t",
|
|
15
18
|
conversationStarterIcon: "_1o9zidpf",
|
|
16
19
|
conversationStarterText: "_1reo15vq _18m915vq _1bto1l2s _o5721q9c _1o9zkb7n _1ul9idpf",
|
|
17
20
|
button: "_11c8fhey _2rko12b0 _syazazsu _ca0q12x7 _u5f312x7 _n3td12x7 _19bv12x7 _k48p1wq8 _1bto1l2s _o5721q9c _1o9zkb7n _1bsb1osq _bfhksm61 _irr31dpa _1di6fcek"
|
|
@@ -87,17 +90,19 @@ export const ConversationStarters = ({
|
|
|
87
90
|
onConversationStarterClick,
|
|
88
91
|
showReloadButton = false,
|
|
89
92
|
onReloadButtonClick = () => {},
|
|
90
|
-
onBrowseAgentsClick
|
|
93
|
+
onBrowseAgentsClick,
|
|
94
|
+
refreshDesignEnabled = false
|
|
91
95
|
}) => {
|
|
92
96
|
return /*#__PURE__*/React.createElement(Stack, {
|
|
93
97
|
as: "ul",
|
|
94
98
|
space: "space.050",
|
|
95
|
-
xcss: styles.conversationStartersList
|
|
99
|
+
xcss: cx(styles.conversationStartersList, refreshDesignEnabled && styles.conversationStartersListWithRefreshDesign)
|
|
96
100
|
}, starters.map((starter, index) => {
|
|
97
101
|
const isLastStarter = index === starters.length - 1;
|
|
98
102
|
const chatPill = /*#__PURE__*/React.createElement(Box, {
|
|
99
103
|
as: "li",
|
|
100
|
-
key: starter.message
|
|
104
|
+
key: starter.message,
|
|
105
|
+
xcss: refreshDesignEnabled && styles.conversationStaterItem
|
|
101
106
|
}, /*#__PURE__*/React.createElement(Pressable, {
|
|
102
107
|
xcss: styles.button,
|
|
103
108
|
onClick: () => onConversationStarterClick(starter),
|
|
@@ -36,7 +36,8 @@ export const getAgentCreator = ({
|
|
|
36
36
|
if (fg('rovo_agent_support_a2a_avatar') ? isForgeAgentByCreatorType(creatorType) : creatorType === 'FORGE' || creatorType === 'THIRD_PARTY' // THIRD_PARTY is deprecated in convo-ai, use FORGE instead
|
|
37
37
|
) {
|
|
38
38
|
return {
|
|
39
|
-
|
|
39
|
+
// @todo: remove cast in rovo_agent_support_a2a_avatar cleanup
|
|
40
|
+
type: fg('jira_improve_agent_profile_for_a2a') ? creatorType : 'FORGE',
|
|
40
41
|
name: forgeCreator !== null && forgeCreator !== void 0 ? forgeCreator : ''
|
|
41
42
|
};
|
|
42
43
|
}
|
|
@@ -109,6 +110,11 @@ export const AgentProfileCreator = ({
|
|
|
109
110
|
}, creator.name, ' ', creator.status === 'inactive' && formatMessage(messages.agentDeactivated))
|
|
110
111
|
});
|
|
111
112
|
}
|
|
113
|
+
if (creator.type === 'REMOTE_A2A') {
|
|
114
|
+
return formatMessage(messages.remoteAgentCreatedBy, {
|
|
115
|
+
creatorNameWithLink: creator.name
|
|
116
|
+
});
|
|
117
|
+
}
|
|
112
118
|
|
|
113
119
|
// THIRD_PARTY is deprecated in convo-ai, use FORGE instead
|
|
114
120
|
if (creator.type === 'THIRD_PARTY' || creator.type === 'FORGE') {
|
|
@@ -119,6 +125,19 @@ export const AgentProfileCreator = ({
|
|
|
119
125
|
return null;
|
|
120
126
|
};
|
|
121
127
|
const creatorRender = getCreatorRender();
|
|
128
|
+
if (fg('jira_improve_agent_profile_for_a2a')) {
|
|
129
|
+
const showRovoIcon = (creator === null || creator === void 0 ? void 0 : creator.type) !== 'REMOTE_A2A';
|
|
130
|
+
return creatorRender ? /*#__PURE__*/React.createElement(Box, {
|
|
131
|
+
xcss: styles.clickableItem
|
|
132
|
+
}, showRovoIcon ? /*#__PURE__*/React.createElement(Box, {
|
|
133
|
+
xcss: styles.rovoIconWrapper,
|
|
134
|
+
testId: "rovo-icon-wrapper",
|
|
135
|
+
"aria-hidden": "true"
|
|
136
|
+
}, /*#__PURE__*/React.createElement(RovoIcon, {
|
|
137
|
+
appearance: "brand",
|
|
138
|
+
size: "small"
|
|
139
|
+
})) : null, creatorRender) : null;
|
|
140
|
+
}
|
|
122
141
|
return creatorRender ? /*#__PURE__*/React.createElement(Box, {
|
|
123
142
|
xcss: styles.clickableItem
|
|
124
143
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
@@ -5,6 +5,11 @@ export const messages = defineMessages({
|
|
|
5
5
|
defaultMessage: 'Rovo Agent by {creatorNameWithLink}',
|
|
6
6
|
description: 'Message to show who created this Rovo agent'
|
|
7
7
|
},
|
|
8
|
+
remoteAgentCreatedBy: {
|
|
9
|
+
id: 'ai-mate.agent-profile-info.agent-by',
|
|
10
|
+
defaultMessage: 'Agent by {creatorNameWithLink}',
|
|
11
|
+
description: 'Message to show who built a remote (third-party) agent, shown without the Rovo logo'
|
|
12
|
+
},
|
|
8
13
|
agentDeactivated: {
|
|
9
14
|
id: 'ai-mate.agent-profile-info.deactivated',
|
|
10
15
|
defaultMessage: '(deactivated)',
|
|
@@ -9,7 +9,8 @@ import { Box } from '@atlaskit/primitives/compiled';
|
|
|
9
9
|
var styles = {
|
|
10
10
|
image: "_5ral1dfr _4t3i1osq _1bsb1osq _1e0c1txw _1bah1h6o _4cvr1h6o",
|
|
11
11
|
banner: "_1bsb1osq",
|
|
12
|
-
bannerFillSpace: "_1bsb1osq _4t3i1osq _5ral1dfr"
|
|
12
|
+
bannerFillSpace: "_1bsb1osq _4t3i1osq _5ral1dfr",
|
|
13
|
+
bannerRemoteA2A: "_bfhk7qp0"
|
|
13
14
|
};
|
|
14
15
|
var Observer = function Observer(_ref) {
|
|
15
16
|
var onLoad = _ref.onLoad;
|
|
@@ -552,6 +553,7 @@ export var AgentBanner = function AgentBanner(_ref4) {
|
|
|
552
553
|
agentId = _ref4.agentId,
|
|
553
554
|
agentIdentityAccountId = _ref4.agentIdentityAccountId,
|
|
554
555
|
isRovoDev = _ref4.isRovoDev,
|
|
556
|
+
creatorType = _ref4.creatorType,
|
|
555
557
|
height = _ref4.height,
|
|
556
558
|
fillSpace = _ref4.fillSpace;
|
|
557
559
|
var _getAvatarRender = getAvatarRender({
|
|
@@ -562,10 +564,11 @@ export var AgentBanner = function AgentBanner(_ref4) {
|
|
|
562
564
|
size: 'medium'
|
|
563
565
|
}),
|
|
564
566
|
color = _getAvatarRender.color;
|
|
567
|
+
var isRemoteA2A = fg('jira_improve_agent_profile_for_a2a') && creatorType === 'REMOTE_A2A';
|
|
565
568
|
return /*#__PURE__*/React.createElement(Box, {
|
|
566
|
-
xcss: cx(styles.banner, fillSpace ? styles.bannerFillSpace : undefined),
|
|
569
|
+
xcss: cx(styles.banner, fillSpace ? styles.bannerFillSpace : undefined, isRemoteA2A ? styles.bannerRemoteA2A : undefined),
|
|
567
570
|
style: {
|
|
568
|
-
backgroundColor: color.primary,
|
|
571
|
+
backgroundColor: isRemoteA2A ? undefined : color.primary,
|
|
569
572
|
height: height ? "".concat(height, "px") : undefined
|
|
570
573
|
}
|
|
571
574
|
});
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
._18m915vq{overflow-y:hidden}
|
|
5
5
|
._19bv12x7{padding-left:var(--ds-space-075,6px)}
|
|
6
6
|
._19bvidpf{padding-left:0}
|
|
7
|
+
._19pkze3t{margin-top:var(--ds-space-0,0)}
|
|
7
8
|
._1bsb1osq{width:100%}
|
|
8
9
|
._1bto1l2s{text-overflow:ellipsis}
|
|
9
10
|
._1o9zidpf{flex-shrink:0}
|
|
@@ -13,6 +14,7 @@
|
|
|
13
14
|
._bfhksm61{background-color:var(--ds-background-neutral-subtle,#00000000)}
|
|
14
15
|
._ca0q12x7{padding-top:var(--ds-space-075,6px)}
|
|
15
16
|
._ca0qidpf{padding-top:0}
|
|
17
|
+
._ca0qze3t{padding-top:var(--ds-space-0,0)}
|
|
16
18
|
._k48p1wq8{font-weight:var(--ds-font-weight-medium,500)}
|
|
17
19
|
._n3td12x7{padding-bottom:var(--ds-space-075,6px)}
|
|
18
20
|
._n3tdidpf{padding-bottom:0}
|
|
@@ -8,6 +8,7 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
8
8
|
import React, { useMemo } from 'react';
|
|
9
9
|
import { useIntl } from 'react-intl';
|
|
10
10
|
import { IconButton } from '@atlaskit/button/new';
|
|
11
|
+
import { cx } from '@atlaskit/css';
|
|
11
12
|
import RetryIcon from '@atlaskit/icon/core/retry';
|
|
12
13
|
import { Box, Inline, Pressable, Stack } from '@atlaskit/primitives/compiled';
|
|
13
14
|
import { AgentChatIcon } from '../../common/ui/agent-chat-icon';
|
|
@@ -15,6 +16,8 @@ import { BrowseAgentsPill } from '../../common/ui/chat-pill';
|
|
|
15
16
|
import { messages } from './messages';
|
|
16
17
|
var styles = {
|
|
17
18
|
conversationStartersList: "_qtt8glyw _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _1bsb1osq",
|
|
19
|
+
conversationStartersListWithRefreshDesign: "_19pkze3t",
|
|
20
|
+
conversationStaterItem: "_ca0qze3t",
|
|
18
21
|
conversationStarterIcon: "_1o9zidpf",
|
|
19
22
|
conversationStarterText: "_1reo15vq _18m915vq _1bto1l2s _o5721q9c _1o9zkb7n _1ul9idpf",
|
|
20
23
|
button: "_11c8fhey _2rko12b0 _syazazsu _ca0q12x7 _u5f312x7 _n3td12x7 _19bv12x7 _k48p1wq8 _1bto1l2s _o5721q9c _1o9zkb7n _1bsb1osq _bfhksm61 _irr31dpa _1di6fcek"
|
|
@@ -94,16 +97,19 @@ export var ConversationStarters = function ConversationStarters(_ref3) {
|
|
|
94
97
|
showReloadButton = _ref3$showReloadButto === void 0 ? false : _ref3$showReloadButto,
|
|
95
98
|
_ref3$onReloadButtonC = _ref3.onReloadButtonClick,
|
|
96
99
|
onReloadButtonClick = _ref3$onReloadButtonC === void 0 ? function () {} : _ref3$onReloadButtonC,
|
|
97
|
-
onBrowseAgentsClick = _ref3.onBrowseAgentsClick
|
|
100
|
+
onBrowseAgentsClick = _ref3.onBrowseAgentsClick,
|
|
101
|
+
_ref3$refreshDesignEn = _ref3.refreshDesignEnabled,
|
|
102
|
+
refreshDesignEnabled = _ref3$refreshDesignEn === void 0 ? false : _ref3$refreshDesignEn;
|
|
98
103
|
return /*#__PURE__*/React.createElement(Stack, {
|
|
99
104
|
as: "ul",
|
|
100
105
|
space: "space.050",
|
|
101
|
-
xcss: styles.conversationStartersList
|
|
106
|
+
xcss: cx(styles.conversationStartersList, refreshDesignEnabled && styles.conversationStartersListWithRefreshDesign)
|
|
102
107
|
}, starters.map(function (starter, index) {
|
|
103
108
|
var isLastStarter = index === starters.length - 1;
|
|
104
109
|
var chatPill = /*#__PURE__*/React.createElement(Box, {
|
|
105
110
|
as: "li",
|
|
106
|
-
key: starter.message
|
|
111
|
+
key: starter.message,
|
|
112
|
+
xcss: refreshDesignEnabled && styles.conversationStaterItem
|
|
107
113
|
}, /*#__PURE__*/React.createElement(Pressable, {
|
|
108
114
|
xcss: styles.button,
|
|
109
115
|
onClick: function onClick() {
|
|
@@ -35,7 +35,8 @@ export var getAgentCreator = function getAgentCreator(_ref) {
|
|
|
35
35
|
if (fg('rovo_agent_support_a2a_avatar') ? isForgeAgentByCreatorType(creatorType) : creatorType === 'FORGE' || creatorType === 'THIRD_PARTY' // THIRD_PARTY is deprecated in convo-ai, use FORGE instead
|
|
36
36
|
) {
|
|
37
37
|
return {
|
|
38
|
-
|
|
38
|
+
// @todo: remove cast in rovo_agent_support_a2a_avatar cleanup
|
|
39
|
+
type: fg('jira_improve_agent_profile_for_a2a') ? creatorType : 'FORGE',
|
|
39
40
|
name: forgeCreator !== null && forgeCreator !== void 0 ? forgeCreator : ''
|
|
40
41
|
};
|
|
41
42
|
}
|
|
@@ -108,6 +109,11 @@ export var AgentProfileCreator = function AgentProfileCreator(_ref2) {
|
|
|
108
109
|
}, creator.name, ' ', creator.status === 'inactive' && formatMessage(messages.agentDeactivated))
|
|
109
110
|
});
|
|
110
111
|
}
|
|
112
|
+
if (creator.type === 'REMOTE_A2A') {
|
|
113
|
+
return formatMessage(messages.remoteAgentCreatedBy, {
|
|
114
|
+
creatorNameWithLink: creator.name
|
|
115
|
+
});
|
|
116
|
+
}
|
|
111
117
|
|
|
112
118
|
// THIRD_PARTY is deprecated in convo-ai, use FORGE instead
|
|
113
119
|
if (creator.type === 'THIRD_PARTY' || creator.type === 'FORGE') {
|
|
@@ -118,6 +124,19 @@ export var AgentProfileCreator = function AgentProfileCreator(_ref2) {
|
|
|
118
124
|
return null;
|
|
119
125
|
};
|
|
120
126
|
var creatorRender = getCreatorRender();
|
|
127
|
+
if (fg('jira_improve_agent_profile_for_a2a')) {
|
|
128
|
+
var showRovoIcon = (creator === null || creator === void 0 ? void 0 : creator.type) !== 'REMOTE_A2A';
|
|
129
|
+
return creatorRender ? /*#__PURE__*/React.createElement(Box, {
|
|
130
|
+
xcss: styles.clickableItem
|
|
131
|
+
}, showRovoIcon ? /*#__PURE__*/React.createElement(Box, {
|
|
132
|
+
xcss: styles.rovoIconWrapper,
|
|
133
|
+
testId: "rovo-icon-wrapper",
|
|
134
|
+
"aria-hidden": "true"
|
|
135
|
+
}, /*#__PURE__*/React.createElement(RovoIcon, {
|
|
136
|
+
appearance: "brand",
|
|
137
|
+
size: "small"
|
|
138
|
+
})) : null, creatorRender) : null;
|
|
139
|
+
}
|
|
121
140
|
return creatorRender ? /*#__PURE__*/React.createElement(Box, {
|
|
122
141
|
xcss: styles.clickableItem
|
|
123
142
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
@@ -5,6 +5,11 @@ export var messages = defineMessages({
|
|
|
5
5
|
defaultMessage: 'Rovo Agent by {creatorNameWithLink}',
|
|
6
6
|
description: 'Message to show who created this Rovo agent'
|
|
7
7
|
},
|
|
8
|
+
remoteAgentCreatedBy: {
|
|
9
|
+
id: 'ai-mate.agent-profile-info.agent-by',
|
|
10
|
+
defaultMessage: 'Agent by {creatorNameWithLink}',
|
|
11
|
+
description: 'Message to show who built a remote (third-party) agent, shown without the Rovo logo'
|
|
12
|
+
},
|
|
8
13
|
agentDeactivated: {
|
|
9
14
|
id: 'ai-mate.agent-profile-info.deactivated',
|
|
10
15
|
defaultMessage: '(deactivated)',
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type SizeType } from '@atlaskit/avatar';
|
|
2
|
+
import type { AgentCreatorType } from '../../../common/types';
|
|
2
3
|
export declare const yellowColor: {
|
|
3
4
|
primary: string;
|
|
4
5
|
secondary: string;
|
|
@@ -33,9 +34,12 @@ type GeneratedAvatarProps = {
|
|
|
33
34
|
* cd002f25-46e4-4023-80ff-32e4d90849b4
|
|
34
35
|
*/
|
|
35
36
|
export declare const getNumberIdForAvatar: ({ agentIdentityAccountId, agentId, }: Pick<GeneratedAvatarProps, "agentIdentityAccountId" | "agentId">) => number | null;
|
|
36
|
-
|
|
37
|
+
type AgentBannerCreatorType = AgentCreatorType | 'ROVO_DEV';
|
|
38
|
+
type AgentBannerProps = Pick<GeneratedAvatarProps, 'agentId' | 'agentNamedId' | 'agentIdentityAccountId' | 'isRovoDev'> & {
|
|
39
|
+
creatorType?: AgentBannerCreatorType | null;
|
|
37
40
|
height?: number;
|
|
38
41
|
fillSpace?: boolean;
|
|
39
|
-
}
|
|
42
|
+
};
|
|
43
|
+
export declare const AgentBanner: ({ agentNamedId, agentId, agentIdentityAccountId, isRovoDev, creatorType, height, fillSpace, }: AgentBannerProps) => JSX.Element;
|
|
40
44
|
export declare const GeneratedAvatar: (props: GeneratedAvatarProps) => JSX.Element;
|
|
41
45
|
export {};
|
|
@@ -26,11 +26,12 @@ export type AgentConversationStartersProps = {
|
|
|
26
26
|
} & Omit<ConversationStartersProps, 'starters'>;
|
|
27
27
|
export declare const AgentConversationStarters: ({ userDefinedConversationStarters, isAgentDefault, ...props }: AgentConversationStartersProps) => React.JSX.Element;
|
|
28
28
|
export type ConversationStartersProps = {
|
|
29
|
+
refreshDesignEnabled?: boolean;
|
|
29
30
|
starters: ConversationStarter[];
|
|
30
31
|
onConversationStarterClick: (conversationStarter: ConversationStarter) => void;
|
|
31
32
|
showReloadButton?: boolean;
|
|
32
33
|
onReloadButtonClick?: () => void;
|
|
33
34
|
onBrowseAgentsClick?: () => void;
|
|
34
35
|
};
|
|
35
|
-
export declare const ConversationStarters: ({ starters, onConversationStarterClick, showReloadButton, onReloadButtonClick, onBrowseAgentsClick, }: ConversationStartersProps) => React.JSX.Element;
|
|
36
|
+
export declare const ConversationStarters: ({ starters, onConversationStarterClick, showReloadButton, onReloadButtonClick, onBrowseAgentsClick, refreshDesignEnabled, }: ConversationStartersProps) => React.JSX.Element;
|
|
36
37
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type SizeType } from '@atlaskit/avatar';
|
|
2
|
+
import type { AgentCreatorType } from '../../../common/types';
|
|
2
3
|
export declare const yellowColor: {
|
|
3
4
|
primary: string;
|
|
4
5
|
secondary: string;
|
|
@@ -33,9 +34,12 @@ type GeneratedAvatarProps = {
|
|
|
33
34
|
* cd002f25-46e4-4023-80ff-32e4d90849b4
|
|
34
35
|
*/
|
|
35
36
|
export declare const getNumberIdForAvatar: ({ agentIdentityAccountId, agentId, }: Pick<GeneratedAvatarProps, "agentIdentityAccountId" | "agentId">) => number | null;
|
|
36
|
-
|
|
37
|
+
type AgentBannerCreatorType = AgentCreatorType | 'ROVO_DEV';
|
|
38
|
+
type AgentBannerProps = Pick<GeneratedAvatarProps, 'agentId' | 'agentNamedId' | 'agentIdentityAccountId' | 'isRovoDev'> & {
|
|
39
|
+
creatorType?: AgentBannerCreatorType | null;
|
|
37
40
|
height?: number;
|
|
38
41
|
fillSpace?: boolean;
|
|
39
|
-
}
|
|
42
|
+
};
|
|
43
|
+
export declare const AgentBanner: ({ agentNamedId, agentId, agentIdentityAccountId, isRovoDev, creatorType, height, fillSpace, }: AgentBannerProps) => JSX.Element;
|
|
40
44
|
export declare const GeneratedAvatar: (props: GeneratedAvatarProps) => JSX.Element;
|
|
41
45
|
export {};
|
|
@@ -26,11 +26,12 @@ export type AgentConversationStartersProps = {
|
|
|
26
26
|
} & Omit<ConversationStartersProps, 'starters'>;
|
|
27
27
|
export declare const AgentConversationStarters: ({ userDefinedConversationStarters, isAgentDefault, ...props }: AgentConversationStartersProps) => React.JSX.Element;
|
|
28
28
|
export type ConversationStartersProps = {
|
|
29
|
+
refreshDesignEnabled?: boolean;
|
|
29
30
|
starters: ConversationStarter[];
|
|
30
31
|
onConversationStarterClick: (conversationStarter: ConversationStarter) => void;
|
|
31
32
|
showReloadButton?: boolean;
|
|
32
33
|
onReloadButtonClick?: () => void;
|
|
33
34
|
onBrowseAgentsClick?: () => void;
|
|
34
35
|
};
|
|
35
|
-
export declare const ConversationStarters: ({ starters, onConversationStarterClick, showReloadButton, onReloadButtonClick, onBrowseAgentsClick, }: ConversationStartersProps) => React.JSX.Element;
|
|
36
|
+
export declare const ConversationStarters: ({ starters, onConversationStarterClick, showReloadButton, onReloadButtonClick, onBrowseAgentsClick, refreshDesignEnabled, }: ConversationStartersProps) => React.JSX.Element;
|
|
36
37
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/rovo-agent-components",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.2.0",
|
|
4
4
|
"description": "This package host public components related to rovo agents, the components here are needed for other public atlaskit packages",
|
|
5
5
|
"repository": "https://bitbucket.org/atlassian/atlassian-frontend-monorepo",
|
|
6
6
|
"atlassian": {
|
|
@@ -40,23 +40,23 @@
|
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@atlaskit/afm-i18n-platform-ai-mate-rovo-agent-components": "2.10.0",
|
|
43
|
-
"@atlaskit/analytics-next": "^11.
|
|
43
|
+
"@atlaskit/analytics-next": "^11.3.0",
|
|
44
44
|
"@atlaskit/avatar": "^25.15.0",
|
|
45
45
|
"@atlaskit/button": "^23.11.0",
|
|
46
46
|
"@atlaskit/css": "^0.19.0",
|
|
47
47
|
"@atlaskit/dropdown-menu": "^16.10.0",
|
|
48
48
|
"@atlaskit/flag": "^17.12.0",
|
|
49
49
|
"@atlaskit/heading": "^5.4.0",
|
|
50
|
-
"@atlaskit/icon": "^35.
|
|
50
|
+
"@atlaskit/icon": "^35.4.0",
|
|
51
51
|
"@atlaskit/link": "^3.4.0",
|
|
52
52
|
"@atlaskit/logo": "^20.1.0",
|
|
53
53
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
54
54
|
"@atlaskit/primitives": "^19.0.0",
|
|
55
|
-
"@atlaskit/rovo-agent-analytics": "^2.
|
|
55
|
+
"@atlaskit/rovo-agent-analytics": "^2.1.0",
|
|
56
56
|
"@atlaskit/skeleton": "^2.1.0",
|
|
57
57
|
"@atlaskit/spinner": "^19.1.0",
|
|
58
58
|
"@atlaskit/tokens": "^13.1.0",
|
|
59
|
-
"@atlaskit/tooltip": "^22.
|
|
59
|
+
"@atlaskit/tooltip": "^22.6.0",
|
|
60
60
|
"@babel/runtime": "^7.0.0",
|
|
61
61
|
"@compiled/react": "^0.20.0",
|
|
62
62
|
"react-dom": "^18.2.0",
|
|
@@ -137,6 +137,9 @@
|
|
|
137
137
|
"rovo_agent_support_a2a_avatar": {
|
|
138
138
|
"type": "boolean"
|
|
139
139
|
},
|
|
140
|
+
"jira_improve_agent_profile_for_a2a": {
|
|
141
|
+
"type": "boolean"
|
|
142
|
+
},
|
|
140
143
|
"jira_browse_agents_modal": {
|
|
141
144
|
"type": "boolean"
|
|
142
145
|
}
|