@burtson-labs/bandit-engine 2.0.69 → 2.0.71

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.
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-U633CJBV.mjs";
7
7
  import {
8
8
  useMCPToolsStore
9
- } from "./chunk-IDZEEONG.mjs";
9
+ } from "./chunk-DHYP4K5O.mjs";
10
10
  import {
11
11
  AddIcon,
12
12
  ArrowDownwardIcon,
@@ -84,7 +84,7 @@ import {
84
84
  } from "./chunk-KCI46M23.mjs";
85
85
 
86
86
  // src/chat/chat.tsx
87
- import { useCallback as useCallback6, useEffect as useEffect14, useLayoutEffect, useMemo as useMemo3, useRef as useRef13, useState as useState14 } from "react";
87
+ import { useCallback as useCallback6, useEffect as useEffect15, useLayoutEffect, useMemo as useMemo3, useRef as useRef13, useState as useState15 } from "react";
88
88
 
89
89
  // src/chat/custom-logo.tsx
90
90
  import React, { useEffect } from "react";
@@ -171,7 +171,7 @@ var Logo = ({ visible, atTop = false }) => {
171
171
  var custom_logo_default = Logo;
172
172
 
173
173
  // src/chat/chat.tsx
174
- import { Box as Box14, ThemeProvider, CssBaseline, CircularProgress as CircularProgress4, Typography as Typography10 } from "@mui/material";
174
+ import { Box as Box15, ThemeProvider, CssBaseline, CircularProgress as CircularProgress4, Typography as Typography11 } from "@mui/material";
175
175
  import { createTheme } from "@mui/material/styles";
176
176
  import { Navigate } from "react-router-dom";
177
177
 
@@ -1387,6 +1387,173 @@ ${sanitize(
1387
1387
  };
1388
1388
  var chat_input_default = ChatInput;
1389
1389
 
1390
+ // src/chat/ask-user-card.tsx
1391
+ import { useEffect as useEffect4, useState as useState4 } from "react";
1392
+ import { Box as Box4, Paper, Typography as Typography2, Button, TextField as TextField2, Chip, Stack } from "@mui/material";
1393
+ import { useTheme as useTheme5, alpha as alpha2 } from "@mui/material/styles";
1394
+
1395
+ // src/store/askUserStore.ts
1396
+ import { create as create2 } from "zustand";
1397
+ var useAskUserStore = create2((set, get) => ({
1398
+ pending: null,
1399
+ resolver: null,
1400
+ ask: (questions) => new Promise((resolve) => {
1401
+ const prev = get().resolver;
1402
+ if (prev) prev(null);
1403
+ set({ pending: { questions }, resolver: resolve });
1404
+ }),
1405
+ submit: (answers) => {
1406
+ const r = get().resolver;
1407
+ set({ pending: null, resolver: null });
1408
+ if (r) r(answers);
1409
+ },
1410
+ cancel: () => {
1411
+ const r = get().resolver;
1412
+ set({ pending: null, resolver: null });
1413
+ if (r) r(null);
1414
+ }
1415
+ }));
1416
+ var parseAskUserQuestions = (rawJson) => {
1417
+ let parsed = rawJson;
1418
+ if (typeof rawJson === "string") {
1419
+ try {
1420
+ parsed = JSON.parse(rawJson);
1421
+ } catch {
1422
+ return [];
1423
+ }
1424
+ }
1425
+ const coerceOption = (raw) => {
1426
+ if (typeof raw === "string") return raw.trim() ? { label: raw.trim() } : null;
1427
+ if (raw && typeof raw === "object") {
1428
+ const o = raw;
1429
+ const label = typeof o.label === "string" ? o.label : typeof o.value === "string" ? o.value : typeof o.text === "string" ? o.text : "";
1430
+ if (!label.trim()) return null;
1431
+ return {
1432
+ label: label.trim(),
1433
+ description: typeof o.description === "string" ? o.description : void 0
1434
+ };
1435
+ }
1436
+ return null;
1437
+ };
1438
+ const list = Array.isArray(parsed) ? parsed : [parsed];
1439
+ const questions = [];
1440
+ list.forEach((raw, i) => {
1441
+ if (!raw || typeof raw !== "object") return;
1442
+ const r = raw;
1443
+ const text = typeof r.question === "string" ? r.question : typeof r.text === "string" ? r.text : typeof r.prompt === "string" ? r.prompt : "";
1444
+ if (!text.trim()) return;
1445
+ const options = (Array.isArray(r.options) ? r.options : []).map(coerceOption).filter((o) => o !== null);
1446
+ questions.push({
1447
+ id: typeof r.id === "string" && r.id.trim() ? r.id.trim() : `q${i + 1}`,
1448
+ question: text.trim(),
1449
+ header: typeof r.header === "string" && r.header.trim() ? r.header.trim() : void 0,
1450
+ options: options.length > 0 ? options : void 0,
1451
+ allowFreeform: r.allowFreeform === false ? false : true
1452
+ });
1453
+ });
1454
+ return questions;
1455
+ };
1456
+
1457
+ // src/chat/ask-user-card.tsx
1458
+ import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
1459
+ var AskUserCard = () => {
1460
+ const theme = useTheme5();
1461
+ const { pending, submit, cancel } = useAskUserStore();
1462
+ const [selected, setSelected] = useState4({});
1463
+ const [freeform, setFreeform] = useState4({});
1464
+ useEffect4(() => {
1465
+ if (!pending) return;
1466
+ const preselected = {};
1467
+ pending.questions.forEach((q) => {
1468
+ const rec = q.options?.find((o) => /\(recommended\)/i.test(o.label));
1469
+ if (rec) preselected[q.id] = rec.label;
1470
+ });
1471
+ setSelected(preselected);
1472
+ setFreeform({});
1473
+ }, [pending]);
1474
+ if (!pending) return null;
1475
+ const answerFor = (qid) => freeform[qid]?.trim() ? freeform[qid].trim() : selected[qid] ?? "";
1476
+ const allAnswered = pending.questions.every((q) => answerFor(q.id).length > 0);
1477
+ const handleSubmit = () => {
1478
+ const final = {};
1479
+ pending.questions.forEach((q) => {
1480
+ final[q.id] = answerFor(q.id);
1481
+ });
1482
+ submit(final);
1483
+ };
1484
+ return /* @__PURE__ */ jsx7(Box4, { sx: { width: "100%", display: "flex", justifyContent: "center", px: { xs: 1, sm: 2 }, mb: 1.5 }, children: /* @__PURE__ */ jsxs4(
1485
+ Paper,
1486
+ {
1487
+ elevation: 0,
1488
+ sx: {
1489
+ width: "100%",
1490
+ maxWidth: 760,
1491
+ p: { xs: 1.75, sm: 2.25 },
1492
+ borderRadius: 2,
1493
+ border: `1px solid ${alpha2(theme.palette.primary.main, 0.45)}`,
1494
+ bgcolor: alpha2(theme.palette.primary.main, 0.06)
1495
+ },
1496
+ children: [
1497
+ /* @__PURE__ */ jsx7(Typography2, { variant: "caption", sx: { color: theme.palette.primary.main, fontWeight: 700, letterSpacing: 0.4 }, children: "BANDIT NEEDS A QUICK DECISION" }),
1498
+ pending.questions.map((q) => /* @__PURE__ */ jsxs4(Box4, { sx: { mt: 1.5 }, children: [
1499
+ q.header && /* @__PURE__ */ jsx7(Chip, { label: q.header, size: "small", sx: { mb: 0.75, fontWeight: 600 }, color: "primary", variant: "outlined" }),
1500
+ /* @__PURE__ */ jsx7(Typography2, { sx: { fontWeight: 600, color: theme.palette.text.primary, mb: 1 }, children: q.question }),
1501
+ q.options && q.options.length > 0 && /* @__PURE__ */ jsx7(Stack, { spacing: 1, children: q.options.map((opt) => {
1502
+ const isSel = selected[q.id] === opt.label && !freeform[q.id]?.trim();
1503
+ return /* @__PURE__ */ jsx7(
1504
+ Button,
1505
+ {
1506
+ onClick: () => {
1507
+ setSelected((p) => ({ ...p, [q.id]: opt.label }));
1508
+ setFreeform((p) => ({ ...p, [q.id]: "" }));
1509
+ },
1510
+ variant: isSel ? "contained" : "outlined",
1511
+ color: "primary",
1512
+ sx: {
1513
+ justifyContent: "flex-start",
1514
+ textAlign: "left",
1515
+ textTransform: "none",
1516
+ py: 1,
1517
+ px: 1.5,
1518
+ borderColor: alpha2(theme.palette.primary.main, 0.4)
1519
+ },
1520
+ children: /* @__PURE__ */ jsxs4(Box4, { children: [
1521
+ /* @__PURE__ */ jsx7(Typography2, { sx: { fontWeight: 600, lineHeight: 1.3 }, children: opt.label }),
1522
+ opt.description && /* @__PURE__ */ jsx7(
1523
+ Typography2,
1524
+ {
1525
+ variant: "caption",
1526
+ sx: { color: isSel ? alpha2("#fff", 0.85) : theme.palette.text.secondary, display: "block" },
1527
+ children: opt.description
1528
+ }
1529
+ )
1530
+ ] })
1531
+ },
1532
+ opt.label
1533
+ );
1534
+ }) }),
1535
+ q.allowFreeform !== false && /* @__PURE__ */ jsx7(
1536
+ TextField2,
1537
+ {
1538
+ fullWidth: true,
1539
+ size: "small",
1540
+ placeholder: q.options && q.options.length ? "Or type your own answer\u2026" : "Type your answer\u2026",
1541
+ value: freeform[q.id] ?? "",
1542
+ onChange: (e) => setFreeform((p) => ({ ...p, [q.id]: e.target.value })),
1543
+ sx: { mt: q.options && q.options.length ? 1.25 : 0 }
1544
+ }
1545
+ )
1546
+ ] }, q.id)),
1547
+ /* @__PURE__ */ jsxs4(Box4, { sx: { display: "flex", justifyContent: "flex-end", gap: 1, mt: 2 }, children: [
1548
+ /* @__PURE__ */ jsx7(Button, { onClick: cancel, color: "inherit", sx: { textTransform: "none", color: theme.palette.text.secondary }, children: "Skip" }),
1549
+ /* @__PURE__ */ jsx7(Button, { onClick: handleSubmit, disabled: !allAnswered, variant: "contained", sx: { textTransform: "none" }, children: "Submit" })
1550
+ ] })
1551
+ ]
1552
+ }
1553
+ ) });
1554
+ };
1555
+ var ask_user_card_default = AskUserCard;
1556
+
1390
1557
  // src/chat/hooks/useAIProvider.tsx
1391
1558
  import { useCallback, useRef as useRef3 } from "react";
1392
1559
 
@@ -1698,7 +1865,7 @@ function telemetryEndTurn(outcome) {
1698
1865
  }
1699
1866
 
1700
1867
  // src/store/engineStore.ts
1701
- import { create as create2 } from "zustand";
1868
+ import { create as create3 } from "zustand";
1702
1869
  var STORAGE_KEY = "bandit.selectedEngine";
1703
1870
  var readStored = () => {
1704
1871
  try {
@@ -1707,7 +1874,7 @@ var readStored = () => {
1707
1874
  return null;
1708
1875
  }
1709
1876
  };
1710
- var useEngineStore = create2((set, get) => ({
1877
+ var useEngineStore = create3((set, get) => ({
1711
1878
  selectedEngine: readStored(),
1712
1879
  engines: [],
1713
1880
  loaded: false,
@@ -2271,9 +2438,9 @@ The user explicitly asked you to remember this. Respond with a short third-perso
2271
2438
  };
2272
2439
 
2273
2440
  // src/chat/hooks/useMoodEngine.tsx
2274
- import { useState as useState4 } from "react";
2441
+ import { useState as useState5 } from "react";
2275
2442
  var useMoodEngine = () => {
2276
- const [mood, setMood] = useState4("neutral");
2443
+ const [mood, setMood] = useState5("neutral");
2277
2444
  const analyzeMood = async (message) => {
2278
2445
  try {
2279
2446
  const detected = await detectMessageMood(message);
@@ -3119,6 +3286,8 @@ TOOL USAGE PROTOCOL (conservative approach)
3119
3286
  * web_search() - when asked about recent/current events, breaking news, live information (weather, prices, sports scores), or when you need to look up documentation, libraries, APIs, error messages, or verify a specific fact
3120
3287
  * web_fetch() - to read the FULL contents of a specific URL you already have. Reach for this when the user wants to "tell me more", "go deeper", "read/open that article", or asks for details about a specific source, link, or article from an EARLIER answer: take that item's URL from the previous Sources list in this conversation and fetch it, then answer from the page's actual content (not just the prior summary)
3121
3288
  * image_generation() - ONLY when explicitly asked to create or generate an image
3289
+ * create_file({"content": "...", "filename": "report.docx", "format": "docx"}) - when the user asks for a downloadable FILE (a document, spreadsheet, slides, markdown, code, etc.) or to "export"/"download"/"save" something. Formats: md, txt, csv, json, html, xml, yaml, docx, pptx. For docx/pptx write well-structured Markdown (use "## " headings to start each slide for pptx). It returns a temporary download link \u2014 ALWAYS tell the user the file expires (~1 hour). If it is unclear whether they want it shown inline vs. as a downloadable file, use ask_user first.
3290
+ * ask_user({"questions": [{"question": "...", "header": "Format", "options": [{"label": "Inline (Recommended)"}, {"label": "Download a file"}]}]}) - when you are genuinely BLOCKED on a decision that is the USER's to make and cannot resolve from the request, context, or sensible defaults (e.g. show content inline vs. let them download it, which format/option they want). Renders clickable options the user answers in one step \u2014 better than asking in prose and ending your turn. Give 1-4 questions, each with 2-4 options; if one is clearly best, list it first and append " (Recommended)". The user may also type their own answer; act on it directly.
3122
3291
  - For general questions about concepts, definitions, explanations, or how-to topics, use your built-in knowledge WITHOUT calling tools.
3123
3292
  - Examples of what NOT to use tools for: "who are you?", "what is React?", "explain machine learning", "how does X work?", general programming questions.
3124
3293
  - When a tool is truly needed, call exactly ONE tool that best matches the request.
@@ -3314,6 +3483,28 @@ ${fn}(${argStr})
3314
3483
  functionName,
3315
3484
  parameters: parsedParams
3316
3485
  });
3486
+ if (functionName === "ask_user" || functionName === "ask-user") {
3487
+ enhancedMessage = enhancedMessage.replace(match, "");
3488
+ clearFlushTimer();
3489
+ const askPreamble = stripToolBlocks(fullMessage).trim();
3490
+ setStreamBuffer(askPreamble || "_Waiting for your answer\u2026_");
3491
+ const questions = parseAskUserQuestions(
3492
+ parsedParams.questions ?? parsedParams
3493
+ );
3494
+ if (questions.length === 0) {
3495
+ summarizableResults.push({
3496
+ name: functionName,
3497
+ output: "ask_user failed: `questions` must be a JSON array of {question, options} objects. Ask the user in plain text instead."
3498
+ });
3499
+ continue;
3500
+ }
3501
+ telemetryEvent("tool_loop:ask_user", { count: questions.length });
3502
+ const answers = await useAskUserStore.getState().ask(questions);
3503
+ const answerText = answers ? "The user answered:\n\n" + questions.map((q) => `Q: ${q.question}
3504
+ A: ${(answers[q.id] || "").trim() || "(no answer)"}`).join("\n\n") : "The user dismissed the question(s) without answering. Proceed with your best judgment; do not immediately re-ask.";
3505
+ summarizableResults.push({ name: functionName, output: answerText });
3506
+ continue;
3507
+ }
3317
3508
  const placeholderToken = `<<TOOL_LOADING_${functionName}_${Math.random().toString(36).slice(2)}>>`;
3318
3509
  enhancedMessage = enhancedMessage.replace(match, placeholderToken);
3319
3510
  clearFlushTimer();
@@ -3378,6 +3569,17 @@ _${toolStatus}_` : `_${toolStatus}_`);
3378
3569
 
3379
3570
  ${revisedPrompt ? `Prompt refinement: \u201C${revisedPrompt}\u201D
3380
3571
  ` : ""}Note: the image link may expire in ~2 hours.` : "Image generated successfully.";
3572
+ } else if (functionName === "create_file" || functionName === "create-file") {
3573
+ const fileData = result.data ?? {};
3574
+ if (fileData.url) {
3575
+ const mins = fileData.expiresInMinutes ?? 60;
3576
+ const name = fileData.filename || "your file";
3577
+ resultText = `\u{1F4C4} **[${name}](${fileData.url})** \u2014 ready to download.
3578
+
3579
+ _This link is temporary and expires in about ${mins} minutes._`;
3580
+ } else {
3581
+ resultText = "The file was created.";
3582
+ }
3381
3583
  } else if (typeof result.data === "string") {
3382
3584
  resultText = result.data;
3383
3585
  } else if (result.data) {
@@ -3392,7 +3594,7 @@ ${revisedPrompt ? `Prompt refinement: \u201C${revisedPrompt}\u201D
3392
3594
  }
3393
3595
  enhancedMessage = enhancedMessage.replace(placeholderToken, resultText);
3394
3596
  if (result.success) {
3395
- if (functionName === "image_generation" || functionName === "image-generation") {
3597
+ if (functionName === "image_generation" || functionName === "image-generation" || functionName === "create_file" || functionName === "create-file") {
3396
3598
  inlineImageBlocks.push(resultText);
3397
3599
  } else if (functionName !== "check_gateway_health") {
3398
3600
  summarizableResults.push({ name: functionName, output: resultText });
@@ -3629,7 +3831,7 @@ ${inlineImageBlocks.join("\n\n")}` : "");
3629
3831
  };
3630
3832
 
3631
3833
  // src/hooks/useAutoScroll.ts
3632
- import { useRef as useRef4, useEffect as useEffect4, useCallback as useCallback2 } from "react";
3834
+ import { useRef as useRef4, useEffect as useEffect5, useCallback as useCallback2 } from "react";
3633
3835
  var SCROLL_STATE_CHANGED_EVENT = "scrollStateChanged";
3634
3836
  var useAutoScroll = (options = {}) => {
3635
3837
  const {
@@ -3715,7 +3917,7 @@ var useAutoScroll = (options = {}) => {
3715
3917
  }
3716
3918
  }, [enabled, isNearBottom, scrollToBottom]);
3717
3919
  const containerElement = containerRef.current;
3718
- useEffect4(() => {
3920
+ useEffect5(() => {
3719
3921
  if (!containerElement) return;
3720
3922
  const handleScroll = () => {
3721
3923
  const currentlyNearBottom = isNearBottom();
@@ -3725,7 +3927,7 @@ var useAutoScroll = (options = {}) => {
3725
3927
  containerElement.addEventListener("scroll", handleScroll, { passive: true });
3726
3928
  return () => containerElement.removeEventListener("scroll", handleScroll);
3727
3929
  }, [containerElement, isNearBottom]);
3728
- useEffect4(() => {
3930
+ useEffect5(() => {
3729
3931
  autoScrollIfNeeded();
3730
3932
  });
3731
3933
  const getScrollState = useCallback2(() => {
@@ -3764,9 +3966,9 @@ var useAutoScroll = (options = {}) => {
3764
3966
  };
3765
3967
 
3766
3968
  // src/hooks/useNetworkStatus.ts
3767
- import { useState as useState5, useEffect as useEffect5, useCallback as useCallback3 } from "react";
3969
+ import { useState as useState6, useEffect as useEffect6, useCallback as useCallback3 } from "react";
3768
3970
  var useNetworkStatus = () => {
3769
- const [networkStatus, setNetworkStatus] = useState5({
3971
+ const [networkStatus, setNetworkStatus] = useState6({
3770
3972
  isOnline: navigator.onLine,
3771
3973
  isSlowConnection: false,
3772
3974
  connectionQuality: "fast",
@@ -3786,7 +3988,7 @@ var useNetworkStatus = () => {
3786
3988
  connectionQuality: !navigator.onLine ? "offline" : isSlowConnection ? "slow" : "fast"
3787
3989
  }));
3788
3990
  }, []);
3789
- useEffect5(() => {
3991
+ useEffect6(() => {
3790
3992
  const handleOnline = () => {
3791
3993
  setNetworkStatus((prev) => ({
3792
3994
  ...prev,
@@ -3808,7 +4010,7 @@ var useNetworkStatus = () => {
3808
4010
  window.removeEventListener("offline", handleOffline);
3809
4011
  };
3810
4012
  }, []);
3811
- useEffect5(() => {
4013
+ useEffect6(() => {
3812
4014
  const { connection } = navigator;
3813
4015
  if (connection) {
3814
4016
  const updateConnectionInfo = () => {
@@ -3845,33 +4047,33 @@ var useNetworkStatus = () => {
3845
4047
 
3846
4048
  // src/chat/chat-app-bar.tsx
3847
4049
  import { Avatar as Avatar8 } from "@mui/material";
3848
- import { useEffect as useEffect11, useRef as useRef10, useState as useState12 } from "react";
4050
+ import { useEffect as useEffect12, useRef as useRef10, useState as useState13 } from "react";
3849
4051
  import {
3850
- Box as Box10,
4052
+ Box as Box11,
3851
4053
  IconButton as IconButton9,
3852
4054
  Menu as Menu5,
3853
4055
  MenuItem as MenuItem5,
3854
4056
  Tooltip as Tooltip4,
3855
4057
  useMediaQuery as useMediaQuery5,
3856
- useTheme as useTheme11,
4058
+ useTheme as useTheme12,
3857
4059
  Dialog as Dialog5,
3858
4060
  DialogTitle as DialogTitle5,
3859
4061
  DialogContent as DialogContent5,
3860
4062
  DialogActions as DialogActions5,
3861
- Typography as Typography8,
3862
- Button as Button6
4063
+ Typography as Typography9,
4064
+ Button as Button7
3863
4065
  } from "@mui/material";
3864
4066
  import { useNavigate } from "react-router-dom";
3865
4067
 
3866
4068
  // src/chat/conversation-drawer.tsx
3867
- import { useState as useState10, useMemo, useEffect as useEffect9, useRef as useRef8, useCallback as useCallback4 } from "react";
4069
+ import { useState as useState11, useMemo, useEffect as useEffect10, useRef as useRef8, useCallback as useCallback4 } from "react";
3868
4070
  import {
3869
4071
  Drawer,
3870
- Box as Box8,
3871
- Typography as Typography6,
4072
+ Box as Box9,
4073
+ Typography as Typography7,
3872
4074
  IconButton as IconButton7,
3873
4075
  Tooltip as Tooltip3,
3874
- TextField as TextField5,
4076
+ TextField as TextField6,
3875
4077
  InputAdornment,
3876
4078
  useMediaQuery as useMediaQuery4,
3877
4079
  Collapse as Collapse2,
@@ -3884,26 +4086,26 @@ import {
3884
4086
  DialogTitle as DialogTitle3,
3885
4087
  DialogContent as DialogContent3,
3886
4088
  DialogActions as DialogActions3,
3887
- Button as Button4,
4089
+ Button as Button5,
3888
4090
  Avatar as Avatar6,
3889
- alpha as alpha5
4091
+ alpha as alpha6
3890
4092
  } from "@mui/material";
3891
4093
  import { X as CloseIcon4, X as ClearIcon, Search as SearchIcon, Folder as FolderIcon4, MoreVertical as MoreVertIcon3, Trash2 as DeleteSweepIcon, Inbox as InboxIcon3, Plus as AddIcon4 } from "lucide-react";
3892
- import { useTheme as useTheme9 } from "@mui/material/styles";
4094
+ import { useTheme as useTheme10 } from "@mui/material/styles";
3893
4095
 
3894
4096
  // src/chat/project-management-modal.tsx
3895
- import { useState as useState6, useEffect as useEffect6, useRef as useRef5 } from "react";
4097
+ import { useState as useState7, useEffect as useEffect7, useRef as useRef5 } from "react";
3896
4098
  import {
3897
4099
  Modal,
3898
- Button,
3899
- TextField as TextField2,
4100
+ Button as Button2,
4101
+ TextField as TextField3,
3900
4102
  List,
3901
4103
  ListItem,
3902
4104
  IconButton as IconButton4,
3903
- Box as Box4,
3904
- Typography as Typography2,
4105
+ Box as Box5,
4106
+ Typography as Typography3,
3905
4107
  Avatar as Avatar3,
3906
- Chip,
4108
+ Chip as Chip2,
3907
4109
  Menu,
3908
4110
  MenuItem,
3909
4111
  Alert,
@@ -3912,8 +4114,8 @@ import {
3912
4114
  useMediaQuery as useMediaQuery2
3913
4115
  } from "@mui/material";
3914
4116
  import { Plus as AddIcon2, Pencil as EditIcon, Trash2 as DeleteIcon, MoreVertical as MoreVertIcon, Folder as FolderIcon, X as CloseIcon2, ArrowLeft as ArrowBackIcon } from "lucide-react";
3915
- import { useTheme as useTheme5, alpha as alpha2 } from "@mui/material/styles";
3916
- import { Fragment as Fragment4, jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
4117
+ import { useTheme as useTheme6, alpha as alpha3 } from "@mui/material/styles";
4118
+ import { Fragment as Fragment4, jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
3917
4119
  var DEFAULT_COLORS = [
3918
4120
  "#2196F3",
3919
4121
  "#4CAF50",
@@ -3930,7 +4132,7 @@ var ProjectManagementModal = ({
3930
4132
  open,
3931
4133
  onClose
3932
4134
  }) => {
3933
- const theme = useTheme5();
4135
+ const theme = useTheme6();
3934
4136
  const isMobile = useMediaQuery2(theme.breakpoints.down("sm"));
3935
4137
  const {
3936
4138
  projects,
@@ -3942,24 +4144,24 @@ var ProjectManagementModal = ({
3942
4144
  hydrate
3943
4145
  } = useProjectStore();
3944
4146
  const { getConversationsByProject } = useConversationStore();
3945
- const [showCreateForm, setShowCreateForm] = useState6(false);
3946
- const [editingProject, setEditingProject] = useState6(null);
3947
- const [formData, setFormData] = useState6({
4147
+ const [showCreateForm, setShowCreateForm] = useState7(false);
4148
+ const [editingProject, setEditingProject] = useState7(null);
4149
+ const [formData, setFormData] = useState7({
3948
4150
  name: "",
3949
4151
  description: "",
3950
4152
  color: DEFAULT_COLORS[0]
3951
4153
  });
3952
- const [menuAnchor, setMenuAnchor] = useState6(null);
3953
- const [selectedProject, setSelectedProject] = useState6(null);
3954
- const [loading, setLoading] = useState6(false);
3955
- const [error, setError] = useState6(null);
4154
+ const [menuAnchor, setMenuAnchor] = useState7(null);
4155
+ const [selectedProject, setSelectedProject] = useState7(null);
4156
+ const [loading, setLoading] = useState7(false);
4157
+ const [error, setError] = useState7(null);
3956
4158
  const modalContainerRef = useRef5(null);
3957
- useEffect6(() => {
4159
+ useEffect7(() => {
3958
4160
  if (open && !_hasHydrated) {
3959
4161
  hydrate();
3960
4162
  }
3961
4163
  }, [open, _hasHydrated, hydrate]);
3962
- useEffect6(() => {
4164
+ useEffect7(() => {
3963
4165
  if (!open) {
3964
4166
  setMenuAnchor(null);
3965
4167
  setSelectedProject(null);
@@ -4056,13 +4258,13 @@ var ProjectManagementModal = ({
4056
4258
  const chatPalette = theme.palette.chat ?? {};
4057
4259
  const overlayZIndex = (theme.zIndex?.modal ?? 1300) + 20;
4058
4260
  const surfaceColor = isMobile ? theme.palette.background.paper : chatPalette.shell ?? theme.palette.background.paper;
4059
- const borderColor = chatPalette.appBar?.border ?? alpha2(theme.palette.divider, 0.12);
4060
- const subtleSurface = theme.palette.mode === "dark" ? alpha2(theme.palette.common.white, 0.04) : alpha2(theme.palette.common.black, 0.03);
4061
- const hoverSurface = alpha2(theme.palette.primary.main, theme.palette.mode === "dark" ? 0.22 : 0.08);
4261
+ const borderColor = chatPalette.appBar?.border ?? alpha3(theme.palette.divider, 0.12);
4262
+ const subtleSurface = theme.palette.mode === "dark" ? alpha3(theme.palette.common.white, 0.04) : alpha3(theme.palette.common.black, 0.03);
4263
+ const hoverSurface = alpha3(theme.palette.primary.main, theme.palette.mode === "dark" ? 0.22 : 0.08);
4062
4264
  const headerTitle = showCreateForm ? editingProject ? "Edit Project" : "Create Project" : "Manage Projects";
4063
4265
  const headerSubtitle = showCreateForm ? "Name, describe, and color-code your project." : "Organize conversations into cohesive projects.";
4064
- const content = /* @__PURE__ */ jsxs4(
4065
- Box4,
4266
+ const content = /* @__PURE__ */ jsxs5(
4267
+ Box5,
4066
4268
  {
4067
4269
  ref: modalContainerRef,
4068
4270
  sx: {
@@ -4073,29 +4275,29 @@ var ProjectManagementModal = ({
4073
4275
  bgcolor: surfaceColor,
4074
4276
  borderRadius: isMobile ? "22px 22px 0 0" : 3,
4075
4277
  overflow: "hidden",
4076
- boxShadow: isMobile ? "none" : `0 20px 60px ${alpha2(theme.palette.common.black, 0.32)}`,
4077
- border: isMobile ? "none" : `1px solid ${alpha2(theme.palette.divider, 0.18)}`,
4278
+ boxShadow: isMobile ? "none" : `0 20px 60px ${alpha3(theme.palette.common.black, 0.32)}`,
4279
+ border: isMobile ? "none" : `1px solid ${alpha3(theme.palette.divider, 0.18)}`,
4078
4280
  display: "flex",
4079
4281
  flexDirection: "column",
4080
4282
  position: "relative"
4081
4283
  },
4082
4284
  children: [
4083
- isMobile && /* @__PURE__ */ jsx7(
4084
- Box4,
4285
+ isMobile && /* @__PURE__ */ jsx8(
4286
+ Box5,
4085
4287
  {
4086
4288
  sx: {
4087
4289
  width: 56,
4088
4290
  height: 6,
4089
4291
  borderRadius: 999,
4090
- bgcolor: alpha2(theme.palette.text.primary, 0.18),
4292
+ bgcolor: alpha3(theme.palette.text.primary, 0.18),
4091
4293
  alignSelf: "center",
4092
4294
  mt: 1.25,
4093
4295
  mb: 0.75
4094
4296
  }
4095
4297
  }
4096
4298
  ),
4097
- /* @__PURE__ */ jsxs4(
4098
- Box4,
4299
+ /* @__PURE__ */ jsxs5(
4300
+ Box5,
4099
4301
  {
4100
4302
  sx: {
4101
4303
  px: isMobile ? 1.5 : 2.75,
@@ -4107,8 +4309,8 @@ var ProjectManagementModal = ({
4107
4309
  gap: 1
4108
4310
  },
4109
4311
  children: [
4110
- /* @__PURE__ */ jsxs4(
4111
- Box4,
4312
+ /* @__PURE__ */ jsxs5(
4313
+ Box5,
4112
4314
  {
4113
4315
  sx: {
4114
4316
  display: "flex",
@@ -4117,8 +4319,8 @@ var ProjectManagementModal = ({
4117
4319
  gap: 1
4118
4320
  },
4119
4321
  children: [
4120
- /* @__PURE__ */ jsxs4(
4121
- Box4,
4322
+ /* @__PURE__ */ jsxs5(
4323
+ Box5,
4122
4324
  {
4123
4325
  sx: {
4124
4326
  display: "flex",
@@ -4128,9 +4330,9 @@ var ProjectManagementModal = ({
4128
4330
  flex: 1
4129
4331
  },
4130
4332
  children: [
4131
- showCreateForm && /* @__PURE__ */ jsx7(IconButton4, { onClick: resetForm, size: "small", sx: { mr: 0.5 }, children: /* @__PURE__ */ jsx7(ArrowBackIcon, { size: 16 }) }),
4132
- /* @__PURE__ */ jsx7(
4133
- Typography2,
4333
+ showCreateForm && /* @__PURE__ */ jsx8(IconButton4, { onClick: resetForm, size: "small", sx: { mr: 0.5 }, children: /* @__PURE__ */ jsx8(ArrowBackIcon, { size: 16 }) }),
4334
+ /* @__PURE__ */ jsx8(
4335
+ Typography3,
4134
4336
  {
4135
4337
  variant: "h6",
4136
4338
  sx: {
@@ -4146,16 +4348,16 @@ var ProjectManagementModal = ({
4146
4348
  ]
4147
4349
  }
4148
4350
  ),
4149
- /* @__PURE__ */ jsx7(IconButton4, { onClick: handleClose, size: "small", children: /* @__PURE__ */ jsx7(CloseIcon2, {}) })
4351
+ /* @__PURE__ */ jsx8(IconButton4, { onClick: handleClose, size: "small", children: /* @__PURE__ */ jsx8(CloseIcon2, {}) })
4150
4352
  ]
4151
4353
  }
4152
4354
  ),
4153
- /* @__PURE__ */ jsx7(Typography2, { variant: "body2", color: "text.secondary", children: headerSubtitle })
4355
+ /* @__PURE__ */ jsx8(Typography3, { variant: "body2", color: "text.secondary", children: headerSubtitle })
4154
4356
  ]
4155
4357
  }
4156
4358
  ),
4157
- /* @__PURE__ */ jsxs4(
4158
- Box4,
4359
+ /* @__PURE__ */ jsxs5(
4360
+ Box5,
4159
4361
  {
4160
4362
  sx: {
4161
4363
  flex: 1,
@@ -4167,10 +4369,10 @@ var ProjectManagementModal = ({
4167
4369
  gap: 2.5
4168
4370
  },
4169
4371
  children: [
4170
- error && /* @__PURE__ */ jsx7(Alert, { severity: "error", onClose: () => setError(null), children: error }),
4171
- showCreateForm ? /* @__PURE__ */ jsxs4(Box4, { sx: { display: "flex", flexDirection: "column", gap: 2 }, children: [
4172
- /* @__PURE__ */ jsx7(
4173
- TextField2,
4372
+ error && /* @__PURE__ */ jsx8(Alert, { severity: "error", onClose: () => setError(null), children: error }),
4373
+ showCreateForm ? /* @__PURE__ */ jsxs5(Box5, { sx: { display: "flex", flexDirection: "column", gap: 2 }, children: [
4374
+ /* @__PURE__ */ jsx8(
4375
+ TextField3,
4174
4376
  {
4175
4377
  label: "Project name",
4176
4378
  value: formData.name,
@@ -4181,8 +4383,8 @@ var ProjectManagementModal = ({
4181
4383
  autoFocus: true
4182
4384
  }
4183
4385
  ),
4184
- /* @__PURE__ */ jsx7(
4185
- TextField2,
4386
+ /* @__PURE__ */ jsx8(
4387
+ TextField3,
4186
4388
  {
4187
4389
  label: "Description (optional)",
4188
4390
  value: formData.description,
@@ -4193,10 +4395,10 @@ var ProjectManagementModal = ({
4193
4395
  disabled: loading
4194
4396
  }
4195
4397
  ),
4196
- /* @__PURE__ */ jsxs4(Box4, { children: [
4197
- /* @__PURE__ */ jsx7(Typography2, { variant: "subtitle2", sx: { mb: 1 }, children: "Color" }),
4198
- /* @__PURE__ */ jsx7(Box4, { sx: { display: "flex", flexWrap: "wrap", gap: 1 }, children: DEFAULT_COLORS.map((color) => /* @__PURE__ */ jsx7(
4199
- Box4,
4398
+ /* @__PURE__ */ jsxs5(Box5, { children: [
4399
+ /* @__PURE__ */ jsx8(Typography3, { variant: "subtitle2", sx: { mb: 1 }, children: "Color" }),
4400
+ /* @__PURE__ */ jsx8(Box5, { sx: { display: "flex", flexWrap: "wrap", gap: 1 }, children: DEFAULT_COLORS.map((color) => /* @__PURE__ */ jsx8(
4401
+ Box5,
4200
4402
  {
4201
4403
  sx: {
4202
4404
  width: 32,
@@ -4216,11 +4418,11 @@ var ProjectManagementModal = ({
4216
4418
  color
4217
4419
  )) })
4218
4420
  ] })
4219
- ] }) : /* @__PURE__ */ jsxs4(Box4, { sx: { display: "flex", flexDirection: "column", gap: 2 }, children: [
4220
- /* @__PURE__ */ jsx7(
4221
- Button,
4421
+ ] }) : /* @__PURE__ */ jsxs5(Box5, { sx: { display: "flex", flexDirection: "column", gap: 2 }, children: [
4422
+ /* @__PURE__ */ jsx8(
4423
+ Button2,
4222
4424
  {
4223
- startIcon: /* @__PURE__ */ jsx7(AddIcon2, {}),
4425
+ startIcon: /* @__PURE__ */ jsx8(AddIcon2, {}),
4224
4426
  onClick: () => setShowCreateForm(true),
4225
4427
  variant: "contained",
4226
4428
  sx: {
@@ -4232,8 +4434,8 @@ var ProjectManagementModal = ({
4232
4434
  children: "Create project"
4233
4435
  }
4234
4436
  ),
4235
- projects.length === 0 ? /* @__PURE__ */ jsxs4(
4236
- Box4,
4437
+ projects.length === 0 ? /* @__PURE__ */ jsxs5(
4438
+ Box5,
4237
4439
  {
4238
4440
  sx: {
4239
4441
  textAlign: "center",
@@ -4241,19 +4443,19 @@ var ProjectManagementModal = ({
4241
4443
  px: 2,
4242
4444
  color: theme.palette.text.secondary,
4243
4445
  borderRadius: 2,
4244
- border: `1px dashed ${alpha2(theme.palette.divider, 0.4)}`,
4446
+ border: `1px dashed ${alpha3(theme.palette.divider, 0.4)}`,
4245
4447
  backgroundColor: subtleSurface
4246
4448
  },
4247
4449
  children: [
4248
- /* @__PURE__ */ jsx7(FolderIcon, { size: 48, style: { marginBottom: 8, opacity: 0.5 } }),
4249
- /* @__PURE__ */ jsx7(Typography2, { variant: "body1", sx: { fontWeight: 600 }, children: "No projects yet" }),
4250
- /* @__PURE__ */ jsx7(Typography2, { variant: "body2", children: "Create your first project to organize conversations." })
4450
+ /* @__PURE__ */ jsx8(FolderIcon, { size: 48, style: { marginBottom: 8, opacity: 0.5 } }),
4451
+ /* @__PURE__ */ jsx8(Typography3, { variant: "body1", sx: { fontWeight: 600 }, children: "No projects yet" }),
4452
+ /* @__PURE__ */ jsx8(Typography3, { variant: "body2", children: "Create your first project to organize conversations." })
4251
4453
  ]
4252
4454
  }
4253
- ) : /* @__PURE__ */ jsx7(List, { sx: { display: "flex", flexDirection: "column", gap: 1.25, py: 0 }, children: projects.map((project) => {
4455
+ ) : /* @__PURE__ */ jsx8(List, { sx: { display: "flex", flexDirection: "column", gap: 1.25, py: 0 }, children: projects.map((project) => {
4254
4456
  const conversationCount = getConversationsByProject(project.id).length;
4255
- return /* @__PURE__ */ jsx7(ListItem, { disablePadding: true, children: /* @__PURE__ */ jsxs4(
4256
- Box4,
4457
+ return /* @__PURE__ */ jsx8(ListItem, { disablePadding: true, children: /* @__PURE__ */ jsxs5(
4458
+ Box5,
4257
4459
  {
4258
4460
  sx: {
4259
4461
  display: "flex",
@@ -4271,7 +4473,7 @@ var ProjectManagementModal = ({
4271
4473
  }
4272
4474
  },
4273
4475
  children: [
4274
- /* @__PURE__ */ jsx7(
4476
+ /* @__PURE__ */ jsx8(
4275
4477
  Avatar3,
4276
4478
  {
4277
4479
  sx: {
@@ -4280,21 +4482,21 @@ var ProjectManagementModal = ({
4280
4482
  height: 36,
4281
4483
  fontSize: "1rem"
4282
4484
  },
4283
- children: /* @__PURE__ */ jsx7(FolderIcon, { size: 16 })
4485
+ children: /* @__PURE__ */ jsx8(FolderIcon, { size: 16 })
4284
4486
  }
4285
4487
  ),
4286
- /* @__PURE__ */ jsxs4(Box4, { sx: { flex: 1, minWidth: 0 }, children: [
4287
- /* @__PURE__ */ jsxs4(Box4, { sx: { display: "flex", alignItems: "center", gap: 1, flexWrap: "wrap" }, children: [
4288
- /* @__PURE__ */ jsx7(
4289
- Typography2,
4488
+ /* @__PURE__ */ jsxs5(Box5, { sx: { flex: 1, minWidth: 0 }, children: [
4489
+ /* @__PURE__ */ jsxs5(Box5, { sx: { display: "flex", alignItems: "center", gap: 1, flexWrap: "wrap" }, children: [
4490
+ /* @__PURE__ */ jsx8(
4491
+ Typography3,
4290
4492
  {
4291
4493
  variant: "subtitle1",
4292
4494
  sx: { fontWeight: 600, overflow: "hidden", textOverflow: "ellipsis" },
4293
4495
  children: project.name
4294
4496
  }
4295
4497
  ),
4296
- /* @__PURE__ */ jsx7(
4297
- Chip,
4498
+ /* @__PURE__ */ jsx8(
4499
+ Chip2,
4298
4500
  {
4299
4501
  label: `${conversationCount}`,
4300
4502
  size: "small",
@@ -4302,14 +4504,14 @@ var ProjectManagementModal = ({
4302
4504
  height: 22,
4303
4505
  borderRadius: 999,
4304
4506
  fontWeight: 600,
4305
- bgcolor: alpha2(theme.palette.text.primary, 0.08),
4507
+ bgcolor: alpha3(theme.palette.text.primary, 0.08),
4306
4508
  color: theme.palette.text.primary
4307
4509
  }
4308
4510
  }
4309
4511
  )
4310
4512
  ] }),
4311
- project.description && /* @__PURE__ */ jsx7(
4312
- Typography2,
4513
+ project.description && /* @__PURE__ */ jsx8(
4514
+ Typography3,
4313
4515
  {
4314
4516
  variant: "body2",
4315
4517
  color: "text.secondary",
@@ -4318,7 +4520,7 @@ var ProjectManagementModal = ({
4318
4520
  }
4319
4521
  )
4320
4522
  ] }),
4321
- /* @__PURE__ */ jsx7(
4523
+ /* @__PURE__ */ jsx8(
4322
4524
  IconButton4,
4323
4525
  {
4324
4526
  onClick: (e) => {
@@ -4331,7 +4533,7 @@ var ProjectManagementModal = ({
4331
4533
  mt: 0.25,
4332
4534
  zIndex: 1
4333
4535
  },
4334
- children: /* @__PURE__ */ jsx7(MoreVertIcon, { size: 16 })
4536
+ children: /* @__PURE__ */ jsx8(MoreVertIcon, { size: 16 })
4335
4537
  }
4336
4538
  )
4337
4539
  ]
@@ -4342,8 +4544,8 @@ var ProjectManagementModal = ({
4342
4544
  ]
4343
4545
  }
4344
4546
  ),
4345
- /* @__PURE__ */ jsx7(
4346
- Box4,
4547
+ /* @__PURE__ */ jsx8(
4548
+ Box5,
4347
4549
  {
4348
4550
  sx: {
4349
4551
  px: isMobile ? 1.5 : 2.75,
@@ -4353,9 +4555,9 @@ var ProjectManagementModal = ({
4353
4555
  justifyContent: "flex-end",
4354
4556
  gap: 1
4355
4557
  },
4356
- children: showCreateForm ? /* @__PURE__ */ jsxs4(Fragment4, { children: [
4357
- /* @__PURE__ */ jsx7(
4358
- Button,
4558
+ children: showCreateForm ? /* @__PURE__ */ jsxs5(Fragment4, { children: [
4559
+ /* @__PURE__ */ jsx8(
4560
+ Button2,
4359
4561
  {
4360
4562
  onClick: resetForm,
4361
4563
  disabled: loading,
@@ -4363,21 +4565,21 @@ var ProjectManagementModal = ({
4363
4565
  children: "Cancel"
4364
4566
  }
4365
4567
  ),
4366
- /* @__PURE__ */ jsx7(
4367
- Button,
4568
+ /* @__PURE__ */ jsx8(
4569
+ Button2,
4368
4570
  {
4369
4571
  onClick: editingProject ? handleEditProject : handleCreateProject,
4370
4572
  variant: "contained",
4371
4573
  disabled: loading,
4372
- startIcon: loading ? /* @__PURE__ */ jsx7(CircularProgress3, { size: 16 }) : void 0,
4574
+ startIcon: loading ? /* @__PURE__ */ jsx8(CircularProgress3, { size: 16 }) : void 0,
4373
4575
  sx: { textTransform: "none", borderRadius: 2 },
4374
4576
  children: editingProject ? "Update project" : "Create project"
4375
4577
  }
4376
4578
  )
4377
- ] }) : /* @__PURE__ */ jsx7(Button, { onClick: handleClose, sx: { textTransform: "none", borderRadius: 2 }, children: "Close" })
4579
+ ] }) : /* @__PURE__ */ jsx8(Button2, { onClick: handleClose, sx: { textTransform: "none", borderRadius: 2 }, children: "Close" })
4378
4580
  }
4379
4581
  ),
4380
- /* @__PURE__ */ jsxs4(
4582
+ /* @__PURE__ */ jsxs5(
4381
4583
  Menu,
4382
4584
  {
4383
4585
  anchorEl: menuAnchor,
@@ -4399,20 +4601,20 @@ var ProjectManagementModal = ({
4399
4601
  }
4400
4602
  },
4401
4603
  children: [
4402
- /* @__PURE__ */ jsx7(
4604
+ /* @__PURE__ */ jsx8(
4403
4605
  MenuItem,
4404
4606
  {
4405
4607
  onClick: () => {
4406
4608
  if (!selectedProject) return;
4407
4609
  startEdit(selectedProject);
4408
4610
  },
4409
- children: /* @__PURE__ */ jsxs4(Box4, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
4410
- /* @__PURE__ */ jsx7(EditIcon, { size: 16 }),
4411
- /* @__PURE__ */ jsx7(Typography2, { variant: "body2", color: "inherit", children: "Edit" })
4611
+ children: /* @__PURE__ */ jsxs5(Box5, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
4612
+ /* @__PURE__ */ jsx8(EditIcon, { size: 16 }),
4613
+ /* @__PURE__ */ jsx8(Typography3, { variant: "body2", color: "inherit", children: "Edit" })
4412
4614
  ] })
4413
4615
  }
4414
4616
  ),
4415
- /* @__PURE__ */ jsx7(
4617
+ /* @__PURE__ */ jsx8(
4416
4618
  MenuItem,
4417
4619
  {
4418
4620
  onClick: () => {
@@ -4420,9 +4622,9 @@ var ProjectManagementModal = ({
4420
4622
  handleDeleteProject(selectedProject);
4421
4623
  },
4422
4624
  sx: { color: theme.palette.error.main },
4423
- children: /* @__PURE__ */ jsxs4(Box4, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
4424
- /* @__PURE__ */ jsx7(DeleteIcon, { size: 16 }),
4425
- /* @__PURE__ */ jsx7(Typography2, { variant: "body2", color: "inherit", children: "Delete" })
4625
+ children: /* @__PURE__ */ jsxs5(Box5, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
4626
+ /* @__PURE__ */ jsx8(DeleteIcon, { size: 16 }),
4627
+ /* @__PURE__ */ jsx8(Typography3, { variant: "body2", color: "inherit", children: "Delete" })
4426
4628
  ] })
4427
4629
  }
4428
4630
  )
@@ -4432,7 +4634,7 @@ var ProjectManagementModal = ({
4432
4634
  ]
4433
4635
  }
4434
4636
  );
4435
- return /* @__PURE__ */ jsx7(Fragment4, { children: isMobile ? /* @__PURE__ */ jsx7(
4637
+ return /* @__PURE__ */ jsx8(Fragment4, { children: isMobile ? /* @__PURE__ */ jsx8(
4436
4638
  SwipeableDrawer,
4437
4639
  {
4438
4640
  anchor: "bottom",
@@ -4452,7 +4654,7 @@ var ProjectManagementModal = ({
4452
4654
  },
4453
4655
  children: content
4454
4656
  }
4455
- ) : /* @__PURE__ */ jsx7(
4657
+ ) : /* @__PURE__ */ jsx8(
4456
4658
  Modal,
4457
4659
  {
4458
4660
  open,
@@ -4471,45 +4673,45 @@ var ProjectManagementModal = ({
4471
4673
  var project_management_modal_default = ProjectManagementModal;
4472
4674
 
4473
4675
  // src/chat/move-conversation-modal.tsx
4474
- import { useState as useState7, useEffect as useEffect7 } from "react";
4676
+ import { useState as useState8, useEffect as useEffect8 } from "react";
4475
4677
  import {
4476
4678
  Dialog,
4477
4679
  DialogTitle,
4478
4680
  DialogContent,
4479
4681
  DialogActions,
4480
- Button as Button2,
4682
+ Button as Button3,
4481
4683
  List as List2,
4482
4684
  ListItem as ListItem2,
4483
4685
  ListItemButton,
4484
4686
  ListItemText,
4485
4687
  ListItemIcon,
4486
- Typography as Typography3,
4688
+ Typography as Typography4,
4487
4689
  Avatar as Avatar4,
4488
4690
  Radio,
4489
- Box as Box5,
4691
+ Box as Box6,
4490
4692
  Divider
4491
4693
  } from "@mui/material";
4492
4694
  import { Folder as FolderIcon2, Inbox as InboxIcon } from "lucide-react";
4493
- import { useTheme as useTheme6 } from "@mui/material/styles";
4494
- import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
4695
+ import { useTheme as useTheme7 } from "@mui/material/styles";
4696
+ import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
4495
4697
  var MoveConversationModal = ({
4496
4698
  open,
4497
4699
  onClose,
4498
4700
  conversations,
4499
4701
  currentProjectId = null
4500
4702
  }) => {
4501
- const theme = useTheme6();
4703
+ const theme = useTheme7();
4502
4704
  const { projects, _hasHydrated, hydrate } = useProjectStore();
4503
4705
  const { moveConversationToProject } = useConversationStore();
4504
- const [selectedProjectId, setSelectedProjectId] = useState7(
4706
+ const [selectedProjectId, setSelectedProjectId] = useState8(
4505
4707
  currentProjectId
4506
4708
  );
4507
- useEffect7(() => {
4709
+ useEffect8(() => {
4508
4710
  if (open && !_hasHydrated) {
4509
4711
  hydrate();
4510
4712
  }
4511
4713
  }, [open, _hasHydrated, hydrate]);
4512
- useEffect7(() => {
4714
+ useEffect8(() => {
4513
4715
  setSelectedProjectId(currentProjectId);
4514
4716
  }, [currentProjectId, open]);
4515
4717
  const handleMove = async () => {
@@ -4528,7 +4730,7 @@ var MoveConversationModal = ({
4528
4730
  };
4529
4731
  const conversationCount = conversations.length;
4530
4732
  const isMultiple = conversationCount > 1;
4531
- return /* @__PURE__ */ jsxs5(
4733
+ return /* @__PURE__ */ jsxs6(
4532
4734
  Dialog,
4533
4735
  {
4534
4736
  open,
@@ -4542,20 +4744,20 @@ var MoveConversationModal = ({
4542
4744
  }
4543
4745
  },
4544
4746
  children: [
4545
- /* @__PURE__ */ jsxs5(DialogTitle, { children: [
4747
+ /* @__PURE__ */ jsxs6(DialogTitle, { children: [
4546
4748
  "Move ",
4547
4749
  isMultiple ? `${conversationCount} Conversations` : "Conversation"
4548
4750
  ] }),
4549
- /* @__PURE__ */ jsxs5(DialogContent, { sx: { px: 3 }, children: [
4550
- /* @__PURE__ */ jsx8(Typography3, { variant: "body2", color: "text.secondary", sx: { mb: 2 }, children: isMultiple ? `Select a project to move ${conversationCount} conversations to:` : `Select a project to move "${conversations[0]?.name}" to:` }),
4551
- /* @__PURE__ */ jsxs5(List2, { children: [
4552
- /* @__PURE__ */ jsx8(ListItem2, { disablePadding: true, children: /* @__PURE__ */ jsxs5(
4751
+ /* @__PURE__ */ jsxs6(DialogContent, { sx: { px: 3 }, children: [
4752
+ /* @__PURE__ */ jsx9(Typography4, { variant: "body2", color: "text.secondary", sx: { mb: 2 }, children: isMultiple ? `Select a project to move ${conversationCount} conversations to:` : `Select a project to move "${conversations[0]?.name}" to:` }),
4753
+ /* @__PURE__ */ jsxs6(List2, { children: [
4754
+ /* @__PURE__ */ jsx9(ListItem2, { disablePadding: true, children: /* @__PURE__ */ jsxs6(
4553
4755
  ListItemButton,
4554
4756
  {
4555
4757
  onClick: () => setSelectedProjectId(null),
4556
4758
  selected: selectedProjectId === null,
4557
4759
  children: [
4558
- /* @__PURE__ */ jsx8(ListItemIcon, { children: /* @__PURE__ */ jsx8(
4760
+ /* @__PURE__ */ jsx9(ListItemIcon, { children: /* @__PURE__ */ jsx9(
4559
4761
  Radio,
4560
4762
  {
4561
4763
  checked: selectedProjectId === null,
@@ -4563,7 +4765,7 @@ var MoveConversationModal = ({
4563
4765
  size: "small"
4564
4766
  }
4565
4767
  ) }),
4566
- /* @__PURE__ */ jsx8(ListItemIcon, { children: /* @__PURE__ */ jsx8(
4768
+ /* @__PURE__ */ jsx9(ListItemIcon, { children: /* @__PURE__ */ jsx9(
4567
4769
  Avatar4,
4568
4770
  {
4569
4771
  sx: {
@@ -4571,10 +4773,10 @@ var MoveConversationModal = ({
4571
4773
  width: 32,
4572
4774
  height: 32
4573
4775
  },
4574
- children: /* @__PURE__ */ jsx8(InboxIcon, {})
4776
+ children: /* @__PURE__ */ jsx9(InboxIcon, {})
4575
4777
  }
4576
4778
  ) }),
4577
- /* @__PURE__ */ jsx8(
4779
+ /* @__PURE__ */ jsx9(
4578
4780
  ListItemText,
4579
4781
  {
4580
4782
  primary: "No Project",
@@ -4584,14 +4786,14 @@ var MoveConversationModal = ({
4584
4786
  ]
4585
4787
  }
4586
4788
  ) }),
4587
- /* @__PURE__ */ jsx8(Divider, { sx: { my: 1 } }),
4588
- projects.map((project) => /* @__PURE__ */ jsx8(ListItem2, { disablePadding: true, children: /* @__PURE__ */ jsxs5(
4789
+ /* @__PURE__ */ jsx9(Divider, { sx: { my: 1 } }),
4790
+ projects.map((project) => /* @__PURE__ */ jsx9(ListItem2, { disablePadding: true, children: /* @__PURE__ */ jsxs6(
4589
4791
  ListItemButton,
4590
4792
  {
4591
4793
  onClick: () => setSelectedProjectId(project.id),
4592
4794
  selected: selectedProjectId === project.id,
4593
4795
  children: [
4594
- /* @__PURE__ */ jsx8(ListItemIcon, { children: /* @__PURE__ */ jsx8(
4796
+ /* @__PURE__ */ jsx9(ListItemIcon, { children: /* @__PURE__ */ jsx9(
4595
4797
  Radio,
4596
4798
  {
4597
4799
  checked: selectedProjectId === project.id,
@@ -4599,7 +4801,7 @@ var MoveConversationModal = ({
4599
4801
  size: "small"
4600
4802
  }
4601
4803
  ) }),
4602
- /* @__PURE__ */ jsx8(ListItemIcon, { children: /* @__PURE__ */ jsx8(
4804
+ /* @__PURE__ */ jsx9(ListItemIcon, { children: /* @__PURE__ */ jsx9(
4603
4805
  Avatar4,
4604
4806
  {
4605
4807
  sx: {
@@ -4607,10 +4809,10 @@ var MoveConversationModal = ({
4607
4809
  width: 32,
4608
4810
  height: 32
4609
4811
  },
4610
- children: /* @__PURE__ */ jsx8(FolderIcon2, {})
4812
+ children: /* @__PURE__ */ jsx9(FolderIcon2, {})
4611
4813
  }
4612
4814
  ) }),
4613
- /* @__PURE__ */ jsx8(
4815
+ /* @__PURE__ */ jsx9(
4614
4816
  ListItemText,
4615
4817
  {
4616
4818
  primary: project.name,
@@ -4620,17 +4822,17 @@ var MoveConversationModal = ({
4620
4822
  ]
4621
4823
  }
4622
4824
  ) }, project.id)),
4623
- projects.length === 0 && /* @__PURE__ */ jsx8(Box5, { sx: {
4825
+ projects.length === 0 && /* @__PURE__ */ jsx9(Box6, { sx: {
4624
4826
  textAlign: "center",
4625
4827
  py: 2,
4626
4828
  color: theme.palette.text.secondary
4627
- }, children: /* @__PURE__ */ jsx8(Typography3, { variant: "body2", children: "No projects available. Create a project first to organize conversations." }) })
4829
+ }, children: /* @__PURE__ */ jsx9(Typography4, { variant: "body2", children: "No projects available. Create a project first to organize conversations." }) })
4628
4830
  ] })
4629
4831
  ] }),
4630
- /* @__PURE__ */ jsxs5(DialogActions, { sx: { px: 3, pb: 2 }, children: [
4631
- /* @__PURE__ */ jsx8(Button2, { onClick: onClose, children: "Cancel" }),
4632
- /* @__PURE__ */ jsxs5(
4633
- Button2,
4832
+ /* @__PURE__ */ jsxs6(DialogActions, { sx: { px: 3, pb: 2 }, children: [
4833
+ /* @__PURE__ */ jsx9(Button3, { onClick: onClose, children: "Cancel" }),
4834
+ /* @__PURE__ */ jsxs6(
4835
+ Button3,
4634
4836
  {
4635
4837
  onClick: handleMove,
4636
4838
  variant: "contained",
@@ -4649,26 +4851,26 @@ var MoveConversationModal = ({
4649
4851
  var move_conversation_modal_default = MoveConversationModal;
4650
4852
 
4651
4853
  // src/chat/simple-conversation-item.tsx
4652
- import { useState as useState8, useRef as useRef6, useEffect as useEffect8 } from "react";
4854
+ import { useState as useState9, useRef as useRef6, useEffect as useEffect9 } from "react";
4653
4855
  import {
4654
- Box as Box6,
4655
- Typography as Typography4,
4856
+ Box as Box7,
4857
+ Typography as Typography5,
4656
4858
  IconButton as IconButton5,
4657
4859
  Menu as Menu2,
4658
4860
  MenuItem as MenuItem2,
4659
4861
  ListItemIcon as ListItemIcon2,
4660
4862
  ListItemText as ListItemText2,
4661
4863
  useMediaQuery as useMediaQuery3,
4662
- TextField as TextField3,
4864
+ TextField as TextField4,
4663
4865
  Dialog as Dialog2,
4664
4866
  DialogTitle as DialogTitle2,
4665
4867
  DialogContent as DialogContent2,
4666
4868
  DialogActions as DialogActions2,
4667
- Button as Button3
4869
+ Button as Button4
4668
4870
  } from "@mui/material";
4669
4871
  import { MoreVertical as MoreVertIcon2, Pencil as EditIcon2, Trash2 as DeleteIcon2, GripVertical as DragIcon, MailOpen as MoveIcon } from "lucide-react";
4670
- import { useTheme as useTheme7, alpha as alpha3 } from "@mui/material/styles";
4671
- import { Fragment as Fragment5, jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
4872
+ import { useTheme as useTheme8, alpha as alpha4 } from "@mui/material/styles";
4873
+ import { Fragment as Fragment5, jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
4672
4874
  var SimpleConversationItem = ({
4673
4875
  conversation,
4674
4876
  isSelected,
@@ -4684,14 +4886,14 @@ var SimpleConversationItem = ({
4684
4886
  onTouchDragEnd,
4685
4887
  isTouchDragActive
4686
4888
  }) => {
4687
- const theme = useTheme7();
4889
+ const theme = useTheme8();
4688
4890
  const isMobile = useMediaQuery3(theme.breakpoints.down("sm"));
4689
- const [anchorEl, setAnchorEl] = useState8(null);
4690
- const [isEditing, setIsEditing] = useState8(false);
4691
- const [editName, setEditName] = useState8(conversation.name);
4692
- const [isDragging, setIsDragging] = useState8(false);
4693
- const [isTouchDragging, setIsTouchDragging] = useState8(false);
4694
- const [showRenameDialog, setShowRenameDialog] = useState8(false);
4891
+ const [anchorEl, setAnchorEl] = useState9(null);
4892
+ const [isEditing, setIsEditing] = useState9(false);
4893
+ const [editName, setEditName] = useState9(conversation.name);
4894
+ const [isDragging, setIsDragging] = useState9(false);
4895
+ const [isTouchDragging, setIsTouchDragging] = useState9(false);
4896
+ const [showRenameDialog, setShowRenameDialog] = useState9(false);
4695
4897
  const longPressTimeoutRef = useRef6(null);
4696
4898
  const touchStartPointRef = useRef6(null);
4697
4899
  const activeTouchIdRef = useRef6(null);
@@ -4703,12 +4905,12 @@ var SimpleConversationItem = ({
4703
4905
  const regex = new RegExp(`(${query.trim()})`, "gi");
4704
4906
  const parts = text.split(regex);
4705
4907
  return parts.map(
4706
- (part, index) => regex.test(part) ? /* @__PURE__ */ jsx9(
4707
- Box6,
4908
+ (part, index) => regex.test(part) ? /* @__PURE__ */ jsx10(
4909
+ Box7,
4708
4910
  {
4709
4911
  component: "span",
4710
4912
  sx: {
4711
- bgcolor: alpha3(theme.palette.warning.main, 0.3),
4913
+ bgcolor: alpha4(theme.palette.warning.main, 0.3),
4712
4914
  color: theme.palette.text.primary,
4713
4915
  fontWeight: 600,
4714
4916
  borderRadius: 0.5,
@@ -4834,14 +5036,14 @@ var SimpleConversationItem = ({
4834
5036
  if (!isMobile) return;
4835
5037
  finalizeTouchDrag();
4836
5038
  };
4837
- useEffect8(() => {
5039
+ useEffect9(() => {
4838
5040
  if (!isTouchDragActive && isTouchDragging) {
4839
5041
  setIsTouchDragging(false);
4840
5042
  }
4841
5043
  }, [isTouchDragActive, isTouchDragging]);
4842
- return /* @__PURE__ */ jsxs6(Fragment5, { children: [
4843
- /* @__PURE__ */ jsxs6(
4844
- Box6,
5044
+ return /* @__PURE__ */ jsxs7(Fragment5, { children: [
5045
+ /* @__PURE__ */ jsxs7(
5046
+ Box7,
4845
5047
  {
4846
5048
  "data-project-id": conversation.projectId ?? "__ungrouped",
4847
5049
  draggable: !isMobile && !isEditing,
@@ -4868,17 +5070,17 @@ var SimpleConversationItem = ({
4868
5070
  mx: 1,
4869
5071
  borderRadius: 1,
4870
5072
  cursor: isEditing || isTouchDragging ? "default" : "pointer",
4871
- bgcolor: isSelected ? alpha3(projectColor || theme.palette.primary.main, 0.15) : "transparent",
4872
- border: isSelected ? `1px solid ${alpha3(projectColor || theme.palette.primary.main, 0.3)}` : "1px solid transparent",
5073
+ bgcolor: isSelected ? alpha4(projectColor || theme.palette.primary.main, 0.15) : "transparent",
5074
+ border: isSelected ? `1px solid ${alpha4(projectColor || theme.palette.primary.main, 0.3)}` : "1px solid transparent",
4873
5075
  opacity: isDragging || isTouchDragActive ? 0.55 : 1,
4874
5076
  transition: "all 0.2s ease",
4875
5077
  transform: isTouchDragActive ? "scale(0.98)" : "none",
4876
- boxShadow: isTouchDragActive ? `0 12px 24px ${alpha3(theme.palette.common.black, 0.25)}` : void 0,
5078
+ boxShadow: isTouchDragActive ? `0 12px 24px ${alpha4(theme.palette.common.black, 0.25)}` : void 0,
4877
5079
  touchAction: isTouchDragActive ? "none" : void 0,
4878
5080
  userSelect: isTouchDragging || isTouchDragActive ? "none" : void 0,
4879
5081
  WebkitUserSelect: isTouchDragging || isTouchDragActive ? "none" : void 0,
4880
5082
  "&:hover": !isEditing && !isTouchDragging ? {
4881
- bgcolor: alpha3(theme.palette.text.primary, 0.04)
5083
+ bgcolor: alpha4(theme.palette.text.primary, 0.04)
4882
5084
  } : {},
4883
5085
  // Better touch handling on mobile
4884
5086
  ...isMobile && {
@@ -4888,12 +5090,12 @@ var SimpleConversationItem = ({
4888
5090
  WebkitUserSelect: "none",
4889
5091
  WebkitTouchCallout: "none",
4890
5092
  "&:active": {
4891
- bgcolor: alpha3(theme.palette.text.primary, 0.08)
5093
+ bgcolor: alpha4(theme.palette.text.primary, 0.08)
4892
5094
  }
4893
5095
  }
4894
5096
  },
4895
5097
  children: [
4896
- !isMobile && !isEditing && /* @__PURE__ */ jsx9(
5098
+ !isMobile && !isEditing && /* @__PURE__ */ jsx10(
4897
5099
  DragIcon,
4898
5100
  {
4899
5101
  size: 16,
@@ -4901,9 +5103,9 @@ var SimpleConversationItem = ({
4901
5103
  style: { marginRight: 4, cursor: "grab" }
4902
5104
  }
4903
5105
  ),
4904
- /* @__PURE__ */ jsxs6(Box6, { sx: { flex: 1, minWidth: 0 }, children: [
4905
- isEditing ? /* @__PURE__ */ jsx9(
4906
- TextField3,
5106
+ /* @__PURE__ */ jsxs7(Box7, { sx: { flex: 1, minWidth: 0 }, children: [
5107
+ isEditing ? /* @__PURE__ */ jsx10(
5108
+ TextField4,
4907
5109
  {
4908
5110
  value: editName,
4909
5111
  onChange: (e) => setEditName(e.target.value),
@@ -4925,8 +5127,8 @@ var SimpleConversationItem = ({
4925
5127
  }
4926
5128
  }
4927
5129
  }
4928
- ) : /* @__PURE__ */ jsx9(
4929
- Typography4,
5130
+ ) : /* @__PURE__ */ jsx10(
5131
+ Typography5,
4930
5132
  {
4931
5133
  variant: "body2",
4932
5134
  sx: {
@@ -4940,8 +5142,8 @@ var SimpleConversationItem = ({
4940
5142
  children: highlightText(conversation.name, searchQuery)
4941
5143
  }
4942
5144
  ),
4943
- !isEditing && snippet && /* @__PURE__ */ jsx9(
4944
- Typography4,
5145
+ !isEditing && snippet && /* @__PURE__ */ jsx10(
5146
+ Typography5,
4945
5147
  {
4946
5148
  variant: "caption",
4947
5149
  sx: {
@@ -4949,7 +5151,7 @@ var SimpleConversationItem = ({
4949
5151
  WebkitLineClamp: 2,
4950
5152
  WebkitBoxOrient: "vertical",
4951
5153
  overflow: "hidden",
4952
- color: alpha3(theme.palette.text.secondary, 0.9),
5154
+ color: alpha4(theme.palette.text.secondary, 0.9),
4953
5155
  mt: 0.25,
4954
5156
  lineHeight: 1.3,
4955
5157
  fontSize: "0.72rem"
@@ -4959,7 +5161,7 @@ var SimpleConversationItem = ({
4959
5161
  }
4960
5162
  )
4961
5163
  ] }),
4962
- !isEditing && /* @__PURE__ */ jsx9(
5164
+ !isEditing && /* @__PURE__ */ jsx10(
4963
5165
  IconButton5,
4964
5166
  {
4965
5167
  onClick: handleMenuOpen,
@@ -4988,10 +5190,10 @@ var SimpleConversationItem = ({
4988
5190
  }
4989
5191
  }
4990
5192
  },
4991
- children: /* @__PURE__ */ jsx9(MoreVertIcon2, { size: 16 })
5193
+ children: /* @__PURE__ */ jsx10(MoreVertIcon2, { size: 16 })
4992
5194
  }
4993
5195
  ),
4994
- /* @__PURE__ */ jsxs6(
5196
+ /* @__PURE__ */ jsxs7(
4995
5197
  Menu2,
4996
5198
  {
4997
5199
  anchorEl,
@@ -5018,17 +5220,17 @@ var SimpleConversationItem = ({
5018
5220
  }
5019
5221
  },
5020
5222
  children: [
5021
- onRename && /* @__PURE__ */ jsxs6(MenuItem2, { onClick: handleEdit, children: [
5022
- /* @__PURE__ */ jsx9(ListItemIcon2, { children: /* @__PURE__ */ jsx9(EditIcon2, { size: 16 }) }),
5023
- /* @__PURE__ */ jsx9(ListItemText2, { children: "Rename" })
5223
+ onRename && /* @__PURE__ */ jsxs7(MenuItem2, { onClick: handleEdit, children: [
5224
+ /* @__PURE__ */ jsx10(ListItemIcon2, { children: /* @__PURE__ */ jsx10(EditIcon2, { size: 16 }) }),
5225
+ /* @__PURE__ */ jsx10(ListItemText2, { children: "Rename" })
5024
5226
  ] }),
5025
- onMove && /* @__PURE__ */ jsxs6(MenuItem2, { onClick: handleMove, children: [
5026
- /* @__PURE__ */ jsx9(ListItemIcon2, { children: /* @__PURE__ */ jsx9(MoveIcon, { size: 16 }) }),
5027
- /* @__PURE__ */ jsx9(ListItemText2, { children: "Move to Project" })
5227
+ onMove && /* @__PURE__ */ jsxs7(MenuItem2, { onClick: handleMove, children: [
5228
+ /* @__PURE__ */ jsx10(ListItemIcon2, { children: /* @__PURE__ */ jsx10(MoveIcon, { size: 16 }) }),
5229
+ /* @__PURE__ */ jsx10(ListItemText2, { children: "Move to Project" })
5028
5230
  ] }),
5029
- /* @__PURE__ */ jsxs6(MenuItem2, { onClick: handleDelete, children: [
5030
- /* @__PURE__ */ jsx9(ListItemIcon2, { children: /* @__PURE__ */ jsx9(DeleteIcon2, { size: 16 }) }),
5031
- /* @__PURE__ */ jsx9(ListItemText2, { children: "Delete" })
5231
+ /* @__PURE__ */ jsxs7(MenuItem2, { onClick: handleDelete, children: [
5232
+ /* @__PURE__ */ jsx10(ListItemIcon2, { children: /* @__PURE__ */ jsx10(DeleteIcon2, { size: 16 }) }),
5233
+ /* @__PURE__ */ jsx10(ListItemText2, { children: "Delete" })
5032
5234
  ] })
5033
5235
  ]
5034
5236
  }
@@ -5036,7 +5238,7 @@ var SimpleConversationItem = ({
5036
5238
  ]
5037
5239
  }
5038
5240
  ),
5039
- isMobile && /* @__PURE__ */ jsxs6(
5241
+ isMobile && /* @__PURE__ */ jsxs7(
5040
5242
  Dialog2,
5041
5243
  {
5042
5244
  open: showRenameDialog,
@@ -5052,9 +5254,9 @@ var SimpleConversationItem = ({
5052
5254
  }
5053
5255
  },
5054
5256
  children: [
5055
- /* @__PURE__ */ jsx9(DialogTitle2, { sx: { pb: 1 }, children: "Rename Conversation" }),
5056
- /* @__PURE__ */ jsx9(DialogContent2, { children: /* @__PURE__ */ jsx9(
5057
- TextField3,
5257
+ /* @__PURE__ */ jsx10(DialogTitle2, { sx: { pb: 1 }, children: "Rename Conversation" }),
5258
+ /* @__PURE__ */ jsx10(DialogContent2, { children: /* @__PURE__ */ jsx10(
5259
+ TextField4,
5058
5260
  {
5059
5261
  value: editName,
5060
5262
  onChange: (e) => setEditName(e.target.value),
@@ -5066,9 +5268,9 @@ var SimpleConversationItem = ({
5066
5268
  }
5067
5269
  }
5068
5270
  ) }),
5069
- /* @__PURE__ */ jsxs6(DialogActions2, { sx: { px: 3, pb: 2 }, children: [
5070
- /* @__PURE__ */ jsx9(
5071
- Button3,
5271
+ /* @__PURE__ */ jsxs7(DialogActions2, { sx: { px: 3, pb: 2 }, children: [
5272
+ /* @__PURE__ */ jsx10(
5273
+ Button4,
5072
5274
  {
5073
5275
  onClick: () => {
5074
5276
  setShowRenameDialog(false);
@@ -5077,8 +5279,8 @@ var SimpleConversationItem = ({
5077
5279
  children: "Cancel"
5078
5280
  }
5079
5281
  ),
5080
- /* @__PURE__ */ jsx9(
5081
- Button3,
5282
+ /* @__PURE__ */ jsx10(
5283
+ Button4,
5082
5284
  {
5083
5285
  onClick: () => {
5084
5286
  commitRename();
@@ -5098,20 +5300,20 @@ var SimpleConversationItem = ({
5098
5300
  var simple_conversation_item_default = SimpleConversationItem;
5099
5301
 
5100
5302
  // src/chat/project-header.tsx
5101
- import { useRef as useRef7, useState as useState9 } from "react";
5303
+ import { useRef as useRef7, useState as useState10 } from "react";
5102
5304
  import {
5103
- Box as Box7,
5104
- Typography as Typography5,
5305
+ Box as Box8,
5306
+ Typography as Typography6,
5105
5307
  IconButton as IconButton6,
5106
5308
  Avatar as Avatar5,
5107
- Chip as Chip2,
5309
+ Chip as Chip3,
5108
5310
  Tooltip as Tooltip2,
5109
- TextField as TextField4,
5110
- alpha as alpha4
5311
+ TextField as TextField5,
5312
+ alpha as alpha5
5111
5313
  } from "@mui/material";
5112
5314
  import { ChevronDown as ExpandMoreIcon2, ChevronUp as ExpandLessIcon, Plus as AddIcon3, Folder as FolderIcon3, FolderOpen as FolderOpenIcon, Inbox as InboxIcon2, X as CloseIcon3, Check as CheckIcon2 } from "lucide-react";
5113
- import { useTheme as useTheme8 } from "@mui/material/styles";
5114
- import { jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
5315
+ import { useTheme as useTheme9 } from "@mui/material/styles";
5316
+ import { jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
5115
5317
  var ProjectHeader = ({
5116
5318
  projectId,
5117
5319
  projectName,
@@ -5125,12 +5327,12 @@ var ProjectHeader = ({
5125
5327
  onRenameCancelDelete,
5126
5328
  isTouchTarget
5127
5329
  }) => {
5128
- const theme = useTheme8();
5330
+ const theme = useTheme9();
5129
5331
  const { createNewConversation } = useConversationStore();
5130
5332
  const { renameProject } = useProjectStore();
5131
- const [isHovered, setIsHovered] = useState9(false);
5132
- const [isDragOver, setIsDragOver] = useState9(false);
5133
- const [renameDraft, setRenameDraft] = useState9(projectName);
5333
+ const [isHovered, setIsHovered] = useState10(false);
5334
+ const [isDragOver, setIsDragOver] = useState10(false);
5335
+ const [renameDraft, setRenameDraft] = useState10(projectName);
5134
5336
  const renameActionRef = useRef7("none");
5135
5337
  const isUngrouped = projectId === null;
5136
5338
  const Icon = isCollapsed ? FolderIcon3 : FolderOpenIcon;
@@ -5177,8 +5379,8 @@ var ProjectHeader = ({
5177
5379
  setRenameDraft(projectName);
5178
5380
  onRenameComplete?.();
5179
5381
  };
5180
- return /* @__PURE__ */ jsxs7(
5181
- Box7,
5382
+ return /* @__PURE__ */ jsxs8(
5383
+ Box8,
5182
5384
  {
5183
5385
  "data-project-id": projectId ?? "__ungrouped",
5184
5386
  onMouseEnter: () => setIsHovered(true),
@@ -5194,37 +5396,37 @@ var ProjectHeader = ({
5194
5396
  py: 1.5,
5195
5397
  cursor: isUngrouped ? "default" : "pointer",
5196
5398
  // No pointer cursor for ungrouped
5197
- bgcolor: isDragOver || isTouchTarget ? alpha4(projectColor || theme.palette.primary.main, 0.1) : void 0,
5399
+ bgcolor: isDragOver || isTouchTarget ? alpha5(projectColor || theme.palette.primary.main, 0.1) : void 0,
5198
5400
  border: isDragOver || isTouchTarget ? `2px dashed ${projectColor || theme.palette.primary.main}` : "2px solid transparent",
5199
5401
  borderRadius: isDragOver || isTouchTarget ? 1 : 0,
5200
5402
  transition: "all 0.2s ease",
5201
5403
  "&:hover": !isUngrouped ? {
5202
5404
  // Only show hover for projects, not ungrouped
5203
- bgcolor: alpha4(theme.palette.text.primary, 0.04)
5405
+ bgcolor: alpha5(theme.palette.text.primary, 0.04)
5204
5406
  } : {}
5205
5407
  },
5206
5408
  children: [
5207
- /* @__PURE__ */ jsx10(
5409
+ /* @__PURE__ */ jsx11(
5208
5410
  Avatar5,
5209
5411
  {
5210
5412
  sx: {
5211
- bgcolor: isUngrouped ? alpha4(theme.palette.text.disabled, 0.1) : projectColor || theme.palette.grey[400],
5413
+ bgcolor: isUngrouped ? alpha5(theme.palette.text.disabled, 0.1) : projectColor || theme.palette.grey[400],
5212
5414
  width: 28,
5213
5415
  height: 28,
5214
5416
  mr: 1.5
5215
5417
  },
5216
- children: isUngrouped ? /* @__PURE__ */ jsx10(
5418
+ children: isUngrouped ? /* @__PURE__ */ jsx11(
5217
5419
  InboxIcon2,
5218
5420
  {
5219
5421
  size: 16,
5220
5422
  color: theme.palette.text.disabled,
5221
5423
  style: { opacity: 0.7 }
5222
5424
  }
5223
- ) : /* @__PURE__ */ jsx10(Icon, { size: 16 })
5425
+ ) : /* @__PURE__ */ jsx11(Icon, { size: 16 })
5224
5426
  }
5225
5427
  ),
5226
- isRenaming && !isUngrouped ? /* @__PURE__ */ jsx10(
5227
- TextField4,
5428
+ isRenaming && !isUngrouped ? /* @__PURE__ */ jsx11(
5429
+ TextField5,
5228
5430
  {
5229
5431
  value: renameDraft,
5230
5432
  onChange: (e) => setRenameDraft(e.target.value),
@@ -5270,8 +5472,8 @@ var ProjectHeader = ({
5270
5472
  }
5271
5473
  }
5272
5474
  }
5273
- ) : /* @__PURE__ */ jsxs7(
5274
- Typography5,
5475
+ ) : /* @__PURE__ */ jsxs8(
5476
+ Typography6,
5275
5477
  {
5276
5478
  variant: "subtitle2",
5277
5479
  sx: {
@@ -5283,8 +5485,8 @@ var ProjectHeader = ({
5283
5485
  },
5284
5486
  children: [
5285
5487
  projectName,
5286
- isDragOver && /* @__PURE__ */ jsx10(
5287
- Typography5,
5488
+ isDragOver && /* @__PURE__ */ jsx11(
5489
+ Typography6,
5288
5490
  {
5289
5491
  component: "span",
5290
5492
  variant: "caption",
@@ -5299,13 +5501,13 @@ var ProjectHeader = ({
5299
5501
  ]
5300
5502
  }
5301
5503
  ),
5302
- /* @__PURE__ */ jsx10(
5303
- Chip2,
5504
+ /* @__PURE__ */ jsx11(
5505
+ Chip3,
5304
5506
  {
5305
5507
  label: conversationCount,
5306
5508
  size: "small",
5307
5509
  sx: {
5308
- bgcolor: isUngrouped ? alpha4(theme.palette.text.disabled, 0.1) : alpha4(projectColor || theme.palette.primary.main, 0.15),
5510
+ bgcolor: isUngrouped ? alpha5(theme.palette.text.disabled, 0.1) : alpha5(projectColor || theme.palette.primary.main, 0.15),
5309
5511
  color: isUngrouped ? theme.palette.text.disabled : projectColor || theme.palette.primary.main,
5310
5512
  minWidth: 28,
5311
5513
  height: 22,
@@ -5319,8 +5521,8 @@ var ProjectHeader = ({
5319
5521
  }
5320
5522
  }
5321
5523
  ),
5322
- isRenaming && !isUngrouped && /* @__PURE__ */ jsxs7(Box7, { sx: { display: "flex", alignItems: "center", gap: 0.5, ml: 1 }, children: [
5323
- /* @__PURE__ */ jsx10(Tooltip2, { title: "Cancel and remove", children: /* @__PURE__ */ jsx10(
5524
+ isRenaming && !isUngrouped && /* @__PURE__ */ jsxs8(Box8, { sx: { display: "flex", alignItems: "center", gap: 0.5, ml: 1 }, children: [
5525
+ /* @__PURE__ */ jsx11(Tooltip2, { title: "Cancel and remove", children: /* @__PURE__ */ jsx11(
5324
5526
  IconButton6,
5325
5527
  {
5326
5528
  size: "small",
@@ -5329,11 +5531,11 @@ var ProjectHeader = ({
5329
5531
  renameActionRef.current = "delete";
5330
5532
  onRenameCancelDelete ? onRenameCancelDelete() : cancelRename();
5331
5533
  },
5332
- sx: { color: alpha4(theme.palette.error.main, 0.9) },
5333
- children: /* @__PURE__ */ jsx10(CloseIcon3, { size: 16 })
5534
+ sx: { color: alpha5(theme.palette.error.main, 0.9) },
5535
+ children: /* @__PURE__ */ jsx11(CloseIcon3, { size: 16 })
5334
5536
  }
5335
5537
  ) }),
5336
- /* @__PURE__ */ jsx10(Tooltip2, { title: "Save", children: /* @__PURE__ */ jsx10(
5538
+ /* @__PURE__ */ jsx11(Tooltip2, { title: "Save", children: /* @__PURE__ */ jsx11(
5337
5539
  IconButton6,
5338
5540
  {
5339
5541
  size: "small",
@@ -5343,31 +5545,31 @@ var ProjectHeader = ({
5343
5545
  commitRename();
5344
5546
  },
5345
5547
  sx: { color: theme.palette.success.main },
5346
- children: /* @__PURE__ */ jsx10(CheckIcon2, { size: 16 })
5548
+ children: /* @__PURE__ */ jsx11(CheckIcon2, { size: 16 })
5347
5549
  }
5348
5550
  ) })
5349
5551
  ] }),
5350
- isHovered && !isDragOver && !isUngrouped && !isRenaming && /* @__PURE__ */ jsx10(Tooltip2, { title: `Add conversation to ${projectName.toLowerCase()}`, arrow: true, children: /* @__PURE__ */ jsx10(
5552
+ isHovered && !isDragOver && !isUngrouped && !isRenaming && /* @__PURE__ */ jsx11(Tooltip2, { title: `Add conversation to ${projectName.toLowerCase()}`, arrow: true, children: /* @__PURE__ */ jsx11(
5351
5553
  IconButton6,
5352
5554
  {
5353
5555
  onClick: handleAddConversation,
5354
5556
  size: "small",
5355
5557
  sx: {
5356
5558
  color: projectColor || theme.palette.primary.main,
5357
- bgcolor: alpha4(projectColor || theme.palette.primary.main, 0.1),
5559
+ bgcolor: alpha5(projectColor || theme.palette.primary.main, 0.1),
5358
5560
  width: 24,
5359
5561
  height: 24,
5360
5562
  mr: 0.5,
5361
5563
  "&:hover": {
5362
- bgcolor: alpha4(projectColor || theme.palette.primary.main, 0.2),
5564
+ bgcolor: alpha5(projectColor || theme.palette.primary.main, 0.2),
5363
5565
  transform: "scale(1.1)"
5364
5566
  },
5365
5567
  transition: "all 0.2s ease"
5366
5568
  },
5367
- children: /* @__PURE__ */ jsx10(AddIcon3, { size: 16 })
5569
+ children: /* @__PURE__ */ jsx11(AddIcon3, { size: 16 })
5368
5570
  }
5369
5571
  ) }),
5370
- !isUngrouped && !isRenaming && /* @__PURE__ */ jsx10(
5572
+ !isUngrouped && !isRenaming && /* @__PURE__ */ jsx11(
5371
5573
  IconButton6,
5372
5574
  {
5373
5575
  size: "small",
@@ -5375,7 +5577,7 @@ var ProjectHeader = ({
5375
5577
  color: theme.palette.text.secondary,
5376
5578
  transition: "transform 0.2s ease"
5377
5579
  },
5378
- children: isCollapsed ? /* @__PURE__ */ jsx10(ExpandMoreIcon2, { size: 16 }) : /* @__PURE__ */ jsx10(ExpandLessIcon, { size: 16 })
5580
+ children: isCollapsed ? /* @__PURE__ */ jsx11(ExpandMoreIcon2, { size: 16 }) : /* @__PURE__ */ jsx11(ExpandLessIcon, { size: 16 })
5379
5581
  }
5380
5582
  )
5381
5583
  ]
@@ -5397,7 +5599,7 @@ var TOOLTIP_COPY = {
5397
5599
  var tooltip = (key) => TOOLTIP_COPY[key];
5398
5600
 
5399
5601
  // src/chat/conversation-drawer.tsx
5400
- import { Fragment as Fragment6, jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
5602
+ import { Fragment as Fragment6, jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
5401
5603
  var BANDIT_AVATAR = "https://cdn.burtson.ai/images/bandit-head.png";
5402
5604
  var coerceOptionalString = (value) => {
5403
5605
  if (typeof value !== "string") return void 0;
@@ -5425,7 +5627,7 @@ var deriveInitials = (value) => {
5425
5627
  return sanitized.slice(0, 2).toUpperCase();
5426
5628
  };
5427
5629
  var ConversationDrawer = ({ open, onClose }) => {
5428
- const theme = useTheme9();
5630
+ const theme = useTheme10();
5429
5631
  const isMobile = useMediaQuery4(theme.breakpoints.down("sm"));
5430
5632
  const { user } = useAuthenticationStore();
5431
5633
  const baseRadius = typeof theme.shape.borderRadius === "number" ? theme.shape.borderRadius : parseFloat(theme.shape.borderRadius) || 0;
@@ -5448,15 +5650,15 @@ var ConversationDrawer = ({ open, onClose }) => {
5448
5650
  createProject,
5449
5651
  deleteProject
5450
5652
  } = useProjectStore();
5451
- const [projectManagementOpen, setProjectManagementOpen] = useState10(false);
5452
- const [collapsedProjects, setCollapsedProjects] = useState10(/* @__PURE__ */ new Set());
5653
+ const [projectManagementOpen, setProjectManagementOpen] = useState11(false);
5654
+ const [collapsedProjects, setCollapsedProjects] = useState11(/* @__PURE__ */ new Set());
5453
5655
  const didInitCollapseRef = useRef8(false);
5454
- const [searchQuery, setSearchQuery] = useState10("");
5455
- const [menuAnchorEl, setMenuAnchorEl] = useState10(null);
5456
- const [clearConfirmOpen, setClearConfirmOpen] = useState10(false);
5457
- const [moveModalOpen, setMoveModalOpen] = useState10(false);
5458
- const [conversationToMove, setConversationToMove] = useState10(null);
5459
- const [renameProjectId, setRenameProjectId] = useState10(null);
5656
+ const [searchQuery, setSearchQuery] = useState11("");
5657
+ const [menuAnchorEl, setMenuAnchorEl] = useState11(null);
5658
+ const [clearConfirmOpen, setClearConfirmOpen] = useState11(false);
5659
+ const [moveModalOpen, setMoveModalOpen] = useState11(false);
5660
+ const [conversationToMove, setConversationToMove] = useState11(null);
5661
+ const [renameProjectId, setRenameProjectId] = useState11(null);
5460
5662
  const getCustomClaim = useCallback4((key) => {
5461
5663
  if (!user) return void 0;
5462
5664
  const record = user;
@@ -5489,8 +5691,8 @@ var ConversationDrawer = ({ open, onClose }) => {
5489
5691
  }
5490
5692
  return void 0;
5491
5693
  }, [user, userDisplayName]);
5492
- const [avatarImage, setAvatarImage] = useState10(BANDIT_AVATAR);
5493
- useEffect9(() => {
5694
+ const [avatarImage, setAvatarImage] = useState11(BANDIT_AVATAR);
5695
+ useEffect10(() => {
5494
5696
  const fetchBranding = async () => {
5495
5697
  try {
5496
5698
  const branding = await brandingService_default.getBranding();
@@ -5506,12 +5708,12 @@ var ConversationDrawer = ({ open, onClose }) => {
5506
5708
  }, []);
5507
5709
  const avatarLabel = userDisplayName || user?.email || "Bandit";
5508
5710
  const avatarInitials = useMemo(() => deriveInitials(avatarLabel), [avatarLabel]);
5509
- useEffect9(() => {
5711
+ useEffect10(() => {
5510
5712
  if (!projectsHydrated) {
5511
5713
  hydrateProjects();
5512
5714
  }
5513
5715
  }, [projectsHydrated, hydrateProjects]);
5514
- useEffect9(() => {
5716
+ useEffect10(() => {
5515
5717
  if (projectsHydrated && !didInitCollapseRef.current) {
5516
5718
  didInitCollapseRef.current = true;
5517
5719
  if (projects && projects.length > 0) {
@@ -5618,8 +5820,8 @@ var ConversationDrawer = ({ open, onClose }) => {
5618
5820
  setMoveModalOpen(false);
5619
5821
  setConversationToMove(null);
5620
5822
  };
5621
- return /* @__PURE__ */ jsxs8(Fragment6, { children: [
5622
- /* @__PURE__ */ jsxs8(
5823
+ return /* @__PURE__ */ jsxs9(Fragment6, { children: [
5824
+ /* @__PURE__ */ jsxs9(
5623
5825
  Drawer,
5624
5826
  {
5625
5827
  anchor: "left",
@@ -5633,7 +5835,7 @@ var ConversationDrawer = ({ open, onClose }) => {
5633
5835
  width: isMobile ? `min(94vw, 360px)` : 340,
5634
5836
  maxWidth: 360,
5635
5837
  bgcolor: theme.palette.background.paper,
5636
- borderRight: `1px solid ${isMobile ? alpha5(theme.palette.divider, 0.4) : theme.palette.divider}`,
5838
+ borderRight: `1px solid ${isMobile ? alpha6(theme.palette.divider, 0.4) : theme.palette.divider}`,
5637
5839
  display: "flex",
5638
5840
  flexDirection: "column",
5639
5841
  height: isMobile ? `calc(100dvh - ${theme.spacing(4)})` : "100dvh",
@@ -5641,7 +5843,7 @@ var ConversationDrawer = ({ open, onClose }) => {
5641
5843
  bottom: isMobile ? theme.spacing(2) : 0,
5642
5844
  left: 0,
5643
5845
  borderRadius: isMobile ? `0 ${drawerCornerRadius}px ${drawerCornerRadius}px 0` : 0,
5644
- boxShadow: isMobile ? `0 18px 36px ${alpha5(theme.palette.common.black, 0.28)}` : "none",
5846
+ boxShadow: isMobile ? `0 18px 36px ${alpha6(theme.palette.common.black, 0.28)}` : "none",
5645
5847
  overflow: "hidden"
5646
5848
  }
5647
5849
  },
@@ -5661,8 +5863,8 @@ var ConversationDrawer = ({ open, onClose }) => {
5661
5863
  }
5662
5864
  },
5663
5865
  children: [
5664
- /* @__PURE__ */ jsxs8(
5665
- Box8,
5866
+ /* @__PURE__ */ jsxs9(
5867
+ Box9,
5666
5868
  {
5667
5869
  sx: {
5668
5870
  p: 2,
@@ -5673,7 +5875,7 @@ var ConversationDrawer = ({ open, onClose }) => {
5673
5875
  gap: 1
5674
5876
  },
5675
5877
  children: [
5676
- /* @__PURE__ */ jsx11(Tooltip3, { title: tooltip("manageProjects"), arrow: true, children: /* @__PURE__ */ jsx11(
5878
+ /* @__PURE__ */ jsx12(Tooltip3, { title: tooltip("manageProjects"), arrow: true, children: /* @__PURE__ */ jsx12(
5677
5879
  IconButton7,
5678
5880
  {
5679
5881
  onClick: () => setProjectManagementOpen(true),
@@ -5683,13 +5885,13 @@ var ConversationDrawer = ({ open, onClose }) => {
5683
5885
  color: theme.palette.text.secondary,
5684
5886
  "&:hover": {
5685
5887
  color: theme.palette.primary.main,
5686
- bgcolor: alpha5(theme.palette.primary.main, 0.1)
5888
+ bgcolor: alpha6(theme.palette.primary.main, 0.1)
5687
5889
  }
5688
5890
  },
5689
- children: /* @__PURE__ */ jsx11(FolderIcon4, {})
5891
+ children: /* @__PURE__ */ jsx12(FolderIcon4, {})
5690
5892
  }
5691
5893
  ) }),
5692
- /* @__PURE__ */ jsx11(Tooltip3, { title: tooltip("conversationOptions"), arrow: true, children: /* @__PURE__ */ jsx11(
5894
+ /* @__PURE__ */ jsx12(Tooltip3, { title: tooltip("conversationOptions"), arrow: true, children: /* @__PURE__ */ jsx12(
5693
5895
  IconButton7,
5694
5896
  {
5695
5897
  onClick: handleMenuOpen,
@@ -5699,13 +5901,13 @@ var ConversationDrawer = ({ open, onClose }) => {
5699
5901
  color: theme.palette.text.secondary,
5700
5902
  "&:hover": {
5701
5903
  color: theme.palette.text.primary,
5702
- bgcolor: alpha5(theme.palette.text.primary, 0.1)
5904
+ bgcolor: alpha6(theme.palette.text.primary, 0.1)
5703
5905
  }
5704
5906
  },
5705
- children: /* @__PURE__ */ jsx11(MoreVertIcon3, {})
5907
+ children: /* @__PURE__ */ jsx12(MoreVertIcon3, {})
5706
5908
  }
5707
5909
  ) }),
5708
- isMobile && /* @__PURE__ */ jsx11(Tooltip3, { title: tooltip("closeConversationsPanel"), children: /* @__PURE__ */ jsx11(
5910
+ isMobile && /* @__PURE__ */ jsx12(Tooltip3, { title: tooltip("closeConversationsPanel"), children: /* @__PURE__ */ jsx12(
5709
5911
  IconButton7,
5710
5912
  {
5711
5913
  onClick: (e) => {
@@ -5719,17 +5921,17 @@ var ConversationDrawer = ({ open, onClose }) => {
5719
5921
  color: theme.palette.text.secondary,
5720
5922
  "&:hover": {
5721
5923
  color: theme.palette.error.main,
5722
- bgcolor: alpha5(theme.palette.error.main, 0.1)
5924
+ bgcolor: alpha6(theme.palette.error.main, 0.1)
5723
5925
  }
5724
5926
  },
5725
- children: /* @__PURE__ */ jsx11(CloseIcon4, {})
5927
+ children: /* @__PURE__ */ jsx12(CloseIcon4, {})
5726
5928
  }
5727
5929
  ) })
5728
5930
  ]
5729
5931
  }
5730
5932
  ),
5731
- /* @__PURE__ */ jsx11(Box8, { sx: { p: 2, pb: 1 }, children: /* @__PURE__ */ jsx11(
5732
- TextField5,
5933
+ /* @__PURE__ */ jsx12(Box9, { sx: { p: 2, pb: 1 }, children: /* @__PURE__ */ jsx12(
5934
+ TextField6,
5733
5935
  {
5734
5936
  fullWidth: true,
5735
5937
  size: "small",
@@ -5738,8 +5940,8 @@ var ConversationDrawer = ({ open, onClose }) => {
5738
5940
  onChange: (e) => setSearchQuery(e.target.value),
5739
5941
  variant: "outlined",
5740
5942
  InputProps: {
5741
- startAdornment: /* @__PURE__ */ jsx11(InputAdornment, { position: "start", children: /* @__PURE__ */ jsx11(SearchIcon, { size: 16, color: theme.palette.text.secondary }) }),
5742
- endAdornment: searchQuery && /* @__PURE__ */ jsx11(InputAdornment, { position: "end", children: /* @__PURE__ */ jsx11(Tooltip3, { title: tooltip("clearSearch"), children: /* @__PURE__ */ jsx11(
5943
+ startAdornment: /* @__PURE__ */ jsx12(InputAdornment, { position: "start", children: /* @__PURE__ */ jsx12(SearchIcon, { size: 16, color: theme.palette.text.secondary }) }),
5944
+ endAdornment: searchQuery && /* @__PURE__ */ jsx12(InputAdornment, { position: "end", children: /* @__PURE__ */ jsx12(Tooltip3, { title: tooltip("clearSearch"), children: /* @__PURE__ */ jsx12(
5743
5945
  IconButton7,
5744
5946
  {
5745
5947
  onClick: handleSearchClear,
@@ -5747,15 +5949,15 @@ var ConversationDrawer = ({ open, onClose }) => {
5747
5949
  edge: "end",
5748
5950
  "aria-label": tooltip("clearSearch"),
5749
5951
  sx: { color: theme.palette.text.secondary },
5750
- children: /* @__PURE__ */ jsx11(ClearIcon, { size: 16 })
5952
+ children: /* @__PURE__ */ jsx12(ClearIcon, { size: 16 })
5751
5953
  }
5752
5954
  ) }) })
5753
5955
  },
5754
5956
  sx: {
5755
5957
  "& .MuiOutlinedInput-root": {
5756
- bgcolor: alpha5(theme.palette.background.default, 0.5),
5958
+ bgcolor: alpha6(theme.palette.background.default, 0.5),
5757
5959
  "&:hover": {
5758
- bgcolor: alpha5(theme.palette.background.default, 0.8)
5960
+ bgcolor: alpha6(theme.palette.background.default, 0.8)
5759
5961
  },
5760
5962
  "&.Mui-focused": {
5761
5963
  bgcolor: theme.palette.background.default
@@ -5764,9 +5966,9 @@ var ConversationDrawer = ({ open, onClose }) => {
5764
5966
  }
5765
5967
  }
5766
5968
  ) }),
5767
- /* @__PURE__ */ jsxs8(Box8, { sx: { flex: 1, overflow: "auto", display: "flex", flexDirection: "column" }, children: [
5768
- /* @__PURE__ */ jsxs8(
5769
- Box8,
5969
+ /* @__PURE__ */ jsxs9(Box9, { sx: { flex: 1, overflow: "auto", display: "flex", flexDirection: "column" }, children: [
5970
+ /* @__PURE__ */ jsxs9(
5971
+ Box9,
5770
5972
  {
5771
5973
  onClick: async () => {
5772
5974
  const names = new Set(projects.map((p) => p.name));
@@ -5797,49 +5999,49 @@ var ConversationDrawer = ({ open, onClose }) => {
5797
5999
  alignItems: "center",
5798
6000
  gap: 1.5,
5799
6001
  cursor: "pointer",
5800
- "&:hover": { bgcolor: alpha5(theme.palette.text.primary, 0.04) }
6002
+ "&:hover": { bgcolor: alpha6(theme.palette.text.primary, 0.04) }
5801
6003
  },
5802
6004
  children: [
5803
- /* @__PURE__ */ jsx11(
5804
- Box8,
6005
+ /* @__PURE__ */ jsx12(
6006
+ Box9,
5805
6007
  {
5806
6008
  sx: {
5807
6009
  width: 28,
5808
6010
  height: 28,
5809
6011
  borderRadius: "50%",
5810
- bgcolor: alpha5(theme.palette.success.main, 0.15),
6012
+ bgcolor: alpha6(theme.palette.success.main, 0.15),
5811
6013
  display: "flex",
5812
6014
  alignItems: "center",
5813
6015
  justifyContent: "center",
5814
6016
  flexShrink: 0
5815
6017
  },
5816
- children: /* @__PURE__ */ jsx11(FolderIcon4, { size: 16, color: theme.palette.success.main })
6018
+ children: /* @__PURE__ */ jsx12(FolderIcon4, { size: 16, color: theme.palette.success.main })
5817
6019
  }
5818
6020
  ),
5819
- /* @__PURE__ */ jsx11(
5820
- Typography6,
6021
+ /* @__PURE__ */ jsx12(
6022
+ Typography7,
5821
6023
  {
5822
6024
  variant: "subtitle2",
5823
6025
  sx: { flex: 1, fontWeight: 600, fontSize: "0.875rem" },
5824
6026
  children: "New Project"
5825
6027
  }
5826
6028
  ),
5827
- /* @__PURE__ */ jsx11(Tooltip3, { title: tooltip("addProject"), arrow: true, children: /* @__PURE__ */ jsx11(
6029
+ /* @__PURE__ */ jsx12(Tooltip3, { title: tooltip("addProject"), arrow: true, children: /* @__PURE__ */ jsx12(
5828
6030
  IconButton7,
5829
6031
  {
5830
6032
  size: "small",
5831
6033
  "aria-label": tooltip("addProject"),
5832
6034
  sx: { color: theme.palette.success.main },
5833
- children: /* @__PURE__ */ jsx11(AddIcon4, { size: 16 })
6035
+ children: /* @__PURE__ */ jsx12(AddIcon4, { size: 16 })
5834
6036
  }
5835
6037
  ) })
5836
6038
  ]
5837
6039
  }
5838
6040
  ),
5839
- /* @__PURE__ */ jsx11(Divider2, { sx: { opacity: 0.3 } }),
5840
- filteredProjectGroups.map((group, index) => /* @__PURE__ */ jsxs8(Box8, { children: [
5841
- group.id === null && filteredProjectGroups.length > 1 && /* @__PURE__ */ jsxs8(
5842
- Box8,
6041
+ /* @__PURE__ */ jsx12(Divider2, { sx: { opacity: 0.3 } }),
6042
+ filteredProjectGroups.map((group, index) => /* @__PURE__ */ jsxs9(Box9, { children: [
6043
+ group.id === null && filteredProjectGroups.length > 1 && /* @__PURE__ */ jsxs9(
6044
+ Box9,
5843
6045
  {
5844
6046
  sx: {
5845
6047
  py: 2,
@@ -5849,9 +6051,9 @@ var ConversationDrawer = ({ open, onClose }) => {
5849
6051
  gap: 2
5850
6052
  },
5851
6053
  children: [
5852
- /* @__PURE__ */ jsx11(Divider2, { sx: { flex: 1, opacity: 0.6 } }),
5853
- /* @__PURE__ */ jsxs8(Box8, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
5854
- /* @__PURE__ */ jsx11(
6054
+ /* @__PURE__ */ jsx12(Divider2, { sx: { flex: 1, opacity: 0.6 } }),
6055
+ /* @__PURE__ */ jsxs9(Box9, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
6056
+ /* @__PURE__ */ jsx12(
5855
6057
  InboxIcon3,
5856
6058
  {
5857
6059
  size: 14,
@@ -5859,8 +6061,8 @@ var ConversationDrawer = ({ open, onClose }) => {
5859
6061
  style: { opacity: 0.7 }
5860
6062
  }
5861
6063
  ),
5862
- /* @__PURE__ */ jsx11(
5863
- Typography6,
6064
+ /* @__PURE__ */ jsx12(
6065
+ Typography7,
5864
6066
  {
5865
6067
  variant: "caption",
5866
6068
  sx: {
@@ -5874,12 +6076,12 @@ var ConversationDrawer = ({ open, onClose }) => {
5874
6076
  }
5875
6077
  )
5876
6078
  ] }),
5877
- /* @__PURE__ */ jsx11(Divider2, { sx: { flex: 1, opacity: 0.6 } })
6079
+ /* @__PURE__ */ jsx12(Divider2, { sx: { flex: 1, opacity: 0.6 } })
5878
6080
  ]
5879
6081
  }
5880
6082
  ),
5881
- group.id !== null ? /* @__PURE__ */ jsxs8(Fragment6, { children: [
5882
- /* @__PURE__ */ jsx11(
6083
+ group.id !== null ? /* @__PURE__ */ jsxs9(Fragment6, { children: [
6084
+ /* @__PURE__ */ jsx12(
5883
6085
  project_header_default,
5884
6086
  {
5885
6087
  projectId: group.id,
@@ -5908,8 +6110,8 @@ var ConversationDrawer = ({ open, onClose }) => {
5908
6110
  }
5909
6111
  }
5910
6112
  ),
5911
- /* @__PURE__ */ jsx11(Collapse2, { in: !group.collapsed, children: /* @__PURE__ */ jsxs8(Box8, { sx: { pb: 1 }, children: [
5912
- group.conversations.map((conversation) => /* @__PURE__ */ jsx11(
6113
+ /* @__PURE__ */ jsx12(Collapse2, { in: !group.collapsed, children: /* @__PURE__ */ jsxs9(Box9, { sx: { pb: 1 }, children: [
6114
+ group.conversations.map((conversation) => /* @__PURE__ */ jsx12(
5913
6115
  simple_conversation_item_default,
5914
6116
  {
5915
6117
  conversation,
@@ -5929,8 +6131,8 @@ var ConversationDrawer = ({ open, onClose }) => {
5929
6131
  },
5930
6132
  conversation.id
5931
6133
  )),
5932
- group.conversations.length === 0 && !group.collapsed && group.id !== null && /* @__PURE__ */ jsxs8(
5933
- Box8,
6134
+ group.conversations.length === 0 && !group.collapsed && group.id !== null && /* @__PURE__ */ jsxs9(
6135
+ Box9,
5934
6136
  {
5935
6137
  sx: {
5936
6138
  p: 3,
@@ -5938,17 +6140,17 @@ var ConversationDrawer = ({ open, onClose }) => {
5938
6140
  color: theme.palette.text.secondary
5939
6141
  },
5940
6142
  children: [
5941
- /* @__PURE__ */ jsx11(Typography6, { variant: "body2", children: "No conversations in this project yet" }),
5942
- /* @__PURE__ */ jsx11(Typography6, { variant: "caption", sx: { mt: 1, display: "block" }, children: "Drag conversations here or use the + button above" })
6143
+ /* @__PURE__ */ jsx12(Typography7, { variant: "body2", children: "No conversations in this project yet" }),
6144
+ /* @__PURE__ */ jsx12(Typography7, { variant: "caption", sx: { mt: 1, display: "block" }, children: "Drag conversations here or use the + button above" })
5943
6145
  ]
5944
6146
  }
5945
6147
  )
5946
6148
  ] }) }),
5947
- /* @__PURE__ */ jsx11(Divider2, { sx: { opacity: 0.3 } })
6149
+ /* @__PURE__ */ jsx12(Divider2, { sx: { opacity: 0.3 } })
5948
6150
  ] }) : (
5949
6151
  // Special handling for ungrouped - no header, just conversations in scrollable area
5950
- /* @__PURE__ */ jsx11(
5951
- Box8,
6152
+ /* @__PURE__ */ jsx12(
6153
+ Box9,
5952
6154
  {
5953
6155
  sx: {
5954
6156
  minHeight: 0,
@@ -5956,12 +6158,12 @@ var ConversationDrawer = ({ open, onClose }) => {
5956
6158
  overflow: "auto",
5957
6159
  px: 1,
5958
6160
  py: 1,
5959
- bgcolor: alpha5(theme.palette.background.default, 0.3),
6161
+ bgcolor: alpha6(theme.palette.background.default, 0.3),
5960
6162
  borderRadius: "8px 8px 0 0",
5961
6163
  mx: 1,
5962
6164
  mb: 1
5963
6165
  },
5964
- children: group.conversations.map((conversation) => /* @__PURE__ */ jsx11(
6166
+ children: group.conversations.map((conversation) => /* @__PURE__ */ jsx12(
5965
6167
  simple_conversation_item_default,
5966
6168
  {
5967
6169
  conversation,
@@ -5985,8 +6187,8 @@ var ConversationDrawer = ({ open, onClose }) => {
5985
6187
  )
5986
6188
  )
5987
6189
  ] }, group.id || "ungrouped")),
5988
- filteredProjectGroups.length === 0 && /* @__PURE__ */ jsxs8(
5989
- Box8,
6190
+ filteredProjectGroups.length === 0 && /* @__PURE__ */ jsxs9(
6191
+ Box9,
5990
6192
  {
5991
6193
  sx: {
5992
6194
  flex: 1,
@@ -5999,28 +6201,28 @@ var ConversationDrawer = ({ open, onClose }) => {
5999
6201
  color: theme.palette.text.secondary
6000
6202
  },
6001
6203
  children: [
6002
- /* @__PURE__ */ jsx11(Typography6, { variant: "h6", sx: { mb: 1 }, children: searchQuery ? "No conversations found" : "No conversations yet" }),
6003
- /* @__PURE__ */ jsx11(Typography6, { variant: "body2", sx: { mb: 3, maxWidth: 280 }, children: searchQuery ? `No conversations match "${searchQuery}"` : "Start your first conversation to begin organizing your chats into projects" })
6204
+ /* @__PURE__ */ jsx12(Typography7, { variant: "h6", sx: { mb: 1 }, children: searchQuery ? "No conversations found" : "No conversations yet" }),
6205
+ /* @__PURE__ */ jsx12(Typography7, { variant: "body2", sx: { mb: 3, maxWidth: 280 }, children: searchQuery ? `No conversations match "${searchQuery}"` : "Start your first conversation to begin organizing your chats into projects" })
6004
6206
  ]
6005
6207
  }
6006
6208
  )
6007
6209
  ] }),
6008
- /* @__PURE__ */ jsxs8(
6009
- Box8,
6210
+ /* @__PURE__ */ jsxs9(
6211
+ Box9,
6010
6212
  {
6011
6213
  sx: {
6012
6214
  mt: "auto",
6013
6215
  px: 2,
6014
6216
  py: 1.75,
6015
- borderTop: `1px solid ${alpha5(theme.palette.divider, 0.6)}`,
6217
+ borderTop: `1px solid ${alpha6(theme.palette.divider, 0.6)}`,
6016
6218
  display: "flex",
6017
6219
  alignItems: "center",
6018
6220
  gap: 1.5,
6019
6221
  justifyContent: "center",
6020
- bgcolor: alpha5(theme.palette.background.default, isMobile ? 0.9 : 0.6)
6222
+ bgcolor: alpha6(theme.palette.background.default, isMobile ? 0.9 : 0.6)
6021
6223
  },
6022
6224
  children: [
6023
- /* @__PURE__ */ jsx11(
6225
+ /* @__PURE__ */ jsx12(
6024
6226
  Avatar6,
6025
6227
  {
6026
6228
  src: avatarImage,
@@ -6029,14 +6231,14 @@ var ConversationDrawer = ({ open, onClose }) => {
6029
6231
  width: 36,
6030
6232
  height: 36,
6031
6233
  fontSize: "0.95rem",
6032
- bgcolor: alpha5(theme.palette.primary.main, 0.12),
6234
+ bgcolor: alpha6(theme.palette.primary.main, 0.12),
6033
6235
  color: theme.palette.primary.main
6034
6236
  },
6035
6237
  children: avatarInitials
6036
6238
  }
6037
6239
  ),
6038
- /* @__PURE__ */ jsxs8(
6039
- Box8,
6240
+ /* @__PURE__ */ jsxs9(
6241
+ Box9,
6040
6242
  {
6041
6243
  sx: {
6042
6244
  minWidth: 0,
@@ -6048,8 +6250,8 @@ var ConversationDrawer = ({ open, onClose }) => {
6048
6250
  gap: 0.25
6049
6251
  },
6050
6252
  children: [
6051
- /* @__PURE__ */ jsx11(
6052
- Typography6,
6253
+ /* @__PURE__ */ jsx12(
6254
+ Typography7,
6053
6255
  {
6054
6256
  variant: "subtitle2",
6055
6257
  noWrap: true,
@@ -6057,8 +6259,8 @@ var ConversationDrawer = ({ open, onClose }) => {
6057
6259
  children: user ? userDisplayName : "Not signed in"
6058
6260
  }
6059
6261
  ),
6060
- !user && /* @__PURE__ */ jsx11(
6061
- Typography6,
6262
+ !user && /* @__PURE__ */ jsx12(
6263
+ Typography7,
6062
6264
  {
6063
6265
  variant: "caption",
6064
6266
  sx: { color: theme.palette.text.secondary },
@@ -6074,14 +6276,14 @@ var ConversationDrawer = ({ open, onClose }) => {
6074
6276
  ]
6075
6277
  }
6076
6278
  ),
6077
- /* @__PURE__ */ jsx11(
6279
+ /* @__PURE__ */ jsx12(
6078
6280
  project_management_modal_default,
6079
6281
  {
6080
6282
  open: projectManagementOpen,
6081
6283
  onClose: () => setProjectManagementOpen(false)
6082
6284
  }
6083
6285
  ),
6084
- conversationToMove && /* @__PURE__ */ jsx11(
6286
+ conversationToMove && /* @__PURE__ */ jsx12(
6085
6287
  move_conversation_modal_default,
6086
6288
  {
6087
6289
  open: moveModalOpen,
@@ -6090,7 +6292,7 @@ var ConversationDrawer = ({ open, onClose }) => {
6090
6292
  currentProjectId: conversationToMove.projectId
6091
6293
  }
6092
6294
  ),
6093
- /* @__PURE__ */ jsx11(
6295
+ /* @__PURE__ */ jsx12(
6094
6296
  Menu3,
6095
6297
  {
6096
6298
  anchorEl: menuAnchorEl,
@@ -6104,7 +6306,7 @@ var ConversationDrawer = ({ open, onClose }) => {
6104
6306
  vertical: "bottom",
6105
6307
  horizontal: "right"
6106
6308
  },
6107
- children: /* @__PURE__ */ jsxs8(
6309
+ children: /* @__PURE__ */ jsxs9(
6108
6310
  MenuItem3,
6109
6311
  {
6110
6312
  onClick: () => {
@@ -6113,14 +6315,14 @@ var ConversationDrawer = ({ open, onClose }) => {
6113
6315
  },
6114
6316
  sx: { color: theme.palette.error.main },
6115
6317
  children: [
6116
- /* @__PURE__ */ jsx11(ListItemIcon3, { children: /* @__PURE__ */ jsx11(DeleteSweepIcon, { size: 16, color: theme.palette.error.main }) }),
6117
- /* @__PURE__ */ jsx11(ListItemText3, { children: "Clear All Conversations" })
6318
+ /* @__PURE__ */ jsx12(ListItemIcon3, { children: /* @__PURE__ */ jsx12(DeleteSweepIcon, { size: 16, color: theme.palette.error.main }) }),
6319
+ /* @__PURE__ */ jsx12(ListItemText3, { children: "Clear All Conversations" })
6118
6320
  ]
6119
6321
  }
6120
6322
  )
6121
6323
  }
6122
6324
  ),
6123
- /* @__PURE__ */ jsxs8(
6325
+ /* @__PURE__ */ jsxs9(
6124
6326
  Dialog3,
6125
6327
  {
6126
6328
  open: clearConfirmOpen,
@@ -6128,12 +6330,12 @@ var ConversationDrawer = ({ open, onClose }) => {
6128
6330
  maxWidth: "sm",
6129
6331
  fullWidth: true,
6130
6332
  children: [
6131
- /* @__PURE__ */ jsx11(DialogTitle3, { children: "Clear All Conversations?" }),
6132
- /* @__PURE__ */ jsx11(DialogContent3, { children: /* @__PURE__ */ jsx11(Typography6, { children: "This will permanently delete all conversations and cannot be undone. Are you sure you want to continue?" }) }),
6133
- /* @__PURE__ */ jsxs8(DialogActions3, { children: [
6134
- /* @__PURE__ */ jsx11(Button4, { onClick: () => setClearConfirmOpen(false), children: "Cancel" }),
6135
- /* @__PURE__ */ jsx11(
6136
- Button4,
6333
+ /* @__PURE__ */ jsx12(DialogTitle3, { children: "Clear All Conversations?" }),
6334
+ /* @__PURE__ */ jsx12(DialogContent3, { children: /* @__PURE__ */ jsx12(Typography7, { children: "This will permanently delete all conversations and cannot be undone. Are you sure you want to continue?" }) }),
6335
+ /* @__PURE__ */ jsxs9(DialogActions3, { children: [
6336
+ /* @__PURE__ */ jsx12(Button5, { onClick: () => setClearConfirmOpen(false), children: "Cancel" }),
6337
+ /* @__PURE__ */ jsx12(
6338
+ Button5,
6137
6339
  {
6138
6340
  onClick: handleClearAllConfirm,
6139
6341
  color: "error",
@@ -6150,13 +6352,13 @@ var ConversationDrawer = ({ open, onClose }) => {
6150
6352
  var conversation_drawer_default = ConversationDrawer;
6151
6353
 
6152
6354
  // src/chat/enhanced-mobile-conversations-modal.tsx
6153
- import { useState as useState11, useMemo as useMemo2, useEffect as useEffect10, useRef as useRef9, useCallback as useCallback5 } from "react";
6355
+ import { useState as useState12, useMemo as useMemo2, useEffect as useEffect11, useRef as useRef9, useCallback as useCallback5 } from "react";
6154
6356
  import {
6155
- Box as Box9,
6357
+ Box as Box10,
6156
6358
  IconButton as IconButton8,
6157
6359
  Modal as Modal2,
6158
- Typography as Typography7,
6159
- TextField as TextField6,
6360
+ Typography as Typography8,
6361
+ TextField as TextField7,
6160
6362
  InputAdornment as InputAdornment2,
6161
6363
  Slide,
6162
6364
  Collapse as Collapse3,
@@ -6169,15 +6371,15 @@ import {
6169
6371
  DialogTitle as DialogTitle4,
6170
6372
  DialogContent as DialogContent4,
6171
6373
  DialogActions as DialogActions4,
6172
- Button as Button5,
6374
+ Button as Button6,
6173
6375
  AppBar,
6174
6376
  Toolbar,
6175
6377
  Avatar as Avatar7,
6176
- Chip as Chip3
6378
+ Chip as Chip4
6177
6379
  } from "@mui/material";
6178
6380
  import { X as CloseIcon5, X as ClearIcon2, Search as SearchIcon2, Folder as FolderIcon5, MoreVertical as MoreVertIcon4, Trash2 as DeleteSweepIcon2, Inbox as InboxIcon4, Plus as AddIcon5 } from "lucide-react";
6179
- import { useTheme as useTheme10, alpha as alpha6 } from "@mui/material/styles";
6180
- import { Fragment as Fragment7, jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
6381
+ import { useTheme as useTheme11, alpha as alpha7 } from "@mui/material/styles";
6382
+ import { Fragment as Fragment7, jsx as jsx13, jsxs as jsxs10 } from "react/jsx-runtime";
6181
6383
  var BANDIT_AVATAR2 = "https://cdn.burtson.ai/images/bandit-head.png";
6182
6384
  var coerceOptionalString2 = (value) => {
6183
6385
  if (typeof value !== "string") return void 0;
@@ -6208,7 +6410,7 @@ var EnhancedMobileConversationsModal = ({
6208
6410
  open,
6209
6411
  onClose
6210
6412
  }) => {
6211
- const theme = useTheme10();
6413
+ const theme = useTheme11();
6212
6414
  const { user } = useAuthenticationStore();
6213
6415
  const {
6214
6416
  conversations,
@@ -6228,18 +6430,18 @@ var EnhancedMobileConversationsModal = ({
6228
6430
  createProject,
6229
6431
  deleteProject
6230
6432
  } = useProjectStore();
6231
- const [projectManagementOpen, setProjectManagementOpen] = useState11(false);
6232
- const [collapsedProjects, setCollapsedProjects] = useState11(/* @__PURE__ */ new Set());
6433
+ const [projectManagementOpen, setProjectManagementOpen] = useState12(false);
6434
+ const [collapsedProjects, setCollapsedProjects] = useState12(/* @__PURE__ */ new Set());
6233
6435
  const didInitCollapseRef = useRef9(false);
6234
- const [searchQuery, setSearchQuery] = useState11("");
6235
- const [menuAnchorEl, setMenuAnchorEl] = useState11(null);
6236
- const [clearConfirmOpen, setClearConfirmOpen] = useState11(false);
6237
- const [moveModalOpen, setMoveModalOpen] = useState11(false);
6238
- const [conversationToMove, setConversationToMove] = useState11(null);
6239
- const [renameProjectId, setRenameProjectId] = useState11(null);
6240
- const [deletedConversationIds, setDeletedConversationIds] = useState11(/* @__PURE__ */ new Set());
6241
- const [touchDragState, setTouchDragState] = useState11({ conversationId: null, originProjectId: null, hoverProjectId: null });
6242
- const [avatarImage, setAvatarImage] = useState11(BANDIT_AVATAR2);
6436
+ const [searchQuery, setSearchQuery] = useState12("");
6437
+ const [menuAnchorEl, setMenuAnchorEl] = useState12(null);
6438
+ const [clearConfirmOpen, setClearConfirmOpen] = useState12(false);
6439
+ const [moveModalOpen, setMoveModalOpen] = useState12(false);
6440
+ const [conversationToMove, setConversationToMove] = useState12(null);
6441
+ const [renameProjectId, setRenameProjectId] = useState12(null);
6442
+ const [deletedConversationIds, setDeletedConversationIds] = useState12(/* @__PURE__ */ new Set());
6443
+ const [touchDragState, setTouchDragState] = useState12({ conversationId: null, originProjectId: null, hoverProjectId: null });
6444
+ const [avatarImage, setAvatarImage] = useState12(BANDIT_AVATAR2);
6243
6445
  const getCustomClaim = useCallback5((key) => {
6244
6446
  if (!user) return void 0;
6245
6447
  const record = user;
@@ -6272,7 +6474,7 @@ var EnhancedMobileConversationsModal = ({
6272
6474
  }
6273
6475
  return void 0;
6274
6476
  }, [user, userDisplayName]);
6275
- useEffect10(() => {
6477
+ useEffect11(() => {
6276
6478
  const fetchBranding = async () => {
6277
6479
  try {
6278
6480
  const branding = await brandingService_default.getBranding();
@@ -6295,12 +6497,12 @@ var EnhancedMobileConversationsModal = ({
6295
6497
  const end = Math.min(text.length, idx + query.length + 60);
6296
6498
  return text.slice(start, end).replace(/\s+/g, " ").trim();
6297
6499
  };
6298
- useEffect10(() => {
6500
+ useEffect11(() => {
6299
6501
  if (open && !projectsHydrated) {
6300
6502
  hydrateProjects();
6301
6503
  }
6302
6504
  }, [open, projectsHydrated, hydrateProjects]);
6303
- useEffect10(() => {
6505
+ useEffect11(() => {
6304
6506
  if (projectsHydrated && !didInitCollapseRef.current) {
6305
6507
  didInitCollapseRef.current = true;
6306
6508
  if (projects && projects.length > 0) {
@@ -6467,7 +6669,7 @@ var EnhancedMobileConversationsModal = ({
6467
6669
  setMoveModalOpen(false);
6468
6670
  setConversationToMove(null);
6469
6671
  };
6470
- useEffect10(() => {
6672
+ useEffect11(() => {
6471
6673
  setDeletedConversationIds((prev) => {
6472
6674
  let changed = false;
6473
6675
  const active2 = new Set(conversations.map((conv) => conv.id));
@@ -6482,8 +6684,8 @@ var EnhancedMobileConversationsModal = ({
6482
6684
  return changed ? next : prev;
6483
6685
  });
6484
6686
  }, [conversations]);
6485
- return /* @__PURE__ */ jsxs9(Fragment7, { children: [
6486
- /* @__PURE__ */ jsx12(
6687
+ return /* @__PURE__ */ jsxs10(Fragment7, { children: [
6688
+ /* @__PURE__ */ jsx13(
6487
6689
  Modal2,
6488
6690
  {
6489
6691
  open,
@@ -6492,8 +6694,8 @@ var EnhancedMobileConversationsModal = ({
6492
6694
  display: "flex",
6493
6695
  alignItems: "flex-end"
6494
6696
  },
6495
- children: /* @__PURE__ */ jsx12(Slide, { direction: "up", in: open, children: /* @__PURE__ */ jsxs9(
6496
- Box9,
6697
+ children: /* @__PURE__ */ jsx13(Slide, { direction: "up", in: open, children: /* @__PURE__ */ jsxs10(
6698
+ Box10,
6497
6699
  {
6498
6700
  sx: {
6499
6701
  width: "100%",
@@ -6506,7 +6708,7 @@ var EnhancedMobileConversationsModal = ({
6506
6708
  overflow: "hidden"
6507
6709
  },
6508
6710
  children: [
6509
- /* @__PURE__ */ jsx12(
6711
+ /* @__PURE__ */ jsx13(
6510
6712
  AppBar,
6511
6713
  {
6512
6714
  position: "static",
@@ -6516,10 +6718,10 @@ var EnhancedMobileConversationsModal = ({
6516
6718
  color: theme.palette.text.primary,
6517
6719
  borderBottom: `1px solid ${theme.palette.divider}`
6518
6720
  },
6519
- children: /* @__PURE__ */ jsxs9(Toolbar, { children: [
6520
- /* @__PURE__ */ jsx12(Typography7, { variant: "h6", sx: { flex: 1, fontWeight: 600 }, children: "Conversations" }),
6521
- visibleConversationCount > 0 && /* @__PURE__ */ jsx12(
6522
- Chip3,
6721
+ children: /* @__PURE__ */ jsxs10(Toolbar, { children: [
6722
+ /* @__PURE__ */ jsx13(Typography8, { variant: "h6", sx: { flex: 1, fontWeight: 600 }, children: "Conversations" }),
6723
+ visibleConversationCount > 0 && /* @__PURE__ */ jsx13(
6724
+ Chip4,
6523
6725
  {
6524
6726
  label: visibleConversationCount,
6525
6727
  size: "small",
@@ -6531,35 +6733,35 @@ var EnhancedMobileConversationsModal = ({
6531
6733
  }
6532
6734
  }
6533
6735
  ),
6534
- /* @__PURE__ */ jsx12(
6736
+ /* @__PURE__ */ jsx13(
6535
6737
  IconButton8,
6536
6738
  {
6537
6739
  onClick: () => setProjectManagementOpen(true),
6538
6740
  sx: { color: theme.palette.text.secondary },
6539
- children: /* @__PURE__ */ jsx12(FolderIcon5, {})
6741
+ children: /* @__PURE__ */ jsx13(FolderIcon5, {})
6540
6742
  }
6541
6743
  ),
6542
- /* @__PURE__ */ jsx12(
6744
+ /* @__PURE__ */ jsx13(
6543
6745
  IconButton8,
6544
6746
  {
6545
6747
  onClick: handleMenuOpen,
6546
6748
  sx: { color: theme.palette.text.secondary },
6547
- children: /* @__PURE__ */ jsx12(MoreVertIcon4, {})
6749
+ children: /* @__PURE__ */ jsx13(MoreVertIcon4, {})
6548
6750
  }
6549
6751
  ),
6550
- /* @__PURE__ */ jsx12(
6752
+ /* @__PURE__ */ jsx13(
6551
6753
  IconButton8,
6552
6754
  {
6553
6755
  onClick: onClose,
6554
6756
  sx: { color: theme.palette.text.secondary },
6555
- children: /* @__PURE__ */ jsx12(CloseIcon5, {})
6757
+ children: /* @__PURE__ */ jsx13(CloseIcon5, {})
6556
6758
  }
6557
6759
  )
6558
6760
  ] })
6559
6761
  }
6560
6762
  ),
6561
- /* @__PURE__ */ jsx12(Box9, { sx: { p: 2, pb: 1 }, children: /* @__PURE__ */ jsx12(
6562
- TextField6,
6763
+ /* @__PURE__ */ jsx13(Box10, { sx: { p: 2, pb: 1 }, children: /* @__PURE__ */ jsx13(
6764
+ TextField7,
6563
6765
  {
6564
6766
  fullWidth: true,
6565
6767
  size: "small",
@@ -6568,22 +6770,22 @@ var EnhancedMobileConversationsModal = ({
6568
6770
  onChange: (e) => setSearchQuery(e.target.value),
6569
6771
  variant: "outlined",
6570
6772
  InputProps: {
6571
- startAdornment: /* @__PURE__ */ jsx12(InputAdornment2, { position: "start", children: /* @__PURE__ */ jsx12(SearchIcon2, { size: 16, color: theme.palette.text.secondary }) }),
6572
- endAdornment: searchQuery && /* @__PURE__ */ jsx12(InputAdornment2, { position: "end", children: /* @__PURE__ */ jsx12(
6773
+ startAdornment: /* @__PURE__ */ jsx13(InputAdornment2, { position: "start", children: /* @__PURE__ */ jsx13(SearchIcon2, { size: 16, color: theme.palette.text.secondary }) }),
6774
+ endAdornment: searchQuery && /* @__PURE__ */ jsx13(InputAdornment2, { position: "end", children: /* @__PURE__ */ jsx13(
6573
6775
  IconButton8,
6574
6776
  {
6575
6777
  onClick: handleSearchClear,
6576
6778
  size: "small",
6577
6779
  edge: "end",
6578
6780
  sx: { color: theme.palette.text.secondary },
6579
- children: /* @__PURE__ */ jsx12(ClearIcon2, { size: 16 })
6781
+ children: /* @__PURE__ */ jsx13(ClearIcon2, { size: 16 })
6580
6782
  }
6581
6783
  ) })
6582
6784
  }
6583
6785
  }
6584
6786
  ) }),
6585
- /* @__PURE__ */ jsxs9(
6586
- Box9,
6787
+ /* @__PURE__ */ jsxs10(
6788
+ Box10,
6587
6789
  {
6588
6790
  sx: {
6589
6791
  flex: 1,
@@ -6594,8 +6796,8 @@ var EnhancedMobileConversationsModal = ({
6594
6796
  pb: 2
6595
6797
  },
6596
6798
  children: [
6597
- touchDragActive && activeDragConversation && /* @__PURE__ */ jsxs9(
6598
- Box9,
6799
+ touchDragActive && activeDragConversation && /* @__PURE__ */ jsxs10(
6800
+ Box10,
6599
6801
  {
6600
6802
  sx: {
6601
6803
  position: "absolute",
@@ -6604,13 +6806,13 @@ var EnhancedMobileConversationsModal = ({
6604
6806
  transform: "translate(-50%, -100%)",
6605
6807
  zIndex: theme.zIndex.modal + 10,
6606
6808
  pointerEvents: "none",
6607
- bgcolor: theme.palette.mode === "dark" ? alpha6(theme.palette.common.black, 0.82) : alpha6(theme.palette.common.white, 0.95),
6809
+ bgcolor: theme.palette.mode === "dark" ? alpha7(theme.palette.common.black, 0.82) : alpha7(theme.palette.common.white, 0.95),
6608
6810
  color: theme.palette.mode === "dark" ? theme.palette.common.white : theme.palette.text.primary,
6609
- border: `1px solid ${theme.palette.mode === "dark" ? alpha6(theme.palette.common.white, 0.25) : alpha6(theme.palette.common.black, 0.2)}`,
6811
+ border: `1px solid ${theme.palette.mode === "dark" ? alpha7(theme.palette.common.white, 0.25) : alpha7(theme.palette.common.black, 0.2)}`,
6610
6812
  borderRadius: 999,
6611
6813
  px: 2,
6612
6814
  py: 0.75,
6613
- boxShadow: `0 16px 32px ${alpha6(theme.palette.common.black, 0.3)}`,
6815
+ boxShadow: `0 16px 32px ${alpha7(theme.palette.common.black, 0.3)}`,
6614
6816
  display: "flex",
6615
6817
  alignItems: "center",
6616
6818
  gap: 1,
@@ -6620,8 +6822,8 @@ var EnhancedMobileConversationsModal = ({
6620
6822
  overflow: "hidden"
6621
6823
  },
6622
6824
  children: [
6623
- /* @__PURE__ */ jsxs9(
6624
- Typography7,
6825
+ /* @__PURE__ */ jsxs10(
6826
+ Typography8,
6625
6827
  {
6626
6828
  variant: "caption",
6627
6829
  sx: {
@@ -6633,8 +6835,8 @@ var EnhancedMobileConversationsModal = ({
6633
6835
  },
6634
6836
  children: [
6635
6837
  "Move",
6636
- /* @__PURE__ */ jsxs9(
6637
- Box9,
6838
+ /* @__PURE__ */ jsxs10(
6839
+ Box10,
6638
6840
  {
6639
6841
  component: "span",
6640
6842
  sx: {
@@ -6654,8 +6856,8 @@ var EnhancedMobileConversationsModal = ({
6654
6856
  ]
6655
6857
  }
6656
6858
  ),
6657
- /* @__PURE__ */ jsx12(
6658
- Typography7,
6859
+ /* @__PURE__ */ jsx13(
6860
+ Typography8,
6659
6861
  {
6660
6862
  variant: "caption",
6661
6863
  color: "inherit",
@@ -6663,11 +6865,11 @@ var EnhancedMobileConversationsModal = ({
6663
6865
  fontWeight: 500,
6664
6866
  whiteSpace: "nowrap"
6665
6867
  },
6666
- children: activeHoverLabel ? /* @__PURE__ */ jsxs9(Fragment7, { children: [
6868
+ children: activeHoverLabel ? /* @__PURE__ */ jsxs10(Fragment7, { children: [
6667
6869
  "to",
6668
6870
  " ",
6669
- /* @__PURE__ */ jsx12(
6670
- Box9,
6871
+ /* @__PURE__ */ jsx13(
6872
+ Box10,
6671
6873
  {
6672
6874
  component: "span",
6673
6875
  sx: {
@@ -6683,8 +6885,8 @@ var EnhancedMobileConversationsModal = ({
6683
6885
  ]
6684
6886
  }
6685
6887
  ),
6686
- /* @__PURE__ */ jsxs9(
6687
- Box9,
6888
+ /* @__PURE__ */ jsxs10(
6889
+ Box10,
6688
6890
  {
6689
6891
  onClick: async () => {
6690
6892
  const names = new Set(projects.map((p) => p.name));
@@ -6715,41 +6917,41 @@ var EnhancedMobileConversationsModal = ({
6715
6917
  alignItems: "center",
6716
6918
  gap: 1.5,
6717
6919
  cursor: "pointer",
6718
- "&:hover": { bgcolor: alpha6(theme.palette.text.primary, 0.04) }
6920
+ "&:hover": { bgcolor: alpha7(theme.palette.text.primary, 0.04) }
6719
6921
  },
6720
6922
  children: [
6721
- /* @__PURE__ */ jsx12(
6722
- Box9,
6923
+ /* @__PURE__ */ jsx13(
6924
+ Box10,
6723
6925
  {
6724
6926
  sx: {
6725
6927
  width: 28,
6726
6928
  height: 28,
6727
6929
  borderRadius: "50%",
6728
- bgcolor: alpha6(theme.palette.success.main, 0.15),
6930
+ bgcolor: alpha7(theme.palette.success.main, 0.15),
6729
6931
  display: "flex",
6730
6932
  alignItems: "center",
6731
6933
  justifyContent: "center",
6732
6934
  flexShrink: 0
6733
6935
  },
6734
- children: /* @__PURE__ */ jsx12(FolderIcon5, { size: 16, color: theme.palette.success.main })
6936
+ children: /* @__PURE__ */ jsx13(FolderIcon5, { size: 16, color: theme.palette.success.main })
6735
6937
  }
6736
6938
  ),
6737
- /* @__PURE__ */ jsx12(
6738
- Typography7,
6939
+ /* @__PURE__ */ jsx13(
6940
+ Typography8,
6739
6941
  {
6740
6942
  variant: "subtitle2",
6741
6943
  sx: { flex: 1, fontWeight: 600, fontSize: "0.875rem" },
6742
6944
  children: "New Project"
6743
6945
  }
6744
6946
  ),
6745
- /* @__PURE__ */ jsx12(IconButton8, { size: "small", sx: { color: theme.palette.success.main }, children: /* @__PURE__ */ jsx12(AddIcon5, { size: 16 }) })
6947
+ /* @__PURE__ */ jsx13(IconButton8, { size: "small", sx: { color: theme.palette.success.main }, children: /* @__PURE__ */ jsx13(AddIcon5, { size: 16 }) })
6746
6948
  ]
6747
6949
  }
6748
6950
  ),
6749
- /* @__PURE__ */ jsx12(Divider3, { sx: { opacity: 0.3 } }),
6750
- filteredProjectGroups.map((group, index) => /* @__PURE__ */ jsxs9(Box9, { children: [
6751
- group.id === null && filteredProjectGroups.length > 1 && /* @__PURE__ */ jsxs9(
6752
- Box9,
6951
+ /* @__PURE__ */ jsx13(Divider3, { sx: { opacity: 0.3 } }),
6952
+ filteredProjectGroups.map((group, index) => /* @__PURE__ */ jsxs10(Box10, { children: [
6953
+ group.id === null && filteredProjectGroups.length > 1 && /* @__PURE__ */ jsxs10(
6954
+ Box10,
6753
6955
  {
6754
6956
  sx: {
6755
6957
  py: 2,
@@ -6759,9 +6961,9 @@ var EnhancedMobileConversationsModal = ({
6759
6961
  gap: 2
6760
6962
  },
6761
6963
  children: [
6762
- /* @__PURE__ */ jsx12(Divider3, { sx: { flex: 1, opacity: 0.6 } }),
6763
- /* @__PURE__ */ jsxs9(Box9, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
6764
- /* @__PURE__ */ jsx12(
6964
+ /* @__PURE__ */ jsx13(Divider3, { sx: { flex: 1, opacity: 0.6 } }),
6965
+ /* @__PURE__ */ jsxs10(Box10, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
6966
+ /* @__PURE__ */ jsx13(
6765
6967
  InboxIcon4,
6766
6968
  {
6767
6969
  size: 14,
@@ -6769,8 +6971,8 @@ var EnhancedMobileConversationsModal = ({
6769
6971
  style: { opacity: 0.7 }
6770
6972
  }
6771
6973
  ),
6772
- /* @__PURE__ */ jsx12(
6773
- Typography7,
6974
+ /* @__PURE__ */ jsx13(
6975
+ Typography8,
6774
6976
  {
6775
6977
  variant: "caption",
6776
6978
  sx: {
@@ -6784,12 +6986,12 @@ var EnhancedMobileConversationsModal = ({
6784
6986
  }
6785
6987
  )
6786
6988
  ] }),
6787
- /* @__PURE__ */ jsx12(Divider3, { sx: { flex: 1, opacity: 0.6 } })
6989
+ /* @__PURE__ */ jsx13(Divider3, { sx: { flex: 1, opacity: 0.6 } })
6788
6990
  ]
6789
6991
  }
6790
6992
  ),
6791
- group.id !== null ? /* @__PURE__ */ jsxs9(Fragment7, { children: [
6792
- /* @__PURE__ */ jsx12(
6993
+ group.id !== null ? /* @__PURE__ */ jsxs10(Fragment7, { children: [
6994
+ /* @__PURE__ */ jsx13(
6793
6995
  project_header_default,
6794
6996
  {
6795
6997
  projectId: group.id,
@@ -6819,8 +7021,8 @@ var EnhancedMobileConversationsModal = ({
6819
7021
  isTouchTarget: touchDragActive && touchDragState.hoverProjectId === group.id
6820
7022
  }
6821
7023
  ),
6822
- /* @__PURE__ */ jsx12(Collapse3, { in: !group.collapsed, children: /* @__PURE__ */ jsx12(
6823
- Box9,
7024
+ /* @__PURE__ */ jsx13(Collapse3, { in: !group.collapsed, children: /* @__PURE__ */ jsx13(
7025
+ Box10,
6824
7026
  {
6825
7027
  "data-project-id": group.id ?? "__ungrouped",
6826
7028
  sx: {
@@ -6828,9 +7030,9 @@ var EnhancedMobileConversationsModal = ({
6828
7030
  border: touchDragActive && touchDragState.hoverProjectId === group.id ? `2px dashed ${theme.palette.primary.main}` : "1px solid transparent",
6829
7031
  borderRadius: touchDragActive && touchDragState.hoverProjectId === group.id ? 2 : 0,
6830
7032
  transition: "border 0.2s ease, background-color 0.2s ease",
6831
- backgroundColor: touchDragActive && touchDragState.hoverProjectId === group.id ? alpha6(theme.palette.primary.main, 0.08) : "transparent"
7033
+ backgroundColor: touchDragActive && touchDragState.hoverProjectId === group.id ? alpha7(theme.palette.primary.main, 0.08) : "transparent"
6832
7034
  },
6833
- children: group.conversations.map((conversation) => /* @__PURE__ */ jsx12(
7035
+ children: group.conversations.map((conversation) => /* @__PURE__ */ jsx13(
6834
7036
  simple_conversation_item_default,
6835
7037
  {
6836
7038
  conversation,
@@ -6864,24 +7066,24 @@ var EnhancedMobileConversationsModal = ({
6864
7066
  ) })
6865
7067
  ] }) : (
6866
7068
  // Special handling for ungrouped - no header, just conversations in scrollable area
6867
- /* @__PURE__ */ jsx12(
6868
- Box9,
7069
+ /* @__PURE__ */ jsx13(
7070
+ Box10,
6869
7071
  {
6870
7072
  sx: {
6871
7073
  minHeight: 0,
6872
7074
  overflow: "auto",
6873
7075
  px: 1,
6874
7076
  py: 1,
6875
- bgcolor: alpha6(theme.palette.background.default, 0.3),
7077
+ bgcolor: alpha7(theme.palette.background.default, 0.3),
6876
7078
  borderRadius: "8px 8px 0 0",
6877
7079
  mx: 1,
6878
7080
  mb: 1,
6879
7081
  border: touchDragActive && touchDragState.hoverProjectId === "__ungrouped" ? `2px dashed ${theme.palette.primary.main}` : "1px solid transparent",
6880
7082
  transition: "border 0.2s ease, background-color 0.2s ease",
6881
- backgroundColor: touchDragActive && touchDragState.hoverProjectId === "__ungrouped" ? alpha6(theme.palette.primary.main, 0.08) : alpha6(theme.palette.background.default, 0.3)
7083
+ backgroundColor: touchDragActive && touchDragState.hoverProjectId === "__ungrouped" ? alpha7(theme.palette.primary.main, 0.08) : alpha7(theme.palette.background.default, 0.3)
6882
7084
  },
6883
7085
  "data-project-id": "__ungrouped",
6884
- children: group.conversations.map((conversation) => /* @__PURE__ */ jsx12(
7086
+ children: group.conversations.map((conversation) => /* @__PURE__ */ jsx13(
6885
7087
  simple_conversation_item_default,
6886
7088
  {
6887
7089
  conversation,
@@ -6915,8 +7117,8 @@ var EnhancedMobileConversationsModal = ({
6915
7117
  )
6916
7118
  )
6917
7119
  ] }, group.id || "ungrouped")),
6918
- filteredProjectGroups.length === 0 && /* @__PURE__ */ jsxs9(
6919
- Box9,
7120
+ filteredProjectGroups.length === 0 && /* @__PURE__ */ jsxs10(
7121
+ Box10,
6920
7122
  {
6921
7123
  sx: {
6922
7124
  flex: 1,
@@ -6929,31 +7131,31 @@ var EnhancedMobileConversationsModal = ({
6929
7131
  color: theme.palette.text.secondary
6930
7132
  },
6931
7133
  children: [
6932
- /* @__PURE__ */ jsx12(Typography7, { variant: "h6", sx: { mb: 1 }, children: searchQuery ? "No conversations found" : "No conversations yet" }),
6933
- /* @__PURE__ */ jsx12(Typography7, { variant: "body2", sx: { mb: 3, maxWidth: 280 }, children: searchQuery ? `No conversations match "${searchQuery}"` : "Start your first conversation to begin organizing your chats into projects" })
7134
+ /* @__PURE__ */ jsx13(Typography8, { variant: "h6", sx: { mb: 1 }, children: searchQuery ? "No conversations found" : "No conversations yet" }),
7135
+ /* @__PURE__ */ jsx13(Typography8, { variant: "body2", sx: { mb: 3, maxWidth: 280 }, children: searchQuery ? `No conversations match "${searchQuery}"` : "Start your first conversation to begin organizing your chats into projects" })
6934
7136
  ]
6935
7137
  }
6936
7138
  )
6937
7139
  ]
6938
7140
  }
6939
7141
  ),
6940
- /* @__PURE__ */ jsxs9(
6941
- Box9,
7142
+ /* @__PURE__ */ jsxs10(
7143
+ Box10,
6942
7144
  {
6943
7145
  sx: {
6944
7146
  mt: "auto",
6945
7147
  px: 2,
6946
7148
  py: 1.75,
6947
- borderTop: `1px solid ${alpha6(theme.palette.divider, 0.6)}`,
7149
+ borderTop: `1px solid ${alpha7(theme.palette.divider, 0.6)}`,
6948
7150
  display: "flex",
6949
7151
  alignItems: "center",
6950
7152
  justifyContent: "center",
6951
7153
  gap: 1.25,
6952
- bgcolor: alpha6(theme.palette.background.default, 0.88),
7154
+ bgcolor: alpha7(theme.palette.background.default, 0.88),
6953
7155
  flexWrap: "wrap"
6954
7156
  },
6955
7157
  children: [
6956
- /* @__PURE__ */ jsx12(
7158
+ /* @__PURE__ */ jsx13(
6957
7159
  Avatar7,
6958
7160
  {
6959
7161
  src: avatarImage,
@@ -6962,15 +7164,15 @@ var EnhancedMobileConversationsModal = ({
6962
7164
  width: 40,
6963
7165
  height: 40,
6964
7166
  fontSize: "1rem",
6965
- bgcolor: alpha6(theme.palette.primary.main, 0.12),
7167
+ bgcolor: alpha7(theme.palette.primary.main, 0.12),
6966
7168
  color: theme.palette.primary.main
6967
7169
  },
6968
7170
  children: avatarInitials
6969
7171
  }
6970
7172
  ),
6971
- /* @__PURE__ */ jsxs9(Box9, { sx: { display: "flex", flexDirection: "column", alignItems: "center", gap: 0.5, minWidth: 0 }, children: [
6972
- /* @__PURE__ */ jsx12(
6973
- Typography7,
7173
+ /* @__PURE__ */ jsxs10(Box10, { sx: { display: "flex", flexDirection: "column", alignItems: "center", gap: 0.5, minWidth: 0 }, children: [
7174
+ /* @__PURE__ */ jsx13(
7175
+ Typography8,
6974
7176
  {
6975
7177
  variant: "subtitle2",
6976
7178
  noWrap: true,
@@ -6978,8 +7180,8 @@ var EnhancedMobileConversationsModal = ({
6978
7180
  children: user ? userDisplayName : "Not signed in"
6979
7181
  }
6980
7182
  ),
6981
- !user && /* @__PURE__ */ jsx12(
6982
- Typography7,
7183
+ !user && /* @__PURE__ */ jsx13(
7184
+ Typography8,
6983
7185
  {
6984
7186
  variant: "caption",
6985
7187
  sx: { color: theme.palette.text.secondary },
@@ -6996,14 +7198,14 @@ var EnhancedMobileConversationsModal = ({
6996
7198
  ) })
6997
7199
  }
6998
7200
  ),
6999
- /* @__PURE__ */ jsx12(
7201
+ /* @__PURE__ */ jsx13(
7000
7202
  project_management_modal_default,
7001
7203
  {
7002
7204
  open: projectManagementOpen,
7003
7205
  onClose: () => setProjectManagementOpen(false)
7004
7206
  }
7005
7207
  ),
7006
- conversationToMove && /* @__PURE__ */ jsx12(
7208
+ conversationToMove && /* @__PURE__ */ jsx13(
7007
7209
  move_conversation_modal_default,
7008
7210
  {
7009
7211
  open: moveModalOpen,
@@ -7012,7 +7214,7 @@ var EnhancedMobileConversationsModal = ({
7012
7214
  currentProjectId: conversationToMove.projectId
7013
7215
  }
7014
7216
  ),
7015
- /* @__PURE__ */ jsx12(
7217
+ /* @__PURE__ */ jsx13(
7016
7218
  Menu4,
7017
7219
  {
7018
7220
  anchorEl: menuAnchorEl,
@@ -7026,7 +7228,7 @@ var EnhancedMobileConversationsModal = ({
7026
7228
  vertical: "bottom",
7027
7229
  horizontal: "right"
7028
7230
  },
7029
- children: /* @__PURE__ */ jsxs9(
7231
+ children: /* @__PURE__ */ jsxs10(
7030
7232
  MenuItem4,
7031
7233
  {
7032
7234
  onClick: () => {
@@ -7036,14 +7238,14 @@ var EnhancedMobileConversationsModal = ({
7036
7238
  disabled: visibleConversationCount === 0,
7037
7239
  sx: { color: theme.palette.error.main },
7038
7240
  children: [
7039
- /* @__PURE__ */ jsx12(ListItemIcon4, { children: /* @__PURE__ */ jsx12(DeleteSweepIcon2, { size: 16, color: theme.palette.error.main }) }),
7040
- /* @__PURE__ */ jsx12(ListItemText4, { children: "Clear All Conversations" })
7241
+ /* @__PURE__ */ jsx13(ListItemIcon4, { children: /* @__PURE__ */ jsx13(DeleteSweepIcon2, { size: 16, color: theme.palette.error.main }) }),
7242
+ /* @__PURE__ */ jsx13(ListItemText4, { children: "Clear All Conversations" })
7041
7243
  ]
7042
7244
  }
7043
7245
  )
7044
7246
  }
7045
7247
  ),
7046
- /* @__PURE__ */ jsxs9(
7248
+ /* @__PURE__ */ jsxs10(
7047
7249
  Dialog4,
7048
7250
  {
7049
7251
  open: clearConfirmOpen,
@@ -7051,12 +7253,12 @@ var EnhancedMobileConversationsModal = ({
7051
7253
  maxWidth: "sm",
7052
7254
  fullWidth: true,
7053
7255
  children: [
7054
- /* @__PURE__ */ jsx12(DialogTitle4, { children: "Clear All Conversations?" }),
7055
- /* @__PURE__ */ jsx12(DialogContent4, { children: /* @__PURE__ */ jsx12(Typography7, { children: visibleConversationCount === 0 ? "No conversations available to clear." : `This will permanently delete ${visibleConversationCount} conversation${visibleConversationCount === 1 ? "" : "s"} and cannot be undone.` }) }),
7056
- /* @__PURE__ */ jsxs9(DialogActions4, { children: [
7057
- /* @__PURE__ */ jsx12(Button5, { onClick: () => setClearConfirmOpen(false), children: "Cancel" }),
7058
- /* @__PURE__ */ jsx12(
7059
- Button5,
7256
+ /* @__PURE__ */ jsx13(DialogTitle4, { children: "Clear All Conversations?" }),
7257
+ /* @__PURE__ */ jsx13(DialogContent4, { children: /* @__PURE__ */ jsx13(Typography8, { children: visibleConversationCount === 0 ? "No conversations available to clear." : `This will permanently delete ${visibleConversationCount} conversation${visibleConversationCount === 1 ? "" : "s"} and cannot be undone.` }) }),
7258
+ /* @__PURE__ */ jsxs10(DialogActions4, { children: [
7259
+ /* @__PURE__ */ jsx13(Button6, { onClick: () => setClearConfirmOpen(false), children: "Cancel" }),
7260
+ /* @__PURE__ */ jsx13(
7261
+ Button6,
7060
7262
  {
7061
7263
  onClick: handleClearAllConfirm,
7062
7264
  color: "error",
@@ -7074,7 +7276,7 @@ var enhanced_mobile_conversations_modal_default = EnhancedMobileConversationsMod
7074
7276
 
7075
7277
  // src/chat/chat-app-bar.tsx
7076
7278
  import { shallow as shallow2 } from "zustand/shallow";
7077
- import { Fragment as Fragment8, jsx as jsx13, jsxs as jsxs10 } from "react/jsx-runtime";
7279
+ import { Fragment as Fragment8, jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
7078
7280
  var CDN_BASE = "https://cdn.burtson.ai/";
7079
7281
  var banditHead = `${CDN_BASE}/images/bandit-head.png`;
7080
7282
  var modelAvatars = {
@@ -7093,7 +7295,7 @@ var ChatAppBar = ({
7093
7295
  drawerOpen,
7094
7296
  setDrawerOpen
7095
7297
  }) => {
7096
- const theme = useTheme11();
7298
+ const theme = useTheme12();
7097
7299
  const isMobile = useMediaQuery5(theme.breakpoints.down("sm"));
7098
7300
  const hasLoggedRouterWarningRef = useRef10(false);
7099
7301
  let navigate = null;
@@ -7121,12 +7323,12 @@ var ChatAppBar = ({
7121
7323
  menuBackground,
7122
7324
  menuText
7123
7325
  } = theme.palette.chat.appBar;
7124
- const [modelAnchorEl, setModelAnchorEl] = useState12(null);
7125
- const [engineAnchorEl, setEngineAnchorEl] = useState12(null);
7126
- const [voiceAnchorEl, setVoiceAnchorEl] = useState12(null);
7127
- const [modalOpen, setModalOpen] = useState12(false);
7128
- const [confirmModelChangeOpen, setConfirmModelChangeOpen] = useState12(false);
7129
- const [pendingModel, setPendingModel] = useState12(null);
7326
+ const [modelAnchorEl, setModelAnchorEl] = useState13(null);
7327
+ const [engineAnchorEl, setEngineAnchorEl] = useState13(null);
7328
+ const [voiceAnchorEl, setVoiceAnchorEl] = useState13(null);
7329
+ const [modalOpen, setModalOpen] = useState13(false);
7330
+ const [confirmModelChangeOpen, setConfirmModelChangeOpen] = useState13(false);
7331
+ const [pendingModel, setPendingModel] = useState13(null);
7130
7332
  const { conversations, currentId, createNewConversation, _hasHydrated } = useConversationStore();
7131
7333
  const { preferences } = usePreferencesStore();
7132
7334
  const { settings: packageSettings } = usePackageSettingsStore();
@@ -7152,7 +7354,7 @@ var ChatAppBar = ({
7152
7354
  triggerSync: state.runSync,
7153
7355
  setSyncEnabled: state.setSyncEnabled
7154
7356
  }), shallow2);
7155
- useEffect11(() => {
7357
+ useEffect12(() => {
7156
7358
  if (isPlaygroundMode2 && syncEnabled) {
7157
7359
  void setSyncEnabled(false).catch((error) => {
7158
7360
  debugLogger.warn("ChatAppBar: Failed to disable sync in playground", {
@@ -7170,16 +7372,16 @@ var ChatAppBar = ({
7170
7372
  };
7171
7373
  const syncIndicatorIcon = (() => {
7172
7374
  if (isPlaygroundMode2 || !syncEnabled) {
7173
- return /* @__PURE__ */ jsx13(CloudOffIcon, { fontSize: "small", color: "disabled" });
7375
+ return /* @__PURE__ */ jsx14(CloudOffIcon, { fontSize: "small", color: "disabled" });
7174
7376
  }
7175
7377
  switch (syncStatus) {
7176
7378
  case "syncing":
7177
- return /* @__PURE__ */ jsx13(SyncIcon, { fontSize: "small", sx: syncSpinSx, color: "primary" });
7379
+ return /* @__PURE__ */ jsx14(SyncIcon, { fontSize: "small", sx: syncSpinSx, color: "primary" });
7178
7380
  case "error":
7179
- return /* @__PURE__ */ jsx13(ErrorOutlineIcon, { fontSize: "small", color: "error" });
7381
+ return /* @__PURE__ */ jsx14(ErrorOutlineIcon, { fontSize: "small", color: "error" });
7180
7382
  case "idle":
7181
7383
  default:
7182
- return /* @__PURE__ */ jsx13(CloudDoneIcon, { fontSize: "small", color: "success" });
7384
+ return /* @__PURE__ */ jsx14(CloudDoneIcon, { fontSize: "small", color: "success" });
7183
7385
  }
7184
7386
  })();
7185
7387
  const syncTooltip = (() => {
@@ -7250,7 +7452,7 @@ var ChatAppBar = ({
7250
7452
  const resolvedEngineId = currentEngine?.id ?? effectiveEngineId;
7251
7453
  const cleanEngineName = (name) => (name || "").replace(/\s*\([^)]*\)\s*$/, "").trim();
7252
7454
  const engineDisplay = cleanEngineName(currentEngine?.displayName) || "Engine";
7253
- useEffect11(() => {
7455
+ useEffect12(() => {
7254
7456
  useEngineStore.getState().fetchEngines();
7255
7457
  }, []);
7256
7458
  const pendingModelAvatar = useModelStore.getState().availableModels.find((m) => m.name === pendingModel)?.avatarBase64 || modelAvatars[pendingModel || ""] || banditHead;
@@ -7285,9 +7487,9 @@ var ChatAppBar = ({
7285
7487
  }
7286
7488
  safeNavigate("/");
7287
7489
  }
7288
- return /* @__PURE__ */ jsxs10(Fragment8, { children: [
7289
- /* @__PURE__ */ jsxs10(
7290
- Box10,
7490
+ return /* @__PURE__ */ jsxs11(Fragment8, { children: [
7491
+ /* @__PURE__ */ jsxs11(
7492
+ Box11,
7291
7493
  {
7292
7494
  sx: {
7293
7495
  position: "fixed",
@@ -7307,8 +7509,8 @@ var ChatAppBar = ({
7307
7509
  }
7308
7510
  },
7309
7511
  children: [
7310
- /* @__PURE__ */ jsxs10(
7311
- Box10,
7512
+ /* @__PURE__ */ jsxs11(
7513
+ Box11,
7312
7514
  {
7313
7515
  sx: {
7314
7516
  display: "flex",
@@ -7328,16 +7530,16 @@ var ChatAppBar = ({
7328
7530
  }
7329
7531
  },
7330
7532
  children: [
7331
- /* @__PURE__ */ jsx13(Tooltip4, { title: homeTooltip, arrow: true, children: /* @__PURE__ */ jsx13(
7533
+ /* @__PURE__ */ jsx14(Tooltip4, { title: homeTooltip, arrow: true, children: /* @__PURE__ */ jsx14(
7332
7534
  IconButton9,
7333
7535
  {
7334
7536
  onClick: goToHome,
7335
7537
  sx: pillButtonStyles,
7336
7538
  "aria-label": "Go to home page",
7337
- children: /* @__PURE__ */ jsx13(HomeIcon, {})
7539
+ children: /* @__PURE__ */ jsx14(HomeIcon, {})
7338
7540
  }
7339
7541
  ) }),
7340
- showLimitedAdminPanel() && /* @__PURE__ */ jsx13(Tooltip4, { title: "Management & Settings", arrow: true, children: /* @__PURE__ */ jsx13(
7542
+ showLimitedAdminPanel() && /* @__PURE__ */ jsx14(Tooltip4, { title: "Management & Settings", arrow: true, children: /* @__PURE__ */ jsx14(
7341
7543
  IconButton9,
7342
7544
  {
7343
7545
  onClick: () => safeNavigate(managementPath),
@@ -7349,10 +7551,10 @@ var ChatAppBar = ({
7349
7551
  }
7350
7552
  },
7351
7553
  "aria-label": "Open management settings",
7352
- children: /* @__PURE__ */ jsx13(SettingsIcon, {})
7554
+ children: /* @__PURE__ */ jsx14(SettingsIcon, {})
7353
7555
  }
7354
7556
  ) }),
7355
- /* @__PURE__ */ jsx13(Tooltip4, { title: syncTooltip, arrow: true, children: /* @__PURE__ */ jsxs10(
7557
+ /* @__PURE__ */ jsx14(Tooltip4, { title: syncTooltip, arrow: true, children: /* @__PURE__ */ jsxs11(
7356
7558
  IconButton9,
7357
7559
  {
7358
7560
  onClick: handleSyncBadgeClick,
@@ -7368,8 +7570,8 @@ var ChatAppBar = ({
7368
7570
  "aria-label": "Conversation sync status",
7369
7571
  children: [
7370
7572
  syncIndicatorIcon,
7371
- pendingCount > 0 && !syncButtonDisabled && syncStatus !== "syncing" && /* @__PURE__ */ jsx13(
7372
- Box10,
7573
+ pendingCount > 0 && !syncButtonDisabled && syncStatus !== "syncing" && /* @__PURE__ */ jsx14(
7574
+ Box11,
7373
7575
  {
7374
7576
  sx: {
7375
7577
  position: "absolute",
@@ -7394,7 +7596,7 @@ var ChatAppBar = ({
7394
7596
  ]
7395
7597
  }
7396
7598
  ) }),
7397
- !isMobile && /* @__PURE__ */ jsx13(Tooltip4, { title: `${drawerOpen ? "Close" : "Open"} Conversations`, arrow: true, children: /* @__PURE__ */ jsxs10(
7599
+ !isMobile && /* @__PURE__ */ jsx14(Tooltip4, { title: `${drawerOpen ? "Close" : "Open"} Conversations`, arrow: true, children: /* @__PURE__ */ jsxs11(
7398
7600
  IconButton9,
7399
7601
  {
7400
7602
  onClick: () => setDrawerOpen(!drawerOpen),
@@ -7408,9 +7610,9 @@ var ChatAppBar = ({
7408
7610
  "aria-label": `${drawerOpen ? "Close" : "Open"} conversations drawer`,
7409
7611
  "aria-pressed": drawerOpen,
7410
7612
  children: [
7411
- drawerOpen ? /* @__PURE__ */ jsx13(NotesIcon, {}) : /* @__PURE__ */ jsx13(NotesIconOutlined, {}),
7412
- conversations.length > 0 && /* @__PURE__ */ jsx13(
7413
- Box10,
7613
+ drawerOpen ? /* @__PURE__ */ jsx14(NotesIcon, {}) : /* @__PURE__ */ jsx14(NotesIconOutlined, {}),
7614
+ conversations.length > 0 && /* @__PURE__ */ jsx14(
7615
+ Box11,
7414
7616
  {
7415
7617
  sx: {
7416
7618
  position: "absolute",
@@ -7435,7 +7637,7 @@ var ChatAppBar = ({
7435
7637
  ]
7436
7638
  }
7437
7639
  ) }),
7438
- !isMobile && canShowNewConversationButton && /* @__PURE__ */ jsx13(Tooltip4, { title: "Start New Conversation", arrow: true, children: /* @__PURE__ */ jsx13(
7640
+ !isMobile && canShowNewConversationButton && /* @__PURE__ */ jsx14(Tooltip4, { title: "Start New Conversation", arrow: true, children: /* @__PURE__ */ jsx14(
7439
7641
  IconButton9,
7440
7642
  {
7441
7643
  onClick: () => createNewConversation(),
@@ -7449,14 +7651,14 @@ var ChatAppBar = ({
7449
7651
  }
7450
7652
  },
7451
7653
  "aria-label": "Create new conversation",
7452
- children: /* @__PURE__ */ jsx13(AddIcon, {})
7654
+ children: /* @__PURE__ */ jsx14(AddIcon, {})
7453
7655
  }
7454
7656
  ) })
7455
7657
  ]
7456
7658
  }
7457
7659
  ),
7458
- /* @__PURE__ */ jsxs10(
7459
- Box10,
7660
+ /* @__PURE__ */ jsxs11(
7661
+ Box11,
7460
7662
  {
7461
7663
  sx: {
7462
7664
  display: "flex",
@@ -7476,7 +7678,7 @@ var ChatAppBar = ({
7476
7678
  }
7477
7679
  },
7478
7680
  children: [
7479
- isMobile && /* @__PURE__ */ jsx13(Tooltip4, { title: `Conversations (${conversations.length})`, arrow: true, children: /* @__PURE__ */ jsxs10(
7681
+ isMobile && /* @__PURE__ */ jsx14(Tooltip4, { title: `Conversations (${conversations.length})`, arrow: true, children: /* @__PURE__ */ jsxs11(
7480
7682
  IconButton9,
7481
7683
  {
7482
7684
  onClick: () => setModalOpen(true),
@@ -7486,9 +7688,9 @@ var ChatAppBar = ({
7486
7688
  },
7487
7689
  "aria-label": `Open conversations modal with ${conversations.length} conversations`,
7488
7690
  children: [
7489
- /* @__PURE__ */ jsx13(NotesIcon, { fontSize: "small" }),
7490
- conversations.length > 0 && /* @__PURE__ */ jsx13(
7491
- Box10,
7691
+ /* @__PURE__ */ jsx14(NotesIcon, { fontSize: "small" }),
7692
+ conversations.length > 0 && /* @__PURE__ */ jsx14(
7693
+ Box11,
7492
7694
  {
7493
7695
  sx: {
7494
7696
  position: "absolute",
@@ -7513,7 +7715,7 @@ var ChatAppBar = ({
7513
7715
  ]
7514
7716
  }
7515
7717
  ) }),
7516
- isMobile && canShowNewConversationButton && /* @__PURE__ */ jsx13(Tooltip4, { title: "Start New Conversation", arrow: true, children: /* @__PURE__ */ jsx13(
7718
+ isMobile && canShowNewConversationButton && /* @__PURE__ */ jsx14(Tooltip4, { title: "Start New Conversation", arrow: true, children: /* @__PURE__ */ jsx14(
7517
7719
  IconButton9,
7518
7720
  {
7519
7721
  onClick: () => {
@@ -7530,10 +7732,10 @@ var ChatAppBar = ({
7530
7732
  }
7531
7733
  },
7532
7734
  "aria-label": "Create new conversation",
7533
- children: /* @__PURE__ */ jsx13(AddIcon, { fontSize: "small" })
7735
+ children: /* @__PURE__ */ jsx14(AddIcon, { fontSize: "small" })
7534
7736
  }
7535
7737
  ) }),
7536
- /* @__PURE__ */ jsx13(Tooltip4, { title: `Current AI: ${selectedModel.replace("Bandit-", "")}`, arrow: true, children: /* @__PURE__ */ jsx13(
7738
+ /* @__PURE__ */ jsx14(Tooltip4, { title: `Current AI: ${selectedModel.replace("Bandit-", "")}`, arrow: true, children: /* @__PURE__ */ jsx14(
7537
7739
  IconButton9,
7538
7740
  {
7539
7741
  onClick: (e) => setModelAnchorEl(e.currentTarget),
@@ -7548,7 +7750,7 @@ var ChatAppBar = ({
7548
7750
  }
7549
7751
  },
7550
7752
  "aria-label": `Change AI personality. Currently using ${selectedModel}`,
7551
- children: /* @__PURE__ */ jsx13(
7753
+ children: /* @__PURE__ */ jsx14(
7552
7754
  Avatar8,
7553
7755
  {
7554
7756
  src: currentAvatar,
@@ -7565,16 +7767,16 @@ var ChatAppBar = ({
7565
7767
  )
7566
7768
  }
7567
7769
  ) }),
7568
- /* @__PURE__ */ jsx13(Tooltip4, { title: `Engine \xB7 ${engineDisplay}`, arrow: true, children: /* @__PURE__ */ jsx13(
7770
+ /* @__PURE__ */ jsx14(Tooltip4, { title: `Engine \xB7 ${engineDisplay}`, arrow: true, children: /* @__PURE__ */ jsx14(
7569
7771
  IconButton9,
7570
7772
  {
7571
7773
  onClick: (e) => setEngineAnchorEl(e.currentTarget),
7572
7774
  sx: pillButtonStyles,
7573
7775
  "aria-label": `Change base model (engine). Currently ${engineDisplay}`,
7574
- children: /* @__PURE__ */ jsx13(AutoAwesomeIcon, { fontSize: "small" })
7776
+ children: /* @__PURE__ */ jsx14(AutoAwesomeIcon, { fontSize: "small" })
7575
7777
  }
7576
7778
  ) }),
7577
- /* @__PURE__ */ jsxs10(
7779
+ /* @__PURE__ */ jsxs11(
7578
7780
  Menu5,
7579
7781
  {
7580
7782
  anchorEl: engineAnchorEl,
@@ -7583,8 +7785,8 @@ var ChatAppBar = ({
7583
7785
  transformOrigin: { horizontal: "right", vertical: "top" },
7584
7786
  anchorOrigin: { horizontal: "right", vertical: "bottom" },
7585
7787
  children: [
7586
- /* @__PURE__ */ jsx13(Typography8, { variant: "overline", sx: { px: 2, color: theme.palette.text.secondary }, children: "Engine \xB7 base model" }),
7587
- engines.length === 0 && /* @__PURE__ */ jsx13(MenuItem5, { disabled: true, children: /* @__PURE__ */ jsx13(Typography8, { variant: "body2", children: "No engines available" }) }),
7788
+ /* @__PURE__ */ jsx14(Typography9, { variant: "overline", sx: { px: 2, color: theme.palette.text.secondary }, children: "Engine \xB7 base model" }),
7789
+ engines.length === 0 && /* @__PURE__ */ jsx14(MenuItem5, { disabled: true, children: /* @__PURE__ */ jsx14(Typography9, { variant: "body2", children: "No engines available" }) }),
7588
7790
  engines.map((engine) => {
7589
7791
  const badges = [
7590
7792
  engine.vision && "vision",
@@ -7592,7 +7794,7 @@ var ChatAppBar = ({
7592
7794
  engine.thinking && "thinking",
7593
7795
  engine.cloud && "cloud"
7594
7796
  ].filter(Boolean);
7595
- return /* @__PURE__ */ jsxs10(
7797
+ return /* @__PURE__ */ jsxs11(
7596
7798
  MenuItem5,
7597
7799
  {
7598
7800
  selected: engine.id === resolvedEngineId,
@@ -7612,13 +7814,13 @@ var ChatAppBar = ({
7612
7814
  whiteSpace: "normal"
7613
7815
  },
7614
7816
  children: [
7615
- /* @__PURE__ */ jsxs10(Box10, { sx: { display: "flex", alignItems: "center", gap: 1, width: "100%" }, children: [
7616
- /* @__PURE__ */ jsx13(Typography8, { variant: "body2", sx: { fontWeight: 600, flex: 1 }, children: cleanEngineName(engine.displayName) }),
7617
- engine.id === resolvedEngineId && /* @__PURE__ */ jsx13(Box10, { sx: { width: 8, height: 8, borderRadius: "50%", bgcolor: theme.palette.primary.main } })
7817
+ /* @__PURE__ */ jsxs11(Box11, { sx: { display: "flex", alignItems: "center", gap: 1, width: "100%" }, children: [
7818
+ /* @__PURE__ */ jsx14(Typography9, { variant: "body2", sx: { fontWeight: 600, flex: 1 }, children: cleanEngineName(engine.displayName) }),
7819
+ engine.id === resolvedEngineId && /* @__PURE__ */ jsx14(Box11, { sx: { width: 8, height: 8, borderRadius: "50%", bgcolor: theme.palette.primary.main } })
7618
7820
  ] }),
7619
- /* @__PURE__ */ jsx13(Typography8, { variant: "caption", sx: { color: theme.palette.text.secondary }, children: engine.available ? engine.description : engine.unavailableReason || "Unavailable" }),
7620
- badges.length > 0 && /* @__PURE__ */ jsx13(Box10, { sx: { display: "flex", gap: 0.5, flexWrap: "wrap", mt: 0.25 }, children: badges.map((b) => /* @__PURE__ */ jsx13(
7621
- Box10,
7821
+ /* @__PURE__ */ jsx14(Typography9, { variant: "caption", sx: { color: theme.palette.text.secondary }, children: engine.available ? engine.description : engine.unavailableReason || "Unavailable" }),
7822
+ badges.length > 0 && /* @__PURE__ */ jsx14(Box11, { sx: { display: "flex", gap: 0.5, flexWrap: "wrap", mt: 0.25 }, children: badges.map((b) => /* @__PURE__ */ jsx14(
7823
+ Box11,
7622
7824
  {
7623
7825
  sx: {
7624
7826
  fontSize: "0.65rem",
@@ -7640,7 +7842,7 @@ var ChatAppBar = ({
7640
7842
  ]
7641
7843
  }
7642
7844
  ),
7643
- /* @__PURE__ */ jsx13(
7845
+ /* @__PURE__ */ jsx14(
7644
7846
  Menu5,
7645
7847
  {
7646
7848
  anchorEl: modelAnchorEl,
@@ -7676,7 +7878,7 @@ var ChatAppBar = ({
7676
7878
  }
7677
7879
  }
7678
7880
  },
7679
- children: availableModels.map((model) => /* @__PURE__ */ jsxs10(
7881
+ children: availableModels.map((model) => /* @__PURE__ */ jsxs11(
7680
7882
  MenuItem5,
7681
7883
  {
7682
7884
  selected: model.name === selectedModel,
@@ -7723,7 +7925,7 @@ var ChatAppBar = ({
7723
7925
  px: 2
7724
7926
  },
7725
7927
  children: [
7726
- /* @__PURE__ */ jsx13(
7928
+ /* @__PURE__ */ jsx14(
7727
7929
  Avatar8,
7728
7930
  {
7729
7931
  src: model.avatarBase64 || modelAvatars[model.name] || banditHead,
@@ -7736,12 +7938,12 @@ var ChatAppBar = ({
7736
7938
  }
7737
7939
  }
7738
7940
  ),
7739
- /* @__PURE__ */ jsxs10(Box10, { sx: { flex: 1 }, children: [
7740
- /* @__PURE__ */ jsx13(Typography8, { variant: "body2", sx: { fontWeight: 500 }, children: model.name.replace("Bandit-", "") }),
7741
- /* @__PURE__ */ jsx13(Typography8, { variant: "caption", sx: { color: theme.palette.text.secondary, display: "block" }, children: model.name === selectedModel ? "Currently active" : "Switch to this AI" })
7941
+ /* @__PURE__ */ jsxs11(Box11, { sx: { flex: 1 }, children: [
7942
+ /* @__PURE__ */ jsx14(Typography9, { variant: "body2", sx: { fontWeight: 500 }, children: model.name.replace("Bandit-", "") }),
7943
+ /* @__PURE__ */ jsx14(Typography9, { variant: "caption", sx: { color: theme.palette.text.secondary, display: "block" }, children: model.name === selectedModel ? "Currently active" : "Switch to this AI" })
7742
7944
  ] }),
7743
- model.name === selectedModel && /* @__PURE__ */ jsx13(
7744
- Box10,
7945
+ model.name === selectedModel && /* @__PURE__ */ jsx14(
7946
+ Box11,
7745
7947
  {
7746
7948
  sx: {
7747
7949
  width: 8,
@@ -7757,8 +7959,8 @@ var ChatAppBar = ({
7757
7959
  ))
7758
7960
  }
7759
7961
  ),
7760
- isTTSAvailable && /* @__PURE__ */ jsxs10(Fragment8, { children: [
7761
- /* @__PURE__ */ jsx13(Tooltip4, { title: `Voice: ${selectedVoice ? toTitleCase(selectedVoice.split("-")[1]) : "Default"}`, arrow: true, children: /* @__PURE__ */ jsx13(
7962
+ isTTSAvailable && /* @__PURE__ */ jsxs11(Fragment8, { children: [
7963
+ /* @__PURE__ */ jsx14(Tooltip4, { title: `Voice: ${selectedVoice ? toTitleCase(selectedVoice.split("-")[1]) : "Default"}`, arrow: true, children: /* @__PURE__ */ jsx14(
7762
7964
  IconButton9,
7763
7965
  {
7764
7966
  onClick: (e) => setVoiceAnchorEl(e.currentTarget),
@@ -7772,10 +7974,10 @@ var ChatAppBar = ({
7772
7974
  }
7773
7975
  },
7774
7976
  "aria-label": `Change voice. Currently using ${selectedVoice ? toTitleCase(selectedVoice.split("-")[1]) : "default"}`,
7775
- children: /* @__PURE__ */ jsx13(RecordVoiceOverIcon, { fontSize: "small" })
7977
+ children: /* @__PURE__ */ jsx14(RecordVoiceOverIcon, { fontSize: "small" })
7776
7978
  }
7777
7979
  ) }),
7778
- /* @__PURE__ */ jsx13(
7980
+ /* @__PURE__ */ jsx14(
7779
7981
  Menu5,
7780
7982
  {
7781
7983
  anchorEl: voiceAnchorEl,
@@ -7812,7 +8014,7 @@ var ChatAppBar = ({
7812
8014
  }
7813
8015
  }
7814
8016
  },
7815
- children: availableVoices.length > 0 ? availableVoices.map((voice) => /* @__PURE__ */ jsx13(
8017
+ children: availableVoices.length > 0 ? availableVoices.map((voice) => /* @__PURE__ */ jsx14(
7816
8018
  MenuItem5,
7817
8019
  {
7818
8020
  selected: voice === selectedVoice,
@@ -7820,14 +8022,14 @@ var ChatAppBar = ({
7820
8022
  handleVoiceChange(voice);
7821
8023
  setVoiceAnchorEl(null);
7822
8024
  },
7823
- children: /* @__PURE__ */ jsxs10(Box10, { sx: { display: "flex", alignItems: "center", gap: 1, width: "100%" }, children: [
7824
- /* @__PURE__ */ jsx13(RecordVoiceOverIcon, { fontSize: "small", sx: { color: theme.palette.text.secondary } }),
7825
- /* @__PURE__ */ jsxs10(Box10, { sx: { flex: 1 }, children: [
7826
- /* @__PURE__ */ jsx13(Typography8, { variant: "body2", children: toTitleCase(voice.split("-")[1]) }),
7827
- /* @__PURE__ */ jsx13(Typography8, { variant: "caption", sx: { color: theme.palette.text.secondary }, children: voice === selectedVoice ? "Currently active" : "Switch to this voice" })
8025
+ children: /* @__PURE__ */ jsxs11(Box11, { sx: { display: "flex", alignItems: "center", gap: 1, width: "100%" }, children: [
8026
+ /* @__PURE__ */ jsx14(RecordVoiceOverIcon, { fontSize: "small", sx: { color: theme.palette.text.secondary } }),
8027
+ /* @__PURE__ */ jsxs11(Box11, { sx: { flex: 1 }, children: [
8028
+ /* @__PURE__ */ jsx14(Typography9, { variant: "body2", children: toTitleCase(voice.split("-")[1]) }),
8029
+ /* @__PURE__ */ jsx14(Typography9, { variant: "caption", sx: { color: theme.palette.text.secondary }, children: voice === selectedVoice ? "Currently active" : "Switch to this voice" })
7828
8030
  ] }),
7829
- voice === selectedVoice && /* @__PURE__ */ jsx13(
7830
- Box10,
8031
+ voice === selectedVoice && /* @__PURE__ */ jsx14(
8032
+ Box11,
7831
8033
  {
7832
8034
  sx: {
7833
8035
  width: 8,
@@ -7840,7 +8042,7 @@ var ChatAppBar = ({
7840
8042
  ] })
7841
8043
  },
7842
8044
  voice
7843
- )) : /* @__PURE__ */ jsx13(MenuItem5, { disabled: true, children: /* @__PURE__ */ jsx13(Typography8, { variant: "body2", color: "text.secondary", children: "No voices available" }) })
8045
+ )) : /* @__PURE__ */ jsx14(MenuItem5, { disabled: true, children: /* @__PURE__ */ jsx14(Typography9, { variant: "body2", color: "text.secondary", children: "No voices available" }) })
7844
8046
  }
7845
8047
  )
7846
8048
  ] })
@@ -7850,17 +8052,17 @@ var ChatAppBar = ({
7850
8052
  ]
7851
8053
  }
7852
8054
  ),
7853
- /* @__PURE__ */ jsx13(conversation_drawer_default, { open: drawerOpen, onClose: () => setDrawerOpen(false) }),
7854
- /* @__PURE__ */ jsx13(enhanced_mobile_conversations_modal_default, { open: modalOpen, onClose: () => setModalOpen(false) }),
7855
- /* @__PURE__ */ jsxs10(
8055
+ /* @__PURE__ */ jsx14(conversation_drawer_default, { open: drawerOpen, onClose: () => setDrawerOpen(false) }),
8056
+ /* @__PURE__ */ jsx14(enhanced_mobile_conversations_modal_default, { open: modalOpen, onClose: () => setModalOpen(false) }),
8057
+ /* @__PURE__ */ jsxs11(
7856
8058
  Dialog5,
7857
8059
  {
7858
8060
  open: confirmModelChangeOpen,
7859
8061
  onClose: () => setConfirmModelChangeOpen(false),
7860
8062
  children: [
7861
- /* @__PURE__ */ jsx13(DialogTitle5, { children: "Change personality and start new conversation?" }),
7862
- /* @__PURE__ */ jsx13(DialogContent5, { children: /* @__PURE__ */ jsxs10(Box10, { display: "flex", alignItems: "center", gap: 2, mt: 1, justifyContent: "center", children: [
7863
- /* @__PURE__ */ jsx13(
8063
+ /* @__PURE__ */ jsx14(DialogTitle5, { children: "Change personality and start new conversation?" }),
8064
+ /* @__PURE__ */ jsx14(DialogContent5, { children: /* @__PURE__ */ jsxs11(Box11, { display: "flex", alignItems: "center", gap: 2, mt: 1, justifyContent: "center", children: [
8065
+ /* @__PURE__ */ jsx14(
7864
8066
  Avatar8,
7865
8067
  {
7866
8068
  src: pendingModelAvatar,
@@ -7868,16 +8070,16 @@ var ChatAppBar = ({
7868
8070
  sx: { width: 40, height: 40, filter: "brightness(1.7)" }
7869
8071
  }
7870
8072
  ),
7871
- /* @__PURE__ */ jsxs10(Typography8, { variant: "body2", children: [
8073
+ /* @__PURE__ */ jsxs11(Typography9, { variant: "body2", children: [
7872
8074
  "Your current conversation will be saved, and a new one will begin with ",
7873
- /* @__PURE__ */ jsx13("strong", { children: pendingModel }),
8075
+ /* @__PURE__ */ jsx14("strong", { children: pendingModel }),
7874
8076
  "."
7875
8077
  ] })
7876
8078
  ] }) }),
7877
- /* @__PURE__ */ jsxs10(DialogActions5, { children: [
7878
- /* @__PURE__ */ jsx13(Button6, { onClick: () => setConfirmModelChangeOpen(false), children: "Cancel" }),
7879
- /* @__PURE__ */ jsx13(
7880
- Button6,
8079
+ /* @__PURE__ */ jsxs11(DialogActions5, { children: [
8080
+ /* @__PURE__ */ jsx14(Button7, { onClick: () => setConfirmModelChangeOpen(false), children: "Cancel" }),
8081
+ /* @__PURE__ */ jsx14(
8082
+ Button7,
7881
8083
  {
7882
8084
  onClick: () => {
7883
8085
  if (pendingModel) {
@@ -7979,19 +8181,19 @@ Respond with just the title and nothing else.
7979
8181
  };
7980
8182
 
7981
8183
  // src/chat/query-suggestion-picker.tsx
7982
- import { useEffect as useEffect12, useRef as useRef11, useState as useState13 } from "react";
7983
- import { Box as Box11, useMediaQuery as useMediaQuery6 } from "@mui/material";
7984
- import { useTheme as useTheme12, alpha as alpha7 } from "@mui/material/styles";
8184
+ import { useEffect as useEffect13, useRef as useRef11, useState as useState14 } from "react";
8185
+ import { Box as Box12, useMediaQuery as useMediaQuery6 } from "@mui/material";
8186
+ import { useTheme as useTheme13, alpha as alpha8 } from "@mui/material/styles";
7985
8187
  import ReactMarkdown from "react-markdown";
7986
8188
  import remarkGfm from "remark-gfm";
7987
8189
  import rehypeRaw from "rehype-raw";
7988
- import { Fragment as Fragment9, jsx as jsx14 } from "react/jsx-runtime";
8190
+ import { Fragment as Fragment9, jsx as jsx15 } from "react/jsx-runtime";
7989
8191
  var markdownComponents = {
7990
- p: ({ node, ...props }) => /* @__PURE__ */ jsx14("span", { ...props }),
7991
- mark: ({ node, children, ...props }) => /* @__PURE__ */ jsx14("mark", { ...props, children }),
8192
+ p: ({ node, ...props }) => /* @__PURE__ */ jsx15("span", { ...props }),
8193
+ mark: ({ node, children, ...props }) => /* @__PURE__ */ jsx15("mark", { ...props, children }),
7992
8194
  code: ({ node, children, ...props }) => {
7993
8195
  const { inline, ...rest } = props;
7994
- return inline ? /* @__PURE__ */ jsx14("code", { ...rest, children }) : /* @__PURE__ */ jsx14("code", { ...rest, children });
8196
+ return inline ? /* @__PURE__ */ jsx15("code", { ...rest, children }) : /* @__PURE__ */ jsx15("code", { ...rest, children });
7995
8197
  }
7996
8198
  };
7997
8199
  var QuerySuggestionPicker = ({
@@ -7999,15 +8201,15 @@ var QuerySuggestionPicker = ({
7999
8201
  inputHeight
8000
8202
  }) => {
8001
8203
  const hasGenerated = useRef11(false);
8002
- const [hasSentPrompt, setHasSentPrompt] = useState13(false);
8003
- const [examplePrompts, setExamplePrompts] = useState13([]);
8004
- const [visiblePrompts, setVisiblePrompts] = useState13([]);
8204
+ const [hasSentPrompt, setHasSentPrompt] = useState14(false);
8205
+ const [examplePrompts, setExamplePrompts] = useState14([]);
8206
+ const [visiblePrompts, setVisiblePrompts] = useState14([]);
8005
8207
  const scrollRef = useRef11(null);
8006
- const theme = useTheme12();
8208
+ const theme = useTheme13();
8007
8209
  const isMobile = useMediaQuery6((theme2) => theme2.breakpoints.down("sm"));
8008
8210
  const { background, text, border, hoverBackground, hoverBorder } = theme.palette.chat.suggestion;
8009
8211
  const { getCurrentModel, isLoading } = useModelStore();
8010
- useEffect12(() => {
8212
+ useEffect13(() => {
8011
8213
  if (hasGenerated.current || isLoading) return;
8012
8214
  hasGenerated.current = true;
8013
8215
  const currentModel = getCurrentModel();
@@ -8040,12 +8242,12 @@ var QuerySuggestionPicker = ({
8040
8242
  hasGenerated.current = false;
8041
8243
  });
8042
8244
  }, [getCurrentModel, isLoading]);
8043
- useEffect12(() => {
8245
+ useEffect13(() => {
8044
8246
  if (!isLoading) {
8045
8247
  hasGenerated.current = false;
8046
8248
  }
8047
8249
  }, [isLoading]);
8048
- useEffect12(() => {
8250
+ useEffect13(() => {
8049
8251
  if (hasSentPrompt || examplePrompts.length === 0) return;
8050
8252
  const interval = setInterval(() => {
8051
8253
  setExamplePrompts((prev) => {
@@ -8064,8 +8266,8 @@ var QuerySuggestionPicker = ({
8064
8266
  return () => clearInterval(interval);
8065
8267
  }, [hasSentPrompt, examplePrompts.length]);
8066
8268
  const displayPrompts = isMobile ? visiblePrompts.slice(0, Math.min(visiblePrompts.length, 6)) : visiblePrompts;
8067
- return displayPrompts.length > 0 && /* @__PURE__ */ jsx14(Fragment9, { children: /* @__PURE__ */ jsx14(
8068
- Box11,
8269
+ return displayPrompts.length > 0 && /* @__PURE__ */ jsx15(Fragment9, { children: /* @__PURE__ */ jsx15(
8270
+ Box12,
8069
8271
  {
8070
8272
  ref: scrollRef,
8071
8273
  sx: {
@@ -8081,8 +8283,8 @@ var QuerySuggestionPicker = ({
8081
8283
  pb: isMobile ? 0.4 : 0,
8082
8284
  "&::-webkit-scrollbar": { display: "none" }
8083
8285
  },
8084
- children: displayPrompts.map((prompt, i) => /* @__PURE__ */ jsx14(
8085
- Box11,
8286
+ children: displayPrompts.map((prompt, i) => /* @__PURE__ */ jsx15(
8287
+ Box12,
8086
8288
  {
8087
8289
  sx: {
8088
8290
  px: isMobile ? 1.4 : 2,
@@ -8098,7 +8300,7 @@ var QuerySuggestionPicker = ({
8098
8300
  color: text,
8099
8301
  userSelect: "none",
8100
8302
  cursor: "pointer",
8101
- border: `1px solid ${border || alpha7(text, 0.12)}`,
8303
+ border: `1px solid ${border || alpha8(text, 0.12)}`,
8102
8304
  boxShadow: theme.palette.mode === "dark" ? "0 4px 18px rgba(0,0,0,0.25)" : "0 6px 20px rgba(15,23,42,0.12)",
8103
8305
  scrollSnapAlign: isMobile ? "start" : "none",
8104
8306
  transition: "transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease",
@@ -8116,8 +8318,8 @@ var QuerySuggestionPicker = ({
8116
8318
  onSend(prompt, []);
8117
8319
  setHasSentPrompt(true);
8118
8320
  },
8119
- children: /* @__PURE__ */ jsx14(
8120
- Box11,
8321
+ children: /* @__PURE__ */ jsx15(
8322
+ Box12,
8121
8323
  {
8122
8324
  sx: {
8123
8325
  flex: 1,
@@ -8129,19 +8331,19 @@ var QuerySuggestionPicker = ({
8129
8331
  borderRadius: 4,
8130
8332
  fontSize: "0.92em",
8131
8333
  fontFamily: "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace",
8132
- backgroundColor: theme.palette.mode === "dark" ? alpha7(theme.palette.common.white, 0.06) : alpha7(theme.palette.text.primary, 0.06),
8133
- border: `1px solid ${alpha7(theme.palette.text.primary, 0.15)}`,
8334
+ backgroundColor: theme.palette.mode === "dark" ? alpha8(theme.palette.common.white, 0.06) : alpha8(theme.palette.text.primary, 0.06),
8335
+ border: `1px solid ${alpha8(theme.palette.text.primary, 0.15)}`,
8134
8336
  padding: "0.15em 0.35em"
8135
8337
  },
8136
8338
  "& mark": {
8137
8339
  display: "inline-block",
8138
- backgroundColor: theme.palette.mode === "dark" ? alpha7(theme.palette.common.white, 0.06) : alpha7(theme.palette.text.primary, 0.12),
8340
+ backgroundColor: theme.palette.mode === "dark" ? alpha8(theme.palette.common.white, 0.06) : alpha8(theme.palette.text.primary, 0.12),
8139
8341
  color: theme.palette.mode === "dark" ? theme.palette.common.white : theme.palette.text.primary,
8140
8342
  borderRadius: 4,
8141
8343
  padding: "0.1em 0.25em"
8142
8344
  }
8143
8345
  },
8144
- children: /* @__PURE__ */ jsx14(
8346
+ children: /* @__PURE__ */ jsx15(
8145
8347
  ReactMarkdown,
8146
8348
  {
8147
8349
  remarkPlugins: [remarkGfm],
@@ -8160,18 +8362,18 @@ var QuerySuggestionPicker = ({
8160
8362
  };
8161
8363
 
8162
8364
  // ../../src/pages/under-review.tsx
8163
- import { Box as Box12, Typography as Typography9, useTheme as useTheme13 } from "@mui/material";
8365
+ import { Box as Box13, Typography as Typography10, useTheme as useTheme14 } from "@mui/material";
8164
8366
  import { useNavigate as useNavigate2 } from "react-router-dom";
8165
- import { jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
8367
+ import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
8166
8368
  var UnderReview = () => {
8167
- const theme = useTheme13();
8369
+ const theme = useTheme14();
8168
8370
  const navigate = useNavigate2();
8169
8371
  const handleSneakyLogout = () => {
8170
8372
  localStorage.removeItem("authToken");
8171
8373
  navigate("/login");
8172
8374
  };
8173
- return /* @__PURE__ */ jsxs11(
8174
- Box12,
8375
+ return /* @__PURE__ */ jsxs12(
8376
+ Box13,
8175
8377
  {
8176
8378
  sx: {
8177
8379
  minHeight: "100vh",
@@ -8186,8 +8388,8 @@ var UnderReview = () => {
8186
8388
  position: "relative"
8187
8389
  },
8188
8390
  children: [
8189
- /* @__PURE__ */ jsx15(
8190
- Box12,
8391
+ /* @__PURE__ */ jsx16(
8392
+ Box13,
8191
8393
  {
8192
8394
  onClick: handleSneakyLogout,
8193
8395
  sx: {
@@ -8212,13 +8414,13 @@ var UnderReview = () => {
8212
8414
  title: "Reset session"
8213
8415
  }
8214
8416
  ),
8215
- /* @__PURE__ */ jsx15(Typography9, { variant: "h4", sx: { mb: 2, fontWeight: 700, color: theme.palette.error.main }, children: "Under Review" }),
8216
- /* @__PURE__ */ jsxs11(Typography9, { variant: "body1", sx: { mb: 2, color: theme.palette.text.secondary }, children: [
8417
+ /* @__PURE__ */ jsx16(Typography10, { variant: "h4", sx: { mb: 2, fontWeight: 700, color: theme.palette.error.main }, children: "Under Review" }),
8418
+ /* @__PURE__ */ jsxs12(Typography10, { variant: "body1", sx: { mb: 2, color: theme.palette.text.secondary }, children: [
8217
8419
  "Your request to use our services is currently being reviewed.",
8218
- /* @__PURE__ */ jsx15("br", {}),
8420
+ /* @__PURE__ */ jsx16("br", {}),
8219
8421
  "For more info, please contact ",
8220
8422
  " ",
8221
- /* @__PURE__ */ jsx15("a", { href: "mailto:team@banditai.ai", style: { color: theme.palette.primary.main, fontWeight: 600 }, children: "team@banditai.ai" })
8423
+ /* @__PURE__ */ jsx16("a", { href: "mailto:team@banditai.ai", style: { color: theme.palette.primary.main, fontWeight: 600 }, children: "team@banditai.ai" })
8222
8424
  ] })
8223
8425
  ]
8224
8426
  }
@@ -8227,13 +8429,13 @@ var UnderReview = () => {
8227
8429
  var under_review_default = UnderReview;
8228
8430
 
8229
8431
  // src/components/ConnectionStatus.tsx
8230
- import { Box as Box13, Chip as Chip4, useTheme as useTheme14 } from "@mui/material";
8231
- import { jsx as jsx16 } from "react/jsx-runtime";
8432
+ import { Box as Box14, Chip as Chip5, useTheme as useTheme15 } from "@mui/material";
8433
+ import { jsx as jsx17 } from "react/jsx-runtime";
8232
8434
  var ConnectionStatus = ({
8233
8435
  showWhenGood = false,
8234
8436
  position = "top"
8235
8437
  }) => {
8236
- const theme = useTheme14();
8438
+ const theme = useTheme15();
8237
8439
  const { isOnline, connectionQuality, isSlowConnection } = useNetworkStatus();
8238
8440
  if (connectionQuality === "fast" && !showWhenGood) {
8239
8441
  return null;
@@ -8242,28 +8444,28 @@ var ConnectionStatus = ({
8242
8444
  switch (connectionQuality) {
8243
8445
  case "offline":
8244
8446
  return {
8245
- icon: /* @__PURE__ */ jsx16(WifiOffIcon, { sx: { fontSize: 16 } }),
8447
+ icon: /* @__PURE__ */ jsx17(WifiOffIcon, { sx: { fontSize: 16 } }),
8246
8448
  label: "Offline",
8247
8449
  color: "error",
8248
8450
  severity: "high"
8249
8451
  };
8250
8452
  case "slow":
8251
8453
  return {
8252
- icon: /* @__PURE__ */ jsx16(SignalWifi2BarIcon, { sx: { fontSize: 16 } }),
8454
+ icon: /* @__PURE__ */ jsx17(SignalWifi2BarIcon, { sx: { fontSize: 16 } }),
8253
8455
  label: "Slow connection",
8254
8456
  color: "warning",
8255
8457
  severity: "medium"
8256
8458
  };
8257
8459
  case "fast":
8258
8460
  return {
8259
- icon: /* @__PURE__ */ jsx16(WifiIcon, { sx: { fontSize: 16 } }),
8461
+ icon: /* @__PURE__ */ jsx17(WifiIcon, { sx: { fontSize: 16 } }),
8260
8462
  label: "Connected",
8261
8463
  color: "success",
8262
8464
  severity: "low"
8263
8465
  };
8264
8466
  default:
8265
8467
  return {
8266
- icon: /* @__PURE__ */ jsx16(WifiIcon, { sx: { fontSize: 16 } }),
8468
+ icon: /* @__PURE__ */ jsx17(WifiIcon, { sx: { fontSize: 16 } }),
8267
8469
  label: "Unknown",
8268
8470
  color: "default",
8269
8471
  severity: "low"
@@ -8271,8 +8473,8 @@ var ConnectionStatus = ({
8271
8473
  }
8272
8474
  };
8273
8475
  const config = getStatusConfig();
8274
- return /* @__PURE__ */ jsx16(
8275
- Box13,
8476
+ return /* @__PURE__ */ jsx17(
8477
+ Box14,
8276
8478
  {
8277
8479
  sx: {
8278
8480
  position: "fixed",
@@ -8287,8 +8489,8 @@ var ConnectionStatus = ({
8287
8489
  "100%": { opacity: 1 }
8288
8490
  }
8289
8491
  },
8290
- children: /* @__PURE__ */ jsx16(
8291
- Chip4,
8492
+ children: /* @__PURE__ */ jsx17(
8493
+ Chip5,
8292
8494
  {
8293
8495
  icon: config.icon,
8294
8496
  label: config.label,
@@ -8311,7 +8513,7 @@ var ConnectionStatus = ({
8311
8513
  };
8312
8514
 
8313
8515
  // src/hooks/useVoiceMode.ts
8314
- import { useEffect as useEffect13, useRef as useRef12 } from "react";
8516
+ import { useEffect as useEffect14, useRef as useRef12 } from "react";
8315
8517
  var RMS_BASELINE = 128;
8316
8518
  var RMS_NORMALIZER = 128;
8317
8519
  var computeRms = (data) => {
@@ -8342,10 +8544,10 @@ var useVoiceMode = (config) => {
8342
8544
  const resetTransientState = useVoiceModeStore((state) => state.resetTransientState);
8343
8545
  const setLastTranscript = useVoiceModeStore((state) => state.setLastTranscript);
8344
8546
  const configRef = useRef12(config);
8345
- useEffect13(() => {
8547
+ useEffect14(() => {
8346
8548
  configRef.current = config;
8347
8549
  }, [config]);
8348
- useEffect13(() => {
8550
+ useEffect14(() => {
8349
8551
  if (!enabled) {
8350
8552
  return () => void 0;
8351
8553
  }
@@ -8600,7 +8802,7 @@ var useVoiceMode = (config) => {
8600
8802
  };
8601
8803
 
8602
8804
  // src/chat/chat.tsx
8603
- import { jsx as jsx17, jsxs as jsxs12 } from "react/jsx-runtime";
8805
+ import { jsx as jsx18, jsxs as jsxs13 } from "react/jsx-runtime";
8604
8806
  var ChatContent = () => {
8605
8807
  const packageSettings = usePackageSettingsStore((state) => state.settings);
8606
8808
  const featureFlag = useFeatureFlag();
@@ -8608,8 +8810,8 @@ var ChatContent = () => {
8608
8810
  const ossMode = isOSSMode() || !packageSettings?.featureFlags?.subscriptionType;
8609
8811
  const playgroundBypassAccess = packageSettings?.playgroundBypassAuth || typeof window !== "undefined" && window.location.pathname.includes("/playground");
8610
8812
  const notificationService = useNotificationService();
8611
- const [selectedTheme, setSelectedTheme] = useState14(null);
8612
- const [themeLoading, setThemeLoading] = useState14(true);
8813
+ const [selectedTheme, setSelectedTheme] = useState15(null);
8814
+ const [themeLoading, setThemeLoading] = useState15(true);
8613
8815
  const token = authenticationService.getToken();
8614
8816
  const claims = token ? authenticationService.parseJwtClaims(token) : null;
8615
8817
  const baseTheme = themeMap_default[selectedTheme ?? "bandit-dark"] || banditDarkTheme;
@@ -8662,7 +8864,7 @@ var ChatContent = () => {
8662
8864
  const isVoiceModeEnabled = useVoiceModeStore((state) => state.enabled);
8663
8865
  const previousVoiceModeEnabledRef = useRef13(isVoiceModeEnabled);
8664
8866
  const historyRef = useRef13(history);
8665
- useEffect14(() => {
8867
+ useEffect15(() => {
8666
8868
  historyRef.current = history;
8667
8869
  }, [history]);
8668
8870
  const {
@@ -8670,7 +8872,7 @@ var ChatContent = () => {
8670
8872
  stop: ttsStop,
8671
8873
  isAvailable: isTTSAvailable
8672
8874
  } = useTTS();
8673
- useEffect14(() => {
8875
+ useEffect15(() => {
8674
8876
  const timer = setTimeout(() => {
8675
8877
  const isAuthenticated = authenticationService.isAuthenticated();
8676
8878
  if (!initialized || availableVoices.length === 0) {
@@ -8684,7 +8886,7 @@ var ChatContent = () => {
8684
8886
  }, 500);
8685
8887
  return () => clearTimeout(timer);
8686
8888
  }, [initialized, availableVoices.length, loadVoicesFromAPI, token]);
8687
- useEffect14(() => {
8889
+ useEffect15(() => {
8688
8890
  const isAuthenticated = authenticationService.isAuthenticated();
8689
8891
  if (packageSettings?.gatewayApiUrl && availableVoices.length === 0 && !initialized) {
8690
8892
  if (token && isAuthenticated) {
@@ -8697,14 +8899,14 @@ var ChatContent = () => {
8697
8899
  }, [packageSettings?.gatewayApiUrl, availableVoices.length, initialized, loadVoicesFromAPI, token]);
8698
8900
  const provider = useAIProviderStore((state) => state.provider);
8699
8901
  const inputRef = useRef13(null);
8700
- const [pastedImages, setPastedImages] = useState14([]);
8902
+ const [pastedImages, setPastedImages] = useState15([]);
8701
8903
  const inputContainerRef = useRef13(null);
8702
- const [inputHeight, setInputHeight] = useState14(80);
8703
- const [isSubmitting, setIsSubmitting] = useState14(false);
8704
- const [pendingMessage, setPendingMessage] = useState14(null);
8904
+ const [inputHeight, setInputHeight] = useState15(80);
8905
+ const [isSubmitting, setIsSubmitting] = useState15(false);
8906
+ const [pendingMessage, setPendingMessage] = useState15(null);
8705
8907
  const { conversations, currentId, _hasHydrated, hydrate } = useConversationStore();
8706
- const [isMobile, setIsMobile] = useState14(false);
8707
- const [drawerOpen, setDrawerOpen] = useState14(false);
8908
+ const [isMobile, setIsMobile] = useState15(false);
8909
+ const [drawerOpen, setDrawerOpen] = useState15(false);
8708
8910
  const { generateName } = useConversationNameGenerator();
8709
8911
  const { preferences } = usePreferencesStore();
8710
8912
  const { containerRef: chatContainerRef, targetRef: scrollTargetRef, scrollToBottom, getScrollState } = useAutoScroll({
@@ -8716,14 +8918,14 @@ var ChatContent = () => {
8716
8918
  const chatContainerEl = chatContainerRef.current;
8717
8919
  const scrollTargetEl = scrollTargetRef.current;
8718
8920
  const { isSlowConnection, connectionQuality, trackRequestStart, trackRequestEnd } = useNetworkStatus();
8719
- const [showScrollToBottom, setShowScrollToBottom] = useState14(false);
8720
- const [streamBuffer, setStreamBuffer] = useState14("");
8721
- const [responseStarted, setResponseStarted] = useState14(false);
8722
- const [isStreaming, setIsStreaming] = useState14(false);
8723
- const [isThinking, setIsThinking] = useState14(false);
8921
+ const [showScrollToBottom, setShowScrollToBottom] = useState15(false);
8922
+ const [streamBuffer, setStreamBuffer] = useState15("");
8923
+ const [responseStarted, setResponseStarted] = useState15(false);
8924
+ const [isStreaming, setIsStreaming] = useState15(false);
8925
+ const [isThinking, setIsThinking] = useState15(false);
8724
8926
  const initialLogoState = history.length === 0;
8725
- const [logoVisible, setLogoVisible] = useState14(initialLogoState);
8726
- const [logoShouldRender, setLogoShouldRender] = useState14(initialLogoState);
8927
+ const [logoVisible, setLogoVisible] = useState15(initialLogoState);
8928
+ const [logoShouldRender, setLogoShouldRender] = useState15(initialLogoState);
8727
8929
  const streamingGraceUntilRef = useRef13(0);
8728
8930
  const GRACE_MS = 450;
8729
8931
  const GRACE_OFFSET_DESKTOP = 28;
@@ -8732,11 +8934,11 @@ var ChatContent = () => {
8732
8934
  const lastSpokenResponseRef = useRef13(null);
8733
8935
  const previousConversationIdRef = useRef13(null);
8734
8936
  const logoFadeTimeoutRef = useRef13(null);
8735
- const [branding, setBranding] = useState14(null);
8736
- const [brandingLoading, setBrandingLoading] = useState14(true);
8937
+ const [branding, setBranding] = useState15(null);
8938
+ const [brandingLoading, setBrandingLoading] = useState15(true);
8737
8939
  const isBrandingLoadInProgressRef = useRef13(false);
8738
8940
  const logoOnly = history.length === 0 && !brandingLoading;
8739
- useEffect14(() => {
8941
+ useEffect15(() => {
8740
8942
  const isEmptyConversation = (history?.length ?? 0) === 0;
8741
8943
  const isSending = Boolean(pendingMessage);
8742
8944
  const shouldShowLogo = isEmptyConversation && !isSending;
@@ -8766,7 +8968,7 @@ var ChatContent = () => {
8766
8968
  }, 500);
8767
8969
  }
8768
8970
  }, [history, pendingMessage]);
8769
- useEffect14(() => {
8971
+ useEffect15(() => {
8770
8972
  if (!brandingLoading && !themeLoading) {
8771
8973
  return;
8772
8974
  }
@@ -8782,18 +8984,18 @@ var ChatContent = () => {
8782
8984
  }, 2500);
8783
8985
  return () => window.clearTimeout(timeoutId);
8784
8986
  }, [brandingLoading, themeLoading, selectedTheme]);
8785
- useEffect14(() => () => {
8987
+ useEffect15(() => () => {
8786
8988
  if (logoFadeTimeoutRef.current) {
8787
8989
  window.clearTimeout(logoFadeTimeoutRef.current);
8788
8990
  logoFadeTimeoutRef.current = null;
8789
8991
  }
8790
8992
  }, []);
8791
- useEffect14(() => {
8993
+ useEffect15(() => {
8792
8994
  if (isStreaming && streamBuffer.trim() === "") {
8793
8995
  streamingGraceUntilRef.current = Date.now() + GRACE_MS;
8794
8996
  }
8795
8997
  }, [isStreaming, streamBuffer]);
8796
- useEffect14(() => {
8998
+ useEffect15(() => {
8797
8999
  if (!isStreaming) return;
8798
9000
  const container = chatContainerRef.current;
8799
9001
  if (!container) return;
@@ -8804,13 +9006,13 @@ var ChatContent = () => {
8804
9006
  container.scrollTo({ top: targetTop, behavior: "smooth" });
8805
9007
  }
8806
9008
  }, [streamBuffer, isStreaming, isMobile, chatContainerRef]);
8807
- useEffect14(() => {
9009
+ useEffect15(() => {
8808
9010
  if (!_hasHydrated) {
8809
9011
  debugLogger.info("Chat component triggering conversation store hydration");
8810
9012
  hydrate();
8811
9013
  }
8812
9014
  }, [_hasHydrated, hydrate]);
8813
- useEffect14(() => {
9015
+ useEffect15(() => {
8814
9016
  const loadBrandingAndTheme = async () => {
8815
9017
  if (isBrandingLoadInProgressRef.current) {
8816
9018
  debugLogger.warn("Branding loading already in progress, skipping");
@@ -8997,19 +9199,19 @@ var ChatContent = () => {
8997
9199
  window.removeEventListener("bandit-theme-changed", handleThemeChange);
8998
9200
  };
8999
9201
  }, []);
9000
- useEffect14(() => {
9202
+ useEffect15(() => {
9001
9203
  if (!chatContainerEl) return;
9002
9204
  const blurInputOnScroll = () => inputRef.current?.blur();
9003
9205
  chatContainerEl.addEventListener("scroll", blurInputOnScroll);
9004
9206
  return () => chatContainerEl.removeEventListener("scroll", blurInputOnScroll);
9005
9207
  }, [chatContainerEl]);
9006
- useEffect14(() => {
9208
+ useEffect15(() => {
9007
9209
  const handleResize = () => setIsMobile(window.innerWidth <= 768);
9008
9210
  handleResize();
9009
9211
  window.addEventListener("resize", handleResize);
9010
9212
  return () => window.removeEventListener("resize", handleResize);
9011
9213
  }, []);
9012
- useEffect14(() => {
9214
+ useEffect15(() => {
9013
9215
  const setViewportHeight = () => {
9014
9216
  document.documentElement.style.setProperty(
9015
9217
  "--vh",
@@ -9020,7 +9222,7 @@ var ChatContent = () => {
9020
9222
  window.addEventListener("resize", setViewportHeight);
9021
9223
  return () => window.removeEventListener("resize", setViewportHeight);
9022
9224
  }, []);
9023
- useEffect14(() => {
9225
+ useEffect15(() => {
9024
9226
  if (!chatContainerEl) return;
9025
9227
  let rafId = null;
9026
9228
  const update = () => {
@@ -9039,7 +9241,7 @@ var ChatContent = () => {
9039
9241
  chatContainerEl.removeEventListener(SCROLL_STATE_CHANGED_EVENT, update);
9040
9242
  };
9041
9243
  }, [chatContainerEl, getScrollState]);
9042
- useEffect14(() => {
9244
+ useEffect15(() => {
9043
9245
  if (!chatContainerEl) return;
9044
9246
  let observer = null;
9045
9247
  let rafId = null;
@@ -9074,7 +9276,7 @@ var ChatContent = () => {
9074
9276
  if (observer) observer.disconnect();
9075
9277
  };
9076
9278
  }, [chatContainerEl, scrollTargetEl, scrollTargetRef, getScrollState, inputHeight, history.length]);
9077
- useEffect14(() => {
9279
+ useEffect15(() => {
9078
9280
  const isTransitioning = isStreaming || streamBuffer.trim() === "";
9079
9281
  const delay = isTransitioning ? 400 : 100;
9080
9282
  const timer = setTimeout(() => {
@@ -9117,7 +9319,7 @@ var ChatContent = () => {
9117
9319
  return () => clearTimeout(scrollTimer);
9118
9320
  }
9119
9321
  }, [history, isStreaming, scrollToBottom, getScrollState, isMobile, chatContainerRef]);
9120
- useEffect14(() => {
9322
+ useEffect15(() => {
9121
9323
  const observer = new ResizeObserver(() => {
9122
9324
  if (inputContainerRef.current)
9123
9325
  setInputHeight(inputContainerRef.current.offsetHeight);
@@ -9128,7 +9330,7 @@ var ChatContent = () => {
9128
9330
  }
9129
9331
  return () => observer.disconnect();
9130
9332
  }, []);
9131
- useEffect14(() => {
9333
+ useEffect15(() => {
9132
9334
  if (!hydrated || !_hasHydrated) return;
9133
9335
  if (currentId === null) {
9134
9336
  useAIQueryStore.setState({ history: [] });
@@ -9177,7 +9379,7 @@ var ChatContent = () => {
9177
9379
  setResponse,
9178
9380
  setComponentStatus
9179
9381
  ]);
9180
- useEffect14(() => {
9382
+ useEffect15(() => {
9181
9383
  debugLogger.info("Chat component conversation state", {
9182
9384
  hasHydrated: _hasHydrated,
9183
9385
  conversationCount: conversations.length,
@@ -9186,7 +9388,7 @@ var ChatContent = () => {
9186
9388
  storeState: "main-chat"
9187
9389
  });
9188
9390
  }, [_hasHydrated, conversations, currentId]);
9189
- useEffect14(() => {
9391
+ useEffect15(() => {
9190
9392
  if (!_hasHydrated || !chatContainerEl) return;
9191
9393
  let rafId = null;
9192
9394
  const sync = () => {
@@ -9376,7 +9578,7 @@ var ChatContent = () => {
9376
9578
  onInterrupt: handleVoiceInterrupt,
9377
9579
  onError: (message) => notificationService?.showError?.(message)
9378
9580
  });
9379
- useEffect14(() => {
9581
+ useEffect15(() => {
9380
9582
  const previouslyEnabled = previousVoiceModeEnabledRef.current;
9381
9583
  previousVoiceModeEnabledRef.current = isVoiceModeEnabled;
9382
9584
  if (!previouslyEnabled && isVoiceModeEnabled) {
@@ -9401,7 +9603,7 @@ var ChatContent = () => {
9401
9603
  }
9402
9604
  }
9403
9605
  }, [isVoiceModeEnabled, ttsStop]);
9404
- useEffect14(() => {
9606
+ useEffect15(() => {
9405
9607
  if (!isVoiceModeEnabled || !isStreaming) {
9406
9608
  return;
9407
9609
  }
@@ -9421,7 +9623,7 @@ var ChatContent = () => {
9421
9623
  }
9422
9624
  lastSpokenResponseRef.current = null;
9423
9625
  }, [isStreaming, isVoiceModeEnabled, ttsStop]);
9424
- useEffect14(() => {
9626
+ useEffect15(() => {
9425
9627
  if (!isVoiceModeEnabled) {
9426
9628
  lastSpokenResponseRef.current = null;
9427
9629
  return;
@@ -9501,10 +9703,10 @@ var ChatContent = () => {
9501
9703
  }
9502
9704
  };
9503
9705
  if (!hydrated || brandingLoading || themeLoading) {
9504
- return /* @__PURE__ */ jsxs12(ThemeProvider, { theme: banditTheme, children: [
9505
- /* @__PURE__ */ jsx17(CssBaseline, {}),
9506
- /* @__PURE__ */ jsxs12(
9507
- Box14,
9706
+ return /* @__PURE__ */ jsxs13(ThemeProvider, { theme: banditTheme, children: [
9707
+ /* @__PURE__ */ jsx18(CssBaseline, {}),
9708
+ /* @__PURE__ */ jsxs13(
9709
+ Box15,
9508
9710
  {
9509
9711
  sx: (theme) => ({
9510
9712
  minHeight: "100dvh",
@@ -9517,8 +9719,8 @@ var ChatContent = () => {
9517
9719
  color: theme.palette.text.primary
9518
9720
  }),
9519
9721
  children: [
9520
- /* @__PURE__ */ jsx17(CircularProgress4, { size: 32, thickness: 4 }),
9521
- /* @__PURE__ */ jsx17(Typography10, { variant: "body2", color: "text.secondary", children: "Preparing your workspace..." })
9722
+ /* @__PURE__ */ jsx18(CircularProgress4, { size: 32, thickness: 4 }),
9723
+ /* @__PURE__ */ jsx18(Typography11, { variant: "body2", color: "text.secondary", children: "Preparing your workspace..." })
9522
9724
  ]
9523
9725
  }
9524
9726
  )
@@ -9526,15 +9728,15 @@ var ChatContent = () => {
9526
9728
  }
9527
9729
  const userHasAccess = playgroundBypassAccess || ossMode || claims?.roles?.includes("super-user") || claims?.roles?.includes("admin");
9528
9730
  if (!userHasAccess) {
9529
- return /* @__PURE__ */ jsxs12(ThemeProvider, { theme: banditTheme, children: [
9530
- /* @__PURE__ */ jsx17(CssBaseline, {}),
9531
- /* @__PURE__ */ jsx17(under_review_default, {})
9731
+ return /* @__PURE__ */ jsxs13(ThemeProvider, { theme: banditTheme, children: [
9732
+ /* @__PURE__ */ jsx18(CssBaseline, {}),
9733
+ /* @__PURE__ */ jsx18(under_review_default, {})
9532
9734
  ] });
9533
9735
  }
9534
- return /* @__PURE__ */ jsxs12(ThemeProvider, { theme: banditTheme, children: [
9535
- /* @__PURE__ */ jsx17(CssBaseline, {}),
9536
- /* @__PURE__ */ jsxs12(
9537
- Box14,
9736
+ return /* @__PURE__ */ jsxs13(ThemeProvider, { theme: banditTheme, children: [
9737
+ /* @__PURE__ */ jsx18(CssBaseline, {}),
9738
+ /* @__PURE__ */ jsxs13(
9739
+ Box15,
9538
9740
  {
9539
9741
  sx: (theme) => ({
9540
9742
  display: "flex",
@@ -9552,7 +9754,7 @@ var ChatContent = () => {
9552
9754
  transition: "left 0.3s ease-in-out, width 0.3s ease-in-out"
9553
9755
  }),
9554
9756
  children: [
9555
- /* @__PURE__ */ jsx17(
9757
+ /* @__PURE__ */ jsx18(
9556
9758
  chat_app_bar_default,
9557
9759
  {
9558
9760
  availableModels,
@@ -9564,8 +9766,8 @@ var ChatContent = () => {
9564
9766
  setDrawerOpen
9565
9767
  }
9566
9768
  ),
9567
- /* @__PURE__ */ jsx17(
9568
- Box14,
9769
+ /* @__PURE__ */ jsx18(
9770
+ Box15,
9569
9771
  {
9570
9772
  ref: chatContainerRef,
9571
9773
  sx: {
@@ -9585,8 +9787,8 @@ var ChatContent = () => {
9585
9787
  msOverflowStyle: "none",
9586
9788
  "&::-webkit-scrollbar": { display: "none" }
9587
9789
  },
9588
- children: /* @__PURE__ */ jsxs12(
9589
- Box14,
9790
+ children: /* @__PURE__ */ jsxs13(
9791
+ Box15,
9590
9792
  {
9591
9793
  sx: {
9592
9794
  width: "100%",
@@ -9596,9 +9798,9 @@ var ChatContent = () => {
9596
9798
  pt: 2
9597
9799
  },
9598
9800
  children: [
9599
- logoShouldRender && !brandingLoading && (branding?.logoBase64 ? /* @__PURE__ */ jsx17(custom_logo_default, { visible: logoVisible, atTop: true }) : /* @__PURE__ */ jsx17(bandit_chat_logo_default, { visible: logoVisible, atTop: true })),
9600
- /* @__PURE__ */ jsx17(
9601
- Box14,
9801
+ logoShouldRender && !brandingLoading && (branding?.logoBase64 ? /* @__PURE__ */ jsx18(custom_logo_default, { visible: logoVisible, atTop: true }) : /* @__PURE__ */ jsx18(bandit_chat_logo_default, { visible: logoVisible, atTop: true })),
9802
+ /* @__PURE__ */ jsx18(
9803
+ Box15,
9602
9804
  {
9603
9805
  sx: {
9604
9806
  margin: "0 auto",
@@ -9607,7 +9809,7 @@ var ChatContent = () => {
9607
9809
  flexShrink: 0,
9608
9810
  px: isMobile ? 0 : 0
9609
9811
  },
9610
- children: /* @__PURE__ */ jsx17(
9812
+ children: /* @__PURE__ */ jsx18(
9611
9813
  chat_messages_default,
9612
9814
  {
9613
9815
  isStreaming,
@@ -9631,7 +9833,7 @@ var ChatContent = () => {
9631
9833
  )
9632
9834
  }
9633
9835
  ),
9634
- showScrollToBottom && /* @__PURE__ */ jsx17(
9836
+ showScrollToBottom && /* @__PURE__ */ jsx18(
9635
9837
  chat_scroll_to_bottom_button_default,
9636
9838
  {
9637
9839
  inputHeight,
@@ -9640,8 +9842,8 @@ var ChatContent = () => {
9640
9842
  onClick: handleScrollToBottomClick
9641
9843
  }
9642
9844
  ),
9643
- history.length === 0 && componentStatus !== "Loading" && !isMobile && /* @__PURE__ */ jsx17(
9644
- Box14,
9845
+ history.length === 0 && componentStatus !== "Loading" && !isMobile && /* @__PURE__ */ jsx18(
9846
+ Box15,
9645
9847
  {
9646
9848
  sx: (theme) => ({
9647
9849
  position: "absolute",
@@ -9659,8 +9861,8 @@ var ChatContent = () => {
9659
9861
  })
9660
9862
  }
9661
9863
  ),
9662
- /* @__PURE__ */ jsxs12(
9663
- Box14,
9864
+ /* @__PURE__ */ jsxs13(
9865
+ Box15,
9664
9866
  {
9665
9867
  sx: {
9666
9868
  display: "flex",
@@ -9671,9 +9873,10 @@ var ChatContent = () => {
9671
9873
  maxWidth: "768px"
9672
9874
  },
9673
9875
  children: [
9674
- /* @__PURE__ */ jsx17(Box14, { sx: { flex: "1 1 auto" } }),
9675
- history.length === 0 && componentStatus !== "Loading" && !pendingMessage && preferences.chatSuggestionsEnabled && /* @__PURE__ */ jsx17(Box14, { sx: { marginBottom: "20px" }, children: /* @__PURE__ */ jsx17(QuerySuggestionPicker, { onSend: handleSend, inputHeight }) }),
9676
- /* @__PURE__ */ jsx17(
9876
+ /* @__PURE__ */ jsx18(Box15, { sx: { flex: "1 1 auto" } }),
9877
+ history.length === 0 && componentStatus !== "Loading" && !pendingMessage && preferences.chatSuggestionsEnabled && /* @__PURE__ */ jsx18(Box15, { sx: { marginBottom: "20px" }, children: /* @__PURE__ */ jsx18(QuerySuggestionPicker, { onSend: handleSend, inputHeight }) }),
9878
+ /* @__PURE__ */ jsx18(ask_user_card_default, {}),
9879
+ /* @__PURE__ */ jsx18(
9677
9880
  chat_input_default,
9678
9881
  {
9679
9882
  inputValue,
@@ -9700,7 +9903,7 @@ var ChatContent = () => {
9700
9903
  ]
9701
9904
  }
9702
9905
  ),
9703
- preferences.feedbackEnabled && !isMobile && /* @__PURE__ */ jsx17(
9906
+ preferences.feedbackEnabled && !isMobile && /* @__PURE__ */ jsx18(
9704
9907
  FeedbackButton,
9705
9908
  {
9706
9909
  fullScreen: false,
@@ -9713,7 +9916,7 @@ var ChatContent = () => {
9713
9916
  }
9714
9917
  }
9715
9918
  ),
9716
- /* @__PURE__ */ jsx17(ConnectionStatus, { position: "top", showWhenGood: false })
9919
+ /* @__PURE__ */ jsx18(ConnectionStatus, { position: "top", showWhenGood: false })
9717
9920
  ]
9718
9921
  }
9719
9922
  )
@@ -9742,13 +9945,13 @@ var Chat = () => {
9742
9945
  });
9743
9946
  if (!allowUnauthenticated && !bypassAuth && !authenticationService.isAuthenticated()) {
9744
9947
  debugLogger.debug("User is not authenticated, redirecting to login");
9745
- return /* @__PURE__ */ jsx17(Navigate, { to: "/login", replace: true });
9948
+ return /* @__PURE__ */ jsx18(Navigate, { to: "/login", replace: true });
9746
9949
  }
9747
- return /* @__PURE__ */ jsx17(ChatContent, {});
9950
+ return /* @__PURE__ */ jsx18(ChatContent, {});
9748
9951
  };
9749
9952
  var chat_default = Chat;
9750
9953
 
9751
9954
  export {
9752
9955
  chat_default
9753
9956
  };
9754
- //# sourceMappingURL=chunk-6KU3NOZW.mjs.map
9957
+ //# sourceMappingURL=chunk-CMBYMC3G.mjs.map