@burtson-labs/bandit-engine 2.0.111 → 2.0.112

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,6 +1,6 @@
1
1
  import {
2
2
  StreamingMarkdown_default
3
- } from "./chunk-VR2ZWFTN.mjs";
3
+ } from "./chunk-W2EPDR5G.mjs";
4
4
  import {
5
5
  aiProviderInitService
6
6
  } from "./chunk-HAUDGBUS.mjs";
@@ -14,7 +14,7 @@ import {
14
14
  } from "./chunk-BN3D45E2.mjs";
15
15
  import {
16
16
  chat_modal_default
17
- } from "./chunk-XPNXECXM.mjs";
17
+ } from "./chunk-THDQFHQZ.mjs";
18
18
  import {
19
19
  AddIcon,
20
20
  ArchiveIcon,
@@ -56,7 +56,6 @@ import {
56
56
  PersonIcon,
57
57
  PictureAsPdfIcon,
58
58
  PlayArrowRoundedIcon,
59
- PreviewIcon,
60
59
  PublicIcon,
61
60
  PublishIcon,
62
61
  RefreshIcon,
@@ -84,7 +83,7 @@ import {
84
83
  predefinedThemes,
85
84
  useNotificationService,
86
85
  useVoiceStore
87
- } from "./chunk-3WKPBIRD.mjs";
86
+ } from "./chunk-VCUVOGOO.mjs";
88
87
  import {
89
88
  TOPICS,
90
89
  brandingService_default,
@@ -153,7 +152,6 @@ import {
153
152
  DialogActions as DialogActions2,
154
153
  Tabs,
155
154
  Tab,
156
- Alert as Alert2,
157
155
  Chip,
158
156
  Collapse,
159
157
  GlobalStyles
@@ -545,7 +543,6 @@ var PersonalitiesTab = ({
545
543
  const theme = useTheme();
546
544
  const isMobile = useMediaQuery(theme.breakpoints.down("sm"));
547
545
  const [personalityTabIndex, setPersonalityTabIndex] = useState2(0);
548
- const sectionGap = isMobile ? 2 : 3;
549
546
  const tabWrapperStyles = isMobile ? { flexDirection: "column", gap: 0.35, fontSize: "0.78rem" } : { flexDirection: "row", gap: 0.75, fontSize: "0.95rem" };
550
547
  const [restoreDialogOpen, setRestoreDialogOpen] = useState2(false);
551
548
  const [deleteDialogOpen, setDeleteDialogOpen] = useState2(false);
@@ -1194,49 +1191,19 @@ var PersonalitiesTab = ({
1194
1191
  ] })
1195
1192
  ] });
1196
1193
  const renderCreateEditTab = () => /* @__PURE__ */ jsxs2(Box2, { sx: { p: { xs: 1.5, sm: 2 } }, children: [
1197
- /* @__PURE__ */ jsxs2(Box2, { sx: { mb: { xs: 2.5, md: 4 } }, children: [
1194
+ /* @__PURE__ */ jsxs2(Box2, { sx: { mb: { xs: 1.25, md: 1.5 } }, children: [
1198
1195
  /* @__PURE__ */ jsx2(
1199
1196
  Typography2,
1200
1197
  {
1201
- variant: "h5",
1202
- sx: {
1203
- fontWeight: 600,
1204
- mb: 1,
1205
- color: "primary.main",
1206
- fontSize: { xs: "1.55rem", sm: "1.7rem" }
1207
- },
1198
+ variant: "overline",
1199
+ sx: { fontWeight: 700, color: "primary.main", letterSpacing: 0.5, display: "block" },
1208
1200
  children: localSelectedModel.selectedModel ? "Edit Personality" : "Create New Personality"
1209
1201
  }
1210
1202
  ),
1211
- /* @__PURE__ */ jsx2(
1212
- Typography2,
1213
- {
1214
- variant: "body1",
1215
- sx: { color: "text.secondary", mb: { xs: 2, md: 3 }, fontSize: { xs: "0.95rem", sm: "1rem" }, lineHeight: 1.5 },
1216
- children: localSelectedModel.selectedModel ? `Customize and modify the "${localSelectedModel.selectedModel}" personality to better suit your needs.` : "Design a custom AI personality that matches your brand, use case, and communication style."
1217
- }
1218
- ),
1219
- !localSelectedModel.selectedModel && /* @__PURE__ */ jsxs2(
1220
- Alert2,
1221
- {
1222
- severity: "info",
1223
- sx: {
1224
- mb: { xs: 2.5, md: 3 },
1225
- borderRadius: 2,
1226
- border: "1px solid rgba(25, 118, 210, 0.2)",
1227
- background: "linear-gradient(135deg, rgba(25, 118, 210, 0.05) 0%, rgba(66, 165, 245, 0.05) 100%)",
1228
- px: { xs: 1.5, sm: 2 },
1229
- py: { xs: 1.25, sm: 1.5 }
1230
- },
1231
- children: [
1232
- /* @__PURE__ */ jsx2(Typography2, { variant: "body2", sx: { fontWeight: 600, color: "primary.main", fontSize: { xs: "0.85rem", sm: "0.9rem" } }, children: "Creating a new personality" }),
1233
- /* @__PURE__ */ jsx2(Typography2, { variant: "body2", sx: { color: "text.secondary", fontSize: { xs: "0.85rem", sm: "0.9rem" }, lineHeight: 1.5 }, children: "Fill out the form below to create your custom AI assistant. Start with a template from the Templates tab, or build from scratch!" })
1234
- ]
1235
- }
1236
- )
1203
+ /* @__PURE__ */ jsx2(Typography2, { variant: "body2", color: "text.secondary", children: localSelectedModel.selectedModel ? `Customize the "${localSelectedModel.selectedModel}" personality.` : "Design a custom AI personality matching your brand and use case." })
1237
1204
  ] }),
1238
- /* @__PURE__ */ jsxs2(Box2, { sx: { mb: sectionGap }, children: [
1239
- localSelectedModel.selectedModel && /* @__PURE__ */ jsxs2(Box2, { sx: { display: "flex", alignItems: "center", mt: 2, mb: 3 }, children: [
1205
+ /* @__PURE__ */ jsxs2(Box2, { sx: { mb: 1.5 }, children: [
1206
+ localSelectedModel.selectedModel && /* @__PURE__ */ jsxs2(Box2, { sx: { display: "flex", alignItems: "center", mb: 1.5 }, children: [
1240
1207
  /* @__PURE__ */ jsx2(
1241
1208
  Avatar,
1242
1209
  {
@@ -1247,10 +1214,10 @@ var PersonalitiesTab = ({
1247
1214
  }
1248
1215
  ),
1249
1216
  alt: localSelectedModel.selectedModel,
1250
- sx: { width: 48, height: 48, mr: 2, filter: "brightness(1.5)" }
1217
+ sx: { width: 36, height: 36, mr: 1.5, filter: "brightness(1.5)" }
1251
1218
  }
1252
1219
  ),
1253
- /* @__PURE__ */ jsx2(Typography2, { variant: "body1", sx: { fontWeight: 600, color: "text.primary" }, children: localSelectedModel.selectedModel })
1220
+ /* @__PURE__ */ jsx2(Typography2, { variant: "body2", sx: { fontWeight: 600, color: "text.primary" }, children: localSelectedModel.selectedModel })
1254
1221
  ] }),
1255
1222
  /* @__PURE__ */ jsxs2(
1256
1223
  TextField,
@@ -1286,7 +1253,7 @@ var PersonalitiesTab = ({
1286
1253
  },
1287
1254
  fullWidth: true,
1288
1255
  select: true,
1289
- sx: { mb: sectionGap },
1256
+ sx: { mb: 1.5 },
1290
1257
  children: [
1291
1258
  /* @__PURE__ */ jsx2(MenuItem, { value: "", children: "Create New Personality" }),
1292
1259
  availableModels.map((model, index) => /* @__PURE__ */ jsx2(MenuItem, { value: model.name, children: model.name }, index))
@@ -1294,34 +1261,34 @@ var PersonalitiesTab = ({
1294
1261
  }
1295
1262
  )
1296
1263
  ] }),
1297
- /* @__PURE__ */ jsx2(
1298
- TextField,
1299
- {
1300
- label: "Personality Name",
1301
- variant: "outlined",
1302
- value: localSelectedModel.name,
1303
- onChange: (e) => setLocalSelectedModel({ ...localSelectedModel, name: e.target.value }),
1304
- fullWidth: true,
1305
- placeholder: "e.g., My Custom Assistant",
1306
- sx: { mb: sectionGap }
1307
- }
1308
- ),
1309
- /* @__PURE__ */ jsx2(
1310
- TextField,
1311
- {
1312
- label: "Tagline",
1313
- variant: "outlined",
1314
- value: localSelectedModel.tagline,
1315
- onChange: (e) => setLocalSelectedModel({ ...localSelectedModel, tagline: e.target.value }),
1316
- fullWidth: true,
1317
- placeholder: "e.g., Your helpful companion for daily tasks",
1318
- sx: { mb: sectionGap }
1319
- }
1320
- ),
1321
- /* @__PURE__ */ jsxs2(Box2, { sx: { mb: sectionGap }, children: [
1322
- /* @__PURE__ */ jsx2(Typography2, { variant: "body1", sx: { mb: 2, fontWeight: 600, color: "text.primary" }, children: "Mood & Personality" }),
1323
- /* @__PURE__ */ jsx2(Typography2, { variant: "body2", sx: { mb: 2, color: "text.secondary" }, children: "Click any mood to automatically add personality instructions to your system prompt:" }),
1324
- /* @__PURE__ */ jsx2(Box2, { sx: { display: "flex", flexWrap: "wrap", gap: 1, mb: 2 }, children: moodSuggestions.map((mood) => /* @__PURE__ */ jsx2(
1264
+ /* @__PURE__ */ jsxs2(Box2, { sx: { display: "flex", flexDirection: { xs: "column", sm: "row" }, gap: 1.5, mb: 1.5 }, children: [
1265
+ /* @__PURE__ */ jsx2(
1266
+ TextField,
1267
+ {
1268
+ label: "Personality Name",
1269
+ variant: "outlined",
1270
+ value: localSelectedModel.name,
1271
+ onChange: (e) => setLocalSelectedModel({ ...localSelectedModel, name: e.target.value }),
1272
+ fullWidth: true,
1273
+ placeholder: "e.g., My Custom Assistant"
1274
+ }
1275
+ ),
1276
+ /* @__PURE__ */ jsx2(
1277
+ TextField,
1278
+ {
1279
+ label: "Tagline",
1280
+ variant: "outlined",
1281
+ value: localSelectedModel.tagline,
1282
+ onChange: (e) => setLocalSelectedModel({ ...localSelectedModel, tagline: e.target.value }),
1283
+ fullWidth: true,
1284
+ placeholder: "e.g., Your helpful companion for daily tasks"
1285
+ }
1286
+ )
1287
+ ] }),
1288
+ /* @__PURE__ */ jsxs2(Box2, { sx: { mb: 1.5 }, children: [
1289
+ /* @__PURE__ */ jsx2(Typography2, { variant: "subtitle2", sx: { mb: 0.5, fontWeight: 700, color: "text.primary" }, children: "Mood & Personality" }),
1290
+ /* @__PURE__ */ jsx2(Typography2, { variant: "body2", sx: { mb: 1, color: "text.secondary" }, children: "Click a mood to add personality instructions to your prompt." }),
1291
+ /* @__PURE__ */ jsx2(Box2, { sx: { display: "flex", flexWrap: "wrap", gap: 1 }, children: moodSuggestions.map((mood) => /* @__PURE__ */ jsx2(
1325
1292
  Chip,
1326
1293
  {
1327
1294
  label: mood.label,
@@ -1346,10 +1313,10 @@ var PersonalitiesTab = ({
1346
1313
  mood.label
1347
1314
  )) })
1348
1315
  ] }),
1349
- /* @__PURE__ */ jsxs2(Box2, { sx: { mb: sectionGap }, children: [
1350
- /* @__PURE__ */ jsx2(Typography2, { variant: "body1", sx: { mb: 2, fontWeight: 600, color: "text.primary" }, children: "Formatting Tips" }),
1351
- /* @__PURE__ */ jsx2(Typography2, { variant: "body2", sx: { mb: 2, color: "text.secondary" }, children: "Click any tip to add professional formatting to your system prompt:" }),
1352
- /* @__PURE__ */ jsx2(Box2, { sx: { display: "flex", flexWrap: "wrap", gap: 1, mb: 2 }, children: [
1316
+ /* @__PURE__ */ jsxs2(Box2, { sx: { mb: 1.5 }, children: [
1317
+ /* @__PURE__ */ jsx2(Typography2, { variant: "subtitle2", sx: { mb: 0.5, fontWeight: 700, color: "text.primary" }, children: "Formatting Tips" }),
1318
+ /* @__PURE__ */ jsx2(Typography2, { variant: "body2", sx: { mb: 1, color: "text.secondary" }, children: "Click a tip to add formatting guidance to your prompt." }),
1319
+ /* @__PURE__ */ jsx2(Box2, { sx: { display: "flex", flexWrap: "wrap", gap: 1 }, children: [
1353
1320
  { label: "Be Specific", text: "Always be specific and detailed in your responses.", color: "#2196F3" },
1354
1321
  { label: "Stay In Character", text: "Maintain your personality consistently throughout the conversation.", color: "#4CAF50" },
1355
1322
  { label: "Ask Questions", text: "Ask clarifying questions when you need more information to help effectively.", color: "#FF9800" },
@@ -1400,10 +1367,10 @@ var PersonalitiesTab = ({
1400
1367
  tip.label
1401
1368
  )) })
1402
1369
  ] }),
1403
- /* @__PURE__ */ jsxs2(Box2, { sx: { mb: sectionGap }, children: [
1404
- /* @__PURE__ */ jsx2(Typography2, { variant: "body1", sx: { mb: 2, fontWeight: 600, color: "text.primary" }, children: "Formatting Tools" }),
1405
- /* @__PURE__ */ jsx2(Typography2, { variant: "body2", sx: { mb: 2, color: "text.secondary" }, children: "Add visual formatting to make your AI responses more engaging:" }),
1406
- /* @__PURE__ */ jsx2(Box2, { sx: { display: "flex", flexWrap: "wrap", gap: 1, mb: 2 }, children: [
1370
+ /* @__PURE__ */ jsxs2(Box2, { sx: { mb: 1.5 }, children: [
1371
+ /* @__PURE__ */ jsx2(Typography2, { variant: "subtitle2", sx: { mb: 0.5, fontWeight: 700, color: "text.primary" }, children: "Formatting Tools" }),
1372
+ /* @__PURE__ */ jsx2(Typography2, { variant: "body2", sx: { mb: 1, color: "text.secondary" }, children: "Add visual formatting to make responses more engaging." }),
1373
+ /* @__PURE__ */ jsx2(Box2, { sx: { display: "flex", flexWrap: "wrap", gap: 1 }, children: [
1407
1374
  {
1408
1375
  label: "Highlight Text",
1409
1376
  text: "Use <mark>highlighted text</mark> to emphasize important points.",
@@ -1500,23 +1467,22 @@ var PersonalitiesTab = ({
1500
1467
  onChange: (e) => setLocalSelectedModel({ ...localSelectedModel, systemPrompt: e.target.value }),
1501
1468
  fullWidth: true,
1502
1469
  multiline: true,
1503
- rows: 10,
1470
+ rows: 8,
1504
1471
  placeholder: "Describe how your assistant should behave...",
1505
1472
  InputLabelProps: { shrink: true },
1506
1473
  InputProps: {
1507
1474
  style: {
1508
- minHeight: isMobile ? "auto" : "180px",
1509
- maxHeight: "360px"
1475
+ maxHeight: "320px"
1510
1476
  }
1511
1477
  },
1512
- sx: { mb: 3 }
1478
+ sx: { mb: 1.5 }
1513
1479
  }
1514
1480
  ),
1515
- /* @__PURE__ */ jsxs2(Box2, { sx: { mb: 4 }, children: [
1516
- /* @__PURE__ */ jsx2(Typography2, { variant: "body1", sx: { mb: 2, fontWeight: 600, color: "text.primary" }, children: "Select an Avatar" }),
1517
- /* @__PURE__ */ jsx2(Typography2, { variant: "body2", sx: { mb: 2, color: "text.secondary" }, children: "Choose from our curated collection of avatars to give your AI personality a face:" }),
1518
- /* @__PURE__ */ jsx2(Typography2, { variant: "caption", sx: { mb: 1, color: "primary.main", fontWeight: 600, display: "block" }, children: "Robotic Collection" }),
1519
- /* @__PURE__ */ jsx2(Box2, { sx: { display: "flex", gap: 2, mb: 3, flexWrap: "wrap" }, children: [
1481
+ /* @__PURE__ */ jsxs2(Box2, { sx: { mb: 1.5 }, children: [
1482
+ /* @__PURE__ */ jsx2(Typography2, { variant: "subtitle2", sx: { mb: 0.5, fontWeight: 700, color: "text.primary" }, children: "Select an Avatar" }),
1483
+ /* @__PURE__ */ jsx2(Typography2, { variant: "body2", sx: { mb: 1, color: "text.secondary" }, children: "Choose an avatar to give your personality a face." }),
1484
+ /* @__PURE__ */ jsx2(Typography2, { variant: "caption", sx: { mb: 0.75, color: "primary.main", fontWeight: 600, display: "block" }, children: "Robotic Collection" }),
1485
+ /* @__PURE__ */ jsx2(Box2, { sx: { display: "flex", gap: 1.5, mb: 1.5, flexWrap: "wrap" }, children: [
1520
1486
  { label: "Fembot", src: "https://cdn.burtson.ai/avatars/fembot.png" },
1521
1487
  { label: "Dudebot", src: "https://cdn.burtson.ai/avatars/dudebot.png" },
1522
1488
  { label: "Coolbot", src: "https://cdn.burtson.ai/avatars/coolbot.png" }
@@ -1530,8 +1496,8 @@ var PersonalitiesTab = ({
1530
1496
  setCustomAvatarBase64(null);
1531
1497
  },
1532
1498
  sx: {
1533
- width: 72,
1534
- height: 72,
1499
+ width: 56,
1500
+ height: 56,
1535
1501
  border: presetAvatar === src ? "3px solid #1976d2" : "2px solid transparent",
1536
1502
  cursor: "pointer",
1537
1503
  transition: "all 0.2s",
@@ -1545,8 +1511,8 @@ var PersonalitiesTab = ({
1545
1511
  },
1546
1512
  label
1547
1513
  )) }),
1548
- /* @__PURE__ */ jsx2(Typography2, { variant: "caption", sx: { mb: 1, color: "secondary.main", fontWeight: 600, display: "block" }, children: "\u{1F465} Professional Characters" }),
1549
- /* @__PURE__ */ jsx2(Box2, { sx: { display: "flex", gap: 2, mb: 3, flexWrap: "wrap" }, children: [
1514
+ /* @__PURE__ */ jsx2(Typography2, { variant: "caption", sx: { mb: 0.75, color: "secondary.main", fontWeight: 600, display: "block" }, children: "Professional Characters" }),
1515
+ /* @__PURE__ */ jsx2(Box2, { sx: { display: "flex", gap: 1.5, mb: 1.5, flexWrap: "wrap" }, children: [
1550
1516
  { label: "Business Professional", src: "https://cdn.burtson.ai/avatars/businessman.png", role: "Business & Strategy" },
1551
1517
  { label: "Data Scientist", src: "https://cdn.burtson.ai/avatars/datascience.png", role: "Analytics & Insights" },
1552
1518
  { label: "Support Specialist", src: "https://cdn.burtson.ai/avatars/support.png", role: "Customer Support" },
@@ -1555,7 +1521,7 @@ var PersonalitiesTab = ({
1555
1521
  { label: "Researcher", src: "https://cdn.burtson.ai/avatars/researcher.png", role: "Research & Analysis" },
1556
1522
  { label: "Startup Mentor", src: "https://cdn.burtson.ai/avatars/startupmentor.png", role: "Entrepreneurship" },
1557
1523
  { label: "Travel Expert", src: "https://cdn.burtson.ai/avatars/travel.png", role: "Travel & Adventure" }
1558
- ].map(({ label, src, role }) => /* @__PURE__ */ jsxs2(Box2, { sx: { display: "flex", flexDirection: "column", alignItems: "center", gap: 0.5 }, children: [
1524
+ ].map(({ label, src, role }) => /* @__PURE__ */ jsxs2(Box2, { sx: { display: "flex", flexDirection: "column", alignItems: "center", gap: 0.25 }, children: [
1559
1525
  /* @__PURE__ */ jsx2(
1560
1526
  Avatar,
1561
1527
  {
@@ -1566,8 +1532,8 @@ var PersonalitiesTab = ({
1566
1532
  setCustomAvatarBase64(null);
1567
1533
  },
1568
1534
  sx: {
1569
- width: 72,
1570
- height: 72,
1535
+ width: 56,
1536
+ height: 56,
1571
1537
  border: presetAvatar === src ? "3px solid #1976d2" : "2px solid transparent",
1572
1538
  cursor: "pointer",
1573
1539
  transition: "all 0.2s",
@@ -1592,51 +1558,50 @@ var PersonalitiesTab = ({
1592
1558
  overflow: "hidden"
1593
1559
  }, children: role })
1594
1560
  ] }, label)) }),
1595
- /* @__PURE__ */ jsx2(Typography2, { variant: "caption", sx: { mb: 1, color: "warning.main", fontWeight: 600, display: "block" }, children: "Custom Upload" }),
1596
- /* @__PURE__ */ jsxs2(
1597
- Button2,
1598
- {
1599
- variant: "outlined",
1600
- component: "label",
1601
- sx: {
1602
- mb: 2,
1603
- px: { xs: 2.2, sm: 3 },
1604
- py: { xs: 1.2, sm: 1.5 },
1605
- borderRadius: 2,
1606
- textTransform: "none",
1607
- fontWeight: 600,
1608
- borderStyle: "dashed",
1609
- borderWidth: 2,
1610
- "&:hover": {
1561
+ /* @__PURE__ */ jsx2(Typography2, { variant: "caption", sx: { mb: 0.75, color: "warning.main", fontWeight: 600, display: "block" }, children: "Custom Upload" }),
1562
+ /* @__PURE__ */ jsxs2(Box2, { sx: { display: "flex", flexDirection: { xs: "column", sm: "row" }, alignItems: { sm: "center" }, gap: 1.5 }, children: [
1563
+ /* @__PURE__ */ jsxs2(
1564
+ Button2,
1565
+ {
1566
+ variant: "outlined",
1567
+ component: "label",
1568
+ sx: {
1569
+ borderRadius: 2,
1570
+ textTransform: "none",
1571
+ fontWeight: 600,
1611
1572
  borderStyle: "dashed",
1612
- borderWidth: 2
1573
+ borderWidth: 2,
1574
+ "&:hover": {
1575
+ borderStyle: "dashed",
1576
+ borderWidth: 2
1577
+ },
1578
+ width: { xs: "100%", sm: "auto" }
1613
1579
  },
1614
- width: { xs: "100%", sm: "auto" }
1615
- },
1616
- children: [
1617
- "Upload & Crop Custom Avatar",
1618
- /* @__PURE__ */ jsx2(
1619
- "input",
1620
- {
1621
- type: "file",
1622
- accept: "image/png, image/jpeg, image/jpg",
1623
- hidden: true,
1624
- onChange: handleImageUpload
1625
- }
1626
- )
1627
- ]
1628
- }
1629
- ),
1630
- /* @__PURE__ */ jsx2(Typography2, { variant: "body2", color: "text.secondary", sx: { mb: 2, fontSize: "0.8rem" }, children: "\u2022 Supports JPG/PNG up to 10MB \u2022 Built-in cropper for perfect sizing \u2022 Final output: 512\xD7512px" }),
1631
- (customAvatarBase64 || presetAvatar) && /* @__PURE__ */ jsxs2(Box2, { sx: { mt: 2, display: "flex", alignItems: "center", gap: 2 }, children: [
1580
+ children: [
1581
+ "Upload & Crop Custom Avatar",
1582
+ /* @__PURE__ */ jsx2(
1583
+ "input",
1584
+ {
1585
+ type: "file",
1586
+ accept: "image/png, image/jpeg, image/jpg",
1587
+ hidden: true,
1588
+ onChange: handleImageUpload
1589
+ }
1590
+ )
1591
+ ]
1592
+ }
1593
+ ),
1594
+ /* @__PURE__ */ jsx2(Typography2, { variant: "caption", color: "text.secondary", children: "JPG/PNG up to 10MB \xB7 output 512\xD7512px" })
1595
+ ] }),
1596
+ (customAvatarBase64 || presetAvatar) && /* @__PURE__ */ jsxs2(Box2, { sx: { mt: 1.5, display: "flex", alignItems: "center", gap: 1.5 }, children: [
1632
1597
  /* @__PURE__ */ jsx2(
1633
1598
  Avatar,
1634
1599
  {
1635
1600
  src: customAvatarBase64 || presetAvatar,
1636
1601
  alt: "Avatar Preview",
1637
1602
  sx: {
1638
- width: 96,
1639
- height: 96,
1603
+ width: 56,
1604
+ height: 56,
1640
1605
  border: "3px solid",
1641
1606
  borderColor: "primary.main",
1642
1607
  boxShadow: 3
@@ -1667,14 +1632,14 @@ var PersonalitiesTab = ({
1667
1632
  zIndex: { xs: 5, sm: "auto" },
1668
1633
  display: "flex",
1669
1634
  flexDirection: { xs: "column", sm: "row" },
1670
- gap: { xs: 1.5, sm: 2 },
1635
+ gap: { xs: 1.5, sm: 1.5 },
1671
1636
  justifyContent: "flex-start",
1672
1637
  // Changed from flex-end to flex-start
1673
1638
  mr: { xs: 0, sm: 10 },
1674
1639
  // Add right margin to avoid FAB
1675
- mb: { xs: 8, sm: 2 },
1640
+ mb: { xs: 8, sm: 1.5 },
1676
1641
  // Add bottom margin on mobile for FAB clearance
1677
- mt: { xs: 1.5, sm: 0 },
1642
+ mt: { xs: 1.5, sm: 0.5 },
1678
1643
  p: { xs: 1.1, sm: 0 },
1679
1644
  borderRadius: { xs: 2, sm: 0 },
1680
1645
  border: { xs: "1px solid", sm: "none" },
@@ -1717,16 +1682,16 @@ var PersonalitiesTab = ({
1717
1682
  flexDirection: { xs: "column", md: "row" },
1718
1683
  alignItems: { xs: "flex-start", md: "center" },
1719
1684
  justifyContent: "space-between",
1720
- mb: { xs: 2, md: 3 },
1685
+ mb: { xs: 1.25, md: 1.5 },
1721
1686
  flexWrap: "wrap",
1722
- gap: { xs: 1.5, md: 2 }
1687
+ gap: { xs: 1, md: 1.5 }
1723
1688
  },
1724
1689
  children: [
1725
1690
  /* @__PURE__ */ jsxs2(
1726
1691
  Typography2,
1727
1692
  {
1728
- variant: "h5",
1729
- sx: { fontWeight: 600, color: "primary.main", fontSize: { xs: "1.45rem", md: "1.65rem" } },
1693
+ variant: "subtitle2",
1694
+ sx: { fontWeight: 700, color: "primary.main" },
1730
1695
  children: [
1731
1696
  "Manage Personalities (",
1732
1697
  availableModels.length,
@@ -1734,14 +1699,13 @@ var PersonalitiesTab = ({
1734
1699
  ]
1735
1700
  }
1736
1701
  ),
1737
- /* @__PURE__ */ jsxs2(Box2, { sx: { display: "flex", gap: { xs: 1, md: 2 }, flexWrap: "wrap", width: { xs: "100%", md: "auto" } }, children: [
1702
+ /* @__PURE__ */ jsxs2(Box2, { sx: { display: "flex", gap: 1, flexWrap: "wrap", width: { xs: "100%", md: "auto" } }, children: [
1738
1703
  /* @__PURE__ */ jsx2(
1739
1704
  Button2,
1740
1705
  {
1741
1706
  variant: "contained",
1742
1707
  color: "primary",
1743
- size: isMobile ? "medium" : "large",
1744
- startIcon: /* @__PURE__ */ jsx2(AutoAwesomeIcon, { fontSize: isMobile ? "small" : "medium" }),
1708
+ startIcon: /* @__PURE__ */ jsx2(AutoAwesomeIcon, { fontSize: "small" }),
1745
1709
  onClick: () => {
1746
1710
  setLocalSelectedModel({
1747
1711
  name: "",
@@ -1754,15 +1718,9 @@ var PersonalitiesTab = ({
1754
1718
  setPersonalityTabIndex(1);
1755
1719
  },
1756
1720
  sx: {
1757
- px: { xs: 2.2, md: 3 },
1758
- py: { xs: 0.95, md: 1 },
1759
1721
  fontWeight: 600,
1760
1722
  borderRadius: 2,
1761
1723
  textTransform: "none",
1762
- boxShadow: 3,
1763
- "&:hover": {
1764
- boxShadow: 6
1765
- },
1766
1724
  width: { xs: "100%", sm: "auto" }
1767
1725
  },
1768
1726
  children: "Create Personality"
@@ -1782,10 +1740,10 @@ var PersonalitiesTab = ({
1782
1740
  ]
1783
1741
  }
1784
1742
  ),
1785
- availableModels.length === 0 ? /* @__PURE__ */ jsx2(Card, { sx: { textAlign: "center", py: 8, border: "2px dashed", borderColor: "divider" }, children: /* @__PURE__ */ jsxs2(CardContent, { children: [
1786
- /* @__PURE__ */ jsx2(Typography2, { variant: "body1", sx: { fontWeight: 600, color: "text.primary" }, gutterBottom: true, children: "No Personalities Yet" }),
1787
- /* @__PURE__ */ jsx2(Typography2, { variant: "body2", color: "text.secondary", paragraph: true, children: "Get started by creating your first custom AI personality or choosing from our templates." }),
1788
- /* @__PURE__ */ jsxs2(Box2, { sx: { display: "flex", gap: 2, justifyContent: "center", flexWrap: "wrap", mt: 3 }, children: [
1743
+ availableModels.length === 0 ? /* @__PURE__ */ jsx2(Card, { sx: { textAlign: "center", py: 3, border: "1px dashed", borderColor: "divider", borderRadius: 2, boxShadow: "none" }, children: /* @__PURE__ */ jsxs2(CardContent, { children: [
1744
+ /* @__PURE__ */ jsx2(Typography2, { variant: "subtitle2", sx: { fontWeight: 700, color: "text.primary" }, gutterBottom: true, children: "No Personalities Yet" }),
1745
+ /* @__PURE__ */ jsx2(Typography2, { variant: "body2", color: "text.secondary", children: "Create your first custom AI personality or choose from a template." }),
1746
+ /* @__PURE__ */ jsxs2(Box2, { sx: { display: "flex", gap: 1.5, justifyContent: "center", flexWrap: "wrap", mt: 1.5 }, children: [
1789
1747
  /* @__PURE__ */ jsx2(
1790
1748
  Button2,
1791
1749
  {
@@ -1802,7 +1760,7 @@ var PersonalitiesTab = ({
1802
1760
  setPresetAvatar(null);
1803
1761
  setPersonalityTabIndex(1);
1804
1762
  },
1805
- sx: { px: { xs: 2.4, md: 3 }, py: { xs: 0.95, md: 1 }, width: { xs: "100%", sm: "auto" } },
1763
+ sx: { width: { xs: "100%", sm: "auto" } },
1806
1764
  children: "Create From Scratch"
1807
1765
  }
1808
1766
  ),
@@ -1812,74 +1770,70 @@ var PersonalitiesTab = ({
1812
1770
  variant: "outlined",
1813
1771
  color: "primary",
1814
1772
  onClick: () => setPersonalityTabIndex(0),
1815
- sx: { px: { xs: 2.4, md: 3 }, py: { xs: 0.95, md: 1 }, width: { xs: "100%", sm: "auto" } },
1773
+ sx: { width: { xs: "100%", sm: "auto" } },
1816
1774
  children: "Browse Templates"
1817
1775
  }
1818
1776
  )
1819
1777
  ] })
1820
- ] }) }) : /* @__PURE__ */ jsx2(Box2, { sx: { display: "flex", flexDirection: "column", gap: { xs: 2, md: 3 } }, children: availableModels.map((model) => /* @__PURE__ */ jsx2(Card, { sx: { border: "1px solid", borderColor: "divider" }, children: /* @__PURE__ */ jsxs2(CardContent, { sx: { p: { xs: 2.5, sm: 3 } }, children: [
1821
- /* @__PURE__ */ jsxs2(Box2, { sx: { display: "flex", alignItems: "center", mb: { xs: 1.5, md: 2 } }, children: [
1822
- /* @__PURE__ */ jsx2(
1823
- Avatar,
1824
- {
1825
- src: resolveAvatar(model),
1826
- alt: model.name,
1827
- sx: { width: { xs: 44, sm: 48 }, height: { xs: 44, sm: 48 }, mr: { xs: 1.5, sm: 2 } }
1828
- }
1829
- ),
1830
- /* @__PURE__ */ jsxs2(Box2, { sx: { flex: 1 }, children: [
1831
- /* @__PURE__ */ jsx2(Typography2, { variant: "body1", sx: { fontWeight: 600, color: "text.primary" }, children: model.name }),
1832
- /* @__PURE__ */ jsx2(Typography2, { variant: "body2", sx: { color: "text.secondary", fontStyle: "italic" }, children: model.tagline })
1833
- ] })
1834
- ] }),
1835
- /* @__PURE__ */ jsx2(
1836
- Typography2,
1837
- {
1838
- variant: "body2",
1839
- sx: {
1840
- color: "text.secondary",
1841
- mb: 3,
1842
- display: "-webkit-box",
1843
- WebkitLineClamp: 3,
1844
- WebkitBoxOrient: "vertical",
1845
- overflow: "hidden"
1846
- },
1847
- children: model.systemPrompt
1848
- }
1849
- ),
1850
- /* @__PURE__ */ jsxs2(Box2, { sx: { display: "flex", gap: 2 }, children: [
1851
- /* @__PURE__ */ jsx2(
1852
- Button2,
1853
- {
1854
- variant: "outlined",
1855
- color: "primary",
1856
- onClick: () => {
1857
- setLocalSelectedModel({
1858
- name: model.name,
1859
- tagline: model.tagline,
1860
- systemPrompt: model.systemPrompt,
1861
- selectedModel: model.name
1862
- });
1863
- setCustomAvatarBase64(model.avatarBase64 || null);
1864
- setPresetAvatar(null);
1865
- setPersonalityTabIndex(1);
1866
- },
1867
- sx: { flex: 1 },
1868
- children: "Edit"
1869
- }
1870
- ),
1871
- /* @__PURE__ */ jsx2(
1872
- Button2,
1873
- {
1874
- variant: "outlined",
1875
- color: "error",
1876
- onClick: () => handleDeletePersonality(model.name),
1877
- sx: { flex: 1 },
1878
- children: "Delete"
1879
- }
1880
- )
1881
- ] })
1882
- ] }) }, model.name)) }),
1778
+ ] }) }) : /* @__PURE__ */ jsx2(Box2, { sx: { display: "flex", flexDirection: "column", gap: 1 }, children: availableModels.map((model) => /* @__PURE__ */ jsx2(Card, { sx: { border: "1px solid", borderColor: "divider", borderRadius: 2, boxShadow: "none" }, children: /* @__PURE__ */ jsxs2(
1779
+ CardContent,
1780
+ {
1781
+ sx: {
1782
+ p: 1,
1783
+ "&:last-child": { pb: 1 },
1784
+ display: "flex",
1785
+ alignItems: "center",
1786
+ gap: 1.5,
1787
+ flexWrap: { xs: "wrap", sm: "nowrap" }
1788
+ },
1789
+ children: [
1790
+ /* @__PURE__ */ jsx2(
1791
+ Avatar,
1792
+ {
1793
+ src: resolveAvatar(model),
1794
+ alt: model.name,
1795
+ sx: { width: 40, height: 40, flexShrink: 0 }
1796
+ }
1797
+ ),
1798
+ /* @__PURE__ */ jsxs2(Box2, { sx: { flex: 1, minWidth: 0 }, children: [
1799
+ /* @__PURE__ */ jsx2(Typography2, { variant: "body2", sx: { fontWeight: 600, color: "text.primary", lineHeight: 1.2 }, noWrap: true, children: model.name }),
1800
+ /* @__PURE__ */ jsx2(Typography2, { variant: "caption", sx: { color: "text.secondary", display: "block" }, noWrap: true, children: model.tagline })
1801
+ ] }),
1802
+ /* @__PURE__ */ jsxs2(Box2, { sx: { display: "flex", gap: 1, flexShrink: 0, width: { xs: "100%", sm: "auto" } }, children: [
1803
+ /* @__PURE__ */ jsx2(
1804
+ Button2,
1805
+ {
1806
+ variant: "outlined",
1807
+ color: "primary",
1808
+ onClick: () => {
1809
+ setLocalSelectedModel({
1810
+ name: model.name,
1811
+ tagline: model.tagline,
1812
+ systemPrompt: model.systemPrompt,
1813
+ selectedModel: model.name
1814
+ });
1815
+ setCustomAvatarBase64(model.avatarBase64 || null);
1816
+ setPresetAvatar(null);
1817
+ setPersonalityTabIndex(1);
1818
+ },
1819
+ sx: { flex: { xs: 1, sm: "initial" } },
1820
+ children: "Edit"
1821
+ }
1822
+ ),
1823
+ /* @__PURE__ */ jsx2(
1824
+ Button2,
1825
+ {
1826
+ variant: "outlined",
1827
+ color: "error",
1828
+ onClick: () => handleDeletePersonality(model.name),
1829
+ sx: { flex: { xs: 1, sm: "initial" } },
1830
+ children: "Delete"
1831
+ }
1832
+ )
1833
+ ] })
1834
+ ]
1835
+ }
1836
+ ) }, model.name)) }),
1883
1837
  /* @__PURE__ */ jsxs2(Dialog2, { open: restoreDialogOpen, onClose: () => setRestoreDialogOpen(false), children: [
1884
1838
  /* @__PURE__ */ jsx2(DialogTitle2, { children: "Restore Default Personalities?" }),
1885
1839
  /* @__PURE__ */ jsx2(DialogContent2, { children: /* @__PURE__ */ jsx2(DialogContentText, { children: "This will delete all custom personalities and reset to the original configuration." }) }),
@@ -3728,7 +3682,7 @@ var BrandingTab = ({
3728
3682
  }
3729
3683
  };
3730
3684
  return /* @__PURE__ */ jsxs5(Box5, { sx: { height: "100%", display: "flex", flexDirection: "column", p: { xs: 1.5, sm: 2 } }, children: [
3731
- /* @__PURE__ */ jsxs5(Box5, { sx: { mb: { xs: 2, md: 3 }, flex: "0 0 auto", display: "flex", flexDirection: "column", gap: 1 }, children: [
3685
+ /* @__PURE__ */ jsxs5(Box5, { sx: { mb: { xs: 1.5, md: 2 }, flex: "0 0 auto" }, children: [
3732
3686
  /* @__PURE__ */ jsx5(
3733
3687
  Typography5,
3734
3688
  {
@@ -3737,30 +3691,22 @@ var BrandingTab = ({
3737
3691
  children: "Branding & Themes"
3738
3692
  }
3739
3693
  ),
3740
- /* @__PURE__ */ jsx5(
3741
- Typography5,
3742
- {
3743
- variant: "body1",
3744
- sx: { color: "text.secondary", fontSize: { xs: "0.95rem", sm: "1rem" }, lineHeight: 1.5 },
3745
- children: "Customize your brand identity and visual appearance."
3746
- }
3747
- ),
3748
- /* @__PURE__ */ jsx5(Alert5, { severity: "info", sx: { borderRadius: 2, px: { xs: 1.5, sm: 2 }, py: { xs: 1.25, sm: 1.5 } }, children: /* @__PURE__ */ jsxs5(Typography5, { variant: "body2", sx: { fontSize: { xs: "0.82rem", sm: "0.88rem" }, lineHeight: 1.6 }, children: [
3749
- /* @__PURE__ */ jsx5("strong", { children: "Logo requirements:" }),
3750
- " JPG or PNG up to 10MB. Uploads open a built-in cropper to help you finalize the perfect size. Leave any fields blank to fall back to Bandit defaults."
3751
- ] }) })
3694
+ /* @__PURE__ */ jsx5(Typography5, { variant: "body2", color: "text.secondary", sx: { mb: 1.5 }, children: "Customize your brand identity and visual appearance." }),
3695
+ /* @__PURE__ */ jsx5(Typography5, { variant: "caption", color: "text.secondary", sx: { display: "block", lineHeight: 1.5 }, children: "Logo: JPG or PNG up to 10MB; uploads open a built-in cropper, and blank fields fall back to Bandit defaults." })
3752
3696
  ] }),
3753
3697
  /* @__PURE__ */ jsxs5(
3754
3698
  Paper4,
3755
3699
  {
3756
3700
  sx: {
3757
- p: { xs: 1.5, sm: 2 },
3701
+ p: { xs: 1.5, sm: 1.75 },
3702
+ border: "1px solid",
3703
+ borderColor: "divider",
3758
3704
  borderRadius: 2,
3759
3705
  flex: 1,
3760
3706
  display: "flex",
3761
3707
  flexDirection: { xs: "column", md: "row" },
3762
- gap: { xs: 1.5, md: 2.5 },
3763
- mb: { xs: 2, md: 3 }
3708
+ gap: { xs: 1.5, md: 1.5 },
3709
+ mb: { xs: 1.25, md: 1.5 }
3764
3710
  },
3765
3711
  children: [
3766
3712
  /* @__PURE__ */ jsxs5(
@@ -3770,15 +3716,12 @@ var BrandingTab = ({
3770
3716
  width: { xs: "100%", md: "26%" },
3771
3717
  display: "flex",
3772
3718
  flexDirection: "column",
3773
- height: { xs: "auto", md: 320 },
3774
- gap: { xs: 2, md: 0 }
3719
+ height: { xs: "auto", md: 260 },
3720
+ gap: { xs: 1.5, md: 0 }
3775
3721
  },
3776
3722
  children: [
3777
3723
  /* @__PURE__ */ jsxs5(Box5, { sx: { flex: "1 1 auto", display: "flex", flexDirection: "column" }, children: [
3778
- /* @__PURE__ */ jsxs5(Typography5, { variant: "h6", sx: { mb: 1.5, fontWeight: 600, display: "flex", alignItems: "center", gap: 1, fontSize: "1rem", color: "text.primary" }, children: [
3779
- /* @__PURE__ */ jsx5(UploadIcon, { color: "primary", fontSize: "small" }),
3780
- "Logo Upload"
3781
- ] }),
3724
+ /* @__PURE__ */ jsx5(Typography5, { variant: "overline", sx: { mb: 0.5, fontWeight: 700, fontSize: "0.7rem", letterSpacing: 0.6, color: "text.secondary" }, children: "Logo Upload" }),
3782
3725
  /* @__PURE__ */ jsxs5(
3783
3726
  Box5,
3784
3727
  {
@@ -3797,7 +3740,7 @@ var BrandingTab = ({
3797
3740
  transition: "all 0.3s ease",
3798
3741
  position: "relative",
3799
3742
  flex: "1 1 auto",
3800
- minHeight: 160,
3743
+ minHeight: 120,
3801
3744
  display: "flex",
3802
3745
  flexDirection: "column",
3803
3746
  alignItems: "center",
@@ -3836,7 +3779,7 @@ var BrandingTab = ({
3836
3779
  {
3837
3780
  className: "upload-icon",
3838
3781
  sx: {
3839
- fontSize: 56,
3782
+ fontSize: 32,
3840
3783
  color: "text.secondary",
3841
3784
  transition: "color 0.3s ease"
3842
3785
  }
@@ -3884,7 +3827,7 @@ var BrandingTab = ({
3884
3827
  )
3885
3828
  ] })
3886
3829
  ] }),
3887
- /* @__PURE__ */ jsx5(Box5, { sx: { mt: 2, flex: "0 0 auto" }, children: /* @__PURE__ */ jsx5(
3830
+ /* @__PURE__ */ jsx5(Box5, { sx: { mt: 1.5, flex: "0 0 auto" }, children: /* @__PURE__ */ jsx5(
3888
3831
  TextField3,
3889
3832
  {
3890
3833
  label: "Custom Branding Text",
@@ -3904,15 +3847,12 @@ var BrandingTab = ({
3904
3847
  }
3905
3848
  ),
3906
3849
  /* @__PURE__ */ jsxs5(Box5, { sx: { flex: 1, width: "100%" }, children: [
3907
- /* @__PURE__ */ jsxs5(Typography5, { variant: "h6", sx: { mb: 1.5, fontWeight: 600, display: "flex", alignItems: "center", gap: 1, fontSize: "1rem", color: "text.primary" }, children: [
3908
- /* @__PURE__ */ jsx5(PreviewIcon, { color: "primary", fontSize: "small" }),
3909
- "Live Preview"
3910
- ] }),
3850
+ /* @__PURE__ */ jsx5(Typography5, { variant: "overline", sx: { mb: 0.5, fontWeight: 700, fontSize: "0.7rem", letterSpacing: 0.6, color: "text.secondary", display: "block" }, children: "Live Preview" }),
3911
3851
  /* @__PURE__ */ jsxs5(
3912
3852
  Box5,
3913
3853
  {
3914
3854
  sx: {
3915
- height: { xs: 260, md: 320 },
3855
+ height: { xs: 220, md: 260 },
3916
3856
  display: "flex",
3917
3857
  flexDirection: "column",
3918
3858
  position: "relative",
@@ -3920,7 +3860,7 @@ var BrandingTab = ({
3920
3860
  borderRadius: 2,
3921
3861
  overflow: "hidden",
3922
3862
  px: 2,
3923
- py: 3
3863
+ py: 2
3924
3864
  },
3925
3865
  children: [
3926
3866
  /* @__PURE__ */ jsx5(Box5, { sx: {
@@ -3996,14 +3936,14 @@ var BrandingTab = ({
3996
3936
  ]
3997
3937
  }
3998
3938
  ),
3999
- /* @__PURE__ */ jsxs5(Paper4, { sx: { p: 2, borderRadius: 2, flex: "0 0 auto", mb: 2 }, children: [
4000
- /* @__PURE__ */ jsx5(Typography5, { variant: "h6", sx: { mb: 1.5, fontWeight: 600, fontSize: "1rem", color: "text.primary" }, children: "Theme Selection" }),
3939
+ /* @__PURE__ */ jsxs5(Paper4, { sx: { p: { xs: 1.5, sm: 1.75 }, border: "1px solid", borderColor: "divider", borderRadius: 2, flex: "0 0 auto", mb: { xs: 1.25, md: 1.5 } }, children: [
3940
+ /* @__PURE__ */ jsx5(Typography5, { variant: "overline", sx: { mb: 1, fontWeight: 700, fontSize: "0.7rem", letterSpacing: 0.6, color: "text.secondary", display: "block" }, children: "Theme Selection" }),
4001
3941
  /* @__PURE__ */ jsx5(
4002
3942
  Box5,
4003
3943
  {
4004
3944
  sx: {
4005
3945
  display: "grid",
4006
- gap: 1.5,
3946
+ gap: 1,
4007
3947
  gridTemplateColumns: {
4008
3948
  xs: "repeat(4, 1fr)",
4009
3949
  sm: "repeat(6, 1fr)",
@@ -4027,12 +3967,10 @@ var BrandingTab = ({
4027
3967
  position: "relative",
4028
3968
  overflow: "visible",
4029
3969
  "&:hover": {
4030
- transform: "scale(1.05)",
4031
- boxShadow: 2,
4032
3970
  borderColor: "primary.main"
4033
3971
  }
4034
3972
  },
4035
- elevation: isSelected ? 2 : 0,
3973
+ elevation: 0,
4036
3974
  children: [
4037
3975
  isSelected && /* @__PURE__ */ jsx5(
4038
3976
  Chip4,
@@ -4050,12 +3988,12 @@ var BrandingTab = ({
4050
3988
  }
4051
3989
  }
4052
3990
  ),
4053
- /* @__PURE__ */ jsxs5(CardContent2, { sx: { p: 1 }, children: [
3991
+ /* @__PURE__ */ jsxs5(CardContent2, { sx: { p: 0.75, "&:last-child": { pb: 0.75 } }, children: [
4054
3992
  /* @__PURE__ */ jsxs5(
4055
3993
  Box5,
4056
3994
  {
4057
3995
  sx: {
4058
- height: 40,
3996
+ height: 32,
4059
3997
  backgroundColor: themeOption.palette?.background?.default,
4060
3998
  borderRadius: 1,
4061
3999
  position: "relative",
@@ -4134,10 +4072,10 @@ var BrandingTab = ({
4134
4072
  }
4135
4073
  )
4136
4074
  ] }),
4137
- /* @__PURE__ */ jsxs5(Paper4, { sx: { p: 2, borderRadius: 2, flex: "0 0 auto" }, children: [
4138
- /* @__PURE__ */ jsx5(Typography5, { variant: "h6", sx: { mb: 1.5, fontWeight: 600, fontSize: "1rem", color: "text.primary" }, children: "Actions" }),
4139
- /* @__PURE__ */ jsxs5(Box5, { sx: { display: "flex", flexWrap: "wrap", gap: 1.5 }, children: [
4140
- /* @__PURE__ */ jsx5(Box5, { sx: { flexBasis: { xs: "calc(50% - 6px)", sm: "calc(25% - 9px)" } }, children: /* @__PURE__ */ jsx5(
4075
+ /* @__PURE__ */ jsxs5(Paper4, { sx: { p: { xs: 1.5, sm: 1.75 }, border: "1px solid", borderColor: "divider", borderRadius: 2, flex: "0 0 auto" }, children: [
4076
+ /* @__PURE__ */ jsx5(Typography5, { variant: "overline", sx: { mb: 1, fontWeight: 700, fontSize: "0.7rem", letterSpacing: 0.6, color: "text.secondary", display: "block" }, children: "Actions" }),
4077
+ /* @__PURE__ */ jsxs5(Box5, { sx: { display: "flex", flexWrap: "wrap", gap: 1 }, children: [
4078
+ /* @__PURE__ */ jsx5(Box5, { sx: { flexBasis: { xs: "calc(50% - 4px)", sm: "calc(25% - 6px)" } }, children: /* @__PURE__ */ jsx5(
4141
4079
  Button5,
4142
4080
  {
4143
4081
  variant: "outlined",
@@ -4150,7 +4088,7 @@ var BrandingTab = ({
4150
4088
  children: saveStatus === "saving" ? "Saving..." : saveStatus === "saved" ? "\u2713 Saved" : saveStatus === "error" ? "\u2717 Error" : "Save"
4151
4089
  }
4152
4090
  ) }),
4153
- /* @__PURE__ */ jsx5(Box5, { sx: { flexBasis: { xs: "calc(50% - 6px)", sm: "calc(25% - 9px)" } }, children: /* @__PURE__ */ jsx5(
4091
+ /* @__PURE__ */ jsx5(Box5, { sx: { flexBasis: { xs: "calc(50% - 4px)", sm: "calc(25% - 6px)" } }, children: /* @__PURE__ */ jsx5(
4154
4092
  Button5,
4155
4093
  {
4156
4094
  variant: "outlined",
@@ -4161,7 +4099,7 @@ var BrandingTab = ({
4161
4099
  children: "Export"
4162
4100
  }
4163
4101
  ) }),
4164
- /* @__PURE__ */ jsxs5(Box5, { sx: { flexBasis: { xs: "calc(50% - 6px)", sm: "calc(25% - 9px)" } }, children: [
4102
+ /* @__PURE__ */ jsxs5(Box5, { sx: { flexBasis: { xs: "calc(50% - 4px)", sm: "calc(25% - 6px)" } }, children: [
4165
4103
  /* @__PURE__ */ jsx5(
4166
4104
  Button5,
4167
4105
  {
@@ -4184,7 +4122,7 @@ var BrandingTab = ({
4184
4122
  }
4185
4123
  )
4186
4124
  ] }),
4187
- /* @__PURE__ */ jsx5(Box5, { sx: { flexBasis: { xs: "calc(50% - 6px)", sm: "calc(25% - 9px)" } }, children: /* @__PURE__ */ jsx5(
4125
+ /* @__PURE__ */ jsx5(Box5, { sx: { flexBasis: { xs: "calc(50% - 4px)", sm: "calc(25% - 6px)" } }, children: /* @__PURE__ */ jsx5(
4188
4126
  Button5,
4189
4127
  {
4190
4128
  variant: "outlined",
@@ -5219,18 +5157,18 @@ var KnowledgeTab = ({
5219
5157
  const clearSelection = () => {
5220
5158
  setSelectedDocuments([]);
5221
5159
  };
5222
- return /* @__PURE__ */ jsx7(Box7, { sx: { p: { xs: 1.5, sm: 3, md: 4 } }, children: /* @__PURE__ */ jsxs7(Box7, { sx: { pt: { xs: 1, md: 2 }, pb: { xs: 3, md: 4 } }, children: [
5223
- /* @__PURE__ */ jsxs7(Box7, { sx: { mb: { xs: 2.5, md: 4 } }, children: [
5160
+ return /* @__PURE__ */ jsx7(Box7, { sx: { p: { xs: 1.5, sm: 2, md: 2.5 } }, children: /* @__PURE__ */ jsxs7(Box7, { children: [
5161
+ /* @__PURE__ */ jsxs7(Box7, { sx: { mb: { xs: 1.5, md: 2 } }, children: [
5224
5162
  /* @__PURE__ */ jsxs7(
5225
5163
  Box7,
5226
5164
  {
5227
5165
  sx: {
5228
5166
  display: "flex",
5229
5167
  flexDirection: { xs: "column", md: "row" },
5230
- gap: { xs: 1.5, md: 2 },
5168
+ gap: { xs: 1, md: 1.5 },
5231
5169
  justifyContent: "space-between",
5232
5170
  alignItems: { xs: "flex-start", md: "center" },
5233
- mb: { xs: 1.5, md: 2 }
5171
+ mb: 1.5
5234
5172
  },
5235
5173
  children: [
5236
5174
  /* @__PURE__ */ jsxs7(Box7, { sx: { textAlign: { xs: "left", md: "initial" } }, children: [
@@ -5239,7 +5177,7 @@ var KnowledgeTab = ({
5239
5177
  {
5240
5178
  variant: "h5",
5241
5179
  color: "text.primary",
5242
- sx: { mb: 1, fontWeight: 600, fontSize: { xs: "1.55rem", md: "1.8rem" } },
5180
+ sx: { mb: 0.5, fontWeight: 600, fontSize: "1.3rem" },
5243
5181
  children: [
5244
5182
  "Document Knowledge Base",
5245
5183
  shouldUseVector && /* @__PURE__ */ jsx7(
@@ -5254,29 +5192,20 @@ var KnowledgeTab = ({
5254
5192
  ]
5255
5193
  }
5256
5194
  ),
5257
- /* @__PURE__ */ jsxs7(
5258
- Typography7,
5259
- {
5260
- variant: "body1",
5261
- color: "text.secondary",
5262
- sx: { fontSize: { xs: "0.95rem", sm: "1rem" }, lineHeight: 1.5 },
5263
- children: [
5264
- "Add documents to your private knowledge base. Files are securely stored ",
5265
- shouldUseVector ? "in your private workspace" : "locally in your browser",
5266
- "."
5267
- ]
5268
- }
5269
- )
5195
+ /* @__PURE__ */ jsxs7(Typography7, { variant: "body2", color: "text.secondary", sx: { mb: 0 }, children: [
5196
+ "Add documents to your private knowledge base, stored ",
5197
+ shouldUseVector ? "in your private workspace" : "locally in your browser",
5198
+ "."
5199
+ ] })
5270
5200
  ] }),
5271
- /* @__PURE__ */ jsxs7(Box7, { sx: { display: "flex", gap: { xs: 1, sm: 1.5 }, alignItems: "center", flexWrap: "wrap", width: { xs: "100%", md: "auto" } }, children: [
5201
+ /* @__PURE__ */ jsxs7(Box7, { sx: { display: "flex", gap: 1, alignItems: "center", flexWrap: "wrap", width: { xs: "100%", md: "auto" } }, children: [
5272
5202
  shouldUseVector && /* @__PURE__ */ jsx7(
5273
5203
  Button6,
5274
5204
  {
5275
5205
  variant: "outlined",
5276
- size: isMobile ? "small" : "medium",
5277
5206
  onClick: loadVectorDocuments,
5278
5207
  disabled: loadingVectorDocs,
5279
- sx: { mr: { xs: 0, md: 1 }, width: { xs: "100%", md: "auto" } },
5208
+ sx: { width: { xs: "100%", md: "auto" } },
5280
5209
  children: loadingVectorDocs ? "Loading..." : "Refresh"
5281
5210
  }
5282
5211
  ),
@@ -5285,10 +5214,9 @@ var KnowledgeTab = ({
5285
5214
  {
5286
5215
  variant: "outlined",
5287
5216
  color: "error",
5288
- size: isMobile ? "small" : "medium",
5289
5217
  startIcon: /* @__PURE__ */ jsx7(DeleteIcon, {}),
5290
5218
  onClick: () => setClearDocsDialogOpen(true),
5291
- sx: { ml: { xs: 0, md: 2 }, width: { xs: "100%", md: "auto" } },
5219
+ sx: { width: { xs: "100%", md: "auto" } },
5292
5220
  children: "Clear All"
5293
5221
  }
5294
5222
  )
@@ -5296,17 +5224,17 @@ var KnowledgeTab = ({
5296
5224
  ]
5297
5225
  }
5298
5226
  ),
5299
- documents.length > 0 && /* @__PURE__ */ jsxs7(Box7, { sx: { display: "flex", gap: { xs: 1.5, md: 2 }, flexWrap: "wrap", mb: { xs: 2, md: 3 } }, children: [
5300
- /* @__PURE__ */ jsx7(Card3, { sx: { minWidth: 120 }, children: /* @__PURE__ */ jsxs7(CardContent3, { sx: { py: 1.5, px: 2, "&:last-child": { pb: 1.5 } }, children: [
5301
- /* @__PURE__ */ jsx7(Typography7, { variant: "h6", color: "primary", children: statistics.totalDocuments }),
5227
+ documents.length > 0 && /* @__PURE__ */ jsxs7(Box7, { sx: { display: "flex", gap: 1, flexWrap: "wrap", mb: 0 }, children: [
5228
+ /* @__PURE__ */ jsx7(Card3, { sx: { minWidth: 96, border: "1px solid", borderColor: "divider", borderRadius: 2, boxShadow: "none" }, children: /* @__PURE__ */ jsxs7(CardContent3, { sx: { py: 1, px: 1.5, "&:last-child": { pb: 1 } }, children: [
5229
+ /* @__PURE__ */ jsx7(Typography7, { variant: "subtitle2", color: "primary", sx: { lineHeight: 1.2 }, children: statistics.totalDocuments }),
5302
5230
  /* @__PURE__ */ jsx7(Typography7, { variant: "caption", color: "text.secondary", children: "Documents" })
5303
5231
  ] }) }),
5304
- /* @__PURE__ */ jsx7(Card3, { sx: { minWidth: 120 }, children: /* @__PURE__ */ jsxs7(CardContent3, { sx: { py: 1.5, px: 2, "&:last-child": { pb: 1.5 } }, children: [
5305
- /* @__PURE__ */ jsx7(Typography7, { variant: "h6", color: "primary", children: statistics.totalSize }),
5232
+ /* @__PURE__ */ jsx7(Card3, { sx: { minWidth: 96, border: "1px solid", borderColor: "divider", borderRadius: 2, boxShadow: "none" }, children: /* @__PURE__ */ jsxs7(CardContent3, { sx: { py: 1, px: 1.5, "&:last-child": { pb: 1 } }, children: [
5233
+ /* @__PURE__ */ jsx7(Typography7, { variant: "subtitle2", color: "primary", sx: { lineHeight: 1.2 }, children: statistics.totalSize }),
5306
5234
  /* @__PURE__ */ jsx7(Typography7, { variant: "caption", color: "text.secondary", children: "Total Size" })
5307
5235
  ] }) }),
5308
- Object.entries(statistics.categoryCounts).map(([category, count]) => /* @__PURE__ */ jsx7(Card3, { sx: { minWidth: 100 }, children: /* @__PURE__ */ jsxs7(CardContent3, { sx: { py: 1.5, px: 2, "&:last-child": { pb: 1.5 } }, children: [
5309
- /* @__PURE__ */ jsx7(Typography7, { variant: "h6", color: "primary", children: count }),
5236
+ Object.entries(statistics.categoryCounts).map(([category, count]) => /* @__PURE__ */ jsx7(Card3, { sx: { minWidth: 80, border: "1px solid", borderColor: "divider", borderRadius: 2, boxShadow: "none" }, children: /* @__PURE__ */ jsxs7(CardContent3, { sx: { py: 1, px: 1.5, "&:last-child": { pb: 1 } }, children: [
5237
+ /* @__PURE__ */ jsx7(Typography7, { variant: "subtitle2", color: "primary", sx: { lineHeight: 1.2 }, children: count }),
5310
5238
  /* @__PURE__ */ jsx7(Typography7, { variant: "caption", color: "text.secondary", children: category })
5311
5239
  ] }) }, category))
5312
5240
  ] })
@@ -5315,8 +5243,10 @@ var KnowledgeTab = ({
5315
5243
  Card3,
5316
5244
  {
5317
5245
  sx: {
5318
- mb: 3,
5319
- border: dragActive ? `2px dashed ${currentTheme.palette?.primary?.main}` : `1px dashed ${currentTheme.palette?.divider}`,
5246
+ mb: { xs: 1.25, md: 1.5 },
5247
+ borderRadius: 2,
5248
+ boxShadow: "none",
5249
+ border: dragActive ? `1px dashed ${currentTheme.palette?.primary?.main}` : `1px dashed ${currentTheme.palette?.divider}`,
5320
5250
  bgcolor: dragActive ? `${currentTheme.palette?.primary?.main}08` : "transparent",
5321
5251
  transition: "all 0.2s ease-in-out",
5322
5252
  cursor: "pointer",
@@ -5329,75 +5259,43 @@ var KnowledgeTab = ({
5329
5259
  onDragOver: handleDragOver,
5330
5260
  onDragLeave: handleDragLeave,
5331
5261
  onClick: () => document.getElementById("file-upload")?.click(),
5332
- children: /* @__PURE__ */ jsxs7(CardContent3, { sx: { textAlign: "center", py: { xs: 3, md: 4 }, px: { xs: 2, md: 3 } }, children: [
5333
- /* @__PURE__ */ jsx7(
5334
- UploadFileIcon,
5335
- {
5336
- sx: {
5337
- fontSize: 48,
5338
- color: dragActive ? "primary.main" : "text.secondary",
5339
- mb: 2
5262
+ children: /* @__PURE__ */ jsxs7(CardContent3, { sx: { textAlign: "center", py: 1.75, px: { xs: 1.5, sm: 1.75 }, "&:last-child": { pb: 1.75 } }, children: [
5263
+ /* @__PURE__ */ jsxs7(Box7, { sx: { display: "flex", alignItems: "center", justifyContent: "center", gap: 1 }, children: [
5264
+ /* @__PURE__ */ jsx7(
5265
+ UploadFileIcon,
5266
+ {
5267
+ sx: { fontSize: 18, color: dragActive ? "primary.main" : "text.secondary" }
5340
5268
  }
5341
- }
5342
- ),
5343
- /* @__PURE__ */ jsx7(Typography7, { variant: "h6", color: dragActive ? "primary" : "text.primary", gutterBottom: true, children: dragActive ? "Drop files here" : "Upload Documents" }),
5344
- /* @__PURE__ */ jsx7(Typography7, { variant: "body2", color: "text.secondary", paragraph: true, children: "Drag and drop files here or click to browse" }),
5269
+ ),
5270
+ /* @__PURE__ */ jsx7(Typography7, { variant: "subtitle2", color: dragActive ? "primary" : "text.primary", children: dragActive ? "Drop files here" : "Upload Documents" })
5271
+ ] }),
5272
+ /* @__PURE__ */ jsx7(Typography7, { variant: "caption", color: "text.secondary", sx: { display: "block", mt: 0.25 }, children: "Drag and drop or click to browse \u2014 PDF, DOC, TXT, MD, code files, and more" }),
5345
5273
  shouldUseVector && hasTeam && /* @__PURE__ */ jsxs7(
5346
5274
  Box7,
5347
5275
  {
5348
- sx: {
5349
- mb: 2,
5350
- p: 2,
5351
- bgcolor: "background.paper",
5352
- borderRadius: 1,
5353
- border: "1px solid",
5354
- borderColor: "divider"
5355
- },
5276
+ sx: { display: "inline-flex", alignItems: "center", gap: 0.5, mt: 1 },
5356
5277
  onClick: (e) => e.stopPropagation(),
5357
5278
  children: [
5358
- /* @__PURE__ */ jsxs7(Box7, { sx: { display: "flex", alignItems: "center", justifyContent: "center", gap: 1 }, children: [
5359
- /* @__PURE__ */ jsx7(
5360
- Switch2,
5361
- {
5362
- checked: shareWithTeam,
5363
- onChange: (e) => setShareWithTeam(e.target.checked),
5364
- color: "primary",
5365
- size: "small"
5366
- }
5367
- ),
5368
- /* @__PURE__ */ jsx7(Box7, { sx: { display: "flex", alignItems: "center", gap: 0.5 }, children: shareWithTeam ? /* @__PURE__ */ jsxs7(Fragment4, { children: [
5369
- /* @__PURE__ */ jsx7(GroupIcon, { sx: { fontSize: "1rem", color: "success.main" } }),
5370
- /* @__PURE__ */ jsx7(Typography7, { variant: "body2", color: "success.main", fontWeight: 500, children: "Share with team" })
5371
- ] }) : /* @__PURE__ */ jsxs7(Fragment4, { children: [
5372
- /* @__PURE__ */ jsx7(PersonIcon, { sx: { fontSize: "1rem", color: "text.secondary" } }),
5373
- /* @__PURE__ */ jsx7(Typography7, { variant: "body2", color: "text.secondary", fontWeight: 500, children: "Personal only" })
5374
- ] }) })
5375
- ] }),
5376
- /* @__PURE__ */ jsx7(Typography7, { variant: "caption", color: "text.secondary", sx: { display: "block", textAlign: "center", mt: 0.5 }, children: shareWithTeam ? "Team members can search and access these documents" : "Documents will be private to your account only" })
5377
- ]
5378
- }
5379
- ),
5380
- shouldUseVector && !hasTeam && /* @__PURE__ */ jsxs7(
5381
- Box7,
5382
- {
5383
- sx: {
5384
- mb: 2,
5385
- p: 1.5,
5386
- bgcolor: "info.main10",
5387
- borderRadius: 1,
5388
- border: "1px solid",
5389
- borderColor: "info.main30"
5390
- },
5391
- children: [
5392
- /* @__PURE__ */ jsxs7(Box7, { sx: { display: "flex", alignItems: "center", justifyContent: "center", gap: 1 }, children: [
5393
- /* @__PURE__ */ jsx7(PersonIcon, { sx: { fontSize: "1rem", color: "info.main" } }),
5394
- /* @__PURE__ */ jsx7(Typography7, { variant: "body2", color: "info.main", fontWeight: 500, children: "Personal Documents Only" })
5395
- ] }),
5396
- /* @__PURE__ */ jsx7(Typography7, { variant: "caption", color: "text.secondary", sx: { display: "block", textAlign: "center", mt: 0.5 }, children: "Documents will be stored privately in your personal account" })
5279
+ /* @__PURE__ */ jsx7(
5280
+ Switch2,
5281
+ {
5282
+ checked: shareWithTeam,
5283
+ onChange: (e) => setShareWithTeam(e.target.checked),
5284
+ color: "primary",
5285
+ size: "small"
5286
+ }
5287
+ ),
5288
+ shareWithTeam ? /* @__PURE__ */ jsxs7(Fragment4, { children: [
5289
+ /* @__PURE__ */ jsx7(GroupIcon, { sx: { fontSize: "1rem", color: "success.main" } }),
5290
+ /* @__PURE__ */ jsx7(Typography7, { variant: "caption", color: "text.secondary", children: "Shared with team \u2014 members can search these documents" })
5291
+ ] }) : /* @__PURE__ */ jsxs7(Fragment4, { children: [
5292
+ /* @__PURE__ */ jsx7(PersonIcon, { sx: { fontSize: "1rem", color: "text.secondary" } }),
5293
+ /* @__PURE__ */ jsx7(Typography7, { variant: "caption", color: "text.secondary", children: "Personal only \u2014 private to your account" })
5294
+ ] })
5397
5295
  ]
5398
5296
  }
5399
5297
  ),
5400
- /* @__PURE__ */ jsx7(Typography7, { variant: "caption", color: "text.secondary", children: "Supported: PDF, DOC, TXT, MD, Code files, and more" }),
5298
+ shouldUseVector && !hasTeam && /* @__PURE__ */ jsx7(Typography7, { variant: "caption", color: "text.secondary", sx: { display: "block", mt: 0.5 }, children: "Documents will be stored privately in your personal account" }),
5401
5299
  /* @__PURE__ */ jsx7(
5402
5300
  "input",
5403
5301
  {
@@ -5412,7 +5310,7 @@ var KnowledgeTab = ({
5412
5310
  ] })
5413
5311
  }
5414
5312
  ),
5415
- uploadStatuses.length > 0 && /* @__PURE__ */ jsx7(Box7, { sx: { mb: 3 }, children: uploadStatuses.map((status, index) => /* @__PURE__ */ jsx7(Card3, { sx: { mb: 1 }, children: /* @__PURE__ */ jsx7(CardContent3, { sx: { py: 1.5, px: 2, "&:last-child": { pb: 1.5 } }, children: /* @__PURE__ */ jsxs7(Box7, { sx: { display: "flex", alignItems: "center", gap: 2 }, children: [
5313
+ uploadStatuses.length > 0 && /* @__PURE__ */ jsx7(Box7, { sx: { mb: { xs: 1.25, md: 1.5 } }, children: uploadStatuses.map((status, index) => /* @__PURE__ */ jsx7(Card3, { sx: { mb: 1, borderRadius: 2, boxShadow: "none", border: "1px solid", borderColor: "divider" }, children: /* @__PURE__ */ jsx7(CardContent3, { sx: { py: 1, px: 1.5, "&:last-child": { pb: 1 } }, children: /* @__PURE__ */ jsxs7(Box7, { sx: { display: "flex", alignItems: "center", gap: 2 }, children: [
5416
5314
  status.status === "success" ? /* @__PURE__ */ jsx7(CheckCircleIcon, { color: "success" }) : status.status === "error" ? /* @__PURE__ */ jsx7(ErrorIcon, { color: "error" }) : /* @__PURE__ */ jsx7(Box7, { sx: { width: 20, height: 20 }, children: /* @__PURE__ */ jsx7(
5417
5315
  LinearProgress2,
5418
5316
  {
@@ -5430,8 +5328,8 @@ var KnowledgeTab = ({
5430
5328
  "%"
5431
5329
  ] })
5432
5330
  ] }) }) }, index)) }),
5433
- documents.length > 0 && /* @__PURE__ */ jsx7(Card3, { sx: { mb: 3 }, children: /* @__PURE__ */ jsxs7(CardContent3, { sx: { py: 2 }, children: [
5434
- /* @__PURE__ */ jsxs7(Box7, { sx: { display: "flex", gap: 2, alignItems: "center", flexWrap: "wrap" }, children: [
5331
+ documents.length > 0 && /* @__PURE__ */ jsx7(Card3, { sx: { mb: { xs: 1.25, md: 1.5 }, borderRadius: 2, boxShadow: "none", border: "1px solid", borderColor: "divider" }, children: /* @__PURE__ */ jsxs7(CardContent3, { sx: { py: 1.5, px: { xs: 1.5, sm: 1.75 }, "&:last-child": { pb: 1.5 } }, children: [
5332
+ /* @__PURE__ */ jsxs7(Box7, { sx: { display: "flex", gap: 1.5, alignItems: "center", flexWrap: "wrap" }, children: [
5435
5333
  /* @__PURE__ */ jsx7(
5436
5334
  TextField4,
5437
5335
  {
@@ -5559,7 +5457,7 @@ var KnowledgeTab = ({
5559
5457
  )
5560
5458
  ] })
5561
5459
  ] }),
5562
- selectedDocuments.length > 0 && /* @__PURE__ */ jsx7(Box7, { sx: { mt: 2, pt: 2, borderTop: 1, borderColor: "divider" }, children: /* @__PURE__ */ jsxs7(Box7, { sx: { display: "flex", alignItems: "center", gap: 2 }, children: [
5460
+ selectedDocuments.length > 0 && /* @__PURE__ */ jsx7(Box7, { sx: { mt: 1.5, pt: 1.5, borderTop: 1, borderColor: "divider" }, children: /* @__PURE__ */ jsxs7(Box7, { sx: { display: "flex", alignItems: "center", gap: 1.5, flexWrap: "wrap" }, children: [
5563
5461
  /* @__PURE__ */ jsxs7(Typography7, { variant: "body2", color: "text.secondary", children: [
5564
5462
  selectedDocuments.length,
5565
5463
  " selected"
@@ -5595,12 +5493,12 @@ var KnowledgeTab = ({
5595
5493
  )
5596
5494
  ] }) })
5597
5495
  ] }) }),
5598
- filteredAndSortedDocuments.length === 0 ? /* @__PURE__ */ jsx7(Card3, { sx: { textAlign: "center", py: 8 }, children: /* @__PURE__ */ jsxs7(CardContent3, { children: [
5599
- /* @__PURE__ */ jsx7(FolderIcon, { sx: { fontSize: 64, color: "text.secondary", mb: 2 } }),
5600
- /* @__PURE__ */ jsx7(Typography7, { variant: "h6", color: "text.secondary", gutterBottom: true, children: "No Documents Yet" }),
5601
- /* @__PURE__ */ jsx7(Typography7, { variant: "body2", color: "text.secondary", children: shouldUseVector ? "Upload and embed your first document to get started with advanced search" : "Upload your first document to get started" })
5496
+ filteredAndSortedDocuments.length === 0 ? /* @__PURE__ */ jsx7(Card3, { sx: { textAlign: "center", py: 4, borderRadius: 2, boxShadow: "none", border: "1px solid", borderColor: "divider" }, children: /* @__PURE__ */ jsxs7(CardContent3, { children: [
5497
+ /* @__PURE__ */ jsx7(FolderIcon, { sx: { fontSize: 20, color: "text.secondary", mb: 1 } }),
5498
+ /* @__PURE__ */ jsx7(Typography7, { variant: "subtitle2", color: "text.secondary", gutterBottom: true, children: "No Documents Yet" }),
5499
+ /* @__PURE__ */ jsx7(Typography7, { variant: "caption", color: "text.secondary", children: shouldUseVector ? "Upload and embed your first document to get started with advanced search" : "Upload your first document to get started" })
5602
5500
  ] }) }) : /* @__PURE__ */ jsxs7(Box7, { children: [
5603
- /* @__PURE__ */ jsxs7(Typography7, { variant: "body2", color: "text.secondary", sx: { mb: 2 }, children: [
5501
+ /* @__PURE__ */ jsxs7(Typography7, { variant: "caption", color: "text.secondary", sx: { display: "block", mb: 1 }, children: [
5604
5502
  "Showing ",
5605
5503
  filteredAndSortedDocuments.length,
5606
5504
  " of ",
@@ -5620,7 +5518,7 @@ var KnowledgeTab = ({
5620
5518
  md: "repeat(4, 1fr)",
5621
5519
  lg: "repeat(6, 1fr)"
5622
5520
  },
5623
- gap: 2
5521
+ gap: 1.5
5624
5522
  },
5625
5523
  children: filteredAndSortedDocuments.map((doc) => {
5626
5524
  const isSelected = selectedDocuments.includes(doc.id);
@@ -5645,7 +5543,7 @@ var KnowledgeTab = ({
5645
5543
  }
5646
5544
  ) : (
5647
5545
  /* List View */
5648
- /* @__PURE__ */ jsx7(Stack2, { spacing: 1, children: filteredAndSortedDocuments.map((doc) => {
5546
+ /* @__PURE__ */ jsx7(Stack2, { spacing: 0.75, children: filteredAndSortedDocuments.map((doc) => {
5649
5547
  const fileInfo = getFileTypeInfo(doc.name);
5650
5548
  const IconComponent = fileInfo.icon;
5651
5549
  const isSelected = selectedDocuments.includes(doc.id);
@@ -5655,14 +5553,16 @@ var KnowledgeTab = ({
5655
5553
  {
5656
5554
  sx: {
5657
5555
  cursor: "pointer",
5658
- transition: "all 0.3s ease-in-out",
5659
- border: isSelected ? `2px solid ${currentTheme.palette?.primary?.main}` : `1px solid ${currentTheme.palette?.divider}`,
5556
+ boxShadow: "none",
5557
+ borderRadius: 2,
5558
+ transition: "all 0.2s ease-in-out",
5559
+ border: isSelected ? `1px solid ${currentTheme.palette?.primary?.main}` : `1px solid ${currentTheme.palette?.divider}`,
5660
5560
  "&:hover": {
5661
- boxShadow: 4
5561
+ borderColor: currentTheme.palette?.primary?.main
5662
5562
  },
5663
5563
  bgcolor: isSelected ? `${currentTheme.palette?.primary?.main}08` : "background.paper",
5664
5564
  opacity: isDeleting ? 0.3 : 1,
5665
- transform: isDeleting ? "scale(0.95)" : "scale(1)"
5565
+ transform: isDeleting ? "scale(0.98)" : "scale(1)"
5666
5566
  },
5667
5567
  onClick: (e) => {
5668
5568
  if (e.ctrlKey || e.metaKey) {
@@ -5671,153 +5571,114 @@ var KnowledgeTab = ({
5671
5571
  handleDocumentClick(doc);
5672
5572
  }
5673
5573
  },
5674
- children: /* @__PURE__ */ jsx7(CardContent3, { sx: { py: 2 }, children: /* @__PURE__ */ jsxs7(Box7, { sx: { display: "flex", alignItems: "center", gap: 2 }, children: [
5675
- /* @__PURE__ */ jsx7(IconComponent, { sx: { fontSize: 32, color: fileInfo.color } }),
5676
- /* @__PURE__ */ jsxs7(Box7, { sx: { flex: 1, minWidth: 0 }, children: [
5574
+ children: /* @__PURE__ */ jsx7(CardContent3, { sx: { p: 1, "&:last-child": { pb: 1 } }, children: /* @__PURE__ */ jsxs7(Box7, { sx: { display: "flex", alignItems: "center", gap: 1.5 }, children: [
5575
+ /* @__PURE__ */ jsx7(IconComponent, { sx: { fontSize: 20, color: fileInfo.color, flexShrink: 0 } }),
5576
+ /* @__PURE__ */ jsx7(Box7, { sx: { flex: 1, minWidth: 0 }, children: /* @__PURE__ */ jsx7(
5577
+ Typography7,
5578
+ {
5579
+ variant: "body2",
5580
+ sx: {
5581
+ fontWeight: 600,
5582
+ whiteSpace: "nowrap",
5583
+ overflow: "hidden",
5584
+ textOverflow: "ellipsis",
5585
+ color: "text.primary"
5586
+ },
5587
+ children: doc.name
5588
+ }
5589
+ ) }),
5590
+ /* @__PURE__ */ jsxs7(Box7, { sx: { display: "flex", gap: 0.5, alignItems: "center", flexShrink: 0 }, children: [
5677
5591
  /* @__PURE__ */ jsx7(
5678
- Typography7,
5592
+ Chip5,
5679
5593
  {
5680
- variant: "subtitle1",
5681
- sx: {
5682
- fontWeight: 600,
5683
- whiteSpace: "nowrap",
5684
- overflow: "hidden",
5685
- textOverflow: "ellipsis",
5686
- color: "text.primary"
5687
- },
5688
- children: doc.name
5689
- }
5690
- ),
5691
- /* @__PURE__ */ jsxs7(
5692
- Typography7,
5693
- {
5694
- variant: "body2",
5695
- color: "text.secondary",
5594
+ label: fileInfo.category,
5595
+ size: "small",
5696
5596
  sx: {
5697
- display: "-webkit-box",
5698
- WebkitLineClamp: 2,
5699
- WebkitBoxOrient: "vertical",
5700
- overflow: "hidden",
5701
- textOverflow: "ellipsis",
5702
- mt: 0.5
5703
- },
5704
- children: [
5705
- doc.content.substring(0, 200),
5706
- "..."
5707
- ]
5597
+ bgcolor: fileInfo.color + "20",
5598
+ color: fileInfo.color,
5599
+ fontWeight: 600
5600
+ }
5708
5601
  }
5709
5602
  ),
5710
- /* @__PURE__ */ jsxs7(Box7, { sx: { display: "flex", gap: 1, mt: 1 }, children: [
5711
- /* @__PURE__ */ jsx7(
5603
+ (() => {
5604
+ const sourceInfo = getContentSourceInfo(doc, shouldUseVector);
5605
+ return /* @__PURE__ */ jsx7(
5712
5606
  Chip5,
5713
5607
  {
5714
- label: fileInfo.category,
5608
+ icon: /* @__PURE__ */ jsx7(sourceInfo.icon, { sx: { fontSize: "0.8rem" } }),
5609
+ label: sourceInfo.label,
5715
5610
  size: "small",
5716
5611
  sx: {
5717
- bgcolor: fileInfo.color + "20",
5718
- color: fileInfo.color,
5719
- fontWeight: 600
5720
- }
5721
- }
5722
- ),
5723
- (() => {
5724
- const sourceInfo = getContentSourceInfo(doc, shouldUseVector);
5725
- return /* @__PURE__ */ jsx7(
5726
- Chip5,
5727
- {
5728
- icon: /* @__PURE__ */ jsx7(sourceInfo.icon, { sx: { fontSize: "0.8rem" } }),
5729
- label: sourceInfo.label,
5730
- size: "small",
5731
- sx: {
5732
- bgcolor: sourceInfo.bgColor,
5733
- color: sourceInfo.color,
5734
- fontWeight: 500,
5735
- fontSize: "0.75rem",
5736
- "& .MuiChip-icon": {
5737
- color: sourceInfo.color
5738
- }
5612
+ bgcolor: sourceInfo.bgColor,
5613
+ color: sourceInfo.color,
5614
+ fontWeight: 500,
5615
+ fontSize: "0.75rem",
5616
+ "& .MuiChip-icon": {
5617
+ color: sourceInfo.color
5739
5618
  }
5740
5619
  }
5741
- );
5742
- })(),
5743
- /* @__PURE__ */ jsx7(
5744
- Chip5,
5745
- {
5746
- label: formatFileSize(doc.content.length * 2),
5747
- size: "small",
5748
- variant: "outlined"
5749
5620
  }
5750
- )
5751
- ] })
5621
+ );
5622
+ })(),
5623
+ /* @__PURE__ */ jsx7(
5624
+ Chip5,
5625
+ {
5626
+ label: formatFileSize(doc.content.length * 2),
5627
+ size: "small",
5628
+ variant: "outlined",
5629
+ sx: { display: { xs: "none", sm: "flex" } }
5630
+ }
5631
+ )
5752
5632
  ] }),
5753
- /* @__PURE__ */ jsxs7(Box7, { sx: { display: "flex", gap: 1, alignItems: "center" }, children: [
5633
+ /* @__PURE__ */ jsxs7(Box7, { sx: { display: "flex", gap: 0.5, alignItems: "center", flexShrink: 0 }, children: [
5754
5634
  /* @__PURE__ */ jsx7(
5755
5635
  IconButton4,
5756
5636
  {
5637
+ size: "small",
5757
5638
  onClick: (e) => {
5758
5639
  e.stopPropagation();
5759
5640
  toggleDocumentSelection(doc.id);
5760
5641
  },
5761
5642
  sx: {
5762
- width: 32,
5763
- height: 32,
5643
+ width: 28,
5644
+ height: 28,
5764
5645
  bgcolor: isSelected ? "primary.main" : "transparent",
5765
5646
  color: isSelected ? "primary.contrastText" : "text.secondary",
5766
- border: isSelected ? "none" : "2px solid",
5767
- borderColor: "text.secondary",
5647
+ border: isSelected ? "none" : "1px solid",
5648
+ borderColor: "divider",
5768
5649
  borderRadius: "50%",
5769
5650
  "&:hover": {
5770
5651
  bgcolor: isSelected ? "primary.dark" : "action.hover",
5771
5652
  borderColor: isSelected ? "primary.dark" : "primary.main"
5772
5653
  }
5773
5654
  },
5774
- children: isSelected ? /* @__PURE__ */ jsx7(CheckIcon, { sx: { fontSize: 16 } }) : /* @__PURE__ */ jsx7(Box7, { sx: {
5775
- width: 12,
5776
- height: 12,
5655
+ children: isSelected ? /* @__PURE__ */ jsx7(CheckIcon, { sx: { fontSize: 14 } }) : /* @__PURE__ */ jsx7(Box7, { sx: {
5656
+ width: 10,
5657
+ height: 10,
5777
5658
  borderRadius: "50%",
5778
5659
  bgcolor: "transparent"
5779
5660
  } })
5780
5661
  }
5781
5662
  ),
5782
5663
  /* @__PURE__ */ jsx7(
5783
- Button6,
5664
+ IconButton4,
5784
5665
  {
5785
- variant: "outlined",
5786
5666
  size: "small",
5787
5667
  onClick: (e) => {
5788
5668
  e.stopPropagation();
5789
5669
  handleDownloadDocument(e, doc);
5790
5670
  },
5791
- sx: {
5792
- textTransform: "none",
5793
- height: { xs: 32, sm: 36, md: 40 },
5794
- // Responsive height matching grid view
5795
- minWidth: { xs: 90, sm: 100, md: 110 },
5796
- // Consistent width
5797
- borderWidth: 2,
5798
- fontSize: { xs: "0.75rem", sm: "0.8rem", md: "0.875rem" },
5799
- // Responsive font
5800
- fontWeight: 600,
5801
- px: { xs: 1, sm: 1.5 },
5802
- // Responsive padding
5803
- "&:hover": {
5804
- borderWidth: 2,
5805
- bgcolor: "primary.main",
5806
- color: "primary.contrastText",
5807
- transform: "translateY(-1px)",
5808
- boxShadow: 2
5809
- }
5810
- },
5811
- startIcon: /* @__PURE__ */ jsx7(DownloadIcon, { sx: { fontSize: { xs: "1rem", sm: "1.1rem" } } }),
5812
- children: "Download"
5671
+ sx: { color: "text.secondary", "&:hover": { color: "primary.main" } },
5672
+ children: /* @__PURE__ */ jsx7(DownloadIcon, { sx: { fontSize: 18 } })
5813
5673
  }
5814
5674
  ),
5815
5675
  /* @__PURE__ */ jsx7(
5816
5676
  IconButton4,
5817
5677
  {
5678
+ size: "small",
5818
5679
  onClick: (e) => handleRemoveDocument(e, doc.id),
5819
5680
  color: "error",
5820
- children: /* @__PURE__ */ jsx7(DeleteIcon, {})
5681
+ children: /* @__PURE__ */ jsx7(DeleteIcon, { sx: { fontSize: 18 } })
5821
5682
  }
5822
5683
  )
5823
5684
  ] })
@@ -5827,10 +5688,10 @@ var KnowledgeTab = ({
5827
5688
  );
5828
5689
  }) })
5829
5690
  ),
5830
- filteredAndSortedDocuments.length === 0 && /* @__PURE__ */ jsx7(Card3, { sx: { textAlign: "center", py: 6 }, children: /* @__PURE__ */ jsxs7(CardContent3, { children: [
5831
- /* @__PURE__ */ jsx7(SearchIcon, { sx: { fontSize: 48, color: "text.secondary", mb: 2 } }),
5832
- /* @__PURE__ */ jsx7(Typography7, { variant: "h6", color: "text.secondary", gutterBottom: true, children: "No documents found" }),
5833
- /* @__PURE__ */ jsx7(Typography7, { variant: "body2", color: "text.secondary", children: "Try adjusting your search or filter criteria" }),
5691
+ filteredAndSortedDocuments.length === 0 && /* @__PURE__ */ jsx7(Card3, { sx: { textAlign: "center", py: 4, borderRadius: 2, boxShadow: "none", border: "1px solid", borderColor: "divider" }, children: /* @__PURE__ */ jsxs7(CardContent3, { children: [
5692
+ /* @__PURE__ */ jsx7(SearchIcon, { sx: { fontSize: 20, color: "text.secondary", mb: 1 } }),
5693
+ /* @__PURE__ */ jsx7(Typography7, { variant: "subtitle2", color: "text.secondary", gutterBottom: true, children: "No documents found" }),
5694
+ /* @__PURE__ */ jsx7(Typography7, { variant: "caption", color: "text.secondary", sx: { display: "block" }, children: "Try adjusting your search or filter criteria" }),
5834
5695
  /* @__PURE__ */ jsx7(
5835
5696
  Button6,
5836
5697
  {
@@ -5839,7 +5700,7 @@ var KnowledgeTab = ({
5839
5700
  setSearchQuery("");
5840
5701
  setSelectedCategory("all");
5841
5702
  },
5842
- sx: { mt: 2 },
5703
+ sx: { mt: 1 },
5843
5704
  children: "Clear Filters"
5844
5705
  }
5845
5706
  )
@@ -7622,8 +7483,6 @@ import {
7622
7483
  Box as Box10,
7623
7484
  Typography as Typography9,
7624
7485
  Button as Button8,
7625
- Card as Card5,
7626
- CardContent as CardContent5,
7627
7486
  LinearProgress as LinearProgress4,
7628
7487
  Dialog as Dialog7,
7629
7488
  DialogTitle as DialogTitle6,
@@ -8107,18 +7966,17 @@ var StorageTab = ({ currentTheme }) => {
8107
7966
  /* @__PURE__ */ jsx10(Typography9, { variant: "body1", color: "text.secondary", sx: { ml: 2 }, children: "Analyzing storage usage..." })
8108
7967
  ] });
8109
7968
  }
8110
- return /* @__PURE__ */ jsx10(Box10, { children: /* @__PURE__ */ jsxs10(Box10, { sx: { px: { xs: 2, sm: 4, md: 6 }, pt: 3, pb: 5 }, children: [
8111
- /* @__PURE__ */ jsx10(Box10, { sx: { mb: 4 }, children: /* @__PURE__ */ jsxs10(Box10, { sx: {
7969
+ return /* @__PURE__ */ jsx10(Box10, { children: /* @__PURE__ */ jsxs10(Box10, { sx: { px: { xs: 2, sm: 3, md: 4 }, pt: 2, pb: 3 }, children: [
7970
+ /* @__PURE__ */ jsx10(Box10, { sx: { mb: 2 }, children: /* @__PURE__ */ jsxs10(Box10, { sx: {
8112
7971
  display: "flex",
8113
7972
  flexDirection: { xs: "column", sm: "row" },
8114
7973
  justifyContent: "space-between",
8115
7974
  alignItems: { xs: "stretch", sm: "flex-start" },
8116
- gap: { xs: 2, sm: 0 },
8117
- mb: 2
7975
+ gap: { xs: 1.5, sm: 0 }
8118
7976
  }, children: [
8119
7977
  /* @__PURE__ */ jsxs10(Box10, { sx: { flex: 1 }, children: [
8120
- /* @__PURE__ */ jsx10(Typography9, { variant: "h5", color: "text.primary", sx: { mb: 1, fontWeight: 600 }, children: "Storage Management" }),
8121
- /* @__PURE__ */ jsx10(Typography9, { variant: "body1", color: "text.secondary", children: "Monitor and manage your local browser storage usage" })
7978
+ /* @__PURE__ */ jsx10(Typography9, { variant: "h5", color: "text.primary", sx: { mb: 0.5, fontWeight: 600 }, children: "Storage Management" }),
7979
+ /* @__PURE__ */ jsx10(Typography9, { variant: "body2", color: "text.secondary", sx: { mb: 1.5 }, children: "Monitor and manage your local browser storage usage." })
8122
7980
  ] }),
8123
7981
  /* @__PURE__ */ jsxs10(Box10, { sx: {
8124
7982
  display: "flex",
@@ -8136,15 +7994,14 @@ var StorageTab = ({ currentTheme }) => {
8136
7994
  disabled: loading,
8137
7995
  sx: {
8138
7996
  minWidth: { xs: "auto", sm: "fit-content" },
8139
- flex: { xs: "1", sm: "0 0 auto" },
8140
- minHeight: 36
7997
+ flex: { xs: "1", sm: "0 0 auto" }
8141
7998
  },
8142
7999
  children: [
8143
8000
  /* @__PURE__ */ jsxs10(Box10, { sx: { display: { xs: "none", sm: "flex" }, alignItems: "center", gap: 1 }, children: [
8144
- /* @__PURE__ */ jsx10(RefreshIcon, { fontSize: "medium" }),
8001
+ /* @__PURE__ */ jsx10(RefreshIcon, { fontSize: "small" }),
8145
8002
  "Refresh"
8146
8003
  ] }),
8147
- /* @__PURE__ */ jsx10(Box10, { sx: { display: { xs: "flex", sm: "none" }, alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ jsx10(RefreshIcon, { fontSize: "medium" }) })
8004
+ /* @__PURE__ */ jsx10(Box10, { sx: { display: { xs: "flex", sm: "none" }, alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ jsx10(RefreshIcon, { fontSize: "small" }) })
8148
8005
  ]
8149
8006
  }
8150
8007
  ),
@@ -8190,18 +8047,23 @@ var StorageTab = ({ currentTheme }) => {
8190
8047
  ] })
8191
8048
  ] })
8192
8049
  ] }) }),
8193
- /* @__PURE__ */ jsxs10(Box10, { sx: { mb: 4 }, children: [
8194
- /* @__PURE__ */ jsx10(Card5, { sx: { mb: 3 }, children: /* @__PURE__ */ jsxs10(CardContent5, { sx: {
8195
- display: "flex",
8196
- flexDirection: "column",
8197
- minHeight: 180
8198
- }, children: [
8199
- /* @__PURE__ */ jsxs10(Typography9, { variant: "h6", gutterBottom: true, sx: { fontWeight: 600, color: "text.primary" }, children: [
8200
- /* @__PURE__ */ jsx10(StorageIcon, { sx: { mr: 1, verticalAlign: "middle" } }),
8201
- "Storage Quota"
8202
- ] }),
8203
- /* @__PURE__ */ jsxs10(Box10, { sx: { mb: 2, flex: 1 }, children: [
8204
- /* @__PURE__ */ jsxs10(Box10, { sx: { display: "flex", flexWrap: "wrap", gap: 1, mb: 2 }, children: [
8050
+ /* @__PURE__ */ jsxs10(
8051
+ Box10,
8052
+ {
8053
+ sx: {
8054
+ p: { xs: 1.5, sm: 1.75 },
8055
+ mb: { xs: 1.25, md: 1.5 },
8056
+ border: "1px solid",
8057
+ borderColor: "divider",
8058
+ borderRadius: 2,
8059
+ bgcolor: "background.paper"
8060
+ },
8061
+ children: [
8062
+ /* @__PURE__ */ jsxs10(Typography9, { variant: "overline", sx: { color: "text.secondary", display: "flex", alignItems: "center", gap: 0.75 }, children: [
8063
+ /* @__PURE__ */ jsx10(StorageIcon, { fontSize: "small" }),
8064
+ "Storage Quota"
8065
+ ] }),
8066
+ /* @__PURE__ */ jsxs10(Box10, { sx: { display: "flex", flexWrap: "wrap", gap: 1, mt: 0.5, mb: 1.5 }, children: [
8205
8067
  /* @__PURE__ */ jsx10(
8206
8068
  Chip7,
8207
8069
  {
@@ -8245,11 +8107,11 @@ var StorageTab = ({ currentTheme }) => {
8245
8107
  variant: "determinate",
8246
8108
  value: usagePercentage,
8247
8109
  sx: {
8248
- height: 8,
8249
- borderRadius: 4,
8110
+ height: 6,
8111
+ borderRadius: 3,
8250
8112
  bgcolor: "action.hover",
8251
8113
  "& .MuiLinearProgress-bar": {
8252
- borderRadius: 4,
8114
+ borderRadius: 3,
8253
8115
  bgcolor: usagePercentage > 80 ? "error.main" : usagePercentage > 60 ? "warning.main" : "success.main"
8254
8116
  }
8255
8117
  }
@@ -8258,47 +8120,40 @@ var StorageTab = ({ currentTheme }) => {
8258
8120
  /* @__PURE__ */ jsxs10(Typography9, { variant: "caption", color: "text.secondary", sx: { mt: 0.5, display: "block" }, children: [
8259
8121
  usagePercentage.toFixed(1),
8260
8122
  "% used"
8261
- ] })
8262
- ] }),
8263
- usagePercentage > 80 && /* @__PURE__ */ jsx10(Alert8, { severity: "warning", sx: { mt: "auto" }, children: "Storage usage is high. Consider clearing unused data." })
8264
- ] }) }),
8265
- /* @__PURE__ */ jsx10(Card5, { children: /* @__PURE__ */ jsxs10(CardContent5, { sx: {
8266
- display: "flex",
8267
- flexDirection: "column",
8268
- minHeight: 140
8269
- }, children: [
8270
- /* @__PURE__ */ jsx10(Typography9, { variant: "h6", gutterBottom: true, sx: { fontWeight: 600, color: "text.primary" }, children: "Usage Summary" }),
8271
- /* @__PURE__ */ jsxs10(Box10, { sx: { display: "flex", flexWrap: "wrap", gap: 1, mb: 2 }, children: [
8272
- /* @__PURE__ */ jsx10(
8273
- Chip7,
8274
- {
8275
- label: `${storageCategories.length} Categories`,
8276
- color: "primary",
8277
- size: "small"
8278
- }
8279
- ),
8280
- /* @__PURE__ */ jsx10(
8281
- Chip7,
8282
- {
8283
- label: `${storageCategories.reduce((sum, cat) => sum + cat.itemCount, 0)} Items`,
8284
- color: "secondary",
8285
- size: "small"
8286
- }
8287
- ),
8288
- /* @__PURE__ */ jsx10(
8289
- Chip7,
8290
- {
8291
- label: `${formatBytes(totalUsed)} Used`,
8292
- color: "info",
8293
- size: "small"
8294
- }
8295
- )
8296
- ] }),
8297
- /* @__PURE__ */ jsx10(Typography9, { variant: "body2", color: "text.secondary", sx: { mt: "auto" }, children: usageSummaryMessage })
8298
- ] }) })
8299
- ] }),
8300
- /* @__PURE__ */ jsx10(Typography9, { variant: "h6", gutterBottom: true, sx: { mb: 2, fontWeight: 600, color: "text.primary" }, children: "Storage Categories" }),
8301
- /* @__PURE__ */ jsx10(Box10, { children: storageCategories.length === 0 ? /* @__PURE__ */ jsxs10(Alert8, { severity: "info", sx: { mt: 2 }, children: [
8123
+ ] }),
8124
+ usagePercentage > 80 && /* @__PURE__ */ jsx10(Alert8, { severity: "warning", sx: { mt: 1, py: 0 }, children: "Storage usage is high. Consider clearing unused data." }),
8125
+ /* @__PURE__ */ jsxs10(Box10, { sx: { display: "flex", flexWrap: "wrap", alignItems: "center", gap: 1, mt: 1.5 }, children: [
8126
+ /* @__PURE__ */ jsx10(
8127
+ Chip7,
8128
+ {
8129
+ label: `${storageCategories.length} Categories`,
8130
+ color: "primary",
8131
+ size: "small"
8132
+ }
8133
+ ),
8134
+ /* @__PURE__ */ jsx10(
8135
+ Chip7,
8136
+ {
8137
+ label: `${storageCategories.reduce((sum, cat) => sum + cat.itemCount, 0)} Items`,
8138
+ color: "secondary",
8139
+ size: "small"
8140
+ }
8141
+ ),
8142
+ /* @__PURE__ */ jsx10(
8143
+ Chip7,
8144
+ {
8145
+ label: `${formatBytes(totalUsed)} Used`,
8146
+ color: "info",
8147
+ size: "small"
8148
+ }
8149
+ )
8150
+ ] }),
8151
+ /* @__PURE__ */ jsx10(Typography9, { variant: "caption", color: "text.secondary", sx: { display: "block", mt: 1 }, children: usageSummaryMessage })
8152
+ ]
8153
+ }
8154
+ ),
8155
+ /* @__PURE__ */ jsx10(Typography9, { variant: "overline", sx: { display: "block", mb: 1, color: "text.secondary" }, children: "Storage Categories" }),
8156
+ /* @__PURE__ */ jsx10(Box10, { children: storageCategories.length === 0 ? /* @__PURE__ */ jsxs10(Alert8, { severity: "info", sx: { mt: 1 }, children: [
8302
8157
  /* @__PURE__ */ jsx10(Typography9, { variant: "body2", children: "No storage data found. This could mean:" }),
8303
8158
  /* @__PURE__ */ jsxs10(Typography9, { variant: "body2", component: "ul", sx: { mt: 1, pl: 2 }, children: [
8304
8159
  /* @__PURE__ */ jsx10("li", { children: "All databases are empty" }),
@@ -8306,7 +8161,7 @@ var StorageTab = ({ currentTheme }) => {
8306
8161
  /* @__PURE__ */ jsx10("li", { children: "There was an error accessing the databases" })
8307
8162
  ] }),
8308
8163
  /* @__PURE__ */ jsx10(Typography9, { variant: "body2", sx: { mt: 1 }, children: 'Try clicking "Refresh" or check the browser console for more details.' })
8309
- ] }) : /* @__PURE__ */ jsx10(Stack4, { spacing: 2, children: storageCategories.map((category) => {
8164
+ ] }) : /* @__PURE__ */ jsx10(Stack4, { spacing: 1, children: storageCategories.map((category) => {
8310
8165
  const IconComponent = category.icon;
8311
8166
  const categoryPercentage = storageQuota.quota > 0 ? category.size / storageQuota.quota * 100 : 0;
8312
8167
  const categoryRelativePercentage = totalUsed > 0 ? category.size / totalUsed * 100 : 0;
@@ -8317,29 +8172,41 @@ var StorageTab = ({ currentTheme }) => {
8317
8172
  categoryPercentage: categoryPercentage.toFixed(2),
8318
8173
  categoryRelativePercentage: categoryRelativePercentage.toFixed(2)
8319
8174
  });
8320
- return /* @__PURE__ */ jsxs10(Accordion, { sx: { bgcolor: "background.paper" }, children: [
8321
- /* @__PURE__ */ jsx10(
8322
- AccordionSummary,
8323
- {
8324
- expandIcon: /* @__PURE__ */ jsx10(ExpandMoreIcon, {}),
8325
- "aria-controls": `${category.name}-content`,
8326
- id: `${category.name}-header`,
8327
- children: /* @__PURE__ */ jsxs10(Box10, { sx: { display: "flex", alignItems: "center", width: "100%", pr: 2 }, children: [
8328
- /* @__PURE__ */ jsx10(IconComponent, { sx: { color: category.color, mr: 2 } }),
8329
- /* @__PURE__ */ jsxs10(Box10, { sx: { flex: 1 }, children: [
8330
- /* @__PURE__ */ jsx10(
8331
- Typography9,
8332
- {
8333
- variant: "body1",
8334
- style: {
8335
- fontWeight: 600,
8336
- color: theme.palette.mode === "dark" ? "#ffffff" : theme.palette.text.primary
8337
- },
8338
- children: category.name
8339
- }
8340
- ),
8341
- /* @__PURE__ */ jsxs10(Box10, { sx: { display: "flex", alignItems: "center", gap: 2, mt: 0.5 }, children: [
8342
- /* @__PURE__ */ jsx10(Typography9, { variant: "body2", color: "text.secondary", children: formatBytes(category.size) }),
8175
+ return /* @__PURE__ */ jsxs10(
8176
+ Accordion,
8177
+ {
8178
+ disableGutters: true,
8179
+ elevation: 0,
8180
+ sx: {
8181
+ bgcolor: "background.paper",
8182
+ border: "1px solid",
8183
+ borderColor: "divider",
8184
+ borderRadius: 2,
8185
+ "&:before": { display: "none" }
8186
+ },
8187
+ children: [
8188
+ /* @__PURE__ */ jsx10(
8189
+ AccordionSummary,
8190
+ {
8191
+ expandIcon: /* @__PURE__ */ jsx10(ExpandMoreIcon, {}),
8192
+ "aria-controls": `${category.name}-content`,
8193
+ id: `${category.name}-header`,
8194
+ sx: { px: 1.5, minHeight: 0, "& .MuiAccordionSummary-content": { my: 1 } },
8195
+ children: /* @__PURE__ */ jsxs10(Box10, { sx: { display: "flex", alignItems: "center", width: "100%", gap: 1.5, pr: 1.5 }, children: [
8196
+ /* @__PURE__ */ jsx10(IconComponent, { fontSize: "small", sx: { color: category.color } }),
8197
+ /* @__PURE__ */ jsx10(
8198
+ Typography9,
8199
+ {
8200
+ variant: "body2",
8201
+ style: {
8202
+ fontWeight: 600,
8203
+ color: theme.palette.mode === "dark" ? "#ffffff" : theme.palette.text.primary
8204
+ },
8205
+ sx: { minWidth: 0, flexShrink: 0 },
8206
+ children: category.name
8207
+ }
8208
+ ),
8209
+ /* @__PURE__ */ jsx10(Typography9, { variant: "caption", color: "text.secondary", sx: { flexShrink: 0 }, children: formatBytes(category.size) }),
8343
8210
  /* @__PURE__ */ jsx10(
8344
8211
  Chip7,
8345
8212
  {
@@ -8348,7 +8215,7 @@ var StorageTab = ({ currentTheme }) => {
8348
8215
  variant: "outlined"
8349
8216
  }
8350
8217
  ),
8351
- /* @__PURE__ */ jsx10(Box10, { sx: { flex: 1, mx: 2 }, children: /* @__PURE__ */ jsx10(
8218
+ /* @__PURE__ */ jsx10(Box10, { sx: { flex: 1, minWidth: 24 }, children: /* @__PURE__ */ jsx10(
8352
8219
  LinearProgress4,
8353
8220
  {
8354
8221
  variant: "determinate",
@@ -8364,104 +8231,127 @@ var StorageTab = ({ currentTheme }) => {
8364
8231
  }
8365
8232
  }
8366
8233
  ) }),
8367
- /* @__PURE__ */ jsxs10(Typography9, { variant: "caption", color: "text.secondary", children: [
8234
+ /* @__PURE__ */ jsxs10(Typography9, { variant: "caption", color: "text.secondary", sx: { flexShrink: 0 }, children: [
8368
8235
  categoryRelativePercentage.toFixed(1),
8369
8236
  "%"
8370
8237
  ] })
8371
8238
  ] })
8372
- ] })
8373
- ] })
8374
- }
8375
- ),
8376
- /* @__PURE__ */ jsx10(AccordionDetails, { children: /* @__PURE__ */ jsxs10(Box10, { sx: { pl: 5 }, children: [
8377
- /* @__PURE__ */ jsx10(Typography9, { variant: "body2", color: "text.secondary", paragraph: true, children: category.description }),
8378
- /* @__PURE__ */ jsx10(Typography9, { variant: "subtitle2", gutterBottom: true, children: "Storage Locations:" }),
8379
- /* @__PURE__ */ jsx10(List2, { dense: true, children: category.stores.map((store) => /* @__PURE__ */ jsxs10(ListItem, { sx: { py: 0.5 }, children: [
8380
- /* @__PURE__ */ jsx10(ListItemIcon, { sx: { minWidth: 32 }, children: /* @__PURE__ */ jsx10(StorageIcon, { fontSize: "small" }) }),
8381
- /* @__PURE__ */ jsx10(
8382
- ListItemText,
8383
- {
8384
- primary: store,
8385
- primaryTypographyProps: { variant: "body2", fontFamily: "monospace" }
8386
- }
8387
- )
8388
- ] }, store)) }),
8389
- category.canClear ? /* @__PURE__ */ jsxs10(Box10, { sx: { mt: 2, pt: 2, borderTop: 1, borderColor: "divider" }, children: [
8390
- /* @__PURE__ */ jsxs10(
8391
- Button8,
8392
- {
8393
- variant: "outlined",
8394
- color: "error",
8395
- size: "small",
8396
- startIcon: /* @__PURE__ */ jsx10(DeleteIcon, {}),
8397
- onClick: () => setClearCategoryDialog(category),
8398
- disabled: clearing,
8399
- children: [
8400
- "Clear ",
8401
- category.name
8402
- ]
8403
8239
  }
8404
8240
  ),
8405
- category.clearWarning && /* @__PURE__ */ jsx10(Alert8, { severity: "warning", sx: { mt: 2 }, children: /* @__PURE__ */ jsx10(Typography9, { variant: "caption", children: category.clearWarning }) })
8406
- ] }) : /* @__PURE__ */ jsx10(Alert8, { severity: "info", sx: { mt: 2 }, children: /* @__PURE__ */ jsx10(Typography9, { variant: "caption", children: category.itemCount === 0 ? "This category is empty." : "This category cannot be cleared automatically." }) })
8407
- ] }) })
8408
- ] }, category.name);
8241
+ /* @__PURE__ */ jsx10(AccordionDetails, { sx: { px: 1.5, pt: 0, pb: 1.5 }, children: /* @__PURE__ */ jsxs10(Box10, { sx: { pl: 3.5 }, children: [
8242
+ /* @__PURE__ */ jsx10(Typography9, { variant: "caption", color: "text.secondary", sx: { display: "block", mb: 1 }, children: category.description }),
8243
+ /* @__PURE__ */ jsx10(Typography9, { variant: "overline", sx: { color: "text.secondary" }, children: "Storage Locations" }),
8244
+ /* @__PURE__ */ jsx10(List2, { dense: true, disablePadding: true, children: category.stores.map((store) => /* @__PURE__ */ jsxs10(ListItem, { sx: { py: 0.25 }, children: [
8245
+ /* @__PURE__ */ jsx10(ListItemIcon, { sx: { minWidth: 28 }, children: /* @__PURE__ */ jsx10(StorageIcon, { fontSize: "small" }) }),
8246
+ /* @__PURE__ */ jsx10(
8247
+ ListItemText,
8248
+ {
8249
+ primary: store,
8250
+ primaryTypographyProps: { variant: "caption", fontFamily: "monospace" }
8251
+ }
8252
+ )
8253
+ ] }, store)) }),
8254
+ category.canClear ? /* @__PURE__ */ jsxs10(Box10, { sx: { mt: 1, pt: 1, borderTop: 1, borderColor: "divider" }, children: [
8255
+ /* @__PURE__ */ jsxs10(
8256
+ Button8,
8257
+ {
8258
+ variant: "outlined",
8259
+ color: "error",
8260
+ size: "small",
8261
+ startIcon: /* @__PURE__ */ jsx10(DeleteIcon, {}),
8262
+ onClick: () => setClearCategoryDialog(category),
8263
+ disabled: clearing,
8264
+ children: [
8265
+ "Clear ",
8266
+ category.name
8267
+ ]
8268
+ }
8269
+ ),
8270
+ category.clearWarning && /* @__PURE__ */ jsx10(Typography9, { variant: "caption", color: "warning.main", sx: { display: "block", mt: 1 }, children: category.clearWarning })
8271
+ ] }) : /* @__PURE__ */ jsx10(Typography9, { variant: "caption", color: "text.secondary", sx: { display: "block", mt: 1 }, children: category.itemCount === 0 ? "This category is empty." : "This category cannot be cleared automatically." })
8272
+ ] }) })
8273
+ ]
8274
+ },
8275
+ category.name
8276
+ );
8409
8277
  }) }) }),
8410
- /* @__PURE__ */ jsx10(Card5, { sx: { mt: 4 }, children: /* @__PURE__ */ jsxs10(CardContent5, { children: [
8411
- /* @__PURE__ */ jsxs10(Typography9, { variant: "h6", gutterBottom: true, sx: { fontWeight: 600, color: "text.primary" }, children: [
8412
- /* @__PURE__ */ jsx10(InfoIcon, { sx: { mr: 1, verticalAlign: "middle" } }),
8413
- "Storage Tips & Clear Options"
8414
- ] }),
8415
- /* @__PURE__ */ jsxs10(List2, { children: [
8416
- /* @__PURE__ */ jsxs10(ListItem, { children: [
8417
- /* @__PURE__ */ jsx10(ListItemIcon, { children: /* @__PURE__ */ jsx10(
8418
- CheckCircleIcon,
8419
- {
8420
- sx: {
8421
- color: syncFeaturesActive ? theme.palette.warning.main : theme.palette.success.main
8422
- }
8423
- }
8424
- ) }),
8425
- /* @__PURE__ */ jsx10(
8426
- ListItemText,
8427
- {
8428
- primary: storageStatusPrimary,
8429
- secondary: syncFeaturesActive ? "Some features (conversation sync or advanced vector storage) can sync items to your configured gateway storage." : "With conversation sync and advanced vector storage turned off, everything stays in this browser."
8430
- }
8431
- )
8432
- ] }),
8433
- /* @__PURE__ */ jsxs10(ListItem, { children: [
8434
- /* @__PURE__ */ jsx10(ListItemIcon, { children: /* @__PURE__ */ jsx10(CleaningServicesIcon, { color: "info" }) }),
8435
- /* @__PURE__ */ jsx10(
8436
- ListItemText,
8437
- {
8438
- primary: "Clear All Data (Safe)",
8439
- secondary: "Deletes all items but keeps database structure intact. App continues working normally."
8440
- }
8441
- )
8442
- ] }),
8443
- /* @__PURE__ */ jsxs10(ListItem, { children: [
8444
- /* @__PURE__ */ jsx10(ListItemIcon, { children: /* @__PURE__ */ jsx10(DeleteIcon, { color: "error" }) }),
8445
- /* @__PURE__ */ jsx10(
8446
- ListItemText,
8447
- {
8448
- primary: "Nuclear Clear (Complete Reset)",
8449
- secondary: "Completely destroys all databases and forces app reload. Use only for complete reset."
8450
- }
8451
- )
8452
- ] }),
8453
- /* @__PURE__ */ jsxs10(ListItem, { children: [
8454
- /* @__PURE__ */ jsx10(ListItemIcon, { children: /* @__PURE__ */ jsx10(WarningIcon, { color: "warning" }) }),
8455
- /* @__PURE__ */ jsx10(
8456
- ListItemText,
8457
- {
8458
- primary: "Backup important data",
8459
- secondary: "Export custom models and important documents before clearing storage"
8460
- }
8461
- )
8462
- ] })
8463
- ] })
8464
- ] }) }),
8278
+ /* @__PURE__ */ jsxs10(
8279
+ Box10,
8280
+ {
8281
+ sx: {
8282
+ mt: 1.5,
8283
+ p: { xs: 1.5, sm: 1.75 },
8284
+ border: "1px solid",
8285
+ borderColor: "divider",
8286
+ borderRadius: 2,
8287
+ bgcolor: "background.paper"
8288
+ },
8289
+ children: [
8290
+ /* @__PURE__ */ jsxs10(Typography9, { variant: "overline", sx: { color: "text.secondary", display: "flex", alignItems: "center", gap: 0.75 }, children: [
8291
+ /* @__PURE__ */ jsx10(InfoIcon, { fontSize: "small" }),
8292
+ "Storage Tips & Clear Options"
8293
+ ] }),
8294
+ /* @__PURE__ */ jsxs10(List2, { dense: true, disablePadding: true, sx: { mt: 0.5 }, children: [
8295
+ /* @__PURE__ */ jsxs10(ListItem, { sx: { py: 0.5 }, children: [
8296
+ /* @__PURE__ */ jsx10(ListItemIcon, { sx: { minWidth: 32 }, children: /* @__PURE__ */ jsx10(
8297
+ CheckCircleIcon,
8298
+ {
8299
+ fontSize: "small",
8300
+ sx: {
8301
+ color: syncFeaturesActive ? theme.palette.warning.main : theme.palette.success.main
8302
+ }
8303
+ }
8304
+ ) }),
8305
+ /* @__PURE__ */ jsx10(
8306
+ ListItemText,
8307
+ {
8308
+ primary: storageStatusPrimary,
8309
+ primaryTypographyProps: { variant: "body2" },
8310
+ secondaryTypographyProps: { variant: "caption" },
8311
+ secondary: syncFeaturesActive ? "Some features (conversation sync or advanced vector storage) can sync items to your configured gateway storage." : "With conversation sync and advanced vector storage turned off, everything stays in this browser."
8312
+ }
8313
+ )
8314
+ ] }),
8315
+ /* @__PURE__ */ jsxs10(ListItem, { sx: { py: 0.5 }, children: [
8316
+ /* @__PURE__ */ jsx10(ListItemIcon, { sx: { minWidth: 32 }, children: /* @__PURE__ */ jsx10(CleaningServicesIcon, { fontSize: "small", color: "info" }) }),
8317
+ /* @__PURE__ */ jsx10(
8318
+ ListItemText,
8319
+ {
8320
+ primary: "Clear All Data (Safe)",
8321
+ primaryTypographyProps: { variant: "body2" },
8322
+ secondaryTypographyProps: { variant: "caption" },
8323
+ secondary: "Deletes all items but keeps database structure intact. App continues working normally."
8324
+ }
8325
+ )
8326
+ ] }),
8327
+ /* @__PURE__ */ jsxs10(ListItem, { sx: { py: 0.5 }, children: [
8328
+ /* @__PURE__ */ jsx10(ListItemIcon, { sx: { minWidth: 32 }, children: /* @__PURE__ */ jsx10(DeleteIcon, { fontSize: "small", color: "error" }) }),
8329
+ /* @__PURE__ */ jsx10(
8330
+ ListItemText,
8331
+ {
8332
+ primary: "Nuclear Clear (Complete Reset)",
8333
+ primaryTypographyProps: { variant: "body2" },
8334
+ secondaryTypographyProps: { variant: "caption" },
8335
+ secondary: "Completely destroys all databases and forces app reload. Use only for complete reset."
8336
+ }
8337
+ )
8338
+ ] }),
8339
+ /* @__PURE__ */ jsxs10(ListItem, { sx: { py: 0.5 }, children: [
8340
+ /* @__PURE__ */ jsx10(ListItemIcon, { sx: { minWidth: 32 }, children: /* @__PURE__ */ jsx10(WarningIcon, { fontSize: "small", color: "warning" }) }),
8341
+ /* @__PURE__ */ jsx10(
8342
+ ListItemText,
8343
+ {
8344
+ primary: "Backup important data",
8345
+ primaryTypographyProps: { variant: "body2" },
8346
+ secondaryTypographyProps: { variant: "caption" },
8347
+ secondary: "Export custom models and important documents before clearing storage"
8348
+ }
8349
+ )
8350
+ ] })
8351
+ ] })
8352
+ ]
8353
+ }
8354
+ ),
8465
8355
  /* @__PURE__ */ jsxs10(
8466
8356
  Dialog7,
8467
8357
  {
@@ -9872,7 +9762,7 @@ var MCPToolsTabV2_default = MCPToolsTabV2;
9872
9762
 
9873
9763
  // src/management/management.tsx
9874
9764
  import { jsx as jsx14, jsxs as jsxs14 } from "react/jsx-runtime";
9875
- var preloadChatPage = () => import("./chat-JDAI4UHT.mjs");
9765
+ var preloadChatPage = () => import("./chat-J2WTUEBN.mjs");
9876
9766
  var buildCapabilitiesUrl = (gatewayApiUrl) => {
9877
9767
  const trimmed = gatewayApiUrl.replace(/\/$/, "");
9878
9768
  if (trimmed.endsWith("/api")) {
@@ -11208,4 +11098,4 @@ export {
11208
11098
  useGatewayMemory,
11209
11099
  management_default
11210
11100
  };
11211
- //# sourceMappingURL=chunk-JFISRBZ5.mjs.map
11101
+ //# sourceMappingURL=chunk-PIBF62UY.mjs.map