@burtson-labs/bandit-engine 2.0.119 → 2.0.121

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.
@@ -2976,8 +2976,9 @@ import {
2976
2976
  Alert as Alert5,
2977
2977
  Fade,
2978
2978
  Skeleton,
2979
- Stack,
2980
2979
  Snackbar,
2980
+ ToggleButton as ToggleButton2,
2981
+ ToggleButtonGroup as ToggleButtonGroup2,
2981
2982
  useTheme as useTheme3,
2982
2983
  useMediaQuery as useMediaQuery3
2983
2984
  } from "@mui/material";
@@ -3193,37 +3194,50 @@ var LogoCropper = ({
3193
3194
  onClose();
3194
3195
  }, [onClose]);
3195
3196
  const handleCrop = useCallback3(() => {
3196
- const canvas = document.createElement("canvas");
3197
- const ctx = canvas.getContext("2d");
3198
3197
  const image = imageRef.current;
3199
- if (!ctx || !image) return;
3198
+ if (!image) return;
3200
3199
  const cropDims = getCropDimensions();
3200
+ const scene = document.createElement("canvas");
3201
+ scene.width = CANVAS_SIZE;
3202
+ scene.height = CANVAS_SIZE;
3203
+ const sceneCtx = scene.getContext("2d");
3204
+ if (!sceneCtx) return;
3205
+ sceneCtx.clearRect(0, 0, CANVAS_SIZE, CANVAS_SIZE);
3206
+ sceneCtx.save();
3207
+ sceneCtx.translate(CANVAS_SIZE / 2, CANVAS_SIZE / 2);
3208
+ sceneCtx.rotate(cropSettings.rotation * Math.PI / 180);
3209
+ sceneCtx.scale(cropSettings.scale, cropSettings.scale);
3210
+ sceneCtx.translate(-image.naturalWidth / 2 + cropSettings.x, -image.naturalHeight / 2 + cropSettings.y);
3211
+ sceneCtx.drawImage(image, 0, 0, image.naturalWidth, image.naturalHeight);
3212
+ sceneCtx.restore();
3213
+ const cropX = (CANVAS_SIZE - cropDims.width) / 2;
3214
+ const cropY = (CANVAS_SIZE - cropDims.height) / 2;
3201
3215
  const finalSize = LOGO_OUTPUT_SIZES[outputSize];
3202
- const aspectRatioValue = cropDims.width / cropDims.height;
3216
+ const cropAspect = cropDims.width / cropDims.height;
3203
3217
  let outputWidth = finalSize;
3204
3218
  let outputHeight = finalSize;
3205
- if (aspectRatio !== "square") {
3206
- if (aspectRatioValue > 1) {
3207
- outputHeight = finalSize / aspectRatioValue;
3208
- } else {
3209
- outputWidth = finalSize * aspectRatioValue;
3210
- }
3219
+ if (cropAspect > 1) {
3220
+ outputHeight = Math.round(finalSize / cropAspect);
3221
+ } else if (cropAspect < 1) {
3222
+ outputWidth = Math.round(finalSize * cropAspect);
3211
3223
  }
3224
+ const canvas = document.createElement("canvas");
3212
3225
  canvas.width = outputWidth;
3213
3226
  canvas.height = outputHeight;
3214
- ctx.save();
3227
+ const ctx = canvas.getContext("2d");
3228
+ if (!ctx) return;
3215
3229
  ctx.clearRect(0, 0, outputWidth, outputHeight);
3216
- const scaleX = outputWidth / cropDims.width;
3217
- const scaleY = outputHeight / cropDims.height;
3218
- ctx.translate(outputWidth / 2, outputHeight / 2);
3219
- ctx.rotate(cropSettings.rotation * Math.PI / 180);
3220
- ctx.scale(cropSettings.scale * scaleX, cropSettings.scale * scaleY);
3221
- ctx.translate(
3222
- -image.naturalWidth / 2 + cropSettings.x * scaleX,
3223
- -image.naturalHeight / 2 + cropSettings.y * scaleY
3230
+ ctx.drawImage(
3231
+ scene,
3232
+ cropX,
3233
+ cropY,
3234
+ cropDims.width,
3235
+ cropDims.height,
3236
+ 0,
3237
+ 0,
3238
+ outputWidth,
3239
+ outputHeight
3224
3240
  );
3225
- ctx.drawImage(image, 0, 0, image.naturalWidth, image.naturalHeight);
3226
- ctx.restore();
3227
3241
  const croppedDataUrl = canvas.toDataURL("image/png", 1);
3228
3242
  onCrop(croppedDataUrl);
3229
3243
  setImageSrc("");
@@ -3231,7 +3245,7 @@ var LogoCropper = ({
3231
3245
  setCropSettings({ x: 0, y: 0, scale: 1, rotation: 0 });
3232
3246
  setAspectRatio("square");
3233
3247
  onClose();
3234
- }, [cropSettings, onCrop, getCropDimensions, outputSize, aspectRatio, onClose]);
3248
+ }, [cropSettings, onCrop, getCropDimensions, outputSize, onClose]);
3235
3249
  const handleScaleChange = useCallback3((value) => {
3236
3250
  const cropDims = getCropDimensions();
3237
3251
  const minScale2 = Math.max(
@@ -3265,8 +3279,8 @@ var LogoCropper = ({
3265
3279
  },
3266
3280
  children: [
3267
3281
  /* @__PURE__ */ jsxs4(DialogTitle3, { sx: { pb: 1 }, children: [
3268
- /* @__PURE__ */ jsx4(Typography4, { variant: "h6", sx: { fontWeight: 600 }, children: "\u{1F3A8} Crop Your Logo" }),
3269
- /* @__PURE__ */ jsx4(Typography4, { variant: "body2", color: "text.secondary", children: "Position, resize, and format your logo for perfect branding" })
3282
+ /* @__PURE__ */ jsx4(Typography4, { variant: "h6", sx: { fontWeight: 600 }, children: "Crop Logo" }),
3283
+ /* @__PURE__ */ jsx4(Typography4, { variant: "body2", color: "text.secondary", children: "Position and size your logo. The selected region is exported at its true aspect ratio." })
3270
3284
  ] }),
3271
3285
  /* @__PURE__ */ jsx4(DialogContent3, { children: imageSrc && /* @__PURE__ */ jsxs4(Fragment3, { children: [
3272
3286
  /* @__PURE__ */ jsx4(
@@ -3330,7 +3344,7 @@ var LogoCropper = ({
3330
3344
  pointerEvents: "none",
3331
3345
  opacity: 0.9
3332
3346
  },
3333
- children: "Drag to reposition \u2022 Blue area will be exported"
3347
+ children: "Drag to reposition \u2014 the outlined area is exported"
3334
3348
  }
3335
3349
  )
3336
3350
  ]
@@ -3339,7 +3353,7 @@ var LogoCropper = ({
3339
3353
  /* @__PURE__ */ jsxs4(Box4, { sx: { width: 300, display: "flex", flexDirection: "column", gap: 3 }, children: [
3340
3354
  /* @__PURE__ */ jsxs4(Box4, { children: [
3341
3355
  /* @__PURE__ */ jsxs4(Typography4, { variant: "body2", sx: { mb: 1, fontWeight: 600 }, children: [
3342
- "\u{1F4CB} Preview (",
3356
+ "Preview (",
3343
3357
  LOGO_OUTPUT_SIZES[outputSize],
3344
3358
  "px)"
3345
3359
  ] }),
@@ -3359,7 +3373,7 @@ var LogoCropper = ({
3359
3373
  ) })
3360
3374
  ] }),
3361
3375
  /* @__PURE__ */ jsxs4(Box4, { children: [
3362
- /* @__PURE__ */ jsx4(Typography4, { variant: "body2", sx: { mb: 1, fontWeight: 600 }, children: "\u{1F4D0} Aspect Ratio" }),
3376
+ /* @__PURE__ */ jsx4(Typography4, { variant: "body2", sx: { mb: 1, fontWeight: 600 }, children: "Aspect Ratio" }),
3363
3377
  /* @__PURE__ */ jsxs4(
3364
3378
  ToggleButtonGroup,
3365
3379
  {
@@ -3386,7 +3400,7 @@ var LogoCropper = ({
3386
3400
  )
3387
3401
  ] }),
3388
3402
  /* @__PURE__ */ jsxs4(Box4, { children: [
3389
- /* @__PURE__ */ jsx4(Typography4, { variant: "body2", sx: { mb: 1, fontWeight: 600 }, children: "\u{1F4CF} Output Size" }),
3403
+ /* @__PURE__ */ jsx4(Typography4, { variant: "body2", sx: { mb: 1, fontWeight: 600 }, children: "Output Size" }),
3390
3404
  /* @__PURE__ */ jsxs4(
3391
3405
  ToggleButtonGroup,
3392
3406
  {
@@ -3405,7 +3419,7 @@ var LogoCropper = ({
3405
3419
  ] }),
3406
3420
  /* @__PURE__ */ jsxs4(Box4, { children: [
3407
3421
  /* @__PURE__ */ jsxs4(Typography4, { variant: "body2", sx: { mb: 1, fontWeight: 600 }, children: [
3408
- "\u{1F50D} Zoom: ",
3422
+ "Zoom: ",
3409
3423
  Math.round(cropSettings.scale * 100),
3410
3424
  "%"
3411
3425
  ] }),
@@ -3442,7 +3456,7 @@ var LogoCropper = ({
3442
3456
  ] })
3443
3457
  ] }),
3444
3458
  /* @__PURE__ */ jsxs4(Box4, { children: [
3445
- /* @__PURE__ */ jsx4(Typography4, { variant: "body2", sx: { mb: 1, fontWeight: 600 }, children: "\u{1F504} Rotation" }),
3459
+ /* @__PURE__ */ jsx4(Typography4, { variant: "body2", sx: { mb: 1, fontWeight: 600 }, children: "Rotation" }),
3446
3460
  /* @__PURE__ */ jsxs4(Box4, { sx: { display: "flex", gap: 1 }, children: [
3447
3461
  /* @__PURE__ */ jsx4(
3448
3462
  Button4,
@@ -3477,26 +3491,7 @@ var LogoCropper = ({
3477
3491
  }
3478
3492
  )
3479
3493
  ] }),
3480
- /* @__PURE__ */ jsxs4(Alert4, { severity: "success", sx: { borderRadius: 2 }, children: [
3481
- /* @__PURE__ */ jsx4(Typography4, { variant: "body2", children: /* @__PURE__ */ jsx4("strong", { children: "\u2728 Logo Features:" }) }),
3482
- /* @__PURE__ */ jsxs4(Typography4, { variant: "body2", sx: { mt: 0.5, fontSize: "0.8rem" }, children: [
3483
- "\u2022 ",
3484
- /* @__PURE__ */ jsx4("strong", { children: "Transparency preserved" }),
3485
- " for clean logos",
3486
- /* @__PURE__ */ jsx4("br", {}),
3487
- "\u2022 ",
3488
- /* @__PURE__ */ jsx4("strong", { children: "High quality PNG" }),
3489
- " output",
3490
- /* @__PURE__ */ jsx4("br", {}),
3491
- "\u2022 ",
3492
- /* @__PURE__ */ jsx4("strong", { children: "Multiple sizes" }),
3493
- " for different uses",
3494
- /* @__PURE__ */ jsx4("br", {}),
3495
- "\u2022 ",
3496
- /* @__PURE__ */ jsx4("strong", { children: "Perfect for branding" }),
3497
- " across platforms"
3498
- ] })
3499
- ] })
3494
+ /* @__PURE__ */ jsx4(Alert4, { severity: "info", variant: "outlined", sx: { borderRadius: 2, py: 0.5 }, children: /* @__PURE__ */ jsx4(Typography4, { variant: "caption", sx: { fontSize: "0.75rem", lineHeight: 1.5 }, children: "Exported as a transparent PNG at the selected aspect ratio. Wide logos stay wide." }) })
3500
3495
  ] })
3501
3496
  ] }) : /* @__PURE__ */ jsx4(Box4, { sx: { display: "flex", justifyContent: "center", py: 4 }, children: /* @__PURE__ */ jsx4(Typography4, { children: "Loading image..." }) })
3502
3497
  ] }) }),
@@ -3512,7 +3507,7 @@ var LogoCropper = ({
3512
3507
  px: 3,
3513
3508
  fontWeight: 600
3514
3509
  },
3515
- children: "\u2702\uFE0F Crop Logo"
3510
+ children: "Apply Crop"
3516
3511
  }
3517
3512
  )
3518
3513
  ] })
@@ -3531,6 +3526,8 @@ var BrandingTab = ({
3531
3526
  logoBase64,
3532
3527
  brandingText,
3533
3528
  setBrandingText,
3529
+ headerMode,
3530
+ setHeaderMode,
3534
3531
  theme,
3535
3532
  setTheme,
3536
3533
  predefinedThemes: predefinedThemes2,
@@ -3713,10 +3710,9 @@ var BrandingTab = ({
3713
3710
  Box5,
3714
3711
  {
3715
3712
  sx: {
3716
- width: { xs: "100%", md: "26%" },
3713
+ width: { xs: "100%", md: "34%" },
3717
3714
  display: "flex",
3718
3715
  flexDirection: "column",
3719
- height: { xs: "auto", md: 260 },
3720
3716
  gap: { xs: 1.5, md: 0 }
3721
3717
  },
3722
3718
  children: [
@@ -3827,22 +3823,47 @@ var BrandingTab = ({
3827
3823
  )
3828
3824
  ] })
3829
3825
  ] }),
3830
- /* @__PURE__ */ jsx5(Box5, { sx: { mt: 1.5, flex: "0 0 auto" }, children: /* @__PURE__ */ jsx5(
3831
- TextField3,
3832
- {
3833
- label: "Custom Branding Text",
3834
- variant: "outlined",
3835
- value: brandingText,
3836
- onChange: (e) => setBrandingText(e.target.value),
3837
- fullWidth: true,
3838
- placeholder: "e.g., Powered by YourCompany",
3839
- size: "small",
3840
- sx: {
3841
- "& .MuiInputBase-root": { fontSize: "0.85rem" },
3842
- "& .MuiFormHelperText-root": { fontSize: "0.7rem" }
3826
+ /* @__PURE__ */ jsxs5(Box5, { sx: { mt: 1.5, flex: "0 0 auto", display: "flex", flexDirection: "column", gap: 1.25 }, children: [
3827
+ /* @__PURE__ */ jsx5(
3828
+ TextField3,
3829
+ {
3830
+ label: "Custom Branding Text",
3831
+ variant: "outlined",
3832
+ value: brandingText,
3833
+ onChange: (e) => setBrandingText(e.target.value),
3834
+ fullWidth: true,
3835
+ placeholder: "e.g., Powered by YourCompany",
3836
+ size: "small",
3837
+ sx: {
3838
+ "& .MuiInputBase-root": { fontSize: "0.85rem" },
3839
+ "& .MuiFormHelperText-root": { fontSize: "0.7rem" }
3840
+ }
3843
3841
  }
3844
- }
3845
- ) })
3842
+ ),
3843
+ /* @__PURE__ */ jsxs5(Box5, { children: [
3844
+ /* @__PURE__ */ jsx5(Typography5, { variant: "overline", sx: { mb: 0.5, fontWeight: 700, fontSize: "0.7rem", letterSpacing: 0.6, color: "text.secondary", display: "block" }, children: "Welcome Header" }),
3845
+ /* @__PURE__ */ jsxs5(
3846
+ ToggleButtonGroup2,
3847
+ {
3848
+ value: headerMode,
3849
+ exclusive: true,
3850
+ onChange: (_, mode) => mode && setHeaderMode(mode),
3851
+ size: "small",
3852
+ fullWidth: true,
3853
+ children: [
3854
+ /* @__PURE__ */ jsx5(ToggleButton2, { value: "logo", sx: { fontSize: "0.7rem", py: 0.4, textTransform: "none" }, children: "Logo" }),
3855
+ /* @__PURE__ */ jsx5(ToggleButton2, { value: "text", sx: { fontSize: "0.7rem", py: 0.4, textTransform: "none" }, children: "Text" }),
3856
+ /* @__PURE__ */ jsx5(ToggleButton2, { value: "minimal", sx: { fontSize: "0.7rem", py: 0.4, textTransform: "none" }, children: "Minimal" })
3857
+ ]
3858
+ }
3859
+ ),
3860
+ /* @__PURE__ */ jsxs5(Typography5, { variant: "caption", color: "text.secondary", sx: { display: "block", mt: 0.5, fontSize: "0.68rem", lineHeight: 1.4 }, children: [
3861
+ headerMode === "logo" && "Show the brand logo above the chat.",
3862
+ headerMode === "text" && "Show branding text only, no logo.",
3863
+ headerMode === "minimal" && "No logo or text \u2014 clean greeting only."
3864
+ ] })
3865
+ ] })
3866
+ ] })
3846
3867
  ]
3847
3868
  }
3848
3869
  ),
@@ -3852,79 +3873,65 @@ var BrandingTab = ({
3852
3873
  Box5,
3853
3874
  {
3854
3875
  sx: {
3855
- height: { xs: 220, md: 260 },
3876
+ height: { xs: 180, md: 200 },
3856
3877
  display: "flex",
3857
3878
  flexDirection: "column",
3858
3879
  position: "relative",
3859
3880
  bgcolor: "background.default",
3860
3881
  borderRadius: 2,
3861
3882
  overflow: "hidden",
3883
+ border: "1px solid",
3884
+ borderColor: "divider",
3862
3885
  px: 2,
3863
- py: 2
3886
+ py: 1.5
3864
3887
  },
3865
3888
  children: [
3866
- /* @__PURE__ */ jsx5(Box5, { sx: {
3889
+ /* @__PURE__ */ jsxs5(Box5, { sx: {
3867
3890
  display: "flex",
3868
3891
  justifyContent: "center",
3869
3892
  alignItems: "center",
3870
3893
  flex: "1 1 auto",
3871
3894
  minHeight: 0
3872
- }, children: logoBase64 || getDefaultLogo() ? /* @__PURE__ */ jsx5(
3873
- "img",
3874
- {
3875
- src: logoBase64 || getDefaultLogo(),
3876
- alt: "Logo Preview",
3877
- style: {
3878
- maxWidth: "320px",
3879
- height: "auto",
3880
- imageRendering: "auto",
3881
- objectFit: "contain",
3882
- filter: "contrast(1.1) saturate(1.05)"
3883
- }
3884
- }
3885
- ) : /* @__PURE__ */ jsxs5(Box5, { sx: {
3886
- display: "flex",
3887
- flexDirection: "column",
3888
- alignItems: "center",
3889
- gap: 0.5
3890
3895
  }, children: [
3891
- /* @__PURE__ */ jsx5(
3896
+ headerMode === "logo" && (logoBase64 || getDefaultLogo() ? /* @__PURE__ */ jsx5(
3897
+ "img",
3898
+ {
3899
+ src: logoBase64 || getDefaultLogo(),
3900
+ alt: "Logo Preview",
3901
+ style: {
3902
+ maxWidth: "240px",
3903
+ maxHeight: "100%",
3904
+ height: "auto",
3905
+ imageRendering: "auto",
3906
+ objectFit: "contain",
3907
+ filter: "contrast(1.1) saturate(1.05)"
3908
+ }
3909
+ }
3910
+ ) : /* @__PURE__ */ jsx5(
3892
3911
  Skeleton,
3893
3912
  {
3894
3913
  variant: "rectangular",
3895
- width: 160,
3896
- height: 40,
3914
+ width: 140,
3915
+ height: 36,
3897
3916
  sx: {
3898
3917
  borderRadius: 2,
3899
3918
  bgcolor: (theme2) => theme2.palette.mode === "dark" ? "rgba(255,255,255,0.08)" : "rgba(0,0,0,0.08)"
3900
3919
  }
3901
3920
  }
3902
- ),
3903
- /* @__PURE__ */ jsx5(Typography5, { variant: "caption", color: "text.disabled", sx: { fontSize: "0.7rem" }, children: "Logo preview" })
3904
- ] }) }),
3921
+ )),
3922
+ headerMode === "text" && /* @__PURE__ */ jsx5(Typography5, { variant: "h6", sx: { fontWeight: 600, color: "text.primary", textAlign: "center" }, children: brandingText || "Bandit AI" }),
3923
+ headerMode === "minimal" && /* @__PURE__ */ jsx5(Typography5, { variant: "h6", sx: { fontWeight: 500, color: "text.secondary", textAlign: "center" }, children: "What can I help with?" })
3924
+ ] }),
3905
3925
  /* @__PURE__ */ jsxs5(Box5, { sx: {
3906
3926
  display: "flex",
3907
3927
  flexDirection: "column",
3908
3928
  alignItems: "center",
3909
3929
  width: "100%",
3910
3930
  flex: "0 0 auto",
3911
- gap: 1
3931
+ gap: 0.75
3912
3932
  }, children: [
3913
- /* @__PURE__ */ jsx5(Stack, { direction: "row", spacing: 1, justifyContent: "center", sx: { flexWrap: "wrap", gap: 1 }, children: [1, 2, 3].map((i) => /* @__PURE__ */ jsx5(
3914
- Skeleton,
3915
- {
3916
- variant: "rectangular",
3917
- width: 80,
3918
- height: 24,
3919
- sx: {
3920
- borderRadius: 2,
3921
- bgcolor: (theme2) => theme2.palette.mode === "dark" ? "rgba(255,255,255,0.05)" : "rgba(0,0,0,0.05)"
3922
- }
3923
- },
3924
- i
3925
- )) }),
3926
- /* @__PURE__ */ jsx5(Paper4, { elevation: 3, sx: { px: 2, py: 1.5, borderRadius: 2, width: "100%", maxWidth: 500 }, children: /* @__PURE__ */ jsx5(Typography5, { variant: "body1", sx: { color: "text.secondary" }, children: "What's on your mind?" }) }),
3927
- /* @__PURE__ */ jsxs5(Typography5, { variant: "caption", sx: { textAlign: "center", color: "text.secondary", mt: 1 }, children: [
3933
+ /* @__PURE__ */ jsx5(Paper4, { elevation: 2, sx: { px: 2, py: 1, borderRadius: 2, width: "100%", maxWidth: 440 }, children: /* @__PURE__ */ jsx5(Typography5, { variant: "body2", sx: { color: "text.secondary" }, children: "What's on your mind?" }) }),
3934
+ /* @__PURE__ */ jsxs5(Typography5, { variant: "caption", sx: { textAlign: "center", color: "text.secondary", fontSize: "0.68rem" }, children: [
3928
3935
  brandingText ? `${brandingText} \u2022 ` : "Bandit AI \u2022 ",
3929
3936
  "may be wrong \u2014 double-check important info."
3930
3937
  ] })
@@ -4085,7 +4092,7 @@ var BrandingTab = ({
4085
4092
  disabled: saveStatus === "saving",
4086
4093
  color: saveStatus === "saved" ? "success" : saveStatus === "error" ? "error" : "primary",
4087
4094
  sx: { height: 36, fontSize: "0.8rem" },
4088
- children: saveStatus === "saving" ? "Saving..." : saveStatus === "saved" ? "\u2713 Saved" : saveStatus === "error" ? "\u2717 Error" : "Save"
4095
+ children: saveStatus === "saving" ? "Saving..." : saveStatus === "saved" ? "Saved" : saveStatus === "error" ? "Error" : "Save"
4089
4096
  }
4090
4097
  ) }),
4091
4098
  /* @__PURE__ */ jsx5(Box5, { sx: { flexBasis: { xs: "calc(50% - 4px)", sm: "calc(25% - 6px)" } }, children: /* @__PURE__ */ jsx5(
@@ -4192,7 +4199,7 @@ import {
4192
4199
  CardContent as CardContent3,
4193
4200
  IconButton as IconButton4,
4194
4201
  Alert as Alert6,
4195
- Stack as Stack2,
4202
+ Stack,
4196
4203
  MenuItem as MenuItem2,
4197
4204
  Snackbar as Snackbar2,
4198
4205
  Switch as Switch2,
@@ -5543,7 +5550,7 @@ var KnowledgeTab = ({
5543
5550
  }
5544
5551
  ) : (
5545
5552
  /* List View */
5546
- /* @__PURE__ */ jsx7(Stack2, { spacing: 0.75, children: filteredAndSortedDocuments.map((doc) => {
5553
+ /* @__PURE__ */ jsx7(Stack, { spacing: 0.75, children: filteredAndSortedDocuments.map((doc) => {
5547
5554
  const fileInfo = getFileTypeInfo(doc.name);
5548
5555
  const IconComponent = fileInfo.icon;
5549
5556
  const isSelected = selectedDocuments.includes(doc.id);
@@ -5846,7 +5853,7 @@ import {
5846
5853
  List,
5847
5854
  ListItemButton,
5848
5855
  Snackbar as Snackbar3,
5849
- Stack as Stack3,
5856
+ Stack as Stack2,
5850
5857
  TextField as TextField5,
5851
5858
  Tooltip as Tooltip2,
5852
5859
  Typography as Typography8
@@ -6866,7 +6873,7 @@ ${combined}` : combined;
6866
6873
  return /* @__PURE__ */ jsxs8(Box8, { sx: { p: { xs: 1.5, sm: 3, md: 4 } }, children: [
6867
6874
  /* @__PURE__ */ jsxs8(Box8, { sx: { mb: { xs: 2.5, md: 3 } }, children: [
6868
6875
  /* @__PURE__ */ jsxs8(
6869
- Stack3,
6876
+ Stack2,
6870
6877
  {
6871
6878
  direction: { xs: "column", md: "row" },
6872
6879
  spacing: { xs: 1.5, md: 2 },
@@ -6885,7 +6892,7 @@ ${combined}` : combined;
6885
6892
  ),
6886
6893
  /* @__PURE__ */ jsx8(Typography8, { variant: "body1", color: "text.secondary", children: "Curated internal knowledge that is always available to assistants, without showing up as visible sources." })
6887
6894
  ] }),
6888
- /* @__PURE__ */ jsx8(Stack3, { direction: "row", spacing: 1, flexWrap: "wrap", children: /* @__PURE__ */ jsx8(
6895
+ /* @__PURE__ */ jsx8(Stack2, { direction: "row", spacing: 1, flexWrap: "wrap", children: /* @__PURE__ */ jsx8(
6889
6896
  Chip6,
6890
6897
  {
6891
6898
  icon: isTeamScope ? /* @__PURE__ */ jsx8(GroupIcon, {}) : /* @__PURE__ */ jsx8(PersonIcon, {}),
@@ -6911,9 +6918,9 @@ ${combined}` : combined;
6911
6918
  },
6912
6919
  children: [
6913
6920
  /* @__PURE__ */ jsxs8(Card4, { sx: { height: "fit-content" }, children: [
6914
- /* @__PURE__ */ jsx8(CardContent4, { sx: { pb: 1.5 }, children: /* @__PURE__ */ jsxs8(Stack3, { direction: "row", spacing: 1, alignItems: "center", justifyContent: "space-between", children: [
6921
+ /* @__PURE__ */ jsx8(CardContent4, { sx: { pb: 1.5 }, children: /* @__PURE__ */ jsxs8(Stack2, { direction: "row", spacing: 1, alignItems: "center", justifyContent: "space-between", children: [
6915
6922
  /* @__PURE__ */ jsx8(Typography8, { variant: "h6", sx: { fontWeight: 600 }, children: "Packs" }),
6916
- /* @__PURE__ */ jsxs8(Stack3, { direction: "row", spacing: 1, children: [
6923
+ /* @__PURE__ */ jsxs8(Stack2, { direction: "row", spacing: 1, children: [
6917
6924
  /* @__PURE__ */ jsx8(
6918
6925
  Button7,
6919
6926
  {
@@ -6957,7 +6964,7 @@ ${combined}` : combined;
6957
6964
  borderColor: pack.sid === selectedSid ? "primary.main" : "transparent"
6958
6965
  },
6959
6966
  children: /* @__PURE__ */ jsxs8(Box8, { sx: { flex: 1 }, children: [
6960
- /* @__PURE__ */ jsxs8(Stack3, { direction: "row", spacing: 1, alignItems: "center", sx: { mb: 0.5 }, children: [
6967
+ /* @__PURE__ */ jsxs8(Stack2, { direction: "row", spacing: 1, alignItems: "center", sx: { mb: 0.5 }, children: [
6961
6968
  /* @__PURE__ */ jsx8(Typography8, { variant: "subtitle1", sx: { fontWeight: 600 }, children: pack.name }),
6962
6969
  /* @__PURE__ */ jsx8(Chip6, { size: "small", label: status.label, color: status.color })
6963
6970
  ] }),
@@ -6967,7 +6974,7 @@ ${combined}` : combined;
6967
6974
  " ",
6968
6975
  formatTimestamp(pack.publishedAt)
6969
6976
  ] }),
6970
- tags.length > 0 && /* @__PURE__ */ jsx8(Stack3, { direction: "row", spacing: 0.5, flexWrap: "wrap", sx: { mt: 1 }, children: tags.map((tag) => /* @__PURE__ */ jsx8(Chip6, { size: "small", label: tag, variant: "outlined" }, tag)) })
6977
+ tags.length > 0 && /* @__PURE__ */ jsx8(Stack2, { direction: "row", spacing: 0.5, flexWrap: "wrap", sx: { mt: 1 }, children: tags.map((tag) => /* @__PURE__ */ jsx8(Chip6, { size: "small", label: tag, variant: "outlined" }, tag)) })
6971
6978
  ] })
6972
6979
  },
6973
6980
  pack.sid
@@ -6976,12 +6983,12 @@ ${combined}` : combined;
6976
6983
  ] })
6977
6984
  ] }),
6978
6985
  /* @__PURE__ */ jsx8(Card4, { children: /* @__PURE__ */ jsxs8(CardContent4, { children: [
6979
- /* @__PURE__ */ jsxs8(Stack3, { direction: "row", spacing: 1, alignItems: "center", justifyContent: "space-between", children: [
6986
+ /* @__PURE__ */ jsxs8(Stack2, { direction: "row", spacing: 1, alignItems: "center", justifyContent: "space-between", children: [
6980
6987
  /* @__PURE__ */ jsxs8(Box8, { children: [
6981
6988
  /* @__PURE__ */ jsx8(Typography8, { variant: "h6", sx: { fontWeight: 600 }, children: selectedSeedPack ? "Seed Pack Editor" : "Seed Pack Details" }),
6982
6989
  /* @__PURE__ */ jsx8(Typography8, { variant: "body2", color: "text.secondary", children: "Draft content stays internal and is never shown as user-facing sources." })
6983
6990
  ] }),
6984
- selectedSeedPack && /* @__PURE__ */ jsxs8(Stack3, { direction: "row", spacing: 1, flexWrap: "wrap", children: [
6991
+ selectedSeedPack && /* @__PURE__ */ jsxs8(Stack2, { direction: "row", spacing: 1, flexWrap: "wrap", children: [
6985
6992
  isDirty && /* @__PURE__ */ jsx8(Chip6, { size: "small", label: "Unsaved changes", color: "warning" }),
6986
6993
  /* @__PURE__ */ jsx8(Chip6, { size: "small", label: statusChip.label, color: statusChip.color })
6987
6994
  ] })
@@ -7000,7 +7007,7 @@ ${combined}` : combined;
7000
7007
  }
7001
7008
  )
7002
7009
  ] }),
7003
- selectedSeedPack && /* @__PURE__ */ jsxs8(Stack3, { spacing: 2, children: [
7010
+ selectedSeedPack && /* @__PURE__ */ jsxs8(Stack2, { spacing: 2, children: [
7004
7011
  isLoadingDetail && /* @__PURE__ */ jsx8(LinearProgress3, {}),
7005
7012
  /* @__PURE__ */ jsx8(
7006
7013
  TextField5,
@@ -7034,7 +7041,7 @@ ${combined}` : combined;
7034
7041
  disabled: isReadOnly
7035
7042
  }
7036
7043
  ),
7037
- /* @__PURE__ */ jsxs8(Stack3, { direction: "row", spacing: 1, flexWrap: "wrap", children: [
7044
+ /* @__PURE__ */ jsxs8(Stack2, { direction: "row", spacing: 1, flexWrap: "wrap", children: [
7038
7045
  /* @__PURE__ */ jsx8(Chip6, { size: "small", label: scopeLabel, icon: isTeamScope ? /* @__PURE__ */ jsx8(GroupIcon, {}) : /* @__PURE__ */ jsx8(PersonIcon, {}) }),
7039
7046
  selectedSeedPack.version && /* @__PURE__ */ jsx8(Chip6, { size: "small", label: `Version ${selectedSeedPack.version}`, variant: "outlined" }),
7040
7047
  selectedSeedPack.updatedAt && /* @__PURE__ */ jsx8(Chip6, { size: "small", label: `Updated ${formatTimestamp(selectedSeedPack.updatedAt)}`, variant: "outlined" })
@@ -7052,7 +7059,7 @@ ${combined}` : combined;
7052
7059
  children: [
7053
7060
  /* @__PURE__ */ jsxs8(Box8, { children: [
7054
7061
  /* @__PURE__ */ jsxs8(
7055
- Stack3,
7062
+ Stack2,
7056
7063
  {
7057
7064
  direction: { xs: "column", sm: "row" },
7058
7065
  spacing: 1,
@@ -7061,7 +7068,7 @@ ${combined}` : combined;
7061
7068
  sx: { mb: 1 },
7062
7069
  children: [
7063
7070
  /* @__PURE__ */ jsx8(Typography8, { variant: "subtitle2", children: "Markdown content" }),
7064
- /* @__PURE__ */ jsxs8(Stack3, { direction: { xs: "column", sm: "row" }, spacing: 1, children: [
7071
+ /* @__PURE__ */ jsxs8(Stack2, { direction: { xs: "column", sm: "row" }, spacing: 1, children: [
7065
7072
  /* @__PURE__ */ jsx8(
7066
7073
  Button7,
7067
7074
  {
@@ -7169,7 +7176,7 @@ ${combined}` : combined;
7169
7176
  InputProps: { readOnly: true }
7170
7177
  }
7171
7178
  ),
7172
- canManage && /* @__PURE__ */ jsxs8(Stack3, { direction: { xs: "column", sm: "row" }, spacing: 1, flexWrap: "wrap", children: [
7179
+ canManage && /* @__PURE__ */ jsxs8(Stack2, { direction: { xs: "column", sm: "row" }, spacing: 1, flexWrap: "wrap", children: [
7173
7180
  /* @__PURE__ */ jsx8(
7174
7181
  Button7,
7175
7182
  {
@@ -7236,7 +7243,7 @@ ${combined}` : combined;
7236
7243
  " - ",
7237
7244
  scopeDescription
7238
7245
  ] }),
7239
- /* @__PURE__ */ jsxs8(Stack3, { spacing: 2, children: [
7246
+ /* @__PURE__ */ jsxs8(Stack2, { spacing: 2, children: [
7240
7247
  /* @__PURE__ */ jsx8(
7241
7248
  TextField5,
7242
7249
  {
@@ -7268,8 +7275,8 @@ ${combined}` : combined;
7268
7275
  }
7269
7276
  ),
7270
7277
  /* @__PURE__ */ jsx8(Divider, {}),
7271
- /* @__PURE__ */ jsxs8(Stack3, { direction: { xs: "column", sm: "row" }, spacing: 1, alignItems: "center", children: [
7272
- /* @__PURE__ */ jsxs8(Stack3, { direction: { xs: "column", sm: "row" }, spacing: 1, children: [
7278
+ /* @__PURE__ */ jsxs8(Stack2, { direction: { xs: "column", sm: "row" }, spacing: 1, alignItems: "center", children: [
7279
+ /* @__PURE__ */ jsxs8(Stack2, { direction: { xs: "column", sm: "row" }, spacing: 1, children: [
7273
7280
  /* @__PURE__ */ jsx8(
7274
7281
  Button7,
7275
7282
  {
@@ -7490,7 +7497,7 @@ import {
7490
7497
  DialogContentText as DialogContentText4,
7491
7498
  DialogActions as DialogActions6,
7492
7499
  Alert as Alert8,
7493
- Stack as Stack4,
7500
+ Stack as Stack3,
7494
7501
  Chip as Chip7,
7495
7502
  Accordion,
7496
7503
  AccordionSummary,
@@ -8161,7 +8168,7 @@ var StorageTab = ({ currentTheme }) => {
8161
8168
  /* @__PURE__ */ jsx10("li", { children: "There was an error accessing the databases" })
8162
8169
  ] }),
8163
8170
  /* @__PURE__ */ jsx10(Typography9, { variant: "body2", sx: { mt: 1 }, children: 'Try clicking "Refresh" or check the browser console for more details.' })
8164
- ] }) : /* @__PURE__ */ jsx10(Stack4, { spacing: 1, children: storageCategories.map((category) => {
8171
+ ] }) : /* @__PURE__ */ jsx10(Stack3, { spacing: 1, children: storageCategories.map((category) => {
8165
8172
  const IconComponent = category.icon;
8166
8173
  const categoryPercentage = storageQuota.quota > 0 ? category.size / storageQuota.quota * 100 : 0;
8167
8174
  const categoryRelativePercentage = totalUsed > 0 ? category.size / totalUsed * 100 : 0;
@@ -9182,7 +9189,7 @@ import {
9182
9189
  Link,
9183
9190
  MenuItem as MenuItem4,
9184
9191
  Paper as Paper6,
9185
- Stack as Stack5,
9192
+ Stack as Stack4,
9186
9193
  Switch as Switch3,
9187
9194
  TextField as TextField7,
9188
9195
  Tooltip as Tooltip3,
@@ -9441,7 +9448,7 @@ var McpServersSection = () => {
9441
9448
  " ",
9442
9449
  /* @__PURE__ */ jsx12(Link, { href: activeEntry.tokenHelp, target: "_blank", rel: "noopener noreferrer", children: "Get one here \u2192" })
9443
9450
  ] }),
9444
- /* @__PURE__ */ jsxs12(Stack5, { spacing: 1.75, children: [
9451
+ /* @__PURE__ */ jsxs12(Stack4, { spacing: 1.75, children: [
9445
9452
  /* @__PURE__ */ jsx12(
9446
9453
  TextField7,
9447
9454
  {
@@ -9526,7 +9533,7 @@ var McpServersSection = () => {
9526
9533
  /* @__PURE__ */ jsx12(Button10, { size: "small", startIcon: /* @__PURE__ */ jsx12(AddIcon, {}), onClick: openCustom, children: "Custom server" })
9527
9534
  ] }),
9528
9535
  loading && /* @__PURE__ */ jsx12(LinearProgress5, { sx: { mb: 2 } }),
9529
- /* @__PURE__ */ jsxs12(Stack5, { spacing: 1.25, children: [
9536
+ /* @__PURE__ */ jsxs12(Stack4, { spacing: 1.25, children: [
9530
9537
  servers.length === 0 && !loading && /* @__PURE__ */ jsx12(Typography11, { variant: "body2", color: "text.secondary", sx: { py: 1 }, children: "Nothing connected yet \u2014 pick a tool above to get started." }),
9531
9538
  servers.map((server) => {
9532
9539
  const toolState = tools[server.id];
@@ -9747,7 +9754,7 @@ var MCPToolsTabV2_default = MCPToolsTabV2;
9747
9754
 
9748
9755
  // src/management/management.tsx
9749
9756
  import { jsx as jsx14, jsxs as jsxs14 } from "react/jsx-runtime";
9750
- var preloadChatPage = () => import("./chat-4EDI4BLO.mjs");
9757
+ var preloadChatPage = () => import("./chat-NF4FKMA4.mjs");
9751
9758
  var buildCapabilitiesUrl = (gatewayApiUrl) => {
9752
9759
  const trimmed = gatewayApiUrl.replace(/\/$/, "");
9753
9760
  if (trimmed.endsWith("/api")) {
@@ -9806,6 +9813,7 @@ var Management = () => {
9806
9813
  const [logoFile, setLogoFile] = useState15(null);
9807
9814
  const [logoBase64, setLogoBase64] = useState15(null);
9808
9815
  const [brandingText, setBrandingText] = useState15("");
9816
+ const [headerMode, setHeaderMode] = useState15("logo");
9809
9817
  const [theme, setTheme] = useState15("bandit-dark");
9810
9818
  const [customAvatarBase64, setCustomAvatarBase64] = useState15(null);
9811
9819
  const [presetAvatar, setPresetAvatar] = useState15(null);
@@ -9899,6 +9907,7 @@ var Management = () => {
9899
9907
  hasCustomTheme: !!(brandingConfig?.theme && brandingConfig.theme !== "bandit-dark")
9900
9908
  });
9901
9909
  setBrandingText(brandingConfig?.brandingText || "");
9910
+ setHeaderMode(brandingConfig?.headerMode || "logo");
9902
9911
  setTheme(brandingConfig?.theme || "bandit-dark");
9903
9912
  setLogoBase64(brandingConfig?.logoBase64 || null);
9904
9913
  if (brandingConfig?.hasTransparentLogo !== void 0) {
@@ -9924,6 +9933,7 @@ var Management = () => {
9924
9933
  if (cdnBranding) {
9925
9934
  debugLogger.info("Applying CDN branding");
9926
9935
  setBrandingText(cdnBranding.brandingText || "");
9936
+ setHeaderMode(cdnBranding.headerMode || "logo");
9927
9937
  setTheme(cdnBranding.theme || "bandit-dark");
9928
9938
  setLogoBase64(cdnBranding.logoBase64 || null);
9929
9939
  if (cdnBranding.hasTransparentLogo !== void 0) {
@@ -10122,6 +10132,7 @@ var Management = () => {
10122
10132
  branding: {
10123
10133
  logoBase64,
10124
10134
  brandingText,
10135
+ headerMode,
10125
10136
  theme,
10126
10137
  hasTransparentLogo: finalHasTransparentLogo,
10127
10138
  userSaved: true
@@ -10180,6 +10191,7 @@ var Management = () => {
10180
10191
  branding: {
10181
10192
  logoBase64: logoBase64 || "",
10182
10193
  brandingText: brandingText || "",
10194
+ headerMode,
10183
10195
  theme,
10184
10196
  hasTransparentLogo: hasLogo ? await detectTransparency(logoBase64) : false
10185
10197
  },
@@ -10224,6 +10236,7 @@ var Management = () => {
10224
10236
  if (cdnBranding) {
10225
10237
  setLogoBase64(cdnBranding.logoBase64 || null);
10226
10238
  setBrandingText(cdnBranding.brandingText || "");
10239
+ setHeaderMode(cdnBranding.headerMode || "logo");
10227
10240
  setTheme(cdnBranding.theme || "bandit-dark");
10228
10241
  if (cdnBranding.hasTransparentLogo !== void 0) {
10229
10242
  setHasTransparentLogo(cdnBranding.hasTransparentLogo);
@@ -10234,6 +10247,7 @@ var Management = () => {
10234
10247
  } else {
10235
10248
  setLogoBase64(null);
10236
10249
  setBrandingText("");
10250
+ setHeaderMode("logo");
10237
10251
  setTheme("bandit-dark");
10238
10252
  setHasTransparentLogo(true);
10239
10253
  debugLogger.info("Applied Bandit default branding");
@@ -10258,6 +10272,7 @@ var Management = () => {
10258
10272
  } : {
10259
10273
  logoBase64: null,
10260
10274
  brandingText: "",
10275
+ headerMode: "logo",
10261
10276
  theme: "bandit-dark",
10262
10277
  hasTransparentLogo: true,
10263
10278
  userSaved: false
@@ -10357,6 +10372,7 @@ var Management = () => {
10357
10372
  const data = JSON.parse(e.target?.result);
10358
10373
  if (data.branding) {
10359
10374
  setBrandingText(data.branding.brandingText || "");
10375
+ setHeaderMode(data.branding.headerMode || "logo");
10360
10376
  setTheme(data.branding.theme || "Dark");
10361
10377
  setLogoBase64(data.branding.logoBase64 || null);
10362
10378
  setLogoFile(null);
@@ -11001,6 +11017,8 @@ var Management = () => {
11001
11017
  logoBase64,
11002
11018
  brandingText,
11003
11019
  setBrandingText,
11020
+ headerMode,
11021
+ setHeaderMode,
11004
11022
  theme,
11005
11023
  setTheme,
11006
11024
  predefinedThemes,
@@ -11092,4 +11110,4 @@ export {
11092
11110
  useGatewayMemory,
11093
11111
  management_default
11094
11112
  };
11095
- //# sourceMappingURL=chunk-3TXU5SOO.mjs.map
11113
+ //# sourceMappingURL=chunk-HLNEVIFS.mjs.map