@epam/ai-dial-conversation-input 1.1.0-dev.17 → 1.1.0-dev.173
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 +21 -0
- package/components/AddAttachmentButton/AddAttachmentButton.d.ts.map +1 -1
- package/components/BottomSheet/BottomSheet.d.ts +17 -4
- package/components/BottomSheet/BottomSheet.d.ts.map +1 -1
- package/components/BottomSheetShell/BottomSheetShell.d.ts +16 -13
- 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 +8 -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 +21 -5
- 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/SelectedToolsChips/SelectedToolsChips.d.ts +42 -0
- package/components/SelectedToolsChips/SelectedToolsChips.d.ts.map +1 -0
- package/components/ToolsBottomSheet/ToolsBottomSheet.d.ts +38 -0
- package/components/ToolsBottomSheet/ToolsBottomSheet.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 -1
- package/index.d.ts.map +1 -1
- package/index.js +1132 -930
- package/models/ConversationInput.d.ts +54 -22
- package/models/ConversationInput.d.ts.map +1 -1
- package/models/Input.d.ts +57 -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. */
|
|
@@ -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,14 @@ 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 triggers `onMessageTooLong` when attachments are disabled. Defaults to `4000`. */
|
|
102
|
+
pasteTextThreshold?: number;
|
|
103
|
+
/**
|
|
104
|
+
* Called when the user pastes text whose length is ≥ `pasteTextThreshold` while
|
|
105
|
+
* `isAttachmentsEnabled` is `false`. The text is still inserted inline — the
|
|
106
|
+
* host is responsible for surfacing the error to the user.
|
|
107
|
+
*/
|
|
108
|
+
onMessageTooLong?: (length: number, max: number) => void;
|
|
110
109
|
}
|
|
111
110
|
/** Props accepted by the `ConversationInput` component. */
|
|
112
111
|
export interface ConversationInputProps {
|
|
@@ -165,7 +164,7 @@ export interface ConversationInputProps {
|
|
|
165
164
|
sendTitle?: string;
|
|
166
165
|
/** Accessible label for the stop button. */
|
|
167
166
|
stopLabel?: string;
|
|
168
|
-
/** When `true`, blocks all text input, send, attach, and drop interactions. Starter/action buttons remain usable. Defaults to `false`. */
|
|
167
|
+
/** When `true`, blocks all text input, send, attach, and drop interactions. Starter/action buttons and the model selector remain usable. Defaults to `false`. */
|
|
169
168
|
isInputDisabled?: boolean;
|
|
170
169
|
/**
|
|
171
170
|
* When `true`, the model selector renders in a disabled, non-interactive
|
|
@@ -174,6 +173,17 @@ export interface ConversationInputProps {
|
|
|
174
173
|
* composer — typing and sending remain usable.
|
|
175
174
|
*/
|
|
176
175
|
isModelSelectorDisabled?: boolean;
|
|
176
|
+
/**
|
|
177
|
+
* When `true`, disables the send action without removing or dimming the
|
|
178
|
+
* send button itself. Independent of `isInputDisabled`. Defaults to `false`.
|
|
179
|
+
*/
|
|
180
|
+
isSendDisabled?: boolean;
|
|
181
|
+
/**
|
|
182
|
+
* Extra class name(s) merged onto the inner `Input` wrapper element (the
|
|
183
|
+
* bordered container around the textarea/model-selector/send-button row),
|
|
184
|
+
* distinct from `className` which styles this component's own outer root.
|
|
185
|
+
*/
|
|
186
|
+
inputClassName?: string;
|
|
177
187
|
/**
|
|
178
188
|
* When `true`, the mic button is rendered and voice recording is enabled.
|
|
179
189
|
* The host app derives this from the selected deployment's `inputAttachmentTypes`.
|
|
@@ -186,8 +196,6 @@ export interface ConversationInputProps {
|
|
|
186
196
|
stopRecordingLabel?: string;
|
|
187
197
|
/** Accessible label for the discard / X button inside the voice bar. Defaults to `'Discard recording'`. */
|
|
188
198
|
discardRecordingLabel?: string;
|
|
189
|
-
/** `aria-label` for the elapsed-time region inside the voice bar. Defaults to `'Recording time'`. */
|
|
190
|
-
timerAriaLabel?: string;
|
|
191
199
|
/**
|
|
192
200
|
* Controls which key combination submits the message.
|
|
193
201
|
* - `SendOnEnter.Enter` (default): Enter submits; Shift+Enter inserts a newline.
|
|
@@ -229,6 +237,12 @@ export interface ConversationInputProps {
|
|
|
229
237
|
* and `onUploadAttachment` is NOT called). Return `undefined` to allow normal upload.
|
|
230
238
|
*/
|
|
231
239
|
validateAttachment?: (attachment: Attachment) => AttachmentErrorReason | undefined;
|
|
240
|
+
/**
|
|
241
|
+
* When `false`, long pasted plain text is inserted inline instead of being
|
|
242
|
+
* converted to a text attachment. Set to `false` when the selected model
|
|
243
|
+
* does not support attachments. Defaults to `true`.
|
|
244
|
+
*/
|
|
245
|
+
isAttachmentsEnabled?: boolean;
|
|
232
246
|
/**
|
|
233
247
|
* Maximum number of attachments allowed in the input tray. Undefined, `0`,
|
|
234
248
|
* or non-finite values mean there is no count limit.
|
|
@@ -257,5 +271,23 @@ export interface ConversationInputProps {
|
|
|
257
271
|
* popover after a selection or an explicit dismiss.
|
|
258
272
|
*/
|
|
259
273
|
modelPickerOverlay?: (onClose: () => void) => ReactNode;
|
|
274
|
+
/** Resolved tool toggle items rendered in a "Tools" submenu. When empty or absent, no Tools item is shown. */
|
|
275
|
+
toolsMenuItems?: ToolMenuItem[];
|
|
276
|
+
/** Called when a tool row is toggled. Receives the tool id. */
|
|
277
|
+
onToolToggle?: (toolId: string) => void;
|
|
278
|
+
/** Label for the "Tools" menu item and mobile sheet title. Defaults to `'Tools'`. */
|
|
279
|
+
toolsMenuTitle?: string;
|
|
280
|
+
/** Accessible label for the back arrow in the mobile tools bottom sheet. Defaults to `'Back'`. */
|
|
281
|
+
toolsBackLabel?: string;
|
|
282
|
+
/** Labels for the selected-tools chip row shown in the input when tools are active. */
|
|
283
|
+
toolsChipLabels?: ToolsChipLabels;
|
|
284
|
+
/** Arbitrary slot rendered in the action row before the model selector. Use to inject app-level controls (e.g. a token-usage indicator). */
|
|
285
|
+
usageLimitsSlot?: ReactNode;
|
|
286
|
+
/**
|
|
287
|
+
* Called when the user pastes text whose length is ≥ `pasteTextThreshold` while
|
|
288
|
+
* `isAttachmentsEnabled` is `false`. The text is still inserted inline — the
|
|
289
|
+
* host is responsible for surfacing the error to the user.
|
|
290
|
+
*/
|
|
291
|
+
onMessageTooLong?: (length: number, max: number) => void;
|
|
260
292
|
}
|
|
261
293
|
//# 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,iEAAiE;IACjE,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,iDAAiD;IACjD,MAAM,EAAE,CACN,OAAO,EAAE,MAAM,EACf,eAAe,EAAE,iBAAiB,EAAE,EACpC,cAAc,EAAE,UAAU,EAAE,KACzB,IAAI,CAAC;IACV,+F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AI,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-beta`. */
|
|
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 {
|
|
@@ -56,6 +54,13 @@ export interface ModelSelectorLabels {
|
|
|
56
54
|
/** Accessible label for the close button in the mobile bottom-sheet. Defaults to `'Close'`. */
|
|
57
55
|
closeLabel?: string;
|
|
58
56
|
}
|
|
57
|
+
/** Labels for the selected-tools chip row that appears in the input when tools are active. */
|
|
58
|
+
export interface ToolsChipLabels {
|
|
59
|
+
/** Formats the consolidated count label for the mobile chip. Receives the number of selected tools. Defaults to English pluralization. */
|
|
60
|
+
countLabel?: (count: number) => string;
|
|
61
|
+
/** Returns the accessible label for the close button on a desktop chip. Receives the tool label. Defaults to `"Remove {toolLabel}"`. */
|
|
62
|
+
removeLabel?: (toolLabel: string) => string;
|
|
63
|
+
}
|
|
59
64
|
/** Props accepted by the `Input` component. */
|
|
60
65
|
export interface InputProps {
|
|
61
66
|
/**
|
|
@@ -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,13 @@ 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
|
+
* When `false`, long pasted plain text is inserted inline instead of being
|
|
132
|
+
* converted to a text attachment. Set to `false` when the selected model
|
|
133
|
+
* does not support attachments so that pasting a long prompt does not
|
|
134
|
+
* trigger an "Attachments not supported" error. Defaults to `true`.
|
|
135
|
+
*/
|
|
136
|
+
isAttachmentsEnabled?: boolean;
|
|
125
137
|
/**
|
|
126
138
|
* List of deployment items to populate the model selector menu. When `undefined`, the selector is not rendered.
|
|
127
139
|
* `iconUrl` on each item must already be a fully resolved URL usable in `<img src>` — the host app
|
|
@@ -143,7 +155,7 @@ export interface InputProps {
|
|
|
143
155
|
/**
|
|
144
156
|
* When `true`, the textarea always renders on its own row above the action bar
|
|
145
157
|
* (attach button at the start, footer actions at the end), instead of the
|
|
146
|
-
* compact single-row layout
|
|
158
|
+
* compact single-row layout. Used by the
|
|
147
159
|
* edit-message UI, which always wants the stacked layout.
|
|
148
160
|
*/
|
|
149
161
|
isStacked?: boolean;
|
|
@@ -176,7 +188,7 @@ export interface InputProps {
|
|
|
176
188
|
canSend: boolean;
|
|
177
189
|
onSend: () => void;
|
|
178
190
|
}) => ReactNode;
|
|
179
|
-
/** When `true`, blocks all text input, send, attach, and drop interactions. Starter/action buttons remain usable. Defaults to `false`. */
|
|
191
|
+
/** When `true`, blocks all text input, send, attach, and drop interactions. Starter/action buttons and the model selector remain usable. Defaults to `false`. */
|
|
180
192
|
isInputDisabled?: boolean;
|
|
181
193
|
/**
|
|
182
194
|
* When `true`, the model selector renders in a disabled, non-interactive
|
|
@@ -185,6 +197,12 @@ export interface InputProps {
|
|
|
185
197
|
* composer — typing and sending remain usable.
|
|
186
198
|
*/
|
|
187
199
|
isModelSelectorDisabled?: boolean;
|
|
200
|
+
/**
|
|
201
|
+
* When `true`, disables the send action without removing or dimming the
|
|
202
|
+
* send button itself. Independent of `isInputDisabled`/`isStreaming`.
|
|
203
|
+
* Defaults to `false`.
|
|
204
|
+
*/
|
|
205
|
+
isSendDisabled?: boolean;
|
|
188
206
|
/**
|
|
189
207
|
* When `true`, the mic button is rendered and voice recording is enabled.
|
|
190
208
|
* Derived by the host app from the selected deployment's `inputAttachmentTypes`.
|
|
@@ -197,8 +215,6 @@ export interface InputProps {
|
|
|
197
215
|
stopRecordingLabel?: string;
|
|
198
216
|
/** Accessible label for the discard / X button inside the voice bar. Defaults to `'Discard recording'`. */
|
|
199
217
|
discardRecordingLabel?: string;
|
|
200
|
-
/** `aria-label` for the elapsed-time region inside the voice bar. Defaults to `'Recording time'`. */
|
|
201
|
-
timerAriaLabel?: string;
|
|
202
218
|
/**
|
|
203
219
|
* Controls which key combination submits the message.
|
|
204
220
|
* - `SendOnEnter.Enter` (default): Enter submits; Shift+Enter inserts a newline.
|
|
@@ -215,6 +231,16 @@ export interface InputProps {
|
|
|
215
231
|
* Modal state is managed internally by the component.
|
|
216
232
|
*/
|
|
217
233
|
chatSettings?: ChatSettingsConfig;
|
|
234
|
+
/** Resolved tool toggle items rendered in a "Tools" submenu. When empty or absent, no Tools item is shown. */
|
|
235
|
+
toolsMenuItems?: ToolMenuItem[];
|
|
236
|
+
/** Called when a tool row is toggled. Receives the tool id. */
|
|
237
|
+
onToolToggle?: (toolId: string) => void;
|
|
238
|
+
/** Label for the "Tools" menu item and mobile sheet title. Defaults to `'Tools'`. */
|
|
239
|
+
toolsMenuTitle?: string;
|
|
240
|
+
/** Accessible label for the back arrow in the mobile tools bottom sheet. Defaults to `'Back'`. */
|
|
241
|
+
toolsBackLabel?: string;
|
|
242
|
+
/** Labels for the selected-tools chip row shown in the input when tools are active. */
|
|
243
|
+
toolsChipLabels?: ToolsChipLabels;
|
|
218
244
|
/** When `true`, focuses the textarea on mount. Defaults to `false`. */
|
|
219
245
|
autoFocus?: boolean;
|
|
220
246
|
/**
|
|
@@ -256,6 +282,14 @@ export interface InputProps {
|
|
|
256
282
|
* popover after a selection or an explicit dismiss.
|
|
257
283
|
*/
|
|
258
284
|
modelPickerOverlay?: (onClose: () => void) => ReactNode;
|
|
285
|
+
/** Arbitrary slot rendered in the action row before the model selector. Use to inject app-level controls (e.g. a token-usage indicator). */
|
|
286
|
+
usageLimitsSlot?: ReactNode;
|
|
287
|
+
/**
|
|
288
|
+
* Called when the user pastes text whose length is ≥ `pasteTextThreshold` while
|
|
289
|
+
* `isAttachmentsEnabled` is `false`. The text is still inserted inline — the
|
|
290
|
+
* host is responsible for surfacing the error to the user.
|
|
291
|
+
*/
|
|
292
|
+
onMessageTooLong?: (length: number, max: number) => void;
|
|
259
293
|
}
|
|
260
294
|
/** Values emitted by the chat-settings modal when the user clicks Save. */
|
|
261
295
|
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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AM,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.173",
|
|
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.173",
|
|
21
|
+
"@epam/ai-dial-chat-shared": "1.1.0-dev.173",
|
|
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.13.0-dev.26"
|
|
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"}
|