@epam/ai-dial-chat-shared 1.3.0-dev.9 → 1.3.0-dev.90
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/ConfirmationDialog/ConfirmationDialog.d.ts +41 -0
- package/components/ConfirmationDialog/ConfirmationDialog.d.ts.map +1 -0
- package/components/ConfirmationIdentityCard/ConfirmationIdentityCard.d.ts +33 -0
- package/components/ConfirmationIdentityCard/ConfirmationIdentityCard.d.ts.map +1 -0
- package/components/ConfirmationIdentityRow/ConfirmationIdentityRow.d.ts +33 -0
- package/components/ConfirmationIdentityRow/ConfirmationIdentityRow.d.ts.map +1 -0
- package/components/ConfirmationView/ConfirmationFooter.d.ts +41 -0
- package/components/ConfirmationView/ConfirmationFooter.d.ts.map +1 -0
- package/components/ConfirmationView/ConfirmationFooter.js +3 -1
- package/components/ConfirmationView/ConfirmationView.d.ts +57 -0
- package/components/ConfirmationView/ConfirmationView.d.ts.map +1 -0
- package/components/ConfirmationView/ConfirmationView.js +15 -14
- package/components/CopyButton/CopyButton.d.ts +19 -0
- package/components/CopyButton/CopyButton.d.ts.map +1 -0
- package/components/DeleteConfirmationDialog/DeleteConfirmationDialog.d.ts +41 -0
- package/components/DeleteConfirmationDialog/DeleteConfirmationDialog.d.ts.map +1 -0
- package/components/DeleteConfirmationDialog/DeleteConfirmationDialog.js +34 -0
- package/components/DeleteConfirmationView/DeleteConfirmationView.d.ts +49 -0
- package/components/DeleteConfirmationView/DeleteConfirmationView.d.ts.map +1 -0
- package/components/DeleteConfirmationView/DeleteConfirmationView.js +37 -0
- package/components/DeleteConfirmationView/DeleteConfirmationView.module.scss.js +6 -0
- package/components/DeploymentIcon/DeploymentIcon.d.ts +36 -0
- package/components/DeploymentIcon/DeploymentIcon.d.ts.map +1 -0
- package/components/EntityHeader/EntityHeader.d.ts +38 -0
- package/components/EntityHeader/EntityHeader.d.ts.map +1 -0
- package/components/EntityTypeLabel/EntityTypeLabel.d.ts +18 -0
- package/components/EntityTypeLabel/EntityTypeLabel.d.ts.map +1 -0
- package/components/FeaturedChip/FeaturedChip.d.ts +16 -0
- package/components/FeaturedChip/FeaturedChip.d.ts.map +1 -0
- package/components/InitialsAvatar/InitialsAvatar.d.ts +15 -0
- package/components/InitialsAvatar/InitialsAvatar.d.ts.map +1 -0
- package/components/ItemHeader/ItemHeader.d.ts +36 -0
- package/components/ItemHeader/ItemHeader.d.ts.map +1 -0
- package/components/MarkdownRenderer/CodeBlock/CodeBlock.d.ts +53 -0
- package/components/MarkdownRenderer/CodeBlock/CodeBlock.d.ts.map +1 -0
- package/components/MarkdownRenderer/CodeBlock/CodeBlock.js +1 -1
- package/components/MarkdownRenderer/CodeBlock/syntax-theme.d.ts +7 -0
- package/components/MarkdownRenderer/CodeBlock/syntax-theme.d.ts.map +1 -0
- package/components/MarkdownRenderer/MDMessageViewer.d.ts +66 -0
- package/components/MarkdownRenderer/MDMessageViewer.d.ts.map +1 -0
- package/components/MarkdownRenderer/MDMessageViewer.js +14 -12
- package/components/MarkdownRenderer/MarkdownRenderer.d.ts +139 -0
- package/components/MarkdownRenderer/MarkdownRenderer.d.ts.map +1 -0
- package/components/MarkdownRenderer/MarkdownRenderer.js +136 -129
- package/components/MarkdownRenderer/Math/MarkdownMathBlock.d.ts +18 -0
- package/components/MarkdownRenderer/Math/MarkdownMathBlock.d.ts.map +1 -0
- package/components/MarkdownRenderer/Math/MarkdownMathBlock.js +1 -1
- package/components/MarkdownRenderer/PlainTextRenderer.d.ts +39 -0
- package/components/MarkdownRenderer/PlainTextRenderer.d.ts.map +1 -0
- package/components/MarkdownRenderer/PlainTextRenderer.js +1 -1
- package/components/MarkdownRenderer/Table/MarkdownTable.d.ts +47 -0
- package/components/MarkdownRenderer/Table/MarkdownTable.d.ts.map +1 -0
- package/components/MarkdownRenderer/Table/MarkdownTable.js +3 -3
- package/components/MarkdownRenderer/Table/TableHeader.d.ts +22 -0
- package/components/MarkdownRenderer/Table/TableHeader.d.ts.map +1 -0
- package/components/MarkdownRenderer/Table/table-serialization.d.ts +16 -0
- package/components/MarkdownRenderer/Table/table-serialization.d.ts.map +1 -0
- package/components/MarkdownRenderer/Table/useMarkdownTableActions/useMarkdownTableActions.d.ts +27 -0
- package/components/MarkdownRenderer/Table/useMarkdownTableActions/useMarkdownTableActions.d.ts.map +1 -0
- package/components/MarkdownRenderer/TaskCheckbox/MarkdownTaskCheckbox.d.ts +9 -0
- package/components/MarkdownRenderer/TaskCheckbox/MarkdownTaskCheckbox.d.ts.map +1 -0
- package/components/MarkdownRenderer/ThinkingShimmer.d.ts +17 -0
- package/components/MarkdownRenderer/ThinkingShimmer.d.ts.map +1 -0
- package/components/MarkdownRenderer/markdown-class-names.d.ts +10 -0
- package/components/MarkdownRenderer/markdown-class-names.d.ts.map +1 -0
- package/components/MarkdownRenderer/markdown-whitespace.d.ts +15 -0
- package/components/MarkdownRenderer/markdown-whitespace.d.ts.map +1 -0
- package/components/MarkdownRenderer/markdown-whitespace.js +18 -0
- package/components/MarkdownWithPlaceholders/MarkdownWithPlaceholders.d.ts +25 -0
- package/components/MarkdownWithPlaceholders/MarkdownWithPlaceholders.d.ts.map +1 -0
- package/components/PanelEmptyState/PanelEmptyState.d.ts +22 -0
- package/components/PanelEmptyState/PanelEmptyState.d.ts.map +1 -0
- package/components/ResourceSummary/ResourceSummary.d.ts +49 -0
- package/components/ResourceSummary/ResourceSummary.d.ts.map +1 -0
- package/components/TextRefinementField/TextRefinementField.d.ts +31 -0
- package/components/TextRefinementField/TextRefinementField.d.ts.map +1 -0
- package/constants/breakpoint.d.ts +9 -0
- package/constants/breakpoint.d.ts.map +1 -0
- package/constants/dial.d.ts +5 -0
- package/constants/dial.d.ts.map +1 -0
- package/constants/entity-colors.d.ts +6 -0
- package/constants/entity-colors.d.ts.map +1 -0
- package/constants/icon.d.ts +14 -0
- package/constants/icon.d.ts.map +1 -0
- package/constants/markdown-editor.d.ts +2 -0
- package/constants/markdown-editor.d.ts.map +1 -0
- package/constants/mime-types.d.ts +27 -0
- package/constants/mime-types.d.ts.map +1 -0
- package/constants/public-class-names.d.ts +13 -0
- package/constants/public-class-names.d.ts.map +1 -0
- package/constants/resizable-fields.d.ts +5 -0
- package/constants/resizable-fields.d.ts.map +1 -0
- package/constants/select-list.d.ts +4 -0
- package/constants/select-list.d.ts.map +1 -0
- package/constants/tag-input.d.ts +2 -0
- package/constants/tag-input.d.ts.map +1 -0
- package/entry-points/file-manager.d.ts +5 -0
- package/entry-points/file-manager.d.ts.map +1 -0
- package/entry-points/markdown.d.ts +19 -0
- package/entry-points/markdown.d.ts.map +1 -0
- package/file-manager/DialFileManagerShell/DialFileManagerShell.d.ts +58 -0
- package/file-manager/DialFileManagerShell/DialFileManagerShell.d.ts.map +1 -0
- package/file-manager/DialFileManagerShell/DialFileManagerShell.js +190 -189
- package/file-manager/FileManagerAttachModal/FileManagerAttachModal.d.ts +89 -0
- package/file-manager/FileManagerAttachModal/FileManagerAttachModal.d.ts.map +1 -0
- package/file-manager/FileManagerAttachModal/FileManagerAttachModal.js +2 -1
- package/file-manager/OperationLoaderModal/OperationLoaderModal.d.ts +17 -0
- package/file-manager/OperationLoaderModal/OperationLoaderModal.d.ts.map +1 -0
- package/file-manager/attach-result.d.ts +9 -0
- package/file-manager/attach-result.d.ts.map +1 -0
- package/file-manager/file-manager-controller.d.ts +121 -0
- package/file-manager/file-manager-controller.d.ts.map +1 -0
- package/file-manager/file-manager-variant.d.ts +21 -0
- package/file-manager/file-manager-variant.d.ts.map +1 -0
- package/file-manager/file-upload-validation.d.ts +8 -0
- package/file-manager/file-upload-validation.d.ts.map +1 -0
- package/file-manager/index.d.ts +10 -0
- package/file-manager/index.d.ts.map +1 -0
- package/file-manager/labels.d.ts +156 -0
- package/file-manager/labels.d.ts.map +1 -0
- package/file-manager/path.d.ts +12 -0
- package/file-manager/path.d.ts.map +1 -0
- package/file-manager/upload-batch.d.ts +29 -0
- package/file-manager/upload-batch.d.ts.map +1 -0
- package/file-manager/upload-queue.d.ts +5 -0
- package/file-manager/upload-queue.d.ts.map +1 -0
- package/file-manager/useGridEditingScroll/useGridEditingScroll.d.ts +27 -0
- package/file-manager/useGridEditingScroll/useGridEditingScroll.d.ts.map +1 -0
- package/file-manager.d.ts +2 -506
- package/hooks/useAvailableHeightCap.d.ts +30 -0
- package/hooks/useAvailableHeightCap.d.ts.map +1 -0
- package/hooks/useCodeCopy.d.ts +6 -0
- package/hooks/useCodeCopy.d.ts.map +1 -0
- package/hooks/useCollapsedText.d.ts +27 -0
- package/hooks/useCollapsedText.d.ts.map +1 -0
- package/hooks/useHorizontalOverflow.d.ts +21 -0
- package/hooks/useHorizontalOverflow.d.ts.map +1 -0
- package/hooks/useIsMobile.d.ts +3 -0
- package/hooks/useIsMobile.d.ts.map +1 -0
- package/hooks/useStreamedMarkdownContent.d.ts +3 -0
- package/hooks/useStreamedMarkdownContent.d.ts.map +1 -0
- package/hooks/useTextRefinement.d.ts +44 -0
- package/hooks/useTextRefinement.d.ts.map +1 -0
- package/hooks/useUnsavedChangesGuard.d.ts +14 -0
- package/hooks/useUnsavedChangesGuard.d.ts.map +1 -0
- package/index.css +3 -2
- package/index.d.ts +79 -3072
- package/index.d.ts.map +1 -0
- package/index.js +68 -64
- package/markdown.d.ts +2 -465
- package/markdown.js +3 -2
- package/models/annotation.d.ts +143 -0
- package/models/annotation.d.ts.map +1 -0
- package/models/application-visualizer.d.ts +67 -0
- package/models/application-visualizer.d.ts.map +1 -0
- package/models/auth.d.ts +26 -0
- package/models/auth.d.ts.map +1 -0
- package/models/chat.d.ts +407 -0
- package/models/chat.d.ts.map +1 -0
- package/models/conversation-classification.d.ts +9 -0
- package/models/conversation-classification.d.ts.map +1 -0
- package/models/conversation-transfer.d.ts +96 -0
- package/models/conversation-transfer.d.ts.map +1 -0
- package/models/custom-visualizer.d.ts +61 -0
- package/models/custom-visualizer.d.ts.map +1 -0
- package/models/deployment-configuration.d.ts +55 -0
- package/models/deployment-configuration.d.ts.map +1 -0
- package/models/deployment-features.d.ts +17 -0
- package/models/deployment-features.d.ts.map +1 -0
- package/models/deployment.d.ts +31 -0
- package/models/deployment.d.ts.map +1 -0
- package/models/dial-model.d.ts +19 -0
- package/models/dial-model.d.ts.map +1 -0
- package/models/entity.d.ts +15 -0
- package/models/entity.d.ts.map +1 -0
- package/models/import-export.d.ts +23 -0
- package/models/import-export.d.ts.map +1 -0
- package/models/inline-segment.d.ts +11 -0
- package/models/inline-segment.d.ts.map +1 -0
- package/models/locale.d.ts +19 -0
- package/models/locale.d.ts.map +1 -0
- package/models/text-refinement.d.ts +18 -0
- package/models/text-refinement.d.ts.map +1 -0
- package/models/theme.d.ts +36 -0
- package/models/theme.d.ts.map +1 -0
- package/models/tool-menu-item.d.ts +13 -0
- package/models/tool-menu-item.d.ts.map +1 -0
- package/package.json +3 -3
- package/types/attachment.d.ts +25 -0
- package/types/attachment.d.ts.map +1 -0
- package/types/code-editor.d.ts +8 -0
- package/types/code-editor.d.ts.map +1 -0
- package/types/entity-type.d.ts +10 -0
- package/types/entity-type.d.ts.map +1 -0
- package/types/file-manager-node.d.ts +17 -0
- package/types/file-manager-node.d.ts.map +1 -0
- package/types/mime-type.d.ts +59 -0
- package/types/mime-type.d.ts.map +1 -0
- package/utils/annotation.d.ts +29 -0
- package/utils/annotation.d.ts.map +1 -0
- package/utils/avatar-color.d.ts +10 -0
- package/utils/avatar-color.d.ts.map +1 -0
- package/utils/base64-json.d.ts +14 -0
- package/utils/base64-json.d.ts.map +1 -0
- package/utils/base64-json.js +4 -0
- package/utils/build-css-vars.d.ts +4 -0
- package/utils/build-css-vars.d.ts.map +1 -0
- package/utils/copy-to-clipboard.d.ts +18 -0
- package/utils/copy-to-clipboard.d.ts.map +1 -0
- package/utils/entity-field-limits.d.ts +11 -0
- package/utils/entity-field-limits.d.ts.map +1 -0
- package/utils/entity-type.d.ts +5 -0
- package/utils/entity-type.d.ts.map +1 -0
- package/utils/file-download.d.ts +21 -0
- package/utils/file-download.d.ts.map +1 -0
- package/utils/format-file-size.d.ts +3 -0
- package/utils/format-file-size.d.ts.map +1 -0
- package/utils/format-last-used.d.ts +3 -0
- package/utils/format-last-used.d.ts.map +1 -0
- package/utils/format-price.d.ts +7 -0
- package/utils/format-price.d.ts.map +1 -0
- package/utils/generate-uuid.d.ts +3 -0
- package/utils/generate-uuid.d.ts.map +1 -0
- package/utils/initials.d.ts +3 -0
- package/utils/initials.d.ts.map +1 -0
- package/utils/inline-segments.d.ts +38 -0
- package/utils/inline-segments.d.ts.map +1 -0
- package/utils/inline-segments.js +53 -0
- package/utils/is-audio-transcription-supported.d.ts +3 -0
- package/utils/is-audio-transcription-supported.d.ts.map +1 -0
- package/utils/is-skill-selection-unsupported.d.ts +3 -0
- package/utils/is-skill-selection-unsupported.d.ts.map +1 -0
- package/utils/latex.d.ts +21 -0
- package/utils/latex.d.ts.map +1 -0
- package/utils/markdown-html.d.ts +14 -0
- package/utils/markdown-html.d.ts.map +1 -0
- package/utils/markdown-html.js +11 -0
- package/utils/merge-class.d.ts +4 -0
- package/utils/merge-class.d.ts.map +1 -0
- package/utils/message-attachment-to-display.d.ts +22 -0
- package/utils/message-attachment-to-display.d.ts.map +1 -0
- package/utils/message.d.ts +4 -0
- package/utils/message.d.ts.map +1 -0
- package/utils/mime-type.d.ts +22 -0
- package/utils/mime-type.d.ts.map +1 -0
- package/utils/prompt-variables.d.ts +62 -0
- package/utils/prompt-variables.d.ts.map +1 -0
- package/utils/string-utils.d.ts +11 -0
- package/utils/string-utils.d.ts.map +1 -0
- package/utils/syntax-highlighting.d.ts +8 -0
- package/utils/syntax-highlighting.d.ts.map +1 -0
package/markdown.js
CHANGED
|
@@ -9,5 +9,6 @@ import { COMPACT_MARKDOWN_CLASS_NAMES as d, DEFAULT_MARKDOWN_CLASS_NAMES as f }
|
|
|
9
9
|
import { PlainTextRenderer as p } from "./components/MarkdownRenderer/PlainTextRenderer.js";
|
|
10
10
|
import { MDMessageViewer as m } from "./components/MarkdownRenderer/MDMessageViewer.js";
|
|
11
11
|
import { MarkdownWithPlaceholders as h } from "./components/MarkdownWithPlaceholders/MarkdownWithPlaceholders.js";
|
|
12
|
-
import {
|
|
13
|
-
|
|
12
|
+
import { buildInlineSegmentSource as g, createInlineSegmentComponents as _, createRehypeInlineSegments as v } from "./utils/inline-segments.js";
|
|
13
|
+
import { useCollapsedText as y } from "./hooks/useCollapsedText.js";
|
|
14
|
+
export { e as CHAT_SHARED_CLASS, d as COMPACT_MARKDOWN_CLASS_NAMES, f as DEFAULT_MARKDOWN_CLASS_NAMES, i as DEFAULT_MARKDOWN_TABLE_DOWNLOAD_FILENAME, a as MARKDOWN_TABLE_CSV_MIME_TYPE, m as MDMessageViewer, r as MarkdownCodeBlock, l as MarkdownRenderer, c as MarkdownTable, o as MarkdownTableCopyFormat, h as MarkdownWithPlaceholders, p as PlainTextRenderer, g as buildInlineSegmentSource, _ as createInlineSegmentComponents, v as createRehypeInlineSegments, u as defaultMarkdownComponents, n as restrainedSyntaxTheme, s as serializeMarkdownTableRows, t as useCodeCopy, y as useCollapsedText };
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/** Selector that targets a character range in a text string. All indices are inclusive. */
|
|
2
|
+
export interface TextCharacterRangeSelector {
|
|
3
|
+
/** Discriminator — always `'text_character_range'`. */
|
|
4
|
+
type: 'text_character_range';
|
|
5
|
+
/** Zero-based start index (inclusive). */
|
|
6
|
+
start: number;
|
|
7
|
+
/** Zero-based end index (inclusive). */
|
|
8
|
+
end: number;
|
|
9
|
+
}
|
|
10
|
+
/** Selector that targets an axis-aligned bounding box on a specific PDF page. */
|
|
11
|
+
export interface PdfBBoxSelector {
|
|
12
|
+
/** Discriminator — always `'pdf_bbox'`. */
|
|
13
|
+
type: 'pdf_bbox';
|
|
14
|
+
/** 1-based PDF page number. */
|
|
15
|
+
page: number;
|
|
16
|
+
/** Left edge coordinate. */
|
|
17
|
+
x1: number;
|
|
18
|
+
/** Top edge coordinate. */
|
|
19
|
+
y1: number;
|
|
20
|
+
/** Right edge coordinate. */
|
|
21
|
+
x2: number;
|
|
22
|
+
/** Bottom edge coordinate. */
|
|
23
|
+
y2: number;
|
|
24
|
+
}
|
|
25
|
+
/** Selector that targets a paired inline tag (e.g. `<cit data-id="…"></cit>`) by its `id` value. */
|
|
26
|
+
export interface HtmlTagSelector {
|
|
27
|
+
/** Discriminator — always `'html_tag'`. */
|
|
28
|
+
type: 'html_tag';
|
|
29
|
+
/** The tag name (e.g. `'cit'`). */
|
|
30
|
+
tag: string;
|
|
31
|
+
/** Matches the tag's `data-id` attribute value in the message text, used to associate this selector with its rendered position. */
|
|
32
|
+
id: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Selector that targets a character range inside a DOCX story. Confirmed
|
|
36
|
+
* against captured DIAL Core responses: unlike {@link TextCharacterRangeSelector},
|
|
37
|
+
* `end` is already exclusive on the wire, not inclusive.
|
|
38
|
+
*/
|
|
39
|
+
export interface DocxRangeSelector {
|
|
40
|
+
/** Discriminator — always `'docx_text_range'`. */
|
|
41
|
+
type: 'docx_text_range';
|
|
42
|
+
/** Name of the DOCX story the range lives in, as an opaque string (only `'body'` is confirmed upstream — no closed set). */
|
|
43
|
+
story: string;
|
|
44
|
+
/** Source-tree element indices identifying the paragraph, matched element-wise. */
|
|
45
|
+
path: number[];
|
|
46
|
+
/** Zero-based start character offset within the story's matched text. */
|
|
47
|
+
start: number;
|
|
48
|
+
/** Zero-based end character offset — already exclusive on the wire. */
|
|
49
|
+
end: number;
|
|
50
|
+
/** The cited text, expected to equal the text resolved over `[start, end)`. */
|
|
51
|
+
text: string;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Selector that targets a character range inside a single shape on one PPTX
|
|
55
|
+
* slide. Confirmed against captured DIAL Core responses: unlike
|
|
56
|
+
* {@link TextCharacterRangeSelector}, `end` is already exclusive on the wire.
|
|
57
|
+
*/
|
|
58
|
+
export interface PptxRangeSelector {
|
|
59
|
+
/** Discriminator — always `'pptx_text_range'`. */
|
|
60
|
+
type: 'pptx_text_range';
|
|
61
|
+
/** 1-based slide number. */
|
|
62
|
+
slide: number;
|
|
63
|
+
/** Shape identifier, compared as a string against the run's own shape id. */
|
|
64
|
+
shape_id: string;
|
|
65
|
+
/** Zero-based start character offset within the shape's matched text. */
|
|
66
|
+
start: number;
|
|
67
|
+
/** Zero-based end character offset — already exclusive on the wire. */
|
|
68
|
+
end: number;
|
|
69
|
+
/** The cited text, expected to equal the text resolved over `[start, end)`. */
|
|
70
|
+
text: string;
|
|
71
|
+
}
|
|
72
|
+
/** A 1-based cell address on an XLSX sheet. */
|
|
73
|
+
export interface ExcelCellAddress {
|
|
74
|
+
/** 1-based row number. */
|
|
75
|
+
row: number;
|
|
76
|
+
/** 1-based column number. */
|
|
77
|
+
col: number;
|
|
78
|
+
}
|
|
79
|
+
/** Selector that targets one cell, or a contiguous same-row cell range, on a named XLSX sheet. */
|
|
80
|
+
export interface ExcelRcRangeSelector {
|
|
81
|
+
/** Discriminator — always `'excel_rc_range'`. */
|
|
82
|
+
type: 'excel_rc_range';
|
|
83
|
+
/** Sheet name, matched exactly against the workbook's own sheet names. */
|
|
84
|
+
sheet: string;
|
|
85
|
+
/** First cell of the range. */
|
|
86
|
+
start: ExcelCellAddress;
|
|
87
|
+
/** Last (inclusive) cell of the range, on the same row as `start`. `null` and omitted both mean a single cell. */
|
|
88
|
+
end?: ExcelCellAddress | null;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Discriminated union of all recognised annotation selector shapes.
|
|
92
|
+
* Unknown selector types are preserved as an open record to allow forward-compatibility.
|
|
93
|
+
*/
|
|
94
|
+
export type AnnotationSelector = TextCharacterRangeSelector | PdfBBoxSelector | HtmlTagSelector | DocxRangeSelector | PptxRangeSelector | ExcelRcRangeSelector | {
|
|
95
|
+
type: string;
|
|
96
|
+
[key: string]: unknown;
|
|
97
|
+
};
|
|
98
|
+
/** Identifies the part of the message (or a related resource) that the annotation refers to. */
|
|
99
|
+
export interface AnnotationTarget {
|
|
100
|
+
/** Source resource being targeted. `null` or absent means the first content part of the response. */
|
|
101
|
+
source?: unknown;
|
|
102
|
+
/** Character-range or document-region selector within the targeted source. */
|
|
103
|
+
selector?: AnnotationSelector;
|
|
104
|
+
}
|
|
105
|
+
/** A file attachment referenced by a citation — same shape as `MessageAttachment` but scoped to annotations. */
|
|
106
|
+
export interface AttachmentResource {
|
|
107
|
+
/** MIME type of the attached file (e.g. `'application/pdf'`). */
|
|
108
|
+
type: string;
|
|
109
|
+
/** Remote URL pointing to the file content. */
|
|
110
|
+
url: string;
|
|
111
|
+
/** Human-readable display name for the file. Used in citation markers. */
|
|
112
|
+
title?: string;
|
|
113
|
+
}
|
|
114
|
+
/** Identifies the cited document attached to the annotation. */
|
|
115
|
+
export interface AnnotationSource {
|
|
116
|
+
/** Always `'attachment'` for file-based sources. */
|
|
117
|
+
type: 'attachment';
|
|
118
|
+
/** The cited file — auto-shared by DIAL Core so the recipient can access it. */
|
|
119
|
+
attachment: AttachmentResource;
|
|
120
|
+
}
|
|
121
|
+
/** Payload of the annotation: the cited text excerpt, its source document, and optional styling hints. */
|
|
122
|
+
export interface AnnotationBody {
|
|
123
|
+
/** Human-readable title of the cited section or document. */
|
|
124
|
+
title?: string;
|
|
125
|
+
/** The literal text excerpt being cited. */
|
|
126
|
+
quote?: string;
|
|
127
|
+
/** The cited source document (present when the annotation references a file). */
|
|
128
|
+
source?: AnnotationSource;
|
|
129
|
+
/** Selectors pointing to the cited region within the source document. */
|
|
130
|
+
selector?: AnnotationSelector | AnnotationSelector[];
|
|
131
|
+
/** Client-defined styling hints (e.g. highlight color). Treated as open-ended; unknown keys are preserved. */
|
|
132
|
+
configuration?: Record<string, unknown>;
|
|
133
|
+
}
|
|
134
|
+
/** A single annotation attached to an assistant message, optionally citing a source document. */
|
|
135
|
+
export interface Annotation {
|
|
136
|
+
/** Zero-based position in the annotation list; used to merge streaming delta updates. */
|
|
137
|
+
index?: number;
|
|
138
|
+
/** Which part of the message text (or a request resource) is annotated. */
|
|
139
|
+
target?: AnnotationTarget;
|
|
140
|
+
/** The annotation payload: quoted text, source document, and optional styling. */
|
|
141
|
+
body?: AnnotationBody;
|
|
142
|
+
}
|
|
143
|
+
//# sourceMappingURL=annotation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"annotation.d.ts","sourceRoot":"","sources":["../../src/models/annotation.ts"],"names":[],"mappings":"AAAA,2FAA2F;AAC3F,MAAM,WAAW,0BAA0B;IACzC,uDAAuD;IACvD,IAAI,EAAE,sBAAsB,CAAC;IAC7B,0CAA0C;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,wCAAwC;IACxC,GAAG,EAAE,MAAM,CAAC;CACb;AAED,iFAAiF;AACjF,MAAM,WAAW,eAAe;IAC9B,2CAA2C;IAC3C,IAAI,EAAE,UAAU,CAAC;IACjB,+BAA+B;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,4BAA4B;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,2BAA2B;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,6BAA6B;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,8BAA8B;IAC9B,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,oGAAoG;AACpG,MAAM,WAAW,eAAe;IAC9B,2CAA2C;IAC3C,IAAI,EAAE,UAAU,CAAC;IACjB,mCAAmC;IACnC,GAAG,EAAE,MAAM,CAAC;IACZ,mIAAmI;IACnI,EAAE,EAAE,MAAM,CAAC;CACZ;AAED;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,kDAAkD;IAClD,IAAI,EAAE,iBAAiB,CAAC;IACxB,4HAA4H;IAC5H,KAAK,EAAE,MAAM,CAAC;IACd,mFAAmF;IACnF,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,yEAAyE;IACzE,KAAK,EAAE,MAAM,CAAC;IACd,uEAAuE;IACvE,GAAG,EAAE,MAAM,CAAC;IACZ,+EAA+E;IAC/E,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,kDAAkD;IAClD,IAAI,EAAE,iBAAiB,CAAC;IACxB,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,6EAA6E;IAC7E,QAAQ,EAAE,MAAM,CAAC;IACjB,yEAAyE;IACzE,KAAK,EAAE,MAAM,CAAC;IACd,uEAAuE;IACvE,GAAG,EAAE,MAAM,CAAC;IACZ,+EAA+E;IAC/E,IAAI,EAAE,MAAM,CAAC;CACd;AAED,+CAA+C;AAC/C,MAAM,WAAW,gBAAgB;IAC/B,0BAA0B;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,6BAA6B;IAC7B,GAAG,EAAE,MAAM,CAAC;CACb;AAED,kGAAkG;AAClG,MAAM,WAAW,oBAAoB;IACnC,iDAAiD;IACjD,IAAI,EAAE,gBAAgB,CAAC;IACvB,0EAA0E;IAC1E,KAAK,EAAE,MAAM,CAAC;IACd,+BAA+B;IAC/B,KAAK,EAAE,gBAAgB,CAAC;IACxB,kHAAkH;IAClH,GAAG,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;CAC/B;AAED;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAC1B,0BAA0B,GAC1B,eAAe,GACf,eAAe,GACf,iBAAiB,GACjB,iBAAiB,GACjB,oBAAoB,GACpB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,CAAC;AAE7C,gGAAgG;AAChG,MAAM,WAAW,gBAAgB;IAC/B,qGAAqG;IACrG,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,kBAAkB,CAAC;CAC/B;AAED,gHAAgH;AAChH,MAAM,WAAW,kBAAkB;IACjC,iEAAiE;IACjE,IAAI,EAAE,MAAM,CAAC;IACb,+CAA+C;IAC/C,GAAG,EAAE,MAAM,CAAC;IACZ,0EAA0E;IAC1E,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,gEAAgE;AAChE,MAAM,WAAW,gBAAgB;IAC/B,oDAAoD;IACpD,IAAI,EAAE,YAAY,CAAC;IACnB,gFAAgF;IAChF,UAAU,EAAE,kBAAkB,CAAC;CAChC;AAED,0GAA0G;AAC1G,MAAM,WAAW,cAAc;IAC7B,6DAA6D;IAC7D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iFAAiF;IACjF,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,yEAAyE;IACzE,QAAQ,CAAC,EAAE,kBAAkB,GAAG,kBAAkB,EAAE,CAAC;IACrD,8GAA8G;IAC9G,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACzC;AAED,iGAAiG;AACjG,MAAM,WAAW,UAAU;IACzB,yFAAyF;IACzF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2EAA2E;IAC3E,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,kFAAkF;IAClF,IAAI,CAAC,EAAE,cAAc,CAAC;CACvB"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { CustomVisualizerData, CustomVisualizerDataLayout } from './custom-visualizer';
|
|
2
|
+
/**
|
|
3
|
+
* A single application → grouped visualizer mapping from the
|
|
4
|
+
* `APPLICATION_VISUALIZERS` registry. Field semantics are fixed by
|
|
5
|
+
* already-deployed visualizer applications and operator configurations
|
|
6
|
+
* carried over from legacy Chat 0.x, which is why `contentType` is optional
|
|
7
|
+
* here while `CustomVisualizer.contentType` is required.
|
|
8
|
+
*/
|
|
9
|
+
export interface ApplicationVisualizer {
|
|
10
|
+
/**
|
|
11
|
+
* The postMessage protocol namespace, NOT a display label. Every message
|
|
12
|
+
* exchanged with the iframe is prefixed `${title}/…`, and the iframe-side
|
|
13
|
+
* visualizer application must be constructed with this identical string
|
|
14
|
+
* as its `appName`. A mismatch is a silent failure — the iframe loads but
|
|
15
|
+
* never receives data. Also used as the inline frame's header text.
|
|
16
|
+
*/
|
|
17
|
+
title: string;
|
|
18
|
+
/** Human-readable description of the visualizer. Accepted for operator-configuration parity; not consumed by host logic. */
|
|
19
|
+
description?: string;
|
|
20
|
+
/** Icon URL or identifier for the visualizer. Accepted for operator-configuration parity; not consumed by host logic. */
|
|
21
|
+
icon?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Comma-separated list of MIME types this entry claims (e.g.
|
|
24
|
+
* `'application/vnd.plotly.v1+json'` or
|
|
25
|
+
* `'application/vnd.plotly.v1+json, application/vnd.vega.v5+json'`).
|
|
26
|
+
* Stored verbatim; splitting happens at lookup time. When omitted, the
|
|
27
|
+
* entry claims every attachment that carries a URL.
|
|
28
|
+
*/
|
|
29
|
+
contentType?: string;
|
|
30
|
+
/** Absolute HTTP(S) URL of the visualizer iframe. */
|
|
31
|
+
url: string;
|
|
32
|
+
/** Milliseconds to wait for a `send()` request's `/RESPONSE` before rejecting. Defaults to `10000`. Does NOT bound the initial handshake. */
|
|
33
|
+
requestTimeout?: number;
|
|
34
|
+
/** Suggested initial width of the visualizer surface in pixels. Forwarded as-is in `CustomVisualizerDataLayout`. */
|
|
35
|
+
width?: number;
|
|
36
|
+
/** Suggested initial height of the visualizer surface in pixels. Forwarded as-is in `CustomVisualizerDataLayout`, and used by the host to size the inline frame. */
|
|
37
|
+
height?: number;
|
|
38
|
+
/** Suggested height on mobile viewports in pixels. Forwarded as-is in `CustomVisualizerDataLayout`, and used by the host to size the inline frame on mobile. */
|
|
39
|
+
mobileHeight?: number;
|
|
40
|
+
/** Whether the host should pass auth info to the visualizer. Accepted for operator-configuration parity; inert, because 1.0 auth is server-side and the browser holds no access token. */
|
|
41
|
+
passAuthInfo?: boolean;
|
|
42
|
+
/** Whether the host should pass an explicit access token. Accepted for operator-configuration parity; inert, because 1.0 auth is server-side and the browser holds no access token. */
|
|
43
|
+
passExplicitToken?: boolean;
|
|
44
|
+
/** When `true`, the host renders the inline frame without its border, rounded corners, background, and header divider. */
|
|
45
|
+
borderless?: boolean;
|
|
46
|
+
/** When `true`, the host hides the inline frame's header title text; the header actions stay visible. */
|
|
47
|
+
withoutTitle?: boolean;
|
|
48
|
+
}
|
|
49
|
+
/** The `APPLICATION_VISUALIZERS` registry: application id → grouped visualizer entry. */
|
|
50
|
+
export type ApplicationVisualizerRegistry = Record<string, ApplicationVisualizer>;
|
|
51
|
+
/** A single attachment handed to a grouped visualizer inside `SEND_GROUPED_VISUALIZE_DATA`. */
|
|
52
|
+
export interface GroupedAttachmentItem {
|
|
53
|
+
/** Absolute URL of the attachment, resolved by the host before sending. */
|
|
54
|
+
url: string;
|
|
55
|
+
/** The attachment's own MIME type. */
|
|
56
|
+
mimeType: string;
|
|
57
|
+
/** Presentation layout plus the opaque per-attachment payload. */
|
|
58
|
+
visualizerData: CustomVisualizerData;
|
|
59
|
+
}
|
|
60
|
+
/** Payload of a `SEND_GROUPED_VISUALIZE_DATA` request: every claimed attachment plus the shared presentation layout. */
|
|
61
|
+
export interface GroupedAttachmentsData {
|
|
62
|
+
/** One item per claimed attachment, in the message's attachment order. */
|
|
63
|
+
attachments: GroupedAttachmentItem[];
|
|
64
|
+
/** Presentation layout hints shared by every item. */
|
|
65
|
+
layout: CustomVisualizerDataLayout;
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=application-visualizer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"application-visualizer.d.ts","sourceRoot":"","sources":["../../src/models/application-visualizer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EACpB,0BAA0B,EAC3B,MAAM,qBAAqB,CAAC;AAE7B;;;;;;GAMG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;;;;OAMG;IACH,KAAK,EAAE,MAAM,CAAC;IACd,4HAA4H;IAC5H,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yHAAyH;IACzH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qDAAqD;IACrD,GAAG,EAAE,MAAM,CAAC;IACZ,6IAA6I;IAC7I,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oHAAoH;IACpH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oKAAoK;IACpK,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gKAAgK;IAChK,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,0LAA0L;IAC1L,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,uLAAuL;IACvL,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,0HAA0H;IAC1H,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,yGAAyG;IACzG,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,yFAAyF;AACzF,MAAM,MAAM,6BAA6B,GAAG,MAAM,CAChD,MAAM,EACN,qBAAqB,CACtB,CAAC;AAEF,+FAA+F;AAC/F,MAAM,WAAW,qBAAqB;IACpC,2EAA2E;IAC3E,GAAG,EAAE,MAAM,CAAC;IACZ,sCAAsC;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,kEAAkE;IAClE,cAAc,EAAE,oBAAoB,CAAC;CACtC;AAED,wHAAwH;AACxH,MAAM,WAAW,sBAAsB;IACrC,0EAA0E;IAC1E,WAAW,EAAE,qBAAqB,EAAE,CAAC;IACrC,sDAAsD;IACtD,MAAM,EAAE,0BAA0B,CAAC;CACpC"}
|
package/models/auth.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/** Authenticated user's profile as returned by the identity provider. */
|
|
2
|
+
export interface UserProfile {
|
|
3
|
+
/** Subject identifier — unique, stable ID for the user within the provider. */
|
|
4
|
+
sub: string;
|
|
5
|
+
/** ID of the identity provider that authenticated the user. */
|
|
6
|
+
providerId: string;
|
|
7
|
+
/**
|
|
8
|
+
* Allowlisted claims, keyed by claim name. A dot-notation provider
|
|
9
|
+
* `rolesClaim` (e.g. `"realm_access.roles"`) is stored under one flat key
|
|
10
|
+
* equal to that literal string, never as a nested object — look it up
|
|
11
|
+
* with `claims[rolesClaim]`, not a nested path.
|
|
12
|
+
*/
|
|
13
|
+
claims: Record<string, unknown>;
|
|
14
|
+
/** DIAL Core storage bucket for the authenticated user. Empty string when the bucket has not been resolved yet. */
|
|
15
|
+
bucket?: string;
|
|
16
|
+
/** Whether the user's roles claim intersects the provider's configured adminRoles. */
|
|
17
|
+
isAdmin: boolean;
|
|
18
|
+
}
|
|
19
|
+
/** Describes an available identity provider. */
|
|
20
|
+
export interface ProviderInfo {
|
|
21
|
+
/** Unique provider identifier used in API calls. */
|
|
22
|
+
id: string;
|
|
23
|
+
/** Human-readable display name shown in the UI. */
|
|
24
|
+
label: string;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/models/auth.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,MAAM,WAAW,WAAW;IAC1B,+EAA+E;IAC/E,GAAG,EAAE,MAAM,CAAC;IACZ,+DAA+D;IAC/D,UAAU,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,mHAAmH;IACnH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sFAAsF;IACtF,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,gDAAgD;AAChD,MAAM,WAAW,YAAY;IAC3B,oDAAoD;IACpD,EAAE,EAAE,MAAM,CAAC;IACX,mDAAmD;IACnD,KAAK,EAAE,MAAM,CAAC;CACf"}
|