@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/components/chat/chat.hook.d.ts +2 -2
- package/dist/components/chat/message-events.hook.d.ts +9 -9
- package/dist/components/chat/persistence.hook.d.ts +5 -5
- package/dist/components/chat/realtime-socket.hook.d.ts +24 -0
- package/dist/components/chat/sdk-initialization.hook.d.ts +1 -1
- package/dist/components/chat/validations.d.ts +42 -6
- package/dist/components/chat-interface/index.d.ts +2 -2
- package/dist/components/index.d.ts +4 -1
- package/dist/{index-C0lXr3_t.js → index-B3o-he05.js} +2 -2
- package/dist/{index-C0lXr3_t.js.map → index-B3o-he05.js.map} +1 -1
- package/dist/{index-Dqos2v0b.js → index-CmkaHEs_.js} +3710 -3774
- package/dist/index-CmkaHEs_.js.map +1 -0
- package/dist/index.mjs +6 -5
- package/package.json +1 -1
- package/dist/components/chat/background-poller.hook.d.ts +0 -20
- package/dist/components/chat/background-poller.hook.test.d.ts +0 -1
- package/dist/components/chat/real-time-events.hook.d.ts +0 -16
- package/dist/index-Dqos2v0b.js.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { C as n, a as
|
|
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 : {},
|
|
4
|
-
|
|
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
|
-
|
|
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,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 {};
|