@voltagent/core 0.1.46 → 0.1.47

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.d.ts CHANGED
@@ -1515,6 +1515,8 @@ interface StepWithContent {
1515
1515
  arguments?: Record<string, any>;
1516
1516
  result?: any;
1517
1517
  usage?: UsageInfo;
1518
+ subAgentId?: string;
1519
+ subAgentName?: string;
1518
1520
  }
1519
1521
  type StepFinishCallback = (step: StepWithContent) => void | Promise<void>;
1520
1522
  type StepChunkCallback = (chunk: any) => void | Promise<void>;
package/dist/index.js CHANGED
@@ -2477,6 +2477,7 @@ var import_dev19 = require("@voltagent/internal/dev");
2477
2477
 
2478
2478
  // src/agent/index.ts
2479
2479
  var import_dev14 = require("@voltagent/internal/dev");
2480
+ var import_ts_pattern2 = require("ts-pattern");
2480
2481
 
2481
2482
  // src/memory/in-memory/index.ts
2482
2483
  var import_dev4 = require("@voltagent/internal/dev");
@@ -7721,7 +7722,14 @@ ${context}`;
7721
7722
  if (!context.conversationSteps) {
7722
7723
  context.conversationSteps = [];
7723
7724
  }
7724
- context.conversationSteps.push(step);
7725
+ const finalStep = {
7726
+ ...step,
7727
+ ...(0, import_ts_pattern2.match)(context).with({ parentAgentId: import_ts_pattern2.P.not(import_ts_pattern2.P.nullish) }, () => ({
7728
+ subAgentId: this.id,
7729
+ subAgentName: this.name
7730
+ })).otherwise(() => ({}))
7731
+ };
7732
+ context.conversationSteps.push(finalStep);
7725
7733
  }
7726
7734
  /**
7727
7735
  * Update history entry