@epam/ai-dial-conversation-input 1.1.0-dev.270 → 1.1.0-dev.277
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/ChatSettingsFields/ChatSettingsFields.d.ts.map +1 -1
- package/index.css +1 -1
- package/index.js +129 -128
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatSettingsFields.d.ts","sourceRoot":"","sources":["../../../src/components/ChatSettingsFields/ChatSettingsFields.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAGL,cAAc,EACf,MAAM,2BAA2B,CAAC;AAOnC,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGhC,sDAAsD;AACtD,MAAM,WAAW,uBAAuB;IACtC,2DAA2D;IAC3D,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,6EAA6E;IAC7E,cAAc,EAAE,cAAc,GAAG,SAAS,CAAC;IAC3C,mCAAmC;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,iCAAiC;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,+DAA+D;IAC/D,sBAAsB,EAAE,CAAC,CAAC,EAAE,cAAc,KAAK,IAAI,CAAC;IACpD,4DAA4D;IAC5D,oBAAoB,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,wDAAwD;IACxD,mBAAmB,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,4EAA4E;IAC5E,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,+GAA+G;IAC/G,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,qEAAqE;IACrE,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,yEAAyE;IACzE,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACtC,wEAAwE;IACxE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,uFAAuF;IACvF,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,oEAAoE;IACpE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kIAAkI;IAClI,iBAAiB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7C,qDAAqD;IACrD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,sFAAsF;IACtF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,uBAAuB;IACvB,MAAM,CAAC,EAAE,wBAAwB,CAAC;CACnC;AAED,2GAA2G;AAC3G,MAAM,WAAW,wBAAwB;IACvC,0DAA0D;IAC1D,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,2GAA2G;AAC3G,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,
|
|
1
|
+
{"version":3,"file":"ChatSettingsFields.d.ts","sourceRoot":"","sources":["../../../src/components/ChatSettingsFields/ChatSettingsFields.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAGL,cAAc,EACf,MAAM,2BAA2B,CAAC;AAOnC,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGhC,sDAAsD;AACtD,MAAM,WAAW,uBAAuB;IACtC,2DAA2D;IAC3D,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,6EAA6E;IAC7E,cAAc,EAAE,cAAc,GAAG,SAAS,CAAC;IAC3C,mCAAmC;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,iCAAiC;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,+DAA+D;IAC/D,sBAAsB,EAAE,CAAC,CAAC,EAAE,cAAc,KAAK,IAAI,CAAC;IACpD,4DAA4D;IAC5D,oBAAoB,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,wDAAwD;IACxD,mBAAmB,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,4EAA4E;IAC5E,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,+GAA+G;IAC/G,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,qEAAqE;IACrE,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,yEAAyE;IACzE,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACtC,wEAAwE;IACxE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,uFAAuF;IACvF,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,oEAAoE;IACpE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kIAAkI;IAClI,iBAAiB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7C,qDAAqD;IACrD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,sFAAsF;IACtF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,uBAAuB;IACvB,MAAM,CAAC,EAAE,wBAAwB,CAAC;CACnC;AAED,2GAA2G;AAC3G,MAAM,WAAW,wBAAwB;IACvC,0DAA0D;IAC1D,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,2GAA2G;AAC3G,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,CAsF1D,CAAC"}
|
package/index.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
@keyframes _slide-up_1d50f_1{0%{transform:translateY(100%)}to{transform:translateY(0)}}._backdrop_1d50f_9{background:var(--ci-backdrop,var(--bg-backdrop,#161b2d4d))}._sheet_1d50f_13{background:var(--ci-sheet-bg,var(--bg-layer-raised,#fcfcfc));animation:.3s cubic-bezier(.32,.72,0,1) _slide-up_1d50f_1}._title_1d50f_18{color:var(--ci-sheet-text,var(--text-primary,#161b2d))}._divider_1d50f_22{background:var(--ci-sheet-divider,var(--stroke-tertiary,#e0e6f0))}._item_1sr2n_1{color:var(--ci-sheet-text,var(--text-primary,#161b2d))}._item_1sr2n_1:hover{background:var(--ci-sheet-item-hover,var(--bg-layer-raised,#fcfcfc))}._item_1sr2n_1:active{background:var(--ci-sheet-item-active,var(--bg-control-neutral-active,#d1dbea))}._itemIcon_1sr2n_11{color:var(--ci-sheet-icon,var(--text-secondary,#57647a))}._label_14i7c_1{color:var(--csf-label-text,var(--text-primary,#161b2d))!important}._modal_kl0h0_1{background:var(--csm-bg,var(--bg-layer-raised,#fcfcfc))!important}._icon_1fv6z_1{color:var(--tbs-icon-text,var(--text-secondary,#57647a))}._selectedIcon_1fv6z_5{color:var(--tbs-selected-icon-text,var(--text-accent,#1d4ed8))}._selectedToolIcon_r268y_1{color:var(--aab-selected-tool-icon,var(--text-accent,#1d4ed8))}._toolIcon_r268y_5{color:var(--aab-tool-icon,var(--text-secondary,#57647a))}._chevronIcon_r268y_9{color:var(--aab-chevron-icon,var(--text-secondary,#57647a))}._chip_1gu87_1{background:var(--ci-chip-bg,var(--bg-layer-base,#f5f7fa));border-color:var(--ci-chip-border,var(--stroke-secondary,#d1dbea))}._chipIcon_1gu87_6{color:var(--ci-chip-icon,var(--text-secondary,#57647a))}._chipText_1gu87_10{color:var(--ci-chip-text,var(--text-primary,#161b2d))}._chipClose_1gu87_14{color:var(--ci-chip-close,var(--text-secondary,#57647a))}._chipClose_1gu87_14:hover,._chipClose_1gu87_14:focus-visible{color:var(--ci-chip-close-hover,var(--text-primary,#161b2d))}.
|
|
1
|
+
@keyframes _slide-up_1d50f_1{0%{transform:translateY(100%)}to{transform:translateY(0)}}._backdrop_1d50f_9{background:var(--ci-backdrop,var(--bg-backdrop,#161b2d4d))}._sheet_1d50f_13{background:var(--ci-sheet-bg,var(--bg-layer-raised,#fcfcfc));animation:.3s cubic-bezier(.32,.72,0,1) _slide-up_1d50f_1}._title_1d50f_18{color:var(--ci-sheet-text,var(--text-primary,#161b2d))}._divider_1d50f_22{background:var(--ci-sheet-divider,var(--stroke-tertiary,#e0e6f0))}._item_1sr2n_1{color:var(--ci-sheet-text,var(--text-primary,#161b2d))}._item_1sr2n_1:hover{background:var(--ci-sheet-item-hover,var(--bg-layer-raised,#fcfcfc))}._item_1sr2n_1:active{background:var(--ci-sheet-item-active,var(--bg-control-neutral-active,#d1dbea))}._itemIcon_1sr2n_11{color:var(--ci-sheet-icon,var(--text-secondary,#57647a))}._label_14i7c_1{color:var(--csf-label-text,var(--text-primary,#161b2d))!important}._modal_kl0h0_1{background:var(--csm-bg,var(--bg-layer-raised,#fcfcfc))!important}._icon_1fv6z_1{color:var(--tbs-icon-text,var(--text-secondary,#57647a))}._selectedIcon_1fv6z_5{color:var(--tbs-selected-icon-text,var(--text-accent,#1d4ed8))}._selectedToolIcon_r268y_1{color:var(--aab-selected-tool-icon,var(--text-accent,#1d4ed8))}._toolIcon_r268y_5{color:var(--aab-tool-icon,var(--text-secondary,#57647a))}._chevronIcon_r268y_9{color:var(--aab-chevron-icon,var(--text-secondary,#57647a))}._chip_1gu87_1{background:var(--ci-chip-bg,var(--bg-layer-base,#f5f7fa));border-color:var(--ci-chip-border,var(--stroke-secondary,#d1dbea))}._chipIcon_1gu87_6{color:var(--ci-chip-icon,var(--text-secondary,#57647a))}._chipText_1gu87_10{color:var(--ci-chip-text,var(--text-primary,#161b2d))}._chipClose_1gu87_14{color:var(--ci-chip-close,var(--text-secondary,#57647a))}._chipClose_1gu87_14:hover,._chipClose_1gu87_14:focus-visible{color:var(--ci-chip-close-hover,var(--text-primary,#161b2d))}._wrapper_10e5r_1{background:var(--ci-bg,var(--bg-control-neutral,#fcfcfc));border-color:var(--ci-border,var(--stroke-tertiary,#e0e6f0))}._wrapper_10e5r_1:focus-within,._wrapper_10e5r_1:active{outline-color:var(--ci-border-focus,var(--stroke-accent-focus,#6785fb))}._wrapper_10e5r_1._wrapperDisabled_10e5r_8{color:var(--ci-text-disabled,var(--text-control-disable-primary,#848e9c));cursor:not-allowed}._textarea_10e5r_13{color:var(--ci-text,var(--text-primary,#161b2d))}._textarea_10e5r_13::placeholder{color:var(--ci-placeholder,var(--text-secondary,#57647a))}._textarea_10e5r_13:disabled{color:var(--ci-text-disabled,var(--text-control-disable-primary,#848e9c));cursor:not-allowed}._modelSelectorButton_10e5r_24 ._modelSelectorCaret_10e5r_24{color:var(--ci-model-selector-caret-color,var(--text-primary,#161b2d))}._modelSelectorButton_10e5r_24:hover{background:var(--ci-model-selector-hover-bg,var(--bg-control-accent-alpha-hover,#2764d924))}._modelSelectorButton_10e5r_24:active{background:var(--ci-model-selector-hover-bg,var(--bg-control-accent-alpha-active,#2764d933))}._modelSelectorButton_10e5r_24._modelSelectorButtonDisabled_10e5r_33{opacity:.5}._modelSelectorButton_10e5r_24._modelSelectorButtonDisabled_10e5r_33 ._modelSelectorCaret_10e5r_24{color:var(--ci-model-selector-disabled-color,var(--text-control-disable-primary,#848e9c))}._wrapperError_129ri_1{border-color:var(--ci-voice-error,var(--stroke-error,#ae2f2f))}._waveformCanvas_129ri_5{color:var(--ci-voice-waveform,var(--text-primary,#161b2d))}@keyframes _recording-pulse_129ri_1{0%,to{opacity:1;transform:scale(1)}50%{opacity:.6;transform:scale(.8)}}._recordingDot_129ri_19{background:var(--ci-voice-accent,var(--text-error,#ae2f2f));animation:1.2s ease-in-out infinite _recording-pulse_129ri_1}._searchHeader_1tt5t_1{background:var(--ms-search-header-bg,var(--bg-layer-raised,#fcfcfc))}._selectedItem_1tt5t_5{background:var(--ms-selected-item-bg,var(--bg-control-accent-alpha-active,#2764d933))}._selectedItemCheck_1tt5t_9{color:var(--ms-selected-item-check,var(--text-accent,#1d4ed8))}._divider_1tiyp_1{background:var(--ci-sheet-divider,var(--stroke-secondary,#d1dbea))}._item_1tiyp_5{color:var(--ci-sheet-text,var(--text-primary,#161b2d))}._item_1tiyp_5:hover{background:var(--ci-sheet-item-hover,var(--bg-layer-raised,#fcfcfc))}._item_1tiyp_5:active{background:var(--ci-sheet-item-active,var(--bg-control-neutral-active,#d1dbea))}._itemIcon_1tiyp_15{color:var(--ci-sheet-icon,var(--text-secondary,#57647a))}._checkIcon_1tiyp_19{color:var(--ci-check-icon,var(--text-accent,#1d4ed8))}._stateLabel_1tiyp_23{color:var(--ci-sheet-text,var(--text-secondary,#57647a))}._welcome_n2ph8_1{color:var(--ci-welcome-color,var(--text-primary,#161b2d))}
|
|
2
2
|
/*$vite$:1*/
|
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AttachmentErrorReason as e, AttachmentType as t, DeploymentIcon as n, RequestStatus as r, ResponseFormat as i, buildCssVars as a, mergeClasses as o, useIsMobile as s } from "@epam/ai-dial-chat-shared";
|
|
2
|
-
import { BASE_ICON_SIZE as c, Button as l, CloseButton as u, DIAL_ICON_SIZE as d, DialDropdownIcon as f,
|
|
2
|
+
import { BASE_ICON_SIZE as c, Button as l, CloseButton as u, DIAL_ICON_SIZE as d, DialDropdownIcon as f, Dropdown as p, ElementSize as m, ErrorText as h, GhostIconButton as g, Highlight as _, NeutralButton as v, Popup as y, PopupSize as b, PrimaryButton as x, PrimaryIconButton as S, RadioGroup as C, RadioGroupOrientation as w, Search as T, Skeleton as E, SkeletonVariant as D, Slider as O, StaticIconButton as k, Textarea as A, Tooltip as j } from "@epam/ai-dial-ui-kit";
|
|
3
3
|
import { IconArrowLeft as ee, IconArrowNarrowRight as te, IconCheck as M, IconChevronDown as ne, IconChevronRight as N, IconFile as re, IconMicrophone as ie, IconPaperclip as ae, IconPlayerStopFilled as P, IconPlaystationSquare as F, IconPlus as oe, IconPrompt as se, IconSettings as ce, IconTool as le, IconX as I } from "@tabler/icons-react";
|
|
4
4
|
import { createPortal as ue } from "react-dom";
|
|
5
5
|
import { createElement as L, memo as R, useCallback as z, useEffect as B, useImperativeHandle as de, useLayoutEffect as fe, useMemo as V, useRef as H, useState as U } from "react";
|
|
@@ -24,13 +24,13 @@ var Se = (e, t) => {
|
|
|
24
24
|
"slide-up": "_slide-up_1d50f_1",
|
|
25
25
|
title: "_title_1d50f_18",
|
|
26
26
|
divider: "_divider_1d50f_22"
|
|
27
|
-
}, q = ({ isOpen: e, title: t, closeLabel: n, onClose: r, onBack: i, backLabel: s, "aria-label": c, style: l, titleClassName: f = "dial-body-semi-text", className: p, colors:
|
|
27
|
+
}, q = ({ isOpen: e, title: t, closeLabel: n, onClose: r, onBack: i, backLabel: s, "aria-label": c, style: l, titleClassName: f = "dial-body-semi-text", className: p, colors: h, children: _ }) => {
|
|
28
28
|
if (Se(e, r), !e || typeof document > "u") return null;
|
|
29
29
|
let v = a({
|
|
30
|
-
"--ci-backdrop":
|
|
31
|
-
"--ci-sheet-bg":
|
|
32
|
-
"--ci-sheet-text":
|
|
33
|
-
"--ci-sheet-divider":
|
|
30
|
+
"--ci-backdrop": h?.backdrop,
|
|
31
|
+
"--ci-sheet-bg": h?.sheetBg,
|
|
32
|
+
"--ci-sheet-text": h?.sheetText,
|
|
33
|
+
"--ci-sheet-divider": h?.divider
|
|
34
34
|
});
|
|
35
35
|
return ue(/* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G("div", {
|
|
36
36
|
className: o(Ce.backdrop, "fixed inset-0 z-[55]"),
|
|
@@ -51,7 +51,7 @@ var Se = (e, t) => {
|
|
|
51
51
|
children: [
|
|
52
52
|
i && /* @__PURE__ */ G("div", {
|
|
53
53
|
className: "absolute start-4",
|
|
54
|
-
children: /* @__PURE__ */ G(
|
|
54
|
+
children: /* @__PURE__ */ G(g, {
|
|
55
55
|
icon: /* @__PURE__ */ G(ee, {
|
|
56
56
|
size: d.LG,
|
|
57
57
|
stroke: 1.5,
|
|
@@ -70,13 +70,13 @@ var Se = (e, t) => {
|
|
|
70
70
|
children: /* @__PURE__ */ G(u, {
|
|
71
71
|
ariaLabel: n,
|
|
72
72
|
onClose: r,
|
|
73
|
-
size:
|
|
73
|
+
size: m.Standard
|
|
74
74
|
})
|
|
75
75
|
})
|
|
76
76
|
]
|
|
77
77
|
}), /* @__PURE__ */ G("div", { className: o(Ce.divider, "h-px flex-shrink-0") })] }), /* @__PURE__ */ G("div", {
|
|
78
78
|
className: "overflow-y-auto",
|
|
79
|
-
children:
|
|
79
|
+
children: _
|
|
80
80
|
})]
|
|
81
81
|
})] }), document.body);
|
|
82
82
|
}, we = async (e, t, n) => {
|
|
@@ -429,61 +429,62 @@ var Se = (e, t) => {
|
|
|
429
429
|
a
|
|
430
430
|
])
|
|
431
431
|
};
|
|
432
|
-
}, ze = { label: "_label_14i7c_1" }, Be = ({ features: e, responseFormat: t, systemPrompt: n, temperature: r, onResponseFormatChange: s, onSystemPromptChange: c, onTemperatureChange: l, responseFormatLabel: u = "Response format", responseFormatHint: d = "Applies to new and existing messages", responseFormatMarkdownLabel: f = "Markdown", responseFormatPlainTextLabel:
|
|
432
|
+
}, ze = { label: "_label_14i7c_1" }, Be = ({ features: e, responseFormat: t, systemPrompt: n, temperature: r, onResponseFormatChange: s, onSystemPromptChange: c, onTemperatureChange: l, responseFormatLabel: u = "Response format", responseFormatHint: d = "Applies to new and existing messages", responseFormatMarkdownLabel: f = "Markdown", responseFormatPlainTextLabel: p = "Plain text", systemPromptLabel: m = "System prompt", systemPromptTooltip: h = "Enter a prompt", temperatureLabel: g = "Temperature", temperatureLabels: _ = [
|
|
433
433
|
"Precise",
|
|
434
434
|
"Neutral",
|
|
435
435
|
"Creative"
|
|
436
|
-
], temperatureHint:
|
|
437
|
-
let
|
|
436
|
+
], temperatureHint: v, labelClassName: y = "!dial-small-semi-text", colors: b }) => {
|
|
437
|
+
let x = a({ "--csf-label-text": b?.labelText }), S = o(y, ze.label, "gap-1");
|
|
438
438
|
return /* @__PURE__ */ K("div", {
|
|
439
439
|
className: "flex flex-col gap-4 px-6 pb-3",
|
|
440
|
-
style:
|
|
440
|
+
style: x,
|
|
441
441
|
children: [
|
|
442
|
-
e.responseFormat && /* @__PURE__ */ G(
|
|
442
|
+
e.responseFormat && /* @__PURE__ */ G(C, {
|
|
443
443
|
id: "response-format",
|
|
444
444
|
labelProps: {
|
|
445
445
|
label: u,
|
|
446
|
-
className:
|
|
446
|
+
className: S,
|
|
447
447
|
caption: d
|
|
448
448
|
},
|
|
449
449
|
optionsClassName: "mb-2",
|
|
450
|
-
orientation:
|
|
450
|
+
orientation: w.Column,
|
|
451
451
|
value: t ?? i.Markdown,
|
|
452
452
|
items: [{
|
|
453
453
|
value: i.Markdown,
|
|
454
454
|
label: f
|
|
455
455
|
}, {
|
|
456
456
|
value: i.PlainText,
|
|
457
|
-
label:
|
|
457
|
+
label: p
|
|
458
458
|
}],
|
|
459
459
|
onChange: (e) => s(e)
|
|
460
460
|
}),
|
|
461
461
|
e.systemPrompt && /* @__PURE__ */ G(A, {
|
|
462
462
|
value: n,
|
|
463
|
-
placeholder:
|
|
463
|
+
placeholder: h,
|
|
464
464
|
resize: !0,
|
|
465
465
|
labelProps: {
|
|
466
|
-
className:
|
|
467
|
-
label:
|
|
466
|
+
className: S,
|
|
467
|
+
label: m
|
|
468
468
|
},
|
|
469
469
|
onChange: (e) => c(e ?? "")
|
|
470
470
|
}),
|
|
471
|
-
e.temperature && /* @__PURE__ */ G(
|
|
471
|
+
e.temperature && /* @__PURE__ */ G(O, {
|
|
472
472
|
labelProps: {
|
|
473
|
-
label:
|
|
474
|
-
className:
|
|
475
|
-
caption:
|
|
473
|
+
label: g,
|
|
474
|
+
className: S,
|
|
475
|
+
caption: v
|
|
476
476
|
},
|
|
477
477
|
value: r,
|
|
478
478
|
min: 0,
|
|
479
479
|
max: 1,
|
|
480
480
|
step: .1,
|
|
481
|
-
labels:
|
|
481
|
+
labels: _,
|
|
482
|
+
showValue: !0,
|
|
482
483
|
onChange: l
|
|
483
484
|
})
|
|
484
485
|
]
|
|
485
486
|
});
|
|
486
|
-
}, Ve = ({ isOpen: e, onBack: t, backLabel: n, onClose: r, closeLabel: i, style: a, features: s, initialResponseFormat: c, initialSystemPrompt: l, initialTemperature: u, onSave: d, title: f = "Chat settings", responseFormatLabel: p, responseFormatHint: m, responseFormatMarkdownLabel: h, responseFormatPlainTextLabel: g, systemPromptLabel: _, systemPromptTooltip: v, temperatureLabel: y, temperatureLabels: b, temperatureHint:
|
|
487
|
+
}, Ve = ({ isOpen: e, onBack: t, backLabel: n, onClose: r, closeLabel: i, style: a, features: s, initialResponseFormat: c, initialSystemPrompt: l, initialTemperature: u, onSave: d, title: f = "Chat settings", responseFormatLabel: p, responseFormatHint: m, responseFormatMarkdownLabel: h, responseFormatPlainTextLabel: g, systemPromptLabel: _, systemPromptTooltip: v, temperatureLabel: y, temperatureLabels: b, temperatureHint: S, saveLabel: C = "Apply changes", saveDisabledTooltip: w }) => {
|
|
487
488
|
let { responseFormat: T, systemPrompt: E, temperature: D, canSubmit: O, setResponseFormat: k, setSystemPrompt: A, setTemperature: ee, handleSubmit: te } = Re({
|
|
488
489
|
isOpen: e,
|
|
489
490
|
features: s,
|
|
@@ -517,14 +518,14 @@ var Se = (e, t) => {
|
|
|
517
518
|
systemPromptTooltip: v,
|
|
518
519
|
temperatureLabel: y,
|
|
519
520
|
temperatureLabels: b,
|
|
520
|
-
temperatureHint:
|
|
521
|
+
temperatureHint: S
|
|
521
522
|
}), /* @__PURE__ */ G("div", {
|
|
522
523
|
className: o("px-6 py-4 mobile:pb-8"),
|
|
523
524
|
children: /* @__PURE__ */ G(j, {
|
|
524
525
|
tooltip: w,
|
|
525
526
|
hideTooltip: O || !w,
|
|
526
527
|
triggerClassName: "w-full",
|
|
527
|
-
children: /* @__PURE__ */ G(
|
|
528
|
+
children: /* @__PURE__ */ G(x, {
|
|
528
529
|
label: C,
|
|
529
530
|
onClick: te,
|
|
530
531
|
disabled: !O,
|
|
@@ -533,7 +534,7 @@ var Se = (e, t) => {
|
|
|
533
534
|
})
|
|
534
535
|
})]
|
|
535
536
|
});
|
|
536
|
-
}, He = { modal: "_modal_kl0h0_1" }, Ue = ({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemperature: r, onSave: i, onClose: a, title: o = "Chat settings", titleClassName: s = "dial-h1-text", responseFormatLabel: c, responseFormatHint: l, responseFormatMarkdownLabel: u, responseFormatPlainTextLabel: d, systemPromptLabel: f, systemPromptTooltip: p, temperatureLabel: m, temperatureLabels: h, temperatureHint: g, saveLabel: _ = "Apply changes", saveDisabledTooltip: v, backgroundClassName:
|
|
537
|
+
}, He = { modal: "_modal_kl0h0_1" }, Ue = ({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemperature: r, onSave: i, onClose: a, title: o = "Chat settings", titleClassName: s = "dial-h1-text", responseFormatLabel: c, responseFormatHint: l, responseFormatMarkdownLabel: u, responseFormatPlainTextLabel: d, systemPromptLabel: f, systemPromptTooltip: p, temperatureLabel: m, temperatureLabels: h, temperatureHint: g, saveLabel: _ = "Apply changes", saveDisabledTooltip: v, backgroundClassName: S = He.modal }) => {
|
|
537
538
|
let { responseFormat: C, systemPrompt: w, temperature: T, canSubmit: E, setResponseFormat: D, setSystemPrompt: O, setTemperature: k, handleSubmit: A } = Re({
|
|
538
539
|
features: e,
|
|
539
540
|
initialResponseFormat: t,
|
|
@@ -542,19 +543,19 @@ var Se = (e, t) => {
|
|
|
542
543
|
onSave: i,
|
|
543
544
|
onClose: a
|
|
544
545
|
});
|
|
545
|
-
return /* @__PURE__ */ G(
|
|
546
|
+
return /* @__PURE__ */ G(y, {
|
|
546
547
|
open: !0,
|
|
547
548
|
header: o,
|
|
548
549
|
titleClassName: s,
|
|
549
|
-
size:
|
|
550
|
+
size: b.Sm,
|
|
550
551
|
onClose: a,
|
|
551
|
-
className:
|
|
552
|
+
className: S,
|
|
552
553
|
footer: /* @__PURE__ */ G("div", {
|
|
553
554
|
className: "flex justify-end px-6 py-4",
|
|
554
555
|
children: /* @__PURE__ */ G(j, {
|
|
555
556
|
tooltip: v,
|
|
556
557
|
hideTooltip: E || !v,
|
|
557
|
-
children: /* @__PURE__ */ G(
|
|
558
|
+
children: /* @__PURE__ */ G(x, {
|
|
558
559
|
label: _,
|
|
559
560
|
onClick: A,
|
|
560
561
|
disabled: !E
|
|
@@ -630,7 +631,7 @@ var We = {
|
|
|
630
631
|
selectedToolIcon: "_selectedToolIcon_r268y_1",
|
|
631
632
|
toolIcon: "_toolIcon_r268y_5",
|
|
632
633
|
chevronIcon: "_chevronIcon_r268y_9"
|
|
633
|
-
}, qe = ({ onAttachClick: e, attachLabel: t, addMenuTitle: n, menuTitle: r, menuCloseLabel: l, style: u, listClassName: f = "w-[240px]", isDisabled:
|
|
634
|
+
}, qe = ({ onAttachClick: e, attachLabel: t, addMenuTitle: n, menuTitle: r, menuCloseLabel: l, style: u, listClassName: f = "w-[240px]", isDisabled: h = !1, chatSettings: _, extraMenuItems: v, toolsMenuItems: y = [], onToolToggle: b, toolsMenuTitle: x = "Tools", toolsBackLabel: S = "Back", promptsMenuOverlay: C, promptsMenuTitle: w = "Prompts", promptsBackLabel: T = "Back", colors: E }) => {
|
|
634
635
|
let D = s(), [O, k] = U(!1), [A, j] = U(!1), [ee, te] = U(!1), [ne, re] = U(!1), [ie, P] = U(!1), F = V(() => a({
|
|
635
636
|
"--aab-selected-tool-icon": E?.selectedToolIcon,
|
|
636
637
|
"--aab-tool-icon": E?.toolIcon,
|
|
@@ -716,9 +717,9 @@ var We = {
|
|
|
716
717
|
renderSubMenu: () => C(() => P(!1))
|
|
717
718
|
}
|
|
718
719
|
}],
|
|
719
|
-
...
|
|
720
|
+
..._ == null ? [] : [{
|
|
720
721
|
key: "chat-settings",
|
|
721
|
-
label:
|
|
722
|
+
label: _.menuItemLabel ?? "Chat settings",
|
|
722
723
|
icon: /* @__PURE__ */ G(ce, {
|
|
723
724
|
size: c,
|
|
724
725
|
"aria-hidden": !0
|
|
@@ -735,7 +736,7 @@ var We = {
|
|
|
735
736
|
], [
|
|
736
737
|
t,
|
|
737
738
|
e,
|
|
738
|
-
|
|
739
|
+
_,
|
|
739
740
|
v,
|
|
740
741
|
D,
|
|
741
742
|
I,
|
|
@@ -746,33 +747,33 @@ var We = {
|
|
|
746
747
|
F
|
|
747
748
|
]);
|
|
748
749
|
if (L.length === 0) return null;
|
|
749
|
-
let R = /* @__PURE__ */ G(
|
|
750
|
+
let R = /* @__PURE__ */ G(p, {
|
|
750
751
|
matchReferenceWidth: !1,
|
|
751
752
|
placement: "bottom-start",
|
|
752
753
|
listClassName: f,
|
|
753
754
|
items: L,
|
|
754
755
|
open: C == null ? void 0 : ie,
|
|
755
756
|
onOpenChange: C == null ? void 0 : P,
|
|
756
|
-
children: /* @__PURE__ */ G(
|
|
757
|
+
children: /* @__PURE__ */ G(g, {
|
|
757
758
|
icon: /* @__PURE__ */ G(oe, {
|
|
758
759
|
size: d.LG,
|
|
759
760
|
"aria-hidden": !0
|
|
760
761
|
}),
|
|
761
762
|
"aria-label": n,
|
|
762
763
|
tooltipProps: { tooltip: n },
|
|
763
|
-
disabled:
|
|
764
|
+
disabled: h
|
|
764
765
|
})
|
|
765
766
|
});
|
|
766
767
|
return /* @__PURE__ */ G(W, { children: D ? /* @__PURE__ */ K(W, { children: [
|
|
767
|
-
/* @__PURE__ */ G(
|
|
768
|
+
/* @__PURE__ */ G(g, {
|
|
768
769
|
icon: /* @__PURE__ */ G(oe, {
|
|
769
770
|
size: d.LG,
|
|
770
771
|
"aria-hidden": !0
|
|
771
772
|
}),
|
|
772
773
|
"aria-label": n,
|
|
773
|
-
size:
|
|
774
|
+
size: m.Large,
|
|
774
775
|
tooltipProps: { tooltip: n },
|
|
775
|
-
disabled:
|
|
776
|
+
disabled: h,
|
|
776
777
|
onClick: () => k(!0)
|
|
777
778
|
}),
|
|
778
779
|
/* @__PURE__ */ G(Le, {
|
|
@@ -810,52 +811,52 @@ var We = {
|
|
|
810
811
|
style: u,
|
|
811
812
|
children: C(() => re(!1))
|
|
812
813
|
}),
|
|
813
|
-
|
|
814
|
+
_ != null && /* @__PURE__ */ G(Ve, {
|
|
814
815
|
isOpen: A,
|
|
815
816
|
onBack: () => {
|
|
816
817
|
j(!1), k(!0);
|
|
817
818
|
},
|
|
818
|
-
backLabel:
|
|
819
|
+
backLabel: _.backLabel ?? "Back",
|
|
819
820
|
onClose: () => j(!1),
|
|
820
821
|
closeLabel: l,
|
|
821
822
|
style: u,
|
|
822
|
-
features:
|
|
823
|
-
initialResponseFormat:
|
|
824
|
-
initialSystemPrompt:
|
|
825
|
-
initialTemperature:
|
|
826
|
-
onSave:
|
|
827
|
-
title:
|
|
828
|
-
responseFormatLabel:
|
|
829
|
-
responseFormatHint:
|
|
830
|
-
responseFormatMarkdownLabel:
|
|
831
|
-
responseFormatPlainTextLabel:
|
|
832
|
-
systemPromptLabel:
|
|
833
|
-
systemPromptTooltip:
|
|
834
|
-
temperatureLabel:
|
|
835
|
-
temperatureLabels:
|
|
836
|
-
temperatureHint:
|
|
837
|
-
saveLabel:
|
|
838
|
-
saveDisabledTooltip:
|
|
823
|
+
features: _.features,
|
|
824
|
+
initialResponseFormat: _.responseFormat ?? i.Markdown,
|
|
825
|
+
initialSystemPrompt: _.systemPrompt,
|
|
826
|
+
initialTemperature: _.temperature,
|
|
827
|
+
onSave: _.onSave,
|
|
828
|
+
title: _.title,
|
|
829
|
+
responseFormatLabel: _.responseFormatLabel,
|
|
830
|
+
responseFormatHint: _.responseFormatHint,
|
|
831
|
+
responseFormatMarkdownLabel: _.responseFormatMarkdownLabel,
|
|
832
|
+
responseFormatPlainTextLabel: _.responseFormatPlainTextLabel,
|
|
833
|
+
systemPromptLabel: _.systemPromptLabel,
|
|
834
|
+
systemPromptTooltip: _.systemPromptTooltip,
|
|
835
|
+
temperatureLabel: _.temperatureLabel,
|
|
836
|
+
temperatureLabels: _.temperatureLabels,
|
|
837
|
+
temperatureHint: _.temperatureHint,
|
|
838
|
+
saveLabel: _.saveLabel,
|
|
839
|
+
saveDisabledTooltip: _.saveDisabledTooltip
|
|
839
840
|
})
|
|
840
|
-
] }) : /* @__PURE__ */ K(W, { children: [R,
|
|
841
|
-
features:
|
|
842
|
-
initialResponseFormat:
|
|
843
|
-
initialSystemPrompt:
|
|
844
|
-
initialTemperature:
|
|
845
|
-
onSave:
|
|
841
|
+
] }) : /* @__PURE__ */ K(W, { children: [R, _ != null && A && /* @__PURE__ */ G(Ue, {
|
|
842
|
+
features: _.features,
|
|
843
|
+
initialResponseFormat: _.responseFormat ?? i.Markdown,
|
|
844
|
+
initialSystemPrompt: _.systemPrompt,
|
|
845
|
+
initialTemperature: _.temperature,
|
|
846
|
+
onSave: _.onSave,
|
|
846
847
|
onClose: () => j(!1),
|
|
847
|
-
title:
|
|
848
|
-
responseFormatLabel:
|
|
849
|
-
responseFormatHint:
|
|
850
|
-
responseFormatMarkdownLabel:
|
|
851
|
-
responseFormatPlainTextLabel:
|
|
852
|
-
systemPromptLabel:
|
|
853
|
-
systemPromptTooltip:
|
|
854
|
-
temperatureLabel:
|
|
855
|
-
temperatureLabels:
|
|
856
|
-
temperatureHint:
|
|
857
|
-
saveLabel:
|
|
858
|
-
saveDisabledTooltip:
|
|
848
|
+
title: _.title,
|
|
849
|
+
responseFormatLabel: _.responseFormatLabel,
|
|
850
|
+
responseFormatHint: _.responseFormatHint,
|
|
851
|
+
responseFormatMarkdownLabel: _.responseFormatMarkdownLabel,
|
|
852
|
+
responseFormatPlainTextLabel: _.responseFormatPlainTextLabel,
|
|
853
|
+
systemPromptLabel: _.systemPromptLabel,
|
|
854
|
+
systemPromptTooltip: _.systemPromptTooltip,
|
|
855
|
+
temperatureLabel: _.temperatureLabel,
|
|
856
|
+
temperatureLabels: _.temperatureLabels,
|
|
857
|
+
temperatureHint: _.temperatureHint,
|
|
858
|
+
saveLabel: _.saveLabel,
|
|
859
|
+
saveDisabledTooltip: _.saveDisabledTooltip
|
|
859
860
|
})] }) });
|
|
860
861
|
}, J = {
|
|
861
862
|
chip: "_chip_1gu87_1",
|
|
@@ -923,19 +924,19 @@ var We = {
|
|
|
923
924
|
}, e.id))
|
|
924
925
|
});
|
|
925
926
|
}, Y = {
|
|
926
|
-
wrapper: "
|
|
927
|
-
wrapperDisabled: "
|
|
928
|
-
textarea: "
|
|
929
|
-
modelSelectorButton: "
|
|
930
|
-
modelSelectorCaret: "
|
|
931
|
-
modelSelectorButtonDisabled: "
|
|
927
|
+
wrapper: "_wrapper_10e5r_1",
|
|
928
|
+
wrapperDisabled: "_wrapperDisabled_10e5r_8",
|
|
929
|
+
textarea: "_textarea_10e5r_13",
|
|
930
|
+
modelSelectorButton: "_modelSelectorButton_10e5r_24",
|
|
931
|
+
modelSelectorCaret: "_modelSelectorCaret_10e5r_24",
|
|
932
|
+
modelSelectorButtonDisabled: "_modelSelectorButtonDisabled_10e5r_33"
|
|
932
933
|
}, X = {
|
|
933
934
|
wrapperError: "_wrapperError_129ri_1",
|
|
934
935
|
waveformCanvas: "_waveformCanvas_129ri_5",
|
|
935
936
|
recordingDot: "_recordingDot_129ri_19",
|
|
936
937
|
"recording-pulse": "_recording-pulse_129ri_1"
|
|
937
938
|
}, Ze = 3, Qe = 4, $e = 200, et = ({ state: e, analyserNodeRef: t, errorMessage: n, onStop: r, onDiscard: i, stopLabel: a = "Stop recording", discardLabel: s = "Discard recording", style: c, className: l }) => {
|
|
938
|
-
let u = H(null), f = H(new Float32Array($e)), p = H(0), m = H(0),
|
|
939
|
+
let u = H(null), f = H(new Float32Array($e)), p = H(0), m = H(0), _ = e === je.Recording, v = e === je.Error, y = z((e) => {
|
|
939
940
|
let t = e.getContext("2d");
|
|
940
941
|
if (!t) return;
|
|
941
942
|
e.width = e.clientWidth || 200, e.height = e.clientHeight || 32;
|
|
@@ -950,7 +951,7 @@ var We = {
|
|
|
950
951
|
t.restore();
|
|
951
952
|
}, []);
|
|
952
953
|
B(() => {
|
|
953
|
-
if (!
|
|
954
|
+
if (!_) return;
|
|
954
955
|
let e = u.current;
|
|
955
956
|
if (!e) return;
|
|
956
957
|
f.current.fill(0), p.current = 0, m.current = 0;
|
|
@@ -975,7 +976,7 @@ var We = {
|
|
|
975
976
|
cancelAnimationFrame(n);
|
|
976
977
|
};
|
|
977
978
|
}, [
|
|
978
|
-
|
|
979
|
+
_,
|
|
979
980
|
t,
|
|
980
981
|
y
|
|
981
982
|
]), B(() => {
|
|
@@ -988,14 +989,14 @@ var We = {
|
|
|
988
989
|
}, [y]);
|
|
989
990
|
let b = /* @__PURE__ */ K("div", {
|
|
990
991
|
className: "flex flex-shrink-0 items-center justify-end gap-1",
|
|
991
|
-
children: [/* @__PURE__ */ G(
|
|
992
|
+
children: [/* @__PURE__ */ G(g, {
|
|
992
993
|
icon: /* @__PURE__ */ G(I, {
|
|
993
994
|
size: d.LG,
|
|
994
995
|
"aria-hidden": !0
|
|
995
996
|
}),
|
|
996
997
|
"aria-label": s,
|
|
997
998
|
onClick: i
|
|
998
|
-
}),
|
|
999
|
+
}), _ && /* @__PURE__ */ G(S, {
|
|
999
1000
|
icon: /* @__PURE__ */ G(P, {
|
|
1000
1001
|
size: d.LG,
|
|
1001
1002
|
"aria-hidden": !0
|
|
@@ -1011,7 +1012,7 @@ var We = {
|
|
|
1011
1012
|
className: o(Y.wrapper, "flex min-h-[64px] w-full max-w-[748px] flex-col justify-center gap-3 rounded-xl border px-3 shadow-md desktop:flex-row desktop:items-center desktop:gap-2 desktop:py-2", v && X.wrapperError),
|
|
1012
1013
|
children: [/* @__PURE__ */ K("div", {
|
|
1013
1014
|
className: "flex min-w-0 flex-1 items-center gap-3",
|
|
1014
|
-
children: [
|
|
1015
|
+
children: [_ && /* @__PURE__ */ G("span", {
|
|
1015
1016
|
className: o(X.recordingDot, "pointer-events-none block size-[8px] rounded-3xl"),
|
|
1016
1017
|
"aria-hidden": !0
|
|
1017
1018
|
}), /* @__PURE__ */ G("canvas", {
|
|
@@ -1020,12 +1021,12 @@ var We = {
|
|
|
1020
1021
|
className: o(X.waveformCanvas, "h-8 min-w-0 flex-1 desktop:h-6")
|
|
1021
1022
|
})]
|
|
1022
1023
|
}), b]
|
|
1023
|
-
}), v && n && /* @__PURE__ */ G(
|
|
1024
|
+
}), v && n && /* @__PURE__ */ G(h, {
|
|
1024
1025
|
text: n,
|
|
1025
1026
|
className: "mt-1 px-1"
|
|
1026
1027
|
})]
|
|
1027
1028
|
});
|
|
1028
|
-
}, tt = ({ onSend: e, isDisabled: t = !1, ariaLabel: n = "Send message", isExiting: r = !1 }) => /* @__PURE__ */ G(
|
|
1029
|
+
}, tt = ({ onSend: e, isDisabled: t = !1, ariaLabel: n = "Send message", isExiting: r = !1 }) => /* @__PURE__ */ G(S, {
|
|
1029
1030
|
"aria-label": n,
|
|
1030
1031
|
onClick: () => e?.(),
|
|
1031
1032
|
disabled: t,
|
|
@@ -1038,15 +1039,15 @@ var We = {
|
|
|
1038
1039
|
icon: /* @__PURE__ */ G(F, { size: d.LG }),
|
|
1039
1040
|
onClick: () => e?.(),
|
|
1040
1041
|
"aria-label": t
|
|
1041
|
-
}), Z = ({ size: e = 20 }) => /* @__PURE__ */ G(
|
|
1042
|
-
variant:
|
|
1042
|
+
}), Z = ({ size: e = 20 }) => /* @__PURE__ */ G(E, {
|
|
1043
|
+
variant: D.Circular,
|
|
1043
1044
|
width: e,
|
|
1044
1045
|
height: e,
|
|
1045
1046
|
active: !0
|
|
1046
1047
|
}), rt = ({ loadingLabel: e }) => /* @__PURE__ */ K("span", {
|
|
1047
1048
|
className: "flex min-w-0 flex-1 items-center",
|
|
1048
|
-
children: [/* @__PURE__ */ G(
|
|
1049
|
-
variant:
|
|
1049
|
+
children: [/* @__PURE__ */ G(E, {
|
|
1050
|
+
variant: D.Text,
|
|
1050
1051
|
width: "100%",
|
|
1051
1052
|
height: 16,
|
|
1052
1053
|
active: !0
|
|
@@ -1075,18 +1076,18 @@ var We = {
|
|
|
1075
1076
|
selectedItem: "_selectedItem_1tt5t_5",
|
|
1076
1077
|
selectedItemCheck: "_selectedItemCheck_1tt5t_9"
|
|
1077
1078
|
}, lt = ({ deployments: e, selectedDeploymentId: t, onDeploymentChange: n, modelSelectorLabels: r, searchHeaderClassName: i = ct.searchHeader, selectedItemClassName: s = ct.selectedItem, selectedItemCheckClassName: c = ct.selectedItemCheck, colors: l }) => {
|
|
1078
|
-
let [u, f] = U(""), p = V(() => e?.find((e) => e.id === t), [e, t]),
|
|
1079
|
-
|
|
1079
|
+
let [u, f] = U(""), p = V(() => e?.find((e) => e.id === t), [e, t]), h = r?.loading !== void 0, g = !h && !p && !!t, v = V(() => h ? /* @__PURE__ */ G(Z, { size: d.LG }) : st(p?.iconUrl, p?.type, p?.displayName ?? p?.id ?? "", d.LG, g ? r?.unavailableTooltip ?? "This deployment is no longer available" : void 0), [
|
|
1080
|
+
h,
|
|
1080
1081
|
p,
|
|
1081
1082
|
g,
|
|
1082
1083
|
r?.unavailableTooltip
|
|
1083
1084
|
]), y = p?.displayName ?? p?.id;
|
|
1084
1085
|
return {
|
|
1085
|
-
selectorIcon:
|
|
1086
|
+
selectorIcon: v,
|
|
1086
1087
|
selectorAriaLabel: y ? `${r?.ariaLabel ?? "Select model"}: ${y}` : r?.ariaLabel ?? "Select model",
|
|
1087
1088
|
selectedLabel: y,
|
|
1088
1089
|
menuItems: V(() => {
|
|
1089
|
-
if (
|
|
1090
|
+
if (h) return Array.from({ length: 7 }, (e, t) => ({
|
|
1090
1091
|
key: `__loading-${t}`,
|
|
1091
1092
|
icon: /* @__PURE__ */ G(Z, {}),
|
|
1092
1093
|
label: /* @__PURE__ */ G(rt, { loadingLabel: t === 0 ? r?.loading : void 0 }),
|
|
@@ -1107,7 +1108,7 @@ var We = {
|
|
|
1107
1108
|
label: /* @__PURE__ */ K("span", {
|
|
1108
1109
|
className: "flex w-full items-center justify-between gap-2",
|
|
1109
1110
|
style: a({ "--ms-selected-item-check": l?.selectedItemCheck }),
|
|
1110
|
-
children: [/* @__PURE__ */ G(
|
|
1111
|
+
children: [/* @__PURE__ */ G(_, {
|
|
1111
1112
|
text: at(e),
|
|
1112
1113
|
query: u,
|
|
1113
1114
|
maxLines: 1
|
|
@@ -1125,7 +1126,7 @@ var We = {
|
|
|
1125
1126
|
});
|
|
1126
1127
|
}, [
|
|
1127
1128
|
e,
|
|
1128
|
-
|
|
1129
|
+
h,
|
|
1129
1130
|
u,
|
|
1130
1131
|
t,
|
|
1131
1132
|
r,
|
|
@@ -1134,19 +1135,19 @@ var We = {
|
|
|
1134
1135
|
c,
|
|
1135
1136
|
l?.selectedItemCheck
|
|
1136
1137
|
]),
|
|
1137
|
-
menuHeader: V(() => !
|
|
1138
|
+
menuHeader: V(() => !h && e && e.length > 0 ? /* @__PURE__ */ G("div", {
|
|
1138
1139
|
style: a({ "--ms-search-header-bg": l?.searchHeaderBackground }),
|
|
1139
1140
|
className: o("sticky top-0 z-10 pb-1 pe-2 pt-2", i),
|
|
1140
|
-
children: /* @__PURE__ */ G(
|
|
1141
|
+
children: /* @__PURE__ */ G(T, {
|
|
1141
1142
|
value: u,
|
|
1142
1143
|
placeholder: r?.searchPlaceholder ?? "Search",
|
|
1143
|
-
size:
|
|
1144
|
+
size: m.Small,
|
|
1144
1145
|
wrapperClassName: "border-0",
|
|
1145
1146
|
onChange: (e) => f(e ?? "")
|
|
1146
1147
|
})
|
|
1147
1148
|
}) : void 0, [
|
|
1148
1149
|
e,
|
|
1149
|
-
|
|
1150
|
+
h,
|
|
1150
1151
|
u,
|
|
1151
1152
|
r,
|
|
1152
1153
|
i,
|
|
@@ -1619,7 +1620,7 @@ var kt = {
|
|
|
1619
1620
|
}),
|
|
1620
1621
|
label: /* @__PURE__ */ K("span", {
|
|
1621
1622
|
className: "flex flex-1 items-center justify-between gap-2",
|
|
1622
|
-
children: [/* @__PURE__ */ G(
|
|
1623
|
+
children: [/* @__PURE__ */ G(_, {
|
|
1623
1624
|
text: u.displayName ?? u.id,
|
|
1624
1625
|
query: s,
|
|
1625
1626
|
maxLines: 1,
|
|
@@ -1633,14 +1634,14 @@ var kt = {
|
|
|
1633
1634
|
onClick: () => c(u.id)
|
|
1634
1635
|
})
|
|
1635
1636
|
});
|
|
1636
|
-
}, Nt = ({ isOpen: e, title: t, closeLabel: n, searchPlaceholder: r = "Search", onClose: i, deployments: s, selectedDeploymentId: c, onSelect: l, loadingLabel: u, errorLabel: d, emptyLabel: f, style: p, titleClassName:
|
|
1637
|
+
}, Nt = ({ isOpen: e, title: t, closeLabel: n, searchPlaceholder: r = "Search", onClose: i, deployments: s, selectedDeploymentId: c, onSelect: l, loadingLabel: u, errorLabel: d, emptyLabel: f, style: p, titleClassName: h = "dial-body-semi-text", labelClassName: g = "dial-small-text", colors: _ }) => {
|
|
1637
1638
|
let [v, y] = U("");
|
|
1638
1639
|
B(() => {
|
|
1639
1640
|
e || y("");
|
|
1640
1641
|
}, [e]);
|
|
1641
1642
|
let b = s && s.length > 0, x = u !== void 0, S = !b && !x ? d ?? f : void 0, C = b ? ot(s, v) : [], w = (e) => {
|
|
1642
1643
|
l(e), i();
|
|
1643
|
-
},
|
|
1644
|
+
}, E = a({
|
|
1644
1645
|
"--ci-sheet-divider": _?.divider,
|
|
1645
1646
|
"--ci-sheet-text": _?.itemText,
|
|
1646
1647
|
"--ci-sheet-item-hover": _?.itemHoverBg,
|
|
@@ -1654,18 +1655,18 @@ var kt = {
|
|
|
1654
1655
|
closeLabel: n,
|
|
1655
1656
|
onClose: i,
|
|
1656
1657
|
style: p,
|
|
1657
|
-
titleClassName:
|
|
1658
|
+
titleClassName: h,
|
|
1658
1659
|
className: "max-h-[80dvh]",
|
|
1659
1660
|
colors: _?.shell,
|
|
1660
1661
|
children: /* @__PURE__ */ K("div", {
|
|
1661
1662
|
className: "contents",
|
|
1662
|
-
style:
|
|
1663
|
+
style: E,
|
|
1663
1664
|
children: [b && !x && /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G("div", {
|
|
1664
1665
|
className: "flex-shrink-0 px-4 py-[10px]",
|
|
1665
|
-
children: /* @__PURE__ */ G(
|
|
1666
|
+
children: /* @__PURE__ */ G(T, {
|
|
1666
1667
|
value: v,
|
|
1667
1668
|
placeholder: r,
|
|
1668
|
-
size:
|
|
1669
|
+
size: m.Standard,
|
|
1669
1670
|
onChange: (e) => y(e ?? "")
|
|
1670
1671
|
})
|
|
1671
1672
|
}), /* @__PURE__ */ G("div", { className: o(kt.divider, "h-px flex-shrink-0") })] }), x ? /* @__PURE__ */ G(it, { loadingLabel: u }) : S ? /* @__PURE__ */ G("div", {
|
|
@@ -1689,7 +1690,7 @@ var kt = {
|
|
|
1689
1690
|
})]
|
|
1690
1691
|
})
|
|
1691
1692
|
});
|
|
1692
|
-
}, Pt = ({ deployments: e, selectedDeploymentId: t, onDeploymentChange: n, modelSelectorLabels: r, isStreaming: i, isMobile: a, isDisabled: s = !1, style: c, modelPickerOverlay: l, isPickerOpen: u, onPickerToggle:
|
|
1693
|
+
}, Pt = ({ deployments: e, selectedDeploymentId: t, onDeploymentChange: n, modelSelectorLabels: r, isStreaming: i, isMobile: a, isDisabled: s = !1, style: c, modelPickerOverlay: l, isPickerOpen: u, onPickerToggle: h, onPickerOpenChange: _ }) => {
|
|
1693
1694
|
let [v, y] = U(!1), { selectorIcon: b, selectorAriaLabel: x, selectedLabel: S, menuItems: C, menuHeader: w, onOpenChange: T } = lt({
|
|
1694
1695
|
deployments: e,
|
|
1695
1696
|
selectedDeploymentId: t,
|
|
@@ -1704,7 +1705,7 @@ var kt = {
|
|
|
1704
1705
|
});
|
|
1705
1706
|
return a ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(j, {
|
|
1706
1707
|
tooltip: S,
|
|
1707
|
-
children: /* @__PURE__ */ G(
|
|
1708
|
+
children: /* @__PURE__ */ G(g, {
|
|
1708
1709
|
icon: /* @__PURE__ */ K("div", {
|
|
1709
1710
|
className: "flex items-center gap-1",
|
|
1710
1711
|
children: [b, D]
|
|
@@ -1735,14 +1736,14 @@ var kt = {
|
|
|
1735
1736
|
errorLabel: r?.error,
|
|
1736
1737
|
emptyLabel: r?.empty,
|
|
1737
1738
|
style: c
|
|
1738
|
-
})] }) : l ? /* @__PURE__ */ G(
|
|
1739
|
+
})] }) : l ? /* @__PURE__ */ G(p, {
|
|
1739
1740
|
placement: "top-end",
|
|
1740
1741
|
matchReferenceWidth: !1,
|
|
1741
1742
|
open: u,
|
|
1742
|
-
onOpenChange:
|
|
1743
|
+
onOpenChange: _,
|
|
1743
1744
|
trigger: [],
|
|
1744
1745
|
outsideClosable: !0,
|
|
1745
|
-
renderOverlay: () => l(() =>
|
|
1746
|
+
renderOverlay: () => l(() => _?.(!1)),
|
|
1746
1747
|
listClassName: "!w-[368px] !bg-layer-raised",
|
|
1747
1748
|
children: /* @__PURE__ */ G(j, {
|
|
1748
1749
|
tooltip: S,
|
|
@@ -1752,7 +1753,7 @@ var kt = {
|
|
|
1752
1753
|
"aria-disabled": s || void 0,
|
|
1753
1754
|
className: o("flex items-center justify-center gap-1 rounded-full p-2", Y.modelSelectorButton, E, s && Y.modelSelectorButtonDisabled),
|
|
1754
1755
|
onClick: () => {
|
|
1755
|
-
!i && !s &&
|
|
1756
|
+
!i && !s && h?.();
|
|
1756
1757
|
},
|
|
1757
1758
|
children: [b, D]
|
|
1758
1759
|
})
|
|
@@ -1771,7 +1772,7 @@ var kt = {
|
|
|
1771
1772
|
matchReferenceWidth: !1,
|
|
1772
1773
|
listClassName: "!w-[240px] !max-h-80",
|
|
1773
1774
|
onOpenChange: s ? void 0 : T,
|
|
1774
|
-
size:
|
|
1775
|
+
size: m.Standard,
|
|
1775
1776
|
caretIcon: D,
|
|
1776
1777
|
iconClassName: s ? E : void 0,
|
|
1777
1778
|
buttonClassName: o("bg-transparent", Y.modelSelectorButton, s && Y.modelSelectorButtonDisabled)
|
|
@@ -2022,11 +2023,11 @@ var kt = {
|
|
|
2022
2023
|
})
|
|
2023
2024
|
})]
|
|
2024
2025
|
});
|
|
2025
|
-
}, zt = ({ message: e, initialAttachments: t = [], onCancel: n, onSave: i, onUploadAttachment: a, cancelLabel: s = "Cancel", saveLabel: l = "Save & Submit", ariaLabel: u, removeLabel: d, retryLabel: f, addMenuTitle: p = "Add", attachLabel: m = "Attach file", menuTitle: h = "Menu", menuCloseLabel: g = "Close", className: _, pendingDropFiles:
|
|
2026
|
+
}, zt = ({ message: e, initialAttachments: t = [], onCancel: n, onSave: i, onUploadAttachment: a, cancelLabel: s = "Cancel", saveLabel: l = "Save & Submit", ariaLabel: u, removeLabel: d, retryLabel: f, addMenuTitle: p = "Add", attachLabel: m = "Attach file", menuTitle: h = "Menu", menuCloseLabel: g = "Close", className: _, pendingDropFiles: y, onDropFilesConsumed: b, validateAttachment: S, isAttachmentsEnabled: C, hideAttachFile: w = !1, fileAccept: T, maximumAttachmentsAmount: E, onAttachmentsLimitExceeded: D, onDialFileSystemClick: O, dialFileSystemLabel: k, pendingAttachments: A, onPendingAttachmentsConsumed: j, onAttachmentClick: ee, pasteTextThreshold: te, maxMessageLength: M = 5e4, onMessageTooLong: ne }) => {
|
|
2026
2027
|
let N = H(null), [ie, ae] = U([]);
|
|
2027
2028
|
B(() => {
|
|
2028
|
-
|
|
2029
|
-
}, [
|
|
2029
|
+
y?.length && (ae(y), b?.());
|
|
2030
|
+
}, [y, b]);
|
|
2030
2031
|
let [P, F] = U(e ?? ""), [oe, se] = U([]), [ce, le] = U(t), I = oe.some((e) => e.status === r.Loading || e.status === r.Error), ue = (P.trim().length > 0 || oe.length > 0 || ce.length > 0) && !I, L = (e) => {
|
|
2031
2032
|
le((t) => t.filter((t) => t.id !== e));
|
|
2032
2033
|
}, R = z((e, t) => {
|
|
@@ -2069,7 +2070,7 @@ var kt = {
|
|
|
2069
2070
|
className: "max-w-full",
|
|
2070
2071
|
prefixAttachments: ce,
|
|
2071
2072
|
onRemovePrefixAttachment: L,
|
|
2072
|
-
validateAttachment:
|
|
2073
|
+
validateAttachment: S,
|
|
2073
2074
|
isAttachmentsEnabled: C,
|
|
2074
2075
|
maximumAttachmentsAmount: E,
|
|
2075
2076
|
onAttachmentsLimitExceeded: D,
|
|
@@ -2102,10 +2103,10 @@ var kt = {
|
|
|
2102
2103
|
})] })
|
|
2103
2104
|
}), /* @__PURE__ */ K("div", {
|
|
2104
2105
|
className: "flex gap-2",
|
|
2105
|
-
children: [/* @__PURE__ */ G(
|
|
2106
|
+
children: [/* @__PURE__ */ G(v, {
|
|
2106
2107
|
label: s,
|
|
2107
2108
|
onClick: n
|
|
2108
|
-
}), /* @__PURE__ */ G(
|
|
2109
|
+
}), /* @__PURE__ */ G(x, {
|
|
2109
2110
|
label: l,
|
|
2110
2111
|
onClick: de,
|
|
2111
2112
|
disabled: !ue
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epam/ai-dial-conversation-input",
|
|
3
3
|
"description": "Conversation message input with model selection, attachments, voice input, and edit mode",
|
|
4
|
-
"version": "1.1.0-dev.
|
|
4
|
+
"version": "1.1.0-dev.277",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./index.js",
|
|
@@ -17,12 +17,12 @@
|
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
|
-
"@epam/ai-dial-attachment-input": "1.1.0-dev.
|
|
21
|
-
"@epam/ai-dial-chat-shared": "1.1.0-dev.
|
|
20
|
+
"@epam/ai-dial-attachment-input": "1.1.0-dev.277",
|
|
21
|
+
"@epam/ai-dial-chat-shared": "1.1.0-dev.277",
|
|
22
22
|
"@tabler/icons-react": "^3.44.0",
|
|
23
23
|
"react": "^19.0.0",
|
|
24
24
|
"react-dom": "^19.2.6",
|
|
25
|
-
"@epam/ai-dial-ui-kit": "^0.14.0-dev.
|
|
25
|
+
"@epam/ai-dial-ui-kit": "^0.14.0-dev.9"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"react-window": "^2.2.7"
|