@epam/ai-dial-skill-editor 1.1.0-dev.405 → 1.1.0-dev.411
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/index.js +92 -91
- package/package.json +4 -4
package/index.js
CHANGED
|
@@ -1,35 +1,36 @@
|
|
|
1
1
|
import { buildCssVars as e, formatFileSize as t, mergeClasses as n } from "@epam/ai-dial-chat-shared";
|
|
2
2
|
import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
3
|
-
import { Accordion as o, CaptionText as s, DIAL_ICON_SIZE as ee, DIAL_KIT_ICON_STROKE as c, EditorThemes as l, ErrorText as u, FileDropzone as d, GhostButton as
|
|
4
|
-
import { IconArrowNarrowLeft as y, IconFileText as
|
|
5
|
-
import { Suspense as
|
|
6
|
-
import { DialFileNodeType as
|
|
3
|
+
import { Accordion as o, CaptionText as s, DIAL_ICON_SIZE as ee, DIAL_KIT_ICON_STROKE as c, EditorThemes as l, ErrorText as u, FileDropzone as d, GhostButton as f, GhostIconButton as p, Input as m, NeutralButton as h, Popup as g, PopupSize as te, PrimaryButton as ne, Spinner as _, Textarea as v } from "@epam/ai-dial-ui-kit";
|
|
4
|
+
import { IconArrowNarrowLeft as y, IconFileText as re, IconPlus as b, IconTrashX as ie, IconUpload as x } from "@tabler/icons-react";
|
|
5
|
+
import { Suspense as ae, lazy as S, useCallback as C, useEffect as w, useId as T, useMemo as E, useRef as D, useState as O } from "react";
|
|
6
|
+
import { DialFileNodeType as k, DialFoldersTree as oe } from "@epam/ai-dial-react-file-manager";
|
|
7
|
+
import { LazyMarkdownEditor as A } from "@epam/ai-dial-ui-kit/editors";
|
|
7
8
|
var j = {
|
|
8
9
|
headerBorder: "_headerBorder_1kidu_1",
|
|
9
10
|
footerBorder: "_footerBorder_1kidu_5",
|
|
10
11
|
sidebarBorder: "_sidebarBorder_1kidu_9"
|
|
11
|
-
}, M = ({ title: t, onBack: r, backAriaLabel: o = "Back", actions: s, leftContent: l, rightContent: u, isSaving: d = !1, labels:
|
|
12
|
-
let
|
|
12
|
+
}, M = ({ title: t, onBack: r, backAriaLabel: o = "Back", actions: s, leftContent: l, rightContent: u, isSaving: d = !1, labels: f, styles: m, dir: h }) => {
|
|
13
|
+
let g = T(), te = d ? f?.savingStatusLabel ?? "Saving" : "";
|
|
13
14
|
return /* @__PURE__ */ a("div", {
|
|
14
|
-
dir:
|
|
15
|
+
dir: h,
|
|
15
16
|
className: "flex min-h-0 flex-1 flex-col",
|
|
16
17
|
style: e({
|
|
17
|
-
"--el-header-border-color":
|
|
18
|
-
"--el-sidebar-border-color":
|
|
18
|
+
"--el-header-border-color": m?.colors?.headerBorderColor,
|
|
19
|
+
"--el-sidebar-border-color": m?.colors?.sidebarBorderColor
|
|
19
20
|
}),
|
|
20
21
|
children: [
|
|
21
22
|
/* @__PURE__ */ i("span", {
|
|
22
23
|
role: "status",
|
|
23
24
|
"aria-live": "polite",
|
|
24
25
|
className: "sr-only",
|
|
25
|
-
id:
|
|
26
|
-
children:
|
|
26
|
+
id: g,
|
|
27
|
+
children: te
|
|
27
28
|
}),
|
|
28
29
|
/* @__PURE__ */ a("div", {
|
|
29
30
|
className: n("flex items-center justify-between gap-2 border-b px-4 py-2 desktop:px-8 desktop:pb-3 desktop:pt-3", j.headerBorder),
|
|
30
31
|
children: [/* @__PURE__ */ a("div", {
|
|
31
32
|
className: "flex min-w-0 flex-1 items-center gap-2",
|
|
32
|
-
children: [/* @__PURE__ */ i(
|
|
33
|
+
children: [/* @__PURE__ */ i(p, {
|
|
33
34
|
icon: /* @__PURE__ */ i(y, {
|
|
34
35
|
size: ee.LG,
|
|
35
36
|
stroke: c,
|
|
@@ -64,20 +65,20 @@ var j = {
|
|
|
64
65
|
]
|
|
65
66
|
});
|
|
66
67
|
}, N = (e) => !!e.dataTransfer?.types.includes("Files"), se = (e) => {
|
|
67
|
-
let [t, n] =
|
|
68
|
+
let [t, n] = O(!1), r = D(0);
|
|
68
69
|
return {
|
|
69
70
|
isDragActive: t,
|
|
70
71
|
dropZoneHandlers: {
|
|
71
|
-
onDragEnter:
|
|
72
|
+
onDragEnter: C((e) => {
|
|
72
73
|
N(e) && (e.preventDefault(), r.current += 1, n(!0));
|
|
73
74
|
}, []),
|
|
74
|
-
onDragLeave:
|
|
75
|
+
onDragLeave: C((e) => {
|
|
75
76
|
N(e) && (--r.current, r.current <= 0 && (r.current = 0, n(!1)));
|
|
76
77
|
}, []),
|
|
77
|
-
onDragOver:
|
|
78
|
+
onDragOver: C((e) => {
|
|
78
79
|
N(e) && e.preventDefault();
|
|
79
80
|
}, []),
|
|
80
|
-
onDrop:
|
|
81
|
+
onDrop: C((t) => {
|
|
81
82
|
if (!N(t)) return;
|
|
82
83
|
t.preventDefault(), r.current = 0, n(!1);
|
|
83
84
|
let i = Array.from(t.dataTransfer?.files ?? []);
|
|
@@ -100,7 +101,7 @@ var j = {
|
|
|
100
101
|
let r = {
|
|
101
102
|
path: e,
|
|
102
103
|
name: L(e),
|
|
103
|
-
nodeType:
|
|
104
|
+
nodeType: k.FOLDER,
|
|
104
105
|
parentPath: I(e),
|
|
105
106
|
folderId: e,
|
|
106
107
|
items: []
|
|
@@ -115,7 +116,7 @@ var j = {
|
|
|
115
116
|
t.set(r.path, {
|
|
116
117
|
path: r.path,
|
|
117
118
|
name: r.name,
|
|
118
|
-
nodeType:
|
|
119
|
+
nodeType: k.ITEM,
|
|
119
120
|
parentPath: I(r.path),
|
|
120
121
|
folderId: I(r.path) ?? ""
|
|
121
122
|
});
|
|
@@ -166,64 +167,64 @@ var j = {
|
|
|
166
167
|
}({}), z = /* @__PURE__ */ function(e) {
|
|
167
168
|
return e.Valid = "valid", e.Invalid = "invalid", e;
|
|
168
169
|
}({}), B = (e) => (e.webkitRelativePath || e.name).replace(/\\/g, "/"), V = 0, H = () => `skill-file-candidate-${++V}`, ue = ({ isOpen: e, onClose: n, fileActions: o, initialFiles: s, labels: ee }) => {
|
|
169
|
-
let l = ee ?? {}, [
|
|
170
|
+
let l = ee ?? {}, [m, h] = O([]), [v, y] = O(/* @__PURE__ */ new Map()), [b, x] = O([]), [ae, S] = O(!1), [C, E] = O(), [D, k] = O(!1), oe = T(), A = (e) => {
|
|
170
171
|
let t = e.map((e) => ({
|
|
171
172
|
id: H(),
|
|
172
173
|
file: e,
|
|
173
174
|
path: B(e)
|
|
174
175
|
}));
|
|
175
|
-
|
|
176
|
+
E(void 0), h((e) => [...e, ...t]);
|
|
176
177
|
}, j = (e) => {
|
|
177
|
-
|
|
178
|
+
h((t) => t.filter((t) => t.id !== e));
|
|
178
179
|
};
|
|
179
|
-
|
|
180
|
-
e && (
|
|
180
|
+
w(() => {
|
|
181
|
+
e && (h((s ?? []).map((e) => ({
|
|
181
182
|
id: H(),
|
|
182
183
|
file: e,
|
|
183
184
|
path: B(e)
|
|
184
|
-
}))),
|
|
185
|
-
}, [e]),
|
|
185
|
+
}))), y(/* @__PURE__ */ new Map()), x([]), E(void 0));
|
|
186
|
+
}, [e]), w(() => {
|
|
186
187
|
if (!e) return;
|
|
187
188
|
let t = !1;
|
|
188
|
-
if (
|
|
189
|
-
|
|
189
|
+
if (m.length === 0) {
|
|
190
|
+
y(/* @__PURE__ */ new Map()), x([]);
|
|
190
191
|
return;
|
|
191
192
|
}
|
|
192
|
-
return S(!0), o.validateBatch(
|
|
193
|
-
t || (
|
|
193
|
+
return S(!0), o.validateBatch(m).then(({ results: e, batchErrors: n }) => {
|
|
194
|
+
t || (y(new Map(e.map((e) => [e.candidateId, e]))), x(n.map((e) => e.message)));
|
|
194
195
|
}).finally(() => {
|
|
195
196
|
t || S(!1);
|
|
196
197
|
}), () => {
|
|
197
198
|
t = !0;
|
|
198
199
|
};
|
|
199
|
-
}, [
|
|
200
|
-
let M =
|
|
201
|
-
|
|
200
|
+
}, [m, e]);
|
|
201
|
+
let M = m.some((e) => v.get(e.id)?.status === z.Invalid), N = m.length > 0 && m.every((e) => v.get(e.id)?.status === z.Invalid), se = m.length > 0 && !M && b.length === 0 && !ae && !D, P = async () => {
|
|
202
|
+
k(!0), E(void 0);
|
|
202
203
|
try {
|
|
203
|
-
let { results: e, batchErrors: t } = await o.validateBatch(
|
|
204
|
-
if (
|
|
205
|
-
let i = await o.commitBatch(
|
|
204
|
+
let { results: e, batchErrors: t } = await o.validateBatch(m), r = new Map(e.map((e) => [e.candidateId, e]));
|
|
205
|
+
if (y(r), x(t.map((e) => e.message)), m.some((e) => r.get(e.id)?.status === z.Invalid) || t.length > 0) return;
|
|
206
|
+
let i = await o.commitBatch(m);
|
|
206
207
|
if (i.error) {
|
|
207
|
-
|
|
208
|
+
E(i.error);
|
|
208
209
|
return;
|
|
209
210
|
}
|
|
210
211
|
n();
|
|
211
212
|
} finally {
|
|
212
|
-
|
|
213
|
+
k(!1);
|
|
213
214
|
}
|
|
214
215
|
};
|
|
215
|
-
return /* @__PURE__ */ i(
|
|
216
|
+
return /* @__PURE__ */ i(g, {
|
|
216
217
|
open: e,
|
|
217
218
|
header: l.uploadDialogTitle ?? "Upload files from device",
|
|
218
|
-
size:
|
|
219
|
+
size: te.Sm,
|
|
219
220
|
closeAriaLabel: l.uploadDialogCloseAriaLabel ?? "Close",
|
|
220
221
|
onClose: n,
|
|
221
222
|
footer: /* @__PURE__ */ a("div", {
|
|
222
223
|
className: "flex min-h-[44px] items-center justify-end gap-2 px-6 py-4",
|
|
223
|
-
children: [/* @__PURE__ */ i(
|
|
224
|
+
children: [/* @__PURE__ */ i(f, {
|
|
224
225
|
label: l.uploadCancelLabel ?? "Cancel",
|
|
225
226
|
onClick: n
|
|
226
|
-
}), /* @__PURE__ */ i(
|
|
227
|
+
}), /* @__PURE__ */ i(ne, {
|
|
227
228
|
label: l.uploadConfirmLabel ?? "Add",
|
|
228
229
|
iconBefore: D ? /* @__PURE__ */ i(_, {
|
|
229
230
|
size: 16,
|
|
@@ -247,24 +248,24 @@ var j = {
|
|
|
247
248
|
ariaLabel: l.uploadDropZoneAriaLabel ?? "Upload files",
|
|
248
249
|
multiple: !0,
|
|
249
250
|
className: N ? "border-error hover:border-error" : void 0,
|
|
250
|
-
onChange:
|
|
251
|
+
onChange: A
|
|
251
252
|
}),
|
|
252
253
|
/* @__PURE__ */ i("span", {
|
|
253
254
|
role: "status",
|
|
254
255
|
"aria-live": "polite",
|
|
255
256
|
className: "sr-only",
|
|
256
|
-
id:
|
|
257
|
-
children:
|
|
257
|
+
id: oe,
|
|
258
|
+
children: b.map((e) => `${l.uploadBatchErrorAriaPrefix ?? "Upload error: "}${e}`).join(" ")
|
|
258
259
|
}),
|
|
259
|
-
|
|
260
|
-
|
|
260
|
+
b.map((e) => /* @__PURE__ */ i(u, { text: e }, e)),
|
|
261
|
+
m.length > 0 && /* @__PURE__ */ i("ul", {
|
|
261
262
|
className: "flex flex-col gap-2",
|
|
262
|
-
children:
|
|
263
|
-
let n =
|
|
263
|
+
children: m.map((e) => {
|
|
264
|
+
let n = v.get(e.id), r = n?.kind === R.Manifest, o = n?.status === z.Invalid;
|
|
264
265
|
return /* @__PURE__ */ a("li", {
|
|
265
266
|
className: "flex items-center gap-2 rounded-lg border border-tertiary p-2",
|
|
266
267
|
children: [
|
|
267
|
-
/* @__PURE__ */ i(
|
|
268
|
+
/* @__PURE__ */ i(re, {
|
|
268
269
|
size: 20,
|
|
269
270
|
"aria-hidden": !0,
|
|
270
271
|
stroke: c
|
|
@@ -287,8 +288,8 @@ var j = {
|
|
|
287
288
|
})
|
|
288
289
|
]
|
|
289
290
|
}),
|
|
290
|
-
/* @__PURE__ */ i(
|
|
291
|
-
icon: /* @__PURE__ */ i(
|
|
291
|
+
/* @__PURE__ */ i(p, {
|
|
292
|
+
icon: /* @__PURE__ */ i(ie, {
|
|
292
293
|
size: 16,
|
|
293
294
|
"aria-hidden": !0,
|
|
294
295
|
stroke: c
|
|
@@ -307,24 +308,24 @@ var j = {
|
|
|
307
308
|
}, U = {
|
|
308
309
|
title: "_title_65glc_1",
|
|
309
310
|
helperText: "_helperText_65glc_5"
|
|
310
|
-
}, de =
|
|
311
|
-
let { MarkdownEditor: e } = await
|
|
311
|
+
}, de = S(async () => {
|
|
312
|
+
let { MarkdownEditor: e } = await A();
|
|
312
313
|
return { default: e };
|
|
313
|
-
}), W = ({ initialValues: t, files: d, selectedPath:
|
|
314
|
-
let [K, q] =
|
|
314
|
+
}), W = ({ initialValues: t, files: d, selectedPath: p, onSelectedPathChange: g, expandedPaths: te, onExpandedPathsChange: y, isLoading: re = !1, hasLoadError: x = !1, isSubmitting: S = !1, errors: T, submitError: k, conflict: A, onReloadLatest: j, isNameReadOnly: N = !1, onDirtyChange: I, fileActions: L, supportingFileContent: R, onSubmit: z, onCancel: B, onBack: V, backAriaLabel: H, title: W, onRetry: fe, labels: G, styles: pe, dir: me, instructionsEditorTheme: he = l.light }) => {
|
|
315
|
+
let [K, q] = O({
|
|
315
316
|
name: t?.name ?? "",
|
|
316
317
|
description: t?.description ?? "",
|
|
317
318
|
instructions: t?.instructions ?? ""
|
|
318
|
-
}), ge =
|
|
319
|
-
|
|
319
|
+
}), ge = D(t), _e = ge.current !== t, ve = D(d);
|
|
320
|
+
w(() => {
|
|
320
321
|
ge.current = t, q({
|
|
321
322
|
name: t?.name ?? "",
|
|
322
323
|
description: t?.description ?? "",
|
|
323
324
|
instructions: t?.instructions ?? ""
|
|
324
325
|
}), ve.current = d;
|
|
325
326
|
}, [t]);
|
|
326
|
-
let ye = (e) => JSON.stringify([...e].sort((e, t) => e.path.localeCompare(t.path))), be =
|
|
327
|
-
|
|
327
|
+
let ye = (e) => JSON.stringify([...e].sort((e, t) => e.path.localeCompare(t.path))), be = D(!1);
|
|
328
|
+
w(() => {
|
|
328
329
|
if (_e) return;
|
|
329
330
|
let e = {
|
|
330
331
|
name: t?.name ?? "",
|
|
@@ -339,12 +340,12 @@ var j = {
|
|
|
339
340
|
_e,
|
|
340
341
|
I
|
|
341
342
|
]);
|
|
342
|
-
let [xe, Se] =
|
|
343
|
-
Se(e),
|
|
344
|
-
}, [
|
|
343
|
+
let [xe, Se] = O(P), J = p ?? xe, Y = C((e) => {
|
|
344
|
+
Se(e), g?.(e);
|
|
345
|
+
}, [g]), [Ce, we] = O([]), Te = te ?? Ce, Ee = E(() => new Set(Te), [Te]), De = C((e) => {
|
|
345
346
|
let t = [...e];
|
|
346
|
-
we(t),
|
|
347
|
-
}, [
|
|
347
|
+
we(t), y?.(t);
|
|
348
|
+
}, [y]), [X, Oe] = O(!1), [ke, Ae] = O(), [je, Me] = O(!1), { isDragActive: Ne, dropZoneHandlers: Pe } = se(C((e) => {
|
|
348
349
|
X || (Ae(e), Oe(!0));
|
|
349
350
|
}, [X])), Z = G ?? {}, Q = pe?.colors, Fe = pe?.typography ?? {}, Ie = Fe.titleClassName ?? "dial-body-semi-text", Le = Fe.helperTextClassName ?? "dial-tiny-semi-text", Re = Fe.removeIconClassName ?? "text-secondary", ze = e({
|
|
350
351
|
"--se-title-color": Q?.title,
|
|
@@ -352,22 +353,22 @@ var j = {
|
|
|
352
353
|
}), Be = Q?.border ? { colors: {
|
|
353
354
|
headerBorderColor: Q.border,
|
|
354
355
|
sidebarBorderColor: Q.border
|
|
355
|
-
} } : void 0, Ve =
|
|
356
|
+
} } : void 0, Ve = E(() => ce([{
|
|
356
357
|
path: P,
|
|
357
358
|
name: P,
|
|
358
359
|
kind: F.File
|
|
359
|
-
}, ...d]), [d]), $ =
|
|
360
|
+
}, ...d]), [d]), $ = E(() => d.find((e) => e.path === J), [d, J]), He = C((e) => {
|
|
360
361
|
Y(e.path);
|
|
361
|
-
}, [Y]), Ue =
|
|
362
|
+
}, [Y]), Ue = C((e) => {
|
|
362
363
|
L.onRemoveNode(e), J === e && Y(P);
|
|
363
364
|
}, [
|
|
364
365
|
L,
|
|
365
366
|
J,
|
|
366
367
|
Y
|
|
367
|
-
]), We =
|
|
368
|
+
]), We = C((e) => e.path === "SKILL.md" ? [] : [{
|
|
368
369
|
key: "remove",
|
|
369
370
|
label: Z.removeLabel ?? "Remove",
|
|
370
|
-
icon: /* @__PURE__ */ i(
|
|
371
|
+
icon: /* @__PURE__ */ i(ie, {
|
|
371
372
|
size: ee.SM,
|
|
372
373
|
className: Re,
|
|
373
374
|
"aria-hidden": !0,
|
|
@@ -385,7 +386,7 @@ var j = {
|
|
|
385
386
|
children: [/* @__PURE__ */ i("span", {
|
|
386
387
|
className: n(U.title, Ie),
|
|
387
388
|
children: Z.filesHeading ?? "Files"
|
|
388
|
-
}), /* @__PURE__ */ i(
|
|
389
|
+
}), /* @__PURE__ */ i(h, {
|
|
389
390
|
label: Z.addUploadLabel ?? "Upload from device",
|
|
390
391
|
iconBefore: /* @__PURE__ */ i(b, {
|
|
391
392
|
size: 16,
|
|
@@ -410,20 +411,20 @@ var j = {
|
|
|
410
411
|
rootItemPath: ""
|
|
411
412
|
})
|
|
412
413
|
})]
|
|
413
|
-
}), Ke = /* @__PURE__ */ a(r, { children: [/* @__PURE__ */ i(
|
|
414
|
+
}), Ke = /* @__PURE__ */ a(r, { children: [/* @__PURE__ */ i(h, {
|
|
414
415
|
label: Z.cancelLabel ?? "Cancel",
|
|
415
416
|
onClick: B,
|
|
416
|
-
disabled:
|
|
417
|
-
}), /* @__PURE__ */ i(
|
|
417
|
+
disabled: S
|
|
418
|
+
}), /* @__PURE__ */ i(ne, {
|
|
418
419
|
label: Z.createLabel ?? "Create",
|
|
419
|
-
iconBefore:
|
|
420
|
+
iconBefore: S ? /* @__PURE__ */ i(_, {
|
|
420
421
|
size: 16,
|
|
421
422
|
ariaLabel: ""
|
|
422
423
|
}) : void 0,
|
|
423
424
|
onClick: () => z(K),
|
|
424
|
-
disabled:
|
|
425
|
+
disabled: S
|
|
425
426
|
})] });
|
|
426
|
-
return
|
|
427
|
+
return re ? /* @__PURE__ */ i("div", {
|
|
427
428
|
dir: me,
|
|
428
429
|
className: "relative flex min-h-0 flex-1 flex-col",
|
|
429
430
|
children: /* @__PURE__ */ i(M, {
|
|
@@ -441,7 +442,7 @@ var j = {
|
|
|
441
442
|
children: /* @__PURE__ */ i(_, {})
|
|
442
443
|
})
|
|
443
444
|
})
|
|
444
|
-
}) :
|
|
445
|
+
}) : x ? /* @__PURE__ */ i("div", {
|
|
445
446
|
dir: me,
|
|
446
447
|
className: "relative flex min-h-0 flex-1 flex-col",
|
|
447
448
|
children: /* @__PURE__ */ i(M, {
|
|
@@ -455,7 +456,7 @@ var j = {
|
|
|
455
456
|
leftContent: /* @__PURE__ */ a("div", {
|
|
456
457
|
role: "alert",
|
|
457
458
|
className: "flex flex-col items-center gap-4 p-8",
|
|
458
|
-
children: [/* @__PURE__ */ i(u, { text: Z.loadErrorMessage ?? "Couldn't load this skill. Please try again." }), /* @__PURE__ */ i(
|
|
459
|
+
children: [/* @__PURE__ */ i(u, { text: Z.loadErrorMessage ?? "Couldn't load this skill. Please try again." }), /* @__PURE__ */ i(ne, {
|
|
459
460
|
label: Z.retryLabel ?? "Retry",
|
|
460
461
|
onClick: fe
|
|
461
462
|
})]
|
|
@@ -476,7 +477,7 @@ var j = {
|
|
|
476
477
|
onBack: V,
|
|
477
478
|
backAriaLabel: H,
|
|
478
479
|
actions: Ke,
|
|
479
|
-
isSaving:
|
|
480
|
+
isSaving: S,
|
|
480
481
|
labels: { savingStatusLabel: Z.savingStatusLabel },
|
|
481
482
|
styles: Be,
|
|
482
483
|
leftContent: /* @__PURE__ */ a(r, { children: [/* @__PURE__ */ i("div", {
|
|
@@ -496,14 +497,14 @@ var j = {
|
|
|
496
497
|
rightContent: /* @__PURE__ */ a("div", {
|
|
497
498
|
className: "flex flex-1 flex-col gap-4 px-4 py-6 desktop:gap-5 desktop:px-8",
|
|
498
499
|
children: [
|
|
499
|
-
|
|
500
|
+
k != null && /* @__PURE__ */ i("div", {
|
|
500
501
|
role: "alert",
|
|
501
|
-
children: /* @__PURE__ */ i(u, { text:
|
|
502
|
+
children: /* @__PURE__ */ i(u, { text: k })
|
|
502
503
|
}),
|
|
503
504
|
A != null && /* @__PURE__ */ a("div", {
|
|
504
505
|
role: "alert",
|
|
505
506
|
className: "flex items-center gap-2",
|
|
506
|
-
children: [/* @__PURE__ */ i(u, { text: A.message }), /* @__PURE__ */ i(
|
|
507
|
+
children: [/* @__PURE__ */ i(u, { text: A.message }), /* @__PURE__ */ i(f, {
|
|
507
508
|
label: Z.reloadLatestLabel ?? "Reload latest",
|
|
508
509
|
onClick: j
|
|
509
510
|
})]
|
|
@@ -513,7 +514,7 @@ var j = {
|
|
|
513
514
|
children: J === "SKILL.md" ? P : Z.selectedFileHeading?.($?.name ?? J) ?? $?.name ?? J
|
|
514
515
|
}),
|
|
515
516
|
J === "SKILL.md" ? /* @__PURE__ */ a(r, { children: [
|
|
516
|
-
/* @__PURE__ */ i(
|
|
517
|
+
/* @__PURE__ */ i(m, {
|
|
517
518
|
labelProps: {
|
|
518
519
|
label: Z.nameLabel ?? "Name",
|
|
519
520
|
required: !0
|
|
@@ -524,9 +525,9 @@ var j = {
|
|
|
524
525
|
name: e ?? ""
|
|
525
526
|
})),
|
|
526
527
|
placeholder: Z.namePlaceholder ?? "good-morning-breakfast",
|
|
527
|
-
caption:
|
|
528
|
-
error:
|
|
529
|
-
invalid: !!
|
|
528
|
+
caption: T?.name ? void 0 : Z.nameCaption ?? "Lowercase letters and hyphens only, no spaces. We'll reformat automatically if needed.",
|
|
529
|
+
error: T?.name,
|
|
530
|
+
invalid: !!T?.name,
|
|
530
531
|
disabled: N
|
|
531
532
|
}),
|
|
532
533
|
/* @__PURE__ */ i(v, {
|
|
@@ -540,8 +541,8 @@ var j = {
|
|
|
540
541
|
...t,
|
|
541
542
|
description: e
|
|
542
543
|
})),
|
|
543
|
-
error:
|
|
544
|
-
invalid: !!
|
|
544
|
+
error: T?.description,
|
|
545
|
+
invalid: !!T?.description
|
|
545
546
|
}),
|
|
546
547
|
/* @__PURE__ */ a("div", {
|
|
547
548
|
className: "flex flex-1 flex-col gap-2",
|
|
@@ -556,7 +557,7 @@ var j = {
|
|
|
556
557
|
children: "*"
|
|
557
558
|
})]
|
|
558
559
|
}),
|
|
559
|
-
/* @__PURE__ */ i(
|
|
560
|
+
/* @__PURE__ */ i(ae, {
|
|
560
561
|
fallback: /* @__PURE__ */ i(_, { ariaLabel: Z.instructionsLoadingAriaLabel ?? "Loading" }),
|
|
561
562
|
children: /* @__PURE__ */ i(de, {
|
|
562
563
|
value: K.instructions,
|
|
@@ -568,7 +569,7 @@ var j = {
|
|
|
568
569
|
placeholder: Z.instructionsPlaceholder ?? "Write the skill instructions in Markdown"
|
|
569
570
|
})
|
|
570
571
|
}),
|
|
571
|
-
|
|
572
|
+
T?.instructions != null && /* @__PURE__ */ i(u, { text: T.instructions })
|
|
572
573
|
]
|
|
573
574
|
})
|
|
574
575
|
] }) : $?.kind === F.File && (R ?? /* @__PURE__ */ i(s, { text: Z.supportingFileNote ?? "This supporting file is included in the skill package as-is. Remove it from the Files panel to replace its content." }))
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epam/ai-dial-skill-editor",
|
|
3
3
|
"description": "Host-agnostic form for authoring a DIAL Skill, with an inline supporting-file tree",
|
|
4
|
-
"version": "1.1.0-dev.
|
|
4
|
+
"version": "1.1.0-dev.411",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./index.js",
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
|
-
"@epam/ai-dial-chat-shared": "1.1.0-dev.
|
|
20
|
-
"@epam/ai-dial-editor-builder": "1.1.0-dev.
|
|
21
|
-
"@epam/ai-dial-ui-kit": "
|
|
19
|
+
"@epam/ai-dial-chat-shared": "1.1.0-dev.411",
|
|
20
|
+
"@epam/ai-dial-editor-builder": "1.1.0-dev.411",
|
|
21
|
+
"@epam/ai-dial-ui-kit": "^0.14.0-dev.30",
|
|
22
22
|
"@epam/ai-dial-react-file-manager": "^0.2.0-dev.10",
|
|
23
23
|
"@tabler/icons-react": "^3.0.0",
|
|
24
24
|
"@uiw/react-markdown-preview": "*",
|