@epam/ai-dial-skills 1.2.0-dev.6 → 1.2.0-dev.69
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/components/ChatSkill/ChatSkill.d.ts.map +1 -1
- package/components/FavoriteSkillsPanel/FavoriteSkillsPanel.d.ts.map +1 -1
- package/constants/public-class-names.d.ts +13 -0
- package/constants/public-class-names.d.ts.map +1 -0
- package/index.css +1 -1
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +64 -61
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatSkill.d.ts","sourceRoot":"","sources":["../../../src/components/ChatSkill/ChatSkill.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAY,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ChatSkill.d.ts","sourceRoot":"","sources":["../../../src/components/ChatSkill/ChatSkill.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAY,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAGpE;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CAmFxC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FavoriteSkillsPanel.d.ts","sourceRoot":"","sources":["../../../src/components/FavoriteSkillsPanel/FavoriteSkillsPanel.tsx"],"names":[],"mappings":"AAaA,OAAO,EAKL,KAAK,EAAE,EAER,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"FavoriteSkillsPanel.d.ts","sourceRoot":"","sources":["../../../src/components/FavoriteSkillsPanel/FavoriteSkillsPanel.tsx"],"names":[],"mappings":"AAaA,OAAO,EAKL,KAAK,EAAE,EAER,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AAYzF,sHAAsH;AACtH,eAAO,MAAM,mBAAmB,EAAE,EAAE,CAAC,wBAAwB,CAiQ5D,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const SKILLS_CLASS: {
|
|
2
|
+
/** The favorite-skills panel root, which carries the themed CSS variables. */
|
|
3
|
+
readonly favoritesPanel: "dial-skills-favorites-panel";
|
|
4
|
+
/**
|
|
5
|
+
* The `/name` chip a `ChatSkill` renders inside the composer, additive to
|
|
6
|
+
* the `dial-kit-base-button` that `@epam/ai-dial-ui-kit` draws. The chip's
|
|
7
|
+
* height is its label line, so a host changing its padding should keep the
|
|
8
|
+
* vertical padding at zero or the chip stops aligning with the input's first
|
|
9
|
+
* text line.
|
|
10
|
+
*/
|
|
11
|
+
readonly chip: "dial-skills-chip";
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=public-class-names.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public-class-names.d.ts","sourceRoot":"","sources":["../../src/constants/public-class-names.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,YAAY;IACvB,8EAA8E;;IAE9E;;;;;;OAMG;;CAEK,CAAC"}
|
package/index.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
._row_1ovug_1:hover,._row_1ovug_1:focus-visible{background:var(--fs-row-hover-bg,var(--bg-layer-sunken,#eef1f7))}._header_1ovug_5{color:var(--fs-header-text,var(--text-tertiary,#848e9c))}._emptyHint_1ovug_9{color:var(--fs-empty-hint-text,var(--text-icon-tertiary,#848e9c))}._star_1ovug_13{color:var(--fs-star-color,var(--text-warning-icon,#eec840))}._footer_1ovug_17{border-top-color:var(--fs-footer-border,var(--stroke-tertiary,#e0e6f0))}._rowEnter_1ovug_25{animation:.2s ease-out _rowFadeIn_1ovug_1}._rowLeaving_1ovug_29{pointer-events:none;animation:.18s ease-out forwards _rowFadeOut_1ovug_1}@keyframes _rowFadeIn_1ovug_1{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}@keyframes _rowFadeOut_1ovug_1{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.96)}}._listContent_1ovug_57{transition:max-height .2s}@media (prefers-reduced-motion:reduce){._rowEnter_1ovug_25,._rowLeaving_1ovug_29{animation:none}._listContent_1ovug_57{transition:none}}
|
|
2
|
-
/*$vite$:1
|
|
2
|
+
/*$vite$:1*/.visible{visibility:visible}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.hidden{display:none}.h-\[24px\]{height:24px}.h-\[40px\]{height:40px}.h-\[min\(80vh\2c 840px\)\]{height:min(80vh,840px)}.h-\[min\(90vh\2c 860px\)\]{height:min(90vh,860px)}.h-auto{height:auto}.max-h-72{max-height:18rem}.min-h-0{min-height:0}.w-full{width:100%}.min-w-0{min-width:0}.\!max-w-\[min\(95vw\2c 1200px\)\]{max-width:min(95vw,1200px)!important}.max-w-\[550px\]{max-width:550px}.flex-1{flex:1 1 0%}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.self-start{align-self:flex-start}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.border-t{border-top-width:1px}.border-transparent{border-color:transparent}.bg-error{background-color:var(--bg-error,#f3d6d8)}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-0{padding-bottom:0;padding-top:0}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-1\.5{padding-bottom:.375rem;padding-top:.375rem}.py-3{padding-bottom:.75rem;padding-top:.75rem}.py-4{padding-bottom:1rem;padding-top:1rem}.pb-0{padding-bottom:0}.pb-0\.5{padding-bottom:.125rem}.pb-1{padding-bottom:.25rem}.pt-2{padding-top:.5rem}.text-start{text-align:start}.text-error{color:var(--text-error,#ae2f2f)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}@media (min-width:1280px){.desktop\:w-\[280px\]{width:280px}}
|
package/index.d.ts
CHANGED
|
@@ -12,4 +12,5 @@ export type { SkillCatalogModalProps } from './models/skill-catalog-modal-props'
|
|
|
12
12
|
export type { SkillDetailsSidePanelProps } from './models/skill-details-side-panel-props';
|
|
13
13
|
export type { SkillInfoTooltipContentProps } from './models/skill-info-tooltip-content-props';
|
|
14
14
|
export type { SkillDetailsPanelComponentProps, SkillSelectorOverlayLabels, UseSkillSelectorOverlayOptions, UseSkillSelectorOverlayResult, } from './models/skill-selector-overlay';
|
|
15
|
+
export { SKILLS_CLASS } from './constants/public-class-names';
|
|
15
16
|
//# sourceMappingURL=index.d.ts.map
|
package/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,sDAAsD,CAAC;AAC3F,OAAO,EAAE,iBAAiB,EAAE,MAAM,kDAAkD,CAAC;AACrF,OAAO,EAAE,qBAAqB,EAAE,MAAM,0DAA0D,CAAC;AACjG,OAAO,EAAE,uBAAuB,EAAE,MAAM,8DAA8D,CAAC;AACvG,OAAO,EAAE,uBAAuB,EAAE,MAAM,yDAAyD,CAAC;AAClG,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,YAAY,EACV,eAAe,EACf,cAAc,GACf,MAAM,2BAA2B,CAAC;AACnC,YAAY,EACV,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,8BAA8B,CAAC;AACtC,YAAY,EACV,yBAAyB,EACzB,yBAAyB,EACzB,wBAAwB,GACzB,MAAM,sCAAsC,CAAC;AAC9C,YAAY,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AACjF,YAAY,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AAC1F,YAAY,EAAE,4BAA4B,EAAE,MAAM,2CAA2C,CAAC;AAC9F,YAAY,EACV,+BAA+B,EAC/B,0BAA0B,EAC1B,8BAA8B,EAC9B,6BAA6B,GAC9B,MAAM,iCAAiC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,sDAAsD,CAAC;AAC3F,OAAO,EAAE,iBAAiB,EAAE,MAAM,kDAAkD,CAAC;AACrF,OAAO,EAAE,qBAAqB,EAAE,MAAM,0DAA0D,CAAC;AACjG,OAAO,EAAE,uBAAuB,EAAE,MAAM,8DAA8D,CAAC;AACvG,OAAO,EAAE,uBAAuB,EAAE,MAAM,yDAAyD,CAAC;AAClG,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,YAAY,EACV,eAAe,EACf,cAAc,GACf,MAAM,2BAA2B,CAAC;AACnC,YAAY,EACV,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,8BAA8B,CAAC;AACtC,YAAY,EACV,yBAAyB,EACzB,yBAAyB,EACzB,wBAAwB,GACzB,MAAM,sCAAsC,CAAC;AAC9C,YAAY,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AACjF,YAAY,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AAC1F,YAAY,EAAE,4BAA4B,EAAE,MAAM,2CAA2C,CAAC;AAC9F,YAAY,EACV,+BAA+B,EAC/B,0BAA0B,EAC1B,8BAA8B,EAC9B,6BAA6B,GAC9B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC"}
|
package/index.js
CHANGED
|
@@ -4,8 +4,11 @@ import { Suspense as g, useCallback as _, useEffect as v, useLayoutEffect as y,
|
|
|
4
4
|
import { IconBlocks as C, IconEye as w, IconStarFilled as T } from "@tabler/icons-react";
|
|
5
5
|
import { jsx as E, jsxs as D } from "react/jsx-runtime";
|
|
6
6
|
import { DetailsPanel as O } from "@epam/ai-dial-catalog";
|
|
7
|
-
//#region src/
|
|
8
|
-
var k =
|
|
7
|
+
//#region src/constants/public-class-names.ts
|
|
8
|
+
var k = {
|
|
9
|
+
favoritesPanel: "dial-skills-favorites-panel",
|
|
10
|
+
chip: "dial-skills-chip"
|
|
11
|
+
}, A = ({ description: e, unsupportedMessage: t, viewDetailsLabel: n = "View details", onViewDetails: r }) => t == null ? /* @__PURE__ */ D("div", {
|
|
9
12
|
className: "flex flex-col gap-3",
|
|
10
13
|
children: [e != null && e !== "" && /* @__PURE__ */ E("p", {
|
|
11
14
|
className: "text-start",
|
|
@@ -25,13 +28,13 @@ var k = ({ description: e, unsupportedMessage: t, viewDetailsLabel: n = "View de
|
|
|
25
28
|
}) : /* @__PURE__ */ E("p", {
|
|
26
29
|
className: "text-start",
|
|
27
30
|
children: t
|
|
28
|
-
}),
|
|
31
|
+
}), j = ({ name: e, path: t, description: r, isUnsupported: i = !1, labelClassName: a = "dial-body-paragraph-text", unsupportedLabelClassName: o = "text-error", unsupportedClassName: s = "bg-error", onViewDetails: c, labels: u = {} }) => {
|
|
29
32
|
let { viewDetailsLabel: f = "View details", unsupportedTooltipLabel: p = "Selected model does not support skills. Remove the skill or select different model to proceed." } = u, [m, g] = S(0);
|
|
30
33
|
return /* @__PURE__ */ E(d, {
|
|
31
34
|
asChild: !0,
|
|
32
35
|
placement: h.Top,
|
|
33
36
|
contentClassName: "max-w-[550px]",
|
|
34
|
-
content: i ? /* @__PURE__ */ E(
|
|
37
|
+
content: i ? /* @__PURE__ */ E(A, { unsupportedMessage: p }) : /* @__PURE__ */ E(A, {
|
|
35
38
|
description: r,
|
|
36
39
|
viewDetailsLabel: f,
|
|
37
40
|
onViewDetails: () => {
|
|
@@ -43,11 +46,11 @@ var k = ({ description: e, unsupportedMessage: t, viewDetailsLabel: n = "View de
|
|
|
43
46
|
children: /* @__PURE__ */ E(l, {
|
|
44
47
|
label: `/${e}`,
|
|
45
48
|
textClassName: i ? n(a, o) : a,
|
|
46
|
-
className:
|
|
49
|
+
className: n("h-auto px-2 py-0", i && s, k.chip)
|
|
47
50
|
})
|
|
48
51
|
})
|
|
49
52
|
}, m);
|
|
50
|
-
},
|
|
53
|
+
}, M = {
|
|
51
54
|
row: "_row_1ovug_1",
|
|
52
55
|
header: "_header_1ovug_5",
|
|
53
56
|
emptyHint: "_emptyHint_1ovug_9",
|
|
@@ -58,58 +61,58 @@ var k = ({ description: e, unsupportedMessage: t, viewDetailsLabel: n = "View de
|
|
|
58
61
|
rowLeaving: "_rowLeaving_1ovug_29",
|
|
59
62
|
rowFadeOut: "_rowFadeOut_1ovug_1",
|
|
60
63
|
listContent: "_listContent_1ovug_57"
|
|
61
|
-
},
|
|
62
|
-
let { myCollectionLabel: C = "My Collection", emptyHintLabel: w = "Star a skill to pin it here", browseLabel: O = "Browse", removeFromFavoritesLabel:
|
|
64
|
+
}, N = "px-3 pb-0.5 pt-2", P = 180, F = 288, I = ({ favorites: r, onSelect: i, onToggleFavorite: a, onBrowse: o, onViewDetails: c, searchQuery: f, labels: p = {}, colors: h, nameClassName: g = "dial-small-text", headerClassName: _ = "dial-tiny-lead-semi-text", emptyHintClassName: b = "dial-small-text" }) => {
|
|
65
|
+
let { myCollectionLabel: C = "My Collection", emptyHintLabel: w = "Star a skill to pin it here", browseLabel: O = "Browse", removeFromFavoritesLabel: j = "Remove from favorites", viewDetailsLabel: I = "View details", noMatchingSkillsLabel: L = "No matching skills" } = p, R = t({
|
|
63
66
|
"--fs-row-hover-bg": h?.rowHoverBackground,
|
|
64
67
|
"--fs-header-text": h?.headerText,
|
|
65
68
|
"--fs-empty-hint-text": h?.emptyHintText,
|
|
66
69
|
"--fs-star-color": h?.starColor,
|
|
67
70
|
"--fs-footer-border": h?.footerBorder
|
|
68
|
-
}), [
|
|
71
|
+
}), [z, B] = S(/* @__PURE__ */ new Set()), V = x(/* @__PURE__ */ new Map());
|
|
69
72
|
v(() => {
|
|
70
|
-
let e =
|
|
73
|
+
let e = V.current;
|
|
71
74
|
return () => {
|
|
72
75
|
e.forEach((e) => clearTimeout(e)), e.clear();
|
|
73
76
|
};
|
|
74
77
|
}, []);
|
|
75
|
-
let
|
|
78
|
+
let H = f != null, U = f?.toLowerCase() ?? "", W = H ? r.filter((e) => e.name.toLowerCase().includes(U)) : r, G = x(null), [K, q] = S();
|
|
76
79
|
y(() => {
|
|
77
|
-
|
|
80
|
+
G.current && q(Math.min(G.current.scrollHeight, F));
|
|
78
81
|
}, [r, f]);
|
|
79
|
-
let
|
|
82
|
+
let J = (e, t) => {
|
|
80
83
|
e.target === e.currentTarget && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), i(t));
|
|
81
|
-
},
|
|
82
|
-
|
|
84
|
+
}, Y = (e) => {
|
|
85
|
+
B((t) => new Set(t).add(e));
|
|
83
86
|
let t = setTimeout(() => {
|
|
84
|
-
a(e),
|
|
87
|
+
a(e), B((t) => {
|
|
85
88
|
let n = new Set(t);
|
|
86
89
|
return n.delete(e), n;
|
|
87
|
-
}),
|
|
88
|
-
},
|
|
89
|
-
|
|
90
|
+
}), V.current.delete(e);
|
|
91
|
+
}, P);
|
|
92
|
+
V.current.set(e, t);
|
|
90
93
|
};
|
|
91
94
|
return /* @__PURE__ */ D("div", {
|
|
92
|
-
className: "flex w-full flex-col desktop:w-[280px]",
|
|
93
|
-
style:
|
|
95
|
+
className: n("flex w-full flex-col desktop:w-[280px]", k.favoritesPanel),
|
|
96
|
+
style: R,
|
|
94
97
|
children: [
|
|
95
98
|
/* @__PURE__ */ E("p", {
|
|
96
|
-
className: n(_,
|
|
99
|
+
className: n(_, N, M.header),
|
|
97
100
|
children: C
|
|
98
101
|
}),
|
|
99
102
|
/* @__PURE__ */ E("div", {
|
|
100
|
-
className: n("max-h-72 min-h-0 flex-1 overflow-y-auto",
|
|
101
|
-
style: { maxHeight:
|
|
103
|
+
className: n("max-h-72 min-h-0 flex-1 overflow-y-auto", M.listContent),
|
|
104
|
+
style: { maxHeight: K },
|
|
102
105
|
children: /* @__PURE__ */ E("div", {
|
|
103
|
-
ref:
|
|
104
|
-
children:
|
|
106
|
+
ref: G,
|
|
107
|
+
children: W.length > 0 ? /* @__PURE__ */ E("ul", {
|
|
105
108
|
className: "flex flex-col gap-1 px-1 pb-1",
|
|
106
|
-
children:
|
|
109
|
+
children: W.map((t) => {
|
|
107
110
|
let r = /* @__PURE__ */ D("div", {
|
|
108
111
|
role: "button",
|
|
109
112
|
tabIndex: 0,
|
|
110
|
-
className: n("flex cursor-pointer items-center gap-2 rounded-lg border border-transparent px-2 py-1.5 transition-colors",
|
|
113
|
+
className: n("flex cursor-pointer items-center gap-2 rounded-lg border border-transparent px-2 py-1.5 transition-colors", M.row),
|
|
111
114
|
onClick: () => i(t),
|
|
112
|
-
onKeyDown: (e) =>
|
|
115
|
+
onKeyDown: (e) => J(e, t),
|
|
113
116
|
children: [
|
|
114
117
|
/* @__PURE__ */ E(e, {
|
|
115
118
|
size: s.MD,
|
|
@@ -127,44 +130,44 @@ var k = ({ description: e, unsupportedMessage: t, viewDetailsLabel: n = "View de
|
|
|
127
130
|
/* @__PURE__ */ E(m, {
|
|
128
131
|
icon: /* @__PURE__ */ E(T, {
|
|
129
132
|
size: s.SM,
|
|
130
|
-
className:
|
|
133
|
+
className: M.star,
|
|
131
134
|
"aria-hidden": !0
|
|
132
135
|
}),
|
|
133
|
-
"aria-label":
|
|
136
|
+
"aria-label": j,
|
|
134
137
|
isSelected: !0,
|
|
135
138
|
onClick: (e) => {
|
|
136
|
-
e.stopPropagation(),
|
|
139
|
+
e.stopPropagation(), Y(t.id);
|
|
137
140
|
}
|
|
138
141
|
})
|
|
139
142
|
]
|
|
140
143
|
});
|
|
141
144
|
return /* @__PURE__ */ E("li", {
|
|
142
|
-
className:
|
|
145
|
+
className: z.has(t.id) ? M.rowLeaving : M.rowEnter,
|
|
143
146
|
children: /* @__PURE__ */ E(d, {
|
|
144
147
|
asChild: !0,
|
|
145
148
|
contentClassName: "max-w-[550px]",
|
|
146
|
-
content: /* @__PURE__ */ E(
|
|
149
|
+
content: /* @__PURE__ */ E(A, {
|
|
147
150
|
description: t.description,
|
|
148
|
-
viewDetailsLabel:
|
|
151
|
+
viewDetailsLabel: I,
|
|
149
152
|
onViewDetails: () => c(t)
|
|
150
153
|
}),
|
|
151
154
|
children: r
|
|
152
155
|
})
|
|
153
156
|
}, t.id);
|
|
154
157
|
})
|
|
155
|
-
}) :
|
|
158
|
+
}) : H && U !== "" ? /* @__PURE__ */ E("p", {
|
|
156
159
|
role: "status",
|
|
157
160
|
"aria-live": "polite",
|
|
158
|
-
className: n(b, "px-4 py-4 text-start",
|
|
159
|
-
children:
|
|
161
|
+
className: n(b, "px-4 py-4 text-start", M.emptyHint),
|
|
162
|
+
children: L
|
|
160
163
|
}) : /* @__PURE__ */ E("p", {
|
|
161
|
-
className: n(b, "px-4 py-4 text-start",
|
|
164
|
+
className: n(b, "px-4 py-4 text-start", M.emptyHint),
|
|
162
165
|
children: w
|
|
163
166
|
})
|
|
164
167
|
})
|
|
165
168
|
}),
|
|
166
169
|
/* @__PURE__ */ E("div", {
|
|
167
|
-
className: n("border-t px-2 py-3",
|
|
170
|
+
className: n("border-t px-2 py-3", M.footer),
|
|
168
171
|
children: /* @__PURE__ */ E(l, {
|
|
169
172
|
label: O,
|
|
170
173
|
className: "w-full justify-center",
|
|
@@ -173,7 +176,7 @@ var k = ({ description: e, unsupportedMessage: t, viewDetailsLabel: n = "View de
|
|
|
173
176
|
})
|
|
174
177
|
]
|
|
175
178
|
});
|
|
176
|
-
},
|
|
179
|
+
}, L = ({ isOpen: e, onClose: t, onSelect: n, title: r, renderContent: i }) => /* @__PURE__ */ E(f, {
|
|
177
180
|
open: e,
|
|
178
181
|
header: r,
|
|
179
182
|
size: p.Lg,
|
|
@@ -186,15 +189,15 @@ var k = ({ description: e, unsupportedMessage: t, viewDetailsLabel: n = "View de
|
|
|
186
189
|
children: e && i(n, t)
|
|
187
190
|
})
|
|
188
191
|
})
|
|
189
|
-
}),
|
|
192
|
+
}), R = (e) => /* @__PURE__ */ E(O, { ...e }), z = (e) => ({
|
|
190
193
|
id: e.url,
|
|
191
194
|
name: e.name,
|
|
192
195
|
description: e.description
|
|
193
|
-
}),
|
|
196
|
+
}), B = (e) => {
|
|
194
197
|
let t = e.split("/").filter((e) => e.length > 0);
|
|
195
198
|
return t[t.length - 1] ?? e;
|
|
196
|
-
},
|
|
197
|
-
let { addMenuLabel: p = "Skills", backLabel: m = "Back", catalogModalTitleLabel: h = "Use skill", emptyQueryHintLabel: v = "Type to filter", unsupportedTooltipLabel: y = "Selected model does not support skills. Remove the skill or select different model to proceed.", panelLabels: x } = l ?? {}, w = e && t, [T, D] = S(!1), [O, k] = S(null), [
|
|
199
|
+
}, V = ({ isEnabled: e, isSkillsSupported: t, skills: n, sharedWithMe: i, publicSkills: a, favoriteIds: o, onToggleFavorite: s, labels: l, historyChipLabelClassName: u, renderCatalogContent: d, detailsPanelComponent: f }) => {
|
|
200
|
+
let { addMenuLabel: p = "Skills", backLabel: m = "Back", catalogModalTitleLabel: h = "Use skill", emptyQueryHintLabel: v = "Type to filter", unsupportedTooltipLabel: y = "Selected model does not support skills. Remove the skill or select different model to proceed.", panelLabels: x } = l ?? {}, w = e && t, [T, D] = S(!1), [O, k] = S(null), [A, M] = S(null), N = b(() => [
|
|
198
201
|
...n,
|
|
199
202
|
...i ?? [],
|
|
200
203
|
...a ?? []
|
|
@@ -202,14 +205,14 @@ var k = ({ description: e, unsupportedMessage: t, viewDetailsLabel: n = "View de
|
|
|
202
205
|
n,
|
|
203
206
|
i,
|
|
204
207
|
a
|
|
205
|
-
]), P = b(() => new Map(N.map((e) => [e.url, e])), [N]),
|
|
208
|
+
]), P = b(() => new Map(N.map((e) => [e.url, e])), [N]), F = b(() => N.filter((e) => o.has(e.url)).map((e) => z(e)), [N, o]), R = b(() => A == null ? null : P.get(A) ?? null, [P, A]), V = R != null && !t, H = _((e) => {
|
|
206
209
|
M(e);
|
|
207
210
|
}, []), U = _(() => {
|
|
208
211
|
M(null);
|
|
209
|
-
}, []), W =
|
|
210
|
-
name:
|
|
211
|
-
path:
|
|
212
|
-
description:
|
|
212
|
+
}, []), W = A, G = b(() => A == null ? void 0 : [{ url: A }], [A]), K = b(() => R == null ? null : /* @__PURE__ */ E(j, {
|
|
213
|
+
name: R.name,
|
|
214
|
+
path: R.url,
|
|
215
|
+
description: R.description,
|
|
213
216
|
isUnsupported: V,
|
|
214
217
|
onViewDetails: k,
|
|
215
218
|
labels: {
|
|
@@ -217,14 +220,14 @@ var k = ({ description: e, unsupportedMessage: t, viewDetailsLabel: n = "View de
|
|
|
217
220
|
unsupportedTooltipLabel: y
|
|
218
221
|
}
|
|
219
222
|
}), [
|
|
220
|
-
|
|
223
|
+
R,
|
|
221
224
|
V,
|
|
222
225
|
x,
|
|
223
226
|
y
|
|
224
227
|
]), q = _((e) => e == null || e.length === 0 ? null : e.map((e) => {
|
|
225
228
|
let t = P.get(e.url);
|
|
226
|
-
return /* @__PURE__ */ E(
|
|
227
|
-
name: t?.name ??
|
|
229
|
+
return /* @__PURE__ */ E(j, {
|
|
230
|
+
name: t?.name ?? B(e.url),
|
|
228
231
|
path: e.url,
|
|
229
232
|
labelClassName: u,
|
|
230
233
|
description: t?.description,
|
|
@@ -235,8 +238,8 @@ var k = ({ description: e, unsupportedMessage: t, viewDetailsLabel: n = "View de
|
|
|
235
238
|
P,
|
|
236
239
|
u,
|
|
237
240
|
x
|
|
238
|
-
]), J = _((e) => /* @__PURE__ */ E(
|
|
239
|
-
favorites:
|
|
241
|
+
]), J = _((e) => /* @__PURE__ */ E(I, {
|
|
242
|
+
favorites: F,
|
|
240
243
|
onSelect: (t) => {
|
|
241
244
|
H(t.id), e();
|
|
242
245
|
},
|
|
@@ -249,7 +252,7 @@ var k = ({ description: e, unsupportedMessage: t, viewDetailsLabel: n = "View de
|
|
|
249
252
|
},
|
|
250
253
|
labels: x
|
|
251
254
|
}), [
|
|
252
|
-
|
|
255
|
+
F,
|
|
253
256
|
H,
|
|
254
257
|
s,
|
|
255
258
|
x
|
|
@@ -272,8 +275,8 @@ var k = ({ description: e, unsupportedMessage: t, viewDetailsLabel: n = "View de
|
|
|
272
275
|
triggerPrefix: "/",
|
|
273
276
|
menuLabel: p,
|
|
274
277
|
emptyQueryHint: v,
|
|
275
|
-
renderMenu: ({ query: e, close: t }) => /* @__PURE__ */ E(
|
|
276
|
-
favorites:
|
|
278
|
+
renderMenu: ({ query: e, close: t }) => /* @__PURE__ */ E(I, {
|
|
279
|
+
favorites: F,
|
|
277
280
|
searchQuery: e,
|
|
278
281
|
onSelect: (e) => {
|
|
279
282
|
t({ consumeQuery: !0 }), H(e.id);
|
|
@@ -291,7 +294,7 @@ var k = ({ description: e, unsupportedMessage: t, viewDetailsLabel: n = "View de
|
|
|
291
294
|
w,
|
|
292
295
|
p,
|
|
293
296
|
v,
|
|
294
|
-
|
|
297
|
+
F,
|
|
295
298
|
H,
|
|
296
299
|
s,
|
|
297
300
|
x
|
|
@@ -299,7 +302,7 @@ var k = ({ description: e, unsupportedMessage: t, viewDetailsLabel: n = "View de
|
|
|
299
302
|
return e ? {
|
|
300
303
|
skillMenuOverlay: Y,
|
|
301
304
|
commandMenu: X,
|
|
302
|
-
skillCatalogModal: /* @__PURE__ */ E(
|
|
305
|
+
skillCatalogModal: /* @__PURE__ */ E(L, {
|
|
303
306
|
isOpen: T,
|
|
304
307
|
onClose: () => D(!1),
|
|
305
308
|
onSelect: (e) => {
|
|
@@ -337,4 +340,4 @@ var k = ({ description: e, unsupportedMessage: t, viewDetailsLabel: n = "View de
|
|
|
337
340
|
};
|
|
338
341
|
};
|
|
339
342
|
//#endregion
|
|
340
|
-
export {
|
|
343
|
+
export { j as ChatSkill, I as FavoriteSkillsPanel, k as SKILLS_CLASS, L as SkillCatalogModal, R as SkillDetailsSidePanel, A as SkillInfoTooltipContent, z as buildFavoriteSkillItem, V as useSkillSelectorOverlay };
|
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.2.0-dev.
|
|
4
|
+
"version": "1.2.0-dev.69",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./index.js",
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@tabler/icons-react": "^3.44.0",
|
|
21
|
-
"@epam/ai-dial-catalog": "1.2.0-dev.
|
|
22
|
-
"@epam/ai-dial-conversation-input": "1.2.0-dev.
|
|
21
|
+
"@epam/ai-dial-catalog": "1.2.0-dev.69",
|
|
22
|
+
"@epam/ai-dial-conversation-input": "1.2.0-dev.69"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"@epam/ai-dial-chat-shared": "1.2.0-dev.
|
|
26
|
-
"@epam/ai-dial-ui-kit": "^0.
|
|
25
|
+
"@epam/ai-dial-chat-shared": "1.2.0-dev.69",
|
|
26
|
+
"@epam/ai-dial-ui-kit": "^0.15.0-dev.9",
|
|
27
27
|
"react": "^19.2.8"
|
|
28
28
|
},
|
|
29
29
|
"repository": {
|