@epam/ai-dial-skills 1.1.0-dev.475 → 1.1.0-dev.487
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 +4 -1
- package/components/ChatSkill/ChatSkill.d.ts.map +1 -1
- package/components/FavoriteSkillsPanel/FavoriteSkillsPanel.d.ts.map +1 -1
- package/components/SkillInfoTooltipContent/SkillInfoTooltipContent.d.ts +1 -1
- package/components/SkillInfoTooltipContent/SkillInfoTooltipContent.d.ts.map +1 -1
- package/hooks/useSkillSelectorOverlay/useSkillSelectorOverlay.d.ts +6 -7
- package/hooks/useSkillSelectorOverlay/useSkillSelectorOverlay.d.ts.map +1 -1
- package/index.js +209 -236
- package/models/chat-skill-props.d.ts +23 -10
- package/models/chat-skill-props.d.ts.map +1 -1
- package/models/favorite-skill-item.d.ts +7 -11
- package/models/favorite-skill-item.d.ts.map +1 -1
- package/models/favorite-skills-panel-props.d.ts +0 -2
- package/models/favorite-skills-panel-props.d.ts.map +1 -1
- package/models/skill-info-tooltip-content-props.d.ts +6 -6
- package/models/skill-info-tooltip-content-props.d.ts.map +1 -1
- package/models/skill-selector-overlay.d.ts +36 -18
- package/models/skill-selector-overlay.d.ts.map +1 -1
- package/package.json +6 -6
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { ChatSkillProps } from '../../models/chat-skill-props';
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* A used skill rendered as a `/name` ghost button with a description tooltip
|
|
5
|
+
* and a "View details" action, or the error state while unsupported.
|
|
6
|
+
*/
|
|
4
7
|
export declare const ChatSkill: FC<ChatSkillProps>;
|
|
5
8
|
//# sourceMappingURL=ChatSkill.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatSkill.d.ts","sourceRoot":"","sources":["../../../src/components/ChatSkill/ChatSkill.tsx"],"names":[],"mappings":"
|
|
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;AAC1C,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;AAEf,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AAYzF,sHAAsH;AACtH,eAAO,MAAM,mBAAmB,EAAE,EAAE,CAAC,wBAAwB,
|
|
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;AAEf,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AAYzF,sHAAsH;AACtH,eAAO,MAAM,mBAAmB,EAAE,EAAE,CAAC,wBAAwB,CA2P5D,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { SkillInfoTooltipContentProps } from '../../models/skill-info-tooltip-content-props';
|
|
3
|
-
/** Inner content of a skill's interactive tooltip: the description above a "View details" link action. */
|
|
3
|
+
/** Inner content of a skill's interactive tooltip: the description above a "View details" link action, or the unsupported-model message alone. */
|
|
4
4
|
export declare const SkillInfoTooltipContent: FC<SkillInfoTooltipContentProps>;
|
|
5
5
|
//# sourceMappingURL=SkillInfoTooltipContent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SkillInfoTooltipContent.d.ts","sourceRoot":"","sources":["../../../src/components/SkillInfoTooltipContent/SkillInfoTooltipContent.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SkillInfoTooltipContent.d.ts","sourceRoot":"","sources":["../../../src/components/SkillInfoTooltipContent/SkillInfoTooltipContent.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,+CAA+C,CAAC;AAElG,kJAAkJ;AAClJ,eAAO,MAAM,uBAAuB,EAAE,EAAE,CAAC,4BAA4B,CA8CpE,CAAC"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { UseSkillSelectorOverlayOptions, UseSkillSelectorOverlayResult } from '../../models/skill-selector-overlay';
|
|
2
2
|
/**
|
|
3
|
-
* Owns the Skills Add-menu flow: the favorites overlay
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* components.
|
|
3
|
+
* Owns the Skills Add-menu flow: the favorites overlay, the "Use skill"
|
|
4
|
+
* browse modal's open state, the skill details side panel's open state, and
|
|
5
|
+
* the single selected skill rendered as the input's inline `ChatSkill`
|
|
6
|
+
* element. The host injects the listing data, favorites state, labels, the
|
|
7
|
+
* deployment-support signal, and the modal/panel components.
|
|
9
8
|
*/
|
|
10
|
-
export declare const useSkillSelectorOverlay: ({ isEnabled, skills, sharedWithMe, publicSkills, favoriteIds, onToggleFavorite,
|
|
9
|
+
export declare const useSkillSelectorOverlay: ({ isEnabled, isSkillsSupported, skills, sharedWithMe, publicSkills, favoriteIds, onToggleFavorite, labels, historyChipLabelClassName, renderCatalogContent, detailsPanelComponent: DetailsPanelComponent, }: UseSkillSelectorOverlayOptions) => UseSkillSelectorOverlayResult;
|
|
11
10
|
//# sourceMappingURL=useSkillSelectorOverlay.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSkillSelectorOverlay.d.ts","sourceRoot":"","sources":["../../../src/hooks/useSkillSelectorOverlay/useSkillSelectorOverlay.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useSkillSelectorOverlay.d.ts","sourceRoot":"","sources":["../../../src/hooks/useSkillSelectorOverlay/useSkillSelectorOverlay.tsx"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EACV,8BAA8B,EAC9B,6BAA6B,EAC9B,MAAM,qCAAqC,CAAC;AAG7C;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,GAAI,6MAYrC,8BAA8B,KAAG,6BAoTnC,CAAC"}
|
package/index.js
CHANGED
|
@@ -1,61 +1,53 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { DetailsPanel as
|
|
1
|
+
import { DeploymentIcon as e, buildCssVars as t, mergeClasses as n } from "@epam/ai-dial-chat-shared";
|
|
2
|
+
import { BASE_ICON_SIZE as r, Button as i, ButtonAppearance as a, ButtonVariant as o, DIAL_ICON_SIZE as s, DIAL_KIT_ICON_STROKE as c, GhostButton as l, Highlight as u, InteractiveTooltip as d, Popup as f, PopupSize as p, ToggleIconButton as m, TooltipPlacement as h } from "@epam/ai-dial-ui-kit";
|
|
3
|
+
import { Suspense as g, useCallback as _, useEffect as v, useLayoutEffect as y, useMemo as b, useRef as x, useState as S } from "react";
|
|
4
|
+
import { IconBlocks as C, IconEye as w, IconStarFilled as T } from "@tabler/icons-react";
|
|
5
|
+
import { jsx as E, jsxs as D } from "react/jsx-runtime";
|
|
6
|
+
import { DetailsPanel as O } from "@epam/ai-dial-catalog";
|
|
7
7
|
//#region src/components/SkillInfoTooltipContent/SkillInfoTooltipContent.tsx
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
className: "
|
|
12
|
-
children:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
});
|
|
32
|
-
}, j = ({ name: e, path: t, description: n, isDescriptionLoading: r, labelClassName: i = "dial-body-paragraph-text", onViewDetails: a, onTooltipOpen: s, labels: l = {} }) => {
|
|
33
|
-
let { viewDetailsLabel: u = "View details" } = l, [d, f] = b(0);
|
|
34
|
-
return /* @__PURE__ */ w(c, {
|
|
8
|
+
var k = ({ description: e, unsupportedMessage: t, viewDetailsLabel: n = "View details", onViewDetails: r }) => t == null ? /* @__PURE__ */ D("div", {
|
|
9
|
+
className: "flex flex-col gap-3",
|
|
10
|
+
children: [e != null && e !== "" && /* @__PURE__ */ E("p", {
|
|
11
|
+
className: "text-start",
|
|
12
|
+
children: e
|
|
13
|
+
}), /* @__PURE__ */ E(i, {
|
|
14
|
+
variant: o.Primary,
|
|
15
|
+
appearance: a.Link,
|
|
16
|
+
className: "h-[24px] self-start",
|
|
17
|
+
label: n,
|
|
18
|
+
iconBefore: /* @__PURE__ */ E(w, {
|
|
19
|
+
size: s.SM,
|
|
20
|
+
stroke: c,
|
|
21
|
+
"aria-hidden": !0
|
|
22
|
+
}),
|
|
23
|
+
onClick: r
|
|
24
|
+
})]
|
|
25
|
+
}) : /* @__PURE__ */ E("p", {
|
|
26
|
+
className: "text-start",
|
|
27
|
+
children: t
|
|
28
|
+
}), A = ({ 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
|
+
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
|
+
return /* @__PURE__ */ E(d, {
|
|
35
31
|
asChild: !0,
|
|
36
|
-
placement:
|
|
32
|
+
placement: h.Top,
|
|
37
33
|
contentClassName: "max-w-[550px]",
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
content: /* @__PURE__ */ w(A, {
|
|
42
|
-
description: n,
|
|
43
|
-
isDescriptionLoading: r,
|
|
44
|
-
viewDetailsLabel: u,
|
|
34
|
+
content: i ? /* @__PURE__ */ E(k, { unsupportedMessage: p }) : /* @__PURE__ */ E(k, {
|
|
35
|
+
description: r,
|
|
36
|
+
viewDetailsLabel: f,
|
|
45
37
|
onViewDetails: () => {
|
|
46
|
-
|
|
38
|
+
g((e) => e + 1), c(t);
|
|
47
39
|
}
|
|
48
40
|
}),
|
|
49
|
-
children: /* @__PURE__ */
|
|
41
|
+
children: /* @__PURE__ */ E("span", {
|
|
50
42
|
className: "inline-flex items-center",
|
|
51
|
-
children: /* @__PURE__ */
|
|
43
|
+
children: /* @__PURE__ */ E(l, {
|
|
52
44
|
label: `/${e}`,
|
|
53
|
-
textClassName: i,
|
|
54
|
-
className: "h-auto px-2 py-0"
|
|
45
|
+
textClassName: i ? n(a, o) : a,
|
|
46
|
+
className: i ? n("h-auto px-2 py-0", s) : "h-auto px-2 py-0"
|
|
55
47
|
})
|
|
56
48
|
})
|
|
57
|
-
},
|
|
58
|
-
},
|
|
49
|
+
}, m);
|
|
50
|
+
}, j = {
|
|
59
51
|
row: "_row_1ovug_1",
|
|
60
52
|
header: "_header_1ovug_5",
|
|
61
53
|
emptyHint: "_emptyHint_1ovug_9",
|
|
@@ -66,290 +58,270 @@ var A = ({ description: e, isDescriptionLoading: o, viewDetailsLabel: s = "View
|
|
|
66
58
|
rowLeaving: "_rowLeaving_1ovug_29",
|
|
67
59
|
rowFadeOut: "_rowFadeOut_1ovug_1",
|
|
68
60
|
listContent: "_listContent_1ovug_57"
|
|
69
|
-
},
|
|
70
|
-
let { myCollectionLabel:
|
|
71
|
-
"--fs-row-hover-bg":
|
|
72
|
-
"--fs-header-text":
|
|
73
|
-
"--fs-empty-hint-text":
|
|
74
|
-
"--fs-star-color":
|
|
75
|
-
"--fs-footer-border":
|
|
76
|
-
}), [
|
|
77
|
-
|
|
78
|
-
let e =
|
|
61
|
+
}, M = "px-3 pb-0.5 pt-2", N = 180, P = 288, F = ({ 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" }) => {
|
|
62
|
+
let { myCollectionLabel: C = "My Collection", emptyHintLabel: w = "Star a skill to pin it here", browseLabel: O = "Browse", removeFromFavoritesLabel: A = "Remove from favorites", viewDetailsLabel: F = "View details", noMatchingSkillsLabel: I = "No matching skills" } = p, L = t({
|
|
63
|
+
"--fs-row-hover-bg": h?.rowHoverBackground,
|
|
64
|
+
"--fs-header-text": h?.headerText,
|
|
65
|
+
"--fs-empty-hint-text": h?.emptyHintText,
|
|
66
|
+
"--fs-star-color": h?.starColor,
|
|
67
|
+
"--fs-footer-border": h?.footerBorder
|
|
68
|
+
}), [R, z] = S(/* @__PURE__ */ new Set()), B = x(/* @__PURE__ */ new Map());
|
|
69
|
+
v(() => {
|
|
70
|
+
let e = B.current;
|
|
79
71
|
return () => {
|
|
80
72
|
e.forEach((e) => clearTimeout(e)), e.clear();
|
|
81
73
|
};
|
|
82
74
|
}, []);
|
|
83
|
-
let
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}, [
|
|
87
|
-
let
|
|
88
|
-
e.target === e.currentTarget && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), t
|
|
89
|
-
},
|
|
90
|
-
|
|
75
|
+
let V = f != null, H = f?.toLowerCase() ?? "", U = V ? r.filter((e) => e.name.toLowerCase().includes(H)) : r, W = x(null), [G, K] = S();
|
|
76
|
+
y(() => {
|
|
77
|
+
W.current && K(Math.min(W.current.scrollHeight, P));
|
|
78
|
+
}, [r, f]);
|
|
79
|
+
let q = (e, t) => {
|
|
80
|
+
e.target === e.currentTarget && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), i(t));
|
|
81
|
+
}, J = (e) => {
|
|
82
|
+
z((t) => new Set(t).add(e));
|
|
91
83
|
let t = setTimeout(() => {
|
|
92
|
-
|
|
84
|
+
a(e), z((t) => {
|
|
93
85
|
let n = new Set(t);
|
|
94
86
|
return n.delete(e), n;
|
|
95
|
-
}),
|
|
96
|
-
},
|
|
97
|
-
|
|
87
|
+
}), B.current.delete(e);
|
|
88
|
+
}, N);
|
|
89
|
+
B.current.set(e, t);
|
|
98
90
|
};
|
|
99
|
-
return /* @__PURE__ */
|
|
91
|
+
return /* @__PURE__ */ D("div", {
|
|
100
92
|
className: "flex w-full flex-col desktop:w-[280px]",
|
|
101
|
-
style:
|
|
93
|
+
style: L,
|
|
102
94
|
children: [
|
|
103
|
-
/* @__PURE__ */
|
|
104
|
-
className:
|
|
105
|
-
children:
|
|
95
|
+
/* @__PURE__ */ E("p", {
|
|
96
|
+
className: n(_, M, j.header),
|
|
97
|
+
children: C
|
|
106
98
|
}),
|
|
107
|
-
/* @__PURE__ */
|
|
108
|
-
className:
|
|
109
|
-
style: { maxHeight:
|
|
110
|
-
children: /* @__PURE__ */
|
|
111
|
-
ref:
|
|
112
|
-
children:
|
|
99
|
+
/* @__PURE__ */ E("div", {
|
|
100
|
+
className: n("max-h-72 min-h-0 flex-1 overflow-y-auto", j.listContent),
|
|
101
|
+
style: { maxHeight: G },
|
|
102
|
+
children: /* @__PURE__ */ E("div", {
|
|
103
|
+
ref: W,
|
|
104
|
+
children: U.length > 0 ? /* @__PURE__ */ E("ul", {
|
|
113
105
|
className: "flex flex-col gap-1 px-1 pb-1",
|
|
114
|
-
children:
|
|
115
|
-
let
|
|
106
|
+
children: U.map((t) => {
|
|
107
|
+
let r = /* @__PURE__ */ D("div", {
|
|
116
108
|
role: "button",
|
|
117
109
|
tabIndex: 0,
|
|
118
|
-
className:
|
|
119
|
-
onClick: () => t
|
|
120
|
-
onKeyDown: (
|
|
110
|
+
className: n("flex cursor-pointer items-center gap-2 rounded-lg border border-transparent px-2 py-1.5 transition-colors", j.row),
|
|
111
|
+
onClick: () => i(t),
|
|
112
|
+
onKeyDown: (e) => q(e, t),
|
|
121
113
|
children: [
|
|
122
|
-
/* @__PURE__ */
|
|
123
|
-
size:
|
|
124
|
-
initialsName:
|
|
114
|
+
/* @__PURE__ */ E(e, {
|
|
115
|
+
size: s.MD,
|
|
116
|
+
initialsName: t.name
|
|
125
117
|
}),
|
|
126
|
-
|
|
127
|
-
className:
|
|
128
|
-
children:
|
|
129
|
-
}) : /* @__PURE__ */
|
|
130
|
-
text:
|
|
131
|
-
query:
|
|
118
|
+
f == null ? /* @__PURE__ */ E("span", {
|
|
119
|
+
className: n(g, "min-w-0 flex-1 truncate text-start"),
|
|
120
|
+
children: t.name
|
|
121
|
+
}) : /* @__PURE__ */ E(u, {
|
|
122
|
+
text: t.name,
|
|
123
|
+
query: f,
|
|
132
124
|
maxLines: 1,
|
|
133
|
-
className:
|
|
125
|
+
className: n(g, "min-w-0 flex-1 text-start")
|
|
134
126
|
}),
|
|
135
|
-
/* @__PURE__ */
|
|
136
|
-
icon: /* @__PURE__ */
|
|
137
|
-
size:
|
|
138
|
-
className:
|
|
127
|
+
/* @__PURE__ */ E(m, {
|
|
128
|
+
icon: /* @__PURE__ */ E(T, {
|
|
129
|
+
size: s.SM,
|
|
130
|
+
className: j.star,
|
|
139
131
|
"aria-hidden": !0
|
|
140
132
|
}),
|
|
141
|
-
"aria-label":
|
|
133
|
+
"aria-label": A,
|
|
142
134
|
isSelected: !0,
|
|
143
|
-
onClick: (
|
|
144
|
-
|
|
135
|
+
onClick: (e) => {
|
|
136
|
+
e.stopPropagation(), J(t.id);
|
|
145
137
|
}
|
|
146
138
|
})
|
|
147
139
|
]
|
|
148
140
|
});
|
|
149
|
-
return /* @__PURE__ */
|
|
150
|
-
className:
|
|
151
|
-
children: /* @__PURE__ */
|
|
141
|
+
return /* @__PURE__ */ E("li", {
|
|
142
|
+
className: R.has(t.id) ? j.rowLeaving : j.rowEnter,
|
|
143
|
+
children: /* @__PURE__ */ E(d, {
|
|
152
144
|
asChild: !0,
|
|
153
145
|
contentClassName: "max-w-[550px]",
|
|
154
|
-
|
|
155
|
-
t
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
description: e.description,
|
|
159
|
-
isDescriptionLoading: e.isDescriptionLoading,
|
|
160
|
-
viewDetailsLabel: I,
|
|
161
|
-
onViewDetails: () => a(e)
|
|
146
|
+
content: /* @__PURE__ */ E(k, {
|
|
147
|
+
description: t.description,
|
|
148
|
+
viewDetailsLabel: F,
|
|
149
|
+
onViewDetails: () => c(t)
|
|
162
150
|
}),
|
|
163
|
-
children:
|
|
151
|
+
children: r
|
|
164
152
|
})
|
|
165
|
-
},
|
|
153
|
+
}, t.id);
|
|
166
154
|
})
|
|
167
|
-
}) :
|
|
155
|
+
}) : V && H !== "" ? /* @__PURE__ */ E("p", {
|
|
168
156
|
role: "status",
|
|
169
157
|
"aria-live": "polite",
|
|
170
|
-
className:
|
|
171
|
-
children:
|
|
172
|
-
}) : /* @__PURE__ */
|
|
173
|
-
className:
|
|
174
|
-
children:
|
|
158
|
+
className: n(b, "px-4 py-4 text-start", j.emptyHint),
|
|
159
|
+
children: I
|
|
160
|
+
}) : /* @__PURE__ */ E("p", {
|
|
161
|
+
className: n(b, "px-4 py-4 text-start", j.emptyHint),
|
|
162
|
+
children: w
|
|
175
163
|
})
|
|
176
164
|
})
|
|
177
165
|
}),
|
|
178
|
-
/* @__PURE__ */
|
|
179
|
-
className:
|
|
180
|
-
children: /* @__PURE__ */
|
|
181
|
-
label:
|
|
166
|
+
/* @__PURE__ */ E("div", {
|
|
167
|
+
className: n("border-t px-2 py-3", j.footer),
|
|
168
|
+
children: /* @__PURE__ */ E(l, {
|
|
169
|
+
label: O,
|
|
182
170
|
className: "w-full justify-center",
|
|
183
|
-
onClick:
|
|
171
|
+
onClick: o
|
|
184
172
|
})
|
|
185
173
|
})
|
|
186
174
|
]
|
|
187
175
|
});
|
|
188
|
-
},
|
|
176
|
+
}, I = ({ isOpen: e, onClose: t, onSelect: n, title: r, renderContent: i }) => /* @__PURE__ */ E(f, {
|
|
189
177
|
open: e,
|
|
190
178
|
header: r,
|
|
191
|
-
size:
|
|
179
|
+
size: p.Lg,
|
|
192
180
|
className: "h-[min(90vh,860px)] !max-w-[min(95vw,1200px)] overflow-hidden",
|
|
193
181
|
onClose: t,
|
|
194
|
-
children: /* @__PURE__ */
|
|
182
|
+
children: /* @__PURE__ */ E("div", {
|
|
195
183
|
className: "h-[min(80vh,840px)] overflow-auto",
|
|
196
|
-
children: /* @__PURE__ */
|
|
184
|
+
children: /* @__PURE__ */ E(g, {
|
|
197
185
|
fallback: null,
|
|
198
186
|
children: e && i(n, t)
|
|
199
187
|
})
|
|
200
188
|
})
|
|
201
|
-
}),
|
|
189
|
+
}), L = (e) => /* @__PURE__ */ E(O, { ...e }), R = (e) => ({
|
|
202
190
|
id: e.url,
|
|
203
191
|
name: e.name,
|
|
204
|
-
description:
|
|
205
|
-
|
|
206
|
-
}), B = (e) => {
|
|
192
|
+
description: e.description
|
|
193
|
+
}), z = (e) => {
|
|
207
194
|
let t = e.split("/").filter((e) => e.length > 0);
|
|
208
195
|
return t[t.length - 1] ?? e;
|
|
209
|
-
},
|
|
210
|
-
let { addMenuLabel: p = "Skills", backLabel:
|
|
196
|
+
}, B = ({ isEnabled: e, isSkillsSupported: t, skills: n, sharedWithMe: i, publicSkills: a, favoriteIds: o, onToggleFavorite: s, labels: l, historyChipLabelClassName: u, renderCatalogContent: d, detailsPanelComponent: f }) => {
|
|
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), [j, M] = S(null), N = b(() => [
|
|
211
198
|
...n,
|
|
212
|
-
...
|
|
213
|
-
...
|
|
199
|
+
...i ?? [],
|
|
200
|
+
...a ?? []
|
|
214
201
|
], [
|
|
215
202
|
n,
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
]),
|
|
203
|
+
i,
|
|
204
|
+
a
|
|
205
|
+
]), P = b(() => new Map(N.map((e) => [e.url, e])), [N]), L = b(() => N.filter((e) => o.has(e.url)).map((e) => R(e)), [N, o]), B = b(() => j == null ? null : P.get(j) ?? null, [P, j]), V = B != null && !t, H = _((e) => {
|
|
206
|
+
M(e);
|
|
207
|
+
}, []), U = _(() => {
|
|
208
|
+
M(null);
|
|
209
|
+
}, []), W = j, G = b(() => j == null ? void 0 : [{ url: j }], [j]), K = b(() => B == null ? null : /* @__PURE__ */ E(A, {
|
|
210
|
+
name: B.name,
|
|
211
|
+
path: B.url,
|
|
212
|
+
description: B.description,
|
|
213
|
+
isUnsupported: V,
|
|
214
|
+
onViewDetails: k,
|
|
215
|
+
labels: {
|
|
216
|
+
viewDetailsLabel: x?.viewDetailsLabel,
|
|
217
|
+
unsupportedTooltipLabel: y
|
|
218
|
+
}
|
|
219
|
+
}), [
|
|
220
|
+
B,
|
|
219
221
|
V,
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
A
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
}), N((n) => new Map(n).set(e, t));
|
|
233
|
-
}));
|
|
234
|
-
}, [M, c]), X = v(() => W == null ? null : /* @__PURE__ */ w(j, {
|
|
235
|
-
name: W.name,
|
|
236
|
-
path: W.url,
|
|
237
|
-
description: M.get(W.url) ?? void 0,
|
|
238
|
-
isDescriptionLoading: P.has(W.url),
|
|
239
|
-
onTooltipOpen: Y,
|
|
240
|
-
onViewDetails: O,
|
|
241
|
-
labels: { viewDetailsLabel: C?.viewDetailsLabel }
|
|
222
|
+
x,
|
|
223
|
+
y
|
|
224
|
+
]), q = _((e) => e == null || e.length === 0 ? null : e.map((e) => {
|
|
225
|
+
let t = P.get(e.url);
|
|
226
|
+
return /* @__PURE__ */ E(A, {
|
|
227
|
+
name: t?.name ?? z(e.url),
|
|
228
|
+
path: e.url,
|
|
229
|
+
labelClassName: u,
|
|
230
|
+
description: t?.description,
|
|
231
|
+
onViewDetails: k,
|
|
232
|
+
labels: { viewDetailsLabel: x?.viewDetailsLabel }
|
|
233
|
+
}, e.url);
|
|
242
234
|
}), [
|
|
243
|
-
W,
|
|
244
|
-
M,
|
|
245
235
|
P,
|
|
246
|
-
Y,
|
|
247
|
-
C
|
|
248
|
-
]), Z = h((e) => e == null || e.length === 0 ? null : e.map((e) => /* @__PURE__ */ w(j, {
|
|
249
|
-
name: H.get(e.url)?.name ?? B(e.url),
|
|
250
|
-
path: e.url,
|
|
251
|
-
labelClassName: u,
|
|
252
|
-
description: M.get(e.url) ?? void 0,
|
|
253
|
-
isDescriptionLoading: P.has(e.url),
|
|
254
|
-
onTooltipOpen: Y,
|
|
255
|
-
onViewDetails: O,
|
|
256
|
-
labels: { viewDetailsLabel: C?.viewDetailsLabel }
|
|
257
|
-
}, e.url)), [
|
|
258
|
-
H,
|
|
259
236
|
u,
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
C
|
|
264
|
-
]), Q = h((e) => /* @__PURE__ */ w(I, {
|
|
265
|
-
favorites: U,
|
|
237
|
+
x
|
|
238
|
+
]), J = _((e) => /* @__PURE__ */ E(F, {
|
|
239
|
+
favorites: L,
|
|
266
240
|
onSelect: (t) => {
|
|
267
|
-
|
|
241
|
+
H(t.id), e();
|
|
268
242
|
},
|
|
269
243
|
onToggleFavorite: s,
|
|
270
244
|
onBrowse: () => {
|
|
271
|
-
e(),
|
|
245
|
+
e(), D(!0);
|
|
272
246
|
},
|
|
273
247
|
onViewDetails: (t) => {
|
|
274
|
-
e(),
|
|
248
|
+
e(), k(t.id);
|
|
275
249
|
},
|
|
276
|
-
|
|
277
|
-
labels: C
|
|
250
|
+
labels: x
|
|
278
251
|
}), [
|
|
279
|
-
|
|
280
|
-
|
|
252
|
+
L,
|
|
253
|
+
H,
|
|
281
254
|
s,
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
]), $ = v(() => ({
|
|
255
|
+
x
|
|
256
|
+
]), Y = b(() => w ? {
|
|
285
257
|
key: "skills",
|
|
286
258
|
title: p,
|
|
287
|
-
icon: /* @__PURE__ */
|
|
288
|
-
size:
|
|
259
|
+
icon: /* @__PURE__ */ E(C, {
|
|
260
|
+
size: r,
|
|
289
261
|
"aria-hidden": !0,
|
|
290
|
-
stroke:
|
|
262
|
+
stroke: c
|
|
291
263
|
}),
|
|
292
|
-
renderOverlay:
|
|
293
|
-
backLabel:
|
|
294
|
-
}
|
|
264
|
+
renderOverlay: J,
|
|
265
|
+
backLabel: m
|
|
266
|
+
} : void 0, [
|
|
267
|
+
w,
|
|
295
268
|
p,
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
]),
|
|
269
|
+
m,
|
|
270
|
+
J
|
|
271
|
+
]), X = b(() => w ? {
|
|
299
272
|
triggerPrefix: "/",
|
|
300
273
|
menuLabel: p,
|
|
301
|
-
emptyQueryHint:
|
|
302
|
-
renderMenu: ({ query: e, close: t }) => /* @__PURE__ */
|
|
303
|
-
favorites:
|
|
274
|
+
emptyQueryHint: v,
|
|
275
|
+
renderMenu: ({ query: e, close: t }) => /* @__PURE__ */ E(F, {
|
|
276
|
+
favorites: L,
|
|
304
277
|
searchQuery: e,
|
|
305
278
|
onSelect: (e) => {
|
|
306
|
-
t({ consumeQuery: !0 }),
|
|
279
|
+
t({ consumeQuery: !0 }), H(e.id);
|
|
307
280
|
},
|
|
308
281
|
onToggleFavorite: s,
|
|
309
282
|
onBrowse: () => {
|
|
310
|
-
t({ consumeQuery: !0 }),
|
|
283
|
+
t({ consumeQuery: !0 }), D(!0);
|
|
311
284
|
},
|
|
312
285
|
onViewDetails: (e) => {
|
|
313
|
-
t({ consumeQuery: !0 }),
|
|
286
|
+
t({ consumeQuery: !0 }), k(e.id);
|
|
314
287
|
},
|
|
315
|
-
|
|
316
|
-
labels: C
|
|
288
|
+
labels: x
|
|
317
289
|
})
|
|
318
290
|
} : void 0, [
|
|
319
|
-
|
|
291
|
+
w,
|
|
320
292
|
p,
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
293
|
+
v,
|
|
294
|
+
L,
|
|
295
|
+
H,
|
|
324
296
|
s,
|
|
325
|
-
|
|
326
|
-
C
|
|
297
|
+
x
|
|
327
298
|
]);
|
|
328
|
-
return
|
|
329
|
-
skillMenuOverlay:
|
|
330
|
-
commandMenu:
|
|
331
|
-
skillCatalogModal: /* @__PURE__ */
|
|
299
|
+
return e ? {
|
|
300
|
+
skillMenuOverlay: Y,
|
|
301
|
+
commandMenu: X,
|
|
302
|
+
skillCatalogModal: /* @__PURE__ */ E(I, {
|
|
332
303
|
isOpen: T,
|
|
333
|
-
onClose: () =>
|
|
304
|
+
onClose: () => D(!1),
|
|
334
305
|
onSelect: (e) => {
|
|
335
|
-
|
|
306
|
+
H(e), D(!1);
|
|
336
307
|
},
|
|
337
|
-
title:
|
|
308
|
+
title: h,
|
|
338
309
|
renderContent: d
|
|
339
310
|
}),
|
|
340
|
-
skillDetailsPanel: /* @__PURE__ */
|
|
311
|
+
skillDetailsPanel: /* @__PURE__ */ E(g, {
|
|
341
312
|
fallback: null,
|
|
342
|
-
children: /* @__PURE__ */
|
|
343
|
-
skillId:
|
|
344
|
-
onClose: () =>
|
|
313
|
+
children: /* @__PURE__ */ E(f, {
|
|
314
|
+
skillId: O,
|
|
315
|
+
onClose: () => k(null)
|
|
345
316
|
})
|
|
346
317
|
}),
|
|
347
|
-
selectedSkillElement:
|
|
348
|
-
selectedSkillPath:
|
|
349
|
-
selectedSkills:
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
318
|
+
selectedSkillElement: K,
|
|
319
|
+
selectedSkillPath: W,
|
|
320
|
+
selectedSkills: G,
|
|
321
|
+
isSkillUnsupported: V,
|
|
322
|
+
selectSkill: H,
|
|
323
|
+
removeSelectedSkill: U,
|
|
324
|
+
renderHistorySkills: q
|
|
353
325
|
} : {
|
|
354
326
|
skillMenuOverlay: void 0,
|
|
355
327
|
commandMenu: void 0,
|
|
@@ -358,10 +330,11 @@ var A = ({ description: e, isDescriptionLoading: o, viewDetailsLabel: s = "View
|
|
|
358
330
|
selectedSkillElement: null,
|
|
359
331
|
selectedSkillPath: null,
|
|
360
332
|
selectedSkills: void 0,
|
|
333
|
+
isSkillUnsupported: !1,
|
|
361
334
|
selectSkill: () => void 0,
|
|
362
335
|
removeSelectedSkill: () => void 0,
|
|
363
336
|
renderHistorySkills: () => null
|
|
364
337
|
};
|
|
365
338
|
};
|
|
366
339
|
//#endregion
|
|
367
|
-
export {
|
|
340
|
+
export { A as ChatSkill, F as FavoriteSkillsPanel, I as SkillCatalogModal, L as SkillDetailsSidePanel, k as SkillInfoTooltipContent, R as buildFavoriteSkillItem, B as useSkillSelectorOverlay };
|
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
export interface ChatSkillLabels {
|
|
3
3
|
/** Label for the tooltip's "View details" action. Defaults to `'View details'`. */
|
|
4
4
|
viewDetailsLabel?: string;
|
|
5
|
+
/**
|
|
6
|
+
* Message shown alone in the tooltip while `isUnsupported` is set, stating
|
|
7
|
+
* that the selected model does not support skills and that the user should
|
|
8
|
+
* remove the skill or select a different model to proceed.
|
|
9
|
+
*/
|
|
10
|
+
unsupportedTooltipLabel?: string;
|
|
5
11
|
}
|
|
6
12
|
/** Props for the ChatSkill component. */
|
|
7
13
|
export interface ChatSkillProps {
|
|
@@ -12,23 +18,30 @@ export interface ChatSkillProps {
|
|
|
12
18
|
* callback so the host never has to re-derive it.
|
|
13
19
|
*/
|
|
14
20
|
path: string;
|
|
15
|
-
/** The skill's description, shown in the tooltip. Omitted when empty. */
|
|
21
|
+
/** The skill's listing-sourced description, shown in the tooltip. Omitted when empty. */
|
|
16
22
|
description?: string;
|
|
17
23
|
/**
|
|
18
|
-
* Whether the
|
|
19
|
-
* `true` the
|
|
24
|
+
* Whether the current model/application does not support skills. While
|
|
25
|
+
* `true` the `/{name}` label carries `unsupportedLabelClassName`, the chip
|
|
26
|
+
* carries `unsupportedClassName`, and the tooltip shows the
|
|
27
|
+
* unsupported-model message alone — no description paragraph and no
|
|
28
|
+
* "View details" button.
|
|
20
29
|
*/
|
|
21
|
-
|
|
30
|
+
isUnsupported?: boolean;
|
|
22
31
|
/** CSS class applied to the `/name` label. Defaults to `'dial-body-paragraph-text'`. */
|
|
23
32
|
labelClassName?: string;
|
|
24
|
-
/** Called with the skill's path when the tooltip's "View details" button is clicked. */
|
|
25
|
-
onViewDetails: (path: string) => void;
|
|
26
33
|
/**
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
* renders.
|
|
34
|
+
* Color class applied to the `/{name}` label in addition to
|
|
35
|
+
* `labelClassName` while `isUnsupported` is set. Defaults to `'text-error'`.
|
|
30
36
|
*/
|
|
31
|
-
|
|
37
|
+
unsupportedLabelClassName?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Class applied to the chip in addition to its layout classes while
|
|
40
|
+
* `isUnsupported` is set. Defaults to `'bg-error'`.
|
|
41
|
+
*/
|
|
42
|
+
unsupportedClassName?: string;
|
|
43
|
+
/** Called with the skill's path when the tooltip's "View details" button is clicked. */
|
|
44
|
+
onViewDetails: (path: string) => void;
|
|
32
45
|
/** Localizable string overrides. */
|
|
33
46
|
labels?: ChatSkillLabels;
|
|
34
47
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-skill-props.d.ts","sourceRoot":"","sources":["../../src/models/chat-skill-props.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,MAAM,WAAW,eAAe;IAC9B,mFAAmF;IACnF,gBAAgB,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"chat-skill-props.d.ts","sourceRoot":"","sources":["../../src/models/chat-skill-props.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,MAAM,WAAW,eAAe;IAC9B,mFAAmF;IACnF,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;OAIG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;CAClC;AAED,yCAAyC;AACzC,MAAM,WAAW,cAAc;IAC7B,yEAAyE;IACzE,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,yFAAyF;IACzF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,wFAAwF;IACxF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC;;;OAGG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,wFAAwF;IACxF,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,oCAAoC;IACpC,MAAM,CAAC,EAAE,eAAe,CAAC;CAC1B"}
|
|
@@ -7,13 +7,8 @@ export interface FavoriteSkillItem {
|
|
|
7
7
|
id: string;
|
|
8
8
|
/** Display name. */
|
|
9
9
|
name: string;
|
|
10
|
-
/**
|
|
10
|
+
/** Listing-sourced description shown in a tooltip on hover. Omitted when empty. */
|
|
11
11
|
description?: string;
|
|
12
|
-
/**
|
|
13
|
-
* Whether the description is still being resolved by the host. While
|
|
14
|
-
* `true` the tooltip shows a spinner in the description's place.
|
|
15
|
-
*/
|
|
16
|
-
isDescriptionLoading?: boolean;
|
|
17
12
|
}
|
|
18
13
|
/**
|
|
19
14
|
* The listing-entry fields needed to build a favorite row — satisfied by the
|
|
@@ -24,12 +19,13 @@ export interface SkillListingEntry {
|
|
|
24
19
|
url: string;
|
|
25
20
|
/** Display name. */
|
|
26
21
|
name: string;
|
|
22
|
+
/** Listing-sourced description (Core PR #1970). Absent on folders and older Cores. */
|
|
23
|
+
description?: string;
|
|
27
24
|
}
|
|
28
25
|
/**
|
|
29
|
-
* Builds a {@link FavoriteSkillItem} from a listing entry
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
* in `pendingIds` are marked as loading so the row's tooltip shows a spinner.
|
|
26
|
+
* Builds a {@link FavoriteSkillItem} from a listing entry, mapping its
|
|
27
|
+
* description straight through — the listing is the description's only
|
|
28
|
+
* source, so an entry that carries none yields no description paragraph.
|
|
33
29
|
*/
|
|
34
|
-
export declare const buildFavoriteSkillItem: (skill: SkillListingEntry
|
|
30
|
+
export declare const buildFavoriteSkillItem: (skill: SkillListingEntry) => FavoriteSkillItem;
|
|
35
31
|
//# sourceMappingURL=favorite-skill-item.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"favorite-skill-item.d.ts","sourceRoot":"","sources":["../../src/models/favorite-skill-item.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,EAAE,EAAE,MAAM,CAAC;IACX,oBAAoB;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,
|
|
1
|
+
{"version":3,"file":"favorite-skill-item.d.ts","sourceRoot":"","sources":["../../src/models/favorite-skill-item.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,EAAE,EAAE,MAAM,CAAC;IACX,oBAAoB;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,mFAAmF;IACnF,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,kFAAkF;IAClF,GAAG,EAAE,MAAM,CAAC;IACZ,oBAAoB;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,sFAAsF;IACtF,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,GACjC,OAAO,iBAAiB,KACvB,iBAID,CAAC"}
|
|
@@ -39,8 +39,6 @@ export interface FavoriteSkillsPanelProps {
|
|
|
39
39
|
onBrowse: () => void;
|
|
40
40
|
/** Called when a row tooltip's "View details" button is clicked. */
|
|
41
41
|
onViewDetails: (item: FavoriteSkillItem) => void;
|
|
42
|
-
/** Called with a skill's id each time one of its row's interactive tooltips opens (hover or focus). */
|
|
43
|
-
onItemTooltipOpen?: (id: string) => void;
|
|
44
42
|
/**
|
|
45
43
|
* When provided, the panel enters search mode: rows are filtered to names
|
|
46
44
|
* containing this string case-insensitively and matched names render with a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"favorite-skills-panel-props.d.ts","sourceRoot":"","sources":["../../src/models/favorite-skills-panel-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,kFAAkF;AAClF,MAAM,WAAW,yBAAyB;IACxC,sEAAsE;IACtE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,2FAA2F;IAC3F,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kEAAkE;IAClE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,6GAA6G;IAC7G,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,qFAAqF;IACrF,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,oGAAoG;IACpG,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,6DAA6D;AAC7D,MAAM,WAAW,yBAAyB;IACxC,2EAA2E;IAC3E,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,+EAA+E;IAC/E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kFAAkF;IAClF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,0EAA0E;IAC1E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sFAAsF;IACtF,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,+CAA+C;AAC/C,MAAM,WAAW,wBAAwB;IACvC,iEAAiE;IACjE,SAAS,EAAE,iBAAiB,EAAE,CAAC;IAC/B,+DAA+D;IAC/D,QAAQ,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC5C,kGAAkG;IAClG,gBAAgB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,kDAAkD;IAClD,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,oEAAoE;IACpE,aAAa,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACjD
|
|
1
|
+
{"version":3,"file":"favorite-skills-panel-props.d.ts","sourceRoot":"","sources":["../../src/models/favorite-skills-panel-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,kFAAkF;AAClF,MAAM,WAAW,yBAAyB;IACxC,sEAAsE;IACtE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,2FAA2F;IAC3F,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kEAAkE;IAClE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,6GAA6G;IAC7G,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,qFAAqF;IACrF,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,oGAAoG;IACpG,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,6DAA6D;AAC7D,MAAM,WAAW,yBAAyB;IACxC,2EAA2E;IAC3E,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,+EAA+E;IAC/E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kFAAkF;IAClF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,0EAA0E;IAC1E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sFAAsF;IACtF,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,+CAA+C;AAC/C,MAAM,WAAW,wBAAwB;IACvC,iEAAiE;IACjE,SAAS,EAAE,iBAAiB,EAAE,CAAC;IAC/B,+DAA+D;IAC/D,QAAQ,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC5C,kGAAkG;IAClG,gBAAgB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,kDAAkD;IAClD,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,oEAAoE;IACpE,aAAa,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACjD;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oCAAoC;IACpC,MAAM,CAAC,EAAE,yBAAyB,CAAC;IACnC,wDAAwD;IACxD,MAAM,CAAC,EAAE,yBAAyB,CAAC;IACnC,gFAAgF;IAChF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,oIAAoI;IACpI,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,sFAAsF;IACtF,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/** Props for the shared skill info tooltip content component. */
|
|
2
2
|
export interface SkillInfoTooltipContentProps {
|
|
3
|
-
/** The skill's description paragraph. Omitted entirely when empty. */
|
|
3
|
+
/** The skill's listing-sourced description paragraph. Omitted entirely when empty. */
|
|
4
4
|
description?: string;
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
6
|
+
* The unsupported-model message. While set, it replaces the whole content —
|
|
7
|
+
* no description paragraph and no "View details" button render.
|
|
8
8
|
*/
|
|
9
|
-
|
|
9
|
+
unsupportedMessage?: string;
|
|
10
10
|
/** Label for the "View details" action. Defaults to `'View details'`. */
|
|
11
11
|
viewDetailsLabel?: string;
|
|
12
|
-
/** Called when the "View details" button is clicked. */
|
|
13
|
-
onViewDetails
|
|
12
|
+
/** Called when the "View details" button is clicked. Unused while `unsupportedMessage` is set. */
|
|
13
|
+
onViewDetails?: () => void;
|
|
14
14
|
}
|
|
15
15
|
//# sourceMappingURL=skill-info-tooltip-content-props.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skill-info-tooltip-content-props.d.ts","sourceRoot":"","sources":["../../src/models/skill-info-tooltip-content-props.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,MAAM,WAAW,4BAA4B;IAC3C,
|
|
1
|
+
{"version":3,"file":"skill-info-tooltip-content-props.d.ts","sourceRoot":"","sources":["../../src/models/skill-info-tooltip-content-props.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,MAAM,WAAW,4BAA4B;IAC3C,sFAAsF;IACtF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,yEAAyE;IACzE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kGAAkG;IAClG,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;CAC5B"}
|
|
@@ -28,6 +28,11 @@ export interface SkillSelectorOverlayLabels {
|
|
|
28
28
|
* is open with an empty query. Defaults to `'Type to filter'`.
|
|
29
29
|
*/
|
|
30
30
|
emptyQueryHintLabel?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Message shown alone in the selected skill chip's error-state tooltip
|
|
33
|
+
* while the current deployment does not support skills.
|
|
34
|
+
*/
|
|
35
|
+
unsupportedTooltipLabel?: string;
|
|
31
36
|
/** Labels forwarded to the favorites panel rendered as the overlay. */
|
|
32
37
|
panelLabels?: FavoriteSkillsPanelLabels;
|
|
33
38
|
}
|
|
@@ -38,6 +43,14 @@ export interface UseSkillSelectorOverlayOptions {
|
|
|
38
43
|
* outputs: no menu entry, no modal, no panel, no chips.
|
|
39
44
|
*/
|
|
40
45
|
isEnabled: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Whether the input's current deployment supports skills. While `false`
|
|
48
|
+
* (with the flow enabled) the entry points are omitted — no Add-menu item
|
|
49
|
+
* and no slash menu — but an already-selected skill chip stays rendered in
|
|
50
|
+
* its error state with its removal gesture and "View details" panel
|
|
51
|
+
* available. The host resolves this from its own deployment data.
|
|
52
|
+
*/
|
|
53
|
+
isSkillsSupported: boolean;
|
|
41
54
|
/** The user's own skills. */
|
|
42
55
|
skills: SkillListingEntry[];
|
|
43
56
|
/** Skills shared with the user, when the host distinguishes them. */
|
|
@@ -48,11 +61,6 @@ export interface UseSkillSelectorOverlayOptions {
|
|
|
48
61
|
favoriteIds: ReadonlySet<string>;
|
|
49
62
|
/** Removes a skill from favorites; fired by a row's star button. */
|
|
50
63
|
onToggleFavorite: (id: string) => void;
|
|
51
|
-
/**
|
|
52
|
-
* Resolves a skill's manifest description for its row tooltip. Returning
|
|
53
|
-
* `null` marks the skill as description-less for the rest of the session.
|
|
54
|
-
*/
|
|
55
|
-
fetchSkillDescription: (skillId: string) => Promise<string | null>;
|
|
56
64
|
/** Localizable string overrides. */
|
|
57
65
|
labels?: SkillSelectorOverlayLabels;
|
|
58
66
|
/**
|
|
@@ -76,16 +84,18 @@ export interface UseSkillSelectorOverlayOptions {
|
|
|
76
84
|
export interface UseSkillSelectorOverlayResult {
|
|
77
85
|
/**
|
|
78
86
|
* The Skills entry for the `menuOverlays` prop of
|
|
79
|
-
* `ConversationInput`/`Input`. `undefined` while
|
|
80
|
-
*
|
|
81
|
-
*
|
|
87
|
+
* `ConversationInput`/`Input`. `undefined` while the flow is disabled or the
|
|
88
|
+
* current deployment does not support skills: the host omits the entry
|
|
89
|
+
* entirely when this is `undefined`, so a stub renderer would leave the
|
|
90
|
+
* menu item in place with nothing behind it.
|
|
82
91
|
*/
|
|
83
92
|
skillMenuOverlay?: MenuOverlayConfig;
|
|
84
93
|
/**
|
|
85
94
|
* The Skills entry for the `commandMenu` prop of
|
|
86
95
|
* `ConversationInput`/`Input`: typing `/` into an empty textarea opens the
|
|
87
|
-
* favorites panel in search mode above the input. `undefined` while
|
|
88
|
-
*
|
|
96
|
+
* favorites panel in search mode above the input. `undefined` while the
|
|
97
|
+
* flow is disabled or the current deployment does not support skills,
|
|
98
|
+
* disabling the slash menu entirely.
|
|
89
99
|
*/
|
|
90
100
|
commandMenu?: CommandMenuConfig;
|
|
91
101
|
/**
|
|
@@ -101,12 +111,20 @@ export interface UseSkillSelectorOverlayResult {
|
|
|
101
111
|
/**
|
|
102
112
|
* The selected skill as a `ChatSkill` element for the conversation input's
|
|
103
113
|
* `inlineStartSlot` — at most one, replaced on every selection, carrying
|
|
104
|
-
* the shared tooltip (
|
|
105
|
-
* rows)
|
|
114
|
+
* the shared tooltip (the listing-sourced description, same as the favorite
|
|
115
|
+
* rows), or the error state while the current deployment does not support
|
|
116
|
+
* skills. The element has no remove control of its own; removal is the
|
|
106
117
|
* input's Backspace-at-start gesture, wired through `removeSelectedSkill`.
|
|
107
118
|
* `null` while `isEnabled` is `false` or nothing is selected.
|
|
108
119
|
*/
|
|
109
120
|
selectedSkillElement: ReactNode;
|
|
121
|
+
/**
|
|
122
|
+
* Whether a skill is selected while the current deployment does not
|
|
123
|
+
* support skills — the chip renders in its error state and hosts must fold
|
|
124
|
+
* this into their send-disabled conditions. Always `false` while
|
|
125
|
+
* `isEnabled` is `false`.
|
|
126
|
+
*/
|
|
127
|
+
isSkillUnsupported: boolean;
|
|
110
128
|
/**
|
|
111
129
|
* The selected skill's resource URL (`skills/{bucket}/{path}`) — the value
|
|
112
130
|
* the host sends as a `{ url }` entry in the outgoing message's
|
|
@@ -134,12 +152,12 @@ export interface UseSkillSelectorOverlayResult {
|
|
|
134
152
|
/**
|
|
135
153
|
* Renders a message's `custom_content.skills` entries as `ChatSkill`
|
|
136
154
|
* elements beside the message bubble's first text line, with the text
|
|
137
|
-
* word-flowing after them — one per entry, sharing the
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
*
|
|
142
|
-
* array is empty.
|
|
155
|
+
* word-flowing after them — one per entry, sharing the "View details"
|
|
156
|
+
* details panel with the favorite rows and the input chip. Each entry's
|
|
157
|
+
* name comes from the listing pools matched on its url, falling back to
|
|
158
|
+
* the url's last non-empty segment, and its description from the same
|
|
159
|
+
* match (absent when no pool carries the url). Returns `null` while
|
|
160
|
+
* `isEnabled` is `false` or the array is empty.
|
|
143
161
|
*/
|
|
144
162
|
renderHistorySkills: (skills: RequestSkill[] | undefined) => ReactNode;
|
|
145
163
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skill-selector-overlay.d.ts","sourceRoot":"","sources":["../../src/models/skill-selector-overlay.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAE/E;;;;;GAKG;AACH,MAAM,WAAW,+BAA+B;IAC9C,iFAAiF;IACjF,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,2EAA2E;IAC3E,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,qEAAqE;AACrE,MAAM,WAAW,0BAA0B;IACzC,2EAA2E;IAC3E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gFAAgF;IAChF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+EAA+E;IAC/E,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,uEAAuE;IACvE,WAAW,CAAC,EAAE,yBAAyB,CAAC;CACzC;AAED,qDAAqD;AACrD,MAAM,WAAW,8BAA8B;IAC7C;;;OAGG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB,6BAA6B;IAC7B,MAAM,EAAE,iBAAiB,EAAE,CAAC;IAC5B,qEAAqE;IACrE,YAAY,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACnC,uDAAuD;IACvD,YAAY,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACnC,0EAA0E;IAC1E,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACjC,oEAAoE;IACpE,gBAAgB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC
|
|
1
|
+
{"version":3,"file":"skill-selector-overlay.d.ts","sourceRoot":"","sources":["../../src/models/skill-selector-overlay.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAE/E;;;;;GAKG;AACH,MAAM,WAAW,+BAA+B;IAC9C,iFAAiF;IACjF,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,2EAA2E;IAC3E,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,qEAAqE;AACrE,MAAM,WAAW,0BAA0B;IACzC,2EAA2E;IAC3E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gFAAgF;IAChF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+EAA+E;IAC/E,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;;OAGG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,uEAAuE;IACvE,WAAW,CAAC,EAAE,yBAAyB,CAAC;CACzC;AAED,qDAAqD;AACrD,MAAM,WAAW,8BAA8B;IAC7C;;;OAGG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB;;;;;;OAMG;IACH,iBAAiB,EAAE,OAAO,CAAC;IAC3B,6BAA6B;IAC7B,MAAM,EAAE,iBAAiB,EAAE,CAAC;IAC5B,qEAAqE;IACrE,YAAY,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACnC,uDAAuD;IACvD,YAAY,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACnC,0EAA0E;IAC1E,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACjC,oEAAoE;IACpE,gBAAgB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,oCAAoC;IACpC,MAAM,CAAC,EAAE,0BAA0B,CAAC;IACpC;;;;;;OAMG;IACH,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC;;;;OAIG;IACH,oBAAoB,EAAE,CACpB,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,EAC9B,OAAO,EAAE,MAAM,IAAI,KAChB,SAAS,CAAC;IACf,sEAAsE;IACtE,qBAAqB,EAAE,aAAa,CAAC,+BAA+B,CAAC,CAAC;CACvE;AAED,6CAA6C;AAC7C,MAAM,WAAW,6BAA6B;IAC5C;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,iBAAiB,CAAC;IACrC;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAChC;;;OAGG;IACH,iBAAiB,EAAE,SAAS,CAAC;IAC7B;;;OAGG;IACH,iBAAiB,EAAE,SAAS,CAAC;IAC7B;;;;;;;;OAQG;IACH,oBAAoB,EAAE,SAAS,CAAC;IAChC;;;;;OAKG;IACH,kBAAkB,EAAE,OAAO,CAAC;IAC5B;;;;;OAKG;IACH,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC;;;;OAIG;IACH,cAAc,EAAE,YAAY,EAAE,GAAG,SAAS,CAAC;IAC3C;;;OAGG;IACH,WAAW,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC;;;;OAIG;IACH,mBAAmB,EAAE,MAAM,IAAI,CAAC;IAChC;;;;;;;;;OASG;IACH,mBAAmB,EAAE,CAAC,MAAM,EAAE,YAAY,EAAE,GAAG,SAAS,KAAK,SAAS,CAAC;CACxE"}
|
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.1.0-dev.
|
|
4
|
+
"version": "1.1.0-dev.487",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./index.js",
|
|
@@ -18,13 +18,13 @@
|
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@tabler/icons-react": "^3.44.0",
|
|
21
|
-
"@epam/ai-dial-catalog": "1.1.0-dev.
|
|
22
|
-
"@epam/ai-dial-conversation-input": "1.1.0-dev.
|
|
21
|
+
"@epam/ai-dial-catalog": "1.1.0-dev.487",
|
|
22
|
+
"@epam/ai-dial-conversation-input": "1.1.0-dev.487"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"@epam/ai-dial-chat-shared": "1.1.0-dev.
|
|
26
|
-
"@epam/ai-dial-ui-kit": "^0.14.
|
|
27
|
-
"react": "^19.
|
|
25
|
+
"@epam/ai-dial-chat-shared": "1.1.0-dev.487",
|
|
26
|
+
"@epam/ai-dial-ui-kit": "^0.14.2",
|
|
27
|
+
"react": "^19.2.8"
|
|
28
28
|
},
|
|
29
29
|
"repository": {
|
|
30
30
|
"type": "git",
|