@epam/ai-dial-chat-shared 1.2.0-dev.3 → 1.2.0-dev.300

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.
Files changed (58) hide show
  1. package/components/ConfirmationDialog/ConfirmationDialog.js +34 -0
  2. package/components/ConfirmationIdentityCard/ConfirmationIdentityCard.js +21 -0
  3. package/components/ConfirmationIdentityCard/ConfirmationIdentityCard.module.scss.js +6 -0
  4. package/components/ConfirmationIdentityRow/ConfirmationIdentityRow.js +24 -0
  5. package/components/ConfirmationIdentityRow/ConfirmationIdentityRow.module.scss.js +3 -0
  6. package/components/ConfirmationView/ConfirmationFooter.js +42 -0
  7. package/components/ConfirmationView/ConfirmationView.js +39 -0
  8. package/components/ConfirmationView/ConfirmationView.module.scss.js +7 -0
  9. package/components/FeaturedChip/FeaturedChip.js +9 -14
  10. package/components/InitialsAvatar/InitialsAvatar.js +10 -27
  11. package/components/MarkdownRenderer/CodeBlock/CodeBlock.js +65 -63
  12. package/components/MarkdownRenderer/CodeBlock/CodeBlock.module.scss.js +6 -6
  13. package/components/MarkdownRenderer/MDMessageViewer.js +25 -17
  14. package/components/MarkdownRenderer/MarkdownRenderer.js +119 -118
  15. package/components/MarkdownRenderer/MarkdownRenderer.module.scss.js +7 -7
  16. package/components/MarkdownRenderer/Math/MarkdownMathBlock.js +19 -18
  17. package/components/MarkdownRenderer/Math/MarkdownMathBlock.module.scss.js +2 -2
  18. package/components/MarkdownRenderer/PlainTextRenderer.js +21 -0
  19. package/components/MarkdownRenderer/Table/MarkdownTable.js +71 -56
  20. package/components/MarkdownRenderer/Table/MarkdownTable.module.scss.js +11 -11
  21. package/components/MarkdownRenderer/Table/TableHeader.js +18 -21
  22. package/components/MarkdownRenderer/Table/table-serialization.js +23 -3
  23. package/components/MarkdownRenderer/Table/useMarkdownTableActions/useMarkdownTableActions.js +48 -62
  24. package/components/MarkdownRenderer/ThinkingShimmer.js +14 -0
  25. package/components/MarkdownWithPlaceholders/MarkdownWithPlaceholders.js +3 -2
  26. package/components/PanelEmptyState/PanelEmptyState.js +2 -1
  27. package/components/TextRefinementField/TextRefinementField.js +86 -0
  28. package/constants/dial.js +2 -2
  29. package/constants/mime-types.js +49 -2
  30. package/constants/public-class-names.js +10 -0
  31. package/constants/resizable-fields.js +2 -2
  32. package/file-manager/DialFileManagerShell/DialFileManagerShell.js +257 -239
  33. package/file-manager/FileManagerAttachModal/FileManagerAttachModal.js +36 -32
  34. package/file-manager/OperationLoaderModal/OperationLoaderModal.js +17 -20
  35. package/file-manager/upload-batch.js +2 -2
  36. package/file-manager/upload-queue.js +17 -0
  37. package/file-manager.d.ts +35 -20
  38. package/file-manager.js +4 -3
  39. package/hooks/useTextRefinement.js +66 -0
  40. package/hooks/useUnsavedChangesGuard.js +30 -0
  41. package/index.css +2 -2
  42. package/index.d.ts +616 -53
  43. package/index.js +73 -62
  44. package/markdown.d.ts +79 -15
  45. package/markdown.js +13 -11
  46. package/models/chat.js +4 -2
  47. package/package.json +5 -5
  48. package/types/attachment.js +1 -1
  49. package/utils/entity-field-limits.js +4 -0
  50. package/utils/entity-type.js +15 -0
  51. package/utils/file-download.js +6 -6
  52. package/utils/is-skill-selection-unsupported.js +4 -0
  53. package/utils/latex.js +5 -3
  54. package/utils/merge-class.js +5 -4
  55. package/utils/mime-type.js +10 -6
  56. package/utils/syntax-highlighting.js +13 -0
  57. package/components/InitialsAvatar/InitialsAvatar.module.scss.js +0 -6
  58. package/file-manager/UploadProgressModal/UploadProgressModal.js +0 -56
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 {
@@ -70,6 +73,57 @@ export declare interface AnnotationTarget {
70
73
  selector?: AnnotationSelector;
71
74
  }
72
75
 
76
+ /**
77
+ * A single application → grouped visualizer mapping from the
78
+ * `APPLICATION_VISUALIZERS` registry. Field semantics are fixed by
79
+ * already-deployed visualizer applications and operator configurations
80
+ * carried over from legacy Chat 0.x, which is why `contentType` is optional
81
+ * here while `CustomVisualizer.contentType` is required.
82
+ */
83
+ export declare interface ApplicationVisualizer {
84
+ /**
85
+ * The postMessage protocol namespace, NOT a display label. Every message
86
+ * exchanged with the iframe is prefixed `${title}/…`, and the iframe-side
87
+ * visualizer application must be constructed with this identical string
88
+ * as its `appName`. A mismatch is a silent failure — the iframe loads but
89
+ * never receives data. Also used as the inline frame's header text.
90
+ */
91
+ title: string;
92
+ /** Human-readable description of the visualizer. Accepted for operator-configuration parity; not consumed by host logic. */
93
+ description?: string;
94
+ /** Icon URL or identifier for the visualizer. Accepted for operator-configuration parity; not consumed by host logic. */
95
+ icon?: string;
96
+ /**
97
+ * Comma-separated list of MIME types this entry claims (e.g.
98
+ * `'application/vnd.plotly.v1+json'` or
99
+ * `'application/vnd.plotly.v1+json, application/vnd.vega.v5+json'`).
100
+ * Stored verbatim; splitting happens at lookup time. When omitted, the
101
+ * entry claims every attachment that carries a URL.
102
+ */
103
+ contentType?: string;
104
+ /** Absolute HTTP(S) URL of the visualizer iframe. */
105
+ url: string;
106
+ /** Milliseconds to wait for a `send()` request's `/RESPONSE` before rejecting. Defaults to `10000`. Does NOT bound the initial handshake. */
107
+ requestTimeout?: number;
108
+ /** Suggested initial width of the visualizer surface in pixels. Forwarded as-is in `CustomVisualizerDataLayout`. */
109
+ width?: number;
110
+ /** Suggested initial height of the visualizer surface in pixels. Forwarded as-is in `CustomVisualizerDataLayout`, and used by the host to size the inline frame. */
111
+ height?: number;
112
+ /** Suggested height on mobile viewports in pixels. Forwarded as-is in `CustomVisualizerDataLayout`, and used by the host to size the inline frame on mobile. */
113
+ mobileHeight?: number;
114
+ /** Whether the host should pass auth info to the visualizer. Accepted for operator-configuration parity; inert, because 1.0 auth is server-side and the browser holds no access token. */
115
+ passAuthInfo?: boolean;
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. */
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;
122
+ }
123
+
124
+ /** The `APPLICATION_VISUALIZERS` registry: application id → grouped visualizer entry. */
125
+ export declare type ApplicationVisualizerRegistry = Record<string, ApplicationVisualizer>;
126
+
73
127
  /** Attachment selected locally by the user before it is sent to the backend. */
74
128
  export declare interface Attachment extends DisplayAttachment {
75
129
  /** The underlying browser `File` object selected by the user. */
@@ -93,7 +147,9 @@ export declare enum AttachmentErrorReason {
93
147
  /** Upload failed because the device was offline. */
94
148
  Network = "network",
95
149
  /** File MIME type is not in the deployment's inputAttachmentTypes list. */
96
- UnsupportedType = "unsupported-type"
150
+ UnsupportedType = "unsupported-type",
151
+ /** File size exceeds the configured maximum attachment size. */
152
+ FileTooLarge = "file-too-large"
97
153
  }
98
154
 
99
155
  /** A file attachment referenced by a citation — same shape as `MessageAttachment` but scoped to annotations. */
@@ -138,6 +194,32 @@ export declare interface AvatarColorEntry {
138
194
  foreground: string;
139
195
  }
140
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
+
141
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. */
142
224
  export declare const base64ToBlob: (data: string, mimeType: string) => Blob;
143
225
 
@@ -174,6 +256,19 @@ export declare enum CatalogEntityType {
174
256
  Prompt = "PROMPT"
175
257
  }
176
258
 
259
+ export declare const CHAT_SHARED_CLASS: {
260
+ /** The bordered container of a fenced code block. */
261
+ readonly codeBlock: "dial-chat-shared-code-block";
262
+ /** The code block's sticky header, holding the language label and actions. */
263
+ readonly codeBlockHeader: "dial-chat-shared-code-block-header";
264
+ /** The bordered container of a Markdown table. */
265
+ readonly table: "dial-chat-shared-table";
266
+ /** The scrolling box around a Markdown table, which owns its overflow. */
267
+ readonly tableScroll: "dial-chat-shared-table-scroll";
268
+ /** The scrolling box around a display-math block. */
269
+ readonly mathBlock: "dial-chat-shared-math-block";
270
+ };
271
+
177
272
  /** Color theme for syntax highlighting. */
178
273
  export declare enum CodeBlockTheme {
179
274
  /** Dark syntax-highlighting theme. */
@@ -189,6 +284,210 @@ export declare enum CodeBlockTheme {
189
284
  */
190
285
  export declare const COMPACT_MARKDOWN_CLASS_NAMES: MarkdownRendererClassNames;
191
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
+
192
491
  /** Options for the conflict-resolution popup shown during copy/move operations. */
193
492
  export declare type ConflictResolutionPopupOptions = NonNullable<DialFileManagerComponentProps['conflictResolutionPopupOptions']>;
194
493
 
@@ -222,6 +521,8 @@ export declare interface Conversation {
222
521
  assistantModelId: string;
223
522
  /** Response format used when rendering messages. */
224
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>;
225
526
  }
226
527
 
227
528
  /** Metadata returned by the DIAL file/conversation listing API for a single resource node. */
@@ -276,6 +577,8 @@ export declare interface ConversationTransferJob {
276
577
  * {@link ConversationTransferJobStatus.Warning}.
277
578
  */
278
579
  warningCode?: ConversationTransferWarningCode;
580
+ /** Untranslated names of skipped attachments, when available for this warning. */
581
+ warningNames?: string[];
279
582
  }
280
583
 
281
584
  /** Lifecycle status of a queued export/import job. */
@@ -387,7 +690,7 @@ export declare const copyToClipboard: (text: string) => Promise<boolean>;
387
690
  /**
388
691
  * A single MIME → visualizer mapping from the `CUSTOM_VISUALIZERS` registry.
389
692
  * Field semantics are fixed by already-deployed visualizer applications and
390
- * 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
391
694
  * `add-custom-visualizers` change for why `title` is required and
392
695
  * `contentType` accepts a comma-separated list.
393
696
  */
@@ -611,7 +914,7 @@ export declare interface DialFileManagerShellLabels {
611
914
  showHiddenFilesLabel: string;
612
915
  /** Label shown when hidden files are currently hidden. */
613
916
  hideHiddenFilesLabel: string;
614
- /** Returns a bulk-selection count label (e.g. "3 selected"). */
917
+ /** Returns the text shown after the selection-count badge; the file manager renders the count itself, so omit it (e.g. "items selected"). */
615
918
  getSelectionLabel: (count: number) => string;
616
919
  /** Label for the "Upload files" action in the New menu. */
617
920
  uploadFilesLabel: string;
@@ -663,20 +966,20 @@ export declare interface DialFileManagerShellLabels {
663
966
  operationLoaderMoveTitle: string;
664
967
  /** Cancel-button label in the operation loader modal. */
665
968
  operationLoaderCancelLabel: string;
666
- /** Returns the delete confirmation dialog title for the given item names. */
667
- 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;
668
971
  /** Returns the delete confirmation dialog body for the given item names. */
669
972
  deleteConfirmBody: (names: string[]) => ReactNode;
670
973
  /** Confirm-button label in the delete confirmation dialog. */
671
974
  deleteConfirmLabel: string;
672
975
  /** Cancel-button label in the delete confirmation dialog. */
673
976
  deleteCancelLabel: string;
674
- /** Title for the upload progress modal. */
675
- uploadProgressTitle: string;
676
- /** Cancel-button label in the upload progress modal. */
677
- cancelLabel: string;
678
- /** Returns upload progress text (e.g. "3 of 5 uploaded"). */
679
- getUploadProgressText: (done: number, total: number) => string;
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>;
680
983
  /** Empty-state title when a search yields no results. */
681
984
  searchEmptyStateTitle: string;
682
985
  /** Empty-state title for an empty subfolder. */
@@ -687,6 +990,8 @@ export declare interface DialFileManagerShellLabels {
687
990
  emptyStateByTab: Record<DialFileManagerTabs, EmptyStateCopy>;
688
991
  /** Per-tab tree header label. */
689
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>>;
690
995
  /** Messages for inline rename validation. */
691
996
  renameValidationMessages: RenameValidationMessages;
692
997
  /** Options for the conflict resolution popup. */
@@ -811,6 +1116,15 @@ export declare interface EmptyStateCopy {
811
1116
  */
812
1117
  export declare const ensureDownloadFilename: (name: string, url: string | undefined, contentType: string | undefined) => string;
813
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
+
814
1128
  /** Background color per entity type — used for the featured chip surface. */
815
1129
  export declare const ENTITY_TYPE_BG_COLOR: Record<CatalogEntityType, string>;
816
1130
 
@@ -881,6 +1195,9 @@ export declare interface EntityTypeLabelProps {
881
1195
  className?: string;
882
1196
  }
883
1197
 
1198
+ /** Whether `value` is longer than `maxLength` characters. */
1199
+ export declare const exceedsMaxLength: (value: string, maxLength: number) => boolean;
1200
+
884
1201
  /** A 1-based cell address on an XLSX sheet. */
885
1202
  export declare interface ExcelCellAddress {
886
1203
  /** 1-based row number. */
@@ -942,9 +1259,9 @@ export declare const FeaturedChip: FC<FeaturedChipProps>;
942
1259
  export declare interface FeaturedChipProps {
943
1260
  /** Label text shown inside the chip. */
944
1261
  label: string;
945
- /** Additional CSS class for typography overrides. */
1262
+ /** Typography class for the label. Defaults to the kit badge's `'dial-caption-lead-semi-text'`. */
946
1263
  className?: string;
947
- /** Entity category — resolves the label's default color via ENTITY_TYPE_COLOR when `style` doesn't set one. */
1264
+ /** Entity category — picks the chip's default colours. */
948
1265
  type: CatalogEntityType;
949
1266
  /** Style overrides merged over the chip's default per-entity-type colors, e.g. `{ backgroundColor, color, border }`. */
950
1267
  style?: CSSProperties;
@@ -1005,7 +1322,7 @@ export declare interface FileManagerController {
1005
1322
  onSearchFiles: (folder: string, query: string) => void;
1006
1323
  /** Search: true while a search request is in flight. */
1007
1324
  isSearching: boolean;
1008
- /** Search: flat list of matching files, or null when search is not active. */
1325
+ /** Search: flat, unfiltered recursive listing of the current folder, or null when search is not active. */
1009
1326
  searchResults: DialFile[] | null;
1010
1327
  /** Search: clears results and exits search mode. */
1011
1328
  clearSearchResults: () => void;
@@ -1029,7 +1346,9 @@ export declare interface FileManagerController {
1029
1346
  uploadBatchState: FileUploadBatchState | null;
1030
1347
  /** Upload: abort all in-flight and queued uploads. */
1031
1348
  cancelUpload: () => void;
1032
- /** Upload: dismiss the progress modal after the batch has settled. */
1349
+ /** Upload: abort one queued or in-flight upload by its entry id. */
1350
+ cancelUploadFile: (id: string) => void;
1351
+ /** Upload: empty the upload queue. */
1033
1352
  clearUploadBatch: () => void;
1034
1353
  /** Folder creation: called when user confirms a new folder name. */
1035
1354
  onCreateFolder: (file: DialUploadFileItem, folderPath: string, fileId: string) => Promise<void>;
@@ -1091,6 +1410,8 @@ export declare interface FileManagerController {
1091
1410
  onGetInfo: (file: DialFile) => void;
1092
1411
  /** Metadata: resets fileMetadata/isFileMetadataLoading; passed to fileMetadataPopupOptions.clearMetadata. */
1093
1412
  clearMetadata: () => void;
1413
+ /** Source tab of the browsed folder, never `All`; omitted by single-source controllers. */
1414
+ sectionTab?: DialFileManagerTabs;
1094
1415
  }
1095
1416
 
1096
1417
  /**
@@ -1109,11 +1430,11 @@ export declare interface FileManagerSelectableNode {
1109
1430
  contentLength?: number;
1110
1431
  }
1111
1432
 
1112
- /** State of an in-progress or just-settled upload batch, as returned by `useDialFileUploadBatch`. */
1433
+ /** State of the upload queue, as returned by `useDialFileUploadBatch`. */
1113
1434
  export declare interface FileUploadBatchState {
1114
- /** Individual file entries in this batch. */
1435
+ /** Every file uploaded since the queue was last cleared, settled ones included. */
1115
1436
  files: FileUploadEntry[];
1116
- /** Whether the upload progress modal should be visible. */
1437
+ /** Whether the upload queue should be visible. */
1117
1438
  isOpen: boolean;
1118
1439
  }
1119
1440
 
@@ -1176,6 +1497,9 @@ export declare const generateUUID: () => string;
1176
1497
  /** Classifies a MIME type into an `AttachmentType` by prefix (`image/*` / `audio/*`), defaulting to `File`. */
1177
1498
  export declare const getAttachmentTypeFromMime: (mimeType: string | undefined) => AttachmentType;
1178
1499
 
1500
+ /** Lowercases a MIME type and strips its parameters, e.g. `'Application/JSON; charset=utf-8'` -> `'application/json'`. */
1501
+ export declare const getBaseMimeType: (mimeType: string) => string;
1502
+
1179
1503
  /** Returns the file extension (without a leading dot) for a fenced-code-block language identifier, defaulting to `txt`. */
1180
1504
  export declare const getFileExtensionForLanguage: (language: string) => string;
1181
1505
 
@@ -1192,6 +1516,27 @@ export declare const getParentFolderPath: (path: string) => string;
1192
1516
  /** Returns the UTF-8 byte length of `str`. */
1193
1517
  export declare const getUtf8ByteLength: (str: string) => number;
1194
1518
 
1519
+ /** A single attachment handed to a grouped visualizer inside `SEND_GROUPED_VISUALIZE_DATA`. */
1520
+ export declare interface GroupedAttachmentItem {
1521
+ /** Absolute URL of the attachment, resolved by the host before sending. */
1522
+ url: string;
1523
+ /** The attachment's own MIME type. */
1524
+ mimeType: string;
1525
+ /** Presentation layout plus the opaque per-attachment payload. */
1526
+ visualizerData: CustomVisualizerData;
1527
+ }
1528
+
1529
+ /** Payload of a `SEND_GROUPED_VISUALIZE_DATA` request: every claimed attachment plus the shared presentation layout. */
1530
+ export declare interface GroupedAttachmentsData {
1531
+ /** One item per claimed attachment, in the message's attachment order. */
1532
+ attachments: GroupedAttachmentItem[];
1533
+ /** Presentation layout hints shared by every item. */
1534
+ layout: CustomVisualizerDataLayout;
1535
+ }
1536
+
1537
+ /** Whether `value` contains a control character (line break, tab, NUL, …) that a single-line name must not carry. */
1538
+ export declare const hasControlCharacters: (value: string) => boolean;
1539
+
1195
1540
  /** Minimal hast shapes this plugin reads and writes. */
1196
1541
  declare interface HastNode {
1197
1542
  type: string;
@@ -1232,7 +1577,7 @@ export declare interface InitialsAvatarProps {
1232
1577
  size: number;
1233
1578
  /** Extra classes applied to the root element (e.g. `'shrink-0'`). */
1234
1579
  className?: string;
1235
- /** Extra classes applied to the initials text element (e.g. `'dial-h3-text'`). */
1580
+ /** Type-scale class for the initials. Defaults to none: the initials are semibold at 40% of `size`. */
1236
1581
  textClassName?: string;
1237
1582
  }
1238
1583
 
@@ -1245,9 +1590,23 @@ export declare const isAudioTranscriptionSupported: (types?: string[]) => boolea
1245
1590
  /** Returns true when any path segment starts with a dot (hidden file or folder). */
1246
1591
  export declare const isHiddenPath: (path: string) => boolean;
1247
1592
 
1593
+ /** Whether a selected skill lacks explicitly confirmed support. */
1594
+ export declare const isSkillSelectionUnsupported: (skillUrl: string | null | undefined, isSkillsSupported: boolean | undefined) => boolean;
1595
+
1248
1596
  /** Returns `true` when `msg` is a `StatusMessage`. */
1249
1597
  export declare const isStatusMessage: (msg: Message | StatusMessage) => msg is StatusMessage;
1250
1598
 
1599
+ /**
1600
+ * Bounds input sent to synchronous syntax highlighters. Oversized input should
1601
+ * render as complete plain text instead. Limits count UTF-16 code units and
1602
+ * recognize LF, CRLF, and CR line endings. This is a size guard, not a timeout
1603
+ * or a guarantee against pathological grammars on smaller inputs.
1604
+ */
1605
+ export declare const isSyntaxHighlightingAllowed: (text: string) => boolean;
1606
+
1607
+ /** Returns whether any file in the batch is still queued or uploading. */
1608
+ export declare const isUploadInProgress: (batchState: FileUploadBatchState | null) => boolean;
1609
+
1251
1610
  /** Item title header with optional numeric or string postfix and trailing slot. */
1252
1611
  export declare const ItemHeader: FC<ItemHeaderProps>;
1253
1612
 
@@ -1285,7 +1644,29 @@ export declare interface ItemHeaderProps {
1285
1644
  shouldTruncateTitle?: boolean;
1286
1645
  }
1287
1646
 
1288
- export declare const MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME = "[&_.w-md-editor]:max-h-[var(--resizable-field-max-height,70vh)]";
1647
+ /** A selectable language option for an additional-locale row. */
1648
+ export declare interface LocaleOption {
1649
+ /** Locale code (e.g. `'de'`). */
1650
+ code: string;
1651
+ /** Display label for the option (e.g. `'DE'`). */
1652
+ label: string;
1653
+ }
1654
+
1655
+ /** One additional (non-primary) locale's translation of an entity's name and description. */
1656
+ export declare interface LocalizedTextEntry {
1657
+ /** Stable client-side id for list rendering; not part of the persisted locale map. */
1658
+ id: string;
1659
+ /** Locale code this entry translates into (e.g. `'de'`). */
1660
+ language: string;
1661
+ /** Translated name for this locale. */
1662
+ name: string;
1663
+ /** Translated description for this locale. */
1664
+ description: string;
1665
+ }
1666
+
1667
+ export declare const MARKDOWN_EDITOR_FILL_HEIGHT_CLASS_NAME = "[&_.w-md-editor:not(.w-md-editor-fullscreen)]:!h-[var(--resizable-field-max-height,70vh)] [&_.w-md-editor-bar]:hidden";
1668
+
1669
+ 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)]";
1289
1670
 
1290
1671
  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]";
1291
1672
 
@@ -1372,11 +1753,6 @@ export declare interface MarkdownRendererClassNames extends MarkdownTableClassNa
1372
1753
  strong?: string;
1373
1754
  /** Typography class for `<em>`. Defaults to `'italic'`. */
1374
1755
  em?: string;
1375
- /**
1376
- * @deprecated The `<pre>` wrapper is now a fragment passthrough; this class no longer applies
1377
- * to fenced code blocks. Migrate to `codeBlockContainer` for the block container.
1378
- */
1379
- codeBlock?: string;
1380
1756
  /** Extra classes on the {@link MarkdownCodeBlock} outer container. */
1381
1757
  codeBlockContainer?: string;
1382
1758
  /** Extra classes on the {@link MarkdownCodeBlock} header bar. */
@@ -1421,7 +1797,7 @@ export declare interface MarkdownRendererColors {
1421
1797
  blockquoteText?: string;
1422
1798
  /** Text color for `<a>` links. Defaults to `--text-accent`. */
1423
1799
  linkText?: string;
1424
- /** Focus-visible outline color for `<a>` links. Defaults to `--stroke-focus-black`. */
1800
+ /** Focus-visible outline color for `<a>` links. Defaults to `--stroke-focus`. */
1425
1801
  linkFocus?: string;
1426
1802
  /** Text color for `<th>` table header cells. Defaults to `--text-secondary`. */
1427
1803
  tableHeaderText?: string;
@@ -1468,6 +1844,8 @@ export declare interface MarkdownRendererProps {
1468
1844
  codeBlockCopyLabel?: string;
1469
1845
  /** Accessible label for the copy button after copying. Defaults to `'Copied!'`. */
1470
1846
  codeBlockCopiedLabel?: string;
1847
+ /** Accessible label for the download button in code blocks. Defaults to `'Download code'`. */
1848
+ codeBlockDownloadLabel?: string;
1471
1849
  /** Syntax highlight color theme for code blocks and tables. Defaults to `'dark'`. */
1472
1850
  codeBlockTheme?: CodeBlockTheme;
1473
1851
  /** Color overrides applied as CSS custom properties. */
@@ -1487,9 +1865,7 @@ export declare interface MarkdownRendererProps {
1487
1865
  export declare const MarkdownTable: FC<MarkdownTableProps>;
1488
1866
 
1489
1867
  export declare interface MarkdownTableActionLabels {
1490
- copyCsvLabel?: string;
1491
- copyTxtLabel?: string;
1492
- copyMarkdownLabel?: string;
1868
+ copyLabel?: string;
1493
1869
  copiedLabel?: string;
1494
1870
  downloadCsvLabel?: string;
1495
1871
  openInCanvasLabel?: string;
@@ -1511,23 +1887,20 @@ export declare interface MarkdownTableColors {
1511
1887
  border?: string;
1512
1888
  /** Scrollbar thumb/track color. */
1513
1889
  scrollbar?: string;
1514
- /** Edge-fade mask color. */
1890
+ /** Edge-fade mask color; only its alpha is used. Defaults to `--stroke-focus-black`. */
1515
1891
  fade?: string;
1516
1892
  /** Divider color between rows. Defaults to `--stroke-tertiary`. */
1517
1893
  rowDivider?: string;
1518
- /** Background of even-indexed body rows. Defaults to `--bg-layer-base`. */
1519
- rowZebraBackground?: string;
1520
1894
  /** Background of a body row on hover. Defaults to `--bg-control-accent-alpha-hover`. */
1521
1895
  rowHoverBackground?: string;
1522
1896
  }
1523
1897
 
1524
1898
  export declare enum MarkdownTableCopyFormat {
1525
1899
  Csv = "csv",
1526
- Txt = "txt",
1527
1900
  Markdown = "markdown"
1528
1901
  }
1529
1902
 
1530
- /** A table header action rendered as an icon button. */
1903
+ /** A table action rendered as an icon button. */
1531
1904
  export declare interface MarkdownTableHeaderAction {
1532
1905
  /** Stable accessible name and tooltip text. */
1533
1906
  label: string;
@@ -1576,15 +1949,32 @@ export declare interface MarkdownWithPlaceholdersProps {
1576
1949
  content: string;
1577
1950
  /** Typography class overrides applied to `<h1>`–`<h6>`. Defaults to no override. */
1578
1951
  headingClassName?: string;
1952
+ /** Accessible label for the copy button in code blocks. Forwarded to {@link MarkdownRenderer}; defaults to `'Copy code'`. */
1953
+ codeBlockCopyLabel?: string;
1954
+ /** Status announced after a code block has been copied. Forwarded to {@link MarkdownRenderer}; defaults to `'Copied!'`. */
1955
+ codeBlockCopiedLabel?: string;
1956
+ /** Accessible label for the download button in code blocks. Forwarded to {@link MarkdownRenderer}; defaults to `'Download code'`. */
1957
+ codeBlockDownloadLabel?: string;
1958
+ /** Accessible label for a table's scrollable region. Forwarded to {@link MarkdownRenderer}; defaults to `'Scrollable table'`. */
1959
+ tableScrollRegionAriaLabel?: string;
1960
+ /** Accessible label for a block formula's scrollable region. Forwarded to {@link MarkdownRenderer}; defaults to `'Scrollable formula'`. */
1961
+ mathScrollRegionAriaLabel?: string;
1579
1962
  }
1580
1963
 
1581
- /** Renders assistant message content as formatted markdown. */
1964
+ /** Renders assistant message content as formatted markdown, or as escaped plain text when `isPlainText` is set. */
1582
1965
  export declare const MDMessageViewer: FC<MDMessageViewerProps>;
1583
1966
 
1584
1967
  /** Props for the {@link MDMessageViewer} markdown renderer. */
1585
1968
  declare interface MDMessageViewerProps {
1586
1969
  /** Raw markdown string to render. */
1587
1970
  content: string;
1971
+ /**
1972
+ * Renders `content` verbatim as escaped plain text instead of running the
1973
+ * Markdown pipeline — the conversation's `plain_text` response format.
1974
+ * Markdown-only props (`components`, `urlTransform`, the code-block and
1975
+ * table labels) do not apply while it is set. Defaults to `false`.
1976
+ */
1977
+ isPlainText?: boolean;
1588
1978
  /** Enables gradual reveal for appended streaming content. */
1589
1979
  isStreaming?: boolean;
1590
1980
  /**
@@ -1607,6 +1997,8 @@ declare interface MDMessageViewerProps {
1607
1997
  codeBlockCopyLabel?: string;
1608
1998
  /** Accessible label for the copy button after copying. Forwarded to {@link MarkdownRenderer}. */
1609
1999
  codeBlockCopiedLabel?: string;
2000
+ /** Accessible label for the code-block download button. Forwarded to {@link MarkdownRenderer}. */
2001
+ codeBlockDownloadLabel?: string;
1610
2002
  /** Syntax highlight color theme for code blocks. Forwarded to {@link MarkdownRenderer}. */
1611
2003
  codeBlockTheme?: CodeBlockTheme;
1612
2004
  /** Localized labels for Markdown table actions. Forwarded to {@link MarkdownRenderer}. */
@@ -1616,6 +2008,8 @@ declare interface MDMessageViewerProps {
1616
2008
  tableOnOpenInCanvas?: (markdown: string) => void;
1617
2009
  /** Accessible label for a table's scrollable region. Forwarded to {@link MarkdownRenderer}. */
1618
2010
  tableScrollRegionAriaLabel?: string;
2011
+ /** Accessible label for a block formula's scrollable region. Forwarded to {@link MarkdownRenderer}. */
2012
+ mathScrollRegionAriaLabel?: string;
1619
2013
  /**
1620
2014
  * Per-element typography classes. Defaults to {@link DEFAULT_MARKDOWN_CLASS_NAMES};
1621
2015
  * pass {@link COMPACT_MARKDOWN_CLASS_NAMES} for the smaller body scale. Give a
@@ -1646,6 +2040,8 @@ export declare interface Message {
1646
2040
  streamErrorMessage?: string;
1647
2041
  /** Set on an assistant message whose generation the user stopped; the content is whatever had streamed by then. */
1648
2042
  wasStoppedByUser?: boolean;
2043
+ /** Set on an assistant message produced by a DIAL Core background job; absent on every other message. */
2044
+ backgroundGeneration?: BackgroundGeneration;
1649
2045
  /** Allows extra SDK-level properties to pass through when serializing to DIAL Core. */
1650
2046
  [key: string]: unknown;
1651
2047
  }
@@ -1753,6 +2149,21 @@ export declare interface MessageState {
1753
2149
  tool_execution_history?: ToolExecutionHistoryMessage[];
1754
2150
  }
1755
2151
 
2152
+ /**
2153
+ * Maps non-canonical MIME type spellings to the canonical type they denote.
2154
+ *
2155
+ * Deployments declare their `inputAttachmentTypes` by hand, while DIAL Core
2156
+ * stores the content type a browser or an upload client reported, so the two
2157
+ * sides routinely disagree on which of several equivalent spellings to use for
2158
+ * the same format (`text/json` vs `application/json`). Resolving both through
2159
+ * this map before comparing them keeps a declared type matching the files it
2160
+ * is meant to describe.
2161
+ *
2162
+ * Only aliases for one and the same format belong here — never a pair of
2163
+ * distinct formats that happen to share an extension.
2164
+ */
2165
+ export declare const MIME_TYPE_ALIASES: Record<string, string>;
2166
+
1756
2167
  /** MIME type prefix shared by all audio content types. */
1757
2168
  export declare const MIME_TYPE_AUDIO_PREFIX = "audio/";
1758
2169
 
@@ -1822,6 +2233,14 @@ export declare const MOBILE_MAX_WIDTH_PX: number;
1822
2233
  /** `matchMedia` query matching the mobile/tablet band (up to 1279px). */
1823
2234
  export declare const MOBILE_MEDIA_QUERY = "(max-width: 1279px)";
1824
2235
 
2236
+ /**
2237
+ * Returns the canonical spelling of a MIME type: parameters stripped, lowercased,
2238
+ * and known aliases resolved through `MIME_TYPE_ALIASES` (`'text/json'` ->
2239
+ * `'application/json'`). Wildcards and unrecognized types are returned unchanged
2240
+ * apart from that normalization.
2241
+ */
2242
+ export declare const normalizeMimeType: (mimeType: string) => string;
2243
+
1825
2244
  /**
1826
2245
  * Repairs persisted `html_tag` annotations created by older normalizers that
1827
2246
  * defaulted every non-HTML source to PDF. An explicit, recognized file
@@ -1896,6 +2315,8 @@ export declare interface PanelEmptyStateProps {
1896
2315
  labelClassName?: string;
1897
2316
  /** CSS class applied to the empty-state container. */
1898
2317
  containerClassName?: string;
2318
+ /** Decorative illustration above the label. Defaults to the kit's `NoDataContent` document mark. */
2319
+ icon?: ReactNode;
1899
2320
  }
1900
2321
 
1901
2322
  /** Selector that targets an axis-aligned bounding box on a specific PDF page. */
@@ -1917,6 +2338,44 @@ export declare interface PdfBBoxSelector {
1917
2338
  /** Returns a deterministic colour-pair for the given display name. */
1918
2339
  export declare const pickAvatarColor: (name: string) => AvatarColorEntry;
1919
2340
 
2341
+ /**
2342
+ * Renders message text as plain text: no Markdown pipeline, no raw HTML, no
2343
+ * syntax highlighting. The text is a React text child, so it is escaped by
2344
+ * construction — a table, a heading, or `**bold**` reaches the reader exactly
2345
+ * as the model emitted it, which is what a conversation's `plain_text`
2346
+ * response format promises.
2347
+ *
2348
+ * Lives beside {@link MarkdownRenderer} because it is the other half of the
2349
+ * same choice: both render an assistant message body, and both are selected
2350
+ * by `MDMessageViewer` from the conversation's response format.
2351
+ */
2352
+ export declare const PlainTextRenderer: FC<PlainTextRendererProps>;
2353
+
2354
+ /** Props for {@link PlainTextRenderer}. */
2355
+ export declare interface PlainTextRendererProps {
2356
+ /** Message text. Rendered verbatim — never parsed as Markdown or HTML. */
2357
+ content: string;
2358
+ /** Classes applied to the renderer root. */
2359
+ containerClassName?: string;
2360
+ /** When true, appended content is revealed gradually for smoother streaming updates. */
2361
+ isStreaming?: boolean;
2362
+ /** Reveal speed used while `isStreaming` is true. Defaults to 120 characters per second. */
2363
+ streamCharactersPerSecond?: number;
2364
+ /**
2365
+ * Typography classes. Only `p` is read — the single paragraph the renderer
2366
+ * emits — so the same object a Markdown message is styled with keeps both
2367
+ * formats on one type scale.
2368
+ */
2369
+ classNames?: Pick<MarkdownRendererClassNames, 'p'>;
2370
+ /**
2371
+ * Label shown with a shimmer animation while `isStreaming` is true and no
2372
+ * content has arrived yet. Defaults to `'Thinking'`.
2373
+ */
2374
+ thinkingLabel?: string;
2375
+ /** Color overrides applied as CSS custom properties. */
2376
+ colors?: Pick<MarkdownRendererColors, 'thinkingPrimary' | 'thinkingSecondary'>;
2377
+ }
2378
+
1920
2379
  /**
1921
2380
  * Selector that targets a character range inside a single shape on one PPTX
1922
2381
  * slide. Confirmed against captured DIAL Core responses: unlike
@@ -1980,6 +2439,9 @@ export declare interface ProviderInfo {
1980
2439
  label: string;
1981
2440
  }
1982
2441
 
2442
+ /** DIAL Core bucket that holds published (organization-wide) resources, readable by every user. */
2443
+ export declare const PUBLIC_BUCKET = "public";
2444
+
1983
2445
  /**
1984
2446
  * Rehype plugin that wraps every `{{name}}` placeholder in a span so it can be
1985
2447
  * styled apart from the surrounding prose. Placeholders inside code are left
@@ -1995,7 +2457,7 @@ export declare type RenameValidationMessages = NonNullable<DialFileManagerCompon
1995
2457
 
1996
2458
  /**
1997
2459
  * A skill referenced from `custom_content.skills` — DIAL Core's `RequestSkill`
1998
- * schema (PR #1956): an object with a non-blank `url`; Core rejects any other
2460
+ * 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
1999
2461
  * entry shape (e.g. a bare string) with 400.
2000
2462
  */
2001
2463
  export declare interface RequestSkill {
@@ -2113,6 +2575,14 @@ export declare interface Stage {
2113
2575
  * Rendered only when present — never inferred from `name`.
2114
2576
  */
2115
2577
  tag?: string;
2578
+ /**
2579
+ * `index` of the stage that produced this one, in the same message's stage
2580
+ * array. In a streaming delta it names the parent's streaming `index` and is
2581
+ * sent only on the chunk that opens the child; in a complete non-streaming
2582
+ * array without indexes it names the parent's array position. Absent for a
2583
+ * top-level stage; `0` is a valid parent.
2584
+ */
2585
+ parent_stage_index?: number;
2116
2586
  }
2117
2587
 
2118
2588
  /** Status of a single agent stage. */
@@ -2265,6 +2735,84 @@ export declare interface TextCharacterRangeSelector {
2265
2735
  end: number;
2266
2736
  }
2267
2737
 
2738
+ /** Asynchronous rewriting callback supplied by the consuming host. */
2739
+ export declare type TextRefinementCallback = (value: string, signal: AbortSignal) => Promise<string>;
2740
+
2741
+ /** Label row with Refine/Undo actions and live feedback around one refinable field. */
2742
+ export declare const TextRefinementField: FC<TextRefinementFieldProps>;
2743
+
2744
+ /** Props for `TextRefinementField`. */
2745
+ export declare interface TextRefinementFieldProps {
2746
+ /** When false, renders `children` alone — no label row, actions, or feedback. */
2747
+ isEnabled: boolean;
2748
+ /** Id of the labelled control; also the prefix for the label and error ids. */
2749
+ fieldId: string;
2750
+ /** Visible field label; names the group. */
2751
+ label: string;
2752
+ /** Class applied to the `<label>`, after the kit `Label` defaults. */
2753
+ labelClassName?: string;
2754
+ /** Marks the label as required. */
2755
+ required?: boolean;
2756
+ /** Action, status, and error copy. */
2757
+ labels?: TextRefinementLabels;
2758
+ /** The field's `useTextRefinement` result. */
2759
+ refinement: TextRefinementResult;
2760
+ /** Disables both actions. */
2761
+ disabled: boolean;
2762
+ /** Class applied to the status message and the error message. */
2763
+ feedbackClassName?: string;
2764
+ /** Class applied to the error message, after `feedbackClassName`. */
2765
+ errorClassName?: string;
2766
+ /** The refinable control, whose id must equal `fieldId`. */
2767
+ children: ReactNode;
2768
+ }
2769
+
2770
+ /** Translatable copy for `TextRefinementField`; every key has an English default. */
2771
+ export declare interface TextRefinementLabels {
2772
+ /** Refinement copy. Defaults to 'Refine with AI'. */
2773
+ refineWithAiLabel?: string;
2774
+ /** Refinement copy. Defaults to 'Undo'. */
2775
+ refineUndoLabel?: string;
2776
+ /** Refinement copy. Defaults to 'Could not refine this text. Please try again.'. */
2777
+ refineErrorLabel?: string;
2778
+ /** Refinement copy. Defaults to 'Refining text'. */
2779
+ refinePendingAriaLabel?: string;
2780
+ /** Refinement copy. Defaults to 'Text refined. Undo is available.'. */
2781
+ refineSuccessAriaLabel?: string;
2782
+ /** Refinement copy. Defaults to 'Original text restored.'. */
2783
+ refineUndoAriaLabel?: string;
2784
+ /** Refinement copy. Defaults to 'No changes were needed.'. */
2785
+ refineUnchangedAriaLabel?: string;
2786
+ }
2787
+
2788
+ /** Controls and feedback for a single field. */
2789
+ export declare interface TextRefinementResult {
2790
+ /** Current field-local feedback state. */
2791
+ state: TextRefinementState;
2792
+ /** Whether this field has a request in progress. */
2793
+ isPending: boolean;
2794
+ /** Whether the current value can be refined. */
2795
+ canRefine: boolean;
2796
+ /** Whether an original baseline can be restored. */
2797
+ canUndo: boolean;
2798
+ /** Refines the latest committed value; duplicate activation is ignored. */
2799
+ refine: () => Promise<void>;
2800
+ /** Restores the baseline from before the first successful refinement. */
2801
+ undo: () => void;
2802
+ /** Cancels work and clears feedback and Undo without modifying the value. */
2803
+ reset: () => void;
2804
+ }
2805
+
2806
+ /** Field-local refinement feedback state. */
2807
+ export declare enum TextRefinementState {
2808
+ Idle = "idle",
2809
+ Pending = "pending",
2810
+ Success = "success",
2811
+ Error = "error",
2812
+ Restored = "restored",
2813
+ Unchanged = "unchanged"
2814
+ }
2815
+
2268
2816
  /** A single selectable UI theme. */
2269
2817
  export declare interface Theme {
2270
2818
  /** Unique theme identifier (e.g. `'dark'`, `'light'`). */
@@ -2363,6 +2911,18 @@ export declare const truncateToUtf8Bytes: (str: string, maxBytes: number) => str
2363
2911
  /** Decodes a base64 string into raw bytes, or `undefined` if the string is not valid base64. */
2364
2912
  export declare const tryBase64ToBytes: (base64: string) => Uint8Array | undefined;
2365
2913
 
2914
+ /** Result of {@link useUnsavedChangesGuard}. */
2915
+ export declare interface UnsavedChangesGuardResult {
2916
+ /** Runs `action` immediately when nothing is dirty; otherwise defers it and opens the confirmation. */
2917
+ guard: (action: () => void) => void;
2918
+ /** Whether the discard confirmation should be shown. */
2919
+ isConfirmOpen: boolean;
2920
+ /** Closes the confirmation and runs the deferred action. */
2921
+ confirm: () => void;
2922
+ /** Closes the confirmation and drops the deferred action. */
2923
+ dismiss: () => void;
2924
+ }
2925
+
2366
2926
  /** Result of successfully uploading an {@link Attachment}. */
2367
2927
  export declare interface UploadedAttachmentResult {
2368
2928
  /** The DIAL Core file URL the attachment was uploaded to. */
@@ -2371,23 +2931,6 @@ export declare interface UploadedAttachmentResult {
2371
2931
  name: string;
2372
2932
  }
2373
2933
 
2374
- /** Modal showing per-file upload progress with a cancel action. */
2375
- export declare const UploadProgressModal: FC<UploadProgressModalProps>;
2376
-
2377
- /** Props for the upload-progress modal. */
2378
- export declare interface UploadProgressModalProps {
2379
- /** Current batch state with per-file entries and open flag. */
2380
- batchState: FileUploadBatchState;
2381
- /** Title shown in the modal header (e.g. "Uploading files"). */
2382
- uploadProgressTitle: string;
2383
- /** Summary text below the title (e.g. "3 of 5 uploaded"). */
2384
- uploadProgressText: string;
2385
- /** Label for the cancel button. */
2386
- cancelLabel: string;
2387
- /** Called when the user clicks Cancel. */
2388
- onCancel: () => void;
2389
- }
2390
-
2391
2934
  /**
2392
2935
  * Writes the height still available below an element into a CSS custom
2393
2936
  * property, so a user-resizable control inside it can be capped at the space
@@ -2502,4 +3045,24 @@ export declare interface UserProfile {
2502
3045
  isAdmin: boolean;
2503
3046
  }
2504
3047
 
3048
+ /** Preserves an author's draft and Undo baseline across asynchronous controlled updates. */
3049
+ export declare const useTextRefinement: (options: UseTextRefinementOptions) => TextRefinementResult;
3050
+
3051
+ /** Controlled value and lifecycle inputs for one refinable field. */
3052
+ export declare interface UseTextRefinementOptions {
3053
+ /** Current controlled field value. */
3054
+ value: string;
3055
+ /** Host rewriting callback. Omission disables refinement and clears its state. */
3056
+ onRefine?: TextRefinementCallback;
3057
+ /** Publishes a successful result or the original Undo baseline. */
3058
+ onChange: (value: string) => void;
3059
+ /** Disables refinement and cancels active work when true. Defaults to false. */
3060
+ disabled?: boolean;
3061
+ /** Draft identity; changing it resets state even when text is equal. */
3062
+ resetKey?: unknown;
3063
+ }
3064
+
3065
+ /** Defers leaving a form with unsaved changes until the user confirms, and asks the browser to warn before the page unloads. */
3066
+ export declare const useUnsavedChangesGuard: (isDirty: boolean) => UnsavedChangesGuardResult;
3067
+
2505
3068
  export { }