@8wave/ai-elements 0.121.0-beta.57 → 0.121.0-beta.59
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 +16 -1
- package/dist/_chunks/Agent-FDL4Wq0B.js.map +1 -1
- package/dist/ai-elements.es.js +3039 -2713
- 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/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-CZUFbLo7.js.map +1 -1
- package/dist-vue/_chunks/PkAvatar-DwtZWSW4.js +38 -0
- package/dist-vue/_chunks/PkAvatar-DwtZWSW4.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbot-BjD_4yaD.js → PkChatbot-DtyJG8HB.js} +7 -8
- package/dist-vue/_chunks/PkChatbot-DtyJG8HB.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotEmptyState-CMNmmQdu.js → PkChatbotEmptyState-CivaIYxu.js} +2 -3
- package/dist-vue/_chunks/PkChatbotEmptyState-CivaIYxu.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotInput-CdpjDIzr.js → PkChatbotInput-mBl1PWIU.js} +88 -88
- package/dist-vue/_chunks/PkChatbotInput-mBl1PWIU.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewChat-BqFY0Evp.js → PkChatbotViewChat-ZOpF5REL.js} +248 -243
- package/dist-vue/_chunks/PkChatbotViewChat-ZOpF5REL.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewConversations-DF_c4X6k.js → PkChatbotViewConversations-THKK5wGp.js} +52 -34
- package/dist-vue/_chunks/PkChatbotViewConversations-THKK5wGp.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewFiles-B76IwGGP.js → PkChatbotViewFiles-BOGd3r0o.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotViewFiles-B76IwGGP.js.map → PkChatbotViewFiles-BOGd3r0o.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewProfile-Bt0eH8fO.js → PkChatbotViewProfile-XtL9RfC7.js} +3 -4
- package/dist-vue/_chunks/PkChatbotViewProfile-XtL9RfC7.js.map +1 -0
- package/dist-vue/_chunks/{createChatbotApiClient-BYGLKd_e.js → createChatbotApiClient-Bt387Z64.js} +6 -5
- package/dist-vue/_chunks/createChatbotApiClient-Bt387Z64.js.map +1 -0
- package/dist-vue/_chunks/{useChatbotStore-O0u7mVit.js → useChatbotStore-pnj_3y4N.js} +718 -687
- package/dist-vue/_chunks/useChatbotStore-pnj_3y4N.js.map +1 -0
- package/dist-vue/_chunks/useDialogConfirm-fn7iV-iE.js +86 -0
- package/dist-vue/_chunks/useDialogConfirm-fn7iV-iE.js.map +1 -0
- package/dist-vue/api.js +1 -1
- package/dist-vue/apps/web-component/src/components/EmbeddedChatWidget.ce.d.ts +4 -4
- package/dist-vue/apps/web-component/src/composables/usePagePresence.d.ts +17 -0
- package/dist-vue/apps/web-component/src/composables/usePageTools.d.ts +4 -3
- package/dist-vue/apps/web-component/src/pageTools/index.d.ts +11 -1
- package/dist-vue/composables.js +14 -6
- package/dist-vue/composables.js.map +1 -1
- package/dist-vue/index.js +4252 -4009
- package/dist-vue/index.js.map +1 -1
- package/dist-vue/locales.js +24 -14
- package/dist-vue/packages/components/src/chat/PkAgentPresence.d.ts +34 -0
- package/dist-vue/packages/components/src/chat/PkAvatar.d.ts +6 -7
- package/dist-vue/packages/components/src/chat/PkChatSearchDialog.d.ts +19 -0
- package/dist-vue/packages/components/src/chat/{PkAgentSelectorInline.d.ts → PkChatShortcutsDialog.d.ts} +8 -5
- package/dist-vue/packages/components/src/chat/PkChatSidebar.d.ts +7 -8
- package/dist-vue/packages/components/src/chat/PkChatSidebarConversationItem.d.ts +2 -2
- package/dist-vue/packages/components/src/chat/PkChatbotInput.d.ts +4 -1
- package/dist-vue/packages/components/src/chat/PkWorkingAurora.d.ts +25 -0
- package/dist-vue/packages/components/src/chat/index.d.ts +1 -2
- package/dist-vue/packages/composable/src/chatbot/api/createChatbotApiClient.d.ts +11 -1
- package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +21 -3
- package/dist-vue/packages/composable/src/chatbot/useConversationActions.d.ts +54 -1
- package/dist-vue/packages/models/src/schema/Chat.d.ts +1 -0
- package/dist-vue/style.css +1 -1
- package/package.json +1 -1
- package/dist-vue/_chunks/PkAvatar-uVRs_DD9.js +0 -43
- package/dist-vue/_chunks/PkAvatar-uVRs_DD9.js.map +0 -1
- package/dist-vue/_chunks/PkChatbot-BjD_4yaD.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotEmptyState-CMNmmQdu.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotInput-CdpjDIzr.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotViewChat-BqFY0Evp.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotViewConversations-DF_c4X6k.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotViewProfile-Bt0eH8fO.js.map +0 -1
- package/dist-vue/_chunks/createChatbotApiClient-BYGLKd_e.js.map +0 -1
- package/dist-vue/_chunks/useChatbotStore-O0u7mVit.js.map +0 -1
- package/dist-vue/_chunks/useDialogConfirm-CyD9VTKg.js +0 -84
- package/dist-vue/_chunks/useDialogConfirm-CyD9VTKg.js.map +0 -1
package/dist-vue/locales.js
CHANGED
|
@@ -30,11 +30,15 @@ var e = {
|
|
|
30
30
|
view: "View",
|
|
31
31
|
editSchema: "Edit schema",
|
|
32
32
|
close: "Close",
|
|
33
|
+
toggleSidebar: "Open or close the sidebar",
|
|
34
|
+
focusMessage: "Go to the message field",
|
|
35
|
+
showShortcuts: "Show keyboard shortcuts",
|
|
33
36
|
closeSidebar: "Close sidebar",
|
|
34
|
-
|
|
37
|
+
resize: "Resize",
|
|
35
38
|
moreActions: "Actions",
|
|
36
39
|
renameChat: "Rename",
|
|
37
40
|
goBack: "Go back",
|
|
41
|
+
startNewChat: "Start a new chat",
|
|
38
42
|
viewRecentChats: "View recent chats",
|
|
39
43
|
enablePageAccess: "Turn page access back on",
|
|
40
44
|
disablePageAccess: "Turn off page access",
|
|
@@ -104,6 +108,7 @@ var e = {
|
|
|
104
108
|
invalidJson: "The input is not valid JSON",
|
|
105
109
|
loading: "Loading…",
|
|
106
110
|
defaultAgentWelcome: "Hello! How can I help you today?",
|
|
111
|
+
noResults: "No results",
|
|
107
112
|
noConversations: "No conversations found",
|
|
108
113
|
warning: "Warning",
|
|
109
114
|
reasoningAgent: "This is a reasoning agent. It is not designed to maintain the conversation history, each message is processed independently.",
|
|
@@ -137,7 +142,6 @@ var e = {
|
|
|
137
142
|
deleteMyConversationsConfirm: "This cannot be undone.",
|
|
138
143
|
noConversationsHint: "Start a new chat to see it appear here.",
|
|
139
144
|
noOptions: "No options",
|
|
140
|
-
noResults: "No results",
|
|
141
145
|
geolocationPermissionDenied: "Location access denied. Allow it in your browser settings.",
|
|
142
146
|
geolocationUnavailable: "Location unavailable. Try again or enter your location manually.",
|
|
143
147
|
contactFormRecordPrefilled: "The agent showed the contact form with these details. If the user sent it, the contact is in Contacts.",
|
|
@@ -310,6 +314,8 @@ var e = {
|
|
|
310
314
|
imageHost: "Host",
|
|
311
315
|
imageHostsHint: "Answers and cards load images by themselves only from these hosts and from the platform. An image from any other host shows its host and loads on a click, so an answer cannot send the conversation to a site through an image url.",
|
|
312
316
|
conversations: "Conversations",
|
|
317
|
+
newChat: "New chat",
|
|
318
|
+
keyboardShortcuts: "Keyboard shortcuts",
|
|
313
319
|
title: "Title",
|
|
314
320
|
answeringInBackground: "Answering",
|
|
315
321
|
profile: "Profile",
|
|
@@ -319,7 +325,6 @@ var e = {
|
|
|
319
325
|
rememberMe: "Remember me",
|
|
320
326
|
confirmPassword: "Confirm password",
|
|
321
327
|
or: "Or",
|
|
322
|
-
newChat: "New chat",
|
|
323
328
|
comment: "Comment",
|
|
324
329
|
file: "File",
|
|
325
330
|
message: "Message",
|
|
@@ -486,7 +491,7 @@ var e = {
|
|
|
486
491
|
widgetAppearanceGlass: "The site shows through the chat, blurred; on a phone it stays solid.",
|
|
487
492
|
widgetAppearanceSolid: "The chat has the theme's solid background.",
|
|
488
493
|
hideFloatingButton: "The chat opens only from a button on your site, which you add: it calls open() on the widget, see the README.",
|
|
489
|
-
workingGlow: "
|
|
494
|
+
workingGlow: "While the agent acts on the page, a light rises from the chat's corner. In the Copilot layout it runs along the site's edges instead, and along the chat's while the agent works.",
|
|
490
495
|
copilotPageCss: "Added to your site's page while the chat is open beside it: move a fixed header aside with right: var(--chatbot-copilot-width).",
|
|
491
496
|
customCss: "CSS injected into the widget shadow DOM. Allows styling the chat interface from the outside.",
|
|
492
497
|
greeting: "On the chat page, in large type above the message field until the user writes. Left empty, the suggested text shows. {'{'}name{'}'} becomes the user's name.",
|
|
@@ -540,19 +545,18 @@ var e = {
|
|
|
540
545
|
noHostToolsAllowed: "No tool allowed",
|
|
541
546
|
select: "Select",
|
|
542
547
|
noPageAccessExcludeSelectors: "No excluded area besides data-agent-ignore",
|
|
543
|
-
selectAgent: "Select an agent",
|
|
544
548
|
uploadFile: "Upload a file",
|
|
545
549
|
askAnything: "Type your message…",
|
|
546
550
|
noTrustedOrigins: "No trusted origins configured",
|
|
547
551
|
insertOrigin: "https://example.com",
|
|
548
552
|
noImageHosts: "No image hosts: images from other hosts wait for a click",
|
|
549
553
|
insertImageHost: "images.example.com",
|
|
550
|
-
search: "Search…",
|
|
551
554
|
comment: "Write your comment…",
|
|
552
555
|
enterYourQuestion: "Enter your question…",
|
|
553
556
|
name: "Enter name",
|
|
554
557
|
email: "Enter your email address",
|
|
555
|
-
phone: "Enter your phone number"
|
|
558
|
+
phone: "Enter your phone number",
|
|
559
|
+
search: "Search…"
|
|
556
560
|
},
|
|
557
561
|
agent: {
|
|
558
562
|
status: {
|
|
@@ -583,6 +587,7 @@ var e = {
|
|
|
583
587
|
normal: "Normal",
|
|
584
588
|
eager: "Eager"
|
|
585
589
|
},
|
|
590
|
+
nav: { searchChat: "Search a chat" },
|
|
586
591
|
userFiles: {
|
|
587
592
|
chatFilesTitle: "Files in this chat",
|
|
588
593
|
chatFilesEmpty: "No files uploaded in this chat.",
|
|
@@ -835,11 +840,15 @@ var e = {
|
|
|
835
840
|
view: "Visualizza",
|
|
836
841
|
editSchema: "Modifica schema",
|
|
837
842
|
close: "Chiudi",
|
|
843
|
+
toggleSidebar: "Apri o chiudi la sidebar",
|
|
844
|
+
focusMessage: "Vai al campo del messaggio",
|
|
845
|
+
showShortcuts: "Mostra le scorciatoie da tastiera",
|
|
838
846
|
closeSidebar: "Chiudi la sidebar",
|
|
839
|
-
|
|
847
|
+
resize: "Ridimensiona",
|
|
840
848
|
moreActions: "Azioni",
|
|
841
849
|
renameChat: "Rinomina",
|
|
842
850
|
goBack: "Indietro",
|
|
851
|
+
startNewChat: "Inizia una nuova chat",
|
|
843
852
|
viewRecentChats: "Visualizza chat recenti",
|
|
844
853
|
enablePageAccess: "Riattiva l'accesso alla pagina",
|
|
845
854
|
disablePageAccess: "Spegni l'accesso alla pagina",
|
|
@@ -909,6 +918,7 @@ var e = {
|
|
|
909
918
|
invalidJson: "L'input non è un JSON valido",
|
|
910
919
|
loading: "Caricamento…",
|
|
911
920
|
defaultAgentWelcome: "Ciao! Come posso aiutarti oggi?",
|
|
921
|
+
noResults: "Nessun risultato trovato",
|
|
912
922
|
noConversations: "Nessuna conversazione trovata",
|
|
913
923
|
warning: "Attenzione",
|
|
914
924
|
reasoningAgent: "Questo è un agente di ragionamento. Non è progettato per mantenere la storia della conversazione, ogni messaggio è processato indipendentemente.",
|
|
@@ -942,7 +952,6 @@ var e = {
|
|
|
942
952
|
deleteMyConversationsConfirm: "Non si può annullare.",
|
|
943
953
|
noConversationsHint: "Inizia una nuova chat per vederla comparire qui.",
|
|
944
954
|
noOptions: "Nessun elemento",
|
|
945
|
-
noResults: "Nessun risultato trovato",
|
|
946
955
|
geolocationPermissionDenied: "Accesso alla posizione negato. Consentilo nelle impostazioni del browser.",
|
|
947
956
|
geolocationUnavailable: "Posizione non disponibile. Riprova o inserisci la posizione manualmente.",
|
|
948
957
|
contactFormRecordPrefilled: "L'agente ha mostrato il modulo di contatto con questi dati. Se l'utente l'ha inviato, il contatto è in Contatti.",
|
|
@@ -1115,6 +1124,8 @@ var e = {
|
|
|
1115
1124
|
imageHost: "Host",
|
|
1116
1125
|
imageHostsHint: "Risposte e card caricano da sole solo le immagini di questi host e della piattaforma. Un'immagine di un altro host mostra il suo host e si carica con un clic, così una risposta non può mandare la conversazione a un sito dentro l'url di un'immagine.",
|
|
1117
1126
|
conversations: "Conversazioni",
|
|
1127
|
+
newChat: "Nuova chat",
|
|
1128
|
+
keyboardShortcuts: "Scorciatoie da tastiera",
|
|
1118
1129
|
title: "Titolo",
|
|
1119
1130
|
answeringInBackground: "Sta rispondendo",
|
|
1120
1131
|
profile: "Profilo",
|
|
@@ -1124,7 +1135,6 @@ var e = {
|
|
|
1124
1135
|
rememberMe: "Ricordami",
|
|
1125
1136
|
confirmPassword: "Conferma password",
|
|
1126
1137
|
or: "Oppure",
|
|
1127
|
-
newChat: "Nuova chat",
|
|
1128
1138
|
comment: "Commento",
|
|
1129
1139
|
file: "File",
|
|
1130
1140
|
message: "Messaggio",
|
|
@@ -1291,7 +1301,7 @@ var e = {
|
|
|
1291
1301
|
widgetAppearanceGlass: "Il sito si vede sfocato dietro la chat; sul telefono resta piena.",
|
|
1292
1302
|
widgetAppearanceSolid: "La chat ha lo sfondo pieno del tema.",
|
|
1293
1303
|
hideFloatingButton: "La chat si apre solo da un pulsante del sito, che va aggiunto: chiama open() sul widget, vedi il README.",
|
|
1294
|
-
workingGlow: "
|
|
1304
|
+
workingGlow: "Mentre l'agente agisce sulla pagina, una luce sale dall'angolo della chat. Nel layout Copilot percorre invece il bordo del sito, e quello della chat mentre l'agente lavora.",
|
|
1295
1305
|
copilotPageCss: "Aggiunto alla pagina del sito mentre la chat è aperta accanto: sposta un'intestazione fissa con right: var(--chatbot-copilot-width).",
|
|
1296
1306
|
customCss: "CSS iniettato nello shadow DOM del widget. Permette di personalizzare l'interfaccia della chat dall'esterno.",
|
|
1297
1307
|
greeting: "Nella pagina della chat, in grande sopra il campo del messaggio finché l'utente non scrive. Se è vuoto si vede il testo suggerito. {'{'}name{'}'} diventa il nome dell'utente.",
|
|
@@ -1345,19 +1355,18 @@ var e = {
|
|
|
1345
1355
|
noHostToolsAllowed: "Nessun tool ammesso",
|
|
1346
1356
|
select: "Seleziona",
|
|
1347
1357
|
noPageAccessExcludeSelectors: "Nessuna zona esclusa oltre a data-agent-ignore",
|
|
1348
|
-
selectAgent: "Seleziona un agente",
|
|
1349
1358
|
uploadFile: "Carica un file",
|
|
1350
1359
|
askAnything: "Scrivi la tua domanda…",
|
|
1351
1360
|
noTrustedOrigins: "Nessuna origine attendibile configurata",
|
|
1352
1361
|
insertOrigin: "https://example.com",
|
|
1353
1362
|
noImageHosts: "Nessun host: le immagini degli altri host aspettano un clic",
|
|
1354
1363
|
insertImageHost: "images.example.com",
|
|
1355
|
-
search: "Cerca…",
|
|
1356
1364
|
comment: "Scrivi il tuo commento…",
|
|
1357
1365
|
enterYourQuestion: "Inserisci la tua domanda…",
|
|
1358
1366
|
name: "Inserisci il nome",
|
|
1359
1367
|
email: "Inserisci l'indirizzo email",
|
|
1360
|
-
phone: "Inserisci il numero di telefono"
|
|
1368
|
+
phone: "Inserisci il numero di telefono",
|
|
1369
|
+
search: "Cerca…"
|
|
1361
1370
|
},
|
|
1362
1371
|
agent: {
|
|
1363
1372
|
status: {
|
|
@@ -1388,6 +1397,7 @@ var e = {
|
|
|
1388
1397
|
normal: "Normale",
|
|
1389
1398
|
eager: "Pronto"
|
|
1390
1399
|
},
|
|
1400
|
+
nav: { searchChat: "Cerca una chat" },
|
|
1391
1401
|
userFiles: {
|
|
1392
1402
|
chatFilesTitle: "File in questa chat",
|
|
1393
1403
|
chatFilesEmpty: "Nessun file caricato in questa chat.",
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* The agent on the page as a collaborator, while it acts on it (spec
|
|
4
|
+
* `page-tools-improvements.md`, M12): a cursor in its color with its name
|
|
5
|
+
* and the name of what it acts on, as in a shared editor, and a ring on
|
|
6
|
+
* that element, drawn as the system draws keyboard focus. The cursor
|
|
7
|
+
* leaves the chat, glides to the element and clicks; the ring settles
|
|
8
|
+
* there and follows the agent to the next element. A layer of its own
|
|
9
|
+
* over the page, its dialogs too, letting every click through.
|
|
10
|
+
* Decoration only, hidden from assistive technology: the chat says what
|
|
11
|
+
* the agent does.
|
|
12
|
+
*/
|
|
13
|
+
type __VLS_Props = {
|
|
14
|
+
/** Shown while true: the agent controls the page. */
|
|
15
|
+
active: boolean;
|
|
16
|
+
/** The element the agent acts on, and its name; the last one between two actions. */
|
|
17
|
+
target?: {
|
|
18
|
+
element: Element;
|
|
19
|
+
name: string;
|
|
20
|
+
};
|
|
21
|
+
/** The agent's name, beside the cursor. */
|
|
22
|
+
agentName?: string;
|
|
23
|
+
/** The chat, where the cursor comes from and goes back to. */
|
|
24
|
+
home?: () => Element | null | undefined;
|
|
25
|
+
/** A dialog of the page the layer stays above: it opens over everything shown before it. */
|
|
26
|
+
above?: Element | null;
|
|
27
|
+
};
|
|
28
|
+
declare const __VLS_export: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
29
|
+
arrived: (clicked: boolean) => any;
|
|
30
|
+
}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
31
|
+
onArrived?: ((clicked: boolean) => any) | undefined;
|
|
32
|
+
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
33
|
+
declare const _default: typeof __VLS_export;
|
|
34
|
+
export default _default;
|
|
@@ -1,23 +1,22 @@
|
|
|
1
1
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Every avatar is a tile, a rounded square with its own colors: a person,
|
|
4
|
+
* an organization and an agent alike (DESIGN.md, principle 13). `modifiers`
|
|
5
|
+
* carries a size (`md`, `lg`) or `word`, the dark ground that marks the
|
|
6
|
+
* signed-in user; the tile paints every other ground itself.
|
|
7
|
+
*/
|
|
2
8
|
type __VLS_Props = {
|
|
3
9
|
name?: string;
|
|
4
10
|
imgSrc?: string | null;
|
|
5
11
|
modifiers?: string;
|
|
6
12
|
/** Shown when there is no image (or it is broken) and no name. */
|
|
7
13
|
fallbackIcon?: string;
|
|
8
|
-
/**
|
|
9
|
-
* A person is a circle; an organization or an agent is a tile, a
|
|
10
|
-
* rounded square with its own colors, which ignores `modifiers`
|
|
11
|
-
* (DESIGN.md, switcher menus).
|
|
12
|
-
*/
|
|
13
|
-
shape?: 'circle' | 'tile';
|
|
14
14
|
};
|
|
15
15
|
declare const __VLS_export: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
16
16
|
modifiers: string;
|
|
17
17
|
name: string;
|
|
18
18
|
fallbackIcon: string;
|
|
19
19
|
imgSrc: string | null;
|
|
20
|
-
shape: "circle" | "tile";
|
|
21
20
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
22
21
|
declare const _default: typeof __VLS_export;
|
|
23
22
|
export default _default;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
agentId: string;
|
|
4
|
+
};
|
|
5
|
+
type __VLS_ModelProps = {
|
|
6
|
+
modelValue?: boolean;
|
|
7
|
+
};
|
|
8
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
9
|
+
declare const __VLS_export: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
10
|
+
"update:modelValue": (value: boolean) => any;
|
|
11
|
+
select: (chatId: string) => any;
|
|
12
|
+
"new-chat": () => any;
|
|
13
|
+
}, string, PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
14
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
15
|
+
onSelect?: ((chatId: string) => any) | undefined;
|
|
16
|
+
"onNew-chat"?: (() => any) | undefined;
|
|
17
|
+
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
declare const _default: typeof __VLS_export;
|
|
19
|
+
export default _default;
|
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
import { AgentPublic } from '../../../models/src';
|
|
2
1
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
2
|
type __VLS_Props = {
|
|
4
|
-
|
|
3
|
+
/** One row per shortcut: what it does, then its keys in order */
|
|
4
|
+
shortcuts: {
|
|
5
|
+
label: string;
|
|
6
|
+
keys: string[];
|
|
7
|
+
}[];
|
|
5
8
|
};
|
|
6
9
|
type __VLS_ModelProps = {
|
|
7
|
-
modelValue?:
|
|
10
|
+
modelValue?: boolean;
|
|
8
11
|
};
|
|
9
12
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
10
13
|
declare const __VLS_export: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
11
|
-
"update:modelValue": (value:
|
|
14
|
+
"update:modelValue": (value: boolean) => any;
|
|
12
15
|
}, string, PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
13
|
-
"onUpdate:modelValue"?: ((value:
|
|
16
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
14
17
|
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
15
18
|
declare const _default: typeof __VLS_export;
|
|
16
19
|
export default _default;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import { AgentPublic } from '../../../models/src';
|
|
2
1
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
2
|
type __VLS_Props = {
|
|
4
3
|
agentId: string;
|
|
5
|
-
/** Public agents of the organization, shown in the agent selector */
|
|
6
|
-
agents?: AgentPublic[];
|
|
7
4
|
/** Organization branding, shown at the top */
|
|
8
5
|
organizationName?: string;
|
|
9
6
|
organizationLogo?: string | null;
|
|
@@ -17,19 +14,21 @@ type __VLS_ModelProps = {
|
|
|
17
14
|
'collapsed'?: boolean;
|
|
18
15
|
};
|
|
19
16
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
20
|
-
declare var
|
|
17
|
+
declare var __VLS_26: {}, __VLS_33: {}, __VLS_48: {
|
|
18
|
+
openShortcuts: (() => void) | undefined;
|
|
19
|
+
};
|
|
21
20
|
type __VLS_Slots = {} & {
|
|
22
|
-
|
|
21
|
+
agent?: (props: typeof __VLS_26) => any;
|
|
22
|
+
} & {
|
|
23
|
+
'actions-extra'?: (props: typeof __VLS_33) => any;
|
|
23
24
|
} & {
|
|
24
|
-
footer?: (props: typeof
|
|
25
|
+
footer?: (props: typeof __VLS_48) => any;
|
|
25
26
|
};
|
|
26
27
|
declare const __VLS_base: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
27
28
|
"update:collapsed": (value: boolean) => any;
|
|
28
|
-
"select-agent": (agentId: string) => any;
|
|
29
29
|
"view-files": (chatId: string) => any;
|
|
30
30
|
}, string, PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
31
31
|
"onUpdate:collapsed"?: ((value: boolean) => any) | undefined;
|
|
32
|
-
"onSelect-agent"?: ((agentId: string) => any) | undefined;
|
|
33
32
|
"onView-files"?: ((chatId: string) => any) | undefined;
|
|
34
33
|
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
35
34
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -17,8 +17,8 @@ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
|
17
17
|
declare const __VLS_export: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
18
18
|
files: () => any;
|
|
19
19
|
delete: () => any;
|
|
20
|
-
"update:editingTitle": (value: string) => any;
|
|
21
20
|
select: () => any;
|
|
21
|
+
"update:editingTitle": (value: string) => any;
|
|
22
22
|
"edit-start": () => any;
|
|
23
23
|
"edit-confirm": () => any;
|
|
24
24
|
"edit-cancel": () => any;
|
|
@@ -26,8 +26,8 @@ declare const __VLS_export: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, C
|
|
|
26
26
|
}, string, PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
27
27
|
onFiles?: (() => any) | undefined;
|
|
28
28
|
onDelete?: (() => any) | undefined;
|
|
29
|
-
"onUpdate:editingTitle"?: ((value: string) => any) | undefined;
|
|
30
29
|
onSelect?: (() => any) | undefined;
|
|
30
|
+
"onUpdate:editingTitle"?: ((value: string) => any) | undefined;
|
|
31
31
|
"onEdit-start"?: (() => any) | undefined;
|
|
32
32
|
"onEdit-confirm"?: (() => any) | undefined;
|
|
33
33
|
"onEdit-cancel"?: (() => any) | undefined;
|
|
@@ -38,7 +38,10 @@ type __VLS_Slots = {} & {
|
|
|
38
38
|
} & {
|
|
39
39
|
'additional-actions'?: (props: typeof __VLS_73) => any;
|
|
40
40
|
};
|
|
41
|
-
declare const __VLS_base: DefineComponent<__VLS_PublicProps, {
|
|
41
|
+
declare const __VLS_base: DefineComponent<__VLS_PublicProps, {
|
|
42
|
+
/** Move the focus to the message field */
|
|
43
|
+
focus: () => void | undefined;
|
|
44
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
42
45
|
"update:modelValue": (value: string | undefined) => any;
|
|
43
46
|
submit: () => any;
|
|
44
47
|
"update:pendingAttachments": (value: PendingAttachment[]) => any;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* A light in the window's corner where the chat sits, while the agent
|
|
4
|
+
* acts on the page (spec `page-tools-improvements.md`, M12): a small
|
|
5
|
+
* bright light is born in that corner and grows into an aurora that
|
|
6
|
+
* sways and breathes while the agent works, glints at each of its
|
|
7
|
+
* clicks, and draws back into the corner when it lets go. The parent
|
|
8
|
+
* gives it a positioned box as large as the window. Decoration only,
|
|
9
|
+
* hidden from assistive technology: the chat already says what the
|
|
10
|
+
* agent is doing.
|
|
11
|
+
*/
|
|
12
|
+
type __VLS_Props = {
|
|
13
|
+
/** Shown while true, growing in and drawing back out. */
|
|
14
|
+
active: boolean;
|
|
15
|
+
/** The corner it grows from: the chat's side. */
|
|
16
|
+
side?: 'left' | 'right';
|
|
17
|
+
/** Each new value is a click of the agent on the page: a glint from the corner. */
|
|
18
|
+
pulse?: number;
|
|
19
|
+
};
|
|
20
|
+
declare const __VLS_export: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
21
|
+
side: "left" | "right";
|
|
22
|
+
pulse: number;
|
|
23
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
24
|
+
declare const _default: typeof __VLS_export;
|
|
25
|
+
export default _default;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { default as PkAgentSelectorInline } from './PkAgentSelectorInline';
|
|
2
1
|
import { default as PkAgentSettingsPanel } from './PkAgentSettingsPanel';
|
|
3
2
|
import { default as PkAuroraCanvas } from './PkAuroraCanvas';
|
|
4
3
|
import { default as PkAvatar } from './PkAvatar';
|
|
@@ -58,4 +57,4 @@ export { MODEL_CATALOG_KEY, provideModelCatalog, useModelCatalogEntry, } from '.
|
|
|
58
57
|
export { isMcpOAuthReport } from './mcpOAuthReport';
|
|
59
58
|
export { provideChatImagePolicy } from './chatImagePolicy';
|
|
60
59
|
export { localizeSummaryLabels } from './utils';
|
|
61
|
-
export {
|
|
60
|
+
export { PkAgentSettingsPanel, PkAuroraCanvas, PkAvatar, PkChatSidebar, PkChatSidebarConversationItem, PkChatbot, PkChatbotEmptyState, PkChatbotError, PkChatbotFeedbackForm, PkChatbotFilePreview, PkChatbotInput, PkChatbotMessages, PkChatbotSteps, PkChatbotStepToolDetail, PkChatbotStepPayload, PkChatbotViewChat, PkChunkPreview, PkChatbotViewConversations, PkChatbotViewProfile, PkCode, PkCopyBlock, PkDocumentHeader, PkLanguageModel, PkLanguageModelCombobox, PkModelOption, PkMessageParts, PkMessageDetail, PkStreamingMarkdown, PkStreamingMarkdownAutoscroll, PkToolShowForm, PkToolShowArtifact, PkToolApprovalBadge, PkToolShowEmail, PkToolShowMessage, PkToolShowWebPages, PkToolShowProductList, PkToolShowContactForm, PkToolShowCalendarEvent, PkToolShowComparison, PkToolShowLocation, PkToolShowQrCode, PkToolShowImageGallery, PkToolShowSuggestedReply, PkToolShowSources, PkToolShareDocument, PkRetryCountdown, PkReasoningChat, PkReasoningSettings, PkWebSearchSettings, PkWelcomePopup, PkChatbotAuth, PkVoiceSession, PkVoiceOrb, PkChatButton, PkWorkingBeam, };
|
|
@@ -33,8 +33,18 @@ export interface ChatbotFile {
|
|
|
33
33
|
indexStatus: string;
|
|
34
34
|
createdAt: string;
|
|
35
35
|
}
|
|
36
|
+
/** The chats a page of the conversation list holds */
|
|
37
|
+
export declare const CONVERSATIONS_PAGE_SIZE = 100;
|
|
36
38
|
export interface ChatbotApiClient {
|
|
37
|
-
|
|
39
|
+
/**
|
|
40
|
+
* A page of the user's chats with the agent, newest first. `search`
|
|
41
|
+
* matches the title (the summary without one) on the server, so it finds
|
|
42
|
+
* the chats beyond the pages already loaded.
|
|
43
|
+
*/
|
|
44
|
+
getConversations(agentId: string, userId: string | undefined, options?: {
|
|
45
|
+
page?: number;
|
|
46
|
+
search?: string;
|
|
47
|
+
}): Promise<Chat[]>;
|
|
38
48
|
getChat(agentId: string, chatId: string): Promise<Chat | null>;
|
|
39
49
|
/** The wakeup still waiting in a chat (spec agent-wakeup). */
|
|
40
50
|
getChatWakeup(agentId: string, chatId: string): Promise<ChatWakeupState>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FileUIPart, ChatStatus, ChatRequestOptions, ChatAddToolOutputFunction, ChatAddToolApproveResponseFunction, ProviderMetadata, LanguageModelUsage } from 'ai';
|
|
2
|
-
import { PageAccessLevel, ChatMessageActions, UIChatMessage, AgentWidgetLayout, AgentWidgetAppearance, AgentLoaderStrategy, StoragePolicy, AgentSearchMode, AgentBuiltInTool, WebSearchProvider, UIChatMessageMetadata, PlatformType, ToolGroupKind, BlockedReasonCode, ConversationAnalysisTrigger, Sentiment, SentimentTrend, UserTone, AbuseCategory, LlmIssueCategory, UserEngagement, AbuseConfidence, UserFileKind } from '../../../models/src';
|
|
2
|
+
import { PageAccessLevel, Chat as ChatRecord, ChatMessageActions, UIChatMessage, AgentWidgetLayout, AgentWidgetAppearance, AgentLoaderStrategy, StoragePolicy, AgentSearchMode, AgentBuiltInTool, WebSearchProvider, UIChatMessageMetadata, PlatformType, ToolGroupKind, BlockedReasonCode, ConversationAnalysisTrigger, Sentiment, SentimentTrend, UserTone, AbuseCategory, LlmIssueCategory, UserEngagement, AbuseConfidence, UserFileKind } from '../../../models/src';
|
|
3
3
|
import { HostToolConfirmation, RegisteredHostTool } from './hostTools';
|
|
4
4
|
import { ChatbotFile } from './api';
|
|
5
5
|
import { PendingAttachment } from './types';
|
|
@@ -1734,6 +1734,8 @@ export declare function useChatbotStore(agentId: string): Store<`chatbot-${strin
|
|
|
1734
1734
|
turnInProgress?: boolean | undefined;
|
|
1735
1735
|
}[]>;
|
|
1736
1736
|
isLoadingConversations: globalThis.Ref<boolean, boolean>;
|
|
1737
|
+
hasMoreConversations: globalThis.Ref<boolean, boolean>;
|
|
1738
|
+
isLoadingMoreConversations: globalThis.Ref<boolean, boolean>;
|
|
1737
1739
|
chatFiles: globalThis.Ref<{
|
|
1738
1740
|
documentId: string;
|
|
1739
1741
|
kind: UserFileKind;
|
|
@@ -1863,6 +1865,7 @@ export declare function useChatbotStore(agentId: string): Store<`chatbot-${strin
|
|
|
1863
1865
|
removeQueuedMessage: (index: number) => void;
|
|
1864
1866
|
editQueuedMessage: (index: number) => void;
|
|
1865
1867
|
activeView: globalThis.Ref<ChatbotView, ChatbotView>;
|
|
1868
|
+
inputFocusRequest: globalThis.Ref<number, number>;
|
|
1866
1869
|
messageFeedbacks: globalThis.Ref<{
|
|
1867
1870
|
messageId: string;
|
|
1868
1871
|
chatId: string;
|
|
@@ -1943,6 +1946,8 @@ export declare function useChatbotStore(agentId: string): Store<`chatbot-${strin
|
|
|
1943
1946
|
};
|
|
1944
1947
|
initialize: (id: string, chatId: string) => Promise<void>;
|
|
1945
1948
|
loadConversations: (id: string) => Promise<void>;
|
|
1949
|
+
loadMoreConversations: () => Promise<void>;
|
|
1950
|
+
searchConversations: (search: string) => Promise<ChatRecord[]>;
|
|
1946
1951
|
loadChatFiles: () => Promise<void>;
|
|
1947
1952
|
refreshMessages: () => Promise<"pending" | "caught-up" | "indeterminate">;
|
|
1948
1953
|
appendMessage: (message: UIChatMessage) => void;
|
|
@@ -1975,9 +1980,10 @@ export declare function useChatbotStore(agentId: string): Store<`chatbot-${strin
|
|
|
1975
1980
|
onFeedbackSubmit: (comment: string) => Promise<void>;
|
|
1976
1981
|
onLeadSubmit: (data: Record<string, unknown>) => Promise<void>;
|
|
1977
1982
|
navigate: (view: ChatbotView) => void;
|
|
1983
|
+
focusInput: () => void;
|
|
1978
1984
|
renameChatTitle: (chatId: string, title: string) => Promise<void>;
|
|
1979
1985
|
deleteChat: (chatId: string) => Promise<void>;
|
|
1980
|
-
}, "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<{
|
|
1986
|
+
}, "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" | "hasMoreConversations" | "isLoadingMoreConversations" | "chatFiles" | "isLoadingChatFiles" | "pendingAttachments" | "fileLimitError" | "isConversationBlocked" | "chatError" | "activeView" | "inputFocusRequest" | "messageFeedbacks" | "feedbackDialogMessage" | "isFeedbackSubmitting" | "isFeedbackSubmitted" | "feedbackSubmitError" | "isLeadSubmitted" | "isLoadingSubmitLead" | "submitLeadError">, Pick<{
|
|
1981
1987
|
apiClient: globalThis.ComputedRef< ChatbotApiClient>;
|
|
1982
1988
|
baseUrl: globalThis.Ref<string, string>;
|
|
1983
1989
|
basePath: globalThis.Ref<string | undefined, string | undefined>;
|
|
@@ -3671,6 +3677,8 @@ export declare function useChatbotStore(agentId: string): Store<`chatbot-${strin
|
|
|
3671
3677
|
turnInProgress?: boolean | undefined;
|
|
3672
3678
|
}[]>;
|
|
3673
3679
|
isLoadingConversations: globalThis.Ref<boolean, boolean>;
|
|
3680
|
+
hasMoreConversations: globalThis.Ref<boolean, boolean>;
|
|
3681
|
+
isLoadingMoreConversations: globalThis.Ref<boolean, boolean>;
|
|
3674
3682
|
chatFiles: globalThis.Ref<{
|
|
3675
3683
|
documentId: string;
|
|
3676
3684
|
kind: UserFileKind;
|
|
@@ -3800,6 +3808,7 @@ export declare function useChatbotStore(agentId: string): Store<`chatbot-${strin
|
|
|
3800
3808
|
removeQueuedMessage: (index: number) => void;
|
|
3801
3809
|
editQueuedMessage: (index: number) => void;
|
|
3802
3810
|
activeView: globalThis.Ref<ChatbotView, ChatbotView>;
|
|
3811
|
+
inputFocusRequest: globalThis.Ref<number, number>;
|
|
3803
3812
|
messageFeedbacks: globalThis.Ref<{
|
|
3804
3813
|
messageId: string;
|
|
3805
3814
|
chatId: string;
|
|
@@ -3880,6 +3889,8 @@ export declare function useChatbotStore(agentId: string): Store<`chatbot-${strin
|
|
|
3880
3889
|
};
|
|
3881
3890
|
initialize: (id: string, chatId: string) => Promise<void>;
|
|
3882
3891
|
loadConversations: (id: string) => Promise<void>;
|
|
3892
|
+
loadMoreConversations: () => Promise<void>;
|
|
3893
|
+
searchConversations: (search: string) => Promise<ChatRecord[]>;
|
|
3883
3894
|
loadChatFiles: () => Promise<void>;
|
|
3884
3895
|
refreshMessages: () => Promise<"pending" | "caught-up" | "indeterminate">;
|
|
3885
3896
|
appendMessage: (message: UIChatMessage) => void;
|
|
@@ -3912,6 +3923,7 @@ export declare function useChatbotStore(agentId: string): Store<`chatbot-${strin
|
|
|
3912
3923
|
onFeedbackSubmit: (comment: string) => Promise<void>;
|
|
3913
3924
|
onLeadSubmit: (data: Record<string, unknown>) => Promise<void>;
|
|
3914
3925
|
navigate: (view: ChatbotView) => void;
|
|
3926
|
+
focusInput: () => void;
|
|
3915
3927
|
renameChatTitle: (chatId: string, title: string) => Promise<void>;
|
|
3916
3928
|
deleteChat: (chatId: string) => Promise<void>;
|
|
3917
3929
|
}, "messages" | "chat" | "actions" | "apiClient" | "pageNoticeLevel" | "pageAccessAvailable" | "isDark" | "isAttachmentLimitReached" | "localChatId" | "inputMessagePlaceholder" | "runningChatIds" | "backgroundAnswers" | "canQueue" | "queuedMessages">, Pick<{
|
|
@@ -5608,6 +5620,8 @@ export declare function useChatbotStore(agentId: string): Store<`chatbot-${strin
|
|
|
5608
5620
|
turnInProgress?: boolean | undefined;
|
|
5609
5621
|
}[]>;
|
|
5610
5622
|
isLoadingConversations: globalThis.Ref<boolean, boolean>;
|
|
5623
|
+
hasMoreConversations: globalThis.Ref<boolean, boolean>;
|
|
5624
|
+
isLoadingMoreConversations: globalThis.Ref<boolean, boolean>;
|
|
5611
5625
|
chatFiles: globalThis.Ref<{
|
|
5612
5626
|
documentId: string;
|
|
5613
5627
|
kind: UserFileKind;
|
|
@@ -5737,6 +5751,7 @@ export declare function useChatbotStore(agentId: string): Store<`chatbot-${strin
|
|
|
5737
5751
|
removeQueuedMessage: (index: number) => void;
|
|
5738
5752
|
editQueuedMessage: (index: number) => void;
|
|
5739
5753
|
activeView: globalThis.Ref<ChatbotView, ChatbotView>;
|
|
5754
|
+
inputFocusRequest: globalThis.Ref<number, number>;
|
|
5740
5755
|
messageFeedbacks: globalThis.Ref<{
|
|
5741
5756
|
messageId: string;
|
|
5742
5757
|
chatId: string;
|
|
@@ -5817,6 +5832,8 @@ export declare function useChatbotStore(agentId: string): Store<`chatbot-${strin
|
|
|
5817
5832
|
};
|
|
5818
5833
|
initialize: (id: string, chatId: string) => Promise<void>;
|
|
5819
5834
|
loadConversations: (id: string) => Promise<void>;
|
|
5835
|
+
loadMoreConversations: () => Promise<void>;
|
|
5836
|
+
searchConversations: (search: string) => Promise<ChatRecord[]>;
|
|
5820
5837
|
loadChatFiles: () => Promise<void>;
|
|
5821
5838
|
refreshMessages: () => Promise<"pending" | "caught-up" | "indeterminate">;
|
|
5822
5839
|
appendMessage: (message: UIChatMessage) => void;
|
|
@@ -5849,6 +5866,7 @@ export declare function useChatbotStore(agentId: string): Store<`chatbot-${strin
|
|
|
5849
5866
|
onFeedbackSubmit: (comment: string) => Promise<void>;
|
|
5850
5867
|
onLeadSubmit: (data: Record<string, unknown>) => Promise<void>;
|
|
5851
5868
|
navigate: (view: ChatbotView) => void;
|
|
5869
|
+
focusInput: () => void;
|
|
5852
5870
|
renameChatTitle: (chatId: string, title: string) => Promise<void>;
|
|
5853
5871
|
deleteChat: (chatId: string) => Promise<void>;
|
|
5854
|
-
}, "regenerate" | "sendMessage" | "addToolOutput" | "addToolApprovalResponse" | "stopHostActions" | "closePageNotice" | "respondHostConfirmation" | "setPageAccessOff" | "openBackgroundAnswer" | "dismissBackgroundAnswer" | "removeQueuedMessage" | "editQueuedMessage" | "buildDeviceContext" | "initialize" | "loadConversations" | "loadChatFiles" | "refreshMessages" | "appendMessage" | "getChatFileUrl" | "getChatFilePreviewUrl" | "deleteChatFile" | "handleSubmit" | "stopGeneration" | "startNewChat" | "handleFileSelect" | "clearFileLimitError" | "clearPendingAttachments" | "onUpvote" | "onDownvote" | "onFeedback" | "onFeedbackSubmit" | "onLeadSubmit" | "navigate" | "renameChatTitle" | "deleteChat">>;
|
|
5872
|
+
}, "regenerate" | "sendMessage" | "addToolOutput" | "addToolApprovalResponse" | "stopHostActions" | "closePageNotice" | "respondHostConfirmation" | "setPageAccessOff" | "openBackgroundAnswer" | "dismissBackgroundAnswer" | "removeQueuedMessage" | "editQueuedMessage" | "buildDeviceContext" | "initialize" | "loadConversations" | "loadMoreConversations" | "searchConversations" | "loadChatFiles" | "refreshMessages" | "appendMessage" | "getChatFileUrl" | "getChatFilePreviewUrl" | "deleteChatFile" | "handleSubmit" | "stopGeneration" | "startNewChat" | "handleFileSelect" | "clearFileLimitError" | "clearPendingAttachments" | "onUpvote" | "onDownvote" | "onFeedback" | "onFeedbackSubmit" | "onLeadSubmit" | "navigate" | "focusInput" | "renameChatTitle" | "deleteChat">>;
|
|
@@ -1,9 +1,62 @@
|
|
|
1
|
-
import { Chat as Conversation } from '../../../models/src';
|
|
1
|
+
import { Chat as Conversation, UIChatMessage, BlockedReasonCode, ConversationAnalysisTrigger, Sentiment, SentimentTrend, UserTone, AbuseCategory, LlmIssueCategory, UserEngagement, AbuseConfidence } from '../../../models/src';
|
|
2
|
+
import { LanguageModelUsage } from 'ai';
|
|
2
3
|
/**
|
|
3
4
|
* Single-line preview for a conversation: explicit title, otherwise the
|
|
4
5
|
* first user message. Used as list label and as search haystack.
|
|
5
6
|
*/
|
|
6
7
|
export declare function getConversationPreview(conversation: Conversation): string;
|
|
8
|
+
/**
|
|
9
|
+
* Date sections of the conversation lists (PkChatSidebar,
|
|
10
|
+
* PkChatSearchDialog), newest first: today, yesterday, the last 7 and 30
|
|
11
|
+
* days, older. Keeps the order of the input and drops the empty sections.
|
|
12
|
+
*/
|
|
13
|
+
export declare function groupConversationsByDate(conversations: Conversation[]): {
|
|
14
|
+
key: "today" | "yesterday" | "last7Days" | "last30Days" | "older";
|
|
15
|
+
items: {
|
|
16
|
+
id: string;
|
|
17
|
+
messages: UIChatMessage[];
|
|
18
|
+
title: string | null;
|
|
19
|
+
summary: string | null;
|
|
20
|
+
messageCountAtLastSummary: string | null;
|
|
21
|
+
createdAt: Date;
|
|
22
|
+
updatedAt: Date;
|
|
23
|
+
metadata: Record<string, unknown>;
|
|
24
|
+
totalCostInUSD: string;
|
|
25
|
+
usage: LanguageModelUsage;
|
|
26
|
+
agentId: string | null;
|
|
27
|
+
userId: string;
|
|
28
|
+
organizationId: string;
|
|
29
|
+
deleted: boolean;
|
|
30
|
+
deletedAt: Date | null;
|
|
31
|
+
deletedBy: string | null;
|
|
32
|
+
blocked: boolean;
|
|
33
|
+
blockedAt: Date | null;
|
|
34
|
+
blockedReasonCode: BlockedReasonCode | null;
|
|
35
|
+
blockedReason: string | null;
|
|
36
|
+
warningCount: number;
|
|
37
|
+
lastMessageAt: Date;
|
|
38
|
+
conversationAnalysis?: {
|
|
39
|
+
analyzedAt: Date;
|
|
40
|
+
analysisTrigger: ConversationAnalysisTrigger;
|
|
41
|
+
sentiment: Sentiment;
|
|
42
|
+
sentimentTrend: SentimentTrend;
|
|
43
|
+
userTone: UserTone;
|
|
44
|
+
language: string;
|
|
45
|
+
topics: string[];
|
|
46
|
+
userAbuseDetected: boolean;
|
|
47
|
+
userAbuseCategories: AbuseCategory[];
|
|
48
|
+
llmIssueDetected: boolean;
|
|
49
|
+
llmIssueCategories: LlmIssueCategory[];
|
|
50
|
+
userEngagement: UserEngagement;
|
|
51
|
+
riskScore: number;
|
|
52
|
+
userAbuseConfidence?: AbuseConfidence | undefined;
|
|
53
|
+
userAbuseSummary?: string | undefined;
|
|
54
|
+
llmIssueSummary?: string | undefined;
|
|
55
|
+
conversationGoalMet?: boolean | undefined;
|
|
56
|
+
} | null | undefined;
|
|
57
|
+
turnInProgress?: boolean | undefined;
|
|
58
|
+
}[];
|
|
59
|
+
}[];
|
|
7
60
|
/**
|
|
8
61
|
* Inline-rename and delete-with-confirm state shared by the conversation
|
|
9
62
|
* lists (PkChatbotViewConversations, PkChatSidebar). Renames are optimistic:
|
|
@@ -623,6 +623,7 @@ export declare const ChatSchema: z.ZodObject<{
|
|
|
623
623
|
export declare const ChatsQuerystringSchema: z.ZodObject<{
|
|
624
624
|
startDate: z.ZodOptional<z.ZodString>;
|
|
625
625
|
endDate: z.ZodOptional<z.ZodString>;
|
|
626
|
+
search: z.ZodOptional<z.ZodString>;
|
|
626
627
|
ids: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
627
628
|
"from[lastMessageAt]": z.ZodOptional<z.ZodString>;
|
|
628
629
|
"to[lastMessageAt]": z.ZodOptional<z.ZodString>;
|