@burtson-labs/bandit-engine 2.0.77 → 2.0.79

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.
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  chat_default
3
- } from "./chunk-62PZTN7J.mjs";
3
+ } from "./chunk-3E66ZVMB.mjs";
4
4
  import "./chunk-ONQMRE2G.mjs";
5
- import "./chunk-U633CJBV.mjs";
5
+ import "./chunk-YYYEMVBV.mjs";
6
6
  import "./chunk-3LT77723.mjs";
7
- import "./chunk-6DY7W4NK.mjs";
7
+ import "./chunk-57L7TXB6.mjs";
8
8
  import "./chunk-4D7245ZO.mjs";
9
9
  import "./chunk-LWHSOEPR.mjs";
10
10
  import "./chunk-H3BYFEIE.mjs";
@@ -13,4 +13,4 @@ import "./chunk-BJTO5JO5.mjs";
13
13
  export {
14
14
  chat_default as default
15
15
  };
16
- //# sourceMappingURL=chat-ZIHCX6ES.mjs.map
16
+ //# sourceMappingURL=chat-62D72T4J.mjs.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-ONQMRE2G.mjs";
4
4
  import {
5
5
  StreamingMarkdown_default
6
- } from "./chunk-U633CJBV.mjs";
6
+ } from "./chunk-YYYEMVBV.mjs";
7
7
  import {
8
8
  useMCPToolsStore
9
9
  } from "./chunk-3LT77723.mjs";
@@ -43,7 +43,7 @@ import {
43
43
  useNotificationService,
44
44
  useTTS,
45
45
  useVoiceStore
46
- } from "./chunk-6DY7W4NK.mjs";
46
+ } from "./chunk-57L7TXB6.mjs";
47
47
  import {
48
48
  authenticationService,
49
49
  brandingService_default,
@@ -933,7 +933,7 @@ ${sanitize(
933
933
  };
934
934
  const memory = localStorage.getItem("bandit-memory");
935
935
  const hasAttachmentAction = !isPlaygroundMode2 && fileInputs.length < 3 && isDocumentUploadEnabled;
936
- const hasMemoryAction = isMemoryEnabled;
936
+ const hasMemoryAction = false;
937
937
  const hasFeedbackAction = isFeedbackEnabled && isMobile;
938
938
  const hasSttAction = isSTTAvailable && !isVoiceModeEnabled;
939
939
  const hasSecondaryActions = isMobile && (hasAttachmentAction || hasMemoryAction || hasFeedbackAction || hasSttAction);
@@ -5857,19 +5857,45 @@ var ConversationDrawer = ({ open, onClose }) => {
5857
5857
  }, [user, userDisplayName]);
5858
5858
  const [avatarImage, setAvatarImage] = useState11(BANDIT_AVATAR);
5859
5859
  useEffect10(() => {
5860
- const fetchBranding = async () => {
5860
+ let active2 = true;
5861
+ let objectUrl = null;
5862
+ const resolveAvatar = async () => {
5863
+ try {
5864
+ const avatarId = getCustomClaim("avatarUrl");
5865
+ const fileStorageApiUrl = usePackageSettingsStore.getState().settings?.fileStorageApiUrl;
5866
+ const token = useAuthenticationStore.getState().token;
5867
+ if (avatarId && fileStorageApiUrl && token) {
5868
+ const base = fileStorageApiUrl.replace(/\/$/, "");
5869
+ const res = await fetch(`${base}/app-asset/download/${encodeURIComponent(avatarId)}`, {
5870
+ headers: { Authorization: `Bearer ${token}` }
5871
+ });
5872
+ if (res.ok) {
5873
+ const blob = await res.blob();
5874
+ if (active2) {
5875
+ objectUrl = URL.createObjectURL(blob);
5876
+ setAvatarImage(objectUrl);
5877
+ }
5878
+ return;
5879
+ }
5880
+ }
5881
+ } catch {
5882
+ }
5861
5883
  try {
5862
5884
  const branding = await brandingService_default.getBranding();
5863
- setAvatarImage(branding?.logoBase64 || BANDIT_AVATAR);
5885
+ if (active2) setAvatarImage(branding?.logoBase64 || BANDIT_AVATAR);
5864
5886
  } catch (error) {
5865
5887
  debugLogger.error("Failed to load branding avatar", {
5866
5888
  error: error instanceof Error ? error.message : String(error)
5867
5889
  });
5868
- setAvatarImage(BANDIT_AVATAR);
5890
+ if (active2) setAvatarImage(BANDIT_AVATAR);
5869
5891
  }
5870
5892
  };
5871
- fetchBranding();
5872
- }, []);
5893
+ resolveAvatar();
5894
+ return () => {
5895
+ active2 = false;
5896
+ if (objectUrl) URL.revokeObjectURL(objectUrl);
5897
+ };
5898
+ }, [getCustomClaim]);
5873
5899
  const avatarLabel = userDisplayName || user?.email || "Bandit";
5874
5900
  const avatarInitials = useMemo(() => deriveInitials(avatarLabel), [avatarLabel]);
5875
5901
  useEffect10(() => {
@@ -6374,6 +6400,10 @@ var ConversationDrawer = ({ open, onClose }) => {
6374
6400
  /* @__PURE__ */ jsxs9(
6375
6401
  Box9,
6376
6402
  {
6403
+ onClick: user ? () => {
6404
+ window.location.href = "/profile";
6405
+ } : void 0,
6406
+ title: user ? "Profile & settings" : void 0,
6377
6407
  sx: {
6378
6408
  mt: "auto",
6379
6409
  px: 2,
@@ -6383,7 +6413,10 @@ var ConversationDrawer = ({ open, onClose }) => {
6383
6413
  alignItems: "center",
6384
6414
  gap: 1.5,
6385
6415
  justifyContent: "center",
6386
- bgcolor: alpha6(theme.palette.background.default, isMobile ? 0.9 : 0.6)
6416
+ bgcolor: alpha6(theme.palette.background.default, isMobile ? 0.9 : 0.6),
6417
+ cursor: user ? "pointer" : "default",
6418
+ transition: "background-color 0.15s ease",
6419
+ "&:hover": user ? { bgcolor: alpha6(theme.palette.primary.main, 0.08) } : void 0
6387
6420
  },
6388
6421
  children: [
6389
6422
  /* @__PURE__ */ jsx12(
@@ -10118,4 +10151,4 @@ var chat_default = Chat;
10118
10151
  export {
10119
10152
  chat_default
10120
10153
  };
10121
- //# sourceMappingURL=chunk-62PZTN7J.mjs.map
10154
+ //# sourceMappingURL=chunk-3E66ZVMB.mjs.map