@epam/ai-dial-conversation-input 1.1.0-dev.30 → 1.1.0-dev.307
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/AddAttachmentButton/AddAttachmentButton.d.ts +35 -1
- package/components/AddAttachmentButton/AddAttachmentButton.d.ts.map +1 -1
- package/components/BottomSheet/BottomSheet.d.ts +18 -5
- package/components/BottomSheet/BottomSheet.d.ts.map +1 -1
- package/components/BottomSheetShell/BottomSheetShell.d.ts +17 -14
- package/components/BottomSheetShell/BottomSheetShell.d.ts.map +1 -1
- package/components/ChatSettingsBottomSheet/ChatSettingsBottomSheet.d.ts +1 -4
- package/components/ChatSettingsBottomSheet/ChatSettingsBottomSheet.d.ts.map +1 -1
- package/components/ChatSettingsFields/ChatSettingsFields.d.ts +9 -0
- package/components/ChatSettingsFields/ChatSettingsFields.d.ts.map +1 -1
- package/components/ChatSettingsModal/ChatSettingsModal.d.ts +10 -0
- package/components/ChatSettingsModal/ChatSettingsModal.d.ts.map +1 -1
- package/components/ConversationInput/ConversationInput.d.ts +1 -0
- package/components/ConversationInput/ConversationInput.d.ts.map +1 -1
- package/components/EditMessageInput/EditMessageInput.d.ts +1 -0
- package/components/EditMessageInput/EditMessageInput.d.ts.map +1 -1
- package/components/Input/Buttons/SendButton.d.ts +1 -2
- package/components/Input/Buttons/SendButton.d.ts.map +1 -1
- package/components/Input/Buttons/StopButton.d.ts +1 -0
- package/components/Input/Buttons/StopButton.d.ts.map +1 -1
- package/components/Input/Input.d.ts +1 -0
- package/components/Input/Input.d.ts.map +1 -1
- package/components/Input/ModelSelectorControl.d.ts +14 -14
- package/components/Input/ModelSelectorControl.d.ts.map +1 -1
- package/components/ModelSelectorBottomSheet/ModelSelectorBottomSheet.d.ts +22 -6
- package/components/ModelSelectorBottomSheet/ModelSelectorBottomSheet.d.ts.map +1 -1
- package/components/ModelSelectorSkeleton/ModelSelectorSkeleton.d.ts +4 -0
- package/components/ModelSelectorSkeleton/ModelSelectorSkeleton.d.ts.map +1 -1
- package/components/ToolsBottomSheet/ToolsBottomSheet.d.ts +40 -0
- package/components/ToolsBottomSheet/ToolsBottomSheet.d.ts.map +1 -0
- package/components/ToolsChips/ToolsChips.d.ts +54 -0
- package/components/ToolsChips/ToolsChips.d.ts.map +1 -0
- package/components/VoiceBar/VoiceBar.d.ts +1 -9
- package/components/VoiceBar/VoiceBar.d.ts.map +1 -1
- package/hooks/useAttachments.d.ts +1 -5
- package/hooks/useAttachments.d.ts.map +1 -1
- package/hooks/useBottomSheet.d.ts +1 -4
- package/hooks/useBottomSheet.d.ts.map +1 -1
- package/hooks/useDelayedUnmount.d.ts +3 -12
- package/hooks/useDelayedUnmount.d.ts.map +1 -1
- package/hooks/useInputHistoryNavigation.d.ts +1 -12
- package/hooks/useInputHistoryNavigation.d.ts.map +1 -1
- package/hooks/useMessageState.d.ts +1 -4
- package/hooks/useMessageState.d.ts.map +1 -1
- package/hooks/useModelSelector.d.ts +21 -2
- package/hooks/useModelSelector.d.ts.map +1 -1
- package/hooks/useVoiceRecorder.d.ts +1 -9
- package/hooks/useVoiceRecorder.d.ts.map +1 -1
- package/index.css +1 -1
- package/index.d.ts +1 -3
- package/index.d.ts.map +1 -1
- package/index.js +1226 -961
- package/models/ConversationInput.d.ts +77 -23
- package/models/ConversationInput.d.ts.map +1 -1
- package/models/Input.d.ts +73 -23
- package/models/Input.d.ts.map +1 -1
- package/package.json +4 -5
- package/utils/concurrency.d.ts +2 -13
- package/utils/concurrency.d.ts.map +1 -1
- package/utils/deployment.d.ts +1 -4
- package/utils/deployment.d.ts.map +1 -1
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { Attachment, AttachmentErrorReason, DeploymentItem, DisplayAttachment } from '@epam/ai-dial-chat-shared';
|
|
1
|
+
import { Attachment, AttachmentErrorReason, DeploymentItem, DisplayAttachment, ToolMenuItem } from '@epam/ai-dial-chat-shared';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { ChatSettingsConfig, InputColors, InputTypography, ModelSelectorLabels, SendOnEnter } from './Input';
|
|
3
|
+
import { ChatSettingsConfig, InputColors, InputTypography, ModelSelectorLabels, SendOnEnter, ToolsChipLabels } from './Input';
|
|
4
4
|
/** CSS custom-property overrides for the `ConversationInput` component. */
|
|
5
5
|
export interface ConversationInputColors {
|
|
6
|
-
/** Root container background color. */
|
|
7
|
-
background?: string;
|
|
8
6
|
/** Welcome heading text color. */
|
|
9
7
|
welcomeText?: string;
|
|
10
8
|
/** Color overrides forwarded to the inner `Input` component. */
|
|
@@ -12,7 +10,7 @@ export interface ConversationInputColors {
|
|
|
12
10
|
}
|
|
13
11
|
/** Typography overrides for the `ConversationInput` component. */
|
|
14
12
|
export interface ConversationInputTypography {
|
|
15
|
-
/** Tailwind (or custom) class applied to the welcome heading. */
|
|
13
|
+
/** Tailwind (or custom) class applied to the welcome heading. Defaults to `'dial-display2-text'`. */
|
|
16
14
|
welcomeClassName?: string;
|
|
17
15
|
/** Typography overrides forwarded to the inner `Input` component. */
|
|
18
16
|
input?: InputTypography;
|
|
@@ -32,12 +30,7 @@ export interface EditMessageInputProps {
|
|
|
32
30
|
initialAttachments?: DisplayAttachment[];
|
|
33
31
|
/** Called when the user clicks the Cancel button. */
|
|
34
32
|
onCancel: () => void;
|
|
35
|
-
/**
|
|
36
|
-
* Called when the user clicks Save & Submit.
|
|
37
|
-
* @param message - The edited message text.
|
|
38
|
-
* @param keptAttachments - Pre-existing attachments the user did not remove.
|
|
39
|
-
* @param newAttachments - New attachments added during editing.
|
|
40
|
-
*/
|
|
33
|
+
/** Called when the user clicks Save & Submit. */
|
|
41
34
|
onSave: (message: string, keptAttachments: DisplayAttachment[], newAttachments: Attachment[]) => void;
|
|
42
35
|
/** Called immediately after a new attachment is added. Returns the uploaded attachment URL. */
|
|
43
36
|
onUploadAttachment?: (attachment: Attachment) => Promise<string>;
|
|
@@ -72,18 +65,16 @@ export interface EditMessageInputProps {
|
|
|
72
65
|
*/
|
|
73
66
|
validateAttachment?: (attachment: Attachment) => AttachmentErrorReason | undefined;
|
|
74
67
|
/**
|
|
75
|
-
*
|
|
76
|
-
*
|
|
68
|
+
* When `false`, long pasted plain text is inserted inline instead of being
|
|
69
|
+
* converted to a text attachment. Set to `false` when the selected model
|
|
70
|
+
* does not support attachments. Defaults to `true`.
|
|
77
71
|
*/
|
|
72
|
+
isAttachmentsEnabled?: boolean;
|
|
73
|
+
/** Maximum total kept-plus-new attachments; unlimited when `undefined`, `0`, or non-finite. */
|
|
78
74
|
maximumAttachmentsAmount?: number;
|
|
79
|
-
/**
|
|
80
|
-
* Called when adding a file/drop batch would exceed
|
|
81
|
-
* `maximumAttachmentsAmount`.
|
|
82
|
-
*/
|
|
75
|
+
/** Called when adding a batch would exceed `maximumAttachmentsAmount`. */
|
|
83
76
|
onAttachmentsLimitExceeded?: (count: number, limit: number) => void;
|
|
84
|
-
/**
|
|
85
|
-
* When `true`, the "Attach file" button is hidden.
|
|
86
|
-
*/
|
|
77
|
+
/** When `true`, the "Attach file" button is hidden. */
|
|
87
78
|
hideAttachFile?: boolean;
|
|
88
79
|
/**
|
|
89
80
|
* Value applied verbatim as the `accept` attribute on the native device
|
|
@@ -107,6 +98,20 @@ export interface EditMessageInputProps {
|
|
|
107
98
|
* When absent the cards are not rendered as interactive.
|
|
108
99
|
*/
|
|
109
100
|
onAttachmentClick?: (attachment: DisplayAttachment) => void;
|
|
101
|
+
/** Character count above which pasted plain-text is converted to a text attachment. Defaults to `4000`. */
|
|
102
|
+
pasteTextThreshold?: number;
|
|
103
|
+
/**
|
|
104
|
+
* Maximum character count for the message text. When `isAttachmentsEnabled`
|
|
105
|
+
* is `false`, pasting or sending text at or above this length triggers
|
|
106
|
+
* `onMessageTooLong` instead of being accepted. Defaults to `50000`.
|
|
107
|
+
*/
|
|
108
|
+
maxMessageLength?: number;
|
|
109
|
+
/**
|
|
110
|
+
* Called when the user pastes or sends text whose length is ≥ `maxMessageLength`
|
|
111
|
+
* while `isAttachmentsEnabled` is `false`. The text is still inserted inline — the
|
|
112
|
+
* host is responsible for surfacing the error to the user.
|
|
113
|
+
*/
|
|
114
|
+
onMessageTooLong?: (length: number, max: number) => void;
|
|
110
115
|
}
|
|
111
116
|
/** Props accepted by the `ConversationInput` component. */
|
|
112
117
|
export interface ConversationInputProps {
|
|
@@ -148,6 +153,12 @@ export interface ConversationInputProps {
|
|
|
148
153
|
onPendingAttachmentsConsumed?: () => void;
|
|
149
154
|
/** Character count above which a pasted plain-text string is converted to an attachment rather than inserted inline. Defaults to `4000`. Pass `Infinity` to disable. */
|
|
150
155
|
pasteTextThreshold?: number;
|
|
156
|
+
/**
|
|
157
|
+
* Maximum character count for the message text. When `isAttachmentsEnabled`
|
|
158
|
+
* is `false`, pasting or sending text at or above this length triggers
|
|
159
|
+
* `onMessageTooLong` instead of being accepted. Defaults to `50000`.
|
|
160
|
+
*/
|
|
161
|
+
maxMessageLength?: number;
|
|
151
162
|
/**
|
|
152
163
|
* List of deployment items to populate the model selector menu. When `undefined`, the selector is not rendered.
|
|
153
164
|
* `iconUrl` on each item must already be a fully resolved URL usable in `<img src>`.
|
|
@@ -165,7 +176,7 @@ export interface ConversationInputProps {
|
|
|
165
176
|
sendTitle?: string;
|
|
166
177
|
/** Accessible label for the stop button. */
|
|
167
178
|
stopLabel?: string;
|
|
168
|
-
/** When `true`, blocks all text input, send, attach, and drop interactions. Starter/action buttons remain usable. Defaults to `false`. */
|
|
179
|
+
/** When `true`, blocks all text input, send, attach, and drop interactions. Starter/action buttons and the model selector remain usable. Defaults to `false`. */
|
|
169
180
|
isInputDisabled?: boolean;
|
|
170
181
|
/**
|
|
171
182
|
* When `true`, the model selector renders in a disabled, non-interactive
|
|
@@ -174,6 +185,17 @@ export interface ConversationInputProps {
|
|
|
174
185
|
* composer — typing and sending remain usable.
|
|
175
186
|
*/
|
|
176
187
|
isModelSelectorDisabled?: boolean;
|
|
188
|
+
/**
|
|
189
|
+
* When `true`, disables the send action without removing or dimming the
|
|
190
|
+
* send button itself. Independent of `isInputDisabled`. Defaults to `false`.
|
|
191
|
+
*/
|
|
192
|
+
isSendDisabled?: boolean;
|
|
193
|
+
/**
|
|
194
|
+
* Extra class name(s) merged onto the inner `Input` wrapper element (the
|
|
195
|
+
* bordered container around the textarea/model-selector/send-button row),
|
|
196
|
+
* distinct from `className` which styles this component's own outer root.
|
|
197
|
+
*/
|
|
198
|
+
inputClassName?: string;
|
|
177
199
|
/**
|
|
178
200
|
* When `true`, the mic button is rendered and voice recording is enabled.
|
|
179
201
|
* The host app derives this from the selected deployment's `inputAttachmentTypes`.
|
|
@@ -186,8 +208,6 @@ export interface ConversationInputProps {
|
|
|
186
208
|
stopRecordingLabel?: string;
|
|
187
209
|
/** Accessible label for the discard / X button inside the voice bar. Defaults to `'Discard recording'`. */
|
|
188
210
|
discardRecordingLabel?: string;
|
|
189
|
-
/** `aria-label` for the elapsed-time region inside the voice bar. Defaults to `'Recording time'`. */
|
|
190
|
-
timerAriaLabel?: string;
|
|
191
211
|
/**
|
|
192
212
|
* Controls which key combination submits the message.
|
|
193
213
|
* - `SendOnEnter.Enter` (default): Enter submits; Shift+Enter inserts a newline.
|
|
@@ -229,6 +249,12 @@ export interface ConversationInputProps {
|
|
|
229
249
|
* and `onUploadAttachment` is NOT called). Return `undefined` to allow normal upload.
|
|
230
250
|
*/
|
|
231
251
|
validateAttachment?: (attachment: Attachment) => AttachmentErrorReason | undefined;
|
|
252
|
+
/**
|
|
253
|
+
* When `false`, long pasted plain text is inserted inline instead of being
|
|
254
|
+
* converted to a text attachment. Set to `false` when the selected model
|
|
255
|
+
* does not support attachments. Defaults to `true`.
|
|
256
|
+
*/
|
|
257
|
+
isAttachmentsEnabled?: boolean;
|
|
232
258
|
/**
|
|
233
259
|
* Maximum number of attachments allowed in the input tray. Undefined, `0`,
|
|
234
260
|
* or non-finite values mean there is no count limit.
|
|
@@ -257,5 +283,33 @@ export interface ConversationInputProps {
|
|
|
257
283
|
* popover after a selection or an explicit dismiss.
|
|
258
284
|
*/
|
|
259
285
|
modelPickerOverlay?: (onClose: () => void) => ReactNode;
|
|
286
|
+
/** Resolved tool toggle items rendered in a "Tools" submenu. When empty or absent, no Tools item is shown. */
|
|
287
|
+
toolsMenuItems?: ToolMenuItem[];
|
|
288
|
+
/** Called when a tool row is toggled. Receives the tool id. */
|
|
289
|
+
onToolToggle?: (toolId: string) => void;
|
|
290
|
+
/** Label for the "Tools" menu item and mobile sheet title. Defaults to `'Tools'`. */
|
|
291
|
+
toolsMenuTitle?: string;
|
|
292
|
+
/** Accessible label for the back arrow in the mobile tools bottom sheet. Defaults to `'Back'`. */
|
|
293
|
+
toolsBackLabel?: string;
|
|
294
|
+
/** Labels for the tool chips rendered in the input. */
|
|
295
|
+
toolsChipLabels?: ToolsChipLabels;
|
|
296
|
+
/**
|
|
297
|
+
* When provided, a "Prompts" item is added to the `+` menu above "Chat
|
|
298
|
+
* settings". Its submenu (desktop flyout / mobile bottom sheet) renders
|
|
299
|
+
* this host-owned overlay, mirroring `modelPickerOverlay`.
|
|
300
|
+
*/
|
|
301
|
+
promptsMenuOverlay?: (onClose: () => void) => ReactNode;
|
|
302
|
+
/** Label for the "Prompts" menu item and mobile sheet title. Defaults to `'Prompts'`. */
|
|
303
|
+
promptsMenuTitle?: string;
|
|
304
|
+
/** Accessible label for the back arrow in the mobile prompts bottom sheet. Defaults to `'Back'`. */
|
|
305
|
+
promptsBackLabel?: string;
|
|
306
|
+
/** Arbitrary slot rendered in the action row before the model selector. Use to inject app-level controls (e.g. a token-usage indicator). */
|
|
307
|
+
usageLimitsSlot?: ReactNode;
|
|
308
|
+
/**
|
|
309
|
+
* Called when the user pastes or sends text whose length is ≥ `maxMessageLength`
|
|
310
|
+
* while `isAttachmentsEnabled` is `false`. The text is still inserted inline — the
|
|
311
|
+
* host is responsible for surfacing the error to the user.
|
|
312
|
+
*/
|
|
313
|
+
onMessageTooLong?: (length: number, max: number) => void;
|
|
260
314
|
}
|
|
261
315
|
//# sourceMappingURL=ConversationInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConversationInput.d.ts","sourceRoot":"","sources":["../../src/models/ConversationInput.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,qBAAqB,EACrB,cAAc,EACd,iBAAiB,
|
|
1
|
+
{"version":3,"file":"ConversationInput.d.ts","sourceRoot":"","sources":["../../src/models/ConversationInput.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,qBAAqB,EACrB,cAAc,EACd,iBAAiB,EACjB,YAAY,EACb,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EACV,kBAAkB,EAClB,WAAW,EACX,eAAe,EACf,mBAAmB,EACnB,WAAW,EACX,eAAe,EAChB,MAAM,SAAS,CAAC;AAEjB,2EAA2E;AAC3E,MAAM,WAAW,uBAAuB;IACtC,kCAAkC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gEAAgE;IAChE,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB;AAED,kEAAkE;AAClE,MAAM,WAAW,2BAA2B;IAC1C,qGAAqG;IACrG,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,qEAAqE;IACrE,KAAK,CAAC,EAAE,eAAe,CAAC;CACzB;AAED,qFAAqF;AACrF,MAAM,WAAW,uBAAuB;IACtC,wDAAwD;IACxD,MAAM,CAAC,EAAE,uBAAuB,CAAC;IACjC,8DAA8D;IAC9D,UAAU,CAAC,EAAE,2BAA2B,CAAC;CAC1C;AAED,0DAA0D;AAC1D,MAAM,WAAW,qBAAqB;IACpC,0DAA0D;IAC1D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,wFAAwF;IACxF,kBAAkB,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACzC,qDAAqD;IACrD,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,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kGAAkG;IAClG,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,uDAAuD;IACvD,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,IAAI,KAAK,SAAS,CAAC;IACxD,yFAAyF;IACzF,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,oGAAoG;IACpG,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,4IAA4I;IAC5I,eAAe,CAAC,EAAE,SAAS,CAAC;IAC5B;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CAC1D"}
|
package/models/Input.d.ts
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import { Attachment, AttachmentErrorReason, DeploymentFeatures, DeploymentItem, DisplayAttachment, ResponseFormat } from '@epam/ai-dial-chat-shared';
|
|
1
|
+
import { Attachment, AttachmentErrorReason, DeploymentFeatures, DeploymentItem, DisplayAttachment, ResponseFormat, ToolMenuItem } from '@epam/ai-dial-chat-shared';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
/**
|
|
4
|
-
* Controls which key combination submits the message in the `Input` component.
|
|
5
|
-
* - `Enter` (default): Enter submits; Shift+Enter inserts a newline.
|
|
6
|
-
* - `MetaEnter`: ⌘+Enter (macOS) / Ctrl+Enter (Windows/Linux) submits; bare Enter inserts a newline.
|
|
7
|
-
*/
|
|
3
|
+
/** Controls which key combination submits the message in the `Input` component. */
|
|
8
4
|
export declare enum SendOnEnter {
|
|
9
5
|
/** Enter submits; Shift+Enter inserts a newline. */
|
|
10
6
|
Enter = "enter",
|
|
@@ -19,22 +15,24 @@ export interface InputColors {
|
|
|
19
15
|
text?: string;
|
|
20
16
|
/** Border color in the default (unfocused) state. */
|
|
21
17
|
border?: string;
|
|
22
|
-
/** Border color on hover (unfocused). */
|
|
23
|
-
borderHover?: string;
|
|
24
18
|
/** Border color when the input is focused. */
|
|
25
19
|
borderFocus?: string;
|
|
26
20
|
/** Placeholder text color. */
|
|
27
21
|
placeholder?: string;
|
|
28
|
-
/**
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
|
|
22
|
+
/** text disabled color. */
|
|
23
|
+
textDisabled?: string;
|
|
24
|
+
/** Model-selector chip caret icon color. Defaults to `--text-primary`. */
|
|
25
|
+
modelSelectorCaret?: string;
|
|
26
|
+
/** Model-selector chip hover/active background color. Defaults to `--bg-control-accent-alpha-hover`/`--bg-control-accent-alpha-active`. */
|
|
27
|
+
modelSelectorHoverBg?: string;
|
|
28
|
+
/** Model-selector chip caret color when disabled. Defaults to `--text-control-disable-primary`. */
|
|
29
|
+
modelSelectorDisabled?: string;
|
|
30
|
+
/** Voice bar error border/icon color. Defaults to `--stroke-error`/`--text-error`. */
|
|
31
|
+
voiceError?: string;
|
|
32
|
+
/** Voice bar waveform and timer text color. Defaults to `--text-primary`. */
|
|
33
|
+
voiceWaveform?: string;
|
|
34
|
+
/** Voice bar stop button and recording-dot accent color. Defaults to `--text-error`. */
|
|
35
|
+
voiceAccent?: string;
|
|
38
36
|
}
|
|
39
37
|
/** Typography overrides for the `Input` component. */
|
|
40
38
|
export interface InputTypography {
|
|
@@ -55,6 +53,13 @@ export interface ModelSelectorLabels {
|
|
|
55
53
|
searchPlaceholder?: string;
|
|
56
54
|
/** Accessible label for the close button in the mobile bottom-sheet. Defaults to `'Close'`. */
|
|
57
55
|
closeLabel?: string;
|
|
56
|
+
/** Tooltip shown when the selected deployment is no longer available (e.g. removed from the catalog). Defaults to `'This deployment is no longer available'`. */
|
|
57
|
+
unavailableTooltip?: string;
|
|
58
|
+
}
|
|
59
|
+
/** Labels for the tool chips rendered in the conversation input. */
|
|
60
|
+
export interface ToolsChipLabels {
|
|
61
|
+
/** Returns the accessible label for a chip's × button, which drops the tool from the input. Receives the tool label. Defaults to `"Remove {toolLabel}"`. */
|
|
62
|
+
removeLabel?: (toolLabel: string) => string;
|
|
58
63
|
}
|
|
59
64
|
/** Props accepted by the `Input` component. */
|
|
60
65
|
export interface InputProps {
|
|
@@ -70,7 +75,7 @@ export interface InputProps {
|
|
|
70
75
|
messageRevision?: number;
|
|
71
76
|
/** Called on every keystroke with the current textarea value. */
|
|
72
77
|
onChange?: (message: string) => void;
|
|
73
|
-
/** Called when the user submits a message
|
|
78
|
+
/** Called when the user submits a message. */
|
|
74
79
|
onSend?: (message: string, attachments: Attachment[]) => Promise<void> | void;
|
|
75
80
|
/** Called immediately after an attachment is added. Returns the uploaded attachment URL. */
|
|
76
81
|
onUploadAttachment?: (attachment: Attachment) => Promise<string>;
|
|
@@ -122,6 +127,19 @@ export interface InputProps {
|
|
|
122
127
|
onPendingAttachmentsConsumed?: () => void;
|
|
123
128
|
/** Character count above which a pasted plain-text string is converted to an attachment rather than inserted inline. Defaults to `4000`. Pass `Infinity` to disable. */
|
|
124
129
|
pasteTextThreshold?: number;
|
|
130
|
+
/**
|
|
131
|
+
* Maximum character count for the message text. When `isAttachmentsEnabled`
|
|
132
|
+
* is `false`, pasting or sending text at or above this length triggers
|
|
133
|
+
* `onMessageTooLong` instead of being accepted. Defaults to `50000`.
|
|
134
|
+
*/
|
|
135
|
+
maxMessageLength?: number;
|
|
136
|
+
/**
|
|
137
|
+
* When `false`, long pasted plain text is inserted inline instead of being
|
|
138
|
+
* converted to a text attachment. Set to `false` when the selected model
|
|
139
|
+
* does not support attachments so that pasting a long prompt does not
|
|
140
|
+
* trigger an "Attachments not supported" error. Defaults to `true`.
|
|
141
|
+
*/
|
|
142
|
+
isAttachmentsEnabled?: boolean;
|
|
125
143
|
/**
|
|
126
144
|
* List of deployment items to populate the model selector menu. When `undefined`, the selector is not rendered.
|
|
127
145
|
* `iconUrl` on each item must already be a fully resolved URL usable in `<img src>` — the host app
|
|
@@ -143,7 +161,7 @@ export interface InputProps {
|
|
|
143
161
|
/**
|
|
144
162
|
* When `true`, the textarea always renders on its own row above the action bar
|
|
145
163
|
* (attach button at the start, footer actions at the end), instead of the
|
|
146
|
-
* compact single-row layout
|
|
164
|
+
* compact single-row layout. Used by the
|
|
147
165
|
* edit-message UI, which always wants the stacked layout.
|
|
148
166
|
*/
|
|
149
167
|
isStacked?: boolean;
|
|
@@ -176,7 +194,7 @@ export interface InputProps {
|
|
|
176
194
|
canSend: boolean;
|
|
177
195
|
onSend: () => void;
|
|
178
196
|
}) => ReactNode;
|
|
179
|
-
/** When `true`, blocks all text input, send, attach, and drop interactions. Starter/action buttons remain usable. Defaults to `false`. */
|
|
197
|
+
/** When `true`, blocks all text input, send, attach, and drop interactions. Starter/action buttons and the model selector remain usable. Defaults to `false`. */
|
|
180
198
|
isInputDisabled?: boolean;
|
|
181
199
|
/**
|
|
182
200
|
* When `true`, the model selector renders in a disabled, non-interactive
|
|
@@ -185,6 +203,12 @@ export interface InputProps {
|
|
|
185
203
|
* composer — typing and sending remain usable.
|
|
186
204
|
*/
|
|
187
205
|
isModelSelectorDisabled?: boolean;
|
|
206
|
+
/**
|
|
207
|
+
* When `true`, disables the send action without removing or dimming the
|
|
208
|
+
* send button itself. Independent of `isInputDisabled`/`isStreaming`.
|
|
209
|
+
* Defaults to `false`.
|
|
210
|
+
*/
|
|
211
|
+
isSendDisabled?: boolean;
|
|
188
212
|
/**
|
|
189
213
|
* When `true`, the mic button is rendered and voice recording is enabled.
|
|
190
214
|
* Derived by the host app from the selected deployment's `inputAttachmentTypes`.
|
|
@@ -197,8 +221,6 @@ export interface InputProps {
|
|
|
197
221
|
stopRecordingLabel?: string;
|
|
198
222
|
/** Accessible label for the discard / X button inside the voice bar. Defaults to `'Discard recording'`. */
|
|
199
223
|
discardRecordingLabel?: string;
|
|
200
|
-
/** `aria-label` for the elapsed-time region inside the voice bar. Defaults to `'Recording time'`. */
|
|
201
|
-
timerAriaLabel?: string;
|
|
202
224
|
/**
|
|
203
225
|
* Controls which key combination submits the message.
|
|
204
226
|
* - `SendOnEnter.Enter` (default): Enter submits; Shift+Enter inserts a newline.
|
|
@@ -215,6 +237,26 @@ export interface InputProps {
|
|
|
215
237
|
* Modal state is managed internally by the component.
|
|
216
238
|
*/
|
|
217
239
|
chatSettings?: ChatSettingsConfig;
|
|
240
|
+
/** Resolved tool toggle items rendered in a "Tools" submenu. When empty or absent, no Tools item is shown. */
|
|
241
|
+
toolsMenuItems?: ToolMenuItem[];
|
|
242
|
+
/** Called when a tool row is toggled. Receives the tool id. */
|
|
243
|
+
onToolToggle?: (toolId: string) => void;
|
|
244
|
+
/** Label for the "Tools" menu item and mobile sheet title. Defaults to `'Tools'`. */
|
|
245
|
+
toolsMenuTitle?: string;
|
|
246
|
+
/** Accessible label for the back arrow in the mobile tools bottom sheet. Defaults to `'Back'`. */
|
|
247
|
+
toolsBackLabel?: string;
|
|
248
|
+
/** Labels for the tool chips rendered in the input. */
|
|
249
|
+
toolsChipLabels?: ToolsChipLabels;
|
|
250
|
+
/**
|
|
251
|
+
* When provided, a "Prompts" item is added to the `+` menu above "Chat
|
|
252
|
+
* settings". Its submenu (desktop flyout / mobile bottom sheet) renders
|
|
253
|
+
* this host-owned overlay, mirroring `modelPickerOverlay`.
|
|
254
|
+
*/
|
|
255
|
+
promptsMenuOverlay?: (onClose: () => void) => ReactNode;
|
|
256
|
+
/** Label for the "Prompts" menu item and mobile sheet title. Defaults to `'Prompts'`. */
|
|
257
|
+
promptsMenuTitle?: string;
|
|
258
|
+
/** Accessible label for the back arrow in the mobile prompts bottom sheet. Defaults to `'Back'`. */
|
|
259
|
+
promptsBackLabel?: string;
|
|
218
260
|
/** When `true`, focuses the textarea on mount. Defaults to `false`. */
|
|
219
261
|
autoFocus?: boolean;
|
|
220
262
|
/**
|
|
@@ -256,6 +298,14 @@ export interface InputProps {
|
|
|
256
298
|
* popover after a selection or an explicit dismiss.
|
|
257
299
|
*/
|
|
258
300
|
modelPickerOverlay?: (onClose: () => void) => ReactNode;
|
|
301
|
+
/** Arbitrary slot rendered in the action row before the model selector. Use to inject app-level controls (e.g. a token-usage indicator). */
|
|
302
|
+
usageLimitsSlot?: ReactNode;
|
|
303
|
+
/**
|
|
304
|
+
* Called when the user pastes or sends text whose length is ≥ `maxMessageLength`
|
|
305
|
+
* while `isAttachmentsEnabled` is `false`. The text is still inserted inline — the
|
|
306
|
+
* host is responsible for surfacing the error to the user.
|
|
307
|
+
*/
|
|
308
|
+
onMessageTooLong?: (length: number, max: number) => void;
|
|
259
309
|
}
|
|
260
310
|
/** Values emitted by the chat-settings modal when the user clicks Save. */
|
|
261
311
|
export interface ChatSettingsValues {
|
package/models/Input.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../src/models/Input.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,qBAAqB,EACrB,kBAAkB,EAClB,cAAc,EACd,iBAAiB,EACjB,cAAc,
|
|
1
|
+
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../src/models/Input.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,qBAAqB,EACrB,kBAAkB,EAClB,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,YAAY,EACb,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,mFAAmF;AACnF,oBAAY,WAAW;IACrB,oDAAoD;IACpD,KAAK,UAAU;IACf,0FAA0F;IAC1F,SAAS,eAAe;CACzB;AAED,+DAA+D;AAC/D,MAAM,WAAW,WAAW;IAC1B,mCAAmC;IACnC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,wBAAwB;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qDAAqD;IACrD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,8CAA8C;IAC9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4E;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,gFAAgF;IAChF,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,oEAAoE;IACpE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,4HAA4H;IAC5H,iBAAiB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7C,qDAAqD;IACrD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gEAAgE;IAChE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+FAA+F;IAC/F,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,kGAAkG;IAClG,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
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.307",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./index.js",
|
|
@@ -17,13 +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.
|
|
22
|
-
"@epam/ai-dial-ui-kit": "0.12.0-dev.36",
|
|
20
|
+
"@epam/ai-dial-attachment-input": "1.1.0-dev.307",
|
|
21
|
+
"@epam/ai-dial-chat-shared": "1.1.0-dev.307",
|
|
23
22
|
"@tabler/icons-react": "^3.44.0",
|
|
24
23
|
"react": "^19.0.0",
|
|
25
24
|
"react-dom": "^19.2.6",
|
|
26
|
-
"@epam/ai-dial-kit": "
|
|
25
|
+
"@epam/ai-dial-ui-kit": "^0.14.0-dev.15"
|
|
27
26
|
},
|
|
28
27
|
"dependencies": {
|
|
29
28
|
"react-window": "^2.2.7"
|
package/utils/concurrency.d.ts
CHANGED
|
@@ -1,17 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Runs `fn` over every item in `items`
|
|
3
|
-
*
|
|
4
|
-
* faster tasks don't leave workers idle waiting for a slow sibling.
|
|
5
|
-
*/
|
|
6
|
-
export declare const runConcurrent: <T>(items: T[], concurrency: number, fn: (item: T) => Promise<void>) => Promise<void>;
|
|
7
|
-
/**
|
|
8
|
-
* Runs `fn` over every item in `items` at a steady rate of `maxPerMinute` calls
|
|
9
|
-
* per minute. All calls run concurrently — the rate limit controls when each
|
|
10
|
-
* call starts, not how many are in flight. This prevents bursting past a
|
|
11
|
-
* server-side throttle window while still parallelising the work.
|
|
12
|
-
*
|
|
13
|
-
* Example: 200 items at 100/min → one call every 600 ms, all overlapping,
|
|
14
|
-
* never more than 100 starts within any 60-second window.
|
|
2
|
+
* Runs `fn` over every item in `items` at a steady rate of `maxPerMinute` calls per minute.
|
|
3
|
+
* All calls run concurrently — the rate limit controls when each call starts, not how many are in flight.
|
|
15
4
|
*/
|
|
16
5
|
export declare const runAtRate: <T>(items: T[], maxPerMinute: number, fn: (item: T) => Promise<void>) => Promise<void>;
|
|
17
6
|
//# sourceMappingURL=concurrency.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"concurrency.d.ts","sourceRoot":"","sources":["../../src/utils/concurrency.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"concurrency.d.ts","sourceRoot":"","sources":["../../src/utils/concurrency.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,SAAS,GAAU,CAAC,EAC/B,OAAO,CAAC,EAAE,EACV,cAAc,MAAM,EACpB,IAAI,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,KAC7B,OAAO,CAAC,IAAI,CAYd,CAAC"}
|
package/utils/deployment.d.ts
CHANGED
|
@@ -7,9 +7,6 @@ export declare const getDeploymentLabel: (item: DeploymentItem) => string;
|
|
|
7
7
|
* An empty/whitespace query returns the list unchanged.
|
|
8
8
|
*/
|
|
9
9
|
export declare const filterDeployments: (deployments: DeploymentItem[], query: string) => DeploymentItem[];
|
|
10
|
-
/**
|
|
11
|
-
* Builds the leading icon for a deployment. Uses the resolved image URL when
|
|
12
|
-
* available (with an error fallback and lazy loading) and an initials avatar otherwise.
|
|
13
|
-
*/
|
|
10
|
+
/** Builds the leading icon node for a deployment. */
|
|
14
11
|
export declare const buildDeploymentIcon: (resolvedIconUrl: string | undefined, type: string | undefined, displayName: string, size?: number, tooltip?: string) => ReactNode;
|
|
15
12
|
//# sourceMappingURL=deployment.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deployment.d.ts","sourceRoot":"","sources":["../../src/utils/deployment.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAkB,MAAM,2BAA2B,CAAC;AAChF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,iFAAiF;AACjF,eAAO,MAAM,kBAAkB,GAAI,MAAM,cAAc,KAAG,MAC7B,CAAC;AAE9B;;;GAGG;AACH,eAAO,MAAM,iBAAiB,GAC5B,aAAa,cAAc,EAAE,EAC7B,OAAO,MAAM,KACZ,cAAc,EAMhB,CAAC;AAEF
|
|
1
|
+
{"version":3,"file":"deployment.d.ts","sourceRoot":"","sources":["../../src/utils/deployment.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAkB,MAAM,2BAA2B,CAAC;AAChF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,iFAAiF;AACjF,eAAO,MAAM,kBAAkB,GAAI,MAAM,cAAc,KAAG,MAC7B,CAAC;AAE9B;;;GAGG;AACH,eAAO,MAAM,iBAAiB,GAC5B,aAAa,cAAc,EAAE,EAC7B,OAAO,MAAM,KACZ,cAAc,EAMhB,CAAC;AAEF,qDAAqD;AACrD,eAAO,MAAM,mBAAmB,GAC9B,iBAAiB,MAAM,GAAG,SAAS,EACnC,MAAM,MAAM,GAAG,SAAS,EACxB,aAAa,MAAM,EACnB,aAAS,EACT,UAAU,MAAM,KACf,SAOF,CAAC"}
|