@iblai/web-utils 1.11.2 → 1.11.4
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/data-layer/src/features/sessions/api-slice.d.ts +122 -252
- package/dist/data-layer/src/features/sessions/constants.d.ts +3 -0
- package/dist/data-layer/src/features/sessions/url.d.ts +9 -0
- package/dist/data-layer/src/features/utils.d.ts +7 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.esm.js +312 -202
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +311 -201
- package/dist/index.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/web-utils/src/hooks/chat/__tests__/chat-history.utils.test.d.ts +1 -0
- package/dist/web-utils/src/hooks/chat/chat-history.utils.d.ts +10 -0
- package/dist/web-utils/src/hooks/chat/use-advanced-chat.d.ts +3 -0
- package/dist/web-utils/src/hooks/chat/use-chat-history.d.ts +17 -0
- package/package.json +1 -1
package/dist/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Message } from "./use-chat-v2";
|
|
2
|
+
export declare const INITIAL_CHAT_PAGE = 1;
|
|
3
|
+
export declare function normalizeSessionResult(result: any): any;
|
|
4
|
+
export declare function normalizeSessionResults(results: any[] | undefined): any[];
|
|
5
|
+
/**
|
|
6
|
+
* A session re-fetch can omit `additional_kwargs`, dropping reasoning/tool-call
|
|
7
|
+
* data that is already in memory. Carry those fields forward from the matching
|
|
8
|
+
* existing message (by content) onto the freshly-fetched message in place.
|
|
9
|
+
*/
|
|
10
|
+
export declare function mergeReasoningAndToolCalls(incoming: any[], existing: Message[]): void;
|
|
@@ -54,5 +54,8 @@ export declare function useAdvancedChat({ tenantKey, mentorId, username, token,
|
|
|
54
54
|
resetConnection: () => void;
|
|
55
55
|
isLoadingChats: boolean;
|
|
56
56
|
refetchChats: () => Promise<void>;
|
|
57
|
+
loadOlderMessages: () => Promise<void>;
|
|
58
|
+
hasMore: boolean;
|
|
59
|
+
isLoadingOlderMessages: boolean;
|
|
57
60
|
};
|
|
58
61
|
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
type UseChatHistoryParams = {
|
|
3
|
+
tenantKey: string;
|
|
4
|
+
mentorId: string;
|
|
5
|
+
username: string;
|
|
6
|
+
cachedSessionId?: Record<string, string>;
|
|
7
|
+
isOffline?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export declare function useChatHistory({ tenantKey, mentorId, username, cachedSessionId, isOffline, }: UseChatHistoryParams): {
|
|
10
|
+
getChats: () => Promise<void>;
|
|
11
|
+
loadOlderMessages: () => Promise<void>;
|
|
12
|
+
hasMore: boolean;
|
|
13
|
+
isLoadingOlderMessages: boolean;
|
|
14
|
+
isLoadingChats: boolean;
|
|
15
|
+
isLoadingChatsRef: React.RefObject<boolean>;
|
|
16
|
+
};
|
|
17
|
+
export {};
|