@epam/ai-dial-skills 1.3.0-dev.9 → 1.3.0-dev.96
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.map +1 -1
- package/components/FavoriteSkillsPanel/FavoriteSkillsPanel.d.ts.map +1 -1
- package/components/SkillCatalogModal/SkillCatalogModal.d.ts.map +1 -1
- package/components/SkillInfoTooltipContent/SkillInfoTooltipContent.d.ts.map +1 -1
- package/constants/skill-info-tooltip.d.ts +2 -0
- package/constants/skill-info-tooltip.d.ts.map +1 -0
- package/hooks/useSkillSelectorOverlay/useSkillSelectorOverlay.d.ts +1 -1
- package/hooks/useSkillSelectorOverlay/useSkillSelectorOverlay.d.ts.map +1 -1
- package/index.css +2 -1
- package/index.js +264 -252
- package/models/favorite-skills-panel-props.d.ts +2 -0
- package/models/favorite-skills-panel-props.d.ts.map +1 -1
- package/models/skill-info-tooltip-content-props.d.ts +2 -0
- package/models/skill-info-tooltip-content-props.d.ts.map +1 -1
- package/models/skill-selector-overlay.d.ts +5 -3
- package/models/skill-selector-overlay.d.ts.map +1 -1
- package/package.json +6 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatSkill.d.ts","sourceRoot":"","sources":["../../../src/components/ChatSkill/ChatSkill.tsx"],"names":[],"mappings":"AAMA,OAAO,
|
|
1
|
+
{"version":3,"file":"ChatSkill.d.ts","sourceRoot":"","sources":["../../../src/components/ChatSkill/ChatSkill.tsx"],"names":[],"mappings":"AAMA,OAAO,EAA6B,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAG3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAGpE;;;;GAIG;AACH,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CAyJxC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FavoriteSkillsPanel.d.ts","sourceRoot":"","sources":["../../../src/components/FavoriteSkillsPanel/FavoriteSkillsPanel.tsx"],"names":[],"mappings":"AAaA,OAAO,EAML,KAAK,EAAE,EAER,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"FavoriteSkillsPanel.d.ts","sourceRoot":"","sources":["../../../src/components/FavoriteSkillsPanel/FavoriteSkillsPanel.tsx"],"names":[],"mappings":"AAaA,OAAO,EAML,KAAK,EAAE,EAER,MAAM,OAAO,CAAC;AAIf,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AAYzF,sHAAsH;AACtH,eAAO,MAAM,mBAAmB,EAAE,EAAE,CAAC,wBAAwB,CAsT5D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SkillCatalogModal.d.ts","sourceRoot":"","sources":["../../../src/components/SkillCatalogModal/SkillCatalogModal.tsx"],"names":[],"mappings":"AACA,OAAO,EAAY,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAErF,mHAAmH;AACnH,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,
|
|
1
|
+
{"version":3,"file":"SkillCatalogModal.d.ts","sourceRoot":"","sources":["../../../src/components/SkillCatalogModal/SkillCatalogModal.tsx"],"names":[],"mappings":"AACA,OAAO,EAAY,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAErF,mHAAmH;AACnH,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CAuBxD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SkillInfoTooltipContent.d.ts","sourceRoot":"","sources":["../../../src/components/SkillInfoTooltipContent/SkillInfoTooltipContent.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SkillInfoTooltipContent.d.ts","sourceRoot":"","sources":["../../../src/components/SkillInfoTooltipContent/SkillInfoTooltipContent.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,+CAA+C,CAAC;AAGlG,qLAAqL;AACrL,eAAO,MAAM,uBAAuB,EAAE,EAAE,CAAC,4BAA4B,CAoFpE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skill-info-tooltip.d.ts","sourceRoot":"","sources":["../../src/constants/skill-info-tooltip.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,qCAAqC,sEACmB,CAAC"}
|
|
@@ -7,5 +7,5 @@ import { UseSkillSelectorOverlayOptions, UseSkillSelectorOverlayResult } from '.
|
|
|
7
7
|
* listing data, favorites state, labels, the deployment-support signal, and
|
|
8
8
|
* the modal/panel components.
|
|
9
9
|
*/
|
|
10
|
-
export declare const useSkillSelectorOverlay: ({ isSkillsSupported, skills, sharedWithMe, publicSkills, favoriteIds, viewerBucket, onToggleFavorite, labels, historyChipLabelClassName, activeMentionLabelClassName, activeMentionDetailsTrigger, historyDetailsTrigger, renderCatalogContent, detailsPanelComponent: DetailsPanelComponent, }: UseSkillSelectorOverlayOptions) => UseSkillSelectorOverlayResult;
|
|
10
|
+
export declare const useSkillSelectorOverlay: ({ isSkillsSupported, skills, sharedWithMe, publicSkills, favoriteIds, viewerBucket, onToggleFavorite, labels, historyChipLabelClassName, activeMentionLabelClassName, activeMentionDetailsTrigger, historyDetailsTrigger, isRowTooltipHidden, renderCatalogContent, detailsPanelComponent: DetailsPanelComponent, }: UseSkillSelectorOverlayOptions) => UseSkillSelectorOverlayResult;
|
|
11
11
|
//# sourceMappingURL=useSkillSelectorOverlay.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSkillSelectorOverlay.d.ts","sourceRoot":"","sources":["../../../src/hooks/useSkillSelectorOverlay/useSkillSelectorOverlay.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EACV,8BAA8B,EAC9B,6BAA6B,EAC9B,MAAM,qCAAqC,CAAC;AAsB7C;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,GAAI,
|
|
1
|
+
{"version":3,"file":"useSkillSelectorOverlay.d.ts","sourceRoot":"","sources":["../../../src/hooks/useSkillSelectorOverlay/useSkillSelectorOverlay.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EACV,8BAA8B,EAC9B,6BAA6B,EAC9B,MAAM,qCAAqC,CAAC;AAsB7C;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,GAAI,qTAgBrC,8BAA8B,KAAG,6BAujBnC,CAAC"}
|
package/index.css
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
._row_1v431_1:hover,._row_1v431_1:focus-visible,._row_1v431_1[aria-selected=true]{background:var(--fs-row-hover-bg,var(--bg-layer-sunken,#eef1f7))}._header_1v431_8{color:var(--fs-header-text,var(--text-tertiary,#848e9c))}._emptyHint_1v431_12{color:var(--fs-empty-hint-text,var(--text-icon-tertiary,#848e9c))}._star_1v431_16{color:var(--fs-star-color,var(--text-warning-icon,#eec840))}._footer_1v431_20{border-top-color:var(--fs-footer-border,var(--stroke-tertiary,#e0e6f0))}._rowEnter_1v431_28{animation:.2s ease-out _rowFadeIn_1v431_1}._rowLeaving_1v431_32{pointer-events:none;animation:.18s ease-out forwards _rowFadeOut_1v431_1}@keyframes _rowFadeIn_1v431_1{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}@keyframes _rowFadeOut_1v431_1{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.96)}}._listContent_1v431_60{transition:max-height .2s}@media (prefers-reduced-motion:reduce){._rowEnter_1v431_28,._rowLeaving_1v431_32{animation:none}._listContent_1v431_60{transition:none}}._background_1ult0_1{background:var(--ssf-bg)}._border_1ult0_5{border-color:var(--ssf-border)}._value_1ult0_9{color:var(--ssf-text)}._clear_1ult0_13{margin-block:-.5rem}._invalid_1ult0_17{color:var(--ssf-error,var(--text-error,#ae2f2f));border-color:var(--ssf-error,var(--text-error,#ae2f2f))}._invalid_1ult0_17 input{color:var(--ssf-error,var(--text-error,#ae2f2f))}
|
|
2
|
-
/*$vite$:1
|
|
2
|
+
/*$vite$:1*//*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
|
|
3
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}}}.pointer-events-none{pointer-events:none}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.top-0{top:0}.-ms-1{margin-inline-start:-.25rem}.-me-1{margin-inline-end:-.25rem}.block{display:block}.flex{display:flex}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.h-\[min\(80vh\,840px\)\]{height:min(80vh,840px)}.h-\[min\(90vh\,860px\)\]{height:min(90vh,860px)}.max-h-72{max-height:18rem}.max-h-\[280px\]{max-height:280px}.min-h-0{min-height:0}.w-\[min\(var\(--reference-width\)\,calc\(100vw-2rem\)\)\]{width:min(var(--reference-width), calc(100vw - 2rem))}.w-full{width:100%}.\!max-w-\[min\(95vw\,1200px\)\]{max-width:min(95vw,1200px)!important}.max-w-\[min\(420px\,calc\(100vw-10px\)\)\]{max-width:min(420px,100vw - 10px)}.max-w-full{max-width:100%}.min-w-0{min-width:0}.flex-1{flex:1}.shrink-0{flex-shrink:0}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize{resize:both}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.items-center{align-items:center}.justify-center{justify-content:center}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.self-start{align-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:.5rem}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-transparent{border-color:#0000}.bg-error{background-color:var(--bg-error,#f3d6d8)}.px-1{padding-inline:.25rem}.px-2{padding-inline:.5rem}.px-3{padding-inline:.75rem}.px-4{padding-inline:1rem}.px-6{padding-inline:1.5rem}.py-1\.5{padding-block:.375rem}.py-3{padding-block:.75rem}.py-4{padding-block:1rem}.ps-1{padding-inline-start:.25rem}.pe-1{padding-inline-end:.25rem}.pt-2{padding-top:.5rem}.pb-0\.5{padding-bottom:.125rem}.pb-1{padding-bottom:.25rem}.text-start{text-align:start}.text-accent{color:var(--text-accent,#1d4ed8)}.text-error{color:var(--text-error,#ae2f2f)}.text-primary{color:var(--text-primary,#161b2d)}.text-secondary{color:var(--text-secondary,#57647a)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,cubic-bezier(.4, 0, .2, 1));transition-duration:var(--tw-duration,.15s)}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,cubic-bezier(.4, 0, .2, 1));transition-duration:var(--tw-duration,.15s)}.select-none{-webkit-user-select:none;user-select:none}.select-text{-webkit-user-select:text;user-select:text}@media (hover:hover){.hover\:bg-info:hover{background-color:var(--bg-info,#e1eaf9)}}.focus-visible\:bg-info:focus-visible,.active\:bg-info:active{background-color:var(--bg-info,#e1eaf9)}@media (max-width:1279px){.mobile\:h-full{height:100%}.mobile\:\!max-w-full{max-width:100%!important}.mobile\:rounded-none{border-radius:0}.mobile\:p-0{padding:0}}@media (min-width:1280px){.desktop\:hidden{display:none}.desktop\:inline{display:inline}.desktop\:w-\[280px\]{width:280px}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}
|
package/index.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { DeploymentIcon as e, buildCssVars as t, isSkillSelectionUnsupported as n, mergeClasses as r } from "@epam/ai-dial-chat-shared";
|
|
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,
|
|
3
|
-
import { Suspense as
|
|
4
|
-
import { IconBlocks as
|
|
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, ElementSize as u, FileDropzone as d, GhostButton as f, Highlight as p, InteractiveTooltip as m, InteractiveTooltipTrigger as h, Popup as g, PopupSize as _, Select as v, Spinner as y, ToggleIconButton as b, Tooltip as x, TooltipPlacement as S } from "@epam/ai-dial-ui-kit";
|
|
3
|
+
import { Suspense as C, useCallback as w, useEffect as T, useId as E, useLayoutEffect as ee, useMemo as D, useRef as O, useState as k } from "react";
|
|
4
|
+
import { IconBlocks as A, IconEye as j, IconLock as M, IconStarFilled as N, IconTrash as te } 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
|
-
import { CatalogContentNodeType as
|
|
7
|
+
import { CatalogContentNodeType as ne, DetailsPanel as z } from "@epam/ai-dial-catalog";
|
|
8
8
|
//#region src/constants/public-class-names.ts
|
|
9
9
|
var B = {
|
|
10
10
|
selectorField: "dial-skills-selector-field",
|
|
11
11
|
favoritesPanel: "dial-skills-favorites-panel",
|
|
12
12
|
chip: "dial-skills-chip"
|
|
13
|
-
}, V = /* @__PURE__ */ function(e) {
|
|
13
|
+
}, V = "max-h-[280px] max-w-[min(420px,calc(100vw-10px))] overflow-y-auto", H = /* @__PURE__ */ function(e) {
|
|
14
14
|
return e.Deleted = "deleted", e.NotShared = "not-shared", e;
|
|
15
|
-
}({}),
|
|
15
|
+
}({}), U = ({ description: e, unsupportedMessage: t, unresolvedReason: n, deletedMessage: i, notSharedMessage: d, viewDetailsLabel: f = "View details", onViewDetails: p, viewDetailsTabIndex: m, textClassName: h = "dial-tiny-text" }) => {
|
|
16
16
|
if (n != null) {
|
|
17
|
-
let e = n ===
|
|
17
|
+
let e = n === H.Deleted, t = e ? te : M, a = e ? i : d;
|
|
18
18
|
return /* @__PURE__ */ I("div", {
|
|
19
19
|
className: "flex flex-row items-center gap-2",
|
|
20
20
|
children: [/* @__PURE__ */ F(t, {
|
|
@@ -23,7 +23,7 @@ var B = {
|
|
|
23
23
|
"aria-hidden": !0,
|
|
24
24
|
className: "shrink-0 text-secondary"
|
|
25
25
|
}), /* @__PURE__ */ F("p", {
|
|
26
|
-
className: "
|
|
26
|
+
className: r(h, "text-start text-primary"),
|
|
27
27
|
children: a
|
|
28
28
|
})]
|
|
29
29
|
});
|
|
@@ -31,66 +31,70 @@ var B = {
|
|
|
31
31
|
return t == null ? /* @__PURE__ */ I("div", {
|
|
32
32
|
className: "flex flex-col gap-3",
|
|
33
33
|
children: [e != null && e !== "" && /* @__PURE__ */ F("p", {
|
|
34
|
-
className: "text-start",
|
|
34
|
+
className: r(h, "text-start"),
|
|
35
35
|
children: e
|
|
36
36
|
}), /* @__PURE__ */ F(a, {
|
|
37
37
|
variant: s.Primary,
|
|
38
38
|
appearance: o.Link,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
size: u.Small,
|
|
40
|
+
className: "self-start",
|
|
41
|
+
label: f,
|
|
42
|
+
iconBefore: /* @__PURE__ */ F(j, {
|
|
42
43
|
size: c.SM,
|
|
43
44
|
stroke: l,
|
|
44
45
|
"aria-hidden": !0
|
|
45
46
|
}),
|
|
46
|
-
onClick:
|
|
47
|
-
tabIndex:
|
|
47
|
+
onClick: p,
|
|
48
|
+
tabIndex: m
|
|
48
49
|
})]
|
|
49
50
|
}) : /* @__PURE__ */ F("p", {
|
|
50
|
-
className: "text-start",
|
|
51
|
+
className: r(h, "text-start"),
|
|
51
52
|
children: t
|
|
52
53
|
});
|
|
53
|
-
},
|
|
54
|
-
let { viewDetailsLabel: f = "View details", unsupportedTooltipLabel:
|
|
54
|
+
}, W = ({ name: e, path: t, description: n, isUnsupported: i = !1, unresolvedReason: a, labelClassName: o = "dial-body-paragraph-text text-accent", unsupportedLabelClassName: s = "text-error", unsupportedClassName: c = "bg-error", detailsTrigger: l = "hover", onViewDetails: u, labels: d = {} }) => {
|
|
55
|
+
let { viewDetailsLabel: f = "View details", unsupportedTooltipLabel: p = "Selected model does not support skills. Remove the skill or select different model to proceed.", deletedTooltipLabel: g = "This skill has been deleted. Its details are no longer available.", notSharedTooltipLabel: _ = "You don't have access to this skill, so its details aren't shown. Ask the chat owner to share it with you." } = d, [v, y] = k(0), b = l === "click", x = () => {
|
|
55
56
|
y((e) => e + 1), u(t);
|
|
56
|
-
}, C =
|
|
57
|
-
return
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
57
|
+
}, [C, w] = k(null), [T, E] = k(null);
|
|
58
|
+
return ee(() => {
|
|
59
|
+
if (!C) return;
|
|
60
|
+
let e = () => {
|
|
61
|
+
C.isConnected && E(C.getBoundingClientRect().width);
|
|
62
|
+
};
|
|
63
|
+
if (e(), typeof ResizeObserver > "u") return;
|
|
64
|
+
let t = new ResizeObserver(e);
|
|
65
|
+
return t.observe(C), () => t.disconnect();
|
|
66
|
+
}, [C, o]), /* @__PURE__ */ F(m, {
|
|
63
67
|
asChild: !0,
|
|
64
|
-
placement:
|
|
65
|
-
trigger: b ?
|
|
66
|
-
contentClassName:
|
|
67
|
-
content: a == null ? i ? /* @__PURE__ */ F(
|
|
68
|
+
placement: S.Top,
|
|
69
|
+
trigger: b ? h.Click : h.Hover,
|
|
70
|
+
contentClassName: V,
|
|
71
|
+
content: a == null ? i ? /* @__PURE__ */ F(U, { unsupportedMessage: p }) : /* @__PURE__ */ F(U, {
|
|
68
72
|
description: n,
|
|
69
73
|
viewDetailsLabel: f,
|
|
70
|
-
onViewDetails:
|
|
71
|
-
}) : /* @__PURE__ */ F(
|
|
74
|
+
onViewDetails: x
|
|
75
|
+
}) : /* @__PURE__ */ F(U, {
|
|
72
76
|
unresolvedReason: a,
|
|
73
77
|
deletedMessage: g,
|
|
74
78
|
notSharedMessage: _
|
|
75
79
|
}),
|
|
76
80
|
children: /* @__PURE__ */ I("span", {
|
|
77
81
|
tabIndex: 0,
|
|
78
|
-
className: r("relative -
|
|
82
|
+
className: r("relative -ms-1 -me-1 inline cursor-pointer rounded-full ps-1 pe-1 select-text", i ? c : "hover:bg-info focus-visible:bg-info active:bg-info", i ? r(o, s) : o, B.chip),
|
|
79
83
|
"aria-label": `/${e}`,
|
|
80
84
|
children: [/* @__PURE__ */ F("span", {
|
|
81
|
-
ref:
|
|
85
|
+
ref: w,
|
|
82
86
|
"aria-hidden": !0,
|
|
83
|
-
className: "inset-inline-start-0 pointer-events-none absolute
|
|
87
|
+
className: "inset-inline-start-0 pointer-events-none absolute select-none",
|
|
84
88
|
children: "/"
|
|
85
89
|
}), /* @__PURE__ */ F("span", {
|
|
86
90
|
"aria-hidden": !0,
|
|
87
91
|
className: "select-none",
|
|
88
|
-
style: { paddingInlineStart:
|
|
92
|
+
style: { paddingInlineStart: T ?? void 0 },
|
|
89
93
|
children: e
|
|
90
94
|
})]
|
|
91
95
|
})
|
|
92
96
|
}, v);
|
|
93
|
-
},
|
|
97
|
+
}, G = {
|
|
94
98
|
row: "_row_1v431_1",
|
|
95
99
|
header: "_header_1v431_8",
|
|
96
100
|
emptyHint: "_emptyHint_1v431_12",
|
|
@@ -101,148 +105,148 @@ var B = {
|
|
|
101
105
|
rowLeaving: "_rowLeaving_1v431_32",
|
|
102
106
|
rowFadeOut: "_rowFadeOut_1v431_1",
|
|
103
107
|
listContent: "_listContent_1v431_60"
|
|
104
|
-
},
|
|
105
|
-
let { myCollectionLabel: D = "My Collection", emptyHintLabel:
|
|
106
|
-
"--fs-row-hover-bg":
|
|
107
|
-
"--fs-header-text":
|
|
108
|
-
"--fs-empty-hint-text":
|
|
109
|
-
"--fs-star-color":
|
|
110
|
-
"--fs-footer-border":
|
|
111
|
-
}), [R,
|
|
112
|
-
|
|
108
|
+
}, re = "px-3 pb-0.5 pt-2", ie = 180, K = 288, q = ({ favorites: n, onSelect: i, onToggleFavorite: a, onBrowse: o, onViewDetails: s, isRowTooltipHidden: l = !1, className: u, rowClassName: d, searchQuery: h, listboxId: g, activeOptionId: _, isMenu: v = !1, labels: y = {}, colors: x, nameClassName: S = "dial-small-text", headerClassName: C = "dial-tiny-lead-semi-text", emptyHintClassName: w = "dial-small-text" }) => {
|
|
109
|
+
let { myCollectionLabel: D = "My Collection", emptyHintLabel: A = "Star a skill to pin it here", browseLabel: j = "Browse", removeFromFavoritesLabel: M = "Remove from favorites", viewDetailsLabel: te = "View details", noMatchingSkillsLabel: P = "No matching skills" } = y, L = t({
|
|
110
|
+
"--fs-row-hover-bg": x?.rowHoverBackground,
|
|
111
|
+
"--fs-header-text": x?.headerText,
|
|
112
|
+
"--fs-empty-hint-text": x?.emptyHintText,
|
|
113
|
+
"--fs-star-color": x?.starColor,
|
|
114
|
+
"--fs-footer-border": x?.footerBorder
|
|
115
|
+
}), [R, ne] = k(/* @__PURE__ */ new Set()), z = O(/* @__PURE__ */ new Map());
|
|
116
|
+
T(() => {
|
|
113
117
|
let e = z.current;
|
|
114
118
|
return () => {
|
|
115
119
|
e.forEach((e) => clearTimeout(e)), e.clear();
|
|
116
120
|
};
|
|
117
121
|
}, []);
|
|
118
|
-
let
|
|
119
|
-
|
|
120
|
-
let
|
|
121
|
-
|
|
122
|
-
Q.current &&
|
|
123
|
-
}, [n,
|
|
124
|
-
let
|
|
122
|
+
let H = g != null, W = v && !H, q = H || W ? "none" : void 0, J = "button";
|
|
123
|
+
H ? J = "option" : W && (J = "menuitem");
|
|
124
|
+
let Y = E(), ae = h != null, X = h?.toLowerCase() ?? "", Z = ae ? n.filter((e) => e.name.toLowerCase().includes(X)) : n, Q = O(null), [oe, se] = k();
|
|
125
|
+
ee(() => {
|
|
126
|
+
Q.current && se(Math.min(Q.current.scrollHeight, K));
|
|
127
|
+
}, [n, h]);
|
|
128
|
+
let ce = (e, t) => {
|
|
125
129
|
e.target === e.currentTarget && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), i(t));
|
|
126
|
-
},
|
|
127
|
-
|
|
130
|
+
}, le = (e) => {
|
|
131
|
+
ne((t) => new Set(t).add(e));
|
|
128
132
|
let t = setTimeout(() => {
|
|
129
|
-
a?.(e),
|
|
133
|
+
a?.(e), ne((t) => {
|
|
130
134
|
let n = new Set(t);
|
|
131
135
|
return n.delete(e), n;
|
|
132
136
|
}), z.current.delete(e);
|
|
133
|
-
},
|
|
137
|
+
}, ie);
|
|
134
138
|
z.current.set(e, t);
|
|
135
139
|
};
|
|
136
140
|
return /* @__PURE__ */ I("div", {
|
|
137
|
-
className: r("flex w-full flex-col desktop:w-[280px]",
|
|
141
|
+
className: r("flex w-full flex-col desktop:w-[280px]", u, B.favoritesPanel),
|
|
138
142
|
style: L,
|
|
139
143
|
children: [
|
|
140
144
|
/* @__PURE__ */ F("p", {
|
|
141
|
-
id:
|
|
142
|
-
className: r(
|
|
145
|
+
id: Y,
|
|
146
|
+
className: r(C, re, G.header),
|
|
143
147
|
children: D
|
|
144
148
|
}),
|
|
145
149
|
/* @__PURE__ */ F("div", {
|
|
146
|
-
className: r("max-h-72 min-h-0 flex-1 overflow-y-auto",
|
|
147
|
-
style: { maxHeight:
|
|
150
|
+
className: r("max-h-72 min-h-0 flex-1 overflow-y-auto", G.listContent),
|
|
151
|
+
style: { maxHeight: oe },
|
|
148
152
|
children: /* @__PURE__ */ F("div", {
|
|
149
153
|
ref: Q,
|
|
150
154
|
children: Z.length > 0 ? /* @__PURE__ */ F("ul", {
|
|
151
|
-
id:
|
|
152
|
-
role:
|
|
153
|
-
"aria-labelledby":
|
|
155
|
+
id: g,
|
|
156
|
+
role: H ? "listbox" : q,
|
|
157
|
+
"aria-labelledby": H ? Y : void 0,
|
|
154
158
|
className: "flex flex-col gap-1 px-1 pb-1",
|
|
155
159
|
children: Z.map((t) => {
|
|
156
|
-
let n =
|
|
157
|
-
role:
|
|
160
|
+
let n = H ? `${g}-${encodeURIComponent(t.id)}` : void 0, o = H ? -1 : void 0, u = /* @__PURE__ */ I("div", {
|
|
161
|
+
role: J,
|
|
158
162
|
id: n,
|
|
159
|
-
"aria-selected":
|
|
163
|
+
"aria-selected": H ? n === _ : void 0,
|
|
160
164
|
"aria-label": t.name,
|
|
161
165
|
tabIndex: 0,
|
|
162
|
-
className: r("flex cursor-pointer items-center gap-2 rounded-lg border border-transparent px-2 py-1.5 transition-colors",
|
|
166
|
+
className: r("flex cursor-pointer items-center gap-2 rounded-lg border border-transparent px-2 py-1.5 transition-colors", G.row, d),
|
|
163
167
|
onClick: () => i(t),
|
|
164
|
-
onKeyDown: (e) =>
|
|
168
|
+
onKeyDown: (e) => ce(e, t),
|
|
165
169
|
children: [
|
|
166
170
|
/* @__PURE__ */ F(e, {
|
|
167
171
|
size: c.MD,
|
|
168
172
|
initialsName: t.name
|
|
169
173
|
}),
|
|
170
|
-
|
|
171
|
-
className: r(
|
|
174
|
+
h == null ? /* @__PURE__ */ F("span", {
|
|
175
|
+
className: r(S, "min-w-0 flex-1 truncate text-start"),
|
|
172
176
|
children: t.name
|
|
173
|
-
}) : /* @__PURE__ */ F(
|
|
177
|
+
}) : /* @__PURE__ */ F(p, {
|
|
174
178
|
text: t.name,
|
|
175
|
-
query:
|
|
179
|
+
query: h,
|
|
176
180
|
maxLines: 1,
|
|
177
|
-
className: r(
|
|
181
|
+
className: r(S, "min-w-0 flex-1 text-start")
|
|
178
182
|
}),
|
|
179
|
-
a && /* @__PURE__ */ F(
|
|
180
|
-
icon: /* @__PURE__ */ F(
|
|
183
|
+
a && /* @__PURE__ */ F(b, {
|
|
184
|
+
icon: /* @__PURE__ */ F(N, {
|
|
181
185
|
size: c.SM,
|
|
182
|
-
className:
|
|
186
|
+
className: G.star,
|
|
183
187
|
"aria-hidden": !0
|
|
184
188
|
}),
|
|
185
|
-
"aria-label":
|
|
189
|
+
"aria-label": M,
|
|
186
190
|
isSelected: !0,
|
|
187
191
|
tabIndex: o,
|
|
188
192
|
onClick: (e) => {
|
|
189
|
-
e.stopPropagation(),
|
|
193
|
+
e.stopPropagation(), le(t.id);
|
|
190
194
|
}
|
|
191
195
|
})
|
|
192
196
|
]
|
|
193
197
|
});
|
|
194
198
|
return /* @__PURE__ */ F("li", {
|
|
195
|
-
role:
|
|
196
|
-
className: R.has(t.id) ?
|
|
197
|
-
children: s ? /* @__PURE__ */ F(
|
|
199
|
+
role: q,
|
|
200
|
+
className: R.has(t.id) ? G.rowLeaving : G.rowEnter,
|
|
201
|
+
children: s && !l ? /* @__PURE__ */ F(m, {
|
|
198
202
|
asChild: !0,
|
|
199
|
-
contentClassName:
|
|
200
|
-
content: /* @__PURE__ */ F(
|
|
203
|
+
contentClassName: V,
|
|
204
|
+
content: /* @__PURE__ */ F(U, {
|
|
201
205
|
description: t.description,
|
|
202
|
-
viewDetailsLabel:
|
|
206
|
+
viewDetailsLabel: te,
|
|
203
207
|
onViewDetails: () => s(t),
|
|
204
208
|
viewDetailsTabIndex: o
|
|
205
209
|
}),
|
|
206
|
-
children:
|
|
207
|
-
}) :
|
|
210
|
+
children: u
|
|
211
|
+
}) : u
|
|
208
212
|
}, t.id);
|
|
209
213
|
})
|
|
210
|
-
}) :
|
|
214
|
+
}) : ae && X !== "" ? /* @__PURE__ */ F("p", {
|
|
211
215
|
role: "status",
|
|
212
216
|
"aria-live": "polite",
|
|
213
|
-
className: r(
|
|
217
|
+
className: r(w, "px-4 py-4 text-start", G.emptyHint),
|
|
214
218
|
children: P
|
|
215
219
|
}) : /* @__PURE__ */ F("p", {
|
|
216
|
-
className: r(
|
|
217
|
-
children:
|
|
220
|
+
className: r(w, "px-4 py-4 text-start", G.emptyHint),
|
|
221
|
+
children: A
|
|
218
222
|
})
|
|
219
223
|
})
|
|
220
224
|
}),
|
|
221
225
|
/* @__PURE__ */ F("div", {
|
|
222
|
-
className: r("border-t px-2 py-3",
|
|
223
|
-
children: /* @__PURE__ */ F(
|
|
224
|
-
role:
|
|
225
|
-
label:
|
|
226
|
+
className: r("border-t px-2 py-3", G.footer),
|
|
227
|
+
children: /* @__PURE__ */ F(f, {
|
|
228
|
+
role: W ? "menuitem" : void 0,
|
|
229
|
+
label: j,
|
|
226
230
|
className: "w-full justify-center",
|
|
227
231
|
onClick: o
|
|
228
232
|
})
|
|
229
233
|
})
|
|
230
234
|
]
|
|
231
235
|
});
|
|
232
|
-
},
|
|
233
|
-
let { dialogTitle: c = "Upload skill", dropZoneLabel: l = "Drag and drop it or click here to upload", dropZoneMobileLabel:
|
|
234
|
-
return /* @__PURE__ */ F(
|
|
236
|
+
}, J = ".zip,.md", Y = ({ isOpen: e, errorText: t, isUploading: n = !1, accept: r = J, labels: i, onClose: a, onFilesSelected: o, onFilesRejected: s }) => {
|
|
237
|
+
let { dialogTitle: c = "Upload skill", dropZoneLabel: l = "Drag and drop it or click here to upload", dropZoneMobileLabel: u = "Click here to upload", formatsLabel: f = "File formats .zip and SKILL.md", fileInputAriaLabel: p = "Upload a skill ZIP archive or a SKILL.md file", closeAriaLabel: m = "Close", uploadingAriaLabel: h = "Uploading skill" } = i ?? {};
|
|
238
|
+
return /* @__PURE__ */ F(g, {
|
|
235
239
|
open: e,
|
|
236
|
-
size:
|
|
240
|
+
size: _.Sm,
|
|
237
241
|
header: c,
|
|
238
242
|
closeAriaLabel: m,
|
|
239
243
|
onClose: a,
|
|
240
244
|
children: /* @__PURE__ */ I("div", {
|
|
241
245
|
className: "flex flex-col gap-4 px-6 py-4",
|
|
242
|
-
children: [/* @__PURE__ */ F(
|
|
246
|
+
children: [/* @__PURE__ */ F(d, {
|
|
243
247
|
label: /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F("span", {
|
|
244
248
|
className: "desktop:hidden",
|
|
245
|
-
children:
|
|
249
|
+
children: u
|
|
246
250
|
}), /* @__PURE__ */ F("span", {
|
|
247
251
|
className: "hidden desktop:inline",
|
|
248
252
|
children: l
|
|
@@ -254,23 +258,24 @@ var B = {
|
|
|
254
258
|
errorText: n ? void 0 : t,
|
|
255
259
|
onChange: o,
|
|
256
260
|
onReject: s
|
|
257
|
-
}), n && /* @__PURE__ */ F(
|
|
261
|
+
}), n && /* @__PURE__ */ F(y, { ariaLabel: h })]
|
|
258
262
|
})
|
|
259
263
|
});
|
|
260
|
-
},
|
|
264
|
+
}, ae = ({ isOpen: e, onClose: t, onSelect: n, title: r, renderContent: i }) => /* @__PURE__ */ F(g, {
|
|
261
265
|
open: e,
|
|
262
266
|
header: r,
|
|
263
|
-
size:
|
|
264
|
-
className: "h-[min(90vh,860px)] !max-w-[min(95vw,1200px)] overflow-hidden",
|
|
267
|
+
size: _.Lg,
|
|
268
|
+
className: "h-[min(90vh,860px)] !max-w-[min(95vw,1200px)] overflow-hidden mobile:h-full mobile:!max-w-full mobile:rounded-none",
|
|
269
|
+
overlayClassName: "mobile:p-0",
|
|
265
270
|
onClose: t,
|
|
266
271
|
children: /* @__PURE__ */ F("div", {
|
|
267
|
-
className: "h-[min(80vh,840px)] overflow-auto",
|
|
268
|
-
children: /* @__PURE__ */ F(
|
|
272
|
+
className: "h-[min(80vh,840px)] overflow-auto mobile:h-full",
|
|
273
|
+
children: /* @__PURE__ */ F(C, {
|
|
269
274
|
fallback: null,
|
|
270
275
|
children: e && i(n, t)
|
|
271
276
|
})
|
|
272
277
|
})
|
|
273
|
-
}), X = (e, t = null) => e.map((e) => e.type ===
|
|
278
|
+
}), X = (e, t = null) => e.map((e) => e.type === ne.Folder ? {
|
|
274
279
|
path: e.id,
|
|
275
280
|
name: e.name,
|
|
276
281
|
nodeType: L.FOLDER,
|
|
@@ -302,7 +307,7 @@ var B = {
|
|
|
302
307
|
}), Q = (e) => /* @__PURE__ */ F(z, {
|
|
303
308
|
...e,
|
|
304
309
|
renderContentFileTree: (e) => /* @__PURE__ */ F(Z, { ...e })
|
|
305
|
-
}),
|
|
310
|
+
}), oe = (e) => e == null || /[\s/]/.test(e), se = (e, t, n) => {
|
|
306
311
|
let r = [], i = 0;
|
|
307
312
|
return t.forEach((t, a) => {
|
|
308
313
|
let o = `/${n(t.url)}`, s = i;
|
|
@@ -310,7 +315,7 @@ var B = {
|
|
|
310
315
|
let t = e.indexOf(o, s);
|
|
311
316
|
if (t === -1) return;
|
|
312
317
|
let n = t + o.length;
|
|
313
|
-
if (
|
|
318
|
+
if (oe(e[n])) {
|
|
314
319
|
r.push({
|
|
315
320
|
skillIndex: a,
|
|
316
321
|
start: t,
|
|
@@ -321,14 +326,14 @@ var B = {
|
|
|
321
326
|
s = t + 1;
|
|
322
327
|
}
|
|
323
328
|
}), r;
|
|
324
|
-
},
|
|
329
|
+
}, ce = (e, t) => {
|
|
325
330
|
let n = /* @__PURE__ */ new Map();
|
|
326
331
|
t.forEach((e) => {
|
|
327
332
|
e.name !== "" && !n.has(e.name) && n.set(e.name, e.url);
|
|
328
333
|
});
|
|
329
334
|
let r = [...n.keys()].sort((e, t) => t.length - e.length), i = [], a = e.indexOf("/");
|
|
330
335
|
for (; a !== -1;) {
|
|
331
|
-
let t = a === 0 || /\s/.test(e[a - 1]), o = a + 1, s = t ? r.find((t) => e.startsWith(t, o) &&
|
|
336
|
+
let t = a === 0 || /\s/.test(e[a - 1]), o = a + 1, s = t ? r.find((t) => e.startsWith(t, o) && oe(e[o + t.length])) : void 0, c = s == null ? void 0 : n.get(s);
|
|
332
337
|
s != null && c != null ? (i.push({
|
|
333
338
|
url: c,
|
|
334
339
|
name: s,
|
|
@@ -337,7 +342,7 @@ var B = {
|
|
|
337
342
|
}), a = e.indexOf("/", o + s.length)) : a = e.indexOf("/", o);
|
|
338
343
|
}
|
|
339
344
|
return i;
|
|
340
|
-
},
|
|
345
|
+
}, le = (e, t) => {
|
|
341
346
|
let n = Math.min(e.length, t.length), r = 0;
|
|
342
347
|
for (; r < n && e[r] === t[r];) r += 1;
|
|
343
348
|
let i = n - r, a = 0;
|
|
@@ -347,13 +352,13 @@ var B = {
|
|
|
347
352
|
deletedLength: e.length - r - a,
|
|
348
353
|
insertedLength: t.length - r - a
|
|
349
354
|
};
|
|
350
|
-
},
|
|
355
|
+
}, ue = (e, t) => {
|
|
351
356
|
let n = t.start + t.deletedLength, r = t.insertedLength - t.deletedLength;
|
|
352
357
|
return e.reduce((e, i) => i.start + i.length <= t.start ? (e.push(i), e) : (i.start >= n && e.push({
|
|
353
358
|
...i,
|
|
354
359
|
start: i.start + r
|
|
355
360
|
}), e), []);
|
|
356
|
-
},
|
|
361
|
+
}, $ = (e, t, n, r, i) => {
|
|
357
362
|
let a = r.length + 1, o = a + +!!i, s = e.map((e) => e.start >= t ? {
|
|
358
363
|
...e,
|
|
359
364
|
start: e.start + o
|
|
@@ -364,7 +369,7 @@ var B = {
|
|
|
364
369
|
length: a
|
|
365
370
|
};
|
|
366
371
|
return [...s, c].sort((e, t) => e.start - t.start);
|
|
367
|
-
},
|
|
372
|
+
}, de = (e, t) => e.find((e) => e.start + e.length === t), fe = (e, t, n) => {
|
|
368
373
|
let r = t;
|
|
369
374
|
for (; r > 0 && !/\s/.test(e[r - 1]);) r--;
|
|
370
375
|
let i = r;
|
|
@@ -374,21 +379,21 @@ var B = {
|
|
|
374
379
|
start: r,
|
|
375
380
|
end: i
|
|
376
381
|
};
|
|
377
|
-
},
|
|
382
|
+
}, pe = (e, t, n) => {
|
|
378
383
|
if (n === "" || t.insertedLength < n.length) return;
|
|
379
384
|
let r = e.indexOf(n, Math.max(0, t.start - n.length)), i = t.start + t.insertedLength - n.length;
|
|
380
385
|
return r !== -1 && r <= i ? r : void 0;
|
|
381
|
-
},
|
|
386
|
+
}, me = () => {
|
|
382
387
|
let [e, t] = k(""), [n, r] = k([]), i = O(e);
|
|
383
388
|
i.current = e;
|
|
384
389
|
let a = O(n);
|
|
385
390
|
a.current = n;
|
|
386
|
-
let o = O(null), s =
|
|
387
|
-
let n =
|
|
391
|
+
let o = O(null), s = w((e) => {
|
|
392
|
+
let n = le(i.current, e), a = o.current;
|
|
388
393
|
o.current = null;
|
|
389
|
-
let s = a == null ? void 0 :
|
|
394
|
+
let s = a == null ? void 0 : pe(e, n, a.text);
|
|
390
395
|
r((t) => {
|
|
391
|
-
let r =
|
|
396
|
+
let r = ue(t, n);
|
|
392
397
|
if (a == null || s == null) return r;
|
|
393
398
|
let i = a.mentions.map((e) => ({
|
|
394
399
|
...e,
|
|
@@ -396,23 +401,23 @@ var B = {
|
|
|
396
401
|
})).filter((t) => e.startsWith(`/${t.name}`, t.start) && !r.some((e) => e.start < t.start + t.length && t.start < e.start + e.length));
|
|
397
402
|
return [...r, ...i].sort((e, t) => e.start - t.start);
|
|
398
403
|
}), i.current = e, t(e);
|
|
399
|
-
}, []), c =
|
|
404
|
+
}, []), c = w((e, n, a) => {
|
|
400
405
|
let o = i.current, s = !/^\s/.test(o.slice(a)), c = `/${n}${s ? " " : ""}`, l = o.slice(0, a) + c + o.slice(a);
|
|
401
|
-
return i.current = l, t(l), r((t) =>
|
|
402
|
-
}, []), l =
|
|
406
|
+
return i.current = l, t(l), r((t) => $(t, a, e, n, s)), s;
|
|
407
|
+
}, []), l = w((e, n, a) => {
|
|
403
408
|
let o = i.current, s = `/${n}`, c = o.slice(0, a) + s + o.slice(a);
|
|
404
|
-
i.current = c, t(c), r((t) =>
|
|
405
|
-
}, []), u =
|
|
409
|
+
i.current = c, t(c), r((t) => $(t, a, e, n, !1));
|
|
410
|
+
}, []), u = w((e) => de(a.current, e), []), d = D(() => {
|
|
406
411
|
if (n.length !== 0) return n.map((e) => ({ url: e.url }));
|
|
407
|
-
}, [n]), f =
|
|
412
|
+
}, [n]), f = w((e, t) => {
|
|
408
413
|
o.current = t.length > 0 ? {
|
|
409
414
|
text: e,
|
|
410
415
|
mentions: t
|
|
411
416
|
} : null;
|
|
412
|
-
}, []), p =
|
|
417
|
+
}, []), p = w(() => {
|
|
413
418
|
t(""), r([]);
|
|
414
|
-
}, []), m =
|
|
415
|
-
let a = n ?? [], o =
|
|
419
|
+
}, []), m = w((e, n, i) => {
|
|
420
|
+
let a = n ?? [], o = se(e, a, i);
|
|
416
421
|
t(e), r(o.map((e) => {
|
|
417
422
|
let t = a[e.skillIndex];
|
|
418
423
|
return {
|
|
@@ -446,18 +451,18 @@ var B = {
|
|
|
446
451
|
p,
|
|
447
452
|
m
|
|
448
453
|
]);
|
|
449
|
-
},
|
|
454
|
+
}, he = (e) => ({
|
|
450
455
|
id: e.url,
|
|
451
456
|
name: e.name,
|
|
452
457
|
description: e.description
|
|
453
|
-
}),
|
|
458
|
+
}), ge = (e) => {
|
|
454
459
|
let t = e.split("/").filter((e) => e.length > 0);
|
|
455
460
|
return t[t.length - 1] ?? e;
|
|
456
|
-
},
|
|
461
|
+
}, _e = (e) => {
|
|
457
462
|
let t = e.split("/").filter((e) => e.length > 0);
|
|
458
463
|
return t[0] !== "skills" || t.length < 3 ? null : t[1];
|
|
459
|
-
},
|
|
460
|
-
let { addMenuLabel:
|
|
464
|
+
}, ve = (e, t) => _e(e) === t ? H.Deleted : H.NotShared, ye = "/", be = ({ isSkillsSupported: e, skills: t, sharedWithMe: n, publicSkills: r, favoriteIds: a, viewerBucket: o, onToggleFavorite: s, labels: c, historyChipLabelClassName: u, activeMentionLabelClassName: d = "text-accent", activeMentionDetailsTrigger: f, historyDetailsTrigger: p, isRowTooltipHidden: m = !1, renderCatalogContent: h, detailsPanelComponent: g }) => {
|
|
465
|
+
let { addMenuLabel: _ = "Skills", backLabel: v = "Back", catalogModalTitleLabel: y = "Use skill", emptyQueryHintLabel: b = "Type to filter", deletedTooltipLabel: x, notSharedTooltipLabel: S, unsupportedTooltipLabel: T, panelLabels: E } = c ?? {}, [ee, j] = k(!1), [M, N] = k(null), [te, P] = k(0), I = O(null), [L, R] = k(0), [ne, z] = k(void 0), B = me(), V = D(() => [
|
|
461
466
|
...t,
|
|
462
467
|
...n ?? [],
|
|
463
468
|
...r ?? []
|
|
@@ -465,21 +470,21 @@ var B = {
|
|
|
465
470
|
t,
|
|
466
471
|
n,
|
|
467
472
|
r
|
|
468
|
-
]), H = D(() => new Map(V.map((e) => [e.url, e])), [V]),
|
|
473
|
+
]), H = D(() => new Map(V.map((e) => [e.url, e])), [V]), U = w((e) => H.get(e)?.name ?? ge(e), [H]), G = D(() => V.filter((e) => a.has(e.url)).map((e) => he(e)), [V, a]), re = B.anchors.length > 0 && !e, ie = D(() => B.anchors.map((t) => ({
|
|
469
474
|
start: t.start,
|
|
470
475
|
length: t.length,
|
|
471
476
|
isUnsupported: !e,
|
|
472
|
-
render: () => /* @__PURE__ */ F(
|
|
477
|
+
render: () => /* @__PURE__ */ F(W, {
|
|
473
478
|
name: t.name,
|
|
474
479
|
path: t.url,
|
|
475
480
|
labelClassName: d,
|
|
476
481
|
description: H.get(t.url)?.description,
|
|
477
482
|
isUnsupported: !e,
|
|
478
483
|
detailsTrigger: f,
|
|
479
|
-
onViewDetails:
|
|
484
|
+
onViewDetails: N,
|
|
480
485
|
labels: {
|
|
481
|
-
viewDetailsLabel:
|
|
482
|
-
unsupportedTooltipLabel:
|
|
486
|
+
viewDetailsLabel: E?.viewDetailsLabel,
|
|
487
|
+
unsupportedTooltipLabel: T
|
|
483
488
|
}
|
|
484
489
|
})
|
|
485
490
|
})), [
|
|
@@ -488,16 +493,16 @@ var B = {
|
|
|
488
493
|
H,
|
|
489
494
|
d,
|
|
490
495
|
f,
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
]),
|
|
496
|
+
E,
|
|
497
|
+
T
|
|
498
|
+
]), K = w((e, t, n) => {
|
|
494
499
|
let r = B.insertMention(e, t, n);
|
|
495
500
|
R((e) => e + 1), z(n + 1 + t.length + +!!r);
|
|
496
|
-
}, [B]), J =
|
|
497
|
-
let t =
|
|
501
|
+
}, [B]), J = w((e) => {
|
|
502
|
+
let t = fe(B.draft, e, ye);
|
|
498
503
|
return t == null ? e : (B.onDraftChange(B.draft.slice(0, t.start) + B.draft.slice(t.end)), t.start);
|
|
499
|
-
}, [B]),
|
|
500
|
-
let t =
|
|
504
|
+
}, [B]), Y = w((e) => {
|
|
505
|
+
let t = fe(B.draft, e, ye);
|
|
501
506
|
if (t == null) return;
|
|
502
507
|
let n = B.anchors.find((e) => e.start === t.start && e.start + e.length === t.end);
|
|
503
508
|
return {
|
|
@@ -505,126 +510,131 @@ var B = {
|
|
|
505
510
|
text: B.draft.slice(t.start, t.end),
|
|
506
511
|
mentionUrl: n?.url
|
|
507
512
|
};
|
|
508
|
-
}, [B]),
|
|
513
|
+
}, [B]), X = w(() => {
|
|
509
514
|
B.reset(), R((e) => e + 1), z(void 0);
|
|
510
|
-
}, [B]), { expectInsertion:
|
|
511
|
-
|
|
515
|
+
}, [B]), { expectInsertion: Z } = B, Q = w((t) => {
|
|
516
|
+
Z(t, e ? ce(t, V) : []);
|
|
512
517
|
}, [
|
|
513
|
-
|
|
518
|
+
Z,
|
|
514
519
|
e,
|
|
515
520
|
V
|
|
516
|
-
]), oe =
|
|
517
|
-
B.seedFromMessage(e, t,
|
|
518
|
-
}, [B,
|
|
521
|
+
]), oe = w((e, t) => {
|
|
522
|
+
B.seedFromMessage(e, t, U), R((e) => e + 1), z(void 0);
|
|
523
|
+
}, [B, U]), le = w((e, t) => {
|
|
519
524
|
if (t == null || t.length === 0) return null;
|
|
520
|
-
let n =
|
|
525
|
+
let n = se(e, t, U), r = [], i = 0;
|
|
521
526
|
return n.forEach((n) => {
|
|
522
527
|
n.start > i && r.push(e.slice(i, n.start));
|
|
523
|
-
let a = t[n.skillIndex], s = H.get(a.url), c = s?.name ??
|
|
524
|
-
r.push(
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
528
|
+
let a = t[n.skillIndex], s = H.get(a.url), c = s?.name ?? ge(a.url), l = s == null ? ve(a.url, o) : void 0;
|
|
529
|
+
r.push({
|
|
530
|
+
text: e.slice(n.start, n.start + n.length),
|
|
531
|
+
node: /* @__PURE__ */ F(W, {
|
|
532
|
+
name: c,
|
|
533
|
+
path: a.url,
|
|
534
|
+
labelClassName: u,
|
|
535
|
+
description: s?.description,
|
|
536
|
+
unresolvedReason: l,
|
|
537
|
+
detailsTrigger: p,
|
|
538
|
+
onViewDetails: N,
|
|
539
|
+
labels: {
|
|
540
|
+
viewDetailsLabel: E?.viewDetailsLabel,
|
|
541
|
+
deletedTooltipLabel: x,
|
|
542
|
+
notSharedTooltipLabel: S
|
|
543
|
+
}
|
|
544
|
+
}, `${a.url}-${n.start}`)
|
|
545
|
+
}), i = n.start + n.length;
|
|
538
546
|
}), i < e.length && r.push(e.slice(i)), r;
|
|
539
547
|
}, [
|
|
540
|
-
|
|
548
|
+
U,
|
|
541
549
|
H,
|
|
542
550
|
u,
|
|
543
551
|
p,
|
|
544
|
-
|
|
552
|
+
E,
|
|
545
553
|
o,
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
]),
|
|
549
|
-
let t = H.get(e.url), n = t?.name ??
|
|
550
|
-
return /* @__PURE__ */ F(
|
|
554
|
+
x,
|
|
555
|
+
S
|
|
556
|
+
]), ue = w((e) => e == null || e.length === 0 ? null : e.map((e) => {
|
|
557
|
+
let t = H.get(e.url), n = t?.name ?? ge(e.url), r = t == null ? ve(e.url, o) : void 0;
|
|
558
|
+
return /* @__PURE__ */ F(W, {
|
|
551
559
|
name: n,
|
|
552
560
|
path: e.url,
|
|
553
561
|
labelClassName: u,
|
|
554
562
|
description: t?.description,
|
|
555
563
|
unresolvedReason: r,
|
|
556
564
|
detailsTrigger: p,
|
|
557
|
-
onViewDetails:
|
|
565
|
+
onViewDetails: N,
|
|
558
566
|
labels: {
|
|
559
|
-
viewDetailsLabel:
|
|
560
|
-
deletedTooltipLabel:
|
|
561
|
-
notSharedTooltipLabel:
|
|
567
|
+
viewDetailsLabel: E?.viewDetailsLabel,
|
|
568
|
+
deletedTooltipLabel: x,
|
|
569
|
+
notSharedTooltipLabel: S
|
|
562
570
|
}
|
|
563
571
|
}, e.url);
|
|
564
572
|
}), [
|
|
565
573
|
H,
|
|
566
574
|
u,
|
|
567
575
|
p,
|
|
568
|
-
|
|
576
|
+
E,
|
|
569
577
|
o,
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
]),
|
|
578
|
+
x,
|
|
579
|
+
S
|
|
580
|
+
]), $ = w((e, t) => /* @__PURE__ */ F(q, {
|
|
573
581
|
favorites: G,
|
|
574
582
|
isMenu: !0,
|
|
575
583
|
onSelect: (n) => {
|
|
576
|
-
|
|
584
|
+
K(n.id, n.name, J(t)), e();
|
|
577
585
|
},
|
|
578
586
|
onToggleFavorite: s,
|
|
579
587
|
onBrowse: () => {
|
|
580
|
-
let n =
|
|
581
|
-
P(J(t)), I.current = n ?? null, e(),
|
|
588
|
+
let n = Y(t);
|
|
589
|
+
P(J(t)), I.current = n ?? null, e(), j(!0);
|
|
582
590
|
},
|
|
583
591
|
onViewDetails: (n) => {
|
|
584
|
-
J(t), e(),
|
|
592
|
+
J(t), e(), N(n.id);
|
|
585
593
|
},
|
|
586
|
-
|
|
594
|
+
isRowTooltipHidden: m,
|
|
595
|
+
labels: E
|
|
587
596
|
}), [
|
|
588
597
|
G,
|
|
589
|
-
|
|
598
|
+
K,
|
|
590
599
|
J,
|
|
591
|
-
|
|
600
|
+
Y,
|
|
592
601
|
s,
|
|
593
|
-
|
|
602
|
+
m,
|
|
603
|
+
E
|
|
594
604
|
]);
|
|
595
605
|
return {
|
|
596
606
|
skillMenuOverlay: D(() => e ? {
|
|
597
607
|
key: "skills",
|
|
598
|
-
title:
|
|
599
|
-
icon: /* @__PURE__ */ F(
|
|
608
|
+
title: _,
|
|
609
|
+
icon: /* @__PURE__ */ F(A, {
|
|
600
610
|
size: i,
|
|
601
611
|
"aria-hidden": !0,
|
|
602
612
|
stroke: l
|
|
603
613
|
}),
|
|
604
|
-
renderOverlay:
|
|
605
|
-
backLabel:
|
|
614
|
+
renderOverlay: $,
|
|
615
|
+
backLabel: v
|
|
606
616
|
} : void 0, [
|
|
607
617
|
e,
|
|
608
|
-
g,
|
|
609
618
|
_,
|
|
610
|
-
|
|
619
|
+
v,
|
|
620
|
+
$
|
|
611
621
|
]),
|
|
612
622
|
commandMenu: D(() => e ? {
|
|
613
|
-
triggerPrefix:
|
|
614
|
-
menuLabel:
|
|
615
|
-
emptyQueryHint:
|
|
616
|
-
onTextPaste:
|
|
617
|
-
renderMenu: ({ query: e, caretPosition: t, close: n, listboxId: r, activeOptionId: i }) => /* @__PURE__ */ F(
|
|
623
|
+
triggerPrefix: ye,
|
|
624
|
+
menuLabel: _,
|
|
625
|
+
emptyQueryHint: b,
|
|
626
|
+
onTextPaste: Q,
|
|
627
|
+
renderMenu: ({ query: e, caretPosition: t, close: n, listboxId: r, activeOptionId: i }) => /* @__PURE__ */ F(q, {
|
|
618
628
|
favorites: G,
|
|
619
629
|
searchQuery: e,
|
|
620
630
|
listboxId: r,
|
|
621
631
|
activeOptionId: i,
|
|
622
632
|
onSelect: (e) => {
|
|
623
|
-
n({ consumeQuery: !0 }),
|
|
633
|
+
n({ consumeQuery: !0 }), K(e.id, e.name, t);
|
|
624
634
|
},
|
|
625
635
|
onToggleFavorite: s,
|
|
626
636
|
onBrowse: () => {
|
|
627
|
-
let r = `${
|
|
637
|
+
let r = `${ye}${e}`, i = B.anchors.find((e) => e.start === t && e.length === r.length);
|
|
628
638
|
n({
|
|
629
639
|
consumeQuery: !0,
|
|
630
640
|
returnFocus: !1
|
|
@@ -632,76 +642,78 @@ var B = {
|
|
|
632
642
|
position: t,
|
|
633
643
|
text: r,
|
|
634
644
|
mentionUrl: i?.url
|
|
635
|
-
},
|
|
645
|
+
}, j(!0);
|
|
636
646
|
},
|
|
637
647
|
onViewDetails: (e) => {
|
|
638
|
-
n({ consumeQuery: !0 }),
|
|
648
|
+
n({ consumeQuery: !0 }), N(e.id);
|
|
639
649
|
},
|
|
640
|
-
|
|
650
|
+
isRowTooltipHidden: m,
|
|
651
|
+
labels: E
|
|
641
652
|
})
|
|
642
653
|
} : void 0, [
|
|
643
654
|
e,
|
|
644
|
-
|
|
645
|
-
|
|
655
|
+
_,
|
|
656
|
+
b,
|
|
646
657
|
G,
|
|
647
|
-
|
|
658
|
+
K,
|
|
648
659
|
B.anchors,
|
|
649
660
|
s,
|
|
650
|
-
|
|
651
|
-
|
|
661
|
+
m,
|
|
662
|
+
E,
|
|
663
|
+
Q
|
|
652
664
|
]),
|
|
653
|
-
skillCatalogModal: /* @__PURE__ */ F(
|
|
654
|
-
isOpen:
|
|
655
|
-
onClose:
|
|
656
|
-
|
|
665
|
+
skillCatalogModal: /* @__PURE__ */ F(ae, {
|
|
666
|
+
isOpen: ee,
|
|
667
|
+
onClose: w(() => {
|
|
668
|
+
j(!1);
|
|
657
669
|
let e = I.current;
|
|
658
670
|
if (I.current = null, e == null) return;
|
|
659
671
|
let { position: t, text: n, mentionUrl: r } = e;
|
|
660
672
|
r == null ? B.onDraftChange(B.draft.slice(0, t) + n + B.draft.slice(t)) : B.restoreMention(r, n.slice(1), t), R((e) => e + 1), z(t + n.length);
|
|
661
673
|
}, [B]),
|
|
662
674
|
onSelect: (e) => {
|
|
663
|
-
I.current = null,
|
|
675
|
+
I.current = null, K(e, U(e), te), j(!1);
|
|
664
676
|
},
|
|
665
|
-
title:
|
|
666
|
-
renderContent:
|
|
677
|
+
title: y,
|
|
678
|
+
renderContent: h
|
|
667
679
|
}),
|
|
668
|
-
skillDetailsPanel: /* @__PURE__ */ F(
|
|
680
|
+
skillDetailsPanel: /* @__PURE__ */ F(C, {
|
|
669
681
|
fallback: null,
|
|
670
|
-
children: /* @__PURE__ */ F(
|
|
671
|
-
skillId:
|
|
672
|
-
onClose: () =>
|
|
682
|
+
children: /* @__PURE__ */ F(g, {
|
|
683
|
+
skillId: M,
|
|
684
|
+
onClose: () => N(null)
|
|
673
685
|
})
|
|
674
686
|
}),
|
|
675
687
|
message: B.draft,
|
|
676
688
|
messageRevision: L,
|
|
677
|
-
activeMentions:
|
|
689
|
+
activeMentions: ie,
|
|
678
690
|
onDraftChange: B.onDraftChange,
|
|
679
691
|
onBackspaceAtCaret: B.onBackspaceAtCaret,
|
|
680
|
-
caretPositionOverride:
|
|
681
|
-
isSkillUnsupported:
|
|
692
|
+
caretPositionOverride: ne,
|
|
693
|
+
isSkillUnsupported: re,
|
|
682
694
|
selectedSkills: B.orderedSkills,
|
|
683
|
-
resetSkillMentions:
|
|
695
|
+
resetSkillMentions: X,
|
|
684
696
|
seedSkillMentions: oe,
|
|
685
|
-
recognizeMentionsInInsertion:
|
|
686
|
-
renderHistorySkillSegments:
|
|
687
|
-
renderHistorySkills:
|
|
697
|
+
recognizeMentionsInInsertion: Q,
|
|
698
|
+
renderHistorySkillSegments: le,
|
|
699
|
+
renderHistorySkills: ue
|
|
688
700
|
};
|
|
689
|
-
},
|
|
701
|
+
}, xe = {
|
|
690
702
|
background: "_background_1ult0_1",
|
|
691
703
|
border: "_border_1ult0_5",
|
|
692
704
|
value: "_value_1ult0_9",
|
|
693
705
|
clear: "_clear_1ult0_13",
|
|
694
706
|
invalid: "_invalid_1ult0_17"
|
|
695
|
-
},
|
|
696
|
-
let [g,
|
|
707
|
+
}, Se = [], Ce = "Selected model does not support skills. Select a different model to use a skill.", we = ({ value: i, onChange: a, displayNames: o, skills: s = Se, isSkillsSupported: l, isDisabled: u = !1, error: d, labels: f, className: m, styles: h }) => {
|
|
708
|
+
let [g, _] = k(!1), [y, b] = k(""), S = O(null), C = E(), w = i.some((e) => n(e, l)), T = l && !u, D = g && T, A = i.length > 0 ? f.unsupportedTooltipLabel : f.unavailableTooltipLabel ?? Ce, j = !l && i.length === 0, M = d ?? (j ? A : void 0), N = new Map(i.map((e) => [e, {
|
|
697
709
|
id: e,
|
|
698
710
|
name: o?.[e] || e
|
|
699
711
|
}]));
|
|
700
712
|
s.forEach((e) => N.set(e.id, e));
|
|
701
|
-
let
|
|
713
|
+
let te = [...N.values()].map((t) => ({
|
|
702
714
|
value: t.id,
|
|
703
715
|
label: t.name,
|
|
704
|
-
labelNode: y.trim() ? /* @__PURE__ */ F(
|
|
716
|
+
labelNode: y.trim() ? /* @__PURE__ */ F(p, {
|
|
705
717
|
text: t.name,
|
|
706
718
|
query: y,
|
|
707
719
|
maxLines: 1
|
|
@@ -711,7 +723,7 @@ var B = {
|
|
|
711
723
|
initialsName: t.name
|
|
712
724
|
}),
|
|
713
725
|
disabled: !l
|
|
714
|
-
})),
|
|
726
|
+
})), P = {
|
|
715
727
|
...t({
|
|
716
728
|
"--ssf-text": h?.colors?.text,
|
|
717
729
|
"--ssf-bg": h?.colors?.background,
|
|
@@ -720,7 +732,7 @@ var B = {
|
|
|
720
732
|
}),
|
|
721
733
|
...h?.cssVars
|
|
722
734
|
};
|
|
723
|
-
return
|
|
735
|
+
return ee(() => {
|
|
724
736
|
let e = S.current?.querySelector("[role=\"combobox\"]");
|
|
725
737
|
e && (M ? e.setAttribute("aria-describedby", C) : e.removeAttribute("aria-describedby"), d || w ? e.setAttribute("aria-invalid", "true") : e.removeAttribute("aria-invalid"));
|
|
726
738
|
}, [
|
|
@@ -732,36 +744,36 @@ var B = {
|
|
|
732
744
|
]), /* @__PURE__ */ I("div", {
|
|
733
745
|
ref: S,
|
|
734
746
|
className: r("min-w-0", m, B.selectorField),
|
|
735
|
-
style:
|
|
736
|
-
children: [/* @__PURE__ */ F(
|
|
747
|
+
style: P,
|
|
748
|
+
children: [/* @__PURE__ */ F(x, {
|
|
737
749
|
tooltip: A,
|
|
738
750
|
hideTooltip: l,
|
|
739
751
|
triggerClassName: "block w-full min-w-0",
|
|
740
752
|
children: /* @__PURE__ */ F("div", {
|
|
741
753
|
inert: u ? !0 : void 0,
|
|
742
|
-
children: /* @__PURE__ */ F(
|
|
754
|
+
children: /* @__PURE__ */ F(v, {
|
|
743
755
|
multiple: !0,
|
|
744
756
|
searchable: !0,
|
|
745
|
-
open:
|
|
757
|
+
open: D,
|
|
746
758
|
onOpenChange: (e) => {
|
|
747
|
-
e && !
|
|
759
|
+
e && !T || _(e);
|
|
748
760
|
},
|
|
749
|
-
onSearchQueryChange:
|
|
761
|
+
onSearchQueryChange: b,
|
|
750
762
|
value: i,
|
|
751
763
|
onChange: (e) => {
|
|
752
764
|
u || a(Array.isArray(e) ? e : [e]);
|
|
753
765
|
},
|
|
754
|
-
options:
|
|
755
|
-
placeholder:
|
|
756
|
-
labelProps: { label:
|
|
766
|
+
options: te,
|
|
767
|
+
placeholder: f.placeholder,
|
|
768
|
+
labelProps: { label: f.fieldLabel },
|
|
757
769
|
error: d,
|
|
758
770
|
caption: j ? A : void 0,
|
|
759
|
-
searchPlaceholder:
|
|
760
|
-
emptyStateTitle: y.trim() ?
|
|
771
|
+
searchPlaceholder: f.searchPlaceholder ?? "Search skills",
|
|
772
|
+
emptyStateTitle: y.trim() ? f.noMatchingSkillsLabel ?? "No matching skills" : f.emptyLabel ?? "No skills available",
|
|
761
773
|
disabled: u || j,
|
|
762
774
|
invalid: !!d || w,
|
|
763
775
|
className: "w-full min-w-0",
|
|
764
|
-
fieldClassName: r(
|
|
776
|
+
fieldClassName: r(T ? "cursor-pointer" : "cursor-not-allowed", "--ssf-bg" in P && xe.background, "--ssf-border" in P && xe.border, "--ssf-text" in P && xe.value, (d || w) && xe.invalid, h?.typography?.fontClassName ?? "dial-small-text", h?.triggerClassName),
|
|
765
777
|
listClassName: "w-[min(var(--reference-width),calc(100vw-2rem))] max-w-full"
|
|
766
778
|
})
|
|
767
779
|
})
|
|
@@ -773,4 +785,4 @@ var B = {
|
|
|
773
785
|
});
|
|
774
786
|
};
|
|
775
787
|
//#endregion
|
|
776
|
-
export {
|
|
788
|
+
export { W as ChatSkill, q as FavoriteSkillsPanel, B as SKILLS_CLASS, Y as SkillArchiveUploadDialog, ae as SkillCatalogModal, Z as SkillContentFileTree, Q as SkillDetailsSidePanel, U as SkillInfoTooltipContent, we as SkillSelectorField, H as SkillUnresolvedReason, he as buildFavoriteSkillItem, le as diffTextChange, de as findMentionAtCaret, ge as getSkillFallbackName, $ as insertAnchor, se as matchSkillMentions, ue as reconcileAnchors, me as useSkillMentions, be as useSkillSelectorOverlay };
|
|
@@ -39,6 +39,8 @@ export interface FavoriteSkillsPanelProps {
|
|
|
39
39
|
onBrowse: () => void;
|
|
40
40
|
/** Opens skill details; omitted hides the details tooltip. */
|
|
41
41
|
onViewDetails?: (item: FavoriteSkillItem) => void;
|
|
42
|
+
/** Whether rows render without the hover/focus details tooltip, even when `onViewDetails` is set. Defaults to `false`. */
|
|
43
|
+
isRowTooltipHidden?: boolean;
|
|
42
44
|
/** Additional classes applied to the panel root. */
|
|
43
45
|
className?: string;
|
|
44
46
|
/** Additional classes applied to each favorite row. */
|
|
@@ -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,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"}
|
|
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,0HAA0H;IAC1H,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,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"}
|
|
@@ -30,5 +30,7 @@ export interface SkillInfoTooltipContentProps {
|
|
|
30
30
|
* Tab should move from row to row. Unset keeps the button's default.
|
|
31
31
|
*/
|
|
32
32
|
viewDetailsTabIndex?: number;
|
|
33
|
+
/** CSS class applied to the description and message paragraphs. Defaults to `'dial-tiny-text'`. */
|
|
34
|
+
textClassName?: string;
|
|
33
35
|
}
|
|
34
36
|
//# 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,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;
|
|
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;IAC7B,mGAAmG;IACnG,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RequestSkill } from '@epam/ai-dial-chat-shared';
|
|
1
|
+
import { RequestSkill, TextSegment } from '@epam/ai-dial-chat-shared';
|
|
2
2
|
import { CommandMenuConfig, HighlightedTextRange, MenuOverlayConfig } from '@epam/ai-dial-conversation-input';
|
|
3
3
|
import { ComponentType, ReactNode } from 'react';
|
|
4
4
|
import { ChatSkillDetailsTrigger } from './chat-skill-props';
|
|
@@ -111,6 +111,8 @@ export interface UseSkillSelectorOverlayOptions {
|
|
|
111
111
|
* layouts, where hover never fires.
|
|
112
112
|
*/
|
|
113
113
|
historyDetailsTrigger?: ChatSkillDetailsTrigger;
|
|
114
|
+
/** Forwarded to the Add-menu and slash-menu favorites panels' `isRowTooltipHidden`. Defaults to `false`. */
|
|
115
|
+
isRowTooltipHidden?: boolean;
|
|
114
116
|
/**
|
|
115
117
|
* Renders the browse modal's picker content (e.g. a host catalog view);
|
|
116
118
|
* receives the selection and close callbacks to wire into it, and is
|
|
@@ -235,7 +237,7 @@ export interface UseSkillSelectorOverlayResult {
|
|
|
235
237
|
recognizeMentionsInInsertion: (text: string) => void;
|
|
236
238
|
/**
|
|
237
239
|
* Renders a user message's `content` and `custom_content.skills` as an
|
|
238
|
-
* ordered array interleaving
|
|
240
|
+
* ordered array interleaving markdown string runs and `ChatSkill` segments (each with its matched `/{name}` text) at
|
|
239
241
|
* each mention's actual text position — for `UserMessageBubble`'s
|
|
240
242
|
* `textSegments` prop. Resolves each entry's name from the listing pools
|
|
241
243
|
* matched on its url, falling back to the url's last non-empty segment;
|
|
@@ -248,7 +250,7 @@ export interface UseSkillSelectorOverlayResult {
|
|
|
248
250
|
* `matchSkillMentions` cannot locate in `content` is simply omitted from
|
|
249
251
|
* the render (see `matchSkillMentions`'s own doc for that heuristic).
|
|
250
252
|
*/
|
|
251
|
-
renderHistorySkillSegments: (content: string, skills: RequestSkill[] | undefined) =>
|
|
253
|
+
renderHistorySkillSegments: (content: string, skills: RequestSkill[] | undefined) => TextSegment[] | null;
|
|
252
254
|
/**
|
|
253
255
|
* Renders every entry of `skills` as a flat list of `ChatSkill` elements,
|
|
254
256
|
* ignoring text position — for `AssistantMessageBubble`'s `beforeContent`
|
|
@@ -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;
|
|
1
|
+
{"version":3,"file":"skill-selector-overlay.d.ts","sourceRoot":"","sources":["../../src/models/skill-selector-overlay.ts"],"names":[],"mappings":"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"}
|
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.3.0-dev.
|
|
4
|
+
"version": "1.3.0-dev.96",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./index.js",
|
|
@@ -18,13 +18,13 @@
|
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@tabler/icons-react": "^3.44.0",
|
|
21
|
-
"@epam/ai-dial-catalog": "1.3.0-dev.
|
|
22
|
-
"@epam/ai-dial-conversation-input": "1.3.0-dev.
|
|
21
|
+
"@epam/ai-dial-catalog": "1.3.0-dev.96",
|
|
22
|
+
"@epam/ai-dial-conversation-input": "1.3.0-dev.96"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"@epam/ai-dial-chat-shared": "1.3.0-dev.
|
|
26
|
-
"@epam/ai-dial-react-file-manager": "^0.
|
|
27
|
-
"@epam/ai-dial-ui-kit": "^0.
|
|
25
|
+
"@epam/ai-dial-chat-shared": "1.3.0-dev.96",
|
|
26
|
+
"@epam/ai-dial-react-file-manager": "^0.4.0-dev.7",
|
|
27
|
+
"@epam/ai-dial-ui-kit": "^0.16.0-dev.13",
|
|
28
28
|
"react": "^19.2.8"
|
|
29
29
|
},
|
|
30
30
|
"repository": {
|