teodor-new-chat-ui 4.0.2 → 4.0.4
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 +22 -11
- package/dist/index.umd.js +17 -17
- package/dist/types/api.d.ts +20 -11
- package/package.json +1 -1
package/dist/types/api.d.ts
CHANGED
|
@@ -57,6 +57,24 @@ export interface ChatRequest {
|
|
|
57
57
|
branchLabel?: string;
|
|
58
58
|
active_agent?: string;
|
|
59
59
|
}
|
|
60
|
+
type ToolEventIdentity = {
|
|
61
|
+
id: string;
|
|
62
|
+
call_id?: string;
|
|
63
|
+
} | {
|
|
64
|
+
call_id: string;
|
|
65
|
+
id?: string;
|
|
66
|
+
};
|
|
67
|
+
export type ToolStartEvent = {
|
|
68
|
+
type: "tool_start";
|
|
69
|
+
args: Record<string, unknown>;
|
|
70
|
+
name?: string;
|
|
71
|
+
tool?: string;
|
|
72
|
+
} & ToolEventIdentity;
|
|
73
|
+
export type ToolResultEvent = {
|
|
74
|
+
type: "tool_result";
|
|
75
|
+
output: unknown;
|
|
76
|
+
error?: string;
|
|
77
|
+
} & ToolEventIdentity;
|
|
60
78
|
export type StreamEvent = {
|
|
61
79
|
type: "token";
|
|
62
80
|
content: string;
|
|
@@ -68,17 +86,7 @@ export type StreamEvent = {
|
|
|
68
86
|
} | {
|
|
69
87
|
type: "message_delta";
|
|
70
88
|
delta: MessagePart[];
|
|
71
|
-
} | {
|
|
72
|
-
type: "tool_start";
|
|
73
|
-
id: string;
|
|
74
|
-
name: string;
|
|
75
|
-
args: Record<string, unknown>;
|
|
76
|
-
} | {
|
|
77
|
-
type: "tool_result";
|
|
78
|
-
id: string;
|
|
79
|
-
output: unknown;
|
|
80
|
-
error?: string;
|
|
81
|
-
} | {
|
|
89
|
+
} | ToolStartEvent | ToolResultEvent | {
|
|
82
90
|
type: "message_end";
|
|
83
91
|
} | {
|
|
84
92
|
type: "checkpoint";
|
|
@@ -211,3 +219,4 @@ export interface ApiConfig {
|
|
|
211
219
|
getToken?: () => string | null;
|
|
212
220
|
uploadPath?: string;
|
|
213
221
|
}
|
|
222
|
+
export {};
|
package/package.json
CHANGED