@epam/ai-dial-skills 1.2.0-dev.328 → 1.2.0-dev.336

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.
@@ -1 +1 @@
1
- {"version":3,"file":"ChatSkill.d.ts","sourceRoot":"","sources":["../../../src/components/ChatSkill/ChatSkill.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAqC,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAEnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAGpE;;;;GAIG;AACH,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CAqIxC,CAAC"}
1
+ {"version":3,"file":"ChatSkill.d.ts","sourceRoot":"","sources":["../../../src/components/ChatSkill/ChatSkill.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAqC,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAEnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAGpE;;;;GAIG;AACH,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CA+IxC,CAAC"}
@@ -7,5 +7,5 @@ import { UseSkillSelectorOverlayOptions, UseSkillSelectorOverlayResult } from '.
7
7
  * listing data, favorites state, labels, the deployment-support signal, and
8
8
  * the modal/panel components.
9
9
  */
10
- export declare const useSkillSelectorOverlay: ({ isSkillsSupported, skills, sharedWithMe, publicSkills, favoriteIds, viewerBucket, onToggleFavorite, labels, historyChipLabelClassName, activeMentionDetailsTrigger, historyDetailsTrigger, renderCatalogContent, detailsPanelComponent: DetailsPanelComponent, }: UseSkillSelectorOverlayOptions) => UseSkillSelectorOverlayResult;
10
+ export declare const useSkillSelectorOverlay: ({ isSkillsSupported, skills, sharedWithMe, publicSkills, favoriteIds, viewerBucket, onToggleFavorite, labels, historyChipLabelClassName, activeMentionLabelClassName, activeMentionDetailsTrigger, historyDetailsTrigger, renderCatalogContent, detailsPanelComponent: DetailsPanelComponent, }: UseSkillSelectorOverlayOptions) => UseSkillSelectorOverlayResult;
11
11
  //# sourceMappingURL=useSkillSelectorOverlay.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useSkillSelectorOverlay.d.ts","sourceRoot":"","sources":["../../../src/hooks/useSkillSelectorOverlay/useSkillSelectorOverlay.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EACV,8BAA8B,EAC9B,6BAA6B,EAC9B,MAAM,qCAAqC,CAAC;AAmB7C;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,GAAI,oQAcrC,8BAA8B,KAAG,6BAuhBnC,CAAC"}
1
+ {"version":3,"file":"useSkillSelectorOverlay.d.ts","sourceRoot":"","sources":["../../../src/hooks/useSkillSelectorOverlay/useSkillSelectorOverlay.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EACV,8BAA8B,EAC9B,6BAA6B,EAC9B,MAAM,qCAAqC,CAAC;AAmB7C;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,GAAI,iSAerC,8BAA8B,KAAG,6BA4hBnC,CAAC"}
package/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { DeploymentIcon as e, buildCssVars as t, isSkillSelectionUnsupported as n, mergeClasses as r } from "@epam/ai-dial-chat-shared";
2
2
  import { BASE_ICON_SIZE as i, Button as a, ButtonAppearance as o, ButtonVariant as s, DIAL_ICON_SIZE as c, DIAL_KIT_ICON_STROKE as l, FileDropzone as u, GhostButton as d, Highlight as f, InteractiveTooltip as p, InteractiveTooltipTrigger as m, Popup as h, PopupSize as g, Select as _, Spinner as v, ToggleIconButton as y, Tooltip as b, TooltipPlacement as x } from "@epam/ai-dial-ui-kit";
3
- import { Suspense as S, useCallback as C, useEffect as w, useId as T, useLayoutEffect as E, useMemo as D, useRef as O, useState as k } from "react";
4
- import { IconBlocks as ee, IconEye as A, IconLock as j, IconStarFilled as M, IconTrash as N } from "@tabler/icons-react";
5
- import { Fragment as P, jsx as F, jsxs as I } from "react/jsx-runtime";
6
- import { DialFileNodeType as L, DialFoldersTree as te } from "@epam/ai-dial-react-file-manager";
3
+ import { Suspense as S, useCallback as C, useEffect as w, useId as T, useLayoutEffect as ee, useMemo as E, useRef as D, useState as O } from "react";
4
+ import { IconBlocks as te, IconEye as k, IconLock as A, IconStarFilled as j, IconTrash as M } from "@tabler/icons-react";
5
+ import { Fragment as N, jsx as P, jsxs as F } from "react/jsx-runtime";
6
+ import { DialFileNodeType as I, DialFoldersTree as L } from "@epam/ai-dial-react-file-manager";
7
7
  import { CatalogContentNodeType as R, DetailsPanel as z } from "@epam/ai-dial-catalog";
8
8
  //#region src/constants/public-class-names.ts
9
9
  var B = {
@@ -14,31 +14,31 @@ var B = {
14
14
  return e.Deleted = "deleted", e.NotShared = "not-shared", e;
15
15
  }({}), H = ({ description: e, unsupportedMessage: t, unresolvedReason: n, deletedMessage: r, notSharedMessage: i, viewDetailsLabel: u = "View details", onViewDetails: d, viewDetailsTabIndex: f }) => {
16
16
  if (n != null) {
17
- let e = n === V.Deleted, t = e ? N : j, a = e ? r : i;
18
- return /* @__PURE__ */ I("div", {
17
+ let e = n === V.Deleted, t = e ? M : A, a = e ? r : i;
18
+ return /* @__PURE__ */ F("div", {
19
19
  className: "flex flex-row items-center gap-2",
20
- children: [/* @__PURE__ */ F(t, {
20
+ children: [/* @__PURE__ */ P(t, {
21
21
  size: c.MD,
22
22
  stroke: l,
23
23
  "aria-hidden": !0,
24
24
  className: "shrink-0 text-secondary"
25
- }), /* @__PURE__ */ F("p", {
25
+ }), /* @__PURE__ */ P("p", {
26
26
  className: "dial-tiny-text text-start text-primary",
27
27
  children: a
28
28
  })]
29
29
  });
30
30
  }
31
- return t == null ? /* @__PURE__ */ I("div", {
31
+ return t == null ? /* @__PURE__ */ F("div", {
32
32
  className: "flex flex-col gap-3",
33
- children: [e != null && e !== "" && /* @__PURE__ */ F("p", {
33
+ children: [e != null && e !== "" && /* @__PURE__ */ P("p", {
34
34
  className: "text-start",
35
35
  children: e
36
- }), /* @__PURE__ */ F(a, {
36
+ }), /* @__PURE__ */ P(a, {
37
37
  variant: s.Primary,
38
38
  appearance: o.Link,
39
39
  className: "h-[24px] self-start",
40
40
  label: u,
41
- iconBefore: /* @__PURE__ */ F(A, {
41
+ iconBefore: /* @__PURE__ */ P(k, {
42
42
  size: c.SM,
43
43
  stroke: l,
44
44
  "aria-hidden": !0
@@ -46,40 +46,43 @@ var B = {
46
46
  onClick: d,
47
47
  tabIndex: f
48
48
  })]
49
- }) : /* @__PURE__ */ F("p", {
49
+ }) : /* @__PURE__ */ P("p", {
50
50
  className: "text-start",
51
51
  children: t
52
52
  });
53
53
  }, U = ({ name: e, path: t, description: n, isUnsupported: i = !1, unresolvedReason: a, labelClassName: o = "dial-body-paragraph-text text-accent", unsupportedLabelClassName: s = "text-error", unsupportedClassName: c = "bg-error", detailsTrigger: l = "hover", onViewDetails: u, labels: d = {} }) => {
54
- let { viewDetailsLabel: f = "View details", unsupportedTooltipLabel: h = "Selected model does not support skills. Remove the skill or select different model to proceed.", deletedTooltipLabel: g = "This skill has been deleted. Its details are no longer available.", notSharedTooltipLabel: _ = "You don't have access to this skill, so its details aren't shown. Ask the chat owner to share it with you." } = d, [v, y] = k(0), b = l === "click", S = () => {
54
+ let { viewDetailsLabel: f = "View details", unsupportedTooltipLabel: h = "Selected model does not support skills. Remove the skill or select different model to proceed.", deletedTooltipLabel: g = "This skill has been deleted. Its details are no longer available.", notSharedTooltipLabel: _ = "You don't have access to this skill, so its details aren't shown. Ask the chat owner to share it with you." } = d, [v, y] = O(0), b = l === "click", S = () => {
55
55
  y((e) => e + 1), u(t);
56
- }, C = O(null), [w, T] = k(null);
57
- return E(() => {
58
- T(C.current?.getBoundingClientRect().width ?? null);
59
- }, [o]), /* @__PURE__ */ F(p, {
56
+ }, C = D(null), [w, T] = O(null);
57
+ return ee(() => {
58
+ let e = C.current, t = () => T(e?.getBoundingClientRect().width ?? null);
59
+ if (t(), !e || typeof ResizeObserver > "u") return;
60
+ let n = new ResizeObserver(t);
61
+ return n.observe(e), () => n.disconnect();
62
+ }, [o]), /* @__PURE__ */ P(p, {
60
63
  asChild: !0,
61
64
  placement: x.Top,
62
65
  trigger: b ? m.Click : m.Hover,
63
66
  contentClassName: "max-w-[min(550px,calc(100vw-10px))]",
64
- content: a == null ? i ? /* @__PURE__ */ F(H, { unsupportedMessage: h }) : /* @__PURE__ */ F(H, {
67
+ content: a == null ? i ? /* @__PURE__ */ P(H, { unsupportedMessage: h }) : /* @__PURE__ */ P(H, {
65
68
  description: n,
66
69
  viewDetailsLabel: f,
67
70
  onViewDetails: S
68
- }) : /* @__PURE__ */ F(H, {
71
+ }) : /* @__PURE__ */ P(H, {
69
72
  unresolvedReason: a,
70
73
  deletedMessage: g,
71
74
  notSharedMessage: _
72
75
  }),
73
- children: /* @__PURE__ */ I("span", {
76
+ children: /* @__PURE__ */ F("span", {
74
77
  tabIndex: 0,
75
78
  className: r("relative -me-1 -ms-1 inline cursor-pointer select-text rounded-full pe-1 ps-1", i ? c : "hover:bg-info focus-visible:bg-info active:bg-info", i ? r(o, s) : o, B.chip),
76
79
  "aria-label": `/${e}`,
77
- children: [/* @__PURE__ */ F("span", {
80
+ children: [/* @__PURE__ */ P("span", {
78
81
  ref: C,
79
82
  "aria-hidden": !0,
80
83
  className: "inset-inline-start-0 pointer-events-none absolute top-0 select-none",
81
84
  children: "/"
82
- }), /* @__PURE__ */ F("span", {
85
+ }), /* @__PURE__ */ P("span", {
83
86
  "aria-hidden": !0,
84
87
  className: "select-none",
85
88
  style: { paddingInlineStart: w ?? void 0 },
@@ -98,14 +101,14 @@ var B = {
98
101
  rowLeaving: "_rowLeaving_1v431_32",
99
102
  rowFadeOut: "_rowFadeOut_1v431_1",
100
103
  listContent: "_listContent_1v431_60"
101
- }, ne = "px-3 pb-0.5 pt-2", re = 180, G = 288, K = ({ favorites: n, onSelect: i, onToggleFavorite: a, onBrowse: o, onViewDetails: s, className: l, rowClassName: u, searchQuery: m, listboxId: h, activeOptionId: g, isMenu: _ = !1, labels: v = {}, colors: b, nameClassName: x = "dial-small-text", headerClassName: S = "dial-tiny-lead-semi-text", emptyHintClassName: C = "dial-small-text" }) => {
102
- let { myCollectionLabel: D = "My Collection", emptyHintLabel: ee = "Star a skill to pin it here", browseLabel: A = "Browse", removeFromFavoritesLabel: j = "Remove from favorites", viewDetailsLabel: N = "View details", noMatchingSkillsLabel: P = "No matching skills" } = v, L = t({
104
+ }, G = "px-3 pb-0.5 pt-2", ne = 180, re = 288, K = ({ favorites: n, onSelect: i, onToggleFavorite: a, onBrowse: o, onViewDetails: s, className: l, rowClassName: u, searchQuery: m, listboxId: h, activeOptionId: g, isMenu: _ = !1, labels: v = {}, colors: b, nameClassName: x = "dial-small-text", headerClassName: S = "dial-tiny-lead-semi-text", emptyHintClassName: C = "dial-small-text" }) => {
105
+ let { myCollectionLabel: E = "My Collection", emptyHintLabel: te = "Star a skill to pin it here", browseLabel: k = "Browse", removeFromFavoritesLabel: A = "Remove from favorites", viewDetailsLabel: M = "View details", noMatchingSkillsLabel: N = "No matching skills" } = v, I = t({
103
106
  "--fs-row-hover-bg": b?.rowHoverBackground,
104
107
  "--fs-header-text": b?.headerText,
105
108
  "--fs-empty-hint-text": b?.emptyHintText,
106
109
  "--fs-star-color": b?.starColor,
107
110
  "--fs-footer-border": b?.footerBorder
108
- }), [te, R] = k(/* @__PURE__ */ new Set()), z = O(/* @__PURE__ */ new Map());
111
+ }), [L, R] = O(/* @__PURE__ */ new Set()), z = D(/* @__PURE__ */ new Map());
109
112
  w(() => {
110
113
  let e = z.current;
111
114
  return () => {
@@ -114,43 +117,43 @@ var B = {
114
117
  }, []);
115
118
  let V = h != null, U = _ && !V, K = V || U ? "none" : void 0, q = "button";
116
119
  V ? q = "option" : U && (q = "menuitem");
117
- let J = T(), Y = m != null, X = m?.toLowerCase() ?? "", Z = Y ? n.filter((e) => e.name.toLowerCase().includes(X)) : n, Q = O(null), [ie, ae] = k();
118
- E(() => {
119
- Q.current && ae(Math.min(Q.current.scrollHeight, G));
120
+ let J = T(), Y = m != null, X = m?.toLowerCase() ?? "", Z = Y ? n.filter((e) => e.name.toLowerCase().includes(X)) : n, Q = D(null), [ie, ae] = O();
121
+ ee(() => {
122
+ Q.current && ae(Math.min(Q.current.scrollHeight, re));
120
123
  }, [n, m]);
121
- let $ = (e, t) => {
124
+ let oe = (e, t) => {
122
125
  e.target === e.currentTarget && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), i(t));
123
- }, oe = (e) => {
126
+ }, $ = (e) => {
124
127
  R((t) => new Set(t).add(e));
125
128
  let t = setTimeout(() => {
126
129
  a?.(e), R((t) => {
127
130
  let n = new Set(t);
128
131
  return n.delete(e), n;
129
132
  }), z.current.delete(e);
130
- }, re);
133
+ }, ne);
131
134
  z.current.set(e, t);
132
135
  };
133
- return /* @__PURE__ */ I("div", {
136
+ return /* @__PURE__ */ F("div", {
134
137
  className: r("flex w-full flex-col desktop:w-[280px]", l, B.favoritesPanel),
135
- style: L,
138
+ style: I,
136
139
  children: [
137
- /* @__PURE__ */ F("p", {
140
+ /* @__PURE__ */ P("p", {
138
141
  id: J,
139
- className: r(S, ne, W.header),
140
- children: D
142
+ className: r(S, G, W.header),
143
+ children: E
141
144
  }),
142
- /* @__PURE__ */ F("div", {
145
+ /* @__PURE__ */ P("div", {
143
146
  className: r("max-h-72 min-h-0 flex-1 overflow-y-auto", W.listContent),
144
147
  style: { maxHeight: ie },
145
- children: /* @__PURE__ */ F("div", {
148
+ children: /* @__PURE__ */ P("div", {
146
149
  ref: Q,
147
- children: Z.length > 0 ? /* @__PURE__ */ F("ul", {
150
+ children: Z.length > 0 ? /* @__PURE__ */ P("ul", {
148
151
  id: h,
149
152
  role: V ? "listbox" : K,
150
153
  "aria-labelledby": V ? J : void 0,
151
154
  className: "flex flex-col gap-1 px-1 pb-1",
152
155
  children: Z.map((t) => {
153
- let n = V ? `${h}-${encodeURIComponent(t.id)}` : void 0, o = V ? -1 : void 0, l = /* @__PURE__ */ I("div", {
156
+ let n = V ? `${h}-${encodeURIComponent(t.id)}` : void 0, o = V ? -1 : void 0, l = /* @__PURE__ */ F("div", {
154
157
  role: q,
155
158
  id: n,
156
159
  "aria-selected": V ? n === g : void 0,
@@ -158,45 +161,45 @@ var B = {
158
161
  tabIndex: 0,
159
162
  className: r("flex cursor-pointer items-center gap-2 rounded-lg border border-transparent px-2 py-1.5 transition-colors", W.row, u),
160
163
  onClick: () => i(t),
161
- onKeyDown: (e) => $(e, t),
164
+ onKeyDown: (e) => oe(e, t),
162
165
  children: [
163
- /* @__PURE__ */ F(e, {
166
+ /* @__PURE__ */ P(e, {
164
167
  size: c.MD,
165
168
  initialsName: t.name
166
169
  }),
167
- m == null ? /* @__PURE__ */ F("span", {
170
+ m == null ? /* @__PURE__ */ P("span", {
168
171
  className: r(x, "min-w-0 flex-1 truncate text-start"),
169
172
  children: t.name
170
- }) : /* @__PURE__ */ F(f, {
173
+ }) : /* @__PURE__ */ P(f, {
171
174
  text: t.name,
172
175
  query: m,
173
176
  maxLines: 1,
174
177
  className: r(x, "min-w-0 flex-1 text-start")
175
178
  }),
176
- a && /* @__PURE__ */ F(y, {
177
- icon: /* @__PURE__ */ F(M, {
179
+ a && /* @__PURE__ */ P(y, {
180
+ icon: /* @__PURE__ */ P(j, {
178
181
  size: c.SM,
179
182
  className: W.star,
180
183
  "aria-hidden": !0
181
184
  }),
182
- "aria-label": j,
185
+ "aria-label": A,
183
186
  isSelected: !0,
184
187
  tabIndex: o,
185
188
  onClick: (e) => {
186
- e.stopPropagation(), oe(t.id);
189
+ e.stopPropagation(), $(t.id);
187
190
  }
188
191
  })
189
192
  ]
190
193
  });
191
- return /* @__PURE__ */ F("li", {
194
+ return /* @__PURE__ */ P("li", {
192
195
  role: K,
193
- className: te.has(t.id) ? W.rowLeaving : W.rowEnter,
194
- children: s ? /* @__PURE__ */ F(p, {
196
+ className: L.has(t.id) ? W.rowLeaving : W.rowEnter,
197
+ children: s ? /* @__PURE__ */ P(p, {
195
198
  asChild: !0,
196
199
  contentClassName: "max-w-[550px]",
197
- content: /* @__PURE__ */ F(H, {
200
+ content: /* @__PURE__ */ P(H, {
198
201
  description: t.description,
199
- viewDetailsLabel: N,
202
+ viewDetailsLabel: M,
200
203
  onViewDetails: () => s(t),
201
204
  viewDetailsTabIndex: o
202
205
  }),
@@ -204,22 +207,22 @@ var B = {
204
207
  }) : l
205
208
  }, t.id);
206
209
  })
207
- }) : Y && X !== "" ? /* @__PURE__ */ F("p", {
210
+ }) : Y && X !== "" ? /* @__PURE__ */ P("p", {
208
211
  role: "status",
209
212
  "aria-live": "polite",
210
213
  className: r(C, "px-4 py-4 text-start", W.emptyHint),
211
- children: P
212
- }) : /* @__PURE__ */ F("p", {
214
+ children: N
215
+ }) : /* @__PURE__ */ P("p", {
213
216
  className: r(C, "px-4 py-4 text-start", W.emptyHint),
214
- children: ee
217
+ children: te
215
218
  })
216
219
  })
217
220
  }),
218
- /* @__PURE__ */ F("div", {
221
+ /* @__PURE__ */ P("div", {
219
222
  className: r("border-t px-2 py-3", W.footer),
220
- children: /* @__PURE__ */ F(d, {
223
+ children: /* @__PURE__ */ P(d, {
221
224
  role: U ? "menuitem" : void 0,
222
- label: A,
225
+ label: k,
223
226
  className: "w-full justify-center",
224
227
  onClick: o
225
228
  })
@@ -228,19 +231,19 @@ var B = {
228
231
  });
229
232
  }, q = ".zip,.md", J = ({ isOpen: e, errorText: t, isUploading: n = !1, accept: r = q, labels: i, onClose: a, onFilesSelected: o, onFilesRejected: s }) => {
230
233
  let { dialogTitle: c = "Upload skill", dropZoneLabel: l = "Drag and drop it or click here to upload", dropZoneMobileLabel: d = "Click here to upload", formatsLabel: f = "File formats .zip and SKILL.md", fileInputAriaLabel: p = "Upload a skill ZIP archive or a SKILL.md file", closeAriaLabel: m = "Close", uploadingAriaLabel: _ = "Uploading skill" } = i ?? {};
231
- return /* @__PURE__ */ F(h, {
234
+ return /* @__PURE__ */ P(h, {
232
235
  open: e,
233
236
  size: g.Sm,
234
237
  header: c,
235
238
  closeAriaLabel: m,
236
239
  onClose: a,
237
- children: /* @__PURE__ */ I("div", {
240
+ children: /* @__PURE__ */ F("div", {
238
241
  className: "flex flex-col gap-4 px-6 py-4",
239
- children: [/* @__PURE__ */ F(u, {
240
- label: /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F("span", {
242
+ children: [/* @__PURE__ */ P(u, {
243
+ label: /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ P("span", {
241
244
  className: "desktop:hidden",
242
245
  children: d
243
- }), /* @__PURE__ */ F("span", {
246
+ }), /* @__PURE__ */ P("span", {
244
247
  className: "hidden desktop:inline",
245
248
  children: l
246
249
  })] }),
@@ -251,18 +254,18 @@ var B = {
251
254
  errorText: n ? void 0 : t,
252
255
  onChange: o,
253
256
  onReject: s
254
- }), n && /* @__PURE__ */ F(v, { ariaLabel: _ })]
257
+ }), n && /* @__PURE__ */ P(v, { ariaLabel: _ })]
255
258
  })
256
259
  });
257
- }, Y = ({ isOpen: e, onClose: t, onSelect: n, title: r, renderContent: i }) => /* @__PURE__ */ F(h, {
260
+ }, Y = ({ isOpen: e, onClose: t, onSelect: n, title: r, renderContent: i }) => /* @__PURE__ */ P(h, {
258
261
  open: e,
259
262
  header: r,
260
263
  size: g.Lg,
261
264
  className: "h-[min(90vh,860px)] !max-w-[min(95vw,1200px)] overflow-hidden",
262
265
  onClose: t,
263
- children: /* @__PURE__ */ F("div", {
266
+ children: /* @__PURE__ */ P("div", {
264
267
  className: "h-[min(80vh,840px)] overflow-auto",
265
- children: /* @__PURE__ */ F(S, {
268
+ children: /* @__PURE__ */ P(S, {
266
269
  fallback: null,
267
270
  children: e && i(n, t)
268
271
  })
@@ -270,35 +273,35 @@ var B = {
270
273
  }), X = (e, t = null) => e.map((e) => e.type === R.Folder ? {
271
274
  path: e.id,
272
275
  name: e.name,
273
- nodeType: L.FOLDER,
276
+ nodeType: I.FOLDER,
274
277
  parentPath: t,
275
278
  folderId: e.id,
276
279
  items: X(e.items, e.id)
277
280
  } : {
278
281
  path: e.id,
279
282
  name: e.name,
280
- nodeType: L.ITEM,
283
+ nodeType: I.ITEM,
281
284
  parentPath: t,
282
285
  folderId: t ?? ""
283
- }), Z = ({ nodes: e, selectedFileId: t, expandedFolderIds: n, onToggleFolder: r, onSelectFile: i, onClose: a, ariaLabel: o }) => /* @__PURE__ */ F(te, {
284
- items: D(() => X(e), [e]),
286
+ }), Z = ({ nodes: e, selectedFileId: t, expandedFolderIds: n, onToggleFolder: r, onSelectFile: i, onClose: a, ariaLabel: o }) => /* @__PURE__ */ P(L, {
287
+ items: E(() => X(e), [e]),
285
288
  showFiles: !0,
286
289
  areHiddenFilesVisible: !0,
287
290
  selectedPath: t,
288
- expandedPaths: D(() => new Set(n), [n]),
291
+ expandedPaths: E(() => new Set(n), [n]),
289
292
  onExpandedPathsChange: (e) => {
290
293
  for (let t of e) n.has(t) || r(t);
291
294
  for (let t of n) e.has(t) || r(t);
292
295
  },
293
296
  onItemClick: (e) => {
294
- e.nodeType === L.ITEM && i(e.path);
297
+ e.nodeType === I.ITEM && i(e.path);
295
298
  },
296
299
  ariaLabel: o,
297
300
  autoFocus: !0,
298
301
  onEscape: a
299
- }), Q = (e) => /* @__PURE__ */ F(z, {
302
+ }), Q = (e) => /* @__PURE__ */ P(z, {
300
303
  ...e,
301
- renderContentFileTree: (e) => /* @__PURE__ */ F(Z, { ...e })
304
+ renderContentFileTree: (e) => /* @__PURE__ */ P(Z, { ...e })
302
305
  }), ie = (e) => e == null || /[\s/]/.test(e), ae = (e, t, n) => {
303
306
  let r = [], i = 0;
304
307
  return t.forEach((t, a) => {
@@ -318,7 +321,7 @@ var B = {
318
321
  s = t + 1;
319
322
  }
320
323
  }), r;
321
- }, $ = (e, t) => {
324
+ }, oe = (e, t) => {
322
325
  let n = Math.min(e.length, t.length), r = 0;
323
326
  for (; r < n && e[r] === t[r];) r += 1;
324
327
  let i = n - r, a = 0;
@@ -328,7 +331,7 @@ var B = {
328
331
  deletedLength: e.length - r - a,
329
332
  insertedLength: t.length - r - a
330
333
  };
331
- }, oe = (e, t) => {
334
+ }, $ = (e, t) => {
332
335
  let n = t.start + t.deletedLength, r = t.insertedLength - t.deletedLength;
333
336
  return e.reduce((e, i) => i.start + i.length <= t.start ? (e.push(i), e) : (i.start >= n && e.push({
334
337
  ...i,
@@ -356,20 +359,20 @@ var B = {
356
359
  end: i
357
360
  };
358
361
  }, ue = () => {
359
- let [e, t] = k(""), [n, r] = k([]), i = O(e);
362
+ let [e, t] = O(""), [n, r] = O([]), i = D(e);
360
363
  i.current = e;
361
- let a = O(n);
364
+ let a = D(n);
362
365
  a.current = n;
363
366
  let o = C((e) => {
364
- let n = $(i.current, e);
365
- r((e) => oe(e, n)), i.current = e, t(e);
367
+ let n = oe(i.current, e);
368
+ r((e) => $(e, n)), i.current = e, t(e);
366
369
  }, []), s = C((e, n, a) => {
367
370
  let o = i.current, s = !/^\s/.test(o.slice(a)), c = `/${n}${s ? " " : ""}`, l = o.slice(0, a) + c + o.slice(a);
368
371
  return i.current = l, t(l), r((t) => se(t, a, e, n, s)), s;
369
372
  }, []), c = C((e, n, a) => {
370
373
  let o = i.current, s = `/${n}`, c = o.slice(0, a) + s + o.slice(a);
371
374
  i.current = c, t(c), r((t) => se(t, a, e, n, !1));
372
- }, []), l = C((e) => ce(a.current, e), []), u = D(() => {
375
+ }, []), l = C((e) => ce(a.current, e), []), u = E(() => {
373
376
  if (n.length !== 0) return n.map((e) => ({ url: e.url }));
374
377
  }, [n]), d = C(() => {
375
378
  t(""), r([]);
@@ -385,7 +388,7 @@ var B = {
385
388
  };
386
389
  }));
387
390
  }, []);
388
- return D(() => ({
391
+ return E(() => ({
389
392
  draft: e,
390
393
  anchors: n,
391
394
  onDraftChange: o,
@@ -416,8 +419,8 @@ var B = {
416
419
  }, pe = (e) => {
417
420
  let t = e.split("/").filter((e) => e.length > 0);
418
421
  return t[0] !== "skills" || t.length < 3 ? null : t[1];
419
- }, me = (e, t) => pe(e) === t ? V.Deleted : V.NotShared, he = "/", ge = ({ isSkillsSupported: e, skills: t, sharedWithMe: n, publicSkills: r, favoriteIds: a, viewerBucket: o, onToggleFavorite: s, labels: c, historyChipLabelClassName: u, activeMentionDetailsTrigger: d, historyDetailsTrigger: f, renderCatalogContent: p, detailsPanelComponent: m }) => {
420
- let { addMenuLabel: h = "Skills", backLabel: g = "Back", catalogModalTitleLabel: _ = "Use skill", emptyQueryHintLabel: v = "Type to filter", deletedTooltipLabel: y, notSharedTooltipLabel: b, unsupportedTooltipLabel: x, panelLabels: w } = c ?? {}, [T, E] = k(!1), [A, j] = k(null), [M, N] = k(0), P = O(null), [I, L] = k(0), [te, R] = k(void 0), z = ue(), B = D(() => [
422
+ }, me = (e, t) => pe(e) === t ? V.Deleted : V.NotShared, he = "/", ge = ({ isSkillsSupported: e, skills: t, sharedWithMe: n, publicSkills: r, favoriteIds: a, viewerBucket: o, onToggleFavorite: s, labels: c, historyChipLabelClassName: u, activeMentionLabelClassName: d = "text-accent", activeMentionDetailsTrigger: f, historyDetailsTrigger: p, renderCatalogContent: m, detailsPanelComponent: h }) => {
423
+ let { addMenuLabel: g = "Skills", backLabel: _ = "Back", catalogModalTitleLabel: v = "Use skill", emptyQueryHintLabel: y = "Type to filter", deletedTooltipLabel: b, notSharedTooltipLabel: x, unsupportedTooltipLabel: w, panelLabels: T } = c ?? {}, [ee, k] = O(!1), [A, j] = O(null), [M, N] = O(0), F = D(null), [I, L] = O(0), [R, z] = O(void 0), B = ue(), V = E(() => [
421
424
  ...t,
422
425
  ...n ?? [],
423
426
  ...r ?? []
@@ -425,217 +428,217 @@ var B = {
425
428
  t,
426
429
  n,
427
430
  r
428
- ]), V = D(() => new Map(B.map((e) => [e.url, e])), [B]), H = C((e) => V.get(e)?.name ?? fe(e), [V]), W = D(() => B.filter((e) => a.has(e.url)).map((e) => de(e)), [B, a]), ne = z.anchors.length > 0 && !e, re = D(() => z.anchors.map((t) => ({
431
+ ]), H = E(() => new Map(V.map((e) => [e.url, e])), [V]), W = C((e) => H.get(e)?.name ?? fe(e), [H]), G = E(() => V.filter((e) => a.has(e.url)).map((e) => de(e)), [V, a]), ne = B.anchors.length > 0 && !e, re = E(() => B.anchors.map((t) => ({
429
432
  start: t.start,
430
433
  length: t.length,
431
434
  isUnsupported: !e,
432
- render: () => /* @__PURE__ */ F(U, {
435
+ render: () => /* @__PURE__ */ P(U, {
433
436
  name: t.name,
434
437
  path: t.url,
435
- labelClassName: u,
436
- description: V.get(t.url)?.description,
438
+ labelClassName: d,
439
+ description: H.get(t.url)?.description,
437
440
  isUnsupported: !e,
438
- detailsTrigger: d,
441
+ detailsTrigger: f,
439
442
  onViewDetails: j,
440
443
  labels: {
441
- viewDetailsLabel: w?.viewDetailsLabel,
442
- unsupportedTooltipLabel: x
444
+ viewDetailsLabel: T?.viewDetailsLabel,
445
+ unsupportedTooltipLabel: w
443
446
  }
444
447
  })
445
448
  })), [
446
- z.anchors,
449
+ B.anchors,
447
450
  e,
448
- V,
449
- u,
451
+ H,
450
452
  d,
451
- w,
452
- x
453
- ]), G = C((e, t, n) => {
454
- let r = z.insertMention(e, t, n);
455
- L((e) => e + 1), R(n + 1 + t.length + +!!r);
456
- }, [z]), q = C((e) => {
457
- let t = le(z.draft, e, he);
458
- return t == null ? e : (z.onDraftChange(z.draft.slice(0, t.start) + z.draft.slice(t.end)), t.start);
459
- }, [z]), J = C((e) => {
460
- let t = le(z.draft, e, he);
453
+ f,
454
+ T,
455
+ w
456
+ ]), q = C((e, t, n) => {
457
+ let r = B.insertMention(e, t, n);
458
+ L((e) => e + 1), z(n + 1 + t.length + +!!r);
459
+ }, [B]), J = C((e) => {
460
+ let t = le(B.draft, e, he);
461
+ return t == null ? e : (B.onDraftChange(B.draft.slice(0, t.start) + B.draft.slice(t.end)), t.start);
462
+ }, [B]), X = C((e) => {
463
+ let t = le(B.draft, e, he);
461
464
  if (t == null) return;
462
- let n = z.anchors.find((e) => e.start === t.start && e.start + e.length === t.end);
465
+ let n = B.anchors.find((e) => e.start === t.start && e.start + e.length === t.end);
463
466
  return {
464
467
  position: t.start,
465
- text: z.draft.slice(t.start, t.end),
468
+ text: B.draft.slice(t.start, t.end),
466
469
  mentionUrl: n?.url
467
470
  };
468
- }, [z]), X = C(() => {
469
- z.reset(), L((e) => e + 1), R(void 0);
470
- }, [z]), Z = C((e, t) => {
471
- z.seedFromMessage(e, t, H), L((e) => e + 1), R(void 0);
472
- }, [z, H]), Q = C((e, t) => {
471
+ }, [B]), Z = C(() => {
472
+ B.reset(), L((e) => e + 1), z(void 0);
473
+ }, [B]), Q = C((e, t) => {
474
+ B.seedFromMessage(e, t, W), L((e) => e + 1), z(void 0);
475
+ }, [B, W]), ie = C((e, t) => {
473
476
  if (t == null || t.length === 0) return null;
474
- let n = ae(e, t, H), r = [], i = 0;
477
+ let n = ae(e, t, W), r = [], i = 0;
475
478
  return n.forEach((n) => {
476
479
  n.start > i && r.push(e.slice(i, n.start));
477
- let a = t[n.skillIndex], s = V.get(a.url), c = s?.name ?? fe(a.url), l = s == null ? me(a.url, o) : void 0;
478
- r.push(/* @__PURE__ */ F(U, {
480
+ let a = t[n.skillIndex], s = H.get(a.url), c = s?.name ?? fe(a.url), l = s == null ? me(a.url, o) : void 0;
481
+ r.push(/* @__PURE__ */ P(U, {
479
482
  name: c,
480
483
  path: a.url,
481
484
  labelClassName: u,
482
485
  description: s?.description,
483
486
  unresolvedReason: l,
484
- detailsTrigger: f,
487
+ detailsTrigger: p,
485
488
  onViewDetails: j,
486
489
  labels: {
487
- viewDetailsLabel: w?.viewDetailsLabel,
488
- deletedTooltipLabel: y,
489
- notSharedTooltipLabel: b
490
+ viewDetailsLabel: T?.viewDetailsLabel,
491
+ deletedTooltipLabel: b,
492
+ notSharedTooltipLabel: x
490
493
  }
491
494
  }, `${a.url}-${n.start}`)), i = n.start + n.length;
492
495
  }), i < e.length && r.push(e.slice(i)), r;
493
496
  }, [
497
+ W,
494
498
  H,
495
- V,
496
499
  u,
497
- f,
498
- w,
500
+ p,
501
+ T,
499
502
  o,
500
- y,
501
- b
502
- ]), ie = C((e) => e == null || e.length === 0 ? null : e.map((e) => {
503
- let t = V.get(e.url), n = t?.name ?? fe(e.url), r = t == null ? me(e.url, o) : void 0;
504
- return /* @__PURE__ */ F(U, {
503
+ b,
504
+ x
505
+ ]), oe = C((e) => e == null || e.length === 0 ? null : e.map((e) => {
506
+ let t = H.get(e.url), n = t?.name ?? fe(e.url), r = t == null ? me(e.url, o) : void 0;
507
+ return /* @__PURE__ */ P(U, {
505
508
  name: n,
506
509
  path: e.url,
507
510
  labelClassName: u,
508
511
  description: t?.description,
509
512
  unresolvedReason: r,
510
- detailsTrigger: f,
513
+ detailsTrigger: p,
511
514
  onViewDetails: j,
512
515
  labels: {
513
- viewDetailsLabel: w?.viewDetailsLabel,
514
- deletedTooltipLabel: y,
515
- notSharedTooltipLabel: b
516
+ viewDetailsLabel: T?.viewDetailsLabel,
517
+ deletedTooltipLabel: b,
518
+ notSharedTooltipLabel: x
516
519
  }
517
520
  }, e.url);
518
521
  }), [
519
- V,
522
+ H,
520
523
  u,
521
- f,
522
- w,
524
+ p,
525
+ T,
523
526
  o,
524
- y,
525
- b
526
- ]), $ = C((e, t) => /* @__PURE__ */ F(K, {
527
- favorites: W,
527
+ b,
528
+ x
529
+ ]), $ = C((e, t) => /* @__PURE__ */ P(K, {
530
+ favorites: G,
528
531
  isMenu: !0,
529
532
  onSelect: (n) => {
530
- G(n.id, n.name, q(t)), e();
533
+ q(n.id, n.name, J(t)), e();
531
534
  },
532
535
  onToggleFavorite: s,
533
536
  onBrowse: () => {
534
- let n = J(t);
535
- N(q(t)), P.current = n ?? null, e(), E(!0);
537
+ let n = X(t);
538
+ N(J(t)), F.current = n ?? null, e(), k(!0);
536
539
  },
537
540
  onViewDetails: (n) => {
538
- q(t), e(), j(n.id);
541
+ J(t), e(), j(n.id);
539
542
  },
540
- labels: w
543
+ labels: T
541
544
  }), [
542
- W,
543
545
  G,
544
546
  q,
545
547
  J,
548
+ X,
546
549
  s,
547
- w
550
+ T
548
551
  ]);
549
552
  return {
550
- skillMenuOverlay: D(() => e ? {
553
+ skillMenuOverlay: E(() => e ? {
551
554
  key: "skills",
552
- title: h,
553
- icon: /* @__PURE__ */ F(ee, {
555
+ title: g,
556
+ icon: /* @__PURE__ */ P(te, {
554
557
  size: i,
555
558
  "aria-hidden": !0,
556
559
  stroke: l
557
560
  }),
558
561
  renderOverlay: $,
559
- backLabel: g
562
+ backLabel: _
560
563
  } : void 0, [
561
564
  e,
562
- h,
563
565
  g,
566
+ _,
564
567
  $
565
568
  ]),
566
- commandMenu: D(() => e ? {
569
+ commandMenu: E(() => e ? {
567
570
  triggerPrefix: he,
568
- menuLabel: h,
569
- emptyQueryHint: v,
570
- renderMenu: ({ query: e, caretPosition: t, close: n, listboxId: r, activeOptionId: i }) => /* @__PURE__ */ F(K, {
571
- favorites: W,
571
+ menuLabel: g,
572
+ emptyQueryHint: y,
573
+ renderMenu: ({ query: e, caretPosition: t, close: n, listboxId: r, activeOptionId: i }) => /* @__PURE__ */ P(K, {
574
+ favorites: G,
572
575
  searchQuery: e,
573
576
  listboxId: r,
574
577
  activeOptionId: i,
575
578
  onSelect: (e) => {
576
- n({ consumeQuery: !0 }), G(e.id, e.name, t);
579
+ n({ consumeQuery: !0 }), q(e.id, e.name, t);
577
580
  },
578
581
  onToggleFavorite: s,
579
582
  onBrowse: () => {
580
- let r = `${he}${e}`, i = z.anchors.find((e) => e.start === t && e.length === r.length);
583
+ let r = `${he}${e}`, i = B.anchors.find((e) => e.start === t && e.length === r.length);
581
584
  n({
582
585
  consumeQuery: !0,
583
586
  returnFocus: !1
584
- }), N(t), P.current = {
587
+ }), N(t), F.current = {
585
588
  position: t,
586
589
  text: r,
587
590
  mentionUrl: i?.url
588
- }, E(!0);
591
+ }, k(!0);
589
592
  },
590
593
  onViewDetails: (e) => {
591
594
  n({ consumeQuery: !0 }), j(e.id);
592
595
  },
593
- labels: w
596
+ labels: T
594
597
  })
595
598
  } : void 0, [
596
599
  e,
597
- h,
598
- v,
599
- W,
600
+ g,
601
+ y,
600
602
  G,
601
- z.anchors,
603
+ q,
604
+ B.anchors,
602
605
  s,
603
- w
606
+ T
604
607
  ]),
605
- skillCatalogModal: /* @__PURE__ */ F(Y, {
606
- isOpen: T,
608
+ skillCatalogModal: /* @__PURE__ */ P(Y, {
609
+ isOpen: ee,
607
610
  onClose: C(() => {
608
- E(!1);
609
- let e = P.current;
610
- if (P.current = null, e == null) return;
611
+ k(!1);
612
+ let e = F.current;
613
+ if (F.current = null, e == null) return;
611
614
  let { position: t, text: n, mentionUrl: r } = e;
612
- r == null ? z.onDraftChange(z.draft.slice(0, t) + n + z.draft.slice(t)) : z.restoreMention(r, n.slice(1), t), L((e) => e + 1), R(t + n.length);
613
- }, [z]),
615
+ r == null ? B.onDraftChange(B.draft.slice(0, t) + n + B.draft.slice(t)) : B.restoreMention(r, n.slice(1), t), L((e) => e + 1), z(t + n.length);
616
+ }, [B]),
614
617
  onSelect: (e) => {
615
- P.current = null, G(e, H(e), M), E(!1);
618
+ F.current = null, q(e, W(e), M), k(!1);
616
619
  },
617
- title: _,
618
- renderContent: p
620
+ title: v,
621
+ renderContent: m
619
622
  }),
620
- skillDetailsPanel: /* @__PURE__ */ F(S, {
623
+ skillDetailsPanel: /* @__PURE__ */ P(S, {
621
624
  fallback: null,
622
- children: /* @__PURE__ */ F(m, {
625
+ children: /* @__PURE__ */ P(h, {
623
626
  skillId: A,
624
627
  onClose: () => j(null)
625
628
  })
626
629
  }),
627
- message: z.draft,
630
+ message: B.draft,
628
631
  messageRevision: I,
629
632
  activeMentions: re,
630
- onDraftChange: z.onDraftChange,
631
- onBackspaceAtCaret: z.onBackspaceAtCaret,
632
- caretPositionOverride: te,
633
+ onDraftChange: B.onDraftChange,
634
+ onBackspaceAtCaret: B.onBackspaceAtCaret,
635
+ caretPositionOverride: R,
633
636
  isSkillUnsupported: ne,
634
- selectedSkills: z.orderedSkills,
635
- resetSkillMentions: X,
636
- seedSkillMentions: Z,
637
- renderHistorySkillSegments: Q,
638
- renderHistorySkills: ie
637
+ selectedSkills: B.orderedSkills,
638
+ resetSkillMentions: Z,
639
+ seedSkillMentions: Q,
640
+ renderHistorySkillSegments: ie,
641
+ renderHistorySkills: oe
639
642
  };
640
643
  }, _e = {
641
644
  background: "_background_1ult0_1",
@@ -644,25 +647,25 @@ var B = {
644
647
  clear: "_clear_1ult0_13",
645
648
  invalid: "_invalid_1ult0_17"
646
649
  }, ve = [], ye = "Selected model does not support skills. Select a different model to use a skill.", be = ({ value: i, onChange: a, displayNames: o, skills: s = ve, isSkillsSupported: l, isDisabled: u = !1, error: d, labels: p, className: m, styles: h }) => {
647
- let [g, v] = k(!1), [y, x] = k(""), S = O(null), C = T(), w = i.some((e) => n(e, l)), D = l && !u, ee = g && D, A = i.length > 0 ? p.unsupportedTooltipLabel : p.unavailableTooltipLabel ?? ye, j = !l && i.length === 0, M = d ?? (j ? A : void 0), N = new Map(i.map((e) => [e, {
650
+ let [g, v] = O(!1), [y, x] = O(""), S = D(null), C = T(), w = i.some((e) => n(e, l)), E = l && !u, te = g && E, k = i.length > 0 ? p.unsupportedTooltipLabel : p.unavailableTooltipLabel ?? ye, A = !l && i.length === 0, j = d ?? (A ? k : void 0), M = new Map(i.map((e) => [e, {
648
651
  id: e,
649
652
  name: o?.[e] || e
650
653
  }]));
651
- s.forEach((e) => N.set(e.id, e));
652
- let P = [...N.values()].map((t) => ({
654
+ s.forEach((e) => M.set(e.id, e));
655
+ let N = [...M.values()].map((t) => ({
653
656
  value: t.id,
654
657
  label: t.name,
655
- labelNode: y.trim() ? /* @__PURE__ */ F(f, {
658
+ labelNode: y.trim() ? /* @__PURE__ */ P(f, {
656
659
  text: t.name,
657
660
  query: y,
658
661
  maxLines: 1
659
662
  }) : void 0,
660
- icon: /* @__PURE__ */ F(e, {
663
+ icon: /* @__PURE__ */ P(e, {
661
664
  size: c.SM,
662
665
  initialsName: t.name
663
666
  }),
664
667
  disabled: !l
665
- })), L = {
668
+ })), I = {
666
669
  ...t({
667
670
  "--ssf-text": h?.colors?.text,
668
671
  "--ssf-bg": h?.colors?.background,
@@ -671,57 +674,57 @@ var B = {
671
674
  }),
672
675
  ...h?.cssVars
673
676
  };
674
- return E(() => {
677
+ return ee(() => {
675
678
  let e = S.current?.querySelector("[role=\"combobox\"]");
676
- e && (M ? e.setAttribute("aria-describedby", C) : e.removeAttribute("aria-describedby"), d || w ? e.setAttribute("aria-invalid", "true") : e.removeAttribute("aria-invalid"));
679
+ e && (j ? e.setAttribute("aria-describedby", C) : e.removeAttribute("aria-describedby"), d || w ? e.setAttribute("aria-invalid", "true") : e.removeAttribute("aria-invalid"));
677
680
  }, [
678
- M,
681
+ j,
679
682
  C,
680
683
  d,
681
684
  u,
682
685
  w
683
- ]), /* @__PURE__ */ I("div", {
686
+ ]), /* @__PURE__ */ F("div", {
684
687
  ref: S,
685
688
  className: r("min-w-0", m, B.selectorField),
686
- style: L,
687
- children: [/* @__PURE__ */ F(b, {
688
- tooltip: A,
689
+ style: I,
690
+ children: [/* @__PURE__ */ P(b, {
691
+ tooltip: k,
689
692
  hideTooltip: l,
690
693
  triggerClassName: "block w-full min-w-0",
691
- children: /* @__PURE__ */ F("div", {
694
+ children: /* @__PURE__ */ P("div", {
692
695
  inert: u ? !0 : void 0,
693
- children: /* @__PURE__ */ F(_, {
696
+ children: /* @__PURE__ */ P(_, {
694
697
  multiple: !0,
695
698
  searchable: !0,
696
- open: ee,
699
+ open: te,
697
700
  onOpenChange: (e) => {
698
- e && !D || v(e);
701
+ e && !E || v(e);
699
702
  },
700
703
  onSearchQueryChange: x,
701
704
  value: i,
702
705
  onChange: (e) => {
703
706
  u || a(Array.isArray(e) ? e : [e]);
704
707
  },
705
- options: P,
708
+ options: N,
706
709
  placeholder: p.placeholder,
707
710
  labelProps: { label: p.fieldLabel },
708
711
  error: d,
709
- caption: j ? A : void 0,
712
+ caption: A ? k : void 0,
710
713
  searchPlaceholder: p.searchPlaceholder ?? "Search skills",
711
714
  emptyStateTitle: y.trim() ? p.noMatchingSkillsLabel ?? "No matching skills" : p.emptyLabel ?? "No skills available",
712
- disabled: u || j,
715
+ disabled: u || A,
713
716
  invalid: !!d || w,
714
717
  className: "w-full min-w-0",
715
- fieldClassName: r(D ? "cursor-pointer" : "cursor-not-allowed", "--ssf-bg" in L && _e.background, "--ssf-border" in L && _e.border, "--ssf-text" in L && _e.value, (d || w) && _e.invalid, h?.typography?.fontClassName ?? "dial-small-text", h?.triggerClassName),
718
+ fieldClassName: r(E ? "cursor-pointer" : "cursor-not-allowed", "--ssf-bg" in I && _e.background, "--ssf-border" in I && _e.border, "--ssf-text" in I && _e.value, (d || w) && _e.invalid, h?.typography?.fontClassName ?? "dial-small-text", h?.triggerClassName),
716
719
  listClassName: "w-[min(var(--reference-width),calc(100vw-2rem))] max-w-full"
717
720
  })
718
721
  })
719
- }), M && /* @__PURE__ */ F("span", {
722
+ }), j && /* @__PURE__ */ P("span", {
720
723
  id: C,
721
724
  className: "sr-only",
722
- children: M
725
+ children: j
723
726
  })]
724
727
  });
725
728
  };
726
729
  //#endregion
727
- export { U as ChatSkill, K as FavoriteSkillsPanel, B as SKILLS_CLASS, J as SkillArchiveUploadDialog, Y as SkillCatalogModal, Z as SkillContentFileTree, Q as SkillDetailsSidePanel, H as SkillInfoTooltipContent, be as SkillSelectorField, V as SkillUnresolvedReason, de as buildFavoriteSkillItem, $ as diffTextChange, ce as findMentionAtCaret, fe as getSkillFallbackName, se as insertAnchor, ae as matchSkillMentions, oe as reconcileAnchors, ue as useSkillMentions, ge as useSkillSelectorOverlay };
730
+ export { U as ChatSkill, K as FavoriteSkillsPanel, B as SKILLS_CLASS, J as SkillArchiveUploadDialog, Y as SkillCatalogModal, Z as SkillContentFileTree, Q as SkillDetailsSidePanel, H as SkillInfoTooltipContent, be as SkillSelectorField, V as SkillUnresolvedReason, de as buildFavoriteSkillItem, oe as diffTextChange, ce as findMentionAtCaret, fe as getSkillFallbackName, se as insertAnchor, ae as matchSkillMentions, $ as reconcileAnchors, ue as useSkillMentions, ge as useSkillSelectorOverlay };
@@ -52,7 +52,7 @@ export interface ChatSkillProps {
52
52
  * unaffected — it keeps rendering with `labelClassName` alone.
53
53
  */
54
54
  unresolvedReason?: SkillUnresolvedReason;
55
- /** CSS class applied to the `/name` label. Defaults to `'dial-body-paragraph-text'`. */
55
+ /** CSS class applied to the `/name` label. Defaults to `'dial-body-paragraph-text text-accent'`. */
56
56
  labelClassName?: string;
57
57
  /**
58
58
  * Color class applied to the `/{name}` label in addition to
@@ -1 +1 @@
1
- {"version":3,"file":"chat-skill-props.d.ts","sourceRoot":"","sources":["../../src/models/chat-skill-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAE9E,wEAAwE;AACxE,MAAM,WAAW,eAAe;IAC9B,mFAAmF;IACnF,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;OAIG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,mDAAmD;AACnD,MAAM,MAAM,uBAAuB,GAAG,OAAO,GAAG,OAAO,CAAC;AAExD,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;;;;;;;OAOG;IACH,gBAAgB,CAAC,EAAE,qBAAqB,CAAC;IACzC,wFAAwF;IACxF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC;;;OAGG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B;;;OAGG;IACH,cAAc,CAAC,EAAE,uBAAuB,CAAC;IACzC,wFAAwF;IACxF,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,oCAAoC;IACpC,MAAM,CAAC,EAAE,eAAe,CAAC;CAC1B"}
1
+ {"version":3,"file":"chat-skill-props.d.ts","sourceRoot":"","sources":["../../src/models/chat-skill-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAE9E,wEAAwE;AACxE,MAAM,WAAW,eAAe;IAC9B,mFAAmF;IACnF,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;OAIG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,mDAAmD;AACnD,MAAM,MAAM,uBAAuB,GAAG,OAAO,GAAG,OAAO,CAAC;AAExD,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;;;;;;;OAOG;IACH,gBAAgB,CAAC,EAAE,qBAAqB,CAAC;IACzC,oGAAoG;IACpG,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC;;;OAGG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B;;;OAGG;IACH,cAAc,CAAC,EAAE,uBAAuB,CAAC;IACzC,wFAAwF;IACxF,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,oCAAoC;IACpC,MAAM,CAAC,EAAE,eAAe,CAAC;CAC1B"}
@@ -93,6 +93,13 @@ export interface UseSkillSelectorOverlayOptions {
93
93
  * to that line. Unset falls back to the chip's own default label class.
94
94
  */
95
95
  historyChipLabelClassName?: string;
96
+ /**
97
+ * Class applied to the label of each mention rendered in an active composer.
98
+ * Pass color classes only: the label inherits the input's own font, which
99
+ * keeps it exactly as wide as the invisible text under it. Defaults to
100
+ * `'text-accent'`.
101
+ */
102
+ activeMentionLabelClassName?: string;
96
103
  /**
97
104
  * Trigger used by mentions rendered in an active composer. Unset retains
98
105
  * `ChatSkill`'s hover-and-focus default; history chips are unaffected.
@@ -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,oBAAoB,EACpB,iBAAiB,EAClB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAClE,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;IA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AAM,KAAK,IAAI,CAAC;IAC3C;;;;;;;OAOG;IACH,kBAAkB,EAAE,CAClB,aAAa,EAAE,MAAM,KAClB,oBAAoB,GAAG,SAAS,CAAC;IACtC;;;;;;OAMG;IACH,qBAAqB,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1C;;;;OAIG;IACH,kBAAkB,EAAE,OAAO,CAAC;IAC5B;;;;;OAKG;IACH,cAAc,EAAE,YAAY,EAAE,GAAG,SAAS,CAAC;IAC3C;;;;OAIG;IACH,kBAAkB,EAAE,MAAM,IAAI,CAAC;IAC/B;;;;;;OAMG;IACH,iBAAiB,EAAE,CACjB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,YAAY,EAAE,GAAG,SAAS,KAC/B,IAAI,CAAC;IACV;;;;;;;;;;;;;;OAcG;IACH,0BAA0B,EAAE,CAC1B,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,YAAY,EAAE,GAAG,SAAS,KAC/B,SAAS,EAAE,GAAG,IAAI,CAAC;IACxB;;;;;;;OAOG;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.2.0-dev.328",
4
+ "version": "1.2.0-dev.336",
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.2.0-dev.328",
22
- "@epam/ai-dial-conversation-input": "1.2.0-dev.328"
21
+ "@epam/ai-dial-catalog": "1.2.0-dev.336",
22
+ "@epam/ai-dial-conversation-input": "1.2.0-dev.336"
23
23
  },
24
24
  "peerDependencies": {
25
- "@epam/ai-dial-chat-shared": "1.2.0-dev.328",
26
- "@epam/ai-dial-react-file-manager": "^0.3.0-dev.25",
27
- "@epam/ai-dial-ui-kit": "^0.15.0-dev.51",
25
+ "@epam/ai-dial-chat-shared": "1.2.0-dev.336",
26
+ "@epam/ai-dial-react-file-manager": "^0.3.0",
27
+ "@epam/ai-dial-ui-kit": "^0.15.0",
28
28
  "react": "^19.2.8"
29
29
  },
30
30
  "repository": {