@mastra/react 0.1.0-beta.5 → 0.1.0-beta.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/CHANGELOG.md +9 -0
- package/dist/index.cjs +19 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +19 -6
- package/dist/index.js.map +1 -1
- package/dist/src/agent/hooks.d.ts +2 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @mastra/react-hooks
|
|
2
2
|
|
|
3
|
+
## 0.1.0-beta.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Adjust the types to accept tracingOptions ([#10742](https://github.com/mastra-ai/mastra/pull/10742))
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`6edf340`](https://github.com/mastra-ai/mastra/commit/6edf3402f6a46ee8def2f42a2287785251fbffd6), [`ad7e8f1`](https://github.com/mastra-ai/mastra/commit/ad7e8f16ac843cbd16687ad47b66ba96bcffe111), [`e1b7118`](https://github.com/mastra-ai/mastra/commit/e1b7118f42ca0a97247afc75e57dcd5fdf987752), [`441c7b6`](https://github.com/mastra-ai/mastra/commit/441c7b6665915cfa7fd625fded8c0f518530bf10), [`e849603`](https://github.com/mastra-ai/mastra/commit/e849603a596269069f58a438b98449ea2770493d)]:
|
|
10
|
+
- @mastra/client-js@1.0.0-beta.6
|
|
11
|
+
|
|
3
12
|
## 0.1.0-beta.5
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -1283,7 +1283,8 @@ const useChat = ({ agentId, resourceId, initializeMessages }) => {
|
|
|
1283
1283
|
threadId,
|
|
1284
1284
|
modelSettings,
|
|
1285
1285
|
signal,
|
|
1286
|
-
onFinish
|
|
1286
|
+
onFinish,
|
|
1287
|
+
tracingOptions
|
|
1287
1288
|
}) => {
|
|
1288
1289
|
const {
|
|
1289
1290
|
frequencyPenalty,
|
|
@@ -1319,7 +1320,8 @@ const useChat = ({ agentId, resourceId, initializeMessages }) => {
|
|
|
1319
1320
|
instructions,
|
|
1320
1321
|
requestContext,
|
|
1321
1322
|
...threadId ? { threadId, resourceId: resourceId || agentId } : {},
|
|
1322
|
-
providerOptions
|
|
1323
|
+
providerOptions,
|
|
1324
|
+
tracingOptions
|
|
1323
1325
|
});
|
|
1324
1326
|
setIsRunning(false);
|
|
1325
1327
|
if (response && "uiMessages" in response.response && response.response.uiMessages) {
|
|
@@ -1333,7 +1335,15 @@ const useChat = ({ agentId, resourceId, initializeMessages }) => {
|
|
|
1333
1335
|
setMessages((prev) => [...prev, ...mastraUIMessages]);
|
|
1334
1336
|
}
|
|
1335
1337
|
};
|
|
1336
|
-
const stream = async ({
|
|
1338
|
+
const stream = async ({
|
|
1339
|
+
coreUserMessages,
|
|
1340
|
+
requestContext,
|
|
1341
|
+
threadId,
|
|
1342
|
+
onChunk,
|
|
1343
|
+
modelSettings,
|
|
1344
|
+
signal,
|
|
1345
|
+
tracingOptions
|
|
1346
|
+
}) => {
|
|
1337
1347
|
const {
|
|
1338
1348
|
frequencyPenalty,
|
|
1339
1349
|
presencePenalty,
|
|
@@ -1371,7 +1381,8 @@ const useChat = ({ agentId, resourceId, initializeMessages }) => {
|
|
|
1371
1381
|
requestContext,
|
|
1372
1382
|
...threadId ? { threadId, resourceId: resourceId || agentId } : {},
|
|
1373
1383
|
providerOptions,
|
|
1374
|
-
requireToolApproval
|
|
1384
|
+
requireToolApproval,
|
|
1385
|
+
tracingOptions
|
|
1375
1386
|
});
|
|
1376
1387
|
_onChunk.current = onChunk;
|
|
1377
1388
|
_currentRunId.current = runId;
|
|
@@ -1389,7 +1400,8 @@ const useChat = ({ agentId, resourceId, initializeMessages }) => {
|
|
|
1389
1400
|
threadId,
|
|
1390
1401
|
onNetworkChunk,
|
|
1391
1402
|
modelSettings,
|
|
1392
|
-
signal
|
|
1403
|
+
signal,
|
|
1404
|
+
tracingOptions
|
|
1393
1405
|
}) => {
|
|
1394
1406
|
const { frequencyPenalty, presencePenalty, maxRetries, maxTokens, temperature, topK, topP, maxSteps } = modelSettings || {};
|
|
1395
1407
|
setIsRunning(true);
|
|
@@ -1413,7 +1425,8 @@ const useChat = ({ agentId, resourceId, initializeMessages }) => {
|
|
|
1413
1425
|
},
|
|
1414
1426
|
runId,
|
|
1415
1427
|
requestContext,
|
|
1416
|
-
...threadId ? { thread: threadId, resourceId: resourceId || agentId } : {}
|
|
1428
|
+
...threadId ? { thread: threadId, resourceId: resourceId || agentId } : {},
|
|
1429
|
+
tracingOptions
|
|
1417
1430
|
});
|
|
1418
1431
|
const transformer = new AISdkNetworkTransformer();
|
|
1419
1432
|
await response.processDataStream({
|