@epam/ai-dial-chat-shared 1.2.0-dev.28 → 1.2.0-dev.284
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/FeaturedChip/FeaturedChip.js +9 -14
- package/components/InitialsAvatar/InitialsAvatar.js +10 -27
- package/components/MarkdownRenderer/CodeBlock/CodeBlock.js +65 -63
- package/components/MarkdownRenderer/CodeBlock/CodeBlock.module.scss.js +6 -6
- package/components/MarkdownRenderer/MDMessageViewer.js +23 -17
- package/components/MarkdownRenderer/MarkdownRenderer.js +88 -90
- package/components/MarkdownRenderer/Math/MarkdownMathBlock.js +19 -18
- package/components/MarkdownRenderer/PlainTextRenderer.js +21 -0
- package/components/MarkdownRenderer/Table/MarkdownTable.js +71 -56
- package/components/MarkdownRenderer/Table/MarkdownTable.module.scss.js +11 -11
- package/components/MarkdownRenderer/Table/TableHeader.js +18 -21
- package/components/MarkdownRenderer/Table/table-serialization.js +23 -3
- package/components/MarkdownRenderer/Table/useMarkdownTableActions/useMarkdownTableActions.js +48 -62
- package/components/MarkdownRenderer/ThinkingShimmer.js +14 -0
- package/components/PanelEmptyState/PanelEmptyState.js +2 -1
- package/components/TextRefinementField/TextRefinementField.js +86 -0
- package/constants/dial.js +2 -2
- package/constants/mime-types.js +49 -2
- package/constants/public-class-names.js +10 -0
- package/constants/resizable-fields.js +2 -2
- package/file-manager/DialFileManagerShell/DialFileManagerShell.js +251 -234
- package/file-manager/FileManagerAttachModal/FileManagerAttachModal.js +36 -32
- 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 +35 -20
- 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 +531 -44
- package/index.js +73 -61
- package/markdown.d.ts +61 -8
- package/markdown.js +13 -11
- package/models/chat.js +4 -2
- package/package.json +5 -5
- package/types/attachment.js +1 -1
- package/utils/entity-field-limits.js +4 -0
- package/utils/entity-type.js +15 -0
- package/utils/file-download.js +6 -6
- package/utils/is-skill-selection-unsupported.js +4 -0
- package/utils/latex.js +5 -3
- package/utils/merge-class.js +5 -4
- package/utils/mime-type.js +10 -6
- package/utils/syntax-highlighting.js +13 -0
- package/components/InitialsAvatar/InitialsAvatar.module.scss.js +0 -6
- 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 {
|
|
@@ -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. */
|
|
@@ -140,7 +147,9 @@ export declare enum AttachmentErrorReason {
|
|
|
140
147
|
/** Upload failed because the device was offline. */
|
|
141
148
|
Network = "network",
|
|
142
149
|
/** File MIME type is not in the deployment's inputAttachmentTypes list. */
|
|
143
|
-
UnsupportedType = "unsupported-type"
|
|
150
|
+
UnsupportedType = "unsupported-type",
|
|
151
|
+
/** File size exceeds the configured maximum attachment size. */
|
|
152
|
+
FileTooLarge = "file-too-large"
|
|
144
153
|
}
|
|
145
154
|
|
|
146
155
|
/** A file attachment referenced by a citation — same shape as `MessageAttachment` but scoped to annotations. */
|
|
@@ -185,6 +194,32 @@ export declare interface AvatarColorEntry {
|
|
|
185
194
|
foreground: string;
|
|
186
195
|
}
|
|
187
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
|
+
|
|
188
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. */
|
|
189
224
|
export declare const base64ToBlob: (data: string, mimeType: string) => Blob;
|
|
190
225
|
|
|
@@ -221,6 +256,19 @@ export declare enum CatalogEntityType {
|
|
|
221
256
|
Prompt = "PROMPT"
|
|
222
257
|
}
|
|
223
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
|
+
|
|
224
272
|
/** Color theme for syntax highlighting. */
|
|
225
273
|
export declare enum CodeBlockTheme {
|
|
226
274
|
/** Dark syntax-highlighting theme. */
|
|
@@ -236,6 +284,210 @@ export declare enum CodeBlockTheme {
|
|
|
236
284
|
*/
|
|
237
285
|
export declare const COMPACT_MARKDOWN_CLASS_NAMES: MarkdownRendererClassNames;
|
|
238
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
|
+
|
|
239
491
|
/** Options for the conflict-resolution popup shown during copy/move operations. */
|
|
240
492
|
export declare type ConflictResolutionPopupOptions = NonNullable<DialFileManagerComponentProps['conflictResolutionPopupOptions']>;
|
|
241
493
|
|
|
@@ -269,6 +521,8 @@ export declare interface Conversation {
|
|
|
269
521
|
assistantModelId: string;
|
|
270
522
|
/** Response format used when rendering messages. */
|
|
271
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>;
|
|
272
526
|
}
|
|
273
527
|
|
|
274
528
|
/** Metadata returned by the DIAL file/conversation listing API for a single resource node. */
|
|
@@ -323,6 +577,8 @@ export declare interface ConversationTransferJob {
|
|
|
323
577
|
* {@link ConversationTransferJobStatus.Warning}.
|
|
324
578
|
*/
|
|
325
579
|
warningCode?: ConversationTransferWarningCode;
|
|
580
|
+
/** Untranslated names of skipped attachments, when available for this warning. */
|
|
581
|
+
warningNames?: string[];
|
|
326
582
|
}
|
|
327
583
|
|
|
328
584
|
/** Lifecycle status of a queued export/import job. */
|
|
@@ -658,7 +914,7 @@ export declare interface DialFileManagerShellLabels {
|
|
|
658
914
|
showHiddenFilesLabel: string;
|
|
659
915
|
/** Label shown when hidden files are currently hidden. */
|
|
660
916
|
hideHiddenFilesLabel: string;
|
|
661
|
-
/** 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"). */
|
|
662
918
|
getSelectionLabel: (count: number) => string;
|
|
663
919
|
/** Label for the "Upload files" action in the New menu. */
|
|
664
920
|
uploadFilesLabel: string;
|
|
@@ -710,20 +966,20 @@ export declare interface DialFileManagerShellLabels {
|
|
|
710
966
|
operationLoaderMoveTitle: string;
|
|
711
967
|
/** Cancel-button label in the operation loader modal. */
|
|
712
968
|
operationLoaderCancelLabel: string;
|
|
713
|
-
/** Returns the delete confirmation dialog title for the given item names. */
|
|
714
|
-
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;
|
|
715
971
|
/** Returns the delete confirmation dialog body for the given item names. */
|
|
716
972
|
deleteConfirmBody: (names: string[]) => ReactNode;
|
|
717
973
|
/** Confirm-button label in the delete confirmation dialog. */
|
|
718
974
|
deleteConfirmLabel: string;
|
|
719
975
|
/** Cancel-button label in the delete confirmation dialog. */
|
|
720
976
|
deleteCancelLabel: string;
|
|
721
|
-
/**
|
|
722
|
-
|
|
723
|
-
/**
|
|
724
|
-
|
|
725
|
-
/**
|
|
726
|
-
|
|
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>;
|
|
727
983
|
/** Empty-state title when a search yields no results. */
|
|
728
984
|
searchEmptyStateTitle: string;
|
|
729
985
|
/** Empty-state title for an empty subfolder. */
|
|
@@ -734,6 +990,8 @@ export declare interface DialFileManagerShellLabels {
|
|
|
734
990
|
emptyStateByTab: Record<DialFileManagerTabs, EmptyStateCopy>;
|
|
735
991
|
/** Per-tab tree header label. */
|
|
736
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>>;
|
|
737
995
|
/** Messages for inline rename validation. */
|
|
738
996
|
renameValidationMessages: RenameValidationMessages;
|
|
739
997
|
/** Options for the conflict resolution popup. */
|
|
@@ -858,6 +1116,15 @@ export declare interface EmptyStateCopy {
|
|
|
858
1116
|
*/
|
|
859
1117
|
export declare const ensureDownloadFilename: (name: string, url: string | undefined, contentType: string | undefined) => string;
|
|
860
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
|
+
|
|
861
1128
|
/** Background color per entity type — used for the featured chip surface. */
|
|
862
1129
|
export declare const ENTITY_TYPE_BG_COLOR: Record<CatalogEntityType, string>;
|
|
863
1130
|
|
|
@@ -928,6 +1195,9 @@ export declare interface EntityTypeLabelProps {
|
|
|
928
1195
|
className?: string;
|
|
929
1196
|
}
|
|
930
1197
|
|
|
1198
|
+
/** Whether `value` is longer than `maxLength` characters. */
|
|
1199
|
+
export declare const exceedsMaxLength: (value: string, maxLength: number) => boolean;
|
|
1200
|
+
|
|
931
1201
|
/** A 1-based cell address on an XLSX sheet. */
|
|
932
1202
|
export declare interface ExcelCellAddress {
|
|
933
1203
|
/** 1-based row number. */
|
|
@@ -989,9 +1259,9 @@ export declare const FeaturedChip: FC<FeaturedChipProps>;
|
|
|
989
1259
|
export declare interface FeaturedChipProps {
|
|
990
1260
|
/** Label text shown inside the chip. */
|
|
991
1261
|
label: string;
|
|
992
|
-
/**
|
|
1262
|
+
/** Typography class for the label. Defaults to the kit badge's `'dial-caption-lead-semi-text'`. */
|
|
993
1263
|
className?: string;
|
|
994
|
-
/** Entity category —
|
|
1264
|
+
/** Entity category — picks the chip's default colours. */
|
|
995
1265
|
type: CatalogEntityType;
|
|
996
1266
|
/** Style overrides merged over the chip's default per-entity-type colors, e.g. `{ backgroundColor, color, border }`. */
|
|
997
1267
|
style?: CSSProperties;
|
|
@@ -1052,7 +1322,7 @@ export declare interface FileManagerController {
|
|
|
1052
1322
|
onSearchFiles: (folder: string, query: string) => void;
|
|
1053
1323
|
/** Search: true while a search request is in flight. */
|
|
1054
1324
|
isSearching: boolean;
|
|
1055
|
-
/** Search: flat
|
|
1325
|
+
/** Search: flat, unfiltered recursive listing of the current folder, or null when search is not active. */
|
|
1056
1326
|
searchResults: DialFile[] | null;
|
|
1057
1327
|
/** Search: clears results and exits search mode. */
|
|
1058
1328
|
clearSearchResults: () => void;
|
|
@@ -1076,7 +1346,9 @@ export declare interface FileManagerController {
|
|
|
1076
1346
|
uploadBatchState: FileUploadBatchState | null;
|
|
1077
1347
|
/** Upload: abort all in-flight and queued uploads. */
|
|
1078
1348
|
cancelUpload: () => void;
|
|
1079
|
-
/** Upload:
|
|
1349
|
+
/** Upload: abort one queued or in-flight upload by its entry id. */
|
|
1350
|
+
cancelUploadFile: (id: string) => void;
|
|
1351
|
+
/** Upload: empty the upload queue. */
|
|
1080
1352
|
clearUploadBatch: () => void;
|
|
1081
1353
|
/** Folder creation: called when user confirms a new folder name. */
|
|
1082
1354
|
onCreateFolder: (file: DialUploadFileItem, folderPath: string, fileId: string) => Promise<void>;
|
|
@@ -1138,6 +1410,8 @@ export declare interface FileManagerController {
|
|
|
1138
1410
|
onGetInfo: (file: DialFile) => void;
|
|
1139
1411
|
/** Metadata: resets fileMetadata/isFileMetadataLoading; passed to fileMetadataPopupOptions.clearMetadata. */
|
|
1140
1412
|
clearMetadata: () => void;
|
|
1413
|
+
/** Source tab of the browsed folder, never `All`; omitted by single-source controllers. */
|
|
1414
|
+
sectionTab?: DialFileManagerTabs;
|
|
1141
1415
|
}
|
|
1142
1416
|
|
|
1143
1417
|
/**
|
|
@@ -1156,11 +1430,11 @@ export declare interface FileManagerSelectableNode {
|
|
|
1156
1430
|
contentLength?: number;
|
|
1157
1431
|
}
|
|
1158
1432
|
|
|
1159
|
-
/** State of
|
|
1433
|
+
/** State of the upload queue, as returned by `useDialFileUploadBatch`. */
|
|
1160
1434
|
export declare interface FileUploadBatchState {
|
|
1161
|
-
/**
|
|
1435
|
+
/** Every file uploaded since the queue was last cleared, settled ones included. */
|
|
1162
1436
|
files: FileUploadEntry[];
|
|
1163
|
-
/** Whether the upload
|
|
1437
|
+
/** Whether the upload queue should be visible. */
|
|
1164
1438
|
isOpen: boolean;
|
|
1165
1439
|
}
|
|
1166
1440
|
|
|
@@ -1223,6 +1497,9 @@ export declare const generateUUID: () => string;
|
|
|
1223
1497
|
/** Classifies a MIME type into an `AttachmentType` by prefix (`image/*` / `audio/*`), defaulting to `File`. */
|
|
1224
1498
|
export declare const getAttachmentTypeFromMime: (mimeType: string | undefined) => AttachmentType;
|
|
1225
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
|
+
|
|
1226
1503
|
/** Returns the file extension (without a leading dot) for a fenced-code-block language identifier, defaulting to `txt`. */
|
|
1227
1504
|
export declare const getFileExtensionForLanguage: (language: string) => string;
|
|
1228
1505
|
|
|
@@ -1257,6 +1534,9 @@ export declare interface GroupedAttachmentsData {
|
|
|
1257
1534
|
layout: CustomVisualizerDataLayout;
|
|
1258
1535
|
}
|
|
1259
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
|
+
|
|
1260
1540
|
/** Minimal hast shapes this plugin reads and writes. */
|
|
1261
1541
|
declare interface HastNode {
|
|
1262
1542
|
type: string;
|
|
@@ -1297,7 +1577,7 @@ export declare interface InitialsAvatarProps {
|
|
|
1297
1577
|
size: number;
|
|
1298
1578
|
/** Extra classes applied to the root element (e.g. `'shrink-0'`). */
|
|
1299
1579
|
className?: string;
|
|
1300
|
-
/**
|
|
1580
|
+
/** Type-scale class for the initials. Defaults to none: the initials are semibold at 40% of `size`. */
|
|
1301
1581
|
textClassName?: string;
|
|
1302
1582
|
}
|
|
1303
1583
|
|
|
@@ -1310,9 +1590,23 @@ export declare const isAudioTranscriptionSupported: (types?: string[]) => boolea
|
|
|
1310
1590
|
/** Returns true when any path segment starts with a dot (hidden file or folder). */
|
|
1311
1591
|
export declare const isHiddenPath: (path: string) => boolean;
|
|
1312
1592
|
|
|
1593
|
+
/** Whether a selected skill lacks explicitly confirmed support. */
|
|
1594
|
+
export declare const isSkillSelectionUnsupported: (skillUrl: string | null | undefined, isSkillsSupported: boolean | undefined) => boolean;
|
|
1595
|
+
|
|
1313
1596
|
/** Returns `true` when `msg` is a `StatusMessage`. */
|
|
1314
1597
|
export declare const isStatusMessage: (msg: Message | StatusMessage) => msg is StatusMessage;
|
|
1315
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
|
+
|
|
1316
1610
|
/** Item title header with optional numeric or string postfix and trailing slot. */
|
|
1317
1611
|
export declare const ItemHeader: FC<ItemHeaderProps>;
|
|
1318
1612
|
|
|
@@ -1350,7 +1644,29 @@ export declare interface ItemHeaderProps {
|
|
|
1350
1644
|
shouldTruncateTitle?: boolean;
|
|
1351
1645
|
}
|
|
1352
1646
|
|
|
1353
|
-
|
|
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)]";
|
|
1354
1670
|
|
|
1355
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]";
|
|
1356
1672
|
|
|
@@ -1552,9 +1868,7 @@ export declare interface MarkdownRendererProps {
|
|
|
1552
1868
|
export declare const MarkdownTable: FC<MarkdownTableProps>;
|
|
1553
1869
|
|
|
1554
1870
|
export declare interface MarkdownTableActionLabels {
|
|
1555
|
-
|
|
1556
|
-
copyTxtLabel?: string;
|
|
1557
|
-
copyMarkdownLabel?: string;
|
|
1871
|
+
copyLabel?: string;
|
|
1558
1872
|
copiedLabel?: string;
|
|
1559
1873
|
downloadCsvLabel?: string;
|
|
1560
1874
|
openInCanvasLabel?: string;
|
|
@@ -1580,19 +1894,16 @@ export declare interface MarkdownTableColors {
|
|
|
1580
1894
|
fade?: string;
|
|
1581
1895
|
/** Divider color between rows. Defaults to `--stroke-tertiary`. */
|
|
1582
1896
|
rowDivider?: string;
|
|
1583
|
-
/** Background of even-indexed body rows. Defaults to `--bg-layer-base`. */
|
|
1584
|
-
rowZebraBackground?: string;
|
|
1585
1897
|
/** Background of a body row on hover. Defaults to `--bg-control-accent-alpha-hover`. */
|
|
1586
1898
|
rowHoverBackground?: string;
|
|
1587
1899
|
}
|
|
1588
1900
|
|
|
1589
1901
|
export declare enum MarkdownTableCopyFormat {
|
|
1590
1902
|
Csv = "csv",
|
|
1591
|
-
Txt = "txt",
|
|
1592
1903
|
Markdown = "markdown"
|
|
1593
1904
|
}
|
|
1594
1905
|
|
|
1595
|
-
/** A table
|
|
1906
|
+
/** A table action rendered as an icon button. */
|
|
1596
1907
|
export declare interface MarkdownTableHeaderAction {
|
|
1597
1908
|
/** Stable accessible name and tooltip text. */
|
|
1598
1909
|
label: string;
|
|
@@ -1643,13 +1954,20 @@ export declare interface MarkdownWithPlaceholdersProps {
|
|
|
1643
1954
|
headingClassName?: string;
|
|
1644
1955
|
}
|
|
1645
1956
|
|
|
1646
|
-
/** Renders assistant message content as formatted markdown. */
|
|
1957
|
+
/** Renders assistant message content as formatted markdown, or as escaped plain text when `isPlainText` is set. */
|
|
1647
1958
|
export declare const MDMessageViewer: FC<MDMessageViewerProps>;
|
|
1648
1959
|
|
|
1649
1960
|
/** Props for the {@link MDMessageViewer} markdown renderer. */
|
|
1650
1961
|
declare interface MDMessageViewerProps {
|
|
1651
1962
|
/** Raw markdown string to render. */
|
|
1652
1963
|
content: string;
|
|
1964
|
+
/**
|
|
1965
|
+
* Renders `content` verbatim as escaped plain text instead of running the
|
|
1966
|
+
* Markdown pipeline — the conversation's `plain_text` response format.
|
|
1967
|
+
* Markdown-only props (`components`, `urlTransform`, the code-block and
|
|
1968
|
+
* table labels) do not apply while it is set. Defaults to `false`.
|
|
1969
|
+
*/
|
|
1970
|
+
isPlainText?: boolean;
|
|
1653
1971
|
/** Enables gradual reveal for appended streaming content. */
|
|
1654
1972
|
isStreaming?: boolean;
|
|
1655
1973
|
/**
|
|
@@ -1711,6 +2029,8 @@ export declare interface Message {
|
|
|
1711
2029
|
streamErrorMessage?: string;
|
|
1712
2030
|
/** Set on an assistant message whose generation the user stopped; the content is whatever had streamed by then. */
|
|
1713
2031
|
wasStoppedByUser?: boolean;
|
|
2032
|
+
/** Set on an assistant message produced by a DIAL Core background job; absent on every other message. */
|
|
2033
|
+
backgroundGeneration?: BackgroundGeneration;
|
|
1714
2034
|
/** Allows extra SDK-level properties to pass through when serializing to DIAL Core. */
|
|
1715
2035
|
[key: string]: unknown;
|
|
1716
2036
|
}
|
|
@@ -1818,6 +2138,21 @@ export declare interface MessageState {
|
|
|
1818
2138
|
tool_execution_history?: ToolExecutionHistoryMessage[];
|
|
1819
2139
|
}
|
|
1820
2140
|
|
|
2141
|
+
/**
|
|
2142
|
+
* Maps non-canonical MIME type spellings to the canonical type they denote.
|
|
2143
|
+
*
|
|
2144
|
+
* Deployments declare their `inputAttachmentTypes` by hand, while DIAL Core
|
|
2145
|
+
* stores the content type a browser or an upload client reported, so the two
|
|
2146
|
+
* sides routinely disagree on which of several equivalent spellings to use for
|
|
2147
|
+
* the same format (`text/json` vs `application/json`). Resolving both through
|
|
2148
|
+
* this map before comparing them keeps a declared type matching the files it
|
|
2149
|
+
* is meant to describe.
|
|
2150
|
+
*
|
|
2151
|
+
* Only aliases for one and the same format belong here — never a pair of
|
|
2152
|
+
* distinct formats that happen to share an extension.
|
|
2153
|
+
*/
|
|
2154
|
+
export declare const MIME_TYPE_ALIASES: Record<string, string>;
|
|
2155
|
+
|
|
1821
2156
|
/** MIME type prefix shared by all audio content types. */
|
|
1822
2157
|
export declare const MIME_TYPE_AUDIO_PREFIX = "audio/";
|
|
1823
2158
|
|
|
@@ -1887,6 +2222,14 @@ export declare const MOBILE_MAX_WIDTH_PX: number;
|
|
|
1887
2222
|
/** `matchMedia` query matching the mobile/tablet band (up to 1279px). */
|
|
1888
2223
|
export declare const MOBILE_MEDIA_QUERY = "(max-width: 1279px)";
|
|
1889
2224
|
|
|
2225
|
+
/**
|
|
2226
|
+
* Returns the canonical spelling of a MIME type: parameters stripped, lowercased,
|
|
2227
|
+
* and known aliases resolved through `MIME_TYPE_ALIASES` (`'text/json'` ->
|
|
2228
|
+
* `'application/json'`). Wildcards and unrecognized types are returned unchanged
|
|
2229
|
+
* apart from that normalization.
|
|
2230
|
+
*/
|
|
2231
|
+
export declare const normalizeMimeType: (mimeType: string) => string;
|
|
2232
|
+
|
|
1890
2233
|
/**
|
|
1891
2234
|
* Repairs persisted `html_tag` annotations created by older normalizers that
|
|
1892
2235
|
* defaulted every non-HTML source to PDF. An explicit, recognized file
|
|
@@ -1961,6 +2304,8 @@ export declare interface PanelEmptyStateProps {
|
|
|
1961
2304
|
labelClassName?: string;
|
|
1962
2305
|
/** CSS class applied to the empty-state container. */
|
|
1963
2306
|
containerClassName?: string;
|
|
2307
|
+
/** Decorative illustration above the label. Defaults to the kit's `NoDataContent` document mark. */
|
|
2308
|
+
icon?: ReactNode;
|
|
1964
2309
|
}
|
|
1965
2310
|
|
|
1966
2311
|
/** Selector that targets an axis-aligned bounding box on a specific PDF page. */
|
|
@@ -1982,6 +2327,44 @@ export declare interface PdfBBoxSelector {
|
|
|
1982
2327
|
/** Returns a deterministic colour-pair for the given display name. */
|
|
1983
2328
|
export declare const pickAvatarColor: (name: string) => AvatarColorEntry;
|
|
1984
2329
|
|
|
2330
|
+
/**
|
|
2331
|
+
* Renders message text as plain text: no Markdown pipeline, no raw HTML, no
|
|
2332
|
+
* syntax highlighting. The text is a React text child, so it is escaped by
|
|
2333
|
+
* construction — a table, a heading, or `**bold**` reaches the reader exactly
|
|
2334
|
+
* as the model emitted it, which is what a conversation's `plain_text`
|
|
2335
|
+
* response format promises.
|
|
2336
|
+
*
|
|
2337
|
+
* Lives beside {@link MarkdownRenderer} because it is the other half of the
|
|
2338
|
+
* same choice: both render an assistant message body, and both are selected
|
|
2339
|
+
* by `MDMessageViewer` from the conversation's response format.
|
|
2340
|
+
*/
|
|
2341
|
+
export declare const PlainTextRenderer: FC<PlainTextRendererProps>;
|
|
2342
|
+
|
|
2343
|
+
/** Props for {@link PlainTextRenderer}. */
|
|
2344
|
+
export declare interface PlainTextRendererProps {
|
|
2345
|
+
/** Message text. Rendered verbatim — never parsed as Markdown or HTML. */
|
|
2346
|
+
content: string;
|
|
2347
|
+
/** Classes applied to the renderer root. */
|
|
2348
|
+
containerClassName?: string;
|
|
2349
|
+
/** When true, appended content is revealed gradually for smoother streaming updates. */
|
|
2350
|
+
isStreaming?: boolean;
|
|
2351
|
+
/** Reveal speed used while `isStreaming` is true. Defaults to 120 characters per second. */
|
|
2352
|
+
streamCharactersPerSecond?: number;
|
|
2353
|
+
/**
|
|
2354
|
+
* Typography classes. Only `p` is read — the single paragraph the renderer
|
|
2355
|
+
* emits — so the same object a Markdown message is styled with keeps both
|
|
2356
|
+
* formats on one type scale.
|
|
2357
|
+
*/
|
|
2358
|
+
classNames?: Pick<MarkdownRendererClassNames, 'p'>;
|
|
2359
|
+
/**
|
|
2360
|
+
* Label shown with a shimmer animation while `isStreaming` is true and no
|
|
2361
|
+
* content has arrived yet. Defaults to `'Thinking'`.
|
|
2362
|
+
*/
|
|
2363
|
+
thinkingLabel?: string;
|
|
2364
|
+
/** Color overrides applied as CSS custom properties. */
|
|
2365
|
+
colors?: Pick<MarkdownRendererColors, 'thinkingPrimary' | 'thinkingSecondary'>;
|
|
2366
|
+
}
|
|
2367
|
+
|
|
1985
2368
|
/**
|
|
1986
2369
|
* Selector that targets a character range inside a single shape on one PPTX
|
|
1987
2370
|
* slide. Confirmed against captured DIAL Core responses: unlike
|
|
@@ -2045,6 +2428,9 @@ export declare interface ProviderInfo {
|
|
|
2045
2428
|
label: string;
|
|
2046
2429
|
}
|
|
2047
2430
|
|
|
2431
|
+
/** DIAL Core bucket that holds published (organization-wide) resources, readable by every user. */
|
|
2432
|
+
export declare const PUBLIC_BUCKET = "public";
|
|
2433
|
+
|
|
2048
2434
|
/**
|
|
2049
2435
|
* Rehype plugin that wraps every `{{name}}` placeholder in a span so it can be
|
|
2050
2436
|
* styled apart from the surrounding prose. Placeholders inside code are left
|
|
@@ -2178,6 +2564,14 @@ export declare interface Stage {
|
|
|
2178
2564
|
* Rendered only when present — never inferred from `name`.
|
|
2179
2565
|
*/
|
|
2180
2566
|
tag?: string;
|
|
2567
|
+
/**
|
|
2568
|
+
* `index` of the stage that produced this one, in the same message's stage
|
|
2569
|
+
* array. In a streaming delta it names the parent's streaming `index` and is
|
|
2570
|
+
* sent only on the chunk that opens the child; in a complete non-streaming
|
|
2571
|
+
* array without indexes it names the parent's array position. Absent for a
|
|
2572
|
+
* top-level stage; `0` is a valid parent.
|
|
2573
|
+
*/
|
|
2574
|
+
parent_stage_index?: number;
|
|
2181
2575
|
}
|
|
2182
2576
|
|
|
2183
2577
|
/** Status of a single agent stage. */
|
|
@@ -2330,6 +2724,84 @@ export declare interface TextCharacterRangeSelector {
|
|
|
2330
2724
|
end: number;
|
|
2331
2725
|
}
|
|
2332
2726
|
|
|
2727
|
+
/** Asynchronous rewriting callback supplied by the consuming host. */
|
|
2728
|
+
export declare type TextRefinementCallback = (value: string, signal: AbortSignal) => Promise<string>;
|
|
2729
|
+
|
|
2730
|
+
/** Label row with Refine/Undo actions and live feedback around one refinable field. */
|
|
2731
|
+
export declare const TextRefinementField: FC<TextRefinementFieldProps>;
|
|
2732
|
+
|
|
2733
|
+
/** Props for `TextRefinementField`. */
|
|
2734
|
+
export declare interface TextRefinementFieldProps {
|
|
2735
|
+
/** When false, renders `children` alone — no label row, actions, or feedback. */
|
|
2736
|
+
isEnabled: boolean;
|
|
2737
|
+
/** Id of the labelled control; also the prefix for the label and error ids. */
|
|
2738
|
+
fieldId: string;
|
|
2739
|
+
/** Visible field label; names the group. */
|
|
2740
|
+
label: string;
|
|
2741
|
+
/** Class applied to the `<label>`, after the kit `Label` defaults. */
|
|
2742
|
+
labelClassName?: string;
|
|
2743
|
+
/** Marks the label as required. */
|
|
2744
|
+
required?: boolean;
|
|
2745
|
+
/** Action, status, and error copy. */
|
|
2746
|
+
labels?: TextRefinementLabels;
|
|
2747
|
+
/** The field's `useTextRefinement` result. */
|
|
2748
|
+
refinement: TextRefinementResult;
|
|
2749
|
+
/** Disables both actions. */
|
|
2750
|
+
disabled: boolean;
|
|
2751
|
+
/** Class applied to the status message and the error message. */
|
|
2752
|
+
feedbackClassName?: string;
|
|
2753
|
+
/** Class applied to the error message, after `feedbackClassName`. */
|
|
2754
|
+
errorClassName?: string;
|
|
2755
|
+
/** The refinable control, whose id must equal `fieldId`. */
|
|
2756
|
+
children: ReactNode;
|
|
2757
|
+
}
|
|
2758
|
+
|
|
2759
|
+
/** Translatable copy for `TextRefinementField`; every key has an English default. */
|
|
2760
|
+
export declare interface TextRefinementLabels {
|
|
2761
|
+
/** Refinement copy. Defaults to 'Refine with AI'. */
|
|
2762
|
+
refineWithAiLabel?: string;
|
|
2763
|
+
/** Refinement copy. Defaults to 'Undo'. */
|
|
2764
|
+
refineUndoLabel?: string;
|
|
2765
|
+
/** Refinement copy. Defaults to 'Could not refine this text. Please try again.'. */
|
|
2766
|
+
refineErrorLabel?: string;
|
|
2767
|
+
/** Refinement copy. Defaults to 'Refining text'. */
|
|
2768
|
+
refinePendingAriaLabel?: string;
|
|
2769
|
+
/** Refinement copy. Defaults to 'Text refined. Undo is available.'. */
|
|
2770
|
+
refineSuccessAriaLabel?: string;
|
|
2771
|
+
/** Refinement copy. Defaults to 'Original text restored.'. */
|
|
2772
|
+
refineUndoAriaLabel?: string;
|
|
2773
|
+
/** Refinement copy. Defaults to 'No changes were needed.'. */
|
|
2774
|
+
refineUnchangedAriaLabel?: string;
|
|
2775
|
+
}
|
|
2776
|
+
|
|
2777
|
+
/** Controls and feedback for a single field. */
|
|
2778
|
+
export declare interface TextRefinementResult {
|
|
2779
|
+
/** Current field-local feedback state. */
|
|
2780
|
+
state: TextRefinementState;
|
|
2781
|
+
/** Whether this field has a request in progress. */
|
|
2782
|
+
isPending: boolean;
|
|
2783
|
+
/** Whether the current value can be refined. */
|
|
2784
|
+
canRefine: boolean;
|
|
2785
|
+
/** Whether an original baseline can be restored. */
|
|
2786
|
+
canUndo: boolean;
|
|
2787
|
+
/** Refines the latest committed value; duplicate activation is ignored. */
|
|
2788
|
+
refine: () => Promise<void>;
|
|
2789
|
+
/** Restores the baseline from before the first successful refinement. */
|
|
2790
|
+
undo: () => void;
|
|
2791
|
+
/** Cancels work and clears feedback and Undo without modifying the value. */
|
|
2792
|
+
reset: () => void;
|
|
2793
|
+
}
|
|
2794
|
+
|
|
2795
|
+
/** Field-local refinement feedback state. */
|
|
2796
|
+
export declare enum TextRefinementState {
|
|
2797
|
+
Idle = "idle",
|
|
2798
|
+
Pending = "pending",
|
|
2799
|
+
Success = "success",
|
|
2800
|
+
Error = "error",
|
|
2801
|
+
Restored = "restored",
|
|
2802
|
+
Unchanged = "unchanged"
|
|
2803
|
+
}
|
|
2804
|
+
|
|
2333
2805
|
/** A single selectable UI theme. */
|
|
2334
2806
|
export declare interface Theme {
|
|
2335
2807
|
/** Unique theme identifier (e.g. `'dark'`, `'light'`). */
|
|
@@ -2428,6 +2900,18 @@ export declare const truncateToUtf8Bytes: (str: string, maxBytes: number) => str
|
|
|
2428
2900
|
/** Decodes a base64 string into raw bytes, or `undefined` if the string is not valid base64. */
|
|
2429
2901
|
export declare const tryBase64ToBytes: (base64: string) => Uint8Array | undefined;
|
|
2430
2902
|
|
|
2903
|
+
/** Result of {@link useUnsavedChangesGuard}. */
|
|
2904
|
+
export declare interface UnsavedChangesGuardResult {
|
|
2905
|
+
/** Runs `action` immediately when nothing is dirty; otherwise defers it and opens the confirmation. */
|
|
2906
|
+
guard: (action: () => void) => void;
|
|
2907
|
+
/** Whether the discard confirmation should be shown. */
|
|
2908
|
+
isConfirmOpen: boolean;
|
|
2909
|
+
/** Closes the confirmation and runs the deferred action. */
|
|
2910
|
+
confirm: () => void;
|
|
2911
|
+
/** Closes the confirmation and drops the deferred action. */
|
|
2912
|
+
dismiss: () => void;
|
|
2913
|
+
}
|
|
2914
|
+
|
|
2431
2915
|
/** Result of successfully uploading an {@link Attachment}. */
|
|
2432
2916
|
export declare interface UploadedAttachmentResult {
|
|
2433
2917
|
/** The DIAL Core file URL the attachment was uploaded to. */
|
|
@@ -2436,23 +2920,6 @@ export declare interface UploadedAttachmentResult {
|
|
|
2436
2920
|
name: string;
|
|
2437
2921
|
}
|
|
2438
2922
|
|
|
2439
|
-
/** Modal showing per-file upload progress with a cancel action. */
|
|
2440
|
-
export declare const UploadProgressModal: FC<UploadProgressModalProps>;
|
|
2441
|
-
|
|
2442
|
-
/** Props for the upload-progress modal. */
|
|
2443
|
-
export declare interface UploadProgressModalProps {
|
|
2444
|
-
/** Current batch state with per-file entries and open flag. */
|
|
2445
|
-
batchState: FileUploadBatchState;
|
|
2446
|
-
/** Title shown in the modal header (e.g. "Uploading files"). */
|
|
2447
|
-
uploadProgressTitle: string;
|
|
2448
|
-
/** Summary text below the title (e.g. "3 of 5 uploaded"). */
|
|
2449
|
-
uploadProgressText: string;
|
|
2450
|
-
/** Label for the cancel button. */
|
|
2451
|
-
cancelLabel: string;
|
|
2452
|
-
/** Called when the user clicks Cancel. */
|
|
2453
|
-
onCancel: () => void;
|
|
2454
|
-
}
|
|
2455
|
-
|
|
2456
2923
|
/**
|
|
2457
2924
|
* Writes the height still available below an element into a CSS custom
|
|
2458
2925
|
* property, so a user-resizable control inside it can be capped at the space
|
|
@@ -2567,4 +3034,24 @@ export declare interface UserProfile {
|
|
|
2567
3034
|
isAdmin: boolean;
|
|
2568
3035
|
}
|
|
2569
3036
|
|
|
3037
|
+
/** Preserves an author's draft and Undo baseline across asynchronous controlled updates. */
|
|
3038
|
+
export declare const useTextRefinement: (options: UseTextRefinementOptions) => TextRefinementResult;
|
|
3039
|
+
|
|
3040
|
+
/** Controlled value and lifecycle inputs for one refinable field. */
|
|
3041
|
+
export declare interface UseTextRefinementOptions {
|
|
3042
|
+
/** Current controlled field value. */
|
|
3043
|
+
value: string;
|
|
3044
|
+
/** Host rewriting callback. Omission disables refinement and clears its state. */
|
|
3045
|
+
onRefine?: TextRefinementCallback;
|
|
3046
|
+
/** Publishes a successful result or the original Undo baseline. */
|
|
3047
|
+
onChange: (value: string) => void;
|
|
3048
|
+
/** Disables refinement and cancels active work when true. Defaults to false. */
|
|
3049
|
+
disabled?: boolean;
|
|
3050
|
+
/** Draft identity; changing it resets state even when text is equal. */
|
|
3051
|
+
resetKey?: unknown;
|
|
3052
|
+
}
|
|
3053
|
+
|
|
3054
|
+
/** Defers leaving a form with unsaved changes until the user confirms, and asks the browser to warn before the page unloads. */
|
|
3055
|
+
export declare const useUnsavedChangesGuard: (isDirty: boolean) => UnsavedChangesGuardResult;
|
|
3056
|
+
|
|
2570
3057
|
export { }
|