teodor-new-chat-ui 4.3.761 → 4.3.764
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/features/conversation/contexts/ThreadStateProvider.d.ts +6 -1
- package/dist/features/conversation/hooks/useChatController.d.ts +1 -1
- package/dist/features/conversation/hooks/useChatSession.d.ts +28 -13
- package/dist/index.esm.js +1503 -1474
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +32 -32
- package/dist/index.umd.js.map +1 -1
- package/dist/lib/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -13,7 +13,12 @@ interface ThreadStateUpdater {
|
|
|
13
13
|
registerClearThread: (fn: ThreadStateContextValue['clearThread']) => void;
|
|
14
14
|
registerRespondToInterrupt: (fn: ThreadStateContextValue['respondToInterrupt']) => void;
|
|
15
15
|
}
|
|
16
|
-
export declare function useThreadState(
|
|
16
|
+
export declare function useThreadState(options: {
|
|
17
|
+
optional: true;
|
|
18
|
+
}): ThreadStateContextValue | null;
|
|
19
|
+
export declare function useThreadState(options?: {
|
|
20
|
+
optional?: false;
|
|
21
|
+
}): ThreadStateContextValue;
|
|
17
22
|
export declare function useThreadStateUpdater(): ThreadStateUpdater;
|
|
18
23
|
export declare function ThreadStateProvider({ children, initialThreadId, initialCheckpointId, initialCheckpointNs, autoLoadInitial, isStreaming, onError, }: ThreadStateProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
19
24
|
export {};
|
|
@@ -46,5 +46,5 @@ export declare function useChatController({ submit, chatRequest, lastCheckpointI
|
|
|
46
46
|
startEditing: (messageId: string, content: string, meta?: EditContextMeta) => void;
|
|
47
47
|
cancelEditing: () => void;
|
|
48
48
|
handleRegenerateCb: (messageIndex: number) => void;
|
|
49
|
-
displayMessages:
|
|
49
|
+
displayMessages: any[];
|
|
50
50
|
};
|
|
@@ -1,29 +1,44 @@
|
|
|
1
|
-
|
|
1
|
+
type UseChatSessionOptions = string | {
|
|
2
|
+
threadId?: string;
|
|
3
|
+
} | undefined;
|
|
4
|
+
export declare function useChatSession(options?: UseChatSessionOptions): {
|
|
2
5
|
threadId: string | null;
|
|
3
|
-
messages:
|
|
4
|
-
isHistoryLoading: boolean;
|
|
6
|
+
messages: any[];
|
|
5
7
|
isLoading: boolean;
|
|
8
|
+
isHistoryLoading: boolean;
|
|
9
|
+
error: string | null;
|
|
10
|
+
values: Record<string, unknown>;
|
|
11
|
+
metadata: {
|
|
12
|
+
assemblingMessageId: string | null;
|
|
13
|
+
} | undefined;
|
|
6
14
|
navigateToCheckpoint: (checkpointId: string, checkpointNs?: string | null) => Promise<void>;
|
|
7
15
|
returnToLatest: () => Promise<void>;
|
|
8
16
|
checkpoint: {
|
|
9
17
|
id: string | null;
|
|
10
18
|
namespace: string | null;
|
|
11
|
-
};
|
|
19
|
+
} | null;
|
|
12
20
|
checkpoints: import("../../persistence").HydratedCheckpointSnapshot[];
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
assemblingMessageId: string | null;
|
|
21
|
+
checkpointIndex: import("../../persistence").CheckpointIndex | {
|
|
22
|
+
timeline: never[];
|
|
23
|
+
messagePreviews: {};
|
|
17
24
|
};
|
|
18
|
-
|
|
25
|
+
interrupt: {
|
|
26
|
+
id: string;
|
|
27
|
+
value: unknown;
|
|
28
|
+
alternatives?: import("../../../types").InterruptAlternative[];
|
|
29
|
+
} | null;
|
|
30
|
+
respondToInterrupt: (approved: boolean, value?: unknown, options?: any) => Promise<void>;
|
|
19
31
|
isStreaming: boolean;
|
|
20
|
-
error: string | null;
|
|
21
32
|
activeMessageId: string | null;
|
|
22
|
-
connectionState:
|
|
33
|
+
connectionState: string;
|
|
34
|
+
streamingAssistantId: string | null;
|
|
23
35
|
submit: (input: import("../../../types").StreamSubmitPayload, callbacks?: import("../../../types").StreamCallbacks) => Promise<void>;
|
|
24
36
|
stop: () => void;
|
|
25
|
-
values: Record<string, unknown>;
|
|
26
|
-
streamingAssistantId: string | null;
|
|
27
37
|
clearThread: () => Promise<void> | void;
|
|
28
38
|
setCurrentThreadId: (id: string | null) => void;
|
|
39
|
+
createThread: (title?: string, project?: ({
|
|
40
|
+
id: string;
|
|
41
|
+
name?: string;
|
|
42
|
+
} | import("../../../types").ProjectInfo | null)) => Promise<string | null>;
|
|
29
43
|
};
|
|
44
|
+
export {};
|