teodor-new-chat-ui 4.3.13 → 4.3.15
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/index.esm.js +935 -948
- package/dist/index.umd.js +14 -14
- package/dist/lib/chat-api.d.ts +1 -8
- package/dist/types/api.d.ts +3 -16
- package/package.json +1 -1
package/dist/lib/chat-api.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* by the host application which passes tokens via apiConfig.
|
|
6
6
|
*/
|
|
7
7
|
import { AxiosRequestConfig } from "axios";
|
|
8
|
-
import type { ThreadSummary, ThreadInfo,
|
|
8
|
+
import type { ThreadSummary, ThreadInfo, HistoryPayload, AgentSummary, AgentDetail, AgentSchemaInfo, ResumeResponse } from "@/types/api";
|
|
9
9
|
export declare function resolveChatBaseUrl(baseUrl?: string): string;
|
|
10
10
|
type TokenListener = (token: string | null) => void;
|
|
11
11
|
export declare function getChatToken(): string | null;
|
|
@@ -35,13 +35,6 @@ export declare class ChatApi {
|
|
|
35
35
|
listAgents(): Promise<AgentSummary[]>;
|
|
36
36
|
getAgent(agentId: string): Promise<AgentDetail>;
|
|
37
37
|
getAgentSchema(agentId: string): Promise<AgentSchemaInfo>;
|
|
38
|
-
getMessages(params: {
|
|
39
|
-
threadId: string;
|
|
40
|
-
checkpointId?: string;
|
|
41
|
-
checkpointNs?: string;
|
|
42
|
-
limit?: number;
|
|
43
|
-
beforeId?: string | null;
|
|
44
|
-
}): Promise<MessagesPayload>;
|
|
45
38
|
getStateHistory(params: {
|
|
46
39
|
threadId: string;
|
|
47
40
|
checkpointId?: string;
|
package/dist/types/api.d.ts
CHANGED
|
@@ -96,16 +96,6 @@ export interface HistoryPayload {
|
|
|
96
96
|
threadId: string;
|
|
97
97
|
checkpoints: CheckpointSnapshot[];
|
|
98
98
|
}
|
|
99
|
-
export interface MessagesPayload {
|
|
100
|
-
threadId: string;
|
|
101
|
-
checkpointId?: string;
|
|
102
|
-
checkpointNs?: string;
|
|
103
|
-
messages: ChatMessage[];
|
|
104
|
-
hasMore?: boolean;
|
|
105
|
-
nextCursor?: string | null;
|
|
106
|
-
nextCursorNs?: string | null;
|
|
107
|
-
pendingInterrupt?: PendingInterrupt;
|
|
108
|
-
}
|
|
109
99
|
export interface StatePayload {
|
|
110
100
|
threadId: string;
|
|
111
101
|
checkpointId?: string;
|
|
@@ -300,11 +290,6 @@ export interface ThreadsContextValue {
|
|
|
300
290
|
persistThreadsCache: () => void;
|
|
301
291
|
hydrateFromCache: () => void;
|
|
302
292
|
}
|
|
303
|
-
export interface ThreadSnapshot extends HydratedCheckpointSnapshot {
|
|
304
|
-
threadId: string;
|
|
305
|
-
hasMore?: boolean;
|
|
306
|
-
pendingInterrupt?: PendingInterrupt;
|
|
307
|
-
}
|
|
308
293
|
export interface ThreadStateMetadata {
|
|
309
294
|
branchLabel?: string | null;
|
|
310
295
|
lastBranch?: Extract<StreamEvent, {
|
|
@@ -329,7 +314,9 @@ export interface ThreadStateContextValue {
|
|
|
329
314
|
loadOlder: (opts?: {
|
|
330
315
|
limit?: number;
|
|
331
316
|
}) => Promise<void>;
|
|
332
|
-
seedFromSnapshot: (snapshot:
|
|
317
|
+
seedFromSnapshot: (snapshot: HydratedCheckpointSnapshot & {
|
|
318
|
+
threadId: string;
|
|
319
|
+
}) => void;
|
|
333
320
|
clearState: () => void;
|
|
334
321
|
navigateToCheckpoint: (checkpointId: string, checkpointNs?: string | null) => Promise<void>;
|
|
335
322
|
returnToLatest: () => Promise<void>;
|
package/package.json
CHANGED