@athenaintel/react 0.14.0 → 0.15.1
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/chat/ComposerEditorContext.d.ts +6 -0
- package/dist/chat/super-grouping/toolkit-map.d.ts +8 -3
- package/dist/chat-ui/composer/composer-action.d.ts +8 -1
- package/dist/chat-ui/composer/tiptap-composer.d.ts +7 -0
- package/dist/chat-ui/header/chat-header.d.ts +19 -0
- package/dist/chat-ui/header/conversation-history-panel.d.ts +27 -0
- package/dist/chat-ui/index.d.ts +6 -2
- package/dist/chat-ui/messages/message-actions-config.d.ts +12 -0
- package/dist/chat-ui/messages/message-components.d.ts +8 -6
- package/dist/chat-ui/messages/user-edit-composer.d.ts +8 -0
- package/dist/chat-ui/thread/chat-composer-dock.d.ts +13 -1
- package/dist/chat-ui/thread/chat-thread-shell.d.ts +69 -6
- package/dist/chat-ui/thread/composer-send-or-stop.d.ts +25 -2
- package/dist/chat-ui.cjs +564 -4337
- package/dist/chat-ui.cjs.map +1 -1
- package/dist/chat-ui.js +465 -4237
- package/dist/chat-ui.js.map +1 -1
- package/dist/index.cjs +1290 -4391
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +862 -3942
- package/dist/index.js.map +1 -1
- package/dist/provider/AthenaProvider.d.ts +4 -1
- package/dist/runtime/statewire-run-config.d.ts +0 -2
- package/dist/runtime/useAthenaStatewireRuntime.d.ts +3 -1
- package/dist/styles.css +1 -1
- package/dist/threads/api.d.ts +7 -0
- package/dist/threads/conversation-list-fetcher.d.ts +5 -1
- package/dist/threads/use-rest-conversation-history.d.ts +43 -0
- package/dist/threads/use-statewire-conversation-history.d.ts +71 -0
- package/dist/{scope-registry-Bti8l_Xy.cjs → use-rest-conversation-history-CBPqoHoe.cjs} +30414 -22105
- package/dist/use-rest-conversation-history-CBPqoHoe.cjs.map +1 -0
- package/dist/{scope-registry-B9XYV-FT.js → use-rest-conversation-history-DYvfgoBF.js} +14856 -6568
- package/dist/use-rest-conversation-history-DYvfgoBF.js.map +1 -0
- package/package.json +2 -2
- package/dist/scope-registry-B9XYV-FT.js.map +0 -1
- package/dist/scope-registry-Bti8l_Xy.cjs.map +0 -1
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { type ConversationIndexEntry, type ConversationSummary, type UseConversationIndexOptions } from "@athenaintel/agent-runtime";
|
|
2
|
+
import { type RestConversationAuth } from "./use-rest-conversation-history";
|
|
3
|
+
export interface UseStatewireConversationHistoryOptions {
|
|
4
|
+
backendUrl: string;
|
|
5
|
+
conversationIndexBaseUrl: string;
|
|
6
|
+
principalId: string;
|
|
7
|
+
getAuth: () => RestConversationAuth | Promise<RestConversationAuth>;
|
|
8
|
+
headers: UseConversationIndexOptions["headers"];
|
|
9
|
+
search?: string;
|
|
10
|
+
enabled?: boolean;
|
|
11
|
+
sse?: boolean;
|
|
12
|
+
}
|
|
13
|
+
/** Convert the replicated wire row into the shared cross-surface contract. */
|
|
14
|
+
export declare function conversationSummaryFromIndexEntry(entry: ConversationIndexEntry): ConversationSummary;
|
|
15
|
+
export declare function conversationHistorySource({ indexEntries, restConversations, supportsStatewirePaging, hasSearch, }: {
|
|
16
|
+
indexEntries: readonly ConversationIndexEntry[] | null;
|
|
17
|
+
restConversations: readonly ConversationSummary[];
|
|
18
|
+
supportsStatewirePaging: boolean;
|
|
19
|
+
hasSearch: boolean;
|
|
20
|
+
}): ConversationSummary[];
|
|
21
|
+
export declare function shouldUseRestConversationHistory({ hasSearch, indexEntries, supportsStatewirePaging, connectionStatus, }: {
|
|
22
|
+
hasSearch: boolean;
|
|
23
|
+
indexEntries: readonly ConversationIndexEntry[] | null;
|
|
24
|
+
supportsStatewirePaging: boolean;
|
|
25
|
+
connectionStatus: string;
|
|
26
|
+
}): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Inclusive satellite conversation history backed by the user's Pinned
|
|
29
|
+
* Statewire instance. The replicated window is the render source; refreshes,
|
|
30
|
+
* pagination, thread creation, lifecycle changes, and title changes arrive on
|
|
31
|
+
* that same channel. A non-empty search deliberately uses the authorized REST
|
|
32
|
+
* list endpoint so matches are not limited to the replicated newest window.
|
|
33
|
+
*/
|
|
34
|
+
export declare function useStatewireConversationHistory({ backendUrl, conversationIndexBaseUrl, principalId, getAuth, headers, search, enabled, sse, }: UseStatewireConversationHistoryOptions): {
|
|
35
|
+
conversations: {
|
|
36
|
+
threadId: string;
|
|
37
|
+
title: string;
|
|
38
|
+
updatedAt: string;
|
|
39
|
+
createdAt: string | null;
|
|
40
|
+
state: string | null;
|
|
41
|
+
runtime: string | null;
|
|
42
|
+
sourceChannel: string | null;
|
|
43
|
+
assetType: string | null;
|
|
44
|
+
assetId: string | null;
|
|
45
|
+
appId: string | null;
|
|
46
|
+
triggerType: string | null;
|
|
47
|
+
preview: string | null;
|
|
48
|
+
messageCount: number | null;
|
|
49
|
+
isUnread: boolean;
|
|
50
|
+
}[];
|
|
51
|
+
totalCount: number | null;
|
|
52
|
+
isLoading: boolean;
|
|
53
|
+
isFetching: boolean;
|
|
54
|
+
isRefreshing: boolean;
|
|
55
|
+
hasResolvedFirstPage: boolean;
|
|
56
|
+
hasNextPage: boolean;
|
|
57
|
+
isFetchingNextPage: boolean;
|
|
58
|
+
fetchNextPage: () => Promise<unknown>;
|
|
59
|
+
refresh: () => Promise<unknown>;
|
|
60
|
+
archiveConversation: import("@tanstack/react-query").UseMutateFunction<string, Error, string, void>;
|
|
61
|
+
archivePending: boolean;
|
|
62
|
+
setConversationReadState: import("@tanstack/react-query").UseMutateFunction<import("./api").ThreadReadStateResponse, Error, {
|
|
63
|
+
threadId: string;
|
|
64
|
+
isUnread: boolean;
|
|
65
|
+
}, {
|
|
66
|
+
previous: boolean;
|
|
67
|
+
threadId: string;
|
|
68
|
+
}>;
|
|
69
|
+
readStatePending: boolean;
|
|
70
|
+
connection: import("statewire").StatewireClient.Connection;
|
|
71
|
+
};
|