@epam/ai-dial-skills 1.2.0-rc.8 → 1.2.1

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,CA+IxC,CAAC"}
1
+ {"version":3,"file":"ChatSkill.d.ts","sourceRoot":"","sources":["../../../src/components/ChatSkill/ChatSkill.tsx"],"names":[],"mappings":"AAMA,OAAO,EAA6B,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAE3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAGpE;;;;GAIG;AACH,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CAwJxC,CAAC"}
package/index.css CHANGED
@@ -1,2 +1,2 @@
1
1
  ._row_1v431_1:hover,._row_1v431_1:focus-visible,._row_1v431_1[aria-selected=true]{background:var(--fs-row-hover-bg,var(--bg-layer-sunken,#eef1f7))}._header_1v431_8{color:var(--fs-header-text,var(--text-tertiary,#848e9c))}._emptyHint_1v431_12{color:var(--fs-empty-hint-text,var(--text-icon-tertiary,#848e9c))}._star_1v431_16{color:var(--fs-star-color,var(--text-warning-icon,#eec840))}._footer_1v431_20{border-top-color:var(--fs-footer-border,var(--stroke-tertiary,#e0e6f0))}._rowEnter_1v431_28{animation:.2s ease-out _rowFadeIn_1v431_1}._rowLeaving_1v431_32{pointer-events:none;animation:.18s ease-out forwards _rowFadeOut_1v431_1}@keyframes _rowFadeIn_1v431_1{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}@keyframes _rowFadeOut_1v431_1{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.96)}}._listContent_1v431_60{transition:max-height .2s}@media (prefers-reduced-motion:reduce){._rowEnter_1v431_28,._rowLeaving_1v431_32{animation:none}._listContent_1v431_60{transition:none}}._background_1ult0_1{background:var(--ssf-bg)}._border_1ult0_5{border-color:var(--ssf-border)}._value_1ult0_9{color:var(--ssf-text)}._clear_1ult0_13{margin-block:-.5rem}._invalid_1ult0_17{color:var(--ssf-error,var(--text-error,#ae2f2f));border-color:var(--ssf-error,var(--text-error,#ae2f2f))}._invalid_1ult0_17 input{color:var(--ssf-error,var(--text-error,#ae2f2f))}
2
- /*$vite$:1*/.sr-only{height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;clip:rect(0,0,0,0);border-width:0;white-space:nowrap}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.invisible{visibility:hidden}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.top-0{top:0}.-me-1{margin-inline-end:-.25rem}.-ms-1{margin-inline-start:-.25rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.hidden{display:none}.h-\[24px\]{height:24px}.h-\[min\(80vh\2c 840px\)\]{height:min(80vh,840px)}.h-\[min\(90vh\2c 860px\)\]{height:min(90vh,860px)}.max-h-72{max-height:18rem}.min-h-0{min-height:0}.w-\[min\(var\(--reference-width\)\2c calc\(100vw-2rem\)\)\]{width:min(var(--reference-width),calc(100vw - 2rem))}.w-full{width:100%}.min-w-0{min-width:0}.\!max-w-\[min\(95vw\2c 1200px\)\]{max-width:min(95vw,1200px)!important}.max-w-\[550px\]{max-width:550px}.max-w-\[min\(550px\2c calc\(100vw-10px\)\)\]{max-width:min(550px,calc(100vw - 10px))}.max-w-full{max-width:100%}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.select-text{-webkit-user-select:text;-moz-user-select:text;user-select:text}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.self-start{align-self:flex-start}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.border-t{border-top-width:1px}.border-transparent{border-color:transparent}.bg-error{background-color:var(--bg-error,#f3d6d8)}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-1\.5{padding-bottom:.375rem;padding-top:.375rem}.py-3{padding-bottom:.75rem;padding-top:.75rem}.py-4{padding-bottom:1rem;padding-top:1rem}.pb-0\.5{padding-bottom:.125rem}.pb-1{padding-bottom:.25rem}.pe-1{padding-inline-end:.25rem}.ps-1{padding-inline-start:.25rem}.pt-2{padding-top:.5rem}.text-start{text-align:start}.text-accent{color:var(--text-accent,#1d4ed8)}.text-error{color:var(--text-error,#ae2f2f)}.text-primary{color:var(--text-primary,#161b2d)}.text-secondary{color:var(--text-secondary,#57647a)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.hover\:bg-info:hover{background-color:var(--bg-info,#e1eaf9)}.focus-visible\:bg-info:focus-visible{background-color:var(--bg-info,#e1eaf9)}.active\:bg-info:active{background-color:var(--bg-info,#e1eaf9)}@media (max-width:1279px){.mobile\:h-full{height:100%}.mobile\:\!max-w-full{max-width:100%!important}.mobile\:rounded-none{border-radius:0}.mobile\:p-0{padding:0}}@media (min-width:1280px){.desktop\:inline{display:inline}.desktop\:hidden{display:none}.desktop\:w-\[280px\]{width:280px}}
2
+ /*$vite$:1*/.sr-only{height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;clip:rect(0,0,0,0);border-width:0;white-space:nowrap}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.invisible{visibility:hidden}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.top-0{top:0}.-me-1{margin-inline-end:-.25rem}.-ms-1{margin-inline-start:-.25rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.hidden{display:none}.h-\[24px\]{height:24px}.h-\[min\(80vh\2c 840px\)\]{height:min(80vh,840px)}.h-\[min\(90vh\2c 860px\)\]{height:min(90vh,860px)}.max-h-72{max-height:18rem}.min-h-0{min-height:0}.w-\[min\(var\(--reference-width\)\2c calc\(100vw-2rem\)\)\]{width:min(var(--reference-width),calc(100vw - 2rem))}.w-full{width:100%}.min-w-0{min-width:0}.\!max-w-\[min\(95vw\2c 1200px\)\]{max-width:min(95vw,1200px)!important}.max-w-\[550px\]{max-width:550px}.max-w-\[min\(550px\2c calc\(100vw-10px\)\)\]{max-width:min(550px,calc(100vw - 10px))}.max-w-full{max-width:100%}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.select-text{-webkit-user-select:text;-moz-user-select:text;user-select:text}.resize{resize:both}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.self-start{align-self:flex-start}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.border-t{border-top-width:1px}.border-transparent{border-color:transparent}.bg-error{background-color:var(--bg-error,#f3d6d8)}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-1\.5{padding-bottom:.375rem;padding-top:.375rem}.py-3{padding-bottom:.75rem;padding-top:.75rem}.py-4{padding-bottom:1rem;padding-top:1rem}.pb-0\.5{padding-bottom:.125rem}.pb-1{padding-bottom:.25rem}.pe-1{padding-inline-end:.25rem}.ps-1{padding-inline-start:.25rem}.pt-2{padding-top:.5rem}.text-start{text-align:start}.text-accent{color:var(--text-accent,#1d4ed8)}.text-error{color:var(--text-error,#ae2f2f)}.text-primary{color:var(--text-primary,#161b2d)}.text-secondary{color:var(--text-secondary,#57647a)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.hover\:bg-info:hover{background-color:var(--bg-info,#e1eaf9)}.focus-visible\:bg-info:focus-visible{background-color:var(--bg-info,#e1eaf9)}.active\:bg-info:active{background-color:var(--bg-info,#e1eaf9)}@media (max-width:1279px){.mobile\:h-full{height:100%}.mobile\:\!max-w-full{max-width:100%!important}.mobile\:rounded-none{border-radius:0}.mobile\:p-0{padding:0}}@media (min-width:1280px){.desktop\:inline{display:inline}.desktop\:hidden{display:none}.desktop\:w-\[280px\]{width:280px}}
package/index.js CHANGED
@@ -1,10 +1,10 @@
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 R } from "@epam/ai-dial-react-file-manager";
7
- import { CatalogContentNodeType as te, DetailsPanel as z } from "@epam/ai-dial-catalog";
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
+ 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 = {
10
10
  selectorField: "dial-skills-selector-field",
@@ -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,46 +46,49 @@ 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
- 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__ */ F(p, {
56
+ }, [C, w] = O(null), [T, E] = O(null);
57
+ return ee(() => {
58
+ if (!C) return;
59
+ let e = () => {
60
+ C.isConnected && E(C.getBoundingClientRect().width);
61
+ };
62
+ if (e(), typeof ResizeObserver > "u") return;
63
+ let t = new ResizeObserver(e);
64
+ return t.observe(C), () => t.disconnect();
65
+ }, [C, o]), /* @__PURE__ */ P(p, {
63
66
  asChild: !0,
64
67
  placement: x.Top,
65
68
  trigger: b ? m.Click : m.Hover,
66
69
  contentClassName: "max-w-[min(550px,calc(100vw-10px))]",
67
- content: a == null ? i ? /* @__PURE__ */ F(H, { unsupportedMessage: h }) : /* @__PURE__ */ F(H, {
70
+ content: a == null ? i ? /* @__PURE__ */ P(H, { unsupportedMessage: h }) : /* @__PURE__ */ P(H, {
68
71
  description: n,
69
72
  viewDetailsLabel: f,
70
73
  onViewDetails: S
71
- }) : /* @__PURE__ */ F(H, {
74
+ }) : /* @__PURE__ */ P(H, {
72
75
  unresolvedReason: a,
73
76
  deletedMessage: g,
74
77
  notSharedMessage: _
75
78
  }),
76
- children: /* @__PURE__ */ I("span", {
79
+ children: /* @__PURE__ */ F("span", {
77
80
  tabIndex: 0,
78
81
  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),
79
82
  "aria-label": `/${e}`,
80
- children: [/* @__PURE__ */ F("span", {
81
- ref: C,
83
+ children: [/* @__PURE__ */ P("span", {
84
+ ref: w,
82
85
  "aria-hidden": !0,
83
86
  className: "inset-inline-start-0 pointer-events-none absolute top-0 select-none",
84
87
  children: "/"
85
- }), /* @__PURE__ */ F("span", {
88
+ }), /* @__PURE__ */ P("span", {
86
89
  "aria-hidden": !0,
87
90
  className: "select-none",
88
- style: { paddingInlineStart: w ?? void 0 },
91
+ style: { paddingInlineStart: T ?? void 0 },
89
92
  children: e
90
93
  })]
91
94
  })
@@ -102,13 +105,13 @@ var B = {
102
105
  rowFadeOut: "_rowFadeOut_1v431_1",
103
106
  listContent: "_listContent_1v431_60"
104
107
  }, 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: 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({
108
+ 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({
106
109
  "--fs-row-hover-bg": b?.rowHoverBackground,
107
110
  "--fs-header-text": b?.headerText,
108
111
  "--fs-empty-hint-text": b?.emptyHintText,
109
112
  "--fs-star-color": b?.starColor,
110
113
  "--fs-footer-border": b?.footerBorder
111
- }), [R, te] = k(/* @__PURE__ */ new Set()), z = O(/* @__PURE__ */ new Map());
114
+ }), [L, R] = O(/* @__PURE__ */ new Set()), z = D(/* @__PURE__ */ new Map());
112
115
  w(() => {
113
116
  let e = z.current;
114
117
  return () => {
@@ -117,43 +120,43 @@ var B = {
117
120
  }, []);
118
121
  let V = h != null, U = _ && !V, K = V || U ? "none" : void 0, q = "button";
119
122
  V ? q = "option" : U && (q = "menuitem");
120
- let J = T(), Y = m != null, X = m?.toLowerCase() ?? "", Z = Y ? n.filter((e) => e.name.toLowerCase().includes(X)) : n, Q = O(null), [$, ie] = k();
121
- E(() => {
123
+ let J = T(), Y = m != null, X = m?.toLowerCase() ?? "", Z = Y ? n.filter((e) => e.name.toLowerCase().includes(X)) : n, Q = D(null), [$, ie] = O();
124
+ ee(() => {
122
125
  Q.current && ie(Math.min(Q.current.scrollHeight, re));
123
126
  }, [n, m]);
124
127
  let ae = (e, t) => {
125
128
  e.target === e.currentTarget && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), i(t));
126
129
  }, oe = (e) => {
127
- te((t) => new Set(t).add(e));
130
+ R((t) => new Set(t).add(e));
128
131
  let t = setTimeout(() => {
129
- a?.(e), te((t) => {
132
+ a?.(e), R((t) => {
130
133
  let n = new Set(t);
131
134
  return n.delete(e), n;
132
135
  }), z.current.delete(e);
133
136
  }, ne);
134
137
  z.current.set(e, t);
135
138
  };
136
- return /* @__PURE__ */ I("div", {
139
+ return /* @__PURE__ */ F("div", {
137
140
  className: r("flex w-full flex-col desktop:w-[280px]", l, B.favoritesPanel),
138
- style: L,
141
+ style: I,
139
142
  children: [
140
- /* @__PURE__ */ F("p", {
143
+ /* @__PURE__ */ P("p", {
141
144
  id: J,
142
145
  className: r(S, G, W.header),
143
- children: D
146
+ children: E
144
147
  }),
145
- /* @__PURE__ */ F("div", {
148
+ /* @__PURE__ */ P("div", {
146
149
  className: r("max-h-72 min-h-0 flex-1 overflow-y-auto", W.listContent),
147
150
  style: { maxHeight: $ },
148
- children: /* @__PURE__ */ F("div", {
151
+ children: /* @__PURE__ */ P("div", {
149
152
  ref: Q,
150
- children: Z.length > 0 ? /* @__PURE__ */ F("ul", {
153
+ children: Z.length > 0 ? /* @__PURE__ */ P("ul", {
151
154
  id: h,
152
155
  role: V ? "listbox" : K,
153
156
  "aria-labelledby": V ? J : void 0,
154
157
  className: "flex flex-col gap-1 px-1 pb-1",
155
158
  children: Z.map((t) => {
156
- let n = V ? `${h}-${encodeURIComponent(t.id)}` : void 0, o = V ? -1 : void 0, l = /* @__PURE__ */ I("div", {
159
+ let n = V ? `${h}-${encodeURIComponent(t.id)}` : void 0, o = V ? -1 : void 0, l = /* @__PURE__ */ F("div", {
157
160
  role: q,
158
161
  id: n,
159
162
  "aria-selected": V ? n === g : void 0,
@@ -163,26 +166,26 @@ var B = {
163
166
  onClick: () => i(t),
164
167
  onKeyDown: (e) => ae(e, t),
165
168
  children: [
166
- /* @__PURE__ */ F(e, {
169
+ /* @__PURE__ */ P(e, {
167
170
  size: c.MD,
168
171
  initialsName: t.name
169
172
  }),
170
- m == null ? /* @__PURE__ */ F("span", {
173
+ m == null ? /* @__PURE__ */ P("span", {
171
174
  className: r(x, "min-w-0 flex-1 truncate text-start"),
172
175
  children: t.name
173
- }) : /* @__PURE__ */ F(f, {
176
+ }) : /* @__PURE__ */ P(f, {
174
177
  text: t.name,
175
178
  query: m,
176
179
  maxLines: 1,
177
180
  className: r(x, "min-w-0 flex-1 text-start")
178
181
  }),
179
- a && /* @__PURE__ */ F(y, {
180
- icon: /* @__PURE__ */ F(M, {
182
+ a && /* @__PURE__ */ P(y, {
183
+ icon: /* @__PURE__ */ P(j, {
181
184
  size: c.SM,
182
185
  className: W.star,
183
186
  "aria-hidden": !0
184
187
  }),
185
- "aria-label": j,
188
+ "aria-label": A,
186
189
  isSelected: !0,
187
190
  tabIndex: o,
188
191
  onClick: (e) => {
@@ -191,15 +194,15 @@ var B = {
191
194
  })
192
195
  ]
193
196
  });
194
- return /* @__PURE__ */ F("li", {
197
+ return /* @__PURE__ */ P("li", {
195
198
  role: K,
196
- className: R.has(t.id) ? W.rowLeaving : W.rowEnter,
197
- children: s ? /* @__PURE__ */ F(p, {
199
+ className: L.has(t.id) ? W.rowLeaving : W.rowEnter,
200
+ children: s ? /* @__PURE__ */ P(p, {
198
201
  asChild: !0,
199
202
  contentClassName: "max-w-[550px]",
200
- content: /* @__PURE__ */ F(H, {
203
+ content: /* @__PURE__ */ P(H, {
201
204
  description: t.description,
202
- viewDetailsLabel: N,
205
+ viewDetailsLabel: M,
203
206
  onViewDetails: () => s(t),
204
207
  viewDetailsTabIndex: o
205
208
  }),
@@ -207,22 +210,22 @@ var B = {
207
210
  }) : l
208
211
  }, t.id);
209
212
  })
210
- }) : Y && X !== "" ? /* @__PURE__ */ F("p", {
213
+ }) : Y && X !== "" ? /* @__PURE__ */ P("p", {
211
214
  role: "status",
212
215
  "aria-live": "polite",
213
216
  className: r(C, "px-4 py-4 text-start", W.emptyHint),
214
- children: P
215
- }) : /* @__PURE__ */ F("p", {
217
+ children: N
218
+ }) : /* @__PURE__ */ P("p", {
216
219
  className: r(C, "px-4 py-4 text-start", W.emptyHint),
217
- children: ee
220
+ children: te
218
221
  })
219
222
  })
220
223
  }),
221
- /* @__PURE__ */ F("div", {
224
+ /* @__PURE__ */ P("div", {
222
225
  className: r("border-t px-2 py-3", W.footer),
223
- children: /* @__PURE__ */ F(d, {
226
+ children: /* @__PURE__ */ P(d, {
224
227
  role: U ? "menuitem" : void 0,
225
- label: A,
228
+ label: k,
226
229
  className: "w-full justify-center",
227
230
  onClick: o
228
231
  })
@@ -231,19 +234,19 @@ var B = {
231
234
  });
232
235
  }, q = ".zip,.md", J = ({ isOpen: e, errorText: t, isUploading: n = !1, accept: r = q, labels: i, onClose: a, onFilesSelected: o, onFilesRejected: s }) => {
233
236
  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 ?? {};
234
- return /* @__PURE__ */ F(h, {
237
+ return /* @__PURE__ */ P(h, {
235
238
  open: e,
236
239
  size: g.Sm,
237
240
  header: c,
238
241
  closeAriaLabel: m,
239
242
  onClose: a,
240
- children: /* @__PURE__ */ I("div", {
243
+ children: /* @__PURE__ */ F("div", {
241
244
  className: "flex flex-col gap-4 px-6 py-4",
242
- children: [/* @__PURE__ */ F(u, {
243
- label: /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F("span", {
245
+ children: [/* @__PURE__ */ P(u, {
246
+ label: /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ P("span", {
244
247
  className: "desktop:hidden",
245
248
  children: d
246
- }), /* @__PURE__ */ F("span", {
249
+ }), /* @__PURE__ */ P("span", {
247
250
  className: "hidden desktop:inline",
248
251
  children: l
249
252
  })] }),
@@ -254,55 +257,55 @@ var B = {
254
257
  errorText: n ? void 0 : t,
255
258
  onChange: o,
256
259
  onReject: s
257
- }), n && /* @__PURE__ */ F(v, { ariaLabel: _ })]
260
+ }), n && /* @__PURE__ */ P(v, { ariaLabel: _ })]
258
261
  })
259
262
  });
260
- }, Y = ({ isOpen: e, onClose: t, onSelect: n, title: r, renderContent: i }) => /* @__PURE__ */ F(h, {
263
+ }, Y = ({ isOpen: e, onClose: t, onSelect: n, title: r, renderContent: i }) => /* @__PURE__ */ P(h, {
261
264
  open: e,
262
265
  header: r,
263
266
  size: g.Lg,
264
267
  className: "h-[min(90vh,860px)] !max-w-[min(95vw,1200px)] overflow-hidden mobile:h-full mobile:!max-w-full mobile:rounded-none",
265
268
  overlayClassName: "mobile:p-0",
266
269
  onClose: t,
267
- children: /* @__PURE__ */ F("div", {
270
+ children: /* @__PURE__ */ P("div", {
268
271
  className: "h-[min(80vh,840px)] overflow-auto mobile:h-full",
269
- children: /* @__PURE__ */ F(S, {
272
+ children: /* @__PURE__ */ P(S, {
270
273
  fallback: null,
271
274
  children: e && i(n, t)
272
275
  })
273
276
  })
274
- }), X = (e, t = null) => e.map((e) => e.type === te.Folder ? {
277
+ }), X = (e, t = null) => e.map((e) => e.type === R.Folder ? {
275
278
  path: e.id,
276
279
  name: e.name,
277
- nodeType: L.FOLDER,
280
+ nodeType: I.FOLDER,
278
281
  parentPath: t,
279
282
  folderId: e.id,
280
283
  items: X(e.items, e.id)
281
284
  } : {
282
285
  path: e.id,
283
286
  name: e.name,
284
- nodeType: L.ITEM,
287
+ nodeType: I.ITEM,
285
288
  parentPath: t,
286
289
  folderId: t ?? ""
287
- }), Z = ({ nodes: e, selectedFileId: t, expandedFolderIds: n, onToggleFolder: r, onSelectFile: i, onClose: a, ariaLabel: o }) => /* @__PURE__ */ F(R, {
288
- items: D(() => X(e), [e]),
290
+ }), Z = ({ nodes: e, selectedFileId: t, expandedFolderIds: n, onToggleFolder: r, onSelectFile: i, onClose: a, ariaLabel: o }) => /* @__PURE__ */ P(L, {
291
+ items: E(() => X(e), [e]),
289
292
  showFiles: !0,
290
293
  areHiddenFilesVisible: !0,
291
294
  selectedPath: t,
292
- expandedPaths: D(() => new Set(n), [n]),
295
+ expandedPaths: E(() => new Set(n), [n]),
293
296
  onExpandedPathsChange: (e) => {
294
297
  for (let t of e) n.has(t) || r(t);
295
298
  for (let t of n) e.has(t) || r(t);
296
299
  },
297
300
  onItemClick: (e) => {
298
- e.nodeType === L.ITEM && i(e.path);
301
+ e.nodeType === I.ITEM && i(e.path);
299
302
  },
300
303
  ariaLabel: o,
301
304
  autoFocus: !0,
302
305
  onEscape: a
303
- }), Q = (e) => /* @__PURE__ */ F(z, {
306
+ }), Q = (e) => /* @__PURE__ */ P(z, {
304
307
  ...e,
305
- renderContentFileTree: (e) => /* @__PURE__ */ F(Z, { ...e })
308
+ renderContentFileTree: (e) => /* @__PURE__ */ P(Z, { ...e })
306
309
  }), $ = (e) => e == null || /[\s/]/.test(e), ie = (e, t, n) => {
307
310
  let r = [], i = 0;
308
311
  return t.forEach((t, a) => {
@@ -380,11 +383,11 @@ var B = {
380
383
  let r = e.indexOf(n, Math.max(0, t.start - n.length)), i = t.start + t.insertedLength - n.length;
381
384
  return r !== -1 && r <= i ? r : void 0;
382
385
  }, fe = () => {
383
- let [e, t] = k(""), [n, r] = k([]), i = O(e);
386
+ let [e, t] = O(""), [n, r] = O([]), i = D(e);
384
387
  i.current = e;
385
- let a = O(n);
388
+ let a = D(n);
386
389
  a.current = n;
387
- let o = O(null), s = C((e) => {
390
+ let o = D(null), s = C((e) => {
388
391
  let n = oe(i.current, e), a = o.current;
389
392
  o.current = null;
390
393
  let s = a == null ? void 0 : de(e, n, a.text);
@@ -403,7 +406,7 @@ var B = {
403
406
  }, []), l = C((e, n, a) => {
404
407
  let o = i.current, s = `/${n}`, c = o.slice(0, a) + s + o.slice(a);
405
408
  i.current = c, t(c), r((t) => ce(t, a, e, n, !1));
406
- }, []), u = C((e) => le(a.current, e), []), d = D(() => {
409
+ }, []), u = C((e) => le(a.current, e), []), d = E(() => {
407
410
  if (n.length !== 0) return n.map((e) => ({ url: e.url }));
408
411
  }, [n]), f = C((e, t) => {
409
412
  o.current = t.length > 0 ? {
@@ -424,7 +427,7 @@ var B = {
424
427
  };
425
428
  }));
426
429
  }, []);
427
- return D(() => ({
430
+ return E(() => ({
428
431
  draft: e,
429
432
  anchors: n,
430
433
  onDraftChange: s,
@@ -458,7 +461,7 @@ var B = {
458
461
  let t = e.split("/").filter((e) => e.length > 0);
459
462
  return t[0] !== "skills" || t.length < 3 ? null : t[1];
460
463
  }, ge = (e, t) => he(e) === t ? V.Deleted : V.NotShared, _e = "/", ve = ({ 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 }) => {
461
- let { addMenuLabel: g = "Skills", backLabel: _ = "Back", catalogModalTitleLabel: v = "Use skill", emptyQueryHintLabel: y = "Type to filter", deletedTooltipLabel: b, notSharedTooltipLabel: x, unsupportedTooltipLabel: w, panelLabels: T } = c ?? {}, [E, A] = k(!1), [j, M] = k(null), [N, P] = k(0), I = O(null), [L, R] = k(0), [te, z] = k(void 0), B = fe(), V = D(() => [
464
+ 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 = fe(), V = E(() => [
462
465
  ...t,
463
466
  ...n ?? [],
464
467
  ...r ?? []
@@ -466,18 +469,18 @@ var B = {
466
469
  t,
467
470
  n,
468
471
  r
469
- ]), H = D(() => new Map(V.map((e) => [e.url, e])), [V]), W = C((e) => H.get(e)?.name ?? me(e), [H]), G = D(() => V.filter((e) => a.has(e.url)).map((e) => pe(e)), [V, a]), ne = B.anchors.length > 0 && !e, re = D(() => B.anchors.map((t) => ({
472
+ ]), H = E(() => new Map(V.map((e) => [e.url, e])), [V]), W = C((e) => H.get(e)?.name ?? me(e), [H]), G = E(() => V.filter((e) => a.has(e.url)).map((e) => pe(e)), [V, a]), ne = B.anchors.length > 0 && !e, re = E(() => B.anchors.map((t) => ({
470
473
  start: t.start,
471
474
  length: t.length,
472
475
  isUnsupported: !e,
473
- render: () => /* @__PURE__ */ F(U, {
476
+ render: () => /* @__PURE__ */ P(U, {
474
477
  name: t.name,
475
478
  path: t.url,
476
479
  labelClassName: d,
477
480
  description: H.get(t.url)?.description,
478
481
  isUnsupported: !e,
479
482
  detailsTrigger: f,
480
- onViewDetails: M,
483
+ onViewDetails: j,
481
484
  labels: {
482
485
  viewDetailsLabel: T?.viewDetailsLabel,
483
486
  unsupportedTooltipLabel: w
@@ -493,7 +496,7 @@ var B = {
493
496
  w
494
497
  ]), q = C((e, t, n) => {
495
498
  let r = B.insertMention(e, t, n);
496
- R((e) => e + 1), z(n + 1 + t.length + +!!r);
499
+ L((e) => e + 1), z(n + 1 + t.length + +!!r);
497
500
  }, [B]), J = C((e) => {
498
501
  let t = ue(B.draft, e, _e);
499
502
  return t == null ? e : (B.onDraftChange(B.draft.slice(0, t.start) + B.draft.slice(t.end)), t.start);
@@ -507,7 +510,7 @@ var B = {
507
510
  mentionUrl: n?.url
508
511
  };
509
512
  }, [B]), Z = C(() => {
510
- B.reset(), R((e) => e + 1), z(void 0);
513
+ B.reset(), L((e) => e + 1), z(void 0);
511
514
  }, [B]), { expectInsertion: Q } = B, $ = C((t) => {
512
515
  Q(t, e ? ae(t, V) : []);
513
516
  }, [
@@ -515,21 +518,21 @@ var B = {
515
518
  e,
516
519
  V
517
520
  ]), oe = C((e, t) => {
518
- B.seedFromMessage(e, t, W), R((e) => e + 1), z(void 0);
521
+ B.seedFromMessage(e, t, W), L((e) => e + 1), z(void 0);
519
522
  }, [B, W]), se = C((e, t) => {
520
523
  if (t == null || t.length === 0) return null;
521
524
  let n = ie(e, t, W), r = [], i = 0;
522
525
  return n.forEach((n) => {
523
526
  n.start > i && r.push(e.slice(i, n.start));
524
527
  let a = t[n.skillIndex], s = H.get(a.url), c = s?.name ?? me(a.url), l = s == null ? ge(a.url, o) : void 0;
525
- r.push(/* @__PURE__ */ F(U, {
528
+ r.push(/* @__PURE__ */ P(U, {
526
529
  name: c,
527
530
  path: a.url,
528
531
  labelClassName: u,
529
532
  description: s?.description,
530
533
  unresolvedReason: l,
531
534
  detailsTrigger: p,
532
- onViewDetails: M,
535
+ onViewDetails: j,
533
536
  labels: {
534
537
  viewDetailsLabel: T?.viewDetailsLabel,
535
538
  deletedTooltipLabel: b,
@@ -548,14 +551,14 @@ var B = {
548
551
  x
549
552
  ]), ce = C((e) => e == null || e.length === 0 ? null : e.map((e) => {
550
553
  let t = H.get(e.url), n = t?.name ?? me(e.url), r = t == null ? ge(e.url, o) : void 0;
551
- return /* @__PURE__ */ F(U, {
554
+ return /* @__PURE__ */ P(U, {
552
555
  name: n,
553
556
  path: e.url,
554
557
  labelClassName: u,
555
558
  description: t?.description,
556
559
  unresolvedReason: r,
557
560
  detailsTrigger: p,
558
- onViewDetails: M,
561
+ onViewDetails: j,
559
562
  labels: {
560
563
  viewDetailsLabel: T?.viewDetailsLabel,
561
564
  deletedTooltipLabel: b,
@@ -570,7 +573,7 @@ var B = {
570
573
  o,
571
574
  b,
572
575
  x
573
- ]), le = C((e, t) => /* @__PURE__ */ F(K, {
576
+ ]), le = C((e, t) => /* @__PURE__ */ P(K, {
574
577
  favorites: G,
575
578
  isMenu: !0,
576
579
  onSelect: (n) => {
@@ -579,10 +582,10 @@ var B = {
579
582
  onToggleFavorite: s,
580
583
  onBrowse: () => {
581
584
  let n = X(t);
582
- P(J(t)), I.current = n ?? null, e(), A(!0);
585
+ N(J(t)), F.current = n ?? null, e(), k(!0);
583
586
  },
584
587
  onViewDetails: (n) => {
585
- J(t), e(), M(n.id);
588
+ J(t), e(), j(n.id);
586
589
  },
587
590
  labels: T
588
591
  }), [
@@ -594,10 +597,10 @@ var B = {
594
597
  T
595
598
  ]);
596
599
  return {
597
- skillMenuOverlay: D(() => e ? {
600
+ skillMenuOverlay: E(() => e ? {
598
601
  key: "skills",
599
602
  title: g,
600
- icon: /* @__PURE__ */ F(ee, {
603
+ icon: /* @__PURE__ */ P(te, {
601
604
  size: i,
602
605
  "aria-hidden": !0,
603
606
  stroke: l
@@ -610,12 +613,12 @@ var B = {
610
613
  _,
611
614
  le
612
615
  ]),
613
- commandMenu: D(() => e ? {
616
+ commandMenu: E(() => e ? {
614
617
  triggerPrefix: _e,
615
618
  menuLabel: g,
616
619
  emptyQueryHint: y,
617
620
  onTextPaste: $,
618
- renderMenu: ({ query: e, caretPosition: t, close: n, listboxId: r, activeOptionId: i }) => /* @__PURE__ */ F(K, {
621
+ renderMenu: ({ query: e, caretPosition: t, close: n, listboxId: r, activeOptionId: i }) => /* @__PURE__ */ P(K, {
619
622
  favorites: G,
620
623
  searchQuery: e,
621
624
  listboxId: r,
@@ -629,14 +632,14 @@ var B = {
629
632
  n({
630
633
  consumeQuery: !0,
631
634
  returnFocus: !1
632
- }), P(t), I.current = {
635
+ }), N(t), F.current = {
633
636
  position: t,
634
637
  text: r,
635
638
  mentionUrl: i?.url
636
- }, A(!0);
639
+ }, k(!0);
637
640
  },
638
641
  onViewDetails: (e) => {
639
- n({ consumeQuery: !0 }), M(e.id);
642
+ n({ consumeQuery: !0 }), j(e.id);
640
643
  },
641
644
  labels: T
642
645
  })
@@ -651,34 +654,34 @@ var B = {
651
654
  T,
652
655
  $
653
656
  ]),
654
- skillCatalogModal: /* @__PURE__ */ F(Y, {
655
- isOpen: E,
657
+ skillCatalogModal: /* @__PURE__ */ P(Y, {
658
+ isOpen: ee,
656
659
  onClose: C(() => {
657
- A(!1);
658
- let e = I.current;
659
- if (I.current = null, e == null) return;
660
+ k(!1);
661
+ let e = F.current;
662
+ if (F.current = null, e == null) return;
660
663
  let { position: t, text: n, mentionUrl: r } = e;
661
- r == null ? B.onDraftChange(B.draft.slice(0, t) + n + B.draft.slice(t)) : B.restoreMention(r, n.slice(1), t), R((e) => e + 1), z(t + n.length);
664
+ 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);
662
665
  }, [B]),
663
666
  onSelect: (e) => {
664
- I.current = null, q(e, W(e), N), A(!1);
667
+ F.current = null, q(e, W(e), M), k(!1);
665
668
  },
666
669
  title: v,
667
670
  renderContent: m
668
671
  }),
669
- skillDetailsPanel: /* @__PURE__ */ F(S, {
672
+ skillDetailsPanel: /* @__PURE__ */ P(S, {
670
673
  fallback: null,
671
- children: /* @__PURE__ */ F(h, {
672
- skillId: j,
673
- onClose: () => M(null)
674
+ children: /* @__PURE__ */ P(h, {
675
+ skillId: A,
676
+ onClose: () => j(null)
674
677
  })
675
678
  }),
676
679
  message: B.draft,
677
- messageRevision: L,
680
+ messageRevision: I,
678
681
  activeMentions: re,
679
682
  onDraftChange: B.onDraftChange,
680
683
  onBackspaceAtCaret: B.onBackspaceAtCaret,
681
- caretPositionOverride: te,
684
+ caretPositionOverride: R,
682
685
  isSkillUnsupported: ne,
683
686
  selectedSkills: B.orderedSkills,
684
687
  resetSkillMentions: Z,
@@ -694,25 +697,25 @@ var B = {
694
697
  clear: "_clear_1ult0_13",
695
698
  invalid: "_invalid_1ult0_17"
696
699
  }, be = [], xe = "Selected model does not support skills. Select a different model to use a skill.", Se = ({ value: i, onChange: a, displayNames: o, skills: s = be, isSkillsSupported: l, isDisabled: u = !1, error: d, labels: p, className: m, styles: h }) => {
697
- 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 ?? xe, j = !l && i.length === 0, M = d ?? (j ? A : void 0), N = new Map(i.map((e) => [e, {
700
+ 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 ?? xe, A = !l && i.length === 0, j = d ?? (A ? k : void 0), M = new Map(i.map((e) => [e, {
698
701
  id: e,
699
702
  name: o?.[e] || e
700
703
  }]));
701
- s.forEach((e) => N.set(e.id, e));
702
- let P = [...N.values()].map((t) => ({
704
+ s.forEach((e) => M.set(e.id, e));
705
+ let N = [...M.values()].map((t) => ({
703
706
  value: t.id,
704
707
  label: t.name,
705
- labelNode: y.trim() ? /* @__PURE__ */ F(f, {
708
+ labelNode: y.trim() ? /* @__PURE__ */ P(f, {
706
709
  text: t.name,
707
710
  query: y,
708
711
  maxLines: 1
709
712
  }) : void 0,
710
- icon: /* @__PURE__ */ F(e, {
713
+ icon: /* @__PURE__ */ P(e, {
711
714
  size: c.SM,
712
715
  initialsName: t.name
713
716
  }),
714
717
  disabled: !l
715
- })), L = {
718
+ })), I = {
716
719
  ...t({
717
720
  "--ssf-text": h?.colors?.text,
718
721
  "--ssf-bg": h?.colors?.background,
@@ -721,55 +724,55 @@ var B = {
721
724
  }),
722
725
  ...h?.cssVars
723
726
  };
724
- return E(() => {
727
+ return ee(() => {
725
728
  let e = S.current?.querySelector("[role=\"combobox\"]");
726
- e && (M ? e.setAttribute("aria-describedby", C) : e.removeAttribute("aria-describedby"), d || w ? e.setAttribute("aria-invalid", "true") : e.removeAttribute("aria-invalid"));
729
+ e && (j ? e.setAttribute("aria-describedby", C) : e.removeAttribute("aria-describedby"), d || w ? e.setAttribute("aria-invalid", "true") : e.removeAttribute("aria-invalid"));
727
730
  }, [
728
- M,
731
+ j,
729
732
  C,
730
733
  d,
731
734
  u,
732
735
  w
733
- ]), /* @__PURE__ */ I("div", {
736
+ ]), /* @__PURE__ */ F("div", {
734
737
  ref: S,
735
738
  className: r("min-w-0", m, B.selectorField),
736
- style: L,
737
- children: [/* @__PURE__ */ F(b, {
738
- tooltip: A,
739
+ style: I,
740
+ children: [/* @__PURE__ */ P(b, {
741
+ tooltip: k,
739
742
  hideTooltip: l,
740
743
  triggerClassName: "block w-full min-w-0",
741
- children: /* @__PURE__ */ F("div", {
744
+ children: /* @__PURE__ */ P("div", {
742
745
  inert: u ? !0 : void 0,
743
- children: /* @__PURE__ */ F(_, {
746
+ children: /* @__PURE__ */ P(_, {
744
747
  multiple: !0,
745
748
  searchable: !0,
746
- open: ee,
749
+ open: te,
747
750
  onOpenChange: (e) => {
748
- e && !D || v(e);
751
+ e && !E || v(e);
749
752
  },
750
753
  onSearchQueryChange: x,
751
754
  value: i,
752
755
  onChange: (e) => {
753
756
  u || a(Array.isArray(e) ? e : [e]);
754
757
  },
755
- options: P,
758
+ options: N,
756
759
  placeholder: p.placeholder,
757
760
  labelProps: { label: p.fieldLabel },
758
761
  error: d,
759
- caption: j ? A : void 0,
762
+ caption: A ? k : void 0,
760
763
  searchPlaceholder: p.searchPlaceholder ?? "Search skills",
761
764
  emptyStateTitle: y.trim() ? p.noMatchingSkillsLabel ?? "No matching skills" : p.emptyLabel ?? "No skills available",
762
- disabled: u || j,
765
+ disabled: u || A,
763
766
  invalid: !!d || w,
764
767
  className: "w-full min-w-0",
765
- fieldClassName: r(D ? "cursor-pointer" : "cursor-not-allowed", "--ssf-bg" in L && ye.background, "--ssf-border" in L && ye.border, "--ssf-text" in L && ye.value, (d || w) && ye.invalid, h?.typography?.fontClassName ?? "dial-small-text", h?.triggerClassName),
768
+ fieldClassName: r(E ? "cursor-pointer" : "cursor-not-allowed", "--ssf-bg" in I && ye.background, "--ssf-border" in I && ye.border, "--ssf-text" in I && ye.value, (d || w) && ye.invalid, h?.typography?.fontClassName ?? "dial-small-text", h?.triggerClassName),
766
769
  listClassName: "w-[min(var(--reference-width),calc(100vw-2rem))] max-w-full"
767
770
  })
768
771
  })
769
- }), M && /* @__PURE__ */ F("span", {
772
+ }), j && /* @__PURE__ */ P("span", {
770
773
  id: C,
771
774
  className: "sr-only",
772
- children: M
775
+ children: j
773
776
  })]
774
777
  });
775
778
  };
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-rc.8",
4
+ "version": "1.2.1",
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-rc.8",
22
- "@epam/ai-dial-conversation-input": "1.2.0-rc.8"
21
+ "@epam/ai-dial-catalog": "1.2.1",
22
+ "@epam/ai-dial-conversation-input": "1.2.1"
23
23
  },
24
24
  "peerDependencies": {
25
- "@epam/ai-dial-chat-shared": "1.2.0-rc.8",
25
+ "@epam/ai-dial-chat-shared": "1.2.1",
26
26
  "@epam/ai-dial-react-file-manager": "^0.3.5",
27
- "@epam/ai-dial-ui-kit": "^0.15.3",
27
+ "@epam/ai-dial-ui-kit": "^0.15.4",
28
28
  "react": "^19.2.8"
29
29
  },
30
30
  "repository": {