@epam/ai-dial-chat-shared 1.1.0-dev.94 → 1.1.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (179) hide show
  1. package/components/CopyButton/CopyButton.js +33 -0
  2. package/components/DeploymentIcon/DeploymentIcon.js +62 -0
  3. package/components/DeploymentIcon/DeploymentIcon.module.scss.js +3 -0
  4. package/components/EntityHeader/EntityHeader.js +48 -0
  5. package/components/EntityTypeLabel/EntityTypeLabel.js +10 -0
  6. package/components/FeaturedChip/FeaturedChip.js +18 -0
  7. package/components/InitialsAvatar/InitialsAvatar.js +29 -0
  8. package/components/InitialsAvatar/InitialsAvatar.module.scss.js +6 -0
  9. package/components/ItemHeader/ItemHeader.js +35 -0
  10. package/components/ItemHeader/ItemHeader.module.scss.js +6 -0
  11. package/components/MarkdownRenderer/CodeBlock/CodeBlock.js +104 -0
  12. package/components/MarkdownRenderer/CodeBlock/CodeBlock.module.scss.js +10 -0
  13. package/components/MarkdownRenderer/CodeBlock/syntax-theme.js +69 -0
  14. package/components/MarkdownRenderer/MDMessageViewer.js +22 -0
  15. package/components/MarkdownRenderer/MarkdownRenderer.js +280 -0
  16. package/components/MarkdownRenderer/MarkdownRenderer.module.scss.js +11 -0
  17. package/components/MarkdownRenderer/Math/MarkdownMathBlock.js +24 -0
  18. package/components/MarkdownRenderer/Math/MarkdownMathBlock.module.scss.js +6 -0
  19. package/components/MarkdownRenderer/Table/MarkdownTable.js +77 -0
  20. package/components/MarkdownRenderer/Table/MarkdownTable.module.scss.js +15 -0
  21. package/components/MarkdownRenderer/Table/TableHeader.js +30 -0
  22. package/components/MarkdownRenderer/Table/TableHeader.module.scss.js +3 -0
  23. package/components/MarkdownRenderer/Table/table-serialization.js +6 -0
  24. package/components/MarkdownRenderer/Table/useMarkdownTableActions/useMarkdownTableActions.js +66 -0
  25. package/components/MarkdownRenderer/TaskCheckbox/MarkdownTaskCheckbox.js +12 -0
  26. package/components/MarkdownRenderer/markdown-class-names.js +23 -0
  27. package/components/MarkdownWithPlaceholders/MarkdownWithPlaceholders.js +18 -0
  28. package/components/PanelEmptyState/PanelEmptyState.js +17 -0
  29. package/components/PanelEmptyState/PanelEmptyState.module.scss.js +3 -0
  30. package/components/ResourceSummary/ResourceSummary.js +34 -0
  31. package/components/ResourceSummary/ResourceSummary.module.scss.js +6 -0
  32. package/constants/breakpoint.js +4 -0
  33. package/constants/dial.js +4 -0
  34. package/constants/entity-colors.js +17 -0
  35. package/constants/icon.js +13 -0
  36. package/constants/markdown-editor.js +4 -0
  37. package/constants/mime-types.js +99 -0
  38. package/constants/resizable-fields.js +4 -0
  39. package/constants/select-list.js +4 -0
  40. package/constants/tag-input.js +4 -0
  41. package/file-manager/DialFileManagerShell/DialFileManagerShell.js +299 -0
  42. package/file-manager/FileManagerAttachModal/FileManagerAttachModal.js +108 -0
  43. package/file-manager/OperationLoaderModal/OperationLoaderModal.js +36 -0
  44. package/file-manager/UploadProgressModal/UploadProgressModal.js +56 -0
  45. package/file-manager/file-manager-variant.js +8 -0
  46. package/file-manager/path.js +7 -0
  47. package/file-manager/upload-batch.js +6 -0
  48. package/file-manager/useGridEditingScroll/useGridEditingScroll.js +45 -0
  49. package/file-manager.d.ts +491 -0
  50. package/file-manager.js +3 -0
  51. package/hooks/useAvailableHeightCap.js +36 -0
  52. package/hooks/useCodeCopy.js +20 -0
  53. package/hooks/useCollapsedText.js +38 -0
  54. package/hooks/useHorizontalOverflow.js +25 -0
  55. package/hooks/useIsMobile.js +13 -0
  56. package/hooks/useStreamedMarkdownContent.js +32 -0
  57. package/index.css +1 -1
  58. package/index.d.ts +2505 -41
  59. package/index.js +64 -49132
  60. package/markdown.d.ts +401 -0
  61. package/markdown.js +11 -0
  62. package/models/chat.js +14 -0
  63. package/models/conversation-classification.js +6 -0
  64. package/models/conversation-transfer.js +14 -0
  65. package/models/deployment-features.js +6 -0
  66. package/package.json +43 -12
  67. package/types/attachment.js +8 -0
  68. package/types/code-editor.js +6 -0
  69. package/types/entity-type.js +6 -0
  70. package/types/mime-type.js +8 -0
  71. package/utils/annotation.js +120 -0
  72. package/utils/avatar-color.js +37 -0
  73. package/utils/build-css-vars.js +8 -0
  74. package/utils/copy-to-clipboard.js +69 -0
  75. package/utils/file-download.js +79 -0
  76. package/utils/format-file-size.js +4 -0
  77. package/utils/format-last-used.js +20 -0
  78. package/utils/format-price.js +18 -0
  79. package/utils/generate-uuid.js +7 -0
  80. package/utils/initials.js +7 -0
  81. package/utils/is-audio-transcription-supported.js +5 -0
  82. package/utils/latex.js +79 -0
  83. package/utils/merge-class.js +8 -0
  84. package/utils/message-attachment-to-display.js +31 -0
  85. package/utils/message.js +5 -0
  86. package/utils/mime-type.js +73 -0
  87. package/utils/prompt-variables.js +58 -0
  88. package/utils/string-utils.js +14 -0
  89. package/components/DeploymentIcon/DeploymentIcon.d.ts +0 -36
  90. package/components/DeploymentIcon/DeploymentIcon.d.ts.map +0 -1
  91. package/components/InitialsAvatar/InitialsAvatar.d.ts +0 -13
  92. package/components/InitialsAvatar/InitialsAvatar.d.ts.map +0 -1
  93. package/components/MarkdownRenderer/CodeBlock/CodeBlock.d.ts +0 -47
  94. package/components/MarkdownRenderer/CodeBlock/CodeBlock.d.ts.map +0 -1
  95. package/components/MarkdownRenderer/CodeBlock/syntax-theme.d.ts +0 -7
  96. package/components/MarkdownRenderer/CodeBlock/syntax-theme.d.ts.map +0 -1
  97. package/components/MarkdownRenderer/MDMessageViewer.d.ts +0 -31
  98. package/components/MarkdownRenderer/MDMessageViewer.d.ts.map +0 -1
  99. package/components/MarkdownRenderer/MarkdownRenderer.d.ts +0 -105
  100. package/components/MarkdownRenderer/MarkdownRenderer.d.ts.map +0 -1
  101. package/components/MarkdownRenderer/Table/MarkdownTable.d.ts +0 -31
  102. package/components/MarkdownRenderer/Table/MarkdownTable.d.ts.map +0 -1
  103. package/components/MarkdownRenderer/TaskCheckbox/MarkdownTaskCheckbox.d.ts +0 -9
  104. package/components/MarkdownRenderer/TaskCheckbox/MarkdownTaskCheckbox.d.ts.map +0 -1
  105. package/components/MarkdownRenderer/markdown-class-names.d.ts +0 -4
  106. package/components/MarkdownRenderer/markdown-class-names.d.ts.map +0 -1
  107. package/components/PanelEmptyState/PanelEmptyState.d.ts +0 -20
  108. package/components/PanelEmptyState/PanelEmptyState.d.ts.map +0 -1
  109. package/constants/dial.d.ts +0 -3
  110. package/constants/dial.d.ts.map +0 -1
  111. package/constants/icon.d.ts +0 -14
  112. package/constants/icon.d.ts.map +0 -1
  113. package/constants/mime-types.d.ts +0 -7
  114. package/constants/mime-types.d.ts.map +0 -1
  115. package/hooks/useCodeCopy.d.ts +0 -6
  116. package/hooks/useCodeCopy.d.ts.map +0 -1
  117. package/hooks/useCollapsedText.d.ts +0 -27
  118. package/hooks/useCollapsedText.d.ts.map +0 -1
  119. package/hooks/useIsMobile.d.ts +0 -3
  120. package/hooks/useIsMobile.d.ts.map +0 -1
  121. package/hooks/useStreamedMarkdownContent.d.ts +0 -3
  122. package/hooks/useStreamedMarkdownContent.d.ts.map +0 -1
  123. package/hooks/useTableScroll.d.ts +0 -17
  124. package/hooks/useTableScroll.d.ts.map +0 -1
  125. package/index.d.ts.map +0 -1
  126. package/models/annotation.d.ts +0 -78
  127. package/models/annotation.d.ts.map +0 -1
  128. package/models/auth.d.ts +0 -26
  129. package/models/auth.d.ts.map +0 -1
  130. package/models/chat.d.ts +0 -276
  131. package/models/chat.d.ts.map +0 -1
  132. package/models/custom-visualizer.d.ts +0 -61
  133. package/models/custom-visualizer.d.ts.map +0 -1
  134. package/models/deployment-configuration.d.ts +0 -55
  135. package/models/deployment-configuration.d.ts.map +0 -1
  136. package/models/deployment-features.d.ts +0 -17
  137. package/models/deployment-features.d.ts.map +0 -1
  138. package/models/deployment.d.ts +0 -31
  139. package/models/deployment.d.ts.map +0 -1
  140. package/models/dial-model.d.ts +0 -19
  141. package/models/dial-model.d.ts.map +0 -1
  142. package/models/import-export.d.ts +0 -23
  143. package/models/import-export.d.ts.map +0 -1
  144. package/models/theme.d.ts +0 -36
  145. package/models/theme.d.ts.map +0 -1
  146. package/models/tool-menu-item.d.ts +0 -13
  147. package/models/tool-menu-item.d.ts.map +0 -1
  148. package/types/attachment.d.ts +0 -23
  149. package/types/attachment.d.ts.map +0 -1
  150. package/types/code-editor.d.ts +0 -8
  151. package/types/code-editor.d.ts.map +0 -1
  152. package/types/mime-type.d.ts +0 -53
  153. package/types/mime-type.d.ts.map +0 -1
  154. package/utils/avatar-color.d.ts +0 -10
  155. package/utils/avatar-color.d.ts.map +0 -1
  156. package/utils/build-css-vars.d.ts +0 -4
  157. package/utils/build-css-vars.d.ts.map +0 -1
  158. package/utils/copy-to-clipboard.d.ts +0 -3
  159. package/utils/copy-to-clipboard.d.ts.map +0 -1
  160. package/utils/file-download.d.ts +0 -9
  161. package/utils/file-download.d.ts.map +0 -1
  162. package/utils/format-file-size.d.ts +0 -3
  163. package/utils/format-file-size.d.ts.map +0 -1
  164. package/utils/format-last-used.d.ts +0 -3
  165. package/utils/format-last-used.d.ts.map +0 -1
  166. package/utils/initials.d.ts +0 -3
  167. package/utils/initials.d.ts.map +0 -1
  168. package/utils/is-audio-transcription-supported.d.ts +0 -3
  169. package/utils/is-audio-transcription-supported.d.ts.map +0 -1
  170. package/utils/latex.d.ts +0 -11
  171. package/utils/latex.d.ts.map +0 -1
  172. package/utils/merge-class.d.ts +0 -4
  173. package/utils/merge-class.d.ts.map +0 -1
  174. package/utils/message-attachment-to-display.d.ts +0 -22
  175. package/utils/message-attachment-to-display.d.ts.map +0 -1
  176. package/utils/message.d.ts +0 -4
  177. package/utils/message.d.ts.map +0 -1
  178. package/utils/string-utils.d.ts +0 -5
  179. package/utils/string-utils.d.ts.map +0 -1
package/index.d.ts CHANGED
@@ -1,41 +1,2505 @@
1
- export * from './models/annotation';
2
- export * from './models/chat';
3
- export * from './models/theme';
4
- export * from './models/auth';
5
- export * from './models/dial-model';
6
- export * from './models/deployment-configuration';
7
- export * from './models/deployment';
8
- export * from './models/deployment-features';
9
- export * from './models/import-export';
10
- export * from './models/tool-menu-item';
11
- export * from './models/custom-visualizer';
12
- export * from './types/attachment';
13
- export * from './types/mime-type';
14
- export * from './types/code-editor';
15
- export * from './utils/string-utils';
16
- export * from './utils/merge-class';
17
- export * from './utils/build-css-vars';
18
- export * from './utils/message';
19
- export * from './utils/message-attachment-to-display';
20
- export * from './utils/is-audio-transcription-supported';
21
- export * from './utils/copy-to-clipboard';
22
- export * from './utils/format-last-used';
23
- export * from './utils/format-file-size';
24
- export * from './utils/file-download';
25
- export * from './constants/mime-types';
26
- export * from './constants/icon';
27
- export * from './constants/dial';
28
- export * from './components/DeploymentIcon/DeploymentIcon';
29
- export * from './components/InitialsAvatar/InitialsAvatar';
30
- export * from './utils/initials';
31
- export * from './utils/avatar-color';
32
- export * from './components/PanelEmptyState/PanelEmptyState';
33
- export * from './components/MarkdownRenderer/MarkdownRenderer';
34
- export * from './components/MarkdownRenderer/MDMessageViewer';
35
- export * from './components/MarkdownRenderer/markdown-class-names';
36
- export * from './components/MarkdownRenderer/CodeBlock/CodeBlock';
37
- export * from './components/MarkdownRenderer/Table/MarkdownTable';
38
- export * from './hooks/useIsMobile';
39
- export * from './hooks/useCodeCopy';
40
- export * from './hooks/useCollapsedText';
41
- //# sourceMappingURL=index.d.ts.map
1
+ import { ComponentProps } from 'react';
2
+ import { Components } from 'react-markdown';
3
+ import { CSSProperties } from 'react';
4
+ import { default as default_2 } from 'classnames';
5
+ import { DIAL_ICON_SIZE } from '@epam/ai-dial-ui-kit';
6
+ import { DialCopiedItem } from '@epam/ai-dial-react-file-manager';
7
+ import { DialDeletedItem } from '@epam/ai-dial-react-file-manager';
8
+ import { DialFile } from '@epam/ai-dial-react-file-manager';
9
+ import { DialFileManager } from '@epam/ai-dial-react-file-manager';
10
+ import { DialFileManagerActions } from '@epam/ai-dial-react-file-manager';
11
+ import { DialFileManagerTabs } from '@epam/ai-dial-react-file-manager';
12
+ import { DialFileNodeType } from '@epam/ai-dial-react-file-manager';
13
+ import { DialUploadFileItem } from '@epam/ai-dial-react-file-manager';
14
+ import { ElementSize } from '@epam/ai-dial-ui-kit';
15
+ import { FC } from 'react';
16
+ import { FileManagerColumnKey } from '@epam/ai-dial-react-file-manager';
17
+ import { FileManagerGridRow } from '@epam/ai-dial-react-file-manager';
18
+ import { GridApi } from 'ag-grid-community';
19
+ import { IRowNode } from 'ag-grid-community';
20
+ import { Options } from 'react-markdown';
21
+ import { ReactNode } from 'react';
22
+ import { RefObject } from 'react';
23
+
24
+ /** A single annotation attached to an assistant message, optionally citing a source document. */
25
+ export declare interface Annotation {
26
+ /** Zero-based position in the annotation list; used to merge streaming delta updates. */
27
+ index?: number;
28
+ /** Which part of the message text (or a request resource) is annotated. */
29
+ target?: AnnotationTarget;
30
+ /** The annotation payload: quoted text, source document, and optional styling. */
31
+ body?: AnnotationBody;
32
+ }
33
+
34
+ /** Payload of the annotation: the cited text excerpt, its source document, and optional styling hints. */
35
+ export declare interface AnnotationBody {
36
+ /** Human-readable title of the cited section or document. */
37
+ title?: string;
38
+ /** The literal text excerpt being cited. */
39
+ quote?: string;
40
+ /** The cited source document (present when the annotation references a file). */
41
+ source?: AnnotationSource;
42
+ /** Selectors pointing to the cited region within the source document. */
43
+ selector?: AnnotationSelector | AnnotationSelector[];
44
+ /** Client-defined styling hints (e.g. highlight color). Treated as open-ended; unknown keys are preserved. */
45
+ configuration?: Record<string, unknown>;
46
+ }
47
+
48
+ /**
49
+ * Discriminated union of all recognised annotation selector shapes.
50
+ * Unknown selector types are preserved as an open record to allow forward-compatibility.
51
+ */
52
+ export declare type AnnotationSelector = TextCharacterRangeSelector | PdfBBoxSelector | HtmlTagSelector | DocxRangeSelector | PptxRangeSelector | ExcelRcRangeSelector | {
53
+ type: string;
54
+ [key: string]: unknown;
55
+ };
56
+
57
+ /** Identifies the cited document attached to the annotation. */
58
+ export declare interface AnnotationSource {
59
+ /** Always `'attachment'` for file-based sources. */
60
+ type: 'attachment';
61
+ /** The cited file — auto-shared by DIAL Core so the recipient can access it. */
62
+ attachment: AttachmentResource;
63
+ }
64
+
65
+ /** Identifies the part of the message (or a related resource) that the annotation refers to. */
66
+ export declare interface AnnotationTarget {
67
+ /** Source resource being targeted. `null` or absent means the first content part of the response. */
68
+ source?: unknown;
69
+ /** Character-range or document-region selector within the targeted source. */
70
+ selector?: AnnotationSelector;
71
+ }
72
+
73
+ /** Attachment selected locally by the user before it is sent to the backend. */
74
+ export declare interface Attachment extends DisplayAttachment {
75
+ /** The underlying browser `File` object selected by the user. */
76
+ file: File;
77
+ }
78
+
79
+ /**
80
+ * Optional app-owned callbacks used to resolve display URLs for an attachment.
81
+ * When omitted, the mapper falls back to the attachment's own `url` (or a
82
+ * synthesized `data:` URL when only inline base64 `data` is present).
83
+ */
84
+ export declare interface AttachmentDisplayResolvers {
85
+ /** Resolves the image preview URL for an attachment that has a remote `url`. */
86
+ resolvePreviewUrl?(dto: MessageAttachment): string | undefined;
87
+ /** Resolves the audio playback URL for an attachment that has a remote `url`. */
88
+ resolvePlayUrl?(dto: MessageAttachment): string | undefined;
89
+ }
90
+
91
+ /** Discriminates why an attachment upload failed. Only set when `status === RequestStatus.Error`. */
92
+ export declare enum AttachmentErrorReason {
93
+ /** Upload failed because the device was offline. */
94
+ Network = "network",
95
+ /** File MIME type is not in the deployment's inputAttachmentTypes list. */
96
+ UnsupportedType = "unsupported-type"
97
+ }
98
+
99
+ /** A file attachment referenced by a citation — same shape as `MessageAttachment` but scoped to annotations. */
100
+ export declare interface AttachmentResource {
101
+ /** MIME type of the attached file (e.g. `'application/pdf'`). */
102
+ type: string;
103
+ /** Remote URL pointing to the file content. */
104
+ url: string;
105
+ /** Human-readable display name for the file. Used in citation markers. */
106
+ title?: string;
107
+ }
108
+
109
+ /** Discriminates the kind of content an attachment carries. */
110
+ export declare enum AttachmentType {
111
+ /** Generic file attachment (non-image, non-audio). */
112
+ File = "file",
113
+ /** Raster or vector image. */
114
+ Image = "image",
115
+ /** Audio file that can be played inline. */
116
+ Audio = "audio",
117
+ /** A saved prompt snippet. */
118
+ Prompt = "prompt",
119
+ /** Text pasted directly by the user. */
120
+ Pasted = "pasted",
121
+ /** A link to a file or webpage. */
122
+ Link = "link"
123
+ }
124
+
125
+ /** Result returned by the file-manager attach modal when the user confirms a selection. */
126
+ export declare interface AttachResult {
127
+ /** Selected files (individual items, not folders). */
128
+ files: DialFile[];
129
+ /** Virtual paths of selected folders. */
130
+ folderPaths: string[];
131
+ }
132
+
133
+ /** A background/foreground colour pair for an initials avatar badge. */
134
+ export declare interface AvatarColorEntry {
135
+ /** CSS colour value for the badge background — a theme token with a hex fallback. */
136
+ background: string;
137
+ /** CSS colour value for the initials text — a theme token with a hex fallback. */
138
+ foreground: string;
139
+ }
140
+
141
+ /** 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
+ export declare const base64ToBlob: (data: string, mimeType: string) => Blob;
143
+
144
+ /** Base props for large Tabler icons (LG size, icon stroke, `aria-hidden`). */
145
+ export declare const BASE_LG_ICON_PROPS: {
146
+ size: DIAL_ICON_SIZE;
147
+ stroke: number;
148
+ 'aria-hidden': boolean;
149
+ };
150
+
151
+ /** Base props for medium-sized Tabler icons (MD size, icon stroke, `aria-hidden`). */
152
+ export declare const BASE_MD_ICON_PROPS: {
153
+ size: DIAL_ICON_SIZE;
154
+ stroke: number;
155
+ 'aria-hidden': boolean;
156
+ };
157
+
158
+ /** Builds a `CSSProperties` object from a record of CSS custom property names to values, omitting entries with `undefined` or empty-string values. */
159
+ export declare const buildCssVars: (vars: Record<string, string | number | undefined>) => CSSProperties;
160
+
161
+ /**
162
+ * Returns the starting values for `parameters`, keyed by name — one entry per
163
+ * parameter that carries a default, and nothing for the rest.
164
+ */
165
+ export declare const buildPromptParamDefaults: (parameters: PromptParameter[]) => Record<string, string>;
166
+
167
+ /** Entity type for a catalog item. Values are uppercase for direct color-map lookup. */
168
+ export declare enum CatalogEntityType {
169
+ Model = "MODEL",
170
+ Agent = "AGENT",
171
+ Toolset = "TOOLSET",
172
+ Skill = "SKILL",
173
+ /** Reusable text prompt. Carries a body instead of a runtime. */
174
+ Prompt = "PROMPT"
175
+ }
176
+
177
+ /** Color theme for syntax highlighting. */
178
+ export declare enum CodeBlockTheme {
179
+ /** Dark syntax-highlighting theme. */
180
+ Dark = "dark",
181
+ /** Light syntax-highlighting theme. */
182
+ Light = "light"
183
+ }
184
+
185
+ /**
186
+ * {@link DEFAULT_MARKDOWN_CLASS_NAMES} with the body copy one step down the
187
+ * type scale. Headings, code, and tables are unchanged — only the text that
188
+ * dominates a long answer shrinks, so more of it fits on a narrow viewport.
189
+ */
190
+ export declare const COMPACT_MARKDOWN_CLASS_NAMES: MarkdownRendererClassNames;
191
+
192
+ /** Options for the conflict-resolution popup shown during copy/move operations. */
193
+ export declare type ConflictResolutionPopupOptions = NonNullable<DialFileManagerComponentProps['conflictResolutionPopupOptions']>;
194
+
195
+ /** A full conversation including its messages and configuration. */
196
+ export declare interface Conversation {
197
+ /** Unique conversation identifier. */
198
+ id: string;
199
+ /** Identifier of the folder this conversation lives in. */
200
+ folderId: string;
201
+ /** Human-readable conversation title. */
202
+ name: string;
203
+ /** The AI model used for this conversation. */
204
+ model: {
205
+ id: string;
206
+ };
207
+ /** System prompt prepended to every request. */
208
+ prompt: string;
209
+ /** Sampling temperature passed to the model (0–1). */
210
+ temperature: number;
211
+ /** Optional Responses-API output-token cap, forwarded as `max_output_tokens`. Never derived from deployment limits or Chat Completions defaults. */
212
+ maxOutputTokens?: number;
213
+ /** Ordered list of messages in the conversation. */
214
+ messages: Message[];
215
+ /** Unix timestamp (ms) of the most recent activity. */
216
+ lastActivityDate: number;
217
+ /** Unix timestamp (ms) of the last save. */
218
+ updatedAt: number;
219
+ /** Add-on IDs enabled for this conversation. */
220
+ selectedAddons: string[];
221
+ /** Override model ID used when an assistant model is selected. */
222
+ assistantModelId: string;
223
+ /** Response format used when rendering messages. */
224
+ responseFormat?: ResponseFormat;
225
+ }
226
+
227
+ /** Metadata returned by the DIAL file/conversation listing API for a single resource node. */
228
+ export declare interface ConversationMetadata {
229
+ /** Display name of the resource. */
230
+ name: string;
231
+ /** Optional author identifier. */
232
+ author?: string;
233
+ /** Path of the parent folder in the resource tree. */
234
+ parentPath: string;
235
+ /** Storage bucket the resource belongs to. */
236
+ bucket: string;
237
+ /** Full resource URL used to fetch or reference the item. */
238
+ url: string;
239
+ /** Node type as returned by the backend (e.g. `'ITEM'`, `'FOLDER'`). */
240
+ nodeType: string;
241
+ /** Resource type discriminator (e.g. `'Conversation'`). */
242
+ resourceType: string;
243
+ /** ETag for optimistic concurrency / cache validation. */
244
+ etag?: string;
245
+ /** Unix timestamp (ms) when the resource was created. */
246
+ createdAt?: number;
247
+ /** Unix timestamp (ms) of the last modification. */
248
+ updatedAt?: number;
249
+ /** Permission strings granted to the current user for this resource. */
250
+ permissions?: string[];
251
+ }
252
+
253
+ /** Reason a transfer job failed. Translation-free; hosts map each member to their own copy. */
254
+ export declare enum ConversationTransferErrorCode {
255
+ Unauthorized = "unauthorized",
256
+ NotFound = "notFound",
257
+ UnsupportedFormat = "unsupportedFormat",
258
+ MissingBucket = "missingBucket",
259
+ FileTooLarge = "fileTooLarge",
260
+ Unknown = "unknown"
261
+ }
262
+
263
+ /** A queued export or import job. */
264
+ export declare interface ConversationTransferJob {
265
+ id: string;
266
+ subject: ConversationTransferSubject;
267
+ status: ConversationTransferJobStatus;
268
+ /** Name of the file this job writes (export) or reads (import), known at enqueue time. */
269
+ fileName: string;
270
+ /** Determinate completion of this job. */
271
+ progress: ConversationTransferProgress;
272
+ /** Why the job failed. Set only alongside {@link ConversationTransferJobStatus.Failed}. */
273
+ errorCode?: ConversationTransferErrorCode;
274
+ /**
275
+ * What was incomplete about an otherwise-delivered job. Set only alongside
276
+ * {@link ConversationTransferJobStatus.Warning}.
277
+ */
278
+ warningCode?: ConversationTransferWarningCode;
279
+ }
280
+
281
+ /** Lifecycle status of a queued export/import job. */
282
+ export declare enum ConversationTransferJobStatus {
283
+ InProgress = "inProgress",
284
+ Success = "success",
285
+ /** Delivered its file, but not everything the user asked for made it in. */
286
+ Warning = "warning",
287
+ Failed = "failed",
288
+ Canceled = "canceled"
289
+ }
290
+
291
+ /**
292
+ * A transfer job's completion, always determinate — there is no indeterminate
293
+ * state, so a job is renderable as a real percentage from its first frame.
294
+ */
295
+ export declare interface ConversationTransferProgress {
296
+ /**
297
+ * Completion as an integer 0–100. Monotonically non-decreasing for the life
298
+ * of a job id: a write that would lower it is discarded rather than applied,
299
+ * so a discovered unit count can subdivide the work still to do but can
300
+ * never move the indicator backwards.
301
+ */
302
+ percent: number;
303
+ /**
304
+ * Readout for the phase currently advancing, for assistive technology.
305
+ * Absent while the phase's unit count is unknown.
306
+ */
307
+ units?: ConversationTransferProgressUnits;
308
+ }
309
+
310
+ /**
311
+ * Countable progress within the phase a job is currently working through —
312
+ * downloaded/uploaded attachments, or fetched/saved conversations. Describes
313
+ * only that phase, never the job as a whole.
314
+ */
315
+ export declare interface ConversationTransferProgressUnits {
316
+ /** Units settled so far in the current phase. */
317
+ completed: number;
318
+ /** Units the current phase will settle in total. */
319
+ total: number;
320
+ /** What a unit represents. */
321
+ kind: ConversationTransferUnitKind;
322
+ }
323
+
324
+ /** What a transfer job operates on — structured data, never pre-rendered translated text. */
325
+ export declare type ConversationTransferSubject = {
326
+ kind: ConversationTransferSubjectKind.Single;
327
+ /** The conversation's own name. */
328
+ title: string;
329
+ /** Folder breadcrumb the conversation originated from, if nested. */
330
+ sourceBreadcrumb?: string;
331
+ } | {
332
+ kind: ConversationTransferSubjectKind.All;
333
+ };
334
+
335
+ /** Whether a transfer job's subject is a single named conversation or the whole history. */
336
+ export declare enum ConversationTransferSubjectKind {
337
+ Single = "single",
338
+ All = "all"
339
+ }
340
+
341
+ /** What one unit of a transfer job's discoverable work represents. */
342
+ export declare enum ConversationTransferUnitKind {
343
+ Attachment = "attachment",
344
+ Conversation = "conversation"
345
+ }
346
+
347
+ /**
348
+ * Reason a transfer job completed with a non-fatal warning. Translation-free;
349
+ * hosts map each member to their own copy.
350
+ */
351
+ export declare enum ConversationTransferWarningCode {
352
+ AttachmentSkipped = "attachmentSkipped"
353
+ }
354
+
355
+ export declare const CopyButton: FC<CopyButtonProps>;
356
+
357
+ export declare interface CopyButtonProps {
358
+ onClick: () => void;
359
+ className?: string;
360
+ isCopied: boolean;
361
+ copyLabel: string;
362
+ copiedLabel: string;
363
+ size?: ElementSize;
364
+ /** Accessible label for the button; falls back to `copyLabel` when omitted. */
365
+ ariaLabel?: string;
366
+ iconSize?: number;
367
+ iconCopy?: ReactNode;
368
+ /** Renders the button in its disabled state and blocks clicks. Defaults to `false`. */
369
+ isDisabled?: boolean;
370
+ }
371
+
372
+ export declare const CopyIconButton: FC<CopyButtonProps>;
373
+
374
+ /**
375
+ * Copies markdown `content` to the clipboard as rich text, so pasting into a
376
+ * rich-text target (Word, Gmail, Slack) keeps the formatting. Both the
377
+ * `text/html` and the `text/plain` flavour are written, so a plain-text
378
+ * target (Notepad, a terminal, a code editor) pastes the raw markdown instead
379
+ * of nothing. Falls back to {@link copyToClipboard}, and therefore to the raw
380
+ * markdown, when the multi-format Clipboard API isn't available.
381
+ */
382
+ export declare const copyMarkdownAsRichText: (content: string) => Promise<boolean>;
383
+
384
+ /** Copies `text` to the clipboard; returns `true` on success, `false` when both the Clipboard API and the `execCommand` fallback fail. */
385
+ export declare const copyToClipboard: (text: string) => Promise<boolean>;
386
+
387
+ /**
388
+ * A single MIME → visualizer mapping from the `CUSTOM_VISUALIZERS` registry.
389
+ * Field semantics are fixed by already-deployed visualizer applications and
390
+ * operator configurations — see `design.md` D9/D10 in the
391
+ * `add-custom-visualizers` change for why `title` is required and
392
+ * `contentType` accepts a comma-separated list.
393
+ */
394
+ export declare interface CustomVisualizer {
395
+ /**
396
+ * The postMessage protocol namespace, NOT a display label. Every message
397
+ * exchanged with the iframe is prefixed `${title}/…`, and the iframe-side
398
+ * visualizer application must be constructed with this identical string
399
+ * as its `appName`. A mismatch is a silent failure — the iframe loads but
400
+ * never receives data.
401
+ */
402
+ title: string;
403
+ /** Human-readable description of the visualizer (kept for parity with the development schema; not consumed by host UI). */
404
+ description?: string;
405
+ /** Icon URL or identifier for the visualizer (kept for parity with the development schema; not consumed by host UI). */
406
+ icon?: string;
407
+ /**
408
+ * Comma-separated list of one or more MIME types this entry matches (e.g.
409
+ * `'application/vnd.plotly.v1+json'` or
410
+ * `'application/vnd.plotly.v1+json, application/vnd.vega.v5+json'`).
411
+ * Stored verbatim; splitting happens at lookup time.
412
+ */
413
+ contentType: string;
414
+ /** Absolute HTTP(S) URL of the visualizer iframe. */
415
+ url: string;
416
+ /** Milliseconds to wait for a `send()` request's `/RESPONSE` before rejecting. Defaults to `10000`. Does NOT bound the initial handshake. */
417
+ requestTimeout?: number;
418
+ /** Suggested initial width of the canvas panel in pixels. Forwarded as-is in `CustomVisualizerDataLayout`. */
419
+ width?: number;
420
+ /** Suggested initial height of the canvas panel in pixels. Forwarded as-is in `CustomVisualizerDataLayout`. */
421
+ height?: number;
422
+ /** Suggested canvas panel height on mobile viewports in pixels. Forwarded as-is in `CustomVisualizerDataLayout`. */
423
+ mobileHeight?: number;
424
+ /** Whether the host should pass auth info to the visualizer. Accepted for schema parity with development but auth forwarding is not yet wired. */
425
+ passAuthInfo?: boolean;
426
+ /** Whether the host should pass an explicit access token. Accepted for schema parity with development but auth forwarding is not yet wired. */
427
+ passExplicitToken?: boolean;
428
+ }
429
+
430
+ /** Payload of a `SEND_VISUALIZE_DATA` request: presentation layout plus the opaque attachment payload. */
431
+ export declare interface CustomVisualizerData {
432
+ /** Presentation layout hints. */
433
+ layout: CustomVisualizerDataLayout;
434
+ /** Opaque attachment payload consumed by the third-party visualizer. */
435
+ [key: string]: unknown;
436
+ }
437
+
438
+ /** Presentation-only layout hints forwarded to the visualizer inside `SEND_VISUALIZE_DATA`. */
439
+ export declare interface CustomVisualizerDataLayout {
440
+ /** Suggested width of the canvas panel in pixels (from the registry entry). */
441
+ width?: number;
442
+ /** Suggested height of the canvas panel in pixels (from the registry entry). */
443
+ height?: number;
444
+ /** Suggested height on mobile-sized screens in pixels (from the registry entry). */
445
+ mobileHeight?: number;
446
+ /** Id of the host's currently active theme. */
447
+ themeId: string;
448
+ }
449
+
450
+ /** Default typography classNames for rendering markdown with full visual hierarchy. */
451
+ export declare const DEFAULT_MARKDOWN_CLASS_NAMES: MarkdownRendererClassNames;
452
+
453
+ /** Default filename used when downloading a Markdown table as CSV. */
454
+ export declare const DEFAULT_MARKDOWN_TABLE_DOWNLOAD_FILENAME = "table.csv";
455
+
456
+ export declare const defaultMarkdownComponents: Components;
457
+
458
+ /**
459
+ * JSON Schema object returned by the DIAL Core deployment configuration endpoint
460
+ * (`GET /v1/deployments/{deployment_name}/configuration`).
461
+ * Only present for deployments whose `features.configuration` flag is `true`.
462
+ */
463
+ export declare interface DeploymentConfigurationSchema {
464
+ /** JSON Schema type (typically "object"). */
465
+ type?: string;
466
+ /** Human-readable schema title. */
467
+ title?: string;
468
+ /** Whether additional properties are allowed, or a schema for them. */
469
+ additionalProperties?: boolean | Record<string, unknown>;
470
+ /** Named configuration properties supported by this deployment. */
471
+ properties?: Record<string, DeploymentConfigurationSchemaProperty>;
472
+ /**
473
+ * When `true`, the application does not accept free-form text input.
474
+ * Users interact only via form/action buttons defined in the schema.
475
+ * Mapped from `dial:chatMessageInputDisabled` by the backend.
476
+ */
477
+ isChatMessageInputDisabled?: boolean;
478
+ /** Index signature for additional JSON Schema keywords. */
479
+ [key: string]: unknown;
480
+ }
481
+
482
+ /** A single property entry in a deployment's configuration JSON Schema. */
483
+ export declare interface DeploymentConfigurationSchemaProperty {
484
+ /** Default value for this property. */
485
+ default?: unknown;
486
+ /** Human-readable description of this property. */
487
+ description?: string;
488
+ /** DIAL-specific widget hint (e.g. "buttons"). */
489
+ 'dial:widget'?: string;
490
+ /** List of allowed value variants (JSON Schema oneOf). For the `starter` property these are {@link StarterOption} entries. */
491
+ oneOf?: StarterOption[] | unknown[];
492
+ /** Index signature for additional JSON Schema keywords. */
493
+ [key: string]: unknown;
494
+ }
495
+
496
+ /** Feature flags for a deployment, controlling which per-conversation settings are available. */
497
+ export declare interface DeploymentFeatures {
498
+ /** Whether the deployment supports a custom system prompt. */
499
+ systemPrompt: boolean;
500
+ /** Whether the deployment supports temperature control. */
501
+ temperature: boolean;
502
+ /** Whether the deployment supports response format selection. */
503
+ responseFormat?: boolean;
504
+ }
505
+
506
+ /** Renders a deployment icon inside a rounded badge, falling back to initials or a custom node when no image is available. */
507
+ export declare const DeploymentIcon: FC<DeploymentIconProps>;
508
+
509
+ /** CSS custom-property overrides for the `DeploymentIcon` component. */
510
+ export declare interface DeploymentIconColors {
511
+ /** Badge background color. */
512
+ background?: string;
513
+ }
514
+
515
+ /** User-visible strings for `DeploymentIcon`. */
516
+ export declare interface DeploymentIconLabels {
517
+ /** When provided, a tooltip with this text is shown on hover/focus. */
518
+ tooltip?: string;
519
+ }
520
+
521
+ /** Props for `DeploymentIcon`. */
522
+ export declare interface DeploymentIconProps {
523
+ /** Image URL to display. When absent the fallback is shown directly. */
524
+ src?: string;
525
+ /** Outer badge dimension in pixels. */
526
+ size: number;
527
+ /** Display name used to generate initials when no image is available. */
528
+ initialsName: string;
529
+ /** Custom node rendered when `src` is absent or the image fails to load. Overrides `initialsName`. */
530
+ fallback?: ReactNode;
531
+ /** User-visible strings. */
532
+ labels?: DeploymentIconLabels;
533
+ /** Style overrides. */
534
+ styles?: DeploymentIconStyles;
535
+ }
536
+
537
+ /** Style overrides for `DeploymentIcon`. */
538
+ export declare interface DeploymentIconStyles {
539
+ /** Color overrides applied as CSS custom properties. */
540
+ colors?: DeploymentIconColors;
541
+ /** Extra class applied to the outer badge wrapper, e.g. for a custom background variable. */
542
+ badgeClassName?: string;
543
+ }
544
+
545
+ /** A host-agnostic view model for a single deployment shown in UI components. */
546
+ export declare interface DeploymentItem {
547
+ /** Unique stable identifier from DIAL Core. */
548
+ id: string;
549
+ /** Human-readable display name. Falls back to `id` when absent. */
550
+ displayName?: string;
551
+ /** URL-safe icon reference. Resolved to a usable `<img src>` by the host app before passing. */
552
+ iconUrl?: string;
553
+ /** Deployment kind — used to choose a fallback icon. Typically `'model'` or `'application'`. */
554
+ type?: string;
555
+ /** MIME types accepted as input attachments (e.g. `['audio/*', 'image/*']`). Undefined when not specified by DIAL Core. */
556
+ inputAttachmentTypes?: string[];
557
+ /** Feature flags for this deployment, controlling which per-conversation settings are available. */
558
+ features?: DeploymentFeatures;
559
+ /** Maximum number of attachments allowed per message. Undefined when not specified by DIAL Core. */
560
+ maxInputAttachments?: number;
561
+ /** Human-readable description of the deployment. */
562
+ description?: string;
563
+ /** Timestamp of last update time from DIAL Core (e.g. 1714768496000). */
564
+ updatedAt?: number;
565
+ /** Display version string. */
566
+ displayVersion?: string;
567
+ /** Whether this deployment is featured (configured via env). */
568
+ isFeatured?: boolean;
569
+ /** Whether this deployment is hidden (configured via env). */
570
+ isHidden?: boolean;
571
+ /** Topics associated with the deployment. */
572
+ topics?: string[];
573
+ }
574
+
575
+ /** The viewport width (inclusive) where the desktop presentation begins. */
576
+ export declare const DESKTOP_BREAKPOINT_PX = 1280;
577
+
578
+ /** `matchMedia` query matching the desktop band (1280px and wider). */
579
+ export declare const DESKTOP_MEDIA_QUERY = "(min-width: 1280px)";
580
+
581
+ /**
582
+ * Gates which actions `useDialFileManager` exposes per tab. `Attach` excludes
583
+ * Copy/Move/Duplicate (it is a file picker, not a management surface); `Browse`
584
+ * exposes the full #7503 action set. `Full` is reserved for
585
+ * `DialFileManagerVariant.FolderPicker` (#7503+).
586
+ */
587
+ export declare enum DialFileManagerActionProfile {
588
+ Attach = "attach",
589
+ Browse = "browse",
590
+ Full = "full"
591
+ }
592
+
593
+ declare type DialFileManagerComponentProps = ComponentProps<typeof DialFileManager>;
594
+
595
+ /** Configuration for the destination-folder picker popup. */
596
+ export declare type DialFileManagerDestinationFolderPopupOptions = NonNullable<DialFileManagerComponentProps['destinationFolderPopupOptions']>;
597
+
598
+ /**
599
+ * Pre-translated strings and resolved renderers the shell renders as-is.
600
+ * The shell never calls `useTranslation` — every host (the attach modal
601
+ * today; a future standalone page) resolves these via its own i18n.
602
+ */
603
+ export declare interface DialFileManagerShellLabels {
604
+ /** Error message shown when the current folder listing fails. */
605
+ errorMessage: string;
606
+ /** Label for the retry button shown alongside the error message. */
607
+ retryLabel: string;
608
+ /** Label for the hidden-files toggle in the toolbar. */
609
+ hiddenFilesLabel: string;
610
+ /** Label shown when hidden files are currently visible. */
611
+ showHiddenFilesLabel: string;
612
+ /** Label shown when hidden files are currently hidden. */
613
+ hideHiddenFilesLabel: string;
614
+ /** Returns a bulk-selection count label (e.g. "3 selected"). */
615
+ getSelectionLabel: (count: number) => string;
616
+ /** Label for the "Upload files" action in the New menu. */
617
+ uploadFilesLabel: string;
618
+ /** Label for the "Upload archive" action in the New menu. */
619
+ uploadArchiveAction: string;
620
+ /** Label for the "New folder" action in the New menu. */
621
+ newFolderLabel: string;
622
+ /** Label for the Download action. */
623
+ downloadLabel: string;
624
+ /** Overlay label shown while a download is in progress. */
625
+ downloadingLabel: string;
626
+ /** Label for the Delete action. */
627
+ deleteLabel: string;
628
+ /** Overlay label shown while a delete operation is in progress. */
629
+ deletingLabel: string;
630
+ /** Label for the Rename action. */
631
+ renameLabel: string;
632
+ /** Overlay label shown while a rename operation is in progress. */
633
+ renamingLabel: string;
634
+ /** Label for the Copy action. */
635
+ copyLabel: string;
636
+ /** Label for the Move action. */
637
+ moveLabel: string;
638
+ /** Label for the Duplicate action. */
639
+ duplicateLabel: string;
640
+ /** Label for the "Add folder" button in the destination picker. */
641
+ addFolderLabel: string;
642
+ /** Label for the hidden-files toggle in the destination-folder picker. */
643
+ hiddenFilesSwitcherLabel: string;
644
+ /** Returns the header for the copy destination popup. */
645
+ getCopyHeader: (count: number, name?: string) => string;
646
+ /** Returns the header for the move destination popup. */
647
+ getMoveHeader: (count: number, name?: string) => string;
648
+ /** Tooltip shown on the disabled source folder in the destination picker. */
649
+ moveSourceDisabledTooltip: string;
650
+ /** Tooltip shown when a destination folder is still loading. */
651
+ folderPickerLoadingTooltip: string;
652
+ /** Empty-state title in the destination-folder picker. */
653
+ folderPickerEmptyStateTitle: string;
654
+ /** Empty-state description in the destination-folder picker. */
655
+ folderPickerEmptyStateDescription: string;
656
+ /** Overlay text shown during a copy operation. */
657
+ copyingLabel: string;
658
+ /** Overlay text shown during a move operation. */
659
+ movingLabel: string;
660
+ /** Title for the copy operation loader modal. */
661
+ operationLoaderCopyTitle: string;
662
+ /** Title for the move operation loader modal. */
663
+ operationLoaderMoveTitle: string;
664
+ /** Cancel-button label in the operation loader modal. */
665
+ operationLoaderCancelLabel: string;
666
+ /** Returns the delete confirmation dialog title for the given item names. */
667
+ deleteConfirmTitle: (names: string[]) => ReactNode;
668
+ /** Returns the delete confirmation dialog body for the given item names. */
669
+ deleteConfirmBody: (names: string[]) => ReactNode;
670
+ /** Confirm-button label in the delete confirmation dialog. */
671
+ deleteConfirmLabel: string;
672
+ /** Cancel-button label in the delete confirmation dialog. */
673
+ 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;
680
+ /** Empty-state title when a search yields no results. */
681
+ searchEmptyStateTitle: string;
682
+ /** Empty-state title for an empty subfolder. */
683
+ folderEmptyStateTitle: string;
684
+ /** Tooltip explaining which symbols are forbidden in file names. */
685
+ forbiddenSymbolsTooltip: string;
686
+ /** Per-tab empty-state title and description. */
687
+ emptyStateByTab: Record<DialFileManagerTabs, EmptyStateCopy>;
688
+ /** Per-tab tree header label. */
689
+ treeHeaderByTab: Record<DialFileManagerTabs, string>;
690
+ /** Messages for inline rename validation. */
691
+ renameValidationMessages: RenameValidationMessages;
692
+ /** Options for the conflict resolution popup. */
693
+ conflictResolutionPopupOptions: ConflictResolutionPopupOptions;
694
+ /** Label for the Unshare action. */
695
+ unshareLabel: string;
696
+ /** Overlay label shown while an unshare operation is in progress. */
697
+ unsharingLabel: string;
698
+ /** Label for the Remove Access action. */
699
+ removeAccessLabel: string;
700
+ /** Overlay label shown while a remove-access operation is in progress. */
701
+ removingAccessLabel: string;
702
+ /** Label for the Info action. */
703
+ infoLabel: string;
704
+ /** Header for the metadata popup. */
705
+ metadataHeader: string;
706
+ /** Label for the file name in the metadata popup. */
707
+ metadataNameLabel: string;
708
+ /** Label for the file path in the metadata popup. */
709
+ metadataPathLabel: string;
710
+ /** Label for the modified date in the metadata popup. */
711
+ metadataModifiedDateLabel: string;
712
+ /** Label for the file size in the metadata popup. */
713
+ metadataSizeLabel: string;
714
+ /** Label for the author in the metadata popup. */
715
+ metadataAuthorLabel: string;
716
+ }
717
+
718
+ /**
719
+ * Identifies which host is driving `useDialFileManager` / `DialFileManagerShell`.
720
+ * `FolderPicker` is a reserved value with no implemented UI yet (#7503+).
721
+ */
722
+ export declare enum DialFileManagerVariant {
723
+ Attach = "attach",
724
+ Standalone = "standalone",
725
+ FolderPicker = "folder-picker"
726
+ }
727
+
728
+ /** A model entry as returned by the DIAL Core `/v1/models` endpoint. */
729
+ export declare interface DialModel {
730
+ /** Unique model identifier used in API calls. */
731
+ id: string;
732
+ /** Discriminator — always `'model'`. */
733
+ object: string;
734
+ /** Unix timestamp (s) when the model was created. */
735
+ created?: number;
736
+ /** Identifier of the model owner/provider. */
737
+ owned_by?: string;
738
+ /** Index signature for additional provider-specific fields. */
739
+ [key: string]: unknown;
740
+ }
741
+
742
+ /** Response envelope for the DIAL Core model-listing endpoint. */
743
+ export declare interface DialModelListResponse {
744
+ /** List of available models. */
745
+ data: DialModel[];
746
+ }
747
+
748
+ /** Represents a file or content item that can be displayed as an attachment. */
749
+ export declare interface DisplayAttachment {
750
+ /** Unique client-side identifier. */
751
+ id: string;
752
+ /** Display name (usually the original filename). */
753
+ name: string;
754
+ /** MIME type of the attachment (e.g. `'image/png'`, `'application/pdf'`). */
755
+ contentType: MIMEType | string;
756
+ /** Content category used to select the correct icon and thumbnail. */
757
+ type: AttachmentType;
758
+ /** Upload / processing lifecycle state. */
759
+ status: RequestStatus;
760
+ /** Reason the upload failed; only set when `status === RequestStatus.Error`. */
761
+ errorReason?: AttachmentErrorReason;
762
+ /** Object URL for image preview; only set when `type === AttachmentType.Image`. */
763
+ previewUrl?: string;
764
+ /** Resolved playback URL for audio; only set when `type === AttachmentType.Audio`. */
765
+ playUrl?: string;
766
+ /** Remote URL for an attachment that has already been uploaded. */
767
+ url?: string;
768
+ /** Alternate reference URL (e.g. from the DIAL API `reference_url` field); used when `url` is absent. */
769
+ referenceUrl?: string;
770
+ /** Inline base-64 encoded content; present when the attachment carries data directly rather than via a URL. */
771
+ data?: string;
772
+ }
773
+
774
+ /**
775
+ * Selector that targets a character range inside a DOCX story. Confirmed
776
+ * against captured DIAL Core responses: unlike {@link TextCharacterRangeSelector},
777
+ * `end` is already exclusive on the wire, not inclusive.
778
+ */
779
+ export declare interface DocxRangeSelector {
780
+ /** Discriminator — always `'docx_text_range'`. */
781
+ type: 'docx_text_range';
782
+ /** Name of the DOCX story the range lives in, as an opaque string (only `'body'` is confirmed upstream — no closed set). */
783
+ story: string;
784
+ /** Source-tree element indices identifying the paragraph, matched element-wise. */
785
+ path: number[];
786
+ /** Zero-based start character offset within the story's matched text. */
787
+ start: number;
788
+ /** Zero-based end character offset — already exclusive on the wire. */
789
+ end: number;
790
+ /** The cited text, expected to equal the text resolved over `[start, end)`. */
791
+ text: string;
792
+ }
793
+
794
+ /** Triggers a browser download of `content` as a text file named `filename`. */
795
+ export declare const downloadTextFile: (content: string, filename: string, mimeType?: string) => void;
796
+
797
+ /** Title and description pair for an empty-state display. */
798
+ export declare interface EmptyStateCopy {
799
+ /** Primary empty-state heading. */
800
+ title: string;
801
+ /** Secondary empty-state description text. */
802
+ description: string;
803
+ }
804
+
805
+ /**
806
+ * Returns `name` with a file extension appended when it lacks one.
807
+ * Priority: extension already present on `name` → extension from `contentType` via `MIME_TYPE_EXT_MAP` → extension from the last segment of `url`.
808
+ * A trailing `.` in `name` or the `url` segment is only trusted when it looks
809
+ * like a real extension (letters/digits only) — otherwise it is treated as
810
+ * ordinary punctuation (e.g. a title such as `"Report vs. Summary"`).
811
+ */
812
+ export declare const ensureDownloadFilename: (name: string, url: string | undefined, contentType: string | undefined) => string;
813
+
814
+ /** Background color per entity type — used for the featured chip surface. */
815
+ export declare const ENTITY_TYPE_BG_COLOR: Record<CatalogEntityType, string>;
816
+
817
+ /** Text color per entity type — used for the type label, featured chip, and drop shadow. */
818
+ export declare const ENTITY_TYPE_COLOR: Record<CatalogEntityType, string>;
819
+
820
+ /** Reusable entity identity block: deployment icon, type label, name, version, and optional featured chip. */
821
+ export declare const EntityHeader: FC<EntityHeaderProps>;
822
+
823
+ /** Minimal entity identity fields rendered by `EntityHeader`. */
824
+ export declare interface EntityHeaderItem {
825
+ /** Entity category. */
826
+ type: CatalogEntityType;
827
+ /** Display name. */
828
+ name: string;
829
+ /** Version string shown next to the name. */
830
+ version: string;
831
+ /** URL of the icon displayed inside the logo mark. */
832
+ iconUrl?: string;
833
+ /** Whether the entity is marked as featured. */
834
+ isFeatured?: boolean;
835
+ }
836
+
837
+ /** Props for EntityHeader. */
838
+ export declare interface EntityHeaderProps {
839
+ /** The entity to display. */
840
+ item: EntityHeaderItem;
841
+ /** Typography CSS class for the item name. Falls back to `ItemHeader`'s own default when omitted. */
842
+ nameClassName?: string;
843
+ /** CSS class for the entity type label. Default: 'dial-caption-lead-semi-text'. */
844
+ typeClassName?: string;
845
+ /** CSS class applied to the icon badge, e.g. to set border-radius. Default: 'rounded-[14px]'. */
846
+ iconBadgeClassName?: string;
847
+ /** Typography CSS class for the version text. Falls back to `ItemHeader`'s own default when omitted. */
848
+ versionClassName?: string;
849
+ /** Whether to show `item.version` next to the title. Default: true. */
850
+ showVersion?: boolean;
851
+ /** Label for the featured tag shown when item.isFeatured is true. Default: 'Featured'. */
852
+ featuredLabel?: string;
853
+ /** Whether to render the featured tag. Default: true. */
854
+ hasFeaturedTag?: boolean;
855
+ /** Size of the deployment icon. Default: 48. */
856
+ iconSize?: number;
857
+ /** Search query string; when provided, matching text in the title is highlighted. */
858
+ query?: string;
859
+ /** Content pinned to the bottom of the text column via `mt-auto`, aligning its baseline with the avatar bottom. When provided, the column stretches to fill the icon height exactly. */
860
+ footer?: ReactNode;
861
+ /** CSS class for the featured chip. */
862
+ featuredChipClassName?: string;
863
+ /** Style override for the featured chip, merged over its default per-entity-type colors, e.g. `{ backgroundColor, color, border }`. */
864
+ featuredChipStyle?: CSSProperties;
865
+ /** Arbitrary badge rendered before the featured chip, in the same top-end corner. Omitted (the default) renders nothing in that slot. */
866
+ statusBadge?: ReactNode;
867
+ }
868
+
869
+ /**
870
+ * Entity type label rendered as plain uppercase text — no pill, no background.
871
+ * Shared by the card grid (via AppIdentity) and the list view, so both
872
+ * densities of the catalog use the same type treatment.
873
+ */
874
+ export declare const EntityTypeLabel: FC<EntityTypeLabelProps>;
875
+
876
+ /** Props for EntityTypeLabel. */
877
+ export declare interface EntityTypeLabelProps {
878
+ /** Entity category — resolves the label's color via ENTITY_TYPE_COLOR. */
879
+ type: CatalogEntityType;
880
+ /** CSS class for the label text. Default: 'dial-caption-lead-semi-text'. */
881
+ className?: string;
882
+ }
883
+
884
+ /** A 1-based cell address on an XLSX sheet. */
885
+ export declare interface ExcelCellAddress {
886
+ /** 1-based row number. */
887
+ row: number;
888
+ /** 1-based column number. */
889
+ col: number;
890
+ }
891
+
892
+ /** Selector that targets one cell, or a contiguous same-row cell range, on a named XLSX sheet. */
893
+ export declare interface ExcelRcRangeSelector {
894
+ /** Discriminator — always `'excel_rc_range'`. */
895
+ type: 'excel_rc_range';
896
+ /** Sheet name, matched exactly against the workbook's own sheet names. */
897
+ sheet: string;
898
+ /** First cell of the range. */
899
+ start: ExcelCellAddress;
900
+ /** Last (inclusive) cell of the range, on the same row as `start`. `null` and omitted both mean a single cell. */
901
+ end?: ExcelCellAddress | null;
902
+ }
903
+
904
+ /** A minimal conversation-folder record carried in an export file. */
905
+ export declare interface ExportFolder {
906
+ /** Unique folder identifier. */
907
+ id: string;
908
+ /** Display name of the folder. */
909
+ name: string;
910
+ /** Identifier of the parent folder, if nested. */
911
+ folderId?: string;
912
+ }
913
+
914
+ /**
915
+ * Versioned JSON envelope produced by conversation export, and read back on
916
+ * import.
917
+ */
918
+ export declare interface ExportFormat {
919
+ /** Format version discriminator. Only `5` is currently produced or accepted. */
920
+ version: 5;
921
+ /** Exported conversations. */
922
+ history: Conversation[];
923
+ /** Folders the exported conversations belong to. */
924
+ folders: ExportFolder[];
925
+ }
926
+
927
+ /** Returns 1–2 uppercase initials derived from a display name, or `'?'` when the name is empty. */
928
+ export declare const extractInitials: (name: string) => string;
929
+
930
+ /**
931
+ * Returns the distinct parameters found in `content`, in first-occurrence
932
+ * order. Single-brace sequences (e.g. `{name}`) are not parameters. When one
933
+ * name appears more than once the first occurrence decides the default, so the
934
+ * parameter is still asked for once.
935
+ */
936
+ export declare const extractPromptParams: (content: string) => PromptParameter[];
937
+
938
+ /** Featured badge rendered on a catalog card when `item.isFeatured` is true. */
939
+ export declare const FeaturedChip: FC<FeaturedChipProps>;
940
+
941
+ /** Props for `FeaturedChip`. */
942
+ export declare interface FeaturedChipProps {
943
+ /** Label text shown inside the chip. */
944
+ label: string;
945
+ /** Additional CSS class for typography overrides. */
946
+ className?: string;
947
+ /** Entity category — resolves the label's default color via ENTITY_TYPE_COLOR when `style` doesn't set one. */
948
+ type: CatalogEntityType;
949
+ /** Style overrides merged over the chip's default per-entity-type colors, e.g. `{ backgroundColor, color, border }`. */
950
+ style?: CSSProperties;
951
+ }
952
+
953
+ /** Well-known file extension constants used as fallback when a MIME type is unavailable. */
954
+ export declare enum FileExtension {
955
+ /** PDF document. */
956
+ PDF = "pdf",
957
+ /** Markdown document (`.md`). */
958
+ Markdown = "md",
959
+ /** Markdown document, alternate extension (`.markdown`). */
960
+ MarkdownAlt = "markdown",
961
+ /** JSON document. */
962
+ JSON = "json"
963
+ }
964
+
965
+ /**
966
+ * Labels for `FileManagerAttachModal`. Extends the shell labels with
967
+ * attach-specific strings.
968
+ *
969
+ * Declared here rather than beside the component so a host can type its label
970
+ * object from this package's root entry without reaching the `./file-manager`
971
+ * entry, which is the one that pulls in the grid.
972
+ */
973
+ export declare interface FileManagerAttachModalLabels extends DialFileManagerShellLabels {
974
+ /** Title displayed in the Popup header. */
975
+ title: string;
976
+ /** Label for the primary Attach button. */
977
+ attachLabel: string;
978
+ /** Optional subtitle shown below the title (e.g. allowed types / size). Pass `null` to hide. */
979
+ headerDescription?: string | null;
980
+ }
981
+
982
+ /**
983
+ * Structural view contract consumed by `DialFileManagerShell`. Contains exactly
984
+ * the fields of `UseDialFileManagerResult` that the shell reads, with the same
985
+ * names and types. Tabs, active tab, selection, destination-picker options, and
986
+ * host integration callbacks are explicit component props outside this contract.
987
+ *
988
+ * A `UseDialFileManagerResult` value is structurally assignable to this
989
+ * interface without a cast or adapter object.
990
+ */
991
+ export declare interface FileManagerController {
992
+ /** Hierarchical items for DialFileManager's `items` prop. */
993
+ items: DialFile[];
994
+ /** True while the current folder is loading. */
995
+ isLoading: boolean;
996
+ /** Non-null when the last fetch failed. */
997
+ error: string | null;
998
+ /** Current path in DialFileManager format (e.g. `"/My files"`, `"/My files/reports/"`). */
999
+ path: string;
1000
+ /** Pass directly to DialFileManager's `onPathChange`. */
1001
+ onPathChange: (nextPath?: string) => void;
1002
+ /** Re-runs the fetch for the current `folderPath`. */
1003
+ retry: () => void;
1004
+ /** Search: called by DialFileManager when the user types in the search box. */
1005
+ onSearchFiles: (folder: string, query: string) => void;
1006
+ /** Search: true while a search request is in flight. */
1007
+ isSearching: boolean;
1008
+ /** Search: flat list of matching files, or null when search is not active. */
1009
+ searchResults: DialFile[] | null;
1010
+ /** Search: clears results and exits search mode. */
1011
+ clearSearchResults: () => void;
1012
+ /** Tree: controlled set of expanded folder virtual paths. */
1013
+ expandedPaths: Set<string>;
1014
+ /** Tree: virtual paths whose children are already in the cache (derived). */
1015
+ loadedPaths: Set<string>;
1016
+ /** Tree: called by DialFileManager when a folder is expanded/collapsed. */
1017
+ onExpandedPathsChange: (paths: Set<string>) => void;
1018
+ /** Destination folder popup: preloads the browsed folder without changing the outer grid path. */
1019
+ onFolderPopupPathChange: (nextPath?: string) => void;
1020
+ /** Destination folder popup: normalized virtual paths currently being preloaded. */
1021
+ folderPopupLoadingPaths: Set<string>;
1022
+ /** Upload: start a new batch. */
1023
+ onUploadFiles: (files: DialUploadFileItem[], destinationFolder: string) => void;
1024
+ /** Upload: extracts and uploads a ZIP archive's entries to the destination folder. */
1025
+ onUploadArchive: (file: File, name: string, destinationFolder: string) => void;
1026
+ /** Upload: validate file names before upload (called by DialFileManager). */
1027
+ onValidateUpload: (files: DialUploadFileItem[], existingFiles: DialFile[], destinationFolder: string) => Promise<FileUploadValidationResult>;
1028
+ /** Upload: current batch state (null when idle). */
1029
+ uploadBatchState: FileUploadBatchState | null;
1030
+ /** Upload: abort all in-flight and queued uploads. */
1031
+ cancelUpload: () => void;
1032
+ /** Upload: dismiss the progress modal after the batch has settled. */
1033
+ clearUploadBatch: () => void;
1034
+ /** Folder creation: called when user confirms a new folder name. */
1035
+ onCreateFolder: (file: DialUploadFileItem, folderPath: string, fileId: string) => Promise<void>;
1036
+ /** Folder creation: inline synchronous validation (returns error message or null). */
1037
+ onCreateFolderValidate: (name: string, parentFolder: DialFile) => string | null;
1038
+ /** Download: called when user triggers download on one or more items. */
1039
+ onDownloadFiles: (dialFiles: DialFile[]) => void;
1040
+ /** True while a download is in progress. */
1041
+ isDownloading: boolean;
1042
+ /** Delete: called when user confirms deletion of one or more items. */
1043
+ onDeleteFiles: (items: DialDeletedItem[], sourceFolder: string) => void;
1044
+ /** True while a delete request is in flight. */
1045
+ isDeleting: boolean;
1046
+ /** Rename: inline validation — returns error string or null. */
1047
+ onRenameValidate: (value: string, item: DialFile) => string | null;
1048
+ /** Rename: called when user confirms an inline rename. Also dispatches cross-folder move (see D3). */
1049
+ onMoveToFiles: (items: DialCopiedItem[], sourceFolder: string, destinationFolder: string) => void;
1050
+ /** True while a rename request is in flight. */
1051
+ isRenaming: boolean;
1052
+ /** Copy: called when user confirms a copy-paste. */
1053
+ onCopyFiles: (items: DialCopiedItem[], destinationFolder: string) => void;
1054
+ /** True while a copy request is in flight. */
1055
+ isCopying: boolean;
1056
+ /** True while the cross-folder-move branch of onMoveToFiles is in flight. */
1057
+ isMoving: boolean;
1058
+ /** Aborts whichever of copy/move is currently in flight. */
1059
+ cancelCopyMove: () => void;
1060
+ /** True when the current folder grants WRITE (upload + new folder). */
1061
+ uploadEnabled: boolean;
1062
+ /** True when Upload/New must be disabled. */
1063
+ isNewButtonDisabled: boolean;
1064
+ /** Tooltip for disabled New/Upload when `isNewButtonDisabled` is true. */
1065
+ disabledNewButtonTooltip: string;
1066
+ /** Columns to show in the grid — tab-dependent. */
1067
+ visibleColumns: FileManagerColumnKey[];
1068
+ /** BCP-47 locale string for date formatting, sourced from i18n.language. */
1069
+ dateLocale: string;
1070
+ /** Fixed date format options for the UpdatedAt column. */
1071
+ dateOptions: Intl.DateTimeFormatOptions;
1072
+ /** Action labels for grid/tree/bulk — Delete present only on my_files tab. */
1073
+ actionLabels: Partial<Record<DialFileManagerActions, string>>;
1074
+ /** Root-level shared item paths, populated only on the Shared tab. */
1075
+ sharedWithMeIds: string[] | undefined;
1076
+ /** Share: paths the user has shared with others, populated only on my_files tab. */
1077
+ sharedByMePaths: Set<string>;
1078
+ /** Unshare: called when user removes a shared-with-me item (Shared tab only). */
1079
+ onUnshareFiles: (files: DialFile[]) => void;
1080
+ /** True while an unshare request is in flight. */
1081
+ isUnsharing: boolean;
1082
+ /** Remove access: called when user revokes access to an owned shared item (my_files tab only). */
1083
+ onRemoveFilesAccess: (files: DialFile[]) => void;
1084
+ /** True while a remove-access request is in flight. */
1085
+ isRemovingAccess: boolean;
1086
+ /** Metadata: populated once onGetInfo resolves; passed to fileMetadataPopupOptions.fileMetadata. */
1087
+ fileMetadata: DialFile | undefined;
1088
+ /** True while a metadata request is in flight. */
1089
+ isFileMetadataLoading: boolean;
1090
+ /** Metadata: called by DialFileManager.onGetInfo to fetch and display a file's details. */
1091
+ onGetInfo: (file: DialFile) => void;
1092
+ /** Metadata: resets fileMetadata/isFileMetadataLoading; passed to fileMetadataPopupOptions.clearMetadata. */
1093
+ clearMetadata: () => void;
1094
+ }
1095
+
1096
+ /**
1097
+ * Minimal node shape file-manager selection predicates are evaluated against.
1098
+ * Satisfied by both grid rows and `DialFile` controller items, so one
1099
+ * predicate can gate manual grid clicks and programmatic selection changes.
1100
+ */
1101
+ export declare interface FileManagerSelectableNode {
1102
+ /** Virtual path of the node. */
1103
+ path: string;
1104
+ /** Distinguishes folders from files. */
1105
+ nodeType: DialFileNodeType;
1106
+ /** MIME type of a file node, when known. */
1107
+ contentType?: string;
1108
+ /** Size in bytes of a file node, when known. */
1109
+ contentLength?: number;
1110
+ }
1111
+
1112
+ /** State of an in-progress or just-settled upload batch, as returned by `useDialFileUploadBatch`. */
1113
+ export declare interface FileUploadBatchState {
1114
+ /** Individual file entries in this batch. */
1115
+ files: FileUploadEntry[];
1116
+ /** Whether the upload progress modal should be visible. */
1117
+ isOpen: boolean;
1118
+ }
1119
+
1120
+ /** Progress state for a single file within an upload batch. */
1121
+ export declare interface FileUploadEntry {
1122
+ /** Unique identifier of the file in the batch. */
1123
+ id: string;
1124
+ /** Display name of the file. */
1125
+ name: string;
1126
+ /** Current upload lifecycle status. */
1127
+ status: FileUploadStatus;
1128
+ /** 0–100 while uploading when the transport reports byte progress. */
1129
+ percent?: number;
1130
+ }
1131
+
1132
+ /** Lifecycle status of a single file within an upload batch. */
1133
+ export declare enum FileUploadStatus {
1134
+ Queued = "queued",
1135
+ Uploading = "uploading",
1136
+ Completed = "completed",
1137
+ Failed = "failed",
1138
+ Cancelled = "cancelled"
1139
+ }
1140
+
1141
+ /** Result of validating files before upload. */
1142
+ export declare interface FileUploadValidationResult {
1143
+ /** Whether the files passed validation. */
1144
+ valid: boolean;
1145
+ /** Human-readable validation error message when `valid` is false. */
1146
+ message?: string;
1147
+ }
1148
+
1149
+ /** Filter tab identifier; also used as conversation source and group key. */
1150
+ export declare enum FilterTab {
1151
+ All = "all",
1152
+ Pinned = "pinned",
1153
+ MyChats = "my-chats",
1154
+ Shared = "shared",
1155
+ Organization = "organization"
1156
+ }
1157
+
1158
+ /** Formats an accumulated USD cost with at most two decimals (for example, `$0.79`). */
1159
+ export declare const formatCost: (value: number) => string;
1160
+
1161
+ /** Formats a byte count as a human-readable size string (e.g. `840 KB`, `2.4 MB`). */
1162
+ export declare const formatFileSize: (bytes: number) => string;
1163
+
1164
+ /** Converts a timestamp to a relative time string (e.g. `'5 min ago'`, `'2 days ago'`); returns an empty string when the input is falsy or invalid. */
1165
+ export declare const formatLastUsed: (timestamp?: number) => string;
1166
+
1167
+ /** Formats an amount as USD, keeping up to six decimals for sub-dollar values (e.g. `$3`, `$0.3`). */
1168
+ export declare const formatPrice: (value: number) => string;
1169
+
1170
+ /** Formats a per-unit price string for display, e.g. `$3/M tokens` or `$0.5/char without whitespace`. */
1171
+ export declare const formatUnitPrice: (price: string | undefined, unit: string | undefined) => string | undefined;
1172
+
1173
+ /** Returns a UUID v4 string, with a fallback for non-secure browser contexts (HTTP deployments). */
1174
+ export declare const generateUUID: () => string;
1175
+
1176
+ /** Classifies a MIME type into an `AttachmentType` by prefix (`image/*` / `audio/*`), defaulting to `File`. */
1177
+ export declare const getAttachmentTypeFromMime: (mimeType: string | undefined) => AttachmentType;
1178
+
1179
+ /** Returns the file extension (without a leading dot) for a fenced-code-block language identifier, defaulting to `txt`. */
1180
+ export declare const getFileExtensionForLanguage: (language: string) => string;
1181
+
1182
+ /**
1183
+ * Returns the parent folder of a path (virtual or API), always trailing-slashed.
1184
+ *
1185
+ * @example
1186
+ * getParentFolderPath("reports/file.txt") // "reports/"
1187
+ * getParentFolderPath("/My files/reports/") // "/My files/"
1188
+ * getParentFolderPath("report.pdf") // ""
1189
+ */
1190
+ export declare const getParentFolderPath: (path: string) => string;
1191
+
1192
+ /** Returns the UTF-8 byte length of `str`. */
1193
+ export declare const getUtf8ByteLength: (str: string) => number;
1194
+
1195
+ /** Minimal hast shapes this plugin reads and writes. */
1196
+ declare interface HastNode {
1197
+ type: string;
1198
+ tagName?: string;
1199
+ value?: string;
1200
+ properties?: Record<string, unknown>;
1201
+ children?: HastNode[];
1202
+ }
1203
+
1204
+ /** Reserved folder name used to mark a hidden storage folder. */
1205
+ export declare const HIDDEN_FILE = ".dial_folder";
1206
+
1207
+ /** Selector that targets a paired inline tag (e.g. `<cit data-id="…"></cit>`) by its `id` value. */
1208
+ export declare interface HtmlTagSelector {
1209
+ /** Discriminator — always `'html_tag'`. */
1210
+ type: 'html_tag';
1211
+ /** The tag name (e.g. `'cit'`). */
1212
+ tag: string;
1213
+ /** Matches the tag's `data-id` attribute value in the message text, used to associate this selector with its rendered position. */
1214
+ id: string;
1215
+ }
1216
+
1217
+ /**
1218
+ * Infers a `MIMEType` from a file path's extension, ignoring any query string
1219
+ * or `#` fragment. Returns `undefined` when the path has no extension or the
1220
+ * extension is not recognized.
1221
+ */
1222
+ export declare const inferMimeTypeFromPath: (path: string) => MIMEType | undefined;
1223
+
1224
+ /** A square badge showing 1–2 initials derived from `name` on a deterministic colour background. */
1225
+ export declare const InitialsAvatar: FC<InitialsAvatarProps>;
1226
+
1227
+ /** Props for `InitialsAvatar`. */
1228
+ export declare interface InitialsAvatarProps {
1229
+ /** Display name from which initials are derived. Empty string renders `"?"`. */
1230
+ name: string;
1231
+ /** Badge width and height in pixels. */
1232
+ size: number;
1233
+ /** Extra classes applied to the root element (e.g. `'shrink-0'`). */
1234
+ className?: string;
1235
+ /** Extra classes applied to the initials text element (e.g. `'dial-h3-text'`). */
1236
+ textClassName?: string;
1237
+ }
1238
+
1239
+ /** Returns whether `value` is shaped like an annotation selector. */
1240
+ export declare const isAnnotationSelector: (value: unknown) => value is AnnotationSelector;
1241
+
1242
+ /** Returns `true` when `types` contains a wildcard or any audio MIME type; `false` otherwise. */
1243
+ export declare const isAudioTranscriptionSupported: (types?: string[]) => boolean;
1244
+
1245
+ /** Returns true when any path segment starts with a dot (hidden file or folder). */
1246
+ export declare const isHiddenPath: (path: string) => boolean;
1247
+
1248
+ /** Returns `true` when `msg` is a `StatusMessage`. */
1249
+ export declare const isStatusMessage: (msg: Message | StatusMessage) => msg is StatusMessage;
1250
+
1251
+ /** Item title header with optional numeric or string postfix and trailing slot. */
1252
+ export declare const ItemHeader: FC<ItemHeaderProps>;
1253
+
1254
+ /** CSS custom-property overrides for the `ItemHeader` component. */
1255
+ export declare interface ItemHeaderColors {
1256
+ /** Title text color. Defaults to `--text-primary`. */
1257
+ title?: string;
1258
+ /** Postfix text color. Defaults to `--text-secondary`. */
1259
+ count?: string;
1260
+ }
1261
+
1262
+ /** Props for `ItemHeader`. */
1263
+ export declare interface ItemHeaderProps {
1264
+ /** Title text rendered in the heading element. */
1265
+ title: string;
1266
+ /** Secondary value rendered after the title, such as a version or an item count. */
1267
+ postfix?: number | string;
1268
+ /** CSS class applied to the title. Defaults to `'dial-h3-text'`. */
1269
+ titleClassName?: string;
1270
+ /** CSS class applied to the postfix. Defaults to `'dial-tiny-text'`. */
1271
+ postfixClassName?: string;
1272
+ /** CSS class applied to the header row. */
1273
+ className?: string;
1274
+ /** Search query; when provided, the matching part of the title is highlighted. */
1275
+ query?: string;
1276
+ /** Optional content rendered at the trailing end of the header row. */
1277
+ trailing?: ReactNode;
1278
+ /** Color overrides applied as CSS custom properties. */
1279
+ colors?: ItemHeaderColors;
1280
+ /**
1281
+ * Whether the title shrinks and truncates with an ellipsis. When `false` the
1282
+ * title keeps its full width and the rest of the row gives way instead.
1283
+ * Defaults to `true`.
1284
+ */
1285
+ shouldTruncateTitle?: boolean;
1286
+ }
1287
+
1288
+ export declare const MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME = "[&_.w-md-editor]:max-h-[var(--resizable-field-max-height,70vh)]";
1289
+
1290
+ 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
+
1292
+ /** MIME type used when downloading a Markdown table as CSV. */
1293
+ export declare const MARKDOWN_TABLE_CSV_MIME_TYPE = "text/csv;charset=utf-8";
1294
+
1295
+ /** Renders a fenced or multi-line code block with syntax highlighting and a copy button. */
1296
+ export declare const MarkdownCodeBlock: FC<MarkdownCodeBlockProps>;
1297
+
1298
+ /** CSS custom-property overrides for the `MarkdownCodeBlock` component. */
1299
+ export declare interface MarkdownCodeBlockColors {
1300
+ /** Container background color. */
1301
+ background?: string;
1302
+ /** Container/header border color. */
1303
+ border?: string;
1304
+ /** Header background color. */
1305
+ headerBackground?: string;
1306
+ /** Language label text color. */
1307
+ language?: string;
1308
+ /** Copy button icon color once copied. */
1309
+ copied?: string;
1310
+ /** Scrollbar thumb/track color. */
1311
+ scrollbar?: string;
1312
+ }
1313
+
1314
+ /** Props for {@link MarkdownCodeBlock}. */
1315
+ export declare interface MarkdownCodeBlockProps {
1316
+ /** Detected language from the fenced code block. Empty string for language-less blocks. */
1317
+ language: string;
1318
+ /** Raw code value with trailing newline stripped. */
1319
+ value: string;
1320
+ /** When true, the copy button is hidden (streaming in progress). */
1321
+ isStreaming?: boolean;
1322
+ /** Color theme for syntax highlighting. Defaults to `'dark'`. */
1323
+ theme?: CodeBlockTheme;
1324
+ /** Accessible label for the copy button. Defaults to `'Copy code'`. */
1325
+ copyLabel?: string;
1326
+ /** Message announced through the block's `aria-live="polite"` region after a copy completes. The copy button's own accessible name stays `copyLabel`. Defaults to `'Copied!'`. */
1327
+ copiedLabel?: string;
1328
+ /** Accessible label for the download button. Defaults to `'Download code'`. */
1329
+ downloadLabel?: string;
1330
+ /** When true, hides the download button while still showing copy. Defaults to `false`. */
1331
+ hideDownload?: boolean;
1332
+ /** Extra classes applied to the outer container element. */
1333
+ containerClassName?: string;
1334
+ /** Extra classes applied to the sticky header bar. */
1335
+ headerClassName?: string;
1336
+ /** Typography class for the `<code>` element (used when no language is detected). Defaults to `'dial-code-text'`. */
1337
+ codeClassName?: string;
1338
+ /** CSS class applied to the language label in the header. Defaults to `'dial-tiny-lead-semi-text'` plus the module's `.languageLabel` class (`--text-secondary`). */
1339
+ languageLabelClassName?: string;
1340
+ /** Header text shown in place of `language`, for blocks whose highlighting id is not the name to display (e.g. `bash` highlighted, `cURL` shown). Defaults to the `language` value. */
1341
+ title?: string;
1342
+ /** Custom content rendered in the header in place of the plain label, e.g. a language/endpoint select. Defaults to the plain label text. */
1343
+ titleSlot?: ReactNode;
1344
+ /** Color overrides applied as CSS custom properties. */
1345
+ colors?: MarkdownCodeBlockColors;
1346
+ }
1347
+
1348
+ /** Markdown renderer with GFM support. Styling is driven by `classNames`; structural overrides via `components`. */
1349
+ export declare const MarkdownRenderer: FC<MarkdownRendererProps>;
1350
+
1351
+ /** Per-element className overrides passed to {@link MarkdownRenderer}. */
1352
+ export declare interface MarkdownRendererClassNames extends MarkdownTableClassNames {
1353
+ /** Class on `<h1>`. */
1354
+ h1?: string;
1355
+ /** Class on `<h2>`. */
1356
+ h2?: string;
1357
+ /** Class on `<h3>`. */
1358
+ h3?: string;
1359
+ /** Class on `<h4>`. */
1360
+ h4?: string;
1361
+ /** Class on `<h5>`. */
1362
+ h5?: string;
1363
+ /** Class on `<h6>`. */
1364
+ h6?: string;
1365
+ /** Classes on `<p>` elements. */
1366
+ p?: string;
1367
+ /** Extra classes on `<ul>` (base: `list-disc ps-[2em]`). */
1368
+ ul?: string;
1369
+ /** Extra classes on `<ol>` (base: `list-decimal ps-[2em]`). */
1370
+ ol?: string;
1371
+ /** Typography class for `<strong>`. Defaults to `'dial-body-paragraph-semi-text'` — the semibold step matching the default `p` class. */
1372
+ strong?: string;
1373
+ /** Typography class for `<em>`. Defaults to `'italic'`. */
1374
+ 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
+ /** Extra classes on the {@link MarkdownCodeBlock} outer container. */
1381
+ codeBlockContainer?: string;
1382
+ /** Extra classes on the {@link MarkdownCodeBlock} header bar. */
1383
+ codeBlockHeader?: string;
1384
+ /** Typography class for the `<code>` element inside a code block. Defaults to `'dial-code-text'`. */
1385
+ codeFont?: string;
1386
+ /** Extra classes on inline `<code>` (base: `rounded px-1 py-0.5`). */
1387
+ codeInline?: string;
1388
+ /** Typography class for inline `<code>`. Defaults to `'dial-code-text'`. */
1389
+ codeInlineFont?: string;
1390
+ /** Extra classes on `<blockquote>` (base uses a logical start border and padding). */
1391
+ blockquote?: string;
1392
+ /** Extra classes on `<a>` (base uses the accent text color and an offset underline). */
1393
+ link?: string;
1394
+ /** Extra classes on `<hr>` separators. */
1395
+ hr?: string;
1396
+ /** Extra classes on deleted text rendered by GFM. */
1397
+ del?: string;
1398
+ /** Extra classes on `<th>` and `<td>` (base includes borders, spacing, and text wrapping). */
1399
+ tableCell?: string;
1400
+ /** Extra classes on `<td>` only (applied before `tableCell`, e.g. a body-cell background). */
1401
+ tableBodyCell?: string;
1402
+ /** Extra classes on `<th>` only (applied alongside `tableCell`). */
1403
+ tableHeader?: string;
1404
+ /** Typography class for `<th>` cells. Defaults to `'dial-tiny-lead-semi-text'`. Text color is set separately via `colors.tableHeaderText`. */
1405
+ tableHeaderFont?: string;
1406
+ /** Extra classes on the scrollable wrapper around block (display) LaTeX formulas. */
1407
+ mathBlock?: string;
1408
+ }
1409
+
1410
+ /** CSS custom-property overrides for the `MarkdownRenderer` component. */
1411
+ export declare interface MarkdownRendererColors {
1412
+ /** Primary color of the "thinking" shimmer gradient. */
1413
+ thinkingPrimary?: string;
1414
+ /** Secondary color of the "thinking" shimmer gradient. */
1415
+ thinkingSecondary?: string;
1416
+ /** Border color for `<hr>` separators and table cell borders. */
1417
+ border?: string;
1418
+ /** Border color for the `<blockquote>` start border. Defaults to `--stroke-primary`. */
1419
+ blockquoteBorder?: string;
1420
+ /** Text color for `<blockquote>` content. Defaults to `--text-secondary`. */
1421
+ blockquoteText?: string;
1422
+ /** Text color for `<a>` links. Defaults to `--text-accent`. */
1423
+ linkText?: string;
1424
+ /** Focus-visible outline color for `<a>` links. Defaults to `--stroke-focus-black`. */
1425
+ linkFocus?: string;
1426
+ /** Text color for `<th>` table header cells. Defaults to `--text-secondary`. */
1427
+ tableHeaderText?: string;
1428
+ /** Text color for `<h6>` headings. Defaults to `--text-secondary`. */
1429
+ headingSixText?: string;
1430
+ /** Background color for inline `<code>` spans. Defaults to `--bg-layer-raised`. */
1431
+ inlineCodeBackground?: string;
1432
+ /** Text color for inline `<code>` spans. Defaults to `--text-primary`. */
1433
+ inlineCodeText?: string;
1434
+ }
1435
+
1436
+ /** Props for {@link MarkdownRenderer}. */
1437
+ export declare interface MarkdownRendererProps {
1438
+ /** Raw markdown string to render. */
1439
+ content: string;
1440
+ /** Classes applied to the renderer root. */
1441
+ containerClassName?: string;
1442
+ /** When true, appended content is revealed gradually for smoother streaming updates. */
1443
+ isStreaming?: boolean;
1444
+ /** Reveal speed used while `isStreaming` is true. Defaults to 120 characters per second. */
1445
+ streamCharactersPerSecond?: number;
1446
+ /** Per-element styling classes. Merged with structural base classes inside the component. Defaults to no overrides (`{}`). */
1447
+ classNames?: MarkdownRendererClassNames;
1448
+ /**
1449
+ * Full component overrides merged on top of the built-in map.
1450
+ * Use for elements not covered by `classNames`.
1451
+ */
1452
+ components?: Components;
1453
+ /**
1454
+ * Rewrites `href` and `src` values before they are rendered. The result is
1455
+ * still passed through react-markdown's protocol allowlist. Hosts use this
1456
+ * to map DIAL file ids (`files/{bucket}/{path}`) to download URLs. Defaults
1457
+ * to no extra rewrite.
1458
+ */
1459
+ urlTransform?: (url: string) => string;
1460
+ /** Extra rehype plugins, applied after the built-in KaTeX pass. Defaults to none. */
1461
+ rehypePlugins?: NonNullable<Options['rehypePlugins']>;
1462
+ /**
1463
+ * Label shown with a shimmer animation while `isStreaming` is true and no content has arrived yet.
1464
+ * Defaults to `'Thinking'`. Pass a translated string from the consuming app.
1465
+ */
1466
+ thinkingLabel?: string;
1467
+ /** Accessible label for the copy button in code blocks. Defaults to `'Copy code'`. */
1468
+ codeBlockCopyLabel?: string;
1469
+ /** Accessible label for the copy button after copying. Defaults to `'Copied!'`. */
1470
+ codeBlockCopiedLabel?: string;
1471
+ /** Syntax highlight color theme for code blocks and tables. Defaults to `'dark'`. */
1472
+ codeBlockTheme?: CodeBlockTheme;
1473
+ /** Color overrides applied as CSS custom properties. */
1474
+ colors?: MarkdownRendererColors;
1475
+ /** Localized labels for Markdown table actions. Supplying them enables the action bar. */
1476
+ tableActionLabels?: MarkdownTableActionLabels;
1477
+ /** Filename used when downloading a Markdown table as CSV. Defaults to `'table.csv'`. */
1478
+ tableDownloadFilename?: string;
1479
+ tableOnOpenInCanvas?: (markdown: string) => void;
1480
+ /** Accessible label for a table's horizontally scrollable region. Defaults to `'Scrollable table'`. */
1481
+ tableScrollRegionAriaLabel?: string;
1482
+ /** Accessible label for a block formula's horizontally scrollable region. Defaults to `'Scrollable formula'`. */
1483
+ mathScrollRegionAriaLabel?: string;
1484
+ }
1485
+
1486
+ /** Renders a responsive Markdown table with an end fade while more columns are available. */
1487
+ export declare const MarkdownTable: FC<MarkdownTableProps>;
1488
+
1489
+ export declare interface MarkdownTableActionLabels {
1490
+ copyCsvLabel?: string;
1491
+ copyTxtLabel?: string;
1492
+ copyMarkdownLabel?: string;
1493
+ copiedLabel?: string;
1494
+ downloadCsvLabel?: string;
1495
+ openInCanvasLabel?: string;
1496
+ }
1497
+
1498
+ /** Per-element className overrides for {@link MarkdownTable}. */
1499
+ export declare interface MarkdownTableClassNames {
1500
+ /** Extra classes on the outer table wrapper. */
1501
+ tableWrapper?: string;
1502
+ /** Typography class for the table. Defaults to `'dial-small-text'`. */
1503
+ tableFont?: string;
1504
+ /** Extra classes on the scrollable table region. */
1505
+ tableScrollContainer?: string;
1506
+ }
1507
+
1508
+ /** CSS custom-property overrides for the `MarkdownTable` component. */
1509
+ export declare interface MarkdownTableColors {
1510
+ /** Scroll container border color. */
1511
+ border?: string;
1512
+ /** Scrollbar thumb/track color. */
1513
+ scrollbar?: string;
1514
+ /** Edge-fade mask color. */
1515
+ fade?: string;
1516
+ /** Divider color between rows. Defaults to `--stroke-tertiary`. */
1517
+ rowDivider?: string;
1518
+ /** Background of even-indexed body rows. Defaults to `--bg-layer-base`. */
1519
+ rowZebraBackground?: string;
1520
+ /** Background of a body row on hover. Defaults to `--bg-control-accent-alpha-hover`. */
1521
+ rowHoverBackground?: string;
1522
+ }
1523
+
1524
+ export declare enum MarkdownTableCopyFormat {
1525
+ Csv = "csv",
1526
+ Txt = "txt",
1527
+ Markdown = "markdown"
1528
+ }
1529
+
1530
+ /** A table header action rendered as an icon button. */
1531
+ export declare interface MarkdownTableHeaderAction {
1532
+ /** Stable accessible name and tooltip text. */
1533
+ label: string;
1534
+ /** Decorative icon content. */
1535
+ icon: ReactNode;
1536
+ /** Called when the action is activated. */
1537
+ onClick: () => void;
1538
+ }
1539
+
1540
+ /** Props for {@link MarkdownTable}. */
1541
+ export declare interface MarkdownTableProps {
1542
+ /** Table body/children rendered inside the scrollable wrapper (typically `<thead>`/`<tbody>` from react-markdown). */
1543
+ children: ReactNode;
1544
+ /** Per-element className overrides. */
1545
+ classNames: MarkdownTableClassNames;
1546
+ /** Color overrides applied as CSS custom properties. */
1547
+ colors?: MarkdownTableColors;
1548
+ /** Localized labels for table actions. Supplying them enables the action bar. */
1549
+ actionLabels?: MarkdownTableActionLabels;
1550
+ /** Filename used when downloading the table as CSV. Defaults to `'table.csv'`. */
1551
+ downloadFilename?: string;
1552
+ /** When true, table actions are hidden while content is still arriving. */
1553
+ isStreaming?: boolean;
1554
+ onOpenInCanvas?: (markdown: string) => void;
1555
+ /** Accessible label for the horizontally scrollable region. Defaults to `'Scrollable table'`. */
1556
+ scrollRegionAriaLabel?: string;
1557
+ }
1558
+
1559
+ /**
1560
+ * Renders markdown to sanitized HTML whose styling travels inline, so a
1561
+ * rich-text target it is pasted into shows the tables, headings, and code
1562
+ * blocks the way the conversation does.
1563
+ */
1564
+ export declare const markdownToRichTextHtml: (content: string) => string;
1565
+
1566
+ /**
1567
+ * Renders read-only markdown with every `{{param}}` token wrapped in a
1568
+ * `cat-prompt-variable`-classed span the host can style apart from the
1569
+ * surrounding prose.
1570
+ */
1571
+ export declare const MarkdownWithPlaceholders: FC<MarkdownWithPlaceholdersProps>;
1572
+
1573
+ /** Props for {@link MarkdownWithPlaceholders}. */
1574
+ export declare interface MarkdownWithPlaceholdersProps {
1575
+ /** Raw markdown string to render, read-only. */
1576
+ content: string;
1577
+ /** Typography class overrides applied to `<h1>`–`<h6>`. Defaults to no override. */
1578
+ headingClassName?: string;
1579
+ }
1580
+
1581
+ /** Renders assistant message content as formatted markdown. */
1582
+ export declare const MDMessageViewer: FC<MDMessageViewerProps>;
1583
+
1584
+ /** Props for the {@link MDMessageViewer} markdown renderer. */
1585
+ declare interface MDMessageViewerProps {
1586
+ /** Raw markdown string to render. */
1587
+ content: string;
1588
+ /** Enables gradual reveal for appended streaming content. */
1589
+ isStreaming?: boolean;
1590
+ /**
1591
+ * Label shown while `isStreaming` is true and no content has arrived yet.
1592
+ * Forwarded to {@link MarkdownRenderer}. Defaults to `'Thinking'`.
1593
+ */
1594
+ thinkingLabel?: string;
1595
+ /**
1596
+ * Additional react-markdown component overrides merged on top of the
1597
+ * built-in map. Use to inject custom React nodes (e.g. citation markers)
1598
+ * into specific markdown elements without modifying the viewer directly.
1599
+ */
1600
+ components?: Components;
1601
+ /**
1602
+ * Rewrites `href` and `src` values before they are rendered. Forwarded to
1603
+ * {@link MarkdownRenderer}. Defaults to no extra rewrite.
1604
+ */
1605
+ urlTransform?: (url: string) => string;
1606
+ /** Accessible label for the copy button in code blocks. Forwarded to {@link MarkdownRenderer}. */
1607
+ codeBlockCopyLabel?: string;
1608
+ /** Accessible label for the copy button after copying. Forwarded to {@link MarkdownRenderer}. */
1609
+ codeBlockCopiedLabel?: string;
1610
+ /** Syntax highlight color theme for code blocks. Forwarded to {@link MarkdownRenderer}. */
1611
+ codeBlockTheme?: CodeBlockTheme;
1612
+ /** Localized labels for Markdown table actions. Forwarded to {@link MarkdownRenderer}. */
1613
+ tableActionLabels?: MarkdownTableActionLabels;
1614
+ /** Filename used when downloading a Markdown table as CSV. Forwarded to {@link MarkdownRenderer}. */
1615
+ tableDownloadFilename?: string;
1616
+ tableOnOpenInCanvas?: (markdown: string) => void;
1617
+ /** Accessible label for a table's scrollable region. Forwarded to {@link MarkdownRenderer}. */
1618
+ tableScrollRegionAriaLabel?: string;
1619
+ /**
1620
+ * Per-element typography classes. Defaults to {@link DEFAULT_MARKDOWN_CLASS_NAMES};
1621
+ * pass {@link COMPACT_MARKDOWN_CLASS_NAMES} for the smaller body scale. Give a
1622
+ * stable reference: this component is memoised.
1623
+ */
1624
+ classNames?: MarkdownRendererClassNames;
1625
+ }
1626
+
1627
+ /** Merge class names (classnames → tailwind-merge). */
1628
+ export declare function mergeClasses(...inputs: Parameters<typeof default_2>): string;
1629
+
1630
+ /** A single message in a conversation. */
1631
+ export declare interface Message {
1632
+ /** Who authored the message. */
1633
+ role: MessageRole;
1634
+ /** Plain-text (or Markdown) message body. */
1635
+ content: string;
1636
+ /** ISO-8601 timestamp of when the message was created. */
1637
+ timestamp: string;
1638
+ /** DIAL Core response identifier used for the rate API. Present on the final chunk. */
1639
+ responseId?: string;
1640
+ /** Extra DIAL API payload; present on user requests and assistant responses. */
1641
+ custom_content?: MessageCustomContent;
1642
+ /** User-submitted rating for this message. */
1643
+ rating?: MessageRating;
1644
+ /** Deployment ID on `MessageRole.Assistant` and `MessageRole.Status` messages. */
1645
+ deploymentId?: string;
1646
+ streamErrorMessage?: string;
1647
+ /** Set on an assistant message whose generation the user stopped; the content is whatever had streamed by then. */
1648
+ wasStoppedByUser?: boolean;
1649
+ /** Allows extra SDK-level properties to pass through when serializing to DIAL Core. */
1650
+ [key: string]: unknown;
1651
+ }
1652
+
1653
+ /**
1654
+ * Attachment payload stored in message custom content.
1655
+ * Used inside `Message.custom_content.attachments` for both user requests
1656
+ * and assistant responses.
1657
+ */
1658
+ export declare interface MessageAttachment {
1659
+ /** Zero-based position in the attachment list. */
1660
+ index?: number;
1661
+ /** MIME type of the attachment content. May be absent in streamed runtime payloads. */
1662
+ type?: MIMEType | string;
1663
+ /** Display name shown in the UI. */
1664
+ title: string;
1665
+ /** Inline base-64 encoded content (mutually exclusive with `url`). */
1666
+ data?: string;
1667
+ /** Remote URL pointing to the attachment content. */
1668
+ url?: string;
1669
+ /** MIME type of the referenced resource (used with `reference_url`). */
1670
+ reference_type?: MIMEType | string;
1671
+ /** URL of an alternate reference resource (e.g. a download link). */
1672
+ reference_url?: string;
1673
+ }
1674
+
1675
+ /** Maps a list of {@link MessageAttachment} DTOs to display-only attachment models. Entries with duplicate `id` values are deduplicated — first occurrence wins. */
1676
+ export declare const messageAttachmentsToDisplayAttachments: (dtos: MessageAttachment[] | undefined, resolvers?: AttachmentDisplayResolvers) => DisplayAttachment[];
1677
+
1678
+ /**
1679
+ * Maps a {@link MessageAttachment} DTO to the display-only {@link DisplayAttachment}
1680
+ * model used by UI components. This is a pure function: any app/host-specific URL
1681
+ * resolution (catalog icon URLs, DIAL file download URLs, etc.) is injected through
1682
+ * the optional `resolvers` argument rather than performed here.
1683
+ */
1684
+ export declare const messageAttachmentToDisplayAttachment: (dto: MessageAttachment, resolvers?: AttachmentDisplayResolvers) => DisplayAttachment;
1685
+
1686
+ /** Extra DIAL API payload attached to a message. */
1687
+ export declare interface MessageCustomContent {
1688
+ /** Files or media items associated with this message. */
1689
+ attachments?: MessageAttachment[];
1690
+ /** Annotations produced by the model, each optionally citing a source document. */
1691
+ annotations?: Annotation[];
1692
+ /** Form field values submitted via an embedded form widget. */
1693
+ form_value?: MessageFormValue;
1694
+ /**
1695
+ * JSON Schema for a button/form widget embedded in an assistant response.
1696
+ * Populated from the streaming delta's `custom_content.form_schema`.
1697
+ */
1698
+ form_schema?: DeploymentConfigurationSchema;
1699
+ /**
1700
+ * Configuration value submitted with the next user turn when a button is selected.
1701
+ * Keys match the `propertyKey` from the `form_schema` (e.g. `{ button: 3 }`).
1702
+ */
1703
+ configuration_value?: Record<string, unknown>;
1704
+ /** Accumulated agent execution stages streamed via `custom_content.stages`. */
1705
+ stages?: Stage[];
1706
+ /**
1707
+ * Opaque app-managed state echoed back verbatim on the next turn, per the DIAL
1708
+ * stateful-app contract. Overwritten (not merged) by each new streaming delta.
1709
+ */
1710
+ state?: Record<string, unknown>;
1711
+ /**
1712
+ * Skills used with this message; each entry carries the skill's resource URL.
1713
+ * Present on user requests and, per Core's contract, on assistant responses
1714
+ * ("skills referenced by the model as part of the response").
1715
+ */
1716
+ skills?: RequestSkill[];
1717
+ }
1718
+
1719
+ /** Key-value map of field identifiers to form field values, submitted from an embedded form widget. */
1720
+ export declare type MessageFormValue = Record<string, MessageFormValueType | undefined>;
1721
+
1722
+ /** Permitted scalar/array types for a single form field value. */
1723
+ export declare type MessageFormValueType = number | string | boolean | string[];
1724
+
1725
+ /** User-submitted thumbs-up or thumbs-down rating for an assistant message. */
1726
+ export declare enum MessageRating {
1727
+ Like = 1,
1728
+ Dislike = -1
1729
+ }
1730
+
1731
+ /** Identifies the author of a chat message. */
1732
+ export declare enum MessageRole {
1733
+ User = "user",
1734
+ Assistant = "assistant",
1735
+ /** In-conversation system event; never sent to DIAL Core. */
1736
+ Status = "status"
1737
+ }
1738
+
1739
+ /**
1740
+ * Orchestrator-specific execution state, kept wire-verbatim snake_case like
1741
+ * every other pass-through field under `custom_content` (e.g. `stages`) —
1742
+ * not part of any standard DIAL Core contract. Different orchestrators emit
1743
+ * different shapes: `tool_messages` (LangChain-style) is known from the
1744
+ * StatGPT agent, gated behind its own `show_debug_stages` flag;
1745
+ * `tool_execution_history` (OpenAI chat-completion-style) is known from a
1746
+ * different agent. Both are optional and independent — a given orchestrator
1747
+ * emits at most one of them.
1748
+ */
1749
+ export declare interface MessageState {
1750
+ /** The model's tool-call requests and their results for this turn, LangChain-style. */
1751
+ tool_messages?: ToolStateMessage[];
1752
+ /** The model's tool-call requests and their results for this turn, OpenAI chat-completion-style. */
1753
+ tool_execution_history?: ToolExecutionHistoryMessage[];
1754
+ }
1755
+
1756
+ /** MIME type prefix shared by all audio content types. */
1757
+ export declare const MIME_TYPE_AUDIO_PREFIX = "audio/";
1758
+
1759
+ /**
1760
+ * Maps common MIME types to canonical file extensions.
1761
+ *
1762
+ * The standard entries follow MDN's common media types table. Project-specific
1763
+ * aliases are retained for MIME values produced by existing integrations.
1764
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/MIME_types/Common_types
1765
+ */
1766
+ export declare const MIME_TYPE_EXT_MAP: Record<string, string>;
1767
+
1768
+ /** MIME type wildcard that matches any content type. */
1769
+ export declare const MIME_TYPE_WILDCARD = "*/*";
1770
+
1771
+ /** Well-known MIME type constants used in DIAL API attachments. */
1772
+ export declare enum MIMEType {
1773
+ /** GitHub-flavoured Markdown. */
1774
+ Markdown = "text/markdown",
1775
+ /** Plain unformatted text. */
1776
+ Plain = "text/plain",
1777
+ /** HTML markup. */
1778
+ HTML = "text/html",
1779
+ /** XHTML markup. */
1780
+ XHTML = "application/xhtml+xml",
1781
+ /** Cascading Style Sheets. */
1782
+ CSS = "text/css",
1783
+ /** JavaScript source. */
1784
+ JavaScript = "text/javascript",
1785
+ /** TypeScript source (non-standard but widely used). */
1786
+ TypeScript = "text/typescript",
1787
+ /** CSV spreadsheet data. */
1788
+ CSV = "text/csv",
1789
+ /** JSON data. */
1790
+ JSON = "application/json",
1791
+ /** XML document (application type). */
1792
+ XML = "application/xml",
1793
+ /** PDF document. */
1794
+ PDF = "application/pdf",
1795
+ /** ZIP archive. */
1796
+ ZIP = "application/zip",
1797
+ /** GZIP-compressed data. */
1798
+ GZIP = "application/gzip",
1799
+ /** JPEG raster image. */
1800
+ JPEG = "image/jpeg",
1801
+ /** PNG raster image. */
1802
+ PNG = "image/png",
1803
+ /** GIF image. */
1804
+ GIF = "image/gif",
1805
+ /** WebP image. */
1806
+ WebP = "image/webp",
1807
+ /** BMP bitmap image. */
1808
+ BMP = "image/bmp",
1809
+ /** SVG vector image. */
1810
+ SVG = "image/svg+xml",
1811
+ /** MPEG audio (`.mp3`). */
1812
+ MP3 = "audio/mpeg",
1813
+ /** WAV audio. */
1814
+ WAV = "audio/wav",
1815
+ /** Ogg audio. */
1816
+ OGG = "audio/ogg"
1817
+ }
1818
+
1819
+ /** The largest viewport width that still renders the mobile/tablet presentation. */
1820
+ export declare const MOBILE_MAX_WIDTH_PX: number;
1821
+
1822
+ /** `matchMedia` query matching the mobile/tablet band (up to 1279px). */
1823
+ export declare const MOBILE_MEDIA_QUERY = "(max-width: 1279px)";
1824
+
1825
+ /**
1826
+ * Repairs persisted `html_tag` annotations created by older normalizers that
1827
+ * defaulted every non-HTML source to PDF. An explicit, recognized file
1828
+ * extension is more reliable than that historical fallback; opaque URLs keep
1829
+ * their stored type so genuine PDF citations without an extension still work.
1830
+ */
1831
+ export declare const normalizePersistedHtmlTagAttachmentType: (annotation: Annotation) => Annotation;
1832
+
1833
+ /**
1834
+ * Normalizes raw annotations from the API wire format (stored in
1835
+ * `message.custom_fields.annotations`) to the internal `Annotation` model.
1836
+ *
1837
+ * Recognizes two wire shapes:
1838
+ * - `target.source.attachment_index` (integer) + a `pdf_region` selector
1839
+ * with `{ left, top, width, height }` coordinates, resolved against
1840
+ * `attachments` and converted to `body.source.attachment.url` + a
1841
+ * `pdf_bbox` selector with `{ x1, y1, x2, y2 }` coordinates.
1842
+ * - `target.selector` of type `html_tag` (`{ tag, id }`) with a flat
1843
+ * `body.source = { type: 'attachment', url }` — normalized to
1844
+ * `body.source.attachment.url`/`.title` directly, with no attachment-list
1845
+ * lookup, preserving optional indexes and document selectors.
1846
+ *
1847
+ * Annotations matching neither shape are omitted from the result.
1848
+ */
1849
+ export declare const normalizeRawAnnotations: (rawAnnotations: unknown[], attachments: MessageAttachment[]) => Annotation[];
1850
+
1851
+ /** A single OpenAI-style tool-call request, present on a `ToolExecutionHistoryMessage` with `role: 'assistant'`. */
1852
+ export declare interface OpenAiToolCall {
1853
+ /** Correlates this call to its result message via that message's `tool_call_id`. */
1854
+ id: string;
1855
+ /** Always `'function'` for a tool call. */
1856
+ type: string;
1857
+ /** The invoked function's name and raw (unparsed) JSON-encoded arguments. */
1858
+ function: {
1859
+ name: string;
1860
+ /** JSON-encoded arguments object — parse before use. */
1861
+ arguments: string;
1862
+ };
1863
+ }
1864
+
1865
+ /** Modal overlay with a spinner and cancel button for long-running file operations. */
1866
+ export declare const OperationLoaderModal: FC<OperationLoaderModalProps>;
1867
+
1868
+ /** Props for the operation-in-progress overlay modal (copy/move spinner). */
1869
+ export declare interface OperationLoaderModalProps {
1870
+ /** Title shown above the spinner (e.g. "Copying files"). */
1871
+ title: string;
1872
+ /** Secondary text below the title (e.g. "Copying 2 items"). */
1873
+ text: string;
1874
+ /** Label for the cancel button. */
1875
+ cancelLabel: string;
1876
+ /** Called when the user clicks Cancel. */
1877
+ onCancel: () => void;
1878
+ }
1879
+
1880
+ /** Centered empty-state block for use inside a sidebar panel body. */
1881
+ export declare const PanelEmptyState: FC<PanelEmptyStateProps>;
1882
+
1883
+ /** CSS custom-property overrides for the `PanelEmptyState` component. */
1884
+ export declare interface PanelEmptyStateColors {
1885
+ /** Label text color. */
1886
+ label?: string;
1887
+ }
1888
+
1889
+ /** Props for `PanelEmptyState`. */
1890
+ export declare interface PanelEmptyStateProps {
1891
+ /** Primary message of the empty state. */
1892
+ label: string;
1893
+ /** Color overrides applied as CSS custom properties. */
1894
+ colors?: PanelEmptyStateColors;
1895
+ /** CSS class applied to the label text. Defaults to `'dial-tiny-text'`. */
1896
+ labelClassName?: string;
1897
+ /** CSS class applied to the empty-state container. */
1898
+ containerClassName?: string;
1899
+ }
1900
+
1901
+ /** Selector that targets an axis-aligned bounding box on a specific PDF page. */
1902
+ export declare interface PdfBBoxSelector {
1903
+ /** Discriminator — always `'pdf_bbox'`. */
1904
+ type: 'pdf_bbox';
1905
+ /** 1-based PDF page number. */
1906
+ page: number;
1907
+ /** Left edge coordinate. */
1908
+ x1: number;
1909
+ /** Top edge coordinate. */
1910
+ y1: number;
1911
+ /** Right edge coordinate. */
1912
+ x2: number;
1913
+ /** Bottom edge coordinate. */
1914
+ y2: number;
1915
+ }
1916
+
1917
+ /** Returns a deterministic colour-pair for the given display name. */
1918
+ export declare const pickAvatarColor: (name: string) => AvatarColorEntry;
1919
+
1920
+ /**
1921
+ * Selector that targets a character range inside a single shape on one PPTX
1922
+ * slide. Confirmed against captured DIAL Core responses: unlike
1923
+ * {@link TextCharacterRangeSelector}, `end` is already exclusive on the wire.
1924
+ */
1925
+ export declare interface PptxRangeSelector {
1926
+ /** Discriminator — always `'pptx_text_range'`. */
1927
+ type: 'pptx_text_range';
1928
+ /** 1-based slide number. */
1929
+ slide: number;
1930
+ /** Shape identifier, compared as a string against the run's own shape id. */
1931
+ shape_id: string;
1932
+ /** Zero-based start character offset within the shape's matched text. */
1933
+ start: number;
1934
+ /** Zero-based end character offset — already exclusive on the wire. */
1935
+ end: number;
1936
+ /** The cited text, expected to equal the text resolved over `[start, end)`. */
1937
+ text: string;
1938
+ }
1939
+
1940
+ /** Style map consumed by `react-syntax-highlighter`'s `Prism` renderer. */
1941
+ declare type PrismStyleMap = Record<string, CSSProperties>;
1942
+
1943
+ /** Characters prohibited in conversation names: tab, ", :, ;, /, \, ,, =, {, }, %, & */
1944
+ export declare const PROHIBITED_CONVERSATION_NAME_CHARS_RE: RegExp;
1945
+
1946
+ /**
1947
+ * Separator between a parameter's name and its default value inside a token.
1948
+ * `{{language|Spanish}}` names the parameter `language` and offers `Spanish`
1949
+ * as its starting value. It is the form the classic chat's prompt editor
1950
+ * documents, so prompts authored there carry it.
1951
+ */
1952
+ export declare const PROMPT_PARAM_DEFAULT_SEPARATOR = "|";
1953
+
1954
+ /**
1955
+ * Matches a `{{name}}` or `{{name|defaultValue}}` placeholder. The inner run
1956
+ * excludes braces so a stray `{{` cannot swallow the rest of the document, and
1957
+ * it must be non-empty so a literal `{{}}` stays plain text.
1958
+ */
1959
+ export declare const PROMPT_PARAM_PATTERN: RegExp;
1960
+
1961
+ /** Class applied to each highlighted placeholder. The host owns its styling. */
1962
+ export declare const PROMPT_VARIABLE_CLASS_NAME = "cat-prompt-variable";
1963
+
1964
+ /** A `{{name}}` or `{{name|defaultValue}}` parameter read out of a prompt. */
1965
+ export declare interface PromptParameter {
1966
+ /** The parameter's name — the label a host shows, and the key its value is read by. */
1967
+ name: string;
1968
+ /**
1969
+ * The value the field starts with, when the token carried one. Absent for a
1970
+ * bare `{{name}}` token.
1971
+ */
1972
+ defaultValue?: string;
1973
+ }
1974
+
1975
+ /** Describes an available identity provider. */
1976
+ export declare interface ProviderInfo {
1977
+ /** Unique provider identifier used in API calls. */
1978
+ id: string;
1979
+ /** Human-readable display name shown in the UI. */
1980
+ label: string;
1981
+ }
1982
+
1983
+ /**
1984
+ * Rehype plugin that wraps every `{{name}}` placeholder in a span so it can be
1985
+ * styled apart from the surrounding prose. Placeholders inside code are left
1986
+ * alone.
1987
+ *
1988
+ * The spans are built as hast nodes rather than injected as raw HTML, so a
1989
+ * placeholder that contains markup cannot escape into the document.
1990
+ */
1991
+ export declare const rehypePromptVariables: () => (tree: HastNode) => void;
1992
+
1993
+ /** Validation messages shown during inline rename editing. */
1994
+ export declare type RenameValidationMessages = NonNullable<DialFileManagerComponentProps['renameValidationMessages']>;
1995
+
1996
+ /**
1997
+ * 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
1999
+ * entry shape (e.g. a bare string) with 400.
2000
+ */
2001
+ export declare interface RequestSkill {
2002
+ /** The skill's resource URL (`skills/{bucket}/{path}`) — the same form the skill listing and `CatalogItem.id` use. */
2003
+ url: string;
2004
+ }
2005
+
2006
+ /** Generic async-operation status, reusable for any request lifecycle. */
2007
+ export declare enum RequestStatus {
2008
+ /** No request has been made yet. */
2009
+ Idle = "idle",
2010
+ /** A request is in-flight. */
2011
+ Loading = "loading",
2012
+ /** The most recent request failed. */
2013
+ Error = "error"
2014
+ }
2015
+
2016
+ export declare const RESIZABLE_FIELD_MAX_HEIGHT_CSS_VARIABLE = "--resizable-field-max-height";
2017
+
2018
+ export declare const RESIZABLE_TEXTAREA_CLASS_NAME = "max-h-[50vh]";
2019
+
2020
+ /**
2021
+ * Replaces every parameter occurrence in `content` with the matching entry in
2022
+ * `values` (keyed by parameter name), falling back to the token's own default
2023
+ * value. A token with neither is left unchanged.
2024
+ */
2025
+ export declare const resolvePromptParams: (content: string, values: Record<string, string>) => string;
2026
+
2027
+ /** Bordered summary row pairing an entity's identity block with its current-version tag. */
2028
+ export declare const ResourceSummary: FC<ResourceSummaryProps>;
2029
+
2030
+ /** CSS custom-property overrides for the `ResourceSummary` row. */
2031
+ export declare interface ResourceSummaryColors {
2032
+ /** Row border color. Defaults to `--stroke-tertiary`. */
2033
+ border?: string;
2034
+ /** Row background color. Defaults to `--bg-layer-sunken`. */
2035
+ background?: string;
2036
+ /** Version tag border color. Defaults to `--stroke-tertiary`. */
2037
+ versionTagBorder?: string;
2038
+ /** Version tag background color. Defaults to `--bg-control-accent-alpha`. */
2039
+ versionTagBackground?: string;
2040
+ /** Version tag text color. Defaults to `--text-accent`. */
2041
+ versionTagText?: string;
2042
+ }
2043
+
2044
+ /** Props for `ResourceSummary`. */
2045
+ export declare interface ResourceSummaryProps {
2046
+ /** Entity shown in the row as an icon, type label, name, and version tag. Ignored when `children` is set. */
2047
+ item?: EntityHeaderItem;
2048
+ /** Row content rendered instead of the entity header and version tag. */
2049
+ children?: ReactNode;
2050
+ /** Version tag text; `{version}` is replaced with `item.version`. The tag is omitted when `item.version` is empty. Defaults to `'Version {version} · current'`. */
2051
+ versionLabel?: string;
2052
+ /** Whether the version is shown as a trailing tag. When `false` it is shown inline after the name instead. Defaults to `true`. */
2053
+ hasVersionTag?: boolean;
2054
+ /** Size of the entity icon. Defaults to `40`. */
2055
+ iconSize?: number;
2056
+ /** CSS class applied to the row. */
2057
+ className?: string;
2058
+ /** Style overrides. */
2059
+ styles?: ResourceSummaryStyles;
2060
+ /** Color overrides applied as CSS custom properties. Prefer `styles.colors`. */
2061
+ colors?: ResourceSummaryColors;
2062
+ }
2063
+
2064
+ /** Style overrides for `ResourceSummary`. */
2065
+ export declare interface ResourceSummaryStyles {
2066
+ /** Color overrides applied as CSS custom properties. */
2067
+ colors?: ResourceSummaryColors;
2068
+ /** Typography class overrides. */
2069
+ typography?: ResourceSummaryTypography;
2070
+ }
2071
+
2072
+ /** Typography overrides for the `ResourceSummary` row. */
2073
+ export declare interface ResourceSummaryTypography {
2074
+ /** Typography class applied to the version tag. Defaults to `'dial-tiny-text'`. */
2075
+ versionTagClassName?: string;
2076
+ }
2077
+
2078
+ /** Response format options for conversation messages. */
2079
+ export declare enum ResponseFormat {
2080
+ /** Messages are rendered as Markdown. */
2081
+ Markdown = "markdown",
2082
+ /** Messages are rendered as plain text. */
2083
+ PlainText = "plain_text"
2084
+ }
2085
+
2086
+ /** Prism syntax-highlighting style map used by {@link MarkdownCodeBlock}, restrained to design-system CSS variables. */
2087
+ export declare const restrainedSyntaxTheme: PrismStyleMap;
2088
+
2089
+ /** Strips characters DIAL Core rejects in a conversation name. */
2090
+ export declare const sanitizeConversationName: (name: string) => string;
2091
+
2092
+ /** Tailwind form of {@link SELECT_LIST_MAX_HEIGHT_PX}, for the options scroll box. */
2093
+ export declare const SELECT_LIST_MAX_HEIGHT_CLASS_NAME = "max-h-[344px]";
2094
+
2095
+ export declare const SELECT_LIST_MAX_HEIGHT_PX = 344;
2096
+
2097
+ export declare const serializeMarkdownTableRows: (rows: readonly HTMLTableRowElement[], format: MarkdownTableCopyFormat) => string;
2098
+
2099
+ /** A single agent execution stage produced during a streaming response. */
2100
+ export declare interface Stage {
2101
+ /** Zero-based ordering key; used to merge/upsert incoming stage updates. */
2102
+ index: number;
2103
+ /** Human-readable label for this stage (e.g. `"Lookup available terms"`). */
2104
+ name: string;
2105
+ /** `null` while the stage is running; a `StageStatus` value when it has settled. */
2106
+ status: StageStatus | null;
2107
+ /** Additional text content for this stage, accumulated from streaming chunks. */
2108
+ content?: string;
2109
+ /** File or content attachments associated with this stage. */
2110
+ attachments?: MessageAttachment[];
2111
+ /**
2112
+ * Short source/category label shown beside the step name (e.g. `"MCP"`).
2113
+ * Rendered only when present — never inferred from `name`.
2114
+ */
2115
+ tag?: string;
2116
+ }
2117
+
2118
+ /** Status of a single agent stage. */
2119
+ export declare enum StageStatus {
2120
+ /** The stage completed successfully. */
2121
+ Completed = "completed",
2122
+ /** The stage encountered an error. */
2123
+ Failed = "failed"
2124
+ }
2125
+
2126
+ /** A quick-start conversation button entry in the `starter` property's `oneOf` array. */
2127
+ export declare interface StarterOption {
2128
+ /** Numeric index used as the schema `const` value. */
2129
+ const: number;
2130
+ /** Display label for the starter button. */
2131
+ title: string;
2132
+ /** DIAL widget options controlling input population and auto-submit behaviour. */
2133
+ 'dial:widgetOptions': StarterWidgetOptions;
2134
+ }
2135
+
2136
+ /** DIAL-specific options for a single starter button entry. */
2137
+ export declare interface StarterWidgetOptions {
2138
+ /** Text to populate in the input field when the starter is selected. */
2139
+ populateText: string | null;
2140
+ /** When true, automatically submits the message after populating the input. */
2141
+ submit: boolean;
2142
+ /** Optional confirmation message shown before submission. */
2143
+ confirmationMessage: string | null;
2144
+ }
2145
+
2146
+ /** Discriminator values for `StatusMessageCustomContent.event_type`. */
2147
+ export declare enum StatusEvent {
2148
+ ModelChanged = "model_changed"
2149
+ }
2150
+
2151
+ /** In-conversation system event message, always with `role: MessageRole.Status`. */
2152
+ export declare interface StatusMessage extends Omit<Message, 'role' | 'custom_content'> {
2153
+ /** Always `MessageRole.Status` for status messages. */
2154
+ role: MessageRole.Status;
2155
+ /** Status event payload. */
2156
+ custom_content?: StatusMessageCustomContent;
2157
+ }
2158
+
2159
+ /** Extra payload attached to a `MessageRole.Status` message. */
2160
+ export declare interface StatusMessageCustomContent {
2161
+ /** Machine-readable event discriminator. */
2162
+ event_type: StatusEvent;
2163
+ /** ID of the deployment that was active before the change, or `null` for the first selection. */
2164
+ previous_deployment_id: string | null;
2165
+ /** ID of the deployment selected after the change. */
2166
+ new_deployment_id: string;
2167
+ }
2168
+
2169
+ /** A single server-sent event chunk from the streaming completions endpoint. */
2170
+ export declare interface StreamChunk {
2171
+ /** Unique identifier for the completion stream. */
2172
+ id: string;
2173
+ /** Discriminator — always `'chat.completion.chunk'` for streaming responses. */
2174
+ object: 'chat.completion.chunk';
2175
+ /** One choice per requested completion (usually one entry). */
2176
+ choices: Array<{
2177
+ /** Partial token delta for this chunk. */
2178
+ delta: StreamChunkDelta;
2179
+ /** Set to a non-null string (e.g. `'stop'`) when the stream ends. */
2180
+ finish_reason: string | null;
2181
+ /** Zero-based index of this choice. */
2182
+ index: number;
2183
+ }>;
2184
+ /**
2185
+ * Present when DIAL Core signals an error inside the SSE stream instead of
2186
+ * (or in addition to) a non-2xx HTTP status.
2187
+ */
2188
+ error?: {
2189
+ /** Human-readable error description. */
2190
+ message: string;
2191
+ /** Machine-readable error category (e.g. `'invalid_request_error'`). */
2192
+ type?: string;
2193
+ };
2194
+ }
2195
+
2196
+ /** Incremental content delta inside a streaming SSE chunk. */
2197
+ export declare interface StreamChunkDelta {
2198
+ /** Partial text token appended to the assistant message. */
2199
+ content?: string;
2200
+ /** Role field — only present in the first chunk of a response. */
2201
+ role?: string;
2202
+ /** DIAL Core response identifier used for the rate API. Present on the final chunk. */
2203
+ responseId?: string;
2204
+ /**
2205
+ * Partial custom content carried in this chunk.
2206
+ * `form_schema`, `attachments`, and `stages` may arrive in separate chunks or together in the final chunk.
2207
+ */
2208
+ custom_content?: {
2209
+ /** Incremental stage updates; merge by `index` into the accumulating stage list. */
2210
+ stages?: Stage[];
2211
+ /** JSON Schema for a button/form widget; arrives once the model decides to embed a form. */
2212
+ form_schema?: DeploymentConfigurationSchema;
2213
+ /** AI-generated files produced by the model; typically present in the final chunk. */
2214
+ attachments?: MessageAttachment[];
2215
+ /** Partial annotation updates; merge by `index` into the accumulating annotation list. */
2216
+ annotations?: Annotation[];
2217
+ /** Opaque app-managed state for the DIAL stateful-app contract; overwrites any previous value. */
2218
+ state?: Record<string, unknown>;
2219
+ };
2220
+ /** Raw custom fields in the DIAL wire format. */
2221
+ custom_fields?: {
2222
+ /** Raw annotations in the DIAL wire format; must be normalized before use. */
2223
+ annotations?: unknown[];
2224
+ };
2225
+ }
2226
+
2227
+ /** Strips trailing `.` characters from a name. */
2228
+ export declare const stripTrailingDots: (name: string) => string;
2229
+
2230
+ /** Strips a trailing `?query` string and/or `#fragment` from a URL or path. */
2231
+ export declare const stripUrlQueryAndFragment: (url: string) => string;
2232
+
2233
+ /** Reusable table header with caller-supplied leading content and actions. */
2234
+ export declare const TableHeader: FC<TableHeaderProps>;
2235
+
2236
+ /** A single action rendered by {@link TableHeader}. */
2237
+ export declare interface TableHeaderAction {
2238
+ /** Stable accessible name and tooltip text. */
2239
+ label: string;
2240
+ /** Decorative icon content rendered inside the action button. */
2241
+ icon: ReactNode;
2242
+ /** Called when the action button is activated. */
2243
+ onClick: () => void;
2244
+ }
2245
+
2246
+ /** Props for {@link TableHeader}. */
2247
+ export declare interface TableHeaderProps {
2248
+ /** Content rendered at the inline start of the header. */
2249
+ children?: ReactNode;
2250
+ /** Action descriptors rendered as icon buttons at the inline end. */
2251
+ actions?: TableHeaderAction[];
2252
+ /** Extra classes merged onto the header. */
2253
+ className?: string;
2254
+ }
2255
+
2256
+ export declare const TAG_INPUT_TAG_CLASS_NAME = "bg-layer-sunken";
2257
+
2258
+ /** Selector that targets a character range in a text string. All indices are inclusive. */
2259
+ export declare interface TextCharacterRangeSelector {
2260
+ /** Discriminator — always `'text_character_range'`. */
2261
+ type: 'text_character_range';
2262
+ /** Zero-based start index (inclusive). */
2263
+ start: number;
2264
+ /** Zero-based end index (inclusive). */
2265
+ end: number;
2266
+ }
2267
+
2268
+ /** A single selectable UI theme. */
2269
+ export declare interface Theme {
2270
+ /** Unique theme identifier (e.g. `'dark'`, `'light'`). */
2271
+ id: string;
2272
+ /** Human-readable name shown in the theme picker. */
2273
+ displayName: string;
2274
+ /** CSS custom-property overrides keyed by variable name (without `--` prefix). */
2275
+ colors: Record<string, string>;
2276
+ /** URL of the application logo asset for this theme. */
2277
+ 'app-logo': string;
2278
+ }
2279
+
2280
+ /** Root theme configuration loaded from the server at startup. */
2281
+ export declare interface ThemeConfiguration {
2282
+ /** Available themes the user can switch between. */
2283
+ themes: Theme[];
2284
+ /** Global image/icon assets shared across all themes. */
2285
+ images: ThemeImages;
2286
+ }
2287
+
2288
+ /**
2289
+ * Theme-specific images and icons
2290
+ */
2291
+ export declare interface ThemeImages {
2292
+ /** Fallback icon URL used when an add-on has no custom image. */
2293
+ 'default-addon': string;
2294
+ /** Fallback icon URL used when a model has no custom image. */
2295
+ 'default-model': string;
2296
+ /** Browser tab favicon URL. */
2297
+ favicon: string;
2298
+ /** Light theme logo URL */
2299
+ 'chat-logo-light'?: string;
2300
+ /** Dark theme logo URL */
2301
+ 'chat-logo-dark'?: string;
2302
+ /** Dynamic favicon URL (PNG format, 32x32 recommended) */
2303
+ 'chat-favicon'?: string;
2304
+ }
2305
+
2306
+ /** A single LangChain-style tool-call request emitted by the model, present on a `ToolStateMessage` with `type: 'ai'`. */
2307
+ export declare interface ToolCallRequest {
2308
+ /** Name of the tool being called. */
2309
+ name: string;
2310
+ /** Arguments passed to the tool call. */
2311
+ args: Record<string, unknown>;
2312
+ /** Correlates this call to its result message via that message's `tool_call_id`. */
2313
+ id: string;
2314
+ }
2315
+
2316
+ /** One entry in `custom_content.state.tool_execution_history` — either the model's tool-call request or the tool's result, in OpenAI chat-completion message shape (as opposed to `ToolStateMessage`'s LangChain shape). */
2317
+ export declare interface ToolExecutionHistoryMessage {
2318
+ /** `'assistant'` for the request, `'tool'` for the result. */
2319
+ role: string;
2320
+ /** Present on `role: 'assistant'` messages that requested one or more tool calls. */
2321
+ tool_calls?: OpenAiToolCall[];
2322
+ /** Present on `role: 'tool'` result messages — correlates to the request's `id`. */
2323
+ tool_call_id?: string;
2324
+ /** Text content — the tool's result body on `role: 'tool'` messages. */
2325
+ content?: string;
2326
+ }
2327
+
2328
+ /** Resolved tool toggle item rendered in the conversation input tools submenu. */
2329
+ export declare interface ToolMenuItem {
2330
+ /** Unique tool identifier matching the deployment configuration schema property key. */
2331
+ id: string;
2332
+ /** Human-readable label displayed next to the tool icon. */
2333
+ label: string;
2334
+ /** Icon element rendered inline before the label. */
2335
+ icon: ReactNode;
2336
+ /** Whether the tool is currently toggled on. */
2337
+ isSelected: boolean;
2338
+ }
2339
+
2340
+ /** One entry in `custom_content.state.tool_messages` — either the model's tool-call request or the tool's result. */
2341
+ export declare interface ToolStateMessage {
2342
+ /** LangChain message type: `'ai'` for the request, `'tool'` for the result. */
2343
+ type: string;
2344
+ /** Present on `type: 'tool'` result messages — the tool's own name. */
2345
+ name?: string;
2346
+ /** Present on `type: 'ai'` messages that requested one or more tool calls. */
2347
+ tool_calls?: ToolCallRequest[];
2348
+ /** Present on `type: 'tool'` result messages — correlates to the request's `id`. */
2349
+ tool_call_id?: string;
2350
+ /** Text content — the tool's result body on `type: 'tool'` messages. */
2351
+ content?: string;
2352
+ }
2353
+
2354
+ /** Creates a temporary anchor element and clicks it to trigger a browser download for `href`. */
2355
+ export declare const triggerAnchorDownload: (href: string, filename: string) => void;
2356
+
2357
+ /** Triggers a browser download of `blob`, using a temporary object URL that is revoked afterward. */
2358
+ export declare const triggerBlobDownload: (blob: Blob, filename: string) => void;
2359
+
2360
+ /** Truncates `str` to at most `maxBytes` UTF-8 bytes without splitting multi-byte characters. */
2361
+ export declare const truncateToUtf8Bytes: (str: string, maxBytes: number) => string;
2362
+
2363
+ /** Decodes a base64 string into raw bytes, or `undefined` if the string is not valid base64. */
2364
+ export declare const tryBase64ToBytes: (base64: string) => Uint8Array | undefined;
2365
+
2366
+ /** Result of successfully uploading an {@link Attachment}. */
2367
+ export declare interface UploadedAttachmentResult {
2368
+ /** The DIAL Core file URL the attachment was uploaded to. */
2369
+ url: string;
2370
+ /** The name actually stored on DIAL Core; differs from the attachment's original name when it contained characters the storage path forbids, or when a ` (n)` suffix was needed to avoid replacing an existing file. */
2371
+ name: string;
2372
+ }
2373
+
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
+ /**
2392
+ * Writes the height still available below an element into a CSS custom
2393
+ * property, so a user-resizable control inside it can be capped at the space
2394
+ * its form actually has rather than at a fixed fraction of the viewport.
2395
+ *
2396
+ * A `vh` ceiling only bounds a field against the height of the screen, not
2397
+ * against the room left underneath it: a field that starts 40% down a form can
2398
+ * be dragged to its full `70vh` and still run past the bottom of the page. The
2399
+ * cap here is measured instead — the scroller's visible height minus the space
2400
+ * the fields above occupy — and normalised by `scrollTop`, so it describes the
2401
+ * worst case (the form scrolled to its top) and does not shift while the user
2402
+ * scrolls or drags.
2403
+ *
2404
+ * Attach the returned ref to the element that wraps the resizable control and
2405
+ * give it a class that reads the property, e.g.
2406
+ * `MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME`; custom properties inherit, so the
2407
+ * class may target a descendant.
2408
+ */
2409
+ export declare const useAvailableHeightCap: <TElement extends HTMLElement>({ bottomGap, minHeight, cssVariable, }?: UseAvailableHeightCapOptions) => RefObject<TElement | null>;
2410
+
2411
+ /** Options for `useAvailableHeightCap`. */
2412
+ export declare interface UseAvailableHeightCapOptions {
2413
+ /** Pixels left between the element's bottom and the scroller's bottom edge. Defaults to `16`. */
2414
+ bottomGap?: number;
2415
+ /** Smallest cap to write, so a field below the fold stays usable. Defaults to `200`. */
2416
+ minHeight?: number;
2417
+ /** Custom property the cap is written to. Defaults to `RESIZABLE_FIELD_MAX_HEIGHT_CSS_VARIABLE`. */
2418
+ cssVariable?: string;
2419
+ }
2420
+
2421
+ /** Returns `isCopied` state and a `copy` callback; `isCopied` resets to `false` after `resetDelay` ms. */
2422
+ export declare const useCodeCopy: (value: string, resetDelay?: number) => {
2423
+ isCopied: boolean;
2424
+ copy: () => void;
2425
+ };
2426
+
2427
+ /** Measures rendered text and owns the expand/collapse state for long plain-text content. */
2428
+ export declare const useCollapsedText: <T extends HTMLElement = HTMLElement>({ text, collapsedLineCount, }: UseCollapsedTextOptions) => UseCollapsedTextResult<T>;
2429
+
2430
+ /** Options for `useCollapsedText`. */
2431
+ export declare interface UseCollapsedTextOptions {
2432
+ /** Content identity used to reset long text to the collapsed state when it changes. */
2433
+ text: string;
2434
+ /** Maximum number of text lines shown while collapsed. */
2435
+ collapsedLineCount: number;
2436
+ }
2437
+
2438
+ /** Return value of `useCollapsedText`. */
2439
+ export declare interface UseCollapsedTextResult<T extends HTMLElement> {
2440
+ /** Ref callback attached to the text element to measure its rendered height. */
2441
+ textRef: (node: T | null) => void;
2442
+ /** Whether the full text is currently hidden behind the collapsed viewport. */
2443
+ isTextCollapsed: boolean;
2444
+ /** Whether the measured text is taller than the collapsed viewport. */
2445
+ isOverflowing: boolean;
2446
+ /** Current collapsed viewport height in pixels. */
2447
+ collapsedMaxHeight: number;
2448
+ /** Full rendered text height in pixels. */
2449
+ expandedMaxHeight: number;
2450
+ /** Whether the expanded/collapsed control is currently in the collapsed state. */
2451
+ isCollapsed: boolean;
2452
+ /** Toggle between expanded and collapsed states. */
2453
+ toggleCollapsed: () => void;
2454
+ }
2455
+
2456
+ /**
2457
+ * `@epam/ai-dial-react-file-manager`'s `GridOptions` type does not forward raw AG Grid
2458
+ * event callbacks (`onCellEditingStarted`/`onRowDataUpdated`), so this hook
2459
+ * binds directly to the `GridApi` obtained via `DialFileManager`'s
2460
+ * `onGridApiChange` prop and uses AG Grid's own `addEventListener` instead of
2461
+ * a `gridOptions` fragment. Scrolls a newly inline-edited or newly-inserted
2462
+ * row into view. `handleGridApiChange` takes the raw `GridApi` only to bind
2463
+ * to `onGridApiChange` — the narrow AGENTS.md D9 exception for this hook —
2464
+ * and never renders, themes, or otherwise exposes AG Grid beyond that one
2465
+ * event-binding parameter.
2466
+ */
2467
+ export declare const useGridEditingScroll: ({ resolveTargetNode, }?: UseGridEditingScrollOptions) => UseGridEditingScrollResult;
2468
+
2469
+ /** Options accepted by `useGridEditingScroll`. */
2470
+ export declare interface UseGridEditingScrollOptions {
2471
+ /** Picks the row to scroll to among the rows newly added since the last `rowDataUpdated`. Defaults to the first row flagged `isTemporary`, or the first new row. */
2472
+ resolveTargetNode?: (newNodes: IRowNode<FileManagerGridRow>[]) => IRowNode<FileManagerGridRow> | null;
2473
+ }
2474
+
2475
+ /** Values returned by `useGridEditingScroll`. */
2476
+ export declare interface UseGridEditingScrollResult {
2477
+ /** Pass to `DialFileManager`'s `onGridApiChange` prop. */
2478
+ handleGridApiChange: (api: GridApi<FileManagerGridRow>) => void;
2479
+ /** Re-seeds the known-row-id set without scrolling — call on a data-source change such as a tab switch. */
2480
+ reset: () => void;
2481
+ }
2482
+
2483
+ /** Returns whether the viewport currently matches the mobile media query, updating on resize. */
2484
+ export declare const useIsMobile: () => boolean;
2485
+
2486
+ /** Authenticated user's profile as returned by the identity provider. */
2487
+ export declare interface UserProfile {
2488
+ /** Subject identifier — unique, stable ID for the user within the provider. */
2489
+ sub: string;
2490
+ /** ID of the identity provider that authenticated the user. */
2491
+ providerId: string;
2492
+ /**
2493
+ * Allowlisted claims, keyed by claim name. A dot-notation provider
2494
+ * `rolesClaim` (e.g. `"realm_access.roles"`) is stored under one flat key
2495
+ * equal to that literal string, never as a nested object — look it up
2496
+ * with `claims[rolesClaim]`, not a nested path.
2497
+ */
2498
+ claims: Record<string, unknown>;
2499
+ /** DIAL Core storage bucket for the authenticated user. Empty string when the bucket has not been resolved yet. */
2500
+ bucket?: string;
2501
+ /** Whether the user's roles claim intersects the provider's configured adminRoles. */
2502
+ isAdmin: boolean;
2503
+ }
2504
+
2505
+ export { }