@greatapps/greatagents-ui 0.3.19 → 0.3.20

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
@@ -2033,9 +2033,15 @@ function buildPreview(promptText, objectives, agentTools, allTools) {
2033
2033
  }
2034
2034
  }
2035
2035
  const toolBindings = enabledAgentTools.map((at) => ({ at, tool: toolMap.get(at.id_tool) })).filter((x) => !!x.tool);
2036
- if (toolBindings.length > 0) {
2036
+ const seenToolIds = /* @__PURE__ */ new Set();
2037
+ const dedupedBindings = toolBindings.filter(({ at }) => {
2038
+ if (seenToolIds.has(at.id_tool)) return false;
2039
+ seenToolIds.add(at.id_tool);
2040
+ return true;
2041
+ });
2042
+ if (dedupedBindings.length > 0) {
2037
2043
  preview += "\n\n[TOOLS]";
2038
- for (const { at, tool } of toolBindings) {
2044
+ for (const { at, tool } of dedupedBindings) {
2039
2045
  if (at.custom_instructions) {
2040
2046
  preview += `
2041
2047