@burtson-labs/bandit-engine 2.0.78 → 2.0.80
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.
- package/dist/{chat-C2C5VSLI.mjs → chat-52DKSYA5.mjs} +2 -2
- package/dist/{chunk-UDSKWLDG.mjs → chunk-L2AKXXK3.mjs} +2 -2
- package/dist/{chunk-2IK2YJGB.mjs → chunk-VDVXUEP2.mjs} +52 -10
- package/dist/chunk-VDVXUEP2.mjs.map +1 -0
- package/dist/index.js +51 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/management/management.js +51 -8
- package/dist/management/management.js.map +1 -1
- package/dist/management/management.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-2IK2YJGB.mjs.map +0 -1
- /package/dist/{chat-C2C5VSLI.mjs.map → chat-52DKSYA5.mjs.map} +0 -0
- /package/dist/{chunk-UDSKWLDG.mjs.map → chunk-L2AKXXK3.mjs.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -23501,6 +23501,7 @@ var init_conversation_drawer = __esm({
|
|
|
23501
23501
|
init_conversationStore();
|
|
23502
23502
|
init_projectStore();
|
|
23503
23503
|
init_authenticationStore();
|
|
23504
|
+
init_packageSettingsStore();
|
|
23504
23505
|
init_brandingService();
|
|
23505
23506
|
init_project_management_modal();
|
|
23506
23507
|
init_move_conversation_modal();
|
|
@@ -23602,19 +23603,45 @@ var init_conversation_drawer = __esm({
|
|
|
23602
23603
|
}, [user2, userDisplayName]);
|
|
23603
23604
|
const [avatarImage, setAvatarImage] = (0, import_react30.useState)(BANDIT_AVATAR);
|
|
23604
23605
|
(0, import_react30.useEffect)(() => {
|
|
23605
|
-
|
|
23606
|
+
let active2 = true;
|
|
23607
|
+
let objectUrl = null;
|
|
23608
|
+
const resolveAvatar2 = async () => {
|
|
23609
|
+
try {
|
|
23610
|
+
const avatarId = getCustomClaim("avatarUrl");
|
|
23611
|
+
const fileStorageApiUrl = usePackageSettingsStore.getState().settings?.fileStorageApiUrl;
|
|
23612
|
+
const token = useAuthenticationStore.getState().token;
|
|
23613
|
+
if (avatarId && fileStorageApiUrl && token) {
|
|
23614
|
+
const base = fileStorageApiUrl.replace(/\/$/, "");
|
|
23615
|
+
const res = await fetch(`${base}/app-asset/download/${encodeURIComponent(avatarId)}`, {
|
|
23616
|
+
headers: { Authorization: `Bearer ${token}` }
|
|
23617
|
+
});
|
|
23618
|
+
if (res.ok) {
|
|
23619
|
+
const blob = await res.blob();
|
|
23620
|
+
if (active2) {
|
|
23621
|
+
objectUrl = URL.createObjectURL(blob);
|
|
23622
|
+
setAvatarImage(objectUrl);
|
|
23623
|
+
}
|
|
23624
|
+
return;
|
|
23625
|
+
}
|
|
23626
|
+
}
|
|
23627
|
+
} catch {
|
|
23628
|
+
}
|
|
23606
23629
|
try {
|
|
23607
23630
|
const branding = await brandingService_default.getBranding();
|
|
23608
|
-
setAvatarImage(branding?.logoBase64 || BANDIT_AVATAR);
|
|
23631
|
+
if (active2) setAvatarImage(branding?.logoBase64 || BANDIT_AVATAR);
|
|
23609
23632
|
} catch (error) {
|
|
23610
23633
|
debugLogger.error("Failed to load branding avatar", {
|
|
23611
23634
|
error: error instanceof Error ? error.message : String(error)
|
|
23612
23635
|
});
|
|
23613
|
-
setAvatarImage(BANDIT_AVATAR);
|
|
23636
|
+
if (active2) setAvatarImage(BANDIT_AVATAR);
|
|
23614
23637
|
}
|
|
23615
23638
|
};
|
|
23616
|
-
|
|
23617
|
-
|
|
23639
|
+
resolveAvatar2();
|
|
23640
|
+
return () => {
|
|
23641
|
+
active2 = false;
|
|
23642
|
+
if (objectUrl) URL.revokeObjectURL(objectUrl);
|
|
23643
|
+
};
|
|
23644
|
+
}, [getCustomClaim]);
|
|
23618
23645
|
const avatarLabel = userDisplayName || user2?.email || "Bandit";
|
|
23619
23646
|
const avatarInitials = (0, import_react30.useMemo)(() => deriveInitials(avatarLabel), [avatarLabel]);
|
|
23620
23647
|
(0, import_react30.useEffect)(() => {
|
|
@@ -24119,6 +24146,10 @@ var init_conversation_drawer = __esm({
|
|
|
24119
24146
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
24120
24147
|
import_material21.Box,
|
|
24121
24148
|
{
|
|
24149
|
+
onClick: user2 ? () => {
|
|
24150
|
+
window.location.href = "/profile";
|
|
24151
|
+
} : void 0,
|
|
24152
|
+
title: user2 ? "Profile & settings" : void 0,
|
|
24122
24153
|
sx: {
|
|
24123
24154
|
mt: "auto",
|
|
24124
24155
|
px: 2,
|
|
@@ -24128,7 +24159,10 @@ var init_conversation_drawer = __esm({
|
|
|
24128
24159
|
alignItems: "center",
|
|
24129
24160
|
gap: 1.5,
|
|
24130
24161
|
justifyContent: "center",
|
|
24131
|
-
bgcolor: (0, import_material21.alpha)(theme.palette.background.default, isMobile ? 0.9 : 0.6)
|
|
24162
|
+
bgcolor: (0, import_material21.alpha)(theme.palette.background.default, isMobile ? 0.9 : 0.6),
|
|
24163
|
+
cursor: user2 ? "pointer" : "default",
|
|
24164
|
+
transition: "background-color 0.15s ease",
|
|
24165
|
+
"&:hover": user2 ? { bgcolor: (0, import_material21.alpha)(theme.palette.primary.main, 0.08) } : void 0
|
|
24132
24166
|
},
|
|
24133
24167
|
children: [
|
|
24134
24168
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
@@ -24168,16 +24202,25 @@ var init_conversation_drawer = __esm({
|
|
|
24168
24202
|
children: user2 ? userDisplayName : "Not signed in"
|
|
24169
24203
|
}
|
|
24170
24204
|
),
|
|
24171
|
-
|
|
24205
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
24172
24206
|
import_material21.Typography,
|
|
24173
24207
|
{
|
|
24174
24208
|
variant: "caption",
|
|
24209
|
+
noWrap: true,
|
|
24175
24210
|
sx: { color: theme.palette.text.secondary },
|
|
24176
|
-
children: "Connect your account to sync chats"
|
|
24211
|
+
children: user2 ? userSecondaryText || "View profile & settings" : "Connect your account to sync chats"
|
|
24177
24212
|
}
|
|
24178
24213
|
)
|
|
24179
24214
|
]
|
|
24180
24215
|
}
|
|
24216
|
+
),
|
|
24217
|
+
user2 && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
24218
|
+
import_lucide_react8.Settings,
|
|
24219
|
+
{
|
|
24220
|
+
size: 18,
|
|
24221
|
+
color: theme.palette.text.secondary,
|
|
24222
|
+
style: { flexShrink: 0, opacity: 0.85 }
|
|
24223
|
+
}
|
|
24181
24224
|
)
|
|
24182
24225
|
]
|
|
24183
24226
|
}
|