@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
|
@@ -1,24 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { formatCalendarDate as
|
|
3
|
-
import "../skill/skill.js";
|
|
4
|
-
import { SkillSource as
|
|
5
|
-
import { CatalogEntityType as
|
|
6
|
-
import { CatalogContentNodeType as
|
|
7
|
-
import { SkillMetadataItemDtoNodeTypeEnum as
|
|
1
|
+
import { safeDecodeURIComponent as e, stripSurroundingSlashes as t } from "../shared/string-utils.js";
|
|
2
|
+
import { formatCalendarDate as n } from "../shared/formatting.js";
|
|
3
|
+
import { SKILL_FOLDER_MARKER as r } from "../skill/skill.js";
|
|
4
|
+
import { SkillSource as i } from "../skill/skill-types.js";
|
|
5
|
+
import { CatalogEntityType as a, formatLastUsed as o } from "@epam/ai-dial-chat-shared";
|
|
6
|
+
import { CatalogContentNodeType as s } from "@epam/ai-dial-catalog";
|
|
7
|
+
import { SkillMetadataItemDtoNodeTypeEnum as c } from "@epam/ai-dial-chat-api-client";
|
|
8
8
|
//#region src/catalog/map-skill-to-catalog-item.ts
|
|
9
|
-
var
|
|
10
|
-
[
|
|
11
|
-
[
|
|
12
|
-
[
|
|
13
|
-
},
|
|
14
|
-
let
|
|
9
|
+
var l = {
|
|
10
|
+
[i.Personal]: "personal",
|
|
11
|
+
[i.SharedWithMe]: "shared",
|
|
12
|
+
[i.Public]: "public"
|
|
13
|
+
}, u = (t, n) => {
|
|
14
|
+
let r = (n ?? "").split("/").filter(Boolean), i = t.split("/").filter(Boolean).slice(2, -1);
|
|
15
|
+
return i.length === r.length ? i.map(e) : r;
|
|
16
|
+
}, d = (e, t, n) => [n[l[t]], ...u(e.url, e.parentPath)], f = (e, { folderLabels: t, source: n, favoriteIds: r }) => {
|
|
17
|
+
let s = r.has(e.url), c = n === i.Public, l = n === i.Personal;
|
|
15
18
|
return {
|
|
16
19
|
id: e.url,
|
|
17
|
-
type:
|
|
20
|
+
type: a.Skill,
|
|
18
21
|
name: e.name,
|
|
19
22
|
description: e.description ?? "",
|
|
20
23
|
version: "",
|
|
21
|
-
lastUsed:
|
|
24
|
+
lastUsed: o(e.updatedAt),
|
|
22
25
|
createdAt: e.createdAt,
|
|
23
26
|
updatedAt: e.updatedAt,
|
|
24
27
|
isFeatured: !1,
|
|
@@ -26,12 +29,12 @@ var s = {
|
|
|
26
29
|
topics: [],
|
|
27
30
|
isUserFavorite: s,
|
|
28
31
|
isStarred: s,
|
|
29
|
-
isMyApp:
|
|
30
|
-
sharedWithMe: e.sharedWithMe ??
|
|
31
|
-
isEditable: !
|
|
32
|
-
folder:
|
|
32
|
+
isMyApp: l && (e.isMy ?? !0),
|
|
33
|
+
sharedWithMe: e.sharedWithMe ?? n === i.SharedWithMe,
|
|
34
|
+
isEditable: !c && (e.canEdit ?? l),
|
|
35
|
+
folder: d(e, n, t)
|
|
33
36
|
};
|
|
34
|
-
},
|
|
37
|
+
}, p = (e) => e.join(" · "), m = (e, t) => {
|
|
35
38
|
if (e == null) return null;
|
|
36
39
|
let n = [];
|
|
37
40
|
return e.whenToUse != null && n.push({
|
|
@@ -39,25 +42,25 @@ var s = {
|
|
|
39
42
|
value: e.whenToUse
|
|
40
43
|
}), e.allowedTools?.length && n.push({
|
|
41
44
|
label: t.allowedToolsLabel,
|
|
42
|
-
value:
|
|
45
|
+
value: p(e.allowedTools)
|
|
43
46
|
}), e.bundledResources?.length && n.push({
|
|
44
47
|
label: t.bundledResourcesLabel,
|
|
45
|
-
value:
|
|
48
|
+
value: p(e.bundledResources)
|
|
46
49
|
}), n.length === 0 ? null : {
|
|
47
50
|
title: t.specificationSectionTitle,
|
|
48
51
|
specs: n
|
|
49
52
|
};
|
|
50
|
-
},
|
|
51
|
-
let r =
|
|
52
|
-
return
|
|
53
|
-
let n = e
|
|
53
|
+
}, h = (e) => e.filter((e) => e.nodeType === c.Item), g = (e, n) => {
|
|
54
|
+
let r = t(n), i = r ? `${r}/files` : "files";
|
|
55
|
+
return h(e).find((e) => {
|
|
56
|
+
let n = t(e.path);
|
|
54
57
|
return n === "SKILL.md" || n === "files/SKILL.md" || n === `${i}/SKILL.md`;
|
|
55
58
|
})?.path ?? "SKILL.md";
|
|
56
|
-
},
|
|
57
|
-
let r = e
|
|
59
|
+
}, _ = (e, n) => {
|
|
60
|
+
let r = t(e), i = t(n), a = i ? `${i}/files` : "files";
|
|
58
61
|
return r === "" || r === "files" || r === a ? null : r.startsWith(`${a}/`) ? r.slice(a.length + 1) : r.startsWith("files/") ? r.slice(6) : r;
|
|
59
|
-
},
|
|
60
|
-
let a = [], o =
|
|
62
|
+
}, v = (e, t) => _(e, t), y = (e, t, r, i) => {
|
|
63
|
+
let a = [], o = m(r, i);
|
|
61
64
|
o != null && a.push(o);
|
|
62
65
|
let s = [];
|
|
63
66
|
return e?.author && s.push({
|
|
@@ -65,26 +68,26 @@ var s = {
|
|
|
65
68
|
value: e.author
|
|
66
69
|
}), s.push({
|
|
67
70
|
label: i.updatedLabel,
|
|
68
|
-
value: e?.updatedAt ?
|
|
71
|
+
value: e?.updatedAt ? n(e.updatedAt) : ""
|
|
69
72
|
}), s.push({
|
|
70
73
|
label: i.fileCountLabel,
|
|
71
|
-
value: String(
|
|
74
|
+
value: String(h(t).length)
|
|
72
75
|
}), a.push({
|
|
73
76
|
title: i.detailsSectionTitle,
|
|
74
77
|
specs: s
|
|
75
78
|
}), { sections: a };
|
|
76
|
-
},
|
|
79
|
+
}, b = (e, t, n) => {
|
|
77
80
|
if (e === "") return n;
|
|
78
81
|
let r = t.get(e);
|
|
79
82
|
if (r != null) return r.items;
|
|
80
|
-
let i = e.split("/"),
|
|
81
|
-
type:
|
|
83
|
+
let i = e.split("/"), a = b(i.slice(0, -1).join("/"), t, n), o = {
|
|
84
|
+
type: s.Folder,
|
|
82
85
|
id: e,
|
|
83
86
|
name: i[i.length - 1],
|
|
84
87
|
items: []
|
|
85
88
|
};
|
|
86
|
-
return t.set(e,
|
|
87
|
-
},
|
|
89
|
+
return t.set(e, o), a.push(o), o.items;
|
|
90
|
+
}, x = (e, t) => {
|
|
88
91
|
e.sort((e, n) => {
|
|
89
92
|
if (t) {
|
|
90
93
|
if (e.name === "SKILL.md") return -1;
|
|
@@ -92,32 +95,36 @@ var s = {
|
|
|
92
95
|
}
|
|
93
96
|
return e.name.localeCompare(n.name);
|
|
94
97
|
});
|
|
95
|
-
for (let t of e) t.type ===
|
|
96
|
-
},
|
|
97
|
-
let n = /* @__PURE__ */ new Map(),
|
|
98
|
-
for (let
|
|
99
|
-
let e =
|
|
98
|
+
for (let t of e) t.type === s.Folder && x(t.items, !1);
|
|
99
|
+
}, S = (e, t) => {
|
|
100
|
+
let n = /* @__PURE__ */ new Map(), i = [];
|
|
101
|
+
for (let a of e) {
|
|
102
|
+
let e = _(a.path, t);
|
|
100
103
|
if (e == null) continue;
|
|
101
|
-
if (
|
|
102
|
-
|
|
104
|
+
if (a.nodeType === c.Folder) {
|
|
105
|
+
b(e, n, i);
|
|
103
106
|
continue;
|
|
104
107
|
}
|
|
105
|
-
let
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
108
|
+
let o = e.lastIndexOf("/"), l = o === -1 ? "" : e.slice(0, o);
|
|
109
|
+
if (a.name === r) {
|
|
110
|
+
b(l, n, i);
|
|
111
|
+
continue;
|
|
112
|
+
}
|
|
113
|
+
b(l, n, i).push({
|
|
114
|
+
type: s.File,
|
|
115
|
+
id: a.path,
|
|
116
|
+
name: a.name
|
|
110
117
|
});
|
|
111
118
|
}
|
|
112
|
-
return
|
|
113
|
-
},
|
|
119
|
+
return x(i, !0), i;
|
|
120
|
+
}, C = async (e) => {
|
|
114
121
|
let t = Number(e.headers.get("content-length"));
|
|
115
122
|
if (Number.isFinite(t) && t > 262144) return null;
|
|
116
123
|
let n = await e.arrayBuffer();
|
|
117
124
|
return n.byteLength > 262144 ? null : new Uint8Array(n);
|
|
118
|
-
},
|
|
119
|
-
let t = await
|
|
125
|
+
}, w = async (e) => new Uint8Array(await e.arrayBuffer()), T = async (e) => {
|
|
126
|
+
let t = await C(e);
|
|
120
127
|
return t == null ? null : new TextDecoder().decode(t);
|
|
121
128
|
};
|
|
122
129
|
//#endregion
|
|
123
|
-
export {
|
|
130
|
+
export { S as buildSkillContentTree, y as buildSkillOverview, f as mapSkillToCatalogItem, C as readSkillFileBytes, w as readSkillFilePreviewBytes, T as readSkillManifest, v as resolveSkillFileDownloadPath, g as resolveSkillManifestFileId };
|
package/catalog/publish.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { safeDecodeURIComponent as e } from "../shared/string-utils.js";
|
|
2
|
-
import { CatalogEntityType as t } from "@epam/ai-dial-chat-shared";
|
|
2
|
+
import { CatalogEntityType as t, PUBLIC_BUCKET as n } from "@epam/ai-dial-chat-shared";
|
|
3
3
|
//#region src/catalog/publish.ts
|
|
4
|
-
var
|
|
4
|
+
var r = {
|
|
5
5
|
[t.Model]: "model",
|
|
6
6
|
[t.Toolset]: "toolset",
|
|
7
7
|
[t.Agent]: "application",
|
|
8
8
|
[t.Prompt]: "prompt",
|
|
9
9
|
[t.Skill]: "skill"
|
|
10
|
-
},
|
|
10
|
+
}, i = (e) => r[e], a = (e) => e.split("/")[1] === n, o = (t) => a(t) ? t.split("/").slice(2, -1).map(e) : [], s = (e) => ({
|
|
11
11
|
version: e.version,
|
|
12
12
|
publishedAt: Date.parse(e.publishedAt),
|
|
13
13
|
folderPath: e.folderPath.split("/").filter(Boolean),
|
|
@@ -17,4 +17,4 @@ var n = {
|
|
|
17
17
|
folderPath: e.folderPath.split("/").filter(Boolean)
|
|
18
18
|
});
|
|
19
19
|
//#endregion
|
|
20
|
-
export { o as getPublicCatalogEntityFolderPath, a as isPublicCatalogEntityId, c as mapPublishConversationResultDto, s as mapPublishHistoryEntryDto,
|
|
20
|
+
export { o as getPublicCatalogEntityFolderPath, a as isPublicCatalogEntityId, c as mapPublishConversationResultDto, s as mapPublishHistoryEntryDto, i as toPublishEntityType };
|
|
@@ -1,109 +1,130 @@
|
|
|
1
1
|
import { getApiErrorDetails as e } from "../../api-error/api-error.js";
|
|
2
2
|
import { findDeploymentByIdOrReference as t } from "../deployment-id.js";
|
|
3
3
|
import { parseSkillResourceUrl as n } from "../../skill/skill-types.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { getRunnerSchemas as r, isQuickAppSchema as i } from "../../shared/application-schema.js";
|
|
5
|
+
import { CatalogEntityType as a } from "@epam/ai-dial-chat-shared";
|
|
6
|
+
import { useCallback as o, useMemo as s, useState as c } from "react";
|
|
6
7
|
//#region src/catalog/useCatalogEditNavigation/useCatalogEditNavigation.ts
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
if (
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
label
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
8
|
+
var l = ({ deployments: l, isCustomAppsEnabled: u, isSchemaAppsEnabled: d, isHideCustomAppCreationEnabled: f, isToolsetsEnabled: p, isPromptsEnabled: m, schemas: h, urls: g, onNavigate: _, deletePrompt: v, deleteToolset: y, deleteSkill: b, deleteApplication: x, refetchPrompts: S, refetchToolsets: C, refetchSkills: w, refetchDeployments: T, onDeleteSuccess: E, labels: D, onNotify: O, onSkillUploadClick: k }) => {
|
|
9
|
+
let A = s(() => r(h), [h]), [j, M] = c(""), N = d && !f;
|
|
10
|
+
return {
|
|
11
|
+
handleEdit: o((e) => {
|
|
12
|
+
if (e.type === a.Prompt) {
|
|
13
|
+
_(g.buildPromptEditUrl(e.id));
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
if (e.type === a.Skill) {
|
|
17
|
+
_(g.buildSkillEditUrl(e.id));
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
if (e.type === a.Toolset) {
|
|
21
|
+
_(g.buildToolsetEditUrl(e.id));
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
let n = t(l, e.id);
|
|
25
|
+
if (u && n != null && !n.applicationTypeSchemaId) {
|
|
26
|
+
_(g.buildCustomAppEditUrl(e.id));
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
let r = A.find((e) => e.id === n?.applicationTypeSchemaId)?.id ?? A.find((e) => i(e))?.id;
|
|
30
|
+
r && _(g.buildQuickAppEditUrl(r, e.id));
|
|
31
|
+
}, [
|
|
32
|
+
l,
|
|
33
|
+
u,
|
|
34
|
+
A,
|
|
35
|
+
_,
|
|
36
|
+
g
|
|
37
|
+
]),
|
|
38
|
+
handleDelete: o(async (t) => {
|
|
39
|
+
try {
|
|
40
|
+
if (t.type === a.Prompt) await v(t.id), await S();
|
|
41
|
+
else if (t.type === a.Toolset) await y(t.id), await C();
|
|
42
|
+
else if (t.type === a.Skill) {
|
|
43
|
+
let e = n(t.id);
|
|
44
|
+
if (e == null) throw Error(`Invalid skill resource url: ${t.id}`);
|
|
45
|
+
await b(e.bucket, e.path), await w();
|
|
46
|
+
} else await x(t.id), await T();
|
|
47
|
+
E(t);
|
|
48
|
+
} catch (t) {
|
|
49
|
+
let { traceId: n } = await e(t);
|
|
50
|
+
throw O({
|
|
51
|
+
message: D.deleteError,
|
|
52
|
+
requestId: n
|
|
53
|
+
}), t;
|
|
54
|
+
}
|
|
55
|
+
}, [
|
|
56
|
+
v,
|
|
57
|
+
y,
|
|
58
|
+
b,
|
|
59
|
+
x,
|
|
60
|
+
C,
|
|
61
|
+
T,
|
|
62
|
+
S,
|
|
63
|
+
w,
|
|
64
|
+
E,
|
|
65
|
+
D,
|
|
66
|
+
O
|
|
67
|
+
]),
|
|
68
|
+
createOptions: s(() => {
|
|
69
|
+
let e = j.trim().toLocaleLowerCase(), t = (t) => !e || t.toLocaleLowerCase().includes(e), n = [];
|
|
70
|
+
N && A.map((e) => ({
|
|
71
|
+
id: e.id,
|
|
72
|
+
label: e.displayName || e.id
|
|
73
|
+
})).filter((e) => t(e.label)).forEach((e) => {
|
|
74
|
+
n.push({
|
|
75
|
+
key: `runner:${e.id}`,
|
|
76
|
+
label: e.label,
|
|
77
|
+
onClick: () => _(g.buildQuickAppCreateUrl(e.id))
|
|
78
|
+
});
|
|
79
|
+
}), p && t(D.createToolset) && n.push({
|
|
80
|
+
key: "toolset",
|
|
81
|
+
label: D.createToolset,
|
|
82
|
+
onClick: () => _(g.buildToolsetCreateUrl())
|
|
83
|
+
}), u && !f && t(D.createCustomApp) && n.push({
|
|
84
|
+
key: "custom-app",
|
|
85
|
+
label: D.createCustomApp,
|
|
86
|
+
onClick: () => _(g.buildCustomAppCreateUrl())
|
|
87
|
+
});
|
|
88
|
+
let r = [{
|
|
82
89
|
key: "skill-write-instructions",
|
|
83
|
-
label:
|
|
84
|
-
onClick: () =>
|
|
90
|
+
label: D.createSkillWriteInstructions,
|
|
91
|
+
onClick: () => _(g.buildSkillCreateUrl())
|
|
85
92
|
}, {
|
|
86
93
|
key: "skill-upload",
|
|
87
|
-
label:
|
|
88
|
-
onClick:
|
|
89
|
-
}]
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
94
|
+
label: D.createSkillUpload,
|
|
95
|
+
onClick: k
|
|
96
|
+
}], i = t(D.createSkill) ? r : r.filter((e) => t(String(e.label)));
|
|
97
|
+
return i.length > 0 && n.push({
|
|
98
|
+
key: "skill",
|
|
99
|
+
label: D.createSkill,
|
|
100
|
+
children: i
|
|
101
|
+
}), m && t(D.createPrompt) && n.push({
|
|
102
|
+
key: "prompt",
|
|
103
|
+
label: D.createPrompt,
|
|
104
|
+
onClick: () => _(g.buildPromptCreateUrl())
|
|
105
|
+
}), n.sort((e, t) => String(e.label ?? "").localeCompare(String(t.label ?? ""), void 0, { sensitivity: "base" }));
|
|
106
|
+
}, [
|
|
107
|
+
j,
|
|
108
|
+
N,
|
|
109
|
+
A,
|
|
110
|
+
_,
|
|
111
|
+
g,
|
|
112
|
+
m,
|
|
113
|
+
D,
|
|
114
|
+
f,
|
|
115
|
+
p,
|
|
116
|
+
u,
|
|
117
|
+
k
|
|
118
|
+
]),
|
|
119
|
+
createSearch: s(() => N && A.length > 0 ? {
|
|
120
|
+
value: j,
|
|
121
|
+
onChange: M
|
|
122
|
+
} : void 0, [
|
|
123
|
+
N,
|
|
124
|
+
A.length,
|
|
125
|
+
j
|
|
126
|
+
])
|
|
127
|
+
};
|
|
128
|
+
};
|
|
108
129
|
//#endregion
|
|
109
|
-
export {
|
|
130
|
+
export { l as useCatalogEditNavigation };
|
|
@@ -12,8 +12,8 @@ var p = (e) => (t) => {
|
|
|
12
12
|
if (!s(t)) return e.getPrompt(t.id);
|
|
13
13
|
let n = a(t.id);
|
|
14
14
|
return e.getPublicPrompt(n?.path ?? t.id);
|
|
15
|
-
}, m = ({ api: a, skills: s, isAdmin: m, dialCoreExternalUrl: h, skillOverviewLabels: g, promptOverviewLabels: _, deploymentLimitsLabels: v }) => {
|
|
16
|
-
let { onFetchSkillDetails:
|
|
15
|
+
}, m = ({ api: a, skills: s, isAdmin: m, dialCoreExternalUrl: h, skillOverviewLabels: g, promptOverviewLabels: _, deploymentLimitsLabels: v, entityDetailsLabels: y }) => {
|
|
16
|
+
let { onFetchSkillDetails: b, onLoadContentFile: x, onLoadSkillDetailsFile: S } = u({
|
|
17
17
|
api: a,
|
|
18
18
|
skills: s,
|
|
19
19
|
skillOverviewLabels: g
|
|
@@ -29,15 +29,15 @@ var p = (e) => (t) => {
|
|
|
29
29
|
} catch {
|
|
30
30
|
return;
|
|
31
31
|
}
|
|
32
|
-
if (s.type === d.Skill) return
|
|
32
|
+
if (s.type === d.Skill) return b(s);
|
|
33
33
|
try {
|
|
34
|
-
let o = s.type === d.Model ? a.getDeploymentLimits(s.id).catch(() => void 0) : Promise.resolve(void 0), [u, f] = await Promise.all([a.getDeploymentDetails(s.id), o]), p = n(u), g = r(p), _ = l(s.type, s.supportsMcp),
|
|
34
|
+
let o = s.type === d.Model ? a.getDeploymentLimits(s.id).catch(() => void 0) : Promise.resolve(void 0), [u, f] = await Promise.all([a.getDeploymentDetails(s.id), o]), p = n(u), g = r(p, y), _ = l(s.type, s.supportsMcp), b = p.type === "MODEL" || p.type === "AGENT" ? e(h ?? "", s.id, {
|
|
35
35
|
hasChatCompletion: p.data.capabilities?.hasChatCompletion,
|
|
36
36
|
hasResponsesApi: p.data.capabilities?.hasResponsesApi
|
|
37
37
|
}) : void 0;
|
|
38
38
|
return {
|
|
39
39
|
...g,
|
|
40
|
-
api: _ == null ?
|
|
40
|
+
api: _ == null ? b ?? g.api : c(h ?? "", s.id, _),
|
|
41
41
|
limits: t(f, v),
|
|
42
42
|
credentials: p.type === "TOOLSET" ? i(s.id, p.data, m) : void 0
|
|
43
43
|
};
|
|
@@ -49,11 +49,12 @@ var p = (e) => (t) => {
|
|
|
49
49
|
m,
|
|
50
50
|
v,
|
|
51
51
|
h,
|
|
52
|
+
y,
|
|
52
53
|
_,
|
|
53
|
-
|
|
54
|
+
b
|
|
54
55
|
]),
|
|
55
|
-
onLoadContentFile:
|
|
56
|
-
onLoadSkillDetailsFile:
|
|
56
|
+
onLoadContentFile: x,
|
|
57
|
+
onLoadSkillDetailsFile: S
|
|
57
58
|
};
|
|
58
59
|
};
|
|
59
60
|
//#endregion
|
|
@@ -48,7 +48,7 @@ var c = "Production", l = 50, u = (e, t, n) => {
|
|
|
48
48
|
return b((e) => e.includes(n) ? e : [...e, n]), Promise.resolve();
|
|
49
49
|
}, []), T = e((e) => {
|
|
50
50
|
let t = s(e), n = Array.isArray(d) ? d : [];
|
|
51
|
-
!t || n
|
|
51
|
+
!t || n[0] === t || f?.([t, ...n.filter((e) => e !== t)].slice(0, l));
|
|
52
52
|
}, [d, f]), E = e((e) => !e.includes(c), []);
|
|
53
53
|
return {
|
|
54
54
|
folderItems: n(() => {
|