@atlaskit/smart-card 29.1.0 → 29.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/dist/cjs/state/hooks/use-ai-summary/ai-summary-service/index.js +2 -1
- package/dist/cjs/state/hooks/use-response/index.js +16 -13
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/state/hooks/use-ai-summary/ai-summary-service/index.js +2 -1
- package/dist/es2019/state/hooks/use-response/index.js +15 -12
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/state/hooks/use-ai-summary/ai-summary-service/index.js +2 -1
- package/dist/esm/state/hooks/use-response/index.js +16 -13
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/state/hooks/use-ai-summary/ai-summary-service/types.d.ts +11 -1
- package/dist/types/state/hooks/use-response/index.d.ts +1 -1
- package/dist/types/view/Card/index.d.ts +3 -1
- package/dist/types-ts4.5/state/hooks/use-ai-summary/ai-summary-service/types.d.ts +11 -1
- package/dist/types-ts4.5/state/hooks/use-response/index.d.ts +1 -1
- package/dist/types-ts4.5/view/Card/index.d.ts +3 -1
- package/package.json +5 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 29.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#150309](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/150309)
|
|
8
|
+
[`e59aea25f64b1`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/e59aea25f64b1) -
|
|
9
|
+
EDM-10845 Use new AI smartlink summary service
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
15
|
+
## 29.1.1
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [#150558](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/150558)
|
|
20
|
+
[`da0a817f6174e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/da0a817f6174e) -
|
|
21
|
+
Removing unused code logic
|
|
22
|
+
|
|
3
23
|
## 29.1.0
|
|
4
24
|
|
|
5
25
|
### Minor Changes
|
|
@@ -15,6 +15,7 @@ var _types = require("./types");
|
|
|
15
15
|
var _utils = require("./utils");
|
|
16
16
|
var _readStream = require("./readStream");
|
|
17
17
|
var _linkingCommon = require("@atlaskit/linking-common");
|
|
18
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
18
19
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
19
20
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
20
21
|
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
@@ -46,7 +47,7 @@ var AISummaryService = exports.AISummaryService = /*#__PURE__*/function () {
|
|
|
46
47
|
while (1) switch (_context.prev = _context.next) {
|
|
47
48
|
case 0:
|
|
48
49
|
payload = {
|
|
49
|
-
recipient_agent_named_id: 'summary_agent',
|
|
50
|
+
recipient_agent_named_id: (0, _platformFeatureFlags.fg)('platform-smart-card-use-ai-smartlink-summary-agent') ? 'smartlink_summary_agent' : 'summary_agent',
|
|
50
51
|
agent_input_context: {
|
|
51
52
|
content_url: _this.url,
|
|
52
53
|
content_ari: _this.ari,
|
|
@@ -26,33 +26,36 @@ var useResponse = function useResponse() {
|
|
|
26
26
|
}, undefined, undefined, metadataStatus));
|
|
27
27
|
}, [dispatch]);
|
|
28
28
|
var handleResolvedLinkError = (0, _react.useCallback)(function (url, error, response, isMetadataRequest) {
|
|
29
|
-
var
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
var newState = {
|
|
30
|
+
status: _constants.SmartLinkStatus.Pending,
|
|
31
|
+
details: undefined
|
|
32
|
+
};
|
|
33
|
+
var _ref = getState()[url] || newState,
|
|
33
34
|
details = _ref.details;
|
|
34
35
|
var hasData = !!(details && details.data);
|
|
36
|
+
|
|
35
37
|
// If metadata request then set metadata status, return and do not alter link status
|
|
36
38
|
if (isMetadataRequest) {
|
|
37
39
|
setMetadataStatus(url, 'errored');
|
|
38
40
|
return;
|
|
39
41
|
}
|
|
40
42
|
if (error.kind === 'fatal') {
|
|
41
|
-
// If there's no previous data in the store for this URL, then bail
|
|
42
|
-
// out and let the editor handle fallbacks (returns to a blue link).
|
|
43
|
-
if (!hasData && status !== 'resolved') {
|
|
44
|
-
dispatch((0, _linkingCommon.cardAction)(_linkingCommon.ACTION_ERROR, {
|
|
45
|
-
url: url
|
|
46
|
-
}, details, error));
|
|
47
|
-
throw error;
|
|
48
|
-
}
|
|
49
43
|
// If we already have resolved data for this URL in the store, then
|
|
50
44
|
// simply fallback to the previous data.
|
|
51
45
|
if (hasData) {
|
|
52
46
|
dispatch((0, _linkingCommon.cardAction)(_linkingCommon.ACTION_RESOLVED, {
|
|
53
47
|
url: url
|
|
54
48
|
}, details));
|
|
49
|
+
|
|
50
|
+
// If there's no previous data in the store for this URL, then bail
|
|
51
|
+
// out and let the editor handle fallbacks (returns to a blue link).
|
|
52
|
+
} else {
|
|
53
|
+
dispatch((0, _linkingCommon.cardAction)(_linkingCommon.ACTION_ERROR, {
|
|
54
|
+
url: url
|
|
55
|
+
}, details, error));
|
|
56
|
+
throw error;
|
|
55
57
|
}
|
|
58
|
+
|
|
56
59
|
// Handle AuthErrors (user did not have access to resource) -
|
|
57
60
|
// Missing AAID in ASAP claims, or missing UserContext, or 403 from downstream
|
|
58
61
|
} else if (error.kind === 'auth') {
|
|
@@ -101,7 +104,7 @@ var useResponse = function useResponse() {
|
|
|
101
104
|
}
|
|
102
105
|
|
|
103
106
|
// Handle any other errors
|
|
104
|
-
if (nextStatus === 'fatal') {
|
|
107
|
+
if (!response || nextStatus === 'fatal') {
|
|
105
108
|
handleResolvedLinkError(resourceUrl, new _linkingCommon.APIError('fatal', hostname, _constants2.ERROR_MESSAGE_FATAL), undefined, isMetadataRequest);
|
|
106
109
|
return;
|
|
107
110
|
}
|
|
@@ -22,7 +22,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
|
|
|
22
22
|
var context = exports.context = {
|
|
23
23
|
componentName: 'smart-cards',
|
|
24
24
|
packageName: "@atlaskit/smart-card",
|
|
25
|
-
packageVersion: "29.
|
|
25
|
+
packageVersion: "29.2.0"
|
|
26
26
|
};
|
|
27
27
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
28
28
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -17,7 +17,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId"],
|
|
|
17
17
|
_excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
|
|
18
18
|
var PACKAGE_DATA = {
|
|
19
19
|
packageName: "@atlaskit/smart-card",
|
|
20
|
-
packageVersion: "29.
|
|
20
|
+
packageVersion: "29.2.0",
|
|
21
21
|
componentName: 'linkUrl'
|
|
22
22
|
};
|
|
23
23
|
var Link = (0, _click.withLinkClickedEvent)('a');
|
|
@@ -4,6 +4,7 @@ import { ChunkProcessingError } from './types';
|
|
|
4
4
|
import { addPath, getXProductHeaderValue } from './utils';
|
|
5
5
|
import { readStream } from './readStream';
|
|
6
6
|
import { getBaseUrl } from '@atlaskit/linking-common';
|
|
7
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
8
|
export class AISummaryService {
|
|
8
9
|
constructor(props) {
|
|
9
10
|
var _getXProductHeaderVal;
|
|
@@ -22,7 +23,7 @@ export class AISummaryService {
|
|
|
22
23
|
});
|
|
23
24
|
_defineProperty(this, "fetchStream", async () => {
|
|
24
25
|
const payload = {
|
|
25
|
-
recipient_agent_named_id: 'summary_agent',
|
|
26
|
+
recipient_agent_named_id: fg('platform-smart-card-use-ai-smartlink-summary-agent') ? 'smartlink_summary_agent' : 'summary_agent',
|
|
26
27
|
agent_input_context: {
|
|
27
28
|
content_url: this.url,
|
|
28
29
|
content_ari: this.ari,
|
|
@@ -23,34 +23,37 @@ const useResponse = () => {
|
|
|
23
23
|
}, undefined, undefined, metadataStatus));
|
|
24
24
|
}, [dispatch]);
|
|
25
25
|
const handleResolvedLinkError = useCallback((url, error, response, isMetadataRequest) => {
|
|
26
|
-
const {
|
|
27
|
-
details
|
|
28
|
-
} = getState()[url] || {
|
|
26
|
+
const newState = {
|
|
29
27
|
status: SmartLinkStatus.Pending,
|
|
30
28
|
details: undefined
|
|
31
29
|
};
|
|
30
|
+
const {
|
|
31
|
+
details
|
|
32
|
+
} = getState()[url] || newState;
|
|
32
33
|
const hasData = !!(details && details.data);
|
|
34
|
+
|
|
33
35
|
// If metadata request then set metadata status, return and do not alter link status
|
|
34
36
|
if (isMetadataRequest) {
|
|
35
37
|
setMetadataStatus(url, 'errored');
|
|
36
38
|
return;
|
|
37
39
|
}
|
|
38
40
|
if (error.kind === 'fatal') {
|
|
39
|
-
// If there's no previous data in the store for this URL, then bail
|
|
40
|
-
// out and let the editor handle fallbacks (returns to a blue link).
|
|
41
|
-
if (!hasData && status !== 'resolved') {
|
|
42
|
-
dispatch(cardAction(ACTION_ERROR, {
|
|
43
|
-
url
|
|
44
|
-
}, details, error));
|
|
45
|
-
throw error;
|
|
46
|
-
}
|
|
47
41
|
// If we already have resolved data for this URL in the store, then
|
|
48
42
|
// simply fallback to the previous data.
|
|
49
43
|
if (hasData) {
|
|
50
44
|
dispatch(cardAction(ACTION_RESOLVED, {
|
|
51
45
|
url
|
|
52
46
|
}, details));
|
|
47
|
+
|
|
48
|
+
// If there's no previous data in the store for this URL, then bail
|
|
49
|
+
// out and let the editor handle fallbacks (returns to a blue link).
|
|
50
|
+
} else {
|
|
51
|
+
dispatch(cardAction(ACTION_ERROR, {
|
|
52
|
+
url
|
|
53
|
+
}, details, error));
|
|
54
|
+
throw error;
|
|
53
55
|
}
|
|
56
|
+
|
|
54
57
|
// Handle AuthErrors (user did not have access to resource) -
|
|
55
58
|
// Missing AAID in ASAP claims, or missing UserContext, or 403 from downstream
|
|
56
59
|
} else if (error.kind === 'auth') {
|
|
@@ -97,7 +100,7 @@ const useResponse = () => {
|
|
|
97
100
|
}
|
|
98
101
|
|
|
99
102
|
// Handle any other errors
|
|
100
|
-
if (nextStatus === 'fatal') {
|
|
103
|
+
if (!response || nextStatus === 'fatal') {
|
|
101
104
|
handleResolvedLinkError(resourceUrl, new APIError('fatal', hostname, ERROR_MESSAGE_FATAL), undefined, isMetadataRequest);
|
|
102
105
|
return;
|
|
103
106
|
}
|
|
@@ -4,7 +4,7 @@ export const ANALYTICS_CHANNEL = 'media';
|
|
|
4
4
|
export const context = {
|
|
5
5
|
componentName: 'smart-cards',
|
|
6
6
|
packageName: "@atlaskit/smart-card",
|
|
7
|
-
packageVersion: "29.
|
|
7
|
+
packageVersion: "29.2.0"
|
|
8
8
|
};
|
|
9
9
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -7,7 +7,7 @@ import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-m
|
|
|
7
7
|
import LinkWarningModal from './LinkWarningModal';
|
|
8
8
|
const PACKAGE_DATA = {
|
|
9
9
|
packageName: "@atlaskit/smart-card",
|
|
10
|
-
packageVersion: "29.
|
|
10
|
+
packageVersion: "29.2.0",
|
|
11
11
|
componentName: 'linkUrl'
|
|
12
12
|
};
|
|
13
13
|
const Link = withLinkClickedEvent('a');
|
|
@@ -15,6 +15,7 @@ import { ChunkProcessingError } from './types';
|
|
|
15
15
|
import { addPath, getXProductHeaderValue } from './utils';
|
|
16
16
|
import { readStream } from './readStream';
|
|
17
17
|
import { getBaseUrl } from '@atlaskit/linking-common';
|
|
18
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
18
19
|
export var AISummaryService = /*#__PURE__*/function () {
|
|
19
20
|
function AISummaryService(props) {
|
|
20
21
|
var _this = this,
|
|
@@ -39,7 +40,7 @@ export var AISummaryService = /*#__PURE__*/function () {
|
|
|
39
40
|
while (1) switch (_context.prev = _context.next) {
|
|
40
41
|
case 0:
|
|
41
42
|
payload = {
|
|
42
|
-
recipient_agent_named_id: 'summary_agent',
|
|
43
|
+
recipient_agent_named_id: fg('platform-smart-card-use-ai-smartlink-summary-agent') ? 'smartlink_summary_agent' : 'summary_agent',
|
|
43
44
|
agent_input_context: {
|
|
44
45
|
content_url: _this.url,
|
|
45
46
|
content_ari: _this.ari,
|
|
@@ -20,33 +20,36 @@ var useResponse = function useResponse() {
|
|
|
20
20
|
}, undefined, undefined, metadataStatus));
|
|
21
21
|
}, [dispatch]);
|
|
22
22
|
var handleResolvedLinkError = useCallback(function (url, error, response, isMetadataRequest) {
|
|
23
|
-
var
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
var newState = {
|
|
24
|
+
status: SmartLinkStatus.Pending,
|
|
25
|
+
details: undefined
|
|
26
|
+
};
|
|
27
|
+
var _ref = getState()[url] || newState,
|
|
27
28
|
details = _ref.details;
|
|
28
29
|
var hasData = !!(details && details.data);
|
|
30
|
+
|
|
29
31
|
// If metadata request then set metadata status, return and do not alter link status
|
|
30
32
|
if (isMetadataRequest) {
|
|
31
33
|
setMetadataStatus(url, 'errored');
|
|
32
34
|
return;
|
|
33
35
|
}
|
|
34
36
|
if (error.kind === 'fatal') {
|
|
35
|
-
// If there's no previous data in the store for this URL, then bail
|
|
36
|
-
// out and let the editor handle fallbacks (returns to a blue link).
|
|
37
|
-
if (!hasData && status !== 'resolved') {
|
|
38
|
-
dispatch(cardAction(ACTION_ERROR, {
|
|
39
|
-
url: url
|
|
40
|
-
}, details, error));
|
|
41
|
-
throw error;
|
|
42
|
-
}
|
|
43
37
|
// If we already have resolved data for this URL in the store, then
|
|
44
38
|
// simply fallback to the previous data.
|
|
45
39
|
if (hasData) {
|
|
46
40
|
dispatch(cardAction(ACTION_RESOLVED, {
|
|
47
41
|
url: url
|
|
48
42
|
}, details));
|
|
43
|
+
|
|
44
|
+
// If there's no previous data in the store for this URL, then bail
|
|
45
|
+
// out and let the editor handle fallbacks (returns to a blue link).
|
|
46
|
+
} else {
|
|
47
|
+
dispatch(cardAction(ACTION_ERROR, {
|
|
48
|
+
url: url
|
|
49
|
+
}, details, error));
|
|
50
|
+
throw error;
|
|
49
51
|
}
|
|
52
|
+
|
|
50
53
|
// Handle AuthErrors (user did not have access to resource) -
|
|
51
54
|
// Missing AAID in ASAP claims, or missing UserContext, or 403 from downstream
|
|
52
55
|
} else if (error.kind === 'auth') {
|
|
@@ -95,7 +98,7 @@ var useResponse = function useResponse() {
|
|
|
95
98
|
}
|
|
96
99
|
|
|
97
100
|
// Handle any other errors
|
|
98
|
-
if (nextStatus === 'fatal') {
|
|
101
|
+
if (!response || nextStatus === 'fatal') {
|
|
99
102
|
handleResolvedLinkError(resourceUrl, new APIError('fatal', hostname, ERROR_MESSAGE_FATAL), undefined, isMetadataRequest);
|
|
100
103
|
return;
|
|
101
104
|
}
|
|
@@ -15,7 +15,7 @@ export var ANALYTICS_CHANNEL = 'media';
|
|
|
15
15
|
export var context = {
|
|
16
16
|
componentName: 'smart-cards',
|
|
17
17
|
packageName: "@atlaskit/smart-card",
|
|
18
|
-
packageVersion: "29.
|
|
18
|
+
packageVersion: "29.2.0"
|
|
19
19
|
};
|
|
20
20
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
21
21
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -10,7 +10,7 @@ import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-m
|
|
|
10
10
|
import LinkWarningModal from './LinkWarningModal';
|
|
11
11
|
var PACKAGE_DATA = {
|
|
12
12
|
packageName: "@atlaskit/smart-card",
|
|
13
|
-
packageVersion: "29.
|
|
13
|
+
packageVersion: "29.2.0",
|
|
14
14
|
componentName: 'linkUrl'
|
|
15
15
|
};
|
|
16
16
|
var Link = withLinkClickedEvent('a');
|
|
@@ -26,7 +26,17 @@ export type AISummaryServiceConfig = {
|
|
|
26
26
|
};
|
|
27
27
|
export type AISummaryStatus = 'ready' | 'loading' | 'error' | 'done';
|
|
28
28
|
export type PostAgentPayload = {
|
|
29
|
-
|
|
29
|
+
/**
|
|
30
|
+
* Which agent in `assistance_service` to use.
|
|
31
|
+
*
|
|
32
|
+
* The AI mate team requested Linking Platform to move away from the default
|
|
33
|
+
* summary agent and create our own.
|
|
34
|
+
*
|
|
35
|
+
* There is likely to be a future migration from `assistance-service`
|
|
36
|
+
* to `convo-ai` which is currently unclear:
|
|
37
|
+
* https://atlassian.slack.com/archives/C05S4PH8YAY/p1728528096549549
|
|
38
|
+
*/
|
|
39
|
+
recipient_agent_named_id: 'smartlink_summary_agent' | 'summary_agent';
|
|
30
40
|
agent_input_context: AgentInputContext;
|
|
31
41
|
user_intent?: string;
|
|
32
42
|
};
|
|
@@ -2,6 +2,6 @@ import { APIError } from '@atlaskit/linking-common';
|
|
|
2
2
|
import { type JsonLd } from 'json-ld-types';
|
|
3
3
|
declare const useResponse: () => {
|
|
4
4
|
handleResolvedLinkError: (url: string, error: APIError, response?: JsonLd.Response, isMetadataRequest?: boolean) => void;
|
|
5
|
-
handleResolvedLinkResponse: (resourceUrl: string, response: JsonLd.Response, isReloading?: any, isMetadataRequest?: boolean) => void;
|
|
5
|
+
handleResolvedLinkResponse: (resourceUrl: string, response: JsonLd.Response | undefined, isReloading?: any, isMetadataRequest?: boolean) => void;
|
|
6
6
|
};
|
|
7
7
|
export default useResponse;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type CardAppearance, type CardPlatform, type CardProps } from './types';
|
|
3
3
|
import { type WrappedComponentProps } from 'react-intl-next';
|
|
4
|
-
export declare const Card: React.ForwardRefExoticComponent<Pick<Omit<
|
|
4
|
+
export declare const Card: React.ForwardRefExoticComponent<Pick<Omit<Omit<CardProps & WrappedComponentProps, "intl"> & {
|
|
5
|
+
forwardedRef?: React.Ref<any> | undefined;
|
|
6
|
+
}, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "url" | "appearance" | "container" | "children" | "data" | "key" | "id" | "placeholder" | "onError" | "onClick" | "testId" | "analyticsContext" | "isSelected" | "inheritDimensions" | "actionOptions" | "onResolve" | "ui" | "showHoverPreview" | "hoverPreviewOptions" | "showAuthTooltip" | "inlinePreloaderStyle" | "isHovered" | "removeTextHighlightingFromTitle" | "resolvingPlaceholder" | "truncateInline" | "useLegacyBlockCard" | "importer" | "fallbackComponent" | "embedIframeRef" | "embedIframeUrlType" | "frameStyle" | "platform" | "forwardedRef"> & React.RefAttributes<any>>;
|
|
5
7
|
export type { CardAppearance, CardProps, CardPlatform };
|
|
@@ -26,7 +26,17 @@ export type AISummaryServiceConfig = {
|
|
|
26
26
|
};
|
|
27
27
|
export type AISummaryStatus = 'ready' | 'loading' | 'error' | 'done';
|
|
28
28
|
export type PostAgentPayload = {
|
|
29
|
-
|
|
29
|
+
/**
|
|
30
|
+
* Which agent in `assistance_service` to use.
|
|
31
|
+
*
|
|
32
|
+
* The AI mate team requested Linking Platform to move away from the default
|
|
33
|
+
* summary agent and create our own.
|
|
34
|
+
*
|
|
35
|
+
* There is likely to be a future migration from `assistance-service`
|
|
36
|
+
* to `convo-ai` which is currently unclear:
|
|
37
|
+
* https://atlassian.slack.com/archives/C05S4PH8YAY/p1728528096549549
|
|
38
|
+
*/
|
|
39
|
+
recipient_agent_named_id: 'smartlink_summary_agent' | 'summary_agent';
|
|
30
40
|
agent_input_context: AgentInputContext;
|
|
31
41
|
user_intent?: string;
|
|
32
42
|
};
|
|
@@ -2,6 +2,6 @@ import { APIError } from '@atlaskit/linking-common';
|
|
|
2
2
|
import { type JsonLd } from 'json-ld-types';
|
|
3
3
|
declare const useResponse: () => {
|
|
4
4
|
handleResolvedLinkError: (url: string, error: APIError, response?: JsonLd.Response, isMetadataRequest?: boolean) => void;
|
|
5
|
-
handleResolvedLinkResponse: (resourceUrl: string, response: JsonLd.Response, isReloading?: any, isMetadataRequest?: boolean) => void;
|
|
5
|
+
handleResolvedLinkResponse: (resourceUrl: string, response: JsonLd.Response | undefined, isReloading?: any, isMetadataRequest?: boolean) => void;
|
|
6
6
|
};
|
|
7
7
|
export default useResponse;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type CardAppearance, type CardPlatform, type CardProps } from './types';
|
|
3
3
|
import { type WrappedComponentProps } from 'react-intl-next';
|
|
4
|
-
export declare const Card: React.ForwardRefExoticComponent<Pick<Omit<
|
|
4
|
+
export declare const Card: React.ForwardRefExoticComponent<Pick<Omit<Omit<CardProps & WrappedComponentProps, "intl"> & {
|
|
5
|
+
forwardedRef?: React.Ref<any> | undefined;
|
|
6
|
+
}, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "url" | "appearance" | "container" | "children" | "data" | "key" | "id" | "placeholder" | "onError" | "onClick" | "testId" | "analyticsContext" | "isSelected" | "inheritDimensions" | "actionOptions" | "onResolve" | "ui" | "showHoverPreview" | "hoverPreviewOptions" | "showAuthTooltip" | "inlinePreloaderStyle" | "isHovered" | "removeTextHighlightingFromTitle" | "resolvingPlaceholder" | "truncateInline" | "useLegacyBlockCard" | "importer" | "fallbackComponent" | "embedIframeRef" | "embedIframeUrlType" | "frameStyle" | "platform" | "forwardedRef"> & React.RefAttributes<any>>;
|
|
5
7
|
export type { CardAppearance, CardProps, CardPlatform };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "29.
|
|
3
|
+
"version": "29.2.0",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@atlaskit/popup": "^1.28.0",
|
|
55
55
|
"@atlaskit/primitives": "^12.2.0",
|
|
56
56
|
"@atlaskit/section-message": "^6.6.0",
|
|
57
|
-
"@atlaskit/select": "^18.
|
|
57
|
+
"@atlaskit/select": "^18.1.0",
|
|
58
58
|
"@atlaskit/spinner": "^16.3.0",
|
|
59
59
|
"@atlaskit/textarea": "^5.6.0",
|
|
60
60
|
"@atlaskit/textfield": "^6.5.0",
|
|
@@ -156,6 +156,9 @@
|
|
|
156
156
|
},
|
|
157
157
|
"send-smart-link-rendered-ufo-event-half-time": {
|
|
158
158
|
"type": "boolean"
|
|
159
|
+
},
|
|
160
|
+
"platform-smart-card-use-ai-smartlink-summary-agent": {
|
|
161
|
+
"type": "boolean"
|
|
159
162
|
}
|
|
160
163
|
}
|
|
161
164
|
}
|