@burtson-labs/bandit-engine 2.0.83 → 2.0.85

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 (33) hide show
  1. package/dist/{chat-QWAR3TWJ.mjs → chat-ASHS5XCL.mjs} +6 -6
  2. package/dist/chat-provider.js.map +1 -1
  3. package/dist/chat-provider.mjs +4 -4
  4. package/dist/{chunk-PGLLBIRL.mjs → chunk-B2HUBOJ6.mjs} +26 -11
  5. package/dist/chunk-B2HUBOJ6.mjs.map +1 -0
  6. package/dist/{chunk-57L7TXB6.mjs → chunk-GNTQR7L6.mjs} +2 -2
  7. package/dist/{chunk-6ITUH375.mjs → chunk-I4QUXTIM.mjs} +2 -2
  8. package/dist/{chunk-YYYEMVBV.mjs → chunk-OHDMP7FI.mjs} +2 -2
  9. package/dist/{chunk-6VYZAHRT.mjs → chunk-R64BOUIU.mjs} +8 -8
  10. package/dist/{chunk-OPN32F2X.mjs → chunk-TETTI3QV.mjs} +4 -4
  11. package/dist/{chunk-3LT77723.mjs → chunk-WQLKBI3Y.mjs} +2 -2
  12. package/dist/{chunk-5DSDARPR.mjs → chunk-XHPSNERM.mjs} +3 -3
  13. package/dist/{chunk-4D7245ZO.mjs → chunk-ZLBREJKH.mjs} +16 -1
  14. package/dist/chunk-ZLBREJKH.mjs.map +1 -0
  15. package/dist/index.js +35 -7
  16. package/dist/index.js.map +1 -1
  17. package/dist/index.mjs +9 -9
  18. package/dist/management/management.js +35 -7
  19. package/dist/management/management.js.map +1 -1
  20. package/dist/management/management.mjs +7 -7
  21. package/dist/modals/chat-modal/chat-modal.js.map +1 -1
  22. package/dist/modals/chat-modal/chat-modal.mjs +3 -3
  23. package/package.json +1 -1
  24. package/dist/chunk-4D7245ZO.mjs.map +0 -1
  25. package/dist/chunk-PGLLBIRL.mjs.map +0 -1
  26. /package/dist/{chat-QWAR3TWJ.mjs.map → chat-ASHS5XCL.mjs.map} +0 -0
  27. /package/dist/{chunk-57L7TXB6.mjs.map → chunk-GNTQR7L6.mjs.map} +0 -0
  28. /package/dist/{chunk-6ITUH375.mjs.map → chunk-I4QUXTIM.mjs.map} +0 -0
  29. /package/dist/{chunk-YYYEMVBV.mjs.map → chunk-OHDMP7FI.mjs.map} +0 -0
  30. /package/dist/{chunk-6VYZAHRT.mjs.map → chunk-R64BOUIU.mjs.map} +0 -0
  31. /package/dist/{chunk-OPN32F2X.mjs.map → chunk-TETTI3QV.mjs.map} +0 -0
  32. /package/dist/{chunk-3LT77723.mjs.map → chunk-WQLKBI3Y.mjs.map} +0 -0
  33. /package/dist/{chunk-5DSDARPR.mjs.map → chunk-XHPSNERM.mjs.map} +0 -0
package/dist/index.mjs CHANGED
@@ -1,25 +1,25 @@
1
1
  import {
2
2
  chat_default
3
- } from "./chunk-PGLLBIRL.mjs";
3
+ } from "./chunk-B2HUBOJ6.mjs";
4
4
  import {
5
5
  chat_provider_default
6
- } from "./chunk-OPN32F2X.mjs";
6
+ } from "./chunk-TETTI3QV.mjs";
7
7
  import "./chunk-ONQMRE2G.mjs";
8
8
  import {
9
9
  management_default,
10
10
  useGatewayHealth,
11
11
  useGatewayMemory,
12
12
  useGatewayModels
13
- } from "./chunk-6VYZAHRT.mjs";
14
- import "./chunk-YYYEMVBV.mjs";
15
- import "./chunk-6ITUH375.mjs";
16
- import "./chunk-3LT77723.mjs";
13
+ } from "./chunk-R64BOUIU.mjs";
14
+ import "./chunk-OHDMP7FI.mjs";
15
+ import "./chunk-I4QUXTIM.mjs";
16
+ import "./chunk-WQLKBI3Y.mjs";
17
17
  import {
18
18
  defineCustomElement
19
19
  } from "./chunk-IXIM7BNO.mjs";
20
20
  import {
21
21
  chat_modal_default
22
- } from "./chunk-5DSDARPR.mjs";
22
+ } from "./chunk-XHPSNERM.mjs";
23
23
  import {
24
24
  FeedbackButton,
25
25
  FeedbackModal,
@@ -37,7 +37,7 @@ import {
37
37
  useTTS,
38
38
  useVoiceStore,
39
39
  voiceService
40
- } from "./chunk-57L7TXB6.mjs";
40
+ } from "./chunk-GNTQR7L6.mjs";
41
41
  import {
42
42
  DEFAULT_TIER_FEATURES,
43
43
  FeatureFlagContext,
@@ -58,7 +58,7 @@ import {
58
58
  useVectorStore,
59
59
  vectorDatabaseService,
60
60
  vectorMigrationService
61
- } from "./chunk-4D7245ZO.mjs";
61
+ } from "./chunk-ZLBREJKH.mjs";
62
62
  import {
63
63
  usePackageSettingsStore,
64
64
  usePreferencesStore
@@ -6222,7 +6222,7 @@ var init_vectorMigrationService = __esm({
6222
6222
  });
6223
6223
 
6224
6224
  // src/store/authenticationStore.ts
6225
- var import_zustand5, TOKEN_KEY, validToken, user, rawToken, useAuthenticationStore;
6225
+ var import_zustand5, TOKEN_KEY, validToken, user, rawToken, useAuthenticationStore, readPersistedToken;
6226
6226
  var init_authenticationStore = __esm({
6227
6227
  "src/store/authenticationStore.ts"() {
6228
6228
  "use strict";
@@ -6275,6 +6275,20 @@ var init_authenticationStore = __esm({
6275
6275
  set({ token: null, authError: null, user: null });
6276
6276
  }
6277
6277
  }));
6278
+ readPersistedToken = () => {
6279
+ try {
6280
+ const raw = localStorage.getItem(TOKEN_KEY);
6281
+ if (!raw) return null;
6282
+ const base64 = raw.split(".")[1].replace(/-/g, "+").replace(/_/g, "/");
6283
+ const json2 = decodeURIComponent(
6284
+ atob(base64).split("").map((c) => "%" + ("00" + c.charCodeAt(0).toString(16)).slice(-2)).join("")
6285
+ );
6286
+ const decoded = JSON.parse(json2);
6287
+ return decoded.exp * 1e3 > Date.now() ? raw : null;
6288
+ } catch {
6289
+ return null;
6290
+ }
6291
+ };
6278
6292
  }
6279
6293
  });
6280
6294
 
@@ -25976,6 +25990,11 @@ var init_conversation_drawer = __esm({
25976
25990
  return void 0;
25977
25991
  }, [user2, userDisplayName]);
25978
25992
  const [avatarImage, setAvatarImage] = (0, import_react54.useState)(BANDIT_AVATAR);
25993
+ (0, import_react54.useEffect)(() => {
25994
+ const fresh = readPersistedToken();
25995
+ const store = useAuthenticationStore.getState();
25996
+ if (fresh && fresh !== store.token) store.setToken(fresh);
25997
+ }, []);
25979
25998
  (0, import_react54.useEffect)(() => {
25980
25999
  let active2 = true;
25981
26000
  let objectUrl = null;
@@ -26578,8 +26597,8 @@ var init_conversation_drawer = __esm({
26578
26597
  flex: 1,
26579
26598
  display: "flex",
26580
26599
  flexDirection: "column",
26581
- alignItems: isMobile ? "center" : "flex-start",
26582
- textAlign: isMobile ? "center" : "left",
26600
+ alignItems: "flex-start",
26601
+ textAlign: "left",
26583
26602
  gap: 0.25
26584
26603
  },
26585
26604
  children: [
@@ -26605,11 +26624,20 @@ var init_conversation_drawer = __esm({
26605
26624
  }
26606
26625
  ),
26607
26626
  user2 && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
26608
- import_lucide_react10.Settings,
26627
+ import_material43.Box,
26609
26628
  {
26610
- size: 18,
26611
- color: theme.palette.text.secondary,
26612
- style: { flexShrink: 0, opacity: 0.85 }
26629
+ sx: {
26630
+ flexShrink: 0,
26631
+ display: "flex",
26632
+ alignItems: "center",
26633
+ justifyContent: "center",
26634
+ width: 30,
26635
+ height: 30,
26636
+ borderRadius: "50%",
26637
+ border: `1px solid ${(0, import_material43.alpha)(theme.palette.divider, 0.8)}`,
26638
+ color: theme.palette.text.secondary
26639
+ },
26640
+ children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react10.Settings, { size: 16 })
26613
26641
  }
26614
26642
  )
26615
26643
  ]