@epam/ai-dial-chat-hooks 1.2.0-dev.273 → 1.2.0-dev.276
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/catalog/map-skill-to-catalog-item.js +51 -47
- package/catalog.d.ts +3 -1
- package/index.d.ts +30 -6
- package/index.js +124 -124
- package/package.json +16 -16
- package/scheduled-task/scheduled-task-trigger.js +4 -4
- package/skill/skill-archive.js +11 -11
- package/skill/skill.js +43 -32
- package/skill/useSkillEditorLoad.js +58 -53
- package/skill-editor.d.ts +27 -5
- package/skill-editor.js +9 -9
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { safeDecodeURIComponent as e, stripSurroundingSlashes as t } from "../shared/string-utils.js";
|
|
2
2
|
import { formatCalendarDate as n } from "../shared/formatting.js";
|
|
3
|
-
import "../skill/skill.js";
|
|
4
|
-
import { SkillSource as
|
|
5
|
-
import { CatalogEntityType as
|
|
6
|
-
import { CatalogContentNodeType as
|
|
7
|
-
import { SkillMetadataItemDtoNodeTypeEnum as
|
|
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
|
-
},
|
|
9
|
+
var l = {
|
|
10
|
+
[i.Personal]: "personal",
|
|
11
|
+
[i.SharedWithMe]: "shared",
|
|
12
|
+
[i.Public]: "public"
|
|
13
|
+
}, u = (t, n) => {
|
|
14
14
|
let r = (n ?? "").split("/").filter(Boolean), i = t.split("/").filter(Boolean).slice(2, -1);
|
|
15
15
|
return i.length === r.length ? i.map(e) : r;
|
|
16
|
-
},
|
|
17
|
-
let s =
|
|
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;
|
|
18
18
|
return {
|
|
19
19
|
id: e.url,
|
|
20
|
-
type:
|
|
20
|
+
type: a.Skill,
|
|
21
21
|
name: e.name,
|
|
22
22
|
description: e.description ?? "",
|
|
23
23
|
version: "",
|
|
24
|
-
lastUsed:
|
|
24
|
+
lastUsed: o(e.updatedAt),
|
|
25
25
|
createdAt: e.createdAt,
|
|
26
26
|
updatedAt: e.updatedAt,
|
|
27
27
|
isFeatured: !1,
|
|
@@ -30,11 +30,11 @@ var c = {
|
|
|
30
30
|
isUserFavorite: s,
|
|
31
31
|
isStarred: s,
|
|
32
32
|
isMyApp: l && (e.isMy ?? !0),
|
|
33
|
-
sharedWithMe: e.sharedWithMe ?? n ===
|
|
33
|
+
sharedWithMe: e.sharedWithMe ?? n === i.SharedWithMe,
|
|
34
34
|
isEditable: !c && (e.canEdit ?? l),
|
|
35
|
-
folder:
|
|
35
|
+
folder: d(e, n, t)
|
|
36
36
|
};
|
|
37
|
-
},
|
|
37
|
+
}, p = (e) => e.join(" · "), m = (e, t) => {
|
|
38
38
|
if (e == null) return null;
|
|
39
39
|
let n = [];
|
|
40
40
|
return e.whenToUse != null && n.push({
|
|
@@ -42,25 +42,25 @@ var c = {
|
|
|
42
42
|
value: e.whenToUse
|
|
43
43
|
}), e.allowedTools?.length && n.push({
|
|
44
44
|
label: t.allowedToolsLabel,
|
|
45
|
-
value:
|
|
45
|
+
value: p(e.allowedTools)
|
|
46
46
|
}), e.bundledResources?.length && n.push({
|
|
47
47
|
label: t.bundledResourcesLabel,
|
|
48
|
-
value:
|
|
48
|
+
value: p(e.bundledResources)
|
|
49
49
|
}), n.length === 0 ? null : {
|
|
50
50
|
title: t.specificationSectionTitle,
|
|
51
51
|
specs: n
|
|
52
52
|
};
|
|
53
|
-
},
|
|
53
|
+
}, h = (e) => e.filter((e) => e.nodeType === c.Item), g = (e, n) => {
|
|
54
54
|
let r = t(n), i = r ? `${r}/files` : "files";
|
|
55
|
-
return
|
|
55
|
+
return h(e).find((e) => {
|
|
56
56
|
let n = t(e.path);
|
|
57
57
|
return n === "SKILL.md" || n === "files/SKILL.md" || n === `${i}/SKILL.md`;
|
|
58
58
|
})?.path ?? "SKILL.md";
|
|
59
|
-
},
|
|
59
|
+
}, _ = (e, n) => {
|
|
60
60
|
let r = t(e), i = t(n), a = i ? `${i}/files` : "files";
|
|
61
61
|
return r === "" || r === "files" || r === a ? null : r.startsWith(`${a}/`) ? r.slice(a.length + 1) : r.startsWith("files/") ? r.slice(6) : r;
|
|
62
|
-
},
|
|
63
|
-
let a = [], o =
|
|
62
|
+
}, v = (e, t) => _(e, t), y = (e, t, r, i) => {
|
|
63
|
+
let a = [], o = m(r, i);
|
|
64
64
|
o != null && a.push(o);
|
|
65
65
|
let s = [];
|
|
66
66
|
return e?.author && s.push({
|
|
@@ -71,23 +71,23 @@ var c = {
|
|
|
71
71
|
value: e?.updatedAt ? n(e.updatedAt) : ""
|
|
72
72
|
}), s.push({
|
|
73
73
|
label: i.fileCountLabel,
|
|
74
|
-
value: String(
|
|
74
|
+
value: String(h(t).length)
|
|
75
75
|
}), a.push({
|
|
76
76
|
title: i.detailsSectionTitle,
|
|
77
77
|
specs: s
|
|
78
78
|
}), { sections: a };
|
|
79
|
-
},
|
|
79
|
+
}, b = (e, t, n) => {
|
|
80
80
|
if (e === "") return n;
|
|
81
81
|
let r = t.get(e);
|
|
82
82
|
if (r != null) return r.items;
|
|
83
|
-
let i = e.split("/"), a =
|
|
84
|
-
type:
|
|
83
|
+
let i = e.split("/"), a = b(i.slice(0, -1).join("/"), t, n), o = {
|
|
84
|
+
type: s.Folder,
|
|
85
85
|
id: e,
|
|
86
86
|
name: i[i.length - 1],
|
|
87
87
|
items: []
|
|
88
88
|
};
|
|
89
|
-
return t.set(e,
|
|
90
|
-
},
|
|
89
|
+
return t.set(e, o), a.push(o), o.items;
|
|
90
|
+
}, x = (e, t) => {
|
|
91
91
|
e.sort((e, n) => {
|
|
92
92
|
if (t) {
|
|
93
93
|
if (e.name === "SKILL.md") return -1;
|
|
@@ -95,32 +95,36 @@ var c = {
|
|
|
95
95
|
}
|
|
96
96
|
return e.name.localeCompare(n.name);
|
|
97
97
|
});
|
|
98
|
-
for (let t of e) t.type ===
|
|
99
|
-
},
|
|
100
|
-
let n = /* @__PURE__ */ new Map(),
|
|
101
|
-
for (let
|
|
102
|
-
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);
|
|
103
103
|
if (e == null) continue;
|
|
104
|
-
if (
|
|
105
|
-
|
|
104
|
+
if (a.nodeType === c.Folder) {
|
|
105
|
+
b(e, n, i);
|
|
106
|
+
continue;
|
|
107
|
+
}
|
|
108
|
+
let o = e.lastIndexOf("/"), l = o === -1 ? "" : e.slice(0, o);
|
|
109
|
+
if (a.name === r) {
|
|
110
|
+
b(l, n, i);
|
|
106
111
|
continue;
|
|
107
112
|
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
name: i.name
|
|
113
|
+
b(l, n, i).push({
|
|
114
|
+
type: s.File,
|
|
115
|
+
id: a.path,
|
|
116
|
+
name: a.name
|
|
113
117
|
});
|
|
114
118
|
}
|
|
115
|
-
return
|
|
116
|
-
},
|
|
119
|
+
return x(i, !0), i;
|
|
120
|
+
}, C = async (e) => {
|
|
117
121
|
let t = Number(e.headers.get("content-length"));
|
|
118
122
|
if (Number.isFinite(t) && t > 262144) return null;
|
|
119
123
|
let n = await e.arrayBuffer();
|
|
120
124
|
return n.byteLength > 262144 ? null : new Uint8Array(n);
|
|
121
|
-
},
|
|
122
|
-
let t = await
|
|
125
|
+
}, w = async (e) => new Uint8Array(await e.arrayBuffer()), T = async (e) => {
|
|
126
|
+
let t = await C(e);
|
|
123
127
|
return t == null ? null : new TextDecoder().decode(t);
|
|
124
128
|
};
|
|
125
129
|
//#endregion
|
|
126
|
-
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.d.ts
CHANGED
|
@@ -129,7 +129,9 @@ export declare const buildResponsesUrl: (baseUrl: string) => string;
|
|
|
129
129
|
* itself) contributes no node. Every folder entry is attached under its own
|
|
130
130
|
* stripped path so an empty grouping folder still appears; every file entry
|
|
131
131
|
* attaches under the folder chain its stripped path implies, synthesizing
|
|
132
|
-
* any intermediate folder the listing never enumerated on its own.
|
|
132
|
+
* any intermediate folder the listing never enumerated on its own. An
|
|
133
|
+
* empty-folder marker (`.dial_folder`) only proves its folder exists and
|
|
134
|
+
* never becomes a file node. A file
|
|
133
135
|
* node's `id` is the listing entry's own (unstripped) path, so it round-trips
|
|
134
136
|
* back to `downloadSkillFile` without being re-derived; a folder node's `id`
|
|
135
137
|
* is the stripped path and only keys client-side expand/collapse state.
|
package/index.d.ts
CHANGED
|
@@ -547,7 +547,9 @@ export declare const buildSharedItemVirtualPath: (relativePath: string, rootLabe
|
|
|
547
547
|
* itself) contributes no node. Every folder entry is attached under its own
|
|
548
548
|
* stripped path so an empty grouping folder still appears; every file entry
|
|
549
549
|
* attaches under the folder chain its stripped path implies, synthesizing
|
|
550
|
-
* any intermediate folder the listing never enumerated on its own.
|
|
550
|
+
* any intermediate folder the listing never enumerated on its own. An
|
|
551
|
+
* empty-folder marker (`.dial_folder`) only proves its folder exists and
|
|
552
|
+
* never becomes a file node. A file
|
|
551
553
|
* node's `id` is the listing entry's own (unstripped) path, so it round-trips
|
|
552
554
|
* back to `downloadSkillFile` without being re-derived; a folder node's `id`
|
|
553
555
|
* is the stripped path and only keys client-side expand/collapse state.
|
|
@@ -557,7 +559,10 @@ export declare const buildSkillContentTree: (files: SkillMetadataItemDto[], skil
|
|
|
557
559
|
/**
|
|
558
560
|
* Builds the ordered supporting-file paths and `Blob` payload
|
|
559
561
|
* `createSkill`/`updateSkill` expect from the editor's file tree and
|
|
560
|
-
* in-memory content map.
|
|
562
|
+
* in-memory content map. Every folder node with no descendant node gets a
|
|
563
|
+
* zero-byte `<folder>/.dial_folder` marker after the real files, so the
|
|
564
|
+
* empty folder survives the whole-skill write; a folder with content needs
|
|
565
|
+
* none, and a marker it had before is dropped by that same write.
|
|
561
566
|
*/
|
|
562
567
|
export declare const buildSkillFilesPayload: (files: SkillFileTreeNode[], filesContent: Map<string, SkillFileContent>) => SkillFilesPayload;
|
|
563
568
|
|
|
@@ -2226,6 +2231,9 @@ export declare const isQuickAppSchema: (schema?: QuickAppSchemaLike) => boolean;
|
|
|
2226
2231
|
/** Share/Unshare/Remove access are Full-only — Browse and Attach never expose them. */
|
|
2227
2232
|
export declare const isShareActionsAllowed: (actionProfile: DialFileManagerActionProfile) => boolean;
|
|
2228
2233
|
|
|
2234
|
+
/** Whether a skill-relative path is a folder marker (`<folder>/.dial_folder`, never a root-level `.dial_folder`). */
|
|
2235
|
+
export declare const isSkillFolderMarkerPath: (path: string) => boolean;
|
|
2236
|
+
|
|
2229
2237
|
/** True when `value` is a well-formed absolute `http(s)://` URL. */
|
|
2230
2238
|
export declare const isValidAbsoluteUrl: (value: string) => boolean;
|
|
2231
2239
|
|
|
@@ -2236,7 +2244,10 @@ export declare const isValidFeaturesData: (value: string) => boolean;
|
|
|
2236
2244
|
* Client-side mirror of the backend's `isValidSkillRelativePath`
|
|
2237
2245
|
* (`apps/chat-api/src/skills/utils/skill-path.util.ts`), used only for
|
|
2238
2246
|
* immediate inline feedback — the server remains authoritative and may still
|
|
2239
|
-
* reject a path this function accepts.
|
|
2247
|
+
* reject a path this function accepts. It additionally reserves the
|
|
2248
|
+
* `.dial_folder` marker name so a user can never upload or name a folder
|
|
2249
|
+
* after it; the save payload's generated markers never pass through here
|
|
2250
|
+
* (the server accepts them only as a zero-byte final segment).
|
|
2240
2251
|
*/
|
|
2241
2252
|
export declare const isValidSkillRelativePath: (relativePath: string) => boolean;
|
|
2242
2253
|
|
|
@@ -3754,6 +3765,13 @@ export declare const shouldWatchForDisplayNameUpdate: (conversation: Conversatio
|
|
|
3754
3765
|
*/
|
|
3755
3766
|
export declare const SKILL_FILE_UPLOAD_MAX_BYTES = 1048576;
|
|
3756
3767
|
|
|
3768
|
+
/**
|
|
3769
|
+
* Zero-byte object written at `<folder>/.dial_folder` so an otherwise empty
|
|
3770
|
+
* skill folder survives a save — DIAL Core storage has no directory objects,
|
|
3771
|
+
* so a folder only exists as a file's path prefix.
|
|
3772
|
+
*/
|
|
3773
|
+
export declare const SKILL_FOLDER_MARKER = ".dial_folder";
|
|
3774
|
+
|
|
3757
3775
|
/**
|
|
3758
3776
|
* Upper bound on `nextToken` follow-ups per listing, so a pathological bucket
|
|
3759
3777
|
* cannot spin the client forever.
|
|
@@ -4025,6 +4043,9 @@ export declare interface SkillFilesPayload {
|
|
|
4025
4043
|
*/
|
|
4026
4044
|
export declare const skillFileToAttachment: (node: SkillFileTreeNode, content: SkillFileContent) => Attachment;
|
|
4027
4045
|
|
|
4046
|
+
/** Returns the folder path a marker path stands for (`docs/.dial_folder` → `docs`). */
|
|
4047
|
+
export declare const skillFolderMarkerParent: (markerPath: string) => string;
|
|
4048
|
+
|
|
4028
4049
|
/** A `SKILL.md` split into its frontmatter fields and its prose body. */
|
|
4029
4050
|
export declare interface SkillManifestDocument {
|
|
4030
4051
|
/** `name` frontmatter field, when present and a string. */
|
|
@@ -4519,15 +4540,18 @@ export declare const unionPathSets: (pathSets: readonly ReadonlySet<string>[]) =
|
|
|
4519
4540
|
export declare interface UnpackedSkillArchive {
|
|
4520
4541
|
/** The root `SKILL.md` entry's decoded text content. */
|
|
4521
4542
|
manifestText: string;
|
|
4522
|
-
/** Every non-manifest entry, keyed by relative path. */
|
|
4543
|
+
/** Every non-manifest, non-marker entry, keyed by relative path. */
|
|
4523
4544
|
files: Map<string, Uint8Array>;
|
|
4545
|
+
/** Folder paths restored from `<folder>/.dial_folder` marker entries. */
|
|
4546
|
+
folders: string[];
|
|
4524
4547
|
}
|
|
4525
4548
|
|
|
4526
4549
|
/**
|
|
4527
4550
|
* Unpacks a whole-skill ZIP (as downloaded from `GET /api/v1/skills/download`
|
|
4528
4551
|
* — DIAL Core's whole-resource `GET` is the one place this contract still
|
|
4529
|
-
* uses a ZIP, per design.md) into its manifest text
|
|
4530
|
-
* bytes
|
|
4552
|
+
* uses a ZIP, per design.md) into its manifest text, every other entry's
|
|
4553
|
+
* bytes, and the folders its empty-folder markers stand for. Throws if the
|
|
4554
|
+
* archive has no root `SKILL.md` entry.
|
|
4531
4555
|
*/
|
|
4532
4556
|
export declare const unpackSkillArchive: (bytes: Uint8Array) => UnpackedSkillArchive;
|
|
4533
4557
|
|
package/index.js
CHANGED
|
@@ -24,127 +24,127 @@ import { mapDeploymentDetailsDtoToEntityDetails as he, mapEntityDetailsToCatalog
|
|
|
24
24
|
import { mapDeploymentToCatalogItem as ve, mapDeploymentToolsetCredentials as ye, mapToolsetToCatalogItem as be, resolveDeploymentFolder as xe } from "./catalog/map-deployment-to-catalog-item.js";
|
|
25
25
|
import { PromptSource as Se, parsePromptResourceUrl as Ce } from "./prompt/prompt-resource.js";
|
|
26
26
|
import { buildPromptOverview as we, isOrganisationPromptItem as Te, mapPromptToCatalogItem as Ee } from "./catalog/map-prompt-to-catalog-item.js";
|
|
27
|
-
import { SKILL_FILE_UPLOAD_MAX_BYTES as De,
|
|
28
|
-
import { PUBLIC_SKILL_BUCKET as
|
|
29
|
-
import { buildSkillContentTree as
|
|
30
|
-
import { McpResourceKind as
|
|
31
|
-
import { getPublicCatalogEntityFolderPath as
|
|
32
|
-
import { deriveAvailableTabIds as
|
|
33
|
-
import { CatalogPrimaryActionType as
|
|
34
|
-
import { getRunnerSchemas as
|
|
35
|
-
import { useCatalogEditNavigation as
|
|
36
|
-
import { parseSkillManifestDocument as
|
|
37
|
-
import { useSkillItemDetails as
|
|
38
|
-
import { useCatalogItemDetails as
|
|
39
|
-
import { emitToolsetLoginSuccess as
|
|
40
|
-
import { getToolsetOAuthChannelName as
|
|
41
|
-
import { buildToolsetAuthorizeUrl as
|
|
42
|
-
import { initiateOAuthLogin as
|
|
43
|
-
import { ToolsetLoginOutcomeType as
|
|
44
|
-
import { useCatalogToolsetCredentials as
|
|
45
|
-
import { useApplicationCredentials as
|
|
46
|
-
import { useSkillDetailsPanelData as
|
|
47
|
-
import { FavoriteEntityType as
|
|
48
|
-
import { usePublishFolders as
|
|
49
|
-
import { buildAnnouncementSignature as
|
|
50
|
-
import { DEFAULT_GENERATION_CONFLICT_MESSAGE as
|
|
51
|
-
import { shouldWatchForDisplayNameUpdate as
|
|
52
|
-
import { formatAppVersion as
|
|
53
|
-
import { getModelIdFromConversationId as
|
|
54
|
-
import { getTimeOfDayGreeting as
|
|
55
|
-
import { createDeploymentChangedMessage as
|
|
56
|
-
import { getFormSchemaToolSyncKey as
|
|
57
|
-
import { toOverlayMessages as
|
|
58
|
-
import { getQuickAppConversationStarters as
|
|
59
|
-
import { mapStages as
|
|
60
|
-
import { getStarterPopulateText as
|
|
61
|
-
import { useOAuthCallbackCompletion as
|
|
62
|
-
import { buildPromptExportEnvelope as
|
|
63
|
-
import { PROMPT_CONTENT_MAX_LENGTH as
|
|
64
|
-
import { usePromptsState as
|
|
65
|
-
import { UnsupportedTriggerReason as
|
|
66
|
-
import { ScheduledTaskTriggerDescriptionKind as
|
|
67
|
-
import { apSchedulerDayToJsDay as
|
|
68
|
-
import { mapFormValuesToCreateBody as
|
|
69
|
-
import { prepareScheduledTaskCreateBody as
|
|
70
|
-
import { createScheduledTasksApiClient as
|
|
71
|
-
import { useScheduledTasks as
|
|
72
|
-
import { mergeRunsById as
|
|
73
|
-
import { validateSkillFileBatch as
|
|
74
|
-
import { skillFileToAttachment as
|
|
75
|
-
import { SkillEditorLoadState as
|
|
76
|
-
import { useSkillEditorSubmit as
|
|
77
|
-
import { useSkillFileActions as
|
|
78
|
-
import { SkillPreviewErrorKind as
|
|
79
|
-
import { useSkillsState as
|
|
80
|
-
import { SkillArchiveImportErrorKind as
|
|
81
|
-
import { RecipientsCountStatus as
|
|
82
|
-
import { deriveConversationRowActionState as
|
|
83
|
-
import { useActiveConversationSync as
|
|
84
|
-
import { useAsyncConfirmDialog as
|
|
85
|
-
import { useConversationLookupMaps as
|
|
86
|
-
import { getConversationSource as
|
|
87
|
-
import { useImportFilePicker as
|
|
88
|
-
import { useMessageSelectionReply as
|
|
89
|
-
import { sanitizeFileName as
|
|
90
|
-
import { useAttachmentUpload as
|
|
91
|
-
import { AudioTranscriptionError as
|
|
92
|
-
import { useTranscribeAudio as
|
|
93
|
-
import { DEFAULT_MAX_ARCHIVE_BYTES as
|
|
94
|
-
import { attachmentToDto as
|
|
95
|
-
import { createMessagePair as
|
|
96
|
-
import { hasActiveToolConfig as
|
|
97
|
-
import { getStarterConversationText as
|
|
98
|
-
import { getConversationPath as
|
|
99
|
-
import { useConversationHandlers as
|
|
100
|
-
import { useConversationImport as
|
|
101
|
-
import { useConversationScroll as
|
|
102
|
-
import { applyChunkToMessages as
|
|
103
|
-
import { isAwaitingGenerationResume as
|
|
104
|
-
import { useConversationStream as
|
|
105
|
-
import { useConversationSources as
|
|
106
|
-
import { DialFilesApiUploadMode as
|
|
107
|
-
import { FileManagerNotificationReason as
|
|
108
|
-
import { COLUMNS_WITHOUT_AUTHOR as
|
|
109
|
-
import { DialFileManagerActionProfile as
|
|
110
|
-
import { buildSharedItemVirtualPath as
|
|
111
|
-
import { getParentFolderPath as
|
|
112
|
-
import { prepareCopyItems as
|
|
113
|
-
import { buildFromCache as
|
|
114
|
-
import { createFilesApiClient as
|
|
115
|
-
import { createUploadFileWithProgress as
|
|
116
|
-
import { openAnnotationAttachment as
|
|
117
|
-
import { annotationToOoxmlCanvasContent as
|
|
118
|
-
import { getUrlFileName as
|
|
119
|
-
import { annotationToDisplayAttachment as
|
|
120
|
-
import { dialFileToAttachment as
|
|
121
|
-
import { DownloadDestinationType as
|
|
122
|
-
import { prepareDownloadDestination as
|
|
123
|
-
import { useDialFileListing as
|
|
124
|
-
import { useDialFileMetadata as
|
|
125
|
-
import { useDialFileMutations as
|
|
126
|
-
import { useDialFileSharing as
|
|
127
|
-
import { useDialFileUploadBatch as
|
|
128
|
-
import { useDialFileManager as
|
|
129
|
-
import { useDialFileManagerSections as
|
|
130
|
-
import { useDialFileManagerTabConfig as
|
|
131
|
-
import { useFileAttachmentPicker as
|
|
132
|
-
import { getBrowserTimezone as
|
|
133
|
-
import { isValidAbsoluteUrl as
|
|
134
|
-
import { buildExternalServiceScopeId as
|
|
135
|
-
import { useChatSettingsFormConfig as
|
|
136
|
-
import { usePageFileDrag as
|
|
137
|
-
import { useViewportWidth as
|
|
138
|
-
import { usePanelMaxWidth as
|
|
139
|
-
import { useShareLink as
|
|
140
|
-
import { useToolsMenu as
|
|
141
|
-
import { USAGE_DATA_I18N_KEYS as
|
|
142
|
-
import { USAGE_MODEL_LIMITS_I18N_KEYS as
|
|
143
|
-
import { useUsageData as
|
|
144
|
-
import { McpAppResourceFetchError as
|
|
145
|
-
import { useMcpAppTools as
|
|
146
|
-
import { useMcpAppHostContext as
|
|
147
|
-
import { useMcpAppHostAdapter as
|
|
148
|
-
import { useOpenMcpAppCanvas as
|
|
149
|
-
import { useGridEditingScroll as
|
|
150
|
-
export { x as AttachmentValidationErrorReason, Or as AudioTranscriptionError, kr as AudioTranscriptionErrorReason, B as AuthenticationType, ni as COLUMNS_WITHOUT_AUTHOR, ri as COLUMNS_WITH_AUTHOR, ii as CORE_PERMISSION_MAP, yt as CatalogPrimaryActionType, T as ConversationExportMode, E as ConversationTransferErrorCode, D as ConversationTransferWarningCode, ai as DATE_OPTIONS, Xt as DEFAULT_GENERATION_CONFLICT_MESSAGE, Zt as DEFAULT_GENERATION_PERSISTENCE_ERROR_MESSAGE, jr as DEFAULT_MAX_ARCHIVE_BYTES, Qt as DEFAULT_STREAM_IDLE_TIMEOUT_MS, oi as DIAL_FILE_MANAGER_SECTION_TABS, ui as DialFileManagerActionProfile, di as DialFileManagerVariant, Qr as DialFilesApiUploadMode, _a as DownloadDestinationType, k as EXPORT_APP_NAME, O as ExportFileNameKind, Ht as FavoriteEntityType, $r as FileManagerNotificationReason, ei as FileNameValidationErrorReason, ti as FileOperationKind, $t as GenerationConflictError, en as GenerationPersistenceError, qa as McpAppResourceFetchError, it as McpResourceKind, W as OAuthResourceKind, si as PATH_SEPARATOR_REGEXP, kn as PROMPT_CONTENT_MAX_LENGTH, An as PROMPT_COUNTER_ANNOUNCE_THRESHOLD, jn as PROMPT_DESCRIPTION_MAX_LENGTH, Mn as PROMPT_NAME_MAX_LENGTH, We as PUBLIC_SKILL_BUCKET, Nn as PromptFieldError, Se as PromptSource, ci as RESERVED_MARKER_NAME, mr as RecipientsCountStatus, De as SKILL_FILE_UPLOAD_MAX_BYTES, Ge as SKILL_LISTING_MAX_PAGES, Ke as SKILL_LISTING_PAGE_SIZE, Oe as SKILL_MANIFEST_FILE, qe as SKILL_MANIFEST_MAX_BYTES, ke as SKILL_TEXT_FIELD_MAX_LENGTHS, Ae as SKILL_UPLOAD_MAX_FILES, je as SKILL_UPLOAD_MAX_TOTAL_BYTES, Vn as ScheduledTaskTriggerDescriptionKind, lr as SkillArchiveImportErrorKind, ur as SkillArchiveImportStatus, dr as SkillArchiveSelectionRejectionReason, nr as SkillEditorLoadState, or as SkillPreviewErrorKind, Je as SkillSource, tn as StreamInterruptedError, nn as StreamUpstreamError, G as TOOLSET_REDIRECT_STATE_KEY, K as ToolsetAuthStatus, q as ToolsetAuthTypes, J as ToolsetCredentialsLevel, Lt as ToolsetLoginOutcomeType, Y as ToolsetOAuthCallbackQuery, X as ToolsetOAuthChannelControlType, Z as ToolsetOAuthFailureReason, Q as ToolsetOAuthInitiationResultType, $ as ToolsetOAuthResultType, li as UPLOAD_CONCURRENCY, Va as USAGE_DATA_I18N_KEYS, Ua as USAGE_MODEL_LIMITS_I18N_KEYS, Bn as UnsupportedTriggerReason, ee as WithLogin, da as annotationToDisplayAttachment, qi as annotationToOoxmlCanvasContent, Ji as annotationToPdfCanvasContent, Un as apSchedulerDayToJsDay, se as appendLocaleCode, qr as applyChunkToMessages, fa as attachmentDtoToDisplayAttachment, pa as attachmentDtosToDisplayAttachments, Nr as attachmentToDto, Pr as attachmentsToDtos, ce as buildAdditionalLocaleOptions, Gt as buildAnnouncementSignature, at as buildApplicationMcpUrl, N as buildChatCompletionsUrl, ot as buildConnectApi, P as buildDeploymentConnectApi, Ma as buildExternalServiceScopeId, Fi as buildFromCache, En as buildPromptExportEnvelope, Dn as buildPromptExportFileName, we as buildPromptOverview, Pn as buildPromptPath, V as buildResetFields, F as buildResponsesUrl, pi as buildSharedItemVirtualPath, Xe as buildSkillContentTree, Me as buildSkillFilesPayload, Ne as buildSkillManifest, Pe as buildSkillManifestForSubmit, Fe as buildSkillManifestFromFrontmatter, Ze as buildSkillOverview, Mt as buildToolsetAuthorizeUrl, st as buildToolsetMcpUrl, fr as classifySkillArchiveImportError, Yi as clearAttachmentCache, le as composeLocalePayload, rn as createChatStreamApi, i as createCsrfMiddleware, un as createDeploymentChangedMessage, Wi as createFilesApiClient, Ja as createMcpAppsApiClient, Fr as createMessagePair, j as createPublishApiClient, Xn as createScheduledTasksApiClient, a as createUnauthorizedMiddleware, Gi as createUploadFileWithProgress, I as decodeDeploymentId, te as decodeToolsetId, ue as decomposeLocalizedFields, fi as deriveActionProfile, mt as deriveAvailableTabIds, gr as deriveConversationRowActionState, ht as deriveFavoriteItems, Hn as describeScheduledTaskTrigger, mi as dialCorePathToRelative, ma as dialFileToAttachment, ha as dialFilesToAttachments, ga as dialFolderPathToAttachment, m as downloadAttachment, Ot as emitToolsetLoginSuccess, L as encodeDeploymentId, ne as encodeToolsetId, Ii as fetchByTab, Li as fetchForSearch, gt as filterCatalogItemsBySelector, _t as filterHiddenOwnedItems, R as findDeploymentByIdOrReference, hi as findDialFileByPath, Ri as findFirstSuccessfulCopyMoveItem, gi as findFolderByVirtualPath, on as formatAppVersion, pe as formatCalendarDate, C as formatDateYM, w as formatDateYMD, _i as formatOperationFolderName, A as formatQuotedNameList, e as getApiErrorDetails, t as getApiErrorMessage, n as getApiErrorStatus, Oa as getBrowserTimezone, Ur as getConversationPath, br as getConversationSource, Na as getExternalServiceFallbackName, dn as getFormSchemaToolSyncKey, fn as getLastDeploymentId, pn as getLastUserMessageToolConfiguration, mn as getLatestToolConfiguration, cn as getModelIdFromConversationId, Ai as getParentFolderPath, lt as getPublicCatalogEntityFolderPath, bn as getQuickAppConversationStarters, Fn as getRemainingCharacters, xt as getRunnerSchemas, Ie as getSkillFieldLengthViolations, Br as getStarterConversationText, Vr as getStarterDisplayText, Cn as getStarterPopulateText, Hr as getStarterSubmitText, wn as getStartersFromSchema, ln as getTimeOfDayGreeting, hn as getToolConfigurationFromFormSchema, At as getToolsetOAuthChannelName, Nt as getToolsetRedirectUri, ca as getUrlFileName, vi as getVirtualPathName, Ir as hasActiveToolConfig, Kt as hasAnnouncementContent, Xi as hasAttachmentTextSource, yi as hasDialFileWritePermission, bi as hasForbiddenNameSymbols, xi as hasSamePaths, qt as hasStructuredAnnouncement, o as includesIgnoreCase, Pt as initiateOAuthLogin, Lr as isAnswerIncomplete, Yr as isAwaitingGenerationResume, r as isConversationNotFoundError, Si as isCopyMoveDuplicateAllowed, St as isCustomAppSchema, _ as isDialFileAcceptType, d as isDialFileId, h as isDownloadableAttachment, la as isExternalSourcePreviewable, Rr as isMessageChanged, gn as isMessageStreaming, Te as isOrganisationPromptItem, ut as isPublicCatalogEntityId, re as isPublicToolsetId, Ct as isQuickAppSchema, Ci as isShareActionsAllowed, ka as isValidAbsoluteUrl, Aa as isValidFeaturesData, Le as isValidSkillRelativePath, Wn as jsDayToApSchedulerDay, zi as mapCorePermissions, he as mapDeploymentDetailsDtoToEntityDetails, U as mapDeploymentLimitsDtoToCatalogLimits, H as mapDeploymentLimitsToInput, ve as mapDeploymentToCatalogItem, ye as mapDeploymentToolsetCredentials, ge as mapEntityDetailsToCatalogDetails, Bi as mapFileMetadataToDialFile, Gn as mapFormValuesToCreateBody, Kn as mapFormValuesToUpdateBody, Wa as mapOverallCostLimitsToPeriodStatuses, Ee as mapPromptToCatalogItem, dt as mapPublishConversationResultDto, ft as mapPublishHistoryEntryDto, qn as mapScheduledTaskDtoToFormValues, Vi as mapSearchItem, Qe as mapSkillToCatalogItem, xn as mapStages, _e as mapToolsetCredentials, be as mapToolsetToCatalogItem, Ha as mapUsageDataToDashboard, Ga as mapUserUsageToModelLimits, Hi as mergeCreatedFolderIntoCache, Qn as mergeRunsById, Jr as mergeStages, _n as messageHasStages, v as mimeTypesToAttachmentExtensionLabels, y as mimeTypesToDialFileAcceptTypes, b as mimeTypesToFileAccept, Re as nameFromPath, Ft as navigateToolsetOAuthPopup, z as normalizeDeploymentId, vn as normalizeResponseFormat, ze as normalizeSkillName, ie as normalizeToolsetId, wi as normalizeVirtualPath, Ki as openAnnotationAttachment, It as openToolsetOAuthPopup, me as padTwoDigits, Pa as parseExternalServiceUrl, ja as parseFeaturesData, Ti as parseNewFolderVirtualPath, Ce as parsePromptResourceUrl, Be as parseSkillManifest, Tt as parseSkillManifestDocument, Ye as parseSkillResourceUrl, Ni as prepareCopyItems, va as prepareDownloadDestination, Pi as prepareMoveRenameItems, Jn as prepareScheduledTaskCreateBody, Yn as prepareScheduledTaskUpdateBody, $e as readSkillFileBytes, et as readSkillFilePreviewBytes, tt as readSkillManifest, vt as reconcileFilterTopics, Zi as referenceAttachmentToPdfCanvasContent, bt as resolveCatalogPrimaryAction, Qi as resolveCodeCanvasContent, xe as resolveDeploymentFolder, ji as resolveDialFileApiPath, f as resolveDialFileBucketAndPath, ua as resolveExternalSourceContentType, $i as resolveGroupedVisualizerCanvasContent, ea as resolveHtmlCanvasContent, ta as resolveImageCanvasContent, na as resolveJsonCanvasContent, de as resolveLocalizedText, ra as resolveMarkdownCanvasContent, ct as resolveMcpResourceKind, ia as resolveOoxmlCanvasContent, Ei as resolveOwnerCoords, aa as resolvePdfCanvasContent, p as resolveRelativeDialFilePath, Di as resolveSectionByPath, nt as resolveSkillFileDownloadPath, rt as resolveSkillManifestFileId, oa as resolveTextCanvasContent, ae as resolveToolsetCredentialsLevel, sa as resolveVisualizerCanvasContent, s as safeDecodeURI, c as safeDecodeURIComponent, Jt as sanitizeAnnouncementHtml, Yt as sanitizeAnnouncementMessageHtml, wr as sanitizeFileName, sn as sanitizeFooterHtml, oe as selectToolsetAuthStatus, On as serializePromptExport, zr as shouldRerunGenerationOnEdit, an as shouldWatchForDisplayNameUpdate, Ve as skillFileBytesToBlob, tr as skillFileToAttachment, Tr as splitFileNameExtension, He as startsWithFrontmatterBlock, l as stripSurroundingSlashes, u as stripTrailingSlashes, kt as subscribeToolsetLoginSuccess, fe as toBaseLocale, yn as toOverlayMessages, pt as toPublishEntityType, M as toPublishRuleDto, Sn as toStage, Er as trimFileNameToByteLimit, Oi as unionPathSets, Ue as unpackSkillArchive, Ui as updateEntry, _r as useActiveConversationSync, Bt as useApplicationCredentials, vr as useAsyncConfirmDialog, g as useAttachmentAction, Dr as useAttachmentUpload, S as useAttachmentValidation, wt as useCatalogEditNavigation, Dt as useCatalogItemDetails, zt as useCatalogToolsetCredentials, Fa as useChatSettingsFormConfig, Mr as useConversationExport, Wr as useConversationHandlers, Gr as useConversationImport, yr as useConversationLookupMaps, xr as useConversationPanelItems, Kr as useConversationScroll, Zr as useConversationSources, Xr as useConversationStream, ya as useDialFileListing, wa as useDialFileManager, Ta as useDialFileManagerSections, Ea as useDialFileManagerTabConfig, ba as useDialFileMetadata, xa as useDialFileMutations, Sa as useDialFileSharing, Ca as useDialFileUploadBatch, Ut as useFavoriteEntitiesState, Da as useFileAttachmentPicker, $a as useGridEditingScroll, Sr as useImportFilePicker, Za as useMcpAppHostAdapter, Xa as useMcpAppHostContext, Ya as useMcpAppTools, Cr as useMessageSelectionReply, Tn as useOAuthCallbackCompletion, Qa as useOpenMcpAppCanvas, Ia as usePageFileDrag, Ra as usePanelMaxWidth, zn as usePromptsState, Wt as usePublishFolders, $n as useScheduledTaskRuns, Zn as useScheduledTasks, za as useShareLink, hr as useShareRecipientsCount, pr as useSkillArchiveImport, Vt as useSkillDetailsPanelData, rr as useSkillEditorLoad, ir as useSkillEditorSubmit, ar as useSkillFileActions, sr as useSkillFilePreview, Et as useSkillItemDetails, cr as useSkillsState, Ba as useToolsMenu, Rt as useToolsetLogin, Ar as useTranscribeAudio, Ka as useUsageData, La as useViewportWidth, In as validatePromptContent, Ln as validatePromptDescription, Rn as validatePromptName, er as validateSkillFileBatch, Mi as virtualPathToApiPath, jt as waitForToolsetOAuthResult, ki as withRoutableRootLabels };
|
|
27
|
+
import { SKILL_FILE_UPLOAD_MAX_BYTES as De, SKILL_FOLDER_MARKER as Oe, SKILL_MANIFEST_FILE as ke, SKILL_TEXT_FIELD_MAX_LENGTHS as Ae, SKILL_UPLOAD_MAX_FILES as je, SKILL_UPLOAD_MAX_TOTAL_BYTES as Me, buildSkillFilesPayload as Ne, buildSkillManifest as Pe, buildSkillManifestForSubmit as Fe, buildSkillManifestFromFrontmatter as Ie, getSkillFieldLengthViolations as Le, isSkillFolderMarkerPath as Re, isValidSkillRelativePath as ze, nameFromPath as Be, normalizeSkillName as Ve, parseSkillManifest as He, skillFileBytesToBlob as Ue, skillFolderMarkerParent as We, startsWithFrontmatterBlock as Ge, unpackSkillArchive as Ke } from "./skill/skill.js";
|
|
28
|
+
import { PUBLIC_SKILL_BUCKET as qe, SKILL_LISTING_MAX_PAGES as Je, SKILL_LISTING_PAGE_SIZE as Ye, SKILL_MANIFEST_MAX_BYTES as Xe, SkillSource as Ze, parseSkillResourceUrl as Qe } from "./skill/skill-types.js";
|
|
29
|
+
import { buildSkillContentTree as $e, buildSkillOverview as et, mapSkillToCatalogItem as tt, readSkillFileBytes as nt, readSkillFilePreviewBytes as rt, readSkillManifest as it, resolveSkillFileDownloadPath as at, resolveSkillManifestFileId as ot } from "./catalog/map-skill-to-catalog-item.js";
|
|
30
|
+
import { McpResourceKind as st, buildApplicationMcpUrl as ct, buildConnectApi as lt, buildToolsetMcpUrl as ut, resolveMcpResourceKind as dt } from "./catalog/mcp-endpoint-url.js";
|
|
31
|
+
import { getPublicCatalogEntityFolderPath as ft, isPublicCatalogEntityId as pt, mapPublishConversationResultDto as mt, mapPublishHistoryEntryDto as ht, toPublishEntityType as gt } from "./catalog/publish.js";
|
|
32
|
+
import { deriveAvailableTabIds as _t, deriveFavoriteItems as vt, filterCatalogItemsBySelector as yt, filterHiddenOwnedItems as bt, reconcileFilterTopics as xt } from "./catalog/catalog-derivations.js";
|
|
33
|
+
import { CatalogPrimaryActionType as St, resolveCatalogPrimaryAction as Ct } from "./catalog/catalog-primary-action.js";
|
|
34
|
+
import { getRunnerSchemas as wt, isCustomAppSchema as Tt, isQuickAppSchema as Et } from "./shared/application-schema.js";
|
|
35
|
+
import { useCatalogEditNavigation as Dt } from "./catalog/useCatalogEditNavigation/useCatalogEditNavigation.js";
|
|
36
|
+
import { parseSkillManifestDocument as Ot } from "./skill/skill-manifest.js";
|
|
37
|
+
import { useSkillItemDetails as kt } from "./catalog/useSkillItemDetails.js";
|
|
38
|
+
import { useCatalogItemDetails as At } from "./catalog/useCatalogItemDetails.js";
|
|
39
|
+
import { emitToolsetLoginSuccess as jt, subscribeToolsetLoginSuccess as Mt } from "./shared/toolset-login-events.js";
|
|
40
|
+
import { getToolsetOAuthChannelName as Nt, waitForToolsetOAuthResult as Pt } from "./oauth/handshake.js";
|
|
41
|
+
import { buildToolsetAuthorizeUrl as Ft, getToolsetRedirectUri as It } from "./oauth/authorize-url.js";
|
|
42
|
+
import { initiateOAuthLogin as Lt, navigateToolsetOAuthPopup as Rt, openToolsetOAuthPopup as zt } from "./oauth/popup.js";
|
|
43
|
+
import { ToolsetLoginOutcomeType as Bt, useToolsetLogin as Vt } from "./oauth/useToolsetLogin/useToolsetLogin.js";
|
|
44
|
+
import { useCatalogToolsetCredentials as Ht } from "./catalog/useCatalogToolsetCredentials/useCatalogToolsetCredentials.js";
|
|
45
|
+
import { useApplicationCredentials as Ut } from "./catalog/useApplicationCredentials/useApplicationCredentials.js";
|
|
46
|
+
import { useSkillDetailsPanelData as Wt } from "./catalog/useSkillDetailsPanelData/useSkillDetailsPanelData.js";
|
|
47
|
+
import { FavoriteEntityType as Gt, useFavoriteEntitiesState as Kt } from "./catalog/useFavoriteEntitiesState/useFavoriteEntitiesState.js";
|
|
48
|
+
import { usePublishFolders as qt } from "./catalog/usePublishFolders/usePublishFolders.js";
|
|
49
|
+
import { buildAnnouncementSignature as Jt, hasAnnouncementContent as Yt, hasStructuredAnnouncement as Xt, sanitizeAnnouncementHtml as Zt, sanitizeAnnouncementMessageHtml as Qt } from "./conversation/announcement-message.js";
|
|
50
|
+
import { DEFAULT_GENERATION_CONFLICT_MESSAGE as $t, DEFAULT_GENERATION_PERSISTENCE_ERROR_MESSAGE as en, DEFAULT_STREAM_IDLE_TIMEOUT_MS as tn, GenerationConflictError as nn, GenerationPersistenceError as rn, StreamInterruptedError as an, StreamUpstreamError as on, createChatStreamApi as sn } from "./conversation/create-chat-stream-api.js";
|
|
51
|
+
import { shouldWatchForDisplayNameUpdate as cn } from "./conversation/display-name-watch.js";
|
|
52
|
+
import { formatAppVersion as ln, sanitizeFooterHtml as un } from "./conversation/footer-message.js";
|
|
53
|
+
import { getModelIdFromConversationId as dn } from "./conversation/get-model-id-from-conversation-id.js";
|
|
54
|
+
import { getTimeOfDayGreeting as fn } from "./conversation/greeting.js";
|
|
55
|
+
import { createDeploymentChangedMessage as pn } from "./conversation/message-factory.js";
|
|
56
|
+
import { getFormSchemaToolSyncKey as mn, getLastDeploymentId as hn, getLastUserMessageToolConfiguration as gn, getLatestToolConfiguration as _n, getToolConfigurationFromFormSchema as vn, isMessageStreaming as yn, messageHasStages as bn, normalizeResponseFormat as xn } from "./conversation/message-utils.js";
|
|
57
|
+
import { toOverlayMessages as Sn } from "./conversation/overlay-messages.js";
|
|
58
|
+
import { getQuickAppConversationStarters as Cn } from "./conversation/quick-app-conversation-starters.js";
|
|
59
|
+
import { mapStages as wn, toStage as Tn } from "./conversation/stage.js";
|
|
60
|
+
import { getStarterPopulateText as En, getStartersFromSchema as Dn } from "./conversation/starter-option.js";
|
|
61
|
+
import { useOAuthCallbackCompletion as On } from "./oauth/useOAuthCallbackCompletion/useOAuthCallbackCompletion.js";
|
|
62
|
+
import { buildPromptExportEnvelope as kn, buildPromptExportFileName as An, serializePromptExport as jn } from "./prompt/export-prompt.js";
|
|
63
|
+
import { PROMPT_CONTENT_MAX_LENGTH as Mn, PROMPT_COUNTER_ANNOUNCE_THRESHOLD as Nn, PROMPT_DESCRIPTION_MAX_LENGTH as Pn, PROMPT_NAME_MAX_LENGTH as Fn, PromptFieldError as In, buildPromptPath as Ln, getRemainingCharacters as Rn, validatePromptContent as zn, validatePromptDescription as Bn, validatePromptName as Vn } from "./prompt/prompt.js";
|
|
64
|
+
import { usePromptsState as Hn } from "./prompt/usePromptsState/usePromptsState.js";
|
|
65
|
+
import { UnsupportedTriggerReason as Un } from "./scheduled-task/scheduled-task-mapping.js";
|
|
66
|
+
import { ScheduledTaskTriggerDescriptionKind as Wn, describeScheduledTaskTrigger as Gn } from "./scheduled-task/scheduled-task-description.js";
|
|
67
|
+
import { apSchedulerDayToJsDay as Kn, jsDayToApSchedulerDay as qn } from "./shared/cron-weekday.js";
|
|
68
|
+
import { mapFormValuesToCreateBody as Jn, mapFormValuesToUpdateBody as Yn, mapScheduledTaskDtoToFormValues as Xn } from "./scheduled-task/scheduled-task-trigger.js";
|
|
69
|
+
import { prepareScheduledTaskCreateBody as Zn, prepareScheduledTaskUpdateBody as Qn } from "./scheduled-task/scheduled-task-preparation.js";
|
|
70
|
+
import { createScheduledTasksApiClient as $n } from "./scheduled-task/scheduled-tasks-api-client.js";
|
|
71
|
+
import { useScheduledTasks as er } from "./scheduled-task/use-scheduled-tasks.js";
|
|
72
|
+
import { mergeRunsById as tr, useScheduledTaskRuns as nr } from "./scheduled-task/use-scheduled-task-runs.js";
|
|
73
|
+
import { validateSkillFileBatch as rr } from "./skill/skill-file-batch-validation.js";
|
|
74
|
+
import { skillFileToAttachment as ir } from "./skill/skill-file-preview.js";
|
|
75
|
+
import { SkillEditorLoadState as ar, useSkillEditorLoad as or } from "./skill/useSkillEditorLoad.js";
|
|
76
|
+
import { useSkillEditorSubmit as sr } from "./skill/useSkillEditorSubmit.js";
|
|
77
|
+
import { useSkillFileActions as cr } from "./skill/useSkillFileActions.js";
|
|
78
|
+
import { SkillPreviewErrorKind as lr, useSkillFilePreview as ur } from "./skill/useSkillFilePreview.js";
|
|
79
|
+
import { useSkillsState as dr } from "./skill/useSkillsState/useSkillsState.js";
|
|
80
|
+
import { SkillArchiveImportErrorKind as fr, SkillArchiveImportStatus as pr, SkillArchiveSelectionRejectionReason as mr, classifySkillArchiveImportError as hr, useSkillArchiveImport as gr } from "./skill/useSkillArchiveImport/useSkillArchiveImport.js";
|
|
81
|
+
import { RecipientsCountStatus as _r, useShareRecipientsCount as vr } from "./useShareRecipientsCount/useShareRecipientsCount.js";
|
|
82
|
+
import { deriveConversationRowActionState as yr } from "./conversation/deriveConversationRowActionState/deriveConversationRowActionState.js";
|
|
83
|
+
import { useActiveConversationSync as br } from "./conversation/useActiveConversationSync/useActiveConversationSync.js";
|
|
84
|
+
import { useAsyncConfirmDialog as xr } from "./conversation/useAsyncConfirmDialog/useAsyncConfirmDialog.js";
|
|
85
|
+
import { useConversationLookupMaps as Sr } from "./conversation/useConversationLookupMaps/useConversationLookupMaps.js";
|
|
86
|
+
import { getConversationSource as Cr, useConversationPanelItems as wr } from "./conversation/useConversationPanelItems/useConversationPanelItems.js";
|
|
87
|
+
import { useImportFilePicker as Tr } from "./conversation/useImportFilePicker/useImportFilePicker.js";
|
|
88
|
+
import { useMessageSelectionReply as Er } from "./conversation/useMessageSelectionReply/useMessageSelectionReply.js";
|
|
89
|
+
import { sanitizeFileName as Dr, splitFileNameExtension as Or, trimFileNameToByteLimit as kr } from "./files/file-name.js";
|
|
90
|
+
import { useAttachmentUpload as Ar } from "./conversation/useAttachmentUpload/useAttachmentUpload.js";
|
|
91
|
+
import { AudioTranscriptionError as jr, AudioTranscriptionErrorReason as Mr } from "./conversation/useTranscribeAudio/audio-transcription-error.js";
|
|
92
|
+
import { useTranscribeAudio as Nr } from "./conversation/useTranscribeAudio/useTranscribeAudio.js";
|
|
93
|
+
import { DEFAULT_MAX_ARCHIVE_BYTES as Pr, useConversationExport as Fr } from "./conversation/useConversationExport/useConversationExport.js";
|
|
94
|
+
import { attachmentToDto as Ir, attachmentsToDtos as Lr } from "./conversation/useConversationHandlers/attachment-to-dto.js";
|
|
95
|
+
import { createMessagePair as Rr } from "./conversation/useConversationHandlers/message-factory.js";
|
|
96
|
+
import { hasActiveToolConfig as zr, isAnswerIncomplete as Br, isMessageChanged as Vr, shouldRerunGenerationOnEdit as Hr } from "./conversation/useConversationHandlers/message-utils.js";
|
|
97
|
+
import { getStarterConversationText as Ur, getStarterDisplayText as Wr, getStarterSubmitText as Gr } from "./conversation/useConversationHandlers/starter-option.js";
|
|
98
|
+
import { getConversationPath as Kr } from "./conversation/useConversationStream/conversation-path.js";
|
|
99
|
+
import { useConversationHandlers as qr } from "./conversation/useConversationHandlers/useConversationHandlers.js";
|
|
100
|
+
import { useConversationImport as Jr } from "./conversation/useConversationImport/useConversationImport.js";
|
|
101
|
+
import { useConversationScroll as Yr } from "./conversation/useConversationScroll/useConversationScroll.js";
|
|
102
|
+
import { applyChunkToMessages as Xr, mergeStages as Zr } from "./conversation/useConversationStream/apply-chunk.js";
|
|
103
|
+
import { isAwaitingGenerationResume as Qr } from "./conversation/useConversationStream/generation-resume.js";
|
|
104
|
+
import { useConversationStream as $r } from "./conversation/useConversationStream/useConversationStream.js";
|
|
105
|
+
import { useConversationSources as ei } from "./conversation-sources/useConversationSources/useConversationSources.js";
|
|
106
|
+
import { DialFilesApiUploadMode as ti } from "./files/dial-files-api.js";
|
|
107
|
+
import { FileManagerNotificationReason as ni, FileNameValidationErrorReason as ri, FileOperationKind as ii } from "./files/dial-file-manager.types.js";
|
|
108
|
+
import { COLUMNS_WITHOUT_AUTHOR as ai, COLUMNS_WITH_AUTHOR as oi, CORE_PERMISSION_MAP as si, DATE_OPTIONS as ci, DIAL_FILE_MANAGER_SECTION_TABS as li, PATH_SEPARATOR_REGEXP as ui, RESERVED_MARKER_NAME as di, UPLOAD_CONCURRENCY as fi } from "./files/dial-file-manager.model.js";
|
|
109
|
+
import { DialFileManagerActionProfile as pi, DialFileManagerVariant as mi, deriveActionProfile as hi } from "./files/file-manager-variant.js";
|
|
110
|
+
import { buildSharedItemVirtualPath as gi, dialCorePathToRelative as _i, findDialFileByPath as vi, findFolderByVirtualPath as yi, formatOperationFolderName as bi, getVirtualPathName as xi, hasDialFileWritePermission as Si, hasForbiddenNameSymbols as Ci, hasSamePaths as wi, isCopyMoveDuplicateAllowed as Ti, isShareActionsAllowed as Ei, normalizeVirtualPath as Di, parseNewFolderVirtualPath as Oi, resolveOwnerCoords as ki, resolveSectionByPath as Ai, unionPathSets as ji, withRoutableRootLabels as Mi } from "./files/dial-file-manager-path.util.js";
|
|
111
|
+
import { getParentFolderPath as Ni, resolveDialFileApiPath as Pi, virtualPathToApiPath as Fi } from "./files/resolve-dial-file-api-path.js";
|
|
112
|
+
import { prepareCopyItems as Ii, prepareMoveRenameItems as Li } from "./files/dial-file-manager-copy-move.util.js";
|
|
113
|
+
import { buildFromCache as Ri, fetchByTab as zi, fetchForSearch as Bi, findFirstSuccessfulCopyMoveItem as Vi, mapCorePermissions as Hi, mapFileMetadataToDialFile as Ui, mapSearchItem as Wi, mergeCreatedFolderIntoCache as Gi, updateEntry as Ki } from "./files/dial-file-manager-mapping.util.js";
|
|
114
|
+
import { createFilesApiClient as qi } from "./files/create-files-api.js";
|
|
115
|
+
import { createUploadFileWithProgress as Ji } from "./files/create-upload-file-with-progress.js";
|
|
116
|
+
import { openAnnotationAttachment as Yi } from "./files/annotation.js";
|
|
117
|
+
import { annotationToOoxmlCanvasContent as Xi, annotationToPdfCanvasContent as Zi, clearAttachmentCache as Qi, hasAttachmentTextSource as $i, referenceAttachmentToPdfCanvasContent as ea, resolveCodeCanvasContent as ta, resolveGroupedVisualizerCanvasContent as na, resolveHtmlCanvasContent as ra, resolveImageCanvasContent as ia, resolveJsonCanvasContent as aa, resolveMarkdownCanvasContent as oa, resolveOoxmlCanvasContent as sa, resolvePdfCanvasContent as ca, resolveTextCanvasContent as la, resolveVisualizerCanvasContent as ua } from "./files/attachment-canvas.js";
|
|
118
|
+
import { getUrlFileName as da, isExternalSourcePreviewable as fa, resolveExternalSourceContentType as pa } from "./files/source-content.js";
|
|
119
|
+
import { annotationToDisplayAttachment as ma, attachmentDtoToDisplayAttachment as ha, attachmentDtosToDisplayAttachments as ga } from "./files/attachment-dto-to-display.js";
|
|
120
|
+
import { dialFileToAttachment as _a, dialFilesToAttachments as va, dialFolderPathToAttachment as ya } from "./files/dial-file-to-attachment.js";
|
|
121
|
+
import { DownloadDestinationType as ba } from "./files/download-destination.js";
|
|
122
|
+
import { prepareDownloadDestination as xa } from "./files/prepare-download-destination.js";
|
|
123
|
+
import { useDialFileListing as Sa } from "./files/useDialFileListing/useDialFileListing.js";
|
|
124
|
+
import { useDialFileMetadata as Ca } from "./files/useDialFileMetadata/useDialFileMetadata.js";
|
|
125
|
+
import { useDialFileMutations as wa } from "./files/useDialFileMutations/useDialFileMutations.js";
|
|
126
|
+
import { useDialFileSharing as Ta } from "./files/useDialFileSharing/useDialFileSharing.js";
|
|
127
|
+
import { useDialFileUploadBatch as Ea } from "./files/useDialFileUploadBatch/useDialFileUploadBatch.js";
|
|
128
|
+
import { useDialFileManager as Da } from "./files/useDialFileManager/useDialFileManager.js";
|
|
129
|
+
import { useDialFileManagerSections as Oa } from "./files/useDialFileManagerSections/useDialFileManagerSections.js";
|
|
130
|
+
import { useDialFileManagerTabConfig as ka } from "./files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.js";
|
|
131
|
+
import { useFileAttachmentPicker as Aa } from "./files/useFileAttachmentPicker/useFileAttachmentPicker.js";
|
|
132
|
+
import { getBrowserTimezone as ja } from "./shared/browser-timezone.js";
|
|
133
|
+
import { isValidAbsoluteUrl as Ma, isValidFeaturesData as Na, parseFeaturesData as Pa } from "./shared/custom-apps.js";
|
|
134
|
+
import { buildExternalServiceScopeId as Fa, getExternalServiceFallbackName as Ia, parseExternalServiceUrl as La } from "./shared/external-services.js";
|
|
135
|
+
import { useChatSettingsFormConfig as Ra } from "./useChatSettingsFormConfig/useChatSettingsFormConfig.js";
|
|
136
|
+
import { usePageFileDrag as za } from "./usePageFileDrag/usePageFileDrag.js";
|
|
137
|
+
import { useViewportWidth as Ba } from "./useViewportWidth/useViewportWidth.js";
|
|
138
|
+
import { usePanelMaxWidth as Va } from "./usePanelMaxWidth/usePanelMaxWidth.js";
|
|
139
|
+
import { useShareLink as Ha } from "./useShareLink/useShareLink.js";
|
|
140
|
+
import { useToolsMenu as Ua } from "./useToolsMenu/useToolsMenu.js";
|
|
141
|
+
import { USAGE_DATA_I18N_KEYS as Wa, mapUsageDataToDashboard as Ga } from "./usage/map-usage-data-to-dashboard.js";
|
|
142
|
+
import { USAGE_MODEL_LIMITS_I18N_KEYS as Ka, mapOverallCostLimitsToPeriodStatuses as qa, mapUserUsageToModelLimits as Ja } from "./usage/map-user-usage-to-model-limits.js";
|
|
143
|
+
import { useUsageData as Ya } from "./usage/useUsageData/useUsageData.js";
|
|
144
|
+
import { McpAppResourceFetchError as Xa, createMcpAppsApiClient as Za } from "./mcp-apps/mcp-apps-api-client.js";
|
|
145
|
+
import { useMcpAppTools as Qa } from "./mcp-apps/useMcpAppTools/useMcpAppTools.js";
|
|
146
|
+
import { useMcpAppHostContext as $a } from "./mcp-apps/useMcpAppHostContext/useMcpAppHostContext.js";
|
|
147
|
+
import { useMcpAppHostAdapter as eo } from "./mcp-apps/useMcpAppHostAdapter/useMcpAppHostAdapter.js";
|
|
148
|
+
import { useOpenMcpAppCanvas as to } from "./mcp-apps/useOpenMcpAppCanvas/useOpenMcpAppCanvas.js";
|
|
149
|
+
import { useGridEditingScroll as no } from "@epam/ai-dial-chat-shared";
|
|
150
|
+
export { x as AttachmentValidationErrorReason, jr as AudioTranscriptionError, Mr as AudioTranscriptionErrorReason, B as AuthenticationType, ai as COLUMNS_WITHOUT_AUTHOR, oi as COLUMNS_WITH_AUTHOR, si as CORE_PERMISSION_MAP, St as CatalogPrimaryActionType, T as ConversationExportMode, E as ConversationTransferErrorCode, D as ConversationTransferWarningCode, ci as DATE_OPTIONS, $t as DEFAULT_GENERATION_CONFLICT_MESSAGE, en as DEFAULT_GENERATION_PERSISTENCE_ERROR_MESSAGE, Pr as DEFAULT_MAX_ARCHIVE_BYTES, tn as DEFAULT_STREAM_IDLE_TIMEOUT_MS, li as DIAL_FILE_MANAGER_SECTION_TABS, pi as DialFileManagerActionProfile, mi as DialFileManagerVariant, ti as DialFilesApiUploadMode, ba as DownloadDestinationType, k as EXPORT_APP_NAME, O as ExportFileNameKind, Gt as FavoriteEntityType, ni as FileManagerNotificationReason, ri as FileNameValidationErrorReason, ii as FileOperationKind, nn as GenerationConflictError, rn as GenerationPersistenceError, Xa as McpAppResourceFetchError, st as McpResourceKind, W as OAuthResourceKind, ui as PATH_SEPARATOR_REGEXP, Mn as PROMPT_CONTENT_MAX_LENGTH, Nn as PROMPT_COUNTER_ANNOUNCE_THRESHOLD, Pn as PROMPT_DESCRIPTION_MAX_LENGTH, Fn as PROMPT_NAME_MAX_LENGTH, qe as PUBLIC_SKILL_BUCKET, In as PromptFieldError, Se as PromptSource, di as RESERVED_MARKER_NAME, _r as RecipientsCountStatus, De as SKILL_FILE_UPLOAD_MAX_BYTES, Oe as SKILL_FOLDER_MARKER, Je as SKILL_LISTING_MAX_PAGES, Ye as SKILL_LISTING_PAGE_SIZE, ke as SKILL_MANIFEST_FILE, Xe as SKILL_MANIFEST_MAX_BYTES, Ae as SKILL_TEXT_FIELD_MAX_LENGTHS, je as SKILL_UPLOAD_MAX_FILES, Me as SKILL_UPLOAD_MAX_TOTAL_BYTES, Wn as ScheduledTaskTriggerDescriptionKind, fr as SkillArchiveImportErrorKind, pr as SkillArchiveImportStatus, mr as SkillArchiveSelectionRejectionReason, ar as SkillEditorLoadState, lr as SkillPreviewErrorKind, Ze as SkillSource, an as StreamInterruptedError, on as StreamUpstreamError, G as TOOLSET_REDIRECT_STATE_KEY, K as ToolsetAuthStatus, q as ToolsetAuthTypes, J as ToolsetCredentialsLevel, Bt as ToolsetLoginOutcomeType, Y as ToolsetOAuthCallbackQuery, X as ToolsetOAuthChannelControlType, Z as ToolsetOAuthFailureReason, Q as ToolsetOAuthInitiationResultType, $ as ToolsetOAuthResultType, fi as UPLOAD_CONCURRENCY, Wa as USAGE_DATA_I18N_KEYS, Ka as USAGE_MODEL_LIMITS_I18N_KEYS, Un as UnsupportedTriggerReason, ee as WithLogin, ma as annotationToDisplayAttachment, Xi as annotationToOoxmlCanvasContent, Zi as annotationToPdfCanvasContent, Kn as apSchedulerDayToJsDay, se as appendLocaleCode, Xr as applyChunkToMessages, ha as attachmentDtoToDisplayAttachment, ga as attachmentDtosToDisplayAttachments, Ir as attachmentToDto, Lr as attachmentsToDtos, ce as buildAdditionalLocaleOptions, Jt as buildAnnouncementSignature, ct as buildApplicationMcpUrl, N as buildChatCompletionsUrl, lt as buildConnectApi, P as buildDeploymentConnectApi, Fa as buildExternalServiceScopeId, Ri as buildFromCache, kn as buildPromptExportEnvelope, An as buildPromptExportFileName, we as buildPromptOverview, Ln as buildPromptPath, V as buildResetFields, F as buildResponsesUrl, gi as buildSharedItemVirtualPath, $e as buildSkillContentTree, Ne as buildSkillFilesPayload, Pe as buildSkillManifest, Fe as buildSkillManifestForSubmit, Ie as buildSkillManifestFromFrontmatter, et as buildSkillOverview, Ft as buildToolsetAuthorizeUrl, ut as buildToolsetMcpUrl, hr as classifySkillArchiveImportError, Qi as clearAttachmentCache, le as composeLocalePayload, sn as createChatStreamApi, i as createCsrfMiddleware, pn as createDeploymentChangedMessage, qi as createFilesApiClient, Za as createMcpAppsApiClient, Rr as createMessagePair, j as createPublishApiClient, $n as createScheduledTasksApiClient, a as createUnauthorizedMiddleware, Ji as createUploadFileWithProgress, I as decodeDeploymentId, te as decodeToolsetId, ue as decomposeLocalizedFields, hi as deriveActionProfile, _t as deriveAvailableTabIds, yr as deriveConversationRowActionState, vt as deriveFavoriteItems, Gn as describeScheduledTaskTrigger, _i as dialCorePathToRelative, _a as dialFileToAttachment, va as dialFilesToAttachments, ya as dialFolderPathToAttachment, m as downloadAttachment, jt as emitToolsetLoginSuccess, L as encodeDeploymentId, ne as encodeToolsetId, zi as fetchByTab, Bi as fetchForSearch, yt as filterCatalogItemsBySelector, bt as filterHiddenOwnedItems, R as findDeploymentByIdOrReference, vi as findDialFileByPath, Vi as findFirstSuccessfulCopyMoveItem, yi as findFolderByVirtualPath, ln as formatAppVersion, pe as formatCalendarDate, C as formatDateYM, w as formatDateYMD, bi as formatOperationFolderName, A as formatQuotedNameList, e as getApiErrorDetails, t as getApiErrorMessage, n as getApiErrorStatus, ja as getBrowserTimezone, Kr as getConversationPath, Cr as getConversationSource, Ia as getExternalServiceFallbackName, mn as getFormSchemaToolSyncKey, hn as getLastDeploymentId, gn as getLastUserMessageToolConfiguration, _n as getLatestToolConfiguration, dn as getModelIdFromConversationId, Ni as getParentFolderPath, ft as getPublicCatalogEntityFolderPath, Cn as getQuickAppConversationStarters, Rn as getRemainingCharacters, wt as getRunnerSchemas, Le as getSkillFieldLengthViolations, Ur as getStarterConversationText, Wr as getStarterDisplayText, En as getStarterPopulateText, Gr as getStarterSubmitText, Dn as getStartersFromSchema, fn as getTimeOfDayGreeting, vn as getToolConfigurationFromFormSchema, Nt as getToolsetOAuthChannelName, It as getToolsetRedirectUri, da as getUrlFileName, xi as getVirtualPathName, zr as hasActiveToolConfig, Yt as hasAnnouncementContent, $i as hasAttachmentTextSource, Si as hasDialFileWritePermission, Ci as hasForbiddenNameSymbols, wi as hasSamePaths, Xt as hasStructuredAnnouncement, o as includesIgnoreCase, Lt as initiateOAuthLogin, Br as isAnswerIncomplete, Qr as isAwaitingGenerationResume, r as isConversationNotFoundError, Ti as isCopyMoveDuplicateAllowed, Tt as isCustomAppSchema, _ as isDialFileAcceptType, d as isDialFileId, h as isDownloadableAttachment, fa as isExternalSourcePreviewable, Vr as isMessageChanged, yn as isMessageStreaming, Te as isOrganisationPromptItem, pt as isPublicCatalogEntityId, re as isPublicToolsetId, Et as isQuickAppSchema, Ei as isShareActionsAllowed, Re as isSkillFolderMarkerPath, Ma as isValidAbsoluteUrl, Na as isValidFeaturesData, ze as isValidSkillRelativePath, qn as jsDayToApSchedulerDay, Hi as mapCorePermissions, he as mapDeploymentDetailsDtoToEntityDetails, U as mapDeploymentLimitsDtoToCatalogLimits, H as mapDeploymentLimitsToInput, ve as mapDeploymentToCatalogItem, ye as mapDeploymentToolsetCredentials, ge as mapEntityDetailsToCatalogDetails, Ui as mapFileMetadataToDialFile, Jn as mapFormValuesToCreateBody, Yn as mapFormValuesToUpdateBody, qa as mapOverallCostLimitsToPeriodStatuses, Ee as mapPromptToCatalogItem, mt as mapPublishConversationResultDto, ht as mapPublishHistoryEntryDto, Xn as mapScheduledTaskDtoToFormValues, Wi as mapSearchItem, tt as mapSkillToCatalogItem, wn as mapStages, _e as mapToolsetCredentials, be as mapToolsetToCatalogItem, Ga as mapUsageDataToDashboard, Ja as mapUserUsageToModelLimits, Gi as mergeCreatedFolderIntoCache, tr as mergeRunsById, Zr as mergeStages, bn as messageHasStages, v as mimeTypesToAttachmentExtensionLabels, y as mimeTypesToDialFileAcceptTypes, b as mimeTypesToFileAccept, Be as nameFromPath, Rt as navigateToolsetOAuthPopup, z as normalizeDeploymentId, xn as normalizeResponseFormat, Ve as normalizeSkillName, ie as normalizeToolsetId, Di as normalizeVirtualPath, Yi as openAnnotationAttachment, zt as openToolsetOAuthPopup, me as padTwoDigits, La as parseExternalServiceUrl, Pa as parseFeaturesData, Oi as parseNewFolderVirtualPath, Ce as parsePromptResourceUrl, He as parseSkillManifest, Ot as parseSkillManifestDocument, Qe as parseSkillResourceUrl, Ii as prepareCopyItems, xa as prepareDownloadDestination, Li as prepareMoveRenameItems, Zn as prepareScheduledTaskCreateBody, Qn as prepareScheduledTaskUpdateBody, nt as readSkillFileBytes, rt as readSkillFilePreviewBytes, it as readSkillManifest, xt as reconcileFilterTopics, ea as referenceAttachmentToPdfCanvasContent, Ct as resolveCatalogPrimaryAction, ta as resolveCodeCanvasContent, xe as resolveDeploymentFolder, Pi as resolveDialFileApiPath, f as resolveDialFileBucketAndPath, pa as resolveExternalSourceContentType, na as resolveGroupedVisualizerCanvasContent, ra as resolveHtmlCanvasContent, ia as resolveImageCanvasContent, aa as resolveJsonCanvasContent, de as resolveLocalizedText, oa as resolveMarkdownCanvasContent, dt as resolveMcpResourceKind, sa as resolveOoxmlCanvasContent, ki as resolveOwnerCoords, ca as resolvePdfCanvasContent, p as resolveRelativeDialFilePath, Ai as resolveSectionByPath, at as resolveSkillFileDownloadPath, ot as resolveSkillManifestFileId, la as resolveTextCanvasContent, ae as resolveToolsetCredentialsLevel, ua as resolveVisualizerCanvasContent, s as safeDecodeURI, c as safeDecodeURIComponent, Zt as sanitizeAnnouncementHtml, Qt as sanitizeAnnouncementMessageHtml, Dr as sanitizeFileName, un as sanitizeFooterHtml, oe as selectToolsetAuthStatus, jn as serializePromptExport, Hr as shouldRerunGenerationOnEdit, cn as shouldWatchForDisplayNameUpdate, Ue as skillFileBytesToBlob, ir as skillFileToAttachment, We as skillFolderMarkerParent, Or as splitFileNameExtension, Ge as startsWithFrontmatterBlock, l as stripSurroundingSlashes, u as stripTrailingSlashes, Mt as subscribeToolsetLoginSuccess, fe as toBaseLocale, Sn as toOverlayMessages, gt as toPublishEntityType, M as toPublishRuleDto, Tn as toStage, kr as trimFileNameToByteLimit, ji as unionPathSets, Ke as unpackSkillArchive, Ki as updateEntry, br as useActiveConversationSync, Ut as useApplicationCredentials, xr as useAsyncConfirmDialog, g as useAttachmentAction, Ar as useAttachmentUpload, S as useAttachmentValidation, Dt as useCatalogEditNavigation, At as useCatalogItemDetails, Ht as useCatalogToolsetCredentials, Ra as useChatSettingsFormConfig, Fr as useConversationExport, qr as useConversationHandlers, Jr as useConversationImport, Sr as useConversationLookupMaps, wr as useConversationPanelItems, Yr as useConversationScroll, ei as useConversationSources, $r as useConversationStream, Sa as useDialFileListing, Da as useDialFileManager, Oa as useDialFileManagerSections, ka as useDialFileManagerTabConfig, Ca as useDialFileMetadata, wa as useDialFileMutations, Ta as useDialFileSharing, Ea as useDialFileUploadBatch, Kt as useFavoriteEntitiesState, Aa as useFileAttachmentPicker, no as useGridEditingScroll, Tr as useImportFilePicker, eo as useMcpAppHostAdapter, $a as useMcpAppHostContext, Qa as useMcpAppTools, Er as useMessageSelectionReply, On as useOAuthCallbackCompletion, to as useOpenMcpAppCanvas, za as usePageFileDrag, Va as usePanelMaxWidth, Hn as usePromptsState, qt as usePublishFolders, nr as useScheduledTaskRuns, er as useScheduledTasks, Ha as useShareLink, vr as useShareRecipientsCount, gr as useSkillArchiveImport, Wt as useSkillDetailsPanelData, or as useSkillEditorLoad, sr as useSkillEditorSubmit, cr as useSkillFileActions, ur as useSkillFilePreview, kt as useSkillItemDetails, dr as useSkillsState, Ua as useToolsMenu, Vt as useToolsetLogin, Nr as useTranscribeAudio, Ya as useUsageData, Ba as useViewportWidth, zn as validatePromptContent, Bn as validatePromptDescription, Vn as validatePromptName, rr as validateSkillFileBatch, Fi as virtualPathToApiPath, Pt as waitForToolsetOAuthResult, Mi as withRoutableRootLabels };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epam/ai-dial-chat-hooks",
|
|
3
3
|
"description": "Framework-level React hooks extracted from AI DIAL Chat for building custom chat interfaces",
|
|
4
|
-
"version": "1.2.0-dev.
|
|
4
|
+
"version": "1.2.0-dev.276",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./index.js",
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
}
|
|
112
112
|
},
|
|
113
113
|
"dependencies": {
|
|
114
|
-
"@epam/ai-dial-chat-api-client": "1.2.0-dev.
|
|
114
|
+
"@epam/ai-dial-chat-api-client": "1.2.0-dev.276",
|
|
115
115
|
"dompurify": "3.4.16",
|
|
116
116
|
"fflate": "^0.8.3",
|
|
117
117
|
"lru-cache": "^10.4.3",
|
|
@@ -120,21 +120,21 @@
|
|
|
120
120
|
},
|
|
121
121
|
"peerDependencies": {
|
|
122
122
|
"react": "^19.2.8",
|
|
123
|
-
"@epam/ai-dial-attachment-canvas": "1.2.0-dev.
|
|
124
|
-
"@epam/ai-dial-attachment-input": "1.2.0-dev.
|
|
125
|
-
"@epam/ai-dial-catalog": "1.2.0-dev.
|
|
126
|
-
"@epam/ai-dial-chat-overlay": "1.2.0-dev.
|
|
127
|
-
"@epam/ai-dial-chat-shared": "1.2.0-dev.
|
|
128
|
-
"@epam/ai-dial-mcp-apps": "1.2.0-dev.
|
|
129
|
-
"@epam/ai-dial-publish-panel": "1.2.0-dev.
|
|
130
|
-
"@epam/ai-dial-quotations": "1.2.0-dev.
|
|
131
|
-
"@epam/ai-dial-react-file-manager": "^0.3.0-dev.
|
|
132
|
-
"@epam/ai-dial-scheduled-tasks": "1.2.0-dev.
|
|
133
|
-
"@epam/ai-dial-share": "1.2.0-dev.
|
|
134
|
-
"@epam/ai-dial-skill-editor": "1.2.0-dev.
|
|
135
|
-
"@epam/ai-dial-source-panel": "1.2.0-dev.
|
|
123
|
+
"@epam/ai-dial-attachment-canvas": "1.2.0-dev.276",
|
|
124
|
+
"@epam/ai-dial-attachment-input": "1.2.0-dev.276",
|
|
125
|
+
"@epam/ai-dial-catalog": "1.2.0-dev.276",
|
|
126
|
+
"@epam/ai-dial-chat-overlay": "1.2.0-dev.276",
|
|
127
|
+
"@epam/ai-dial-chat-shared": "1.2.0-dev.276",
|
|
128
|
+
"@epam/ai-dial-mcp-apps": "1.2.0-dev.276",
|
|
129
|
+
"@epam/ai-dial-publish-panel": "1.2.0-dev.276",
|
|
130
|
+
"@epam/ai-dial-quotations": "1.2.0-dev.276",
|
|
131
|
+
"@epam/ai-dial-react-file-manager": "^0.3.0-dev.24",
|
|
132
|
+
"@epam/ai-dial-scheduled-tasks": "1.2.0-dev.276",
|
|
133
|
+
"@epam/ai-dial-share": "1.2.0-dev.276",
|
|
134
|
+
"@epam/ai-dial-skill-editor": "1.2.0-dev.276",
|
|
135
|
+
"@epam/ai-dial-source-panel": "1.2.0-dev.276",
|
|
136
136
|
"@epam/ai-dial-ui-kit": "^0.15.0-dev.36",
|
|
137
|
-
"@epam/ai-dial-usage-dashboard": "1.2.0-dev.
|
|
137
|
+
"@epam/ai-dial-usage-dashboard": "1.2.0-dev.276",
|
|
138
138
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
139
139
|
"@epam/pdf-highlighter-kit": "^0.0.19",
|
|
140
140
|
"@mcp-ui/client": "^7.1.1"
|
|
@@ -43,12 +43,12 @@ var c = new Set([
|
|
|
43
43
|
trigger: t,
|
|
44
44
|
model: e.modelId,
|
|
45
45
|
prompt: e.prompt.trim(),
|
|
46
|
-
...e.
|
|
46
|
+
...e.skillUrls?.length ? { skillUrls: [...new Set(e.skillUrls)] } : {},
|
|
47
47
|
...n ? { description: n } : {}
|
|
48
48
|
};
|
|
49
49
|
}, p = (e) => ({
|
|
50
50
|
...f(e),
|
|
51
|
-
|
|
51
|
+
skillUrls: [...new Set(e.skillUrls ?? [])]
|
|
52
52
|
}), m = (t) => {
|
|
53
53
|
let n = new Date(t);
|
|
54
54
|
return `${n.getFullYear()}-${e(n.getMonth() + 1)}-${e(n.getDate())}T${e(n.getHours())}:${e(n.getMinutes())}`;
|
|
@@ -84,7 +84,7 @@ var c = new Set([
|
|
|
84
84
|
...m ? { dayOfMonth: m } : {}
|
|
85
85
|
};
|
|
86
86
|
}, _ = (e) => {
|
|
87
|
-
if (!e.model || typeof e.prompt != "string" || !e.prompt.trim() && !e.
|
|
87
|
+
if (!e.model || typeof e.prompt != "string" || !e.prompt.trim() && !e.skillUrls?.length) return {
|
|
88
88
|
ok: !1,
|
|
89
89
|
reason: t.MissingRequiredFields
|
|
90
90
|
};
|
|
@@ -97,7 +97,7 @@ var c = new Set([
|
|
|
97
97
|
displayName: e.displayName,
|
|
98
98
|
modelId: e.model,
|
|
99
99
|
prompt: e.prompt,
|
|
100
|
-
...
|
|
100
|
+
skillUrls: [...new Set(e.skillUrls ?? [])],
|
|
101
101
|
...e.description ? { description: e.description } : {}
|
|
102
102
|
};
|
|
103
103
|
if (i) return {
|
package/skill/skill-archive.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { inferMimeTypeFromPath as
|
|
3
|
-
import { unzipSync as
|
|
1
|
+
import { SKILL_FOLDER_MARKER as e, nameFromPath as t } from "./skill.js";
|
|
2
|
+
import { inferMimeTypeFromPath as n } from "@epam/ai-dial-chat-shared";
|
|
3
|
+
import { unzipSync as r } from "fflate";
|
|
4
4
|
//#region src/skill/skill-archive.ts
|
|
5
|
-
var
|
|
5
|
+
var i = "__MACOSX/", a = ".DS_Store", o = (n) => n.endsWith("/") || n.startsWith(i) || t(n) === a || t(n) === e, s = (e) => new Promise((t, n) => {
|
|
6
6
|
let r = new FileReader();
|
|
7
7
|
r.onload = () => t(new Uint8Array(r.result)), r.onerror = () => n(r.error), r.readAsArrayBuffer(e);
|
|
8
|
-
}),
|
|
9
|
-
let i =
|
|
10
|
-
return Object.entries(i).flatMap(([
|
|
11
|
-
let i =
|
|
12
|
-
return
|
|
8
|
+
}), c = async (e) => {
|
|
9
|
+
let i = r(await s(e));
|
|
10
|
+
return Object.entries(i).flatMap(([e, r]) => {
|
|
11
|
+
let i = e.replace(/\\/g, "/");
|
|
12
|
+
return o(i) ? [] : [{
|
|
13
13
|
path: i,
|
|
14
|
-
file: new File([r],
|
|
14
|
+
file: new File([r], t(i), { type: n(i) ?? "" })
|
|
15
15
|
}];
|
|
16
16
|
});
|
|
17
17
|
};
|
|
18
18
|
//#endregion
|
|
19
|
-
export {
|
|
19
|
+
export { c as extractSkillArchive };
|
package/skill/skill.js
CHANGED
|
@@ -1,63 +1,74 @@
|
|
|
1
|
-
import { ENTITY_DESCRIPTION_MAX_LENGTH as e, ENTITY_INSTRUCTIONS_MAX_LENGTH as t, ENTITY_NAME_MAX_LENGTH as n,
|
|
2
|
-
import { SkillFileNodeKind as
|
|
3
|
-
import { unzipSync as
|
|
4
|
-
import { parse as
|
|
1
|
+
import { ENTITY_DESCRIPTION_MAX_LENGTH as e, ENTITY_INSTRUCTIONS_MAX_LENGTH as t, ENTITY_NAME_MAX_LENGTH as n, HIDDEN_FILE as r, exceedsMaxLength as i } from "@epam/ai-dial-chat-shared";
|
|
2
|
+
import { SkillFileNodeKind as a } from "@epam/ai-dial-skill-editor";
|
|
3
|
+
import { unzipSync as o } from "fflate";
|
|
4
|
+
import { parse as s, stringify as c } from "yaml";
|
|
5
5
|
//#region src/skill/skill.ts
|
|
6
|
-
var
|
|
7
|
-
|
|
6
|
+
var l = "SKILL.md", u = 1048576, d = 16777216, f = 100, p = r, m = `/${p}`, h = (e) => e.endsWith(m) && e.length > m.length, g = (e) => e.slice(0, -m.length), _ = new Set([
|
|
7
|
+
".dial-resource",
|
|
8
|
+
".dial-folder",
|
|
9
|
+
p
|
|
10
|
+
]), v = new Set(["files", "v"]), y = /^[a-zA-Z]:/, b = /[\x00-\x1f]/, x = (e) => {
|
|
11
|
+
if (e === "" || e.startsWith("/") || y.test(e) || e.includes("\\") || b.test(e)) return !1;
|
|
8
12
|
let t = e.split("/");
|
|
9
|
-
return !(t.some((e) => e === "" || e === "." || e === "..") || t.some((e) =>
|
|
10
|
-
},
|
|
13
|
+
return !(t.some((e) => e === "" || e === "." || e === "..") || t.some((e) => _.has(e)) || v.has(t[0]));
|
|
14
|
+
}, S = (e) => e.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-/, "").replace(/-$/, ""), C = {
|
|
11
15
|
name: n,
|
|
12
16
|
description: e,
|
|
13
17
|
instructions: t
|
|
14
|
-
},
|
|
18
|
+
}, w = (e) => {
|
|
15
19
|
let t = {};
|
|
16
|
-
for (let n of Object.keys(
|
|
17
|
-
let
|
|
18
|
-
|
|
20
|
+
for (let n of Object.keys(C)) {
|
|
21
|
+
let r = C[n];
|
|
22
|
+
i(e[n].trim(), r) && (t[n] = r);
|
|
19
23
|
}
|
|
20
24
|
return t;
|
|
21
|
-
},
|
|
25
|
+
}, T = ({ name: e, description: t, instructions: n }) => `---\n${c({
|
|
22
26
|
name: e,
|
|
23
27
|
description: t
|
|
24
|
-
}).trimEnd()}\n---\n\n${n}`,
|
|
28
|
+
}).trimEnd()}\n---\n\n${n}`, E = (e, t, n, r) => `---\n${c({
|
|
25
29
|
...e,
|
|
26
30
|
name: t,
|
|
27
31
|
description: n
|
|
28
|
-
}).trimEnd()}\n---\n\n${r}`,
|
|
32
|
+
}).trimEnd()}\n---\n\n${r}`, D = /^---\r?\n([\s\S]*?)\r?\n---\r?\n?([\s\S]*)$/, O = /^---[ \t]*$/, k = (e) => {
|
|
29
33
|
let t = e.replace(/^\uFEFF/, "").replace(/\r\n/g, "\n").split("\n"), n = t.findIndex((e) => e.trim() !== "");
|
|
30
|
-
return n === -1 || !
|
|
31
|
-
},
|
|
32
|
-
let t =
|
|
34
|
+
return n === -1 || !O.test(t[n]) ? !1 : t.some((e, t) => t > n && O.test(e));
|
|
35
|
+
}, A = (e) => {
|
|
36
|
+
let t = D.exec(e);
|
|
33
37
|
if (!t) throw Error("SKILL.md is missing its YAML frontmatter block");
|
|
34
38
|
let [, n, r] = t;
|
|
35
39
|
return {
|
|
36
|
-
frontmatter:
|
|
40
|
+
frontmatter: s(n) ?? {},
|
|
37
41
|
instructions: r.replace(/^\r?\n/, "")
|
|
38
42
|
};
|
|
39
|
-
},
|
|
40
|
-
let t =
|
|
41
|
-
if (n == null) throw Error(`Skill archive is missing a root ${
|
|
42
|
-
let r = /* @__PURE__ */ new Map();
|
|
43
|
-
for (let [e, n] of Object.entries(t)) e === "SKILL.md" || e.endsWith("/")
|
|
43
|
+
}, j = (e) => {
|
|
44
|
+
let t = o(e), n = t[l];
|
|
45
|
+
if (n == null) throw Error(`Skill archive is missing a root ${l} file`);
|
|
46
|
+
let r = /* @__PURE__ */ new Map(), i = [];
|
|
47
|
+
for (let [e, n] of Object.entries(t)) if (!(e === "SKILL.md" || e.endsWith("/"))) {
|
|
48
|
+
if (h(e)) {
|
|
49
|
+
i.push(g(e));
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
e !== p && r.set(e, n);
|
|
53
|
+
}
|
|
44
54
|
return {
|
|
45
55
|
manifestText: new TextDecoder().decode(n),
|
|
46
|
-
files: r
|
|
56
|
+
files: r,
|
|
57
|
+
folders: i
|
|
47
58
|
};
|
|
48
|
-
},
|
|
59
|
+
}, M = (e) => {
|
|
49
60
|
let t = e.lastIndexOf("/");
|
|
50
61
|
return t === -1 ? e : e.slice(t + 1);
|
|
51
|
-
},
|
|
62
|
+
}, N = (e) => new Blob([new Uint8Array(e)]), P = (e, t, n, r) => Object.keys(e).length > 0 ? E(e, t, n, r) : T({
|
|
52
63
|
name: t,
|
|
53
64
|
description: n,
|
|
54
65
|
instructions: r
|
|
55
|
-
}),
|
|
56
|
-
let n = e.filter((e) => e.kind ===
|
|
66
|
+
}), F = (e, t) => {
|
|
67
|
+
let n = e.filter((e) => e.kind === a.File), r = e.filter((t) => t.kind === a.Folder && !e.some((e) => e.path.startsWith(`${t.path}/`))).map((e) => `${e.path}${m}`);
|
|
57
68
|
return {
|
|
58
|
-
filePaths: n.map((e) => e.path),
|
|
59
|
-
files: n.map((e) =>
|
|
69
|
+
filePaths: [...n.map((e) => e.path), ...r],
|
|
70
|
+
files: [...n.map((e) => N(t.get(e.path)?.bytes ?? new Uint8Array())), ...r.map(() => new Blob([]))]
|
|
60
71
|
};
|
|
61
72
|
};
|
|
62
73
|
//#endregion
|
|
63
|
-
export {
|
|
74
|
+
export { u as SKILL_FILE_UPLOAD_MAX_BYTES, p as SKILL_FOLDER_MARKER, l as SKILL_MANIFEST_FILE, C as SKILL_TEXT_FIELD_MAX_LENGTHS, f as SKILL_UPLOAD_MAX_FILES, d as SKILL_UPLOAD_MAX_TOTAL_BYTES, F as buildSkillFilesPayload, T as buildSkillManifest, P as buildSkillManifestForSubmit, E as buildSkillManifestFromFrontmatter, w as getSkillFieldLengthViolations, h as isSkillFolderMarkerPath, x as isValidSkillRelativePath, M as nameFromPath, S as normalizeSkillName, A as parseSkillManifest, N as skillFileBytesToBlob, g as skillFolderMarkerParent, k as startsWithFrontmatterBlock, j as unpackSkillArchive };
|
|
@@ -1,95 +1,100 @@
|
|
|
1
1
|
import { getApiErrorStatus as e } from "../api-error/api-error.js";
|
|
2
2
|
import { stripSurroundingSlashes as t, stripTrailingSlashes as n } from "../shared/string-utils.js";
|
|
3
|
-
import {
|
|
4
|
-
import { useEffect as
|
|
5
|
-
import { SkillFileNodeKind as
|
|
3
|
+
import { SKILL_FOLDER_MARKER as r, SKILL_MANIFEST_FILE as i, isSkillFolderMarkerPath as a, nameFromPath as o, parseSkillManifest as s, skillFolderMarkerParent as c, unpackSkillArchive as l } from "./skill.js";
|
|
4
|
+
import { useEffect as u, useRef as d, useState as f } from "react";
|
|
5
|
+
import { SkillFileNodeKind as p } from "@epam/ai-dial-skill-editor";
|
|
6
6
|
//#region src/skill/useSkillEditorLoad.ts
|
|
7
|
-
var
|
|
7
|
+
var m = /* @__PURE__ */ function(e) {
|
|
8
8
|
return e.Loading = "loading", e.Loaded = "loaded", e.Error = "error", e.Forbidden = "forbidden", e.NotFound = "not-found", e;
|
|
9
|
-
}({}),
|
|
9
|
+
}({}), h = class extends Error {}, g = class extends Error {}, _ = (e, r) => {
|
|
10
10
|
let i = e.parentPath ? t(e.parentPath) : "", a = `${n(r)}/files`;
|
|
11
11
|
return i === a ? e.name : i.startsWith(`${a}/`) ? `${i.slice(a.length + 1)}/${e.name}` : i === "files" ? e.name : i.startsWith("files/") ? `${i.slice(6)}/${e.name}` : null;
|
|
12
|
-
},
|
|
12
|
+
}, v = async (e, t, n) => {
|
|
13
13
|
let r = await e.downloadSkill(t, n), i = r.headers.get("etag");
|
|
14
|
-
if (!i) throw new
|
|
14
|
+
if (!i) throw new g("Skill ETag is missing");
|
|
15
15
|
try {
|
|
16
|
-
let e = await r.arrayBuffer(), { manifestText: t, files: n } =
|
|
16
|
+
let e = await r.arrayBuffer(), { manifestText: t, files: n, folders: a } = l(new Uint8Array(e));
|
|
17
17
|
return {
|
|
18
18
|
etag: i,
|
|
19
19
|
manifestText: t,
|
|
20
|
-
files: n
|
|
20
|
+
files: n,
|
|
21
|
+
folders: a
|
|
21
22
|
};
|
|
22
23
|
} catch {
|
|
23
|
-
throw new
|
|
24
|
+
throw new h("Skill ZIP is invalid");
|
|
24
25
|
}
|
|
25
|
-
},
|
|
26
|
-
let [
|
|
26
|
+
}, y = async (e, t, n) => {
|
|
27
|
+
let [s, l] = await Promise.all([e.downloadSkillFile(t, n, i), e.listSkillFiles({
|
|
27
28
|
bucket: t,
|
|
28
29
|
path: n,
|
|
29
30
|
filePath: "",
|
|
30
31
|
recursive: !0
|
|
31
|
-
})]),
|
|
32
|
-
if (!
|
|
33
|
-
let
|
|
34
|
-
item: e,
|
|
35
|
-
path: m(e, n)
|
|
36
|
-
})).filter((e) => e.path != null && e.path !== "SKILL.md"), l = await Promise.all(c.map(async ({ path: r }) => {
|
|
32
|
+
})]), u = l.items.find((e) => e.nodeType === "item" && _(e, n) === "SKILL.md"), d = s.headers.get("etag") ?? u?.etag;
|
|
33
|
+
if (!d) throw new g("Skill ETag is missing");
|
|
34
|
+
let f = l.items.filter((e) => e.nodeType === "item").map((e) => _(e, n)).filter((e) => e != null && e !== "SKILL.md"), p = f.filter(a).map(c), m = f.filter((e) => o(e) !== r), h = await Promise.all(m.map(async (r) => {
|
|
37
35
|
let i = await e.downloadSkillFile(t, n, r);
|
|
38
36
|
return [r, new Uint8Array(await i.arrayBuffer())];
|
|
39
37
|
}));
|
|
40
38
|
return {
|
|
41
|
-
etag:
|
|
42
|
-
manifestText: await
|
|
43
|
-
files: new Map(
|
|
39
|
+
etag: d,
|
|
40
|
+
manifestText: await s.text(),
|
|
41
|
+
files: new Map(h),
|
|
42
|
+
folders: p
|
|
44
43
|
};
|
|
45
|
-
},
|
|
46
|
-
let [
|
|
47
|
-
return
|
|
44
|
+
}, b = ({ isEditMode: t, bucket: n, skillPath: r, client: i }) => {
|
|
45
|
+
let [a, c] = f(t ? "loading" : "loaded"), [l, m] = f(0), [_, b] = f(), x = d(void 0), S = d({}), C = d(void 0), [w, T] = f([]), E = d(/* @__PURE__ */ new Map());
|
|
46
|
+
return u(() => {
|
|
48
47
|
if (!t || !n) return;
|
|
49
48
|
if (r == null) {
|
|
50
|
-
|
|
49
|
+
c("error");
|
|
51
50
|
return;
|
|
52
51
|
}
|
|
53
|
-
let
|
|
54
|
-
return
|
|
55
|
-
if (await Promise.resolve(), !
|
|
52
|
+
let a = !1;
|
|
53
|
+
return c("loading"), (async () => {
|
|
54
|
+
if (await Promise.resolve(), !a) try {
|
|
56
55
|
let t;
|
|
57
56
|
try {
|
|
58
|
-
t = await
|
|
59
|
-
} catch (
|
|
60
|
-
if (
|
|
61
|
-
let
|
|
62
|
-
if (!(
|
|
63
|
-
t = await
|
|
57
|
+
t = await v(i, n, r);
|
|
58
|
+
} catch (a) {
|
|
59
|
+
if (a instanceof g) throw a;
|
|
60
|
+
let o = e(a);
|
|
61
|
+
if (!(a instanceof h) && o !== 400) throw a;
|
|
62
|
+
t = await y(i, n, r);
|
|
64
63
|
}
|
|
65
|
-
let { frontmatter:
|
|
66
|
-
if (
|
|
67
|
-
x.current = t.etag, S.current =
|
|
64
|
+
let { frontmatter: l, instructions: u } = s(t.manifestText);
|
|
65
|
+
if (a) return;
|
|
66
|
+
x.current = t.etag, S.current = l, C.current = r, E.current = new Map([...t.files].map(([e, t]) => [e, { bytes: t }]));
|
|
67
|
+
let d = [...t.files.keys()].map((e) => ({
|
|
68
68
|
path: e,
|
|
69
|
-
name:
|
|
70
|
-
kind:
|
|
71
|
-
}))
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
})
|
|
69
|
+
name: o(e),
|
|
70
|
+
kind: p.File
|
|
71
|
+
})), f = t.folders.filter((e) => !t.files.has(e)).map((e) => ({
|
|
72
|
+
path: e,
|
|
73
|
+
name: o(e),
|
|
74
|
+
kind: p.Folder
|
|
75
|
+
}));
|
|
76
|
+
T([...d, ...f]), b({
|
|
77
|
+
name: typeof l.name == "string" ? l.name : "",
|
|
78
|
+
description: typeof l.description == "string" ? l.description : "",
|
|
79
|
+
instructions: u
|
|
80
|
+
}), c("loaded");
|
|
76
81
|
} catch (t) {
|
|
77
|
-
if (
|
|
82
|
+
if (a) return;
|
|
78
83
|
let n = e(t);
|
|
79
|
-
|
|
84
|
+
c(n === 403 ? "forbidden" : n === 404 ? "not-found" : "error");
|
|
80
85
|
}
|
|
81
86
|
})(), () => {
|
|
82
|
-
|
|
87
|
+
a = !0;
|
|
83
88
|
};
|
|
84
89
|
}, [
|
|
85
90
|
t,
|
|
86
91
|
n,
|
|
87
92
|
r,
|
|
88
|
-
|
|
89
|
-
|
|
93
|
+
l,
|
|
94
|
+
i
|
|
90
95
|
]), {
|
|
91
|
-
loadState:
|
|
92
|
-
loadedValues:
|
|
96
|
+
loadState: a,
|
|
97
|
+
loadedValues: _,
|
|
93
98
|
setLoadedValues: b,
|
|
94
99
|
files: w,
|
|
95
100
|
setFiles: T,
|
|
@@ -97,8 +102,8 @@ var d = /* @__PURE__ */ function(e) {
|
|
|
97
102
|
frontmatterRef: S,
|
|
98
103
|
etagRef: x,
|
|
99
104
|
loadedPathRef: C,
|
|
100
|
-
retryLoad: () =>
|
|
105
|
+
retryLoad: () => m((e) => e + 1)
|
|
101
106
|
};
|
|
102
107
|
};
|
|
103
108
|
//#endregion
|
|
104
|
-
export {
|
|
109
|
+
export { m as SkillEditorLoadState, b as useSkillEditorLoad };
|
package/skill-editor.d.ts
CHANGED
|
@@ -16,7 +16,10 @@ import { SkillUploadResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
|
16
16
|
/**
|
|
17
17
|
* Builds the ordered supporting-file paths and `Blob` payload
|
|
18
18
|
* `createSkill`/`updateSkill` expect from the editor's file tree and
|
|
19
|
-
* in-memory content map.
|
|
19
|
+
* in-memory content map. Every folder node with no descendant node gets a
|
|
20
|
+
* zero-byte `<folder>/.dial_folder` marker after the real files, so the
|
|
21
|
+
* empty folder survives the whole-skill write; a folder with content needs
|
|
22
|
+
* none, and a marker it had before is dropped by that same write.
|
|
20
23
|
*/
|
|
21
24
|
export declare const buildSkillFilesPayload: (files: SkillFileTreeNode[], filesContent: Map<string, SkillFileContent>) => SkillFilesPayload;
|
|
22
25
|
|
|
@@ -54,11 +57,17 @@ export declare const classifySkillArchiveImportError: (status: number | undefine
|
|
|
54
57
|
/** Returns the limit each over-long skill field exceeds, keyed by field; fields within their limit are omitted. */
|
|
55
58
|
export declare const getSkillFieldLengthViolations: (values: Record<SkillTextField, string>) => Partial<Record<SkillTextField, number>>;
|
|
56
59
|
|
|
60
|
+
/** Whether a skill-relative path is a folder marker (`<folder>/.dial_folder`, never a root-level `.dial_folder`). */
|
|
61
|
+
export declare const isSkillFolderMarkerPath: (path: string) => boolean;
|
|
62
|
+
|
|
57
63
|
/**
|
|
58
64
|
* Client-side mirror of the backend's `isValidSkillRelativePath`
|
|
59
65
|
* (`apps/chat-api/src/skills/utils/skill-path.util.ts`), used only for
|
|
60
66
|
* immediate inline feedback — the server remains authoritative and may still
|
|
61
|
-
* reject a path this function accepts.
|
|
67
|
+
* reject a path this function accepts. It additionally reserves the
|
|
68
|
+
* `.dial_folder` marker name so a user can never upload or name a folder
|
|
69
|
+
* after it; the save payload's generated markers never pass through here
|
|
70
|
+
* (the server accepts them only as a zero-byte final segment).
|
|
62
71
|
*/
|
|
63
72
|
export declare const isValidSkillRelativePath: (relativePath: string) => boolean;
|
|
64
73
|
|
|
@@ -106,6 +115,13 @@ export declare const parseSkillManifestDocument: (raw: string) => SkillManifestD
|
|
|
106
115
|
*/
|
|
107
116
|
export declare const SKILL_FILE_UPLOAD_MAX_BYTES = 1048576;
|
|
108
117
|
|
|
118
|
+
/**
|
|
119
|
+
* Zero-byte object written at `<folder>/.dial_folder` so an otherwise empty
|
|
120
|
+
* skill folder survives a save — DIAL Core storage has no directory objects,
|
|
121
|
+
* so a folder only exists as a file's path prefix.
|
|
122
|
+
*/
|
|
123
|
+
export declare const SKILL_FOLDER_MARKER = ".dial_folder";
|
|
124
|
+
|
|
109
125
|
/** Root manifest filename required at the top of every skill archive (mirrors `SKILL_MANIFEST_FILE` in `apps/chat-api/src/skills/utils/skill-path.util.ts`). */
|
|
110
126
|
export declare const SKILL_MANIFEST_FILE = "SKILL.md";
|
|
111
127
|
|
|
@@ -336,6 +352,9 @@ export declare interface SkillFilesPayload {
|
|
|
336
352
|
*/
|
|
337
353
|
export declare const skillFileToAttachment: (node: SkillFileTreeNode, content: SkillFileContent) => Attachment;
|
|
338
354
|
|
|
355
|
+
/** Returns the folder path a marker path stands for (`docs/.dial_folder` → `docs`). */
|
|
356
|
+
export declare const skillFolderMarkerParent: (markerPath: string) => string;
|
|
357
|
+
|
|
339
358
|
/** A `SKILL.md` split into its frontmatter fields and its prose body. */
|
|
340
359
|
export declare interface SkillManifestDocument {
|
|
341
360
|
/** `name` frontmatter field, when present and a string. */
|
|
@@ -403,15 +422,18 @@ declare type SubmitPhase = 'idle' | 'submitting' | 'success' | 'failure';
|
|
|
403
422
|
export declare interface UnpackedSkillArchive {
|
|
404
423
|
/** The root `SKILL.md` entry's decoded text content. */
|
|
405
424
|
manifestText: string;
|
|
406
|
-
/** Every non-manifest entry, keyed by relative path. */
|
|
425
|
+
/** Every non-manifest, non-marker entry, keyed by relative path. */
|
|
407
426
|
files: Map<string, Uint8Array>;
|
|
427
|
+
/** Folder paths restored from `<folder>/.dial_folder` marker entries. */
|
|
428
|
+
folders: string[];
|
|
408
429
|
}
|
|
409
430
|
|
|
410
431
|
/**
|
|
411
432
|
* Unpacks a whole-skill ZIP (as downloaded from `GET /api/v1/skills/download`
|
|
412
433
|
* — DIAL Core's whole-resource `GET` is the one place this contract still
|
|
413
|
-
* uses a ZIP, per design.md) into its manifest text
|
|
414
|
-
* bytes
|
|
434
|
+
* uses a ZIP, per design.md) into its manifest text, every other entry's
|
|
435
|
+
* bytes, and the folders its empty-folder markers stand for. Throws if the
|
|
436
|
+
* archive has no root `SKILL.md` entry.
|
|
415
437
|
*/
|
|
416
438
|
export declare const unpackSkillArchive: (bytes: Uint8Array) => UnpackedSkillArchive;
|
|
417
439
|
|
package/skill-editor.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { SKILL_FILE_UPLOAD_MAX_BYTES as e,
|
|
2
|
-
import { parseSkillManifestDocument as
|
|
3
|
-
import { validateSkillFileBatch as
|
|
4
|
-
import { skillFileToAttachment as
|
|
5
|
-
import { SkillEditorLoadState as
|
|
6
|
-
import { useSkillEditorSubmit as
|
|
7
|
-
import { useSkillFileActions as
|
|
8
|
-
import { SkillArchiveImportErrorKind as
|
|
9
|
-
export { e as SKILL_FILE_UPLOAD_MAX_BYTES, t as
|
|
1
|
+
import { SKILL_FILE_UPLOAD_MAX_BYTES as e, SKILL_FOLDER_MARKER as t, SKILL_MANIFEST_FILE as n, SKILL_TEXT_FIELD_MAX_LENGTHS as r, SKILL_UPLOAD_MAX_FILES as i, SKILL_UPLOAD_MAX_TOTAL_BYTES as a, buildSkillFilesPayload as o, buildSkillManifest as s, buildSkillManifestForSubmit as c, buildSkillManifestFromFrontmatter as l, getSkillFieldLengthViolations as u, isSkillFolderMarkerPath as d, isValidSkillRelativePath as f, nameFromPath as p, normalizeSkillName as m, parseSkillManifest as h, skillFileBytesToBlob as g, skillFolderMarkerParent as _, startsWithFrontmatterBlock as v, unpackSkillArchive as y } from "./skill/skill.js";
|
|
2
|
+
import { parseSkillManifestDocument as b } from "./skill/skill-manifest.js";
|
|
3
|
+
import { validateSkillFileBatch as x } from "./skill/skill-file-batch-validation.js";
|
|
4
|
+
import { skillFileToAttachment as S } from "./skill/skill-file-preview.js";
|
|
5
|
+
import { SkillEditorLoadState as C, useSkillEditorLoad as w } from "./skill/useSkillEditorLoad.js";
|
|
6
|
+
import { useSkillEditorSubmit as T } from "./skill/useSkillEditorSubmit.js";
|
|
7
|
+
import { useSkillFileActions as E } from "./skill/useSkillFileActions.js";
|
|
8
|
+
import { SkillArchiveImportErrorKind as D, SkillArchiveImportStatus as O, SkillArchiveSelectionRejectionReason as k, classifySkillArchiveImportError as A, useSkillArchiveImport as j } from "./skill/useSkillArchiveImport/useSkillArchiveImport.js";
|
|
9
|
+
export { e as SKILL_FILE_UPLOAD_MAX_BYTES, t as SKILL_FOLDER_MARKER, n as SKILL_MANIFEST_FILE, r as SKILL_TEXT_FIELD_MAX_LENGTHS, i as SKILL_UPLOAD_MAX_FILES, a as SKILL_UPLOAD_MAX_TOTAL_BYTES, D as SkillArchiveImportErrorKind, O as SkillArchiveImportStatus, k as SkillArchiveSelectionRejectionReason, C as SkillEditorLoadState, o as buildSkillFilesPayload, s as buildSkillManifest, c as buildSkillManifestForSubmit, l as buildSkillManifestFromFrontmatter, A as classifySkillArchiveImportError, u as getSkillFieldLengthViolations, d as isSkillFolderMarkerPath, f as isValidSkillRelativePath, p as nameFromPath, m as normalizeSkillName, h as parseSkillManifest, b as parseSkillManifestDocument, g as skillFileBytesToBlob, S as skillFileToAttachment, _ as skillFolderMarkerParent, v as startsWithFrontmatterBlock, y as unpackSkillArchive, j as useSkillArchiveImport, w as useSkillEditorLoad, T as useSkillEditorSubmit, E as useSkillFileActions, x as validateSkillFileBatch };
|