@epam/ai-dial-skills 1.2.0-dev.20 → 1.2.0-dev.201

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.
Files changed (44) hide show
  1. package/components/ChatSkill/ChatSkill.d.ts +3 -2
  2. package/components/ChatSkill/ChatSkill.d.ts.map +1 -1
  3. package/components/FavoriteSkillsPanel/FavoriteSkillsPanel.d.ts.map +1 -1
  4. package/components/SkillArchiveUploadDialog/SkillArchiveUploadDialog.d.ts +9 -0
  5. package/components/SkillArchiveUploadDialog/SkillArchiveUploadDialog.d.ts.map +1 -0
  6. package/components/SkillContentFileTree/SkillContentFileTree.d.ts +11 -0
  7. package/components/SkillContentFileTree/SkillContentFileTree.d.ts.map +1 -0
  8. package/components/SkillDetailsSidePanel/SkillDetailsSidePanel.d.ts +2 -1
  9. package/components/SkillDetailsSidePanel/SkillDetailsSidePanel.d.ts.map +1 -1
  10. package/components/SkillInfoTooltipContent/SkillInfoTooltipContent.d.ts.map +1 -1
  11. package/components/SkillSelectorField/SkillSelectorField.d.ts +5 -0
  12. package/components/SkillSelectorField/SkillSelectorField.d.ts.map +1 -0
  13. package/constants/public-class-names.d.ts +15 -0
  14. package/constants/public-class-names.d.ts.map +1 -0
  15. package/hooks/useSkillMentions/useSkillMentions.d.ts +50 -0
  16. package/hooks/useSkillMentions/useSkillMentions.d.ts.map +1 -0
  17. package/hooks/useSkillSelectorOverlay/useSkillSelectorOverlay.d.ts +5 -4
  18. package/hooks/useSkillSelectorOverlay/useSkillSelectorOverlay.d.ts.map +1 -1
  19. package/index.css +2 -2
  20. package/index.d.ts +15 -1
  21. package/index.d.ts.map +1 -1
  22. package/index.js +599 -241
  23. package/models/chat-skill-props.d.ts +7 -0
  24. package/models/chat-skill-props.d.ts.map +1 -1
  25. package/models/favorite-skills-panel-props.d.ts +32 -5
  26. package/models/favorite-skills-panel-props.d.ts.map +1 -1
  27. package/models/skill-archive-upload-dialog-props.d.ts +33 -0
  28. package/models/skill-archive-upload-dialog-props.d.ts.map +1 -0
  29. package/models/skill-info-tooltip-content-props.d.ts +6 -0
  30. package/models/skill-info-tooltip-content-props.d.ts.map +1 -1
  31. package/models/skill-mention-anchor.d.ts +12 -0
  32. package/models/skill-mention-anchor.d.ts.map +1 -0
  33. package/models/skill-selector-field-props.d.ts +80 -0
  34. package/models/skill-selector-field-props.d.ts.map +1 -0
  35. package/models/skill-selector-overlay.d.ts +104 -59
  36. package/models/skill-selector-overlay.d.ts.map +1 -1
  37. package/package.json +6 -5
  38. package/test-setup.d.ts +1 -0
  39. package/utils/catalog-content-dial-files.d.ts +10 -0
  40. package/utils/catalog-content-dial-files.d.ts.map +1 -0
  41. package/utils/skill-mention-matching.d.ts +25 -0
  42. package/utils/skill-mention-matching.d.ts.map +1 -0
  43. package/utils/skill-mention-tracking.d.ts +51 -0
  44. package/utils/skill-mention-tracking.d.ts.map +1 -0
@@ -9,6 +9,8 @@ export interface ChatSkillLabels {
9
9
  */
10
10
  unsupportedTooltipLabel?: string;
11
11
  }
12
+ /** How a skill chip opens its description card. */
13
+ export type ChatSkillDetailsTrigger = 'hover' | 'click';
12
14
  /** Props for the ChatSkill component. */
13
15
  export interface ChatSkillProps {
14
16
  /** Display name, rendered after the `/` prefix in the button's label. */
@@ -40,6 +42,11 @@ export interface ChatSkillProps {
40
42
  * `isUnsupported` is set. Defaults to `'bg-error'`.
41
43
  */
42
44
  unsupportedClassName?: string;
45
+ /**
46
+ * How the description card opens. Defaults to `'hover'` so existing hosts
47
+ * retain their hover-and-focus behaviour.
48
+ */
49
+ detailsTrigger?: ChatSkillDetailsTrigger;
43
50
  /** Called with the skill's path when the tooltip's "View details" button is clicked. */
44
51
  onViewDetails: (path: string) => void;
45
52
  /** Localizable string overrides. */
@@ -1 +1 @@
1
- {"version":3,"file":"chat-skill-props.d.ts","sourceRoot":"","sources":["../../src/models/chat-skill-props.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,MAAM,WAAW,eAAe;IAC9B,mFAAmF;IACnF,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;OAIG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;CAClC;AAED,yCAAyC;AACzC,MAAM,WAAW,cAAc;IAC7B,yEAAyE;IACzE,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,yFAAyF;IACzF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,wFAAwF;IACxF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC;;;OAGG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,wFAAwF;IACxF,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,oCAAoC;IACpC,MAAM,CAAC,EAAE,eAAe,CAAC;CAC1B"}
1
+ {"version":3,"file":"chat-skill-props.d.ts","sourceRoot":"","sources":["../../src/models/chat-skill-props.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,MAAM,WAAW,eAAe;IAC9B,mFAAmF;IACnF,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;OAIG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;CAClC;AAED,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,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"}
@@ -31,14 +31,18 @@ export interface FavoriteSkillsPanelColors {
31
31
  export interface FavoriteSkillsPanelProps {
32
32
  /** The user's favorited skills, already resolved by the host. */
33
33
  favorites: FavoriteSkillItem[];
34
- /** Called when a row is activated (click, Enter, or Space). */
34
+ /** Called when a row is activated (click, Enter, or Space — or, in listbox mode, Enter in the owning text field while the row is active). */
35
35
  onSelect: (item: FavoriteSkillItem) => void;
36
- /** Called with a skill's id when its row's star button is clicked to remove it from favorites. */
37
- onToggleFavorite: (id: string) => void;
36
+ /** Removes a favorite by id; omitted hides the star action. */
37
+ onToggleFavorite?: (id: string) => void;
38
38
  /** Called when the "Browse" button is clicked. */
39
39
  onBrowse: () => void;
40
- /** Called when a row tooltip's "View details" button is clicked. */
41
- onViewDetails: (item: FavoriteSkillItem) => void;
40
+ /** Opens skill details; omitted hides the details tooltip. */
41
+ onViewDetails?: (item: FavoriteSkillItem) => void;
42
+ /** Additional classes applied to the panel root. */
43
+ className?: string;
44
+ /** Additional classes applied to each favorite row. */
45
+ rowClassName?: string;
42
46
  /**
43
47
  * When provided, the panel enters search mode: rows are filtered to names
44
48
  * containing this string case-insensitively and matched names render with a
@@ -46,6 +50,29 @@ export interface FavoriteSkillsPanelProps {
46
50
  * favorites unfiltered.
47
51
  */
48
52
  searchQuery?: string;
53
+ /**
54
+ * When provided, the list renders as a `role="listbox"` with this `id` and
55
+ * each row as a `role="option"` — the shape a list autocomplete (e.g. the
56
+ * conversation input's `commandMenu`) drives from its text field. In this
57
+ * mode Tab moves from row to row: a row's star and its tooltip's "View
58
+ * details" stay clickable but leave the Tab sequence. Omit for the plain
59
+ * list of button rows.
60
+ */
61
+ listboxId?: string;
62
+ /**
63
+ * Renders the rows and the "Browse" action as `role="menuitem"` for a host
64
+ * that mounts the panel inside a `role="menu"` container (e.g. a submenu
65
+ * whose arrow keys move between menu items). Ignored with `listboxId`.
66
+ * Defaults to `false`: rows are `role="button"`.
67
+ */
68
+ isMenu?: boolean;
69
+ /**
70
+ * `id` of the row the owning text field has active, rendered with
71
+ * `aria-selected="true"` and the row highlight — pass through the id the
72
+ * text field reports; row ids are derived from `listboxId` and each item's
73
+ * id. Used only with `listboxId`.
74
+ */
75
+ activeOptionId?: string | null;
49
76
  /** Localizable string overrides. */
50
77
  labels?: FavoriteSkillsPanelLabels;
51
78
  /** Color overrides applied as CSS custom properties. */
@@ -1 +1 @@
1
- {"version":3,"file":"favorite-skills-panel-props.d.ts","sourceRoot":"","sources":["../../src/models/favorite-skills-panel-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,kFAAkF;AAClF,MAAM,WAAW,yBAAyB;IACxC,sEAAsE;IACtE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,2FAA2F;IAC3F,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kEAAkE;IAClE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,6GAA6G;IAC7G,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,qFAAqF;IACrF,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,oGAAoG;IACpG,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,6DAA6D;AAC7D,MAAM,WAAW,yBAAyB;IACxC,2EAA2E;IAC3E,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,+EAA+E;IAC/E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kFAAkF;IAClF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,0EAA0E;IAC1E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sFAAsF;IACtF,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,+CAA+C;AAC/C,MAAM,WAAW,wBAAwB;IACvC,iEAAiE;IACjE,SAAS,EAAE,iBAAiB,EAAE,CAAC;IAC/B,+DAA+D;IAC/D,QAAQ,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC5C,kGAAkG;IAClG,gBAAgB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,kDAAkD;IAClD,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,oEAAoE;IACpE,aAAa,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACjD;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oCAAoC;IACpC,MAAM,CAAC,EAAE,yBAAyB,CAAC;IACnC,wDAAwD;IACxD,MAAM,CAAC,EAAE,yBAAyB,CAAC;IACnC,gFAAgF;IAChF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,oIAAoI;IACpI,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,sFAAsF;IACtF,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B"}
1
+ {"version":3,"file":"favorite-skills-panel-props.d.ts","sourceRoot":"","sources":["../../src/models/favorite-skills-panel-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,kFAAkF;AAClF,MAAM,WAAW,yBAAyB;IACxC,sEAAsE;IACtE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,2FAA2F;IAC3F,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kEAAkE;IAClE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,6GAA6G;IAC7G,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,qFAAqF;IACrF,gBA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gF;IAChF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,oIAAoI;IACpI,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,sFAAsF;IACtF,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B"}
@@ -0,0 +1,33 @@
1
+ /** Labels for {@link SkillArchiveUploadDialogProps}; each has an English default. */
2
+ export interface SkillArchiveUploadDialogLabels {
3
+ /** Dialog header. Defaults to `'Upload skill'`. */
4
+ dialogTitle?: string;
5
+ /** Drop-zone label shown on desktop widths. Defaults to `'Drag and drop it or click here to upload'`. */
6
+ dropZoneLabel?: string;
7
+ /** Drop-zone label shown on mobile widths. Defaults to `'Click here to upload'`. */
8
+ dropZoneMobileLabel?: string;
9
+ /** Sentence describing accepted formats, shown under the drop zone. Defaults to `'File formats .zip and SKILL.md'`. */
10
+ formatsLabel?: string;
11
+ /** Accessible name for the native file input. Defaults to `'Upload a skill ZIP archive or a SKILL.md file'`. */
12
+ fileInputAriaLabel?: string;
13
+ /** Accessible name for the dialog's close button. Defaults to `'Close'`. */
14
+ closeAriaLabel?: string;
15
+ }
16
+ /** Props for {@link SkillArchiveUploadDialog}. */
17
+ export interface SkillArchiveUploadDialogProps {
18
+ /** Whether the dialog is open. */
19
+ isOpen: boolean;
20
+ /** Rejection message rendered under the drop area; omit when nothing was rejected. */
21
+ errorText?: string;
22
+ /** `accept` value forwarded to the drop zone/native file input. Defaults to `'.zip,.md'`. */
23
+ accept?: string;
24
+ /** Labels rendered by the dialog; each falls back to an English default. */
25
+ labels?: SkillArchiveUploadDialogLabels;
26
+ /** Called on Escape, the close button, or an outside click. */
27
+ onClose: () => void;
28
+ /** Called with the picked or dropped files that `accept` allowed through. */
29
+ onFilesSelected: (files: File[]) => void;
30
+ /** Called when a drop carried files that `accept` excluded. */
31
+ onFilesRejected: () => void;
32
+ }
33
+ //# sourceMappingURL=skill-archive-upload-dialog-props.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skill-archive-upload-dialog-props.d.ts","sourceRoot":"","sources":["../../src/models/skill-archive-upload-dialog-props.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,MAAM,WAAW,8BAA8B;IAC7C,mDAAmD;IACnD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yGAAyG;IACzG,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,oFAAoF;IACpF,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,uHAAuH;IACvH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gHAAgH;IAChH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,4EAA4E;IAC5E,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,kDAAkD;AAClD,MAAM,WAAW,6BAA6B;IAC5C,kCAAkC;IAClC,MAAM,EAAE,OAAO,CAAC;IAChB,sFAAsF;IACtF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6FAA6F;IAC7F,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,4EAA4E;IAC5E,MAAM,CAAC,EAAE,8BAA8B,CAAC;IACxC,+DAA+D;IAC/D,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,6EAA6E;IAC7E,eAAe,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC;IACzC,+DAA+D;IAC/D,eAAe,EAAE,MAAM,IAAI,CAAC;CAC7B"}
@@ -11,5 +11,11 @@ export interface SkillInfoTooltipContentProps {
11
11
  viewDetailsLabel?: string;
12
12
  /** Called when the "View details" button is clicked. Unused while `unsupportedMessage` is set. */
13
13
  onViewDetails?: () => void;
14
+ /**
15
+ * `tabIndex` of the "View details" button. Pass `-1` to keep it out of the
16
+ * Tab sequence (still clickable) where the tooltip hangs off a list row and
17
+ * Tab should move from row to row. Unset keeps the button's default.
18
+ */
19
+ viewDetailsTabIndex?: number;
14
20
  }
15
21
  //# sourceMappingURL=skill-info-tooltip-content-props.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"skill-info-tooltip-content-props.d.ts","sourceRoot":"","sources":["../../src/models/skill-info-tooltip-content-props.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,MAAM,WAAW,4BAA4B;IAC3C,sFAAsF;IACtF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,yEAAyE;IACzE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kGAAkG;IAClG,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;CAC5B"}
1
+ {"version":3,"file":"skill-info-tooltip-content-props.d.ts","sourceRoot":"","sources":["../../src/models/skill-info-tooltip-content-props.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,MAAM,WAAW,4BAA4B;IAC3C,sFAAsF;IACtF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,yEAAyE;IACzE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kGAAkG;IAClG,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B"}
@@ -0,0 +1,12 @@
1
+ /** A skill mention's location within the current plain-text draft. */
2
+ export interface SkillMentionAnchor {
3
+ /** The mentioned skill's resource URL — the value sent as this entry's `{ url }`. */
4
+ url: string;
5
+ /** Display name at the time of insertion (`/${name}` is what actually sits in the text). */
6
+ name: string;
7
+ /** Character offset of the leading `/` in the current draft string. */
8
+ start: number;
9
+ /** Length of the `/{name}` run, `1 + name.length`. */
10
+ length: number;
11
+ }
12
+ //# sourceMappingURL=skill-mention-anchor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skill-mention-anchor.d.ts","sourceRoot":"","sources":["../../src/models/skill-mention-anchor.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,MAAM,WAAW,kBAAkB;IACjC,qFAAqF;IACrF,GAAG,EAAE,MAAM,CAAC;IACZ,4FAA4F;IAC5F,IAAI,EAAE,MAAM,CAAC;IACb,uEAAuE;IACvE,KAAK,EAAE,MAAM,CAAC;IACd,sDAAsD;IACtD,MAAM,EAAE,MAAM,CAAC;CAChB"}
@@ -0,0 +1,80 @@
1
+ import { CSSProperties, ReactNode } from 'react';
2
+ import { FavoriteSkillItem } from './favorite-skill-item';
3
+ import { FavoriteSkillsPanelLabels } from './favorite-skills-panel-props';
4
+ import { SkillCatalogModalProps } from './skill-catalog-modal-props';
5
+ /** Translated text for a controlled skill field. */
6
+ export interface SkillSelectorFieldLabels {
7
+ /** Empty selection text. */
8
+ placeholder: string;
9
+ /** Browse dialog title. */
10
+ modalTitle: string;
11
+ /** Accessible name of the removal control. */
12
+ removeSkillLabel: string;
13
+ /** Explanation shown when the selected model cannot use skills. */
14
+ unsupportedTooltipLabel: string;
15
+ /** Favorites panel text; omitted entries use the panel's English defaults. */
16
+ panelLabels?: FavoriteSkillsPanelLabels;
17
+ /** Favorites search label and placeholder. Defaults to 'Search skills'. */
18
+ searchPlaceholder?: string;
19
+ /** Accessible search clear label. Defaults to 'Clear search'. */
20
+ clearSearchLabel?: string;
21
+ }
22
+ /** Per-instance theme and typography overrides for the skill field. */
23
+ export interface SkillSelectorFieldStyles {
24
+ /** Field color overrides; omitted values use the host theme. */
25
+ colors?: {
26
+ /** Text color. */
27
+ text?: string;
28
+ /** Field background. */
29
+ background?: string;
30
+ /** Field border. */
31
+ border?: string;
32
+ /** Invalid-state text and border. */
33
+ error?: string;
34
+ };
35
+ /** Label typography overrides. */
36
+ typography?: {
37
+ /** CSS classes applied to the value. Defaults to 'dial-small-text'. */
38
+ fontClassName?: string;
39
+ };
40
+ /** Additional classes applied to the input wrapper. */
41
+ triggerClassName?: string;
42
+ /** CSS custom properties merged after the typed overrides. */
43
+ cssVars?: CSSProperties;
44
+ }
45
+ /** Host-controlled selection; catalog data and rendering belong to the caller. */
46
+ export interface SkillSelectorFieldProps {
47
+ /** Selected reference, independent of catalog loading. */
48
+ value?: string;
49
+ /** Called to replace or remove the selected reference. */
50
+ onChange: (value: string | undefined) => void;
51
+ /** Resolved name; defaults to the full selected reference. */
52
+ displayName?: string;
53
+ /** Host-resolved favorite skills. Defaults to an empty list. */
54
+ favorites?: FavoriteSkillItem[];
55
+ /** Removes a skill from favorites; omitted hides the star action. */
56
+ onToggleFavorite?: (id: string) => void;
57
+ /** Opens host-owned skill details; omitted hides the details tooltip. */
58
+ onViewDetails?: (item: FavoriteSkillItem) => void;
59
+ /** Optional popup presentation, such as a mobile sheet. Defaults to a dropdown. */
60
+ renderOverlay?: (panel: ReactNode, isOpen: boolean, onClose: () => void) => ReactNode;
61
+ /** Explicit skill support for the selected model. */
62
+ isSkillsSupported: boolean;
63
+ /** Disables all controls. Defaults to false. */
64
+ isDisabled?: boolean;
65
+ /** Host validation state. Defaults to false. */
66
+ isInvalid?: boolean;
67
+ /** ID of the host-rendered label. */
68
+ labelledById: string;
69
+ /** ID of host-rendered feedback. */
70
+ describedById?: string;
71
+ /** Translated visible and accessible text. */
72
+ labels: SkillSelectorFieldLabels;
73
+ /** Catalog content that calls back with the selected reference. */
74
+ renderCatalogContent: SkillCatalogModalProps['renderContent'];
75
+ /** Additional classes applied to the root. */
76
+ className?: string;
77
+ /** Theme and typography overrides. */
78
+ styles?: SkillSelectorFieldStyles;
79
+ }
80
+ //# sourceMappingURL=skill-selector-field-props.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skill-selector-field-props.d.ts","sourceRoot":"","sources":["../../src/models/skill-selector-field-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAC/E,OAAO,KAAK,EAAE,sBAAsB,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rE,gBAAgB,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,yEAAyE;IACzE,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAClD,mFAAmF;IACnF,aAAa,CAAC,EAAE,CACd,KAAK,EAAE,SAAS,EAChB,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,MAAM,IAAI,KAChB,SAAS,CAAC;IACf,qDAAqD;IACrD,iBAAiB,EAAE,OAAO,CAAC;IAC3B,gDAAgD;IAChD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gDAAgD;IAChD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,qCAAqC;IACrC,YAAY,EAAE,MAAM,CAAC;IACrB,oCAAoC;IACpC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,8CAA8C;IAC9C,MAAM,EAAE,wBAAwB,CAAC;IACjC,mEAAmE;IACnE,oBAAoB,EAAE,sBAAsB,CAAC,eAAe,CAAC,CAAC;IAC9D,8CAA8C;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,MAAM,CAAC,EAAE,wBAAwB,CAAC;CACnC"}
@@ -1,6 +1,7 @@
1
- import { RequestSkill } from '../../../chat-shared/src/index.ts';
2
- import { CommandMenuConfig, MenuOverlayConfig } from '@epam/ai-dial-conversation-input';
1
+ import { RequestSkill } from '@epam/ai-dial-chat-shared';
2
+ import { CommandMenuConfig, HighlightedTextRange, MenuOverlayConfig } from '@epam/ai-dial-conversation-input';
3
3
  import { ComponentType, ReactNode } from 'react';
4
+ import { ChatSkillDetailsTrigger } from './chat-skill-props';
4
5
  import { SkillListingEntry } from './favorite-skill-item';
5
6
  import { FavoriteSkillsPanelLabels } from './favorite-skills-panel-props';
6
7
  /**
@@ -28,27 +29,21 @@ export interface SkillSelectorOverlayLabels {
28
29
  * is open with an empty query. Defaults to `'Type to filter'`.
29
30
  */
30
31
  emptyQueryHintLabel?: string;
31
- /**
32
- * Message shown alone in the selected skill chip's error-state tooltip
33
- * while the current deployment does not support skills.
34
- */
35
- unsupportedTooltipLabel?: string;
36
32
  /** Labels forwarded to the favorites panel rendered as the overlay. */
37
33
  panelLabels?: FavoriteSkillsPanelLabels;
38
34
  }
39
35
  /** Options accepted by `useSkillSelectorOverlay`. */
40
36
  export interface UseSkillSelectorOverlayOptions {
41
- /**
42
- * Whether the skill flow is enabled. While `false` the hook returns empty
43
- * outputs: no menu entry, no modal, no panel, no chips.
44
- */
45
- isEnabled: boolean;
46
37
  /**
47
38
  * Whether the input's current deployment supports skills. While `false`
48
- * (with the flow enabled) the entry points are omitted — no Add-menu item
49
- * and no slash menu — but an already-selected skill chip stays rendered in
50
- * its error state with its removal gesture and "View details" panel
51
- * available. The host resolves this from its own deployment data.
39
+ * the entry points are omitted — no Add-menu item and no slash menu — but
40
+ * a tracked mention stays in the draft text and folds into
41
+ * `isSkillUnsupported` for the host's own send-disabled condition. The
42
+ * host resolves this from its own deployment data. Note: a live-composing
43
+ * mention has no per-mention error styling of its own (it renders as a
44
+ * plain highlighted run, not a `ChatSkill`); only the sent
45
+ * `custom_content.skills`/history rendering, and this boolean fold,
46
+ * reflect the unsupported state.
52
47
  */
53
48
  isSkillsSupported: boolean;
54
49
  /** The user's own skills. */
@@ -71,6 +66,11 @@ export interface UseSkillSelectorOverlayOptions {
71
66
  * to that line. Unset falls back to the chip's own default label class.
72
67
  */
73
68
  historyChipLabelClassName?: string;
69
+ /**
70
+ * Trigger used by mentions rendered in an active composer. Unset retains
71
+ * `ChatSkill`'s hover-and-focus default; history chips are unaffected.
72
+ */
73
+ activeMentionDetailsTrigger?: ChatSkillDetailsTrigger;
74
74
  /**
75
75
  * Renders the browse modal's picker content (e.g. a host catalog view);
76
76
  * receives the selection and close callbacks to wire into it, and is
@@ -84,7 +84,7 @@ export interface UseSkillSelectorOverlayOptions {
84
84
  export interface UseSkillSelectorOverlayResult {
85
85
  /**
86
86
  * The Skills entry for the `menuOverlays` prop of
87
- * `ConversationInput`/`Input`. `undefined` while the flow is disabled or the
87
+ * `ConversationInput`/`EditMessageInput`/`Input`. `undefined` while the
88
88
  * current deployment does not support skills: the host omits the entry
89
89
  * entirely when this is `undefined`, so a stub renderer would leave the
90
90
  * menu item in place with nothing behind it.
@@ -92,72 +92,117 @@ export interface UseSkillSelectorOverlayResult {
92
92
  skillMenuOverlay?: MenuOverlayConfig;
93
93
  /**
94
94
  * The Skills entry for the `commandMenu` prop of
95
- * `ConversationInput`/`Input`: typing `/` into an empty textarea opens the
96
- * favorites panel in search mode above the input. `undefined` while the
97
- * flow is disabled or the current deployment does not support skills,
95
+ * `ConversationInput`/`EditMessageInput`/`Input`: typing `/` into an empty
96
+ * textarea opens the favorites panel in search mode above the input.
97
+ * `undefined` while the current deployment does not support skills,
98
98
  * disabling the slash menu entirely.
99
99
  */
100
100
  commandMenu?: CommandMenuConfig;
101
101
  /**
102
102
  * The browse modal element. Render at a stable level outside the popover
103
- * (e.g. next to the input); `null` while `isEnabled` is `false`.
103
+ * (e.g. next to the input).
104
104
  */
105
105
  skillCatalogModal: ReactNode;
106
106
  /**
107
107
  * The skill details side panel opened by a row tooltip's "View details".
108
- * `null` while `isEnabled` is `false`.
109
108
  */
110
109
  skillDetailsPanel: ReactNode;
111
110
  /**
112
- * The selected skill as a `ChatSkill` element for the conversation input's
113
- * `inlineStartSlot` — at most one, replaced on every selection, carrying
114
- * the shared tooltip (the listing-sourced description, same as the favorite
115
- * rows), or the error state while the current deployment does not support
116
- * skills. The element has no remove control of its own; removal is the
117
- * input's Backspace-at-start gesture, wired through `removeSelectedSkill`.
118
- * `null` while `isEnabled` is `false` or nothing is selected.
111
+ * The composer's message text after the most recent skill selection, with
112
+ * every `/{name}` mention spliced in. Pass straight through to
113
+ * `ConversationInput`/`EditMessageInput`'s own `message` prop alongside
114
+ * `messageRevision` — like that prop's existing "populated by a starter
115
+ * selection" use, this is a one-shot push applied on a `messageRevision`
116
+ * bump, not a value the host feeds back on every keystroke (ordinary typing
117
+ * is tracked separately through `onDraftChange`).
119
118
  */
120
- selectedSkillElement: ReactNode;
119
+ message: string;
121
120
  /**
122
- * Whether a skill is selected while the current deployment does not
123
- * support skills — the chip renders in its error state and hosts must fold
124
- * this into their send-disabled conditions. Always `false` while
125
- * `isEnabled` is `false`.
121
+ * Token that forces `message` to re-apply even when its string value is
122
+ * unchanged from the last push (e.g. the same skill selected again).
123
+ * Bumped on every call to the selection handlers backing `skillMenuOverlay`
124
+ * and `commandMenu`. Pass straight through to the composer's own
125
+ * `messageRevision` prop.
126
126
  */
127
- isSkillUnsupported: boolean;
127
+ messageRevision: number;
128
128
  /**
129
- * The selected skill's resource URL (`skills/{bucket}/{path}`) — the value
130
- * the host sends as a `{ url }` entry in the outgoing message's
131
- * `custom_content.skills`. `null` while nothing is selected or the flow is
132
- * disabled.
129
+ * Every currently-tracked skill mention's character range within the
130
+ * composer's live draft text, for `ConversationInput`/`EditMessageInput`/
131
+ * `Input`'s `activeMentions` prop (the live-composing highlighted-run
132
+ * render). Empty while nothing is mentioned.
133
133
  */
134
- selectedSkillPath: string | null;
134
+ activeMentions: HighlightedTextRange[];
135
135
  /**
136
- * The selected skill as the send-time `custom_content.skills` payload —
137
- * `[{ url: selectedSkillPath }]`, or `undefined` while nothing is selected
138
- * or the flow is disabled, so `custom_content.skills` is omitted entirely.
136
+ * Reconciles tracked mentions against an external edit to the composer's
137
+ * draft text (ordinary typing, deleting, pasting, undo/redo). Wire to the
138
+ * composer's own `onChange` callback, in addition to whatever the host
139
+ * already does with that value — this keeps `activeMentions`/
140
+ * `selectedSkills` in sync with live edits between selections.
139
141
  */
140
- selectedSkills: RequestSkill[] | undefined;
142
+ onDraftChange: (nextValue: string) => void;
143
+ /**
144
+ * Looks up the mention whose run ends exactly at `caretPosition`, without
145
+ * mutating any state. Pass straight through to the composer's
146
+ * `onBackspaceAtCaret` prop, which performs the actual whole-mention
147
+ * deletion through the textarea's native editing pipeline and reports the
148
+ * result back through `onDraftChange`. Returns `undefined` when the caret
149
+ * isn't at a mention boundary.
150
+ */
151
+ onBackspaceAtCaret: (caretPosition: number) => HighlightedTextRange | undefined;
141
152
  /**
142
- * Selects a skill by its resource URL (`skills/{bucket}/{path}`), replacing
143
- * any prior selection.
153
+ * Caret offset to place the cursor at immediately after the most recent
154
+ * skill selection applies `message`/`messageRevision` — the position right
155
+ * after the inserted mention's text. Pass straight through to the
156
+ * composer's `caretPositionOverride` prop. `undefined` before any selection
157
+ * has been made this session.
144
158
  */
145
- selectSkill: (skillId: string) => void;
159
+ caretPositionOverride: number | undefined;
146
160
  /**
147
- * Clears the selected skill. Wire to the input's `onInlineStartRemove` —
148
- * Backspace with the caret collapsed at position 0 while the selected
149
- * skill's element is shown.
161
+ * Whether at least one skill is mentioned while the current deployment does
162
+ * not support skills — hosts must fold this into their send-disabled
163
+ * conditions.
150
164
  */
151
- removeSelectedSkill: () => void;
165
+ isSkillUnsupported: boolean;
166
+ /**
167
+ * Every currently-tracked mention as the send-time `custom_content.skills`
168
+ * payload, in left-to-right text order — `undefined` while nothing is
169
+ * mentioned, so `custom_content.skills` is omitted entirely. Cleared to
170
+ * `undefined` by `resetSkillMentions` after a successful send.
171
+ */
172
+ selectedSkills: RequestSkill[] | undefined;
152
173
  /**
153
- * Renders a message's `custom_content.skills` entries as `ChatSkill`
154
- * elements beside the message bubble's first text line, with the text
155
- * word-flowing after them — one per entry, sharing the "View details"
156
- * details panel with the favorite rows and the input chip. Each entry's
157
- * name comes from the listing pools matched on its url, falling back to
158
- * the url's last non-empty segment, and its description from the same
159
- * match (absent when no pool carries the url). Returns `null` while
160
- * `isEnabled` is `false` or the array is empty.
174
+ * Clears every tracked mention and the draft text alongside it. Call after
175
+ * a successful send, matching the per-message selection-clears semantics of
176
+ * `custom_content.skills`.
177
+ */
178
+ resetSkillMentions: () => void;
179
+ /**
180
+ * Seeds the draft and its tracked mentions from a persisted message — runs
181
+ * `matchSkillMentions` once against `content`/`skills` and initializes
182
+ * `message`/`activeMentions` from the result (bumping `messageRevision`).
183
+ * Call once when entering edit mode on a message that carries
184
+ * `custom_content.skills`.
185
+ */
186
+ seedSkillMentions: (content: string, skills: RequestSkill[] | undefined) => void;
187
+ /**
188
+ * Renders a user message's `content` and `custom_content.skills` as an
189
+ * ordered array interleaving plain-text runs and `ChatSkill` elements at
190
+ * each mention's actual text position — for `UserMessageBubble`'s
191
+ * `textSegments` prop. Resolves each entry's name from the listing pools
192
+ * matched on its url, falling back to the url's last non-empty segment,
193
+ * sharing the "View details" panel with the favorite rows. Returns `null`
194
+ * while `skills` is empty/absent; a mention `matchSkillMentions` cannot
195
+ * locate in `content` is simply omitted from the render (see
196
+ * `matchSkillMentions`'s own doc for that heuristic).
197
+ */
198
+ renderHistorySkillSegments: (content: string, skills: RequestSkill[] | undefined) => ReactNode[] | null;
199
+ /**
200
+ * Renders every entry of `skills` as a flat list of `ChatSkill` elements,
201
+ * ignoring text position — for `AssistantMessageBubble`'s `beforeContent`
202
+ * slot, since assistant text is model-generated markdown and never
203
+ * authors positioned mentions. Each entry's name/description resolve the
204
+ * same way as `renderHistorySkillSegments`. Returns `null` while the
205
+ * array is empty/absent.
161
206
  */
162
207
  renderHistorySkills: (skills: RequestSkill[] | undefined) => ReactNode;
163
208
  }
@@ -1 +1 @@
1
- {"version":3,"file":"skill-selector-overlay.d.ts","sourceRoot":"","sources":["../../src/models/skill-selector-overlay.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAE/E;;;;;GAKG;AACH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,CAAC,+BAA+B,CAAC,CAAC;CACvE;AAED,6CAA6C;AAC7C,MAAM,WAAW,6BAA6B;IAC5C;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,iBAAiB,CAAC;IACrC;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAChC;;;OAGG;IACH,iBAAiB,EAAE,SAAS,CAAC;IAC7B;;;OAGG;IACH,iBAAiB,EAAE,SAAS,CAAC;IAC7B;;;;;;;;OAQG;IACH,oBAAoB,EAAE,SAAS,CAAC;IAChC;;;;;OAKG;IACH,kBAAkB,EAAE,OAAO,CAAC;IAC5B;;;;;OAKG;IACH,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC;;;;OAIG;IACH,cAAc,EAAE,YAAY,EAAE,GAAG,SAAS,CAAC;IAC3C;;;OAGG;IACH,WAAW,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC;;;;OAIG;IACH,mBAAmB,EAAE,MAAM,IAAI,CAAC;IAChC;;;;;;;;;OASG;IACH,mBAAmB,EAAE,CAAC,MAAM,EAAE,YAAY,EAAE,GAAG,SAAS,KAAK,SAAS,CAAC;CACxE"}
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;;;;;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"@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.20",
4
+ "version": "1.2.0-dev.201",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "main": "./index.js",
@@ -18,12 +18,13 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "@tabler/icons-react": "^3.44.0",
21
- "@epam/ai-dial-catalog": "1.2.0-dev.20",
22
- "@epam/ai-dial-conversation-input": "1.2.0-dev.20"
21
+ "@epam/ai-dial-catalog": "1.2.0-dev.201",
22
+ "@epam/ai-dial-conversation-input": "1.2.0-dev.201"
23
23
  },
24
24
  "peerDependencies": {
25
- "@epam/ai-dial-chat-shared": "1.2.0-dev.20",
26
- "@epam/ai-dial-ui-kit": "^0.14.2",
25
+ "@epam/ai-dial-chat-shared": "1.2.0-dev.201",
26
+ "@epam/ai-dial-react-file-manager": "^0.3.0-dev.16",
27
+ "@epam/ai-dial-ui-kit": "^0.15.0-dev.23",
27
28
  "react": "^19.2.8"
28
29
  },
29
30
  "repository": {
package/test-setup.d.ts CHANGED
@@ -1 +1,2 @@
1
+ export {};
1
2
  //# sourceMappingURL=test-setup.d.ts.map
@@ -0,0 +1,10 @@
1
+ import { CatalogContentTreeNode } from '@epam/ai-dial-catalog';
2
+ import { DialFile } from '@epam/ai-dial-react-file-manager';
3
+ /**
4
+ * Maps the details panel's `CatalogContentTreeNode[]` onto the nested
5
+ * `DialFile[]` `DialFoldersTree` renders. A node's opaque `id` becomes the
6
+ * file's `path`, so the tree's `selectedPath` / `expandedPaths` /
7
+ * `onItemClick` speak the panel's ids unchanged — nothing is parsed.
8
+ */
9
+ export declare const mapCatalogContentTreeToDialFiles: (nodes: CatalogContentTreeNode[], parentPath?: string | null) => DialFile[];
10
+ //# sourceMappingURL=catalog-content-dial-files.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catalog-content-dial-files.d.ts","sourceRoot":"","sources":["../../src/utils/catalog-content-dial-files.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAEpE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAEjE;;;;;GAKG;AACH,eAAO,MAAM,gCAAgC,GAC3C,OAAO,sBAAsB,EAAE,EAC/B,aAAY,MAAM,GAAG,IAAW,KAC/B,QAAQ,EAkBR,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { RequestSkill } from '@epam/ai-dial-chat-shared';
2
+ /** One resolved mention location, or omitted for a skill whose text mention could not be found. */
3
+ export interface ResolvedSkillMention {
4
+ /** Index into the input `skills` array this location resolves. */
5
+ skillIndex: number;
6
+ /** Character offset of the leading `/` in `text`. */
7
+ start: number;
8
+ /** Length of the matched `/{name}` run. */
9
+ length: number;
10
+ }
11
+ /**
12
+ * Matches each entry of `skills` (in array order) to the next available
13
+ * `/{name}` occurrence in `text`, where `name` is that entry's display name
14
+ * resolved via `resolveName(url)` — the current listing name, falling back to
15
+ * the url's last path segment (`getSkillFallbackName`). Scans left to right,
16
+ * consuming text as it goes, so two skills with the same resolved name are
17
+ * still matched to distinct, successive occurrences in the text. A skill
18
+ * whose exact `/{name}` cannot be found at or after the current scan position
19
+ * (e.g. the user's later edit broke the mention) is omitted from the result —
20
+ * it still counts as a real `custom_content.skills` entry for sending, it
21
+ * simply renders nowhere in particular, and later entries still get their own
22
+ * independent forward search from the same unmoved cursor.
23
+ */
24
+ export declare const matchSkillMentions: (text: string, skills: RequestSkill[], resolveName: (url: string) => string) => ResolvedSkillMention[];
25
+ //# sourceMappingURL=skill-mention-matching.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skill-mention-matching.d.ts","sourceRoot":"","sources":["../../src/utils/skill-mention-matching.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAE9D,mGAAmG;AACnG,MAAM,WAAW,oBAAoB;IACnC,kEAAkE;IAClE,UAAU,EAAE,MAAM,CAAC;IACnB,qDAAqD;IACrD,KAAK,EAAE,MAAM,CAAC;IACd,2CAA2C;IAC3C,MAAM,EAAE,MAAM,CAAC;CAChB;AAKD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,kBAAkB,GAC7B,MAAM,MAAM,EACZ,QAAQ,YAAY,EAAE,EACtB,aAAa,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,KACnC,oBAAoB,EA0BtB,CAAC"}