@burtson-labs/bandit-engine 2.0.161 → 2.0.162

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 (39) hide show
  1. package/dist/{aiProviderStore-BNZGM6QU.mjs → aiProviderStore-JOB2H4LP.mjs} +2 -2
  2. package/dist/chat-LB6UEEEW.mjs +16 -0
  3. package/dist/chat-provider.js +86 -31
  4. package/dist/chat-provider.js.map +1 -1
  5. package/dist/chat-provider.mjs +5 -5
  6. package/dist/{chunk-TTAORNWI.mjs → chunk-3ACT5BTW.mjs} +6 -6
  7. package/dist/{chunk-QPXG4A5C.mjs → chunk-47MOBOP3.mjs} +2 -2
  8. package/dist/{chunk-PFKKGJAQ.mjs → chunk-G5POQT2R.mjs} +2 -2
  9. package/dist/{chunk-MIDYEQOS.mjs → chunk-ODGVCSKV.mjs} +17 -11
  10. package/dist/{chunk-MIDYEQOS.mjs.map → chunk-ODGVCSKV.mjs.map} +1 -1
  11. package/dist/{chunk-FSRMNQRN.mjs → chunk-OGMXL7BF.mjs} +4 -4
  12. package/dist/{chunk-B3HAQC6F.mjs → chunk-Q6LXVYTC.mjs} +68 -25
  13. package/dist/chunk-Q6LXVYTC.mjs.map +1 -0
  14. package/dist/{chunk-EOMOOMUC.mjs → chunk-R6HMLYKQ.mjs} +3 -3
  15. package/dist/{chunk-XC7HDKFW.mjs → chunk-RUXYVMW2.mjs} +9 -9
  16. package/dist/{chunk-X65A3NED.mjs → chunk-YHSYHU5P.mjs} +5 -5
  17. package/dist/{chunk-QXITTH2X.mjs → chunk-ZNK3ELTZ.mjs} +2 -2
  18. package/dist/index.js +86 -31
  19. package/dist/index.js.map +1 -1
  20. package/dist/index.mjs +10 -10
  21. package/dist/management/management.js +86 -31
  22. package/dist/management/management.js.map +1 -1
  23. package/dist/management/management.mjs +8 -8
  24. package/dist/modals/chat-modal/chat-modal.js +86 -31
  25. package/dist/modals/chat-modal/chat-modal.js.map +1 -1
  26. package/dist/modals/chat-modal/chat-modal.mjs +4 -4
  27. package/package.json +1 -1
  28. package/dist/chat-3JAV77HO.mjs +0 -16
  29. package/dist/chunk-B3HAQC6F.mjs.map +0 -1
  30. /package/dist/{aiProviderStore-BNZGM6QU.mjs.map → aiProviderStore-JOB2H4LP.mjs.map} +0 -0
  31. /package/dist/{chat-3JAV77HO.mjs.map → chat-LB6UEEEW.mjs.map} +0 -0
  32. /package/dist/{chunk-TTAORNWI.mjs.map → chunk-3ACT5BTW.mjs.map} +0 -0
  33. /package/dist/{chunk-QPXG4A5C.mjs.map → chunk-47MOBOP3.mjs.map} +0 -0
  34. /package/dist/{chunk-PFKKGJAQ.mjs.map → chunk-G5POQT2R.mjs.map} +0 -0
  35. /package/dist/{chunk-FSRMNQRN.mjs.map → chunk-OGMXL7BF.mjs.map} +0 -0
  36. /package/dist/{chunk-EOMOOMUC.mjs.map → chunk-R6HMLYKQ.mjs.map} +0 -0
  37. /package/dist/{chunk-XC7HDKFW.mjs.map → chunk-RUXYVMW2.mjs.map} +0 -0
  38. /package/dist/{chunk-X65A3NED.mjs.map → chunk-YHSYHU5P.mjs.map} +0 -0
  39. /package/dist/{chunk-QXITTH2X.mjs.map → chunk-ZNK3ELTZ.mjs.map} +0 -0
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  ChatProvider,
3
3
  chat_provider_default
4
- } from "./chunk-X65A3NED.mjs";
4
+ } from "./chunk-YHSYHU5P.mjs";
5
5
  import "./chunk-ONQMRE2G.mjs";
6
- import "./chunk-QXITTH2X.mjs";
7
- import "./chunk-PFKKGJAQ.mjs";
8
- import "./chunk-MIDYEQOS.mjs";
6
+ import "./chunk-ZNK3ELTZ.mjs";
7
+ import "./chunk-G5POQT2R.mjs";
8
+ import "./chunk-ODGVCSKV.mjs";
9
9
  import "./chunk-WQEBTH2R.mjs";
10
- import "./chunk-B3HAQC6F.mjs";
10
+ import "./chunk-Q6LXVYTC.mjs";
11
11
  import "./chunk-KCI46M23.mjs";
12
12
  import "./chunk-BJTO5JO5.mjs";
13
13
  export {
@@ -5,10 +5,10 @@ import {
5
5
  StreamingMarkdown_default,
6
6
  isNativeShell,
7
7
  isStandalonePwa
8
- } from "./chunk-QPXG4A5C.mjs";
8
+ } from "./chunk-47MOBOP3.mjs";
9
9
  import {
10
10
  useMCPToolsStore
11
- } from "./chunk-PFKKGJAQ.mjs";
11
+ } from "./chunk-G5POQT2R.mjs";
12
12
  import {
13
13
  ArrowDown,
14
14
  ArrowUp,
@@ -48,7 +48,7 @@ import {
48
48
  useNotificationService,
49
49
  useTTS,
50
50
  useVoiceStore
51
- } from "./chunk-EOMOOMUC.mjs";
51
+ } from "./chunk-R6HMLYKQ.mjs";
52
52
  import {
53
53
  brandingService_default,
54
54
  detectMessageMood,
@@ -71,7 +71,7 @@ import {
71
71
  useMemoryStore,
72
72
  useProjectStore,
73
73
  useVectorStore
74
- } from "./chunk-MIDYEQOS.mjs";
74
+ } from "./chunk-ODGVCSKV.mjs";
75
75
  import {
76
76
  indexedDBService_default,
77
77
  useModelStore,
@@ -83,7 +83,7 @@ import {
83
83
  readPersistedToken,
84
84
  useAIProviderStore,
85
85
  useAuthenticationStore
86
- } from "./chunk-B3HAQC6F.mjs";
86
+ } from "./chunk-Q6LXVYTC.mjs";
87
87
  import {
88
88
  debugLogger
89
89
  } from "./chunk-KCI46M23.mjs";
@@ -12007,4 +12007,4 @@ export {
12007
12007
  IS_STORE_BUILD,
12008
12008
  chat_default
12009
12009
  };
12010
- //# sourceMappingURL=chunk-TTAORNWI.mjs.map
12010
+ //# sourceMappingURL=chunk-3ACT5BTW.mjs.map
@@ -6,7 +6,7 @@ import {
6
6
  markdownSanitizeSchema,
7
7
  maybeHandleFileLinkClick,
8
8
  renderLowlightChildren
9
- } from "./chunk-EOMOOMUC.mjs";
9
+ } from "./chunk-R6HMLYKQ.mjs";
10
10
 
11
11
  // src/components/StreamingMarkdown.tsx
12
12
  import React, { useEffect, useMemo, useRef, useState } from "react";
@@ -513,4 +513,4 @@ export {
513
513
  isNativeShell,
514
514
  isStandalonePwa
515
515
  };
516
- //# sourceMappingURL=chunk-QPXG4A5C.mjs.map
516
+ //# sourceMappingURL=chunk-47MOBOP3.mjs.map
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-WQEBTH2R.mjs";
5
5
  import {
6
6
  authenticationService
7
- } from "./chunk-B3HAQC6F.mjs";
7
+ } from "./chunk-Q6LXVYTC.mjs";
8
8
  import {
9
9
  debugLogger
10
10
  } from "./chunk-KCI46M23.mjs";
@@ -387,4 +387,4 @@ export {
387
387
  discoverMcpTools,
388
388
  useMCPToolsStore
389
389
  };
390
- //# sourceMappingURL=chunk-PFKKGJAQ.mjs.map
390
+ //# sourceMappingURL=chunk-G5POQT2R.mjs.map
@@ -7,7 +7,7 @@ import {
7
7
  authenticationService,
8
8
  useAIProviderStore,
9
9
  useAuthenticationStore
10
- } from "./chunk-B3HAQC6F.mjs";
10
+ } from "./chunk-Q6LXVYTC.mjs";
11
11
  import {
12
12
  debugLogger
13
13
  } from "./chunk-KCI46M23.mjs";
@@ -4766,7 +4766,7 @@ var useFeatureVisibility = () => {
4766
4766
  };
4767
4767
 
4768
4768
  // src/hooks/useVectorStore.tsx
4769
- import { useState as useState2, useEffect as useEffect2, useCallback as useCallback2 } from "react";
4769
+ import { useState as useState2, useEffect as useEffect2, useCallback as useCallback2, useRef } from "react";
4770
4770
  var toIsoString = (timestamp) => {
4771
4771
  if (timestamp instanceof Date) {
4772
4772
  return timestamp.toISOString();
@@ -4843,9 +4843,17 @@ var useVectorStore = () => {
4843
4843
  const hasAnyAdvancedFeatures = isAdvancedVectorFeaturesEnabled;
4844
4844
  const hasVectorAccess = features.isAdmin() || features.hasAdvancedSearch() || features.hasAdvancedMemories();
4845
4845
  const [hasCompatibleProvider, setHasCompatibleProvider] = useState2(false);
4846
+ const mountedRef = useRef(true);
4847
+ useEffect2(() => {
4848
+ mountedRef.current = true;
4849
+ return () => {
4850
+ mountedRef.current = false;
4851
+ };
4852
+ }, []);
4846
4853
  const checkProviderCompatibility = useCallback2(async () => {
4847
4854
  try {
4848
- const { useAIProviderStore: useAIProviderStore2 } = await import("./aiProviderStore-BNZGM6QU.mjs");
4855
+ const { useAIProviderStore: useAIProviderStore2 } = await import("./aiProviderStore-JOB2H4LP.mjs");
4856
+ if (!mountedRef.current) return false;
4849
4857
  const aiProviderState = useAIProviderStore2.getState();
4850
4858
  const provider = aiProviderState.provider;
4851
4859
  const config = aiProviderState.config;
@@ -4862,7 +4870,7 @@ var useVectorStore = () => {
4862
4870
  return isCompatible;
4863
4871
  } catch (error) {
4864
4872
  debugLogger.warn("Could not check AI provider for vector compatibility", { error });
4865
- setHasCompatibleProvider(false);
4873
+ if (mountedRef.current) setHasCompatibleProvider(false);
4866
4874
  return false;
4867
4875
  }
4868
4876
  }, []);
@@ -4870,12 +4878,10 @@ var useVectorStore = () => {
4870
4878
  checkProviderCompatibility();
4871
4879
  }, [checkProviderCompatibility]);
4872
4880
  useEffect2(() => {
4873
- const checkOnProviderChange = async () => {
4874
- setTimeout(() => {
4875
- checkProviderCompatibility();
4876
- }, 100);
4877
- };
4878
- checkOnProviderChange();
4881
+ const timer = setTimeout(() => {
4882
+ void checkProviderCompatibility();
4883
+ }, 100);
4884
+ return () => clearTimeout(timer);
4879
4885
  }, [authStore.token, checkProviderCompatibility]);
4880
4886
  useEffect2(() => {
4881
4887
  const interval = setInterval(() => {
@@ -5889,4 +5895,4 @@ export {
5889
5895
  useNotification,
5890
5896
  NotificationProvider
5891
5897
  };
5892
- //# sourceMappingURL=chunk-MIDYEQOS.mjs.map
5898
+ //# sourceMappingURL=chunk-ODGVCSKV.mjs.map