@epam/ai-dial-chat-hooks 1.2.0-dev.99 → 1.3.0-dev.5
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/api-error/api-error.js +7 -4
- package/catalog/catalog-derivations.js +1 -1
- package/catalog/deployment-id.js +8 -2
- package/catalog/map-deployment-limits-to-catalog.js +16 -24
- package/catalog/map-deployment-limits-to-input.js +81 -9
- package/catalog/map-deployment-to-catalog-item.js +34 -34
- package/catalog/map-entity-details-to-catalog.js +237 -192
- package/catalog/map-skill-to-catalog-item.js +61 -54
- package/catalog/publish.js +4 -4
- package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.js +122 -101
- package/catalog/useCatalogItemDetails.js +9 -8
- package/catalog/usePublishFolders/usePublishFolders.js +1 -1
- package/catalog.d.ts +171 -34
- package/catalog.js +23 -23
- package/conversation/conversation-transfer/export-conversation.js +24 -16
- package/conversation/conversation-transfer/import-conversation.js +80 -31
- package/conversation/create-chat-stream-api.js +89 -49
- package/conversation/get-model-id-from-conversation-id.js +15 -9
- package/conversation/message-utils.js +44 -2
- package/conversation/stage.js +6 -2
- package/conversation/useActiveConversationSync/useActiveConversationSync.js +7 -8
- package/conversation/useConversationExport/useConversationExport.js +9 -9
- package/conversation/useConversationHandlers/message-utils.js +8 -5
- package/conversation/useConversationHandlers/useConversationHandlers.js +181 -167
- package/conversation/useConversationImport/useConversationImport.js +123 -121
- package/conversation/useConversationPanelItems/useConversationPanelItems.js +49 -31
- package/conversation/useConversationStream/frame-scheduler.js +39 -0
- package/conversation/useConversationStream/generation-resume.js +122 -64
- package/conversation/useConversationStream/useConversationStream.js +298 -118
- package/conversation/useMessageSelectionReply/useMessageSelectionReply.js +189 -0
- package/conversation-sources/useConversationSources/useConversationSources.js +31 -24
- package/conversation-sources.d.ts +1 -1
- package/conversation-transfer.d.ts +2 -1
- package/conversation.d.ts +218 -22
- package/conversation.js +32 -31
- package/file-manager-canvas.d.ts +27 -7
- package/file-manager.d.ts +87 -32
- package/file-manager.js +25 -24
- package/files/attachment-canvas.js +67 -44
- package/files/dial-file-manager-copy-move.util.js +9 -8
- package/files/dial-file-manager-mapping.util.js +2 -1
- package/files/dial-file-manager-path.util.js +24 -2
- package/files/dial-file-manager.model.js +23 -19
- package/files/dial-file-manager.types.js +3 -3
- package/files/file-manager-variant.js +1 -1
- package/files/resolve-dial-file-api-path.js +11 -12
- package/files/useDialFileListing/useDialFileListing.js +140 -127
- package/files/useDialFileManager/useDialFileManager.js +139 -135
- package/files/useDialFileManagerSections/useDialFileManagerSections.js +155 -0
- package/files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.js +20 -15
- package/files/useDialFileMutations/useDialFileMutations.js +65 -60
- package/files/useDialFileUploadBatch/useDialFileUploadBatch.js +117 -110
- package/files/useFileAttachmentPicker/useFileAttachmentPicker.js +28 -23
- package/index.d.ts +643 -128
- package/index.js +136 -134
- package/mcp-apps/useMcpAppTools/useMcpAppTools.js +1 -1
- package/oauth/authorize-url.js +3 -3
- package/oauth/toolset-id.js +5 -3
- package/oauth/useToolsetLogin/useToolsetLogin.js +8 -8
- package/oauth.d.ts +34 -2
- package/oauth.js +9 -9
- package/package.json +19 -23
- package/scheduled-task/scheduled-task-description.js +43 -39
- package/scheduled-task/scheduled-task-trigger.js +74 -71
- package/scheduled-task/use-scheduled-task-runs.js +162 -50
- package/scheduled-task/use-scheduled-tasks.js +52 -48
- package/scheduled-tasks.d.ts +27 -6
- package/scheduled-tasks.js +2 -2
- package/shared/application-schema.js +5 -2
- package/shared/cron-day-of-month.js +13 -0
- package/skill/skill-archive.js +19 -0
- package/skill/skill-types.js +8 -7
- package/skill/skill.js +52 -29
- package/skill/useSkillArchiveImport/useSkillArchiveImport.js +38 -34
- package/skill/useSkillEditorLoad.js +65 -59
- package/skill/useSkillEditorSubmit.js +105 -93
- package/skill/useSkillFileActions.js +70 -58
- package/skill-editor.d.ts +62 -13
- package/skill-editor.js +9 -9
- package/usage/map-user-usage-to-model-limits.js +137 -95
- package/usage.d.ts +8 -3
- package/usePageFileDrag/usePageFileDrag.js +3 -3
- package/utils.d.ts +26 -6
- package/utils.js +10 -10
package/api-error/api-error.js
CHANGED
|
@@ -26,19 +26,22 @@ var e = (e) => typeof e == "object" && !!e, t = (t) => {
|
|
|
26
26
|
}
|
|
27
27
|
return e instanceof Error && e.message ? e.message : null;
|
|
28
28
|
}, d = async (t) => {
|
|
29
|
-
let r = s(t), i = r?.status, a = null, c, l = !1;
|
|
29
|
+
let r = s(t), i = r?.status, a = null, c, l = !1, u, d, f;
|
|
30
30
|
if (r) try {
|
|
31
31
|
let t = await (typeof r.clone == "function" ? r.clone() : r).json();
|
|
32
|
-
a = n(t), e(t) && (c = o(t.traceparent));
|
|
32
|
+
a = n(t), e(t) && (u = typeof t.code == "string" ? t.code : void 0, d = typeof t.upstreamCode == "string" ? t.upstreamCode : void 0, f = typeof t.upstreamMessage == "string" ? t.upstreamMessage : void 0, c = o(t.traceparent));
|
|
33
33
|
} catch {
|
|
34
34
|
l = !0;
|
|
35
35
|
}
|
|
36
36
|
!l && a === null && t instanceof Error && t.message && (a = t.message);
|
|
37
|
-
let
|
|
37
|
+
let p = c ?? o(typeof r?.headers?.get == "function" ? r.headers.get("traceparent") : void 0);
|
|
38
38
|
return {
|
|
39
39
|
status: i,
|
|
40
40
|
message: a,
|
|
41
|
-
traceId:
|
|
41
|
+
traceId: p,
|
|
42
|
+
...u ? { code: u } : {},
|
|
43
|
+
...d ? { upstreamCode: d } : {},
|
|
44
|
+
...f ? { upstreamMessage: f } : {}
|
|
42
45
|
};
|
|
43
46
|
};
|
|
44
47
|
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region src/catalog/catalog-derivations.ts
|
|
2
|
-
var e = (e, t) => e.filter((e) => t.has(e.type)), t = (e, t) => t ? e.filter((e) => !e.isMyApp) : [...e], n = (e) => e.filter((e) => e.isUserFavorite), r = (e, t) => {
|
|
2
|
+
var e = (e, t) => e.filter((e) => t.has(e.type)), t = (e, t) => t ? e.filter((e) => !e.isMyApp) : [...e], n = (e) => e.filter((e) => e.isUserFavorite && !e.isHidden), r = (e, t) => {
|
|
3
3
|
let n = new Set(e.map((e) => e.type));
|
|
4
4
|
return t.filter((e) => n.has(e));
|
|
5
5
|
}, i = (e, t) => {
|
package/catalog/deployment-id.js
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
//#region src/catalog/deployment-id.ts
|
|
2
|
-
var e = (e) => e.split("/").map((e) => encodeURIComponent(e)).join("/"), t = (e
|
|
2
|
+
var e = (e) => e.split("/").map((e) => encodeURIComponent(e)).join("/"), t = (e) => e.split("/").map((e) => {
|
|
3
|
+
try {
|
|
4
|
+
return decodeURIComponent(e);
|
|
5
|
+
} catch {
|
|
6
|
+
return e;
|
|
7
|
+
}
|
|
8
|
+
}).join("/"), n = (n) => e(t(n)), r = (e, t) => {
|
|
3
9
|
if (t) return e.find((e) => e.id === t) ?? e.find((e) => e.reference === t);
|
|
4
10
|
};
|
|
5
11
|
//#endregion
|
|
6
|
-
export { e as encodeDeploymentId,
|
|
12
|
+
export { t as decodeDeploymentId, e as encodeDeploymentId, r as findDeploymentByIdOrReference, n as normalizeDeploymentId };
|
|
@@ -1,21 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { buildResetFields as e } from "./map-deployment-limits-to-input.js";
|
|
2
2
|
import { CatalogLimitStatus as t } from "@epam/ai-dial-catalog";
|
|
3
3
|
//#region src/catalog/map-deployment-limits-to-catalog.ts
|
|
4
4
|
var n = [
|
|
5
5
|
{
|
|
6
6
|
key: "dayTokenStats",
|
|
7
|
-
labelField: "tokensPerDay"
|
|
8
|
-
costKey: "dayCostStats"
|
|
7
|
+
labelField: "tokensPerDay"
|
|
9
8
|
},
|
|
10
9
|
{
|
|
11
10
|
key: "weekTokenStats",
|
|
12
|
-
labelField: "tokensPerWeek"
|
|
13
|
-
costKey: "weekCostStats"
|
|
11
|
+
labelField: "tokensPerWeek"
|
|
14
12
|
},
|
|
15
13
|
{
|
|
16
14
|
key: "monthTokenStats",
|
|
17
|
-
labelField: "tokensPerMonth"
|
|
18
|
-
costKey: "monthCostStats"
|
|
15
|
+
labelField: "tokensPerMonth"
|
|
19
16
|
}
|
|
20
17
|
], r = 2 ** 53 - 1, i = .75, a = [1e6, 1e3], o = new Intl.NumberFormat(void 0, {
|
|
21
18
|
notation: "compact",
|
|
@@ -23,15 +20,13 @@ var n = [
|
|
|
23
20
|
}), s = new Intl.NumberFormat(void 0, { maximumFractionDigits: 2 }), c = (e) => {
|
|
24
21
|
let t = a.find((t) => Math.abs(e) >= t);
|
|
25
22
|
return t == null ? e : Math.trunc(e / t * 10) / 10 * t;
|
|
26
|
-
}, l = (e) => e != null && Number.isFinite(e.total) && Number.isFinite(e.used) && e.total > 0, u = (e) => e >= r, d = (
|
|
27
|
-
|
|
28
|
-
}, p = (e, t, n, r) => {
|
|
29
|
-
let i = Math.max(0, e.used), a = e.total, l = o.format(c(i)), d = o.format(a), f = s.format(i), p = s.format(a), m = u(a);
|
|
23
|
+
}, l = (e) => e != null && Number.isFinite(e.total) && Number.isFinite(e.used) && e.total > 0, u = (e) => e >= r, d = (t, n, r) => {
|
|
24
|
+
let i = Math.max(0, t.used), a = t.total, l = o.format(c(i)), d = o.format(a), f = s.format(i), p = s.format(a), m = u(a);
|
|
30
25
|
return {
|
|
31
|
-
label:
|
|
26
|
+
label: n,
|
|
32
27
|
used: i,
|
|
33
28
|
total: a,
|
|
34
|
-
|
|
29
|
+
...e(t, r.formatResetTime),
|
|
35
30
|
...m ? {
|
|
36
31
|
isUnlimited: !0,
|
|
37
32
|
noteLabel: r.followsCostLimit
|
|
@@ -41,33 +36,30 @@ var n = [
|
|
|
41
36
|
},
|
|
42
37
|
valueLabel: m ? l : r.formatValueLabel(l, d),
|
|
43
38
|
ariaLabel: m ? r.formatFollowsCostLimitAriaLabel({
|
|
44
|
-
label:
|
|
39
|
+
label: n,
|
|
45
40
|
used: f
|
|
46
41
|
}) : r.formatProgressAriaLabel({
|
|
47
|
-
label:
|
|
42
|
+
label: n,
|
|
48
43
|
used: f,
|
|
49
44
|
total: p
|
|
50
45
|
})
|
|
51
46
|
};
|
|
52
|
-
},
|
|
53
|
-
let r =
|
|
47
|
+
}, f = (e) => u(e.total) ? 0 : Math.max(e.used, 0) / e.total, p = (e) => e.reduce((e, n) => {
|
|
48
|
+
let r = f(n);
|
|
54
49
|
return r >= 1 ? t.LimitReached : r >= i && e !== t.LimitReached ? t.RunningLow : e;
|
|
55
|
-
}, void 0),
|
|
50
|
+
}, void 0), m = (e, t) => {
|
|
56
51
|
if (e == null) return;
|
|
57
52
|
let r = [], i = n.flatMap((n) => {
|
|
58
53
|
let i = e[n.key];
|
|
59
|
-
|
|
60
|
-
r.push(i);
|
|
61
|
-
let a = f(e[n.costKey], t);
|
|
62
|
-
return [p(i, t[n.labelField], a, t)];
|
|
54
|
+
return l(i) ? (r.push(i), [d(i, t[n.labelField], t)]) : [];
|
|
63
55
|
});
|
|
64
56
|
return i.length > 0 ? {
|
|
65
57
|
groups: [{
|
|
66
58
|
label: t.tokenGroup,
|
|
67
59
|
rows: i
|
|
68
60
|
}],
|
|
69
|
-
status:
|
|
61
|
+
status: p(r)
|
|
70
62
|
} : void 0;
|
|
71
63
|
};
|
|
72
64
|
//#endregion
|
|
73
|
-
export {
|
|
65
|
+
export { m as mapDeploymentLimitsDtoToCatalogLimits };
|
|
@@ -1,14 +1,86 @@
|
|
|
1
|
+
import { formatCost as e } from "@epam/ai-dial-chat-shared";
|
|
2
|
+
import { CatalogLimitStatus as t } from "@epam/ai-dial-catalog";
|
|
1
3
|
//#region src/catalog/map-deployment-limits-to-input.ts
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
var n = [
|
|
5
|
+
{
|
|
6
|
+
key: "dayTokenStats",
|
|
7
|
+
labelField: "periodDay"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
key: "weekTokenStats",
|
|
11
|
+
labelField: "periodWeek"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
key: "monthTokenStats",
|
|
15
|
+
labelField: "periodMonth"
|
|
16
|
+
}
|
|
17
|
+
], r = [
|
|
18
|
+
{
|
|
19
|
+
key: "dayCostStats",
|
|
20
|
+
labelField: "periodDay"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
key: "weekCostStats",
|
|
24
|
+
labelField: "periodWeek"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
key: "monthCostStats",
|
|
28
|
+
labelField: "periodMonth"
|
|
29
|
+
}
|
|
30
|
+
], i = 2 ** 53 - 1, a = .75, o = [1e6, 1e3], s = new Intl.NumberFormat(void 0, {
|
|
31
|
+
notation: "compact",
|
|
32
|
+
maximumFractionDigits: 1
|
|
33
|
+
}), c = new Intl.NumberFormat(void 0, { maximumFractionDigits: 2 }), l = (e) => {
|
|
34
|
+
let t = o.find((t) => Math.abs(e) >= t);
|
|
35
|
+
return t == null ? e : Math.trunc(e / t * 10) / 10 * t;
|
|
36
|
+
}, u = (e) => e != null && Number.isFinite(e.total) && Number.isFinite(e.used) && e.total > 0, d = (e) => e >= i, f = (e, t) => {
|
|
37
|
+
let n = t?.(e.resetsAt);
|
|
38
|
+
return n ? {
|
|
39
|
+
resetLabel: n.label,
|
|
40
|
+
resetIsoValue: n.isoValue,
|
|
41
|
+
resetAriaLabel: n.ariaLabel
|
|
42
|
+
} : {};
|
|
43
|
+
}, p = (e, t, n, r, i) => {
|
|
44
|
+
let a = Math.max(0, e.used), o = e.total, s = r.format(a), c = r.format(o);
|
|
6
45
|
return {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
46
|
+
label: t,
|
|
47
|
+
used: a,
|
|
48
|
+
total: o,
|
|
49
|
+
...f(e, i),
|
|
50
|
+
usedLabel: s,
|
|
51
|
+
totalLabel: c,
|
|
52
|
+
valueLabel: n.formatValueLabel(s, c),
|
|
53
|
+
ariaLabel: n.formatProgressAriaLabel({
|
|
54
|
+
label: t,
|
|
55
|
+
used: r.formatFull(a),
|
|
56
|
+
total: r.formatFull(o)
|
|
57
|
+
})
|
|
11
58
|
};
|
|
59
|
+
}, m = (e) => d(e.total) ? 0 : Math.max(e.used, 0) / e.total, h = (e) => m(e) >= a, g = (e) => e.reduce((e, n) => {
|
|
60
|
+
let r = m(n);
|
|
61
|
+
return r >= 1 ? t.LimitReached : r >= a && e !== t.LimitReached ? t.RunningLow : e;
|
|
62
|
+
}, void 0), _ = (e, t, n, r, i, a, o) => {
|
|
63
|
+
let s = t.flatMap((t) => {
|
|
64
|
+
let n = e[t.key];
|
|
65
|
+
return !u(n) || !h(n) ? [] : (o.push(n), [p(n, r[t.labelField], r, i, a)]);
|
|
66
|
+
});
|
|
67
|
+
return s.length > 0 ? {
|
|
68
|
+
label: n,
|
|
69
|
+
rows: s
|
|
70
|
+
} : void 0;
|
|
71
|
+
}, v = (t, i, a) => {
|
|
72
|
+
if (t == null) return;
|
|
73
|
+
let o = [], u = [_(t, n, i.tokenGroup, i, {
|
|
74
|
+
format: (e) => s.format(l(e)),
|
|
75
|
+
formatFull: (e) => c.format(e)
|
|
76
|
+
}, a, o), _(t, r, i.costGroup, i, {
|
|
77
|
+
format: e,
|
|
78
|
+
formatFull: e
|
|
79
|
+
}, a, o)].filter((e) => e != null);
|
|
80
|
+
return u.length > 0 ? {
|
|
81
|
+
groups: u,
|
|
82
|
+
status: g(o)
|
|
83
|
+
} : void 0;
|
|
12
84
|
};
|
|
13
85
|
//#endregion
|
|
14
|
-
export {
|
|
86
|
+
export { f as buildResetFields, v as mapDeploymentLimitsToInput };
|
|
@@ -2,52 +2,52 @@ import { safeDecodeURIComponent as e } from "../shared/string-utils.js";
|
|
|
2
2
|
import { isPublicToolsetId as t } from "../oauth/toolset-id.js";
|
|
3
3
|
import { resolveLocalizedText as n } from "../shared/locale.js";
|
|
4
4
|
import { mapEntityDetailsToCatalogDetails as r } from "./map-entity-details-to-catalog.js";
|
|
5
|
-
import { CatalogEntityType as i,
|
|
6
|
-
import { CredentialStatus as
|
|
5
|
+
import { CatalogEntityType as i, PUBLIC_BUCKET as a, formatLastUsed as o } from "@epam/ai-dial-chat-shared";
|
|
6
|
+
import { CredentialStatus as s, ToolsetAuthenticationType as c } from "@epam/ai-dial-catalog";
|
|
7
7
|
//#region src/catalog/map-deployment-to-catalog-item.ts
|
|
8
|
-
var
|
|
9
|
-
NONE:
|
|
10
|
-
API_KEY:
|
|
11
|
-
OAUTH:
|
|
12
|
-
},
|
|
13
|
-
SIGNED_IN:
|
|
14
|
-
SIGNED_OUT:
|
|
15
|
-
FAILED:
|
|
16
|
-
},
|
|
8
|
+
var l = {
|
|
9
|
+
NONE: c.None,
|
|
10
|
+
API_KEY: c.ApiKey,
|
|
11
|
+
OAUTH: c.OAuth
|
|
12
|
+
}, u = {
|
|
13
|
+
SIGNED_IN: s.SignedIn,
|
|
14
|
+
SIGNED_OUT: s.SignedOut,
|
|
15
|
+
FAILED: s.Failed
|
|
16
|
+
}, d = (e, n, r) => {
|
|
17
17
|
if (n == null) return;
|
|
18
|
-
let i = t(e), a = n.userLevelAuthStatus ?
|
|
18
|
+
let i = t(e), a = n.userLevelAuthStatus ? u[n.userLevelAuthStatus] : void 0, o = n.globalAuthStatus ? u[n.globalAuthStatus] : void 0;
|
|
19
19
|
return {
|
|
20
|
-
authenticationType: !r && i && a !==
|
|
20
|
+
authenticationType: !r && i && a !== s.SignedIn && o === s.SignedIn ? c.None : l[n.authenticationType],
|
|
21
21
|
userStatus: a,
|
|
22
|
-
globalStatus:
|
|
22
|
+
globalStatus: o,
|
|
23
23
|
isPublic: i,
|
|
24
24
|
isManageableByAdmin: r && i,
|
|
25
25
|
apiKeyHeader: n.apiKeyHeader
|
|
26
26
|
};
|
|
27
|
-
},
|
|
27
|
+
}, f = {
|
|
28
28
|
model: i.Model,
|
|
29
29
|
toolset: i.Toolset,
|
|
30
30
|
application: i.Agent
|
|
31
|
-
},
|
|
31
|
+
}, p = "applications/", m = "toolsets/", h = (t, n) => (t.startsWith(n) ? t.slice(n.length) : t).split("/").filter(Boolean).map(e), g = (e, t) => {
|
|
32
32
|
if (e.isMy) return [t.personal];
|
|
33
|
-
let n = h(e.applicationFolder ?? "",
|
|
34
|
-
return e.sharedWithMe ? [t.shared, ...n.slice(1)] : n.length === 0 && e.type?.toLowerCase() === "application" ? [t.public] : n[0]?.toLowerCase() ===
|
|
33
|
+
let n = h(e.applicationFolder ?? "", p);
|
|
34
|
+
return e.sharedWithMe ? [t.shared, ...n.slice(1)] : n.length === 0 && e.type?.toLowerCase() === "application" ? [t.public] : n[0]?.toLowerCase() === a ? [t.public, ...n.slice(1)] : n;
|
|
35
35
|
}, _ = (e, t) => {
|
|
36
36
|
if (e.isMy && t != null) return [t.personal];
|
|
37
37
|
let n = e.toolset || e.id;
|
|
38
|
-
if (!n.startsWith(
|
|
39
|
-
let r = h(n,
|
|
40
|
-
return e.sharedWithMe && t != null ? [t.shared, ...r.slice(1)] : r[0]?.toLowerCase() ===
|
|
41
|
-
}, v = (e, { favoriteIds: t = /* @__PURE__ */ new Set(), entityDetails:
|
|
42
|
-
let m = n(e.displayName, u,
|
|
38
|
+
if (!n.startsWith(m)) return t == null ? [] : e.sharedWithMe ? [t.shared] : n.length > 0 && !n.includes("/") ? [t.public] : [];
|
|
39
|
+
let r = h(n, m).slice(0, -1);
|
|
40
|
+
return e.sharedWithMe && t != null ? [t.shared, ...r.slice(1)] : r[0]?.toLowerCase() === a && t != null ? [t.public, ...r.slice(1)] : r.slice(1);
|
|
41
|
+
}, v = (e, { favoriteIds: t = /* @__PURE__ */ new Set(), entityDetails: a, folderLabels: s, editableSchemaIds: c = [], isCustomAppsEditable: l = !1, activeLocale: u, primaryLocale: d, resolveIconUrl: p }) => {
|
|
42
|
+
let m = n(e.displayName, u, d) || e.id, h = (e.type ?? "").toLowerCase();
|
|
43
43
|
return {
|
|
44
44
|
id: e.id,
|
|
45
|
-
type:
|
|
45
|
+
type: f[h] ?? i.Model,
|
|
46
46
|
name: m,
|
|
47
|
-
description: n(e.description, u,
|
|
47
|
+
description: n(e.description, u, d),
|
|
48
48
|
iconUrl: p(e.iconUrl),
|
|
49
49
|
version: e.displayVersion ?? "",
|
|
50
|
-
lastUsed:
|
|
50
|
+
lastUsed: o(e.updatedAt),
|
|
51
51
|
updatedAt: e.updatedAt,
|
|
52
52
|
createdAt: e.createdAt,
|
|
53
53
|
isFeatured: e.isFeatured ?? !1,
|
|
@@ -59,20 +59,20 @@ var c = {
|
|
|
59
59
|
sharedWithMe: e.sharedWithMe ?? !1,
|
|
60
60
|
isEditable: (!!e.isMy || !!e.canEdit) && (c.length > 0 && c.includes(e.applicationTypeSchemaId ?? "") || l && !e.applicationTypeSchemaId && h === "application"),
|
|
61
61
|
folder: g(e, s),
|
|
62
|
-
details:
|
|
62
|
+
details: a == null ? void 0 : r(a),
|
|
63
63
|
supportsMcp: e.features?.mcp === !0,
|
|
64
64
|
supportsChat: e.interfaces == null || e.interfaces.includes("chat")
|
|
65
65
|
};
|
|
66
|
-
}, y = (e, { favoriteIds: t = /* @__PURE__ */ new Set(), isAdmin: r = !1, folderLabels:
|
|
67
|
-
let
|
|
66
|
+
}, y = (e, { favoriteIds: t = /* @__PURE__ */ new Set(), isAdmin: r = !1, folderLabels: a, activeLocale: s, primaryLocale: c, resolveIconUrl: l }) => {
|
|
67
|
+
let u = n(e.displayName, s, c) || e.toolset || e.reference || e.id, f = e.allowedTools ?? [];
|
|
68
68
|
return {
|
|
69
69
|
id: e.id,
|
|
70
70
|
type: i.Toolset,
|
|
71
|
-
name:
|
|
71
|
+
name: u,
|
|
72
72
|
description: n(e.description, s, c),
|
|
73
73
|
iconUrl: l(e.iconUrl),
|
|
74
74
|
version: e.displayVersion ?? "",
|
|
75
|
-
lastUsed:
|
|
75
|
+
lastUsed: o(e.updatedAt),
|
|
76
76
|
updatedAt: e.updatedAt,
|
|
77
77
|
createdAt: e.createdAt,
|
|
78
78
|
isFeatured: !1,
|
|
@@ -83,10 +83,10 @@ var c = {
|
|
|
83
83
|
isMyApp: e.isMy ?? !1,
|
|
84
84
|
sharedWithMe: e.sharedWithMe ?? !1,
|
|
85
85
|
isEditable: !!(e.isMy || e.canEdit),
|
|
86
|
-
folder: _(e,
|
|
87
|
-
credentials:
|
|
86
|
+
folder: _(e, a),
|
|
87
|
+
credentials: d(e.id, e.authSettings, r),
|
|
88
88
|
details: f.length > 0 ? { tools: { tools: f.map((e) => ({ name: e })) } } : void 0
|
|
89
89
|
};
|
|
90
90
|
};
|
|
91
91
|
//#endregion
|
|
92
|
-
export { v as mapDeploymentToCatalogItem,
|
|
92
|
+
export { v as mapDeploymentToCatalogItem, d as mapDeploymentToolsetCredentials, y as mapToolsetToCatalogItem, g as resolveDeploymentFolder };
|