teodor-new-chat-ui 4.3.387 → 4.3.389
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/api/chat-api.d.ts +1 -2
- package/dist/components/chat/ThreadManager.d.ts +5 -1
- package/dist/context/providers/ChatSessionProvider.d.ts +1 -4
- package/dist/hooks/useThreadsState.d.ts +1 -4
- package/dist/index.esm.js +5312 -5361
- package/dist/index.umd.js +41 -41
- package/dist/lib/historyUtils.d.ts +0 -16
- package/dist/lib/index.d.ts +1 -1
- package/dist/types/index.d.ts +0 -1
- package/dist/types/models.d.ts +11 -0
- package/package.json +1 -1
- package/dist/types/user.d.ts +0 -21
package/dist/api/chat-api.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AgentDetail, AgentSchemaInfo, AgentSummary, CheckpointList, CheckpointSnapshot, HistoryPayload, SharedThreadSummary,
|
|
1
|
+
import type { AgentDetail, AgentSchemaInfo, AgentSummary, CheckpointList, CheckpointSnapshot, HistoryPayload, SharedThreadSummary, ThreadInfo, ThreadShareResponse, ThreadSummary } from "@/types";
|
|
2
2
|
import type { TokenListener } from "../types";
|
|
3
3
|
import { getChatToken, onChatTokenChanged, setChatToken } from "./utils";
|
|
4
4
|
export declare class ChatApi {
|
|
@@ -12,7 +12,6 @@ export declare class ChatApi {
|
|
|
12
12
|
onTokenChange(callback: TokenListener): () => void;
|
|
13
13
|
listThreads(): Promise<ThreadSummary[]>;
|
|
14
14
|
listSharedThreads(): Promise<SharedThreadSummary[]>;
|
|
15
|
-
listSmartOrgUsers(): Promise<SmartOrgUser[]>;
|
|
16
15
|
createThread(title?: string): Promise<ThreadInfo>;
|
|
17
16
|
updateThread(threadId: string, title: string): Promise<ThreadInfo>;
|
|
18
17
|
deleteThread(threadId: string): Promise<{
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Adjust import paths ("@/api") to wherever you placed api.ts.
|
|
6
6
|
*/
|
|
7
|
+
import type { ThreadShareTarget } from "@/types";
|
|
7
8
|
export type ThreadManagerView = "default" | "shared";
|
|
8
9
|
export interface ThreadManagerViewState {
|
|
9
10
|
view: ThreadManagerView;
|
|
@@ -43,5 +44,8 @@ export interface ThreadManagerProps {
|
|
|
43
44
|
viewOptions?: ThreadManagerViewOption[];
|
|
44
45
|
viewState?: ThreadManagerViewState;
|
|
45
46
|
showHeader?: boolean;
|
|
47
|
+
shareTargets?: ThreadShareTarget[];
|
|
48
|
+
isLoadingShareTargets?: boolean;
|
|
49
|
+
shareTargetFilter?: (target: ThreadShareTarget, query: string) => boolean;
|
|
46
50
|
}
|
|
47
|
-
export declare function ThreadManager({ className, showCreateButton, showDeleteButton, showEditTitle, maxHeight, customStyles, currentThreadId, navigateToThread, onThreadSelect, onThreadCreate, onThreadDelete, view, defaultView, onViewChange, viewOptions, viewState, showHeader, }: ThreadManagerProps): import("react/jsx-runtime").JSX.Element;
|
|
51
|
+
export declare function ThreadManager({ className, showCreateButton, showDeleteButton, showEditTitle, maxHeight, customStyles, currentThreadId, navigateToThread, onThreadSelect, onThreadCreate, onThreadDelete, view, defaultView, onViewChange, viewOptions, viewState, showHeader, shareTargets, isLoadingShareTargets, shareTargetFilter, }: ThreadManagerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
*
|
|
32
32
|
* RESULT: Much easier to debug, faster development, no stale cache issues
|
|
33
33
|
*/
|
|
34
|
-
import type { ChatMessage, HydratedCheckpointSnapshot, PendingInterrupt, SharedThreadSummary,
|
|
34
|
+
import type { ChatMessage, HydratedCheckpointSnapshot, PendingInterrupt, SharedThreadSummary, StreamContextValue, ThreadSummary, TimelineCheckpoint } from '@/types';
|
|
35
35
|
import type { ThreadStateMetadata } from '@/types/context';
|
|
36
36
|
import type { ToolEndEvent } from '@/types/events';
|
|
37
37
|
import { type ReactNode } from 'react';
|
|
@@ -43,15 +43,12 @@ interface ThreadsContextValue {
|
|
|
43
43
|
error: string | null;
|
|
44
44
|
sharedThreads: SharedThreadSummary[];
|
|
45
45
|
isLoadingSharedThreads: boolean;
|
|
46
|
-
smartOrgUsers: SmartOrgUser[];
|
|
47
|
-
isLoadingSmartOrgUsers: boolean;
|
|
48
46
|
actions: {
|
|
49
47
|
createThread: (title?: string) => Promise<string | null>;
|
|
50
48
|
deleteThread: (threadId: string) => Promise<void>;
|
|
51
49
|
renameThread: (threadId: string, title: string) => Promise<void>;
|
|
52
50
|
refreshThreads: () => Promise<void>;
|
|
53
51
|
refreshSharedThreads: () => Promise<void>;
|
|
54
|
-
refreshSmartOrgUsers: () => Promise<void>;
|
|
55
52
|
shareThread: (threadId: string, sharedWithUserId: string) => Promise<void>;
|
|
56
53
|
unshareThread: (threadId: string, shareId: string) => Promise<void>;
|
|
57
54
|
};
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { type MutableRefObject } from 'react';
|
|
2
2
|
import type { ChatApi } from '@/api/chat-api';
|
|
3
3
|
import type { ThreadInfoEvent } from '@/context/services/streaming/use-streaming-service';
|
|
4
|
-
import type { SharedThreadSummary,
|
|
4
|
+
import type { SharedThreadSummary, ThreadSummary } from '@/types';
|
|
5
5
|
interface ThreadActions {
|
|
6
6
|
createThread: (title?: string) => Promise<string | null>;
|
|
7
7
|
deleteThread: (threadId: string) => Promise<void>;
|
|
8
8
|
renameThread: (threadId: string, title: string) => Promise<void>;
|
|
9
9
|
refreshThreads: () => Promise<void>;
|
|
10
10
|
refreshSharedThreads: () => Promise<void>;
|
|
11
|
-
refreshSmartOrgUsers: () => Promise<void>;
|
|
12
11
|
shareThread: (threadId: string, sharedWithUserId: string) => Promise<void>;
|
|
13
12
|
unshareThread: (threadId: string, shareId: string) => Promise<void>;
|
|
14
13
|
}
|
|
@@ -28,8 +27,6 @@ export interface UseThreadsStateResult {
|
|
|
28
27
|
threadsError: string | null;
|
|
29
28
|
sharedThreads: SharedThreadSummary[];
|
|
30
29
|
isLoadingSharedThreads: boolean;
|
|
31
|
-
smartOrgUsers: SmartOrgUser[];
|
|
32
|
-
isLoadingSmartOrgUsers: boolean;
|
|
33
30
|
actions: ThreadActions;
|
|
34
31
|
addThreadFromEvent: (threadInfo: ThreadInfoEvent) => void;
|
|
35
32
|
shareInFlight: boolean;
|