@8wave/ai-elements 0.122.0-beta.9 → 0.123.0-beta.1
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/dist/_chunks/PkFilePreview-eKok4xdc.js +211 -0
- package/dist/_chunks/PkFilePreview-eKok4xdc.js.map +1 -0
- package/dist/_chunks/PkStreamingMarkdown-Dc0R0GHe.js.map +1 -1
- package/dist/_chunks/PkToolChatFile-3fYhbFSi.js +222 -0
- package/dist/_chunks/PkToolChatFile-3fYhbFSi.js.map +1 -0
- package/dist/ai-elements.es.js +592 -405
- package/dist/ai-elements.es.js.map +1 -1
- package/dist-vue/PkChatbot.js +1 -1
- package/dist-vue/PkChatbotViewChat.js +1 -1
- package/dist-vue/PkChatbotViewConversations.js +1 -1
- package/dist-vue/PkChatbotViewFiles.js +1 -1
- package/dist-vue/PkChatbotViewProfile.js +1 -1
- package/dist-vue/_chunks/{PkChatbot-B7JaLUZw.js → PkChatbot-D3KGDerg.js} +6 -6
- package/dist-vue/_chunks/{PkChatbot-B7JaLUZw.js.map → PkChatbot-D3KGDerg.js.map} +1 -1
- package/dist-vue/_chunks/PkChatbotViewChat-BNaSv86u.js +1047 -0
- package/dist-vue/_chunks/PkChatbotViewChat-BNaSv86u.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewConversations-4ZJF-y5q.js → PkChatbotViewConversations-C1vl8z4o.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewConversations-4ZJF-y5q.js.map → PkChatbotViewConversations-C1vl8z4o.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewFiles-CfPwNcvf.js → PkChatbotViewFiles-DiKHsdPE.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewFiles-CfPwNcvf.js.map → PkChatbotViewFiles-DiKHsdPE.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewProfile-Dd8EhOx3.js → PkChatbotViewProfile-CuQ0MAX7.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewProfile-Dd8EhOx3.js.map → PkChatbotViewProfile-CuQ0MAX7.js.map} +1 -1
- package/dist-vue/_chunks/PkFilePreview-Cx6jmJCD.js +200 -0
- package/dist-vue/_chunks/PkFilePreview-Cx6jmJCD.js.map +1 -0
- package/dist-vue/_chunks/PkToolChatFile-BJsDSu1Q.js +220 -0
- package/dist-vue/_chunks/PkToolChatFile-BJsDSu1Q.js.map +1 -0
- package/dist-vue/_chunks/{createChatbotApiClient-y6jA42S0.js → createChatbotApiClient-DAh91HyT.js} +4 -1
- package/dist-vue/_chunks/{createChatbotApiClient-y6jA42S0.js.map → createChatbotApiClient-DAh91HyT.js.map} +1 -1
- package/dist-vue/_chunks/{useChatbotStore-DCXyql8U.js → useChatbotStore-D1U24qc8.js} +2 -2
- package/dist-vue/_chunks/{useChatbotStore-DCXyql8U.js.map → useChatbotStore-D1U24qc8.js.map} +1 -1
- package/dist-vue/_chunks/utils-DaAIWTtt.js.map +1 -1
- package/dist-vue/api.js +1 -1
- package/dist-vue/composables.js +60 -2
- package/dist-vue/composables.js.map +1 -1
- package/dist-vue/index.js +6 -6
- package/dist-vue/locales.js +56 -0
- package/dist-vue/packages/components/src/chat/PkFilePreview.d.ts +28 -0
- package/dist-vue/packages/components/src/chat/PkSpreadsheetPreview.d.ts +15 -0
- package/dist-vue/packages/components/src/chat/PkToolChatFile.d.ts +13 -0
- package/dist-vue/packages/components/src/chat/PkWordPreview.d.ts +16 -0
- package/dist-vue/packages/components/src/chat/PkWordPreviewRuns.d.ts +13 -0
- package/dist-vue/packages/components/src/chat/utils.d.ts +7 -0
- package/dist-vue/packages/composable/src/chatbot/api/createChatbotApiClient.d.ts +3 -1
- package/dist-vue/packages/models/src/schema/SpreadsheetPreview.d.ts +137 -0
- package/dist-vue/packages/models/src/schema/WordPreview.d.ts +135 -0
- package/dist-vue/packages/models/src/schema/index.d.ts +2 -0
- package/dist-vue/style.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/PkToolChatFile-BsvJIdgo.js +0 -181
- package/dist/_chunks/PkToolChatFile-BsvJIdgo.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotViewChat-Djts78Oq.js +0 -921
- package/dist-vue/_chunks/PkChatbotViewChat-Djts78Oq.js.map +0 -1
- package/dist-vue/_chunks/PkToolChatFile-s46esp0O.js +0 -179
- package/dist-vue/_chunks/PkToolChatFile-s46esp0O.js.map +0 -1
package/dist-vue/index.js
CHANGED
|
@@ -5,18 +5,18 @@ import { t as v } from "./_chunks/PkChatbotMessages-qkodgdDE.js";
|
|
|
5
5
|
import { a as y, i as b, l as x, n as S, r as C } from "./_chunks/Media-DylqhvaF.js";
|
|
6
6
|
import { C as w, E as ee, F as te, G as ne, H as re, I as ie, J as ae, K as oe, L as se, M as ce, N as le, P as ue, R as de, T as fe, X as pe, Y as me, a as he, at as ge, b as _e, ct as ve, d as ye, f as be, ft as xe, i as Se, it as Ce, lt as we, nt as Te, ot as Ee, p as De, q as Oe, r as T, rt as ke, s as Ae, st as je, t as Me, v as Ne, w as Pe, x as Fe, z as Ie } from "./_chunks/Agent-BWwjGG2f.js";
|
|
7
7
|
import { c as Le, d as Re, l as ze, r as Be, s as Ve, t as He, u as Ue } from "./_chunks/Document-DvRaziIf.js";
|
|
8
|
-
import { a as We, i as Ge, n as Ke } from "./_chunks/createChatbotApiClient-
|
|
8
|
+
import { a as We, i as Ge, n as Ke } from "./_chunks/createChatbotApiClient-DAh91HyT.js";
|
|
9
9
|
import { t as qe } from "./_chunks/PkChatbotAuth-Btxg3TF0.js";
|
|
10
10
|
import { t as Je } from "./_chunks/VvButtonLocalized-C-vx25u4.js";
|
|
11
11
|
import { n as Ye, t as Xe } from "./_chunks/PkStreamingMarkdown-B-sEx8BP.js";
|
|
12
|
-
import { a as Ze, i as Qe, n as $e, r as et } from "./_chunks/useChatbotStore-
|
|
12
|
+
import { a as Ze, i as Qe, n as $e, r as et } from "./_chunks/useChatbotStore-D1U24qc8.js";
|
|
13
13
|
import "./_chunks/src-B-ZKEhTU.js";
|
|
14
14
|
import { a as tt, l as nt, u as rt } from "./_chunks/message-DuibQyHy.js";
|
|
15
15
|
import { A as it, D as at, F as ot, I as st, N as ct, P as lt, f as ut, g as dt, m as ft, w as pt } from "./_chunks/utils-DaAIWTtt.js";
|
|
16
16
|
import { t as mt } from "./_chunks/useSafeLocalStorage-a2eHEqAi.js";
|
|
17
17
|
import { t as ht } from "./_chunks/useDialogConfirm-fn7iV-iE.js";
|
|
18
|
-
import { i as gt, n as _t, r as vt, t as yt } from "./_chunks/PkChatbotViewConversations-
|
|
19
|
-
import { i as bt, n as xt, r as St, t as Ct } from "./_chunks/PkChatbotViewChat-
|
|
18
|
+
import { i as gt, n as _t, r as vt, t as yt } from "./_chunks/PkChatbotViewConversations-C1vl8z4o.js";
|
|
19
|
+
import { i as bt, n as xt, r as St, t as Ct } from "./_chunks/PkChatbotViewChat-BNaSv86u.js";
|
|
20
20
|
import { t as wt } from "./_chunks/PkChatbotError-BS84xuiu.js";
|
|
21
21
|
import { t as Tt } from "./_chunks/useImageFallback-HUe4GHah.js";
|
|
22
22
|
import { t as Et } from "./_chunks/useLocalizedString-Dmn92nix.js";
|
|
@@ -36,8 +36,8 @@ import { t as Zn } from "./_chunks/PkChatbotStepPayload-BYChvULZ.js";
|
|
|
36
36
|
import { t as Qn } from "./_chunks/PkChatbotStepToolDetail-BysPl2ko.js";
|
|
37
37
|
import { n as $n, t as er } from "./_chunks/PkChatbotInput-BT51V-v4.js";
|
|
38
38
|
import { t as tr } from "./_chunks/PkChatbotEmptyState-B76oD7fB.js";
|
|
39
|
-
import { t as nr } from "./_chunks/PkChatbotViewProfile-
|
|
40
|
-
import { t as rr } from "./_chunks/PkChatbot-
|
|
39
|
+
import { t as nr } from "./_chunks/PkChatbotViewProfile-CuQ0MAX7.js";
|
|
40
|
+
import { t as rr } from "./_chunks/PkChatbot-D3KGDerg.js";
|
|
41
41
|
import { i as ir, r as ar, t as or } from "./_chunks/PkToolShowSources-C4rKpypf.js";
|
|
42
42
|
import { t as sr } from "./_chunks/mcpOAuthReport-aR-W09MX.js";
|
|
43
43
|
import { t as cr } from "./_chunks/PkToolShowEmail-BehvoNsz.js";
|
package/dist-vue/locales.js
CHANGED
|
@@ -633,11 +633,14 @@ var e = {
|
|
|
633
633
|
steps: "Processing",
|
|
634
634
|
stepCount: "{n} step | {n} steps",
|
|
635
635
|
stepError: "Error",
|
|
636
|
+
chatFileRestoreRequest: "Restore version {version} of {filename}",
|
|
636
637
|
pageControlActive: "The agent is using the page",
|
|
637
638
|
chatFileParagraphAdded: "Added",
|
|
638
639
|
chatFileParagraphDeleted: "Deleted",
|
|
639
640
|
chatFileTableRowAdded: "Row added",
|
|
640
641
|
chatFileTableRowDeleted: "Row deleted",
|
|
642
|
+
chatFileRevisionAccepted: "Revision accepted",
|
|
643
|
+
chatFileRevisionRejected: "Revision rejected",
|
|
641
644
|
chatFileParagraphChanged: "Changed",
|
|
642
645
|
chatFileNewSheet: "New sheet, with {count} row | New sheet, with {count} rows",
|
|
643
646
|
chatFileRow: "Row {row}",
|
|
@@ -647,6 +650,8 @@ var e = {
|
|
|
647
650
|
chatFileRefreshPivots: "The pivot tables still show the old figures: refresh them in Excel with Data, Refresh All.",
|
|
648
651
|
chatFileUpdateTableOfContents: "The table of contents does not update by itself: in Word, right click it and choose Update Field.",
|
|
649
652
|
chatFileVersionSummary: "Version {version}: {changed}",
|
|
653
|
+
chatFileRestored: "Version {version}: version {restored} restored",
|
|
654
|
+
chatFileRestore: "Restore",
|
|
650
655
|
chatFileCell: "Cell",
|
|
651
656
|
chatFileBefore: "Before",
|
|
652
657
|
chatFileAfter: "After",
|
|
@@ -787,6 +792,29 @@ var e = {
|
|
|
787
792
|
pageNavigate: "The agent wants to open “{url}”. Allow it?",
|
|
788
793
|
pageNavigateUnknown: "The agent wants to open “{url}”, which the page does not show. Allow it?"
|
|
789
794
|
},
|
|
795
|
+
chatFilePreview: {
|
|
796
|
+
close: "Close the preview",
|
|
797
|
+
versionFirstRows: "Version {version}, the first rows of each sheet",
|
|
798
|
+
firstRows: "The first rows of each sheet",
|
|
799
|
+
versionUnpaged: "Version {version}, preview not paginated",
|
|
800
|
+
unpaged: "Preview, not paginated",
|
|
801
|
+
download: "Download",
|
|
802
|
+
unavailable: "This document has no preview: download it to open it in Word.",
|
|
803
|
+
true: "TRUE",
|
|
804
|
+
false: "FALSE",
|
|
805
|
+
staleFormulas: "Values shown with a dash update when you open the file in Excel.",
|
|
806
|
+
missingValue: "Computed when you open the file in Excel",
|
|
807
|
+
emptySheet: "This sheet is empty.",
|
|
808
|
+
moreRows: "The file holds one more row. | The file holds {count} more rows.",
|
|
809
|
+
moreColumns: "The file holds one more column. | The file holds {count} more columns.",
|
|
810
|
+
preview: "Preview",
|
|
811
|
+
revisionsOf: "Tracked changes by {authors}, not accepted yet:",
|
|
812
|
+
removed: "removed",
|
|
813
|
+
added: "added",
|
|
814
|
+
truncated: "The preview stops here: the rest of the document is in the file to download.",
|
|
815
|
+
revisionBy: "Tracked change by {author}",
|
|
816
|
+
image: "Image"
|
|
817
|
+
},
|
|
790
818
|
confirmTitle: {
|
|
791
819
|
deleteMyConversations: "Delete all your conversations?",
|
|
792
820
|
deleteWordDocument: "Delete this Word document?",
|
|
@@ -1470,11 +1498,14 @@ var e = {
|
|
|
1470
1498
|
steps: "Elaborazione",
|
|
1471
1499
|
stepCount: "{n} passaggio | {n} passaggi",
|
|
1472
1500
|
stepError: "Errore",
|
|
1501
|
+
chatFileRestoreRequest: "Ripristina la versione {version} di {filename}",
|
|
1473
1502
|
pageControlActive: "L'agente sta usando la pagina",
|
|
1474
1503
|
chatFileParagraphAdded: "Aggiunto",
|
|
1475
1504
|
chatFileParagraphDeleted: "Eliminato",
|
|
1476
1505
|
chatFileTableRowAdded: "Riga aggiunta",
|
|
1477
1506
|
chatFileTableRowDeleted: "Riga eliminata",
|
|
1507
|
+
chatFileRevisionAccepted: "Revisione accettata",
|
|
1508
|
+
chatFileRevisionRejected: "Revisione rifiutata",
|
|
1478
1509
|
chatFileParagraphChanged: "Modificato",
|
|
1479
1510
|
chatFileNewSheet: "Foglio nuovo, con {count} riga | Foglio nuovo, con {count} righe",
|
|
1480
1511
|
chatFileRow: "Riga {row}",
|
|
@@ -1484,6 +1515,8 @@ var e = {
|
|
|
1484
1515
|
chatFileRefreshPivots: "Le tabelle pivot mostrano ancora i dati di prima: aggiornale in Excel con Dati, Aggiorna tutto.",
|
|
1485
1516
|
chatFileUpdateTableOfContents: "L'indice non si aggiorna da solo: in Word fai clic destro sull'indice e scegli Aggiorna campo.",
|
|
1486
1517
|
chatFileVersionSummary: "Versione {version}: {changed}",
|
|
1518
|
+
chatFileRestored: "Versione {version}: ripristinata la versione {restored}",
|
|
1519
|
+
chatFileRestore: "Ripristina",
|
|
1487
1520
|
chatFileCell: "Cella",
|
|
1488
1521
|
chatFileBefore: "Prima",
|
|
1489
1522
|
chatFileAfter: "Dopo",
|
|
@@ -1624,6 +1657,29 @@ var e = {
|
|
|
1624
1657
|
pageNavigate: "L'agente vuole aprire «{url}». Consenti?",
|
|
1625
1658
|
pageNavigateUnknown: "L'agente vuole aprire «{url}», che la pagina non mostra. Consenti?"
|
|
1626
1659
|
},
|
|
1660
|
+
chatFilePreview: {
|
|
1661
|
+
close: "Chiudi l'anteprima",
|
|
1662
|
+
versionFirstRows: "Versione {version}, le prime righe di ogni foglio",
|
|
1663
|
+
firstRows: "Le prime righe di ogni foglio",
|
|
1664
|
+
versionUnpaged: "Versione {version}, anteprima non impaginata",
|
|
1665
|
+
unpaged: "Anteprima non impaginata",
|
|
1666
|
+
download: "Scarica",
|
|
1667
|
+
unavailable: "L'anteprima di questo documento non è disponibile: scaricalo per aprirlo in Word.",
|
|
1668
|
+
true: "VERO",
|
|
1669
|
+
false: "FALSO",
|
|
1670
|
+
staleFormulas: "I valori con il trattino si aggiornano quando apri il file in Excel.",
|
|
1671
|
+
missingValue: "Calcolato quando apri il file in Excel",
|
|
1672
|
+
emptySheet: "Questo foglio è vuoto.",
|
|
1673
|
+
moreRows: "Nel file c'è un'altra riga. | Nel file ci sono altre {count} righe.",
|
|
1674
|
+
moreColumns: "Nel file c'è un'altra colonna. | Nel file ci sono altre {count} colonne.",
|
|
1675
|
+
preview: "Anteprima",
|
|
1676
|
+
revisionsOf: "Revisioni da accettare di {authors}:",
|
|
1677
|
+
removed: "tolto",
|
|
1678
|
+
added: "aggiunto",
|
|
1679
|
+
truncated: "L'anteprima si ferma qui: il resto del documento è nel file da scaricare.",
|
|
1680
|
+
revisionBy: "Revisione di {author}",
|
|
1681
|
+
image: "Immagine"
|
|
1682
|
+
},
|
|
1627
1683
|
confirmTitle: {
|
|
1628
1684
|
deleteMyConversations: "Eliminare tutte le vostre conversazioni?",
|
|
1629
1685
|
deleteWordDocument: "Eliminare questo documento Word?",
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ChatFilePreview } from '../../../models/src';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
|
+
/**
|
|
4
|
+
* The preview of a Word document or a spreadsheet stored in the chat
|
|
5
|
+
* (spec `chat-office-files.md`, F6, items 3 and 4): its name, version and
|
|
6
|
+
* download over the content, which scrolls. The same frame goes in a
|
|
7
|
+
* dialog (its title and close are the dialog's) and in the panel beside
|
|
8
|
+
* the chat (`closable`).
|
|
9
|
+
*/
|
|
10
|
+
type __VLS_Props = {
|
|
11
|
+
kind: 'word' | 'spreadsheet';
|
|
12
|
+
filename: string;
|
|
13
|
+
version?: number;
|
|
14
|
+
/** The authenticated download URL of the same version. */
|
|
15
|
+
downloadUrl: string;
|
|
16
|
+
preview?: ChatFilePreview;
|
|
17
|
+
loading?: boolean;
|
|
18
|
+
error?: boolean;
|
|
19
|
+
/** Draws its own title and close button, for the panel. */
|
|
20
|
+
closable?: boolean;
|
|
21
|
+
};
|
|
22
|
+
declare const __VLS_export: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
23
|
+
close: () => any;
|
|
24
|
+
}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
25
|
+
onClose?: (() => any) | undefined;
|
|
26
|
+
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
27
|
+
declare const _default: typeof __VLS_export;
|
|
28
|
+
export default _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SpreadsheetPreview } from '../../../models/src';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
|
+
/**
|
|
4
|
+
* The content of the preview of a spreadsheet (spec
|
|
5
|
+
* `chat-office-files.md`, F6, item 4): the first rows of each sheet, one
|
|
6
|
+
* sheet at a time, its cells formatted in the reader's language as the
|
|
7
|
+
* file's number formats ask. A formula whose result the file does not
|
|
8
|
+
* hold yet shows a dash. Framed by `PkFilePreview`.
|
|
9
|
+
*/
|
|
10
|
+
type __VLS_Props = {
|
|
11
|
+
preview: SpreadsheetPreview;
|
|
12
|
+
};
|
|
13
|
+
declare const __VLS_export: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
export default _default;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ChatFilePreviewTarget } from './utils';
|
|
1
2
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
3
|
/**
|
|
3
4
|
* The file a call of `editSpreadsheet`, `editWordDocument`,
|
|
@@ -12,6 +13,18 @@ type __VLS_Props = {
|
|
|
12
13
|
part: unknown;
|
|
13
14
|
/** The authenticated download URL of a file stored in this chat. */
|
|
14
15
|
fileUrl: (storedFileName: string) => string;
|
|
16
|
+
/** Opens the preview of the file, where the chat has one. */
|
|
17
|
+
preview?: (file: ChatFilePreviewTarget) => void;
|
|
18
|
+
/** The latest version of each file the conversation shows, by fileId. */
|
|
19
|
+
latestVersions?: ReadonlyMap<string, number>;
|
|
20
|
+
/**
|
|
21
|
+
* Asks the agent to write an earlier version again as the newest one,
|
|
22
|
+
* where the chat can send a message.
|
|
23
|
+
*/
|
|
24
|
+
restore?: (file: {
|
|
25
|
+
version: number;
|
|
26
|
+
filename: string;
|
|
27
|
+
}) => void;
|
|
15
28
|
};
|
|
16
29
|
declare const __VLS_export: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
17
30
|
declare const _default: typeof __VLS_export;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { WordPreview } from '../../../models/src';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
|
+
/**
|
|
4
|
+
* The content of the preview of a Word document (spec
|
|
5
|
+
* `chat-office-files.md`, F6, item 3): the blocks the server read from
|
|
6
|
+
* the document, drawn as text, never as HTML. Tracked changes not
|
|
7
|
+
* accepted yet carry the marks of the card of an edit, struck where words
|
|
8
|
+
* went and underlined where they came. Not paginated: no pages, images as
|
|
9
|
+
* placeholders. Framed by `PkFilePreview`.
|
|
10
|
+
*/
|
|
11
|
+
type __VLS_Props = {
|
|
12
|
+
preview: WordPreview;
|
|
13
|
+
};
|
|
14
|
+
declare const __VLS_export: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { WordPreviewRun } from '../../../models/src';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
|
+
/**
|
|
4
|
+
* The runs of a paragraph or a cell of a Word preview, as text: a tracked
|
|
5
|
+
* change struck where words went and underlined where they came, its
|
|
6
|
+
* author said on hover, an image as a placeholder.
|
|
7
|
+
*/
|
|
8
|
+
type __VLS_Props = {
|
|
9
|
+
runs: WordPreviewRun[];
|
|
10
|
+
};
|
|
11
|
+
declare const __VLS_export: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
@@ -214,3 +214,10 @@ export declare function localizeSummaryLabels<T extends string | null | undefine
|
|
|
214
214
|
export declare function getToolPartLabel($t: (key: string) => string, part?: UIMessage['parts'][number] | null,
|
|
215
215
|
/** The live titles of the page's steps, by call: they win when present. */
|
|
216
216
|
hostStepTitles?: Record<string, string>): string | undefined;
|
|
217
|
+
/** The version of a file stored in the chat that a preview opens. */
|
|
218
|
+
export type ChatFilePreviewTarget = {
|
|
219
|
+
kind: 'word' | 'spreadsheet';
|
|
220
|
+
storedFileName: string;
|
|
221
|
+
filename: string;
|
|
222
|
+
version?: number;
|
|
223
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AgentAccess, Chat, ChatWakeupState, DeviceContext, MessageFeedback, AgentPublic, MediaSource, UserFileKind, VoiceSession } from '../../../../models/src';
|
|
1
|
+
import { AgentAccess, Chat, ChatWakeupState, DeviceContext, MessageFeedback, AgentPublic, MediaSource, UserFileKind, VoiceSession, ChatFilePreview } from '../../../../models/src';
|
|
2
2
|
export interface ChatbotApiClientOptions {
|
|
3
3
|
baseUrl: string;
|
|
4
4
|
basePath?: string;
|
|
@@ -71,6 +71,8 @@ export interface ChatbotApiClient {
|
|
|
71
71
|
getMediaUrl(agentId: string, chatId: string, storedFileName: string): string;
|
|
72
72
|
/** Like {@link getMediaUrl}, served as an attachment: the browser saves it. */
|
|
73
73
|
getMediaDownloadUrl(agentId: string, chatId: string, storedFileName: string): string;
|
|
74
|
+
/** The preview of a Word document or a spreadsheet stored in the chat. */
|
|
75
|
+
getChatFilePreview(agentId: string, chatId: string, storedFileName: string): Promise<ChatFilePreview>;
|
|
74
76
|
appendAuthToken(url: string): string;
|
|
75
77
|
uploadMedia(agentId: string, chatId: string, file: File): Promise<MediaSource>;
|
|
76
78
|
getChatEndpoint(agentId: string, type?: 'chat' | 'reasoning'): string;
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
export declare const SpreadsheetPreviewCellSchema: z.ZodObject<{
|
|
3
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
4
|
+
format: z.ZodOptional<z.ZodEnum<{
|
|
5
|
+
date: "date";
|
|
6
|
+
error: "error";
|
|
7
|
+
currency: "currency";
|
|
8
|
+
percent: "percent";
|
|
9
|
+
}>>;
|
|
10
|
+
decimals: z.ZodOptional<z.ZodNumber>;
|
|
11
|
+
maxDecimals: z.ZodOptional<z.ZodNumber>;
|
|
12
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
13
|
+
missing: z.ZodOptional<z.ZodLiteral<true>>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
export declare const SpreadsheetPreviewSheetSchema: z.ZodObject<{
|
|
16
|
+
name: z.ZodString;
|
|
17
|
+
rows: z.ZodArray<z.ZodArray<z.ZodObject<{
|
|
18
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
19
|
+
format: z.ZodOptional<z.ZodEnum<{
|
|
20
|
+
date: "date";
|
|
21
|
+
error: "error";
|
|
22
|
+
currency: "currency";
|
|
23
|
+
percent: "percent";
|
|
24
|
+
}>>;
|
|
25
|
+
decimals: z.ZodOptional<z.ZodNumber>;
|
|
26
|
+
maxDecimals: z.ZodOptional<z.ZodNumber>;
|
|
27
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
28
|
+
missing: z.ZodOptional<z.ZodLiteral<true>>;
|
|
29
|
+
}, z.core.$strip>>>;
|
|
30
|
+
header: z.ZodBoolean;
|
|
31
|
+
moreRows: z.ZodNumber;
|
|
32
|
+
moreColumns: z.ZodNumber;
|
|
33
|
+
}, z.core.$strip>;
|
|
34
|
+
export declare const SpreadsheetPreviewSchema: z.ZodObject<{
|
|
35
|
+
kind: z.ZodLiteral<"spreadsheet">;
|
|
36
|
+
sheets: z.ZodArray<z.ZodObject<{
|
|
37
|
+
name: z.ZodString;
|
|
38
|
+
rows: z.ZodArray<z.ZodArray<z.ZodObject<{
|
|
39
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
40
|
+
format: z.ZodOptional<z.ZodEnum<{
|
|
41
|
+
date: "date";
|
|
42
|
+
error: "error";
|
|
43
|
+
currency: "currency";
|
|
44
|
+
percent: "percent";
|
|
45
|
+
}>>;
|
|
46
|
+
decimals: z.ZodOptional<z.ZodNumber>;
|
|
47
|
+
maxDecimals: z.ZodOptional<z.ZodNumber>;
|
|
48
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
49
|
+
missing: z.ZodOptional<z.ZodLiteral<true>>;
|
|
50
|
+
}, z.core.$strip>>>;
|
|
51
|
+
header: z.ZodBoolean;
|
|
52
|
+
moreRows: z.ZodNumber;
|
|
53
|
+
moreColumns: z.ZodNumber;
|
|
54
|
+
}, z.core.$strip>>;
|
|
55
|
+
staleFormulas: z.ZodBoolean;
|
|
56
|
+
}, z.core.$strip>;
|
|
57
|
+
/** What the preview route answers, by the kind of file. */
|
|
58
|
+
export declare const ChatFilePreviewSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
59
|
+
kind: z.ZodLiteral<"word">;
|
|
60
|
+
blocks: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
61
|
+
kind: z.ZodLiteral<"heading">;
|
|
62
|
+
level: z.ZodNumber;
|
|
63
|
+
label: z.ZodOptional<z.ZodString>;
|
|
64
|
+
runs: z.ZodArray<z.ZodObject<{
|
|
65
|
+
text: z.ZodString;
|
|
66
|
+
change: z.ZodOptional<z.ZodEnum<{
|
|
67
|
+
deleted: "deleted";
|
|
68
|
+
inserted: "inserted";
|
|
69
|
+
}>>;
|
|
70
|
+
author: z.ZodOptional<z.ZodString>;
|
|
71
|
+
bold: z.ZodOptional<z.ZodLiteral<true>>;
|
|
72
|
+
italic: z.ZodOptional<z.ZodLiteral<true>>;
|
|
73
|
+
underline: z.ZodOptional<z.ZodLiteral<true>>;
|
|
74
|
+
image: z.ZodOptional<z.ZodLiteral<true>>;
|
|
75
|
+
}, z.core.$strip>>;
|
|
76
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
77
|
+
kind: z.ZodLiteral<"paragraph">;
|
|
78
|
+
label: z.ZodOptional<z.ZodString>;
|
|
79
|
+
runs: z.ZodArray<z.ZodObject<{
|
|
80
|
+
text: z.ZodString;
|
|
81
|
+
change: z.ZodOptional<z.ZodEnum<{
|
|
82
|
+
deleted: "deleted";
|
|
83
|
+
inserted: "inserted";
|
|
84
|
+
}>>;
|
|
85
|
+
author: z.ZodOptional<z.ZodString>;
|
|
86
|
+
bold: z.ZodOptional<z.ZodLiteral<true>>;
|
|
87
|
+
italic: z.ZodOptional<z.ZodLiteral<true>>;
|
|
88
|
+
underline: z.ZodOptional<z.ZodLiteral<true>>;
|
|
89
|
+
image: z.ZodOptional<z.ZodLiteral<true>>;
|
|
90
|
+
}, z.core.$strip>>;
|
|
91
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
92
|
+
kind: z.ZodLiteral<"table">;
|
|
93
|
+
rows: z.ZodArray<z.ZodArray<z.ZodObject<{
|
|
94
|
+
runs: z.ZodArray<z.ZodObject<{
|
|
95
|
+
text: z.ZodString;
|
|
96
|
+
change: z.ZodOptional<z.ZodEnum<{
|
|
97
|
+
deleted: "deleted";
|
|
98
|
+
inserted: "inserted";
|
|
99
|
+
}>>;
|
|
100
|
+
author: z.ZodOptional<z.ZodString>;
|
|
101
|
+
bold: z.ZodOptional<z.ZodLiteral<true>>;
|
|
102
|
+
italic: z.ZodOptional<z.ZodLiteral<true>>;
|
|
103
|
+
underline: z.ZodOptional<z.ZodLiteral<true>>;
|
|
104
|
+
image: z.ZodOptional<z.ZodLiteral<true>>;
|
|
105
|
+
}, z.core.$strip>>;
|
|
106
|
+
span: z.ZodOptional<z.ZodNumber>;
|
|
107
|
+
}, z.core.$strip>>>;
|
|
108
|
+
}, z.core.$strip>], "kind">>;
|
|
109
|
+
truncated: z.ZodBoolean;
|
|
110
|
+
revisionAuthors: z.ZodArray<z.ZodString>;
|
|
111
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
112
|
+
kind: z.ZodLiteral<"spreadsheet">;
|
|
113
|
+
sheets: z.ZodArray<z.ZodObject<{
|
|
114
|
+
name: z.ZodString;
|
|
115
|
+
rows: z.ZodArray<z.ZodArray<z.ZodObject<{
|
|
116
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
117
|
+
format: z.ZodOptional<z.ZodEnum<{
|
|
118
|
+
date: "date";
|
|
119
|
+
error: "error";
|
|
120
|
+
currency: "currency";
|
|
121
|
+
percent: "percent";
|
|
122
|
+
}>>;
|
|
123
|
+
decimals: z.ZodOptional<z.ZodNumber>;
|
|
124
|
+
maxDecimals: z.ZodOptional<z.ZodNumber>;
|
|
125
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
126
|
+
missing: z.ZodOptional<z.ZodLiteral<true>>;
|
|
127
|
+
}, z.core.$strip>>>;
|
|
128
|
+
header: z.ZodBoolean;
|
|
129
|
+
moreRows: z.ZodNumber;
|
|
130
|
+
moreColumns: z.ZodNumber;
|
|
131
|
+
}, z.core.$strip>>;
|
|
132
|
+
staleFormulas: z.ZodBoolean;
|
|
133
|
+
}, z.core.$strip>], "kind">;
|
|
134
|
+
export type SpreadsheetPreviewCell = z.infer<typeof SpreadsheetPreviewCellSchema>;
|
|
135
|
+
export type SpreadsheetPreviewSheet = z.infer<typeof SpreadsheetPreviewSheetSchema>;
|
|
136
|
+
export type SpreadsheetPreview = z.infer<typeof SpreadsheetPreviewSchema>;
|
|
137
|
+
export type ChatFilePreview = z.infer<typeof ChatFilePreviewSchema>;
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
export declare const WordPreviewRunSchema: z.ZodObject<{
|
|
3
|
+
text: z.ZodString;
|
|
4
|
+
change: z.ZodOptional<z.ZodEnum<{
|
|
5
|
+
deleted: "deleted";
|
|
6
|
+
inserted: "inserted";
|
|
7
|
+
}>>;
|
|
8
|
+
author: z.ZodOptional<z.ZodString>;
|
|
9
|
+
bold: z.ZodOptional<z.ZodLiteral<true>>;
|
|
10
|
+
italic: z.ZodOptional<z.ZodLiteral<true>>;
|
|
11
|
+
underline: z.ZodOptional<z.ZodLiteral<true>>;
|
|
12
|
+
image: z.ZodOptional<z.ZodLiteral<true>>;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
export declare const WordPreviewCellSchema: z.ZodObject<{
|
|
15
|
+
runs: z.ZodArray<z.ZodObject<{
|
|
16
|
+
text: z.ZodString;
|
|
17
|
+
change: z.ZodOptional<z.ZodEnum<{
|
|
18
|
+
deleted: "deleted";
|
|
19
|
+
inserted: "inserted";
|
|
20
|
+
}>>;
|
|
21
|
+
author: z.ZodOptional<z.ZodString>;
|
|
22
|
+
bold: z.ZodOptional<z.ZodLiteral<true>>;
|
|
23
|
+
italic: z.ZodOptional<z.ZodLiteral<true>>;
|
|
24
|
+
underline: z.ZodOptional<z.ZodLiteral<true>>;
|
|
25
|
+
image: z.ZodOptional<z.ZodLiteral<true>>;
|
|
26
|
+
}, z.core.$strip>>;
|
|
27
|
+
span: z.ZodOptional<z.ZodNumber>;
|
|
28
|
+
}, z.core.$strip>;
|
|
29
|
+
export declare const WordPreviewBlockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
30
|
+
kind: z.ZodLiteral<"heading">;
|
|
31
|
+
level: z.ZodNumber;
|
|
32
|
+
label: z.ZodOptional<z.ZodString>;
|
|
33
|
+
runs: z.ZodArray<z.ZodObject<{
|
|
34
|
+
text: z.ZodString;
|
|
35
|
+
change: z.ZodOptional<z.ZodEnum<{
|
|
36
|
+
deleted: "deleted";
|
|
37
|
+
inserted: "inserted";
|
|
38
|
+
}>>;
|
|
39
|
+
author: z.ZodOptional<z.ZodString>;
|
|
40
|
+
bold: z.ZodOptional<z.ZodLiteral<true>>;
|
|
41
|
+
italic: z.ZodOptional<z.ZodLiteral<true>>;
|
|
42
|
+
underline: z.ZodOptional<z.ZodLiteral<true>>;
|
|
43
|
+
image: z.ZodOptional<z.ZodLiteral<true>>;
|
|
44
|
+
}, z.core.$strip>>;
|
|
45
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
46
|
+
kind: z.ZodLiteral<"paragraph">;
|
|
47
|
+
label: z.ZodOptional<z.ZodString>;
|
|
48
|
+
runs: z.ZodArray<z.ZodObject<{
|
|
49
|
+
text: z.ZodString;
|
|
50
|
+
change: z.ZodOptional<z.ZodEnum<{
|
|
51
|
+
deleted: "deleted";
|
|
52
|
+
inserted: "inserted";
|
|
53
|
+
}>>;
|
|
54
|
+
author: z.ZodOptional<z.ZodString>;
|
|
55
|
+
bold: z.ZodOptional<z.ZodLiteral<true>>;
|
|
56
|
+
italic: z.ZodOptional<z.ZodLiteral<true>>;
|
|
57
|
+
underline: z.ZodOptional<z.ZodLiteral<true>>;
|
|
58
|
+
image: z.ZodOptional<z.ZodLiteral<true>>;
|
|
59
|
+
}, z.core.$strip>>;
|
|
60
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
61
|
+
kind: z.ZodLiteral<"table">;
|
|
62
|
+
rows: z.ZodArray<z.ZodArray<z.ZodObject<{
|
|
63
|
+
runs: z.ZodArray<z.ZodObject<{
|
|
64
|
+
text: z.ZodString;
|
|
65
|
+
change: z.ZodOptional<z.ZodEnum<{
|
|
66
|
+
deleted: "deleted";
|
|
67
|
+
inserted: "inserted";
|
|
68
|
+
}>>;
|
|
69
|
+
author: z.ZodOptional<z.ZodString>;
|
|
70
|
+
bold: z.ZodOptional<z.ZodLiteral<true>>;
|
|
71
|
+
italic: z.ZodOptional<z.ZodLiteral<true>>;
|
|
72
|
+
underline: z.ZodOptional<z.ZodLiteral<true>>;
|
|
73
|
+
image: z.ZodOptional<z.ZodLiteral<true>>;
|
|
74
|
+
}, z.core.$strip>>;
|
|
75
|
+
span: z.ZodOptional<z.ZodNumber>;
|
|
76
|
+
}, z.core.$strip>>>;
|
|
77
|
+
}, z.core.$strip>], "kind">;
|
|
78
|
+
export declare const WordPreviewSchema: z.ZodObject<{
|
|
79
|
+
kind: z.ZodLiteral<"word">;
|
|
80
|
+
blocks: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
81
|
+
kind: z.ZodLiteral<"heading">;
|
|
82
|
+
level: z.ZodNumber;
|
|
83
|
+
label: z.ZodOptional<z.ZodString>;
|
|
84
|
+
runs: z.ZodArray<z.ZodObject<{
|
|
85
|
+
text: z.ZodString;
|
|
86
|
+
change: z.ZodOptional<z.ZodEnum<{
|
|
87
|
+
deleted: "deleted";
|
|
88
|
+
inserted: "inserted";
|
|
89
|
+
}>>;
|
|
90
|
+
author: z.ZodOptional<z.ZodString>;
|
|
91
|
+
bold: z.ZodOptional<z.ZodLiteral<true>>;
|
|
92
|
+
italic: z.ZodOptional<z.ZodLiteral<true>>;
|
|
93
|
+
underline: z.ZodOptional<z.ZodLiteral<true>>;
|
|
94
|
+
image: z.ZodOptional<z.ZodLiteral<true>>;
|
|
95
|
+
}, z.core.$strip>>;
|
|
96
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
97
|
+
kind: z.ZodLiteral<"paragraph">;
|
|
98
|
+
label: z.ZodOptional<z.ZodString>;
|
|
99
|
+
runs: z.ZodArray<z.ZodObject<{
|
|
100
|
+
text: z.ZodString;
|
|
101
|
+
change: z.ZodOptional<z.ZodEnum<{
|
|
102
|
+
deleted: "deleted";
|
|
103
|
+
inserted: "inserted";
|
|
104
|
+
}>>;
|
|
105
|
+
author: z.ZodOptional<z.ZodString>;
|
|
106
|
+
bold: z.ZodOptional<z.ZodLiteral<true>>;
|
|
107
|
+
italic: z.ZodOptional<z.ZodLiteral<true>>;
|
|
108
|
+
underline: z.ZodOptional<z.ZodLiteral<true>>;
|
|
109
|
+
image: z.ZodOptional<z.ZodLiteral<true>>;
|
|
110
|
+
}, z.core.$strip>>;
|
|
111
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
112
|
+
kind: z.ZodLiteral<"table">;
|
|
113
|
+
rows: z.ZodArray<z.ZodArray<z.ZodObject<{
|
|
114
|
+
runs: z.ZodArray<z.ZodObject<{
|
|
115
|
+
text: z.ZodString;
|
|
116
|
+
change: z.ZodOptional<z.ZodEnum<{
|
|
117
|
+
deleted: "deleted";
|
|
118
|
+
inserted: "inserted";
|
|
119
|
+
}>>;
|
|
120
|
+
author: z.ZodOptional<z.ZodString>;
|
|
121
|
+
bold: z.ZodOptional<z.ZodLiteral<true>>;
|
|
122
|
+
italic: z.ZodOptional<z.ZodLiteral<true>>;
|
|
123
|
+
underline: z.ZodOptional<z.ZodLiteral<true>>;
|
|
124
|
+
image: z.ZodOptional<z.ZodLiteral<true>>;
|
|
125
|
+
}, z.core.$strip>>;
|
|
126
|
+
span: z.ZodOptional<z.ZodNumber>;
|
|
127
|
+
}, z.core.$strip>>>;
|
|
128
|
+
}, z.core.$strip>], "kind">>;
|
|
129
|
+
truncated: z.ZodBoolean;
|
|
130
|
+
revisionAuthors: z.ZodArray<z.ZodString>;
|
|
131
|
+
}, z.core.$strip>;
|
|
132
|
+
export type WordPreviewRun = z.infer<typeof WordPreviewRunSchema>;
|
|
133
|
+
export type WordPreviewCell = z.infer<typeof WordPreviewCellSchema>;
|
|
134
|
+
export type WordPreviewBlock = z.infer<typeof WordPreviewBlockSchema>;
|
|
135
|
+
export type WordPreview = z.infer<typeof WordPreviewSchema>;
|
|
@@ -42,6 +42,7 @@ export * from './RevisedAnswer';
|
|
|
42
42
|
export * from './SignInSecurity';
|
|
43
43
|
export * from './StreamError';
|
|
44
44
|
export * from './SubAgent';
|
|
45
|
+
export * from './SpreadsheetPreview';
|
|
45
46
|
export * from './Tabular';
|
|
46
47
|
export * from './TimingLog';
|
|
47
48
|
export * from './DocumentFolder';
|
|
@@ -49,3 +50,4 @@ export * from './DocumentSyncSource';
|
|
|
49
50
|
export * from './User';
|
|
50
51
|
export * from './UserOverview';
|
|
51
52
|
export * from './Weather';
|
|
53
|
+
export * from './WordPreview';
|