@epam/ai-dial-conversation-input 1.1.0-dev.38 → 1.1.0-dev.389
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 -6
- package/hooks/useMessageState.d.ts.map +1 -1
- package/hooks/useModelSelector.d.ts +23 -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 +1253 -976
- package/models/ConversationInput.d.ts +91 -23
- package/models/ConversationInput.d.ts.map +1 -1
- package/models/Input.d.ts +81 -29
- 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>;
|
|
@@ -51,6 +44,8 @@ export interface EditMessageInputProps {
|
|
|
51
44
|
removeLabel?: string;
|
|
52
45
|
/** Accessible label for each attachment card's retry button (error state only). */
|
|
53
46
|
retryLabel?: string;
|
|
47
|
+
/** Accessible label for each attachment card's in-progress upload progress bar. Defaults to `'Uploading'`. */
|
|
48
|
+
uploadingLabel?: string;
|
|
54
49
|
/** Accessible label for the add-menu trigger button. */
|
|
55
50
|
addMenuTitle?: string;
|
|
56
51
|
/** Label for the attach-file menu item. */
|
|
@@ -72,18 +67,16 @@ export interface EditMessageInputProps {
|
|
|
72
67
|
*/
|
|
73
68
|
validateAttachment?: (attachment: Attachment) => AttachmentErrorReason | undefined;
|
|
74
69
|
/**
|
|
75
|
-
*
|
|
76
|
-
*
|
|
70
|
+
* When `false`, long pasted plain text is inserted inline instead of being
|
|
71
|
+
* converted to a text attachment. Set to `false` when the selected model
|
|
72
|
+
* does not support attachments. Defaults to `true`.
|
|
77
73
|
*/
|
|
74
|
+
isAttachmentsEnabled?: boolean;
|
|
75
|
+
/** Maximum total kept-plus-new attachments; unlimited when `undefined`, `0`, or non-finite. */
|
|
78
76
|
maximumAttachmentsAmount?: number;
|
|
79
|
-
/**
|
|
80
|
-
* Called when adding a file/drop batch would exceed
|
|
81
|
-
* `maximumAttachmentsAmount`.
|
|
82
|
-
*/
|
|
77
|
+
/** Called when adding a batch would exceed `maximumAttachmentsAmount`. */
|
|
83
78
|
onAttachmentsLimitExceeded?: (count: number, limit: number) => void;
|
|
84
|
-
/**
|
|
85
|
-
* When `true`, the "Attach file" button is hidden.
|
|
86
|
-
*/
|
|
79
|
+
/** When `true`, the "Attach file" button is hidden. */
|
|
87
80
|
hideAttachFile?: boolean;
|
|
88
81
|
/**
|
|
89
82
|
* Value applied verbatim as the `accept` attribute on the native device
|
|
@@ -107,6 +100,23 @@ export interface EditMessageInputProps {
|
|
|
107
100
|
* When absent the cards are not rendered as interactive.
|
|
108
101
|
*/
|
|
109
102
|
onAttachmentClick?: (attachment: DisplayAttachment) => void;
|
|
103
|
+
/** Character count above which pasted plain-text is converted to a text attachment. Defaults to `4000`. */
|
|
104
|
+
pasteTextThreshold?: number;
|
|
105
|
+
/**
|
|
106
|
+
* Maximum character count for the message text. Sending text at or above this
|
|
107
|
+
* length triggers `onMessageTooLong` instead of being accepted, on every model.
|
|
108
|
+
* Pasting text that long additionally triggers it when `isAttachmentsEnabled`
|
|
109
|
+
* is `false`. Separate from `pasteTextThreshold`, which only decides when a
|
|
110
|
+
* paste becomes an attachment. Defaults to `50000`.
|
|
111
|
+
*/
|
|
112
|
+
maxMessageLength?: number;
|
|
113
|
+
/**
|
|
114
|
+
* Called when the user sends text whose length is ≥ `maxMessageLength`, and when
|
|
115
|
+
* they paste text that long while `isAttachmentsEnabled` is `false`. A blocked
|
|
116
|
+
* send leaves the textarea's content in place; a paste is still inserted inline.
|
|
117
|
+
* The host is responsible for surfacing the error to the user.
|
|
118
|
+
*/
|
|
119
|
+
onMessageTooLong?: (length: number, max: number) => void;
|
|
110
120
|
}
|
|
111
121
|
/** Props accepted by the `ConversationInput` component. */
|
|
112
122
|
export interface ConversationInputProps {
|
|
@@ -148,6 +158,14 @@ export interface ConversationInputProps {
|
|
|
148
158
|
onPendingAttachmentsConsumed?: () => void;
|
|
149
159
|
/** 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
160
|
pasteTextThreshold?: number;
|
|
161
|
+
/**
|
|
162
|
+
* Maximum character count for the message text. Sending text at or above this
|
|
163
|
+
* length triggers `onMessageTooLong` instead of being accepted, on every model.
|
|
164
|
+
* Pasting text that long additionally triggers it when `isAttachmentsEnabled`
|
|
165
|
+
* is `false`. Separate from `pasteTextThreshold`, which only decides when a
|
|
166
|
+
* paste becomes an attachment. Defaults to `50000`.
|
|
167
|
+
*/
|
|
168
|
+
maxMessageLength?: number;
|
|
151
169
|
/**
|
|
152
170
|
* List of deployment items to populate the model selector menu. When `undefined`, the selector is not rendered.
|
|
153
171
|
* `iconUrl` on each item must already be a fully resolved URL usable in `<img src>`.
|
|
@@ -165,7 +183,13 @@ export interface ConversationInputProps {
|
|
|
165
183
|
sendTitle?: string;
|
|
166
184
|
/** Accessible label for the stop button. */
|
|
167
185
|
stopLabel?: string;
|
|
168
|
-
/**
|
|
186
|
+
/** Accessible label for each attachment card's remove button. Defaults to `'Remove attachment'`. */
|
|
187
|
+
removeLabel?: string;
|
|
188
|
+
/** Accessible label for each attachment card's retry button (error state only). Defaults to `'Retry upload'`. */
|
|
189
|
+
retryLabel?: string;
|
|
190
|
+
/** Accessible label for each attachment card's in-progress upload progress bar. Defaults to `'Uploading'`. */
|
|
191
|
+
uploadingLabel?: string;
|
|
192
|
+
/** When `true`, blocks all text input, send, attach, and drop interactions. Starter/action buttons and the model selector remain usable. Defaults to `false`. */
|
|
169
193
|
isInputDisabled?: boolean;
|
|
170
194
|
/**
|
|
171
195
|
* When `true`, the model selector renders in a disabled, non-interactive
|
|
@@ -174,6 +198,17 @@ export interface ConversationInputProps {
|
|
|
174
198
|
* composer — typing and sending remain usable.
|
|
175
199
|
*/
|
|
176
200
|
isModelSelectorDisabled?: boolean;
|
|
201
|
+
/**
|
|
202
|
+
* When `true`, disables the send action without removing or dimming the
|
|
203
|
+
* send button itself. Independent of `isInputDisabled`. Defaults to `false`.
|
|
204
|
+
*/
|
|
205
|
+
isSendDisabled?: boolean;
|
|
206
|
+
/**
|
|
207
|
+
* Extra class name(s) merged onto the inner `Input` wrapper element (the
|
|
208
|
+
* bordered container around the textarea/model-selector/send-button row),
|
|
209
|
+
* distinct from `className` which styles this component's own outer root.
|
|
210
|
+
*/
|
|
211
|
+
inputClassName?: string;
|
|
177
212
|
/**
|
|
178
213
|
* When `true`, the mic button is rendered and voice recording is enabled.
|
|
179
214
|
* The host app derives this from the selected deployment's `inputAttachmentTypes`.
|
|
@@ -186,8 +221,6 @@ export interface ConversationInputProps {
|
|
|
186
221
|
stopRecordingLabel?: string;
|
|
187
222
|
/** Accessible label for the discard / X button inside the voice bar. Defaults to `'Discard recording'`. */
|
|
188
223
|
discardRecordingLabel?: string;
|
|
189
|
-
/** `aria-label` for the elapsed-time region inside the voice bar. Defaults to `'Recording time'`. */
|
|
190
|
-
timerAriaLabel?: string;
|
|
191
224
|
/**
|
|
192
225
|
* Controls which key combination submits the message.
|
|
193
226
|
* - `SendOnEnter.Enter` (default): Enter submits; Shift+Enter inserts a newline.
|
|
@@ -229,6 +262,12 @@ export interface ConversationInputProps {
|
|
|
229
262
|
* and `onUploadAttachment` is NOT called). Return `undefined` to allow normal upload.
|
|
230
263
|
*/
|
|
231
264
|
validateAttachment?: (attachment: Attachment) => AttachmentErrorReason | undefined;
|
|
265
|
+
/**
|
|
266
|
+
* When `false`, long pasted plain text is inserted inline instead of being
|
|
267
|
+
* converted to a text attachment. Set to `false` when the selected model
|
|
268
|
+
* does not support attachments. Defaults to `true`.
|
|
269
|
+
*/
|
|
270
|
+
isAttachmentsEnabled?: boolean;
|
|
232
271
|
/**
|
|
233
272
|
* Maximum number of attachments allowed in the input tray. Undefined, `0`,
|
|
234
273
|
* or non-finite values mean there is no count limit.
|
|
@@ -257,5 +296,34 @@ export interface ConversationInputProps {
|
|
|
257
296
|
* popover after a selection or an explicit dismiss.
|
|
258
297
|
*/
|
|
259
298
|
modelPickerOverlay?: (onClose: () => void) => ReactNode;
|
|
299
|
+
/** Resolved tool toggle items rendered in a "Tools" submenu. When empty or absent, no Tools item is shown. */
|
|
300
|
+
toolsMenuItems?: ToolMenuItem[];
|
|
301
|
+
/** Called when a tool row is toggled. Receives the tool id. */
|
|
302
|
+
onToolToggle?: (toolId: string) => void;
|
|
303
|
+
/** Label for the "Tools" menu item and mobile sheet title. Defaults to `'Tools'`. */
|
|
304
|
+
toolsMenuTitle?: string;
|
|
305
|
+
/** Accessible label for the back arrow in the mobile tools bottom sheet. Defaults to `'Back'`. */
|
|
306
|
+
toolsBackLabel?: string;
|
|
307
|
+
/** Labels for the tool chips rendered in the input. */
|
|
308
|
+
toolsChipLabels?: ToolsChipLabels;
|
|
309
|
+
/**
|
|
310
|
+
* When provided, a "Prompts" item is added to the `+` menu above "Chat
|
|
311
|
+
* settings". Its submenu (desktop flyout / mobile bottom sheet) renders
|
|
312
|
+
* this host-owned overlay, mirroring `modelPickerOverlay`.
|
|
313
|
+
*/
|
|
314
|
+
promptsMenuOverlay?: (onClose: () => void) => ReactNode;
|
|
315
|
+
/** Label for the "Prompts" menu item and mobile sheet title. Defaults to `'Prompts'`. */
|
|
316
|
+
promptsMenuTitle?: string;
|
|
317
|
+
/** Accessible label for the back arrow in the mobile prompts bottom sheet. Defaults to `'Back'`. */
|
|
318
|
+
promptsBackLabel?: string;
|
|
319
|
+
/** Arbitrary slot rendered in the action row before the model selector. Use to inject app-level controls (e.g. a token-usage indicator). */
|
|
320
|
+
usageLimitsSlot?: ReactNode;
|
|
321
|
+
/**
|
|
322
|
+
* Called when the user sends text whose length is ≥ `maxMessageLength`, and when
|
|
323
|
+
* they paste text that long while `isAttachmentsEnabled` is `false`. A blocked
|
|
324
|
+
* send leaves the textarea's content in place; a paste is still inserted inline.
|
|
325
|
+
* The host is responsible for surfacing the error to the user.
|
|
326
|
+
*/
|
|
327
|
+
onMessageTooLong?: (length: number, max: number) => void;
|
|
260
328
|
}
|
|
261
329
|
//# 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,E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gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,4IAA4I;IAC5I,eAAe,CAAC,EAAE,SAAS,CAAC;IAC5B;;;;;OAKG;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,28 @@ 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
|
+
/** Model-selector chip name text color (desktop only). Defaults to `--text-primary`. */
|
|
31
|
+
modelSelectorName?: string;
|
|
32
|
+
/** Model-selector chip version text color (desktop only). Defaults to `--text-secondary`. */
|
|
33
|
+
modelSelectorVersion?: string;
|
|
34
|
+
/** Voice bar error border/icon color. Defaults to `--stroke-error`/`--text-error`. */
|
|
35
|
+
voiceError?: string;
|
|
36
|
+
/** Voice bar waveform and timer text color. Defaults to `--text-primary`. */
|
|
37
|
+
voiceWaveform?: string;
|
|
38
|
+
/** Voice bar stop button and recording-dot accent color. Defaults to `--text-error`. */
|
|
39
|
+
voiceAccent?: string;
|
|
38
40
|
}
|
|
39
41
|
/** Typography overrides for the `Input` component. */
|
|
40
42
|
export interface InputTypography {
|
|
@@ -55,6 +57,13 @@ export interface ModelSelectorLabels {
|
|
|
55
57
|
searchPlaceholder?: string;
|
|
56
58
|
/** Accessible label for the close button in the mobile bottom-sheet. Defaults to `'Close'`. */
|
|
57
59
|
closeLabel?: string;
|
|
60
|
+
/** Tooltip shown when the selected deployment is no longer available (e.g. removed from the catalog). Defaults to `'This deployment is no longer available'`. */
|
|
61
|
+
unavailableTooltip?: string;
|
|
62
|
+
}
|
|
63
|
+
/** Labels for the tool chips rendered in the conversation input. */
|
|
64
|
+
export interface ToolsChipLabels {
|
|
65
|
+
/** Returns the accessible label for a chip's × button, which drops the tool from the input. Receives the tool label. Defaults to `"Remove {toolLabel}"`. */
|
|
66
|
+
removeLabel?: (toolLabel: string) => string;
|
|
58
67
|
}
|
|
59
68
|
/** Props accepted by the `Input` component. */
|
|
60
69
|
export interface InputProps {
|
|
@@ -70,7 +79,7 @@ export interface InputProps {
|
|
|
70
79
|
messageRevision?: number;
|
|
71
80
|
/** Called on every keystroke with the current textarea value. */
|
|
72
81
|
onChange?: (message: string) => void;
|
|
73
|
-
/** Called when the user submits a message
|
|
82
|
+
/** Called when the user submits a message. */
|
|
74
83
|
onSend?: (message: string, attachments: Attachment[]) => Promise<void> | void;
|
|
75
84
|
/** Called immediately after an attachment is added. Returns the uploaded attachment URL. */
|
|
76
85
|
onUploadAttachment?: (attachment: Attachment) => Promise<string>;
|
|
@@ -104,6 +113,8 @@ export interface InputProps {
|
|
|
104
113
|
removeLabel?: string;
|
|
105
114
|
/** Accessible label for each attachment card's retry button (error state only). */
|
|
106
115
|
retryLabel?: string;
|
|
116
|
+
/** Accessible label for each attachment card's in-progress upload progress bar. Defaults to `'Uploading'`. */
|
|
117
|
+
uploadingLabel?: string;
|
|
107
118
|
/** Accessible label for the send button. */
|
|
108
119
|
sendLabel?: string;
|
|
109
120
|
/** Tooltip shown on hover over the send button. */
|
|
@@ -122,6 +133,21 @@ export interface InputProps {
|
|
|
122
133
|
onPendingAttachmentsConsumed?: () => void;
|
|
123
134
|
/** 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
135
|
pasteTextThreshold?: number;
|
|
136
|
+
/**
|
|
137
|
+
* Maximum character count for the message text. Sending text at or above this
|
|
138
|
+
* length triggers `onMessageTooLong` instead of being accepted, on every model.
|
|
139
|
+
* Pasting text that long additionally triggers it when `isAttachmentsEnabled`
|
|
140
|
+
* is `false`. Separate from `pasteTextThreshold`, which only decides when a
|
|
141
|
+
* paste becomes an attachment. Defaults to `50000`.
|
|
142
|
+
*/
|
|
143
|
+
maxMessageLength?: number;
|
|
144
|
+
/**
|
|
145
|
+
* When `false`, long pasted plain text is inserted inline instead of being
|
|
146
|
+
* converted to a text attachment. Set to `false` when the selected model
|
|
147
|
+
* does not support attachments so that pasting a long prompt does not
|
|
148
|
+
* trigger an "Attachments not supported" error. Defaults to `true`.
|
|
149
|
+
*/
|
|
150
|
+
isAttachmentsEnabled?: boolean;
|
|
125
151
|
/**
|
|
126
152
|
* List of deployment items to populate the model selector menu. When `undefined`, the selector is not rendered.
|
|
127
153
|
* `iconUrl` on each item must already be a fully resolved URL usable in `<img src>` — the host app
|
|
@@ -140,13 +166,6 @@ export interface InputProps {
|
|
|
140
166
|
menuCloseLabel?: string;
|
|
141
167
|
/** Attachments pre-populated in the tray on mount (e.g. when editing an existing message). */
|
|
142
168
|
initialAttachments?: Attachment[];
|
|
143
|
-
/**
|
|
144
|
-
* When `true`, the textarea always renders on its own row above the action bar
|
|
145
|
-
* (attach button at the start, footer actions at the end), instead of the
|
|
146
|
-
* compact single-row layout used when no attachments are present. Used by the
|
|
147
|
-
* edit-message UI, which always wants the stacked layout.
|
|
148
|
-
*/
|
|
149
|
-
isStacked?: boolean;
|
|
150
169
|
/**
|
|
151
170
|
* When `true`, the attach (+) button and its associated hidden file input are
|
|
152
171
|
* not rendered. Use this when the caller manages file picking outside the
|
|
@@ -176,7 +195,7 @@ export interface InputProps {
|
|
|
176
195
|
canSend: boolean;
|
|
177
196
|
onSend: () => void;
|
|
178
197
|
}) => ReactNode;
|
|
179
|
-
/** When `true`, blocks all text input, send, attach, and drop interactions. Starter/action buttons remain usable. Defaults to `false`. */
|
|
198
|
+
/** When `true`, blocks all text input, send, attach, and drop interactions. Starter/action buttons and the model selector remain usable. Defaults to `false`. */
|
|
180
199
|
isInputDisabled?: boolean;
|
|
181
200
|
/**
|
|
182
201
|
* When `true`, the model selector renders in a disabled, non-interactive
|
|
@@ -185,6 +204,12 @@ export interface InputProps {
|
|
|
185
204
|
* composer — typing and sending remain usable.
|
|
186
205
|
*/
|
|
187
206
|
isModelSelectorDisabled?: boolean;
|
|
207
|
+
/**
|
|
208
|
+
* When `true`, disables the send action without removing or dimming the
|
|
209
|
+
* send button itself. Independent of `isInputDisabled`/`isStreaming`.
|
|
210
|
+
* Defaults to `false`.
|
|
211
|
+
*/
|
|
212
|
+
isSendDisabled?: boolean;
|
|
188
213
|
/**
|
|
189
214
|
* When `true`, the mic button is rendered and voice recording is enabled.
|
|
190
215
|
* Derived by the host app from the selected deployment's `inputAttachmentTypes`.
|
|
@@ -197,8 +222,6 @@ export interface InputProps {
|
|
|
197
222
|
stopRecordingLabel?: string;
|
|
198
223
|
/** Accessible label for the discard / X button inside the voice bar. Defaults to `'Discard recording'`. */
|
|
199
224
|
discardRecordingLabel?: string;
|
|
200
|
-
/** `aria-label` for the elapsed-time region inside the voice bar. Defaults to `'Recording time'`. */
|
|
201
|
-
timerAriaLabel?: string;
|
|
202
225
|
/**
|
|
203
226
|
* Controls which key combination submits the message.
|
|
204
227
|
* - `SendOnEnter.Enter` (default): Enter submits; Shift+Enter inserts a newline.
|
|
@@ -215,6 +238,26 @@ export interface InputProps {
|
|
|
215
238
|
* Modal state is managed internally by the component.
|
|
216
239
|
*/
|
|
217
240
|
chatSettings?: ChatSettingsConfig;
|
|
241
|
+
/** Resolved tool toggle items rendered in a "Tools" submenu. When empty or absent, no Tools item is shown. */
|
|
242
|
+
toolsMenuItems?: ToolMenuItem[];
|
|
243
|
+
/** Called when a tool row is toggled. Receives the tool id. */
|
|
244
|
+
onToolToggle?: (toolId: string) => void;
|
|
245
|
+
/** Label for the "Tools" menu item and mobile sheet title. Defaults to `'Tools'`. */
|
|
246
|
+
toolsMenuTitle?: string;
|
|
247
|
+
/** Accessible label for the back arrow in the mobile tools bottom sheet. Defaults to `'Back'`. */
|
|
248
|
+
toolsBackLabel?: string;
|
|
249
|
+
/** Labels for the tool chips rendered in the input. */
|
|
250
|
+
toolsChipLabels?: ToolsChipLabels;
|
|
251
|
+
/**
|
|
252
|
+
* When provided, a "Prompts" item is added to the `+` menu above "Chat
|
|
253
|
+
* settings". Its submenu (desktop flyout / mobile bottom sheet) renders
|
|
254
|
+
* this host-owned overlay, mirroring `modelPickerOverlay`.
|
|
255
|
+
*/
|
|
256
|
+
promptsMenuOverlay?: (onClose: () => void) => ReactNode;
|
|
257
|
+
/** Label for the "Prompts" menu item and mobile sheet title. Defaults to `'Prompts'`. */
|
|
258
|
+
promptsMenuTitle?: string;
|
|
259
|
+
/** Accessible label for the back arrow in the mobile prompts bottom sheet. Defaults to `'Back'`. */
|
|
260
|
+
promptsBackLabel?: string;
|
|
218
261
|
/** When `true`, focuses the textarea on mount. Defaults to `false`. */
|
|
219
262
|
autoFocus?: boolean;
|
|
220
263
|
/**
|
|
@@ -256,6 +299,15 @@ export interface InputProps {
|
|
|
256
299
|
* popover after a selection or an explicit dismiss.
|
|
257
300
|
*/
|
|
258
301
|
modelPickerOverlay?: (onClose: () => void) => ReactNode;
|
|
302
|
+
/** Arbitrary slot rendered in the action row before the model selector. Use to inject app-level controls (e.g. a token-usage indicator). */
|
|
303
|
+
usageLimitsSlot?: ReactNode;
|
|
304
|
+
/**
|
|
305
|
+
* Called when the user sends text whose length is ≥ `maxMessageLength`, and when
|
|
306
|
+
* they paste text that long while `isAttachmentsEnabled` is `false`. A blocked
|
|
307
|
+
* send leaves the textarea's content in place; a paste is still inserted inline.
|
|
308
|
+
* The host is responsible for surfacing the error to the user.
|
|
309
|
+
*/
|
|
310
|
+
onMessageTooLong?: (length: number, max: number) => void;
|
|
259
311
|
}
|
|
260
312
|
/** Values emitted by the chat-settings modal when the user clicks Save. */
|
|
261
313
|
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/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,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.389",
|
|
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.389",
|
|
21
|
+
"@epam/ai-dial-chat-shared": "1.1.0-dev.389",
|
|
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"}
|