@atlaskit/smart-card 44.0.6 → 44.1.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 +12 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/hover-card/hover-card-with-generic-3p-rovo-chat-action--default.png +0 -0
- package/dist/cjs/extractors/flexible/actions/extract-rovo-chat-action.js +7 -5
- package/dist/cjs/extractors/flexible/actions/index.js +1 -1
- package/dist/cjs/extractors/flexible/index.js +1 -1
- package/dist/cjs/messages.js +25 -0
- package/dist/cjs/state/hooks/use-inline-action-nudge-experiment/index.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js +6 -1
- package/dist/cjs/view/FlexibleCard/components/actions/rovo-chat-action/index.js +80 -6
- package/dist/cjs/view/FlexibleCard/components/blocks/action-block/index.js +3 -3
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/index.js +3 -3
- package/dist/cjs/view/FlexibleCard/index.js +2 -2
- package/dist/cjs/view/HoverCard/components/HoverCardContent.js +5 -4
- package/dist/cjs/view/HoverCard/components/views/resolved/index.js +8 -3
- package/dist/cjs/view/common/ai-summary/index.js +6 -1
- package/dist/es2019/__tests__/vr-tests/__snapshots__/hover-card/hover-card-with-generic-3p-rovo-chat-action--default.png +0 -0
- package/dist/es2019/extractors/flexible/actions/extract-rovo-chat-action.js +7 -5
- package/dist/es2019/extractors/flexible/actions/index.js +1 -1
- package/dist/es2019/extractors/flexible/index.js +1 -1
- package/dist/es2019/messages.js +25 -0
- package/dist/es2019/state/hooks/use-inline-action-nudge-experiment/index.js +2 -2
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js +6 -1
- package/dist/es2019/view/FlexibleCard/components/actions/rovo-chat-action/index.js +80 -5
- package/dist/es2019/view/FlexibleCard/components/blocks/action-block/index.js +3 -3
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/index.js +2 -2
- package/dist/es2019/view/FlexibleCard/index.js +2 -2
- package/dist/es2019/view/HoverCard/components/HoverCardContent.js +5 -4
- package/dist/es2019/view/HoverCard/components/views/resolved/index.js +9 -3
- package/dist/es2019/view/common/ai-summary/index.js +6 -1
- package/dist/esm/__tests__/vr-tests/__snapshots__/hover-card/hover-card-with-generic-3p-rovo-chat-action--default.png +0 -0
- package/dist/esm/extractors/flexible/actions/extract-rovo-chat-action.js +7 -5
- package/dist/esm/extractors/flexible/actions/index.js +1 -1
- package/dist/esm/extractors/flexible/index.js +1 -1
- package/dist/esm/messages.js +25 -0
- package/dist/esm/state/hooks/use-inline-action-nudge-experiment/index.js +2 -2
- package/dist/esm/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js +6 -1
- package/dist/esm/view/FlexibleCard/components/actions/rovo-chat-action/index.js +80 -6
- package/dist/esm/view/FlexibleCard/components/blocks/action-block/index.js +3 -3
- package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/index.js +3 -3
- package/dist/esm/view/FlexibleCard/index.js +2 -2
- package/dist/esm/view/HoverCard/components/HoverCardContent.js +5 -4
- package/dist/esm/view/HoverCard/components/views/resolved/index.js +8 -3
- package/dist/esm/view/common/ai-summary/index.js +6 -1
- package/dist/types/messages.d.ts +1 -1
- package/dist/types/state/hooks/use-inline-action-nudge-experiment/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/actions/rovo-chat-action/index.d.ts +4 -1
- package/dist/types/view/FlexibleCard/components/blocks/action-block/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/blocks/action-block/types.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/types.d.ts +2 -2
- package/dist/types-ts4.5/messages.d.ts +1 -1
- package/dist/types-ts4.5/state/hooks/use-inline-action-nudge-experiment/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/rovo-chat-action/index.d.ts +4 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/action-block/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/action-block/types.d.ts +2 -2
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-summary-block/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-summary-block/types.d.ts +2 -2
- package/package.json +9 -9
- /package/dist/cjs/__tests__/vr-tests/__snapshots__/hover-card/{hover-card-rovo-chat-action--default.png → hover-card-with-google-rovo-chat-action--default.png} +0 -0
- /package/dist/es2019/__tests__/vr-tests/__snapshots__/hover-card/{hover-card-rovo-chat-action--default.png → hover-card-with-google-rovo-chat-action--default.png} +0 -0
- /package/dist/esm/__tests__/vr-tests/__snapshots__/hover-card/{hover-card-rovo-chat-action--default.png → hover-card-with-google-rovo-chat-action--default.png} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 44.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`5cdbb45dd8b9b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5cdbb45dd8b9b) -
|
|
8
|
+
[ux] Add generic 3P rovo actions for the rovogrowth-640-inline-action-nudge-exp experiment to the
|
|
9
|
+
hovercard content
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
3
15
|
## 44.0.6
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
Binary file
|
|
@@ -5,13 +5,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _linkExtractors = require("@atlaskit/link-extractors");
|
|
8
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
8
9
|
var _constants = require("../../../constants");
|
|
9
10
|
var _helpers = require("../../../state/helpers");
|
|
10
11
|
var _canShowAction = require("../../../utils/actions/can-show-action");
|
|
11
12
|
var _rovo = require("../../../utils/rovo");
|
|
12
13
|
var _types = require("../../../view/Card/types");
|
|
13
14
|
var extractRovoChatAction = function extractRovoChatAction(_ref) {
|
|
14
|
-
var _actionOptions$rovoCh;
|
|
15
|
+
var _response$meta, _actionOptions$rovoCh;
|
|
15
16
|
var actionOptions = _ref.actionOptions,
|
|
16
17
|
appearance = _ref.appearance,
|
|
17
18
|
id = _ref.id,
|
|
@@ -25,10 +26,11 @@ var extractRovoChatAction = function extractRovoChatAction(_ref) {
|
|
|
25
26
|
if (!isRovoChatEnabled) {
|
|
26
27
|
return;
|
|
27
28
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
var
|
|
29
|
+
var supportsRovoActions = response === null || response === void 0 || (_response$meta = response.meta) === null || _response$meta === void 0 || (_response$meta = _response$meta.supportedFeature) === null || _response$meta === void 0 ? void 0 : _response$meta.includes('RovoActions');
|
|
30
|
+
var isGoogleProvider = (0, _helpers.getExtensionKey)(response) === 'google-object-provider';
|
|
31
|
+
var is3PAuthRovoActionEnabled = isGoogleProvider && (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch');
|
|
32
|
+
var is3PInlinePostAuthActionsEnabled = !isGoogleProvider && (0, _platformFeatureFlags.fg)('rovogrowth-640-inline-action-nudge-fg');
|
|
33
|
+
var isSupportedFeature = supportsRovoActions && is3PInlinePostAuthActionsEnabled || is3PAuthRovoActionEnabled;
|
|
32
34
|
var isOptIn = (actionOptions === null || actionOptions === void 0 || (_actionOptions$rovoCh = actionOptions.rovoChatAction) === null || _actionOptions$rovoCh === void 0 ? void 0 : _actionOptions$rovoCh.optIn) === true;
|
|
33
35
|
var url = (0, _linkExtractors.extractSmartLinkUrl)(response);
|
|
34
36
|
return isSupportedFeature && isOptIn ? {
|
|
@@ -50,7 +50,7 @@ var extractFlexibleCardActions = exports.extractFlexibleCardActions = function e
|
|
|
50
50
|
response: response,
|
|
51
51
|
isPreviewPanelAvailable: isPreviewPanelAvailable,
|
|
52
52
|
openPreviewPanel: openPreviewPanel
|
|
53
|
-
})), _constants.ActionName.AutomationAction, (0, _extractAutomationAction.extractAutomationAction)(response)), _constants.InternalActionName.AISummaryAction, (0, _extractAiSummaryAction.extractAISummaryAction)(response, url, actionOptions, aiSummaryConfig)), (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') ? (0, _defineProperty2.default)({}, _constants.InternalActionName.RovoChatAction, (0, _extractRovoChatAction.default)({
|
|
53
|
+
})), _constants.ActionName.AutomationAction, (0, _extractAutomationAction.extractAutomationAction)(response)), _constants.InternalActionName.AISummaryAction, (0, _extractAiSummaryAction.extractAISummaryAction)(response, url, actionOptions, aiSummaryConfig)), (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') || (0, _platformFeatureFlags.fg)('rovogrowth-640-inline-action-nudge-fg') ? (0, _defineProperty2.default)({}, _constants.InternalActionName.RovoChatAction, (0, _extractRovoChatAction.default)({
|
|
54
54
|
actionOptions: actionOptions,
|
|
55
55
|
appearance: appearance,
|
|
56
56
|
id: id,
|
|
@@ -55,7 +55,7 @@ var extractFlexibleUiContext = function extractFlexibleUiContext() {
|
|
|
55
55
|
fireEvent: fireEvent,
|
|
56
56
|
id: id,
|
|
57
57
|
origin: origin
|
|
58
|
-
}, (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') ? {
|
|
58
|
+
}, (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') || (0, _platformFeatureFlags.fg)('rovogrowth-640-inline-action-nudge-fg') ? {
|
|
59
59
|
product: product,
|
|
60
60
|
rovoConfig: rovoConfig
|
|
61
61
|
} : undefined), {}, {
|
package/dist/cjs/messages.js
CHANGED
|
@@ -951,5 +951,30 @@ var messages = exports.messages = (0, _reactIntl.defineMessages)({
|
|
|
951
951
|
id: 'fabric.linking.rovo_prompt_message_suggest_improvement.non-final',
|
|
952
952
|
defaultMessage: '<p>Using the {context} I’m viewing now, plus all files and links referenced in it (including <a>{url}</a>):</p><ul><li><p>Identify unclear reasoning, missing context, or contradictions between the item and its linked files.</p></li><li><p>Call out any places where assumptions are not backed up by data or prior docs.</p></li><li><p>Stay concise: summarize your findings in <b>no more than three short paragraphs of content listed as bullets</b> of no more than a couple of sentences long focused only on the two points above.</p></li><li><p>After presenting that summary, <b>ask me explicitly</b> if I want you to go deeper. Only if I say yes, then:</p><ul><li><p>Suggest concrete rewrites (bullets or short paragraphs) to make the argument clearer, more concise, and better aligned with the supporting files.</p></li><li><p>Propose 3–5 follow‑up edits or additions that would make this item and its linked docs “share‑ready” for stakeholders.</p></li></ul></li></ul>',
|
|
953
953
|
description: 'The prompt message to send to Rovo Chat. {context} refers to the content the user triggered from, e.g. Confluence page or Jira work item. {url} refers to Smart Link that the user triggers this action from. (Please make sure all html tags remain the same.)'
|
|
954
|
+
},
|
|
955
|
+
rovo_prompt_message_summarize: {
|
|
956
|
+
id: 'fabric.linking.rovo_prompt_message_summarize.non-final',
|
|
957
|
+
defaultMessage: '<p>Summarize the main ideas and key points of <a>{url}</a> in 3-5 clear, complete sentences.</p><p>Preserve any important details such as names, dates, and key decisions.</p>',
|
|
958
|
+
description: 'The prompt message to send to Rovo Chat. {url} refers to Smart Link that the user triggers this action from. (Please make sure all html tags remain the same.)'
|
|
959
|
+
},
|
|
960
|
+
rovo_prompt_button_key_highlights: {
|
|
961
|
+
id: 'fabric.linking.rovo_prompt_button_key_highlights.non-final',
|
|
962
|
+
defaultMessage: 'Key highlights',
|
|
963
|
+
description: 'The name of the action to send a key highlights prompt message to Rovo Chat in relation to current Smart Link'
|
|
964
|
+
},
|
|
965
|
+
rovo_prompt_message_key_highlights: {
|
|
966
|
+
id: 'fabric.linking.rovo_prompt_message_key_highlights.non-final',
|
|
967
|
+
defaultMessage: '<p>Based on <a>{url}</a> and the page or ticket I\'m currently viewing, highlight the parts of the linked content that are most relevant to this work. Explain briefly why each part is relevant.</p>',
|
|
968
|
+
description: 'The prompt message to send to Rovo Chat. {url} refers to Smart Link that the user triggers this action from. (Please make sure all html tags remain the same.)'
|
|
969
|
+
},
|
|
970
|
+
rovo_prompt_button_ask_rovo_anything: {
|
|
971
|
+
id: 'fabric.linking.rovo_prompt_button_ask_rovo.non-final',
|
|
972
|
+
defaultMessage: 'Ask Rovo',
|
|
973
|
+
description: 'The name of the action to open Rovo Chat and ask a question in relation to current Smart Link'
|
|
974
|
+
},
|
|
975
|
+
rovo_prompt_message_ask_rovo_anything: {
|
|
976
|
+
id: 'fabric.linking.rovo_prompt_message_ask_rovo_anything.non-final',
|
|
977
|
+
defaultMessage: '`I have a question about this linked item` {url}',
|
|
978
|
+
description: 'The placeholder prompt message pre-filled in Rovo Chat input. {url} refers to the Smart Link URL. This is not auto-submitted — the user types their question.'
|
|
954
979
|
}
|
|
955
980
|
});
|
|
@@ -17,7 +17,7 @@ var NOT_ENABLED_RESULT = {
|
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
|
-
* Returns whether the
|
|
20
|
+
* Returns whether the rovogrowth-640-inline-action-nudge-exp experiment
|
|
21
21
|
* is enabled for the current user and link context.
|
|
22
22
|
*
|
|
23
23
|
* All eligibility criteria are consolidated here:
|
|
@@ -40,7 +40,7 @@ var useInlineActionNudgeExperiment = function useInlineActionNudgeExperiment(url
|
|
|
40
40
|
if (extensionKey && EXCLUDED_EXTENSION_KEYS.has(extensionKey)) {
|
|
41
41
|
return NOT_ENABLED_RESULT;
|
|
42
42
|
}
|
|
43
|
-
var isEnabled = (0, _expValEquals.expValEquals)('
|
|
43
|
+
var isEnabled = (0, _expValEquals.expValEquals)('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true);
|
|
44
44
|
return {
|
|
45
45
|
isEnabled: isEnabled
|
|
46
46
|
};
|
package/dist/cjs/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js
CHANGED
|
@@ -43,8 +43,13 @@ var ActionButton = function ActionButton(_ref) {
|
|
|
43
43
|
onClickCallback();
|
|
44
44
|
}
|
|
45
45
|
}, [isDisabled, isLoading, onClickCallback]);
|
|
46
|
+
var is3pExperimentEnabled =
|
|
47
|
+
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
48
|
+
(0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_sl_3p_auth_rovo_action', 'isEnabled', true) ||
|
|
49
|
+
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
50
|
+
(0, _platformFeatureFlags.fg)('rovogrowth-640-inline-action-nudge-fg') && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true);
|
|
46
51
|
var icon = iconOption && isLoading ? /*#__PURE__*/React.createElement(_actionIcon.default, {
|
|
47
|
-
icon:
|
|
52
|
+
icon: is3pExperimentEnabled ? /*#__PURE__*/React.createElement(_compiled.Box, {
|
|
48
53
|
xcss: styles.spinner
|
|
49
54
|
}, /*#__PURE__*/React.createElement(_spinner.default, {
|
|
50
55
|
size: 16,
|
|
@@ -13,6 +13,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
13
13
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
14
14
|
var _react = _interopRequireWildcard(require("react"));
|
|
15
15
|
var _reactIntl = require("react-intl");
|
|
16
|
+
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
16
17
|
var _constants = require("../../../../../constants");
|
|
17
18
|
var _messages = require("../../../../../messages");
|
|
18
19
|
var _flexibleUiContext = require("../../../../../state/flexible-ui-context");
|
|
@@ -31,9 +32,16 @@ var RovoChatPromptKey = exports.RovoChatPromptKey = /*#__PURE__*/function (RovoC
|
|
|
31
32
|
RovoChatPromptKey["RECOMMEND_OTHER_SOURCES"] = "recommend-other-sources";
|
|
32
33
|
RovoChatPromptKey["SHOW_OTHER_MENTIONS"] = "show-other-mentions";
|
|
33
34
|
RovoChatPromptKey["SUGGEST_IMPROVEMENT"] = "suggest-improvement";
|
|
35
|
+
RovoChatPromptKey["SUMMARIZE_LINK"] = "summarize-link";
|
|
36
|
+
RovoChatPromptKey["KEY_HIGHLIGHTS"] = "key-highlights";
|
|
37
|
+
RovoChatPromptKey["ASK_ROVO_ANYTHING"] = "ask-rovo-anything";
|
|
34
38
|
return RovoChatPromptKey;
|
|
35
39
|
}({});
|
|
36
|
-
var
|
|
40
|
+
var GOOGLE_PROMPTS = [RovoChatPromptKey.RECOMMEND_OTHER_SOURCES, RovoChatPromptKey.SHOW_OTHER_MENTIONS, RovoChatPromptKey.SUGGEST_IMPROVEMENT];
|
|
41
|
+
var GENERIC_3P_PROMPTS = [
|
|
42
|
+
// For rovogrowth-640-inline-action-nudge-exp only. Applies to all RovoActions eligible providers, except Google
|
|
43
|
+
RovoChatPromptKey.SUMMARIZE_LINK, RovoChatPromptKey.KEY_HIGHLIGHTS, RovoChatPromptKey.ASK_ROVO_ANYTHING];
|
|
44
|
+
var DEFAULT_PROMPTS = GOOGLE_PROMPTS;
|
|
37
45
|
var getContext = function getContext(intl, product) {
|
|
38
46
|
switch (product) {
|
|
39
47
|
case 'CONFLUENCE':
|
|
@@ -118,13 +126,69 @@ var getPromptAction = function getPromptAction(promptKey, intl) {
|
|
|
118
126
|
prompt: (0, _htmlToAdf.default)(html_improvement)
|
|
119
127
|
}
|
|
120
128
|
};
|
|
129
|
+
case RovoChatPromptKey.SUMMARIZE_LINK:
|
|
130
|
+
var label_summarize = intl.formatMessage(_messages.messages.ai_summarize);
|
|
131
|
+
var html_summarize = intl.formatMessage(_messages.messages.rovo_prompt_message_summarize, {
|
|
132
|
+
url: url
|
|
133
|
+
}, {
|
|
134
|
+
ignoreTag: true
|
|
135
|
+
});
|
|
136
|
+
return {
|
|
137
|
+
icon: /*#__PURE__*/_react.default.createElement(_aiEditIcon.default, null),
|
|
138
|
+
content: label_summarize,
|
|
139
|
+
tooltipMessage: label_summarize,
|
|
140
|
+
data: {
|
|
141
|
+
name: label_summarize,
|
|
142
|
+
dialogues: [],
|
|
143
|
+
prompt: (0, _htmlToAdf.default)(html_summarize),
|
|
144
|
+
mode: {
|
|
145
|
+
fastModeEnabled: true
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
case RovoChatPromptKey.KEY_HIGHLIGHTS:
|
|
150
|
+
var label_key_highlights = intl.formatMessage(_messages.messages.rovo_prompt_button_key_highlights);
|
|
151
|
+
var html_key_highlights = intl.formatMessage(_messages.messages.rovo_prompt_message_key_highlights, {
|
|
152
|
+
url: url
|
|
153
|
+
}, {
|
|
154
|
+
ignoreTag: true
|
|
155
|
+
});
|
|
156
|
+
return {
|
|
157
|
+
icon: /*#__PURE__*/_react.default.createElement(_aiChapterIcon.default, null),
|
|
158
|
+
content: label_key_highlights,
|
|
159
|
+
tooltipMessage: label_key_highlights,
|
|
160
|
+
data: {
|
|
161
|
+
name: label_key_highlights,
|
|
162
|
+
dialogues: [],
|
|
163
|
+
prompt: (0, _htmlToAdf.default)(html_key_highlights),
|
|
164
|
+
mode: {
|
|
165
|
+
fastModeEnabled: true
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
};
|
|
169
|
+
case RovoChatPromptKey.ASK_ROVO_ANYTHING:
|
|
170
|
+
var label_ask_rovo_anything = intl.formatMessage(_messages.messages.rovo_prompt_button_ask_rovo_anything);
|
|
171
|
+
var prompt_ask_rovo_anything = intl.formatMessage(_messages.messages.rovo_prompt_message_ask_rovo_anything, {
|
|
172
|
+
url: url
|
|
173
|
+
});
|
|
174
|
+
return {
|
|
175
|
+
icon: /*#__PURE__*/_react.default.createElement(_aiSearchIcon.default, null),
|
|
176
|
+
content: label_ask_rovo_anything,
|
|
177
|
+
tooltipMessage: label_ask_rovo_anything,
|
|
178
|
+
data: {
|
|
179
|
+
name: label_ask_rovo_anything,
|
|
180
|
+
dialogues: [],
|
|
181
|
+
prompt: prompt_ask_rovo_anything,
|
|
182
|
+
isPromptPlaceholder: true,
|
|
183
|
+
placeholderType: 'generic'
|
|
184
|
+
}
|
|
185
|
+
};
|
|
121
186
|
}
|
|
122
187
|
};
|
|
123
188
|
var RovoChatAction = function RovoChatAction(_ref2) {
|
|
124
|
-
var _context$actions;
|
|
189
|
+
var _context$actions, _data$invokeAction2;
|
|
125
190
|
var onClickCallback = _ref2.onClick,
|
|
126
|
-
|
|
127
|
-
prompts = _ref2$prompts === void 0 ? DEFAULT_PROMPTS : _ref2$prompts,
|
|
191
|
+
prompts = _ref2.prompts,
|
|
128
192
|
_ref2$testId = _ref2.testId,
|
|
129
193
|
testId = _ref2$testId === void 0 ? 'smart-action-rovo-chat-action' : _ref2$testId,
|
|
130
194
|
props = (0, _objectWithoutProperties2.default)(_ref2, _excluded);
|
|
@@ -134,6 +198,16 @@ var RovoChatAction = function RovoChatAction(_ref2) {
|
|
|
134
198
|
sendPromptMessage = _useRovoChat.sendPromptMessage;
|
|
135
199
|
var context = (0, _flexibleUiContext.useFlexibleUiContext)();
|
|
136
200
|
var data = context === null || context === void 0 || (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[_constants.InternalActionName.RovoChatAction];
|
|
201
|
+
var resolvedPrompts = (0, _react.useMemo)(function () {
|
|
202
|
+
var _data$invokeAction;
|
|
203
|
+
if (prompts) {
|
|
204
|
+
return prompts;
|
|
205
|
+
}
|
|
206
|
+
if ((0, _expValEqualsNoExposure.expValEqualsNoExposure)('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true) && (data === null || data === void 0 || (_data$invokeAction = data.invokeAction) === null || _data$invokeAction === void 0 ? void 0 : _data$invokeAction.extensionKey) !== 'google-object-provider') {
|
|
207
|
+
return GENERIC_3P_PROMPTS;
|
|
208
|
+
}
|
|
209
|
+
return DEFAULT_PROMPTS;
|
|
210
|
+
}, [prompts, data === null || data === void 0 || (_data$invokeAction2 = data.invokeAction) === null || _data$invokeAction2 === void 0 ? void 0 : _data$invokeAction2.extensionKey]);
|
|
137
211
|
var invoke = (0, _useInvokeClientAction.default)({});
|
|
138
212
|
var _onClick = (0, _react.useCallback)(function (promptData, promptKey) {
|
|
139
213
|
if (promptData && data !== null && data !== void 0 && data.invokeAction) {
|
|
@@ -161,7 +235,7 @@ var RovoChatAction = function RovoChatAction(_ref2) {
|
|
|
161
235
|
}
|
|
162
236
|
}, [data === null || data === void 0 ? void 0 : data.invokeAction, invoke, onClickCallback, sendPromptMessage]);
|
|
163
237
|
var promptActions = (0, _react.useMemo)(function () {
|
|
164
|
-
return
|
|
238
|
+
return resolvedPrompts.map(function (promptKey, idx) {
|
|
165
239
|
var _ref3 = getPromptAction(promptKey, intl, data === null || data === void 0 ? void 0 : data.url, data === null || data === void 0 ? void 0 : data.product) || {},
|
|
166
240
|
icon = _ref3.icon,
|
|
167
241
|
content = _ref3.content,
|
|
@@ -178,7 +252,7 @@ var RovoChatAction = function RovoChatAction(_ref2) {
|
|
|
178
252
|
tooltipMessage: tooltipMessage
|
|
179
253
|
}, props)) : null;
|
|
180
254
|
});
|
|
181
|
-
}, [data, intl, _onClick,
|
|
255
|
+
}, [data, intl, _onClick, resolvedPrompts, props, testId]);
|
|
182
256
|
return isRovoChatEnabled && data && (promptActions === null || promptActions === void 0 ? void 0 : promptActions.length) > 0 ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, promptActions) : null;
|
|
183
257
|
};
|
|
184
258
|
var _default = exports.default = RovoChatAction;
|
|
@@ -59,10 +59,10 @@ var ActionBlock = function ActionBlock(_ref) {
|
|
|
59
59
|
className = _ref.className,
|
|
60
60
|
_ref$testId = _ref.testId,
|
|
61
61
|
testId = _ref$testId === void 0 ? 'smart-block-action' : _ref$testId,
|
|
62
|
-
|
|
62
|
+
isAny3pRovoActionsExperimentOn = _ref.isAny3pRovoActionsExperimentOn;
|
|
63
63
|
var context = (0, _flexibleUiContext.useFlexibleUiContext)();
|
|
64
64
|
var ui = (0, _flexibleUiContext.useFlexibleUiOptionContext)();
|
|
65
|
-
var isRovoChatActionAvailable =
|
|
65
|
+
var isRovoChatActionAvailable = ((0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') || (0, _platformFeatureFlags.fg)('rovogrowth-640-inline-action-nudge-fg')) && isAny3pRovoActionsExperimentOn ? (context === null || context === void 0 || (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[_constants.InternalActionName.RovoChatAction]) !== undefined : undefined;
|
|
66
66
|
var _useState = (0, _react.useState)(),
|
|
67
67
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
68
68
|
message = _useState2[0],
|
|
@@ -86,7 +86,7 @@ var ActionBlock = function ActionBlock(_ref) {
|
|
|
86
86
|
if (!(context !== null && context !== void 0 && context.actions)) {
|
|
87
87
|
return;
|
|
88
88
|
}
|
|
89
|
-
var arr = (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') ? isRovoChatActionAvailable ? [_constants.InternalActionName.RovoChatAction] : Object.keys(context.actions).filter(function (name) {
|
|
89
|
+
var arr = (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') || (0, _platformFeatureFlags.fg)('rovogrowth-640-inline-action-nudge-fg') ? isRovoChatActionAvailable ? [_constants.InternalActionName.RovoChatAction] : Object.keys(context.actions).filter(function (name) {
|
|
90
90
|
return name !== _constants.InternalActionName.RovoChatAction;
|
|
91
91
|
}) : Object.keys(context.actions);
|
|
92
92
|
arr.sort(sort);
|
|
@@ -12,7 +12,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
12
12
|
var _constants = require("../../../../../constants");
|
|
13
13
|
var _flexibleUiContext = require("../../../../../state/flexible-ui-context");
|
|
14
14
|
var _resolved = _interopRequireWildcard(require("./resolved"));
|
|
15
|
-
var _excluded = ["
|
|
15
|
+
var _excluded = ["isAny3pRovoActionsExperimentOn", "testId"];
|
|
16
16
|
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); }
|
|
17
17
|
/**
|
|
18
18
|
* Represents an AISummaryBlock, designed to summarising link resource
|
|
@@ -23,7 +23,7 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
23
23
|
*/
|
|
24
24
|
var AISummaryBlock = function AISummaryBlock(_ref) {
|
|
25
25
|
var _context$actions, _props$size2, _cardContext$ui2;
|
|
26
|
-
var
|
|
26
|
+
var isAny3pRovoActionsExperimentOn = _ref.isAny3pRovoActionsExperimentOn,
|
|
27
27
|
_ref$testId = _ref.testId,
|
|
28
28
|
testId = _ref$testId === void 0 ? 'smart-ai-summary-block' : _ref$testId,
|
|
29
29
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
@@ -36,7 +36,7 @@ var AISummaryBlock = function AISummaryBlock(_ref) {
|
|
|
36
36
|
if (!(actionData !== null && actionData !== void 0 && actionData.url)) {
|
|
37
37
|
return null;
|
|
38
38
|
}
|
|
39
|
-
if (
|
|
39
|
+
if (isAny3pRovoActionsExperimentOn) {
|
|
40
40
|
var _props$size, _cardContext$ui;
|
|
41
41
|
return /*#__PURE__*/_react.default.createElement(_resolved.RovoSummaryBlockResolvedView, (0, _extends2.default)({}, props, {
|
|
42
42
|
size: (_props$size = props.size) !== null && _props$size !== void 0 ? _props$size : cardContext === null || cardContext === void 0 || (_cardContext$ui = cardContext.ui) === null || _cardContext$ui === void 0 ? void 0 : _cardContext$ui.size,
|
|
@@ -58,7 +58,7 @@ var FlexibleCard = function FlexibleCard(_ref) {
|
|
|
58
58
|
isPreviewPanelAvailable = _useSmartLinkContext.isPreviewPanelAvailable,
|
|
59
59
|
openPreviewPanel = _useSmartLinkContext.openPreviewPanel,
|
|
60
60
|
product = _useSmartLinkContext.product;
|
|
61
|
-
var rovoConfig = (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') ?
|
|
61
|
+
var rovoConfig = (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') || (0, _platformFeatureFlags.fg)('rovogrowth-640-inline-action-nudge-fg') ?
|
|
62
62
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
63
63
|
(0, _useRovoConfig.default)() : undefined;
|
|
64
64
|
var _useAnalyticsEvents = (0, _useAnalyticsEvents2.useAnalyticsEvents)(),
|
|
@@ -85,7 +85,7 @@ var FlexibleCard = function FlexibleCard(_ref) {
|
|
|
85
85
|
origin: origin,
|
|
86
86
|
renderers: renderers,
|
|
87
87
|
resolve: resolve
|
|
88
|
-
}, (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') ? {
|
|
88
|
+
}, (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') || (0, _platformFeatureFlags.fg)('rovogrowth-640-inline-action-nudge-fg') ? {
|
|
89
89
|
product: product,
|
|
90
90
|
rovoConfig: rovoConfig
|
|
91
91
|
} : undefined), {}, {
|
|
@@ -244,7 +244,7 @@ var HoverCardContent = function HoverCardContent(_ref4) {
|
|
|
244
244
|
});
|
|
245
245
|
}
|
|
246
246
|
if (isResolved) {
|
|
247
|
-
return /*#__PURE__*/_react.default.createElement(_resolved.default, (0, _extends2.default)({}, (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') ? {
|
|
247
|
+
return /*#__PURE__*/_react.default.createElement(_resolved.default, (0, _extends2.default)({}, (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') || (0, _platformFeatureFlags.fg)('rovogrowth-640-inline-action-nudge-fg') ? {
|
|
248
248
|
actionOptions: actionOptions,
|
|
249
249
|
showRovoResolvedView: showRovoResolvedView
|
|
250
250
|
} : undefined, {
|
|
@@ -296,7 +296,7 @@ var HoverCardContent = function HoverCardContent(_ref4) {
|
|
|
296
296
|
});
|
|
297
297
|
}
|
|
298
298
|
if (cardState.status === 'resolved') {
|
|
299
|
-
return /*#__PURE__*/_react.default.createElement(_resolved.default, (0, _extends2.default)({}, (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') ? {
|
|
299
|
+
return /*#__PURE__*/_react.default.createElement(_resolved.default, (0, _extends2.default)({}, (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') || (0, _platformFeatureFlags.fg)('rovogrowth-640-inline-action-nudge-fg') ? {
|
|
300
300
|
actionOptions: actionOptions,
|
|
301
301
|
showRovoResolvedView: showRovoResolvedView
|
|
302
302
|
} : undefined, {
|
|
@@ -335,7 +335,7 @@ var HoverCardContentWithViewVariant = function HoverCardContentWithViewVariant(p
|
|
|
335
335
|
}, [actionOptions, cardState.details, rovoConfig, isResolved]);
|
|
336
336
|
var data = (0, _react.useMemo)(function () {
|
|
337
337
|
var viewVariant = 'default';
|
|
338
|
-
if (showRovoResolvedView && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_sl_3p_auth_rovo_action', 'isEnabled', true)) {
|
|
338
|
+
if (showRovoResolvedView && ((0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_sl_3p_auth_rovo_action', 'isEnabled', true) || (0, _expValEqualsNoExposure.expValEqualsNoExposure)('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true))) {
|
|
339
339
|
viewVariant = 'rovo-resolved-view';
|
|
340
340
|
} else if (showPreauthBetterHovercard) {
|
|
341
341
|
viewVariant = 'rovo-unauthorised-view';
|
|
@@ -356,5 +356,6 @@ var _default = exports.default = (0, _platformFeatureFlagsReact.componentWithCon
|
|
|
356
356
|
// We need to read both of them to sutisfy some of the tests that expect both to be checked.
|
|
357
357
|
var flagA = (0, _platformFeatureFlags.fg)('platform_sl_3p_preauth_better_hovercard_killswitch');
|
|
358
358
|
var flagB = (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch');
|
|
359
|
-
|
|
359
|
+
var flagC = (0, _platformFeatureFlags.fg)('rovogrowth-640-inline-action-nudge-fg');
|
|
360
|
+
return flagA || flagB || flagC;
|
|
360
361
|
}, HoverCardContentWithViewVariant, HoverCardContent);
|
|
@@ -17,6 +17,7 @@ var _useAnalyticsEvents2 = require("../../../../../common/analytics/generated/us
|
|
|
17
17
|
var _constants = require("../../../../../constants");
|
|
18
18
|
var _analytics = require("../../../../../state/analytics");
|
|
19
19
|
var _useAiSummaryAction = _interopRequireDefault(require("../../../../../state/hooks/use-ai-summary-action"));
|
|
20
|
+
var _useInlineActionNudgeExperiment = _interopRequireDefault(require("../../../../../state/hooks/use-inline-action-nudge-experiment"));
|
|
20
21
|
var _FlexibleCard = _interopRequireDefault(require("../../../../FlexibleCard"));
|
|
21
22
|
var _blocks = require("../../../../FlexibleCard/components/blocks");
|
|
22
23
|
var _utils = require("../../../utils");
|
|
@@ -38,10 +39,14 @@ var HoverCardResolvedView = function HoverCardResolvedView(_ref) {
|
|
|
38
39
|
id = _ref.id;
|
|
39
40
|
var _useAnalyticsEvents = (0, _useAnalyticsEvents2.useAnalyticsEvents)(),
|
|
40
41
|
fireEvent = _useAnalyticsEvents.fireEvent;
|
|
42
|
+
var _useInlineActionNudge = (0, _useInlineActionNudgeExperiment.default)(),
|
|
43
|
+
InlineActionNudgeExperimentValue = _useInlineActionNudge.isEnabled;
|
|
41
44
|
|
|
42
45
|
// We want to fire exposure event only for those cases when user otherwise can see the experiment which would be controlled
|
|
43
46
|
// by all the other condition defined above as a result of what was defined in actionOptions as well as in CardContext.
|
|
44
47
|
var is3PAuthRovoActionsExperimentOn = showRovoResolvedView && (0, _expValEquals.expValEquals)('platform_sl_3p_auth_rovo_action', 'isEnabled', true);
|
|
48
|
+
var is3PInlinePostAuthActionsExperimentOn = showRovoResolvedView && InlineActionNudgeExperimentValue;
|
|
49
|
+
var isAny3pRovoActionsExperimentOn = is3PAuthRovoActionsExperimentOn || is3PInlinePostAuthActionsExperimentOn;
|
|
45
50
|
(0, _react.useEffect)(function () {
|
|
46
51
|
// Since this hover view is only rendered on resolved status,
|
|
47
52
|
// there is no need to check for statuses.
|
|
@@ -89,7 +94,7 @@ var HoverCardResolvedView = function HoverCardResolvedView(_ref) {
|
|
|
89
94
|
}), isAISummaryEnabled ? /*#__PURE__*/_react.default.createElement(_blocks.AISummaryBlock, {
|
|
90
95
|
aiSummaryMinHeight: aiSummaryMinHeight,
|
|
91
96
|
placeholder: snippet,
|
|
92
|
-
|
|
97
|
+
isAny3pRovoActionsExperimentOn: isAny3pRovoActionsExperimentOn
|
|
93
98
|
}) : snippet, /*#__PURE__*/_react.default.createElement(_blocks.SnippetBlock, {
|
|
94
99
|
testId: "hidden-snippet",
|
|
95
100
|
onRender: onSnippetRender,
|
|
@@ -99,9 +104,9 @@ var HoverCardResolvedView = function HoverCardResolvedView(_ref) {
|
|
|
99
104
|
}), /*#__PURE__*/_react.default.createElement(_blocks.ActionBlock, {
|
|
100
105
|
onClick: onActionClick,
|
|
101
106
|
spaceInline: "space.100",
|
|
102
|
-
|
|
107
|
+
isAny3pRovoActionsExperimentOn: isAny3pRovoActionsExperimentOn,
|
|
103
108
|
className: (0, _runtime.ax)(["_n3td1b66"])
|
|
104
|
-
}),
|
|
109
|
+
}), isAny3pRovoActionsExperimentOn ? /*#__PURE__*/_react.default.createElement(_blocks.ResolvedHoverCardFooterBlock, {
|
|
105
110
|
onActionClick: onActionClick
|
|
106
111
|
}) : /*#__PURE__*/_react.default.createElement(_blocks.AIFooterBlock, null));
|
|
107
112
|
};
|
|
@@ -35,11 +35,16 @@ var AISummary = function AISummary(_ref) {
|
|
|
35
35
|
if (!content && minHeight === 0) {
|
|
36
36
|
return null;
|
|
37
37
|
}
|
|
38
|
+
var is3pExperimentEnabled =
|
|
39
|
+
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
40
|
+
(0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_sl_3p_auth_rovo_action', 'isEnabled', true) ||
|
|
41
|
+
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
42
|
+
(0, _platformFeatureFlags.fg)('rovogrowth-640-inline-action-nudge-fg') && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true);
|
|
38
43
|
return /*#__PURE__*/React.createElement(_markdownToJsx.default, {
|
|
39
44
|
"data-testid": testId
|
|
40
45
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
41
46
|
,
|
|
42
|
-
className: (0, _runtime.ax)(["_11c8wadc _slp31hna _1nmz1hna _o5724jg8 _181u1kdv _1rkw1kdv _te171kdv _uizt1kdv",
|
|
47
|
+
className: (0, _runtime.ax)(["_11c8wadc _slp31hna _1nmz1hna _o5724jg8 _181u1kdv _1rkw1kdv _te171kdv _uizt1kdv", is3pExperimentEnabled ? "_syazi7uo" : "_syazazsu", className]),
|
|
43
48
|
children: content,
|
|
44
49
|
options: {
|
|
45
50
|
forceWrapper: true,
|
|
Binary file
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { extractSmartLinkUrl } from '@atlaskit/link-extractors';
|
|
2
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
3
|
import { InternalActionName } from '../../../constants';
|
|
3
4
|
import { getDefinitionId, getExtensionKey, getResourceType } from '../../../state/helpers';
|
|
4
5
|
import { canShowAction } from '../../../utils/actions/can-show-action';
|
|
@@ -12,7 +13,7 @@ const extractRovoChatAction = ({
|
|
|
12
13
|
response,
|
|
13
14
|
rovoConfig
|
|
14
15
|
}) => {
|
|
15
|
-
var _actionOptions$rovoCh;
|
|
16
|
+
var _response$meta, _response$meta$suppor, _actionOptions$rovoCh;
|
|
16
17
|
if (!canShowAction(CardAction.RovoChatAction, actionOptions)) {
|
|
17
18
|
return;
|
|
18
19
|
}
|
|
@@ -20,10 +21,11 @@ const extractRovoChatAction = ({
|
|
|
20
21
|
if (!isRovoChatEnabled) {
|
|
21
22
|
return;
|
|
22
23
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
const
|
|
24
|
+
const supportsRovoActions = response === null || response === void 0 ? void 0 : (_response$meta = response.meta) === null || _response$meta === void 0 ? void 0 : (_response$meta$suppor = _response$meta.supportedFeature) === null || _response$meta$suppor === void 0 ? void 0 : _response$meta$suppor.includes('RovoActions');
|
|
25
|
+
const isGoogleProvider = getExtensionKey(response) === 'google-object-provider';
|
|
26
|
+
const is3PAuthRovoActionEnabled = isGoogleProvider && fg('platform_sl_3p_auth_rovo_action_kill_switch');
|
|
27
|
+
const is3PInlinePostAuthActionsEnabled = !isGoogleProvider && fg('rovogrowth-640-inline-action-nudge-fg');
|
|
28
|
+
const isSupportedFeature = supportsRovoActions && is3PInlinePostAuthActionsEnabled || is3PAuthRovoActionEnabled;
|
|
27
29
|
const isOptIn = (actionOptions === null || actionOptions === void 0 ? void 0 : (_actionOptions$rovoCh = actionOptions.rovoChatAction) === null || _actionOptions$rovoCh === void 0 ? void 0 : _actionOptions$rovoCh.optIn) === true;
|
|
28
30
|
const url = extractSmartLinkUrl(response);
|
|
29
31
|
return isSupportedFeature && isOptIn ? {
|
|
@@ -48,7 +48,7 @@ export const extractFlexibleCardActions = ({
|
|
|
48
48
|
}),
|
|
49
49
|
[ActionName.AutomationAction]: extractAutomationAction(response),
|
|
50
50
|
[InternalActionName.AISummaryAction]: extractAISummaryAction(response, url, actionOptions, aiSummaryConfig),
|
|
51
|
-
...(fg('platform_sl_3p_auth_rovo_action_kill_switch') ? {
|
|
51
|
+
...(fg('platform_sl_3p_auth_rovo_action_kill_switch') || fg('rovogrowth-640-inline-action-nudge-fg') ? {
|
|
52
52
|
[InternalActionName.RovoChatAction]: extractRovoChatAction({
|
|
53
53
|
actionOptions,
|
|
54
54
|
appearance,
|
|
@@ -43,7 +43,7 @@ const extractFlexibleUiContext = ({
|
|
|
43
43
|
fireEvent,
|
|
44
44
|
id,
|
|
45
45
|
origin,
|
|
46
|
-
...(fg('platform_sl_3p_auth_rovo_action_kill_switch') ? {
|
|
46
|
+
...(fg('platform_sl_3p_auth_rovo_action_kill_switch') || fg('rovogrowth-640-inline-action-nudge-fg') ? {
|
|
47
47
|
product,
|
|
48
48
|
rovoConfig
|
|
49
49
|
} : undefined),
|
package/dist/es2019/messages.js
CHANGED
|
@@ -945,5 +945,30 @@ export const messages = defineMessages({
|
|
|
945
945
|
id: 'fabric.linking.rovo_prompt_message_suggest_improvement.non-final',
|
|
946
946
|
defaultMessage: '<p>Using the {context} I’m viewing now, plus all files and links referenced in it (including <a>{url}</a>):</p><ul><li><p>Identify unclear reasoning, missing context, or contradictions between the item and its linked files.</p></li><li><p>Call out any places where assumptions are not backed up by data or prior docs.</p></li><li><p>Stay concise: summarize your findings in <b>no more than three short paragraphs of content listed as bullets</b> of no more than a couple of sentences long focused only on the two points above.</p></li><li><p>After presenting that summary, <b>ask me explicitly</b> if I want you to go deeper. Only if I say yes, then:</p><ul><li><p>Suggest concrete rewrites (bullets or short paragraphs) to make the argument clearer, more concise, and better aligned with the supporting files.</p></li><li><p>Propose 3–5 follow‑up edits or additions that would make this item and its linked docs “share‑ready” for stakeholders.</p></li></ul></li></ul>',
|
|
947
947
|
description: 'The prompt message to send to Rovo Chat. {context} refers to the content the user triggered from, e.g. Confluence page or Jira work item. {url} refers to Smart Link that the user triggers this action from. (Please make sure all html tags remain the same.)'
|
|
948
|
+
},
|
|
949
|
+
rovo_prompt_message_summarize: {
|
|
950
|
+
id: 'fabric.linking.rovo_prompt_message_summarize.non-final',
|
|
951
|
+
defaultMessage: '<p>Summarize the main ideas and key points of <a>{url}</a> in 3-5 clear, complete sentences.</p><p>Preserve any important details such as names, dates, and key decisions.</p>',
|
|
952
|
+
description: 'The prompt message to send to Rovo Chat. {url} refers to Smart Link that the user triggers this action from. (Please make sure all html tags remain the same.)'
|
|
953
|
+
},
|
|
954
|
+
rovo_prompt_button_key_highlights: {
|
|
955
|
+
id: 'fabric.linking.rovo_prompt_button_key_highlights.non-final',
|
|
956
|
+
defaultMessage: 'Key highlights',
|
|
957
|
+
description: 'The name of the action to send a key highlights prompt message to Rovo Chat in relation to current Smart Link'
|
|
958
|
+
},
|
|
959
|
+
rovo_prompt_message_key_highlights: {
|
|
960
|
+
id: 'fabric.linking.rovo_prompt_message_key_highlights.non-final',
|
|
961
|
+
defaultMessage: '<p>Based on <a>{url}</a> and the page or ticket I\'m currently viewing, highlight the parts of the linked content that are most relevant to this work. Explain briefly why each part is relevant.</p>',
|
|
962
|
+
description: 'The prompt message to send to Rovo Chat. {url} refers to Smart Link that the user triggers this action from. (Please make sure all html tags remain the same.)'
|
|
963
|
+
},
|
|
964
|
+
rovo_prompt_button_ask_rovo_anything: {
|
|
965
|
+
id: 'fabric.linking.rovo_prompt_button_ask_rovo.non-final',
|
|
966
|
+
defaultMessage: 'Ask Rovo',
|
|
967
|
+
description: 'The name of the action to open Rovo Chat and ask a question in relation to current Smart Link'
|
|
968
|
+
},
|
|
969
|
+
rovo_prompt_message_ask_rovo_anything: {
|
|
970
|
+
id: 'fabric.linking.rovo_prompt_message_ask_rovo_anything.non-final',
|
|
971
|
+
defaultMessage: '`I have a question about this linked item` {url}',
|
|
972
|
+
description: 'The placeholder prompt message pre-filled in Rovo Chat input. {url} refers to the Smart Link URL. This is not auto-submitted — the user types their question.'
|
|
948
973
|
}
|
|
949
974
|
});
|
|
@@ -10,7 +10,7 @@ const NOT_ENABLED_RESULT = {
|
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
|
-
* Returns whether the
|
|
13
|
+
* Returns whether the rovogrowth-640-inline-action-nudge-exp experiment
|
|
14
14
|
* is enabled for the current user and link context.
|
|
15
15
|
*
|
|
16
16
|
* All eligibility criteria are consolidated here:
|
|
@@ -33,7 +33,7 @@ const useInlineActionNudgeExperiment = url => {
|
|
|
33
33
|
if (extensionKey && EXCLUDED_EXTENSION_KEYS.has(extensionKey)) {
|
|
34
34
|
return NOT_ENABLED_RESULT;
|
|
35
35
|
}
|
|
36
|
-
const isEnabled = expValEquals('
|
|
36
|
+
const isEnabled = expValEquals('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true);
|
|
37
37
|
return {
|
|
38
38
|
isEnabled
|
|
39
39
|
};
|
package/dist/es2019/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js
CHANGED
|
@@ -35,8 +35,13 @@ const ActionButton = ({
|
|
|
35
35
|
onClickCallback();
|
|
36
36
|
}
|
|
37
37
|
}, [isDisabled, isLoading, onClickCallback]);
|
|
38
|
+
const is3pExperimentEnabled =
|
|
39
|
+
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
40
|
+
fg('platform_sl_3p_auth_rovo_action_kill_switch') && expValEqualsNoExposure('platform_sl_3p_auth_rovo_action', 'isEnabled', true) ||
|
|
41
|
+
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
42
|
+
fg('rovogrowth-640-inline-action-nudge-fg') && expValEqualsNoExposure('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true);
|
|
38
43
|
const icon = iconOption && isLoading ? /*#__PURE__*/React.createElement(ActionIcon, {
|
|
39
|
-
icon:
|
|
44
|
+
icon: is3pExperimentEnabled ? /*#__PURE__*/React.createElement(Box, {
|
|
40
45
|
xcss: styles.spinner
|
|
41
46
|
}, /*#__PURE__*/React.createElement(Spinner, {
|
|
42
47
|
size: 16,
|