@atlaskit/rovo-agent-components 8.15.4 → 9.0.1
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 +23 -0
- package/dist/cjs/ui/agent-conversation-starters/index.js +1 -22
- package/dist/cjs/ui/agent-dropdown-menu/AgentDropdownMenu.js +26 -9
- package/dist/cjs/ui/agent-profile-info/index.js +0 -4
- package/dist/es2019/ui/agent-conversation-starters/index.js +1 -20
- package/dist/es2019/ui/agent-dropdown-menu/AgentDropdownMenu.js +25 -13
- package/dist/es2019/ui/agent-profile-info/index.js +0 -4
- package/dist/esm/ui/agent-conversation-starters/index.js +1 -20
- package/dist/esm/ui/agent-dropdown-menu/AgentDropdownMenu.js +25 -8
- package/dist/esm/ui/agent-profile-info/index.js +0 -4
- package/dist/types/ui/agent-conversation-starters/index.d.ts +0 -12
- package/dist/types/ui/agent-dropdown-menu/AgentDropdownMenu.d.ts +2 -1
- package/package.json +12 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @atlaskit/rovo-agent-components
|
|
2
2
|
|
|
3
|
+
## 9.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 9.0.0
|
|
10
|
+
|
|
11
|
+
### Major Changes
|
|
12
|
+
|
|
13
|
+
- [`0c7c7be927bde`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0c7c7be927bde) -
|
|
14
|
+
Remove deprecated Volt re-export shims from public package entry points. Consumers should import
|
|
15
|
+
from the replacement subpaths or implementation entry points instead.
|
|
16
|
+
|
|
17
|
+
### Minor Changes
|
|
18
|
+
|
|
19
|
+
- [`00fad91fb24eb`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/00fad91fb24eb) -
|
|
20
|
+
Add gated agent duplication permission support and hide unauthorized duplicate actions.
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- Updated dependencies
|
|
25
|
+
|
|
3
26
|
## 8.15.4
|
|
4
27
|
|
|
5
28
|
### Patch Changes
|
|
@@ -2,25 +2,4 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "AgentConversationStarters", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function get() {
|
|
9
|
-
return _AgentConversationStarters.AgentConversationStarters;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "ConversationStarters", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function get() {
|
|
15
|
-
return _ConversationStarters.ConversationStarters;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
Object.defineProperty(exports, "getConversationStarters", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function get() {
|
|
21
|
-
return _getConversationStarters.getConversationStarters;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
var _getConversationStarters = require("./getConversationStarters");
|
|
25
|
-
var _AgentConversationStarters = require("./AgentConversationStarters");
|
|
26
|
-
var _ConversationStarters = require("./ConversationStarters");
|
|
5
|
+
});
|
|
@@ -26,7 +26,7 @@ var _spinner = _interopRequireDefault(require("@atlaskit/spinner/spinner"));
|
|
|
26
26
|
var _agentVerificationDropdownItem = require("../agent-verification-dropdown-item");
|
|
27
27
|
var _messages = _interopRequireDefault(require("./messages"));
|
|
28
28
|
var _excluded = ["triggerRef"];
|
|
29
|
-
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
|
|
29
|
+
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 _t2 in e) "default" !== _t2 && {}.hasOwnProperty.call(e, _t2) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t2)) && (i.get || i.set) ? o(f, _t2, i) : f[_t2] = e[_t2]); return f; })(e, t); }
|
|
30
30
|
var AgentDropdownMenu = exports.AgentDropdownMenu = function AgentDropdownMenu(_ref) {
|
|
31
31
|
var isAutodevTemplateAgent = _ref.isAutodevTemplateAgent,
|
|
32
32
|
onEditAgent = _ref.onEditAgent,
|
|
@@ -35,7 +35,6 @@ var AgentDropdownMenu = exports.AgentDropdownMenu = function AgentDropdownMenu(_
|
|
|
35
35
|
onDeleteAgent = _ref.onDeleteAgent,
|
|
36
36
|
onViewAgentFullProfileClick = _ref.onViewAgentFullProfileClick,
|
|
37
37
|
_onOpenChange = _ref.onOpenChange,
|
|
38
|
-
isForgeAgent = _ref.isForgeAgent,
|
|
39
38
|
_ref$showDeleteOption = _ref.showDeleteOption,
|
|
40
39
|
showDeleteOption = _ref$showDeleteOption === void 0 ? true : _ref$showDeleteOption,
|
|
41
40
|
_ref$showViewAgentOpt = _ref.showViewAgentOption,
|
|
@@ -80,29 +79,46 @@ var AgentDropdownMenu = exports.AgentDropdownMenu = function AgentDropdownMenu(_
|
|
|
80
79
|
(0, _react.useEffect)(function () {
|
|
81
80
|
var fetchData = /*#__PURE__*/function () {
|
|
82
81
|
var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
83
|
-
var _yield$loadAgentPermi, isCreateEnabled, isEditEnabled, isDeleteEnabled;
|
|
82
|
+
var _yield$loadAgentPermi, isCreateEnabled, isDuplicateEnabled, isEditEnabled, isDeleteEnabled, _t;
|
|
84
83
|
return _regenerator.default.wrap(function (_context) {
|
|
85
84
|
while (1) switch (_context.prev = _context.next) {
|
|
86
85
|
case 0:
|
|
87
86
|
setIsLoading(true);
|
|
88
|
-
_context.
|
|
87
|
+
_context.prev = 1;
|
|
88
|
+
_context.next = 2;
|
|
89
89
|
return loadAgentPermissions();
|
|
90
|
-
case
|
|
90
|
+
case 2:
|
|
91
91
|
_yield$loadAgentPermi = _context.sent;
|
|
92
92
|
isCreateEnabled = _yield$loadAgentPermi.isCreateEnabled;
|
|
93
|
+
isDuplicateEnabled = _yield$loadAgentPermi.isDuplicateEnabled;
|
|
93
94
|
isEditEnabled = _yield$loadAgentPermi.isEditEnabled;
|
|
94
95
|
isDeleteEnabled = _yield$loadAgentPermi.isDeleteEnabled;
|
|
95
|
-
setIsLoading(false);
|
|
96
96
|
setPermissions({
|
|
97
97
|
isCreateEnabled: isCreateEnabled,
|
|
98
|
+
isDuplicateEnabled: isDuplicateEnabled,
|
|
98
99
|
isEditEnabled: isEditEnabled,
|
|
99
100
|
isDeleteEnabled: isDeleteEnabled
|
|
100
101
|
});
|
|
101
|
-
|
|
102
|
+
_context.next = 4;
|
|
103
|
+
break;
|
|
104
|
+
case 3:
|
|
105
|
+
_context.prev = 3;
|
|
106
|
+
_t = _context["catch"](1);
|
|
107
|
+
setPermissions({
|
|
108
|
+
isCreateEnabled: false,
|
|
109
|
+
isDuplicateEnabled: false,
|
|
110
|
+
isEditEnabled: false,
|
|
111
|
+
isDeleteEnabled: false
|
|
112
|
+
});
|
|
113
|
+
case 4:
|
|
114
|
+
_context.prev = 4;
|
|
115
|
+
setIsLoading(false);
|
|
116
|
+
return _context.finish(4);
|
|
117
|
+
case 5:
|
|
102
118
|
case "end":
|
|
103
119
|
return _context.stop();
|
|
104
120
|
}
|
|
105
|
-
}, _callee);
|
|
121
|
+
}, _callee, null, [[1, 3, 4, 5]]);
|
|
106
122
|
}));
|
|
107
123
|
return function fetchData() {
|
|
108
124
|
return _ref2.apply(this, arguments);
|
|
@@ -132,6 +148,7 @@ var AgentDropdownMenu = exports.AgentDropdownMenu = function AgentDropdownMenu(_
|
|
|
132
148
|
}, formatMessage(_messages.default.deleteAgent)));
|
|
133
149
|
};
|
|
134
150
|
var isCreateAgentsEnabled = permissions === null || permissions === void 0 ? void 0 : permissions.isCreateEnabled;
|
|
151
|
+
var isDuplicateAgentEnabled = !(0, _fg.fg)('agent_studio_can_duplicate_permission') || (permissions === null || permissions === void 0 ? void 0 : permissions.isDuplicateEnabled);
|
|
135
152
|
return /*#__PURE__*/_react.default.createElement(_dropdownMenu.default, {
|
|
136
153
|
shouldRenderToParent: shouldRenderToParent,
|
|
137
154
|
isLoading: isLoading,
|
|
@@ -176,7 +193,7 @@ var AgentDropdownMenu = exports.AgentDropdownMenu = function AgentDropdownMenu(_
|
|
|
176
193
|
onClick: onViewAgentClick
|
|
177
194
|
}, formatMessage(_messages.default.viewAgent)), doesAgentHaveIdentityAccountId && onViewAgentFullProfileClick && /*#__PURE__*/_react.default.createElement(_dropdownMenuItem.default, {
|
|
178
195
|
onClick: onViewAgentFullProfileClick
|
|
179
|
-
}, formatMessage(_messages.default.viewAgentFullProfile)),
|
|
196
|
+
}, formatMessage(_messages.default.viewAgentFullProfile)), isCreateAgentsEnabled && isDuplicateAgentEnabled && /*#__PURE__*/_react.default.createElement(_dropdownMenuItem.default, {
|
|
180
197
|
onClick: ( /*#__PURE__*/function () {
|
|
181
198
|
var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(e) {
|
|
182
199
|
return _regenerator.default.wrap(function (_context2) {
|
|
@@ -10,7 +10,6 @@ require("./index.compiled.css");
|
|
|
10
10
|
var _runtime = require("@compiled/react/runtime");
|
|
11
11
|
var _react = _interopRequireDefault(require("react"));
|
|
12
12
|
var _reactIntl = require("react-intl");
|
|
13
|
-
var _featureGates = _interopRequireDefault(require("@atlaskit/feature-gate-js-client/feature-gates"));
|
|
14
13
|
var _heading = _interopRequireDefault(require("@atlaskit/heading/heading"));
|
|
15
14
|
var _link = _interopRequireDefault(require("@atlaskit/link/link"));
|
|
16
15
|
var _logo = require("@atlaskit/logo");
|
|
@@ -123,9 +122,6 @@ var AgentProfileCreator = exports.AgentProfileCreator = function AgentProfileCre
|
|
|
123
122
|
});
|
|
124
123
|
}
|
|
125
124
|
if (creator.type === 'REMOTE_A2A') {
|
|
126
|
-
if (_featureGates.default.getExperimentValue('rovo_hide_remote_a2a_agent_creator_exp', 'isEnabled', false)) {
|
|
127
|
-
return null;
|
|
128
|
-
}
|
|
129
125
|
return formatMessage(_messages.messages.remoteAgentCreatedBy, {
|
|
130
126
|
creatorNameWithLink: creator.name
|
|
131
127
|
});
|
|
@@ -1,20 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @deprecated Use `import { getConversationStarters } from '@atlaskit/rovo-agent-components/get-conversation-starters'` instead.
|
|
5
|
-
*/
|
|
6
|
-
// eslint-disable-next-line no-barrel-files/no-barrel-files -- VOLTC-139 tracks removal of this deprecated re-export shim.
|
|
7
|
-
export { getConversationStarters } from './getConversationStarters';
|
|
8
|
-
/**
|
|
9
|
-
* @deprecated Use `import { AgentConversationStarters } from '@atlaskit/rovo-agent-components/agent-conversation-starters'` instead.
|
|
10
|
-
*/
|
|
11
|
-
// eslint-disable-next-line no-barrel-files/no-barrel-files -- VOLTC-139 tracks removal of this deprecated re-export shim.
|
|
12
|
-
export { AgentConversationStarters } from './AgentConversationStarters';
|
|
13
|
-
// eslint-disable-next-line no-barrel-files/no-barrel-files -- VOLTC-139 tracks removal of this deprecated re-export shim.
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* @deprecated Use `import { ConversationStarters } from '@atlaskit/rovo-agent-components/conversation-starters'` instead.
|
|
17
|
-
*/
|
|
18
|
-
// eslint-disable-next-line no-barrel-files/no-barrel-files -- VOLTC-139 tracks removal of this deprecated re-export shim.
|
|
19
|
-
export { ConversationStarters } from './ConversationStarters';
|
|
20
|
-
// eslint-disable-next-line no-barrel-files/no-barrel-files -- VOLTC-139 tracks removal of this deprecated re-export shim.
|
|
1
|
+
export {};
|
|
@@ -21,7 +21,6 @@ export const AgentDropdownMenu = ({
|
|
|
21
21
|
onDeleteAgent,
|
|
22
22
|
onViewAgentFullProfileClick,
|
|
23
23
|
onOpenChange,
|
|
24
|
-
isForgeAgent,
|
|
25
24
|
showDeleteOption = true,
|
|
26
25
|
showViewAgentOption = false,
|
|
27
26
|
onViewAgentClick,
|
|
@@ -51,17 +50,29 @@ export const AgentDropdownMenu = ({
|
|
|
51
50
|
useEffect(() => {
|
|
52
51
|
const fetchData = async () => {
|
|
53
52
|
setIsLoading(true);
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
53
|
+
try {
|
|
54
|
+
const {
|
|
55
|
+
isCreateEnabled,
|
|
56
|
+
isDuplicateEnabled,
|
|
57
|
+
isEditEnabled,
|
|
58
|
+
isDeleteEnabled
|
|
59
|
+
} = await loadAgentPermissions();
|
|
60
|
+
setPermissions({
|
|
61
|
+
isCreateEnabled,
|
|
62
|
+
isDuplicateEnabled,
|
|
63
|
+
isEditEnabled,
|
|
64
|
+
isDeleteEnabled
|
|
65
|
+
});
|
|
66
|
+
} catch {
|
|
67
|
+
setPermissions({
|
|
68
|
+
isCreateEnabled: false,
|
|
69
|
+
isDuplicateEnabled: false,
|
|
70
|
+
isEditEnabled: false,
|
|
71
|
+
isDeleteEnabled: false
|
|
72
|
+
});
|
|
73
|
+
} finally {
|
|
74
|
+
setIsLoading(false);
|
|
75
|
+
}
|
|
65
76
|
};
|
|
66
77
|
|
|
67
78
|
// Only load once
|
|
@@ -87,6 +98,7 @@ export const AgentDropdownMenu = ({
|
|
|
87
98
|
}, formatMessage(messages.deleteAgent)));
|
|
88
99
|
};
|
|
89
100
|
const isCreateAgentsEnabled = permissions === null || permissions === void 0 ? void 0 : permissions.isCreateEnabled;
|
|
101
|
+
const isDuplicateAgentEnabled = !fg('agent_studio_can_duplicate_permission') || (permissions === null || permissions === void 0 ? void 0 : permissions.isDuplicateEnabled);
|
|
90
102
|
return /*#__PURE__*/React.createElement(DropdownMenu, {
|
|
91
103
|
shouldRenderToParent: shouldRenderToParent,
|
|
92
104
|
isLoading: isLoading,
|
|
@@ -128,7 +140,7 @@ export const AgentDropdownMenu = ({
|
|
|
128
140
|
onClick: onViewAgentClick
|
|
129
141
|
}, formatMessage(messages.viewAgent)), doesAgentHaveIdentityAccountId && onViewAgentFullProfileClick && /*#__PURE__*/React.createElement(DropdownItem, {
|
|
130
142
|
onClick: onViewAgentFullProfileClick
|
|
131
|
-
}, formatMessage(messages.viewAgentFullProfile)),
|
|
143
|
+
}, formatMessage(messages.viewAgentFullProfile)), isCreateAgentsEnabled && isDuplicateAgentEnabled && /*#__PURE__*/React.createElement(DropdownItem, {
|
|
132
144
|
onClick: async e => {
|
|
133
145
|
if (fg('rovo_agent_versioning_enabled')) {
|
|
134
146
|
e.stopPropagation();
|
|
@@ -3,7 +3,6 @@ import "./index.compiled.css";
|
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { useIntl } from 'react-intl';
|
|
6
|
-
import FeatureGates from '@atlaskit/feature-gate-js-client/feature-gates';
|
|
7
6
|
import Heading from '@atlaskit/heading/heading';
|
|
8
7
|
import Link from '@atlaskit/link/link';
|
|
9
8
|
import { RovoIcon } from '@atlaskit/logo';
|
|
@@ -116,9 +115,6 @@ export const AgentProfileCreator = ({
|
|
|
116
115
|
});
|
|
117
116
|
}
|
|
118
117
|
if (creator.type === 'REMOTE_A2A') {
|
|
119
|
-
if (FeatureGates.getExperimentValue('rovo_hide_remote_a2a_agent_creator_exp', 'isEnabled', false)) {
|
|
120
|
-
return null;
|
|
121
|
-
}
|
|
122
118
|
return formatMessage(messages.remoteAgentCreatedBy, {
|
|
123
119
|
creatorNameWithLink: creator.name
|
|
124
120
|
});
|
|
@@ -1,20 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @deprecated Use `import { getConversationStarters } from '@atlaskit/rovo-agent-components/get-conversation-starters'` instead.
|
|
5
|
-
*/
|
|
6
|
-
// eslint-disable-next-line no-barrel-files/no-barrel-files -- VOLTC-139 tracks removal of this deprecated re-export shim.
|
|
7
|
-
export { getConversationStarters } from './getConversationStarters';
|
|
8
|
-
/**
|
|
9
|
-
* @deprecated Use `import { AgentConversationStarters } from '@atlaskit/rovo-agent-components/agent-conversation-starters'` instead.
|
|
10
|
-
*/
|
|
11
|
-
// eslint-disable-next-line no-barrel-files/no-barrel-files -- VOLTC-139 tracks removal of this deprecated re-export shim.
|
|
12
|
-
export { AgentConversationStarters } from './AgentConversationStarters';
|
|
13
|
-
// eslint-disable-next-line no-barrel-files/no-barrel-files -- VOLTC-139 tracks removal of this deprecated re-export shim.
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* @deprecated Use `import { ConversationStarters } from '@atlaskit/rovo-agent-components/conversation-starters'` instead.
|
|
17
|
-
*/
|
|
18
|
-
// eslint-disable-next-line no-barrel-files/no-barrel-files -- VOLTC-139 tracks removal of this deprecated re-export shim.
|
|
19
|
-
export { ConversationStarters } from './ConversationStarters';
|
|
20
|
-
// eslint-disable-next-line no-barrel-files/no-barrel-files -- VOLTC-139 tracks removal of this deprecated re-export shim.
|
|
1
|
+
export {};
|
|
@@ -26,7 +26,6 @@ export var AgentDropdownMenu = function AgentDropdownMenu(_ref) {
|
|
|
26
26
|
onDeleteAgent = _ref.onDeleteAgent,
|
|
27
27
|
onViewAgentFullProfileClick = _ref.onViewAgentFullProfileClick,
|
|
28
28
|
_onOpenChange = _ref.onOpenChange,
|
|
29
|
-
isForgeAgent = _ref.isForgeAgent,
|
|
30
29
|
_ref$showDeleteOption = _ref.showDeleteOption,
|
|
31
30
|
showDeleteOption = _ref$showDeleteOption === void 0 ? true : _ref$showDeleteOption,
|
|
32
31
|
_ref$showViewAgentOpt = _ref.showViewAgentOption,
|
|
@@ -71,29 +70,46 @@ export var AgentDropdownMenu = function AgentDropdownMenu(_ref) {
|
|
|
71
70
|
useEffect(function () {
|
|
72
71
|
var fetchData = /*#__PURE__*/function () {
|
|
73
72
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
74
|
-
var _yield$loadAgentPermi, isCreateEnabled, isEditEnabled, isDeleteEnabled;
|
|
73
|
+
var _yield$loadAgentPermi, isCreateEnabled, isDuplicateEnabled, isEditEnabled, isDeleteEnabled, _t;
|
|
75
74
|
return _regeneratorRuntime.wrap(function (_context) {
|
|
76
75
|
while (1) switch (_context.prev = _context.next) {
|
|
77
76
|
case 0:
|
|
78
77
|
setIsLoading(true);
|
|
79
|
-
_context.
|
|
78
|
+
_context.prev = 1;
|
|
79
|
+
_context.next = 2;
|
|
80
80
|
return loadAgentPermissions();
|
|
81
|
-
case
|
|
81
|
+
case 2:
|
|
82
82
|
_yield$loadAgentPermi = _context.sent;
|
|
83
83
|
isCreateEnabled = _yield$loadAgentPermi.isCreateEnabled;
|
|
84
|
+
isDuplicateEnabled = _yield$loadAgentPermi.isDuplicateEnabled;
|
|
84
85
|
isEditEnabled = _yield$loadAgentPermi.isEditEnabled;
|
|
85
86
|
isDeleteEnabled = _yield$loadAgentPermi.isDeleteEnabled;
|
|
86
|
-
setIsLoading(false);
|
|
87
87
|
setPermissions({
|
|
88
88
|
isCreateEnabled: isCreateEnabled,
|
|
89
|
+
isDuplicateEnabled: isDuplicateEnabled,
|
|
89
90
|
isEditEnabled: isEditEnabled,
|
|
90
91
|
isDeleteEnabled: isDeleteEnabled
|
|
91
92
|
});
|
|
92
|
-
|
|
93
|
+
_context.next = 4;
|
|
94
|
+
break;
|
|
95
|
+
case 3:
|
|
96
|
+
_context.prev = 3;
|
|
97
|
+
_t = _context["catch"](1);
|
|
98
|
+
setPermissions({
|
|
99
|
+
isCreateEnabled: false,
|
|
100
|
+
isDuplicateEnabled: false,
|
|
101
|
+
isEditEnabled: false,
|
|
102
|
+
isDeleteEnabled: false
|
|
103
|
+
});
|
|
104
|
+
case 4:
|
|
105
|
+
_context.prev = 4;
|
|
106
|
+
setIsLoading(false);
|
|
107
|
+
return _context.finish(4);
|
|
108
|
+
case 5:
|
|
93
109
|
case "end":
|
|
94
110
|
return _context.stop();
|
|
95
111
|
}
|
|
96
|
-
}, _callee);
|
|
112
|
+
}, _callee, null, [[1, 3, 4, 5]]);
|
|
97
113
|
}));
|
|
98
114
|
return function fetchData() {
|
|
99
115
|
return _ref2.apply(this, arguments);
|
|
@@ -123,6 +139,7 @@ export var AgentDropdownMenu = function AgentDropdownMenu(_ref) {
|
|
|
123
139
|
}, formatMessage(messages.deleteAgent)));
|
|
124
140
|
};
|
|
125
141
|
var isCreateAgentsEnabled = permissions === null || permissions === void 0 ? void 0 : permissions.isCreateEnabled;
|
|
142
|
+
var isDuplicateAgentEnabled = !fg('agent_studio_can_duplicate_permission') || (permissions === null || permissions === void 0 ? void 0 : permissions.isDuplicateEnabled);
|
|
126
143
|
return /*#__PURE__*/React.createElement(DropdownMenu, {
|
|
127
144
|
shouldRenderToParent: shouldRenderToParent,
|
|
128
145
|
isLoading: isLoading,
|
|
@@ -167,7 +184,7 @@ export var AgentDropdownMenu = function AgentDropdownMenu(_ref) {
|
|
|
167
184
|
onClick: onViewAgentClick
|
|
168
185
|
}, formatMessage(messages.viewAgent)), doesAgentHaveIdentityAccountId && onViewAgentFullProfileClick && /*#__PURE__*/React.createElement(DropdownItem, {
|
|
169
186
|
onClick: onViewAgentFullProfileClick
|
|
170
|
-
}, formatMessage(messages.viewAgentFullProfile)),
|
|
187
|
+
}, formatMessage(messages.viewAgentFullProfile)), isCreateAgentsEnabled && isDuplicateAgentEnabled && /*#__PURE__*/React.createElement(DropdownItem, {
|
|
171
188
|
onClick: ( /*#__PURE__*/function () {
|
|
172
189
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(e) {
|
|
173
190
|
return _regeneratorRuntime.wrap(function (_context2) {
|
|
@@ -3,7 +3,6 @@ import "./index.compiled.css";
|
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { useIntl } from 'react-intl';
|
|
6
|
-
import FeatureGates from '@atlaskit/feature-gate-js-client/feature-gates';
|
|
7
6
|
import Heading from '@atlaskit/heading/heading';
|
|
8
7
|
import Link from '@atlaskit/link/link';
|
|
9
8
|
import { RovoIcon } from '@atlaskit/logo';
|
|
@@ -116,9 +115,6 @@ export var AgentProfileCreator = function AgentProfileCreator(_ref2) {
|
|
|
116
115
|
});
|
|
117
116
|
}
|
|
118
117
|
if (creator.type === 'REMOTE_A2A') {
|
|
119
|
-
if (FeatureGates.getExperimentValue('rovo_hide_remote_a2a_agent_creator_exp', 'isEnabled', false)) {
|
|
120
|
-
return null;
|
|
121
|
-
}
|
|
122
118
|
return formatMessage(messages.remoteAgentCreatedBy, {
|
|
123
119
|
creatorNameWithLink: creator.name
|
|
124
120
|
});
|
|
@@ -8,17 +8,5 @@ export type StaticAgentConversationStarter = {
|
|
|
8
8
|
message: MessageDescriptor;
|
|
9
9
|
type: ConversationStarterType;
|
|
10
10
|
};
|
|
11
|
-
/**
|
|
12
|
-
* @deprecated Use `import { getConversationStarters } from '@atlaskit/rovo-agent-components/get-conversation-starters'` instead.
|
|
13
|
-
*/
|
|
14
|
-
export { getConversationStarters } from './getConversationStarters';
|
|
15
|
-
/**
|
|
16
|
-
* @deprecated Use `import { AgentConversationStarters } from '@atlaskit/rovo-agent-components/agent-conversation-starters'` instead.
|
|
17
|
-
*/
|
|
18
|
-
export { AgentConversationStarters } from './AgentConversationStarters';
|
|
19
11
|
export type { AgentConversationStartersProps } from './AgentConversationStarters';
|
|
20
|
-
/**
|
|
21
|
-
* @deprecated Use `import { ConversationStarters } from '@atlaskit/rovo-agent-components/conversation-starters'` instead.
|
|
22
|
-
*/
|
|
23
|
-
export { ConversationStarters } from './ConversationStarters';
|
|
24
12
|
export type { ConversationStartersProps } from './ConversationStarters';
|
|
@@ -48,10 +48,11 @@ type AgentDropdownMenuProps = {
|
|
|
48
48
|
shouldRenderToParent?: DropdownMenuProps['shouldRenderToParent'];
|
|
49
49
|
loadAgentPermissions: () => Promise<{
|
|
50
50
|
isCreateEnabled?: boolean;
|
|
51
|
+
isDuplicateEnabled?: boolean;
|
|
51
52
|
isEditEnabled: boolean;
|
|
52
53
|
isDeleteEnabled: boolean;
|
|
53
54
|
}>;
|
|
54
55
|
customDropdownOptions?: CustomDropdownOption[];
|
|
55
56
|
} & ViewAgentOptionProps & ViewAgentFullProfileProps & Partial<Pick<AgentVerificationDropdownItemProps, 'agentRef' | 'userPermissionsRef' | 'onVerificationSuccess'>>;
|
|
56
|
-
export declare const AgentDropdownMenu: ({ isAutodevTemplateAgent, onEditAgent, onCopyAgent, onDuplicateAgent, onDeleteAgent, onViewAgentFullProfileClick, onOpenChange,
|
|
57
|
+
export declare const AgentDropdownMenu: ({ isAutodevTemplateAgent, onEditAgent, onCopyAgent, onDuplicateAgent, onDeleteAgent, onViewAgentFullProfileClick, onOpenChange, showDeleteOption, showViewAgentOption, onViewAgentClick, onDropdownTriggerClick, spacing, appearance, dropdownMenuTestId, doesAgentHaveIdentityAccountId, loadAgentPermissions, loadPermissionsOnMount, shouldTriggerStopPropagation, shouldRenderToParent, agentName, agentRef, userPermissionsRef, onVerificationSuccess, customDropdownOptions, }: AgentDropdownMenuProps) => JSX.Element;
|
|
57
58
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/rovo-agent-components",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.1",
|
|
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": {
|
|
@@ -36,24 +36,24 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@atlaskit/afm-i18n-platform-ai-mate-rovo-agent-components": "2.258.0",
|
|
38
38
|
"@atlaskit/analytics-next": "^12.5.0",
|
|
39
|
-
"@atlaskit/avatar": "^
|
|
39
|
+
"@atlaskit/avatar": "^29.0.0",
|
|
40
40
|
"@atlaskit/button": "^25.4.0",
|
|
41
41
|
"@atlaskit/css": "^1.1.0",
|
|
42
42
|
"@atlaskit/dropdown-menu": "^18.3.0",
|
|
43
|
-
"@atlaskit/feature-gate-js-client": "^
|
|
44
|
-
"@atlaskit/flag": "^
|
|
45
|
-
"@atlaskit/heading": "^
|
|
46
|
-
"@atlaskit/icon": "^
|
|
43
|
+
"@atlaskit/feature-gate-js-client": "^7.0.0",
|
|
44
|
+
"@atlaskit/flag": "^19.0.0",
|
|
45
|
+
"@atlaskit/heading": "^8.0.0",
|
|
46
|
+
"@atlaskit/icon": "^38.0.0",
|
|
47
47
|
"@atlaskit/link": "^5.1.0",
|
|
48
|
-
"@atlaskit/logo": "^23.
|
|
48
|
+
"@atlaskit/logo": "^23.2.0",
|
|
49
49
|
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
50
50
|
"@atlaskit/primitives": "^22.5.0",
|
|
51
51
|
"@atlaskit/react-compiler-gating": "^0.2.0",
|
|
52
52
|
"@atlaskit/rovo-agent-analytics": "^6.4.0",
|
|
53
53
|
"@atlaskit/skeleton": "^4.4.0",
|
|
54
54
|
"@atlaskit/spinner": "^20.4.0",
|
|
55
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
56
|
-
"@atlaskit/tokens": "^
|
|
55
|
+
"@atlaskit/tmp-editor-statsig": "^206.0.0",
|
|
56
|
+
"@atlaskit/tokens": "^20.0.0",
|
|
57
57
|
"@atlaskit/tooltip": "^24.3.0",
|
|
58
58
|
"@babel/runtime": "^7.0.0",
|
|
59
59
|
"@compiled/react": "^1.0.2",
|
|
@@ -83,6 +83,9 @@
|
|
|
83
83
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
84
84
|
},
|
|
85
85
|
"platform-feature-flags": {
|
|
86
|
+
"agent_studio_can_duplicate_permission": {
|
|
87
|
+
"type": "boolean"
|
|
88
|
+
},
|
|
86
89
|
"platform-dst-motion-uplift-custom-button": {
|
|
87
90
|
"type": "boolean",
|
|
88
91
|
"referenceOnly": true
|