@8wave/ai-elements 0.121.0-beta.39 → 0.121.0-beta.40
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/README.md +67 -15
- package/dist/_chunks/{Agent-C3m0UmlL.js → Agent-BuPgJIt4.js} +203 -202
- package/dist/_chunks/Agent-BuPgJIt4.js.map +1 -0
- package/dist/_chunks/{PkStreamingMarkdown--PCkA4Fg.js → PkStreamingMarkdown-D2aqCD0I.js} +953 -927
- package/dist/_chunks/PkStreamingMarkdown-D2aqCD0I.js.map +1 -0
- package/dist/_chunks/{PkToolEditSpreadsheet-DAMWWIVt.js → PkToolEditSpreadsheet-83ZdmGeA.js} +2 -2
- package/dist/_chunks/{PkToolEditSpreadsheet-DAMWWIVt.js.map → PkToolEditSpreadsheet-83ZdmGeA.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestGeolocation-BgsvQb7Q.js → PkToolRequestGeolocation-1cOmCG8P.js} +2 -2
- package/dist/_chunks/{PkToolRequestGeolocation-BgsvQb7Q.js.map → PkToolRequestGeolocation-1cOmCG8P.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestOAuthConnection-DtuZw7yk.js → PkToolRequestOAuthConnection-CCu3FCyo.js} +2 -2
- package/dist/_chunks/{PkToolRequestOAuthConnection-DtuZw7yk.js.map → PkToolRequestOAuthConnection-CCu3FCyo.js.map} +1 -1
- package/dist/_chunks/{PkToolShowArtifact-B163OvqY.js → PkToolShowArtifact-CiYkZkpe.js} +2 -2
- package/dist/_chunks/{PkToolShowArtifact-B163OvqY.js.map → PkToolShowArtifact-CiYkZkpe.js.map} +1 -1
- package/dist/_chunks/{PkToolShowContactForm-C_ptr7Xs.js → PkToolShowContactForm-D7TEzrYe.js} +2 -2
- package/dist/_chunks/{PkToolShowContactForm-C_ptr7Xs.js.map → PkToolShowContactForm-D7TEzrYe.js.map} +1 -1
- package/dist/_chunks/{PkToolShowForm-fburTpQm.js → PkToolShowForm-CSh4Q6sl.js} +5 -5
- package/dist/_chunks/{PkToolShowForm-fburTpQm.js.map → PkToolShowForm-CSh4Q6sl.js.map} +1 -1
- package/dist/_chunks/{PkToolShowImageGallery-ChauJukk.js → PkToolShowImageGallery-CQEaEfYE.js} +2 -2
- package/dist/_chunks/{PkToolShowImageGallery-ChauJukk.js.map → PkToolShowImageGallery-CQEaEfYE.js.map} +1 -1
- package/dist/_chunks/{PkToolShowProductList-B_XZezYw.js → PkToolShowProductList-BCmULLct.js} +2 -2
- package/dist/_chunks/{PkToolShowProductList-B_XZezYw.js.map → PkToolShowProductList-BCmULLct.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSources-CS4nEuL0.js → PkToolShowSources-R9KWsfTQ.js} +3 -3
- package/dist/_chunks/{PkToolShowSources-CS4nEuL0.js.map → PkToolShowSources-R9KWsfTQ.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSuggestedReply-BIe56XdA.js → PkToolShowSuggestedReply-DYZz9aV2.js} +2 -2
- package/dist/_chunks/{PkToolShowSuggestedReply-BIe56XdA.js.map → PkToolShowSuggestedReply-DYZz9aV2.js.map} +1 -1
- package/dist/_chunks/{PkToolShowVideo-DzU1XJqv.js → PkToolShowVideo-C_9SZtZM.js} +2 -2
- package/dist/_chunks/{PkToolShowVideo-DzU1XJqv.js.map → PkToolShowVideo-C_9SZtZM.js.map} +1 -1
- package/dist/_chunks/{PkToolShowWebPages-BlKe8Arf.js → PkToolShowWebPages-DwRYfle9.js} +2 -2
- package/dist/_chunks/{PkToolShowWebPages-BlKe8Arf.js.map → PkToolShowWebPages-DwRYfle9.js.map} +1 -1
- package/dist/_chunks/{chatImagePolicy-ChSkpiw6.js → chatImagePolicy-CQYTWTkP.js} +2 -2
- package/dist/_chunks/{chatImagePolicy-ChSkpiw6.js.map → chatImagePolicy-CQYTWTkP.js.map} +1 -1
- package/dist/_chunks/{markdown-D3iMlF6T.js → markdown-Br9ROCBT.js} +2 -2
- package/dist/_chunks/{markdown-D3iMlF6T.js.map → markdown-Br9ROCBT.js.map} +1 -1
- package/dist/ai-elements.es.js +4378 -3756
- package/dist/ai-elements.es.js.map +1 -1
- package/dist-vue/PkChatbot.js +1 -1
- package/dist-vue/PkChatbotEmptyState.js +1 -1
- package/dist-vue/PkChatbotInput.js +1 -1
- package/dist-vue/PkChatbotMessages.js +1 -1
- package/dist-vue/PkChatbotStepPayload.js +1 -1
- package/dist-vue/PkChatbotStepToolDetail.js +1 -1
- package/dist-vue/PkChatbotSteps.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/{Agent-3IHYHv05.js → Agent-DZb775Ak.js} +193 -192
- package/dist-vue/_chunks/Agent-DZb775Ak.js.map +1 -0
- package/dist-vue/_chunks/{Document-B0A_y6N5.js → Document-E72l_VU6.js} +2 -2
- package/dist-vue/_chunks/{Document-B0A_y6N5.js.map → Document-E72l_VU6.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbot-Bu76hH4F.js → PkChatbot-DIqduIwr.js} +9 -9
- package/dist-vue/_chunks/{PkChatbot-Bu76hH4F.js.map → PkChatbot-DIqduIwr.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotEmptyState-ilPJoYjk.js → PkChatbotEmptyState-Dh7ETVnf.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotEmptyState-ilPJoYjk.js.map → PkChatbotEmptyState-Dh7ETVnf.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotInput-CY0YRGkG.js → PkChatbotInput-BJHtmPR-.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotInput-CY0YRGkG.js.map → PkChatbotInput-BJHtmPR-.js.map} +1 -1
- package/dist-vue/_chunks/PkChatbotMessages-DMSActW1.js +968 -0
- package/dist-vue/_chunks/PkChatbotMessages-DMSActW1.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotStepPayload-CiEcIlzW.js → PkChatbotStepPayload-CXdsUMrw.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotStepPayload-CiEcIlzW.js.map → PkChatbotStepPayload-CXdsUMrw.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-VqLkuWi7.js → PkChatbotStepToolDetail-DbpXR7jh.js} +16 -16
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-VqLkuWi7.js.map → PkChatbotStepToolDetail-DbpXR7jh.js.map} +1 -1
- package/dist-vue/_chunks/PkChatbotSteps-QFFZ0DjH.js +189 -0
- package/dist-vue/_chunks/PkChatbotSteps-QFFZ0DjH.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewChat-t-XkwFbe.js → PkChatbotViewChat-BI_PtT72.js} +300 -298
- package/dist-vue/_chunks/PkChatbotViewChat-BI_PtT72.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewConversations-CgRMohUQ.js → PkChatbotViewConversations-Bg4jSO9a.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotViewConversations-CgRMohUQ.js.map → PkChatbotViewConversations-Bg4jSO9a.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewFiles-DkeysDGW.js → PkChatbotViewFiles-Cwm-JQMF.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotViewFiles-DkeysDGW.js.map → PkChatbotViewFiles-Cwm-JQMF.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewProfile-kgqu10ED.js → PkChatbotViewProfile-C_GElIM3.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewProfile-kgqu10ED.js.map → PkChatbotViewProfile-C_GElIM3.js.map} +1 -1
- package/dist-vue/_chunks/{PkStreamingMarkdown-CDlpb5w0.js → PkStreamingMarkdown-DwDs-cGP.js} +3 -3
- package/dist-vue/_chunks/{PkStreamingMarkdown-CDlpb5w0.js.map → PkStreamingMarkdown-DwDs-cGP.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolEditSpreadsheet-D0EPgCmp.js → PkToolEditSpreadsheet-B61LtERY.js} +2 -2
- package/dist-vue/_chunks/{PkToolEditSpreadsheet-D0EPgCmp.js.map → PkToolEditSpreadsheet-B61LtERY.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolRequestGeolocation-DZnJd1od.js → PkToolRequestGeolocation-DC8hSH0j.js} +2 -2
- package/dist-vue/_chunks/{PkToolRequestGeolocation-DZnJd1od.js.map → PkToolRequestGeolocation-DC8hSH0j.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-C8MGtBlh.js → PkToolRequestOAuthConnection-BH_-drvw.js} +2 -2
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-C8MGtBlh.js.map → PkToolRequestOAuthConnection-BH_-drvw.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowArtifact-CtXB1-vJ.js → PkToolShowArtifact-CjVN96wJ.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowArtifact-CtXB1-vJ.js.map → PkToolShowArtifact-CjVN96wJ.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowContactForm-DlZdfcNw.js → PkToolShowContactForm-CmBLigw8.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowContactForm-DlZdfcNw.js.map → PkToolShowContactForm-CmBLigw8.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowDiagram-BUUjmUpE.js → PkToolShowDiagram-dKUU5_6F.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowDiagram-BUUjmUpE.js.map → PkToolShowDiagram-dKUU5_6F.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowForm-DxiiMSCC.js → PkToolShowForm-B6ESvq-5.js} +4 -4
- package/dist-vue/_chunks/{PkToolShowForm-DxiiMSCC.js.map → PkToolShowForm-B6ESvq-5.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowImageGallery-D01aM-9U.js → PkToolShowImageGallery-Daq0IwTH.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowImageGallery-D01aM-9U.js.map → PkToolShowImageGallery-Daq0IwTH.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowProductList-BRMF3WJf.js → PkToolShowProductList-Bc3Gzyxy.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowProductList-BRMF3WJf.js.map → PkToolShowProductList-Bc3Gzyxy.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSources-C0_MwX7m.js → PkToolShowSources-BDvRbenn.js} +3 -3
- package/dist-vue/_chunks/{PkToolShowSources-C0_MwX7m.js.map → PkToolShowSources-BDvRbenn.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-BcjKYwbk.js → PkToolShowSuggestedReply-Cd6VkzvJ.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-BcjKYwbk.js.map → PkToolShowSuggestedReply-Cd6VkzvJ.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowVideo-CjjoQH7j.js → PkToolShowVideo-Bo1gsD97.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowVideo-CjjoQH7j.js.map → PkToolShowVideo-Bo1gsD97.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowWebPages-B5reGh4g.js → PkToolShowWebPages-DI3sZiqh.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowWebPages-B5reGh4g.js.map → PkToolShowWebPages-DI3sZiqh.js.map} +1 -1
- package/dist-vue/_chunks/{createChatbotApiClient-DcLpptlt.js → createChatbotApiClient-DUz4dwzY.js} +12 -12
- package/dist-vue/_chunks/{createChatbotApiClient-DcLpptlt.js.map → createChatbotApiClient-DUz4dwzY.js.map} +1 -1
- package/dist-vue/_chunks/{useChatbotStore-BliRphuB.js → useChatbotStore-D7LcpA-6.js} +481 -455
- package/dist-vue/_chunks/useChatbotStore-D7LcpA-6.js.map +1 -0
- package/dist-vue/_chunks/{utils-C7-KrzRE.js → utils-EPX3V3VI.js} +112 -86
- package/dist-vue/_chunks/utils-EPX3V3VI.js.map +1 -0
- package/dist-vue/api.js +1 -1
- package/dist-vue/apps/web-component/src/components/EmbeddedChatWidget.ce.d.ts +2 -0
- package/dist-vue/apps/web-component/src/components/FloatingChatWidget.ce.d.ts +2 -0
- package/dist-vue/apps/web-component/src/composables/usePageTools.d.ts +1 -0
- package/dist-vue/apps/web-component/src/lib.d.ts +10 -0
- package/dist-vue/apps/web-component/src/pageTools/actions.d.ts +2 -0
- package/dist-vue/apps/web-component/src/pageTools/announcements.d.ts +9 -0
- package/dist-vue/apps/web-component/src/pageTools/index.d.ts +12 -1
- package/dist-vue/apps/web-component/src/pageTools/navigation.d.ts +40 -8
- package/dist-vue/apps/web-component/src/pageTools/snapshot.d.ts +60 -0
- package/dist-vue/composables.js +34 -8
- package/dist-vue/composables.js.map +1 -1
- package/dist-vue/index.js +145 -125
- package/dist-vue/index.js.map +1 -1
- package/dist-vue/locales.js +28 -2
- package/dist-vue/packages/components/src/PkEditorPrompt.d.ts +6 -0
- package/dist-vue/packages/components/src/chat/PkChatbotMessages.d.ts +4 -0
- package/dist-vue/packages/components/src/chat/PkHostCallConfirmCard.d.ts +7 -1
- package/dist-vue/packages/components/src/chat/PkHostCallConfirmDialog.d.ts +4 -0
- package/dist-vue/packages/components/src/chat/PkPageControlBar.d.ts +5 -1
- package/dist-vue/packages/components/src/chat/utils.d.ts +11 -1
- package/dist-vue/packages/composable/src/chatbot/hostTools.d.ts +37 -8
- package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +8 -2
- package/dist-vue/packages/models/src/schema/PageAccess.d.ts +9 -0
- package/dist-vue/style.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/Agent-C3m0UmlL.js.map +0 -1
- package/dist/_chunks/PkStreamingMarkdown--PCkA4Fg.js.map +0 -1
- package/dist-vue/_chunks/Agent-3IHYHv05.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotMessages-BfKqJ8n_.js +0 -954
- package/dist-vue/_chunks/PkChatbotMessages-BfKqJ8n_.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotSteps-CoDtEaL7.js +0 -189
- package/dist-vue/_chunks/PkChatbotSteps-CoDtEaL7.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotViewChat-t-XkwFbe.js.map +0 -1
- package/dist-vue/_chunks/useChatbotStore-BliRphuB.js.map +0 -1
- package/dist-vue/_chunks/utils-C7-KrzRE.js.map +0 -1
package/dist-vue/locales.js
CHANGED
|
@@ -654,6 +654,14 @@ var e = {
|
|
|
654
654
|
press: "Pressing a key…",
|
|
655
655
|
back: "Going back…",
|
|
656
656
|
navigate: "Opening a page…"
|
|
657
|
+
},
|
|
658
|
+
pageStep: {
|
|
659
|
+
find: "Finding “{text}” on the page…",
|
|
660
|
+
click: "Clicking “{name}”…",
|
|
661
|
+
fill: "Filling in “{name}”…",
|
|
662
|
+
hover: "Pointing at “{name}”…",
|
|
663
|
+
press: "Pressing {key} on “{name}”…",
|
|
664
|
+
navigate: "Opening {url}…"
|
|
657
665
|
}
|
|
658
666
|
},
|
|
659
667
|
twoFactor: {
|
|
@@ -688,15 +696,20 @@ var e = {
|
|
|
688
696
|
promptNamed: "To continue, the agent wants to use “{tool}”.",
|
|
689
697
|
expired: "This request is no longer answerable: the action was not performed.",
|
|
690
698
|
pageElement: "an element",
|
|
699
|
+
fieldChecked: "yes",
|
|
700
|
+
moreFields: "and {count} more fields",
|
|
691
701
|
pageSubmit: "The agent wants to submit the form with “{name}”. Allow it?",
|
|
692
702
|
pageOpen: "The agent wants to open “{name}”: the page will change. Allow it?",
|
|
693
703
|
pageAnswer: "The page asks: “{question}” The agent wants to answer “{name}”. Allow it?",
|
|
694
704
|
pageClick: "The agent wants to click “{name}”. Allow it?",
|
|
695
705
|
pageFill: "The agent wants to write “{value}” in “{name}”. Allow it?",
|
|
706
|
+
pageFillFields: "The agent wants to fill in these fields. Allow it?",
|
|
696
707
|
pageHover: "The agent wants to point at “{name}”. Allow it?",
|
|
697
708
|
pagePress: "The agent wants to press {key} on “{name}”. Allow it?",
|
|
709
|
+
pageFocused: "the focused element",
|
|
698
710
|
pageBack: "The agent wants to go back to the previous page. Allow it?",
|
|
699
|
-
pageNavigate: "The agent wants to open “{url}”. Allow it?"
|
|
711
|
+
pageNavigate: "The agent wants to open “{url}”. Allow it?",
|
|
712
|
+
pageNavigateUnknown: "The agent wants to open “{url}”, which the page does not show. Allow it?"
|
|
700
713
|
},
|
|
701
714
|
confirmTitle: { deleteMyConversations: "Delete all your conversations?" },
|
|
702
715
|
toolSelection: {
|
|
@@ -1397,6 +1410,14 @@ var e = {
|
|
|
1397
1410
|
press: "Pressione di un tasto…",
|
|
1398
1411
|
back: "Ritorno alla pagina precedente…",
|
|
1399
1412
|
navigate: "Apertura di una pagina…"
|
|
1413
|
+
},
|
|
1414
|
+
pageStep: {
|
|
1415
|
+
find: "Ricerca di «{text}» nella pagina…",
|
|
1416
|
+
click: "Clic su «{name}»…",
|
|
1417
|
+
fill: "Compilazione di «{name}»…",
|
|
1418
|
+
hover: "Puntamento di «{name}»…",
|
|
1419
|
+
press: "Pressione di {key} su «{name}»…",
|
|
1420
|
+
navigate: "Apertura di {url}…"
|
|
1400
1421
|
}
|
|
1401
1422
|
},
|
|
1402
1423
|
twoFactor: {
|
|
@@ -1431,15 +1452,20 @@ var e = {
|
|
|
1431
1452
|
promptNamed: "Per continuare, l'agente vuole usare «{tool}».",
|
|
1432
1453
|
expired: "Questa richiesta non è più confermabile: l'azione non è stata eseguita.",
|
|
1433
1454
|
pageElement: "un elemento",
|
|
1455
|
+
fieldChecked: "sì",
|
|
1456
|
+
moreFields: "e altri {count} campi",
|
|
1434
1457
|
pageSubmit: "L'agente vuole inviare il modulo con «{name}». Consenti?",
|
|
1435
1458
|
pageOpen: "L'agente vuole aprire «{name}»: la pagina cambierà. Consenti?",
|
|
1436
1459
|
pageAnswer: "La pagina chiede: «{question}» L'agente vuole rispondere «{name}». Consenti?",
|
|
1437
1460
|
pageClick: "L'agente vuole cliccare «{name}». Consenti?",
|
|
1438
1461
|
pageFill: "L'agente vuole scrivere «{value}» in «{name}». Consenti?",
|
|
1462
|
+
pageFillFields: "L'agente vuole compilare questi campi. Consenti?",
|
|
1439
1463
|
pageHover: "L'agente vuole puntare «{name}». Consenti?",
|
|
1440
1464
|
pagePress: "L'agente vuole premere {key} su «{name}». Consenti?",
|
|
1465
|
+
pageFocused: "l'elemento attivo",
|
|
1441
1466
|
pageBack: "L'agente vuole tornare alla pagina precedente. Consenti?",
|
|
1442
|
-
pageNavigate: "L'agente vuole aprire «{url}». Consenti?"
|
|
1467
|
+
pageNavigate: "L'agente vuole aprire «{url}». Consenti?",
|
|
1468
|
+
pageNavigateUnknown: "L'agente vuole aprire «{url}», che la pagina non mostra. Consenti?"
|
|
1443
1469
|
},
|
|
1444
1470
|
confirmTitle: { deleteMyConversations: "Eliminare tutte le vostre conversazioni?" },
|
|
1445
1471
|
toolSelection: {
|
|
@@ -7,6 +7,12 @@ type __VLS_Props = {
|
|
|
7
7
|
hintLabel?: string;
|
|
8
8
|
invalid?: boolean;
|
|
9
9
|
invalidLabel?: string | string[];
|
|
10
|
+
/**
|
|
11
|
+
* The language of the text, on the text and its editor only: the
|
|
12
|
+
* label stays in the interface's language (spec
|
|
13
|
+
* `page-tools-improvements.md`, M5).
|
|
14
|
+
*/
|
|
15
|
+
lang?: string;
|
|
10
16
|
};
|
|
11
17
|
type __VLS_ModelProps = {
|
|
12
18
|
modelValue?: string | undefined;
|
|
@@ -3,10 +3,16 @@ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOp
|
|
|
3
3
|
* The consent a host call waits for (spec `host-tools.md`, "Conferma"):
|
|
4
4
|
* same frame and buttons as `PkToolApprovalCard`, which answers the
|
|
5
5
|
* backend's suspended calls instead. Shown only while the call waits: once
|
|
6
|
-
* answered, the call's own step or line says how it ended.
|
|
6
|
+
* answered, the call's own step or line says how it ended. A submit lists
|
|
7
|
+
* the fields it sends under the question (spec
|
|
8
|
+
* `page-tools-improvements.md`, M2): a line without a label stands alone.
|
|
7
9
|
*/
|
|
8
10
|
type __VLS_Props = {
|
|
9
11
|
question: string;
|
|
12
|
+
details?: {
|
|
13
|
+
label: string;
|
|
14
|
+
value: string;
|
|
15
|
+
}[];
|
|
10
16
|
};
|
|
11
17
|
declare const __VLS_export: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
12
18
|
respond: (approved: boolean) => any;
|
|
@@ -9,6 +9,10 @@ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOp
|
|
|
9
9
|
*/
|
|
10
10
|
type __VLS_Props = {
|
|
11
11
|
question: string;
|
|
12
|
+
details?: {
|
|
13
|
+
label: string;
|
|
14
|
+
value: string;
|
|
15
|
+
}[];
|
|
12
16
|
};
|
|
13
17
|
declare const __VLS_export: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
14
18
|
respond: (approved: boolean) => any;
|
|
@@ -4,9 +4,13 @@ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOp
|
|
|
4
4
|
* (spec `page-tools.md`, "Presa di controllo"). Fixed on the page, where
|
|
5
5
|
* the user looks while the agent acts. The widget renders it next to the
|
|
6
6
|
* chat, not inside it: a transformed ancestor would pin a fixed element to
|
|
7
|
-
* itself instead of to the page.
|
|
7
|
+
* itself instead of to the page. It comes down into place and goes back
|
|
8
|
+
* up, so its own transition lives here: a `v-if` on the component would
|
|
9
|
+
* remove it before it could leave.
|
|
8
10
|
*/
|
|
9
11
|
type __VLS_Props = {
|
|
12
|
+
/** The agent is acting on the page: the bar shows. */
|
|
13
|
+
active: boolean;
|
|
10
14
|
/** The step running, as its tool names it. */
|
|
11
15
|
action?: string;
|
|
12
16
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { UIMessage } from 'ai';
|
|
2
|
+
import { InjectionKey, Ref } from 'vue';
|
|
2
3
|
import { isTextPart, isFilePart, isToolPart, isReasoningPart, hasPartText, hasTextPart, getTextPart, getMessageText } from 'utils';
|
|
3
4
|
export { isTextPart, isFilePart, isToolPart, isReasoningPart, hasPartText, hasTextPart, getTextPart, getMessageText, };
|
|
4
5
|
/**
|
|
@@ -26,6 +27,7 @@ export declare function moveFileOutputsLast(parts: UIMessage['parts']): UIMessag
|
|
|
26
27
|
export declare function feedPartKey(part: UIMessage['parts'][number], index: number): string | number;
|
|
27
28
|
/** A call the embedding page runs, as the backend stamped it (spec `host-tools.md`). */
|
|
28
29
|
interface HostCallPart {
|
|
30
|
+
toolCallId?: string;
|
|
29
31
|
toolName: string;
|
|
30
32
|
title?: string;
|
|
31
33
|
state?: string;
|
|
@@ -36,6 +38,12 @@ interface HostCallPart {
|
|
|
36
38
|
};
|
|
37
39
|
}
|
|
38
40
|
export declare function getHostCallPart(part: UIMessage['parts'][number] | null | undefined): HostCallPart | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* The titles the widget gave this page's steps, by call, naming what each
|
|
43
|
+
* acts on (spec `page-tools-improvements.md`, M8): provided by the chat view
|
|
44
|
+
* from its store, read by the views that list the steps.
|
|
45
|
+
*/
|
|
46
|
+
export declare const HOST_STEP_TITLES: InjectionKey<Ref<Record<string, string>>>;
|
|
39
47
|
/**
|
|
40
48
|
* A host call that changes something in the app or on the page: the feed
|
|
41
49
|
* shows it even without the steps timeline, because what it did stays done.
|
|
@@ -203,4 +211,6 @@ export declare function providerLabel(slug: string): string;
|
|
|
203
211
|
* comes back as it is, so a `??` fallback after it still works.
|
|
204
212
|
*/
|
|
205
213
|
export declare function localizeSummaryLabels<T extends string | null | undefined>(summary: T, t: (key: string) => string): T;
|
|
206
|
-
export declare function getToolPartLabel($t: (key: string) => string, part?: UIMessage['parts'][number] | null
|
|
214
|
+
export declare function getToolPartLabel($t: (key: string) => string, part?: UIMessage['parts'][number] | null,
|
|
215
|
+
/** The live titles of the page's steps, by call: they win when present. */
|
|
216
|
+
hostStepTitles?: Record<string, string>): string | undefined;
|
|
@@ -19,12 +19,34 @@ export type RegisteredHostTool = HostToolDefinition & {
|
|
|
19
19
|
timeoutMs: number;
|
|
20
20
|
};
|
|
21
21
|
/**
|
|
22
|
-
* Decides per call whether the user confirms first: the question to ask
|
|
23
|
-
* or nothing. On the widget's own tools (with a
|
|
24
|
-
* agent's rules for the tool. On a host's tool
|
|
25
|
-
* confirmation: the agent's rules still ask when the
|
|
22
|
+
* Decides per call whether the user confirms first: the question to ask
|
|
23
|
+
* (or the whole card), or nothing. On the widget's own tools (with a
|
|
24
|
+
* `policy`) it replaces the agent's rules for the tool. On a host's tool
|
|
25
|
+
* it can only add a confirmation: the agent's rules still ask when the
|
|
26
|
+
* question is nothing.
|
|
26
27
|
*/
|
|
27
|
-
confirmation?: (input: unknown) => string | undefined;
|
|
28
|
+
confirmation?: (input: unknown) => string | HostToolConfirmation | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* What a step of this call says it does, naming its target ("Clicking
|
|
31
|
+
* “Create”"): the control bar and the chat show it while the page is open
|
|
32
|
+
* (spec `page-tools-improvements.md`, M8). Never a value the call writes.
|
|
33
|
+
*/
|
|
34
|
+
describe?: (input: unknown) => string | undefined;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* The confirmation card of a call (spec `page-tools-improvements.md`, M2).
|
|
38
|
+
* It stays in the browser: neither the details nor the question reach the
|
|
39
|
+
* backend, the model or the saved chat.
|
|
40
|
+
*/
|
|
41
|
+
export type HostToolConfirmation = {
|
|
42
|
+
question: string;
|
|
43
|
+
/** Lines under the question: the fields a submit sends, as the user sees them. */
|
|
44
|
+
details?: {
|
|
45
|
+
label: string;
|
|
46
|
+
value: string;
|
|
47
|
+
}[];
|
|
48
|
+
/** What the model reads when the user says no, in place of the plain refusal. */
|
|
49
|
+
refusal?: string;
|
|
28
50
|
};
|
|
29
51
|
/**
|
|
30
52
|
* A tool a page registers on the element, as the registry keeps it: the
|
|
@@ -42,6 +64,12 @@ export declare const hostToolFromPage: (tool: RegisteredHostTool) => RegisteredH
|
|
|
42
64
|
export type HostToolDeferredResult = {
|
|
43
65
|
result: HostToolResult;
|
|
44
66
|
afterOutput: () => void;
|
|
67
|
+
/**
|
|
68
|
+
* Called instead of `afterOutput` when the effect will never run: the
|
|
69
|
+
* resume did not reach the backend, or the user stopped the agent. What
|
|
70
|
+
* the call held for later is dropped there.
|
|
71
|
+
*/
|
|
72
|
+
abandon?: () => void;
|
|
45
73
|
};
|
|
46
74
|
/**
|
|
47
75
|
* Set by a page click that may unload the page, read by the widget on the
|
|
@@ -98,10 +126,11 @@ export declare function createHostToolRunner(deps: {
|
|
|
98
126
|
capability: () => HostToolsCapability | undefined;
|
|
99
127
|
addToolOutput: (output: HostToolOutput) => void;
|
|
100
128
|
/**
|
|
101
|
-
* Asks the user. `
|
|
102
|
-
* clicks); without one the card
|
|
129
|
+
* Asks the user. `confirmation` is the tool's own card (a page click
|
|
130
|
+
* names what it clicks, a submit lists its fields); without one the card
|
|
131
|
+
* asks about the call by its title.
|
|
103
132
|
*/
|
|
104
|
-
confirm: (call: HostToolCall,
|
|
133
|
+
confirm: (call: HostToolCall, confirmation?: HostToolConfirmation) => Promise<boolean>;
|
|
105
134
|
/** Resolves true once the resume that carries the last output reached the backend. */
|
|
106
135
|
waitForResume: () => Promise<boolean>;
|
|
107
136
|
onPendingChange?: (pending: number) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FileUIPart, ChatStatus, ChatRequestOptions, ChatAddToolOutputFunction, ChatAddToolApproveResponseFunction, ProviderMetadata, LanguageModelUsage } from 'ai';
|
|
2
2
|
import { PageAccessLevel, ChatMessageActions, UIChatMessage, AgentWidgetLayout, AgentWidgetAppearance, AgentLoaderStrategy, StoragePolicy, AgentSearchMode, AgentBuiltInTool, WebSearchProvider, UIChatMessageMetadata, PlatformType, ToolGroupKind, BlockedReasonCode, ConversationAnalysisTrigger, Sentiment, SentimentTrend, UserTone, AbuseCategory, LlmIssueCategory, UserEngagement, AbuseConfidence } from '../../../models/src';
|
|
3
|
-
import { RegisteredHostTool } from './hostTools';
|
|
3
|
+
import { HostToolConfirmation, RegisteredHostTool } from './hostTools';
|
|
4
4
|
import { ChatbotFile } from './api';
|
|
5
5
|
import { PendingAttachment } from './types';
|
|
6
6
|
import { Store } from 'pinia';
|
|
@@ -598,6 +598,7 @@ export declare function useChatbotStore(agentId: string): Store<`chatbot-${strin
|
|
|
598
598
|
} | undefined, {
|
|
599
599
|
title: string;
|
|
600
600
|
} | undefined>;
|
|
601
|
+
hostStepTitles: globalThis.Ref<Record<string, string>, Record<string, string>>;
|
|
601
602
|
pageControlActive: globalThis.Ref<boolean, boolean>;
|
|
602
603
|
isWorking: globalThis.Ref<boolean, boolean>;
|
|
603
604
|
stopHostActions: () => Promise<void>;
|
|
@@ -606,6 +607,7 @@ export declare function useChatbotStore(agentId: string): Store<`chatbot-${strin
|
|
|
606
607
|
hostConfirmation: globalThis.ShallowRef<{
|
|
607
608
|
toolCallId: string;
|
|
608
609
|
question?: string;
|
|
610
|
+
details?: HostToolConfirmation["details"];
|
|
609
611
|
answer: (approved: boolean) => void;
|
|
610
612
|
} | undefined>;
|
|
611
613
|
respondHostConfirmation: (approved: boolean) => void;
|
|
@@ -1944,7 +1946,7 @@ export declare function useChatbotStore(agentId: string): Store<`chatbot-${strin
|
|
|
1944
1946
|
navigate: (view: ChatbotView) => void;
|
|
1945
1947
|
renameChatTitle: (chatId: string, title: string) => Promise<void>;
|
|
1946
1948
|
deleteChat: (chatId: string) => Promise<void>;
|
|
1947
|
-
}, "name" | "input" | "model" | "externalContext" | "gatewayOptions" | "fallbackModels" | "userId" | "agentId" | "headers" | "conversations" | "agentModel" | "agentType" | "baseUrl" | "basePath" | "agentInterface" | "agentTools" | "revisedAnswers" | "actionsInput" | "agentFileUpload" | "agentVoice" | "agentHostTools" | "hostToolRegistry" | "hostToolsPending" | "agentPageAccess" | "pageToolRegistry" | "pageFormsProvider" | "pageAction" | "pageControlActive" | "isWorking" | "hostConfirmation" | "pageAccessOff" | "systemTheme" | "hideWelcomeMessage" | "isLoadingConversations" | "chatFiles" | "isLoadingChatFiles" | "pendingAttachments" | "fileLimitError" | "isConversationBlocked" | "chatError" | "activeView" | "messageFeedbacks" | "feedbackDialogMessage" | "isFeedbackSubmitting" | "isFeedbackSubmitted" | "feedbackSubmitError" | "isLeadSubmitted" | "isLoadingSubmitLead" | "submitLeadError">, Pick<{
|
|
1949
|
+
}, "name" | "input" | "model" | "externalContext" | "gatewayOptions" | "fallbackModels" | "userId" | "agentId" | "headers" | "conversations" | "agentModel" | "agentType" | "baseUrl" | "basePath" | "agentInterface" | "agentTools" | "revisedAnswers" | "actionsInput" | "agentFileUpload" | "agentVoice" | "agentHostTools" | "hostToolRegistry" | "hostToolsPending" | "agentPageAccess" | "pageToolRegistry" | "pageFormsProvider" | "pageAction" | "hostStepTitles" | "pageControlActive" | "isWorking" | "hostConfirmation" | "pageAccessOff" | "systemTheme" | "hideWelcomeMessage" | "isLoadingConversations" | "chatFiles" | "isLoadingChatFiles" | "pendingAttachments" | "fileLimitError" | "isConversationBlocked" | "chatError" | "activeView" | "messageFeedbacks" | "feedbackDialogMessage" | "isFeedbackSubmitting" | "isFeedbackSubmitted" | "feedbackSubmitError" | "isLeadSubmitted" | "isLoadingSubmitLead" | "submitLeadError">, Pick<{
|
|
1948
1950
|
apiClient: globalThis.ComputedRef< ChatbotApiClient>;
|
|
1949
1951
|
baseUrl: globalThis.Ref<string, string>;
|
|
1950
1952
|
basePath: globalThis.Ref<string | undefined, string | undefined>;
|
|
@@ -2504,6 +2506,7 @@ export declare function useChatbotStore(agentId: string): Store<`chatbot-${strin
|
|
|
2504
2506
|
} | undefined, {
|
|
2505
2507
|
title: string;
|
|
2506
2508
|
} | undefined>;
|
|
2509
|
+
hostStepTitles: globalThis.Ref<Record<string, string>, Record<string, string>>;
|
|
2507
2510
|
pageControlActive: globalThis.Ref<boolean, boolean>;
|
|
2508
2511
|
isWorking: globalThis.Ref<boolean, boolean>;
|
|
2509
2512
|
stopHostActions: () => Promise<void>;
|
|
@@ -2512,6 +2515,7 @@ export declare function useChatbotStore(agentId: string): Store<`chatbot-${strin
|
|
|
2512
2515
|
hostConfirmation: globalThis.ShallowRef<{
|
|
2513
2516
|
toolCallId: string;
|
|
2514
2517
|
question?: string;
|
|
2518
|
+
details?: HostToolConfirmation["details"];
|
|
2515
2519
|
answer: (approved: boolean) => void;
|
|
2516
2520
|
} | undefined>;
|
|
2517
2521
|
respondHostConfirmation: (approved: boolean) => void;
|
|
@@ -4410,6 +4414,7 @@ export declare function useChatbotStore(agentId: string): Store<`chatbot-${strin
|
|
|
4410
4414
|
} | undefined, {
|
|
4411
4415
|
title: string;
|
|
4412
4416
|
} | undefined>;
|
|
4417
|
+
hostStepTitles: globalThis.Ref<Record<string, string>, Record<string, string>>;
|
|
4413
4418
|
pageControlActive: globalThis.Ref<boolean, boolean>;
|
|
4414
4419
|
isWorking: globalThis.Ref<boolean, boolean>;
|
|
4415
4420
|
stopHostActions: () => Promise<void>;
|
|
@@ -4418,6 +4423,7 @@ export declare function useChatbotStore(agentId: string): Store<`chatbot-${strin
|
|
|
4418
4423
|
hostConfirmation: globalThis.ShallowRef<{
|
|
4419
4424
|
toolCallId: string;
|
|
4420
4425
|
question?: string;
|
|
4426
|
+
details?: HostToolConfirmation["details"];
|
|
4421
4427
|
answer: (approved: boolean) => void;
|
|
4422
4428
|
} | undefined>;
|
|
4423
4429
|
respondHostConfirmation: (approved: boolean) => void;
|
|
@@ -55,9 +55,18 @@ export declare const PageAccessCapabilitySchema: z.ZodObject<{
|
|
|
55
55
|
notice: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
56
56
|
}, z.core.$strip>;
|
|
57
57
|
export type PageAccessCapability = z.infer<typeof PageAccessCapabilitySchema>;
|
|
58
|
+
/**
|
|
59
|
+
* What a widget understands past `version` 1: an input the backend offers
|
|
60
|
+
* only to the widgets that declare it, so a page still on an older bundle
|
|
61
|
+
* (a tab open across a deploy, a cached embed) never gets a call it cannot
|
|
62
|
+
* run. `fill-fields`: `page_fill` writes several fields in one call.
|
|
63
|
+
*/
|
|
64
|
+
export declare const PAGE_TOOL_FEATURES: readonly ["fill-fields"];
|
|
65
|
+
export type PageToolFeature = (typeof PAGE_TOOL_FEATURES)[number];
|
|
58
66
|
/** What a request declares when the widget can run page tools. */
|
|
59
67
|
export declare const PageToolsRequestSchema: z.ZodObject<{
|
|
60
68
|
version: z.ZodLiteral<1>;
|
|
61
69
|
forms: z.ZodDefault<z.ZodArray<z.ZodUnknown>>;
|
|
70
|
+
features: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
62
71
|
}, z.core.$strip>;
|
|
63
72
|
export type PageToolsRequest = z.infer<typeof PageToolsRequestSchema>;
|