@burtson-labs/bandit-engine 2.0.65 → 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.
Files changed (41) hide show
  1. package/dist/chat-5XCDDPTK.mjs +16 -0
  2. package/dist/chat-provider.js +4 -0
  3. package/dist/chat-provider.js.map +1 -1
  4. package/dist/chat-provider.mjs +5 -5
  5. package/dist/{chunk-EUBVBTB3.mjs → chunk-4D7245ZO.mjs} +55 -30
  6. package/dist/chunk-4D7245ZO.mjs.map +1 -0
  7. package/dist/{chunk-7EPFQDJW.mjs → chunk-5UD7EJ23.mjs} +24 -13
  8. package/dist/chunk-5UD7EJ23.mjs.map +1 -0
  9. package/dist/{chunk-FXFTA5PZ.mjs → chunk-6DY7W4NK.mjs} +3 -3
  10. package/dist/{chunk-VTC6AIWY.mjs → chunk-6ITUH375.mjs} +3 -3
  11. package/dist/{chunk-D55E6ZDV.mjs → chunk-HHMGNCBS.mjs} +5 -5
  12. package/dist/{chunk-6QTTNYF2.mjs → chunk-IDZEEONG.mjs} +2 -2
  13. package/dist/{chunk-HKQSZALO.mjs → chunk-JURUEF52.mjs} +4 -4
  14. package/dist/{chunk-IPMTNREZ.mjs → chunk-LWHSOEPR.mjs} +6 -2
  15. package/dist/{chunk-IPMTNREZ.mjs.map → chunk-LWHSOEPR.mjs.map} +1 -1
  16. package/dist/{chunk-O44AP4XI.mjs → chunk-RI4LBQ3Q.mjs} +53 -9
  17. package/dist/chunk-RI4LBQ3Q.mjs.map +1 -0
  18. package/dist/{chunk-O7M4OPZU.mjs → chunk-U633CJBV.mjs} +2 -2
  19. package/dist/index.js +121 -37
  20. package/dist/index.js.map +1 -1
  21. package/dist/index.mjs +10 -10
  22. package/dist/management/management.js +120 -36
  23. package/dist/management/management.js.map +1 -1
  24. package/dist/management/management.mjs +8 -8
  25. package/dist/modals/chat-modal/chat-modal.js +4 -0
  26. package/dist/modals/chat-modal/chat-modal.js.map +1 -1
  27. package/dist/modals/chat-modal/chat-modal.mjs +4 -4
  28. package/dist/{modelStore-FBPBG7TI.mjs → modelStore-KCJPXFKO.mjs} +2 -2
  29. package/package.json +1 -1
  30. package/dist/chat-57M4OXFX.mjs +0 -16
  31. package/dist/chunk-7EPFQDJW.mjs.map +0 -1
  32. package/dist/chunk-EUBVBTB3.mjs.map +0 -1
  33. package/dist/chunk-O44AP4XI.mjs.map +0 -1
  34. /package/dist/{chat-57M4OXFX.mjs.map → chat-5XCDDPTK.mjs.map} +0 -0
  35. /package/dist/{chunk-FXFTA5PZ.mjs.map → chunk-6DY7W4NK.mjs.map} +0 -0
  36. /package/dist/{chunk-VTC6AIWY.mjs.map → chunk-6ITUH375.mjs.map} +0 -0
  37. /package/dist/{chunk-D55E6ZDV.mjs.map → chunk-HHMGNCBS.mjs.map} +0 -0
  38. /package/dist/{chunk-6QTTNYF2.mjs.map → chunk-IDZEEONG.mjs.map} +0 -0
  39. /package/dist/{chunk-HKQSZALO.mjs.map → chunk-JURUEF52.mjs.map} +0 -0
  40. /package/dist/{chunk-O7M4OPZU.mjs.map → chunk-U633CJBV.mjs.map} +0 -0
  41. /package/dist/{modelStore-FBPBG7TI.mjs.map → modelStore-KCJPXFKO.mjs.map} +0 -0
@@ -3,10 +3,10 @@ import {
3
3
  } from "./chunk-ONQMRE2G.mjs";
4
4
  import {
5
5
  StreamingMarkdown_default
6
- } from "./chunk-O7M4OPZU.mjs";
6
+ } from "./chunk-U633CJBV.mjs";
7
7
  import {
8
8
  useMCPToolsStore
9
- } from "./chunk-6QTTNYF2.mjs";
9
+ } from "./chunk-IDZEEONG.mjs";
10
10
  import {
11
11
  AddIcon,
12
12
  ArrowDownwardIcon,
@@ -43,7 +43,7 @@ import {
43
43
  useNotificationService,
44
44
  useTTS,
45
45
  useVoiceStore
46
- } from "./chunk-FXFTA5PZ.mjs";
46
+ } from "./chunk-6DY7W4NK.mjs";
47
47
  import {
48
48
  authenticationService,
49
49
  brandingService_default,
@@ -55,6 +55,7 @@ import {
55
55
  generateConversationStarters,
56
56
  getCurrentDateTimeContext,
57
57
  getRandomTopicOfInterest,
58
+ pickDistinctRandomTopics,
58
59
  sanitizeConversationName,
59
60
  toTitleCase,
60
61
  useAIQueryStore,
@@ -68,13 +69,13 @@ import {
68
69
  useMemoryStore,
69
70
  useProjectStore,
70
71
  useVectorStore
71
- } from "./chunk-EUBVBTB3.mjs";
72
+ } from "./chunk-4D7245ZO.mjs";
72
73
  import {
73
74
  indexedDBService_default,
74
75
  useModelStore,
75
76
  usePackageSettingsStore,
76
77
  usePreferencesStore
77
- } from "./chunk-IPMTNREZ.mjs";
78
+ } from "./chunk-LWHSOEPR.mjs";
78
79
  import {
79
80
  useAIProviderStore
80
81
  } from "./chunk-H3BYFEIE.mjs";
@@ -3434,7 +3435,7 @@ ${r.output}`).join("\n\n");
3434
3435
 
3435
3436
  ${toolResultsText}
3436
3437
 
3437
- 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.`
3438
3439
  }
3439
3440
  ];
3440
3441
  const summaryRequest = {
@@ -3489,6 +3490,10 @@ _Writing the answer\u2026_` : "_Writing the answer\u2026_"
3489
3490
  }, 3e4);
3490
3491
  });
3491
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();
3492
3497
  const sourcesMd = collectedSources.length ? `
3493
3498
 
3494
3499
  **Sources**
@@ -3500,7 +3505,7 @@ ${collectedSources.slice(0, 6).map((s) => {
3500
3505
  }
3501
3506
  return `- [${s.title || domain}](${s.url}) \u2014 ${domain}`;
3502
3507
  }).join("\n")}` : "";
3503
- enhancedMessage = summaryText + sourcesMd + (inlineImageBlocks.length ? `
3508
+ enhancedMessage = cleanedSummary + sourcesMd + (inlineImageBlocks.length ? `
3504
3509
 
3505
3510
  ${inlineImageBlocks.join("\n\n")}` : "");
3506
3511
  }
@@ -8008,13 +8013,19 @@ var QuerySuggestionPicker = ({
8008
8013
  if (hasGenerated.current || isLoading) return;
8009
8014
  hasGenerated.current = true;
8010
8015
  const currentModel = getCurrentModel();
8016
+ const prefs = usePreferencesStore.getState().preferences;
8017
+ const interests = (prefs.interests ?? []).filter((i) => i && i.trim());
8018
+ const randomTopics = pickDistinctRandomTopics(interests.length ? 3 : 5);
8019
+ const topicOfInterest = Array.from(/* @__PURE__ */ new Set([...interests, ...randomTopics])).join(", ") || getRandomTopicOfInterest();
8020
+ const webSearchAvailable = useMCPToolsStore.getState().getEnabledTools().some((t) => t.name === "web_search");
8021
+ const knowledgeTopics = prefs.useKnowledgeForStarters ? useKnowledgeStore.getState().docs.map((d) => d.name).filter((n) => n && n.trim()).slice(0, 12) : void 0;
8011
8022
  const args = {
8012
- // keep responses quick and snappy, server may be handling concurrent requests adjust as needed
8013
8023
  limit: 9,
8014
- // pick a random topic of interest from the list, consider using the users preference topics dynamically, otherwise get a random one
8015
- topicOfInterest: getRandomTopicOfInterest(),
8016
- // Pass the current model's system prompt to tailor suggestions
8017
- modelSystemPrompt: currentModel?.systemPrompt
8024
+ topicOfInterest,
8025
+ modelSystemPrompt: currentModel?.systemPrompt,
8026
+ interests,
8027
+ knowledgeTopics,
8028
+ webSearchAvailable
8018
8029
  };
8019
8030
  generateConversationStarters(args).then((prompts) => {
8020
8031
  if (prompts.length > 0) {
@@ -9742,4 +9753,4 @@ var chat_default = Chat;
9742
9753
  export {
9743
9754
  chat_default
9744
9755
  };
9745
- //# sourceMappingURL=chunk-7EPFQDJW.mjs.map
9756
+ //# sourceMappingURL=chunk-5UD7EJ23.mjs.map