@burtson-labs/bandit-engine 2.0.62 → 2.0.64
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-SN3UNX23.mjs → chat-IGKTUDME.mjs} +4 -4
- package/dist/{chunk-O7JGT7HR.mjs → chunk-DCZLPUMY.mjs} +5 -5
- package/dist/{chunk-SRCCNBHF.mjs → chunk-DPMJELHK.mjs} +2 -2
- package/dist/{chunk-Y4NDNAAR.mjs → chunk-DR4X32D3.mjs} +5 -4
- package/dist/chunk-DR4X32D3.mjs.map +1 -0
- package/dist/{chunk-5WQMMCZQ.mjs → chunk-FXFTA5PZ.mjs} +92 -295
- package/dist/chunk-FXFTA5PZ.mjs.map +1 -0
- package/dist/{chunk-PY7A3J5T.mjs → chunk-HKQSZALO.mjs} +2 -2
- package/dist/index.js +108 -312
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -5
- package/dist/management/management.js +183 -387
- package/dist/management/management.js.map +1 -1
- package/dist/management/management.mjs +4 -4
- package/dist/modals/chat-modal/chat-modal.js +167 -368
- package/dist/modals/chat-modal/chat-modal.js.map +1 -1
- package/dist/modals/chat-modal/chat-modal.mjs +2 -2
- package/package.json +1 -1
- package/dist/chunk-5WQMMCZQ.mjs.map +0 -1
- package/dist/chunk-Y4NDNAAR.mjs.map +0 -1
- /package/dist/{chat-SN3UNX23.mjs.map → chat-IGKTUDME.mjs.map} +0 -0
- /package/dist/{chunk-O7JGT7HR.mjs.map → chunk-DCZLPUMY.mjs.map} +0 -0
- /package/dist/{chunk-SRCCNBHF.mjs.map → chunk-DPMJELHK.mjs.map} +0 -0
- /package/dist/{chunk-PY7A3J5T.mjs.map → chunk-HKQSZALO.mjs.map} +0 -0
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
useNotificationService,
|
|
25
25
|
useTTS,
|
|
26
26
|
useVoiceStore
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-FXFTA5PZ.mjs";
|
|
28
28
|
import {
|
|
29
29
|
brandingService_default,
|
|
30
30
|
toTitleCase,
|
|
@@ -2803,4 +2803,4 @@ export {
|
|
|
2803
2803
|
MAX_WINDOWED_HEIGHT,
|
|
2804
2804
|
chat_modal_default
|
|
2805
2805
|
};
|
|
2806
|
-
//# sourceMappingURL=chunk-
|
|
2806
|
+
//# sourceMappingURL=chunk-HKQSZALO.mjs.map
|
package/dist/index.js
CHANGED
|
@@ -13559,7 +13559,7 @@ var init_ai_response_action_bar = __esm({
|
|
|
13559
13559
|
});
|
|
13560
13560
|
|
|
13561
13561
|
// src/modals/chat-modal/ai-response-text-field.tsx
|
|
13562
|
-
var import_react15, import_styles4, import_react_markdown, import_remark_gfm, import_rehype_raw, import_rehype_sanitize2, import_material8, import_jsx_runtime11, brainIcon,
|
|
13562
|
+
var import_react15, import_styles4, import_react_markdown, import_remark_gfm, import_rehype_raw, import_rehype_sanitize2, import_material8, import_jsx_runtime11, brainIcon, normalizeTables, isNonEmptyString, toDateSafe, toNumberArray, MarkdownCodeBlock, AIResponseTextField, ai_response_text_field_default;
|
|
13563
13563
|
var init_ai_response_text_field = __esm({
|
|
13564
13564
|
"src/modals/chat-modal/ai-response-text-field.tsx"() {
|
|
13565
13565
|
"use strict";
|
|
@@ -13574,33 +13574,12 @@ var init_ai_response_text_field = __esm({
|
|
|
13574
13574
|
import_rehype_sanitize2 = __toESM(require("rehype-sanitize"));
|
|
13575
13575
|
init_debugLogger();
|
|
13576
13576
|
import_material8 = require("@mui/material");
|
|
13577
|
-
init_modelStore();
|
|
13578
13577
|
init_lowlight();
|
|
13579
13578
|
init_markdownRendering();
|
|
13580
13579
|
init_lucide_icons();
|
|
13581
13580
|
init_ai_response_action_bar();
|
|
13582
|
-
init_brandingService();
|
|
13583
13581
|
import_jsx_runtime11 = require("react/jsx-runtime");
|
|
13584
13582
|
brainIcon = "https://cdn.burtson.ai/images/brain-icon.png";
|
|
13585
|
-
avatarFilenames = {
|
|
13586
|
-
"Bandit-Core": "core-avatar.png",
|
|
13587
|
-
"Bandit-Muse": "muse-avatar.png",
|
|
13588
|
-
"Bandit-Logic": "logic-avatar.png",
|
|
13589
|
-
"Bandit-D1VA": "d1va-avatar.png",
|
|
13590
|
-
"Bandit-Exec": "exec-avatar.png",
|
|
13591
|
-
"default": "bandit-head.png"
|
|
13592
|
-
};
|
|
13593
|
-
banditHead2 = `https://cdn.burtson.ai/images/bandit-head.png`;
|
|
13594
|
-
resolveAvatar2 = (selectedModel) => {
|
|
13595
|
-
const model = useModelStore.getState().availableModels.find(
|
|
13596
|
-
(m) => m.name === selectedModel
|
|
13597
|
-
);
|
|
13598
|
-
if (model?.avatarBase64) {
|
|
13599
|
-
return model.avatarBase64;
|
|
13600
|
-
}
|
|
13601
|
-
const avatarFilename = avatarFilenames[selectedModel] || avatarFilenames["default"];
|
|
13602
|
-
return `https://cdn.burtson.ai/avatars/${avatarFilename}`;
|
|
13603
|
-
};
|
|
13604
13583
|
normalizeTables = (markdown2) => {
|
|
13605
13584
|
const lines = markdown2.split("\n");
|
|
13606
13585
|
const output = [];
|
|
@@ -13946,15 +13925,6 @@ var init_ai_response_text_field = __esm({
|
|
|
13946
13925
|
const timeout3 = setTimeout(() => setShowMemoryUpdated(false), 3e3);
|
|
13947
13926
|
return () => clearTimeout(timeout3);
|
|
13948
13927
|
}, [memoryUpdated]);
|
|
13949
|
-
const selectedModel = useModelStore((state) => state.selectedModel);
|
|
13950
|
-
const [userAvatar, setUserAvatar] = (0, import_react15.useState)(banditHead2);
|
|
13951
|
-
(0, import_react15.useEffect)(() => {
|
|
13952
|
-
const fetchBranding = async () => {
|
|
13953
|
-
const branding = await brandingService_default.getBranding();
|
|
13954
|
-
setUserAvatar(branding?.logoBase64 || banditHead2);
|
|
13955
|
-
};
|
|
13956
|
-
fetchBranding();
|
|
13957
|
-
}, []);
|
|
13958
13928
|
const theme = (0, import_styles4.useTheme)();
|
|
13959
13929
|
const chatResponse = theme.palette.chat?.response;
|
|
13960
13930
|
const sanitizeMarkdown = (raw) => {
|
|
@@ -14323,283 +14293,109 @@ ${sourcesMarkdownList.join("\n")}`;
|
|
|
14323
14293
|
alignSelf: "stretch",
|
|
14324
14294
|
display: "flex",
|
|
14325
14295
|
flexDirection: "column",
|
|
14326
|
-
|
|
14327
|
-
|
|
14328
|
-
|
|
14329
|
-
|
|
14330
|
-
userSelect: "text",
|
|
14331
|
-
border: "1px solid " + (chatResponse.aiBorder || "#ccc"),
|
|
14332
|
-
boxShadow: "0 0 6px rgba(0,0,0,0.3)"
|
|
14296
|
+
color: chatResponse.aiText || theme.palette.text.primary,
|
|
14297
|
+
px: isMobile ? 0.5 : 2,
|
|
14298
|
+
py: 1,
|
|
14299
|
+
userSelect: "text"
|
|
14333
14300
|
},
|
|
14334
14301
|
children: [
|
|
14335
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
14336
|
-
|
|
14337
|
-
|
|
14338
|
-
|
|
14339
|
-
|
|
14340
|
-
|
|
14341
|
-
|
|
14342
|
-
|
|
14343
|
-
|
|
14302
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material8.Box, { sx: { display: "flex", justifyContent: "flex-end", mb: 2.5 }, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_material8.Box, { sx: { maxWidth: { xs: "100%", sm: "85%" }, minWidth: 0 }, children: [
|
|
14303
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
14304
|
+
import_material8.Box,
|
|
14305
|
+
{
|
|
14306
|
+
sx: {
|
|
14307
|
+
bgcolor: chatResponse.userBubble || (0, import_styles4.alpha)(theme.palette.common.white, 0.07),
|
|
14308
|
+
borderRadius: "18px",
|
|
14309
|
+
px: 2,
|
|
14310
|
+
py: 1.25,
|
|
14311
|
+
wordBreak: "break-word",
|
|
14312
|
+
whiteSpace: "pre-wrap",
|
|
14313
|
+
overflowWrap: "break-word"
|
|
14344
14314
|
},
|
|
14345
|
-
|
|
14346
|
-
|
|
14347
|
-
justifyContent: "flex-end"
|
|
14348
|
-
},
|
|
14349
|
-
children: [
|
|
14350
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
14351
|
-
import_material8.Box,
|
|
14315
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
14316
|
+
import_material8.Typography,
|
|
14352
14317
|
{
|
|
14353
14318
|
sx: {
|
|
14354
|
-
|
|
14355
|
-
|
|
14356
|
-
|
|
14319
|
+
color: theme.palette.text.primary,
|
|
14320
|
+
lineHeight: 1.5,
|
|
14321
|
+
wordBreak: "break-word",
|
|
14322
|
+
whiteSpace: "pre-wrap"
|
|
14357
14323
|
},
|
|
14358
|
-
children:
|
|
14359
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
14360
|
-
import_material8.Avatar,
|
|
14361
|
-
{
|
|
14362
|
-
alt: "You",
|
|
14363
|
-
src: userAvatar,
|
|
14364
|
-
sx: {
|
|
14365
|
-
display: { xs: "none", sm: "flex" },
|
|
14366
|
-
width: { sm: 72 },
|
|
14367
|
-
height: { sm: 72 },
|
|
14368
|
-
bgcolor: chatResponse.userAvatarBackground || (theme.palette.mode === "dark" ? "transparent" : "#eee"),
|
|
14369
|
-
color: "#fff",
|
|
14370
|
-
fontWeight: "bold",
|
|
14371
|
-
fontSize: { sm: "1.1rem" },
|
|
14372
|
-
border: "2px solid #a78bfa",
|
|
14373
|
-
boxShadow: "0 0 8px rgba(167, 139, 250, 0.3)",
|
|
14374
|
-
transform: "scaleX(1)"
|
|
14375
|
-
}
|
|
14376
|
-
}
|
|
14377
|
-
),
|
|
14378
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
14379
|
-
import_material8.Typography,
|
|
14380
|
-
{
|
|
14381
|
-
variant: "caption",
|
|
14382
|
-
sx: { color: chatResponse.modelLabel || "#888", mt: 1, fontStyle: "italic" },
|
|
14383
|
-
children: "You said"
|
|
14384
|
-
}
|
|
14385
|
-
)
|
|
14386
|
-
]
|
|
14324
|
+
children: question
|
|
14387
14325
|
}
|
|
14388
|
-
)
|
|
14389
|
-
|
|
14390
|
-
|
|
14391
|
-
|
|
14392
|
-
|
|
14393
|
-
|
|
14394
|
-
|
|
14395
|
-
|
|
14396
|
-
|
|
14397
|
-
|
|
14398
|
-
|
|
14399
|
-
|
|
14400
|
-
|
|
14401
|
-
|
|
14402
|
-
|
|
14403
|
-
|
|
14404
|
-
|
|
14405
|
-
overflowWrap: "break-word",
|
|
14406
|
-
mt: { xs: 0.5, sm: 0.25 }
|
|
14407
|
-
},
|
|
14408
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
14409
|
-
import_material8.Typography,
|
|
14410
|
-
{
|
|
14411
|
-
sx: {
|
|
14412
|
-
color: chatResponse.userText || "#6C9AC5",
|
|
14413
|
-
fontStyle: "italic",
|
|
14414
|
-
wordBreak: "break-word",
|
|
14415
|
-
whiteSpace: "pre-wrap"
|
|
14416
|
-
},
|
|
14417
|
-
children: question
|
|
14418
|
-
}
|
|
14419
|
-
)
|
|
14420
|
-
}
|
|
14421
|
-
),
|
|
14422
|
-
images && images.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material8.Box, { sx: { display: "flex", gap: 1, mt: 1, flexWrap: "wrap" }, children: images.map((img, i) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
14423
|
-
import_material8.Avatar,
|
|
14424
|
-
{
|
|
14425
|
-
src: img,
|
|
14426
|
-
variant: "rounded",
|
|
14427
|
-
onClick: () => setOpenImage(img),
|
|
14428
|
-
sx: {
|
|
14429
|
-
width: 64,
|
|
14430
|
-
height: 64,
|
|
14431
|
-
borderRadius: 2,
|
|
14432
|
-
cursor: "pointer",
|
|
14433
|
-
"&:hover": { boxShadow: `0 0 0 2px ${theme.palette.primary.main}` }
|
|
14434
|
-
}
|
|
14435
|
-
},
|
|
14436
|
-
i
|
|
14437
|
-
)) })
|
|
14438
|
-
] })
|
|
14439
|
-
]
|
|
14440
|
-
}
|
|
14441
|
-
),
|
|
14442
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material8.Box, { sx: { borderBottom: `1px solid ${theme.palette.divider}`, my: 2 } }),
|
|
14443
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
14444
|
-
import_material8.Box,
|
|
14445
|
-
{
|
|
14446
|
-
sx: {
|
|
14447
|
-
display: "flex",
|
|
14448
|
-
flexDirection: "column",
|
|
14449
|
-
alignItems: {
|
|
14450
|
-
xs: "center",
|
|
14451
|
-
sm: "flex-start"
|
|
14452
|
-
},
|
|
14453
|
-
gap: 2,
|
|
14454
|
-
mb: 2
|
|
14326
|
+
)
|
|
14327
|
+
}
|
|
14328
|
+
),
|
|
14329
|
+
images && images.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material8.Box, { sx: { display: "flex", gap: 1, mt: 1, flexWrap: "wrap", justifyContent: "flex-end" }, children: images.map((img, i) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
14330
|
+
import_material8.Avatar,
|
|
14331
|
+
{
|
|
14332
|
+
src: img,
|
|
14333
|
+
variant: "rounded",
|
|
14334
|
+
onClick: () => setOpenImage(img),
|
|
14335
|
+
sx: {
|
|
14336
|
+
width: 96,
|
|
14337
|
+
height: 96,
|
|
14338
|
+
borderRadius: 2,
|
|
14339
|
+
border: `1px solid ${(0, import_styles4.alpha)(theme.palette.text.primary, 0.25)}`,
|
|
14340
|
+
cursor: "pointer",
|
|
14341
|
+
"&:hover": { boxShadow: `0 0 0 2px ${theme.palette.primary.main}` }
|
|
14342
|
+
}
|
|
14455
14343
|
},
|
|
14456
|
-
|
|
14457
|
-
|
|
14458
|
-
|
|
14459
|
-
|
|
14460
|
-
|
|
14461
|
-
|
|
14462
|
-
|
|
14463
|
-
|
|
14464
|
-
|
|
14465
|
-
|
|
14466
|
-
|
|
14467
|
-
|
|
14468
|
-
|
|
14469
|
-
|
|
14470
|
-
|
|
14471
|
-
|
|
14472
|
-
|
|
14473
|
-
|
|
14474
|
-
|
|
14475
|
-
|
|
14476
|
-
|
|
14477
|
-
|
|
14478
|
-
|
|
14479
|
-
|
|
14480
|
-
|
|
14481
|
-
|
|
14482
|
-
|
|
14483
|
-
|
|
14484
|
-
|
|
14485
|
-
|
|
14486
|
-
|
|
14487
|
-
|
|
14488
|
-
|
|
14489
|
-
|
|
14490
|
-
" says"
|
|
14491
|
-
]
|
|
14492
|
-
}
|
|
14493
|
-
) })
|
|
14494
|
-
]
|
|
14495
|
-
}
|
|
14496
|
-
),
|
|
14497
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
14498
|
-
import_material8.Box,
|
|
14499
|
-
{
|
|
14500
|
-
sx: {
|
|
14501
|
-
display: { xs: "flex", sm: "none" },
|
|
14502
|
-
justifyContent: "right",
|
|
14503
|
-
width: "100%",
|
|
14504
|
-
mt: -1,
|
|
14505
|
-
mb: 1
|
|
14506
|
-
},
|
|
14507
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
14508
|
-
import_material8.Typography,
|
|
14509
|
-
{
|
|
14510
|
-
variant: "caption",
|
|
14511
|
-
sx: { fontStyle: "italic", color: chatResponse.modelLabel || "#888" },
|
|
14512
|
-
children: [
|
|
14513
|
-
selectedModel,
|
|
14514
|
-
" says"
|
|
14515
|
-
]
|
|
14516
|
-
}
|
|
14517
|
-
)
|
|
14518
|
-
}
|
|
14519
|
-
),
|
|
14520
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_material8.Box, { sx: { position: "relative", width: "100%" }, children: [
|
|
14521
|
-
cancelled && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
14522
|
-
import_material8.Box,
|
|
14523
|
-
{
|
|
14524
|
-
sx: {
|
|
14525
|
-
position: "absolute",
|
|
14526
|
-
top: -24,
|
|
14527
|
-
left: 0,
|
|
14528
|
-
display: "flex",
|
|
14529
|
-
alignItems: "center",
|
|
14530
|
-
gap: 1,
|
|
14531
|
-
pl: 1,
|
|
14532
|
-
zIndex: 1
|
|
14533
|
-
},
|
|
14534
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material8.Typography, { variant: "caption", sx: { fontStyle: "italic", opacity: 0.85 }, children: "Cancelled by you" })
|
|
14535
|
-
}
|
|
14536
|
-
),
|
|
14537
|
-
showMemoryUpdated && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
14538
|
-
import_material8.Box,
|
|
14539
|
-
{
|
|
14540
|
-
sx: {
|
|
14541
|
-
position: "absolute",
|
|
14542
|
-
top: -24,
|
|
14543
|
-
right: 0,
|
|
14544
|
-
display: "flex",
|
|
14545
|
-
alignItems: "center",
|
|
14546
|
-
gap: 1,
|
|
14547
|
-
pr: 1,
|
|
14548
|
-
animation: "fadeOut 0.3s ease-in 2.7s forwards",
|
|
14549
|
-
zIndex: 1
|
|
14550
|
-
},
|
|
14551
|
-
children: [
|
|
14552
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
14553
|
-
"img",
|
|
14554
|
-
{
|
|
14555
|
-
src: brainIcon,
|
|
14556
|
-
alt: "Memory",
|
|
14557
|
-
style: { width: 18, height: 18 }
|
|
14558
|
-
}
|
|
14559
|
-
),
|
|
14560
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
14561
|
-
import_material8.Typography,
|
|
14562
|
-
{
|
|
14563
|
-
variant: "caption",
|
|
14564
|
-
sx: { color: chatResponse.memoryText || "#2e7d32", fontStyle: "italic" },
|
|
14565
|
-
children: "Bandit added to memory"
|
|
14566
|
-
}
|
|
14567
|
-
)
|
|
14568
|
-
]
|
|
14569
|
-
}
|
|
14570
|
-
),
|
|
14344
|
+
i
|
|
14345
|
+
)) })
|
|
14346
|
+
] }) }),
|
|
14347
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_material8.Box, { sx: { position: "relative", width: "100%", maxWidth: { xs: "100%", sm: "768px" } }, children: [
|
|
14348
|
+
cancelled && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
14349
|
+
import_material8.Box,
|
|
14350
|
+
{
|
|
14351
|
+
sx: {
|
|
14352
|
+
position: "absolute",
|
|
14353
|
+
top: -22,
|
|
14354
|
+
left: 0,
|
|
14355
|
+
display: "flex",
|
|
14356
|
+
alignItems: "center",
|
|
14357
|
+
gap: 1,
|
|
14358
|
+
zIndex: 1
|
|
14359
|
+
},
|
|
14360
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material8.Typography, { variant: "caption", sx: { fontStyle: "italic", opacity: 0.85 }, children: "Cancelled by you" })
|
|
14361
|
+
}
|
|
14362
|
+
),
|
|
14363
|
+
showMemoryUpdated && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
14364
|
+
import_material8.Box,
|
|
14365
|
+
{
|
|
14366
|
+
sx: {
|
|
14367
|
+
position: "absolute",
|
|
14368
|
+
top: -22,
|
|
14369
|
+
right: 0,
|
|
14370
|
+
display: "flex",
|
|
14371
|
+
alignItems: "center",
|
|
14372
|
+
gap: 1,
|
|
14373
|
+
animation: "fadeOut 0.3s ease-in 2.7s forwards",
|
|
14374
|
+
zIndex: 1
|
|
14375
|
+
},
|
|
14376
|
+
children: [
|
|
14377
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("img", { src: brainIcon, alt: "Memory", style: { width: 16, height: 16 } }),
|
|
14571
14378
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
14572
|
-
import_material8.
|
|
14379
|
+
import_material8.Typography,
|
|
14573
14380
|
{
|
|
14574
|
-
|
|
14575
|
-
|
|
14576
|
-
|
|
14577
|
-
px: isMobile ? 1 : 1.5,
|
|
14578
|
-
// Reduced padding on mobile
|
|
14579
|
-
py: 1.25,
|
|
14580
|
-
width: "100%",
|
|
14581
|
-
maxWidth: isMobile ? "100%" : "768px",
|
|
14582
|
-
// Full width on mobile
|
|
14583
|
-
border: "1px solid " + (chatResponse.aiBorder || "#ccc"),
|
|
14584
|
-
wordBreak: "break-word",
|
|
14585
|
-
alignSelf: "flex-start",
|
|
14586
|
-
mt: { xs: 0.5, sm: 0.25 }
|
|
14587
|
-
},
|
|
14588
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material8.Box, { sx: { width: "100%", maxWidth: "100%" }, children: typeof response === "string" ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
14589
|
-
import_react_markdown.default,
|
|
14590
|
-
{
|
|
14591
|
-
remarkPlugins: [import_remark_gfm.default],
|
|
14592
|
-
rehypePlugins: [import_rehype_raw.default, [import_rehype_sanitize2.default, markdownSanitizeSchema]],
|
|
14593
|
-
components,
|
|
14594
|
-
children: enrichedMarkdown ?? sanitizeMarkdown(response)
|
|
14595
|
-
}
|
|
14596
|
-
) : import_react15.default.isValidElement(response) ? response : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material8.Typography, { color: "error", children: "\u26A0\uFE0F Invalid AI response" }) })
|
|
14381
|
+
variant: "caption",
|
|
14382
|
+
sx: { color: chatResponse.memoryText || "#2e7d32", fontStyle: "italic" },
|
|
14383
|
+
children: "Bandit added to memory"
|
|
14597
14384
|
}
|
|
14598
14385
|
)
|
|
14599
|
-
]
|
|
14600
|
-
|
|
14601
|
-
|
|
14602
|
-
|
|
14386
|
+
]
|
|
14387
|
+
}
|
|
14388
|
+
),
|
|
14389
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material8.Box, { sx: { width: "100%", maxWidth: "100%" }, children: typeof response === "string" ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
14390
|
+
import_react_markdown.default,
|
|
14391
|
+
{
|
|
14392
|
+
remarkPlugins: [import_remark_gfm.default],
|
|
14393
|
+
rehypePlugins: [import_rehype_raw.default, [import_rehype_sanitize2.default, markdownSanitizeSchema]],
|
|
14394
|
+
components,
|
|
14395
|
+
children: enrichedMarkdown ?? sanitizeMarkdown(response)
|
|
14396
|
+
}
|
|
14397
|
+
) : import_react15.default.isValidElement(response) ? response : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material8.Typography, { color: "error", children: "\u26A0\uFE0F Invalid AI response" }) })
|
|
14398
|
+
] }),
|
|
14603
14399
|
!!(responseText || typeof response === "string" && response) && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ai_response_action_bar_default, { text: responseText || response }),
|
|
14604
14400
|
displaySourceFiles && displaySourceFiles.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material8.Box, { sx: { mt: 1.5, display: "flex", gap: 2, flexWrap: "wrap", justifyContent: "flex-start" }, children: displaySourceFiles.map((doc, idx) => {
|
|
14605
14401
|
debugLogger.debug("Rendering DocumentCard in AI response", {
|
|
@@ -24836,7 +24632,7 @@ var init_enhanced_mobile_conversations_modal = __esm({
|
|
|
24836
24632
|
});
|
|
24837
24633
|
|
|
24838
24634
|
// src/chat/chat-app-bar.tsx
|
|
24839
|
-
var import_material22, import_react31, import_material23, import_react_router_dom, import_shallow2, import_jsx_runtime24, CDN_BASE,
|
|
24635
|
+
var import_material22, import_react31, import_material23, import_react_router_dom, import_shallow2, import_jsx_runtime24, CDN_BASE, banditHead2, modelAvatars2, ChatAppBar, chat_app_bar_default;
|
|
24840
24636
|
var init_chat_app_bar = __esm({
|
|
24841
24637
|
"src/chat/chat-app-bar.tsx"() {
|
|
24842
24638
|
"use strict";
|
|
@@ -24860,7 +24656,7 @@ var init_chat_app_bar = __esm({
|
|
|
24860
24656
|
import_shallow2 = require("zustand/shallow");
|
|
24861
24657
|
import_jsx_runtime24 = require("react/jsx-runtime");
|
|
24862
24658
|
CDN_BASE = "https://cdn.burtson.ai/";
|
|
24863
|
-
|
|
24659
|
+
banditHead2 = `${CDN_BASE}/images/bandit-head.png`;
|
|
24864
24660
|
modelAvatars2 = {
|
|
24865
24661
|
"Bandit-Core": `${CDN_BASE}/avatars/core-avatar.png`,
|
|
24866
24662
|
"Bandit-Muse": `${CDN_BASE}/avatars/muse-avatar.png`,
|
|
@@ -25026,7 +24822,7 @@ var init_chat_app_bar = __esm({
|
|
|
25026
24822
|
};
|
|
25027
24823
|
const selectedModel = useModelStore((s) => s.selectedModel);
|
|
25028
24824
|
const currentModel = useModelStore((s) => s.availableModels.find((m) => m.name === selectedModel));
|
|
25029
|
-
const currentAvatar = currentModel?.avatarBase64 || modelAvatars2[selectedModel] ||
|
|
24825
|
+
const currentAvatar = currentModel?.avatarBase64 || modelAvatars2[selectedModel] || banditHead2;
|
|
25030
24826
|
const engines = useEngineStore((s) => s.engines);
|
|
25031
24827
|
const selectedEngine = useEngineStore((s) => s.selectedEngine);
|
|
25032
24828
|
const effectiveEngineId = selectedEngine || usePackageSettingsStore.getState().settings?.defaultModel || "bandit-core";
|
|
@@ -25037,7 +24833,7 @@ var init_chat_app_bar = __esm({
|
|
|
25037
24833
|
(0, import_react31.useEffect)(() => {
|
|
25038
24834
|
useEngineStore.getState().fetchEngines();
|
|
25039
24835
|
}, []);
|
|
25040
|
-
const pendingModelAvatar = useModelStore.getState().availableModels.find((m) => m.name === pendingModel)?.avatarBase64 || modelAvatars2[pendingModel || ""] ||
|
|
24836
|
+
const pendingModelAvatar = useModelStore.getState().availableModels.find((m) => m.name === pendingModel)?.avatarBase64 || modelAvatars2[pendingModel || ""] || banditHead2;
|
|
25041
24837
|
const resolvedHomeUrl = preferences.homeUrl?.trim() || packageSettings?.homeUrl?.trim() || "";
|
|
25042
24838
|
const homeTooltip = (() => {
|
|
25043
24839
|
if (!resolvedHomeUrl) return "Home";
|
|
@@ -25355,7 +25151,7 @@ var init_chat_app_bar = __esm({
|
|
|
25355
25151
|
onClick: (e) => setEngineAnchorEl(e.currentTarget),
|
|
25356
25152
|
sx: pillButtonStyles,
|
|
25357
25153
|
"aria-label": `Change base model (engine). Currently ${engineDisplay}`,
|
|
25358
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
25154
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(AutoAwesomeIcon, { fontSize: "small" })
|
|
25359
25155
|
}
|
|
25360
25156
|
) }),
|
|
25361
25157
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
@@ -25510,7 +25306,7 @@ var init_chat_app_bar = __esm({
|
|
|
25510
25306
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
25511
25307
|
import_material22.Avatar,
|
|
25512
25308
|
{
|
|
25513
|
-
src: model.avatarBase64 || modelAvatars2[model.name] ||
|
|
25309
|
+
src: model.avatarBase64 || modelAvatars2[model.name] || banditHead2,
|
|
25514
25310
|
alt: model.name,
|
|
25515
25311
|
sx: {
|
|
25516
25312
|
width: 28,
|
|
@@ -30873,7 +30669,7 @@ var import_material30 = require("@mui/material");
|
|
|
30873
30669
|
init_lucide_icons();
|
|
30874
30670
|
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
30875
30671
|
var banditaiLogo = "https://cdn.burtson.ai/logos/bandit-ai-logo.png";
|
|
30876
|
-
var
|
|
30672
|
+
var banditHead3 = "https://cdn.burtson.ai/images/bandit-head.png";
|
|
30877
30673
|
var ModalHeader = ({
|
|
30878
30674
|
fullScreen,
|
|
30879
30675
|
setFullScreen,
|
|
@@ -30887,7 +30683,7 @@ var ModalHeader = ({
|
|
|
30887
30683
|
}) => {
|
|
30888
30684
|
const theme = (0, import_material30.useTheme)();
|
|
30889
30685
|
const isMobile = (0, import_material30.useMediaQuery)((theme2) => theme2.breakpoints.down("sm"));
|
|
30890
|
-
const displayLogo = logo && logo !== banditaiLogo ? logo :
|
|
30686
|
+
const displayLogo = logo && logo !== banditaiLogo ? logo : banditHead3;
|
|
30891
30687
|
const [isHovering, setIsHovering] = (0, import_react38.useState)(false);
|
|
30892
30688
|
const buttonStyles = {
|
|
30893
30689
|
transition: "all 0.15s ease-out",
|
|
@@ -32882,7 +32678,7 @@ init_lucide_icons();
|
|
|
32882
32678
|
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
32883
32679
|
var FULL_SCREEN_THRESHOLD = 100;
|
|
32884
32680
|
var CDN_BASE2 = "https://cdn.burtson.ai/";
|
|
32885
|
-
var
|
|
32681
|
+
var banditHead4 = `${CDN_BASE2}/images/bandit-head.png`;
|
|
32886
32682
|
var modelAvatars3 = {
|
|
32887
32683
|
"Bandit-Core": `${CDN_BASE2}/avatars/core-avatar.png`,
|
|
32888
32684
|
"Bandit-Muse": `${CDN_BASE2}/avatars/muse-avatar.png`,
|
|
@@ -32972,7 +32768,7 @@ var ChatModal = ({
|
|
|
32972
32768
|
const provider = useAIProviderStore((state) => state.provider);
|
|
32973
32769
|
const notificationService2 = useNotificationService();
|
|
32974
32770
|
const currentModel = availableModels.find((m) => m.name === selectedModel);
|
|
32975
|
-
const currentAvatar = currentModel?.avatarBase64 || modelAvatars3[selectedModel] ||
|
|
32771
|
+
const currentAvatar = currentModel?.avatarBase64 || modelAvatars3[selectedModel] || banditHead4;
|
|
32976
32772
|
const removeImage = (index) => {
|
|
32977
32773
|
setPastedImages((prev) => prev.filter((_, i) => i !== index));
|
|
32978
32774
|
};
|
|
@@ -33292,7 +33088,7 @@ var ChatModal = ({
|
|
|
33292
33088
|
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
33293
33089
|
import_material35.Avatar,
|
|
33294
33090
|
{
|
|
33295
|
-
src: model.avatarBase64 || modelAvatars3[model.name] ||
|
|
33091
|
+
src: model.avatarBase64 || modelAvatars3[model.name] || banditHead4,
|
|
33296
33092
|
alt: model.name,
|
|
33297
33093
|
sx: {
|
|
33298
33094
|
width: 28,
|
|
@@ -42760,7 +42556,7 @@ var Management = () => {
|
|
|
42760
42556
|
const isMobile = (0, import_useMediaQuery2.default)("(max-width:900px)");
|
|
42761
42557
|
const [sidebarOpen, setSidebarOpen] = (0, import_react58.useState)(false);
|
|
42762
42558
|
const getOptimalFabLogo = async () => {
|
|
42763
|
-
const
|
|
42559
|
+
const banditHead6 = "https://cdn.burtson.ai/images/bandit-head.png";
|
|
42764
42560
|
try {
|
|
42765
42561
|
const subdomain = window.location.hostname.split(".")[0];
|
|
42766
42562
|
const faviconUrl = `https://cdn.burtson.ai/favicons/${subdomain}/favicon.png`;
|
|
@@ -42777,10 +42573,10 @@ var Management = () => {
|
|
|
42777
42573
|
if (branding?.logoBase64) {
|
|
42778
42574
|
return branding.logoBase64;
|
|
42779
42575
|
}
|
|
42780
|
-
return
|
|
42576
|
+
return banditHead6;
|
|
42781
42577
|
} catch (error) {
|
|
42782
42578
|
debugLogger.error("Failed to get optimal FAB logo", { error });
|
|
42783
|
-
return
|
|
42579
|
+
return banditHead6;
|
|
42784
42580
|
}
|
|
42785
42581
|
};
|
|
42786
42582
|
const {
|
|
@@ -42799,8 +42595,8 @@ var Management = () => {
|
|
|
42799
42595
|
setHasTransparentLogo
|
|
42800
42596
|
} = useModelStore();
|
|
42801
42597
|
const [modalOpen, setModalOpen] = (0, import_react58.useState)(false);
|
|
42802
|
-
const
|
|
42803
|
-
const [fabLogo, setFabLogo] = (0, import_react58.useState)(
|
|
42598
|
+
const banditHead5 = "https://cdn.burtson.ai/images/bandit-head.png";
|
|
42599
|
+
const [fabLogo, setFabLogo] = (0, import_react58.useState)(banditHead5);
|
|
42804
42600
|
const [tabIndex, setTabIndex] = (0, import_react58.useState)(4);
|
|
42805
42601
|
const [logoFile, setLogoFile] = (0, import_react58.useState)(null);
|
|
42806
42602
|
const [logoBase64, setLogoBase64] = (0, import_react58.useState)(null);
|