@mastra/react 0.1.0-beta.5 → 0.1.0-beta.7

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.js CHANGED
@@ -1279,7 +1279,8 @@ const useChat = ({ agentId, resourceId, initializeMessages }) => {
1279
1279
  threadId,
1280
1280
  modelSettings,
1281
1281
  signal,
1282
- onFinish
1282
+ onFinish,
1283
+ tracingOptions
1283
1284
  }) => {
1284
1285
  const {
1285
1286
  frequencyPenalty,
@@ -1315,7 +1316,8 @@ const useChat = ({ agentId, resourceId, initializeMessages }) => {
1315
1316
  instructions,
1316
1317
  requestContext,
1317
1318
  ...threadId ? { threadId, resourceId: resourceId || agentId } : {},
1318
- providerOptions
1319
+ providerOptions,
1320
+ tracingOptions
1319
1321
  });
1320
1322
  setIsRunning(false);
1321
1323
  if (response && "uiMessages" in response.response && response.response.uiMessages) {
@@ -1329,7 +1331,15 @@ const useChat = ({ agentId, resourceId, initializeMessages }) => {
1329
1331
  setMessages((prev) => [...prev, ...mastraUIMessages]);
1330
1332
  }
1331
1333
  };
1332
- const stream = async ({ coreUserMessages, requestContext, threadId, onChunk, modelSettings, signal }) => {
1334
+ const stream = async ({
1335
+ coreUserMessages,
1336
+ requestContext,
1337
+ threadId,
1338
+ onChunk,
1339
+ modelSettings,
1340
+ signal,
1341
+ tracingOptions
1342
+ }) => {
1333
1343
  const {
1334
1344
  frequencyPenalty,
1335
1345
  presencePenalty,
@@ -1367,7 +1377,8 @@ const useChat = ({ agentId, resourceId, initializeMessages }) => {
1367
1377
  requestContext,
1368
1378
  ...threadId ? { threadId, resourceId: resourceId || agentId } : {},
1369
1379
  providerOptions,
1370
- requireToolApproval
1380
+ requireToolApproval,
1381
+ tracingOptions
1371
1382
  });
1372
1383
  _onChunk.current = onChunk;
1373
1384
  _currentRunId.current = runId;
@@ -1385,7 +1396,8 @@ const useChat = ({ agentId, resourceId, initializeMessages }) => {
1385
1396
  threadId,
1386
1397
  onNetworkChunk,
1387
1398
  modelSettings,
1388
- signal
1399
+ signal,
1400
+ tracingOptions
1389
1401
  }) => {
1390
1402
  const { frequencyPenalty, presencePenalty, maxRetries, maxTokens, temperature, topK, topP, maxSteps } = modelSettings || {};
1391
1403
  setIsRunning(true);
@@ -1409,7 +1421,8 @@ const useChat = ({ agentId, resourceId, initializeMessages }) => {
1409
1421
  },
1410
1422
  runId,
1411
1423
  requestContext,
1412
- ...threadId ? { thread: threadId, resourceId: resourceId || agentId } : {}
1424
+ ...threadId ? { thread: threadId, resourceId: resourceId || agentId } : {},
1425
+ tracingOptions
1413
1426
  });
1414
1427
  const transformer = new AISdkNetworkTransformer();
1415
1428
  await response.processDataStream({