@teodorruskvi/chat-core 0.1.34 → 0.1.35
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/ThreadsProvider.d.ts +6 -1
- package/dist/features/conversation/contexts/reducers/MessageReducer.d.ts +3 -6
- package/dist/features/conversation/hooks/useChatSession.d.ts +12 -14
- package/dist/features/conversation/hooks/useThreadHistoryState.d.ts +5 -1
- package/dist/features/streaming/contexts/StreamingProvider.d.ts +6 -1
- package/dist/features/streaming/contexts/types.d.ts +1 -0
- package/dist/index.esm.js +1855 -2225
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +7 -7
- package/dist/index.umd.js.map +1 -1
- package/dist/types/domain/messages.d.ts +9 -0
- package/dist/types/domain/streaming.d.ts +2 -1
- package/package.json +1 -1
- package/dist/features/persistence/checkpoints/utils/editUtils.d.ts +0 -11
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { ChatMessage, PendingInterrupt, StreamEvent } from "@/types";
|
|
2
|
+
export type ChatStatus = 'idle' | 'loading' | 'streaming' | 'awaiting_input' | 'error';
|
|
2
3
|
export interface MessagesState {
|
|
4
|
+
status: ChatStatus;
|
|
3
5
|
messages: ChatMessage[];
|
|
4
6
|
taskMessagesByScope: Record<string, ChatMessage[]>;
|
|
5
7
|
assemblingId: string | null;
|
|
@@ -11,6 +13,7 @@ export interface MessagesState {
|
|
|
11
13
|
lastText?: string;
|
|
12
14
|
}>;
|
|
13
15
|
values: Record<string, unknown>;
|
|
16
|
+
error: string | null;
|
|
14
17
|
}
|
|
15
18
|
export type MessagesAction = {
|
|
16
19
|
type: "reset";
|
|
@@ -26,6 +29,12 @@ export type MessagesAction = {
|
|
|
26
29
|
pendingInterrupt?: PendingInterrupt;
|
|
27
30
|
values?: Record<string, unknown>;
|
|
28
31
|
};
|
|
32
|
+
} | {
|
|
33
|
+
type: "status";
|
|
34
|
+
payload: {
|
|
35
|
+
status: ChatStatus;
|
|
36
|
+
error?: string | null;
|
|
37
|
+
};
|
|
29
38
|
} | {
|
|
30
39
|
type: "prepend";
|
|
31
40
|
payload: {
|
|
@@ -89,13 +89,14 @@ export type ToolEndEvent = {
|
|
|
89
89
|
tool?: string;
|
|
90
90
|
seq?: number;
|
|
91
91
|
additionalKwargs?: Record<string, unknown>;
|
|
92
|
+
status?: "completed" | "failed";
|
|
92
93
|
} & ToolEventIdentity;
|
|
93
94
|
export type ToolProgressEvent = {
|
|
94
95
|
type: "tool.progress";
|
|
95
96
|
content?: string;
|
|
96
97
|
id?: string;
|
|
97
98
|
callId?: string;
|
|
98
|
-
status?: string;
|
|
99
|
+
status?: "running" | "completed" | "failed" | string;
|
|
99
100
|
step?: string;
|
|
100
101
|
metadata?: Record<string, unknown>;
|
|
101
102
|
idx?: number;
|
package/package.json
CHANGED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { TimelineCheckpoint } from "../types";
|
|
2
|
-
type ParentCheckpointInfo = {
|
|
3
|
-
checkpointId: string;
|
|
4
|
-
checkpointNs: string | null;
|
|
5
|
-
};
|
|
6
|
-
/**
|
|
7
|
-
* Given the timeline checkpoints for a thread, find the parent checkpoint that the
|
|
8
|
-
* backend should branch from when editing the provided message id.
|
|
9
|
-
*/
|
|
10
|
-
export declare function findParentCheckpointForEdit(timeline: TimelineCheckpoint[], messageId: string): ParentCheckpointInfo;
|
|
11
|
-
export {};
|