@eloquentai/chat-sdk 0.28.27-dev → 0.28.28-dev
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/components/chat/realtime-socket.hook.d.ts +2 -1
- package/dist/components/chat/validations.d.ts +12 -0
- package/dist/{index-XilHq5hq.js → index-BcbSu5WZ.js} +2201 -2185
- package/dist/{index-XilHq5hq.js.map → index-BcbSu5WZ.js.map} +1 -1
- package/dist/{index-BdbZBJ9R.js → index-Cen9us5k.js} +2 -2
- package/dist/{index-BdbZBJ9R.js.map → index-Cen9us5k.js.map} +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
|
@@ -14,6 +14,7 @@ export type UseRealtimeSocketOptions = {
|
|
|
14
14
|
onAgentTopic?: (content: string) => void;
|
|
15
15
|
onAgentSummary?: (content: string) => void;
|
|
16
16
|
onRatingRequest?: () => void;
|
|
17
|
+
onBreadcrumb?: () => void;
|
|
17
18
|
fetchHistory: (chatId: string) => Promise<MessageResponse[]>;
|
|
18
19
|
backupPollingInterval?: number;
|
|
19
20
|
};
|
|
@@ -22,4 +23,4 @@ export type UseRealtimeSocketReturn = {
|
|
|
22
23
|
disconnect: () => void;
|
|
23
24
|
clearProcessedIds: () => void;
|
|
24
25
|
};
|
|
25
|
-
export declare function useRealtimeSocket({ chatSettings, chatId, messages, onMessage, onCognition, onCognitionComplete, onError, onChatClosed, onAgentCapturedUrl, onAgentTopic, onAgentSummary, onRatingRequest, fetchHistory, backupPollingInterval, }: UseRealtimeSocketOptions): UseRealtimeSocketReturn;
|
|
26
|
+
export declare function useRealtimeSocket({ chatSettings, chatId, messages, onMessage, onCognition, onCognitionComplete, onError, onChatClosed, onAgentCapturedUrl, onAgentTopic, onAgentSummary, onRatingRequest, onBreadcrumb, fetchHistory, backupPollingInterval, }: UseRealtimeSocketOptions): UseRealtimeSocketReturn;
|
|
@@ -50,6 +50,12 @@ export declare const chatResponseApiSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
50
50
|
type: z.ZodLiteral<"chat_rating">;
|
|
51
51
|
content: z.ZodString;
|
|
52
52
|
}, z.core.$strip>;
|
|
53
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
54
|
+
created_at: z.ZodString;
|
|
55
|
+
data: z.ZodObject<{
|
|
56
|
+
type: z.ZodLiteral<"breadcrumb">;
|
|
57
|
+
content: z.ZodString;
|
|
58
|
+
}, z.core.$strip>;
|
|
53
59
|
}, z.core.$strip>]>;
|
|
54
60
|
export type ChatResponseApi = z.infer<typeof chatResponseApiSchema>;
|
|
55
61
|
type NotificationData = ChatResponseApi["data"];
|
|
@@ -103,6 +109,12 @@ export type ChatRatingNotification = {
|
|
|
103
109
|
type: "chat_rating";
|
|
104
110
|
}>;
|
|
105
111
|
};
|
|
112
|
+
export type BreadcrumbNotification = {
|
|
113
|
+
created_at: string;
|
|
114
|
+
data: Extract<NotificationData, {
|
|
115
|
+
type: "breadcrumb";
|
|
116
|
+
}>;
|
|
117
|
+
};
|
|
106
118
|
export declare const chatResponseSchema: z.ZodObject<{
|
|
107
119
|
message_id: z.ZodString;
|
|
108
120
|
response: z.ZodObject<{
|