@assistant-ui/react 0.5.33 → 0.5.34
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/{EdgeRuntimeRequestOptions-BD0mpoF6.d.mts → EdgeRuntimeRequestOptions-BP7q0lyh.d.mts} +7 -0
- package/dist/{EdgeRuntimeRequestOptions-BD0mpoF6.d.ts → EdgeRuntimeRequestOptions-BP7q0lyh.d.ts} +7 -0
- package/dist/{chunk-CTVBRM6C.js → chunk-AAOYJ7TE.js} +12 -9
- package/dist/chunk-AAOYJ7TE.js.map +1 -0
- package/dist/{chunk-DXLSOE2J.mjs → chunk-QBSJKWMT.mjs} +11 -8
- package/dist/{chunk-DXLSOE2J.mjs.map → chunk-QBSJKWMT.mjs.map} +1 -1
- package/dist/edge.d.mts +3 -1
- package/dist/edge.d.ts +3 -1
- package/dist/edge.js +13 -8
- package/dist/edge.js.map +1 -1
- package/dist/edge.mjs +13 -8
- package/dist/edge.mjs.map +1 -1
- package/dist/index.d.mts +7 -3
- package/dist/index.d.ts +7 -3
- package/dist/index.js +61 -40
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +25 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-CTVBRM6C.js.map +0 -1
package/dist/index.mjs
CHANGED
@@ -9,7 +9,7 @@ import {
|
|
9
9
|
toLanguageModelMessages,
|
10
10
|
toLanguageModelTools,
|
11
11
|
toolResultStream
|
12
|
-
} from "./chunk-
|
12
|
+
} from "./chunk-QBSJKWMT.mjs";
|
13
13
|
import {
|
14
14
|
__export
|
15
15
|
} from "./chunk-BJPOCE4O.mjs";
|
@@ -1142,19 +1142,40 @@ var LocalThreadRuntime = class {
|
|
1142
1142
|
this.abortController?.abort();
|
1143
1143
|
this.abortController = new AbortController();
|
1144
1144
|
const initialContent = message.content;
|
1145
|
-
const initialRoundtrips = message.roundtrips;
|
1145
|
+
const initialRoundtrips = message.metadata?.roundtrips;
|
1146
|
+
const initalCustom = message.metadata?.custom;
|
1146
1147
|
const updateMessage = (m) => {
|
1147
1148
|
message = {
|
1148
1149
|
...message,
|
1149
1150
|
...m.content ? { content: [...initialContent, ...m.content ?? []] } : void 0,
|
1150
1151
|
status: m.status ?? message.status,
|
1151
|
-
|
1152
|
+
// TODO deprecated, remove in v0.6
|
1153
|
+
...m.metadata?.roundtrips ? {
|
1154
|
+
roundtrips: [
|
1155
|
+
...initialRoundtrips ?? [],
|
1156
|
+
...m.metadata.roundtrips
|
1157
|
+
]
|
1158
|
+
} : void 0,
|
1159
|
+
...m.metadata ? {
|
1160
|
+
metadata: {
|
1161
|
+
...message.metadata,
|
1162
|
+
...m.metadata.roundtrips ? {
|
1163
|
+
roundtrips: [
|
1164
|
+
...initialRoundtrips ?? [],
|
1165
|
+
...m.metadata.roundtrips
|
1166
|
+
]
|
1167
|
+
} : void 0,
|
1168
|
+
...m.metadata?.custom ? {
|
1169
|
+
custom: { ...initalCustom ?? {}, ...m.metadata.custom }
|
1170
|
+
} : void 0
|
1171
|
+
}
|
1172
|
+
} : void 0
|
1152
1173
|
};
|
1153
1174
|
this.repository.addOrUpdateMessage(parentId, message);
|
1154
1175
|
this.notifySubscribers();
|
1155
1176
|
};
|
1156
1177
|
const maxToolRoundtrips = this.options?.maxToolRoundtrips ?? 1;
|
1157
|
-
const toolRoundtrips = message.roundtrips?.length ?? 0;
|
1178
|
+
const toolRoundtrips = message.metadata?.roundtrips?.length ?? 0;
|
1158
1179
|
if (toolRoundtrips > maxToolRoundtrips) {
|
1159
1180
|
updateMessage({
|
1160
1181
|
status: {
|