@epam/ai-dial-skills 1.2.0-dev.218 → 1.2.0-dev.225

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":"AAEA,OAAO,EAIL,KAAK,EAAE,EAER,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAGpE;;;;GAIG;AACH,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CA2IxC,CAAC"}
1
+ {"version":3,"file":"ChatSkill.d.ts","sourceRoot":"","sources":["../../../src/components/ChatSkill/ChatSkill.tsx"],"names":[],"mappings":"AAEA,OAAO,EAIL,KAAK,EAAE,EAER,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAGpE;;;;GAIG;AACH,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CA4IxC,CAAC"}
@@ -19,6 +19,8 @@ export interface UseSkillMentionsResult {
19
19
  * inserted.
20
20
  */
21
21
  insertMention: (url: string, name: string, atCaretIndex: number) => boolean;
22
+ /** Splices `/${name}` back into the draft at `atIndex` and re-tracks it as a mention, with no trailing-space logic — for restoring an exact previous mention, not inserting a new one. */
23
+ restoreMention: (url: string, name: string, atIndex: number) => void;
22
24
  /**
23
25
  * Looks up the mention whose run ends exactly at `caretPosition`, without
24
26
  * mutating `draft`/`anchors`. The caller (`Input.tsx`) uses the returned
@@ -1 +1 @@
1
- {"version":3,"file":"useSkillMentions.d.ts","sourceRoot":"","sources":["../../../src/hooks/useSkillMentions/useSkillMentions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAE9D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAU5E,gDAAgD;AAChD,MAAM,WAAW,sBAAsB;IACrC,iFAAiF;IACjF,KAAK,EAAE,MAAM,CAAC;IACd,uEAAuE;IACvE,OAAO,EAAE,kBAAkB,EAAE,CAAC;IAC9B,yGAAyG;IACzG,aAAa,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C;;;;;;;;;OASG;IACH,aAAa,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,KAAK,OAAO,CAAC;IAC5E;;;;;;;;;OASG;IACH,kBAAkB,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,kBAAkB,GAAG,SAAS,CAAC;IAC9E,iIAAiI;IACjI,aAAa,EAAE,YAAY,EAAE,GAAG,SAAS,CAAC;IAC1C,sDAAsD;IACtD,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB;;;;;OAKG;IACH,eAAe,EAAE,CACf,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,YAAY,EAAE,GAAG,SAAS,EAClC,WAAW,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,KACjC,IAAI,CAAC;CACX;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,QAAO,sBAkHnC,CAAC"}
1
+ {"version":3,"file":"useSkillMentions.d.ts","sourceRoot":"","sources":["../../../src/hooks/useSkillMentions/useSkillMentions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAE9D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAU5E,gDAAgD;AAChD,MAAM,WAAW,sBAAsB;IACrC,iFAAiF;IACjF,KAAK,EAAE,MAAM,CAAC;IACd,uEAAuE;IACvE,OAAO,EAAE,kBAAkB,EAAE,CAAC;IAC9B,yGAAyG;IACzG,aAAa,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C;;;;;;;;;OASG;IACH,aAAa,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,KAAK,OAAO,CAAC;IAC5E,0LAA0L;IAC1L,cAAc,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACrE;;;;;;;;;OASG;IACH,kBAAkB,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,kBAAkB,GAAG,SAAS,CAAC;IAC9E,iIAAiI;IACjI,aAAa,EAAE,YAAY,EAAE,GAAG,SAAS,CAAC;IAC1C,sDAAsD;IACtD,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB;;;;;OAKG;IACH,eAAe,EAAE,CACf,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,YAAY,EAAE,GAAG,SAAS,EAClC,WAAW,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,KACjC,IAAI,CAAC;CACX;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,QAAO,sBAoInC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useSkillSelectorOverlay.d.ts","sourceRoot":"","sources":["../../../src/hooks/useSkillSelectorOverlay/useSkillSelectorOverlay.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EACV,8BAA8B,EAC9B,6BAA6B,EAC9B,MAAM,qCAAqC,CAAC;AAmB7C;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,GAAI,6OAarC,8BAA8B,KAAG,6BAqcnC,CAAC"}
1
+ {"version":3,"file":"useSkillSelectorOverlay.d.ts","sourceRoot":"","sources":["../../../src/hooks/useSkillSelectorOverlay/useSkillSelectorOverlay.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EACV,8BAA8B,EAC9B,6BAA6B,EAC9B,MAAM,qCAAqC,CAAC;AAmB7C;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,GAAI,6OAarC,8BAA8B,KAAG,6BAugBnC,CAAC"}
package/index.js CHANGED
@@ -1,7 +1,7 @@
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, Dropdown as u, FileDropzone as d, GhostButton as f, Highlight as p, Input as m, InteractiveTooltip as h, Popup as g, PopupSize as _, Search as v, Spinner as y, ToggleIconButton as b, TooltipPlacement as x } from "@epam/ai-dial-ui-kit";
3
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, IconChevronDown as te, IconEye as A, IconLock as j, IconStarFilled as ne, IconTrash as M, IconX as N } from "@tabler/icons-react";
4
+ import { IconBlocks as ee, IconChevronDown as te, IconEye as A, IconLock as j, IconStarFilled as M, IconTrash as N, IconX as ne } from "@tabler/icons-react";
5
5
  import { Fragment as P, jsx as F, jsxs as I } from "react/jsx-runtime";
6
6
  import { DialFileNodeType as L, DialFoldersTree as R } from "@epam/ai-dial-react-file-manager";
7
7
  import { CatalogContentNodeType as z, DetailsPanel as B } from "@epam/ai-dial-catalog";
@@ -14,7 +14,7 @@ var V = {
14
14
  return e.Deleted = "deleted", e.NotShared = "not-shared", e;
15
15
  }({}), U = ({ 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 === H.Deleted, t = e ? M : j, a = e ? r : i;
17
+ let e = n === H.Deleted, t = e ? N : j, a = e ? r : i;
18
18
  return /* @__PURE__ */ I("div", {
19
19
  className: "flex flex-row items-center gap-2",
20
20
  children: [/* @__PURE__ */ F(t, {
@@ -104,7 +104,7 @@ var V = {
104
104
  rowFadeOut: "_rowFadeOut_1v431_1",
105
105
  listContent: "_listContent_1v431_60"
106
106
  }, K = "px-3 pb-0.5 pt-2", re = 180, q = 288, J = ({ favorites: n, onSelect: i, onToggleFavorite: a, onBrowse: o, onViewDetails: s, className: l, rowClassName: u, searchQuery: d, listboxId: m, activeOptionId: g, isMenu: _ = !1, labels: v = {}, colors: y, nameClassName: x = "dial-small-text", headerClassName: S = "dial-tiny-lead-semi-text", emptyHintClassName: C = "dial-small-text" }) => {
107
- let { myCollectionLabel: D = "My Collection", emptyHintLabel: ee = "Star a skill to pin it here", browseLabel: te = "Browse", removeFromFavoritesLabel: A = "Remove from favorites", viewDetailsLabel: j = "View details", noMatchingSkillsLabel: M = "No matching skills" } = v, N = t({
107
+ let { myCollectionLabel: D = "My Collection", emptyHintLabel: ee = "Star a skill to pin it here", browseLabel: te = "Browse", removeFromFavoritesLabel: A = "Remove from favorites", viewDetailsLabel: j = "View details", noMatchingSkillsLabel: N = "No matching skills" } = v, ne = t({
108
108
  "--fs-row-hover-bg": y?.rowHoverBackground,
109
109
  "--fs-header-text": y?.headerText,
110
110
  "--fs-empty-hint-text": y?.emptyHintText,
@@ -137,7 +137,7 @@ var V = {
137
137
  };
138
138
  return /* @__PURE__ */ I("div", {
139
139
  className: r("flex w-full flex-col desktop:w-[280px]", l, V.favoritesPanel),
140
- style: N,
140
+ style: ne,
141
141
  children: [
142
142
  /* @__PURE__ */ F("p", {
143
143
  id: J,
@@ -179,7 +179,7 @@ var V = {
179
179
  className: r(x, "min-w-0 flex-1 text-start")
180
180
  }),
181
181
  a && /* @__PURE__ */ F(b, {
182
- icon: /* @__PURE__ */ F(ne, {
182
+ icon: /* @__PURE__ */ F(M, {
183
183
  size: c.SM,
184
184
  className: G.star,
185
185
  "aria-hidden": !0
@@ -213,7 +213,7 @@ var V = {
213
213
  role: "status",
214
214
  "aria-live": "polite",
215
215
  className: r(C, "px-4 py-4 text-start", G.emptyHint),
216
- children: M
216
+ children: N
217
217
  }) : /* @__PURE__ */ F("p", {
218
218
  className: r(C, "px-4 py-4 text-start", G.emptyHint),
219
219
  children: ee
@@ -371,11 +371,14 @@ var V = {
371
371
  }, []), s = C((e, n, a) => {
372
372
  let o = i.current, s = !/^\s/.test(o.slice(a)), c = `/${n}${s ? " " : ""}`, l = o.slice(0, a) + c + o.slice(a);
373
373
  return i.current = l, t(l), r((t) => ue(t, a, e, n, s)), s;
374
- }, []), c = C((e) => de(a.current, e), []), l = D(() => {
374
+ }, []), c = C((e, n, a) => {
375
+ let o = i.current, s = `/${n}`, c = o.slice(0, a) + s + o.slice(a);
376
+ i.current = c, t(c), r((t) => ue(t, a, e, n, !1));
377
+ }, []), l = C((e) => de(a.current, e), []), u = D(() => {
375
378
  if (n.length !== 0) return n.map((e) => ({ url: e.url }));
376
- }, [n]), u = C(() => {
379
+ }, [n]), d = C(() => {
377
380
  t(""), r([]);
378
- }, []), d = C((e, n, i) => {
381
+ }, []), f = C((e, n, i) => {
379
382
  let a = n ?? [], o = se(e, a, i);
380
383
  t(e), r(o.map((e) => {
381
384
  let t = a[e.skillIndex];
@@ -392,10 +395,11 @@ var V = {
392
395
  anchors: n,
393
396
  onDraftChange: o,
394
397
  insertMention: s,
395
- onBackspaceAtCaret: c,
396
- orderedSkills: l,
397
- reset: u,
398
- seedFromMessage: d
398
+ restoreMention: c,
399
+ onBackspaceAtCaret: l,
400
+ orderedSkills: u,
401
+ reset: d,
402
+ seedFromMessage: f
399
403
  }), [
400
404
  e,
401
405
  n,
@@ -404,7 +408,8 @@ var V = {
404
408
  c,
405
409
  l,
406
410
  u,
407
- d
411
+ d,
412
+ f
408
413
  ]);
409
414
  }, me = (e) => ({
410
415
  id: e.url,
@@ -417,7 +422,7 @@ var V = {
417
422
  let t = e.split("/").filter((e) => e.length > 0);
418
423
  return t[0] !== "skills" || t.length < 3 ? null : t[1];
419
424
  }, _e = (e, t) => ge(e) === t ? H.Deleted : H.NotShared, ve = "/", ye = ({ isSkillsSupported: e, skills: t, sharedWithMe: n, publicSkills: r, favoriteIds: a, viewerBucket: o, onToggleFavorite: s, labels: c, historyChipLabelClassName: u, activeMentionDetailsTrigger: d, renderCatalogContent: f, detailsPanelComponent: p }) => {
420
- let { addMenuLabel: m = "Skills", backLabel: h = "Back", catalogModalTitleLabel: g = "Use skill", emptyQueryHintLabel: _ = "Type to filter", deletedTooltipLabel: v, notSharedTooltipLabel: y, panelLabels: b } = c ?? {}, [x, w] = k(!1), [T, E] = k(null), [O, te] = k(0), [A, j] = k(0), [ne, M] = k(void 0), N = pe(), P = D(() => [
425
+ let { addMenuLabel: m = "Skills", backLabel: h = "Back", catalogModalTitleLabel: g = "Use skill", emptyQueryHintLabel: _ = "Type to filter", deletedTooltipLabel: v, notSharedTooltipLabel: y, panelLabels: b } = c ?? {}, [x, w] = k(!1), [T, E] = k(null), [O, te] = k(0), [A, j] = k(null), [M, N] = k(0), [ne, P] = k(void 0), I = pe(), L = D(() => [
421
426
  ...t,
422
427
  ...n ?? [],
423
428
  ...r ?? []
@@ -425,7 +430,7 @@ var V = {
425
430
  t,
426
431
  n,
427
432
  r
428
- ]), I = D(() => new Map(P.map((e) => [e.url, e])), [P]), L = C((e) => I.get(e)?.name ?? he(e), [I]), R = D(() => P.filter((e) => a.has(e.url)).map((e) => me(e)), [P, a]), z = N.anchors.length > 0 && !e, B = D(() => N.anchors.map((t) => ({
433
+ ]), R = D(() => new Map(L.map((e) => [e.url, e])), [L]), z = C((e) => R.get(e)?.name ?? he(e), [R]), B = D(() => L.filter((e) => a.has(e.url)).map((e) => me(e)), [L, a]), V = I.anchors.length > 0 && !e, H = D(() => I.anchors.map((t) => ({
429
434
  start: t.start,
430
435
  length: t.length,
431
436
  isUnsupported: !e,
@@ -433,35 +438,44 @@ var V = {
433
438
  name: t.name,
434
439
  path: t.url,
435
440
  labelClassName: u,
436
- description: I.get(t.url)?.description,
441
+ description: R.get(t.url)?.description,
437
442
  isUnsupported: !e,
438
443
  detailsTrigger: d,
439
444
  onViewDetails: E,
440
445
  labels: { viewDetailsLabel: b?.viewDetailsLabel }
441
446
  })
442
447
  })), [
443
- N.anchors,
448
+ I.anchors,
444
449
  e,
445
- I,
450
+ R,
446
451
  u,
447
452
  d,
448
453
  b
449
- ]), V = C((e, t, n) => {
450
- let r = N.insertMention(e, t, n);
451
- j((e) => e + 1), M(n + 1 + t.length + +!!r);
452
- }, [N]), H = C((e) => {
453
- let t = fe(N.draft, e, ve);
454
- return t == null ? e : (N.onDraftChange(N.draft.slice(0, t.start) + N.draft.slice(t.end)), t.start);
455
- }, [N]), U = C(() => {
456
- N.reset(), j((e) => e + 1), M(void 0);
457
- }, [N]), G = C((e, t) => {
458
- N.seedFromMessage(e, t, L), j((e) => e + 1), M(void 0);
459
- }, [N, L]), K = C((e, t) => {
454
+ ]), U = C((e, t, n) => {
455
+ let r = I.insertMention(e, t, n);
456
+ N((e) => e + 1), P(n + 1 + t.length + +!!r);
457
+ }, [I]), G = C((e) => {
458
+ let t = fe(I.draft, e, ve);
459
+ return t == null ? e : (I.onDraftChange(I.draft.slice(0, t.start) + I.draft.slice(t.end)), t.start);
460
+ }, [I]), K = C((e) => {
461
+ let t = fe(I.draft, e, ve);
462
+ if (t == null) return;
463
+ let n = I.anchors.find((e) => e.start === t.start && e.start + e.length === t.end);
464
+ return {
465
+ position: t.start,
466
+ text: I.draft.slice(t.start, t.end),
467
+ mentionUrl: n?.url
468
+ };
469
+ }, [I]), re = C(() => {
470
+ I.reset(), N((e) => e + 1), P(void 0);
471
+ }, [I]), q = C((e, t) => {
472
+ I.seedFromMessage(e, t, z), N((e) => e + 1), P(void 0);
473
+ }, [I, z]), Y = C((e, t) => {
460
474
  if (t == null || t.length === 0) return null;
461
- let n = se(e, t, L), r = [], i = 0;
475
+ let n = se(e, t, z), r = [], i = 0;
462
476
  return n.forEach((n) => {
463
477
  n.start > i && r.push(e.slice(i, n.start));
464
- let a = t[n.skillIndex], s = I.get(a.url), c = s?.name ?? he(a.url), l = s == null ? _e(a.url, o) : void 0;
478
+ let a = t[n.skillIndex], s = R.get(a.url), c = s?.name ?? he(a.url), l = s == null ? _e(a.url, o) : void 0;
465
479
  r.push(/* @__PURE__ */ F(W, {
466
480
  name: c,
467
481
  path: a.url,
@@ -477,15 +491,15 @@ var V = {
477
491
  }, `${a.url}-${n.start}`)), i = n.start + n.length;
478
492
  }), i < e.length && r.push(e.slice(i)), r;
479
493
  }, [
480
- L,
481
- I,
494
+ z,
495
+ R,
482
496
  u,
483
497
  b,
484
498
  o,
485
499
  v,
486
500
  y
487
- ]), re = C((e) => e == null || e.length === 0 ? null : e.map((e) => {
488
- let t = I.get(e.url), n = t?.name ?? he(e.url), r = t == null ? _e(e.url, o) : void 0;
501
+ ]), X = C((e) => e == null || e.length === 0 ? null : e.map((e) => {
502
+ let t = R.get(e.url), n = t?.name ?? he(e.url), r = t == null ? _e(e.url, o) : void 0;
489
503
  return /* @__PURE__ */ F(W, {
490
504
  name: n,
491
505
  path: e.url,
@@ -500,30 +514,32 @@ var V = {
500
514
  }
501
515
  }, e.url);
502
516
  }), [
503
- I,
517
+ R,
504
518
  u,
505
519
  b,
506
520
  o,
507
521
  v,
508
522
  y
509
- ]), q = C((e, t) => /* @__PURE__ */ F(J, {
510
- favorites: R,
523
+ ]), Q = C((e, t) => /* @__PURE__ */ F(J, {
524
+ favorites: B,
511
525
  isMenu: !0,
512
526
  onSelect: (n) => {
513
- V(n.id, n.name, H(t)), e();
527
+ U(n.id, n.name, G(t)), e();
514
528
  },
515
529
  onToggleFavorite: s,
516
530
  onBrowse: () => {
517
- te(H(t)), e(), w(!0);
531
+ let n = K(t);
532
+ te(G(t)), j(n ?? null), e(), w(!0);
518
533
  },
519
534
  onViewDetails: (n) => {
520
- H(t), e(), E(n.id);
535
+ G(t), e(), E(n.id);
521
536
  },
522
537
  labels: b
523
538
  }), [
524
- R,
525
- V,
526
- H,
539
+ B,
540
+ U,
541
+ G,
542
+ K,
527
543
  s,
528
544
  b
529
545
  ]);
@@ -536,29 +552,37 @@ var V = {
536
552
  "aria-hidden": !0,
537
553
  stroke: l
538
554
  }),
539
- renderOverlay: q,
555
+ renderOverlay: Q,
540
556
  backLabel: h
541
557
  } : void 0, [
542
558
  e,
543
559
  m,
544
560
  h,
545
- q
561
+ Q
546
562
  ]),
547
563
  commandMenu: D(() => e ? {
548
564
  triggerPrefix: ve,
549
565
  menuLabel: m,
550
566
  emptyQueryHint: _,
551
567
  renderMenu: ({ query: e, caretPosition: t, close: n, listboxId: r, activeOptionId: i }) => /* @__PURE__ */ F(J, {
552
- favorites: R,
568
+ favorites: B,
553
569
  searchQuery: e,
554
570
  listboxId: r,
555
571
  activeOptionId: i,
556
572
  onSelect: (e) => {
557
- n({ consumeQuery: !0 }), V(e.id, e.name, t);
573
+ n({ consumeQuery: !0 }), U(e.id, e.name, t);
558
574
  },
559
575
  onToggleFavorite: s,
560
576
  onBrowse: () => {
561
- n({ consumeQuery: !0 }), te(t), w(!0);
577
+ let r = `${ve}${e}`, i = I.anchors.find((e) => e.start === t && e.length === r.length);
578
+ n({
579
+ consumeQuery: !0,
580
+ returnFocus: !1
581
+ }), te(t), j({
582
+ position: t,
583
+ text: r,
584
+ mentionUrl: i?.url
585
+ }), w(!0);
562
586
  },
563
587
  onViewDetails: (e) => {
564
588
  n({ consumeQuery: !0 }), E(e.id);
@@ -569,16 +593,21 @@ var V = {
569
593
  e,
570
594
  m,
571
595
  _,
572
- R,
573
- V,
596
+ B,
597
+ U,
598
+ I.anchors,
574
599
  s,
575
600
  b
576
601
  ]),
577
602
  skillCatalogModal: /* @__PURE__ */ F(Z, {
578
603
  isOpen: x,
579
- onClose: () => w(!1),
604
+ onClose: C(() => {
605
+ if (w(!1), A == null) return;
606
+ let { position: e, text: t, mentionUrl: n } = A;
607
+ n == null ? I.onDraftChange(I.draft.slice(0, e) + t + I.draft.slice(e)) : I.restoreMention(n, t.slice(1), e), N((e) => e + 1), P(e + t.length), j(null);
608
+ }, [A, I]),
580
609
  onSelect: (e) => {
581
- V(e, L(e), O), w(!1);
610
+ U(e, z(e), O), j(null), w(!1);
582
611
  },
583
612
  title: g,
584
613
  renderContent: f
@@ -590,18 +619,18 @@ var V = {
590
619
  onClose: () => E(null)
591
620
  })
592
621
  }),
593
- message: N.draft,
594
- messageRevision: A,
595
- activeMentions: B,
596
- onDraftChange: N.onDraftChange,
597
- onBackspaceAtCaret: N.onBackspaceAtCaret,
622
+ message: I.draft,
623
+ messageRevision: M,
624
+ activeMentions: H,
625
+ onDraftChange: I.onDraftChange,
626
+ onBackspaceAtCaret: I.onBackspaceAtCaret,
598
627
  caretPositionOverride: ne,
599
- isSkillUnsupported: z,
600
- selectedSkills: N.orderedSkills,
601
- resetSkillMentions: U,
602
- seedSkillMentions: G,
603
- renderHistorySkillSegments: K,
604
- renderHistorySkills: re
628
+ isSkillUnsupported: V,
629
+ selectedSkills: I.orderedSkills,
630
+ resetSkillMentions: re,
631
+ seedSkillMentions: q,
632
+ renderHistorySkillSegments: Y,
633
+ renderHistorySkills: X
605
634
  };
606
635
  }, $ = {
607
636
  background: "_background_14zdf_1",
@@ -610,14 +639,14 @@ var V = {
610
639
  clear: "_clear_14zdf_13",
611
640
  invalid: "_invalid_14zdf_17"
612
641
  }, be = [], xe = ({ value: e, onChange: i, displayName: a, favorites: o = be, onToggleFavorite: s, onViewDetails: c, renderOverlay: d, isSkillsSupported: p, isDisabled: h = !1, isInvalid: g = !1, labelledById: _, describedById: y, labels: b, renderCatalogContent: x, className: S, styles: C }) => {
613
- let [E, D] = k(!1), [ee, A] = k(!1), [j, ne] = k(""), M = O(null), L = T(), R = O(null), z = O(!1), B = n(e, p), H = p && !h, U = E && H, W = ee && H, G = () => {
614
- R.current && !R.current.disabled ? R.current.focus() : M.current?.querySelector("button:not(:disabled)")?.focus();
642
+ let [E, D] = k(!1), [ee, A] = k(!1), [j, M] = k(""), N = O(null), L = T(), R = O(null), z = O(!1), B = n(e, p), H = p && !h, U = E && H, W = ee && H, G = () => {
643
+ R.current && !R.current.disabled ? R.current.focus() : N.current?.querySelector("button:not(:disabled)")?.focus();
615
644
  };
616
645
  w(() => {
617
- z.current && !U && !W && ((document.activeElement === document.body || M.current?.contains(document.activeElement)) && G(), D(!1), A(!1)), z.current = U || W;
646
+ z.current && !U && !W && ((document.activeElement === document.body || N.current?.contains(document.activeElement)) && G(), D(!1), A(!1)), z.current = U || W;
618
647
  }, [U, W]);
619
648
  let K = (e) => {
620
- e && !H || (ne(""), D(e));
649
+ e && !H || (M(""), D(e));
621
650
  }, re = (e) => {
622
651
  H && i(e), D(!1), A(!1);
623
652
  }, q = {
@@ -635,7 +664,7 @@ var V = {
635
664
  className: "p-2",
636
665
  children: /* @__PURE__ */ F(v, {
637
666
  value: j,
638
- onChange: (e) => ne(e ?? ""),
667
+ onChange: (e) => M(e ?? ""),
639
668
  placeholder: b.searchPlaceholder ?? "Search skills",
640
669
  "aria-label": b.searchPlaceholder ?? "Search skills",
641
670
  clearLabel: b.clearSearchLabel ?? "Clear search"
@@ -689,9 +718,9 @@ var V = {
689
718
  "aria-label": b.removeSkillLabel,
690
719
  onKeyDown: (e) => e.stopPropagation(),
691
720
  onClick: (e) => {
692
- e.stopPropagation(), i(void 0), D(!1), H ? R.current?.focus() : M.current?.focus();
721
+ e.stopPropagation(), i(void 0), D(!1), H ? R.current?.focus() : N.current?.focus();
693
722
  },
694
- iconBefore: /* @__PURE__ */ F(N, {
723
+ iconBefore: /* @__PURE__ */ F(ne, {
695
724
  "aria-hidden": !0,
696
725
  size: 18,
697
726
  stroke: l
@@ -705,7 +734,7 @@ var V = {
705
734
  })
706
735
  });
707
736
  return /* @__PURE__ */ I("div", {
708
- ref: M,
737
+ ref: N,
709
738
  role: "group",
710
739
  "aria-labelledby": _,
711
740
  tabIndex: -1,
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.218",
4
+ "version": "1.2.0-dev.225",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "main": "./index.js",
@@ -18,11 +18,11 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "@tabler/icons-react": "^3.44.0",
21
- "@epam/ai-dial-catalog": "1.2.0-dev.218",
22
- "@epam/ai-dial-conversation-input": "1.2.0-dev.218"
21
+ "@epam/ai-dial-catalog": "1.2.0-dev.225",
22
+ "@epam/ai-dial-conversation-input": "1.2.0-dev.225"
23
23
  },
24
24
  "peerDependencies": {
25
- "@epam/ai-dial-chat-shared": "1.2.0-dev.218",
25
+ "@epam/ai-dial-chat-shared": "1.2.0-dev.225",
26
26
  "@epam/ai-dial-react-file-manager": "^0.3.0-dev.19",
27
27
  "@epam/ai-dial-ui-kit": "^0.15.0-dev.27",
28
28
  "react": "^19.2.8"