@atlaskit/rovo-agent-components 3.29.0 → 3.31.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 +15 -0
- package/dist/cjs/ui/agent-dropdown-menu/index.js +3 -2
- package/dist/cjs/ui/agent-dropdown-menu/messages.js +0 -10
- package/dist/cjs/ui/agent-verification-dropdown-item/index.js +4 -2
- package/dist/cjs/ui/agent-verification-dropdown-item/messages.js +6 -6
- package/dist/es2019/ui/agent-dropdown-menu/index.js +3 -2
- package/dist/es2019/ui/agent-dropdown-menu/messages.js +0 -10
- package/dist/es2019/ui/agent-verification-dropdown-item/index.js +4 -2
- package/dist/es2019/ui/agent-verification-dropdown-item/messages.js +6 -6
- package/dist/esm/ui/agent-dropdown-menu/index.js +3 -2
- package/dist/esm/ui/agent-dropdown-menu/messages.js +0 -10
- package/dist/esm/ui/agent-verification-dropdown-item/index.js +4 -2
- package/dist/esm/ui/agent-verification-dropdown-item/messages.js +6 -6
- package/dist/types/ui/agent-dropdown-menu/index.d.ts +2 -2
- package/dist/types/ui/agent-dropdown-menu/messages.d.ts +0 -10
- package/dist/types/ui/agent-verification-dropdown-item/index.d.ts +7 -2
- package/dist/types-ts4.5/ui/agent-dropdown-menu/index.d.ts +2 -2
- package/dist/types-ts4.5/ui/agent-dropdown-menu/messages.d.ts +0 -10
- package/dist/types-ts4.5/ui/agent-verification-dropdown-item/index.d.ts +7 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/rovo-agent-components
|
|
2
2
|
|
|
3
|
+
## 3.31.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`8f3aaeeed50ec`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8f3aaeeed50ec) -
|
|
8
|
+
Change copy from 'Unverify agent' to 'Remove verification'
|
|
9
|
+
|
|
10
|
+
## 3.30.0
|
|
11
|
+
|
|
12
|
+
### Minor Changes
|
|
13
|
+
|
|
14
|
+
- [`ab19c61b46546`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ab19c61b46546) -
|
|
15
|
+
pass onVerificationSuccess to verification dropdown in browse agent to handle relay connection
|
|
16
|
+
update
|
|
17
|
+
|
|
3
18
|
## 3.29.0
|
|
4
19
|
|
|
5
20
|
### Minor Changes
|
|
@@ -56,7 +56,6 @@ var ChatToAgentButton = exports.ChatToAgentButton = function ChatToAgentButton(_
|
|
|
56
56
|
};
|
|
57
57
|
var AgentDropdownMenu = exports.AgentDropdownMenu = function AgentDropdownMenu(_ref2) {
|
|
58
58
|
var isAutodevTemplateAgent = _ref2.isAutodevTemplateAgent,
|
|
59
|
-
agentId = _ref2.agentId,
|
|
60
59
|
onEditAgent = _ref2.onEditAgent,
|
|
61
60
|
onCopyAgent = _ref2.onCopyAgent,
|
|
62
61
|
onDuplicateAgent = _ref2.onDuplicateAgent,
|
|
@@ -77,7 +76,8 @@ var AgentDropdownMenu = exports.AgentDropdownMenu = function AgentDropdownMenu(_
|
|
|
77
76
|
shouldTriggerStopPropagation = _ref2.shouldTriggerStopPropagation,
|
|
78
77
|
agentName = _ref2.agentName,
|
|
79
78
|
agentRef = _ref2.agentRef,
|
|
80
|
-
userPermissionsRef = _ref2.userPermissionsRef
|
|
79
|
+
userPermissionsRef = _ref2.userPermissionsRef,
|
|
80
|
+
onVerificationSuccess = _ref2.onVerificationSuccess;
|
|
81
81
|
var _useState = (0, _react.useState)(false),
|
|
82
82
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
83
83
|
isLoading = _useState2[0],
|
|
@@ -200,6 +200,7 @@ var AgentDropdownMenu = exports.AgentDropdownMenu = function AgentDropdownMenu(_
|
|
|
200
200
|
}, formatMessage(hasBeenCopied ? _messages.default.linkedCopiedToProfile : _messages.default.copyLinkToProfile)), agentRef && userPermissionsRef && (0, _platformFeatureFlags.fg)('rovo_agents_agent_verification') && /*#__PURE__*/_react.default.createElement(_agentVerificationDropdownItem.AgentVerificationDropdownItem, {
|
|
201
201
|
agentRef: agentRef !== null && agentRef !== void 0 ? agentRef : null,
|
|
202
202
|
userPermissionsRef: userPermissionsRef !== null && userPermissionsRef !== void 0 ? userPermissionsRef : null,
|
|
203
|
+
onVerificationSuccess: onVerificationSuccess,
|
|
203
204
|
testId: "agent-actions-menu-verification"
|
|
204
205
|
})), renderEditDelete());
|
|
205
206
|
};
|
|
@@ -60,15 +60,5 @@ var _default = exports.default = (0, _reactIntlNext.defineMessages)({
|
|
|
60
60
|
id: 'rovo-chat.view-agents.use-template-button',
|
|
61
61
|
defaultMessage: 'Use template',
|
|
62
62
|
description: 'Button to copy and use a template'
|
|
63
|
-
},
|
|
64
|
-
verifyAgent: {
|
|
65
|
-
id: 'rovo-chat.view-agents.verify-agent',
|
|
66
|
-
defaultMessage: 'Verify agent',
|
|
67
|
-
description: 'Button to verify an agent'
|
|
68
|
-
},
|
|
69
|
-
unverifyAgent: {
|
|
70
|
-
id: 'rovo-chat.view-agents.unverify-agent',
|
|
71
|
-
defaultMessage: 'Unverify agent',
|
|
72
|
-
description: 'Button to unverify an agent'
|
|
73
63
|
}
|
|
74
64
|
});
|
|
@@ -22,7 +22,7 @@ var _messages = _interopRequireDefault(require("./messages"));
|
|
|
22
22
|
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); }
|
|
23
23
|
/**
|
|
24
24
|
* A dropdown item for verifying or unverifying an agent.
|
|
25
|
-
* Renders "Verify agent" if the agent is not verified, or "
|
|
25
|
+
* Renders "Verify agent" if the agent is not verified, or "Remove verification" if it is.
|
|
26
26
|
* Returns null if the user doesn't have permission to govern agents or the feature flag is off.
|
|
27
27
|
*/
|
|
28
28
|
var AgentVerificationDropdownItem = exports.AgentVerificationDropdownItem = function AgentVerificationDropdownItem(_ref) {
|
|
@@ -30,6 +30,7 @@ var AgentVerificationDropdownItem = exports.AgentVerificationDropdownItem = func
|
|
|
30
30
|
var agentRef = _ref.agentRef,
|
|
31
31
|
userPermissionsRef = _ref.userPermissionsRef,
|
|
32
32
|
onClick = _ref.onClick,
|
|
33
|
+
onVerificationSuccess = _ref.onVerificationSuccess,
|
|
33
34
|
testId = _ref.testId;
|
|
34
35
|
var _useIntl = (0, _reactIntlNext.useIntl)(),
|
|
35
36
|
formatMessage = _useIntl.formatMessage;
|
|
@@ -76,6 +77,7 @@ var AgentVerificationDropdownItem = exports.AgentVerificationDropdownItem = func
|
|
|
76
77
|
onCompleted: function onCompleted(response) {
|
|
77
78
|
var payload = response === null || response === void 0 ? void 0 : response.agentStudio_updateAgentVerification;
|
|
78
79
|
if (payload !== null && payload !== void 0 && payload.success) {
|
|
80
|
+
onVerificationSuccess === null || onVerificationSuccess === void 0 || onVerificationSuccess(verified);
|
|
79
81
|
trackAgentAction(verified ? _actions.AgentActions.VERIFY : _actions.AgentActions.UNVERIFY, {});
|
|
80
82
|
showFlag({
|
|
81
83
|
title: formatMessage(verified ? _messages.default.verifySuccessTitle : _messages.default.unverifySuccessTitle),
|
|
@@ -104,7 +106,7 @@ var AgentVerificationDropdownItem = exports.AgentVerificationDropdownItem = func
|
|
|
104
106
|
handleError(verified, error.message);
|
|
105
107
|
}
|
|
106
108
|
});
|
|
107
|
-
}, [agentId, commitUpdateVerification, formatMessage, handleError, onClick, showFlag, trackAgentAction, trackAgentActionError]);
|
|
109
|
+
}, [agentId, commitUpdateVerification, formatMessage, handleError, onClick, onVerificationSuccess, showFlag, trackAgentAction, trackAgentActionError]);
|
|
108
110
|
if (
|
|
109
111
|
// Don't render if agent ID is not available
|
|
110
112
|
!agentId ||
|
|
@@ -13,8 +13,8 @@ var _default = exports.default = (0, _reactIntlNext.defineMessages)({
|
|
|
13
13
|
},
|
|
14
14
|
unverifyAgentLabel: {
|
|
15
15
|
id: 'rovo-agent-components.agent-verification-dropdown-item.unverify-agent',
|
|
16
|
-
defaultMessage: '
|
|
17
|
-
description: 'Label for
|
|
16
|
+
defaultMessage: 'Remove verification',
|
|
17
|
+
description: 'Label for remove verification dropdown menu item'
|
|
18
18
|
},
|
|
19
19
|
verifySuccessTitle: {
|
|
20
20
|
id: 'rovo-agent-components.agent-verification-dropdown-item.verify-success-title',
|
|
@@ -23,8 +23,8 @@ var _default = exports.default = (0, _reactIntlNext.defineMessages)({
|
|
|
23
23
|
},
|
|
24
24
|
unverifySuccessTitle: {
|
|
25
25
|
id: 'rovo-agent-components.agent-verification-dropdown-item.unverify-success-title',
|
|
26
|
-
defaultMessage: '
|
|
27
|
-
description: 'Title for success flag when agent is
|
|
26
|
+
defaultMessage: 'Verification removed',
|
|
27
|
+
description: 'Title for success flag when agent verification is removed'
|
|
28
28
|
},
|
|
29
29
|
verifyErrorTitle: {
|
|
30
30
|
id: 'rovo-agent-components.agent-verification-dropdown-item.verify-error-title',
|
|
@@ -33,8 +33,8 @@ var _default = exports.default = (0, _reactIntlNext.defineMessages)({
|
|
|
33
33
|
},
|
|
34
34
|
unverifyErrorTitle: {
|
|
35
35
|
id: 'rovo-agent-components.agent-verification-dropdown-item.unverify-error-title',
|
|
36
|
-
defaultMessage: 'Failed to
|
|
37
|
-
description: 'Title for error flag when
|
|
36
|
+
defaultMessage: 'Failed to remove verification',
|
|
37
|
+
description: 'Title for error flag when removing agent verification fails'
|
|
38
38
|
},
|
|
39
39
|
errorDescription: {
|
|
40
40
|
id: 'rovo-agent-components.agent-verification-dropdown-item.error-description',
|
|
@@ -44,7 +44,6 @@ export const ChatToAgentButton = ({
|
|
|
44
44
|
};
|
|
45
45
|
export const AgentDropdownMenu = ({
|
|
46
46
|
isAutodevTemplateAgent,
|
|
47
|
-
agentId,
|
|
48
47
|
onEditAgent,
|
|
49
48
|
onCopyAgent,
|
|
50
49
|
onDuplicateAgent,
|
|
@@ -64,7 +63,8 @@ export const AgentDropdownMenu = ({
|
|
|
64
63
|
shouldTriggerStopPropagation,
|
|
65
64
|
agentName,
|
|
66
65
|
agentRef,
|
|
67
|
-
userPermissionsRef
|
|
66
|
+
userPermissionsRef,
|
|
67
|
+
onVerificationSuccess
|
|
68
68
|
}) => {
|
|
69
69
|
const [isLoading, setIsLoading] = useState(false);
|
|
70
70
|
const {
|
|
@@ -160,6 +160,7 @@ export const AgentDropdownMenu = ({
|
|
|
160
160
|
}, formatMessage(hasBeenCopied ? messages.linkedCopiedToProfile : messages.copyLinkToProfile)), agentRef && userPermissionsRef && fg('rovo_agents_agent_verification') && /*#__PURE__*/React.createElement(AgentVerificationDropdownItem, {
|
|
161
161
|
agentRef: agentRef !== null && agentRef !== void 0 ? agentRef : null,
|
|
162
162
|
userPermissionsRef: userPermissionsRef !== null && userPermissionsRef !== void 0 ? userPermissionsRef : null,
|
|
163
|
+
onVerificationSuccess: onVerificationSuccess,
|
|
163
164
|
testId: "agent-actions-menu-verification"
|
|
164
165
|
})), renderEditDelete());
|
|
165
166
|
};
|
|
@@ -54,15 +54,5 @@ export default defineMessages({
|
|
|
54
54
|
id: 'rovo-chat.view-agents.use-template-button',
|
|
55
55
|
defaultMessage: 'Use template',
|
|
56
56
|
description: 'Button to copy and use a template'
|
|
57
|
-
},
|
|
58
|
-
verifyAgent: {
|
|
59
|
-
id: 'rovo-chat.view-agents.verify-agent',
|
|
60
|
-
defaultMessage: 'Verify agent',
|
|
61
|
-
description: 'Button to verify an agent'
|
|
62
|
-
},
|
|
63
|
-
unverifyAgent: {
|
|
64
|
-
id: 'rovo-chat.view-agents.unverify-agent',
|
|
65
|
-
defaultMessage: 'Unverify agent',
|
|
66
|
-
description: 'Button to unverify an agent'
|
|
67
57
|
}
|
|
68
58
|
});
|
|
@@ -12,13 +12,14 @@ import { AgentActions, useRovoAgentActionAnalytics } from '@atlaskit/rovo-agent-
|
|
|
12
12
|
import messages from './messages';
|
|
13
13
|
/**
|
|
14
14
|
* A dropdown item for verifying or unverifying an agent.
|
|
15
|
-
* Renders "Verify agent" if the agent is not verified, or "
|
|
15
|
+
* Renders "Verify agent" if the agent is not verified, or "Remove verification" if it is.
|
|
16
16
|
* Returns null if the user doesn't have permission to govern agents or the feature flag is off.
|
|
17
17
|
*/
|
|
18
18
|
export const AgentVerificationDropdownItem = ({
|
|
19
19
|
agentRef,
|
|
20
20
|
userPermissionsRef,
|
|
21
21
|
onClick,
|
|
22
|
+
onVerificationSuccess,
|
|
22
23
|
testId
|
|
23
24
|
}) => {
|
|
24
25
|
var _userPermissions$isAb, _agentData$isVerified;
|
|
@@ -68,6 +69,7 @@ export const AgentVerificationDropdownItem = ({
|
|
|
68
69
|
onCompleted: response => {
|
|
69
70
|
const payload = response === null || response === void 0 ? void 0 : response.agentStudio_updateAgentVerification;
|
|
70
71
|
if (payload !== null && payload !== void 0 && payload.success) {
|
|
72
|
+
onVerificationSuccess === null || onVerificationSuccess === void 0 ? void 0 : onVerificationSuccess(verified);
|
|
71
73
|
trackAgentAction(verified ? AgentActions.VERIFY : AgentActions.UNVERIFY, {});
|
|
72
74
|
showFlag({
|
|
73
75
|
title: formatMessage(verified ? messages.verifySuccessTitle : messages.unverifySuccessTitle),
|
|
@@ -96,7 +98,7 @@ export const AgentVerificationDropdownItem = ({
|
|
|
96
98
|
handleError(verified, error.message);
|
|
97
99
|
}
|
|
98
100
|
});
|
|
99
|
-
}, [agentId, commitUpdateVerification, formatMessage, handleError, onClick, showFlag, trackAgentAction, trackAgentActionError]);
|
|
101
|
+
}, [agentId, commitUpdateVerification, formatMessage, handleError, onClick, onVerificationSuccess, showFlag, trackAgentAction, trackAgentActionError]);
|
|
100
102
|
if (
|
|
101
103
|
// Don't render if agent ID is not available
|
|
102
104
|
!agentId ||
|
|
@@ -7,8 +7,8 @@ export default defineMessages({
|
|
|
7
7
|
},
|
|
8
8
|
unverifyAgentLabel: {
|
|
9
9
|
id: 'rovo-agent-components.agent-verification-dropdown-item.unverify-agent',
|
|
10
|
-
defaultMessage: '
|
|
11
|
-
description: 'Label for
|
|
10
|
+
defaultMessage: 'Remove verification',
|
|
11
|
+
description: 'Label for remove verification dropdown menu item'
|
|
12
12
|
},
|
|
13
13
|
verifySuccessTitle: {
|
|
14
14
|
id: 'rovo-agent-components.agent-verification-dropdown-item.verify-success-title',
|
|
@@ -17,8 +17,8 @@ export default defineMessages({
|
|
|
17
17
|
},
|
|
18
18
|
unverifySuccessTitle: {
|
|
19
19
|
id: 'rovo-agent-components.agent-verification-dropdown-item.unverify-success-title',
|
|
20
|
-
defaultMessage: '
|
|
21
|
-
description: 'Title for success flag when agent is
|
|
20
|
+
defaultMessage: 'Verification removed',
|
|
21
|
+
description: 'Title for success flag when agent verification is removed'
|
|
22
22
|
},
|
|
23
23
|
verifyErrorTitle: {
|
|
24
24
|
id: 'rovo-agent-components.agent-verification-dropdown-item.verify-error-title',
|
|
@@ -27,8 +27,8 @@ export default defineMessages({
|
|
|
27
27
|
},
|
|
28
28
|
unverifyErrorTitle: {
|
|
29
29
|
id: 'rovo-agent-components.agent-verification-dropdown-item.unverify-error-title',
|
|
30
|
-
defaultMessage: 'Failed to
|
|
31
|
-
description: 'Title for error flag when
|
|
30
|
+
defaultMessage: 'Failed to remove verification',
|
|
31
|
+
description: 'Title for error flag when removing agent verification fails'
|
|
32
32
|
},
|
|
33
33
|
errorDescription: {
|
|
34
34
|
id: 'rovo-agent-components.agent-verification-dropdown-item.error-description',
|
|
@@ -47,7 +47,6 @@ export var ChatToAgentButton = function ChatToAgentButton(_ref) {
|
|
|
47
47
|
};
|
|
48
48
|
export var AgentDropdownMenu = function AgentDropdownMenu(_ref2) {
|
|
49
49
|
var isAutodevTemplateAgent = _ref2.isAutodevTemplateAgent,
|
|
50
|
-
agentId = _ref2.agentId,
|
|
51
50
|
onEditAgent = _ref2.onEditAgent,
|
|
52
51
|
onCopyAgent = _ref2.onCopyAgent,
|
|
53
52
|
onDuplicateAgent = _ref2.onDuplicateAgent,
|
|
@@ -68,7 +67,8 @@ export var AgentDropdownMenu = function AgentDropdownMenu(_ref2) {
|
|
|
68
67
|
shouldTriggerStopPropagation = _ref2.shouldTriggerStopPropagation,
|
|
69
68
|
agentName = _ref2.agentName,
|
|
70
69
|
agentRef = _ref2.agentRef,
|
|
71
|
-
userPermissionsRef = _ref2.userPermissionsRef
|
|
70
|
+
userPermissionsRef = _ref2.userPermissionsRef,
|
|
71
|
+
onVerificationSuccess = _ref2.onVerificationSuccess;
|
|
72
72
|
var _useState = useState(false),
|
|
73
73
|
_useState2 = _slicedToArray(_useState, 2),
|
|
74
74
|
isLoading = _useState2[0],
|
|
@@ -191,6 +191,7 @@ export var AgentDropdownMenu = function AgentDropdownMenu(_ref2) {
|
|
|
191
191
|
}, formatMessage(hasBeenCopied ? messages.linkedCopiedToProfile : messages.copyLinkToProfile)), agentRef && userPermissionsRef && fg('rovo_agents_agent_verification') && /*#__PURE__*/React.createElement(AgentVerificationDropdownItem, {
|
|
192
192
|
agentRef: agentRef !== null && agentRef !== void 0 ? agentRef : null,
|
|
193
193
|
userPermissionsRef: userPermissionsRef !== null && userPermissionsRef !== void 0 ? userPermissionsRef : null,
|
|
194
|
+
onVerificationSuccess: onVerificationSuccess,
|
|
194
195
|
testId: "agent-actions-menu-verification"
|
|
195
196
|
})), renderEditDelete());
|
|
196
197
|
};
|
|
@@ -54,15 +54,5 @@ export default defineMessages({
|
|
|
54
54
|
id: 'rovo-chat.view-agents.use-template-button',
|
|
55
55
|
defaultMessage: 'Use template',
|
|
56
56
|
description: 'Button to copy and use a template'
|
|
57
|
-
},
|
|
58
|
-
verifyAgent: {
|
|
59
|
-
id: 'rovo-chat.view-agents.verify-agent',
|
|
60
|
-
defaultMessage: 'Verify agent',
|
|
61
|
-
description: 'Button to verify an agent'
|
|
62
|
-
},
|
|
63
|
-
unverifyAgent: {
|
|
64
|
-
id: 'rovo-chat.view-agents.unverify-agent',
|
|
65
|
-
defaultMessage: 'Unverify agent',
|
|
66
|
-
description: 'Button to unverify an agent'
|
|
67
57
|
}
|
|
68
58
|
});
|
|
@@ -13,7 +13,7 @@ import { AgentActions, useRovoAgentActionAnalytics } from '@atlaskit/rovo-agent-
|
|
|
13
13
|
import messages from './messages';
|
|
14
14
|
/**
|
|
15
15
|
* A dropdown item for verifying or unverifying an agent.
|
|
16
|
-
* Renders "Verify agent" if the agent is not verified, or "
|
|
16
|
+
* Renders "Verify agent" if the agent is not verified, or "Remove verification" if it is.
|
|
17
17
|
* Returns null if the user doesn't have permission to govern agents or the feature flag is off.
|
|
18
18
|
*/
|
|
19
19
|
export var AgentVerificationDropdownItem = function AgentVerificationDropdownItem(_ref) {
|
|
@@ -21,6 +21,7 @@ export var AgentVerificationDropdownItem = function AgentVerificationDropdownIte
|
|
|
21
21
|
var agentRef = _ref.agentRef,
|
|
22
22
|
userPermissionsRef = _ref.userPermissionsRef,
|
|
23
23
|
onClick = _ref.onClick,
|
|
24
|
+
onVerificationSuccess = _ref.onVerificationSuccess,
|
|
24
25
|
testId = _ref.testId;
|
|
25
26
|
var _useIntl = useIntl(),
|
|
26
27
|
formatMessage = _useIntl.formatMessage;
|
|
@@ -67,6 +68,7 @@ export var AgentVerificationDropdownItem = function AgentVerificationDropdownIte
|
|
|
67
68
|
onCompleted: function onCompleted(response) {
|
|
68
69
|
var payload = response === null || response === void 0 ? void 0 : response.agentStudio_updateAgentVerification;
|
|
69
70
|
if (payload !== null && payload !== void 0 && payload.success) {
|
|
71
|
+
onVerificationSuccess === null || onVerificationSuccess === void 0 || onVerificationSuccess(verified);
|
|
70
72
|
trackAgentAction(verified ? AgentActions.VERIFY : AgentActions.UNVERIFY, {});
|
|
71
73
|
showFlag({
|
|
72
74
|
title: formatMessage(verified ? messages.verifySuccessTitle : messages.unverifySuccessTitle),
|
|
@@ -95,7 +97,7 @@ export var AgentVerificationDropdownItem = function AgentVerificationDropdownIte
|
|
|
95
97
|
handleError(verified, error.message);
|
|
96
98
|
}
|
|
97
99
|
});
|
|
98
|
-
}, [agentId, commitUpdateVerification, formatMessage, handleError, onClick, showFlag, trackAgentAction, trackAgentActionError]);
|
|
100
|
+
}, [agentId, commitUpdateVerification, formatMessage, handleError, onClick, onVerificationSuccess, showFlag, trackAgentAction, trackAgentActionError]);
|
|
99
101
|
if (
|
|
100
102
|
// Don't render if agent ID is not available
|
|
101
103
|
!agentId ||
|
|
@@ -7,8 +7,8 @@ export default defineMessages({
|
|
|
7
7
|
},
|
|
8
8
|
unverifyAgentLabel: {
|
|
9
9
|
id: 'rovo-agent-components.agent-verification-dropdown-item.unverify-agent',
|
|
10
|
-
defaultMessage: '
|
|
11
|
-
description: 'Label for
|
|
10
|
+
defaultMessage: 'Remove verification',
|
|
11
|
+
description: 'Label for remove verification dropdown menu item'
|
|
12
12
|
},
|
|
13
13
|
verifySuccessTitle: {
|
|
14
14
|
id: 'rovo-agent-components.agent-verification-dropdown-item.verify-success-title',
|
|
@@ -17,8 +17,8 @@ export default defineMessages({
|
|
|
17
17
|
},
|
|
18
18
|
unverifySuccessTitle: {
|
|
19
19
|
id: 'rovo-agent-components.agent-verification-dropdown-item.unverify-success-title',
|
|
20
|
-
defaultMessage: '
|
|
21
|
-
description: 'Title for success flag when agent is
|
|
20
|
+
defaultMessage: 'Verification removed',
|
|
21
|
+
description: 'Title for success flag when agent verification is removed'
|
|
22
22
|
},
|
|
23
23
|
verifyErrorTitle: {
|
|
24
24
|
id: 'rovo-agent-components.agent-verification-dropdown-item.verify-error-title',
|
|
@@ -27,8 +27,8 @@ export default defineMessages({
|
|
|
27
27
|
},
|
|
28
28
|
unverifyErrorTitle: {
|
|
29
29
|
id: 'rovo-agent-components.agent-verification-dropdown-item.unverify-error-title',
|
|
30
|
-
defaultMessage: 'Failed to
|
|
31
|
-
description: 'Title for error flag when
|
|
30
|
+
defaultMessage: 'Failed to remove verification',
|
|
31
|
+
description: 'Title for error flag when removing agent verification fails'
|
|
32
32
|
},
|
|
33
33
|
errorDescription: {
|
|
34
34
|
id: 'rovo-agent-components.agent-verification-dropdown-item.error-description',
|
|
@@ -46,6 +46,6 @@ type AgentDropdownMenuProps = {
|
|
|
46
46
|
isEditEnabled: boolean;
|
|
47
47
|
isDeleteEnabled: boolean;
|
|
48
48
|
}>;
|
|
49
|
-
} & ViewAgentOptionProps & ViewAgentFullProfileProps & Partial<Pick<AgentVerificationDropdownItemProps, 'agentRef' | 'userPermissionsRef'>>;
|
|
50
|
-
export declare const AgentDropdownMenu: ({ isAutodevTemplateAgent,
|
|
49
|
+
} & ViewAgentOptionProps & ViewAgentFullProfileProps & Partial<Pick<AgentVerificationDropdownItemProps, 'agentRef' | 'userPermissionsRef' | 'onVerificationSuccess'>>;
|
|
50
|
+
export declare const AgentDropdownMenu: ({ isAutodevTemplateAgent, onEditAgent, onCopyAgent, onDuplicateAgent, onDeleteAgent, onViewAgentFullProfileClick, onOpenChange, isForgeAgent, showViewAgentOption, onViewAgentClick, onDropdownTriggerClick, spacing, appearance, dropdownMenuTestId, doesAgentHaveIdentityAccountId, loadAgentPermissions, loadPermissionsOnMount, shouldTriggerStopPropagation, agentName, agentRef, userPermissionsRef, onVerificationSuccess, }: AgentDropdownMenuProps) => JSX.Element;
|
|
51
51
|
export {};
|
|
@@ -54,15 +54,5 @@ declare const _default: {
|
|
|
54
54
|
readonly defaultMessage: "Use template";
|
|
55
55
|
readonly description: "Button to copy and use a template";
|
|
56
56
|
};
|
|
57
|
-
readonly verifyAgent: {
|
|
58
|
-
readonly id: "rovo-chat.view-agents.verify-agent";
|
|
59
|
-
readonly defaultMessage: "Verify agent";
|
|
60
|
-
readonly description: "Button to verify an agent";
|
|
61
|
-
};
|
|
62
|
-
readonly unverifyAgent: {
|
|
63
|
-
readonly id: "rovo-chat.view-agents.unverify-agent";
|
|
64
|
-
readonly defaultMessage: "Unverify agent";
|
|
65
|
-
readonly description: "Button to unverify an agent";
|
|
66
|
-
};
|
|
67
57
|
};
|
|
68
58
|
export default _default;
|
|
@@ -8,6 +8,11 @@ export type AgentVerificationDropdownItemProps = {
|
|
|
8
8
|
* Optional callback fired when the dropdown item is clicked, before the mutation is executed.
|
|
9
9
|
*/
|
|
10
10
|
onClick?: () => void;
|
|
11
|
+
/**
|
|
12
|
+
* Optional callback fired when verification mutation succeeds.
|
|
13
|
+
* Called with the new verified state.
|
|
14
|
+
*/
|
|
15
|
+
onVerificationSuccess?: (verified: boolean) => void;
|
|
11
16
|
/**
|
|
12
17
|
* Test ID for the dropdown item.
|
|
13
18
|
*/
|
|
@@ -15,7 +20,7 @@ export type AgentVerificationDropdownItemProps = {
|
|
|
15
20
|
};
|
|
16
21
|
/**
|
|
17
22
|
* A dropdown item for verifying or unverifying an agent.
|
|
18
|
-
* Renders "Verify agent" if the agent is not verified, or "
|
|
23
|
+
* Renders "Verify agent" if the agent is not verified, or "Remove verification" if it is.
|
|
19
24
|
* Returns null if the user doesn't have permission to govern agents or the feature flag is off.
|
|
20
25
|
*/
|
|
21
|
-
export declare const AgentVerificationDropdownItem: ({ agentRef, userPermissionsRef, onClick, testId, }: AgentVerificationDropdownItemProps) => React.JSX.Element | null;
|
|
26
|
+
export declare const AgentVerificationDropdownItem: ({ agentRef, userPermissionsRef, onClick, onVerificationSuccess, testId, }: AgentVerificationDropdownItemProps) => React.JSX.Element | null;
|
|
@@ -46,6 +46,6 @@ type AgentDropdownMenuProps = {
|
|
|
46
46
|
isEditEnabled: boolean;
|
|
47
47
|
isDeleteEnabled: boolean;
|
|
48
48
|
}>;
|
|
49
|
-
} & ViewAgentOptionProps & ViewAgentFullProfileProps & Partial<Pick<AgentVerificationDropdownItemProps, 'agentRef' | 'userPermissionsRef'>>;
|
|
50
|
-
export declare const AgentDropdownMenu: ({ isAutodevTemplateAgent,
|
|
49
|
+
} & ViewAgentOptionProps & ViewAgentFullProfileProps & Partial<Pick<AgentVerificationDropdownItemProps, 'agentRef' | 'userPermissionsRef' | 'onVerificationSuccess'>>;
|
|
50
|
+
export declare const AgentDropdownMenu: ({ isAutodevTemplateAgent, onEditAgent, onCopyAgent, onDuplicateAgent, onDeleteAgent, onViewAgentFullProfileClick, onOpenChange, isForgeAgent, showViewAgentOption, onViewAgentClick, onDropdownTriggerClick, spacing, appearance, dropdownMenuTestId, doesAgentHaveIdentityAccountId, loadAgentPermissions, loadPermissionsOnMount, shouldTriggerStopPropagation, agentName, agentRef, userPermissionsRef, onVerificationSuccess, }: AgentDropdownMenuProps) => JSX.Element;
|
|
51
51
|
export {};
|
|
@@ -54,15 +54,5 @@ declare const _default: {
|
|
|
54
54
|
readonly defaultMessage: "Use template";
|
|
55
55
|
readonly description: "Button to copy and use a template";
|
|
56
56
|
};
|
|
57
|
-
readonly verifyAgent: {
|
|
58
|
-
readonly id: "rovo-chat.view-agents.verify-agent";
|
|
59
|
-
readonly defaultMessage: "Verify agent";
|
|
60
|
-
readonly description: "Button to verify an agent";
|
|
61
|
-
};
|
|
62
|
-
readonly unverifyAgent: {
|
|
63
|
-
readonly id: "rovo-chat.view-agents.unverify-agent";
|
|
64
|
-
readonly defaultMessage: "Unverify agent";
|
|
65
|
-
readonly description: "Button to unverify an agent";
|
|
66
|
-
};
|
|
67
57
|
};
|
|
68
58
|
export default _default;
|
|
@@ -8,6 +8,11 @@ export type AgentVerificationDropdownItemProps = {
|
|
|
8
8
|
* Optional callback fired when the dropdown item is clicked, before the mutation is executed.
|
|
9
9
|
*/
|
|
10
10
|
onClick?: () => void;
|
|
11
|
+
/**
|
|
12
|
+
* Optional callback fired when verification mutation succeeds.
|
|
13
|
+
* Called with the new verified state.
|
|
14
|
+
*/
|
|
15
|
+
onVerificationSuccess?: (verified: boolean) => void;
|
|
11
16
|
/**
|
|
12
17
|
* Test ID for the dropdown item.
|
|
13
18
|
*/
|
|
@@ -15,7 +20,7 @@ export type AgentVerificationDropdownItemProps = {
|
|
|
15
20
|
};
|
|
16
21
|
/**
|
|
17
22
|
* A dropdown item for verifying or unverifying an agent.
|
|
18
|
-
* Renders "Verify agent" if the agent is not verified, or "
|
|
23
|
+
* Renders "Verify agent" if the agent is not verified, or "Remove verification" if it is.
|
|
19
24
|
* Returns null if the user doesn't have permission to govern agents or the feature flag is off.
|
|
20
25
|
*/
|
|
21
|
-
export declare const AgentVerificationDropdownItem: ({ agentRef, userPermissionsRef, onClick, testId, }: AgentVerificationDropdownItemProps) => React.JSX.Element | null;
|
|
26
|
+
export declare const AgentVerificationDropdownItem: ({ agentRef, userPermissionsRef, onClick, onVerificationSuccess, testId, }: AgentVerificationDropdownItemProps) => React.JSX.Element | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/rovo-agent-components",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.31.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
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@atlaskit/css": "^0.19.0",
|
|
40
40
|
"@atlaskit/dropdown-menu": "^16.4.0",
|
|
41
41
|
"@atlaskit/flag": "^17.8.0",
|
|
42
|
-
"@atlaskit/heading": "^5.
|
|
42
|
+
"@atlaskit/heading": "^5.3.0",
|
|
43
43
|
"@atlaskit/icon": "^30.0.0",
|
|
44
44
|
"@atlaskit/link": "^3.3.0",
|
|
45
45
|
"@atlaskit/logo": "^19.10.0",
|