@hsafa/ui-sdk 0.5.5 → 5.5.6
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.cjs +8 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +16 -8
- package/dist/index.d.ts +16 -8
- package/dist/index.js +8 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -110,7 +110,7 @@ type AssistantContentPart = {
|
|
|
110
110
|
type: 'tool-call';
|
|
111
111
|
toolCallId: string;
|
|
112
112
|
toolName?: string;
|
|
113
|
-
input?:
|
|
113
|
+
input?: unknown;
|
|
114
114
|
};
|
|
115
115
|
type ChatMessage = {
|
|
116
116
|
id: string;
|
|
@@ -123,23 +123,31 @@ type ChatMessage = {
|
|
|
123
123
|
id: string;
|
|
124
124
|
role: 'assistant';
|
|
125
125
|
content?: string | AssistantContentPart[];
|
|
126
|
-
items:
|
|
126
|
+
items: unknown[];
|
|
127
127
|
reasoning?: string;
|
|
128
128
|
reasoningOpen?: boolean;
|
|
129
|
-
mainAgentActions?:
|
|
129
|
+
mainAgentActions?: unknown[];
|
|
130
130
|
createdAt?: number;
|
|
131
131
|
};
|
|
132
|
-
type HsafaTool = ((input:
|
|
133
|
-
tool: (input:
|
|
132
|
+
type HsafaTool = ((input: unknown) => unknown | Promise<unknown>) | {
|
|
133
|
+
tool: (input: unknown) => unknown | Promise<unknown>;
|
|
134
134
|
executeEachToken?: boolean;
|
|
135
|
+
inputting_start?: (input: unknown, ctx: {
|
|
136
|
+
toolCallId: string;
|
|
137
|
+
toolName: string;
|
|
138
|
+
}) => void;
|
|
139
|
+
running_start?: (input: unknown, ctx: {
|
|
140
|
+
toolCallId: string;
|
|
141
|
+
toolName: string;
|
|
142
|
+
}) => void;
|
|
135
143
|
};
|
|
136
144
|
type CustomToolUIRenderProps = {
|
|
137
145
|
toolName: string;
|
|
138
146
|
toolCallId: string;
|
|
139
|
-
input:
|
|
140
|
-
output:
|
|
147
|
+
input: unknown;
|
|
148
|
+
output: unknown;
|
|
141
149
|
status?: string;
|
|
142
|
-
addToolResult: (result:
|
|
150
|
+
addToolResult: (result: unknown) => void;
|
|
143
151
|
};
|
|
144
152
|
interface HsafaChatProps {
|
|
145
153
|
agentId: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -110,7 +110,7 @@ type AssistantContentPart = {
|
|
|
110
110
|
type: 'tool-call';
|
|
111
111
|
toolCallId: string;
|
|
112
112
|
toolName?: string;
|
|
113
|
-
input?:
|
|
113
|
+
input?: unknown;
|
|
114
114
|
};
|
|
115
115
|
type ChatMessage = {
|
|
116
116
|
id: string;
|
|
@@ -123,23 +123,31 @@ type ChatMessage = {
|
|
|
123
123
|
id: string;
|
|
124
124
|
role: 'assistant';
|
|
125
125
|
content?: string | AssistantContentPart[];
|
|
126
|
-
items:
|
|
126
|
+
items: unknown[];
|
|
127
127
|
reasoning?: string;
|
|
128
128
|
reasoningOpen?: boolean;
|
|
129
|
-
mainAgentActions?:
|
|
129
|
+
mainAgentActions?: unknown[];
|
|
130
130
|
createdAt?: number;
|
|
131
131
|
};
|
|
132
|
-
type HsafaTool = ((input:
|
|
133
|
-
tool: (input:
|
|
132
|
+
type HsafaTool = ((input: unknown) => unknown | Promise<unknown>) | {
|
|
133
|
+
tool: (input: unknown) => unknown | Promise<unknown>;
|
|
134
134
|
executeEachToken?: boolean;
|
|
135
|
+
inputting_start?: (input: unknown, ctx: {
|
|
136
|
+
toolCallId: string;
|
|
137
|
+
toolName: string;
|
|
138
|
+
}) => void;
|
|
139
|
+
running_start?: (input: unknown, ctx: {
|
|
140
|
+
toolCallId: string;
|
|
141
|
+
toolName: string;
|
|
142
|
+
}) => void;
|
|
135
143
|
};
|
|
136
144
|
type CustomToolUIRenderProps = {
|
|
137
145
|
toolName: string;
|
|
138
146
|
toolCallId: string;
|
|
139
|
-
input:
|
|
140
|
-
output:
|
|
147
|
+
input: unknown;
|
|
148
|
+
output: unknown;
|
|
141
149
|
status?: string;
|
|
142
|
-
addToolResult: (result:
|
|
150
|
+
addToolResult: (result: unknown) => void;
|
|
143
151
|
};
|
|
144
152
|
interface HsafaChatProps {
|
|
145
153
|
agentId: string;
|