@epam/ai-dial-chat-shared 1.2.0-dev.98 → 1.2.0-rc.0
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/ConfirmationDialog/ConfirmationDialog.js +34 -0
- package/components/ConfirmationIdentityCard/ConfirmationIdentityCard.js +21 -0
- package/components/ConfirmationIdentityCard/ConfirmationIdentityCard.module.scss.js +6 -0
- package/components/ConfirmationIdentityRow/ConfirmationIdentityRow.js +24 -0
- package/components/ConfirmationIdentityRow/ConfirmationIdentityRow.module.scss.js +3 -0
- package/components/ConfirmationView/ConfirmationFooter.js +42 -0
- package/components/ConfirmationView/ConfirmationView.js +39 -0
- package/components/ConfirmationView/ConfirmationView.module.scss.js +7 -0
- package/components/CopyButton/CopyButton.js +5 -5
- package/components/EntityHeader/EntityHeader.js +14 -13
- package/components/EntityTypeLabel/EntityTypeLabel.js +2 -2
- package/components/FeaturedChip/FeaturedChip.js +9 -14
- package/components/InitialsAvatar/InitialsAvatar.js +10 -27
- package/components/MarkdownRenderer/CodeBlock/CodeBlock.js +65 -64
- package/components/MarkdownRenderer/MDMessageViewer.js +25 -17
- package/components/MarkdownRenderer/MarkdownRenderer.js +119 -118
- package/components/MarkdownRenderer/MarkdownRenderer.module.scss.js +7 -7
- package/components/MarkdownRenderer/Math/MarkdownMathBlock.module.scss.js +2 -2
- package/components/MarkdownRenderer/PlainTextRenderer.js +21 -0
- package/components/MarkdownRenderer/Table/MarkdownTable.js +62 -65
- package/components/MarkdownRenderer/Table/MarkdownTable.module.scss.js +11 -11
- package/components/MarkdownRenderer/Table/TableHeader.js +18 -21
- package/components/MarkdownRenderer/ThinkingShimmer.js +14 -0
- package/components/MarkdownWithPlaceholders/MarkdownWithPlaceholders.js +3 -2
- package/components/PanelEmptyState/PanelEmptyState.js +2 -1
- package/components/TextRefinementField/TextRefinementField.js +86 -0
- package/constants/dial.js +2 -2
- package/constants/resizable-fields.js +2 -2
- package/file-manager/DialFileManagerShell/DialFileManagerShell.js +248 -236
- package/file-manager/FileManagerAttachModal/FileManagerAttachModal.js +17 -14
- package/file-manager/OperationLoaderModal/OperationLoaderModal.js +17 -20
- package/file-manager/upload-batch.js +2 -2
- package/file-manager/upload-queue.js +17 -0
- package/file-manager.d.ts +25 -14
- package/file-manager.js +4 -3
- package/hooks/useTextRefinement.js +66 -0
- package/hooks/useUnsavedChangesGuard.js +30 -0
- package/index.css +2 -2
- package/index.d.ts +510 -46
- package/index.js +73 -62
- package/markdown.d.ts +64 -8
- package/markdown.js +5 -4
- package/models/chat.js +4 -2
- package/package.json +5 -5
- package/utils/entity-field-limits.js +4 -0
- package/utils/entity-type.js +15 -0
- package/utils/format-price.js +13 -9
- package/utils/is-skill-selection-unsupported.js +4 -0
- package/utils/syntax-highlighting.js +13 -0
- package/components/InitialsAvatar/InitialsAvatar.module.scss.js +0 -6
- package/file-manager/UploadProgressModal/UploadProgressModal.js +0 -50
package/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ComponentProps } from 'react';
|
|
2
2
|
import { Components } from 'react-markdown';
|
|
3
|
+
import { ConfirmationPopupVariant } from '@epam/ai-dial-ui-kit';
|
|
3
4
|
import { CSSProperties } from 'react';
|
|
4
5
|
import { default as default_2 } from 'classnames';
|
|
5
6
|
import { DIAL_ICON_SIZE } from '@epam/ai-dial-ui-kit';
|
|
@@ -18,8 +19,10 @@ import { FileManagerGridRow } from '@epam/ai-dial-react-file-manager';
|
|
|
18
19
|
import { GridApi } from 'ag-grid-community';
|
|
19
20
|
import { IRowNode } from 'ag-grid-community';
|
|
20
21
|
import { Options } from 'react-markdown';
|
|
22
|
+
import { PopupSize } from '@epam/ai-dial-ui-kit';
|
|
21
23
|
import { ReactNode } from 'react';
|
|
22
24
|
import { RefObject } from 'react';
|
|
25
|
+
import { TransferQueueLabels } from '@epam/ai-dial-ui-kit';
|
|
23
26
|
|
|
24
27
|
/** A single annotation attached to an assistant message, optionally citing a source document. */
|
|
25
28
|
export declare interface Annotation {
|
|
@@ -112,6 +115,10 @@ export declare interface ApplicationVisualizer {
|
|
|
112
115
|
passAuthInfo?: boolean;
|
|
113
116
|
/** Whether the host should pass an explicit access token. Accepted for operator-configuration parity; inert, because 1.0 auth is server-side and the browser holds no access token. */
|
|
114
117
|
passExplicitToken?: boolean;
|
|
118
|
+
/** When `true`, the host renders the inline frame without its border, rounded corners, background, and header divider. */
|
|
119
|
+
borderless?: boolean;
|
|
120
|
+
/** When `true`, the host hides the inline frame's header title text; the header actions stay visible. */
|
|
121
|
+
withoutTitle?: boolean;
|
|
115
122
|
}
|
|
116
123
|
|
|
117
124
|
/** The `APPLICATION_VISUALIZERS` registry: application id → grouped visualizer entry. */
|
|
@@ -187,6 +194,32 @@ export declare interface AvatarColorEntry {
|
|
|
187
194
|
foreground: string;
|
|
188
195
|
}
|
|
189
196
|
|
|
197
|
+
/**
|
|
198
|
+
* Server-owned association between an assistant message and the DIAL Core background job
|
|
199
|
+
* producing it. Present only on messages generated through the background path; its
|
|
200
|
+
* `generationId` identifies the message across saves, because messages have no ids.
|
|
201
|
+
*/
|
|
202
|
+
export declare interface BackgroundGeneration {
|
|
203
|
+
/** Client-supplied generation id of the request that started the job. */
|
|
204
|
+
generationId: string;
|
|
205
|
+
/** Current lifecycle status of the job's message. */
|
|
206
|
+
status: BackgroundGenerationStatus;
|
|
207
|
+
/** Server time (epoch ms) at which the pending placeholder was saved. */
|
|
208
|
+
startedAt: number;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/** Lifecycle status of an assistant message generated by a DIAL Core background Responses job. */
|
|
212
|
+
export declare enum BackgroundGenerationStatus {
|
|
213
|
+
/** The job is running (or its result has not been saved yet); the message is still being generated. */
|
|
214
|
+
Pending = "pending",
|
|
215
|
+
/** The job finished and its final answer is saved. */
|
|
216
|
+
Completed = "completed",
|
|
217
|
+
/** The user stopped the generation; the message holds whatever output was available. */
|
|
218
|
+
Stopped = "stopped",
|
|
219
|
+
/** The job failed, expired, or could not be started; see `streamErrorMessage`. */
|
|
220
|
+
Failed = "failed"
|
|
221
|
+
}
|
|
222
|
+
|
|
190
223
|
/** Decodes an inline `data` payload into a `Blob` of `mimeType`, treating the payload as raw UTF-8 text when it is not valid base64. */
|
|
191
224
|
export declare const base64ToBlob: (data: string, mimeType: string) => Blob;
|
|
192
225
|
|
|
@@ -251,6 +284,210 @@ export declare enum CodeBlockTheme {
|
|
|
251
284
|
*/
|
|
252
285
|
export declare const COMPACT_MARKDOWN_CLASS_NAMES: MarkdownRendererClassNames;
|
|
253
286
|
|
|
287
|
+
/**
|
|
288
|
+
* A confirmation step presented as a centered dialog: the same content block
|
|
289
|
+
* and action row the catalog's details panel shows in place, inside the kit's
|
|
290
|
+
* `Popup`. Use it wherever no details panel is open to host the step.
|
|
291
|
+
*/
|
|
292
|
+
export declare const ConfirmationDialog: FC<ConfirmationDialogProps>;
|
|
293
|
+
|
|
294
|
+
/** Props for `ConfirmationDialog`. */
|
|
295
|
+
export declare interface ConfirmationDialogProps extends ConfirmationViewProps {
|
|
296
|
+
/** Whether the dialog is open. */
|
|
297
|
+
open: boolean;
|
|
298
|
+
/** Dialog title. A string rather than a node, so the kit names the dialog with it. */
|
|
299
|
+
title: string;
|
|
300
|
+
/** Label of the confirming action button. */
|
|
301
|
+
confirmLabel: string;
|
|
302
|
+
/** Label of the cancel button. */
|
|
303
|
+
cancelLabel: string;
|
|
304
|
+
/** Whether the confirmed action is in flight. While it is, both actions and every dismissal route are blocked. Default: `false`. */
|
|
305
|
+
isLoading?: boolean;
|
|
306
|
+
/** Whether confirming is not yet possible because the step's required input is unsatisfied. Default: `false`. */
|
|
307
|
+
isConfirmDisabled?: boolean;
|
|
308
|
+
/** Status text announced to assistive tech while the action is in flight. */
|
|
309
|
+
loadingStatusLabel?: string;
|
|
310
|
+
/**
|
|
311
|
+
* Width cap of the dialog. Defaults to `PopupSize.Sm`, which is what a few
|
|
312
|
+
* lines of copy and two buttons need — the kit's own `Popup` defaults to
|
|
313
|
+
* `Md`, three times as wide.
|
|
314
|
+
*/
|
|
315
|
+
size?: PopupSize;
|
|
316
|
+
/** CSS class applied to the popup container, for example to constrain its width. */
|
|
317
|
+
popupClassName?: string;
|
|
318
|
+
/** CSS class applied to the dialog title. */
|
|
319
|
+
titleClassName?: string;
|
|
320
|
+
/** Called when the user confirms. */
|
|
321
|
+
onConfirm: () => void;
|
|
322
|
+
/** Called when the dialog is dismissed — Cancel, the header close control, Escape, or an outside click. */
|
|
323
|
+
onClose: () => void;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
/** Action row pinned to the bottom of a confirmation step: a text Cancel and a variant-colored confirm button. */
|
|
327
|
+
export declare const ConfirmationFooter: FC<ConfirmationFooterProps>;
|
|
328
|
+
|
|
329
|
+
/** Color overrides for `ConfirmationFooter`. */
|
|
330
|
+
export declare interface ConfirmationFooterColors {
|
|
331
|
+
/** Top border color of the action row. Defaults to `--stroke-tertiary`. */
|
|
332
|
+
border?: string;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
/** Props for `ConfirmationFooter`. */
|
|
336
|
+
export declare interface ConfirmationFooterProps {
|
|
337
|
+
/** Label of the confirming action button. */
|
|
338
|
+
confirmLabel: string;
|
|
339
|
+
/** Label of the cancel button. */
|
|
340
|
+
cancelLabel: string;
|
|
341
|
+
/** Palette of the confirm button; `Danger` also gives it a leading trash icon. Default: `ConfirmationPopupVariant.Info`. */
|
|
342
|
+
variant?: ConfirmationPopupVariant;
|
|
343
|
+
/** Whether the confirmed action is in flight. Default: `false`. */
|
|
344
|
+
isLoading?: boolean;
|
|
345
|
+
/**
|
|
346
|
+
* Whether confirming is not yet possible because the step's required input
|
|
347
|
+
* is unsatisfied — e.g. no published folder chosen yet. Kept separate from
|
|
348
|
+
* `isLoading`: a confirmation that cannot run yet and one already running are
|
|
349
|
+
* different states, and only `isLoading` disables cancel. Default: `false`.
|
|
350
|
+
*/
|
|
351
|
+
isConfirmDisabled?: boolean;
|
|
352
|
+
/** Status text announced to assistive tech while the action is in flight. */
|
|
353
|
+
loadingStatusLabel?: string;
|
|
354
|
+
/** Style overrides. */
|
|
355
|
+
styles?: ConfirmationFooterStyles;
|
|
356
|
+
/** Called when the user confirms. */
|
|
357
|
+
onConfirm: () => void;
|
|
358
|
+
/** Called when the user cancels. */
|
|
359
|
+
onCancel: () => void;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
/** Style overrides for `ConfirmationFooter`. */
|
|
363
|
+
export declare interface ConfirmationFooterStyles {
|
|
364
|
+
/** Color overrides applied as CSS custom properties. */
|
|
365
|
+
colors?: ConfirmationFooterColors;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
/** Tinted card echoing the resource a confirmation is about, so the user sees exactly what the action will affect. */
|
|
369
|
+
export declare const ConfirmationIdentityCard: FC<ConfirmationIdentityCardProps>;
|
|
370
|
+
|
|
371
|
+
/** Color overrides for `ConfirmationIdentityCard`. */
|
|
372
|
+
export declare interface ConfirmationIdentityCardColors {
|
|
373
|
+
/** Card surface in the `Info` variant. Defaults to `--bg-info`. */
|
|
374
|
+
background?: string;
|
|
375
|
+
/** Card surface in the `Danger` variant. Defaults to `--bg-control-error-alpha-active`. */
|
|
376
|
+
dangerBackground?: string;
|
|
377
|
+
/** Card border in the `Danger` variant. Defaults to `--stroke-error-alpha`. */
|
|
378
|
+
dangerBorder?: string;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
/** Props for `ConfirmationIdentityCard`. */
|
|
382
|
+
export declare interface ConfirmationIdentityCardProps {
|
|
383
|
+
/** Entity whose identity the card shows. Ignored when `children` is set. */
|
|
384
|
+
item?: EntityHeaderItem;
|
|
385
|
+
/** Row content rendered instead of the entity identity, for a resource that is not an `EntityHeaderItem`. */
|
|
386
|
+
children?: ReactNode;
|
|
387
|
+
/** Palette of the card surface. Default: `ConfirmationPopupVariant.Info`. */
|
|
388
|
+
variant?: ConfirmationPopupVariant;
|
|
389
|
+
/** Size of the entity icon in pixels. Default: `40`. */
|
|
390
|
+
iconSize?: number;
|
|
391
|
+
/** Style overrides. */
|
|
392
|
+
styles?: ConfirmationIdentityCardStyles;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
/** Style overrides for `ConfirmationIdentityCard`. */
|
|
396
|
+
export declare interface ConfirmationIdentityCardStyles {
|
|
397
|
+
/** Color overrides, applied to whichever surface `variant` selects. */
|
|
398
|
+
colors?: ConfirmationIdentityCardColors;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* Identity of a resource that has no `EntityHeaderItem` — a conversation or a
|
|
403
|
+
* scheduled task, say — laid out as icon, type, and name for
|
|
404
|
+
* `ConfirmationIdentityCard`'s `children`.
|
|
405
|
+
*/
|
|
406
|
+
export declare const ConfirmationIdentityRow: FC<ConfirmationIdentityRowProps>;
|
|
407
|
+
|
|
408
|
+
/** Color overrides for `ConfirmationIdentityRow`. */
|
|
409
|
+
export declare interface ConfirmationIdentityRowColors {
|
|
410
|
+
/** Type label above the name. Defaults to `--text-secondary`. */
|
|
411
|
+
typeLabelText?: string;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
/** Props for `ConfirmationIdentityRow`. */
|
|
415
|
+
export declare interface ConfirmationIdentityRowProps {
|
|
416
|
+
/** Icon shown ahead of the type and name. Supplied by the host, which owns the glyph set. */
|
|
417
|
+
icon?: ReactNode;
|
|
418
|
+
/** Resource type shown above the name. Pass it in sentence case — the default class uppercases it. */
|
|
419
|
+
typeLabel?: string;
|
|
420
|
+
/** Resource name, truncated rather than wrapped. */
|
|
421
|
+
name: string;
|
|
422
|
+
/** Style overrides. */
|
|
423
|
+
styles?: ConfirmationIdentityRowStyles;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
/** Style overrides for `ConfirmationIdentityRow`. */
|
|
427
|
+
export declare interface ConfirmationIdentityRowStyles {
|
|
428
|
+
/** Color overrides applied as CSS custom properties. */
|
|
429
|
+
colors?: ConfirmationIdentityRowColors;
|
|
430
|
+
/** Typography class applied to the type label. Defaults to `'dial-caption-lead-semi-text'`. */
|
|
431
|
+
typeLabelClassName?: string;
|
|
432
|
+
/** Typography class applied to the name. Defaults to `'dial-small-semi-text'`. */
|
|
433
|
+
nameClassName?: string;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
/** Body of an in-place confirmation step: the resource's identity card, the confirmation copy, and an optional consequence list. */
|
|
437
|
+
export declare const ConfirmationView: FC<ConfirmationViewProps>;
|
|
438
|
+
|
|
439
|
+
/** Color overrides for `ConfirmationView`. */
|
|
440
|
+
export declare interface ConfirmationViewColors {
|
|
441
|
+
/** Body-copy text color. Defaults to `--text-primary`. */
|
|
442
|
+
messageText?: string;
|
|
443
|
+
/** Consequence-bullet text color. Defaults to `--text-secondary`. */
|
|
444
|
+
consequenceText?: string;
|
|
445
|
+
/** Identity-card surface in the `Info` variant. Defaults to `--bg-info`. */
|
|
446
|
+
cardBackground?: string;
|
|
447
|
+
/** Identity-card surface in the `Danger` variant. Defaults to `--bg-control-error-alpha-active`. */
|
|
448
|
+
cardDangerBackground?: string;
|
|
449
|
+
/** Identity-card border in the `Danger` variant. Defaults to `--stroke-error-alpha`. */
|
|
450
|
+
cardDangerBorder?: string;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
/** Props for `ConfirmationView`. */
|
|
454
|
+
export declare interface ConfirmationViewProps {
|
|
455
|
+
/** Entity the confirmation is about, rendered as an identity card above the copy. Ignored when `identity` is set; with neither, no card is rendered. */
|
|
456
|
+
item?: EntityHeaderItem;
|
|
457
|
+
/**
|
|
458
|
+
* Identity card rendered in place of the default one, for a resource that is
|
|
459
|
+
* not an `EntityHeaderItem` — a scheduled task, say, which has no catalog
|
|
460
|
+
* entity type. Compose it from `ConfirmationIdentityCard` so the surface
|
|
461
|
+
* still matches `variant`.
|
|
462
|
+
*/
|
|
463
|
+
identity?: ReactNode;
|
|
464
|
+
/** Body copy explaining what confirming does. */
|
|
465
|
+
message: ReactNode;
|
|
466
|
+
/** Consequences listed as bullets under the message. An empty or omitted list renders nothing. */
|
|
467
|
+
consequences?: string[];
|
|
468
|
+
/** Palette of the identity card. Default: `ConfirmationPopupVariant.Info`. */
|
|
469
|
+
variant?: ConfirmationPopupVariant;
|
|
470
|
+
/** Typography class applied to the message and the bullet list. Defaults to `'dial-small-text'`. */
|
|
471
|
+
messageClassName?: string;
|
|
472
|
+
/** Style overrides. */
|
|
473
|
+
styles?: ConfirmationViewStyles;
|
|
474
|
+
/**
|
|
475
|
+
* Optional interactive slot rendered after the consequence bullets, for a
|
|
476
|
+
* confirmation that needs an input before it can be confirmed — choosing
|
|
477
|
+
* which published folder to unpublish from, say. This component stays
|
|
478
|
+
* presentational: whoever passes the slot owns its state, and disabling the
|
|
479
|
+
* confirm button until the input is satisfied is the caller's job. A step
|
|
480
|
+
* that needs no input passes nothing.
|
|
481
|
+
*/
|
|
482
|
+
children?: ReactNode;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
/** Style overrides for `ConfirmationView`. */
|
|
486
|
+
export declare interface ConfirmationViewStyles {
|
|
487
|
+
/** Color overrides applied as CSS custom properties. */
|
|
488
|
+
colors?: ConfirmationViewColors;
|
|
489
|
+
}
|
|
490
|
+
|
|
254
491
|
/** Options for the conflict-resolution popup shown during copy/move operations. */
|
|
255
492
|
export declare type ConflictResolutionPopupOptions = NonNullable<DialFileManagerComponentProps['conflictResolutionPopupOptions']>;
|
|
256
493
|
|
|
@@ -284,6 +521,8 @@ export declare interface Conversation {
|
|
|
284
521
|
assistantModelId: string;
|
|
285
522
|
/** Response format used when rendering messages. */
|
|
286
523
|
responseFormat?: ResponseFormat;
|
|
524
|
+
/** Open, feature-keyed container for conversation-level view state. This change owns only the `annotations` key; any other key is opaque and preserved as-is. */
|
|
525
|
+
customViewState?: Record<string, unknown>;
|
|
287
526
|
}
|
|
288
527
|
|
|
289
528
|
/** Metadata returned by the DIAL file/conversation listing API for a single resource node. */
|
|
@@ -451,7 +690,7 @@ export declare const copyToClipboard: (text: string) => Promise<boolean>;
|
|
|
451
690
|
/**
|
|
452
691
|
* A single MIME → visualizer mapping from the `CUSTOM_VISUALIZERS` registry.
|
|
453
692
|
* Field semantics are fixed by already-deployed visualizer applications and
|
|
454
|
-
* operator configurations — see `design.md` D9/D10 in the
|
|
693
|
+
* operator configurations — see `openspec/changes/archive/2026-07-30-add-custom-visualizers/design.md` D9/D10 in the
|
|
455
694
|
* `add-custom-visualizers` change for why `title` is required and
|
|
456
695
|
* `contentType` accepts a comma-separated list.
|
|
457
696
|
*/
|
|
@@ -675,7 +914,7 @@ export declare interface DialFileManagerShellLabels {
|
|
|
675
914
|
showHiddenFilesLabel: string;
|
|
676
915
|
/** Label shown when hidden files are currently hidden. */
|
|
677
916
|
hideHiddenFilesLabel: string;
|
|
678
|
-
/** Returns
|
|
917
|
+
/** Returns the text shown after the selection-count badge; the file manager renders the count itself, so omit it (e.g. "items selected"). */
|
|
679
918
|
getSelectionLabel: (count: number) => string;
|
|
680
919
|
/** Label for the "Upload files" action in the New menu. */
|
|
681
920
|
uploadFilesLabel: string;
|
|
@@ -727,20 +966,20 @@ export declare interface DialFileManagerShellLabels {
|
|
|
727
966
|
operationLoaderMoveTitle: string;
|
|
728
967
|
/** Cancel-button label in the operation loader modal. */
|
|
729
968
|
operationLoaderCancelLabel: string;
|
|
730
|
-
/** Returns the delete confirmation dialog title for the given item names. */
|
|
731
|
-
deleteConfirmTitle: (names: string[]) => ReactNode;
|
|
969
|
+
/** Returns the delete confirmation dialog title for the given item names and items; the items carry `nodeType`, so a folder and a file can be titled differently. */
|
|
970
|
+
deleteConfirmTitle: (names: string[], items: DialFile[]) => ReactNode;
|
|
732
971
|
/** Returns the delete confirmation dialog body for the given item names. */
|
|
733
972
|
deleteConfirmBody: (names: string[]) => ReactNode;
|
|
734
973
|
/** Confirm-button label in the delete confirmation dialog. */
|
|
735
974
|
deleteConfirmLabel: string;
|
|
736
975
|
/** Cancel-button label in the delete confirmation dialog. */
|
|
737
976
|
deleteCancelLabel: string;
|
|
738
|
-
/**
|
|
739
|
-
|
|
740
|
-
/**
|
|
741
|
-
|
|
742
|
-
/**
|
|
743
|
-
|
|
977
|
+
/** Accessible name of the delete confirmation dialog's close control. Unset falls back to the file manager's English default. */
|
|
978
|
+
deleteCloseLabel?: string;
|
|
979
|
+
/** Returns the upload queue heading for the number of files in it (e.g. "Uploading 5 files"). */
|
|
980
|
+
getUploadQueueTitle: (count: number) => string;
|
|
981
|
+
/** Translated strings for the upload `TransferQueue`; unset ones fall back to the kit's English defaults. */
|
|
982
|
+
uploadQueueLabels?: Partial<TransferQueueLabels>;
|
|
744
983
|
/** Empty-state title when a search yields no results. */
|
|
745
984
|
searchEmptyStateTitle: string;
|
|
746
985
|
/** Empty-state title for an empty subfolder. */
|
|
@@ -751,6 +990,8 @@ export declare interface DialFileManagerShellLabels {
|
|
|
751
990
|
emptyStateByTab: Record<DialFileManagerTabs, EmptyStateCopy>;
|
|
752
991
|
/** Per-tab tree header label. */
|
|
753
992
|
treeHeaderByTab: Record<DialFileManagerTabs, string>;
|
|
993
|
+
/** Search field placeholder per source tab of the browsed folder; a tab without an entry keeps the file manager's default. */
|
|
994
|
+
searchPlaceholderByTab?: Partial<Record<DialFileManagerTabs, string>>;
|
|
754
995
|
/** Messages for inline rename validation. */
|
|
755
996
|
renameValidationMessages: RenameValidationMessages;
|
|
756
997
|
/** Options for the conflict resolution popup. */
|
|
@@ -875,6 +1116,15 @@ export declare interface EmptyStateCopy {
|
|
|
875
1116
|
*/
|
|
876
1117
|
export declare const ensureDownloadFilename: (name: string, url: string | undefined, contentType: string | undefined) => string;
|
|
877
1118
|
|
|
1119
|
+
/** Maximum length of an entity's description. */
|
|
1120
|
+
export declare const ENTITY_DESCRIPTION_MAX_LENGTH = 2000;
|
|
1121
|
+
|
|
1122
|
+
/** Maximum length of an entity's instructions (prompt body, system prompt, skill instructions). */
|
|
1123
|
+
export declare const ENTITY_INSTRUCTIONS_MAX_LENGTH = 50000;
|
|
1124
|
+
|
|
1125
|
+
/** Maximum length of an entity's name or display name. */
|
|
1126
|
+
export declare const ENTITY_NAME_MAX_LENGTH = 256;
|
|
1127
|
+
|
|
878
1128
|
/** Background color per entity type — used for the featured chip surface. */
|
|
879
1129
|
export declare const ENTITY_TYPE_BG_COLOR: Record<CatalogEntityType, string>;
|
|
880
1130
|
|
|
@@ -906,6 +1156,8 @@ export declare interface EntityHeaderProps {
|
|
|
906
1156
|
nameClassName?: string;
|
|
907
1157
|
/** CSS class for the entity type label. Default: 'dial-caption-lead-semi-text'. */
|
|
908
1158
|
typeClassName?: string;
|
|
1159
|
+
/** Visible type text, e.g. a translated type name. Default: the raw `item.type` value. */
|
|
1160
|
+
typeLabel?: string;
|
|
909
1161
|
/** CSS class applied to the icon badge, e.g. to set border-radius. Default: 'rounded-[14px]'. */
|
|
910
1162
|
iconBadgeClassName?: string;
|
|
911
1163
|
/** Typography CSS class for the version text. Falls back to `ItemHeader`'s own default when omitted. */
|
|
@@ -943,8 +1195,13 @@ export declare interface EntityTypeLabelProps {
|
|
|
943
1195
|
type: CatalogEntityType;
|
|
944
1196
|
/** CSS class for the label text. Default: 'dial-caption-lead-semi-text'. */
|
|
945
1197
|
className?: string;
|
|
1198
|
+
/** Visible text, e.g. a translated type name. Default: the raw `type` value (`'MODEL'`, `'TOOLSET'`, …). */
|
|
1199
|
+
label?: string;
|
|
946
1200
|
}
|
|
947
1201
|
|
|
1202
|
+
/** Whether `value` is longer than `maxLength` characters. */
|
|
1203
|
+
export declare const exceedsMaxLength: (value: string, maxLength: number) => boolean;
|
|
1204
|
+
|
|
948
1205
|
/** A 1-based cell address on an XLSX sheet. */
|
|
949
1206
|
export declare interface ExcelCellAddress {
|
|
950
1207
|
/** 1-based row number. */
|
|
@@ -1006,9 +1263,9 @@ export declare const FeaturedChip: FC<FeaturedChipProps>;
|
|
|
1006
1263
|
export declare interface FeaturedChipProps {
|
|
1007
1264
|
/** Label text shown inside the chip. */
|
|
1008
1265
|
label: string;
|
|
1009
|
-
/**
|
|
1266
|
+
/** Typography class for the label. Defaults to the kit badge's `'dial-caption-lead-semi-text'`. */
|
|
1010
1267
|
className?: string;
|
|
1011
|
-
/** Entity category —
|
|
1268
|
+
/** Entity category — picks the chip's default colours. */
|
|
1012
1269
|
type: CatalogEntityType;
|
|
1013
1270
|
/** Style overrides merged over the chip's default per-entity-type colors, e.g. `{ backgroundColor, color, border }`. */
|
|
1014
1271
|
style?: CSSProperties;
|
|
@@ -1069,7 +1326,7 @@ export declare interface FileManagerController {
|
|
|
1069
1326
|
onSearchFiles: (folder: string, query: string) => void;
|
|
1070
1327
|
/** Search: true while a search request is in flight. */
|
|
1071
1328
|
isSearching: boolean;
|
|
1072
|
-
/** Search: flat
|
|
1329
|
+
/** Search: flat, unfiltered recursive listing of the current folder, or null when search is not active. */
|
|
1073
1330
|
searchResults: DialFile[] | null;
|
|
1074
1331
|
/** Search: clears results and exits search mode. */
|
|
1075
1332
|
clearSearchResults: () => void;
|
|
@@ -1093,7 +1350,9 @@ export declare interface FileManagerController {
|
|
|
1093
1350
|
uploadBatchState: FileUploadBatchState | null;
|
|
1094
1351
|
/** Upload: abort all in-flight and queued uploads. */
|
|
1095
1352
|
cancelUpload: () => void;
|
|
1096
|
-
/** Upload:
|
|
1353
|
+
/** Upload: abort one queued or in-flight upload by its entry id. */
|
|
1354
|
+
cancelUploadFile: (id: string) => void;
|
|
1355
|
+
/** Upload: empty the upload queue. */
|
|
1097
1356
|
clearUploadBatch: () => void;
|
|
1098
1357
|
/** Folder creation: called when user confirms a new folder name. */
|
|
1099
1358
|
onCreateFolder: (file: DialUploadFileItem, folderPath: string, fileId: string) => Promise<void>;
|
|
@@ -1155,6 +1414,8 @@ export declare interface FileManagerController {
|
|
|
1155
1414
|
onGetInfo: (file: DialFile) => void;
|
|
1156
1415
|
/** Metadata: resets fileMetadata/isFileMetadataLoading; passed to fileMetadataPopupOptions.clearMetadata. */
|
|
1157
1416
|
clearMetadata: () => void;
|
|
1417
|
+
/** Source tab of the browsed folder, never `All`; omitted by single-source controllers. */
|
|
1418
|
+
sectionTab?: DialFileManagerTabs;
|
|
1158
1419
|
}
|
|
1159
1420
|
|
|
1160
1421
|
/**
|
|
@@ -1173,11 +1434,11 @@ export declare interface FileManagerSelectableNode {
|
|
|
1173
1434
|
contentLength?: number;
|
|
1174
1435
|
}
|
|
1175
1436
|
|
|
1176
|
-
/** State of
|
|
1437
|
+
/** State of the upload queue, as returned by `useDialFileUploadBatch`. */
|
|
1177
1438
|
export declare interface FileUploadBatchState {
|
|
1178
|
-
/**
|
|
1439
|
+
/** Every file uploaded since the queue was last cleared, settled ones included. */
|
|
1179
1440
|
files: FileUploadEntry[];
|
|
1180
|
-
/** Whether the upload
|
|
1441
|
+
/** Whether the upload queue should be visible. */
|
|
1181
1442
|
isOpen: boolean;
|
|
1182
1443
|
}
|
|
1183
1444
|
|
|
@@ -1228,10 +1489,10 @@ export declare const formatFileSize: (bytes: number) => string;
|
|
|
1228
1489
|
/** Converts a timestamp to a relative time string (e.g. `'5 min ago'`, `'2 days ago'`); returns an empty string when the input is falsy or invalid. */
|
|
1229
1490
|
export declare const formatLastUsed: (timestamp?: number) => string;
|
|
1230
1491
|
|
|
1231
|
-
/** Formats an amount as USD, keeping up to six
|
|
1492
|
+
/** Formats an amount as USD, keeping up to six significant digits for sub-dollar values (e.g. `$3`, `$0.3`, `$0.00000015`). */
|
|
1232
1493
|
export declare const formatPrice: (value: number) => string;
|
|
1233
1494
|
|
|
1234
|
-
/** Formats a per-unit price string for display, e.g. `$3/M tokens` or `$0.
|
|
1495
|
+
/** Formats a per-unit price string for display, e.g. `$3/M tokens` or `$0.15/M chars without whitespace`. */
|
|
1235
1496
|
export declare const formatUnitPrice: (price: string | undefined, unit: string | undefined) => string | undefined;
|
|
1236
1497
|
|
|
1237
1498
|
/** Returns a UUID v4 string, with a fallback for non-secure browser contexts (HTTP deployments). */
|
|
@@ -1277,6 +1538,9 @@ export declare interface GroupedAttachmentsData {
|
|
|
1277
1538
|
layout: CustomVisualizerDataLayout;
|
|
1278
1539
|
}
|
|
1279
1540
|
|
|
1541
|
+
/** Whether `value` contains a control character (line break, tab, NUL, …) that a single-line name must not carry. */
|
|
1542
|
+
export declare const hasControlCharacters: (value: string) => boolean;
|
|
1543
|
+
|
|
1280
1544
|
/** Minimal hast shapes this plugin reads and writes. */
|
|
1281
1545
|
declare interface HastNode {
|
|
1282
1546
|
type: string;
|
|
@@ -1317,7 +1581,7 @@ export declare interface InitialsAvatarProps {
|
|
|
1317
1581
|
size: number;
|
|
1318
1582
|
/** Extra classes applied to the root element (e.g. `'shrink-0'`). */
|
|
1319
1583
|
className?: string;
|
|
1320
|
-
/**
|
|
1584
|
+
/** Type-scale class for the initials. Defaults to none: the initials are semibold at 40% of `size`. */
|
|
1321
1585
|
textClassName?: string;
|
|
1322
1586
|
}
|
|
1323
1587
|
|
|
@@ -1330,9 +1594,23 @@ export declare const isAudioTranscriptionSupported: (types?: string[]) => boolea
|
|
|
1330
1594
|
/** Returns true when any path segment starts with a dot (hidden file or folder). */
|
|
1331
1595
|
export declare const isHiddenPath: (path: string) => boolean;
|
|
1332
1596
|
|
|
1597
|
+
/** Whether a selected skill lacks explicitly confirmed support. */
|
|
1598
|
+
export declare const isSkillSelectionUnsupported: (skillUrl: string | null | undefined, isSkillsSupported: boolean | undefined) => boolean;
|
|
1599
|
+
|
|
1333
1600
|
/** Returns `true` when `msg` is a `StatusMessage`. */
|
|
1334
1601
|
export declare const isStatusMessage: (msg: Message | StatusMessage) => msg is StatusMessage;
|
|
1335
1602
|
|
|
1603
|
+
/**
|
|
1604
|
+
* Bounds input sent to synchronous syntax highlighters. Oversized input should
|
|
1605
|
+
* render as complete plain text instead. Limits count UTF-16 code units and
|
|
1606
|
+
* recognize LF, CRLF, and CR line endings. This is a size guard, not a timeout
|
|
1607
|
+
* or a guarantee against pathological grammars on smaller inputs.
|
|
1608
|
+
*/
|
|
1609
|
+
export declare const isSyntaxHighlightingAllowed: (text: string) => boolean;
|
|
1610
|
+
|
|
1611
|
+
/** Returns whether any file in the batch is still queued or uploading. */
|
|
1612
|
+
export declare const isUploadInProgress: (batchState: FileUploadBatchState | null) => boolean;
|
|
1613
|
+
|
|
1336
1614
|
/** Item title header with optional numeric or string postfix and trailing slot. */
|
|
1337
1615
|
export declare const ItemHeader: FC<ItemHeaderProps>;
|
|
1338
1616
|
|
|
@@ -1370,6 +1648,28 @@ export declare interface ItemHeaderProps {
|
|
|
1370
1648
|
shouldTruncateTitle?: boolean;
|
|
1371
1649
|
}
|
|
1372
1650
|
|
|
1651
|
+
/** A selectable language option for an additional-locale row. */
|
|
1652
|
+
export declare interface LocaleOption {
|
|
1653
|
+
/** Locale code (e.g. `'de'`). */
|
|
1654
|
+
code: string;
|
|
1655
|
+
/** Display label for the option (e.g. `'DE'`). */
|
|
1656
|
+
label: string;
|
|
1657
|
+
}
|
|
1658
|
+
|
|
1659
|
+
/** One additional (non-primary) locale's translation of an entity's name and description. */
|
|
1660
|
+
export declare interface LocalizedTextEntry {
|
|
1661
|
+
/** Stable client-side id for list rendering; not part of the persisted locale map. */
|
|
1662
|
+
id: string;
|
|
1663
|
+
/** Locale code this entry translates into (e.g. `'de'`). */
|
|
1664
|
+
language: string;
|
|
1665
|
+
/** Translated name for this locale. */
|
|
1666
|
+
name: string;
|
|
1667
|
+
/** Translated description for this locale. */
|
|
1668
|
+
description: string;
|
|
1669
|
+
}
|
|
1670
|
+
|
|
1671
|
+
export declare const MARKDOWN_EDITOR_FILL_HEIGHT_CLASS_NAME = "[&_.w-md-editor:not(.w-md-editor-fullscreen)]:!h-[var(--resizable-field-max-height,70vh)]";
|
|
1672
|
+
|
|
1373
1673
|
export declare const MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME = "[&_.w-md-editor:not(.w-md-editor-fullscreen)]:max-h-[var(--resizable-field-max-height,70vh)]";
|
|
1374
1674
|
|
|
1375
1675
|
export declare const MARKDOWN_EDITOR_PREVIEW_LIST_CLASS_NAME = "[&_.wmde-markdown>ol]:list-decimal [&_.wmde-markdown_ul]:list-disc [&_.wmde-markdown_ul_ul]:list-[circle] [&_.wmde-markdown_ul_ul_ul]:list-[square]";
|
|
@@ -1457,11 +1757,6 @@ export declare interface MarkdownRendererClassNames extends MarkdownTableClassNa
|
|
|
1457
1757
|
strong?: string;
|
|
1458
1758
|
/** Typography class for `<em>`. Defaults to `'italic'`. */
|
|
1459
1759
|
em?: string;
|
|
1460
|
-
/**
|
|
1461
|
-
* @deprecated The `<pre>` wrapper is now a fragment passthrough; this class no longer applies
|
|
1462
|
-
* to fenced code blocks. Migrate to `codeBlockContainer` for the block container.
|
|
1463
|
-
*/
|
|
1464
|
-
codeBlock?: string;
|
|
1465
1760
|
/** Extra classes on the {@link MarkdownCodeBlock} outer container. */
|
|
1466
1761
|
codeBlockContainer?: string;
|
|
1467
1762
|
/** Extra classes on the {@link MarkdownCodeBlock} header bar. */
|
|
@@ -1506,7 +1801,7 @@ export declare interface MarkdownRendererColors {
|
|
|
1506
1801
|
blockquoteText?: string;
|
|
1507
1802
|
/** Text color for `<a>` links. Defaults to `--text-accent`. */
|
|
1508
1803
|
linkText?: string;
|
|
1509
|
-
/** Focus-visible outline color for `<a>` links. Defaults to `--stroke-focus
|
|
1804
|
+
/** Focus-visible outline color for `<a>` links. Defaults to `--stroke-focus`. */
|
|
1510
1805
|
linkFocus?: string;
|
|
1511
1806
|
/** Text color for `<th>` table header cells. Defaults to `--text-secondary`. */
|
|
1512
1807
|
tableHeaderText?: string;
|
|
@@ -1553,6 +1848,8 @@ export declare interface MarkdownRendererProps {
|
|
|
1553
1848
|
codeBlockCopyLabel?: string;
|
|
1554
1849
|
/** Accessible label for the copy button after copying. Defaults to `'Copied!'`. */
|
|
1555
1850
|
codeBlockCopiedLabel?: string;
|
|
1851
|
+
/** Accessible label for the download button in code blocks. Defaults to `'Download code'`. */
|
|
1852
|
+
codeBlockDownloadLabel?: string;
|
|
1556
1853
|
/** Syntax highlight color theme for code blocks and tables. Defaults to `'dark'`. */
|
|
1557
1854
|
codeBlockTheme?: CodeBlockTheme;
|
|
1558
1855
|
/** Color overrides applied as CSS custom properties. */
|
|
@@ -1594,7 +1891,7 @@ export declare interface MarkdownTableColors {
|
|
|
1594
1891
|
border?: string;
|
|
1595
1892
|
/** Scrollbar thumb/track color. */
|
|
1596
1893
|
scrollbar?: string;
|
|
1597
|
-
/** Edge-fade mask color. */
|
|
1894
|
+
/** Edge-fade mask color; only its alpha is used. Defaults to `--stroke-focus-black`. */
|
|
1598
1895
|
fade?: string;
|
|
1599
1896
|
/** Divider color between rows. Defaults to `--stroke-tertiary`. */
|
|
1600
1897
|
rowDivider?: string;
|
|
@@ -1656,15 +1953,32 @@ export declare interface MarkdownWithPlaceholdersProps {
|
|
|
1656
1953
|
content: string;
|
|
1657
1954
|
/** Typography class overrides applied to `<h1>`–`<h6>`. Defaults to no override. */
|
|
1658
1955
|
headingClassName?: string;
|
|
1956
|
+
/** Accessible label for the copy button in code blocks. Forwarded to {@link MarkdownRenderer}; defaults to `'Copy code'`. */
|
|
1957
|
+
codeBlockCopyLabel?: string;
|
|
1958
|
+
/** Status announced after a code block has been copied. Forwarded to {@link MarkdownRenderer}; defaults to `'Copied!'`. */
|
|
1959
|
+
codeBlockCopiedLabel?: string;
|
|
1960
|
+
/** Accessible label for the download button in code blocks. Forwarded to {@link MarkdownRenderer}; defaults to `'Download code'`. */
|
|
1961
|
+
codeBlockDownloadLabel?: string;
|
|
1962
|
+
/** Accessible label for a table's scrollable region. Forwarded to {@link MarkdownRenderer}; defaults to `'Scrollable table'`. */
|
|
1963
|
+
tableScrollRegionAriaLabel?: string;
|
|
1964
|
+
/** Accessible label for a block formula's scrollable region. Forwarded to {@link MarkdownRenderer}; defaults to `'Scrollable formula'`. */
|
|
1965
|
+
mathScrollRegionAriaLabel?: string;
|
|
1659
1966
|
}
|
|
1660
1967
|
|
|
1661
|
-
/** Renders assistant message content as formatted markdown. */
|
|
1968
|
+
/** Renders assistant message content as formatted markdown, or as escaped plain text when `isPlainText` is set. */
|
|
1662
1969
|
export declare const MDMessageViewer: FC<MDMessageViewerProps>;
|
|
1663
1970
|
|
|
1664
1971
|
/** Props for the {@link MDMessageViewer} markdown renderer. */
|
|
1665
1972
|
declare interface MDMessageViewerProps {
|
|
1666
1973
|
/** Raw markdown string to render. */
|
|
1667
1974
|
content: string;
|
|
1975
|
+
/**
|
|
1976
|
+
* Renders `content` verbatim as escaped plain text instead of running the
|
|
1977
|
+
* Markdown pipeline — the conversation's `plain_text` response format.
|
|
1978
|
+
* Markdown-only props (`components`, `urlTransform`, the code-block and
|
|
1979
|
+
* table labels) do not apply while it is set. Defaults to `false`.
|
|
1980
|
+
*/
|
|
1981
|
+
isPlainText?: boolean;
|
|
1668
1982
|
/** Enables gradual reveal for appended streaming content. */
|
|
1669
1983
|
isStreaming?: boolean;
|
|
1670
1984
|
/**
|
|
@@ -1687,6 +2001,8 @@ declare interface MDMessageViewerProps {
|
|
|
1687
2001
|
codeBlockCopyLabel?: string;
|
|
1688
2002
|
/** Accessible label for the copy button after copying. Forwarded to {@link MarkdownRenderer}. */
|
|
1689
2003
|
codeBlockCopiedLabel?: string;
|
|
2004
|
+
/** Accessible label for the code-block download button. Forwarded to {@link MarkdownRenderer}. */
|
|
2005
|
+
codeBlockDownloadLabel?: string;
|
|
1690
2006
|
/** Syntax highlight color theme for code blocks. Forwarded to {@link MarkdownRenderer}. */
|
|
1691
2007
|
codeBlockTheme?: CodeBlockTheme;
|
|
1692
2008
|
/** Localized labels for Markdown table actions. Forwarded to {@link MarkdownRenderer}. */
|
|
@@ -1696,6 +2012,8 @@ declare interface MDMessageViewerProps {
|
|
|
1696
2012
|
tableOnOpenInCanvas?: (markdown: string) => void;
|
|
1697
2013
|
/** Accessible label for a table's scrollable region. Forwarded to {@link MarkdownRenderer}. */
|
|
1698
2014
|
tableScrollRegionAriaLabel?: string;
|
|
2015
|
+
/** Accessible label for a block formula's scrollable region. Forwarded to {@link MarkdownRenderer}. */
|
|
2016
|
+
mathScrollRegionAriaLabel?: string;
|
|
1699
2017
|
/**
|
|
1700
2018
|
* Per-element typography classes. Defaults to {@link DEFAULT_MARKDOWN_CLASS_NAMES};
|
|
1701
2019
|
* pass {@link COMPACT_MARKDOWN_CLASS_NAMES} for the smaller body scale. Give a
|
|
@@ -1726,6 +2044,8 @@ export declare interface Message {
|
|
|
1726
2044
|
streamErrorMessage?: string;
|
|
1727
2045
|
/** Set on an assistant message whose generation the user stopped; the content is whatever had streamed by then. */
|
|
1728
2046
|
wasStoppedByUser?: boolean;
|
|
2047
|
+
/** Set on an assistant message produced by a DIAL Core background job; absent on every other message. */
|
|
2048
|
+
backgroundGeneration?: BackgroundGeneration;
|
|
1729
2049
|
/** Allows extra SDK-level properties to pass through when serializing to DIAL Core. */
|
|
1730
2050
|
[key: string]: unknown;
|
|
1731
2051
|
}
|
|
@@ -1999,6 +2319,8 @@ export declare interface PanelEmptyStateProps {
|
|
|
1999
2319
|
labelClassName?: string;
|
|
2000
2320
|
/** CSS class applied to the empty-state container. */
|
|
2001
2321
|
containerClassName?: string;
|
|
2322
|
+
/** Decorative illustration above the label. Defaults to the kit's `NoDataContent` document mark. */
|
|
2323
|
+
icon?: ReactNode;
|
|
2002
2324
|
}
|
|
2003
2325
|
|
|
2004
2326
|
/** Selector that targets an axis-aligned bounding box on a specific PDF page. */
|
|
@@ -2020,6 +2342,44 @@ export declare interface PdfBBoxSelector {
|
|
|
2020
2342
|
/** Returns a deterministic colour-pair for the given display name. */
|
|
2021
2343
|
export declare const pickAvatarColor: (name: string) => AvatarColorEntry;
|
|
2022
2344
|
|
|
2345
|
+
/**
|
|
2346
|
+
* Renders message text as plain text: no Markdown pipeline, no raw HTML, no
|
|
2347
|
+
* syntax highlighting. The text is a React text child, so it is escaped by
|
|
2348
|
+
* construction — a table, a heading, or `**bold**` reaches the reader exactly
|
|
2349
|
+
* as the model emitted it, which is what a conversation's `plain_text`
|
|
2350
|
+
* response format promises.
|
|
2351
|
+
*
|
|
2352
|
+
* Lives beside {@link MarkdownRenderer} because it is the other half of the
|
|
2353
|
+
* same choice: both render an assistant message body, and both are selected
|
|
2354
|
+
* by `MDMessageViewer` from the conversation's response format.
|
|
2355
|
+
*/
|
|
2356
|
+
export declare const PlainTextRenderer: FC<PlainTextRendererProps>;
|
|
2357
|
+
|
|
2358
|
+
/** Props for {@link PlainTextRenderer}. */
|
|
2359
|
+
export declare interface PlainTextRendererProps {
|
|
2360
|
+
/** Message text. Rendered verbatim — never parsed as Markdown or HTML. */
|
|
2361
|
+
content: string;
|
|
2362
|
+
/** Classes applied to the renderer root. */
|
|
2363
|
+
containerClassName?: string;
|
|
2364
|
+
/** When true, appended content is revealed gradually for smoother streaming updates. */
|
|
2365
|
+
isStreaming?: boolean;
|
|
2366
|
+
/** Reveal speed used while `isStreaming` is true. Defaults to 120 characters per second. */
|
|
2367
|
+
streamCharactersPerSecond?: number;
|
|
2368
|
+
/**
|
|
2369
|
+
* Typography classes. Only `p` is read — the single paragraph the renderer
|
|
2370
|
+
* emits — so the same object a Markdown message is styled with keeps both
|
|
2371
|
+
* formats on one type scale.
|
|
2372
|
+
*/
|
|
2373
|
+
classNames?: Pick<MarkdownRendererClassNames, 'p'>;
|
|
2374
|
+
/**
|
|
2375
|
+
* Label shown with a shimmer animation while `isStreaming` is true and no
|
|
2376
|
+
* content has arrived yet. Defaults to `'Thinking'`.
|
|
2377
|
+
*/
|
|
2378
|
+
thinkingLabel?: string;
|
|
2379
|
+
/** Color overrides applied as CSS custom properties. */
|
|
2380
|
+
colors?: Pick<MarkdownRendererColors, 'thinkingPrimary' | 'thinkingSecondary'>;
|
|
2381
|
+
}
|
|
2382
|
+
|
|
2023
2383
|
/**
|
|
2024
2384
|
* Selector that targets a character range inside a single shape on one PPTX
|
|
2025
2385
|
* slide. Confirmed against captured DIAL Core responses: unlike
|
|
@@ -2083,6 +2443,9 @@ export declare interface ProviderInfo {
|
|
|
2083
2443
|
label: string;
|
|
2084
2444
|
}
|
|
2085
2445
|
|
|
2446
|
+
/** DIAL Core bucket that holds published (organization-wide) resources, readable by every user. */
|
|
2447
|
+
export declare const PUBLIC_BUCKET = "public";
|
|
2448
|
+
|
|
2086
2449
|
/**
|
|
2087
2450
|
* Rehype plugin that wraps every `{{name}}` placeholder in a span so it can be
|
|
2088
2451
|
* styled apart from the surrounding prose. Placeholders inside code are left
|
|
@@ -2098,7 +2461,7 @@ export declare type RenameValidationMessages = NonNullable<DialFileManagerCompon
|
|
|
2098
2461
|
|
|
2099
2462
|
/**
|
|
2100
2463
|
* A skill referenced from `custom_content.skills` — DIAL Core's `RequestSkill`
|
|
2101
|
-
* schema (
|
|
2464
|
+
* schema ([ai-dial-core#1956](https://github.com/epam/ai-dial-core/pull/1956)): an object with a non-blank `url`; Core rejects any other
|
|
2102
2465
|
* entry shape (e.g. a bare string) with 400.
|
|
2103
2466
|
*/
|
|
2104
2467
|
export declare interface RequestSkill {
|
|
@@ -2216,6 +2579,14 @@ export declare interface Stage {
|
|
|
2216
2579
|
* Rendered only when present — never inferred from `name`.
|
|
2217
2580
|
*/
|
|
2218
2581
|
tag?: string;
|
|
2582
|
+
/**
|
|
2583
|
+
* `index` of the stage that produced this one, in the same message's stage
|
|
2584
|
+
* array. In a streaming delta it names the parent's streaming `index` and is
|
|
2585
|
+
* sent only on the chunk that opens the child; in a complete non-streaming
|
|
2586
|
+
* array without indexes it names the parent's array position. Absent for a
|
|
2587
|
+
* top-level stage; `0` is a valid parent.
|
|
2588
|
+
*/
|
|
2589
|
+
parent_stage_index?: number;
|
|
2219
2590
|
}
|
|
2220
2591
|
|
|
2221
2592
|
/** Status of a single agent stage. */
|
|
@@ -2368,6 +2739,84 @@ export declare interface TextCharacterRangeSelector {
|
|
|
2368
2739
|
end: number;
|
|
2369
2740
|
}
|
|
2370
2741
|
|
|
2742
|
+
/** Asynchronous rewriting callback supplied by the consuming host. */
|
|
2743
|
+
export declare type TextRefinementCallback = (value: string, signal: AbortSignal) => Promise<string>;
|
|
2744
|
+
|
|
2745
|
+
/** Label row with Refine/Undo actions and live feedback around one refinable field. */
|
|
2746
|
+
export declare const TextRefinementField: FC<TextRefinementFieldProps>;
|
|
2747
|
+
|
|
2748
|
+
/** Props for `TextRefinementField`. */
|
|
2749
|
+
export declare interface TextRefinementFieldProps {
|
|
2750
|
+
/** When false, renders `children` alone — no label row, actions, or feedback. */
|
|
2751
|
+
isEnabled: boolean;
|
|
2752
|
+
/** Id of the labelled control; also the prefix for the label and error ids. */
|
|
2753
|
+
fieldId: string;
|
|
2754
|
+
/** Visible field label; names the group. */
|
|
2755
|
+
label: string;
|
|
2756
|
+
/** Class applied to the `<label>`, after the kit `Label` defaults. */
|
|
2757
|
+
labelClassName?: string;
|
|
2758
|
+
/** Marks the label as required. */
|
|
2759
|
+
required?: boolean;
|
|
2760
|
+
/** Action, status, and error copy. */
|
|
2761
|
+
labels?: TextRefinementLabels;
|
|
2762
|
+
/** The field's `useTextRefinement` result. */
|
|
2763
|
+
refinement: TextRefinementResult;
|
|
2764
|
+
/** Disables both actions. */
|
|
2765
|
+
disabled: boolean;
|
|
2766
|
+
/** Class applied to the status message and the error message. */
|
|
2767
|
+
feedbackClassName?: string;
|
|
2768
|
+
/** Class applied to the error message, after `feedbackClassName`. */
|
|
2769
|
+
errorClassName?: string;
|
|
2770
|
+
/** The refinable control, whose id must equal `fieldId`. */
|
|
2771
|
+
children: ReactNode;
|
|
2772
|
+
}
|
|
2773
|
+
|
|
2774
|
+
/** Translatable copy for `TextRefinementField`; every key has an English default. */
|
|
2775
|
+
export declare interface TextRefinementLabels {
|
|
2776
|
+
/** Refinement copy. Defaults to 'Refine with AI'. */
|
|
2777
|
+
refineWithAiLabel?: string;
|
|
2778
|
+
/** Refinement copy. Defaults to 'Undo'. */
|
|
2779
|
+
refineUndoLabel?: string;
|
|
2780
|
+
/** Refinement copy. Defaults to 'Could not refine this text. Please try again.'. */
|
|
2781
|
+
refineErrorLabel?: string;
|
|
2782
|
+
/** Refinement copy. Defaults to 'Refining text'. */
|
|
2783
|
+
refinePendingAriaLabel?: string;
|
|
2784
|
+
/** Refinement copy. Defaults to 'Text refined. Undo is available.'. */
|
|
2785
|
+
refineSuccessAriaLabel?: string;
|
|
2786
|
+
/** Refinement copy. Defaults to 'Original text restored.'. */
|
|
2787
|
+
refineUndoAriaLabel?: string;
|
|
2788
|
+
/** Refinement copy. Defaults to 'No changes were needed.'. */
|
|
2789
|
+
refineUnchangedAriaLabel?: string;
|
|
2790
|
+
}
|
|
2791
|
+
|
|
2792
|
+
/** Controls and feedback for a single field. */
|
|
2793
|
+
export declare interface TextRefinementResult {
|
|
2794
|
+
/** Current field-local feedback state. */
|
|
2795
|
+
state: TextRefinementState;
|
|
2796
|
+
/** Whether this field has a request in progress. */
|
|
2797
|
+
isPending: boolean;
|
|
2798
|
+
/** Whether the current value can be refined. */
|
|
2799
|
+
canRefine: boolean;
|
|
2800
|
+
/** Whether an original baseline can be restored. */
|
|
2801
|
+
canUndo: boolean;
|
|
2802
|
+
/** Refines the latest committed value; duplicate activation is ignored. */
|
|
2803
|
+
refine: () => Promise<void>;
|
|
2804
|
+
/** Restores the baseline from before the first successful refinement. */
|
|
2805
|
+
undo: () => void;
|
|
2806
|
+
/** Cancels work and clears feedback and Undo without modifying the value. */
|
|
2807
|
+
reset: () => void;
|
|
2808
|
+
}
|
|
2809
|
+
|
|
2810
|
+
/** Field-local refinement feedback state. */
|
|
2811
|
+
export declare enum TextRefinementState {
|
|
2812
|
+
Idle = "idle",
|
|
2813
|
+
Pending = "pending",
|
|
2814
|
+
Success = "success",
|
|
2815
|
+
Error = "error",
|
|
2816
|
+
Restored = "restored",
|
|
2817
|
+
Unchanged = "unchanged"
|
|
2818
|
+
}
|
|
2819
|
+
|
|
2371
2820
|
/** A single selectable UI theme. */
|
|
2372
2821
|
export declare interface Theme {
|
|
2373
2822
|
/** Unique theme identifier (e.g. `'dark'`, `'light'`). */
|
|
@@ -2466,6 +2915,18 @@ export declare const truncateToUtf8Bytes: (str: string, maxBytes: number) => str
|
|
|
2466
2915
|
/** Decodes a base64 string into raw bytes, or `undefined` if the string is not valid base64. */
|
|
2467
2916
|
export declare const tryBase64ToBytes: (base64: string) => Uint8Array | undefined;
|
|
2468
2917
|
|
|
2918
|
+
/** Result of {@link useUnsavedChangesGuard}. */
|
|
2919
|
+
export declare interface UnsavedChangesGuardResult {
|
|
2920
|
+
/** Runs `action` immediately when nothing is dirty; otherwise defers it and opens the confirmation. */
|
|
2921
|
+
guard: (action: () => void) => void;
|
|
2922
|
+
/** Whether the discard confirmation should be shown. */
|
|
2923
|
+
isConfirmOpen: boolean;
|
|
2924
|
+
/** Closes the confirmation and runs the deferred action. */
|
|
2925
|
+
confirm: () => void;
|
|
2926
|
+
/** Closes the confirmation and drops the deferred action. */
|
|
2927
|
+
dismiss: () => void;
|
|
2928
|
+
}
|
|
2929
|
+
|
|
2469
2930
|
/** Result of successfully uploading an {@link Attachment}. */
|
|
2470
2931
|
export declare interface UploadedAttachmentResult {
|
|
2471
2932
|
/** The DIAL Core file URL the attachment was uploaded to. */
|
|
@@ -2474,23 +2935,6 @@ export declare interface UploadedAttachmentResult {
|
|
|
2474
2935
|
name: string;
|
|
2475
2936
|
}
|
|
2476
2937
|
|
|
2477
|
-
/** Modal showing per-file upload progress with a cancel action. */
|
|
2478
|
-
export declare const UploadProgressModal: FC<UploadProgressModalProps>;
|
|
2479
|
-
|
|
2480
|
-
/** Props for the upload-progress modal. */
|
|
2481
|
-
export declare interface UploadProgressModalProps {
|
|
2482
|
-
/** Current batch state with per-file entries and open flag. */
|
|
2483
|
-
batchState: FileUploadBatchState;
|
|
2484
|
-
/** Title shown in the modal header (e.g. "Uploading files"). */
|
|
2485
|
-
uploadProgressTitle: string;
|
|
2486
|
-
/** Summary text below the title (e.g. "3 of 5 uploaded"). */
|
|
2487
|
-
uploadProgressText: string;
|
|
2488
|
-
/** Label for the cancel button. */
|
|
2489
|
-
cancelLabel: string;
|
|
2490
|
-
/** Called when the user clicks Cancel. */
|
|
2491
|
-
onCancel: () => void;
|
|
2492
|
-
}
|
|
2493
|
-
|
|
2494
2938
|
/**
|
|
2495
2939
|
* Writes the height still available below an element into a CSS custom
|
|
2496
2940
|
* property, so a user-resizable control inside it can be capped at the space
|
|
@@ -2605,4 +3049,24 @@ export declare interface UserProfile {
|
|
|
2605
3049
|
isAdmin: boolean;
|
|
2606
3050
|
}
|
|
2607
3051
|
|
|
3052
|
+
/** Preserves an author's draft and Undo baseline across asynchronous controlled updates. */
|
|
3053
|
+
export declare const useTextRefinement: (options: UseTextRefinementOptions) => TextRefinementResult;
|
|
3054
|
+
|
|
3055
|
+
/** Controlled value and lifecycle inputs for one refinable field. */
|
|
3056
|
+
export declare interface UseTextRefinementOptions {
|
|
3057
|
+
/** Current controlled field value. */
|
|
3058
|
+
value: string;
|
|
3059
|
+
/** Host rewriting callback. Omission disables refinement and clears its state. */
|
|
3060
|
+
onRefine?: TextRefinementCallback;
|
|
3061
|
+
/** Publishes a successful result or the original Undo baseline. */
|
|
3062
|
+
onChange: (value: string) => void;
|
|
3063
|
+
/** Disables refinement and cancels active work when true. Defaults to false. */
|
|
3064
|
+
disabled?: boolean;
|
|
3065
|
+
/** Draft identity; changing it resets state even when text is equal. */
|
|
3066
|
+
resetKey?: unknown;
|
|
3067
|
+
}
|
|
3068
|
+
|
|
3069
|
+
/** Defers leaving a form with unsaved changes until the user confirms, and asks the browser to warn before the page unloads. */
|
|
3070
|
+
export declare const useUnsavedChangesGuard: (isDirty: boolean) => UnsavedChangesGuardResult;
|
|
3071
|
+
|
|
2608
3072
|
export { }
|