@atlaskit/rovo-agent-components 3.38.0 → 3.40.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 +29 -0
- package/common/utils/is-forge-agent/package.json +17 -0
- package/dist/cjs/common/ui/agent-chat-icon/index.js +1 -1
- package/dist/cjs/common/ui/chat-pill/index.js +1 -1
- package/dist/cjs/common/ui/link-icon-button/index.js +1 -1
- package/dist/cjs/common/ui/star-icon-button/index.js +1 -1
- package/dist/cjs/common/utils/is-forge-agent.js +10 -0
- package/dist/cjs/ui/agent-avatar/agent-avatar-skeleton/index.js +1 -1
- package/dist/cjs/ui/agent-avatar/generated-avatars/index.js +1 -1
- package/dist/cjs/ui/agent-avatar/index.js +2 -6
- package/dist/cjs/ui/agent-conversation-starters/index.js +1 -1
- package/dist/cjs/ui/agent-dropdown-menu/index.js +1 -1
- package/dist/cjs/ui/agent-menu-item-skeleton/index.js +1 -1
- package/dist/cjs/ui/agent-name-side-nav/index.js +1 -1
- package/dist/cjs/ui/agent-profile-info/agent-star-count/index.js +1 -1
- package/dist/cjs/ui/agent-profile-info/index.js +3 -3
- package/dist/cjs/ui/agent-verification-dropdown-item/index.js +25 -8
- package/dist/cjs/ui/agent-verified/index.js +1 -1
- package/dist/es2019/common/ui/agent-chat-icon/index.js +1 -1
- package/dist/es2019/common/ui/chat-pill/index.js +1 -1
- package/dist/es2019/common/ui/link-icon-button/index.js +1 -1
- package/dist/es2019/common/ui/star-icon-button/index.js +1 -1
- package/dist/es2019/common/utils/is-forge-agent.js +2 -0
- package/dist/es2019/ui/agent-avatar/agent-avatar-skeleton/index.js +1 -1
- package/dist/es2019/ui/agent-avatar/generated-avatars/index.js +1 -1
- package/dist/es2019/ui/agent-avatar/index.js +2 -4
- package/dist/es2019/ui/agent-conversation-starters/index.js +1 -1
- package/dist/es2019/ui/agent-dropdown-menu/index.js +1 -1
- package/dist/es2019/ui/agent-menu-item-skeleton/index.js +1 -1
- package/dist/es2019/ui/agent-name-side-nav/index.js +1 -1
- package/dist/es2019/ui/agent-profile-info/agent-star-count/index.js +1 -1
- package/dist/es2019/ui/agent-profile-info/index.js +2 -2
- package/dist/es2019/ui/agent-verification-dropdown-item/index.js +26 -9
- package/dist/es2019/ui/agent-verified/index.js +1 -1
- package/dist/esm/common/ui/agent-chat-icon/index.js +1 -1
- package/dist/esm/common/ui/chat-pill/index.js +1 -1
- package/dist/esm/common/ui/link-icon-button/index.js +1 -1
- package/dist/esm/common/ui/star-icon-button/index.js +1 -1
- package/dist/esm/common/utils/is-forge-agent.js +4 -0
- package/dist/esm/ui/agent-avatar/agent-avatar-skeleton/index.js +1 -1
- package/dist/esm/ui/agent-avatar/generated-avatars/index.js +1 -1
- package/dist/esm/ui/agent-avatar/index.js +1 -5
- package/dist/esm/ui/agent-conversation-starters/index.js +1 -1
- package/dist/esm/ui/agent-dropdown-menu/index.js +1 -1
- package/dist/esm/ui/agent-menu-item-skeleton/index.js +1 -1
- package/dist/esm/ui/agent-name-side-nav/index.js +1 -1
- package/dist/esm/ui/agent-profile-info/agent-star-count/index.js +1 -1
- package/dist/esm/ui/agent-profile-info/index.js +2 -2
- package/dist/esm/ui/agent-verification-dropdown-item/index.js +26 -9
- package/dist/esm/ui/agent-verified/index.js +1 -1
- package/dist/types/common/utils/is-forge-agent.d.ts +2 -0
- package/dist/types/ui/agent-avatar/index.d.ts +0 -2
- package/dist/types-ts4.5/common/utils/is-forge-agent.d.ts +2 -0
- package/dist/types-ts4.5/ui/agent-avatar/index.d.ts +0 -2
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# @atlaskit/rovo-agent-components
|
|
2
2
|
|
|
3
|
+
## 3.40.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`e4034958fc116`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e4034958fc116) -
|
|
8
|
+
Adjust event tracking for agent analytics to use new trackAgentEvent() method. Remove deprecated
|
|
9
|
+
trackAgentAction() export and exported action const enums
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
15
|
+
## 3.39.0
|
|
16
|
+
|
|
17
|
+
### Minor Changes
|
|
18
|
+
|
|
19
|
+
- [`e72179b379afd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e72179b379afd) -
|
|
20
|
+
Update isForgeAgentByCreatorType import
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- Updated dependencies
|
|
25
|
+
|
|
26
|
+
## 3.38.1
|
|
27
|
+
|
|
28
|
+
### Patch Changes
|
|
29
|
+
|
|
30
|
+
- Updated dependencies
|
|
31
|
+
|
|
3
32
|
## 3.38.0
|
|
4
33
|
|
|
5
34
|
### Minor Changes
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/rovo-agent-components/common/utils/is-forge-agent",
|
|
3
|
+
"main": "../../../dist/cjs/common/utils/is-forge-agent.js",
|
|
4
|
+
"module": "../../../dist/esm/common/utils/is-forge-agent.js",
|
|
5
|
+
"module:es2019": "../../../dist/es2019/common/utils/is-forge-agent.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../../../dist/types/common/utils/is-forge-agent.d.ts",
|
|
10
|
+
"typesVersions": {
|
|
11
|
+
">=4.5 <5.9": {
|
|
12
|
+
"*": [
|
|
13
|
+
"../../../dist/types-ts4.5/common/utils/is-forge-agent.d.ts"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.isForgeAgentByCreatorType = void 0;
|
|
7
|
+
// BE will deprecate THIRD_PARTY and use FORGE instead
|
|
8
|
+
var isForgeAgentByCreatorType = exports.isForgeAgentByCreatorType = function isForgeAgentByCreatorType(creatorType) {
|
|
9
|
+
return creatorType === 'THIRD_PARTY' || creatorType === 'FORGE' || creatorType === 'REMOTE_A2A';
|
|
10
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* index.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
@@ -6,7 +6,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
6
6
|
Object.defineProperty(exports, "__esModule", {
|
|
7
7
|
value: true
|
|
8
8
|
});
|
|
9
|
-
exports.
|
|
9
|
+
exports.AgentAvatar = exports.AGENT_AVATAR_CLIP_PATH = void 0;
|
|
10
10
|
require("./index.compiled.css");
|
|
11
11
|
var React = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _runtime = require("@compiled/react/runtime");
|
|
@@ -85,8 +85,4 @@ var AgentAvatar = exports.AgentAvatar = function AgentAvatar(_ref) {
|
|
|
85
85
|
isRovoDev: isRovoDev,
|
|
86
86
|
size: size
|
|
87
87
|
}))));
|
|
88
|
-
};
|
|
89
|
-
// BE will deprecate THIRD_PARTY and use FORGE instead
|
|
90
|
-
var isForgeAgentByCreatorType = exports.isForgeAgentByCreatorType = function isForgeAgentByCreatorType(creatorType) {
|
|
91
|
-
return creatorType === 'THIRD_PARTY' || creatorType === 'FORGE' || creatorType === 'REMOTE_A2A';
|
|
92
88
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* index.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
@@ -19,7 +19,7 @@ var _skeleton = _interopRequireDefault(require("@atlaskit/skeleton"));
|
|
|
19
19
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
20
20
|
var _hiddenIcon = require("../../common/ui/hidden-icon");
|
|
21
21
|
var _starIconButton = require("../../common/ui/star-icon-button");
|
|
22
|
-
var
|
|
22
|
+
var _isForgeAgent = require("../../common/utils/is-forge-agent");
|
|
23
23
|
var _messages = require("./messages");
|
|
24
24
|
var styles = {
|
|
25
25
|
clickableItem: "_zulp1b66 _1e0c1txw _4cvr1h6o",
|
|
@@ -39,7 +39,7 @@ var getAgentCreator = exports.getAgentCreator = function getAgentCreator(_ref) {
|
|
|
39
39
|
type: 'SYSTEM'
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
|
-
if ((0, _platformFeatureFlags.fg)('rovo_agent_support_a2a_avatar') ? (0,
|
|
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
|
type: 'FORGE',
|
|
@@ -47,8 +47,7 @@ var AgentVerificationDropdownItem = exports.AgentVerificationDropdownItem = func
|
|
|
47
47
|
agentId: agentId,
|
|
48
48
|
isAbleToGovernAgents: isAbleToGovernAgents
|
|
49
49
|
}),
|
|
50
|
-
|
|
51
|
-
trackAgentActionError = _useRovoAgentActionAn.trackAgentActionError;
|
|
50
|
+
trackAgentEvent = _useRovoAgentActionAn.trackAgentEvent;
|
|
52
51
|
var _useMutation = (0, _reactRelay.useMutation)(_agentVerificationDropdownItem_AtlaskitRovoAgentComponents_updateAgentVerificationMutation2.default),
|
|
53
52
|
_useMutation2 = (0, _slicedToArray2.default)(_useMutation, 2),
|
|
54
53
|
commitUpdateVerification = _useMutation2[0],
|
|
@@ -80,7 +79,11 @@ var AgentVerificationDropdownItem = exports.AgentVerificationDropdownItem = func
|
|
|
80
79
|
var payload = response === null || response === void 0 ? void 0 : response.agentStudio_updateAgentVerification;
|
|
81
80
|
if (payload !== null && payload !== void 0 && payload.success) {
|
|
82
81
|
onVerificationSuccess === null || onVerificationSuccess === void 0 || onVerificationSuccess(verified);
|
|
83
|
-
|
|
82
|
+
trackAgentEvent({
|
|
83
|
+
action: verified ? 'verify' : 'unverify',
|
|
84
|
+
actionSubject: 'rovoAgent',
|
|
85
|
+
attributes: {}
|
|
86
|
+
});
|
|
84
87
|
showFlag({
|
|
85
88
|
title: formatMessage(verified ? _messages.default.verifySuccessTitle : _messages.default.unverifySuccessTitle),
|
|
86
89
|
appearance: 'success',
|
|
@@ -94,21 +97,35 @@ var AgentVerificationDropdownItem = exports.AgentVerificationDropdownItem = func
|
|
|
94
97
|
var _payload$errors;
|
|
95
98
|
var errorMessage = payload === null || payload === void 0 || (_payload$errors = payload.errors) === null || _payload$errors === void 0 || (_payload$errors = _payload$errors[0]) === null || _payload$errors === void 0 ? void 0 : _payload$errors.message;
|
|
96
99
|
if (errorMessage) {
|
|
97
|
-
|
|
98
|
-
|
|
100
|
+
trackAgentEvent({
|
|
101
|
+
action: verified ? 'verify' : 'unverify',
|
|
102
|
+
actionSubject: 'rovoAgentError',
|
|
103
|
+
attributes: {
|
|
104
|
+
agentId: agentId,
|
|
105
|
+
error: {
|
|
106
|
+
message: errorMessage
|
|
107
|
+
}
|
|
108
|
+
}
|
|
99
109
|
});
|
|
100
110
|
handleError(verified, errorMessage);
|
|
101
111
|
}
|
|
102
112
|
}
|
|
103
113
|
},
|
|
104
114
|
onError: function onError(error) {
|
|
105
|
-
|
|
106
|
-
|
|
115
|
+
trackAgentEvent({
|
|
116
|
+
action: verified ? 'verify' : 'unverify',
|
|
117
|
+
actionSubject: 'rovoAgentError',
|
|
118
|
+
attributes: {
|
|
119
|
+
agentId: agentId,
|
|
120
|
+
error: {
|
|
121
|
+
message: error.message
|
|
122
|
+
}
|
|
123
|
+
}
|
|
107
124
|
});
|
|
108
125
|
handleError(verified, error.message);
|
|
109
126
|
}
|
|
110
127
|
});
|
|
111
|
-
}, [agentId, commitUpdateVerification, formatMessage, handleError, onClick, onVerificationSuccess, showFlag,
|
|
128
|
+
}, [agentId, commitUpdateVerification, formatMessage, handleError, onClick, onVerificationSuccess, showFlag, trackAgentEvent]);
|
|
112
129
|
var labelText = formatMessage(isVerified ? _messages.default.unverifyAgentLabel : _messages.default.verifyAgentLabel);
|
|
113
130
|
var handleOnClick = function handleOnClick() {
|
|
114
131
|
return handleUpdateVerification(!isVerified);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* index.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
2
|
import "./index.compiled.css";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
@@ -77,6 +77,4 @@ export const AgentAvatar = ({
|
|
|
77
77
|
isRovoDev: isRovoDev,
|
|
78
78
|
size: size
|
|
79
79
|
}))));
|
|
80
|
-
};
|
|
81
|
-
// BE will deprecate THIRD_PARTY and use FORGE instead
|
|
82
|
-
export const isForgeAgentByCreatorType = creatorType => creatorType === 'THIRD_PARTY' || creatorType === 'FORGE' || creatorType === 'REMOTE_A2A';
|
|
80
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* index.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
2
|
import "./index.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React from 'react';
|
|
@@ -12,7 +12,7 @@ import Skeleton from '@atlaskit/skeleton';
|
|
|
12
12
|
import Tooltip from '@atlaskit/tooltip';
|
|
13
13
|
import { HiddenIcon } from '../../common/ui/hidden-icon';
|
|
14
14
|
import { StarIconButton } from '../../common/ui/star-icon-button';
|
|
15
|
-
import { isForgeAgentByCreatorType } from '
|
|
15
|
+
import { isForgeAgentByCreatorType } from '../../common/utils/is-forge-agent';
|
|
16
16
|
import { messages } from './messages';
|
|
17
17
|
const styles = {
|
|
18
18
|
clickableItem: "_zulp1b66 _1e0c1txw _4cvr1h6o",
|
|
@@ -8,7 +8,7 @@ import { DropdownItem } from '@atlaskit/dropdown-menu';
|
|
|
8
8
|
import { useFlags } from '@atlaskit/flag';
|
|
9
9
|
import ErrorIcon from '@atlaskit/icon/core/status-error';
|
|
10
10
|
import SuccessIcon from '@atlaskit/icon/core/status-success';
|
|
11
|
-
import {
|
|
11
|
+
import { useRovoAgentActionAnalytics } from '@atlaskit/rovo-agent-analytics/actions';
|
|
12
12
|
import messages from './messages';
|
|
13
13
|
/**
|
|
14
14
|
* A dropdown item for verifying or unverifying an agent.
|
|
@@ -36,8 +36,7 @@ export const AgentVerificationDropdownItem = ({
|
|
|
36
36
|
const isVerified = (_agentData$isVerified = agentData === null || agentData === void 0 ? void 0 : agentData.isVerified) !== null && _agentData$isVerified !== void 0 ? _agentData$isVerified : false;
|
|
37
37
|
const agentId = agentData === null || agentData === void 0 ? void 0 : agentData.id;
|
|
38
38
|
const {
|
|
39
|
-
|
|
40
|
-
trackAgentActionError
|
|
39
|
+
trackAgentEvent
|
|
41
40
|
} = useRovoAgentActionAnalytics({
|
|
42
41
|
touchPoint: 'agent-verification-dropdown-item',
|
|
43
42
|
agentId,
|
|
@@ -71,7 +70,11 @@ export const AgentVerificationDropdownItem = ({
|
|
|
71
70
|
const payload = response === null || response === void 0 ? void 0 : response.agentStudio_updateAgentVerification;
|
|
72
71
|
if (payload !== null && payload !== void 0 && payload.success) {
|
|
73
72
|
onVerificationSuccess === null || onVerificationSuccess === void 0 ? void 0 : onVerificationSuccess(verified);
|
|
74
|
-
|
|
73
|
+
trackAgentEvent({
|
|
74
|
+
action: verified ? 'verify' : 'unverify',
|
|
75
|
+
actionSubject: 'rovoAgent',
|
|
76
|
+
attributes: {}
|
|
77
|
+
});
|
|
75
78
|
showFlag({
|
|
76
79
|
title: formatMessage(verified ? messages.verifySuccessTitle : messages.unverifySuccessTitle),
|
|
77
80
|
appearance: 'success',
|
|
@@ -85,21 +88,35 @@ export const AgentVerificationDropdownItem = ({
|
|
|
85
88
|
var _payload$errors, _payload$errors$;
|
|
86
89
|
const errorMessage = payload === null || payload === void 0 ? void 0 : (_payload$errors = payload.errors) === null || _payload$errors === void 0 ? void 0 : (_payload$errors$ = _payload$errors[0]) === null || _payload$errors$ === void 0 ? void 0 : _payload$errors$.message;
|
|
87
90
|
if (errorMessage) {
|
|
88
|
-
|
|
89
|
-
|
|
91
|
+
trackAgentEvent({
|
|
92
|
+
action: verified ? 'verify' : 'unverify',
|
|
93
|
+
actionSubject: 'rovoAgentError',
|
|
94
|
+
attributes: {
|
|
95
|
+
agentId,
|
|
96
|
+
error: {
|
|
97
|
+
message: errorMessage
|
|
98
|
+
}
|
|
99
|
+
}
|
|
90
100
|
});
|
|
91
101
|
handleError(verified, errorMessage);
|
|
92
102
|
}
|
|
93
103
|
}
|
|
94
104
|
},
|
|
95
105
|
onError: error => {
|
|
96
|
-
|
|
97
|
-
|
|
106
|
+
trackAgentEvent({
|
|
107
|
+
action: verified ? 'verify' : 'unverify',
|
|
108
|
+
actionSubject: 'rovoAgentError',
|
|
109
|
+
attributes: {
|
|
110
|
+
agentId,
|
|
111
|
+
error: {
|
|
112
|
+
message: error.message
|
|
113
|
+
}
|
|
114
|
+
}
|
|
98
115
|
});
|
|
99
116
|
handleError(verified, error.message);
|
|
100
117
|
}
|
|
101
118
|
});
|
|
102
|
-
}, [agentId, commitUpdateVerification, formatMessage, handleError, onClick, onVerificationSuccess, showFlag,
|
|
119
|
+
}, [agentId, commitUpdateVerification, formatMessage, handleError, onClick, onVerificationSuccess, showFlag, trackAgentEvent]);
|
|
103
120
|
const labelText = formatMessage(isVerified ? messages.unverifyAgentLabel : messages.verifyAgentLabel);
|
|
104
121
|
const handleOnClick = () => handleUpdateVerification(!isVerified);
|
|
105
122
|
if (
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* index.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
2
|
import "./index.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import _agentVerified_AtlaskitRovoAgentComponents from "./__generated__/agentVerified_AtlaskitRovoAgentComponents.graphql";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* index.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
4
|
var _excluded = ["children", "whiteSpacePreWrap", "renderIcon"];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* index.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
import "./index.compiled.css";
|
|
4
4
|
import * as React from 'react';
|
|
@@ -76,8 +76,4 @@ export var AgentAvatar = function AgentAvatar(_ref) {
|
|
|
76
76
|
isRovoDev: isRovoDev,
|
|
77
77
|
size: size
|
|
78
78
|
}))));
|
|
79
|
-
};
|
|
80
|
-
// BE will deprecate THIRD_PARTY and use FORGE instead
|
|
81
|
-
export var isForgeAgentByCreatorType = function isForgeAgentByCreatorType(creatorType) {
|
|
82
|
-
return creatorType === 'THIRD_PARTY' || creatorType === 'FORGE' || creatorType === 'REMOTE_A2A';
|
|
83
79
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* index.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
4
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* index.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
4
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* index.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
2
|
import "./index.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React from 'react';
|
|
@@ -12,7 +12,7 @@ import Skeleton from '@atlaskit/skeleton';
|
|
|
12
12
|
import Tooltip from '@atlaskit/tooltip';
|
|
13
13
|
import { HiddenIcon } from '../../common/ui/hidden-icon';
|
|
14
14
|
import { StarIconButton } from '../../common/ui/star-icon-button';
|
|
15
|
-
import { isForgeAgentByCreatorType } from '
|
|
15
|
+
import { isForgeAgentByCreatorType } from '../../common/utils/is-forge-agent';
|
|
16
16
|
import { messages } from './messages';
|
|
17
17
|
var styles = {
|
|
18
18
|
clickableItem: "_zulp1b66 _1e0c1txw _4cvr1h6o",
|
|
@@ -9,7 +9,7 @@ import { DropdownItem } from '@atlaskit/dropdown-menu';
|
|
|
9
9
|
import { useFlags } from '@atlaskit/flag';
|
|
10
10
|
import ErrorIcon from '@atlaskit/icon/core/status-error';
|
|
11
11
|
import SuccessIcon from '@atlaskit/icon/core/status-success';
|
|
12
|
-
import {
|
|
12
|
+
import { useRovoAgentActionAnalytics } from '@atlaskit/rovo-agent-analytics/actions';
|
|
13
13
|
import messages from './messages';
|
|
14
14
|
/**
|
|
15
15
|
* A dropdown item for verifying or unverifying an agent.
|
|
@@ -38,8 +38,7 @@ export var AgentVerificationDropdownItem = function AgentVerificationDropdownIte
|
|
|
38
38
|
agentId: agentId,
|
|
39
39
|
isAbleToGovernAgents: isAbleToGovernAgents
|
|
40
40
|
}),
|
|
41
|
-
|
|
42
|
-
trackAgentActionError = _useRovoAgentActionAn.trackAgentActionError;
|
|
41
|
+
trackAgentEvent = _useRovoAgentActionAn.trackAgentEvent;
|
|
43
42
|
var _useMutation = useMutation(_agentVerificationDropdownItem_AtlaskitRovoAgentComponents_updateAgentVerificationMutation),
|
|
44
43
|
_useMutation2 = _slicedToArray(_useMutation, 2),
|
|
45
44
|
commitUpdateVerification = _useMutation2[0],
|
|
@@ -71,7 +70,11 @@ export var AgentVerificationDropdownItem = function AgentVerificationDropdownIte
|
|
|
71
70
|
var payload = response === null || response === void 0 ? void 0 : response.agentStudio_updateAgentVerification;
|
|
72
71
|
if (payload !== null && payload !== void 0 && payload.success) {
|
|
73
72
|
onVerificationSuccess === null || onVerificationSuccess === void 0 || onVerificationSuccess(verified);
|
|
74
|
-
|
|
73
|
+
trackAgentEvent({
|
|
74
|
+
action: verified ? 'verify' : 'unverify',
|
|
75
|
+
actionSubject: 'rovoAgent',
|
|
76
|
+
attributes: {}
|
|
77
|
+
});
|
|
75
78
|
showFlag({
|
|
76
79
|
title: formatMessage(verified ? messages.verifySuccessTitle : messages.unverifySuccessTitle),
|
|
77
80
|
appearance: 'success',
|
|
@@ -85,21 +88,35 @@ export var AgentVerificationDropdownItem = function AgentVerificationDropdownIte
|
|
|
85
88
|
var _payload$errors;
|
|
86
89
|
var errorMessage = payload === null || payload === void 0 || (_payload$errors = payload.errors) === null || _payload$errors === void 0 || (_payload$errors = _payload$errors[0]) === null || _payload$errors === void 0 ? void 0 : _payload$errors.message;
|
|
87
90
|
if (errorMessage) {
|
|
88
|
-
|
|
89
|
-
|
|
91
|
+
trackAgentEvent({
|
|
92
|
+
action: verified ? 'verify' : 'unverify',
|
|
93
|
+
actionSubject: 'rovoAgentError',
|
|
94
|
+
attributes: {
|
|
95
|
+
agentId: agentId,
|
|
96
|
+
error: {
|
|
97
|
+
message: errorMessage
|
|
98
|
+
}
|
|
99
|
+
}
|
|
90
100
|
});
|
|
91
101
|
handleError(verified, errorMessage);
|
|
92
102
|
}
|
|
93
103
|
}
|
|
94
104
|
},
|
|
95
105
|
onError: function onError(error) {
|
|
96
|
-
|
|
97
|
-
|
|
106
|
+
trackAgentEvent({
|
|
107
|
+
action: verified ? 'verify' : 'unverify',
|
|
108
|
+
actionSubject: 'rovoAgentError',
|
|
109
|
+
attributes: {
|
|
110
|
+
agentId: agentId,
|
|
111
|
+
error: {
|
|
112
|
+
message: error.message
|
|
113
|
+
}
|
|
114
|
+
}
|
|
98
115
|
});
|
|
99
116
|
handleError(verified, error.message);
|
|
100
117
|
}
|
|
101
118
|
});
|
|
102
|
-
}, [agentId, commitUpdateVerification, formatMessage, handleError, onClick, onVerificationSuccess, showFlag,
|
|
119
|
+
}, [agentId, commitUpdateVerification, formatMessage, handleError, onClick, onVerificationSuccess, showFlag, trackAgentEvent]);
|
|
103
120
|
var labelText = formatMessage(isVerified ? messages.unverifyAgentLabel : messages.verifyAgentLabel);
|
|
104
121
|
var handleOnClick = function handleOnClick() {
|
|
105
122
|
return handleUpdateVerification(!isVerified);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* index.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
2
|
import "./index.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import _agentVerified_AtlaskitRovoAgentComponents from "./__generated__/agentVerified_AtlaskitRovoAgentComponents.graphql";
|
|
@@ -21,6 +21,4 @@ type AgentAvatarProps = {
|
|
|
21
21
|
* @param agentId - This is agent.id
|
|
22
22
|
*/
|
|
23
23
|
export declare const AgentAvatar: ({ imageUrl, size, label, name, agentId, agentIdentityAccountId, agentNamedId, showBorder, isRovoDev, isForgeAgent, forgeAgentIconUrl, }: AgentAvatarProps) => JSX.Element;
|
|
24
|
-
export type AgentCreatorType = 'SYSTEM' | 'CUSTOMER' | 'THIRD_PARTY' | 'FORGE' | 'OOTB' | 'REMOTE_A2A';
|
|
25
|
-
export declare const isForgeAgentByCreatorType: (creatorType: AgentCreatorType) => boolean;
|
|
26
24
|
export {};
|
|
@@ -21,6 +21,4 @@ type AgentAvatarProps = {
|
|
|
21
21
|
* @param agentId - This is agent.id
|
|
22
22
|
*/
|
|
23
23
|
export declare const AgentAvatar: ({ imageUrl, size, label, name, agentId, agentIdentityAccountId, agentNamedId, showBorder, isRovoDev, isForgeAgent, forgeAgentIconUrl, }: AgentAvatarProps) => JSX.Element;
|
|
24
|
-
export type AgentCreatorType = 'SYSTEM' | 'CUSTOMER' | 'THIRD_PARTY' | 'FORGE' | 'OOTB' | 'REMOTE_A2A';
|
|
25
|
-
export declare const isForgeAgentByCreatorType: (creatorType: AgentCreatorType) => boolean;
|
|
26
24
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/rovo-agent-components",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.40.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",
|
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
"@atlaskit/logo": "^19.10.0",
|
|
46
46
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
47
47
|
"@atlaskit/primitives": "^18.0.0",
|
|
48
|
-
"@atlaskit/rovo-agent-analytics": "^0.
|
|
48
|
+
"@atlaskit/rovo-agent-analytics": "^1.0.0",
|
|
49
49
|
"@atlaskit/skeleton": "^2.1.0",
|
|
50
|
-
"@atlaskit/tokens": "^11.
|
|
50
|
+
"@atlaskit/tokens": "^11.1.0",
|
|
51
51
|
"@atlaskit/tooltip": "^20.14.0",
|
|
52
52
|
"@babel/runtime": "^7.0.0",
|
|
53
53
|
"@compiled/react": "^0.20.0",
|