@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.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
chat_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VDVXUEP2.mjs";
|
|
4
4
|
import {
|
|
5
5
|
chat_provider_default
|
|
6
6
|
} from "./chunk-OPN32F2X.mjs";
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
useGatewayHealth,
|
|
11
11
|
useGatewayMemory,
|
|
12
12
|
useGatewayModels
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-L2AKXXK3.mjs";
|
|
14
14
|
import "./chunk-YYYEMVBV.mjs";
|
|
15
15
|
import "./chunk-6ITUH375.mjs";
|
|
16
16
|
import "./chunk-3LT77723.mjs";
|
|
@@ -25740,6 +25740,7 @@ var init_conversation_drawer = __esm({
|
|
|
25740
25740
|
init_conversationStore();
|
|
25741
25741
|
init_projectStore();
|
|
25742
25742
|
init_authenticationStore();
|
|
25743
|
+
init_packageSettingsStore();
|
|
25743
25744
|
init_brandingService();
|
|
25744
25745
|
init_project_management_modal();
|
|
25745
25746
|
init_move_conversation_modal();
|
|
@@ -25841,19 +25842,45 @@ var init_conversation_drawer = __esm({
|
|
|
25841
25842
|
}, [user2, userDisplayName]);
|
|
25842
25843
|
const [avatarImage, setAvatarImage] = (0, import_react53.useState)(BANDIT_AVATAR);
|
|
25843
25844
|
(0, import_react53.useEffect)(() => {
|
|
25844
|
-
|
|
25845
|
+
let active2 = true;
|
|
25846
|
+
let objectUrl = null;
|
|
25847
|
+
const resolveAvatar2 = async () => {
|
|
25848
|
+
try {
|
|
25849
|
+
const avatarId = getCustomClaim("avatarUrl");
|
|
25850
|
+
const fileStorageApiUrl = usePackageSettingsStore.getState().settings?.fileStorageApiUrl;
|
|
25851
|
+
const token = useAuthenticationStore.getState().token;
|
|
25852
|
+
if (avatarId && fileStorageApiUrl && token) {
|
|
25853
|
+
const base = fileStorageApiUrl.replace(/\/$/, "");
|
|
25854
|
+
const res = await fetch(`${base}/app-asset/download/${encodeURIComponent(avatarId)}`, {
|
|
25855
|
+
headers: { Authorization: `Bearer ${token}` }
|
|
25856
|
+
});
|
|
25857
|
+
if (res.ok) {
|
|
25858
|
+
const blob = await res.blob();
|
|
25859
|
+
if (active2) {
|
|
25860
|
+
objectUrl = URL.createObjectURL(blob);
|
|
25861
|
+
setAvatarImage(objectUrl);
|
|
25862
|
+
}
|
|
25863
|
+
return;
|
|
25864
|
+
}
|
|
25865
|
+
}
|
|
25866
|
+
} catch {
|
|
25867
|
+
}
|
|
25845
25868
|
try {
|
|
25846
25869
|
const branding = await brandingService_default.getBranding();
|
|
25847
|
-
setAvatarImage(branding?.logoBase64 || BANDIT_AVATAR);
|
|
25870
|
+
if (active2) setAvatarImage(branding?.logoBase64 || BANDIT_AVATAR);
|
|
25848
25871
|
} catch (error) {
|
|
25849
25872
|
debugLogger.error("Failed to load branding avatar", {
|
|
25850
25873
|
error: error instanceof Error ? error.message : String(error)
|
|
25851
25874
|
});
|
|
25852
|
-
setAvatarImage(BANDIT_AVATAR);
|
|
25875
|
+
if (active2) setAvatarImage(BANDIT_AVATAR);
|
|
25853
25876
|
}
|
|
25854
25877
|
};
|
|
25855
|
-
|
|
25856
|
-
|
|
25878
|
+
resolveAvatar2();
|
|
25879
|
+
return () => {
|
|
25880
|
+
active2 = false;
|
|
25881
|
+
if (objectUrl) URL.revokeObjectURL(objectUrl);
|
|
25882
|
+
};
|
|
25883
|
+
}, [getCustomClaim]);
|
|
25857
25884
|
const avatarLabel = userDisplayName || user2?.email || "Bandit";
|
|
25858
25885
|
const avatarInitials = (0, import_react53.useMemo)(() => deriveInitials(avatarLabel), [avatarLabel]);
|
|
25859
25886
|
(0, import_react53.useEffect)(() => {
|
|
@@ -26358,6 +26385,10 @@ var init_conversation_drawer = __esm({
|
|
|
26358
26385
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
26359
26386
|
import_material42.Box,
|
|
26360
26387
|
{
|
|
26388
|
+
onClick: user2 ? () => {
|
|
26389
|
+
window.location.href = "/profile";
|
|
26390
|
+
} : void 0,
|
|
26391
|
+
title: user2 ? "Profile & settings" : void 0,
|
|
26361
26392
|
sx: {
|
|
26362
26393
|
mt: "auto",
|
|
26363
26394
|
px: 2,
|
|
@@ -26367,7 +26398,10 @@ var init_conversation_drawer = __esm({
|
|
|
26367
26398
|
alignItems: "center",
|
|
26368
26399
|
gap: 1.5,
|
|
26369
26400
|
justifyContent: "center",
|
|
26370
|
-
bgcolor: (0, import_material42.alpha)(theme.palette.background.default, isMobile ? 0.9 : 0.6)
|
|
26401
|
+
bgcolor: (0, import_material42.alpha)(theme.palette.background.default, isMobile ? 0.9 : 0.6),
|
|
26402
|
+
cursor: user2 ? "pointer" : "default",
|
|
26403
|
+
transition: "background-color 0.15s ease",
|
|
26404
|
+
"&:hover": user2 ? { bgcolor: (0, import_material42.alpha)(theme.palette.primary.main, 0.08) } : void 0
|
|
26371
26405
|
},
|
|
26372
26406
|
children: [
|
|
26373
26407
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
@@ -26407,16 +26441,25 @@ var init_conversation_drawer = __esm({
|
|
|
26407
26441
|
children: user2 ? userDisplayName : "Not signed in"
|
|
26408
26442
|
}
|
|
26409
26443
|
),
|
|
26410
|
-
|
|
26444
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
26411
26445
|
import_material42.Typography,
|
|
26412
26446
|
{
|
|
26413
26447
|
variant: "caption",
|
|
26448
|
+
noWrap: true,
|
|
26414
26449
|
sx: { color: theme.palette.text.secondary },
|
|
26415
|
-
children: "Connect your account to sync chats"
|
|
26450
|
+
children: user2 ? userSecondaryText || "View profile & settings" : "Connect your account to sync chats"
|
|
26416
26451
|
}
|
|
26417
26452
|
)
|
|
26418
26453
|
]
|
|
26419
26454
|
}
|
|
26455
|
+
),
|
|
26456
|
+
user2 && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
26457
|
+
import_lucide_react10.Settings,
|
|
26458
|
+
{
|
|
26459
|
+
size: 18,
|
|
26460
|
+
color: theme.palette.text.secondary,
|
|
26461
|
+
style: { flexShrink: 0, opacity: 0.85 }
|
|
26462
|
+
}
|
|
26420
26463
|
)
|
|
26421
26464
|
]
|
|
26422
26465
|
}
|