@voltagent/core 1.2.14 → 1.2.15

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
@@ -15660,10 +15660,13 @@ var SubAgentManager = class {
15660
15660
  */
15661
15661
  extractAgentPurpose(agentConfig) {
15662
15662
  const agent = this.extractAgent(agentConfig);
15663
+ if (agent.purpose) {
15664
+ return agent.purpose;
15665
+ }
15663
15666
  if (typeof agent.instructions === "string") {
15664
- return agent.purpose ?? agent.instructions;
15667
+ return agent.instructions;
15665
15668
  }
15666
- return agent.purpose ?? "Dynamic instructions";
15669
+ return "Dynamic instructions";
15667
15670
  }
15668
15671
  /**
15669
15672
  * Type guard to check if a SubAgentConfig is a direct AgentV2 instance