@eloquentai/chat-sdk 0.26.1-dev → 0.27.1-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/index.mjs CHANGED
@@ -1,12 +1,13 @@
1
- import { C as n, a as t, r } from "./index-Dqos2v0b.js";
1
+ import { C as n, a as s, r, u as f } from "./index-CmkaHEs_.js";
2
2
  try {
3
- let e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}, a = new e.Error().stack;
4
- a && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[a] = "2f86aa74-a654-4fad-86f8-adba1f3666a9", e._sentryDebugIdIdentifier = "sentry-dbid-2f86aa74-a654-4fad-86f8-adba1f3666a9");
3
+ let e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}, d = new e.Error().stack;
4
+ d && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[d] = "118859a5-c0fd-4bc2-9d01-2ca49e89967d", e._sentryDebugIdIdentifier = "sentry-dbid-118859a5-c0fd-4bc2-9d01-2ca49e89967d");
5
5
  } catch {
6
6
  }
7
7
  export {
8
8
  n as Chat,
9
- t as ChatInterface,
10
- r as renderChat
9
+ s as ChatInterface,
10
+ r as renderChat,
11
+ f as useRealtimeSocket
11
12
  };
12
13
  //# sourceMappingURL=index.mjs.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eloquentai/chat-sdk",
3
- "version": "0.26.1-dev",
3
+ "version": "0.27.1-dev",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "chat",
@@ -1,20 +0,0 @@
1
- import { EloquentAiApiClient } from '../../lib/eloquent-ai-api-client';
2
- import { Message } from '../../type';
3
- import { ConversationResponse } from './validations';
4
- export type PollingMode = "high" | "medium" | "low";
5
- export interface UseBackgroundPollerProps {
6
- apiClient: EloquentAiApiClient | null;
7
- conversationId: string | null;
8
- messages: Message[];
9
- setMessages: React.Dispatch<React.SetStateAction<Message[]>>;
10
- chatOpen: boolean;
11
- onReceiveMessage: (response: ConversationResponse, conversationId: string) => void;
12
- onConversationClosed?: () => void;
13
- }
14
- export interface UseBackgroundPollerReturn {
15
- setPollingMode: (mode: PollingMode) => void;
16
- expectMessage: () => void;
17
- startPolling: () => void;
18
- stopPolling: () => void;
19
- }
20
- export declare function useBackgroundPoller({ apiClient, conversationId, messages, setMessages, chatOpen, onReceiveMessage, onConversationClosed, }: UseBackgroundPollerProps): UseBackgroundPollerReturn;
@@ -1 +0,0 @@
1
- export {};
@@ -1,16 +0,0 @@
1
- import { BootResponse } from '../../lib/eloquent-ai-api-client.ts';
2
- import { ConversationResponse } from './validations';
3
- type UseRealTimeEventsProps = {
4
- onReceiveMessage: (response: ConversationResponse, conversationId: string) => void;
5
- onReceiveCognition: (content: string) => void;
6
- onCognitionComplete: () => void;
7
- onError?: () => void;
8
- onConversationClosed?: () => void;
9
- chatSettings: BootResponse["chat_settings"] | null;
10
- };
11
- type UseRealTimeEventsReturn = {
12
- connect: (conversationId: string) => Promise<void>;
13
- disconnect: () => void;
14
- };
15
- export declare function useRealTimeEvents({ onReceiveMessage, onReceiveCognition, onError, onConversationClosed, chatSettings, }: UseRealTimeEventsProps): UseRealTimeEventsReturn;
16
- export {};