@burtson-labs/bandit-engine 2.0.66 → 2.0.67

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.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  chat_default
3
- } from "./chunk-ZYQJVZK2.mjs";
3
+ } from "./chunk-5UD7EJ23.mjs";
4
4
  import "./chunk-ONQMRE2G.mjs";
5
5
  import "./chunk-U633CJBV.mjs";
6
6
  import "./chunk-IDZEEONG.mjs";
@@ -13,4 +13,4 @@ import "./chunk-BJTO5JO5.mjs";
13
13
  export {
14
14
  chat_default as default
15
15
  };
16
- //# sourceMappingURL=chat-IWRBVOVP.mjs.map
16
+ //# sourceMappingURL=chat-5XCDDPTK.mjs.map
@@ -3435,7 +3435,7 @@ ${r.output}`).join("\n\n");
3435
3435
 
3436
3436
  ${toolResultsText}
3437
3437
 
3438
- Using these results together with your own knowledge, answer my original question concisely and in a natural, well-formatted way. Reference sources by name where relevant, but do NOT paste raw URLs or a list of links \u2014 a clean Sources section is added automatically below your answer. Do NOT output tool_code or call any tools again.`
3438
+ Using these results together with your own knowledge, answer my original question concisely and in a natural, well-formatted way. Do NOT add a "Sources", "References", or "Citations" list of any kind \u2014 not names and not URLs. A clean, clickable Sources section is appended automatically below your answer, so any list you add just duplicates it. (Mentioning a source naturally inside a sentence is fine; a trailing list is not.) Do NOT output tool_code or call any tools again.`
3439
3439
  }
3440
3440
  ];
3441
3441
  const summaryRequest = {
@@ -3490,6 +3490,10 @@ _Writing the answer\u2026_` : "_Writing the answer\u2026_"
3490
3490
  }, 3e4);
3491
3491
  });
3492
3492
  if (summaryText.trim()) {
3493
+ const cleanedSummary = summaryText.replace(
3494
+ /\n{1,}\s*(?:[*_#>\s]*)(?:sources?|references?|citations?|further reading)(?:\s*:)?\s*(?:[*_]*)\s*\n[\s\S]*$/i,
3495
+ ""
3496
+ ).trimEnd();
3493
3497
  const sourcesMd = collectedSources.length ? `
3494
3498
 
3495
3499
  **Sources**
@@ -3501,7 +3505,7 @@ ${collectedSources.slice(0, 6).map((s) => {
3501
3505
  }
3502
3506
  return `- [${s.title || domain}](${s.url}) \u2014 ${domain}`;
3503
3507
  }).join("\n")}` : "";
3504
- enhancedMessage = summaryText + sourcesMd + (inlineImageBlocks.length ? `
3508
+ enhancedMessage = cleanedSummary + sourcesMd + (inlineImageBlocks.length ? `
3505
3509
 
3506
3510
  ${inlineImageBlocks.join("\n\n")}` : "");
3507
3511
  }
@@ -9749,4 +9753,4 @@ var chat_default = Chat;
9749
9753
  export {
9750
9754
  chat_default
9751
9755
  };
9752
- //# sourceMappingURL=chunk-ZYQJVZK2.mjs.map
9756
+ //# sourceMappingURL=chunk-5UD7EJ23.mjs.map