@eloquentai/chat-sdk 0.28.27-dev → 0.28.29-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.
@@ -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<{