@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.
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  chat_default
3
- } from "./chunk-ZYQJVZK2.mjs";
3
+ } from "./chunk-5UD7EJ23.mjs";
4
4
  import {
5
5
  chat_provider_default
6
6
  } from "./chunk-HHMGNCBS.mjs";
@@ -10,7 +10,7 @@ import {
10
10
  useGatewayHealth,
11
11
  useGatewayMemory,
12
12
  useGatewayModels
13
- } from "./chunk-EM2DB6NP.mjs";
13
+ } from "./chunk-RI4LBQ3Q.mjs";
14
14
  import "./chunk-U633CJBV.mjs";
15
15
  import "./chunk-6ITUH375.mjs";
16
16
  import "./chunk-IDZEEONG.mjs";
@@ -23315,7 +23315,7 @@ ${r.output}`).join("\n\n");
23315
23315
 
23316
23316
  ${toolResultsText}
23317
23317
 
23318
- 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.`
23318
+ 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.`
23319
23319
  }
23320
23320
  ];
23321
23321
  const summaryRequest = {
@@ -23370,6 +23370,10 @@ _Writing the answer\u2026_` : "_Writing the answer\u2026_"
23370
23370
  }, 3e4);
23371
23371
  });
23372
23372
  if (summaryText.trim()) {
23373
+ const cleanedSummary = summaryText.replace(
23374
+ /\n{1,}\s*(?:[*_#>\s]*)(?:sources?|references?|citations?|further reading)(?:\s*:)?\s*(?:[*_]*)\s*\n[\s\S]*$/i,
23375
+ ""
23376
+ ).trimEnd();
23373
23377
  const sourcesMd = collectedSources.length ? `
23374
23378
 
23375
23379
  **Sources**
@@ -23381,7 +23385,7 @@ ${collectedSources.slice(0, 6).map((s) => {
23381
23385
  }
23382
23386
  return `- [${s.title || domain}](${s.url}) \u2014 ${domain}`;
23383
23387
  }).join("\n")}` : "";
23384
- enhancedMessage = summaryText + sourcesMd + (inlineImageBlocks.length ? `
23388
+ enhancedMessage = cleanedSummary + sourcesMd + (inlineImageBlocks.length ? `
23385
23389
 
23386
23390
  ${inlineImageBlocks.join("\n\n")}` : "");
23387
23391
  }