@epam/ai-dial-skills 1.2.0-dev.99 → 1.2.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/ChatSkill/ChatSkill.d.ts +3 -2
- package/components/ChatSkill/ChatSkill.d.ts.map +1 -1
- package/components/FavoriteSkillsPanel/FavoriteSkillsPanel.d.ts.map +1 -1
- package/components/SkillArchiveUploadDialog/SkillArchiveUploadDialog.d.ts.map +1 -1
- package/components/SkillContentFileTree/SkillContentFileTree.d.ts +11 -0
- package/components/SkillContentFileTree/SkillContentFileTree.d.ts.map +1 -0
- package/components/SkillDetailsSidePanel/SkillDetailsSidePanel.d.ts +2 -1
- package/components/SkillDetailsSidePanel/SkillDetailsSidePanel.d.ts.map +1 -1
- package/components/SkillInfoTooltipContent/SkillInfoTooltipContent.d.ts +1 -1
- package/components/SkillInfoTooltipContent/SkillInfoTooltipContent.d.ts.map +1 -1
- package/components/SkillSelectorField/SkillSelectorField.d.ts +5 -0
- package/components/SkillSelectorField/SkillSelectorField.d.ts.map +1 -0
- package/constants/public-class-names.d.ts +6 -5
- package/constants/public-class-names.d.ts.map +1 -1
- package/hooks/useSkillMentions/useSkillMentions.d.ts +52 -0
- package/hooks/useSkillMentions/useSkillMentions.d.ts.map +1 -0
- package/hooks/useSkillSelectorOverlay/useSkillSelectorOverlay.d.ts +5 -4
- package/hooks/useSkillSelectorOverlay/useSkillSelectorOverlay.d.ts.map +1 -1
- package/index.css +2 -2
- package/index.d.ts +13 -1
- package/index.d.ts.map +1 -1
- package/index.js +630 -270
- package/models/chat-skill-props.d.ts +30 -1
- package/models/chat-skill-props.d.ts.map +1 -1
- package/models/favorite-skill-item.d.ts +1 -1
- package/models/favorite-skill-item.d.ts.map +1 -1
- package/models/favorite-skills-panel-props.d.ts +32 -5
- package/models/favorite-skills-panel-props.d.ts.map +1 -1
- package/models/skill-archive-upload-dialog-props.d.ts +5 -1
- package/models/skill-archive-upload-dialog-props.d.ts.map +1 -1
- package/models/skill-info-tooltip-content-props.d.ts +19 -0
- package/models/skill-info-tooltip-content-props.d.ts.map +1 -1
- package/models/skill-mention-anchor.d.ts +12 -0
- package/models/skill-mention-anchor.d.ts.map +1 -0
- package/models/skill-selector-field-props.d.ts +72 -0
- package/models/skill-selector-field-props.d.ts.map +1 -0
- package/models/skill-selector-overlay.d.ts +144 -55
- package/models/skill-selector-overlay.d.ts.map +1 -1
- package/package.json +6 -5
- package/test-setup.d.ts +1 -0
- package/types/skill-unresolved-reason.d.ts +8 -0
- package/types/skill-unresolved-reason.d.ts.map +1 -0
- package/utils/catalog-content-dial-files.d.ts +10 -0
- package/utils/catalog-content-dial-files.d.ts.map +1 -0
- package/utils/skill-mention-matching.d.ts +25 -0
- package/utils/skill-mention-matching.d.ts.map +1 -0
- package/utils/skill-mention-tracking.d.ts +51 -0
- package/utils/skill-mention-tracking.d.ts.map +1 -0
- package/utils/skill-url.d.ts +1 -0
- package/utils/skill-url.d.ts.map +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SkillUnresolvedReason } from '../types/skill-unresolved-reason';
|
|
1
2
|
/** Localizable string labels for {@link ChatSkillProps}'s component. */
|
|
2
3
|
export interface ChatSkillLabels {
|
|
3
4
|
/** Label for the tooltip's "View details" action. Defaults to `'View details'`. */
|
|
@@ -8,7 +9,21 @@ export interface ChatSkillLabels {
|
|
|
8
9
|
* remove the skill or select a different model to proceed.
|
|
9
10
|
*/
|
|
10
11
|
unsupportedTooltipLabel?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Message shown alone in the tooltip, with a trash-can icon, while
|
|
14
|
+
* `unresolvedReason` is `SkillUnresolvedReason.Deleted`, stating that the
|
|
15
|
+
* skill has been deleted and its details are no longer available.
|
|
16
|
+
*/
|
|
17
|
+
deletedTooltipLabel?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Message shown alone in the tooltip, with a lock icon, while
|
|
20
|
+
* `unresolvedReason` is `SkillUnresolvedReason.NotShared`, stating that the
|
|
21
|
+
* viewer lacks access to the skill and should ask the chat owner to share it.
|
|
22
|
+
*/
|
|
23
|
+
notSharedTooltipLabel?: string;
|
|
11
24
|
}
|
|
25
|
+
/** How a skill chip opens its description card. */
|
|
26
|
+
export type ChatSkillDetailsTrigger = 'hover' | 'click';
|
|
12
27
|
/** Props for the ChatSkill component. */
|
|
13
28
|
export interface ChatSkillProps {
|
|
14
29
|
/** Display name, rendered after the `/` prefix in the button's label. */
|
|
@@ -28,7 +43,16 @@ export interface ChatSkillProps {
|
|
|
28
43
|
* "View details" button.
|
|
29
44
|
*/
|
|
30
45
|
isUnsupported?: boolean;
|
|
31
|
-
/**
|
|
46
|
+
/**
|
|
47
|
+
* Why this skill's url resolved to no loaded listing entry (absent from
|
|
48
|
+
* every pool). While set, it takes precedence over `isUnsupported` and the
|
|
49
|
+
* tooltip shows a fixed icon-plus-message for that reason alone — no
|
|
50
|
+
* description paragraph and no "View details" button, since there is no
|
|
51
|
+
* metadata to fetch and no panel to open. The `/{name}` label itself is
|
|
52
|
+
* unaffected — it keeps rendering with `labelClassName` alone.
|
|
53
|
+
*/
|
|
54
|
+
unresolvedReason?: SkillUnresolvedReason;
|
|
55
|
+
/** CSS class applied to the `/name` label. Defaults to `'dial-body-paragraph-text text-accent'`. */
|
|
32
56
|
labelClassName?: string;
|
|
33
57
|
/**
|
|
34
58
|
* Color class applied to the `/{name}` label in addition to
|
|
@@ -40,6 +64,11 @@ export interface ChatSkillProps {
|
|
|
40
64
|
* `isUnsupported` is set. Defaults to `'bg-error'`.
|
|
41
65
|
*/
|
|
42
66
|
unsupportedClassName?: string;
|
|
67
|
+
/**
|
|
68
|
+
* How the description card opens. Defaults to `'hover'` so existing hosts
|
|
69
|
+
* retain their hover-and-focus behaviour.
|
|
70
|
+
*/
|
|
71
|
+
detailsTrigger?: ChatSkillDetailsTrigger;
|
|
43
72
|
/** Called with the skill's path when the tooltip's "View details" button is clicked. */
|
|
44
73
|
onViewDetails: (path: string) => void;
|
|
45
74
|
/** 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;
|
|
1
|
+
{"version":3,"file":"chat-skill-props.d.ts","sourceRoot":"","sources":["../../src/models/chat-skill-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAE9E,wEAAwE;AACxE,MAAM,WAAW,eAAe;IAC9B,mFAAmF;IACnF,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;OAIG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,mDAAmD;AACnD,MAAM,MAAM,uBAAuB,GAAG,OAAO,GAAG,OAAO,CAAC;AAExD,yCAAyC;AACzC,MAAM,WAAW,cAAc;IAC7B,yEAAyE;IACzE,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,yFAAyF;IACzF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;;;;;OAOG;IACH,gBAAgB,CAAC,EAAE,qBAAqB,CAAC;IACzC,oGAAoG;IACpG,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC;;;OAGG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B;;;OAGG;IACH,cAAc,CAAC,EAAE,uBAAuB,CAAC;IACzC,wFAAwF;IACxF,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,oCAAoC;IACpC,MAAM,CAAC,EAAE,eAAe,CAAC;CAC1B"}
|
|
@@ -19,7 +19,7 @@ export interface SkillListingEntry {
|
|
|
19
19
|
url: string;
|
|
20
20
|
/** Display name. */
|
|
21
21
|
name: string;
|
|
22
|
-
/** Listing-sourced description (
|
|
22
|
+
/** Listing-sourced description ([ai-dial-core#1970](https://github.com/epam/ai-dial-core/pull/1970)). Absent on folders and older Cores. */
|
|
23
23
|
description?: string;
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"favorite-skill-item.d.ts","sourceRoot":"","sources":["../../src/models/favorite-skill-item.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,EAAE,EAAE,MAAM,CAAC;IACX,oBAAoB;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,mFAAmF;IACnF,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,kFAAkF;IAClF,GAAG,EAAE,MAAM,CAAC;IACZ,oBAAoB;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,
|
|
1
|
+
{"version":3,"file":"favorite-skill-item.d.ts","sourceRoot":"","sources":["../../src/models/favorite-skill-item.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,EAAE,EAAE,MAAM,CAAC;IACX,oBAAoB;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,mFAAmF;IACnF,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,kFAAkF;IAClF,GAAG,EAAE,MAAM,CAAC;IACZ,oBAAoB;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,4IAA4I;IAC5I,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,GACjC,OAAO,iBAAiB,KACvB,iBAID,CAAC"}
|
|
@@ -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
|
-
/**
|
|
37
|
-
onToggleFavorite
|
|
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
|
-
/**
|
|
41
|
-
onViewDetails
|
|
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
|
|
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,6IAA6I;IAC7I,QAAQ,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC5C,+DAA+D;IAC/D,gBAAgB,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,kDAAkD;IAClD,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,8DAA8D;IAC9D,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAClD,oDAAoD;IACpD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uDAAuD;IACvD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,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"}
|
|
@@ -12,13 +12,17 @@ export interface SkillArchiveUploadDialogLabels {
|
|
|
12
12
|
fileInputAriaLabel?: string;
|
|
13
13
|
/** Accessible name for the dialog's close button. Defaults to `'Close'`. */
|
|
14
14
|
closeAriaLabel?: string;
|
|
15
|
+
/** Accessible name of the spinner shown while the upload is in flight. Defaults to `'Uploading skill'`. */
|
|
16
|
+
uploadingAriaLabel?: string;
|
|
15
17
|
}
|
|
16
18
|
/** Props for {@link SkillArchiveUploadDialog}. */
|
|
17
19
|
export interface SkillArchiveUploadDialogProps {
|
|
18
20
|
/** Whether the dialog is open. */
|
|
19
21
|
isOpen: boolean;
|
|
20
|
-
/** Rejection message rendered under the drop area; omit when
|
|
22
|
+
/** Rejection or upload-failure message rendered under the drop area; omit when there is none. */
|
|
21
23
|
errorText?: string;
|
|
24
|
+
/** Whether an upload is in flight: the drop area is disabled and a spinner is shown. Defaults to `false`. */
|
|
25
|
+
isUploading?: boolean;
|
|
22
26
|
/** `accept` value forwarded to the drop zone/native file input. Defaults to `'.zip,.md'`. */
|
|
23
27
|
accept?: string;
|
|
24
28
|
/** Labels rendered by the dialog; each falls back to an English default. */
|
|
@@ -1 +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;
|
|
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;IACxB,2GAA2G;IAC3G,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,kDAAkD;AAClD,MAAM,WAAW,6BAA6B;IAC5C,kCAAkC;IAClC,MAAM,EAAE,OAAO,CAAC;IAChB,iGAAiG;IACjG,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6GAA6G;IAC7G,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,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"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SkillUnresolvedReason } from '../types/skill-unresolved-reason';
|
|
1
2
|
/** Props for the shared skill info tooltip content component. */
|
|
2
3
|
export interface SkillInfoTooltipContentProps {
|
|
3
4
|
/** The skill's listing-sourced description paragraph. Omitted entirely when empty. */
|
|
@@ -7,9 +8,27 @@ export interface SkillInfoTooltipContentProps {
|
|
|
7
8
|
* no description paragraph and no "View details" button render.
|
|
8
9
|
*/
|
|
9
10
|
unsupportedMessage?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Why the skill's url resolved to no loaded listing entry. While set, it
|
|
13
|
+
* takes precedence over `unsupportedMessage` and replaces the whole
|
|
14
|
+
* content with an icon and the matching fixed message — no description
|
|
15
|
+
* paragraph and no "View details" button render. Required alongside
|
|
16
|
+
* `deletedMessage`/`notSharedMessage`, whichever this value selects.
|
|
17
|
+
*/
|
|
18
|
+
unresolvedReason?: SkillUnresolvedReason;
|
|
19
|
+
/** Message shown alone, with a trash-can icon, while `unresolvedReason` is `SkillUnresolvedReason.Deleted`. */
|
|
20
|
+
deletedMessage?: string;
|
|
21
|
+
/** Message shown alone, with a lock icon, while `unresolvedReason` is `SkillUnresolvedReason.NotShared`. */
|
|
22
|
+
notSharedMessage?: string;
|
|
10
23
|
/** Label for the "View details" action. Defaults to `'View details'`. */
|
|
11
24
|
viewDetailsLabel?: string;
|
|
12
25
|
/** Called when the "View details" button is clicked. Unused while `unsupportedMessage` is set. */
|
|
13
26
|
onViewDetails?: () => void;
|
|
27
|
+
/**
|
|
28
|
+
* `tabIndex` of the "View details" button. Pass `-1` to keep it out of the
|
|
29
|
+
* Tab sequence (still clickable) where the tooltip hangs off a list row and
|
|
30
|
+
* Tab should move from row to row. Unset keeps the button's default.
|
|
31
|
+
*/
|
|
32
|
+
viewDetailsTabIndex?: number;
|
|
14
33
|
}
|
|
15
34
|
//# 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;
|
|
1
|
+
{"version":3,"file":"skill-info-tooltip-content-props.d.ts","sourceRoot":"","sources":["../../src/models/skill-info-tooltip-content-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAE9E,iEAAiE;AACjE,MAAM,WAAW,4BAA4B;IAC3C,sFAAsF;IACtF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,qBAAqB,CAAC;IACzC,+GAA+G;IAC/G,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,4GAA4G;IAC5G,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,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,72 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
/** Translated text for a controlled skill field. */
|
|
3
|
+
export interface SkillSelectorFieldLabels {
|
|
4
|
+
/** Visible and accessible field label. */
|
|
5
|
+
fieldLabel: string;
|
|
6
|
+
/** Empty selection text. */
|
|
7
|
+
placeholder: string;
|
|
8
|
+
/** Explanation shown when the selected model cannot use skills. */
|
|
9
|
+
unsupportedTooltipLabel: string;
|
|
10
|
+
/** Explanation shown when the field is disabled because the model cannot use skills and no skill is selected. Defaults to 'Selected model does not support skills. Select a different model to use a skill.'. */
|
|
11
|
+
unavailableTooltipLabel?: string;
|
|
12
|
+
/** Search input placeholder. Defaults to 'Search skills'. */
|
|
13
|
+
searchPlaceholder?: string;
|
|
14
|
+
/** Text shown when no skill is available. Defaults to 'No skills available'. */
|
|
15
|
+
emptyLabel?: string;
|
|
16
|
+
/** Text shown when the search matches no skill. Defaults to 'No matching skills'. */
|
|
17
|
+
noMatchingSkillsLabel?: string;
|
|
18
|
+
}
|
|
19
|
+
/** Per-instance theme and typography overrides for the skill field. */
|
|
20
|
+
export interface SkillSelectorFieldStyles {
|
|
21
|
+
/** Field color overrides; omitted values use the host theme. */
|
|
22
|
+
colors?: {
|
|
23
|
+
/** Text color. */
|
|
24
|
+
text?: string;
|
|
25
|
+
/** Field background. */
|
|
26
|
+
background?: string;
|
|
27
|
+
/** Field border. */
|
|
28
|
+
border?: string;
|
|
29
|
+
/** Invalid-state text and border. */
|
|
30
|
+
error?: string;
|
|
31
|
+
};
|
|
32
|
+
/** Label typography overrides. */
|
|
33
|
+
typography?: {
|
|
34
|
+
/** CSS classes applied to the value. Defaults to 'dial-small-text'. */
|
|
35
|
+
fontClassName?: string;
|
|
36
|
+
};
|
|
37
|
+
/** Additional classes applied to the input wrapper. */
|
|
38
|
+
triggerClassName?: string;
|
|
39
|
+
/** CSS custom properties merged after the typed overrides. */
|
|
40
|
+
cssVars?: CSSProperties;
|
|
41
|
+
}
|
|
42
|
+
/** One skill offered by the field's option list. */
|
|
43
|
+
export interface SkillSelectorOption {
|
|
44
|
+
/** Stable skill reference: the `skills/{bucket}/{path}` resource URL. */
|
|
45
|
+
id: string;
|
|
46
|
+
/** Display name. */
|
|
47
|
+
name: string;
|
|
48
|
+
}
|
|
49
|
+
/** Host-controlled multiple selection; the skill list belongs to the caller. */
|
|
50
|
+
export interface SkillSelectorFieldProps {
|
|
51
|
+
/** Host-resolved skills offered as checkbox options. Defaults to an empty list. */
|
|
52
|
+
skills?: SkillSelectorOption[];
|
|
53
|
+
/** Explicit skill support for the selected model. */
|
|
54
|
+
isSkillsSupported: boolean;
|
|
55
|
+
/** Disables all controls. Defaults to false. */
|
|
56
|
+
isDisabled?: boolean;
|
|
57
|
+
/** Host validation message rendered and associated by the UI-kit Select. */
|
|
58
|
+
error?: string;
|
|
59
|
+
/** Translated visible and accessible text. */
|
|
60
|
+
labels: SkillSelectorFieldLabels;
|
|
61
|
+
/** Additional classes applied to the root. */
|
|
62
|
+
className?: string;
|
|
63
|
+
/** Theme and typography overrides. */
|
|
64
|
+
styles?: SkillSelectorFieldStyles;
|
|
65
|
+
/** Selected references in display order. */
|
|
66
|
+
value: string[];
|
|
67
|
+
/** Called with the complete selection after adding or removing a skill. */
|
|
68
|
+
onChange: (value: string[]) => void;
|
|
69
|
+
/** Host-resolved names keyed by reference; missing entries display the URL. */
|
|
70
|
+
displayNames?: Record<string, string>;
|
|
71
|
+
}
|
|
72
|
+
//# 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,MAAM,OAAO,CAAC;AAE3C,oDAAoD;AACpD,MAAM,WAAW,wBAAwB;IACvC,0CAA0C;IAC1C,UAAU,E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AM,EAAE,wBAAwB,CAAC;IACjC,8CAA8C;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,MAAM,CAAC,EAAE,wBAAwB,CAAC;IAClC,4CAA4C;IAC5C,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,2EAA2E;IAC3E,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACpC,+EAA+E;IAC/E,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACvC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { RequestSkill } from '@epam/ai-dial-chat-shared';
|
|
2
|
-
import { CommandMenuConfig, MenuOverlayConfig } from '@epam/ai-dial-conversation-input';
|
|
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
|
/**
|
|
@@ -29,8 +30,20 @@ export interface SkillSelectorOverlayLabels {
|
|
|
29
30
|
*/
|
|
30
31
|
emptyQueryHintLabel?: string;
|
|
31
32
|
/**
|
|
32
|
-
*
|
|
33
|
-
*
|
|
33
|
+
* History tooltip message shown, with a trash-can icon, for a history
|
|
34
|
+
* entry whose url is the viewer's own bucket but resolves to no loaded
|
|
35
|
+
* listing entry. Defaults to `ChatSkill`'s own default text.
|
|
36
|
+
*/
|
|
37
|
+
deletedTooltipLabel?: string;
|
|
38
|
+
/**
|
|
39
|
+
* History tooltip message shown, with a lock icon, for a history entry
|
|
40
|
+
* whose url is a foreign bucket and resolves to no loaded listing entry.
|
|
41
|
+
* Defaults to `ChatSkill`'s own default text.
|
|
42
|
+
*/
|
|
43
|
+
notSharedTooltipLabel?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Tooltip message shown on an active `/name` mention while the selected
|
|
46
|
+
* model does not support skills. Defaults to `ChatSkill`'s own default text.
|
|
34
47
|
*/
|
|
35
48
|
unsupportedTooltipLabel?: string;
|
|
36
49
|
/** Labels forwarded to the favorites panel rendered as the overlay. */
|
|
@@ -38,17 +51,16 @@ export interface SkillSelectorOverlayLabels {
|
|
|
38
51
|
}
|
|
39
52
|
/** Options accepted by `useSkillSelectorOverlay`. */
|
|
40
53
|
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
54
|
/**
|
|
47
55
|
* Whether the input's current deployment supports skills. While `false`
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
56
|
+
* the entry points are omitted — no Add-menu item and no slash menu — but
|
|
57
|
+
* a tracked mention stays in the draft text and folds into
|
|
58
|
+
* `isSkillUnsupported` for the host's own send-disabled condition. The
|
|
59
|
+
* host resolves this from its own deployment data. Note: a live-composing
|
|
60
|
+
* mention has no per-mention error styling of its own (it renders as a
|
|
61
|
+
* plain highlighted run, not a `ChatSkill`); only the sent
|
|
62
|
+
* `custom_content.skills`/history rendering, and this boolean fold,
|
|
63
|
+
* reflect the unsupported state.
|
|
52
64
|
*/
|
|
53
65
|
isSkillsSupported: boolean;
|
|
54
66
|
/** The user's own skills. */
|
|
@@ -59,6 +71,16 @@ export interface UseSkillSelectorOverlayOptions {
|
|
|
59
71
|
publicSkills?: SkillListingEntry[];
|
|
60
72
|
/** Ids (`skills/{bucket}/{path}` URLs) of the user's favorited skills. */
|
|
61
73
|
favoriteIds: ReadonlySet<string>;
|
|
74
|
+
/**
|
|
75
|
+
* The viewer's own DIAL Core storage bucket (as it appears in a
|
|
76
|
+
* `skills/{bucket}/{path}` url). Used only to tell "the viewer's own skill
|
|
77
|
+
* was deleted" apart from "a foreign skill was never shared with the
|
|
78
|
+
* viewer" when a history entry's url resolves to no loaded listing entry
|
|
79
|
+
* (see `renderHistorySkillSegments`/`renderHistorySkills`'s
|
|
80
|
+
* `unresolvedReason`). A plain resolved value — this lib reads no
|
|
81
|
+
* auth/user context of its own.
|
|
82
|
+
*/
|
|
83
|
+
viewerBucket: string;
|
|
62
84
|
/** Removes a skill from favorites; fired by a row's star button. */
|
|
63
85
|
onToggleFavorite: (id: string) => void;
|
|
64
86
|
/** Localizable string overrides. */
|
|
@@ -71,6 +93,24 @@ export interface UseSkillSelectorOverlayOptions {
|
|
|
71
93
|
* to that line. Unset falls back to the chip's own default label class.
|
|
72
94
|
*/
|
|
73
95
|
historyChipLabelClassName?: string;
|
|
96
|
+
/**
|
|
97
|
+
* Class applied to the label of each mention rendered in an active composer.
|
|
98
|
+
* Pass color classes only: the label inherits the input's own font, which
|
|
99
|
+
* keeps it exactly as wide as the invisible text under it. Defaults to
|
|
100
|
+
* `'text-accent'`.
|
|
101
|
+
*/
|
|
102
|
+
activeMentionLabelClassName?: string;
|
|
103
|
+
/**
|
|
104
|
+
* Trigger used by mentions rendered in an active composer. Unset retains
|
|
105
|
+
* `ChatSkill`'s hover-and-focus default; history chips are unaffected.
|
|
106
|
+
*/
|
|
107
|
+
activeMentionDetailsTrigger?: ChatSkillDetailsTrigger;
|
|
108
|
+
/**
|
|
109
|
+
* Trigger used by history chips (sent user and assistant messages). Unset
|
|
110
|
+
* retains `ChatSkill`'s hover-and-focus default; pass `'click'` on touch
|
|
111
|
+
* layouts, where hover never fires.
|
|
112
|
+
*/
|
|
113
|
+
historyDetailsTrigger?: ChatSkillDetailsTrigger;
|
|
74
114
|
/**
|
|
75
115
|
* Renders the browse modal's picker content (e.g. a host catalog view);
|
|
76
116
|
* receives the selection and close callbacks to wire into it, and is
|
|
@@ -84,7 +124,7 @@ export interface UseSkillSelectorOverlayOptions {
|
|
|
84
124
|
export interface UseSkillSelectorOverlayResult {
|
|
85
125
|
/**
|
|
86
126
|
* The Skills entry for the `menuOverlays` prop of
|
|
87
|
-
* `ConversationInput`/`Input`. `undefined` while the
|
|
127
|
+
* `ConversationInput`/`EditMessageInput`/`Input`. `undefined` while the
|
|
88
128
|
* current deployment does not support skills: the host omits the entry
|
|
89
129
|
* entirely when this is `undefined`, so a stub renderer would leave the
|
|
90
130
|
* menu item in place with nothing behind it.
|
|
@@ -92,72 +132,121 @@ export interface UseSkillSelectorOverlayResult {
|
|
|
92
132
|
skillMenuOverlay?: MenuOverlayConfig;
|
|
93
133
|
/**
|
|
94
134
|
* The Skills entry for the `commandMenu` prop of
|
|
95
|
-
* `ConversationInput`/`Input`: typing `/` into an empty
|
|
96
|
-
* favorites panel in search mode above the input.
|
|
97
|
-
*
|
|
135
|
+
* `ConversationInput`/`EditMessageInput`/`Input`: typing `/` into an empty
|
|
136
|
+
* textarea opens the favorites panel in search mode above the input.
|
|
137
|
+
* `undefined` while the current deployment does not support skills,
|
|
98
138
|
* disabling the slash menu entirely.
|
|
99
139
|
*/
|
|
100
140
|
commandMenu?: CommandMenuConfig;
|
|
101
141
|
/**
|
|
102
142
|
* The browse modal element. Render at a stable level outside the popover
|
|
103
|
-
* (e.g. next to the input)
|
|
143
|
+
* (e.g. next to the input).
|
|
104
144
|
*/
|
|
105
145
|
skillCatalogModal: ReactNode;
|
|
106
146
|
/**
|
|
107
147
|
* The skill details side panel opened by a row tooltip's "View details".
|
|
108
|
-
* `null` while `isEnabled` is `false`.
|
|
109
148
|
*/
|
|
110
149
|
skillDetailsPanel: ReactNode;
|
|
111
150
|
/**
|
|
112
|
-
* The
|
|
113
|
-
* `
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
151
|
+
* The composer's message text after the most recent skill selection, with
|
|
152
|
+
* every `/{name}` mention spliced in. Pass straight through to
|
|
153
|
+
* `ConversationInput`/`EditMessageInput`'s own `message` prop alongside
|
|
154
|
+
* `messageRevision` — like that prop's existing "populated by a starter
|
|
155
|
+
* selection" use, this is a one-shot push applied on a `messageRevision`
|
|
156
|
+
* bump, not a value the host feeds back on every keystroke (ordinary typing
|
|
157
|
+
* is tracked separately through `onDraftChange`).
|
|
119
158
|
*/
|
|
120
|
-
|
|
159
|
+
message: string;
|
|
121
160
|
/**
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
*
|
|
125
|
-
* `
|
|
161
|
+
* Token that forces `message` to re-apply even when its string value is
|
|
162
|
+
* unchanged from the last push (e.g. the same skill selected again).
|
|
163
|
+
* Bumped on every call to the selection handlers backing `skillMenuOverlay`
|
|
164
|
+
* and `commandMenu`. Pass straight through to the composer's own
|
|
165
|
+
* `messageRevision` prop.
|
|
126
166
|
*/
|
|
127
|
-
|
|
167
|
+
messageRevision: number;
|
|
128
168
|
/**
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
* `
|
|
132
|
-
*
|
|
169
|
+
* Every currently-tracked skill mention's character range within the
|
|
170
|
+
* composer's live draft text, for `ConversationInput`/`EditMessageInput`/
|
|
171
|
+
* `Input`'s `activeMentions` prop (the live-composing highlighted-run
|
|
172
|
+
* render). Empty while nothing is mentioned.
|
|
133
173
|
*/
|
|
134
|
-
|
|
174
|
+
activeMentions: HighlightedTextRange[];
|
|
135
175
|
/**
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
*
|
|
176
|
+
* Reconciles tracked mentions against an external edit to the composer's
|
|
177
|
+
* draft text (ordinary typing, deleting, pasting, undo/redo). Wire to the
|
|
178
|
+
* composer's own `onChange` callback, in addition to whatever the host
|
|
179
|
+
* already does with that value — this keeps `activeMentions`/
|
|
180
|
+
* `selectedSkills` in sync with live edits between selections.
|
|
139
181
|
*/
|
|
140
|
-
|
|
182
|
+
onDraftChange: (nextValue: string) => void;
|
|
141
183
|
/**
|
|
142
|
-
*
|
|
143
|
-
* any
|
|
184
|
+
* Looks up the mention whose run ends exactly at `caretPosition`, without
|
|
185
|
+
* mutating any state. Pass straight through to the composer's
|
|
186
|
+
* `onBackspaceAtCaret` prop, which performs the actual whole-mention
|
|
187
|
+
* deletion through the textarea's native editing pipeline and reports the
|
|
188
|
+
* result back through `onDraftChange`. Returns `undefined` when the caret
|
|
189
|
+
* isn't at a mention boundary.
|
|
144
190
|
*/
|
|
145
|
-
|
|
191
|
+
onBackspaceAtCaret: (caretPosition: number) => HighlightedTextRange | undefined;
|
|
146
192
|
/**
|
|
147
|
-
*
|
|
148
|
-
*
|
|
149
|
-
*
|
|
193
|
+
* Caret offset to place the cursor at immediately after the most recent
|
|
194
|
+
* skill selection applies `message`/`messageRevision` — the position right
|
|
195
|
+
* after the inserted mention's text. Pass straight through to the
|
|
196
|
+
* composer's `caretPositionOverride` prop. `undefined` before any selection
|
|
197
|
+
* has been made this session.
|
|
150
198
|
*/
|
|
151
|
-
|
|
199
|
+
caretPositionOverride: number | undefined;
|
|
200
|
+
/**
|
|
201
|
+
* Whether at least one skill is mentioned while the current deployment does
|
|
202
|
+
* not support skills — hosts must fold this into their send-disabled
|
|
203
|
+
* conditions.
|
|
204
|
+
*/
|
|
205
|
+
isSkillUnsupported: boolean;
|
|
206
|
+
/**
|
|
207
|
+
* Every currently-tracked mention as the send-time `custom_content.skills`
|
|
208
|
+
* payload, in left-to-right text order — `undefined` while nothing is
|
|
209
|
+
* mentioned, so `custom_content.skills` is omitted entirely. Cleared to
|
|
210
|
+
* `undefined` by `resetSkillMentions` after a successful send.
|
|
211
|
+
*/
|
|
212
|
+
selectedSkills: RequestSkill[] | undefined;
|
|
152
213
|
/**
|
|
153
|
-
*
|
|
154
|
-
*
|
|
155
|
-
*
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
*
|
|
160
|
-
* `
|
|
214
|
+
* Clears every tracked mention and the draft text alongside it. Call after
|
|
215
|
+
* a successful send, matching the per-message selection-clears semantics of
|
|
216
|
+
* `custom_content.skills`.
|
|
217
|
+
*/
|
|
218
|
+
resetSkillMentions: () => void;
|
|
219
|
+
/**
|
|
220
|
+
* Seeds the draft and its tracked mentions from a persisted message — runs
|
|
221
|
+
* `matchSkillMentions` once against `content`/`skills` and initializes
|
|
222
|
+
* `message`/`activeMentions` from the result (bumping `messageRevision`).
|
|
223
|
+
* Call once when entering edit mode on a message that carries
|
|
224
|
+
* `custom_content.skills`.
|
|
225
|
+
*/
|
|
226
|
+
seedSkillMentions: (content: string, skills: RequestSkill[] | undefined) => void;
|
|
227
|
+
/**
|
|
228
|
+
* Renders a user message's `content` and `custom_content.skills` as an
|
|
229
|
+
* ordered array interleaving plain-text runs and `ChatSkill` elements at
|
|
230
|
+
* each mention's actual text position — for `UserMessageBubble`'s
|
|
231
|
+
* `textSegments` prop. Resolves each entry's name from the listing pools
|
|
232
|
+
* matched on its url, falling back to the url's last non-empty segment;
|
|
233
|
+
* when a url matches no pool, the rendered `ChatSkill` also carries
|
|
234
|
+
* `unresolvedReason` (`'deleted'` when the url's bucket equals
|
|
235
|
+
* `viewerBucket`, `'not-shared'` otherwise), replacing the tooltip's
|
|
236
|
+
* description and "View details" button with a fixed icon-plus-message.
|
|
237
|
+
* Shares the "View details" panel with the favorite rows for resolved
|
|
238
|
+
* entries. Returns `null` while `skills` is empty/absent; a mention
|
|
239
|
+
* `matchSkillMentions` cannot locate in `content` is simply omitted from
|
|
240
|
+
* the render (see `matchSkillMentions`'s own doc for that heuristic).
|
|
241
|
+
*/
|
|
242
|
+
renderHistorySkillSegments: (content: string, skills: RequestSkill[] | undefined) => ReactNode[] | null;
|
|
243
|
+
/**
|
|
244
|
+
* Renders every entry of `skills` as a flat list of `ChatSkill` elements,
|
|
245
|
+
* ignoring text position — for `AssistantMessageBubble`'s `beforeContent`
|
|
246
|
+
* slot, since assistant text is model-generated markdown and never
|
|
247
|
+
* authors positioned mentions. Each entry's name/description/
|
|
248
|
+
* `unresolvedReason` resolve the same way as `renderHistorySkillSegments`.
|
|
249
|
+
* Returns `null` while the array is empty/absent.
|
|
161
250
|
*/
|
|
162
251
|
renderHistorySkills: (skills: RequestSkill[] | undefined) => ReactNode;
|
|
163
252
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skill-selector-overlay.d.ts","sourceRoot":"","sources":["../../src/models/skill-selector-overlay.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAE/E;;;;;GAKG;AACH,MAAM,WAAW,+BAA+B;IAC9C,iFAAiF;IACjF,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,2EAA2E;IAC3E,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,qEAAqE;AACrE,MAAM,WAAW,0BAA0B;IACzC,2EAA2E;IAC3E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gFAAgF;IAChF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+EAA+E;IAC/E,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;;OAGG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,uEAAuE;IACvE,WAAW,CAAC,EAAE,yBAAyB,CAAC;CACzC;AAED,qDAAqD;AACrD,MAAM,WAAW,8BAA8B;IAC7C
|
|
1
|
+
{"version":3,"file":"skill-selector-overlay.d.ts","sourceRoot":"","sources":["../../src/models/skill-selector-overlay.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YA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E,MAAM,KAClB,oBAAoB,GAAG,SAAS,CAAC;IACtC;;;;;;OAMG;IACH,qBAAqB,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1C;;;;OAIG;IACH,kBAAkB,EAAE,OAAO,CAAC;IAC5B;;;;;OAKG;IACH,cAAc,EAAE,YAAY,EAAE,GAAG,SAAS,CAAC;IAC3C;;;;OAIG;IACH,kBAAkB,EAAE,MAAM,IAAI,CAAC;IAC/B;;;;;;OAMG;IACH,iBAAiB,EAAE,CACjB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,YAAY,EAAE,GAAG,SAAS,KAC/B,IAAI,CAAC;IACV;;;;;;;;;;;;;;OAcG;IACH,0BAA0B,EAAE,CAC1B,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,YAAY,EAAE,GAAG,SAAS,KAC/B,SAAS,EAAE,GAAG,IAAI,CAAC;IACxB;;;;;;;OAOG;IACH,mBAAmB,EAAE,CAAC,MAAM,EAAE,YAAY,EAAE,GAAG,SAAS,KAAK,SAAS,CAAC;CACxE"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epam/ai-dial-skills",
|
|
3
3
|
"description": "Host-agnostic UI for picking a favorite skill to attach to a chat input",
|
|
4
|
-
"version": "1.2.0-
|
|
4
|
+
"version": "1.2.0-rc.0",
|
|
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-
|
|
22
|
-
"@epam/ai-dial-conversation-input": "1.2.0-
|
|
21
|
+
"@epam/ai-dial-catalog": "1.2.0-rc.0",
|
|
22
|
+
"@epam/ai-dial-conversation-input": "1.2.0-rc.0"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"@epam/ai-dial-chat-shared": "1.2.0-
|
|
26
|
-
"@epam/ai-dial-
|
|
25
|
+
"@epam/ai-dial-chat-shared": "1.2.0-rc.0",
|
|
26
|
+
"@epam/ai-dial-react-file-manager": "^0.3.0",
|
|
27
|
+
"@epam/ai-dial-ui-kit": "^0.15.0",
|
|
27
28
|
"react": "^19.2.8"
|
|
28
29
|
},
|
|
29
30
|
"repository": {
|