@8wave/ai-elements 0.114.0-beta.14 → 0.114.0-beta.19
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/{Agent-D3ODaN3E.js → Agent-DK76k05_.js} +2 -2
- package/dist/_chunks/{Agent-D3ODaN3E.js.map → Agent-DK76k05_.js.map} +1 -1
- package/dist/_chunks/{PkStreamingMarkdown-CYOm47PX.js → PkStreamingMarkdown-DstWSlvS.js} +228 -219
- package/dist/_chunks/{PkStreamingMarkdown-CYOm47PX.js.map → PkStreamingMarkdown-DstWSlvS.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestGeolocation-BY7nXImb.js → PkToolRequestGeolocation-OF1PWhMw.js} +2 -2
- package/{dist-vue/_chunks/PkToolRequestGeolocation-9vfYNaQo.js.map → dist/_chunks/PkToolRequestGeolocation-OF1PWhMw.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestOAuthConnection-DFOTALFt.js → PkToolRequestOAuthConnection-ChGMAKV7.js} +2 -2
- package/dist/_chunks/{PkToolRequestOAuthConnection-DFOTALFt.js.map → PkToolRequestOAuthConnection-ChGMAKV7.js.map} +1 -1
- package/dist/_chunks/{PkToolShowArtifact-DzHRWoru.js → PkToolShowArtifact-DY9H0dxc.js} +2 -2
- package/dist/_chunks/{PkToolShowArtifact-DzHRWoru.js.map → PkToolShowArtifact-DY9H0dxc.js.map} +1 -1
- package/dist/_chunks/PkToolShowComparison-8d6fAhRp.js +72 -0
- package/dist/_chunks/PkToolShowComparison-8d6fAhRp.js.map +1 -0
- package/dist/_chunks/{PkToolShowContactForm-1J6_1AA2.js → PkToolShowContactForm-Cz44l-LN.js} +2 -2
- package/dist/_chunks/{PkToolShowContactForm-1J6_1AA2.js.map → PkToolShowContactForm-Cz44l-LN.js.map} +1 -1
- package/dist/_chunks/{PkToolShowForm-DmQYj3v1.js → PkToolShowForm-BMHhgLGo.js} +3 -3
- package/dist/_chunks/{PkToolShowForm-DmQYj3v1.js.map → PkToolShowForm-BMHhgLGo.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSources-BO8V5rlS.js → PkToolShowSources-C2xLEg1m.js} +3 -3
- package/dist/_chunks/{PkToolShowSources-BO8V5rlS.js.map → PkToolShowSources-C2xLEg1m.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSuggestedReply-CTWVG1Zk.js → PkToolShowSuggestedReply-Dl4x_nEJ.js} +2 -2
- package/dist/_chunks/{PkToolShowSuggestedReply-CTWVG1Zk.js.map → PkToolShowSuggestedReply-Dl4x_nEJ.js.map} +1 -1
- package/dist/_chunks/{markdown-JpLFzufn.js → markdown-BrvkrEUr.js} +12 -12
- package/dist/_chunks/{markdown-JpLFzufn.js.map → markdown-BrvkrEUr.js.map} +1 -1
- package/dist/ai-elements.es.js +1824 -1983
- 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-BNlmK-uJ.js → Agent-tbKw8Mdt.js} +2 -2
- package/dist-vue/_chunks/{Agent-BNlmK-uJ.js.map → Agent-tbKw8Mdt.js.map} +1 -1
- package/dist-vue/_chunks/{Document-2X01-F4Z.js → Document-p2Y_4gk8.js} +9 -9
- package/dist-vue/_chunks/{Document-2X01-F4Z.js.map → Document-p2Y_4gk8.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbot-BdvDl_Gw.js → PkChatbot-D5kerrVY.js} +8 -8
- package/dist-vue/_chunks/{PkChatbot-BdvDl_Gw.js.map → PkChatbot-D5kerrVY.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotEmptyState-DycCrfwz.js → PkChatbotEmptyState-_GJMmvPc.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotEmptyState-DycCrfwz.js.map → PkChatbotEmptyState-_GJMmvPc.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotInput-BCuqLdkT.js → PkChatbotInput-BHIYDooq.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotInput-BCuqLdkT.js.map → PkChatbotInput-BHIYDooq.js.map} +1 -1
- package/dist-vue/_chunks/PkChatbotMessages-DcFGzK2p.js +778 -0
- package/dist-vue/_chunks/PkChatbotMessages-DcFGzK2p.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotStepPayload-CI98RiNv.js → PkChatbotStepPayload-C36nXLW7.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotStepPayload-CI98RiNv.js.map → PkChatbotStepPayload-C36nXLW7.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-B8zXJOdI.js → PkChatbotStepToolDetail-CBX-AQXv.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-B8zXJOdI.js.map → PkChatbotStepToolDetail-CBX-AQXv.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotSteps-CL27pMFS.js → PkChatbotSteps-5OCiyojA.js} +7 -6
- package/dist-vue/_chunks/PkChatbotSteps-5OCiyojA.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewChat-CS-OSJfX.js → PkChatbotViewChat-TYnSR4Qi.js} +7 -7
- package/dist-vue/_chunks/{PkChatbotViewChat-CS-OSJfX.js.map → PkChatbotViewChat-TYnSR4Qi.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewConversations-BCdolW0R.js → PkChatbotViewConversations-CHpN4vhm.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewConversations-BCdolW0R.js.map → PkChatbotViewConversations-CHpN4vhm.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewFiles-Cudao8ew.js → PkChatbotViewFiles-BBBO5hyd.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotViewFiles-Cudao8ew.js.map → PkChatbotViewFiles-BBBO5hyd.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewProfile-DDsKOkcC.js → PkChatbotViewProfile-CosaHA-g.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewProfile-DDsKOkcC.js.map → PkChatbotViewProfile-CosaHA-g.js.map} +1 -1
- package/dist-vue/_chunks/{PkStreamingMarkdown-B2iju0WK.js → PkStreamingMarkdown-BQPMUS_f.js} +214 -205
- package/dist-vue/_chunks/{PkStreamingMarkdown-B2iju0WK.js.map → PkStreamingMarkdown-BQPMUS_f.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolRequestGeolocation-9vfYNaQo.js → PkToolRequestGeolocation-BOVbaCzQ.js} +2 -2
- package/{dist/_chunks/PkToolRequestGeolocation-BY7nXImb.js.map → dist-vue/_chunks/PkToolRequestGeolocation-BOVbaCzQ.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-BorR5NmZ.js → PkToolRequestOAuthConnection-DMvCGPuX.js} +2 -2
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-BorR5NmZ.js.map → PkToolRequestOAuthConnection-DMvCGPuX.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowArtifact-C0J71YF6.js → PkToolShowArtifact-ClKehEEG.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowArtifact-C0J71YF6.js.map → PkToolShowArtifact-ClKehEEG.js.map} +1 -1
- package/dist-vue/_chunks/PkToolShowComparison-DQs3E6-k.js +72 -0
- package/dist-vue/_chunks/PkToolShowComparison-DQs3E6-k.js.map +1 -0
- package/dist-vue/_chunks/{PkToolShowContactForm-De3Od9mC.js → PkToolShowContactForm-stJ8WT_G.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowContactForm-De3Od9mC.js.map → PkToolShowContactForm-stJ8WT_G.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowDiagram-DmY_hhAS.js → PkToolShowDiagram-Bokc-KWa.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowDiagram-DmY_hhAS.js.map → PkToolShowDiagram-Bokc-KWa.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowEmail-D_Z15wCS.js → PkToolShowEmail-CgeqOII0.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowEmail-D_Z15wCS.js.map → PkToolShowEmail-CgeqOII0.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowForm-DUGysIxj.js → PkToolShowForm-DJterU51.js} +4 -4
- package/dist-vue/_chunks/{PkToolShowForm-DUGysIxj.js.map → PkToolShowForm-DJterU51.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowMessage-e5_EI5mV.js → PkToolShowMessage-Dc8ZWZb_.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowMessage-e5_EI5mV.js.map → PkToolShowMessage-Dc8ZWZb_.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowProductList-B3X7Svyc.js → PkToolShowProductList-BpPA_HW6.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowProductList-B3X7Svyc.js.map → PkToolShowProductList-BpPA_HW6.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSources-BUjBSGc5.js → PkToolShowSources-jdu9js3i.js} +4 -4
- package/dist-vue/_chunks/{PkToolShowSources-BUjBSGc5.js.map → PkToolShowSources-jdu9js3i.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-DA4NEjHB.js → PkToolShowSuggestedReply-qAWdCUhr.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-DA4NEjHB.js.map → PkToolShowSuggestedReply-qAWdCUhr.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowWebPages-DEih8h5k.js → PkToolShowWebPages-BGpGLkoz.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowWebPages-DEih8h5k.js.map → PkToolShowWebPages-BGpGLkoz.js.map} +1 -1
- package/dist-vue/_chunks/{PkUrl-3NH9t-WA.js → PkUrl-D5eqGgXF.js} +2 -2
- package/dist-vue/_chunks/{PkUrl-3NH9t-WA.js.map → PkUrl-D5eqGgXF.js.map} +1 -1
- package/dist-vue/_chunks/{createChatbotApiClient-CaVLm5W9.js → createChatbotApiClient-BlWs282E.js} +137 -168
- package/dist-vue/_chunks/createChatbotApiClient-BlWs282E.js.map +1 -0
- package/dist-vue/_chunks/{useChatbotStore-BwrBZJCq.js → useChatbotStore-CMo47fnS.js} +3 -3
- package/dist-vue/_chunks/{useChatbotStore-BwrBZJCq.js.map → useChatbotStore-CMo47fnS.js.map} +1 -1
- package/dist-vue/_chunks/{utils-BL4Ppr2R.js → utils--8iNpBr_.js} +2 -2
- package/dist-vue/_chunks/{utils-BL4Ppr2R.js.map → utils--8iNpBr_.js.map} +1 -1
- package/dist-vue/api.js +1 -1
- package/dist-vue/composables.js +43 -9
- package/dist-vue/composables.js.map +1 -1
- package/dist-vue/index.js +3332 -3236
- package/dist-vue/index.js.map +1 -1
- package/dist-vue/locales.js +18 -0
- package/dist-vue/packages/ability/src/index.d.ts +10 -14
- package/dist-vue/packages/components/src/chat/PkChatbotMessages.d.ts +8 -4
- package/dist-vue/packages/components/src/chat/PkChatbotSteps.d.ts +1 -0
- package/dist-vue/packages/components/src/chat/PkTurnEvaluation.d.ts +8 -0
- package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +60 -0
- package/dist-vue/packages/models/src/schema/Chat.d.ts +42 -0
- package/dist-vue/style.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/PkToolShowComparison-BJ7QBXtf.js +0 -60
- package/dist/_chunks/PkToolShowComparison-BJ7QBXtf.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotMessages-PjKRDNYJ.js +0 -776
- package/dist-vue/_chunks/PkChatbotMessages-PjKRDNYJ.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotSteps-CL27pMFS.js.map +0 -1
- package/dist-vue/_chunks/PkToolShowComparison-BLn4pkno.js +0 -61
- package/dist-vue/_chunks/PkToolShowComparison-BLn4pkno.js.map +0 -1
- package/dist-vue/_chunks/createChatbotApiClient-CaVLm5W9.js.map +0 -1
package/dist-vue/locales.js
CHANGED
|
@@ -305,6 +305,7 @@ var e = {
|
|
|
305
305
|
toolApprovalBadge: "User confirm",
|
|
306
306
|
calendarEvent: "Event",
|
|
307
307
|
comparison: "Comparison",
|
|
308
|
+
recommended: "Recommended",
|
|
308
309
|
contactUs: "Contact us",
|
|
309
310
|
phone: "Phone number",
|
|
310
311
|
diagram: "Diagram",
|
|
@@ -567,6 +568,14 @@ var e = {
|
|
|
567
568
|
feelsLike: "Feels like",
|
|
568
569
|
dailyForecast: "Daily forecast",
|
|
569
570
|
airQuality: "Air quality"
|
|
571
|
+
},
|
|
572
|
+
turnEvaluation: {
|
|
573
|
+
cost: "Cost, not charged to the organization: {cost}",
|
|
574
|
+
title: "Evaluation after the reply",
|
|
575
|
+
modeHint: "Recorded after the reply, with no effect: nothing reads these probabilities yet.",
|
|
576
|
+
version: "Questions version {version}",
|
|
577
|
+
leadFailed: "The evaluation failed or did not answer within {budget} ms: nothing was recorded.",
|
|
578
|
+
probability: "Probability the evaluation model gives to the question: from 0.5 it leans towards yes"
|
|
570
579
|
}
|
|
571
580
|
}, t = {
|
|
572
581
|
agentType: {
|
|
@@ -874,6 +883,7 @@ var e = {
|
|
|
874
883
|
toolApprovalBadge: "Conferma utente",
|
|
875
884
|
calendarEvent: "Evento",
|
|
876
885
|
comparison: "Confronto",
|
|
886
|
+
recommended: "Consigliato",
|
|
877
887
|
contactUs: "Contattaci",
|
|
878
888
|
phone: "Telefono",
|
|
879
889
|
diagram: "Diagramma",
|
|
@@ -1136,6 +1146,14 @@ var e = {
|
|
|
1136
1146
|
feelsLike: "Percepita",
|
|
1137
1147
|
dailyForecast: "Previsioni giornaliere",
|
|
1138
1148
|
airQuality: "Qualità dell'aria"
|
|
1149
|
+
},
|
|
1150
|
+
turnEvaluation: {
|
|
1151
|
+
cost: "Costo, non addebitato all'organizzazione: {cost}",
|
|
1152
|
+
title: "Valutazione a fine turno",
|
|
1153
|
+
modeHint: "Registrata dopo la risposta, senza effetti: per ora nessuno legge queste probabilità.",
|
|
1154
|
+
version: "Versione delle domande: {version}",
|
|
1155
|
+
leadFailed: "La valutazione non è riuscita o non ha risposto entro {budget} ms: non è stato registrato niente.",
|
|
1156
|
+
probability: "Probabilità che il modello di valutazione dà alla domanda: da 0,5 in su propende per il sì"
|
|
1139
1157
|
}
|
|
1140
1158
|
};
|
|
1141
1159
|
//#endregion
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { MongoAbility, InferSubjects, ForcedSubject
|
|
1
|
+
import { MongoAbility, InferSubjects, ForcedSubject } from '@casl/ability';
|
|
2
2
|
import { Action, Capability, Subject, Session } from './types';
|
|
3
|
-
import { MongoQueryTopLevelOperators } from '@ucast/mongo2js';
|
|
4
3
|
import { Statements, RoleInput, Role, ExactRoleStatements } from 'better-auth/plugins';
|
|
5
4
|
export declare const OrganizationRoles: {
|
|
6
5
|
readonly admin: "admin";
|
|
@@ -13,23 +12,20 @@ export declare const UserRoles: {
|
|
|
13
12
|
readonly user: "user";
|
|
14
13
|
};
|
|
15
14
|
export type AbilitySubject = InferSubjects<'all' | Subject, true> | ForcedSubject<InferSubjects<'all' | Subject, true>>;
|
|
16
|
-
type
|
|
17
|
-
export declare const ability: PureAbility<[Action, AbilitySubject], {
|
|
18
|
-
[x: string]: any;
|
|
19
|
-
[x: number]: any;
|
|
20
|
-
[x: symbol]: any;
|
|
21
|
-
} & MongoQueryTopLevelOperators<Record<PropertyKey, any>>>;
|
|
15
|
+
export type AppAbility = MongoAbility<[Action, AbilitySubject]>;
|
|
22
16
|
export declare const isValidOrganizationRole: (role?: string | null) => role is keyof typeof OrganizationRoles;
|
|
23
17
|
export declare const isValidUserRole: (role?: string | null) => role is keyof typeof UserRoles;
|
|
24
18
|
export declare const getOrganizationRoleCapabilities: (currentSession?: Session | null) => Capability[];
|
|
25
19
|
export declare const getUserRoleCapabilities: (currentSession?: Session | null) => Capability[];
|
|
26
20
|
/**
|
|
27
|
-
* Builds
|
|
28
|
-
*
|
|
29
|
-
*
|
|
21
|
+
* Builds the ability of one caller: the session's roles, or the guest rules
|
|
22
|
+
* when there is no session. Every call returns a new instance and this package
|
|
23
|
+
* keeps none: a server judges many callers at once, so an instance shared
|
|
24
|
+
* between them is judged by whoever wrote it last. The backend builds one per
|
|
25
|
+
* request (`request.ability`), the Platform MCP one per tool call, and the
|
|
26
|
+
* frontend keeps its own for the single user of the tab.
|
|
30
27
|
*/
|
|
31
|
-
export declare const buildAbilityForSession: (currentSession?: Session | null) =>
|
|
32
|
-
export declare const updateAbilityFromSession: (currentSession?: Session | null) => void;
|
|
28
|
+
export declare const buildAbilityForSession: (currentSession?: Session | null) => AppAbility;
|
|
33
29
|
export type PermissionMap = Partial<Record<Action, Subject>>;
|
|
34
30
|
/**
|
|
35
31
|
* Evaluates a route-style permission map ({ action: Subject }) against an
|
|
@@ -39,7 +35,7 @@ export type PermissionMap = Partial<Record<Action, Subject>>;
|
|
|
39
35
|
* Single source of truth for both the HTTP preHandler and the Platform MCP
|
|
40
36
|
* tool handlers.
|
|
41
37
|
*/
|
|
42
|
-
export declare const findDeniedPermission: (abilityInstance: Pick<
|
|
38
|
+
export declare const findDeniedPermission: (abilityInstance: Pick<AppAbility, "can">, permissions: PermissionMap, payload?: unknown) => {
|
|
43
39
|
action: Action;
|
|
44
40
|
subject: Subject;
|
|
45
41
|
} | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChatMessageActions, MessageFeedback, RevisedAnswer, UIChatMessage } from '../../../models/src';
|
|
2
|
-
import { TextUIPart, UIToolInvocation, UITool } from 'ai';
|
|
2
|
+
import { TextUIPart, CustomContentUIPart, ReasoningUIPart, DynamicToolUIPart, SourceUrlUIPart, SourceDocumentUIPart, ReasoningFileUIPart, StepStartUIPart, UIToolInvocation, UITool } from 'ai';
|
|
3
3
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
4
4
|
type __VLS_Props = {
|
|
5
5
|
status?: 'submitted' | 'streaming' | 'ready' | 'error';
|
|
@@ -55,11 +55,15 @@ declare var __VLS_25: {
|
|
|
55
55
|
part: TextUIPart;
|
|
56
56
|
index: number;
|
|
57
57
|
isLoading: boolean;
|
|
58
|
-
}, __VLS_73: `tool-${string}`, __VLS_74: {
|
|
58
|
+
}, __VLS_73: "custom" | "reasoning" | "text" | "dynamic-tool" | "source-url" | "source-document" | "reasoning-file" | "step-start" | `data-${string}` | `tool-${string}`, __VLS_74: {
|
|
59
59
|
message: UIChatMessage;
|
|
60
|
-
part: {
|
|
60
|
+
part: TextUIPart | CustomContentUIPart | ReasoningUIPart | DynamicToolUIPart | SourceUrlUIPart | SourceDocumentUIPart | ReasoningFileUIPart | StepStartUIPart | ({
|
|
61
61
|
type: `tool-${string}`;
|
|
62
|
-
} & UIToolInvocation<UITool
|
|
62
|
+
} & UIToolInvocation<UITool>) | {
|
|
63
|
+
type: `data-${string}`;
|
|
64
|
+
id?: string;
|
|
65
|
+
data: unknown;
|
|
66
|
+
};
|
|
63
67
|
index: number;
|
|
64
68
|
isLoading: boolean;
|
|
65
69
|
};
|
|
@@ -3,6 +3,7 @@ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOp
|
|
|
3
3
|
type __VLS_Props = {
|
|
4
4
|
message: UIChatMessage;
|
|
5
5
|
isStreaming?: boolean;
|
|
6
|
+
hasContent?: boolean;
|
|
6
7
|
isDark?: boolean;
|
|
7
8
|
};
|
|
8
9
|
declare const __VLS_export: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { UIChatMessage } from '../../../models/src';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
message: UIChatMessage;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_export: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
@@ -633,6 +633,16 @@ export declare function useChatbotStore(agentId: string): Store<`chatbot-${strin
|
|
|
633
633
|
failed?: boolean | undefined;
|
|
634
634
|
} | undefined;
|
|
635
635
|
} | undefined;
|
|
636
|
+
turnEvaluation?: {
|
|
637
|
+
version: number;
|
|
638
|
+
mode: "shadow";
|
|
639
|
+
probabilities: Record<string, number>;
|
|
640
|
+
latencyMs: number;
|
|
641
|
+
budgetMs: number;
|
|
642
|
+
cost?: number | undefined;
|
|
643
|
+
inputTokens?: number | undefined;
|
|
644
|
+
failed?: true | undefined;
|
|
645
|
+
} | undefined;
|
|
636
646
|
} | undefined;
|
|
637
647
|
parts: ({
|
|
638
648
|
type: "text";
|
|
@@ -1139,6 +1149,16 @@ export declare function useChatbotStore(agentId: string): Store<`chatbot-${strin
|
|
|
1139
1149
|
failed?: boolean | undefined;
|
|
1140
1150
|
} | undefined;
|
|
1141
1151
|
} | undefined;
|
|
1152
|
+
turnEvaluation?: {
|
|
1153
|
+
version: number;
|
|
1154
|
+
mode: "shadow";
|
|
1155
|
+
probabilities: Record<string, number>;
|
|
1156
|
+
latencyMs: number;
|
|
1157
|
+
budgetMs: number;
|
|
1158
|
+
cost?: number | undefined;
|
|
1159
|
+
inputTokens?: number | undefined;
|
|
1160
|
+
failed?: true | undefined;
|
|
1161
|
+
} | undefined;
|
|
1142
1162
|
} | undefined;
|
|
1143
1163
|
parts: ({
|
|
1144
1164
|
type: "text";
|
|
@@ -2343,6 +2363,16 @@ export declare function useChatbotStore(agentId: string): Store<`chatbot-${strin
|
|
|
2343
2363
|
failed?: boolean | undefined;
|
|
2344
2364
|
} | undefined;
|
|
2345
2365
|
} | undefined;
|
|
2366
|
+
turnEvaluation?: {
|
|
2367
|
+
version: number;
|
|
2368
|
+
mode: "shadow";
|
|
2369
|
+
probabilities: Record<string, number>;
|
|
2370
|
+
latencyMs: number;
|
|
2371
|
+
budgetMs: number;
|
|
2372
|
+
cost?: number | undefined;
|
|
2373
|
+
inputTokens?: number | undefined;
|
|
2374
|
+
failed?: true | undefined;
|
|
2375
|
+
} | undefined;
|
|
2346
2376
|
} | undefined;
|
|
2347
2377
|
parts: ({
|
|
2348
2378
|
type: "text";
|
|
@@ -2849,6 +2879,16 @@ export declare function useChatbotStore(agentId: string): Store<`chatbot-${strin
|
|
|
2849
2879
|
failed?: boolean | undefined;
|
|
2850
2880
|
} | undefined;
|
|
2851
2881
|
} | undefined;
|
|
2882
|
+
turnEvaluation?: {
|
|
2883
|
+
version: number;
|
|
2884
|
+
mode: "shadow";
|
|
2885
|
+
probabilities: Record<string, number>;
|
|
2886
|
+
latencyMs: number;
|
|
2887
|
+
budgetMs: number;
|
|
2888
|
+
cost?: number | undefined;
|
|
2889
|
+
inputTokens?: number | undefined;
|
|
2890
|
+
failed?: true | undefined;
|
|
2891
|
+
} | undefined;
|
|
2852
2892
|
} | undefined;
|
|
2853
2893
|
parts: ({
|
|
2854
2894
|
type: "text";
|
|
@@ -4053,6 +4093,16 @@ export declare function useChatbotStore(agentId: string): Store<`chatbot-${strin
|
|
|
4053
4093
|
failed?: boolean | undefined;
|
|
4054
4094
|
} | undefined;
|
|
4055
4095
|
} | undefined;
|
|
4096
|
+
turnEvaluation?: {
|
|
4097
|
+
version: number;
|
|
4098
|
+
mode: "shadow";
|
|
4099
|
+
probabilities: Record<string, number>;
|
|
4100
|
+
latencyMs: number;
|
|
4101
|
+
budgetMs: number;
|
|
4102
|
+
cost?: number | undefined;
|
|
4103
|
+
inputTokens?: number | undefined;
|
|
4104
|
+
failed?: true | undefined;
|
|
4105
|
+
} | undefined;
|
|
4056
4106
|
} | undefined;
|
|
4057
4107
|
parts: ({
|
|
4058
4108
|
type: "text";
|
|
@@ -4559,6 +4609,16 @@ export declare function useChatbotStore(agentId: string): Store<`chatbot-${strin
|
|
|
4559
4609
|
failed?: boolean | undefined;
|
|
4560
4610
|
} | undefined;
|
|
4561
4611
|
} | undefined;
|
|
4612
|
+
turnEvaluation?: {
|
|
4613
|
+
version: number;
|
|
4614
|
+
mode: "shadow";
|
|
4615
|
+
probabilities: Record<string, number>;
|
|
4616
|
+
latencyMs: number;
|
|
4617
|
+
budgetMs: number;
|
|
4618
|
+
cost?: number | undefined;
|
|
4619
|
+
inputTokens?: number | undefined;
|
|
4620
|
+
failed?: true | undefined;
|
|
4621
|
+
} | undefined;
|
|
4562
4622
|
} | undefined;
|
|
4563
4623
|
parts: ({
|
|
4564
4624
|
type: "text";
|
|
@@ -492,10 +492,52 @@ export type UIChatMessageMetadata = {
|
|
|
492
492
|
* organization ({@link withoutToolCatalogue}).
|
|
493
493
|
*/
|
|
494
494
|
toolCatalogue?: ToolCatalogueRecord;
|
|
495
|
+
/**
|
|
496
|
+
* The evaluation of the turn after the reply (spec post-turn-evaluation):
|
|
497
|
+
* a probability per question. Written after the answer, and removed from
|
|
498
|
+
* a public read ({@link withoutTurnEvaluation}).
|
|
499
|
+
*/
|
|
500
|
+
turnEvaluation?: TurnEvaluationRecord;
|
|
501
|
+
};
|
|
502
|
+
/**
|
|
503
|
+
* The questions of the post-turn evaluation, in the order they are asked and
|
|
504
|
+
* listed. The backend's questions are typed against it, so the two cannot
|
|
505
|
+
* drift. A reader orders by this list and not by the record: jsonb keeps the
|
|
506
|
+
* keys of an object sorted by length, not in the order they were written.
|
|
507
|
+
*/
|
|
508
|
+
export declare const TURN_EVALUATION_QUESTION_IDS: readonly ["durableFact", "abusive", "manipulation", "asksHuman", "missingInfo", "informationGap"];
|
|
509
|
+
export type TurnEvaluationQuestionId = (typeof TURN_EVALUATION_QUESTION_IDS)[number];
|
|
510
|
+
/**
|
|
511
|
+
* The evaluation model's answers on a finished turn (spec
|
|
512
|
+
* post-turn-evaluation, F1). Recorded in shadow only: nothing reads it yet.
|
|
513
|
+
*/
|
|
514
|
+
export type TurnEvaluationRecord = {
|
|
515
|
+
/**
|
|
516
|
+
* The wording of the questions: a threshold holds only for the wording
|
|
517
|
+
* it was measured on, so a record says which one it answered.
|
|
518
|
+
*/
|
|
519
|
+
version: number;
|
|
520
|
+
mode: 'shadow';
|
|
521
|
+
/** Probability per question, two decimals. Empty when the request failed. */
|
|
522
|
+
probabilities: Record<string, number>;
|
|
523
|
+
latencyMs: number;
|
|
524
|
+
budgetMs: number;
|
|
525
|
+
/** Market cost of the request in USD. */
|
|
526
|
+
cost?: number;
|
|
527
|
+
inputTokens?: number;
|
|
528
|
+
/** The request failed or ran past its budget: no answer was recorded. */
|
|
529
|
+
failed?: true;
|
|
495
530
|
};
|
|
496
531
|
export type UIChatMessage = UIMessage & {
|
|
497
532
|
metadata?: UIChatMessageMetadata;
|
|
498
533
|
};
|
|
534
|
+
/**
|
|
535
|
+
* The history without the turn evaluations, for a public read: a probability
|
|
536
|
+
* of abuse on a user must not reach the widget. Kept apart from
|
|
537
|
+
* {@link withoutToolCatalogue}, which the data export uses too, because
|
|
538
|
+
* whether the export includes this judgment is still to be decided.
|
|
539
|
+
*/
|
|
540
|
+
export declare function withoutTurnEvaluation(messages: UIChatMessage[]): UIChatMessage[];
|
|
499
541
|
/**
|
|
500
542
|
* The history without the tool catalogue records, for a reader outside the
|
|
501
543
|
* organization (a public chat read, the data export): a record names every
|