@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.js CHANGED
@@ -46,7 +46,7 @@ var init_packageSettingsStore = __esm({
46
46
  });
47
47
 
48
48
  // src/store/authenticationStore.ts
49
- var import_zustand2, TOKEN_KEY, validToken, user, rawToken, useAuthenticationStore;
49
+ var import_zustand2, TOKEN_KEY, validToken, user, rawToken, useAuthenticationStore, readPersistedToken;
50
50
  var init_authenticationStore = __esm({
51
51
  "src/store/authenticationStore.ts"() {
52
52
  "use strict";
@@ -99,6 +99,20 @@ var init_authenticationStore = __esm({
99
99
  set({ token: null, authError: null, user: null });
100
100
  }
101
101
  }));
102
+ readPersistedToken = () => {
103
+ try {
104
+ const raw = localStorage.getItem(TOKEN_KEY);
105
+ if (!raw) return null;
106
+ const base64 = raw.split(".")[1].replace(/-/g, "+").replace(/_/g, "/");
107
+ const json2 = decodeURIComponent(
108
+ atob(base64).split("").map((c) => "%" + ("00" + c.charCodeAt(0).toString(16)).slice(-2)).join("")
109
+ );
110
+ const decoded = JSON.parse(json2);
111
+ return decoded.exp * 1e3 > Date.now() ? raw : null;
112
+ } catch {
113
+ return null;
114
+ }
115
+ };
102
116
  }
103
117
  });
104
118
 
@@ -23737,6 +23751,11 @@ var init_conversation_drawer = __esm({
23737
23751
  return void 0;
23738
23752
  }, [user2, userDisplayName]);
23739
23753
  const [avatarImage, setAvatarImage] = (0, import_react31.useState)(BANDIT_AVATAR);
23754
+ (0, import_react31.useEffect)(() => {
23755
+ const fresh = readPersistedToken();
23756
+ const store = useAuthenticationStore.getState();
23757
+ if (fresh && fresh !== store.token) store.setToken(fresh);
23758
+ }, []);
23740
23759
  (0, import_react31.useEffect)(() => {
23741
23760
  let active2 = true;
23742
23761
  let objectUrl = null;
@@ -24339,8 +24358,8 @@ var init_conversation_drawer = __esm({
24339
24358
  flex: 1,
24340
24359
  display: "flex",
24341
24360
  flexDirection: "column",
24342
- alignItems: isMobile ? "center" : "flex-start",
24343
- textAlign: isMobile ? "center" : "left",
24361
+ alignItems: "flex-start",
24362
+ textAlign: "left",
24344
24363
  gap: 0.25
24345
24364
  },
24346
24365
  children: [
@@ -24366,11 +24385,20 @@ var init_conversation_drawer = __esm({
24366
24385
  }
24367
24386
  ),
24368
24387
  user2 && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
24369
- import_lucide_react8.Settings,
24388
+ import_material22.Box,
24370
24389
  {
24371
- size: 18,
24372
- color: theme.palette.text.secondary,
24373
- style: { flexShrink: 0, opacity: 0.85 }
24390
+ sx: {
24391
+ flexShrink: 0,
24392
+ display: "flex",
24393
+ alignItems: "center",
24394
+ justifyContent: "center",
24395
+ width: 30,
24396
+ height: 30,
24397
+ borderRadius: "50%",
24398
+ border: `1px solid ${(0, import_material22.alpha)(theme.palette.divider, 0.8)}`,
24399
+ color: theme.palette.text.secondary
24400
+ },
24401
+ children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react8.Settings, { size: 16 })
24374
24402
  }
24375
24403
  )
24376
24404
  ]