@assistant-ui/react-data-stream 0.11.12 → 0.11.13
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/converters/index.d.ts +1 -1
- package/dist/converters/index.d.ts.map +1 -1
- package/dist/converters/index.js +1 -5
- package/dist/converters/index.js.map +1 -1
- package/dist/converters/toLanguageModelMessages.js +135 -136
- package/dist/converters/toLanguageModelMessages.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/dist/useCloudRuntime.d.ts +1 -1
- package/dist/useCloudRuntime.d.ts.map +1 -1
- package/dist/useCloudRuntime.js +10 -15
- package/dist/useCloudRuntime.js.map +1 -1
- package/dist/useDataStreamRuntime.js +74 -102
- package/dist/useDataStreamRuntime.js.map +1 -1
- package/package.json +22 -11
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { toLanguageModelMessages } from "./toLanguageModelMessages";
|
|
1
|
+
export { toLanguageModelMessages } from "./toLanguageModelMessages.js";
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/converters/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/converters/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,qCAAkC"}
|
package/dist/converters/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/converters/index.ts"],"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/converters/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,qCAAkC"}
|
|
@@ -1,145 +1,144 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
assistantMessage.content.push(part);
|
|
27
|
-
},
|
|
28
|
-
addToolCallPart: (part) => {
|
|
29
|
-
assistantMessage.content.push({
|
|
30
|
-
type: "tool-call",
|
|
31
|
-
toolCallId: part.toolCallId,
|
|
32
|
-
toolName: part.toolName,
|
|
33
|
-
args: part.args
|
|
34
|
-
});
|
|
35
|
-
toolMessage.content.push({
|
|
36
|
-
type: "tool-result",
|
|
37
|
-
toolCallId: part.toolCallId,
|
|
38
|
-
toolName: part.toolName,
|
|
39
|
-
..."artifact" in part ? { artifact: part.artifact } : {},
|
|
40
|
-
result: part.result === void 0 ? "Error: tool is has no configured code to run" : part.result,
|
|
41
|
-
isError: part.isError ?? part.result === void 0
|
|
42
|
-
});
|
|
43
|
-
},
|
|
44
|
-
getMessages: () => {
|
|
45
|
-
if (toolMessage.content.length > 0) {
|
|
46
|
-
return [...stash, assistantMessage, toolMessage];
|
|
47
|
-
}
|
|
48
|
-
return [...stash, assistantMessage];
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
|
-
function toLanguageModelMessages(message, options = {}) {
|
|
53
|
-
const includeId = options.unstable_includeId ?? false;
|
|
54
|
-
return message.flatMap((message2) => {
|
|
55
|
-
const role = message2.role;
|
|
56
|
-
switch (role) {
|
|
57
|
-
case "system": {
|
|
58
|
-
return [
|
|
59
|
-
{
|
|
60
|
-
...includeId ? { unstable_id: message2.id } : {},
|
|
61
|
-
role: "system",
|
|
62
|
-
content: message2.content[0].text
|
|
63
|
-
}
|
|
64
|
-
];
|
|
65
|
-
}
|
|
66
|
-
case "user": {
|
|
67
|
-
const attachments = "attachments" in message2 ? message2.attachments : [];
|
|
68
|
-
const content = [
|
|
69
|
-
...message2.content,
|
|
70
|
-
...attachments.map((a) => a.content).flat()
|
|
71
|
-
];
|
|
72
|
-
const msg = {
|
|
73
|
-
...includeId ? { unstable_id: message2.id } : {},
|
|
74
|
-
role: "user",
|
|
75
|
-
content: content.map(
|
|
76
|
-
(part) => {
|
|
77
|
-
const type = part.type;
|
|
78
|
-
switch (type) {
|
|
79
|
-
case "text": {
|
|
80
|
-
return part;
|
|
81
|
-
}
|
|
82
|
-
case "image": {
|
|
83
|
-
return {
|
|
84
|
-
type: "image",
|
|
85
|
-
image: new URL(part.image)
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
case "file": {
|
|
89
|
-
return {
|
|
90
|
-
type: "file",
|
|
91
|
-
data: new URL(part.data),
|
|
92
|
-
mimeType: part.mimeType
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
default: {
|
|
96
|
-
const unhandledType = type;
|
|
97
|
-
throw new Error(
|
|
98
|
-
`Unspported message part type: ${unhandledType}`
|
|
99
|
-
);
|
|
100
|
-
}
|
|
101
|
-
}
|
|
1
|
+
const assistantMessageSplitter = () => {
|
|
2
|
+
const stash = [];
|
|
3
|
+
let assistantMessage = {
|
|
4
|
+
role: "assistant",
|
|
5
|
+
content: [],
|
|
6
|
+
};
|
|
7
|
+
let toolMessage = {
|
|
8
|
+
role: "tool",
|
|
9
|
+
content: [],
|
|
10
|
+
};
|
|
11
|
+
return {
|
|
12
|
+
addTextMessagePart: (part) => {
|
|
13
|
+
if (toolMessage.content.length > 0) {
|
|
14
|
+
stash.push(assistantMessage);
|
|
15
|
+
stash.push(toolMessage);
|
|
16
|
+
assistantMessage = {
|
|
17
|
+
role: "assistant",
|
|
18
|
+
content: [],
|
|
19
|
+
};
|
|
20
|
+
toolMessage = {
|
|
21
|
+
role: "tool",
|
|
22
|
+
content: [],
|
|
23
|
+
};
|
|
102
24
|
}
|
|
103
|
-
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
25
|
+
assistantMessage.content.push(part);
|
|
26
|
+
},
|
|
27
|
+
addToolCallPart: (part) => {
|
|
28
|
+
assistantMessage.content.push({
|
|
29
|
+
type: "tool-call",
|
|
30
|
+
toolCallId: part.toolCallId,
|
|
31
|
+
toolName: part.toolName,
|
|
32
|
+
args: part.args,
|
|
33
|
+
});
|
|
34
|
+
toolMessage.content.push({
|
|
35
|
+
type: "tool-result",
|
|
36
|
+
toolCallId: part.toolCallId,
|
|
37
|
+
toolName: part.toolName,
|
|
38
|
+
...("artifact" in part ? { artifact: part.artifact } : {}),
|
|
39
|
+
result: part.result === undefined
|
|
40
|
+
? "Error: tool is has no configured code to run"
|
|
41
|
+
: part.result,
|
|
42
|
+
isError: part.isError ?? part.result === undefined,
|
|
43
|
+
});
|
|
44
|
+
},
|
|
45
|
+
getMessages: () => {
|
|
46
|
+
if (toolMessage.content.length > 0) {
|
|
47
|
+
return [...stash, assistantMessage, toolMessage];
|
|
118
48
|
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
49
|
+
return [...stash, assistantMessage];
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* @deprecated This is an internal API and may change without notice.
|
|
55
|
+
*/
|
|
56
|
+
export function toLanguageModelMessages(message, options = {}) {
|
|
57
|
+
const includeId = options.unstable_includeId ?? false;
|
|
58
|
+
return message.flatMap((message) => {
|
|
59
|
+
const role = message.role;
|
|
60
|
+
switch (role) {
|
|
61
|
+
case "system": {
|
|
62
|
+
return [
|
|
63
|
+
{
|
|
64
|
+
...(includeId
|
|
65
|
+
? { unstable_id: message.id }
|
|
66
|
+
: {}),
|
|
67
|
+
role: "system",
|
|
68
|
+
content: message.content[0].text,
|
|
69
|
+
},
|
|
70
|
+
];
|
|
71
|
+
}
|
|
72
|
+
case "user": {
|
|
73
|
+
const attachments = "attachments" in message ? message.attachments : [];
|
|
74
|
+
const content = [
|
|
75
|
+
...message.content,
|
|
76
|
+
...attachments.map((a) => a.content).flat(),
|
|
77
|
+
];
|
|
78
|
+
const msg = {
|
|
79
|
+
...(includeId ? { unstable_id: message.id } : {}),
|
|
80
|
+
role: "user",
|
|
81
|
+
content: content.map((part) => {
|
|
82
|
+
const type = part.type;
|
|
83
|
+
switch (type) {
|
|
84
|
+
case "text": {
|
|
85
|
+
return part;
|
|
86
|
+
}
|
|
87
|
+
case "image": {
|
|
88
|
+
return {
|
|
89
|
+
type: "image",
|
|
90
|
+
image: new URL(part.image),
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
case "file": {
|
|
94
|
+
return {
|
|
95
|
+
type: "file",
|
|
96
|
+
data: new URL(part.data),
|
|
97
|
+
mimeType: part.mimeType,
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
default: {
|
|
101
|
+
const unhandledType = type;
|
|
102
|
+
throw new Error(`Unspported message part type: ${unhandledType}`);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}),
|
|
106
|
+
};
|
|
107
|
+
return [msg];
|
|
122
108
|
}
|
|
123
|
-
case "
|
|
124
|
-
|
|
125
|
-
|
|
109
|
+
case "assistant": {
|
|
110
|
+
const splitter = assistantMessageSplitter();
|
|
111
|
+
for (const part of message.content) {
|
|
112
|
+
const type = part.type;
|
|
113
|
+
switch (type) {
|
|
114
|
+
case "reasoning":
|
|
115
|
+
case "source":
|
|
116
|
+
case "file":
|
|
117
|
+
case "data":
|
|
118
|
+
case "image": {
|
|
119
|
+
break; // reasoning, source, file, and image parts are omitted
|
|
120
|
+
}
|
|
121
|
+
case "text": {
|
|
122
|
+
splitter.addTextMessagePart(part);
|
|
123
|
+
break;
|
|
124
|
+
}
|
|
125
|
+
case "tool-call": {
|
|
126
|
+
splitter.addToolCallPart(part);
|
|
127
|
+
break;
|
|
128
|
+
}
|
|
129
|
+
default: {
|
|
130
|
+
const unhandledType = type;
|
|
131
|
+
throw new Error(`Unhandled message part type: ${unhandledType}`);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
return splitter.getMessages();
|
|
126
136
|
}
|
|
127
137
|
default: {
|
|
128
|
-
|
|
129
|
-
|
|
138
|
+
const unhandledRole = role;
|
|
139
|
+
throw new Error(`Unknown message role: ${unhandledRole}`);
|
|
130
140
|
}
|
|
131
|
-
}
|
|
132
141
|
}
|
|
133
|
-
|
|
134
|
-
}
|
|
135
|
-
default: {
|
|
136
|
-
const unhandledRole = role;
|
|
137
|
-
throw new Error(`Unknown message role: ${unhandledRole}`);
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
});
|
|
142
|
+
});
|
|
141
143
|
}
|
|
142
|
-
export {
|
|
143
|
-
toLanguageModelMessages
|
|
144
|
-
};
|
|
145
144
|
//# sourceMappingURL=toLanguageModelMessages.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"toLanguageModelMessages.js","sourceRoot":"","sources":["../../src/converters/toLanguageModelMessages.ts"],"names":[],"mappings":"AAcA,MAAM,wBAAwB,GAAG,GAAG,EAAE;IACpC,MAAM,KAAK,GAA6B,EAAE,CAAC;IAC3C,IAAI,gBAAgB,GAAG;QACrB,IAAI,EAAE,WAAoB;QAC1B,OAAO,EAAE,EAA+D;KACzE,CAAC;IACF,IAAI,WAAW,GAAG;QAChB,IAAI,EAAE,MAAe;QACrB,OAAO,EAAE,EAAqC;KAC/C,CAAC;IAEF,OAAO;QACL,kBAAkB,EAAE,CAAC,IAAqB,EAAE,EAAE;YAC5C,IAAI,WAAW,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBACnC,KAAK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,kBAAkB,CAAC,IAAI,CAAC,CAAC;4BAClC,MAAM;wBACR,CAAC;wBACD,KAAK,WAAW,CAAC,CAAC,CAAC;4BACjB,QAAQ,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;4BAC/B,MAAM;wBACR,CAAC;wBACD,OAAO,CAAC,CAAC,CAAC;4BACR,MAAM,aAAa,GAAU,IAAI,CAAC;4BAClC,MAAM,IAAI,KAAK,CAAC,gCAAgC,aAAa,EAAE,CAAC,CAAC;wBACnE,CAAC;oBACH,CAAC;gBACH,CAAC;gBACD,OAAO,QAAQ,CAAC,WAAW,EAAE,CAAC;YAChC,CAAC;YAED,OAAO,CAAC,CAAC,CAAC;gBACR,MAAM,aAAa,GAAU,IAAI,CAAC;gBAClC,MAAM,IAAI,KAAK,CAAC,yBAAyB,aAAa,EAAE,CAAC,CAAC;YAC5D,CAAC;QACH,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from "./useDataStreamRuntime";
|
|
2
|
-
export * from "./useCloudRuntime";
|
|
3
|
-
export * from "./converters";
|
|
1
|
+
export * from "./useDataStreamRuntime.js";
|
|
2
|
+
export * from "./useCloudRuntime.js";
|
|
3
|
+
export * from "./converters/index.js";
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,0CAAuC;AACvC,qCAAkC;AAClC,sCAA6B"}
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,0CAAuC;AACvC,qCAAkC;AAClC,sCAA6B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AssistantCloud } from "@assistant-ui/react";
|
|
2
|
-
import { UseDataStreamRuntimeOptions } from "./useDataStreamRuntime";
|
|
2
|
+
import { UseDataStreamRuntimeOptions } from "./useDataStreamRuntime.js";
|
|
3
3
|
type UseCloudRuntimeOptions = Omit<UseDataStreamRuntimeOptions, "api"> & {
|
|
4
4
|
cloud: AssistantCloud;
|
|
5
5
|
assistantId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCloudRuntime.d.ts","sourceRoot":"","sources":["../src/useCloudRuntime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAEL,2BAA2B,EAC5B,
|
|
1
|
+
{"version":3,"file":"useCloudRuntime.d.ts","sourceRoot":"","sources":["../src/useCloudRuntime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAEL,2BAA2B,EAC5B,kCAA+B;AAEhC,KAAK,sBAAsB,GAAG,IAAI,CAAC,2BAA2B,EAAE,KAAK,CAAC,GAAG;IACvE,KAAK,EAAE,cAAc,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,GAAI,SAAS,sBAAsB,mDAS9D,CAAC"}
|
package/dist/useCloudRuntime.js
CHANGED
|
@@ -1,17 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
...opts
|
|
12
|
-
});
|
|
13
|
-
};
|
|
14
|
-
export {
|
|
15
|
-
useCloudRuntime
|
|
1
|
+
import { useDataStreamRuntime, } from "./useDataStreamRuntime.js";
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated This is under active development and not yet ready for prod use.
|
|
4
|
+
*/
|
|
5
|
+
export const useCloudRuntime = (options) => {
|
|
6
|
+
const opts = options.cloud.runs.__internal_getAssistantOptions(options.assistantId);
|
|
7
|
+
return useDataStreamRuntime({
|
|
8
|
+
...options,
|
|
9
|
+
...opts,
|
|
10
|
+
});
|
|
16
11
|
};
|
|
17
12
|
//# sourceMappingURL=useCloudRuntime.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"useCloudRuntime.js","sourceRoot":"","sources":["../src/useCloudRuntime.ts"],"names":[],"mappings":"AACA,OAAO,EACL,oBAAoB,GAErB,kCAA+B;AAOhC;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,OAA+B,EAAE,EAAE;IACjE,MAAM,IAAI,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,8BAA8B,CAC5D,OAAO,CAAC,WAAW,CACpB,CAAC;IAEF,OAAO,oBAAoB,CAAC;QAC1B,GAAG,OAAO;QACV,GAAG,IAAI;KACR,CAAC,CAAC;AACL,CAAC,CAAC"}
|
|
@@ -1,111 +1,83 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
// src/useDataStreamRuntime.ts
|
|
4
2
|
import { toLanguageModelMessages } from "./converters/index.js";
|
|
5
|
-
import {
|
|
6
|
-
INTERNAL,
|
|
7
|
-
useLocalRuntime
|
|
8
|
-
} from "@assistant-ui/react";
|
|
3
|
+
import { INTERNAL, useLocalRuntime, } from "@assistant-ui/react";
|
|
9
4
|
import { z } from "zod";
|
|
10
|
-
import {
|
|
11
|
-
AssistantMessageAccumulator,
|
|
12
|
-
DataStreamDecoder,
|
|
13
|
-
unstable_toolResultStream
|
|
14
|
-
} from "assistant-stream";
|
|
5
|
+
import { AssistantMessageAccumulator, DataStreamDecoder, unstable_toolResultStream, } from "assistant-stream";
|
|
15
6
|
import { asAsyncIterableStream } from "assistant-stream/utils";
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
7
|
+
const { splitLocalRuntimeOptions } = INTERNAL;
|
|
8
|
+
const toAISDKTools = (tools) => {
|
|
9
|
+
return Object.fromEntries(Object.entries(tools).map(([name, tool]) => [
|
|
10
|
+
name,
|
|
11
|
+
{
|
|
12
|
+
...(tool.description ? { description: tool.description } : undefined),
|
|
13
|
+
parameters: (tool.parameters instanceof z.ZodType
|
|
14
|
+
? z.toJSONSchema(tool.parameters)
|
|
15
|
+
: tool.parameters),
|
|
16
|
+
},
|
|
17
|
+
]));
|
|
27
18
|
};
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
Object.entries(tools).filter(
|
|
31
|
-
([, tool]) => !tool.disabled && tool.type !== "backend"
|
|
32
|
-
)
|
|
33
|
-
);
|
|
19
|
+
const getEnabledTools = (tools) => {
|
|
20
|
+
return Object.fromEntries(Object.entries(tools).filter(([, tool]) => !tool.disabled && tool.type !== "backend"));
|
|
34
21
|
};
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
async *run({
|
|
40
|
-
messages,
|
|
41
|
-
runConfig,
|
|
42
|
-
abortSignal,
|
|
43
|
-
context,
|
|
44
|
-
unstable_assistantMessageId,
|
|
45
|
-
unstable_getMessage
|
|
46
|
-
}) {
|
|
47
|
-
const headersValue = typeof this.options.headers === "function" ? await this.options.headers() : this.options.headers;
|
|
48
|
-
abortSignal.addEventListener(
|
|
49
|
-
"abort",
|
|
50
|
-
() => {
|
|
51
|
-
if (!abortSignal.reason?.detach) this.options.onCancel?.();
|
|
52
|
-
},
|
|
53
|
-
{ once: true }
|
|
54
|
-
);
|
|
55
|
-
const headers = new Headers(headersValue);
|
|
56
|
-
headers.set("Content-Type", "application/json");
|
|
57
|
-
const result = await fetch(this.options.api, {
|
|
58
|
-
method: "POST",
|
|
59
|
-
headers,
|
|
60
|
-
credentials: this.options.credentials ?? "same-origin",
|
|
61
|
-
body: JSON.stringify({
|
|
62
|
-
system: context.system,
|
|
63
|
-
messages: toLanguageModelMessages(messages, {
|
|
64
|
-
unstable_includeId: this.options.sendExtraMessageFields
|
|
65
|
-
}),
|
|
66
|
-
tools: toAISDKTools(
|
|
67
|
-
getEnabledTools(context.tools ?? {})
|
|
68
|
-
),
|
|
69
|
-
...unstable_assistantMessageId ? { unstable_assistantMessageId } : {},
|
|
70
|
-
runConfig,
|
|
71
|
-
state: unstable_getMessage().metadata.unstable_state || void 0,
|
|
72
|
-
...context.callSettings,
|
|
73
|
-
...context.config,
|
|
74
|
-
...this.options.body
|
|
75
|
-
}),
|
|
76
|
-
signal: abortSignal
|
|
77
|
-
});
|
|
78
|
-
await this.options.onResponse?.(result);
|
|
79
|
-
try {
|
|
80
|
-
if (!result.ok) {
|
|
81
|
-
throw new Error(`Status ${result.status}: ${await result.text()}`);
|
|
82
|
-
}
|
|
83
|
-
if (!result.body) {
|
|
84
|
-
throw new Error("Response body is null");
|
|
85
|
-
}
|
|
86
|
-
const stream = result.body.pipeThrough(new DataStreamDecoder()).pipeThrough(
|
|
87
|
-
unstable_toolResultStream(context.tools, abortSignal, () => {
|
|
88
|
-
throw new Error(
|
|
89
|
-
"Tool interrupt is not supported in data stream runtime"
|
|
90
|
-
);
|
|
91
|
-
})
|
|
92
|
-
).pipeThrough(new AssistantMessageAccumulator());
|
|
93
|
-
yield* asAsyncIterableStream(stream);
|
|
94
|
-
this.options.onFinish?.(unstable_getMessage());
|
|
95
|
-
} catch (error) {
|
|
96
|
-
this.options.onError?.(error);
|
|
97
|
-
throw error;
|
|
22
|
+
class DataStreamRuntimeAdapter {
|
|
23
|
+
options;
|
|
24
|
+
constructor(options) {
|
|
25
|
+
this.options = options;
|
|
98
26
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
27
|
+
async *run({ messages, runConfig, abortSignal, context, unstable_assistantMessageId, unstable_getMessage, }) {
|
|
28
|
+
const headersValue = typeof this.options.headers === "function"
|
|
29
|
+
? await this.options.headers()
|
|
30
|
+
: this.options.headers;
|
|
31
|
+
abortSignal.addEventListener("abort", () => {
|
|
32
|
+
if (!abortSignal.reason?.detach)
|
|
33
|
+
this.options.onCancel?.();
|
|
34
|
+
}, { once: true });
|
|
35
|
+
const headers = new Headers(headersValue);
|
|
36
|
+
headers.set("Content-Type", "application/json");
|
|
37
|
+
const result = await fetch(this.options.api, {
|
|
38
|
+
method: "POST",
|
|
39
|
+
headers,
|
|
40
|
+
credentials: this.options.credentials ?? "same-origin",
|
|
41
|
+
body: JSON.stringify({
|
|
42
|
+
system: context.system,
|
|
43
|
+
messages: toLanguageModelMessages(messages, {
|
|
44
|
+
unstable_includeId: this.options.sendExtraMessageFields,
|
|
45
|
+
}),
|
|
46
|
+
tools: toAISDKTools(getEnabledTools(context.tools ?? {})),
|
|
47
|
+
...(unstable_assistantMessageId ? { unstable_assistantMessageId } : {}),
|
|
48
|
+
runConfig,
|
|
49
|
+
state: unstable_getMessage().metadata.unstable_state || undefined,
|
|
50
|
+
...context.callSettings,
|
|
51
|
+
...context.config,
|
|
52
|
+
...this.options.body,
|
|
53
|
+
}),
|
|
54
|
+
signal: abortSignal,
|
|
55
|
+
});
|
|
56
|
+
await this.options.onResponse?.(result);
|
|
57
|
+
try {
|
|
58
|
+
if (!result.ok) {
|
|
59
|
+
throw new Error(`Status ${result.status}: ${await result.text()}`);
|
|
60
|
+
}
|
|
61
|
+
if (!result.body) {
|
|
62
|
+
throw new Error("Response body is null");
|
|
63
|
+
}
|
|
64
|
+
const stream = result.body
|
|
65
|
+
.pipeThrough(new DataStreamDecoder())
|
|
66
|
+
.pipeThrough(unstable_toolResultStream(context.tools, abortSignal, () => {
|
|
67
|
+
throw new Error("Tool interrupt is not supported in data stream runtime");
|
|
68
|
+
}))
|
|
69
|
+
.pipeThrough(new AssistantMessageAccumulator());
|
|
70
|
+
yield* asAsyncIterableStream(stream);
|
|
71
|
+
this.options.onFinish?.(unstable_getMessage());
|
|
72
|
+
}
|
|
73
|
+
catch (error) {
|
|
74
|
+
this.options.onError?.(error);
|
|
75
|
+
throw error;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
export const useDataStreamRuntime = (options) => {
|
|
80
|
+
const { localRuntimeOptions, otherOptions } = splitLocalRuntimeOptions(options);
|
|
81
|
+
return useLocalRuntime(new DataStreamRuntimeAdapter(otherOptions), localRuntimeOptions);
|
|
110
82
|
};
|
|
111
83
|
//# sourceMappingURL=useDataStreamRuntime.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"useDataStreamRuntime.js","sourceRoot":"","sources":["../src/useDataStreamRuntime.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,uBAAuB,EAAE,8BAAqB;AACvD,OAAO,EAIL,QAAQ,EAIR,eAAe,GAChB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,2BAA2B,EAC3B,iBAAiB,EACjB,yBAAyB,GAC1B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAE/D,MAAM,EAAE,wBAAwB,EAAE,GAAG,QAAQ,CAAC;AAyB9C,MAAM,YAAY,GAAG,CAAC,KAA2B,EAAE,EAAE;IACnD,OAAO,MAAM,CAAC,WAAW,CACvB,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE,CA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M,CAAC,IAAI,EAAE,CAAC;gBACjB,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;YAC3C,CAAC;YAED,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI;iBACvB,WAAW,CAAC,IAAI,iBAAiB,EAAE,CAAC;iBACpC,WAAW,CACV,yBAAyB,CAAC,OAAO,CAAC,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE;gBACzD,MAAM,IAAI,KAAK,CACb,wDAAwD,CACzD,CAAC;YACJ,CAAC,CAAC,CACH;iBACA,WAAW,CAAC,IAAI,2BAA2B,EAAE,CAAC,CAAC;YAElD,KAAK,CAAC,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC;YAErC,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,mBAAmB,EAAE,CAAC,CAAC;QACjD,CAAC;QAAC,OAAO,KAAc,EAAE,CAAC;YACxB,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,KAAc,CAAC,CAAC;YACvC,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;CACF;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAClC,OAAoC,EAClB,EAAE;IACpB,MAAM,EAAE,mBAAmB,EAAE,YAAY,EAAE,GACzC,wBAAwB,CAAC,OAAO,CAAC,CAAC;IAEpC,OAAO,eAAe,CACpB,IAAI,wBAAwB,CAAC,YAAY,CAAC,EAC1C,mBAAmB,CACpB,CAAC;AACJ,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,10 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@assistant-ui/react-data-stream",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.13",
|
|
4
|
+
"description": "Data stream adapter for assistant-ui",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"data-stream",
|
|
7
|
+
"streaming",
|
|
8
|
+
"assistant-ui",
|
|
9
|
+
"react",
|
|
10
|
+
"ai",
|
|
11
|
+
"chat"
|
|
12
|
+
],
|
|
13
|
+
"author": "AgentbaseAI Inc.",
|
|
4
14
|
"license": "MIT",
|
|
5
15
|
"type": "module",
|
|
6
16
|
"exports": {
|
|
7
17
|
".": {
|
|
18
|
+
"aui-source": "./src/index.ts",
|
|
8
19
|
"types": "./dist/index.d.ts",
|
|
9
20
|
"default": "./dist/index.js"
|
|
10
21
|
}
|
|
@@ -19,14 +30,13 @@
|
|
|
19
30
|
"sideEffects": false,
|
|
20
31
|
"dependencies": {
|
|
21
32
|
"@ai-sdk/provider": "^1.1.3",
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"zod": "^4.1.13"
|
|
33
|
+
"assistant-stream": "^0.2.46",
|
|
34
|
+
"zod": "^4.2.1"
|
|
25
35
|
},
|
|
26
36
|
"peerDependencies": {
|
|
27
|
-
"@assistant-ui/react": "^0.11.
|
|
37
|
+
"@assistant-ui/react": "^0.11.53",
|
|
28
38
|
"@types/react": "*",
|
|
29
|
-
"react": "^18 || ^19
|
|
39
|
+
"react": "^18 || ^19"
|
|
30
40
|
},
|
|
31
41
|
"peerDependenciesMeta": {
|
|
32
42
|
"@types/react": {
|
|
@@ -34,25 +44,26 @@
|
|
|
34
44
|
}
|
|
35
45
|
},
|
|
36
46
|
"devDependencies": {
|
|
37
|
-
"@types/
|
|
47
|
+
"@types/json-schema": "^7.0.15",
|
|
38
48
|
"@types/react": "^19.2.7",
|
|
39
49
|
"react": "19.2.3",
|
|
40
|
-
"
|
|
41
|
-
"@assistant-ui/react": "0.11.50",
|
|
50
|
+
"@assistant-ui/react": "0.11.53",
|
|
42
51
|
"@assistant-ui/x-buildutils": "0.0.1"
|
|
43
52
|
},
|
|
44
53
|
"publishConfig": {
|
|
45
54
|
"access": "public",
|
|
46
55
|
"provenance": true
|
|
47
56
|
},
|
|
57
|
+
"homepage": "https://www.assistant-ui.com/",
|
|
48
58
|
"repository": {
|
|
49
59
|
"type": "git",
|
|
50
|
-
"url": "https://github.com/assistant-ui/assistant-ui
|
|
60
|
+
"url": "git+https://github.com/assistant-ui/assistant-ui.git",
|
|
61
|
+
"directory": "packages/react-data-stream"
|
|
51
62
|
},
|
|
52
63
|
"bugs": {
|
|
53
64
|
"url": "https://github.com/assistant-ui/assistant-ui/issues"
|
|
54
65
|
},
|
|
55
66
|
"scripts": {
|
|
56
|
-
"build": "
|
|
67
|
+
"build": "aui-build"
|
|
57
68
|
}
|
|
58
69
|
}
|