@epam/ai-dial-skills 1.3.0-dev.118 → 1.3.0-dev.126
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 +91 -88
- package/package.json +4 -4
package/index.js
CHANGED
|
@@ -288,23 +288,26 @@ var B = {
|
|
|
288
288
|
nodeType: L.ITEM,
|
|
289
289
|
parentPath: t,
|
|
290
290
|
folderId: t ?? ""
|
|
291
|
-
}), Z = ({ nodes: e, selectedFileId: t, expandedFolderIds: n, onToggleFolder: r, onSelectFile: i, onClose: a, ariaLabel: o }) =>
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
291
|
+
}), Z = ({ nodes: e, selectedFileId: t, expandedFolderIds: n, onToggleFolder: r, onSelectFile: i, onClose: a, ariaLabel: o }) => {
|
|
292
|
+
let s = D(() => X(e), [e]), c = D(() => new Set(n), [n]);
|
|
293
|
+
return /* @__PURE__ */ F(R, {
|
|
294
|
+
items: s,
|
|
295
|
+
showFiles: !0,
|
|
296
|
+
areHiddenFilesVisible: !0,
|
|
297
|
+
selectedPath: t,
|
|
298
|
+
expandedPaths: c,
|
|
299
|
+
onExpandedPathsChange: (e) => {
|
|
300
|
+
for (let t of e) n.has(t) || r(t);
|
|
301
|
+
for (let t of n) e.has(t) || r(t);
|
|
302
|
+
},
|
|
303
|
+
onItemClick: (e) => {
|
|
304
|
+
e.nodeType === L.ITEM && i(e.path);
|
|
305
|
+
},
|
|
306
|
+
ariaLabel: o,
|
|
307
|
+
autoFocus: !0,
|
|
308
|
+
onEscape: a
|
|
309
|
+
});
|
|
310
|
+
}, Q = (e) => /* @__PURE__ */ F(z, {
|
|
308
311
|
...e,
|
|
309
312
|
renderContentFileTree: (e) => /* @__PURE__ */ F(Z, { ...e })
|
|
310
313
|
}), oe = (e) => e == null || /[\s/]/.test(e), se = (e, t, n) => {
|
|
@@ -375,7 +378,7 @@ var B = {
|
|
|
375
378
|
let i = r;
|
|
376
379
|
for (; i < e.length && !/\s/.test(e[i]);) i++;
|
|
377
380
|
let a = e.slice(r, i);
|
|
378
|
-
if (
|
|
381
|
+
if (a.startsWith(n) && !a.slice(n.length).includes(n)) return {
|
|
379
382
|
start: r,
|
|
380
383
|
end: i
|
|
381
384
|
};
|
|
@@ -585,8 +588,8 @@ var B = {
|
|
|
585
588
|
},
|
|
586
589
|
onToggleFavorite: s,
|
|
587
590
|
onBrowse: () => {
|
|
588
|
-
let n = Y(t);
|
|
589
|
-
P(
|
|
591
|
+
let n = Y(t), r = J(t);
|
|
592
|
+
P(r), I.current = n ?? null, e(), j(!0);
|
|
590
593
|
},
|
|
591
594
|
onViewDetails: (n) => {
|
|
592
595
|
J(t), e(), N(n.id);
|
|
@@ -601,76 +604,76 @@ var B = {
|
|
|
601
604
|
s,
|
|
602
605
|
m,
|
|
603
606
|
E
|
|
604
|
-
])
|
|
607
|
+
]), de = D(() => e ? {
|
|
608
|
+
key: "skills",
|
|
609
|
+
title: _,
|
|
610
|
+
icon: /* @__PURE__ */ F(A, {
|
|
611
|
+
size: i,
|
|
612
|
+
"aria-hidden": !0,
|
|
613
|
+
stroke: l
|
|
614
|
+
}),
|
|
615
|
+
renderOverlay: $,
|
|
616
|
+
backLabel: v
|
|
617
|
+
} : void 0, [
|
|
618
|
+
e,
|
|
619
|
+
_,
|
|
620
|
+
v,
|
|
621
|
+
$
|
|
622
|
+
]), pe = D(() => e ? {
|
|
623
|
+
triggerPrefix: ye,
|
|
624
|
+
menuLabel: _,
|
|
625
|
+
emptyQueryHint: b,
|
|
626
|
+
onTextPaste: Q,
|
|
627
|
+
renderMenu: ({ query: e, caretPosition: t, close: n, listboxId: r, activeOptionId: i }) => /* @__PURE__ */ F(q, {
|
|
628
|
+
favorites: G,
|
|
629
|
+
searchQuery: e,
|
|
630
|
+
listboxId: r,
|
|
631
|
+
activeOptionId: i,
|
|
632
|
+
onSelect: (e) => {
|
|
633
|
+
n({ consumeQuery: !0 }), K(e.id, e.name, t);
|
|
634
|
+
},
|
|
635
|
+
onToggleFavorite: s,
|
|
636
|
+
onBrowse: () => {
|
|
637
|
+
let r = `${ye}${e}`, i = B.anchors.find((e) => e.start === t && e.length === r.length);
|
|
638
|
+
n({
|
|
639
|
+
consumeQuery: !0,
|
|
640
|
+
returnFocus: !1
|
|
641
|
+
}), P(t), I.current = {
|
|
642
|
+
position: t,
|
|
643
|
+
text: r,
|
|
644
|
+
mentionUrl: i?.url
|
|
645
|
+
}, j(!0);
|
|
646
|
+
},
|
|
647
|
+
onViewDetails: (e) => {
|
|
648
|
+
n({ consumeQuery: !0 }), N(e.id);
|
|
649
|
+
},
|
|
650
|
+
isRowTooltipHidden: m,
|
|
651
|
+
labels: E
|
|
652
|
+
})
|
|
653
|
+
} : void 0, [
|
|
654
|
+
e,
|
|
655
|
+
_,
|
|
656
|
+
b,
|
|
657
|
+
G,
|
|
658
|
+
K,
|
|
659
|
+
B.anchors,
|
|
660
|
+
s,
|
|
661
|
+
m,
|
|
662
|
+
E,
|
|
663
|
+
Q
|
|
664
|
+
]), _e = w(() => {
|
|
665
|
+
j(!1);
|
|
666
|
+
let e = I.current;
|
|
667
|
+
if (I.current = null, e == null) return;
|
|
668
|
+
let { position: t, text: n, mentionUrl: r } = e;
|
|
669
|
+
r == null ? B.onDraftChange(B.draft.slice(0, t) + n + B.draft.slice(t)) : B.restoreMention(r, n.slice(1), t), R((e) => e + 1), z(t + n.length);
|
|
670
|
+
}, [B]);
|
|
605
671
|
return {
|
|
606
|
-
skillMenuOverlay:
|
|
607
|
-
|
|
608
|
-
title: _,
|
|
609
|
-
icon: /* @__PURE__ */ F(A, {
|
|
610
|
-
size: i,
|
|
611
|
-
"aria-hidden": !0,
|
|
612
|
-
stroke: l
|
|
613
|
-
}),
|
|
614
|
-
renderOverlay: $,
|
|
615
|
-
backLabel: v
|
|
616
|
-
} : void 0, [
|
|
617
|
-
e,
|
|
618
|
-
_,
|
|
619
|
-
v,
|
|
620
|
-
$
|
|
621
|
-
]),
|
|
622
|
-
commandMenu: D(() => e ? {
|
|
623
|
-
triggerPrefix: ye,
|
|
624
|
-
menuLabel: _,
|
|
625
|
-
emptyQueryHint: b,
|
|
626
|
-
onTextPaste: Q,
|
|
627
|
-
renderMenu: ({ query: e, caretPosition: t, close: n, listboxId: r, activeOptionId: i }) => /* @__PURE__ */ F(q, {
|
|
628
|
-
favorites: G,
|
|
629
|
-
searchQuery: e,
|
|
630
|
-
listboxId: r,
|
|
631
|
-
activeOptionId: i,
|
|
632
|
-
onSelect: (e) => {
|
|
633
|
-
n({ consumeQuery: !0 }), K(e.id, e.name, t);
|
|
634
|
-
},
|
|
635
|
-
onToggleFavorite: s,
|
|
636
|
-
onBrowse: () => {
|
|
637
|
-
let r = `${ye}${e}`, i = B.anchors.find((e) => e.start === t && e.length === r.length);
|
|
638
|
-
n({
|
|
639
|
-
consumeQuery: !0,
|
|
640
|
-
returnFocus: !1
|
|
641
|
-
}), P(t), I.current = {
|
|
642
|
-
position: t,
|
|
643
|
-
text: r,
|
|
644
|
-
mentionUrl: i?.url
|
|
645
|
-
}, j(!0);
|
|
646
|
-
},
|
|
647
|
-
onViewDetails: (e) => {
|
|
648
|
-
n({ consumeQuery: !0 }), N(e.id);
|
|
649
|
-
},
|
|
650
|
-
isRowTooltipHidden: m,
|
|
651
|
-
labels: E
|
|
652
|
-
})
|
|
653
|
-
} : void 0, [
|
|
654
|
-
e,
|
|
655
|
-
_,
|
|
656
|
-
b,
|
|
657
|
-
G,
|
|
658
|
-
K,
|
|
659
|
-
B.anchors,
|
|
660
|
-
s,
|
|
661
|
-
m,
|
|
662
|
-
E,
|
|
663
|
-
Q
|
|
664
|
-
]),
|
|
672
|
+
skillMenuOverlay: de,
|
|
673
|
+
commandMenu: pe,
|
|
665
674
|
skillCatalogModal: /* @__PURE__ */ F(ae, {
|
|
666
675
|
isOpen: ee,
|
|
667
|
-
onClose:
|
|
668
|
-
j(!1);
|
|
669
|
-
let e = I.current;
|
|
670
|
-
if (I.current = null, e == null) return;
|
|
671
|
-
let { position: t, text: n, mentionUrl: r } = e;
|
|
672
|
-
r == null ? B.onDraftChange(B.draft.slice(0, t) + n + B.draft.slice(t)) : B.restoreMention(r, n.slice(1), t), R((e) => e + 1), z(t + n.length);
|
|
673
|
-
}, [B]),
|
|
676
|
+
onClose: _e,
|
|
674
677
|
onSelect: (e) => {
|
|
675
678
|
I.current = null, K(e, U(e), te), j(!1);
|
|
676
679
|
},
|
|
@@ -756,7 +759,7 @@ var B = {
|
|
|
756
759
|
searchable: !0,
|
|
757
760
|
open: D,
|
|
758
761
|
onOpenChange: (e) => {
|
|
759
|
-
e
|
|
762
|
+
(!e || T) && _(e);
|
|
760
763
|
},
|
|
761
764
|
onSearchQueryChange: b,
|
|
762
765
|
value: i,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epam/ai-dial-skills",
|
|
3
3
|
"description": "Host-agnostic UI for picking a favorite skill to attach to a chat input",
|
|
4
|
-
"version": "1.3.0-dev.
|
|
4
|
+
"version": "1.3.0-dev.126",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./index.js",
|
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@tabler/icons-react": "^3.44.0",
|
|
21
|
-
"@epam/ai-dial-catalog": "1.3.0-dev.
|
|
22
|
-
"@epam/ai-dial-conversation-input": "1.3.0-dev.
|
|
21
|
+
"@epam/ai-dial-catalog": "1.3.0-dev.126",
|
|
22
|
+
"@epam/ai-dial-conversation-input": "1.3.0-dev.126"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"@epam/ai-dial-chat-shared": "1.3.0-dev.
|
|
25
|
+
"@epam/ai-dial-chat-shared": "1.3.0-dev.126",
|
|
26
26
|
"@epam/ai-dial-react-file-manager": "^0.4.0-dev.11",
|
|
27
27
|
"@epam/ai-dial-ui-kit": "^0.16.0-dev.20",
|
|
28
28
|
"react": "^19.2.8"
|