@burtson-labs/bandit-engine 2.0.81 → 2.0.83

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.
@@ -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 useEffect15, useLayoutEffect, useMemo as useMemo3, useRef as useRef13, useState as useState15 } from "react";
87
+ import { useCallback as useCallback6, useEffect as useEffect15, useLayoutEffect, useMemo as useMemo4, useRef as useRef13, useState as useState16 } 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 Box15, ThemeProvider, CssBaseline, CircularProgress as CircularProgress4, Typography as Typography11 } from "@mui/material";
174
+ import { Box as Box16, 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
 
@@ -248,8 +248,133 @@ var BanditChatLogo = ({ atTop = false, visible = false }) => {
248
248
  var bandit_chat_logo_default = BanditChatLogo;
249
249
 
250
250
  // src/chat/chat-messages.tsx
251
- import { Box as Box2 } from "@mui/material";
251
+ import { Box as Box3 } from "@mui/material";
252
+
253
+ // src/chat/source-chips.tsx
254
+ import { useMemo, useState as useState2 } from "react";
255
+ import { Box as Box2, Tooltip } from "@mui/material";
252
256
  import { jsx as jsx4, jsxs } from "react/jsx-runtime";
257
+ var parseWebSources = (content) => {
258
+ if (!content) return [];
259
+ const idx = content.lastIndexOf("**Sources**");
260
+ if (idx === -1) return [];
261
+ const section = content.slice(idx);
262
+ const out = [];
263
+ const re = /^\s*[-*]\s*\[([^\]]+)\]\(([^)\s]+)\)/gm;
264
+ let m;
265
+ while ((m = re.exec(section)) !== null) {
266
+ const url = m[2].trim();
267
+ if (/^https?:\/\//i.test(url)) {
268
+ out.push({ title: m[1].trim(), url });
269
+ }
270
+ }
271
+ const seen = /* @__PURE__ */ new Set();
272
+ return out.filter((s) => seen.has(s.url) ? false : (seen.add(s.url), true));
273
+ };
274
+ var stripSourcesForDisplay = (content) => {
275
+ if (!content) return content;
276
+ let c = content;
277
+ const idx = c.lastIndexOf("**Sources**");
278
+ if (idx !== -1) c = c.slice(0, idx);
279
+ c = c.replace(
280
+ /\n*(?:---|\*\*\*|___)[ \t]*\n[\s\S]*$/u,
281
+ (m) => /[¹²³⁴⁵⁶⁷⁸⁹⁰]/u.test(m) && /\]\(https?:/i.test(m) ? "" : m
282
+ );
283
+ return c.replace(/\s+$/u, "");
284
+ };
285
+ var domainOf = (url) => {
286
+ try {
287
+ return new URL(url).hostname.replace(/^www\./, "");
288
+ } catch {
289
+ return url;
290
+ }
291
+ };
292
+ var SourceChip = ({ source }) => {
293
+ const [failed, setFailed] = useState2(false);
294
+ const domain = domainOf(source.url);
295
+ const label = source.title?.trim() || domain;
296
+ return /* @__PURE__ */ jsx4(Tooltip, { title: `${label} \xB7 ${domain}`, arrow: true, children: /* @__PURE__ */ jsxs(
297
+ Box2,
298
+ {
299
+ component: "a",
300
+ href: source.url,
301
+ target: "_blank",
302
+ rel: "noopener noreferrer",
303
+ sx: {
304
+ display: "inline-flex",
305
+ alignItems: "center",
306
+ gap: 0.75,
307
+ maxWidth: 240,
308
+ px: 1,
309
+ py: 0.4,
310
+ borderRadius: 999,
311
+ border: "1px solid",
312
+ borderColor: "divider",
313
+ bgcolor: "action.hover",
314
+ textDecoration: "none",
315
+ color: "text.primary",
316
+ fontSize: 12.5,
317
+ lineHeight: 1.4,
318
+ transition: "border-color 0.15s ease, background-color 0.15s ease",
319
+ "&:hover": { borderColor: "primary.main", bgcolor: "action.selected" }
320
+ },
321
+ children: [
322
+ failed ? /* @__PURE__ */ jsx4(
323
+ Box2,
324
+ {
325
+ sx: {
326
+ width: 16,
327
+ height: 16,
328
+ borderRadius: "4px",
329
+ bgcolor: "primary.main",
330
+ color: "primary.contrastText",
331
+ display: "grid",
332
+ placeItems: "center",
333
+ fontSize: 9,
334
+ fontWeight: 700,
335
+ flexShrink: 0
336
+ },
337
+ children: domain.charAt(0).toUpperCase()
338
+ }
339
+ ) : /* @__PURE__ */ jsx4(
340
+ Box2,
341
+ {
342
+ component: "img",
343
+ src: `https://icons.duckduckgo.com/ip3/${domain}.ico`,
344
+ alt: "",
345
+ loading: "lazy",
346
+ onError: () => setFailed(true),
347
+ sx: { width: 16, height: 16, borderRadius: "4px", flexShrink: 0 }
348
+ }
349
+ ),
350
+ /* @__PURE__ */ jsx4(
351
+ Box2,
352
+ {
353
+ component: "span",
354
+ sx: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" },
355
+ children: label
356
+ }
357
+ )
358
+ ]
359
+ }
360
+ ) });
361
+ };
362
+ var SourceChips = ({ content }) => {
363
+ const sources = useMemo(() => parseWebSources(content), [content]);
364
+ if (sources.length === 0) return null;
365
+ return /* @__PURE__ */ jsx4(
366
+ Box2,
367
+ {
368
+ sx: { display: "flex", flexWrap: "wrap", gap: 0.75, mt: 1.5 },
369
+ "aria-label": "Sources",
370
+ children: sources.map((s, i) => /* @__PURE__ */ jsx4(SourceChip, { source: s }, `${s.url}-${i}`))
371
+ }
372
+ );
373
+ };
374
+ var source_chips_default = SourceChips;
375
+
376
+ // src/chat/chat-messages.tsx
377
+ import { jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
253
378
  var ChatMessages = ({
254
379
  pendingMessage,
255
380
  streamBuffer,
@@ -269,7 +394,7 @@ var ChatMessages = ({
269
394
  const lastIndex = history.length - 1;
270
395
  const hasActivePlaceholder = lastIndex >= 0 && history[lastIndex]?.answer === "...";
271
396
  if (!responseStarted && !pendingMessage && history.length === 0) return null;
272
- return /* @__PURE__ */ jsxs(Box2, { sx: { px: isMobile ? 0 : 0, pt: "100px", display: "flex", flexDirection: "column", gap: 2 }, children: [
397
+ return /* @__PURE__ */ jsxs2(Box3, { sx: { px: isMobile ? 0 : 0, pt: "100px", display: "flex", flexDirection: "column", gap: 2 }, children: [
273
398
  history.map((entry, index) => {
274
399
  const isLast = index === lastIndex;
275
400
  const isPlaceholder = entry.answer === "...";
@@ -278,8 +403,8 @@ var ChatMessages = ({
278
403
  const content = isLast ? isStreaming ? streamBuffer || "" : isPlaceholder ? "" : entry.answer : entry.answer;
279
404
  const rawSources = entry.sourceFiles;
280
405
  const sourceSummaries = rawSources ? rawSources.filter((doc) => doc && typeof doc.name === "string" && doc.name.trim()).map((doc) => ({ id: doc.id || doc.name, name: doc.name.trim() })) : void 0;
281
- const responseNode = /* @__PURE__ */ jsxs(
282
- Box2,
406
+ const responseNode = /* @__PURE__ */ jsxs2(
407
+ Box3,
283
408
  {
284
409
  sx: {
285
410
  minHeight: isLast ? isMobile ? "80px" : "60px" : void 0,
@@ -288,8 +413,8 @@ var ChatMessages = ({
288
413
  transition: "min-height 0.25s cubic-bezier(0.4, 0, 0.2, 1)"
289
414
  },
290
415
  children: [
291
- /* @__PURE__ */ jsx4(
292
- Box2,
416
+ /* @__PURE__ */ jsx5(
417
+ Box3,
293
418
  {
294
419
  sx: {
295
420
  position: showLoader ? "static" : "absolute",
@@ -302,14 +427,14 @@ var ChatMessages = ({
302
427
  pointerEvents: showLoader ? "auto" : "none",
303
428
  zIndex: showLoader ? 1 : 0
304
429
  },
305
- children: /* @__PURE__ */ jsxs(Box2, { sx: { display: "flex", alignItems: "center", gap: 1, minHeight: "40px", pl: 2 }, children: [
306
- /* @__PURE__ */ jsxs("div", { className: "typing-only", children: [
307
- /* @__PURE__ */ jsx4("span", { className: "dot" }),
308
- /* @__PURE__ */ jsx4("span", { className: "dot" }),
309
- /* @__PURE__ */ jsx4("span", { className: "dot" })
430
+ children: /* @__PURE__ */ jsxs2(Box3, { sx: { display: "flex", alignItems: "center", gap: 1, minHeight: "40px", pl: 2 }, children: [
431
+ /* @__PURE__ */ jsxs2("div", { className: "typing-only", children: [
432
+ /* @__PURE__ */ jsx5("span", { className: "dot" }),
433
+ /* @__PURE__ */ jsx5("span", { className: "dot" }),
434
+ /* @__PURE__ */ jsx5("span", { className: "dot" })
310
435
  ] }),
311
- showThinking && /* @__PURE__ */ jsx4(
312
- Box2,
436
+ showThinking && /* @__PURE__ */ jsx5(
437
+ Box3,
313
438
  {
314
439
  component: "span",
315
440
  sx: {
@@ -325,8 +450,8 @@ var ChatMessages = ({
325
450
  ] })
326
451
  }
327
452
  ),
328
- /* @__PURE__ */ jsx4(
329
- Box2,
453
+ /* @__PURE__ */ jsxs2(
454
+ Box3,
330
455
  {
331
456
  sx: {
332
457
  position: showLoader ? "absolute" : "static",
@@ -339,20 +464,23 @@ var ChatMessages = ({
339
464
  pointerEvents: showLoader ? "none" : "auto",
340
465
  zIndex: 1
341
466
  },
342
- children: /* @__PURE__ */ jsx4(
343
- StreamingMarkdown_default,
344
- {
345
- content,
346
- isStreaming: isStreaming && isLast,
347
- sources: sourceSummaries
348
- }
349
- )
467
+ children: [
468
+ /* @__PURE__ */ jsx5(
469
+ StreamingMarkdown_default,
470
+ {
471
+ content: isStreaming && isLast ? content : stripSourcesForDisplay(content),
472
+ isStreaming: isStreaming && isLast,
473
+ sources: sourceSummaries
474
+ }
475
+ ),
476
+ /* @__PURE__ */ jsx5(source_chips_default, { content })
477
+ ]
350
478
  }
351
479
  )
352
480
  ]
353
481
  }
354
482
  );
355
- return /* @__PURE__ */ jsx4(Box2, { children: /* @__PURE__ */ jsx4(
483
+ return /* @__PURE__ */ jsx5(Box3, { children: /* @__PURE__ */ jsx5(
356
484
  ai_response_text_field_default,
357
485
  {
358
486
  question: entry.question,
@@ -367,17 +495,17 @@ var ChatMessages = ({
367
495
  }
368
496
  ) }, index);
369
497
  }),
370
- /* @__PURE__ */ jsx4("div", { style: { height: "1px" }, ref: scrollTargetRef })
498
+ /* @__PURE__ */ jsx5("div", { style: { height: "1px" }, ref: scrollTargetRef })
371
499
  ] });
372
500
  };
373
501
  var chat_messages_default = ChatMessages;
374
502
 
375
503
  // src/chat/chat-input.tsx
376
- import { useEffect as useEffect3, useRef as useRef2, useState as useState3 } from "react";
377
- import { Box as Box3, TextField, IconButton as IconButton3, Tooltip, Avatar as Avatar2, Typography, CircularProgress as CircularProgress2, Collapse } from "@mui/material";
504
+ import { useEffect as useEffect3, useRef as useRef2, useState as useState4 } from "react";
505
+ import { Box as Box4, TextField, IconButton as IconButton3, Tooltip as Tooltip2, Avatar as Avatar2, Typography, CircularProgress as CircularProgress2, Collapse } from "@mui/material";
378
506
 
379
507
  // src/services/stt/transcriber.tsx
380
- import { useState as useState2, useRef } from "react";
508
+ import { useState as useState3, useRef } from "react";
381
509
 
382
510
  // src/services/stt/sound-recorder.service.ts
383
511
  import { first, from, fromEvent, map, shareReplay, switchMap } from "rxjs";
@@ -523,7 +651,7 @@ var STTClient = class {
523
651
  // src/services/stt/transcriber.tsx
524
652
  import { CircularProgress, IconButton as IconButton2, useTheme as useTheme3 } from "@mui/material";
525
653
  import { from as from2, Subscription, switchMap as switchMap2 } from "rxjs";
526
- import { Fragment as Fragment2, jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
654
+ import { Fragment as Fragment2, jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
527
655
  var initialButtonStyles = (badgeBackground, fileText, hoverBadgeBackground) => ({
528
656
  bgcolor: badgeBackground,
529
657
  color: fileText,
@@ -537,10 +665,10 @@ var Transcriber = ({ onTranscriptionCompleted }) => {
537
665
  const badgeBackground = theme.palette.chat.badge;
538
666
  const fileText = theme.palette.chat.fileText;
539
667
  const hoverBadgeBackground = theme.palette.chat.badgeHover;
540
- const [status, setStatus] = useState2("IDLE");
668
+ const [status, setStatus] = useState3("IDLE");
541
669
  const recorderRef = useRef(new SoundRecorderService());
542
- const [iconButtonStyles] = useState2(() => initialButtonStyles(badgeBackground, fileText, hoverBadgeBackground));
543
- const [recordingSub, setRecordingSub] = useState2(() => new Subscription());
670
+ const [iconButtonStyles] = useState3(() => initialButtonStyles(badgeBackground, fileText, hoverBadgeBackground));
671
+ const [recordingSub, setRecordingSub] = useState3(() => new Subscription());
544
672
  const start = () => {
545
673
  recordingSub.unsubscribe();
546
674
  const recording = recorderRef.current.start();
@@ -571,7 +699,7 @@ var Transcriber = ({ onTranscriptionCompleted }) => {
571
699
  setStatus("LOADING");
572
700
  stop();
573
701
  };
574
- return /* @__PURE__ */ jsx5(
702
+ return /* @__PURE__ */ jsx6(
575
703
  "div",
576
704
  {
577
705
  style: {
@@ -581,16 +709,16 @@ var Transcriber = ({ onTranscriptionCompleted }) => {
581
709
  backgroundColor: status === "RECORDING" ? "rgba(0,0,0,.3)" : "rgba(0,0,0,0)",
582
710
  borderRadius: "50px"
583
711
  },
584
- children: status === "IDLE" ? /* @__PURE__ */ jsx5(IconButton2, { sx: { ...iconButtonStyles }, onClick: handleRecordClick, children: /* @__PURE__ */ jsx5(MicIcon, { sx: { color: "#aaa", cursor: "pointer" } }) }) : status === "RECORDING" ? /* @__PURE__ */ jsxs2(Fragment2, { children: [
585
- /* @__PURE__ */ jsx5(
712
+ children: status === "IDLE" ? /* @__PURE__ */ jsx6(IconButton2, { sx: { ...iconButtonStyles }, onClick: handleRecordClick, children: /* @__PURE__ */ jsx6(MicIcon, { sx: { color: "#aaa", cursor: "pointer" } }) }) : status === "RECORDING" ? /* @__PURE__ */ jsxs3(Fragment2, { children: [
713
+ /* @__PURE__ */ jsx6(
586
714
  IconButton2,
587
715
  {
588
716
  onClick: handleCancelClick,
589
717
  sx: { ...iconButtonStyles, marginRight: 1 },
590
- children: /* @__PURE__ */ jsx5(CloseIcon, {})
718
+ children: /* @__PURE__ */ jsx6(CloseIcon, {})
591
719
  }
592
720
  ),
593
- /* @__PURE__ */ jsx5(
721
+ /* @__PURE__ */ jsx6(
594
722
  IconButton2,
595
723
  {
596
724
  sx: {
@@ -598,10 +726,10 @@ var Transcriber = ({ onTranscriptionCompleted }) => {
598
726
  filter: "invert(110%)"
599
727
  },
600
728
  onClick: handleSubmitClick,
601
- children: /* @__PURE__ */ jsx5(CheckIcon, {})
729
+ children: /* @__PURE__ */ jsx6(CheckIcon, {})
602
730
  }
603
731
  )
604
- ] }) : status === "LOADING" ? /* @__PURE__ */ jsx5(IconButton2, { sx: { ...iconButtonStyles }, children: /* @__PURE__ */ jsx5(CircularProgress, { size: 20 }) }) : null
732
+ ] }) : status === "LOADING" ? /* @__PURE__ */ jsx6(IconButton2, { sx: { ...iconButtonStyles }, children: /* @__PURE__ */ jsx6(CircularProgress, { size: 20 }) }) : null
605
733
  }
606
734
  );
607
735
  };
@@ -647,7 +775,7 @@ var useVoiceModeStore = create((set) => ({
647
775
 
648
776
  // src/chat/chat-input.tsx
649
777
  import { shallow } from "zustand/shallow";
650
- import { Fragment as Fragment3, jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
778
+ import { Fragment as Fragment3, jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
651
779
  var ChatInput = (props) => {
652
780
  const {
653
781
  inputValue,
@@ -690,13 +818,13 @@ var ChatInput = (props) => {
690
818
  }),
691
819
  shallow
692
820
  );
693
- const [memoryOpen, setMemoryOpen] = useState3(false);
694
- const [fileInputs, setFileInputs] = useState3([]);
821
+ const [memoryOpen, setMemoryOpen] = useState4(false);
822
+ const [fileInputs, setFileInputs] = useState4([]);
695
823
  const fileInputRef = useRef2(null);
696
- const [brandingText, setBrandingText] = useState3("");
697
- const [feedbackModalOpen, setFeedbackModalOpen] = useState3(false);
698
- const [isKeyboardOpen, setKeyboardOpen] = useState3(false);
699
- const [moreActionsOpen, setMoreActionsOpen] = useState3(false);
824
+ const [brandingText, setBrandingText] = useState4("");
825
+ const [feedbackModalOpen, setFeedbackModalOpen] = useState4(false);
826
+ const [isKeyboardOpen, setKeyboardOpen] = useState4(false);
827
+ const [moreActionsOpen, setMoreActionsOpen] = useState4(false);
700
828
  const compactMobile = isMobile;
701
829
  const primaryIconSize = isMobile ? 32 : 40;
702
830
  const sendIconSize = isMobile ? 36 : 44;
@@ -944,7 +1072,7 @@ ${sanitize(
944
1072
  }, [isMobile, hasSecondaryActions]);
945
1073
  const renderAttachmentButton = (key) => {
946
1074
  if (!hasAttachmentAction) return null;
947
- return /* @__PURE__ */ jsx6(Tooltip, { title: "Attach files or images", children: /* @__PURE__ */ jsx6(
1075
+ return /* @__PURE__ */ jsx7(Tooltip2, { title: "Attach files or images", children: /* @__PURE__ */ jsx7(
948
1076
  IconButton3,
949
1077
  {
950
1078
  onClick: () => fileInputRef.current?.click(),
@@ -962,7 +1090,7 @@ ${sanitize(
962
1090
  };
963
1091
  const renderMemoryButton = (key) => {
964
1092
  if (!hasMemoryAction) return null;
965
- return /* @__PURE__ */ jsx6(Tooltip, { title: "Memory", children: /* @__PURE__ */ jsx6(
1093
+ return /* @__PURE__ */ jsx7(Tooltip2, { title: "Memory", children: /* @__PURE__ */ jsx7(
966
1094
  IconButton3,
967
1095
  {
968
1096
  onClick: () => setMemoryOpen(true),
@@ -974,13 +1102,13 @@ ${sanitize(
974
1102
  borderRadius: "50%",
975
1103
  "&:hover": { bgcolor: hoverBadgeBackground }
976
1104
  },
977
- children: /* @__PURE__ */ jsx6(PsychologyIcon, { fontSize: "small" })
1105
+ children: /* @__PURE__ */ jsx7(PsychologyIcon, { fontSize: "small" })
978
1106
  }
979
1107
  ) }, key ?? "memory");
980
1108
  };
981
1109
  const renderFeedbackButton = (key) => {
982
1110
  if (!hasFeedbackAction) return null;
983
- return /* @__PURE__ */ jsx6(Tooltip, { title: "Send Feedback", children: /* @__PURE__ */ jsx6(
1111
+ return /* @__PURE__ */ jsx7(Tooltip2, { title: "Send Feedback", children: /* @__PURE__ */ jsx7(
984
1112
  IconButton3,
985
1113
  {
986
1114
  onClick: () => setFeedbackModalOpen(true),
@@ -992,17 +1120,17 @@ ${sanitize(
992
1120
  borderRadius: "50%",
993
1121
  "&:hover": { bgcolor: hoverBadgeBackground }
994
1122
  },
995
- children: /* @__PURE__ */ jsx6(FeedbackIcon, { fontSize: "small" })
1123
+ children: /* @__PURE__ */ jsx7(FeedbackIcon, { fontSize: "small" })
996
1124
  }
997
1125
  ) }, key ?? "feedback");
998
1126
  };
999
1127
  const renderSttButton = (key) => {
1000
1128
  if (!hasSttAction) return null;
1001
- return /* @__PURE__ */ jsx6(Box3, { sx: { display: "flex", alignItems: "center" }, children: /* @__PURE__ */ jsx6(transcriber_default, { onTranscriptionCompleted: handleTranscriptionCompleted }) }, key ?? "stt");
1129
+ return /* @__PURE__ */ jsx7(Box4, { sx: { display: "flex", alignItems: "center" }, children: /* @__PURE__ */ jsx7(transcriber_default, { onTranscriptionCompleted: handleTranscriptionCompleted }) }, key ?? "stt");
1002
1130
  };
1003
- return /* @__PURE__ */ jsxs3(Fragment3, { children: [
1004
- /* @__PURE__ */ jsxs3(
1005
- Box3,
1131
+ return /* @__PURE__ */ jsxs4(Fragment3, { children: [
1132
+ /* @__PURE__ */ jsxs4(
1133
+ Box4,
1006
1134
  {
1007
1135
  sx: {
1008
1136
  width: "100%",
@@ -1021,8 +1149,8 @@ ${sanitize(
1021
1149
  },
1022
1150
  ref: inputContainerRef,
1023
1151
  children: [
1024
- /* @__PURE__ */ jsxs3(
1025
- Box3,
1152
+ /* @__PURE__ */ jsxs4(
1153
+ Box4,
1026
1154
  {
1027
1155
  sx: {
1028
1156
  width: "100%",
@@ -1037,8 +1165,8 @@ ${sanitize(
1037
1165
  gap: isMobile ? compactMobile ? 0.75 : 1 : 1
1038
1166
  },
1039
1167
  children: [
1040
- /* @__PURE__ */ jsxs3(
1041
- Box3,
1168
+ /* @__PURE__ */ jsxs4(
1169
+ Box4,
1042
1170
  {
1043
1171
  sx: {
1044
1172
  display: "flex",
@@ -1048,8 +1176,8 @@ ${sanitize(
1048
1176
  flexDirection: "row"
1049
1177
  },
1050
1178
  children: [
1051
- fileInputs.map((file, idx) => /* @__PURE__ */ jsxs3(
1052
- Box3,
1179
+ fileInputs.map((file, idx) => /* @__PURE__ */ jsxs4(
1180
+ Box4,
1053
1181
  {
1054
1182
  sx: {
1055
1183
  position: "relative",
@@ -1062,7 +1190,7 @@ ${sanitize(
1062
1190
  gap: isMobile ? compactMobile ? 0.6 : 0.9 : 1
1063
1191
  },
1064
1192
  children: [
1065
- /* @__PURE__ */ jsx6(
1193
+ /* @__PURE__ */ jsx7(
1066
1194
  Avatar2,
1067
1195
  {
1068
1196
  sx: {
@@ -1076,22 +1204,22 @@ ${sanitize(
1076
1204
  children: getFileIcon(file.name)
1077
1205
  }
1078
1206
  ),
1079
- /* @__PURE__ */ jsx6(Typography, { variant: "caption", sx: { color: fileText }, children: file.name }),
1080
- /* @__PURE__ */ jsx6(
1207
+ /* @__PURE__ */ jsx7(Typography, { variant: "caption", sx: { color: fileText }, children: file.name }),
1208
+ /* @__PURE__ */ jsx7(
1081
1209
  IconButton3,
1082
1210
  {
1083
1211
  size: "small",
1084
1212
  onClick: () => setFileInputs((prev) => prev.filter((_, i) => i !== idx)),
1085
1213
  sx: { ml: 0.5, color: theme.palette.mode === "dark" ? "#aaa" : "#444" },
1086
- children: /* @__PURE__ */ jsx6(CloseIcon, { sx: { fontSize: 14 } })
1214
+ children: /* @__PURE__ */ jsx7(CloseIcon, { sx: { fontSize: 14 } })
1087
1215
  }
1088
1216
  )
1089
1217
  ]
1090
1218
  },
1091
1219
  idx
1092
1220
  )),
1093
- pastedImages.map((img, idx) => /* @__PURE__ */ jsxs3(Box3, { sx: { position: "relative" }, children: [
1094
- /* @__PURE__ */ jsx6(
1221
+ pastedImages.map((img, idx) => /* @__PURE__ */ jsxs4(Box4, { sx: { position: "relative" }, children: [
1222
+ /* @__PURE__ */ jsx7(
1095
1223
  Avatar2,
1096
1224
  {
1097
1225
  src: img,
@@ -1103,7 +1231,7 @@ ${sanitize(
1103
1231
  }
1104
1232
  }
1105
1233
  ),
1106
- /* @__PURE__ */ jsx6(
1234
+ /* @__PURE__ */ jsx7(
1107
1235
  IconButton3,
1108
1236
  {
1109
1237
  size: "small",
@@ -1120,7 +1248,7 @@ ${sanitize(
1120
1248
  bgcolor: "rgba(255, 5, 5, 0.85)"
1121
1249
  }
1122
1250
  },
1123
- children: /* @__PURE__ */ jsx6(
1251
+ children: /* @__PURE__ */ jsx7(
1124
1252
  CloseIcon,
1125
1253
  {
1126
1254
  sx: {
@@ -1132,7 +1260,7 @@ ${sanitize(
1132
1260
  }
1133
1261
  )
1134
1262
  ] }, `img-${idx}`)),
1135
- /* @__PURE__ */ jsx6(
1263
+ /* @__PURE__ */ jsx7(
1136
1264
  "input",
1137
1265
  {
1138
1266
  type: "file",
@@ -1169,15 +1297,15 @@ ${sanitize(
1169
1297
  ]
1170
1298
  }
1171
1299
  ),
1172
- /* @__PURE__ */ jsx6(
1173
- Box3,
1300
+ /* @__PURE__ */ jsx7(
1301
+ Box4,
1174
1302
  {
1175
1303
  sx: {
1176
1304
  display: "flex",
1177
1305
  maxHeight: "200px",
1178
1306
  overflowY: "auto"
1179
1307
  },
1180
- children: /* @__PURE__ */ jsx6(
1308
+ children: /* @__PURE__ */ jsx7(
1181
1309
  TextField,
1182
1310
  {
1183
1311
  fullWidth: true,
@@ -1209,8 +1337,8 @@ ${sanitize(
1209
1337
  )
1210
1338
  }
1211
1339
  ),
1212
- /* @__PURE__ */ jsxs3(
1213
- Box3,
1340
+ /* @__PURE__ */ jsxs4(
1341
+ Box4,
1214
1342
  {
1215
1343
  sx: {
1216
1344
  display: "flex",
@@ -1220,8 +1348,8 @@ ${sanitize(
1220
1348
  mt: isMobile ? 0.5 : 1
1221
1349
  },
1222
1350
  children: [
1223
- /* @__PURE__ */ jsxs3(
1224
- Box3,
1351
+ /* @__PURE__ */ jsxs4(
1352
+ Box4,
1225
1353
  {
1226
1354
  sx: {
1227
1355
  display: "flex",
@@ -1230,12 +1358,12 @@ ${sanitize(
1230
1358
  minHeight: primaryIconSize
1231
1359
  },
1232
1360
  children: [
1233
- isVoiceModeEligible && /* @__PURE__ */ jsxs3(Fragment3, { children: [
1234
- /* @__PURE__ */ jsx6(
1235
- Tooltip,
1361
+ isVoiceModeEligible && /* @__PURE__ */ jsxs4(Fragment3, { children: [
1362
+ /* @__PURE__ */ jsx7(
1363
+ Tooltip2,
1236
1364
  {
1237
1365
  title: !isVoiceModeEnabled ? "Enable voice mode" : voiceStatus === "error" ? voiceError || "Voice mode error" : voiceStatus === "processing" ? "Transcribing your speech" : voiceStatus === "recording" ? "Recording - click to stop" : voiceStatus === "initializing" ? "Preparing microphone" : "Listening - click to turn off",
1238
- children: /* @__PURE__ */ jsx6(
1366
+ children: /* @__PURE__ */ jsx7(
1239
1367
  IconButton3,
1240
1368
  {
1241
1369
  onClick: toggleVoiceMode,
@@ -1252,12 +1380,12 @@ ${sanitize(
1252
1380
  bgcolor: isVoiceModeEnabled ? alpha(theme.palette.error.main, theme.palette.mode === "dark" ? 0.55 : 0.38) : hoverBadgeBackground
1253
1381
  }
1254
1382
  },
1255
- children: !isVoiceModeEnabled ? /* @__PURE__ */ jsx6(GraphicEqIcon, { fontSize: "small", sx: { color: theme.palette.mode === "dark" ? fileText : theme.palette.text.secondary } }) : voiceStatus === "processing" || voiceStatus === "initializing" ? /* @__PURE__ */ jsx6(CircularProgress2, { size: 18, sx: { color: fileText } }) : voiceStatus === "error" ? /* @__PURE__ */ jsx6(HearingDisabledIcon, { fontSize: "small", sx: { color: theme.palette.error.light } }) : voiceStatus === "recording" ? /* @__PURE__ */ jsx6(GraphicEqIcon, { fontSize: "small", sx: { color: theme.palette.error.light } }) : /* @__PURE__ */ jsx6(GraphicEqIcon, { fontSize: "small", sx: { color: theme.palette.common.white } })
1383
+ children: !isVoiceModeEnabled ? /* @__PURE__ */ jsx7(GraphicEqIcon, { fontSize: "small", sx: { color: theme.palette.mode === "dark" ? fileText : theme.palette.text.secondary } }) : voiceStatus === "processing" || voiceStatus === "initializing" ? /* @__PURE__ */ jsx7(CircularProgress2, { size: 18, sx: { color: fileText } }) : voiceStatus === "error" ? /* @__PURE__ */ jsx7(HearingDisabledIcon, { fontSize: "small", sx: { color: theme.palette.error.light } }) : voiceStatus === "recording" ? /* @__PURE__ */ jsx7(GraphicEqIcon, { fontSize: "small", sx: { color: theme.palette.error.light } }) : /* @__PURE__ */ jsx7(GraphicEqIcon, { fontSize: "small", sx: { color: theme.palette.common.white } })
1256
1384
  }
1257
1385
  )
1258
1386
  }
1259
1387
  ),
1260
- !isMobile && isVoiceModeEnabled && /* @__PURE__ */ jsx6(
1388
+ !isMobile && isVoiceModeEnabled && /* @__PURE__ */ jsx7(
1261
1389
  Typography,
1262
1390
  {
1263
1391
  variant: "caption",
@@ -1275,7 +1403,7 @@ ${sanitize(
1275
1403
  !isMobile && renderAttachmentButton("attach-inline"),
1276
1404
  !isMobile && renderMemoryButton("memory-inline"),
1277
1405
  !isMobile && renderSttButton("stt-inline"),
1278
- isMobile && hasSecondaryActions && /* @__PURE__ */ jsx6(
1406
+ isMobile && hasSecondaryActions && /* @__PURE__ */ jsx7(
1279
1407
  IconButton3,
1280
1408
  {
1281
1409
  onClick: () => setMoreActionsOpen((prev) => !prev),
@@ -1288,7 +1416,7 @@ ${sanitize(
1288
1416
  transition: "background-color 0.2s ease",
1289
1417
  "&:hover": { bgcolor: hoverBadgeBackground }
1290
1418
  },
1291
- children: /* @__PURE__ */ jsx6(
1419
+ children: /* @__PURE__ */ jsx7(
1292
1420
  ExpandMoreIcon,
1293
1421
  {
1294
1422
  fontSize: "small",
@@ -1303,7 +1431,7 @@ ${sanitize(
1303
1431
  ]
1304
1432
  }
1305
1433
  ),
1306
- /* @__PURE__ */ jsx6(Box3, { sx: { display: "flex", alignItems: "center", gap: isMobile ? 0.6 : 1 }, children: /* @__PURE__ */ jsx6(Tooltip, { title: isStreaming ? "Stop response" : "Send message", children: /* @__PURE__ */ jsx6("span", { children: /* @__PURE__ */ jsx6(
1434
+ /* @__PURE__ */ jsx7(Box4, { sx: { display: "flex", alignItems: "center", gap: isMobile ? 0.6 : 1 }, children: /* @__PURE__ */ jsx7(Tooltip2, { title: isStreaming ? "Stop response" : "Send message", children: /* @__PURE__ */ jsx7("span", { children: /* @__PURE__ */ jsx7(
1307
1435
  IconButton3,
1308
1436
  {
1309
1437
  onClick: isStreaming ? onStop || (() => {
@@ -1320,14 +1448,14 @@ ${sanitize(
1320
1448
  "&:hover": { bgcolor: sendButtonHover },
1321
1449
  "&.Mui-disabled": { opacity: 0.5 }
1322
1450
  },
1323
- children: isStreaming ? /* @__PURE__ */ jsx6(CloseIcon, { fontSize: "small" }) : /* @__PURE__ */ jsx6(ArrowUpwardIcon, { fontSize: "small" })
1451
+ children: isStreaming ? /* @__PURE__ */ jsx7(CloseIcon, { fontSize: "small" }) : /* @__PURE__ */ jsx7(ArrowUpwardIcon, { fontSize: "small" })
1324
1452
  }
1325
1453
  ) }) }) })
1326
1454
  ]
1327
1455
  }
1328
1456
  ),
1329
- isMobile && hasSecondaryActions && /* @__PURE__ */ jsx6(Collapse, { in: moreActionsOpen, unmountOnExit: true, children: /* @__PURE__ */ jsxs3(
1330
- Box3,
1457
+ isMobile && hasSecondaryActions && /* @__PURE__ */ jsx7(Collapse, { in: moreActionsOpen, unmountOnExit: true, children: /* @__PURE__ */ jsxs4(
1458
+ Box4,
1331
1459
  {
1332
1460
  sx: {
1333
1461
  display: "flex",
@@ -1348,7 +1476,7 @@ ${sanitize(
1348
1476
  ]
1349
1477
  }
1350
1478
  ),
1351
- /* @__PURE__ */ jsxs3(
1479
+ /* @__PURE__ */ jsxs4(
1352
1480
  Typography,
1353
1481
  {
1354
1482
  variant: "caption",
@@ -1374,8 +1502,8 @@ ${sanitize(
1374
1502
  ]
1375
1503
  }
1376
1504
  ),
1377
- isMemoryEnabled && /* @__PURE__ */ jsx6(memory_modal_default, { open: memoryOpen, onClose: () => setMemoryOpen(false) }),
1378
- isFeedbackEnabled && /* @__PURE__ */ jsx6(
1505
+ isMemoryEnabled && /* @__PURE__ */ jsx7(memory_modal_default, { open: memoryOpen, onClose: () => setMemoryOpen(false) }),
1506
+ isFeedbackEnabled && /* @__PURE__ */ jsx7(
1379
1507
  FeedbackModal,
1380
1508
  {
1381
1509
  open: feedbackModalOpen,
@@ -1388,8 +1516,8 @@ ${sanitize(
1388
1516
  var chat_input_default = ChatInput;
1389
1517
 
1390
1518
  // 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";
1519
+ import { useEffect as useEffect4, useState as useState5 } from "react";
1520
+ import { Box as Box5, Paper, Typography as Typography2, Button, TextField as TextField2, Chip, Stack } from "@mui/material";
1393
1521
  import { useTheme as useTheme5, alpha as alpha2 } from "@mui/material/styles";
1394
1522
 
1395
1523
  // src/store/askUserStore.ts
@@ -1455,12 +1583,12 @@ var parseAskUserQuestions = (rawJson) => {
1455
1583
  };
1456
1584
 
1457
1585
  // src/chat/ask-user-card.tsx
1458
- import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
1586
+ import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
1459
1587
  var AskUserCard = () => {
1460
1588
  const theme = useTheme5();
1461
1589
  const { pending, submit, cancel } = useAskUserStore();
1462
- const [selected, setSelected] = useState4({});
1463
- const [freeform, setFreeform] = useState4({});
1590
+ const [selected, setSelected] = useState5({});
1591
+ const [freeform, setFreeform] = useState5({});
1464
1592
  useEffect4(() => {
1465
1593
  if (!pending) return;
1466
1594
  const preselected = {};
@@ -1481,7 +1609,7 @@ var AskUserCard = () => {
1481
1609
  });
1482
1610
  submit(final);
1483
1611
  };
1484
- return /* @__PURE__ */ jsx7(Box4, { sx: { width: "100%", display: "flex", justifyContent: "center", px: { xs: 1, sm: 2 }, mb: 1.5 }, children: /* @__PURE__ */ jsxs4(
1612
+ return /* @__PURE__ */ jsx8(Box5, { sx: { width: "100%", display: "flex", justifyContent: "center", px: { xs: 1, sm: 2 }, mb: 1.5 }, children: /* @__PURE__ */ jsxs5(
1485
1613
  Paper,
1486
1614
  {
1487
1615
  elevation: 0,
@@ -1494,13 +1622,13 @@ var AskUserCard = () => {
1494
1622
  bgcolor: alpha2(theme.palette.primary.main, 0.06)
1495
1623
  },
1496
1624
  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) => {
1625
+ /* @__PURE__ */ jsx8(Typography2, { variant: "caption", sx: { color: theme.palette.primary.main, fontWeight: 700, letterSpacing: 0.4 }, children: "BANDIT NEEDS A QUICK DECISION" }),
1626
+ pending.questions.map((q) => /* @__PURE__ */ jsxs5(Box5, { sx: { mt: 1.5 }, children: [
1627
+ q.header && /* @__PURE__ */ jsx8(Chip, { label: q.header, size: "small", sx: { mb: 0.75, fontWeight: 600 }, color: "primary", variant: "outlined" }),
1628
+ /* @__PURE__ */ jsx8(Typography2, { sx: { fontWeight: 600, color: theme.palette.text.primary, mb: 1 }, children: q.question }),
1629
+ q.options && q.options.length > 0 && /* @__PURE__ */ jsx8(Stack, { spacing: 1, children: q.options.map((opt) => {
1502
1630
  const isSel = selected[q.id] === opt.label && !freeform[q.id]?.trim();
1503
- return /* @__PURE__ */ jsx7(
1631
+ return /* @__PURE__ */ jsx8(
1504
1632
  Button,
1505
1633
  {
1506
1634
  onClick: () => {
@@ -1517,9 +1645,9 @@ var AskUserCard = () => {
1517
1645
  px: 1.5,
1518
1646
  borderColor: alpha2(theme.palette.primary.main, 0.4)
1519
1647
  },
1520
- children: /* @__PURE__ */ jsxs4(Box4, { children: [
1521
- /* @__PURE__ */ jsx7(Typography2, { sx: { fontWeight: 600, lineHeight: 1.3 }, children: opt.label }),
1522
- opt.description && /* @__PURE__ */ jsx7(
1648
+ children: /* @__PURE__ */ jsxs5(Box5, { children: [
1649
+ /* @__PURE__ */ jsx8(Typography2, { sx: { fontWeight: 600, lineHeight: 1.3 }, children: opt.label }),
1650
+ opt.description && /* @__PURE__ */ jsx8(
1523
1651
  Typography2,
1524
1652
  {
1525
1653
  variant: "caption",
@@ -1532,7 +1660,7 @@ var AskUserCard = () => {
1532
1660
  opt.label
1533
1661
  );
1534
1662
  }) }),
1535
- q.allowFreeform !== false && /* @__PURE__ */ jsx7(
1663
+ q.allowFreeform !== false && /* @__PURE__ */ jsx8(
1536
1664
  TextField2,
1537
1665
  {
1538
1666
  fullWidth: true,
@@ -1544,9 +1672,9 @@ var AskUserCard = () => {
1544
1672
  }
1545
1673
  )
1546
1674
  ] }, 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" })
1675
+ /* @__PURE__ */ jsxs5(Box5, { sx: { display: "flex", justifyContent: "flex-end", gap: 1, mt: 2 }, children: [
1676
+ /* @__PURE__ */ jsx8(Button, { onClick: cancel, color: "inherit", sx: { textTransform: "none", color: theme.palette.text.secondary }, children: "Skip" }),
1677
+ /* @__PURE__ */ jsx8(Button, { onClick: handleSubmit, disabled: !allAnswered, variant: "contained", sx: { textTransform: "none" }, children: "Submit" })
1550
1678
  ] })
1551
1679
  ]
1552
1680
  }
@@ -2438,9 +2566,9 @@ The user explicitly asked you to remember this. Respond with a short third-perso
2438
2566
  };
2439
2567
 
2440
2568
  // src/chat/hooks/useMoodEngine.tsx
2441
- import { useState as useState5 } from "react";
2569
+ import { useState as useState6 } from "react";
2442
2570
  var useMoodEngine = () => {
2443
- const [mood, setMood] = useState5("neutral");
2571
+ const [mood, setMood] = useState6("neutral");
2444
2572
  const analyzeMood = async (message) => {
2445
2573
  try {
2446
2574
  const detected = await detectMessageMood(message);
@@ -3701,7 +3829,7 @@ ${r.output}`).join("\n\n");
3701
3829
  ${toolResultsText}
3702
3830
  ===END TOOL RESULTS===
3703
3831
 
3704
- Use them to fully complete my original request. If you still need to take an action I asked for (for example, actually create a file I want to download), call the appropriate tool now with a \`\`\`tool_code\`\`\` block. Otherwise give your final answer. Do NOT add a "Sources"/"References"/"Citations" list \u2014 one is appended automatically.`
3832
+ Use them to fully complete my original request. If you still need to take an action I asked for (for example, actually create a file I want to download), call the appropriate tool now with a \`\`\`tool_code\`\`\` block. Otherwise give your final answer. Do NOT add citations, footnotes, superscript reference numbers (e.g. \xB9 \xB2 \xB3), or a Sources/References/Citations list \u2014 the sources are attached automatically below your answer. Just write the answer naturally.`
3705
3833
  }
3706
3834
  ];
3707
3835
  const streamTurn = (req) => new Promise((resolve) => {
@@ -3847,7 +3975,7 @@ That step failed: ${e instanceof Error ? e.message : String(e)}`);
3847
3975
  ${roundOut.join("\n\n")}
3848
3976
  ===END TOOL RESULTS===
3849
3977
 
3850
- Now give your final answer to my original request, or call another tool if you still genuinely need to. Do NOT add a "Sources" list.`
3978
+ Now give your final answer to my original request, or call another tool if you still genuinely need to. Do NOT add citations, footnotes, superscript reference numbers, or a Sources list \u2014 sources are attached automatically.`
3851
3979
  });
3852
3980
  }
3853
3981
  setIsThinking?.(false);
@@ -4130,9 +4258,9 @@ var useAutoScroll = (options = {}) => {
4130
4258
  };
4131
4259
 
4132
4260
  // src/hooks/useNetworkStatus.ts
4133
- import { useState as useState6, useEffect as useEffect6, useCallback as useCallback3 } from "react";
4261
+ import { useState as useState7, useEffect as useEffect6, useCallback as useCallback3 } from "react";
4134
4262
  var useNetworkStatus = () => {
4135
- const [networkStatus, setNetworkStatus] = useState6({
4263
+ const [networkStatus, setNetworkStatus] = useState7({
4136
4264
  isOnline: navigator.onLine,
4137
4265
  isSlowConnection: false,
4138
4266
  connectionQuality: "fast",
@@ -4211,13 +4339,13 @@ var useNetworkStatus = () => {
4211
4339
 
4212
4340
  // src/chat/chat-app-bar.tsx
4213
4341
  import { Avatar as Avatar8 } from "@mui/material";
4214
- import { useEffect as useEffect12, useRef as useRef10, useState as useState13 } from "react";
4342
+ import { useEffect as useEffect12, useRef as useRef10, useState as useState14 } from "react";
4215
4343
  import {
4216
- Box as Box11,
4344
+ Box as Box12,
4217
4345
  IconButton as IconButton9,
4218
4346
  Menu as Menu5,
4219
4347
  MenuItem as MenuItem5,
4220
- Tooltip as Tooltip4,
4348
+ Tooltip as Tooltip5,
4221
4349
  useMediaQuery as useMediaQuery5,
4222
4350
  useTheme as useTheme12,
4223
4351
  Dialog as Dialog5,
@@ -4230,13 +4358,13 @@ import {
4230
4358
  import { useNavigate } from "react-router-dom";
4231
4359
 
4232
4360
  // src/chat/conversation-drawer.tsx
4233
- import { useState as useState11, useMemo, useEffect as useEffect10, useRef as useRef8, useCallback as useCallback4 } from "react";
4361
+ import { useState as useState12, useMemo as useMemo2, useEffect as useEffect10, useRef as useRef8, useCallback as useCallback4 } from "react";
4234
4362
  import {
4235
4363
  Drawer,
4236
- Box as Box9,
4364
+ Box as Box10,
4237
4365
  Typography as Typography7,
4238
4366
  IconButton as IconButton7,
4239
- Tooltip as Tooltip3,
4367
+ Tooltip as Tooltip4,
4240
4368
  TextField as TextField6,
4241
4369
  InputAdornment,
4242
4370
  useMediaQuery as useMediaQuery4,
@@ -4258,7 +4386,7 @@ import { X as CloseIcon4, X as ClearIcon, Search as SearchIcon, Folder as Folder
4258
4386
  import { useTheme as useTheme10 } from "@mui/material/styles";
4259
4387
 
4260
4388
  // src/chat/project-management-modal.tsx
4261
- import { useState as useState7, useEffect as useEffect7, useRef as useRef5 } from "react";
4389
+ import { useState as useState8, useEffect as useEffect7, useRef as useRef5 } from "react";
4262
4390
  import {
4263
4391
  Modal,
4264
4392
  Button as Button2,
@@ -4266,7 +4394,7 @@ import {
4266
4394
  List,
4267
4395
  ListItem,
4268
4396
  IconButton as IconButton4,
4269
- Box as Box5,
4397
+ Box as Box6,
4270
4398
  Typography as Typography3,
4271
4399
  Avatar as Avatar3,
4272
4400
  Chip as Chip2,
@@ -4279,7 +4407,7 @@ import {
4279
4407
  } from "@mui/material";
4280
4408
  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";
4281
4409
  import { useTheme as useTheme6, alpha as alpha3 } from "@mui/material/styles";
4282
- import { Fragment as Fragment4, jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
4410
+ import { Fragment as Fragment4, jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
4283
4411
  var DEFAULT_COLORS = [
4284
4412
  "#2196F3",
4285
4413
  "#4CAF50",
@@ -4308,17 +4436,17 @@ var ProjectManagementModal = ({
4308
4436
  hydrate
4309
4437
  } = useProjectStore();
4310
4438
  const { getConversationsByProject } = useConversationStore();
4311
- const [showCreateForm, setShowCreateForm] = useState7(false);
4312
- const [editingProject, setEditingProject] = useState7(null);
4313
- const [formData, setFormData] = useState7({
4439
+ const [showCreateForm, setShowCreateForm] = useState8(false);
4440
+ const [editingProject, setEditingProject] = useState8(null);
4441
+ const [formData, setFormData] = useState8({
4314
4442
  name: "",
4315
4443
  description: "",
4316
4444
  color: DEFAULT_COLORS[0]
4317
4445
  });
4318
- const [menuAnchor, setMenuAnchor] = useState7(null);
4319
- const [selectedProject, setSelectedProject] = useState7(null);
4320
- const [loading, setLoading] = useState7(false);
4321
- const [error, setError] = useState7(null);
4446
+ const [menuAnchor, setMenuAnchor] = useState8(null);
4447
+ const [selectedProject, setSelectedProject] = useState8(null);
4448
+ const [loading, setLoading] = useState8(false);
4449
+ const [error, setError] = useState8(null);
4322
4450
  const modalContainerRef = useRef5(null);
4323
4451
  useEffect7(() => {
4324
4452
  if (open && !_hasHydrated) {
@@ -4427,8 +4555,8 @@ var ProjectManagementModal = ({
4427
4555
  const hoverSurface = alpha3(theme.palette.primary.main, theme.palette.mode === "dark" ? 0.22 : 0.08);
4428
4556
  const headerTitle = showCreateForm ? editingProject ? "Edit Project" : "Create Project" : "Manage Projects";
4429
4557
  const headerSubtitle = showCreateForm ? "Name, describe, and color-code your project." : "Organize conversations into cohesive projects.";
4430
- const content = /* @__PURE__ */ jsxs5(
4431
- Box5,
4558
+ const content = /* @__PURE__ */ jsxs6(
4559
+ Box6,
4432
4560
  {
4433
4561
  ref: modalContainerRef,
4434
4562
  sx: {
@@ -4446,8 +4574,8 @@ var ProjectManagementModal = ({
4446
4574
  position: "relative"
4447
4575
  },
4448
4576
  children: [
4449
- isMobile && /* @__PURE__ */ jsx8(
4450
- Box5,
4577
+ isMobile && /* @__PURE__ */ jsx9(
4578
+ Box6,
4451
4579
  {
4452
4580
  sx: {
4453
4581
  width: 56,
@@ -4460,8 +4588,8 @@ var ProjectManagementModal = ({
4460
4588
  }
4461
4589
  }
4462
4590
  ),
4463
- /* @__PURE__ */ jsxs5(
4464
- Box5,
4591
+ /* @__PURE__ */ jsxs6(
4592
+ Box6,
4465
4593
  {
4466
4594
  sx: {
4467
4595
  px: isMobile ? 1.5 : 2.75,
@@ -4473,8 +4601,8 @@ var ProjectManagementModal = ({
4473
4601
  gap: 1
4474
4602
  },
4475
4603
  children: [
4476
- /* @__PURE__ */ jsxs5(
4477
- Box5,
4604
+ /* @__PURE__ */ jsxs6(
4605
+ Box6,
4478
4606
  {
4479
4607
  sx: {
4480
4608
  display: "flex",
@@ -4483,8 +4611,8 @@ var ProjectManagementModal = ({
4483
4611
  gap: 1
4484
4612
  },
4485
4613
  children: [
4486
- /* @__PURE__ */ jsxs5(
4487
- Box5,
4614
+ /* @__PURE__ */ jsxs6(
4615
+ Box6,
4488
4616
  {
4489
4617
  sx: {
4490
4618
  display: "flex",
@@ -4494,8 +4622,8 @@ var ProjectManagementModal = ({
4494
4622
  flex: 1
4495
4623
  },
4496
4624
  children: [
4497
- showCreateForm && /* @__PURE__ */ jsx8(IconButton4, { onClick: resetForm, size: "small", sx: { mr: 0.5 }, children: /* @__PURE__ */ jsx8(ArrowBackIcon, { size: 16 }) }),
4498
- /* @__PURE__ */ jsx8(
4625
+ showCreateForm && /* @__PURE__ */ jsx9(IconButton4, { onClick: resetForm, size: "small", sx: { mr: 0.5 }, children: /* @__PURE__ */ jsx9(ArrowBackIcon, { size: 16 }) }),
4626
+ /* @__PURE__ */ jsx9(
4499
4627
  Typography3,
4500
4628
  {
4501
4629
  variant: "h6",
@@ -4512,16 +4640,16 @@ var ProjectManagementModal = ({
4512
4640
  ]
4513
4641
  }
4514
4642
  ),
4515
- /* @__PURE__ */ jsx8(IconButton4, { onClick: handleClose, size: "small", children: /* @__PURE__ */ jsx8(CloseIcon2, {}) })
4643
+ /* @__PURE__ */ jsx9(IconButton4, { onClick: handleClose, size: "small", children: /* @__PURE__ */ jsx9(CloseIcon2, {}) })
4516
4644
  ]
4517
4645
  }
4518
4646
  ),
4519
- /* @__PURE__ */ jsx8(Typography3, { variant: "body2", color: "text.secondary", children: headerSubtitle })
4647
+ /* @__PURE__ */ jsx9(Typography3, { variant: "body2", color: "text.secondary", children: headerSubtitle })
4520
4648
  ]
4521
4649
  }
4522
4650
  ),
4523
- /* @__PURE__ */ jsxs5(
4524
- Box5,
4651
+ /* @__PURE__ */ jsxs6(
4652
+ Box6,
4525
4653
  {
4526
4654
  sx: {
4527
4655
  flex: 1,
@@ -4533,9 +4661,9 @@ var ProjectManagementModal = ({
4533
4661
  gap: 2.5
4534
4662
  },
4535
4663
  children: [
4536
- error && /* @__PURE__ */ jsx8(Alert, { severity: "error", onClose: () => setError(null), children: error }),
4537
- showCreateForm ? /* @__PURE__ */ jsxs5(Box5, { sx: { display: "flex", flexDirection: "column", gap: 2 }, children: [
4538
- /* @__PURE__ */ jsx8(
4664
+ error && /* @__PURE__ */ jsx9(Alert, { severity: "error", onClose: () => setError(null), children: error }),
4665
+ showCreateForm ? /* @__PURE__ */ jsxs6(Box6, { sx: { display: "flex", flexDirection: "column", gap: 2 }, children: [
4666
+ /* @__PURE__ */ jsx9(
4539
4667
  TextField3,
4540
4668
  {
4541
4669
  label: "Project name",
@@ -4547,7 +4675,7 @@ var ProjectManagementModal = ({
4547
4675
  autoFocus: true
4548
4676
  }
4549
4677
  ),
4550
- /* @__PURE__ */ jsx8(
4678
+ /* @__PURE__ */ jsx9(
4551
4679
  TextField3,
4552
4680
  {
4553
4681
  label: "Description (optional)",
@@ -4559,10 +4687,10 @@ var ProjectManagementModal = ({
4559
4687
  disabled: loading
4560
4688
  }
4561
4689
  ),
4562
- /* @__PURE__ */ jsxs5(Box5, { children: [
4563
- /* @__PURE__ */ jsx8(Typography3, { variant: "subtitle2", sx: { mb: 1 }, children: "Color" }),
4564
- /* @__PURE__ */ jsx8(Box5, { sx: { display: "flex", flexWrap: "wrap", gap: 1 }, children: DEFAULT_COLORS.map((color) => /* @__PURE__ */ jsx8(
4565
- Box5,
4690
+ /* @__PURE__ */ jsxs6(Box6, { children: [
4691
+ /* @__PURE__ */ jsx9(Typography3, { variant: "subtitle2", sx: { mb: 1 }, children: "Color" }),
4692
+ /* @__PURE__ */ jsx9(Box6, { sx: { display: "flex", flexWrap: "wrap", gap: 1 }, children: DEFAULT_COLORS.map((color) => /* @__PURE__ */ jsx9(
4693
+ Box6,
4566
4694
  {
4567
4695
  sx: {
4568
4696
  width: 32,
@@ -4582,11 +4710,11 @@ var ProjectManagementModal = ({
4582
4710
  color
4583
4711
  )) })
4584
4712
  ] })
4585
- ] }) : /* @__PURE__ */ jsxs5(Box5, { sx: { display: "flex", flexDirection: "column", gap: 2 }, children: [
4586
- /* @__PURE__ */ jsx8(
4713
+ ] }) : /* @__PURE__ */ jsxs6(Box6, { sx: { display: "flex", flexDirection: "column", gap: 2 }, children: [
4714
+ /* @__PURE__ */ jsx9(
4587
4715
  Button2,
4588
4716
  {
4589
- startIcon: /* @__PURE__ */ jsx8(AddIcon2, {}),
4717
+ startIcon: /* @__PURE__ */ jsx9(AddIcon2, {}),
4590
4718
  onClick: () => setShowCreateForm(true),
4591
4719
  variant: "contained",
4592
4720
  sx: {
@@ -4598,8 +4726,8 @@ var ProjectManagementModal = ({
4598
4726
  children: "Create project"
4599
4727
  }
4600
4728
  ),
4601
- projects.length === 0 ? /* @__PURE__ */ jsxs5(
4602
- Box5,
4729
+ projects.length === 0 ? /* @__PURE__ */ jsxs6(
4730
+ Box6,
4603
4731
  {
4604
4732
  sx: {
4605
4733
  textAlign: "center",
@@ -4611,15 +4739,15 @@ var ProjectManagementModal = ({
4611
4739
  backgroundColor: subtleSurface
4612
4740
  },
4613
4741
  children: [
4614
- /* @__PURE__ */ jsx8(FolderIcon, { size: 48, style: { marginBottom: 8, opacity: 0.5 } }),
4615
- /* @__PURE__ */ jsx8(Typography3, { variant: "body1", sx: { fontWeight: 600 }, children: "No projects yet" }),
4616
- /* @__PURE__ */ jsx8(Typography3, { variant: "body2", children: "Create your first project to organize conversations." })
4742
+ /* @__PURE__ */ jsx9(FolderIcon, { size: 48, style: { marginBottom: 8, opacity: 0.5 } }),
4743
+ /* @__PURE__ */ jsx9(Typography3, { variant: "body1", sx: { fontWeight: 600 }, children: "No projects yet" }),
4744
+ /* @__PURE__ */ jsx9(Typography3, { variant: "body2", children: "Create your first project to organize conversations." })
4617
4745
  ]
4618
4746
  }
4619
- ) : /* @__PURE__ */ jsx8(List, { sx: { display: "flex", flexDirection: "column", gap: 1.25, py: 0 }, children: projects.map((project) => {
4747
+ ) : /* @__PURE__ */ jsx9(List, { sx: { display: "flex", flexDirection: "column", gap: 1.25, py: 0 }, children: projects.map((project) => {
4620
4748
  const conversationCount = getConversationsByProject(project.id).length;
4621
- return /* @__PURE__ */ jsx8(ListItem, { disablePadding: true, children: /* @__PURE__ */ jsxs5(
4622
- Box5,
4749
+ return /* @__PURE__ */ jsx9(ListItem, { disablePadding: true, children: /* @__PURE__ */ jsxs6(
4750
+ Box6,
4623
4751
  {
4624
4752
  sx: {
4625
4753
  display: "flex",
@@ -4637,7 +4765,7 @@ var ProjectManagementModal = ({
4637
4765
  }
4638
4766
  },
4639
4767
  children: [
4640
- /* @__PURE__ */ jsx8(
4768
+ /* @__PURE__ */ jsx9(
4641
4769
  Avatar3,
4642
4770
  {
4643
4771
  sx: {
@@ -4646,12 +4774,12 @@ var ProjectManagementModal = ({
4646
4774
  height: 36,
4647
4775
  fontSize: "1rem"
4648
4776
  },
4649
- children: /* @__PURE__ */ jsx8(FolderIcon, { size: 16 })
4777
+ children: /* @__PURE__ */ jsx9(FolderIcon, { size: 16 })
4650
4778
  }
4651
4779
  ),
4652
- /* @__PURE__ */ jsxs5(Box5, { sx: { flex: 1, minWidth: 0 }, children: [
4653
- /* @__PURE__ */ jsxs5(Box5, { sx: { display: "flex", alignItems: "center", gap: 1, flexWrap: "wrap" }, children: [
4654
- /* @__PURE__ */ jsx8(
4780
+ /* @__PURE__ */ jsxs6(Box6, { sx: { flex: 1, minWidth: 0 }, children: [
4781
+ /* @__PURE__ */ jsxs6(Box6, { sx: { display: "flex", alignItems: "center", gap: 1, flexWrap: "wrap" }, children: [
4782
+ /* @__PURE__ */ jsx9(
4655
4783
  Typography3,
4656
4784
  {
4657
4785
  variant: "subtitle1",
@@ -4659,7 +4787,7 @@ var ProjectManagementModal = ({
4659
4787
  children: project.name
4660
4788
  }
4661
4789
  ),
4662
- /* @__PURE__ */ jsx8(
4790
+ /* @__PURE__ */ jsx9(
4663
4791
  Chip2,
4664
4792
  {
4665
4793
  label: `${conversationCount}`,
@@ -4674,7 +4802,7 @@ var ProjectManagementModal = ({
4674
4802
  }
4675
4803
  )
4676
4804
  ] }),
4677
- project.description && /* @__PURE__ */ jsx8(
4805
+ project.description && /* @__PURE__ */ jsx9(
4678
4806
  Typography3,
4679
4807
  {
4680
4808
  variant: "body2",
@@ -4684,7 +4812,7 @@ var ProjectManagementModal = ({
4684
4812
  }
4685
4813
  )
4686
4814
  ] }),
4687
- /* @__PURE__ */ jsx8(
4815
+ /* @__PURE__ */ jsx9(
4688
4816
  IconButton4,
4689
4817
  {
4690
4818
  onClick: (e) => {
@@ -4697,7 +4825,7 @@ var ProjectManagementModal = ({
4697
4825
  mt: 0.25,
4698
4826
  zIndex: 1
4699
4827
  },
4700
- children: /* @__PURE__ */ jsx8(MoreVertIcon, { size: 16 })
4828
+ children: /* @__PURE__ */ jsx9(MoreVertIcon, { size: 16 })
4701
4829
  }
4702
4830
  )
4703
4831
  ]
@@ -4708,8 +4836,8 @@ var ProjectManagementModal = ({
4708
4836
  ]
4709
4837
  }
4710
4838
  ),
4711
- /* @__PURE__ */ jsx8(
4712
- Box5,
4839
+ /* @__PURE__ */ jsx9(
4840
+ Box6,
4713
4841
  {
4714
4842
  sx: {
4715
4843
  px: isMobile ? 1.5 : 2.75,
@@ -4719,8 +4847,8 @@ var ProjectManagementModal = ({
4719
4847
  justifyContent: "flex-end",
4720
4848
  gap: 1
4721
4849
  },
4722
- children: showCreateForm ? /* @__PURE__ */ jsxs5(Fragment4, { children: [
4723
- /* @__PURE__ */ jsx8(
4850
+ children: showCreateForm ? /* @__PURE__ */ jsxs6(Fragment4, { children: [
4851
+ /* @__PURE__ */ jsx9(
4724
4852
  Button2,
4725
4853
  {
4726
4854
  onClick: resetForm,
@@ -4729,21 +4857,21 @@ var ProjectManagementModal = ({
4729
4857
  children: "Cancel"
4730
4858
  }
4731
4859
  ),
4732
- /* @__PURE__ */ jsx8(
4860
+ /* @__PURE__ */ jsx9(
4733
4861
  Button2,
4734
4862
  {
4735
4863
  onClick: editingProject ? handleEditProject : handleCreateProject,
4736
4864
  variant: "contained",
4737
4865
  disabled: loading,
4738
- startIcon: loading ? /* @__PURE__ */ jsx8(CircularProgress3, { size: 16 }) : void 0,
4866
+ startIcon: loading ? /* @__PURE__ */ jsx9(CircularProgress3, { size: 16 }) : void 0,
4739
4867
  sx: { textTransform: "none", borderRadius: 2 },
4740
4868
  children: editingProject ? "Update project" : "Create project"
4741
4869
  }
4742
4870
  )
4743
- ] }) : /* @__PURE__ */ jsx8(Button2, { onClick: handleClose, sx: { textTransform: "none", borderRadius: 2 }, children: "Close" })
4871
+ ] }) : /* @__PURE__ */ jsx9(Button2, { onClick: handleClose, sx: { textTransform: "none", borderRadius: 2 }, children: "Close" })
4744
4872
  }
4745
4873
  ),
4746
- /* @__PURE__ */ jsxs5(
4874
+ /* @__PURE__ */ jsxs6(
4747
4875
  Menu,
4748
4876
  {
4749
4877
  anchorEl: menuAnchor,
@@ -4765,20 +4893,20 @@ var ProjectManagementModal = ({
4765
4893
  }
4766
4894
  },
4767
4895
  children: [
4768
- /* @__PURE__ */ jsx8(
4896
+ /* @__PURE__ */ jsx9(
4769
4897
  MenuItem,
4770
4898
  {
4771
4899
  onClick: () => {
4772
4900
  if (!selectedProject) return;
4773
4901
  startEdit(selectedProject);
4774
4902
  },
4775
- children: /* @__PURE__ */ jsxs5(Box5, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
4776
- /* @__PURE__ */ jsx8(EditIcon, { size: 16 }),
4777
- /* @__PURE__ */ jsx8(Typography3, { variant: "body2", color: "inherit", children: "Edit" })
4903
+ children: /* @__PURE__ */ jsxs6(Box6, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
4904
+ /* @__PURE__ */ jsx9(EditIcon, { size: 16 }),
4905
+ /* @__PURE__ */ jsx9(Typography3, { variant: "body2", color: "inherit", children: "Edit" })
4778
4906
  ] })
4779
4907
  }
4780
4908
  ),
4781
- /* @__PURE__ */ jsx8(
4909
+ /* @__PURE__ */ jsx9(
4782
4910
  MenuItem,
4783
4911
  {
4784
4912
  onClick: () => {
@@ -4786,9 +4914,9 @@ var ProjectManagementModal = ({
4786
4914
  handleDeleteProject(selectedProject);
4787
4915
  },
4788
4916
  sx: { color: theme.palette.error.main },
4789
- children: /* @__PURE__ */ jsxs5(Box5, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
4790
- /* @__PURE__ */ jsx8(DeleteIcon, { size: 16 }),
4791
- /* @__PURE__ */ jsx8(Typography3, { variant: "body2", color: "inherit", children: "Delete" })
4917
+ children: /* @__PURE__ */ jsxs6(Box6, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
4918
+ /* @__PURE__ */ jsx9(DeleteIcon, { size: 16 }),
4919
+ /* @__PURE__ */ jsx9(Typography3, { variant: "body2", color: "inherit", children: "Delete" })
4792
4920
  ] })
4793
4921
  }
4794
4922
  )
@@ -4798,7 +4926,7 @@ var ProjectManagementModal = ({
4798
4926
  ]
4799
4927
  }
4800
4928
  );
4801
- return /* @__PURE__ */ jsx8(Fragment4, { children: isMobile ? /* @__PURE__ */ jsx8(
4929
+ return /* @__PURE__ */ jsx9(Fragment4, { children: isMobile ? /* @__PURE__ */ jsx9(
4802
4930
  SwipeableDrawer,
4803
4931
  {
4804
4932
  anchor: "bottom",
@@ -4818,7 +4946,7 @@ var ProjectManagementModal = ({
4818
4946
  },
4819
4947
  children: content
4820
4948
  }
4821
- ) : /* @__PURE__ */ jsx8(
4949
+ ) : /* @__PURE__ */ jsx9(
4822
4950
  Modal,
4823
4951
  {
4824
4952
  open,
@@ -4837,7 +4965,7 @@ var ProjectManagementModal = ({
4837
4965
  var project_management_modal_default = ProjectManagementModal;
4838
4966
 
4839
4967
  // src/chat/move-conversation-modal.tsx
4840
- import { useState as useState8, useEffect as useEffect8 } from "react";
4968
+ import { useState as useState9, useEffect as useEffect8 } from "react";
4841
4969
  import {
4842
4970
  Dialog,
4843
4971
  DialogTitle,
@@ -4852,12 +4980,12 @@ import {
4852
4980
  Typography as Typography4,
4853
4981
  Avatar as Avatar4,
4854
4982
  Radio,
4855
- Box as Box6,
4983
+ Box as Box7,
4856
4984
  Divider
4857
4985
  } from "@mui/material";
4858
4986
  import { Folder as FolderIcon2, Inbox as InboxIcon } from "lucide-react";
4859
4987
  import { useTheme as useTheme7 } from "@mui/material/styles";
4860
- import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
4988
+ import { jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
4861
4989
  var MoveConversationModal = ({
4862
4990
  open,
4863
4991
  onClose,
@@ -4867,7 +4995,7 @@ var MoveConversationModal = ({
4867
4995
  const theme = useTheme7();
4868
4996
  const { projects, _hasHydrated, hydrate } = useProjectStore();
4869
4997
  const { moveConversationToProject } = useConversationStore();
4870
- const [selectedProjectId, setSelectedProjectId] = useState8(
4998
+ const [selectedProjectId, setSelectedProjectId] = useState9(
4871
4999
  currentProjectId
4872
5000
  );
4873
5001
  useEffect8(() => {
@@ -4894,7 +5022,7 @@ var MoveConversationModal = ({
4894
5022
  };
4895
5023
  const conversationCount = conversations.length;
4896
5024
  const isMultiple = conversationCount > 1;
4897
- return /* @__PURE__ */ jsxs6(
5025
+ return /* @__PURE__ */ jsxs7(
4898
5026
  Dialog,
4899
5027
  {
4900
5028
  open,
@@ -4908,20 +5036,20 @@ var MoveConversationModal = ({
4908
5036
  }
4909
5037
  },
4910
5038
  children: [
4911
- /* @__PURE__ */ jsxs6(DialogTitle, { children: [
5039
+ /* @__PURE__ */ jsxs7(DialogTitle, { children: [
4912
5040
  "Move ",
4913
5041
  isMultiple ? `${conversationCount} Conversations` : "Conversation"
4914
5042
  ] }),
4915
- /* @__PURE__ */ jsxs6(DialogContent, { sx: { px: 3 }, children: [
4916
- /* @__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:` }),
4917
- /* @__PURE__ */ jsxs6(List2, { children: [
4918
- /* @__PURE__ */ jsx9(ListItem2, { disablePadding: true, children: /* @__PURE__ */ jsxs6(
5043
+ /* @__PURE__ */ jsxs7(DialogContent, { sx: { px: 3 }, children: [
5044
+ /* @__PURE__ */ jsx10(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:` }),
5045
+ /* @__PURE__ */ jsxs7(List2, { children: [
5046
+ /* @__PURE__ */ jsx10(ListItem2, { disablePadding: true, children: /* @__PURE__ */ jsxs7(
4919
5047
  ListItemButton,
4920
5048
  {
4921
5049
  onClick: () => setSelectedProjectId(null),
4922
5050
  selected: selectedProjectId === null,
4923
5051
  children: [
4924
- /* @__PURE__ */ jsx9(ListItemIcon, { children: /* @__PURE__ */ jsx9(
5052
+ /* @__PURE__ */ jsx10(ListItemIcon, { children: /* @__PURE__ */ jsx10(
4925
5053
  Radio,
4926
5054
  {
4927
5055
  checked: selectedProjectId === null,
@@ -4929,7 +5057,7 @@ var MoveConversationModal = ({
4929
5057
  size: "small"
4930
5058
  }
4931
5059
  ) }),
4932
- /* @__PURE__ */ jsx9(ListItemIcon, { children: /* @__PURE__ */ jsx9(
5060
+ /* @__PURE__ */ jsx10(ListItemIcon, { children: /* @__PURE__ */ jsx10(
4933
5061
  Avatar4,
4934
5062
  {
4935
5063
  sx: {
@@ -4937,10 +5065,10 @@ var MoveConversationModal = ({
4937
5065
  width: 32,
4938
5066
  height: 32
4939
5067
  },
4940
- children: /* @__PURE__ */ jsx9(InboxIcon, {})
5068
+ children: /* @__PURE__ */ jsx10(InboxIcon, {})
4941
5069
  }
4942
5070
  ) }),
4943
- /* @__PURE__ */ jsx9(
5071
+ /* @__PURE__ */ jsx10(
4944
5072
  ListItemText,
4945
5073
  {
4946
5074
  primary: "No Project",
@@ -4950,14 +5078,14 @@ var MoveConversationModal = ({
4950
5078
  ]
4951
5079
  }
4952
5080
  ) }),
4953
- /* @__PURE__ */ jsx9(Divider, { sx: { my: 1 } }),
4954
- projects.map((project) => /* @__PURE__ */ jsx9(ListItem2, { disablePadding: true, children: /* @__PURE__ */ jsxs6(
5081
+ /* @__PURE__ */ jsx10(Divider, { sx: { my: 1 } }),
5082
+ projects.map((project) => /* @__PURE__ */ jsx10(ListItem2, { disablePadding: true, children: /* @__PURE__ */ jsxs7(
4955
5083
  ListItemButton,
4956
5084
  {
4957
5085
  onClick: () => setSelectedProjectId(project.id),
4958
5086
  selected: selectedProjectId === project.id,
4959
5087
  children: [
4960
- /* @__PURE__ */ jsx9(ListItemIcon, { children: /* @__PURE__ */ jsx9(
5088
+ /* @__PURE__ */ jsx10(ListItemIcon, { children: /* @__PURE__ */ jsx10(
4961
5089
  Radio,
4962
5090
  {
4963
5091
  checked: selectedProjectId === project.id,
@@ -4965,7 +5093,7 @@ var MoveConversationModal = ({
4965
5093
  size: "small"
4966
5094
  }
4967
5095
  ) }),
4968
- /* @__PURE__ */ jsx9(ListItemIcon, { children: /* @__PURE__ */ jsx9(
5096
+ /* @__PURE__ */ jsx10(ListItemIcon, { children: /* @__PURE__ */ jsx10(
4969
5097
  Avatar4,
4970
5098
  {
4971
5099
  sx: {
@@ -4973,10 +5101,10 @@ var MoveConversationModal = ({
4973
5101
  width: 32,
4974
5102
  height: 32
4975
5103
  },
4976
- children: /* @__PURE__ */ jsx9(FolderIcon2, {})
5104
+ children: /* @__PURE__ */ jsx10(FolderIcon2, {})
4977
5105
  }
4978
5106
  ) }),
4979
- /* @__PURE__ */ jsx9(
5107
+ /* @__PURE__ */ jsx10(
4980
5108
  ListItemText,
4981
5109
  {
4982
5110
  primary: project.name,
@@ -4986,16 +5114,16 @@ var MoveConversationModal = ({
4986
5114
  ]
4987
5115
  }
4988
5116
  ) }, project.id)),
4989
- projects.length === 0 && /* @__PURE__ */ jsx9(Box6, { sx: {
5117
+ projects.length === 0 && /* @__PURE__ */ jsx10(Box7, { sx: {
4990
5118
  textAlign: "center",
4991
5119
  py: 2,
4992
5120
  color: theme.palette.text.secondary
4993
- }, children: /* @__PURE__ */ jsx9(Typography4, { variant: "body2", children: "No projects available. Create a project first to organize conversations." }) })
5121
+ }, children: /* @__PURE__ */ jsx10(Typography4, { variant: "body2", children: "No projects available. Create a project first to organize conversations." }) })
4994
5122
  ] })
4995
5123
  ] }),
4996
- /* @__PURE__ */ jsxs6(DialogActions, { sx: { px: 3, pb: 2 }, children: [
4997
- /* @__PURE__ */ jsx9(Button3, { onClick: onClose, children: "Cancel" }),
4998
- /* @__PURE__ */ jsxs6(
5124
+ /* @__PURE__ */ jsxs7(DialogActions, { sx: { px: 3, pb: 2 }, children: [
5125
+ /* @__PURE__ */ jsx10(Button3, { onClick: onClose, children: "Cancel" }),
5126
+ /* @__PURE__ */ jsxs7(
4999
5127
  Button3,
5000
5128
  {
5001
5129
  onClick: handleMove,
@@ -5015,9 +5143,9 @@ var MoveConversationModal = ({
5015
5143
  var move_conversation_modal_default = MoveConversationModal;
5016
5144
 
5017
5145
  // src/chat/simple-conversation-item.tsx
5018
- import { useState as useState9, useRef as useRef6, useEffect as useEffect9 } from "react";
5146
+ import { useState as useState10, useRef as useRef6, useEffect as useEffect9 } from "react";
5019
5147
  import {
5020
- Box as Box7,
5148
+ Box as Box8,
5021
5149
  Typography as Typography5,
5022
5150
  IconButton as IconButton5,
5023
5151
  Menu as Menu2,
@@ -5034,7 +5162,7 @@ import {
5034
5162
  } from "@mui/material";
5035
5163
  import { MoreVertical as MoreVertIcon2, Pencil as EditIcon2, Trash2 as DeleteIcon2, GripVertical as DragIcon, MailOpen as MoveIcon } from "lucide-react";
5036
5164
  import { useTheme as useTheme8, alpha as alpha4 } from "@mui/material/styles";
5037
- import { Fragment as Fragment5, jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
5165
+ import { Fragment as Fragment5, jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
5038
5166
  var SimpleConversationItem = ({
5039
5167
  conversation,
5040
5168
  isSelected,
@@ -5052,12 +5180,12 @@ var SimpleConversationItem = ({
5052
5180
  }) => {
5053
5181
  const theme = useTheme8();
5054
5182
  const isMobile = useMediaQuery3(theme.breakpoints.down("sm"));
5055
- const [anchorEl, setAnchorEl] = useState9(null);
5056
- const [isEditing, setIsEditing] = useState9(false);
5057
- const [editName, setEditName] = useState9(conversation.name);
5058
- const [isDragging, setIsDragging] = useState9(false);
5059
- const [isTouchDragging, setIsTouchDragging] = useState9(false);
5060
- const [showRenameDialog, setShowRenameDialog] = useState9(false);
5183
+ const [anchorEl, setAnchorEl] = useState10(null);
5184
+ const [isEditing, setIsEditing] = useState10(false);
5185
+ const [editName, setEditName] = useState10(conversation.name);
5186
+ const [isDragging, setIsDragging] = useState10(false);
5187
+ const [isTouchDragging, setIsTouchDragging] = useState10(false);
5188
+ const [showRenameDialog, setShowRenameDialog] = useState10(false);
5061
5189
  const longPressTimeoutRef = useRef6(null);
5062
5190
  const touchStartPointRef = useRef6(null);
5063
5191
  const activeTouchIdRef = useRef6(null);
@@ -5069,8 +5197,8 @@ var SimpleConversationItem = ({
5069
5197
  const regex = new RegExp(`(${query.trim()})`, "gi");
5070
5198
  const parts = text.split(regex);
5071
5199
  return parts.map(
5072
- (part, index) => regex.test(part) ? /* @__PURE__ */ jsx10(
5073
- Box7,
5200
+ (part, index) => regex.test(part) ? /* @__PURE__ */ jsx11(
5201
+ Box8,
5074
5202
  {
5075
5203
  component: "span",
5076
5204
  sx: {
@@ -5205,9 +5333,9 @@ var SimpleConversationItem = ({
5205
5333
  setIsTouchDragging(false);
5206
5334
  }
5207
5335
  }, [isTouchDragActive, isTouchDragging]);
5208
- return /* @__PURE__ */ jsxs7(Fragment5, { children: [
5209
- /* @__PURE__ */ jsxs7(
5210
- Box7,
5336
+ return /* @__PURE__ */ jsxs8(Fragment5, { children: [
5337
+ /* @__PURE__ */ jsxs8(
5338
+ Box8,
5211
5339
  {
5212
5340
  "data-project-id": conversation.projectId ?? "__ungrouped",
5213
5341
  draggable: !isMobile && !isEditing,
@@ -5259,7 +5387,7 @@ var SimpleConversationItem = ({
5259
5387
  }
5260
5388
  },
5261
5389
  children: [
5262
- !isMobile && !isEditing && /* @__PURE__ */ jsx10(
5390
+ !isMobile && !isEditing && /* @__PURE__ */ jsx11(
5263
5391
  DragIcon,
5264
5392
  {
5265
5393
  size: 16,
@@ -5267,8 +5395,8 @@ var SimpleConversationItem = ({
5267
5395
  style: { marginRight: 4, cursor: "grab" }
5268
5396
  }
5269
5397
  ),
5270
- /* @__PURE__ */ jsxs7(Box7, { sx: { flex: 1, minWidth: 0 }, children: [
5271
- isEditing ? /* @__PURE__ */ jsx10(
5398
+ /* @__PURE__ */ jsxs8(Box8, { sx: { flex: 1, minWidth: 0 }, children: [
5399
+ isEditing ? /* @__PURE__ */ jsx11(
5272
5400
  TextField4,
5273
5401
  {
5274
5402
  value: editName,
@@ -5291,7 +5419,7 @@ var SimpleConversationItem = ({
5291
5419
  }
5292
5420
  }
5293
5421
  }
5294
- ) : /* @__PURE__ */ jsx10(
5422
+ ) : /* @__PURE__ */ jsx11(
5295
5423
  Typography5,
5296
5424
  {
5297
5425
  variant: "body2",
@@ -5306,7 +5434,7 @@ var SimpleConversationItem = ({
5306
5434
  children: highlightText(conversation.name, searchQuery)
5307
5435
  }
5308
5436
  ),
5309
- !isEditing && snippet && /* @__PURE__ */ jsx10(
5437
+ !isEditing && snippet && /* @__PURE__ */ jsx11(
5310
5438
  Typography5,
5311
5439
  {
5312
5440
  variant: "caption",
@@ -5325,7 +5453,7 @@ var SimpleConversationItem = ({
5325
5453
  }
5326
5454
  )
5327
5455
  ] }),
5328
- !isEditing && /* @__PURE__ */ jsx10(
5456
+ !isEditing && /* @__PURE__ */ jsx11(
5329
5457
  IconButton5,
5330
5458
  {
5331
5459
  onClick: handleMenuOpen,
@@ -5354,10 +5482,10 @@ var SimpleConversationItem = ({
5354
5482
  }
5355
5483
  }
5356
5484
  },
5357
- children: /* @__PURE__ */ jsx10(MoreVertIcon2, { size: 16 })
5485
+ children: /* @__PURE__ */ jsx11(MoreVertIcon2, { size: 16 })
5358
5486
  }
5359
5487
  ),
5360
- /* @__PURE__ */ jsxs7(
5488
+ /* @__PURE__ */ jsxs8(
5361
5489
  Menu2,
5362
5490
  {
5363
5491
  anchorEl,
@@ -5384,17 +5512,17 @@ var SimpleConversationItem = ({
5384
5512
  }
5385
5513
  },
5386
5514
  children: [
5387
- onRename && /* @__PURE__ */ jsxs7(MenuItem2, { onClick: handleEdit, children: [
5388
- /* @__PURE__ */ jsx10(ListItemIcon2, { children: /* @__PURE__ */ jsx10(EditIcon2, { size: 16 }) }),
5389
- /* @__PURE__ */ jsx10(ListItemText2, { children: "Rename" })
5515
+ onRename && /* @__PURE__ */ jsxs8(MenuItem2, { onClick: handleEdit, children: [
5516
+ /* @__PURE__ */ jsx11(ListItemIcon2, { children: /* @__PURE__ */ jsx11(EditIcon2, { size: 16 }) }),
5517
+ /* @__PURE__ */ jsx11(ListItemText2, { children: "Rename" })
5390
5518
  ] }),
5391
- onMove && /* @__PURE__ */ jsxs7(MenuItem2, { onClick: handleMove, children: [
5392
- /* @__PURE__ */ jsx10(ListItemIcon2, { children: /* @__PURE__ */ jsx10(MoveIcon, { size: 16 }) }),
5393
- /* @__PURE__ */ jsx10(ListItemText2, { children: "Move to Project" })
5519
+ onMove && /* @__PURE__ */ jsxs8(MenuItem2, { onClick: handleMove, children: [
5520
+ /* @__PURE__ */ jsx11(ListItemIcon2, { children: /* @__PURE__ */ jsx11(MoveIcon, { size: 16 }) }),
5521
+ /* @__PURE__ */ jsx11(ListItemText2, { children: "Move to Project" })
5394
5522
  ] }),
5395
- /* @__PURE__ */ jsxs7(MenuItem2, { onClick: handleDelete, children: [
5396
- /* @__PURE__ */ jsx10(ListItemIcon2, { children: /* @__PURE__ */ jsx10(DeleteIcon2, { size: 16 }) }),
5397
- /* @__PURE__ */ jsx10(ListItemText2, { children: "Delete" })
5523
+ /* @__PURE__ */ jsxs8(MenuItem2, { onClick: handleDelete, children: [
5524
+ /* @__PURE__ */ jsx11(ListItemIcon2, { children: /* @__PURE__ */ jsx11(DeleteIcon2, { size: 16 }) }),
5525
+ /* @__PURE__ */ jsx11(ListItemText2, { children: "Delete" })
5398
5526
  ] })
5399
5527
  ]
5400
5528
  }
@@ -5402,7 +5530,7 @@ var SimpleConversationItem = ({
5402
5530
  ]
5403
5531
  }
5404
5532
  ),
5405
- isMobile && /* @__PURE__ */ jsxs7(
5533
+ isMobile && /* @__PURE__ */ jsxs8(
5406
5534
  Dialog2,
5407
5535
  {
5408
5536
  open: showRenameDialog,
@@ -5418,8 +5546,8 @@ var SimpleConversationItem = ({
5418
5546
  }
5419
5547
  },
5420
5548
  children: [
5421
- /* @__PURE__ */ jsx10(DialogTitle2, { sx: { pb: 1 }, children: "Rename Conversation" }),
5422
- /* @__PURE__ */ jsx10(DialogContent2, { children: /* @__PURE__ */ jsx10(
5549
+ /* @__PURE__ */ jsx11(DialogTitle2, { sx: { pb: 1 }, children: "Rename Conversation" }),
5550
+ /* @__PURE__ */ jsx11(DialogContent2, { children: /* @__PURE__ */ jsx11(
5423
5551
  TextField4,
5424
5552
  {
5425
5553
  value: editName,
@@ -5432,8 +5560,8 @@ var SimpleConversationItem = ({
5432
5560
  }
5433
5561
  }
5434
5562
  ) }),
5435
- /* @__PURE__ */ jsxs7(DialogActions2, { sx: { px: 3, pb: 2 }, children: [
5436
- /* @__PURE__ */ jsx10(
5563
+ /* @__PURE__ */ jsxs8(DialogActions2, { sx: { px: 3, pb: 2 }, children: [
5564
+ /* @__PURE__ */ jsx11(
5437
5565
  Button4,
5438
5566
  {
5439
5567
  onClick: () => {
@@ -5443,7 +5571,7 @@ var SimpleConversationItem = ({
5443
5571
  children: "Cancel"
5444
5572
  }
5445
5573
  ),
5446
- /* @__PURE__ */ jsx10(
5574
+ /* @__PURE__ */ jsx11(
5447
5575
  Button4,
5448
5576
  {
5449
5577
  onClick: () => {
@@ -5464,20 +5592,20 @@ var SimpleConversationItem = ({
5464
5592
  var simple_conversation_item_default = SimpleConversationItem;
5465
5593
 
5466
5594
  // src/chat/project-header.tsx
5467
- import { useRef as useRef7, useState as useState10 } from "react";
5595
+ import { useRef as useRef7, useState as useState11 } from "react";
5468
5596
  import {
5469
- Box as Box8,
5597
+ Box as Box9,
5470
5598
  Typography as Typography6,
5471
5599
  IconButton as IconButton6,
5472
5600
  Avatar as Avatar5,
5473
5601
  Chip as Chip3,
5474
- Tooltip as Tooltip2,
5602
+ Tooltip as Tooltip3,
5475
5603
  TextField as TextField5,
5476
5604
  alpha as alpha5
5477
5605
  } from "@mui/material";
5478
5606
  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";
5479
5607
  import { useTheme as useTheme9 } from "@mui/material/styles";
5480
- import { jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
5608
+ import { jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
5481
5609
  var ProjectHeader = ({
5482
5610
  projectId,
5483
5611
  projectName,
@@ -5494,9 +5622,9 @@ var ProjectHeader = ({
5494
5622
  const theme = useTheme9();
5495
5623
  const { createNewConversation } = useConversationStore();
5496
5624
  const { renameProject } = useProjectStore();
5497
- const [isHovered, setIsHovered] = useState10(false);
5498
- const [isDragOver, setIsDragOver] = useState10(false);
5499
- const [renameDraft, setRenameDraft] = useState10(projectName);
5625
+ const [isHovered, setIsHovered] = useState11(false);
5626
+ const [isDragOver, setIsDragOver] = useState11(false);
5627
+ const [renameDraft, setRenameDraft] = useState11(projectName);
5500
5628
  const renameActionRef = useRef7("none");
5501
5629
  const isUngrouped = projectId === null;
5502
5630
  const Icon = isCollapsed ? FolderIcon3 : FolderOpenIcon;
@@ -5543,8 +5671,8 @@ var ProjectHeader = ({
5543
5671
  setRenameDraft(projectName);
5544
5672
  onRenameComplete?.();
5545
5673
  };
5546
- return /* @__PURE__ */ jsxs8(
5547
- Box8,
5674
+ return /* @__PURE__ */ jsxs9(
5675
+ Box9,
5548
5676
  {
5549
5677
  "data-project-id": projectId ?? "__ungrouped",
5550
5678
  onMouseEnter: () => setIsHovered(true),
@@ -5570,7 +5698,7 @@ var ProjectHeader = ({
5570
5698
  } : {}
5571
5699
  },
5572
5700
  children: [
5573
- /* @__PURE__ */ jsx11(
5701
+ /* @__PURE__ */ jsx12(
5574
5702
  Avatar5,
5575
5703
  {
5576
5704
  sx: {
@@ -5579,17 +5707,17 @@ var ProjectHeader = ({
5579
5707
  height: 28,
5580
5708
  mr: 1.5
5581
5709
  },
5582
- children: isUngrouped ? /* @__PURE__ */ jsx11(
5710
+ children: isUngrouped ? /* @__PURE__ */ jsx12(
5583
5711
  InboxIcon2,
5584
5712
  {
5585
5713
  size: 16,
5586
5714
  color: theme.palette.text.disabled,
5587
5715
  style: { opacity: 0.7 }
5588
5716
  }
5589
- ) : /* @__PURE__ */ jsx11(Icon, { size: 16 })
5717
+ ) : /* @__PURE__ */ jsx12(Icon, { size: 16 })
5590
5718
  }
5591
5719
  ),
5592
- isRenaming && !isUngrouped ? /* @__PURE__ */ jsx11(
5720
+ isRenaming && !isUngrouped ? /* @__PURE__ */ jsx12(
5593
5721
  TextField5,
5594
5722
  {
5595
5723
  value: renameDraft,
@@ -5636,7 +5764,7 @@ var ProjectHeader = ({
5636
5764
  }
5637
5765
  }
5638
5766
  }
5639
- ) : /* @__PURE__ */ jsxs8(
5767
+ ) : /* @__PURE__ */ jsxs9(
5640
5768
  Typography6,
5641
5769
  {
5642
5770
  variant: "subtitle2",
@@ -5649,7 +5777,7 @@ var ProjectHeader = ({
5649
5777
  },
5650
5778
  children: [
5651
5779
  projectName,
5652
- isDragOver && /* @__PURE__ */ jsx11(
5780
+ isDragOver && /* @__PURE__ */ jsx12(
5653
5781
  Typography6,
5654
5782
  {
5655
5783
  component: "span",
@@ -5665,7 +5793,7 @@ var ProjectHeader = ({
5665
5793
  ]
5666
5794
  }
5667
5795
  ),
5668
- /* @__PURE__ */ jsx11(
5796
+ /* @__PURE__ */ jsx12(
5669
5797
  Chip3,
5670
5798
  {
5671
5799
  label: conversationCount,
@@ -5685,8 +5813,8 @@ var ProjectHeader = ({
5685
5813
  }
5686
5814
  }
5687
5815
  ),
5688
- isRenaming && !isUngrouped && /* @__PURE__ */ jsxs8(Box8, { sx: { display: "flex", alignItems: "center", gap: 0.5, ml: 1 }, children: [
5689
- /* @__PURE__ */ jsx11(Tooltip2, { title: "Cancel and remove", children: /* @__PURE__ */ jsx11(
5816
+ isRenaming && !isUngrouped && /* @__PURE__ */ jsxs9(Box9, { sx: { display: "flex", alignItems: "center", gap: 0.5, ml: 1 }, children: [
5817
+ /* @__PURE__ */ jsx12(Tooltip3, { title: "Cancel and remove", children: /* @__PURE__ */ jsx12(
5690
5818
  IconButton6,
5691
5819
  {
5692
5820
  size: "small",
@@ -5696,10 +5824,10 @@ var ProjectHeader = ({
5696
5824
  onRenameCancelDelete ? onRenameCancelDelete() : cancelRename();
5697
5825
  },
5698
5826
  sx: { color: alpha5(theme.palette.error.main, 0.9) },
5699
- children: /* @__PURE__ */ jsx11(CloseIcon3, { size: 16 })
5827
+ children: /* @__PURE__ */ jsx12(CloseIcon3, { size: 16 })
5700
5828
  }
5701
5829
  ) }),
5702
- /* @__PURE__ */ jsx11(Tooltip2, { title: "Save", children: /* @__PURE__ */ jsx11(
5830
+ /* @__PURE__ */ jsx12(Tooltip3, { title: "Save", children: /* @__PURE__ */ jsx12(
5703
5831
  IconButton6,
5704
5832
  {
5705
5833
  size: "small",
@@ -5709,11 +5837,11 @@ var ProjectHeader = ({
5709
5837
  commitRename();
5710
5838
  },
5711
5839
  sx: { color: theme.palette.success.main },
5712
- children: /* @__PURE__ */ jsx11(CheckIcon2, { size: 16 })
5840
+ children: /* @__PURE__ */ jsx12(CheckIcon2, { size: 16 })
5713
5841
  }
5714
5842
  ) })
5715
5843
  ] }),
5716
- isHovered && !isDragOver && !isUngrouped && !isRenaming && /* @__PURE__ */ jsx11(Tooltip2, { title: `Add conversation to ${projectName.toLowerCase()}`, arrow: true, children: /* @__PURE__ */ jsx11(
5844
+ isHovered && !isDragOver && !isUngrouped && !isRenaming && /* @__PURE__ */ jsx12(Tooltip3, { title: `Add conversation to ${projectName.toLowerCase()}`, arrow: true, children: /* @__PURE__ */ jsx12(
5717
5845
  IconButton6,
5718
5846
  {
5719
5847
  onClick: handleAddConversation,
@@ -5730,10 +5858,10 @@ var ProjectHeader = ({
5730
5858
  },
5731
5859
  transition: "all 0.2s ease"
5732
5860
  },
5733
- children: /* @__PURE__ */ jsx11(AddIcon3, { size: 16 })
5861
+ children: /* @__PURE__ */ jsx12(AddIcon3, { size: 16 })
5734
5862
  }
5735
5863
  ) }),
5736
- !isUngrouped && !isRenaming && /* @__PURE__ */ jsx11(
5864
+ !isUngrouped && !isRenaming && /* @__PURE__ */ jsx12(
5737
5865
  IconButton6,
5738
5866
  {
5739
5867
  size: "small",
@@ -5741,7 +5869,7 @@ var ProjectHeader = ({
5741
5869
  color: theme.palette.text.secondary,
5742
5870
  transition: "transform 0.2s ease"
5743
5871
  },
5744
- children: isCollapsed ? /* @__PURE__ */ jsx11(ExpandMoreIcon2, { size: 16 }) : /* @__PURE__ */ jsx11(ExpandLessIcon, { size: 16 })
5872
+ children: isCollapsed ? /* @__PURE__ */ jsx12(ExpandMoreIcon2, { size: 16 }) : /* @__PURE__ */ jsx12(ExpandLessIcon, { size: 16 })
5745
5873
  }
5746
5874
  )
5747
5875
  ]
@@ -5763,7 +5891,7 @@ var TOOLTIP_COPY = {
5763
5891
  var tooltip = (key) => TOOLTIP_COPY[key];
5764
5892
 
5765
5893
  // src/chat/conversation-drawer.tsx
5766
- import { Fragment as Fragment6, jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
5894
+ import { Fragment as Fragment6, jsx as jsx13, jsxs as jsxs10 } from "react/jsx-runtime";
5767
5895
  var BANDIT_AVATAR = "https://cdn.burtson.ai/images/bandit-head.png";
5768
5896
  var coerceOptionalString = (value) => {
5769
5897
  if (typeof value !== "string") return void 0;
@@ -5814,22 +5942,22 @@ var ConversationDrawer = ({ open, onClose }) => {
5814
5942
  createProject,
5815
5943
  deleteProject
5816
5944
  } = useProjectStore();
5817
- const [projectManagementOpen, setProjectManagementOpen] = useState11(false);
5818
- const [memoryModalOpen, setMemoryModalOpen] = useState11(false);
5819
- const [collapsedProjects, setCollapsedProjects] = useState11(/* @__PURE__ */ new Set());
5945
+ const [projectManagementOpen, setProjectManagementOpen] = useState12(false);
5946
+ const [memoryModalOpen, setMemoryModalOpen] = useState12(false);
5947
+ const [collapsedProjects, setCollapsedProjects] = useState12(/* @__PURE__ */ new Set());
5820
5948
  const didInitCollapseRef = useRef8(false);
5821
- const [searchQuery, setSearchQuery] = useState11("");
5822
- const [menuAnchorEl, setMenuAnchorEl] = useState11(null);
5823
- const [clearConfirmOpen, setClearConfirmOpen] = useState11(false);
5824
- const [moveModalOpen, setMoveModalOpen] = useState11(false);
5825
- const [conversationToMove, setConversationToMove] = useState11(null);
5826
- const [renameProjectId, setRenameProjectId] = useState11(null);
5949
+ const [searchQuery, setSearchQuery] = useState12("");
5950
+ const [menuAnchorEl, setMenuAnchorEl] = useState12(null);
5951
+ const [clearConfirmOpen, setClearConfirmOpen] = useState12(false);
5952
+ const [moveModalOpen, setMoveModalOpen] = useState12(false);
5953
+ const [conversationToMove, setConversationToMove] = useState12(null);
5954
+ const [renameProjectId, setRenameProjectId] = useState12(null);
5827
5955
  const getCustomClaim = useCallback4((key) => {
5828
5956
  if (!user) return void 0;
5829
5957
  const record = user;
5830
5958
  return coerceOptionalString(record[key]);
5831
5959
  }, [user]);
5832
- const userDisplayName = useMemo(() => {
5960
+ const userDisplayName = useMemo2(() => {
5833
5961
  if (!user) return void 0;
5834
5962
  const candidateFields = [
5835
5963
  coerceOptionalString(user.name),
@@ -5844,7 +5972,7 @@ var ConversationDrawer = ({ open, onClose }) => {
5844
5972
  if (trimmedEmail) return trimmedEmail;
5845
5973
  return user.sub;
5846
5974
  }, [user, getCustomClaim]);
5847
- const userSecondaryText = useMemo(() => {
5975
+ const userSecondaryText = useMemo2(() => {
5848
5976
  if (!user) return void 0;
5849
5977
  const trimmedEmail = coerceOptionalString(user.email);
5850
5978
  if (trimmedEmail && trimmedEmail !== userDisplayName) {
@@ -5856,7 +5984,7 @@ var ConversationDrawer = ({ open, onClose }) => {
5856
5984
  }
5857
5985
  return void 0;
5858
5986
  }, [user, userDisplayName]);
5859
- const [avatarImage, setAvatarImage] = useState11(BANDIT_AVATAR);
5987
+ const [avatarImage, setAvatarImage] = useState12(BANDIT_AVATAR);
5860
5988
  useEffect10(() => {
5861
5989
  let active2 = true;
5862
5990
  let objectUrl = null;
@@ -5898,7 +6026,7 @@ var ConversationDrawer = ({ open, onClose }) => {
5898
6026
  };
5899
6027
  }, [getCustomClaim]);
5900
6028
  const avatarLabel = userDisplayName || user?.email || "Bandit";
5901
- const avatarInitials = useMemo(() => deriveInitials(avatarLabel), [avatarLabel]);
6029
+ const avatarInitials = useMemo2(() => deriveInitials(avatarLabel), [avatarLabel]);
5902
6030
  useEffect10(() => {
5903
6031
  if (!projectsHydrated) {
5904
6032
  hydrateProjects();
@@ -5917,7 +6045,7 @@ var ConversationDrawer = ({ open, onClose }) => {
5917
6045
  const end = Math.min(text.length, idx + query.length + 60);
5918
6046
  return text.slice(start, end).replace(/\s+/g, " ").trim();
5919
6047
  };
5920
- const projectGroups = useMemo(() => {
6048
+ const projectGroups = useMemo2(() => {
5921
6049
  const groups = projects.map((project) => ({
5922
6050
  id: project.id,
5923
6051
  name: project.name,
@@ -5940,7 +6068,7 @@ var ConversationDrawer = ({ open, onClose }) => {
5940
6068
  }
5941
6069
  return groups.filter((group) => group.conversations.length > 0 || group.id !== null);
5942
6070
  }, [projects, conversations, collapsedProjects]);
5943
- const filteredProjectGroups = useMemo(() => {
6071
+ const filteredProjectGroups = useMemo2(() => {
5944
6072
  if (!searchQuery.trim()) return projectGroups;
5945
6073
  const query = searchQuery.toLowerCase();
5946
6074
  return projectGroups.map((group) => {
@@ -6011,8 +6139,8 @@ var ConversationDrawer = ({ open, onClose }) => {
6011
6139
  setMoveModalOpen(false);
6012
6140
  setConversationToMove(null);
6013
6141
  };
6014
- return /* @__PURE__ */ jsxs9(Fragment6, { children: [
6015
- /* @__PURE__ */ jsxs9(
6142
+ return /* @__PURE__ */ jsxs10(Fragment6, { children: [
6143
+ /* @__PURE__ */ jsxs10(
6016
6144
  Drawer,
6017
6145
  {
6018
6146
  anchor: "left",
@@ -6054,8 +6182,8 @@ var ConversationDrawer = ({ open, onClose }) => {
6054
6182
  }
6055
6183
  },
6056
6184
  children: [
6057
- /* @__PURE__ */ jsxs9(
6058
- Box9,
6185
+ /* @__PURE__ */ jsxs10(
6186
+ Box10,
6059
6187
  {
6060
6188
  sx: {
6061
6189
  p: 2,
@@ -6066,7 +6194,7 @@ var ConversationDrawer = ({ open, onClose }) => {
6066
6194
  gap: 1
6067
6195
  },
6068
6196
  children: [
6069
- /* @__PURE__ */ jsx12(Tooltip3, { title: "Memories", arrow: true, children: /* @__PURE__ */ jsx12(
6197
+ /* @__PURE__ */ jsx13(Tooltip4, { title: "Memories", arrow: true, children: /* @__PURE__ */ jsx13(
6070
6198
  IconButton7,
6071
6199
  {
6072
6200
  onClick: () => setMemoryModalOpen(true),
@@ -6079,10 +6207,10 @@ var ConversationDrawer = ({ open, onClose }) => {
6079
6207
  bgcolor: alpha6(theme.palette.primary.main, 0.1)
6080
6208
  }
6081
6209
  },
6082
- children: /* @__PURE__ */ jsx12(MemoryIcon, {})
6210
+ children: /* @__PURE__ */ jsx13(MemoryIcon, {})
6083
6211
  }
6084
6212
  ) }),
6085
- /* @__PURE__ */ jsx12(Tooltip3, { title: tooltip("manageProjects"), arrow: true, children: /* @__PURE__ */ jsx12(
6213
+ /* @__PURE__ */ jsx13(Tooltip4, { title: tooltip("manageProjects"), arrow: true, children: /* @__PURE__ */ jsx13(
6086
6214
  IconButton7,
6087
6215
  {
6088
6216
  onClick: () => setProjectManagementOpen(true),
@@ -6095,10 +6223,10 @@ var ConversationDrawer = ({ open, onClose }) => {
6095
6223
  bgcolor: alpha6(theme.palette.primary.main, 0.1)
6096
6224
  }
6097
6225
  },
6098
- children: /* @__PURE__ */ jsx12(FolderIcon4, {})
6226
+ children: /* @__PURE__ */ jsx13(FolderIcon4, {})
6099
6227
  }
6100
6228
  ) }),
6101
- /* @__PURE__ */ jsx12(Tooltip3, { title: tooltip("conversationOptions"), arrow: true, children: /* @__PURE__ */ jsx12(
6229
+ /* @__PURE__ */ jsx13(Tooltip4, { title: tooltip("conversationOptions"), arrow: true, children: /* @__PURE__ */ jsx13(
6102
6230
  IconButton7,
6103
6231
  {
6104
6232
  onClick: handleMenuOpen,
@@ -6111,10 +6239,10 @@ var ConversationDrawer = ({ open, onClose }) => {
6111
6239
  bgcolor: alpha6(theme.palette.text.primary, 0.1)
6112
6240
  }
6113
6241
  },
6114
- children: /* @__PURE__ */ jsx12(MoreVertIcon3, {})
6242
+ children: /* @__PURE__ */ jsx13(MoreVertIcon3, {})
6115
6243
  }
6116
6244
  ) }),
6117
- isMobile && /* @__PURE__ */ jsx12(Tooltip3, { title: tooltip("closeConversationsPanel"), children: /* @__PURE__ */ jsx12(
6245
+ isMobile && /* @__PURE__ */ jsx13(Tooltip4, { title: tooltip("closeConversationsPanel"), children: /* @__PURE__ */ jsx13(
6118
6246
  IconButton7,
6119
6247
  {
6120
6248
  onClick: (e) => {
@@ -6131,13 +6259,13 @@ var ConversationDrawer = ({ open, onClose }) => {
6131
6259
  bgcolor: alpha6(theme.palette.error.main, 0.1)
6132
6260
  }
6133
6261
  },
6134
- children: /* @__PURE__ */ jsx12(CloseIcon4, {})
6262
+ children: /* @__PURE__ */ jsx13(CloseIcon4, {})
6135
6263
  }
6136
6264
  ) })
6137
6265
  ]
6138
6266
  }
6139
6267
  ),
6140
- /* @__PURE__ */ jsx12(Box9, { sx: { p: 2, pb: 1 }, children: /* @__PURE__ */ jsx12(
6268
+ /* @__PURE__ */ jsx13(Box10, { sx: { p: 2, pb: 1 }, children: /* @__PURE__ */ jsx13(
6141
6269
  TextField6,
6142
6270
  {
6143
6271
  fullWidth: true,
@@ -6147,8 +6275,8 @@ var ConversationDrawer = ({ open, onClose }) => {
6147
6275
  onChange: (e) => setSearchQuery(e.target.value),
6148
6276
  variant: "outlined",
6149
6277
  InputProps: {
6150
- startAdornment: /* @__PURE__ */ jsx12(InputAdornment, { position: "start", children: /* @__PURE__ */ jsx12(SearchIcon, { size: 16, color: theme.palette.text.secondary }) }),
6151
- endAdornment: searchQuery && /* @__PURE__ */ jsx12(InputAdornment, { position: "end", children: /* @__PURE__ */ jsx12(Tooltip3, { title: tooltip("clearSearch"), children: /* @__PURE__ */ jsx12(
6278
+ startAdornment: /* @__PURE__ */ jsx13(InputAdornment, { position: "start", children: /* @__PURE__ */ jsx13(SearchIcon, { size: 16, color: theme.palette.text.secondary }) }),
6279
+ endAdornment: searchQuery && /* @__PURE__ */ jsx13(InputAdornment, { position: "end", children: /* @__PURE__ */ jsx13(Tooltip4, { title: tooltip("clearSearch"), children: /* @__PURE__ */ jsx13(
6152
6280
  IconButton7,
6153
6281
  {
6154
6282
  onClick: handleSearchClear,
@@ -6156,7 +6284,7 @@ var ConversationDrawer = ({ open, onClose }) => {
6156
6284
  edge: "end",
6157
6285
  "aria-label": tooltip("clearSearch"),
6158
6286
  sx: { color: theme.palette.text.secondary },
6159
- children: /* @__PURE__ */ jsx12(ClearIcon, { size: 16 })
6287
+ children: /* @__PURE__ */ jsx13(ClearIcon, { size: 16 })
6160
6288
  }
6161
6289
  ) }) })
6162
6290
  },
@@ -6173,9 +6301,9 @@ var ConversationDrawer = ({ open, onClose }) => {
6173
6301
  }
6174
6302
  }
6175
6303
  ) }),
6176
- /* @__PURE__ */ jsxs9(Box9, { sx: { flex: 1, overflow: "auto", display: "flex", flexDirection: "column" }, children: [
6177
- /* @__PURE__ */ jsxs9(
6178
- Box9,
6304
+ /* @__PURE__ */ jsxs10(Box10, { sx: { flex: 1, overflow: "auto", display: "flex", flexDirection: "column" }, children: [
6305
+ /* @__PURE__ */ jsxs10(
6306
+ Box10,
6179
6307
  {
6180
6308
  onClick: async () => {
6181
6309
  const names = new Set(projects.map((p) => p.name));
@@ -6209,8 +6337,8 @@ var ConversationDrawer = ({ open, onClose }) => {
6209
6337
  "&:hover": { bgcolor: alpha6(theme.palette.text.primary, 0.04) }
6210
6338
  },
6211
6339
  children: [
6212
- /* @__PURE__ */ jsx12(
6213
- Box9,
6340
+ /* @__PURE__ */ jsx13(
6341
+ Box10,
6214
6342
  {
6215
6343
  sx: {
6216
6344
  width: 28,
@@ -6222,10 +6350,10 @@ var ConversationDrawer = ({ open, onClose }) => {
6222
6350
  justifyContent: "center",
6223
6351
  flexShrink: 0
6224
6352
  },
6225
- children: /* @__PURE__ */ jsx12(FolderIcon4, { size: 16, color: theme.palette.success.main })
6353
+ children: /* @__PURE__ */ jsx13(FolderIcon4, { size: 16, color: theme.palette.success.main })
6226
6354
  }
6227
6355
  ),
6228
- /* @__PURE__ */ jsx12(
6356
+ /* @__PURE__ */ jsx13(
6229
6357
  Typography7,
6230
6358
  {
6231
6359
  variant: "subtitle2",
@@ -6233,22 +6361,22 @@ var ConversationDrawer = ({ open, onClose }) => {
6233
6361
  children: "New Project"
6234
6362
  }
6235
6363
  ),
6236
- /* @__PURE__ */ jsx12(Tooltip3, { title: tooltip("addProject"), arrow: true, children: /* @__PURE__ */ jsx12(
6364
+ /* @__PURE__ */ jsx13(Tooltip4, { title: tooltip("addProject"), arrow: true, children: /* @__PURE__ */ jsx13(
6237
6365
  IconButton7,
6238
6366
  {
6239
6367
  size: "small",
6240
6368
  "aria-label": tooltip("addProject"),
6241
6369
  sx: { color: theme.palette.success.main },
6242
- children: /* @__PURE__ */ jsx12(AddIcon4, { size: 16 })
6370
+ children: /* @__PURE__ */ jsx13(AddIcon4, { size: 16 })
6243
6371
  }
6244
6372
  ) })
6245
6373
  ]
6246
6374
  }
6247
6375
  ),
6248
- /* @__PURE__ */ jsx12(Divider2, { sx: { opacity: 0.3 } }),
6249
- filteredProjectGroups.map((group, index) => /* @__PURE__ */ jsxs9(Box9, { children: [
6250
- group.id === null && filteredProjectGroups.length > 1 && /* @__PURE__ */ jsxs9(
6251
- Box9,
6376
+ /* @__PURE__ */ jsx13(Divider2, { sx: { opacity: 0.3 } }),
6377
+ filteredProjectGroups.map((group, index) => /* @__PURE__ */ jsxs10(Box10, { children: [
6378
+ group.id === null && filteredProjectGroups.length > 1 && /* @__PURE__ */ jsxs10(
6379
+ Box10,
6252
6380
  {
6253
6381
  sx: {
6254
6382
  py: 2,
@@ -6258,9 +6386,9 @@ var ConversationDrawer = ({ open, onClose }) => {
6258
6386
  gap: 2
6259
6387
  },
6260
6388
  children: [
6261
- /* @__PURE__ */ jsx12(Divider2, { sx: { flex: 1, opacity: 0.6 } }),
6262
- /* @__PURE__ */ jsxs9(Box9, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
6263
- /* @__PURE__ */ jsx12(
6389
+ /* @__PURE__ */ jsx13(Divider2, { sx: { flex: 1, opacity: 0.6 } }),
6390
+ /* @__PURE__ */ jsxs10(Box10, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
6391
+ /* @__PURE__ */ jsx13(
6264
6392
  InboxIcon3,
6265
6393
  {
6266
6394
  size: 14,
@@ -6268,7 +6396,7 @@ var ConversationDrawer = ({ open, onClose }) => {
6268
6396
  style: { opacity: 0.7 }
6269
6397
  }
6270
6398
  ),
6271
- /* @__PURE__ */ jsx12(
6399
+ /* @__PURE__ */ jsx13(
6272
6400
  Typography7,
6273
6401
  {
6274
6402
  variant: "caption",
@@ -6283,12 +6411,12 @@ var ConversationDrawer = ({ open, onClose }) => {
6283
6411
  }
6284
6412
  )
6285
6413
  ] }),
6286
- /* @__PURE__ */ jsx12(Divider2, { sx: { flex: 1, opacity: 0.6 } })
6414
+ /* @__PURE__ */ jsx13(Divider2, { sx: { flex: 1, opacity: 0.6 } })
6287
6415
  ]
6288
6416
  }
6289
6417
  ),
6290
- group.id !== null ? /* @__PURE__ */ jsxs9(Fragment6, { children: [
6291
- /* @__PURE__ */ jsx12(
6418
+ group.id !== null ? /* @__PURE__ */ jsxs10(Fragment6, { children: [
6419
+ /* @__PURE__ */ jsx13(
6292
6420
  project_header_default,
6293
6421
  {
6294
6422
  projectId: group.id,
@@ -6317,8 +6445,8 @@ var ConversationDrawer = ({ open, onClose }) => {
6317
6445
  }
6318
6446
  }
6319
6447
  ),
6320
- /* @__PURE__ */ jsx12(Collapse2, { in: !group.collapsed, children: /* @__PURE__ */ jsxs9(Box9, { sx: { pb: 1 }, children: [
6321
- group.conversations.map((conversation) => /* @__PURE__ */ jsx12(
6448
+ /* @__PURE__ */ jsx13(Collapse2, { in: !group.collapsed, children: /* @__PURE__ */ jsxs10(Box10, { sx: { pb: 1 }, children: [
6449
+ group.conversations.map((conversation) => /* @__PURE__ */ jsx13(
6322
6450
  simple_conversation_item_default,
6323
6451
  {
6324
6452
  conversation,
@@ -6338,8 +6466,8 @@ var ConversationDrawer = ({ open, onClose }) => {
6338
6466
  },
6339
6467
  conversation.id
6340
6468
  )),
6341
- group.conversations.length === 0 && !group.collapsed && group.id !== null && /* @__PURE__ */ jsxs9(
6342
- Box9,
6469
+ group.conversations.length === 0 && !group.collapsed && group.id !== null && /* @__PURE__ */ jsxs10(
6470
+ Box10,
6343
6471
  {
6344
6472
  sx: {
6345
6473
  p: 3,
@@ -6347,17 +6475,17 @@ var ConversationDrawer = ({ open, onClose }) => {
6347
6475
  color: theme.palette.text.secondary
6348
6476
  },
6349
6477
  children: [
6350
- /* @__PURE__ */ jsx12(Typography7, { variant: "body2", children: "No conversations in this project yet" }),
6351
- /* @__PURE__ */ jsx12(Typography7, { variant: "caption", sx: { mt: 1, display: "block" }, children: "Drag conversations here or use the + button above" })
6478
+ /* @__PURE__ */ jsx13(Typography7, { variant: "body2", children: "No conversations in this project yet" }),
6479
+ /* @__PURE__ */ jsx13(Typography7, { variant: "caption", sx: { mt: 1, display: "block" }, children: "Drag conversations here or use the + button above" })
6352
6480
  ]
6353
6481
  }
6354
6482
  )
6355
6483
  ] }) }),
6356
- /* @__PURE__ */ jsx12(Divider2, { sx: { opacity: 0.3 } })
6484
+ /* @__PURE__ */ jsx13(Divider2, { sx: { opacity: 0.3 } })
6357
6485
  ] }) : (
6358
6486
  // Special handling for ungrouped - no header, just conversations in scrollable area
6359
- /* @__PURE__ */ jsx12(
6360
- Box9,
6487
+ /* @__PURE__ */ jsx13(
6488
+ Box10,
6361
6489
  {
6362
6490
  sx: {
6363
6491
  minHeight: 0,
@@ -6370,7 +6498,7 @@ var ConversationDrawer = ({ open, onClose }) => {
6370
6498
  mx: 1,
6371
6499
  mb: 1
6372
6500
  },
6373
- children: group.conversations.map((conversation) => /* @__PURE__ */ jsx12(
6501
+ children: group.conversations.map((conversation) => /* @__PURE__ */ jsx13(
6374
6502
  simple_conversation_item_default,
6375
6503
  {
6376
6504
  conversation,
@@ -6394,8 +6522,8 @@ var ConversationDrawer = ({ open, onClose }) => {
6394
6522
  )
6395
6523
  )
6396
6524
  ] }, group.id || "ungrouped")),
6397
- filteredProjectGroups.length === 0 && /* @__PURE__ */ jsxs9(
6398
- Box9,
6525
+ filteredProjectGroups.length === 0 && /* @__PURE__ */ jsxs10(
6526
+ Box10,
6399
6527
  {
6400
6528
  sx: {
6401
6529
  flex: 1,
@@ -6408,14 +6536,14 @@ var ConversationDrawer = ({ open, onClose }) => {
6408
6536
  color: theme.palette.text.secondary
6409
6537
  },
6410
6538
  children: [
6411
- /* @__PURE__ */ jsx12(Typography7, { variant: "h6", sx: { mb: 1 }, children: searchQuery ? "No conversations found" : "No conversations yet" }),
6412
- /* @__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" })
6539
+ /* @__PURE__ */ jsx13(Typography7, { variant: "h6", sx: { mb: 1 }, children: searchQuery ? "No conversations found" : "No conversations yet" }),
6540
+ /* @__PURE__ */ jsx13(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" })
6413
6541
  ]
6414
6542
  }
6415
6543
  )
6416
6544
  ] }),
6417
- /* @__PURE__ */ jsxs9(
6418
- Box9,
6545
+ /* @__PURE__ */ jsxs10(
6546
+ Box10,
6419
6547
  {
6420
6548
  onClick: user ? () => {
6421
6549
  window.location.href = "/profile";
@@ -6436,7 +6564,7 @@ var ConversationDrawer = ({ open, onClose }) => {
6436
6564
  "&:hover": user ? { bgcolor: alpha6(theme.palette.primary.main, 0.08) } : void 0
6437
6565
  },
6438
6566
  children: [
6439
- /* @__PURE__ */ jsx12(
6567
+ /* @__PURE__ */ jsx13(
6440
6568
  Avatar6,
6441
6569
  {
6442
6570
  src: avatarImage,
@@ -6451,8 +6579,8 @@ var ConversationDrawer = ({ open, onClose }) => {
6451
6579
  children: avatarInitials
6452
6580
  }
6453
6581
  ),
6454
- /* @__PURE__ */ jsxs9(
6455
- Box9,
6582
+ /* @__PURE__ */ jsxs10(
6583
+ Box10,
6456
6584
  {
6457
6585
  sx: {
6458
6586
  minWidth: 0,
@@ -6464,7 +6592,7 @@ var ConversationDrawer = ({ open, onClose }) => {
6464
6592
  gap: 0.25
6465
6593
  },
6466
6594
  children: [
6467
- /* @__PURE__ */ jsx12(
6595
+ /* @__PURE__ */ jsx13(
6468
6596
  Typography7,
6469
6597
  {
6470
6598
  variant: "subtitle2",
@@ -6473,7 +6601,7 @@ var ConversationDrawer = ({ open, onClose }) => {
6473
6601
  children: user ? userDisplayName : "Not signed in"
6474
6602
  }
6475
6603
  ),
6476
- /* @__PURE__ */ jsx12(
6604
+ /* @__PURE__ */ jsx13(
6477
6605
  Typography7,
6478
6606
  {
6479
6607
  variant: "caption",
@@ -6485,7 +6613,7 @@ var ConversationDrawer = ({ open, onClose }) => {
6485
6613
  ]
6486
6614
  }
6487
6615
  ),
6488
- user && /* @__PURE__ */ jsx12(
6616
+ user && /* @__PURE__ */ jsx13(
6489
6617
  SettingsIcon2,
6490
6618
  {
6491
6619
  size: 18,
@@ -6499,15 +6627,15 @@ var ConversationDrawer = ({ open, onClose }) => {
6499
6627
  ]
6500
6628
  }
6501
6629
  ),
6502
- /* @__PURE__ */ jsx12(
6630
+ /* @__PURE__ */ jsx13(
6503
6631
  project_management_modal_default,
6504
6632
  {
6505
6633
  open: projectManagementOpen,
6506
6634
  onClose: () => setProjectManagementOpen(false)
6507
6635
  }
6508
6636
  ),
6509
- /* @__PURE__ */ jsx12(memory_modal_default, { open: memoryModalOpen, onClose: () => setMemoryModalOpen(false) }),
6510
- conversationToMove && /* @__PURE__ */ jsx12(
6637
+ /* @__PURE__ */ jsx13(memory_modal_default, { open: memoryModalOpen, onClose: () => setMemoryModalOpen(false) }),
6638
+ conversationToMove && /* @__PURE__ */ jsx13(
6511
6639
  move_conversation_modal_default,
6512
6640
  {
6513
6641
  open: moveModalOpen,
@@ -6516,7 +6644,7 @@ var ConversationDrawer = ({ open, onClose }) => {
6516
6644
  currentProjectId: conversationToMove.projectId
6517
6645
  }
6518
6646
  ),
6519
- /* @__PURE__ */ jsx12(
6647
+ /* @__PURE__ */ jsx13(
6520
6648
  Menu3,
6521
6649
  {
6522
6650
  anchorEl: menuAnchorEl,
@@ -6530,7 +6658,7 @@ var ConversationDrawer = ({ open, onClose }) => {
6530
6658
  vertical: "bottom",
6531
6659
  horizontal: "right"
6532
6660
  },
6533
- children: /* @__PURE__ */ jsxs9(
6661
+ children: /* @__PURE__ */ jsxs10(
6534
6662
  MenuItem3,
6535
6663
  {
6536
6664
  onClick: () => {
@@ -6539,14 +6667,14 @@ var ConversationDrawer = ({ open, onClose }) => {
6539
6667
  },
6540
6668
  sx: { color: theme.palette.error.main },
6541
6669
  children: [
6542
- /* @__PURE__ */ jsx12(ListItemIcon3, { children: /* @__PURE__ */ jsx12(DeleteSweepIcon, { size: 16, color: theme.palette.error.main }) }),
6543
- /* @__PURE__ */ jsx12(ListItemText3, { children: "Clear All Conversations" })
6670
+ /* @__PURE__ */ jsx13(ListItemIcon3, { children: /* @__PURE__ */ jsx13(DeleteSweepIcon, { size: 16, color: theme.palette.error.main }) }),
6671
+ /* @__PURE__ */ jsx13(ListItemText3, { children: "Clear All Conversations" })
6544
6672
  ]
6545
6673
  }
6546
6674
  )
6547
6675
  }
6548
6676
  ),
6549
- /* @__PURE__ */ jsxs9(
6677
+ /* @__PURE__ */ jsxs10(
6550
6678
  Dialog3,
6551
6679
  {
6552
6680
  open: clearConfirmOpen,
@@ -6554,11 +6682,11 @@ var ConversationDrawer = ({ open, onClose }) => {
6554
6682
  maxWidth: "sm",
6555
6683
  fullWidth: true,
6556
6684
  children: [
6557
- /* @__PURE__ */ jsx12(DialogTitle3, { children: "Clear All Conversations?" }),
6558
- /* @__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?" }) }),
6559
- /* @__PURE__ */ jsxs9(DialogActions3, { children: [
6560
- /* @__PURE__ */ jsx12(Button5, { onClick: () => setClearConfirmOpen(false), children: "Cancel" }),
6561
- /* @__PURE__ */ jsx12(
6685
+ /* @__PURE__ */ jsx13(DialogTitle3, { children: "Clear All Conversations?" }),
6686
+ /* @__PURE__ */ jsx13(DialogContent3, { children: /* @__PURE__ */ jsx13(Typography7, { children: "This will permanently delete all conversations and cannot be undone. Are you sure you want to continue?" }) }),
6687
+ /* @__PURE__ */ jsxs10(DialogActions3, { children: [
6688
+ /* @__PURE__ */ jsx13(Button5, { onClick: () => setClearConfirmOpen(false), children: "Cancel" }),
6689
+ /* @__PURE__ */ jsx13(
6562
6690
  Button5,
6563
6691
  {
6564
6692
  onClick: handleClearAllConfirm,
@@ -6576,9 +6704,9 @@ var ConversationDrawer = ({ open, onClose }) => {
6576
6704
  var conversation_drawer_default = ConversationDrawer;
6577
6705
 
6578
6706
  // src/chat/enhanced-mobile-conversations-modal.tsx
6579
- import { useState as useState12, useMemo as useMemo2, useEffect as useEffect11, useRef as useRef9, useCallback as useCallback5 } from "react";
6707
+ import { useState as useState13, useMemo as useMemo3, useEffect as useEffect11, useRef as useRef9, useCallback as useCallback5 } from "react";
6580
6708
  import {
6581
- Box as Box10,
6709
+ Box as Box11,
6582
6710
  IconButton as IconButton8,
6583
6711
  Modal as Modal2,
6584
6712
  Typography as Typography8,
@@ -6603,7 +6731,7 @@ import {
6603
6731
  } from "@mui/material";
6604
6732
  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";
6605
6733
  import { useTheme as useTheme11, alpha as alpha7 } from "@mui/material/styles";
6606
- import { Fragment as Fragment7, jsx as jsx13, jsxs as jsxs10 } from "react/jsx-runtime";
6734
+ import { Fragment as Fragment7, jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
6607
6735
  var BANDIT_AVATAR2 = "https://cdn.burtson.ai/images/bandit-head.png";
6608
6736
  var coerceOptionalString2 = (value) => {
6609
6737
  if (typeof value !== "string") return void 0;
@@ -6654,24 +6782,24 @@ var EnhancedMobileConversationsModal = ({
6654
6782
  createProject,
6655
6783
  deleteProject
6656
6784
  } = useProjectStore();
6657
- const [projectManagementOpen, setProjectManagementOpen] = useState12(false);
6658
- const [collapsedProjects, setCollapsedProjects] = useState12(/* @__PURE__ */ new Set());
6785
+ const [projectManagementOpen, setProjectManagementOpen] = useState13(false);
6786
+ const [collapsedProjects, setCollapsedProjects] = useState13(/* @__PURE__ */ new Set());
6659
6787
  const didInitCollapseRef = useRef9(false);
6660
- const [searchQuery, setSearchQuery] = useState12("");
6661
- const [menuAnchorEl, setMenuAnchorEl] = useState12(null);
6662
- const [clearConfirmOpen, setClearConfirmOpen] = useState12(false);
6663
- const [moveModalOpen, setMoveModalOpen] = useState12(false);
6664
- const [conversationToMove, setConversationToMove] = useState12(null);
6665
- const [renameProjectId, setRenameProjectId] = useState12(null);
6666
- const [deletedConversationIds, setDeletedConversationIds] = useState12(/* @__PURE__ */ new Set());
6667
- const [touchDragState, setTouchDragState] = useState12({ conversationId: null, originProjectId: null, hoverProjectId: null });
6668
- const [avatarImage, setAvatarImage] = useState12(BANDIT_AVATAR2);
6788
+ const [searchQuery, setSearchQuery] = useState13("");
6789
+ const [menuAnchorEl, setMenuAnchorEl] = useState13(null);
6790
+ const [clearConfirmOpen, setClearConfirmOpen] = useState13(false);
6791
+ const [moveModalOpen, setMoveModalOpen] = useState13(false);
6792
+ const [conversationToMove, setConversationToMove] = useState13(null);
6793
+ const [renameProjectId, setRenameProjectId] = useState13(null);
6794
+ const [deletedConversationIds, setDeletedConversationIds] = useState13(/* @__PURE__ */ new Set());
6795
+ const [touchDragState, setTouchDragState] = useState13({ conversationId: null, originProjectId: null, hoverProjectId: null });
6796
+ const [avatarImage, setAvatarImage] = useState13(BANDIT_AVATAR2);
6669
6797
  const getCustomClaim = useCallback5((key) => {
6670
6798
  if (!user) return void 0;
6671
6799
  const record = user;
6672
6800
  return coerceOptionalString2(record[key]);
6673
6801
  }, [user]);
6674
- const userDisplayName = useMemo2(() => {
6802
+ const userDisplayName = useMemo3(() => {
6675
6803
  if (!user) return void 0;
6676
6804
  const candidateFields = [
6677
6805
  coerceOptionalString2(user.name),
@@ -6686,7 +6814,7 @@ var EnhancedMobileConversationsModal = ({
6686
6814
  if (trimmedEmail) return trimmedEmail;
6687
6815
  return user.sub;
6688
6816
  }, [user, getCustomClaim]);
6689
- const userSecondaryText = useMemo2(() => {
6817
+ const userSecondaryText = useMemo3(() => {
6690
6818
  if (!user) return void 0;
6691
6819
  const trimmedEmail = coerceOptionalString2(user.email);
6692
6820
  if (trimmedEmail && trimmedEmail !== userDisplayName) {
@@ -6715,7 +6843,7 @@ var EnhancedMobileConversationsModal = ({
6715
6843
  }
6716
6844
  }, [open]);
6717
6845
  const avatarLabel = userDisplayName || user?.email || "Bandit";
6718
- const avatarInitials = useMemo2(() => deriveInitials2(avatarLabel), [avatarLabel]);
6846
+ const avatarInitials = useMemo3(() => deriveInitials2(avatarLabel), [avatarLabel]);
6719
6847
  const buildSnippet = (text, query, idx) => {
6720
6848
  const start = Math.max(0, idx - 40);
6721
6849
  const end = Math.min(text.length, idx + query.length + 60);
@@ -6734,7 +6862,7 @@ var EnhancedMobileConversationsModal = ({
6734
6862
  }
6735
6863
  }
6736
6864
  }, [projectsHydrated, projects]);
6737
- const projectGroups = useMemo2(() => {
6865
+ const projectGroups = useMemo3(() => {
6738
6866
  const visibleConversations = conversations.filter(
6739
6867
  (conversation) => !deletedConversationIds.has(conversation.id)
6740
6868
  );
@@ -6760,11 +6888,11 @@ var EnhancedMobileConversationsModal = ({
6760
6888
  }
6761
6889
  return groups.filter((group) => group.conversations.length > 0 || group.id !== null);
6762
6890
  }, [projects, conversations, collapsedProjects, deletedConversationIds]);
6763
- const visibleConversationCount = useMemo2(
6891
+ const visibleConversationCount = useMemo3(
6764
6892
  () => projectGroups.reduce((total, group) => total + group.conversations.length, 0),
6765
6893
  [projectGroups]
6766
6894
  );
6767
- const filteredProjectGroups = useMemo2(() => {
6895
+ const filteredProjectGroups = useMemo3(() => {
6768
6896
  if (!searchQuery.trim()) return projectGroups;
6769
6897
  const query = searchQuery.toLowerCase();
6770
6898
  return projectGroups.map((group) => {
@@ -6840,11 +6968,11 @@ var EnhancedMobileConversationsModal = ({
6840
6968
  return { conversationId: null, originProjectId: null, hoverProjectId: null };
6841
6969
  });
6842
6970
  }, [getProjectIdFromPoint, moveConversationToProject]);
6843
- const activeDragConversation = useMemo2(() => {
6971
+ const activeDragConversation = useMemo3(() => {
6844
6972
  if (!touchDragState.conversationId) return null;
6845
6973
  return conversations.find((conv) => conv.id === touchDragState.conversationId) || null;
6846
6974
  }, [touchDragState.conversationId, conversations]);
6847
- const activeHoverLabel = useMemo2(() => {
6975
+ const activeHoverLabel = useMemo3(() => {
6848
6976
  if (!touchDragState.hoverProjectId) return "";
6849
6977
  if (touchDragState.hoverProjectId === "__ungrouped") return "Ungrouped";
6850
6978
  const project = projects.find((p) => p.id === touchDragState.hoverProjectId);
@@ -6908,8 +7036,8 @@ var EnhancedMobileConversationsModal = ({
6908
7036
  return changed ? next : prev;
6909
7037
  });
6910
7038
  }, [conversations]);
6911
- return /* @__PURE__ */ jsxs10(Fragment7, { children: [
6912
- /* @__PURE__ */ jsx13(
7039
+ return /* @__PURE__ */ jsxs11(Fragment7, { children: [
7040
+ /* @__PURE__ */ jsx14(
6913
7041
  Modal2,
6914
7042
  {
6915
7043
  open,
@@ -6918,8 +7046,8 @@ var EnhancedMobileConversationsModal = ({
6918
7046
  display: "flex",
6919
7047
  alignItems: "flex-end"
6920
7048
  },
6921
- children: /* @__PURE__ */ jsx13(Slide, { direction: "up", in: open, children: /* @__PURE__ */ jsxs10(
6922
- Box10,
7049
+ children: /* @__PURE__ */ jsx14(Slide, { direction: "up", in: open, children: /* @__PURE__ */ jsxs11(
7050
+ Box11,
6923
7051
  {
6924
7052
  sx: {
6925
7053
  width: "100%",
@@ -6932,7 +7060,7 @@ var EnhancedMobileConversationsModal = ({
6932
7060
  overflow: "hidden"
6933
7061
  },
6934
7062
  children: [
6935
- /* @__PURE__ */ jsx13(
7063
+ /* @__PURE__ */ jsx14(
6936
7064
  AppBar,
6937
7065
  {
6938
7066
  position: "static",
@@ -6942,9 +7070,9 @@ var EnhancedMobileConversationsModal = ({
6942
7070
  color: theme.palette.text.primary,
6943
7071
  borderBottom: `1px solid ${theme.palette.divider}`
6944
7072
  },
6945
- children: /* @__PURE__ */ jsxs10(Toolbar, { children: [
6946
- /* @__PURE__ */ jsx13(Typography8, { variant: "h6", sx: { flex: 1, fontWeight: 600 }, children: "Conversations" }),
6947
- visibleConversationCount > 0 && /* @__PURE__ */ jsx13(
7073
+ children: /* @__PURE__ */ jsxs11(Toolbar, { children: [
7074
+ /* @__PURE__ */ jsx14(Typography8, { variant: "h6", sx: { flex: 1, fontWeight: 600 }, children: "Conversations" }),
7075
+ visibleConversationCount > 0 && /* @__PURE__ */ jsx14(
6948
7076
  Chip4,
6949
7077
  {
6950
7078
  label: visibleConversationCount,
@@ -6957,34 +7085,34 @@ var EnhancedMobileConversationsModal = ({
6957
7085
  }
6958
7086
  }
6959
7087
  ),
6960
- /* @__PURE__ */ jsx13(
7088
+ /* @__PURE__ */ jsx14(
6961
7089
  IconButton8,
6962
7090
  {
6963
7091
  onClick: () => setProjectManagementOpen(true),
6964
7092
  sx: { color: theme.palette.text.secondary },
6965
- children: /* @__PURE__ */ jsx13(FolderIcon5, {})
7093
+ children: /* @__PURE__ */ jsx14(FolderIcon5, {})
6966
7094
  }
6967
7095
  ),
6968
- /* @__PURE__ */ jsx13(
7096
+ /* @__PURE__ */ jsx14(
6969
7097
  IconButton8,
6970
7098
  {
6971
7099
  onClick: handleMenuOpen,
6972
7100
  sx: { color: theme.palette.text.secondary },
6973
- children: /* @__PURE__ */ jsx13(MoreVertIcon4, {})
7101
+ children: /* @__PURE__ */ jsx14(MoreVertIcon4, {})
6974
7102
  }
6975
7103
  ),
6976
- /* @__PURE__ */ jsx13(
7104
+ /* @__PURE__ */ jsx14(
6977
7105
  IconButton8,
6978
7106
  {
6979
7107
  onClick: onClose,
6980
7108
  sx: { color: theme.palette.text.secondary },
6981
- children: /* @__PURE__ */ jsx13(CloseIcon5, {})
7109
+ children: /* @__PURE__ */ jsx14(CloseIcon5, {})
6982
7110
  }
6983
7111
  )
6984
7112
  ] })
6985
7113
  }
6986
7114
  ),
6987
- /* @__PURE__ */ jsx13(Box10, { sx: { p: 2, pb: 1 }, children: /* @__PURE__ */ jsx13(
7115
+ /* @__PURE__ */ jsx14(Box11, { sx: { p: 2, pb: 1 }, children: /* @__PURE__ */ jsx14(
6988
7116
  TextField7,
6989
7117
  {
6990
7118
  fullWidth: true,
@@ -6994,22 +7122,22 @@ var EnhancedMobileConversationsModal = ({
6994
7122
  onChange: (e) => setSearchQuery(e.target.value),
6995
7123
  variant: "outlined",
6996
7124
  InputProps: {
6997
- startAdornment: /* @__PURE__ */ jsx13(InputAdornment2, { position: "start", children: /* @__PURE__ */ jsx13(SearchIcon2, { size: 16, color: theme.palette.text.secondary }) }),
6998
- endAdornment: searchQuery && /* @__PURE__ */ jsx13(InputAdornment2, { position: "end", children: /* @__PURE__ */ jsx13(
7125
+ startAdornment: /* @__PURE__ */ jsx14(InputAdornment2, { position: "start", children: /* @__PURE__ */ jsx14(SearchIcon2, { size: 16, color: theme.palette.text.secondary }) }),
7126
+ endAdornment: searchQuery && /* @__PURE__ */ jsx14(InputAdornment2, { position: "end", children: /* @__PURE__ */ jsx14(
6999
7127
  IconButton8,
7000
7128
  {
7001
7129
  onClick: handleSearchClear,
7002
7130
  size: "small",
7003
7131
  edge: "end",
7004
7132
  sx: { color: theme.palette.text.secondary },
7005
- children: /* @__PURE__ */ jsx13(ClearIcon2, { size: 16 })
7133
+ children: /* @__PURE__ */ jsx14(ClearIcon2, { size: 16 })
7006
7134
  }
7007
7135
  ) })
7008
7136
  }
7009
7137
  }
7010
7138
  ) }),
7011
- /* @__PURE__ */ jsxs10(
7012
- Box10,
7139
+ /* @__PURE__ */ jsxs11(
7140
+ Box11,
7013
7141
  {
7014
7142
  sx: {
7015
7143
  flex: 1,
@@ -7020,8 +7148,8 @@ var EnhancedMobileConversationsModal = ({
7020
7148
  pb: 2
7021
7149
  },
7022
7150
  children: [
7023
- touchDragActive && activeDragConversation && /* @__PURE__ */ jsxs10(
7024
- Box10,
7151
+ touchDragActive && activeDragConversation && /* @__PURE__ */ jsxs11(
7152
+ Box11,
7025
7153
  {
7026
7154
  sx: {
7027
7155
  position: "absolute",
@@ -7046,7 +7174,7 @@ var EnhancedMobileConversationsModal = ({
7046
7174
  overflow: "hidden"
7047
7175
  },
7048
7176
  children: [
7049
- /* @__PURE__ */ jsxs10(
7177
+ /* @__PURE__ */ jsxs11(
7050
7178
  Typography8,
7051
7179
  {
7052
7180
  variant: "caption",
@@ -7059,8 +7187,8 @@ var EnhancedMobileConversationsModal = ({
7059
7187
  },
7060
7188
  children: [
7061
7189
  "Move",
7062
- /* @__PURE__ */ jsxs10(
7063
- Box10,
7190
+ /* @__PURE__ */ jsxs11(
7191
+ Box11,
7064
7192
  {
7065
7193
  component: "span",
7066
7194
  sx: {
@@ -7080,7 +7208,7 @@ var EnhancedMobileConversationsModal = ({
7080
7208
  ]
7081
7209
  }
7082
7210
  ),
7083
- /* @__PURE__ */ jsx13(
7211
+ /* @__PURE__ */ jsx14(
7084
7212
  Typography8,
7085
7213
  {
7086
7214
  variant: "caption",
@@ -7089,11 +7217,11 @@ var EnhancedMobileConversationsModal = ({
7089
7217
  fontWeight: 500,
7090
7218
  whiteSpace: "nowrap"
7091
7219
  },
7092
- children: activeHoverLabel ? /* @__PURE__ */ jsxs10(Fragment7, { children: [
7220
+ children: activeHoverLabel ? /* @__PURE__ */ jsxs11(Fragment7, { children: [
7093
7221
  "to",
7094
7222
  " ",
7095
- /* @__PURE__ */ jsx13(
7096
- Box10,
7223
+ /* @__PURE__ */ jsx14(
7224
+ Box11,
7097
7225
  {
7098
7226
  component: "span",
7099
7227
  sx: {
@@ -7109,8 +7237,8 @@ var EnhancedMobileConversationsModal = ({
7109
7237
  ]
7110
7238
  }
7111
7239
  ),
7112
- /* @__PURE__ */ jsxs10(
7113
- Box10,
7240
+ /* @__PURE__ */ jsxs11(
7241
+ Box11,
7114
7242
  {
7115
7243
  onClick: async () => {
7116
7244
  const names = new Set(projects.map((p) => p.name));
@@ -7144,8 +7272,8 @@ var EnhancedMobileConversationsModal = ({
7144
7272
  "&:hover": { bgcolor: alpha7(theme.palette.text.primary, 0.04) }
7145
7273
  },
7146
7274
  children: [
7147
- /* @__PURE__ */ jsx13(
7148
- Box10,
7275
+ /* @__PURE__ */ jsx14(
7276
+ Box11,
7149
7277
  {
7150
7278
  sx: {
7151
7279
  width: 28,
@@ -7157,10 +7285,10 @@ var EnhancedMobileConversationsModal = ({
7157
7285
  justifyContent: "center",
7158
7286
  flexShrink: 0
7159
7287
  },
7160
- children: /* @__PURE__ */ jsx13(FolderIcon5, { size: 16, color: theme.palette.success.main })
7288
+ children: /* @__PURE__ */ jsx14(FolderIcon5, { size: 16, color: theme.palette.success.main })
7161
7289
  }
7162
7290
  ),
7163
- /* @__PURE__ */ jsx13(
7291
+ /* @__PURE__ */ jsx14(
7164
7292
  Typography8,
7165
7293
  {
7166
7294
  variant: "subtitle2",
@@ -7168,14 +7296,14 @@ var EnhancedMobileConversationsModal = ({
7168
7296
  children: "New Project"
7169
7297
  }
7170
7298
  ),
7171
- /* @__PURE__ */ jsx13(IconButton8, { size: "small", sx: { color: theme.palette.success.main }, children: /* @__PURE__ */ jsx13(AddIcon5, { size: 16 }) })
7299
+ /* @__PURE__ */ jsx14(IconButton8, { size: "small", sx: { color: theme.palette.success.main }, children: /* @__PURE__ */ jsx14(AddIcon5, { size: 16 }) })
7172
7300
  ]
7173
7301
  }
7174
7302
  ),
7175
- /* @__PURE__ */ jsx13(Divider3, { sx: { opacity: 0.3 } }),
7176
- filteredProjectGroups.map((group, index) => /* @__PURE__ */ jsxs10(Box10, { children: [
7177
- group.id === null && filteredProjectGroups.length > 1 && /* @__PURE__ */ jsxs10(
7178
- Box10,
7303
+ /* @__PURE__ */ jsx14(Divider3, { sx: { opacity: 0.3 } }),
7304
+ filteredProjectGroups.map((group, index) => /* @__PURE__ */ jsxs11(Box11, { children: [
7305
+ group.id === null && filteredProjectGroups.length > 1 && /* @__PURE__ */ jsxs11(
7306
+ Box11,
7179
7307
  {
7180
7308
  sx: {
7181
7309
  py: 2,
@@ -7185,9 +7313,9 @@ var EnhancedMobileConversationsModal = ({
7185
7313
  gap: 2
7186
7314
  },
7187
7315
  children: [
7188
- /* @__PURE__ */ jsx13(Divider3, { sx: { flex: 1, opacity: 0.6 } }),
7189
- /* @__PURE__ */ jsxs10(Box10, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
7190
- /* @__PURE__ */ jsx13(
7316
+ /* @__PURE__ */ jsx14(Divider3, { sx: { flex: 1, opacity: 0.6 } }),
7317
+ /* @__PURE__ */ jsxs11(Box11, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
7318
+ /* @__PURE__ */ jsx14(
7191
7319
  InboxIcon4,
7192
7320
  {
7193
7321
  size: 14,
@@ -7195,7 +7323,7 @@ var EnhancedMobileConversationsModal = ({
7195
7323
  style: { opacity: 0.7 }
7196
7324
  }
7197
7325
  ),
7198
- /* @__PURE__ */ jsx13(
7326
+ /* @__PURE__ */ jsx14(
7199
7327
  Typography8,
7200
7328
  {
7201
7329
  variant: "caption",
@@ -7210,12 +7338,12 @@ var EnhancedMobileConversationsModal = ({
7210
7338
  }
7211
7339
  )
7212
7340
  ] }),
7213
- /* @__PURE__ */ jsx13(Divider3, { sx: { flex: 1, opacity: 0.6 } })
7341
+ /* @__PURE__ */ jsx14(Divider3, { sx: { flex: 1, opacity: 0.6 } })
7214
7342
  ]
7215
7343
  }
7216
7344
  ),
7217
- group.id !== null ? /* @__PURE__ */ jsxs10(Fragment7, { children: [
7218
- /* @__PURE__ */ jsx13(
7345
+ group.id !== null ? /* @__PURE__ */ jsxs11(Fragment7, { children: [
7346
+ /* @__PURE__ */ jsx14(
7219
7347
  project_header_default,
7220
7348
  {
7221
7349
  projectId: group.id,
@@ -7245,8 +7373,8 @@ var EnhancedMobileConversationsModal = ({
7245
7373
  isTouchTarget: touchDragActive && touchDragState.hoverProjectId === group.id
7246
7374
  }
7247
7375
  ),
7248
- /* @__PURE__ */ jsx13(Collapse3, { in: !group.collapsed, children: /* @__PURE__ */ jsx13(
7249
- Box10,
7376
+ /* @__PURE__ */ jsx14(Collapse3, { in: !group.collapsed, children: /* @__PURE__ */ jsx14(
7377
+ Box11,
7250
7378
  {
7251
7379
  "data-project-id": group.id ?? "__ungrouped",
7252
7380
  sx: {
@@ -7256,7 +7384,7 @@ var EnhancedMobileConversationsModal = ({
7256
7384
  transition: "border 0.2s ease, background-color 0.2s ease",
7257
7385
  backgroundColor: touchDragActive && touchDragState.hoverProjectId === group.id ? alpha7(theme.palette.primary.main, 0.08) : "transparent"
7258
7386
  },
7259
- children: group.conversations.map((conversation) => /* @__PURE__ */ jsx13(
7387
+ children: group.conversations.map((conversation) => /* @__PURE__ */ jsx14(
7260
7388
  simple_conversation_item_default,
7261
7389
  {
7262
7390
  conversation,
@@ -7290,8 +7418,8 @@ var EnhancedMobileConversationsModal = ({
7290
7418
  ) })
7291
7419
  ] }) : (
7292
7420
  // Special handling for ungrouped - no header, just conversations in scrollable area
7293
- /* @__PURE__ */ jsx13(
7294
- Box10,
7421
+ /* @__PURE__ */ jsx14(
7422
+ Box11,
7295
7423
  {
7296
7424
  sx: {
7297
7425
  minHeight: 0,
@@ -7307,7 +7435,7 @@ var EnhancedMobileConversationsModal = ({
7307
7435
  backgroundColor: touchDragActive && touchDragState.hoverProjectId === "__ungrouped" ? alpha7(theme.palette.primary.main, 0.08) : alpha7(theme.palette.background.default, 0.3)
7308
7436
  },
7309
7437
  "data-project-id": "__ungrouped",
7310
- children: group.conversations.map((conversation) => /* @__PURE__ */ jsx13(
7438
+ children: group.conversations.map((conversation) => /* @__PURE__ */ jsx14(
7311
7439
  simple_conversation_item_default,
7312
7440
  {
7313
7441
  conversation,
@@ -7341,8 +7469,8 @@ var EnhancedMobileConversationsModal = ({
7341
7469
  )
7342
7470
  )
7343
7471
  ] }, group.id || "ungrouped")),
7344
- filteredProjectGroups.length === 0 && /* @__PURE__ */ jsxs10(
7345
- Box10,
7472
+ filteredProjectGroups.length === 0 && /* @__PURE__ */ jsxs11(
7473
+ Box11,
7346
7474
  {
7347
7475
  sx: {
7348
7476
  flex: 1,
@@ -7355,16 +7483,16 @@ var EnhancedMobileConversationsModal = ({
7355
7483
  color: theme.palette.text.secondary
7356
7484
  },
7357
7485
  children: [
7358
- /* @__PURE__ */ jsx13(Typography8, { variant: "h6", sx: { mb: 1 }, children: searchQuery ? "No conversations found" : "No conversations yet" }),
7359
- /* @__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" })
7486
+ /* @__PURE__ */ jsx14(Typography8, { variant: "h6", sx: { mb: 1 }, children: searchQuery ? "No conversations found" : "No conversations yet" }),
7487
+ /* @__PURE__ */ jsx14(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" })
7360
7488
  ]
7361
7489
  }
7362
7490
  )
7363
7491
  ]
7364
7492
  }
7365
7493
  ),
7366
- /* @__PURE__ */ jsxs10(
7367
- Box10,
7494
+ /* @__PURE__ */ jsxs11(
7495
+ Box11,
7368
7496
  {
7369
7497
  sx: {
7370
7498
  mt: "auto",
@@ -7379,7 +7507,7 @@ var EnhancedMobileConversationsModal = ({
7379
7507
  flexWrap: "wrap"
7380
7508
  },
7381
7509
  children: [
7382
- /* @__PURE__ */ jsx13(
7510
+ /* @__PURE__ */ jsx14(
7383
7511
  Avatar7,
7384
7512
  {
7385
7513
  src: avatarImage,
@@ -7394,8 +7522,8 @@ var EnhancedMobileConversationsModal = ({
7394
7522
  children: avatarInitials
7395
7523
  }
7396
7524
  ),
7397
- /* @__PURE__ */ jsxs10(Box10, { sx: { display: "flex", flexDirection: "column", alignItems: "center", gap: 0.5, minWidth: 0 }, children: [
7398
- /* @__PURE__ */ jsx13(
7525
+ /* @__PURE__ */ jsxs11(Box11, { sx: { display: "flex", flexDirection: "column", alignItems: "center", gap: 0.5, minWidth: 0 }, children: [
7526
+ /* @__PURE__ */ jsx14(
7399
7527
  Typography8,
7400
7528
  {
7401
7529
  variant: "subtitle2",
@@ -7404,7 +7532,7 @@ var EnhancedMobileConversationsModal = ({
7404
7532
  children: user ? userDisplayName : "Not signed in"
7405
7533
  }
7406
7534
  ),
7407
- !user && /* @__PURE__ */ jsx13(
7535
+ !user && /* @__PURE__ */ jsx14(
7408
7536
  Typography8,
7409
7537
  {
7410
7538
  variant: "caption",
@@ -7422,14 +7550,14 @@ var EnhancedMobileConversationsModal = ({
7422
7550
  ) })
7423
7551
  }
7424
7552
  ),
7425
- /* @__PURE__ */ jsx13(
7553
+ /* @__PURE__ */ jsx14(
7426
7554
  project_management_modal_default,
7427
7555
  {
7428
7556
  open: projectManagementOpen,
7429
7557
  onClose: () => setProjectManagementOpen(false)
7430
7558
  }
7431
7559
  ),
7432
- conversationToMove && /* @__PURE__ */ jsx13(
7560
+ conversationToMove && /* @__PURE__ */ jsx14(
7433
7561
  move_conversation_modal_default,
7434
7562
  {
7435
7563
  open: moveModalOpen,
@@ -7438,7 +7566,7 @@ var EnhancedMobileConversationsModal = ({
7438
7566
  currentProjectId: conversationToMove.projectId
7439
7567
  }
7440
7568
  ),
7441
- /* @__PURE__ */ jsx13(
7569
+ /* @__PURE__ */ jsx14(
7442
7570
  Menu4,
7443
7571
  {
7444
7572
  anchorEl: menuAnchorEl,
@@ -7452,7 +7580,7 @@ var EnhancedMobileConversationsModal = ({
7452
7580
  vertical: "bottom",
7453
7581
  horizontal: "right"
7454
7582
  },
7455
- children: /* @__PURE__ */ jsxs10(
7583
+ children: /* @__PURE__ */ jsxs11(
7456
7584
  MenuItem4,
7457
7585
  {
7458
7586
  onClick: () => {
@@ -7462,14 +7590,14 @@ var EnhancedMobileConversationsModal = ({
7462
7590
  disabled: visibleConversationCount === 0,
7463
7591
  sx: { color: theme.palette.error.main },
7464
7592
  children: [
7465
- /* @__PURE__ */ jsx13(ListItemIcon4, { children: /* @__PURE__ */ jsx13(DeleteSweepIcon2, { size: 16, color: theme.palette.error.main }) }),
7466
- /* @__PURE__ */ jsx13(ListItemText4, { children: "Clear All Conversations" })
7593
+ /* @__PURE__ */ jsx14(ListItemIcon4, { children: /* @__PURE__ */ jsx14(DeleteSweepIcon2, { size: 16, color: theme.palette.error.main }) }),
7594
+ /* @__PURE__ */ jsx14(ListItemText4, { children: "Clear All Conversations" })
7467
7595
  ]
7468
7596
  }
7469
7597
  )
7470
7598
  }
7471
7599
  ),
7472
- /* @__PURE__ */ jsxs10(
7600
+ /* @__PURE__ */ jsxs11(
7473
7601
  Dialog4,
7474
7602
  {
7475
7603
  open: clearConfirmOpen,
@@ -7477,11 +7605,11 @@ var EnhancedMobileConversationsModal = ({
7477
7605
  maxWidth: "sm",
7478
7606
  fullWidth: true,
7479
7607
  children: [
7480
- /* @__PURE__ */ jsx13(DialogTitle4, { children: "Clear All Conversations?" }),
7481
- /* @__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.` }) }),
7482
- /* @__PURE__ */ jsxs10(DialogActions4, { children: [
7483
- /* @__PURE__ */ jsx13(Button6, { onClick: () => setClearConfirmOpen(false), children: "Cancel" }),
7484
- /* @__PURE__ */ jsx13(
7608
+ /* @__PURE__ */ jsx14(DialogTitle4, { children: "Clear All Conversations?" }),
7609
+ /* @__PURE__ */ jsx14(DialogContent4, { children: /* @__PURE__ */ jsx14(Typography8, { children: visibleConversationCount === 0 ? "No conversations available to clear." : `This will permanently delete ${visibleConversationCount} conversation${visibleConversationCount === 1 ? "" : "s"} and cannot be undone.` }) }),
7610
+ /* @__PURE__ */ jsxs11(DialogActions4, { children: [
7611
+ /* @__PURE__ */ jsx14(Button6, { onClick: () => setClearConfirmOpen(false), children: "Cancel" }),
7612
+ /* @__PURE__ */ jsx14(
7485
7613
  Button6,
7486
7614
  {
7487
7615
  onClick: handleClearAllConfirm,
@@ -7500,7 +7628,7 @@ var enhanced_mobile_conversations_modal_default = EnhancedMobileConversationsMod
7500
7628
 
7501
7629
  // src/chat/chat-app-bar.tsx
7502
7630
  import { shallow as shallow2 } from "zustand/shallow";
7503
- import { Fragment as Fragment8, jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
7631
+ import { Fragment as Fragment8, jsx as jsx15, jsxs as jsxs12 } from "react/jsx-runtime";
7504
7632
  var CDN_BASE = "https://cdn.burtson.ai/";
7505
7633
  var banditHead = `${CDN_BASE}/images/bandit-head.png`;
7506
7634
  var modelAvatars = {
@@ -7547,12 +7675,12 @@ var ChatAppBar = ({
7547
7675
  menuBackground,
7548
7676
  menuText
7549
7677
  } = theme.palette.chat.appBar;
7550
- const [modelAnchorEl, setModelAnchorEl] = useState13(null);
7551
- const [engineAnchorEl, setEngineAnchorEl] = useState13(null);
7552
- const [voiceAnchorEl, setVoiceAnchorEl] = useState13(null);
7553
- const [modalOpen, setModalOpen] = useState13(false);
7554
- const [confirmModelChangeOpen, setConfirmModelChangeOpen] = useState13(false);
7555
- const [pendingModel, setPendingModel] = useState13(null);
7678
+ const [modelAnchorEl, setModelAnchorEl] = useState14(null);
7679
+ const [engineAnchorEl, setEngineAnchorEl] = useState14(null);
7680
+ const [voiceAnchorEl, setVoiceAnchorEl] = useState14(null);
7681
+ const [modalOpen, setModalOpen] = useState14(false);
7682
+ const [confirmModelChangeOpen, setConfirmModelChangeOpen] = useState14(false);
7683
+ const [pendingModel, setPendingModel] = useState14(null);
7556
7684
  const { conversations, currentId, createNewConversation, _hasHydrated } = useConversationStore();
7557
7685
  const { preferences } = usePreferencesStore();
7558
7686
  const { settings: packageSettings } = usePackageSettingsStore();
@@ -7596,16 +7724,16 @@ var ChatAppBar = ({
7596
7724
  };
7597
7725
  const syncIndicatorIcon = (() => {
7598
7726
  if (isPlaygroundMode2 || !syncEnabled) {
7599
- return /* @__PURE__ */ jsx14(CloudOffIcon, { fontSize: "small", color: "disabled" });
7727
+ return /* @__PURE__ */ jsx15(CloudOffIcon, { fontSize: "small", color: "disabled" });
7600
7728
  }
7601
7729
  switch (syncStatus) {
7602
7730
  case "syncing":
7603
- return /* @__PURE__ */ jsx14(SyncIcon, { fontSize: "small", sx: syncSpinSx, color: "primary" });
7731
+ return /* @__PURE__ */ jsx15(SyncIcon, { fontSize: "small", sx: syncSpinSx, color: "primary" });
7604
7732
  case "error":
7605
- return /* @__PURE__ */ jsx14(ErrorOutlineIcon, { fontSize: "small", color: "error" });
7733
+ return /* @__PURE__ */ jsx15(ErrorOutlineIcon, { fontSize: "small", color: "error" });
7606
7734
  case "idle":
7607
7735
  default:
7608
- return /* @__PURE__ */ jsx14(CloudDoneIcon, { fontSize: "small", color: "success" });
7736
+ return /* @__PURE__ */ jsx15(CloudDoneIcon, { fontSize: "small", color: "success" });
7609
7737
  }
7610
7738
  })();
7611
7739
  const syncTooltip = (() => {
@@ -7711,9 +7839,9 @@ var ChatAppBar = ({
7711
7839
  }
7712
7840
  safeNavigate("/");
7713
7841
  }
7714
- return /* @__PURE__ */ jsxs11(Fragment8, { children: [
7715
- /* @__PURE__ */ jsxs11(
7716
- Box11,
7842
+ return /* @__PURE__ */ jsxs12(Fragment8, { children: [
7843
+ /* @__PURE__ */ jsxs12(
7844
+ Box12,
7717
7845
  {
7718
7846
  sx: {
7719
7847
  position: "fixed",
@@ -7733,8 +7861,8 @@ var ChatAppBar = ({
7733
7861
  }
7734
7862
  },
7735
7863
  children: [
7736
- /* @__PURE__ */ jsxs11(
7737
- Box11,
7864
+ /* @__PURE__ */ jsxs12(
7865
+ Box12,
7738
7866
  {
7739
7867
  sx: {
7740
7868
  display: "flex",
@@ -7754,16 +7882,16 @@ var ChatAppBar = ({
7754
7882
  }
7755
7883
  },
7756
7884
  children: [
7757
- /* @__PURE__ */ jsx14(Tooltip4, { title: homeTooltip, arrow: true, children: /* @__PURE__ */ jsx14(
7885
+ /* @__PURE__ */ jsx15(Tooltip5, { title: homeTooltip, arrow: true, children: /* @__PURE__ */ jsx15(
7758
7886
  IconButton9,
7759
7887
  {
7760
7888
  onClick: goToHome,
7761
7889
  sx: pillButtonStyles,
7762
7890
  "aria-label": "Go to home page",
7763
- children: /* @__PURE__ */ jsx14(HomeIcon, {})
7891
+ children: /* @__PURE__ */ jsx15(HomeIcon, {})
7764
7892
  }
7765
7893
  ) }),
7766
- showLimitedAdminPanel() && /* @__PURE__ */ jsx14(Tooltip4, { title: "Management & Settings", arrow: true, children: /* @__PURE__ */ jsx14(
7894
+ showLimitedAdminPanel() && /* @__PURE__ */ jsx15(Tooltip5, { title: "Management & Settings", arrow: true, children: /* @__PURE__ */ jsx15(
7767
7895
  IconButton9,
7768
7896
  {
7769
7897
  onClick: () => safeNavigate(managementPath),
@@ -7775,10 +7903,10 @@ var ChatAppBar = ({
7775
7903
  }
7776
7904
  },
7777
7905
  "aria-label": "Open management settings",
7778
- children: /* @__PURE__ */ jsx14(SettingsIcon, {})
7906
+ children: /* @__PURE__ */ jsx15(SettingsIcon, {})
7779
7907
  }
7780
7908
  ) }),
7781
- /* @__PURE__ */ jsx14(Tooltip4, { title: syncTooltip, arrow: true, children: /* @__PURE__ */ jsxs11(
7909
+ /* @__PURE__ */ jsx15(Tooltip5, { title: syncTooltip, arrow: true, children: /* @__PURE__ */ jsxs12(
7782
7910
  IconButton9,
7783
7911
  {
7784
7912
  onClick: handleSyncBadgeClick,
@@ -7794,8 +7922,8 @@ var ChatAppBar = ({
7794
7922
  "aria-label": "Conversation sync status",
7795
7923
  children: [
7796
7924
  syncIndicatorIcon,
7797
- pendingCount > 0 && !syncButtonDisabled && syncStatus !== "syncing" && /* @__PURE__ */ jsx14(
7798
- Box11,
7925
+ pendingCount > 0 && !syncButtonDisabled && syncStatus !== "syncing" && /* @__PURE__ */ jsx15(
7926
+ Box12,
7799
7927
  {
7800
7928
  sx: {
7801
7929
  position: "absolute",
@@ -7820,7 +7948,7 @@ var ChatAppBar = ({
7820
7948
  ]
7821
7949
  }
7822
7950
  ) }),
7823
- !isMobile && /* @__PURE__ */ jsx14(Tooltip4, { title: `${drawerOpen ? "Close" : "Open"} Conversations`, arrow: true, children: /* @__PURE__ */ jsxs11(
7951
+ !isMobile && /* @__PURE__ */ jsx15(Tooltip5, { title: `${drawerOpen ? "Close" : "Open"} Conversations`, arrow: true, children: /* @__PURE__ */ jsxs12(
7824
7952
  IconButton9,
7825
7953
  {
7826
7954
  onClick: () => setDrawerOpen(!drawerOpen),
@@ -7834,9 +7962,9 @@ var ChatAppBar = ({
7834
7962
  "aria-label": `${drawerOpen ? "Close" : "Open"} conversations drawer`,
7835
7963
  "aria-pressed": drawerOpen,
7836
7964
  children: [
7837
- drawerOpen ? /* @__PURE__ */ jsx14(NotesIcon, {}) : /* @__PURE__ */ jsx14(NotesIconOutlined, {}),
7838
- conversations.length > 0 && /* @__PURE__ */ jsx14(
7839
- Box11,
7965
+ drawerOpen ? /* @__PURE__ */ jsx15(NotesIcon, {}) : /* @__PURE__ */ jsx15(NotesIconOutlined, {}),
7966
+ conversations.length > 0 && /* @__PURE__ */ jsx15(
7967
+ Box12,
7840
7968
  {
7841
7969
  sx: {
7842
7970
  position: "absolute",
@@ -7861,7 +7989,7 @@ var ChatAppBar = ({
7861
7989
  ]
7862
7990
  }
7863
7991
  ) }),
7864
- !isMobile && canShowNewConversationButton && /* @__PURE__ */ jsx14(Tooltip4, { title: "Start New Conversation", arrow: true, children: /* @__PURE__ */ jsx14(
7992
+ !isMobile && canShowNewConversationButton && /* @__PURE__ */ jsx15(Tooltip5, { title: "Start New Conversation", arrow: true, children: /* @__PURE__ */ jsx15(
7865
7993
  IconButton9,
7866
7994
  {
7867
7995
  onClick: () => createNewConversation(),
@@ -7875,14 +8003,14 @@ var ChatAppBar = ({
7875
8003
  }
7876
8004
  },
7877
8005
  "aria-label": "Create new conversation",
7878
- children: /* @__PURE__ */ jsx14(AddIcon, {})
8006
+ children: /* @__PURE__ */ jsx15(AddIcon, {})
7879
8007
  }
7880
8008
  ) })
7881
8009
  ]
7882
8010
  }
7883
8011
  ),
7884
- /* @__PURE__ */ jsxs11(
7885
- Box11,
8012
+ /* @__PURE__ */ jsxs12(
8013
+ Box12,
7886
8014
  {
7887
8015
  sx: {
7888
8016
  display: "flex",
@@ -7902,7 +8030,7 @@ var ChatAppBar = ({
7902
8030
  }
7903
8031
  },
7904
8032
  children: [
7905
- isMobile && /* @__PURE__ */ jsx14(Tooltip4, { title: `Conversations (${conversations.length})`, arrow: true, children: /* @__PURE__ */ jsxs11(
8033
+ isMobile && /* @__PURE__ */ jsx15(Tooltip5, { title: `Conversations (${conversations.length})`, arrow: true, children: /* @__PURE__ */ jsxs12(
7906
8034
  IconButton9,
7907
8035
  {
7908
8036
  onClick: () => setModalOpen(true),
@@ -7912,9 +8040,9 @@ var ChatAppBar = ({
7912
8040
  },
7913
8041
  "aria-label": `Open conversations modal with ${conversations.length} conversations`,
7914
8042
  children: [
7915
- /* @__PURE__ */ jsx14(NotesIcon, { fontSize: "small" }),
7916
- conversations.length > 0 && /* @__PURE__ */ jsx14(
7917
- Box11,
8043
+ /* @__PURE__ */ jsx15(NotesIcon, { fontSize: "small" }),
8044
+ conversations.length > 0 && /* @__PURE__ */ jsx15(
8045
+ Box12,
7918
8046
  {
7919
8047
  sx: {
7920
8048
  position: "absolute",
@@ -7939,7 +8067,7 @@ var ChatAppBar = ({
7939
8067
  ]
7940
8068
  }
7941
8069
  ) }),
7942
- isMobile && canShowNewConversationButton && /* @__PURE__ */ jsx14(Tooltip4, { title: "Start New Conversation", arrow: true, children: /* @__PURE__ */ jsx14(
8070
+ isMobile && canShowNewConversationButton && /* @__PURE__ */ jsx15(Tooltip5, { title: "Start New Conversation", arrow: true, children: /* @__PURE__ */ jsx15(
7943
8071
  IconButton9,
7944
8072
  {
7945
8073
  onClick: () => {
@@ -7956,10 +8084,10 @@ var ChatAppBar = ({
7956
8084
  }
7957
8085
  },
7958
8086
  "aria-label": "Create new conversation",
7959
- children: /* @__PURE__ */ jsx14(AddIcon, { fontSize: "small" })
8087
+ children: /* @__PURE__ */ jsx15(AddIcon, { fontSize: "small" })
7960
8088
  }
7961
8089
  ) }),
7962
- /* @__PURE__ */ jsx14(Tooltip4, { title: `Current AI: ${selectedModel.replace("Bandit-", "")}`, arrow: true, children: /* @__PURE__ */ jsx14(
8090
+ /* @__PURE__ */ jsx15(Tooltip5, { title: `Current AI: ${selectedModel.replace("Bandit-", "")}`, arrow: true, children: /* @__PURE__ */ jsx15(
7963
8091
  IconButton9,
7964
8092
  {
7965
8093
  onClick: (e) => setModelAnchorEl(e.currentTarget),
@@ -7974,7 +8102,7 @@ var ChatAppBar = ({
7974
8102
  }
7975
8103
  },
7976
8104
  "aria-label": `Change AI personality. Currently using ${selectedModel}`,
7977
- children: /* @__PURE__ */ jsx14(
8105
+ children: /* @__PURE__ */ jsx15(
7978
8106
  Avatar8,
7979
8107
  {
7980
8108
  src: currentAvatar,
@@ -7991,16 +8119,16 @@ var ChatAppBar = ({
7991
8119
  )
7992
8120
  }
7993
8121
  ) }),
7994
- /* @__PURE__ */ jsx14(Tooltip4, { title: `Engine \xB7 ${engineDisplay}`, arrow: true, children: /* @__PURE__ */ jsx14(
8122
+ /* @__PURE__ */ jsx15(Tooltip5, { title: `Engine \xB7 ${engineDisplay}`, arrow: true, children: /* @__PURE__ */ jsx15(
7995
8123
  IconButton9,
7996
8124
  {
7997
8125
  onClick: (e) => setEngineAnchorEl(e.currentTarget),
7998
8126
  sx: pillButtonStyles,
7999
8127
  "aria-label": `Change base model (engine). Currently ${engineDisplay}`,
8000
- children: /* @__PURE__ */ jsx14(AutoAwesomeIcon, { fontSize: "small" })
8128
+ children: /* @__PURE__ */ jsx15(AutoAwesomeIcon, { fontSize: "small" })
8001
8129
  }
8002
8130
  ) }),
8003
- /* @__PURE__ */ jsxs11(
8131
+ /* @__PURE__ */ jsxs12(
8004
8132
  Menu5,
8005
8133
  {
8006
8134
  anchorEl: engineAnchorEl,
@@ -8009,8 +8137,8 @@ var ChatAppBar = ({
8009
8137
  transformOrigin: { horizontal: "right", vertical: "top" },
8010
8138
  anchorOrigin: { horizontal: "right", vertical: "bottom" },
8011
8139
  children: [
8012
- /* @__PURE__ */ jsx14(Typography9, { variant: "overline", sx: { px: 2, color: theme.palette.text.secondary }, children: "Engine \xB7 base model" }),
8013
- engines.length === 0 && /* @__PURE__ */ jsx14(MenuItem5, { disabled: true, children: /* @__PURE__ */ jsx14(Typography9, { variant: "body2", children: "No engines available" }) }),
8140
+ /* @__PURE__ */ jsx15(Typography9, { variant: "overline", sx: { px: 2, color: theme.palette.text.secondary }, children: "Engine \xB7 base model" }),
8141
+ engines.length === 0 && /* @__PURE__ */ jsx15(MenuItem5, { disabled: true, children: /* @__PURE__ */ jsx15(Typography9, { variant: "body2", children: "No engines available" }) }),
8014
8142
  engines.map((engine) => {
8015
8143
  const badges = [
8016
8144
  engine.vision && "vision",
@@ -8018,7 +8146,7 @@ var ChatAppBar = ({
8018
8146
  engine.thinking && "thinking",
8019
8147
  engine.cloud && "cloud"
8020
8148
  ].filter(Boolean);
8021
- return /* @__PURE__ */ jsxs11(
8149
+ return /* @__PURE__ */ jsxs12(
8022
8150
  MenuItem5,
8023
8151
  {
8024
8152
  selected: engine.id === resolvedEngineId,
@@ -8038,13 +8166,13 @@ var ChatAppBar = ({
8038
8166
  whiteSpace: "normal"
8039
8167
  },
8040
8168
  children: [
8041
- /* @__PURE__ */ jsxs11(Box11, { sx: { display: "flex", alignItems: "center", gap: 1, width: "100%" }, children: [
8042
- /* @__PURE__ */ jsx14(Typography9, { variant: "body2", sx: { fontWeight: 600, flex: 1 }, children: cleanEngineName(engine.displayName) }),
8043
- engine.id === resolvedEngineId && /* @__PURE__ */ jsx14(Box11, { sx: { width: 8, height: 8, borderRadius: "50%", bgcolor: theme.palette.primary.main } })
8169
+ /* @__PURE__ */ jsxs12(Box12, { sx: { display: "flex", alignItems: "center", gap: 1, width: "100%" }, children: [
8170
+ /* @__PURE__ */ jsx15(Typography9, { variant: "body2", sx: { fontWeight: 600, flex: 1 }, children: cleanEngineName(engine.displayName) }),
8171
+ engine.id === resolvedEngineId && /* @__PURE__ */ jsx15(Box12, { sx: { width: 8, height: 8, borderRadius: "50%", bgcolor: theme.palette.primary.main } })
8044
8172
  ] }),
8045
- /* @__PURE__ */ jsx14(Typography9, { variant: "caption", sx: { color: theme.palette.text.secondary }, children: engine.available ? engine.description : engine.unavailableReason || "Unavailable" }),
8046
- badges.length > 0 && /* @__PURE__ */ jsx14(Box11, { sx: { display: "flex", gap: 0.5, flexWrap: "wrap", mt: 0.25 }, children: badges.map((b) => /* @__PURE__ */ jsx14(
8047
- Box11,
8173
+ /* @__PURE__ */ jsx15(Typography9, { variant: "caption", sx: { color: theme.palette.text.secondary }, children: engine.available ? engine.description : engine.unavailableReason || "Unavailable" }),
8174
+ badges.length > 0 && /* @__PURE__ */ jsx15(Box12, { sx: { display: "flex", gap: 0.5, flexWrap: "wrap", mt: 0.25 }, children: badges.map((b) => /* @__PURE__ */ jsx15(
8175
+ Box12,
8048
8176
  {
8049
8177
  sx: {
8050
8178
  fontSize: "0.65rem",
@@ -8066,7 +8194,7 @@ var ChatAppBar = ({
8066
8194
  ]
8067
8195
  }
8068
8196
  ),
8069
- /* @__PURE__ */ jsx14(
8197
+ /* @__PURE__ */ jsx15(
8070
8198
  Menu5,
8071
8199
  {
8072
8200
  anchorEl: modelAnchorEl,
@@ -8102,7 +8230,7 @@ var ChatAppBar = ({
8102
8230
  }
8103
8231
  }
8104
8232
  },
8105
- children: availableModels.map((model) => /* @__PURE__ */ jsxs11(
8233
+ children: availableModels.map((model) => /* @__PURE__ */ jsxs12(
8106
8234
  MenuItem5,
8107
8235
  {
8108
8236
  selected: model.name === selectedModel,
@@ -8149,7 +8277,7 @@ var ChatAppBar = ({
8149
8277
  px: 2
8150
8278
  },
8151
8279
  children: [
8152
- /* @__PURE__ */ jsx14(
8280
+ /* @__PURE__ */ jsx15(
8153
8281
  Avatar8,
8154
8282
  {
8155
8283
  src: model.avatarBase64 || modelAvatars[model.name] || banditHead,
@@ -8162,12 +8290,12 @@ var ChatAppBar = ({
8162
8290
  }
8163
8291
  }
8164
8292
  ),
8165
- /* @__PURE__ */ jsxs11(Box11, { sx: { flex: 1 }, children: [
8166
- /* @__PURE__ */ jsx14(Typography9, { variant: "body2", sx: { fontWeight: 500 }, children: model.name.replace("Bandit-", "") }),
8167
- /* @__PURE__ */ jsx14(Typography9, { variant: "caption", sx: { color: theme.palette.text.secondary, display: "block" }, children: model.name === selectedModel ? "Currently active" : "Switch to this AI" })
8293
+ /* @__PURE__ */ jsxs12(Box12, { sx: { flex: 1 }, children: [
8294
+ /* @__PURE__ */ jsx15(Typography9, { variant: "body2", sx: { fontWeight: 500 }, children: model.name.replace("Bandit-", "") }),
8295
+ /* @__PURE__ */ jsx15(Typography9, { variant: "caption", sx: { color: theme.palette.text.secondary, display: "block" }, children: model.name === selectedModel ? "Currently active" : "Switch to this AI" })
8168
8296
  ] }),
8169
- model.name === selectedModel && /* @__PURE__ */ jsx14(
8170
- Box11,
8297
+ model.name === selectedModel && /* @__PURE__ */ jsx15(
8298
+ Box12,
8171
8299
  {
8172
8300
  sx: {
8173
8301
  width: 8,
@@ -8183,8 +8311,8 @@ var ChatAppBar = ({
8183
8311
  ))
8184
8312
  }
8185
8313
  ),
8186
- isTTSAvailable && /* @__PURE__ */ jsxs11(Fragment8, { children: [
8187
- /* @__PURE__ */ jsx14(Tooltip4, { title: `Voice: ${selectedVoice ? toTitleCase(selectedVoice.split("-")[1]) : "Default"}`, arrow: true, children: /* @__PURE__ */ jsx14(
8314
+ isTTSAvailable && /* @__PURE__ */ jsxs12(Fragment8, { children: [
8315
+ /* @__PURE__ */ jsx15(Tooltip5, { title: `Voice: ${selectedVoice ? toTitleCase(selectedVoice.split("-")[1]) : "Default"}`, arrow: true, children: /* @__PURE__ */ jsx15(
8188
8316
  IconButton9,
8189
8317
  {
8190
8318
  onClick: (e) => setVoiceAnchorEl(e.currentTarget),
@@ -8198,10 +8326,10 @@ var ChatAppBar = ({
8198
8326
  }
8199
8327
  },
8200
8328
  "aria-label": `Change voice. Currently using ${selectedVoice ? toTitleCase(selectedVoice.split("-")[1]) : "default"}`,
8201
- children: /* @__PURE__ */ jsx14(RecordVoiceOverIcon, { fontSize: "small" })
8329
+ children: /* @__PURE__ */ jsx15(RecordVoiceOverIcon, { fontSize: "small" })
8202
8330
  }
8203
8331
  ) }),
8204
- /* @__PURE__ */ jsx14(
8332
+ /* @__PURE__ */ jsx15(
8205
8333
  Menu5,
8206
8334
  {
8207
8335
  anchorEl: voiceAnchorEl,
@@ -8238,7 +8366,7 @@ var ChatAppBar = ({
8238
8366
  }
8239
8367
  }
8240
8368
  },
8241
- children: availableVoices.length > 0 ? availableVoices.map((voice) => /* @__PURE__ */ jsx14(
8369
+ children: availableVoices.length > 0 ? availableVoices.map((voice) => /* @__PURE__ */ jsx15(
8242
8370
  MenuItem5,
8243
8371
  {
8244
8372
  selected: voice === selectedVoice,
@@ -8246,14 +8374,14 @@ var ChatAppBar = ({
8246
8374
  handleVoiceChange(voice);
8247
8375
  setVoiceAnchorEl(null);
8248
8376
  },
8249
- children: /* @__PURE__ */ jsxs11(Box11, { sx: { display: "flex", alignItems: "center", gap: 1, width: "100%" }, children: [
8250
- /* @__PURE__ */ jsx14(RecordVoiceOverIcon, { fontSize: "small", sx: { color: theme.palette.text.secondary } }),
8251
- /* @__PURE__ */ jsxs11(Box11, { sx: { flex: 1 }, children: [
8252
- /* @__PURE__ */ jsx14(Typography9, { variant: "body2", children: toTitleCase(voice.split("-")[1]) }),
8253
- /* @__PURE__ */ jsx14(Typography9, { variant: "caption", sx: { color: theme.palette.text.secondary }, children: voice === selectedVoice ? "Currently active" : "Switch to this voice" })
8377
+ children: /* @__PURE__ */ jsxs12(Box12, { sx: { display: "flex", alignItems: "center", gap: 1, width: "100%" }, children: [
8378
+ /* @__PURE__ */ jsx15(RecordVoiceOverIcon, { fontSize: "small", sx: { color: theme.palette.text.secondary } }),
8379
+ /* @__PURE__ */ jsxs12(Box12, { sx: { flex: 1 }, children: [
8380
+ /* @__PURE__ */ jsx15(Typography9, { variant: "body2", children: toTitleCase(voice.split("-")[1]) }),
8381
+ /* @__PURE__ */ jsx15(Typography9, { variant: "caption", sx: { color: theme.palette.text.secondary }, children: voice === selectedVoice ? "Currently active" : "Switch to this voice" })
8254
8382
  ] }),
8255
- voice === selectedVoice && /* @__PURE__ */ jsx14(
8256
- Box11,
8383
+ voice === selectedVoice && /* @__PURE__ */ jsx15(
8384
+ Box12,
8257
8385
  {
8258
8386
  sx: {
8259
8387
  width: 8,
@@ -8266,7 +8394,7 @@ var ChatAppBar = ({
8266
8394
  ] })
8267
8395
  },
8268
8396
  voice
8269
- )) : /* @__PURE__ */ jsx14(MenuItem5, { disabled: true, children: /* @__PURE__ */ jsx14(Typography9, { variant: "body2", color: "text.secondary", children: "No voices available" }) })
8397
+ )) : /* @__PURE__ */ jsx15(MenuItem5, { disabled: true, children: /* @__PURE__ */ jsx15(Typography9, { variant: "body2", color: "text.secondary", children: "No voices available" }) })
8270
8398
  }
8271
8399
  )
8272
8400
  ] })
@@ -8276,17 +8404,17 @@ var ChatAppBar = ({
8276
8404
  ]
8277
8405
  }
8278
8406
  ),
8279
- /* @__PURE__ */ jsx14(conversation_drawer_default, { open: drawerOpen, onClose: () => setDrawerOpen(false) }),
8280
- /* @__PURE__ */ jsx14(enhanced_mobile_conversations_modal_default, { open: modalOpen, onClose: () => setModalOpen(false) }),
8281
- /* @__PURE__ */ jsxs11(
8407
+ /* @__PURE__ */ jsx15(conversation_drawer_default, { open: drawerOpen, onClose: () => setDrawerOpen(false) }),
8408
+ /* @__PURE__ */ jsx15(enhanced_mobile_conversations_modal_default, { open: modalOpen, onClose: () => setModalOpen(false) }),
8409
+ /* @__PURE__ */ jsxs12(
8282
8410
  Dialog5,
8283
8411
  {
8284
8412
  open: confirmModelChangeOpen,
8285
8413
  onClose: () => setConfirmModelChangeOpen(false),
8286
8414
  children: [
8287
- /* @__PURE__ */ jsx14(DialogTitle5, { children: "Change personality and start new conversation?" }),
8288
- /* @__PURE__ */ jsx14(DialogContent5, { children: /* @__PURE__ */ jsxs11(Box11, { display: "flex", alignItems: "center", gap: 2, mt: 1, justifyContent: "center", children: [
8289
- /* @__PURE__ */ jsx14(
8415
+ /* @__PURE__ */ jsx15(DialogTitle5, { children: "Change personality and start new conversation?" }),
8416
+ /* @__PURE__ */ jsx15(DialogContent5, { children: /* @__PURE__ */ jsxs12(Box12, { display: "flex", alignItems: "center", gap: 2, mt: 1, justifyContent: "center", children: [
8417
+ /* @__PURE__ */ jsx15(
8290
8418
  Avatar8,
8291
8419
  {
8292
8420
  src: pendingModelAvatar,
@@ -8294,15 +8422,15 @@ var ChatAppBar = ({
8294
8422
  sx: { width: 40, height: 40, filter: "brightness(1.7)" }
8295
8423
  }
8296
8424
  ),
8297
- /* @__PURE__ */ jsxs11(Typography9, { variant: "body2", children: [
8425
+ /* @__PURE__ */ jsxs12(Typography9, { variant: "body2", children: [
8298
8426
  "Your current conversation will be saved, and a new one will begin with ",
8299
- /* @__PURE__ */ jsx14("strong", { children: pendingModel }),
8427
+ /* @__PURE__ */ jsx15("strong", { children: pendingModel }),
8300
8428
  "."
8301
8429
  ] })
8302
8430
  ] }) }),
8303
- /* @__PURE__ */ jsxs11(DialogActions5, { children: [
8304
- /* @__PURE__ */ jsx14(Button7, { onClick: () => setConfirmModelChangeOpen(false), children: "Cancel" }),
8305
- /* @__PURE__ */ jsx14(
8431
+ /* @__PURE__ */ jsxs12(DialogActions5, { children: [
8432
+ /* @__PURE__ */ jsx15(Button7, { onClick: () => setConfirmModelChangeOpen(false), children: "Cancel" }),
8433
+ /* @__PURE__ */ jsx15(
8306
8434
  Button7,
8307
8435
  {
8308
8436
  onClick: () => {
@@ -8405,19 +8533,19 @@ Respond with just the title and nothing else.
8405
8533
  };
8406
8534
 
8407
8535
  // src/chat/query-suggestion-picker.tsx
8408
- import { useEffect as useEffect13, useRef as useRef11, useState as useState14 } from "react";
8409
- import { Box as Box12, useMediaQuery as useMediaQuery6 } from "@mui/material";
8536
+ import { useEffect as useEffect13, useRef as useRef11, useState as useState15 } from "react";
8537
+ import { Box as Box13, useMediaQuery as useMediaQuery6 } from "@mui/material";
8410
8538
  import { useTheme as useTheme13, alpha as alpha8 } from "@mui/material/styles";
8411
8539
  import ReactMarkdown from "react-markdown";
8412
8540
  import remarkGfm from "remark-gfm";
8413
8541
  import rehypeRaw from "rehype-raw";
8414
- import { Fragment as Fragment9, jsx as jsx15 } from "react/jsx-runtime";
8542
+ import { Fragment as Fragment9, jsx as jsx16 } from "react/jsx-runtime";
8415
8543
  var markdownComponents = {
8416
- p: ({ node, ...props }) => /* @__PURE__ */ jsx15("span", { ...props }),
8417
- mark: ({ node, children, ...props }) => /* @__PURE__ */ jsx15("mark", { ...props, children }),
8544
+ p: ({ node, ...props }) => /* @__PURE__ */ jsx16("span", { ...props }),
8545
+ mark: ({ node, children, ...props }) => /* @__PURE__ */ jsx16("mark", { ...props, children }),
8418
8546
  code: ({ node, children, ...props }) => {
8419
8547
  const { inline, ...rest } = props;
8420
- return inline ? /* @__PURE__ */ jsx15("code", { ...rest, children }) : /* @__PURE__ */ jsx15("code", { ...rest, children });
8548
+ return inline ? /* @__PURE__ */ jsx16("code", { ...rest, children }) : /* @__PURE__ */ jsx16("code", { ...rest, children });
8421
8549
  }
8422
8550
  };
8423
8551
  var QuerySuggestionPicker = ({
@@ -8425,9 +8553,9 @@ var QuerySuggestionPicker = ({
8425
8553
  inputHeight
8426
8554
  }) => {
8427
8555
  const hasGenerated = useRef11(false);
8428
- const [hasSentPrompt, setHasSentPrompt] = useState14(false);
8429
- const [examplePrompts, setExamplePrompts] = useState14([]);
8430
- const [visiblePrompts, setVisiblePrompts] = useState14([]);
8556
+ const [hasSentPrompt, setHasSentPrompt] = useState15(false);
8557
+ const [examplePrompts, setExamplePrompts] = useState15([]);
8558
+ const [visiblePrompts, setVisiblePrompts] = useState15([]);
8431
8559
  const scrollRef = useRef11(null);
8432
8560
  const theme = useTheme13();
8433
8561
  const isMobile = useMediaQuery6((theme2) => theme2.breakpoints.down("sm"));
@@ -8490,8 +8618,8 @@ var QuerySuggestionPicker = ({
8490
8618
  return () => clearInterval(interval);
8491
8619
  }, [hasSentPrompt, examplePrompts.length]);
8492
8620
  const displayPrompts = isMobile ? visiblePrompts.slice(0, Math.min(visiblePrompts.length, 6)) : visiblePrompts;
8493
- return displayPrompts.length > 0 && /* @__PURE__ */ jsx15(Fragment9, { children: /* @__PURE__ */ jsx15(
8494
- Box12,
8621
+ return displayPrompts.length > 0 && /* @__PURE__ */ jsx16(Fragment9, { children: /* @__PURE__ */ jsx16(
8622
+ Box13,
8495
8623
  {
8496
8624
  ref: scrollRef,
8497
8625
  sx: {
@@ -8507,8 +8635,8 @@ var QuerySuggestionPicker = ({
8507
8635
  pb: isMobile ? 0.4 : 0,
8508
8636
  "&::-webkit-scrollbar": { display: "none" }
8509
8637
  },
8510
- children: displayPrompts.map((prompt, i) => /* @__PURE__ */ jsx15(
8511
- Box12,
8638
+ children: displayPrompts.map((prompt, i) => /* @__PURE__ */ jsx16(
8639
+ Box13,
8512
8640
  {
8513
8641
  sx: {
8514
8642
  px: isMobile ? 1.4 : 2,
@@ -8542,8 +8670,8 @@ var QuerySuggestionPicker = ({
8542
8670
  onSend(prompt, []);
8543
8671
  setHasSentPrompt(true);
8544
8672
  },
8545
- children: /* @__PURE__ */ jsx15(
8546
- Box12,
8673
+ children: /* @__PURE__ */ jsx16(
8674
+ Box13,
8547
8675
  {
8548
8676
  sx: {
8549
8677
  flex: 1,
@@ -8567,7 +8695,7 @@ var QuerySuggestionPicker = ({
8567
8695
  padding: "0.1em 0.25em"
8568
8696
  }
8569
8697
  },
8570
- children: /* @__PURE__ */ jsx15(
8698
+ children: /* @__PURE__ */ jsx16(
8571
8699
  ReactMarkdown,
8572
8700
  {
8573
8701
  remarkPlugins: [remarkGfm],
@@ -8586,9 +8714,9 @@ var QuerySuggestionPicker = ({
8586
8714
  };
8587
8715
 
8588
8716
  // ../../src/pages/under-review.tsx
8589
- import { Box as Box13, Typography as Typography10, useTheme as useTheme14 } from "@mui/material";
8717
+ import { Box as Box14, Typography as Typography10, useTheme as useTheme14 } from "@mui/material";
8590
8718
  import { useNavigate as useNavigate2 } from "react-router-dom";
8591
- import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
8719
+ import { jsx as jsx17, jsxs as jsxs13 } from "react/jsx-runtime";
8592
8720
  var UnderReview = () => {
8593
8721
  const theme = useTheme14();
8594
8722
  const navigate = useNavigate2();
@@ -8596,8 +8724,8 @@ var UnderReview = () => {
8596
8724
  localStorage.removeItem("authToken");
8597
8725
  navigate("/login");
8598
8726
  };
8599
- return /* @__PURE__ */ jsxs12(
8600
- Box13,
8727
+ return /* @__PURE__ */ jsxs13(
8728
+ Box14,
8601
8729
  {
8602
8730
  sx: {
8603
8731
  minHeight: "100vh",
@@ -8612,8 +8740,8 @@ var UnderReview = () => {
8612
8740
  position: "relative"
8613
8741
  },
8614
8742
  children: [
8615
- /* @__PURE__ */ jsx16(
8616
- Box13,
8743
+ /* @__PURE__ */ jsx17(
8744
+ Box14,
8617
8745
  {
8618
8746
  onClick: handleSneakyLogout,
8619
8747
  sx: {
@@ -8638,13 +8766,13 @@ var UnderReview = () => {
8638
8766
  title: "Reset session"
8639
8767
  }
8640
8768
  ),
8641
- /* @__PURE__ */ jsx16(Typography10, { variant: "h4", sx: { mb: 2, fontWeight: 700, color: theme.palette.error.main }, children: "Under Review" }),
8642
- /* @__PURE__ */ jsxs12(Typography10, { variant: "body1", sx: { mb: 2, color: theme.palette.text.secondary }, children: [
8769
+ /* @__PURE__ */ jsx17(Typography10, { variant: "h4", sx: { mb: 2, fontWeight: 700, color: theme.palette.error.main }, children: "Under Review" }),
8770
+ /* @__PURE__ */ jsxs13(Typography10, { variant: "body1", sx: { mb: 2, color: theme.palette.text.secondary }, children: [
8643
8771
  "Your request to use our services is currently being reviewed.",
8644
- /* @__PURE__ */ jsx16("br", {}),
8772
+ /* @__PURE__ */ jsx17("br", {}),
8645
8773
  "For more info, please contact ",
8646
8774
  " ",
8647
- /* @__PURE__ */ jsx16("a", { href: "mailto:team@banditai.ai", style: { color: theme.palette.primary.main, fontWeight: 600 }, children: "team@banditai.ai" })
8775
+ /* @__PURE__ */ jsx17("a", { href: "mailto:team@banditai.ai", style: { color: theme.palette.primary.main, fontWeight: 600 }, children: "team@banditai.ai" })
8648
8776
  ] })
8649
8777
  ]
8650
8778
  }
@@ -8653,8 +8781,8 @@ var UnderReview = () => {
8653
8781
  var under_review_default = UnderReview;
8654
8782
 
8655
8783
  // src/components/ConnectionStatus.tsx
8656
- import { Box as Box14, Chip as Chip5, useTheme as useTheme15 } from "@mui/material";
8657
- import { jsx as jsx17 } from "react/jsx-runtime";
8784
+ import { Box as Box15, Chip as Chip5, useTheme as useTheme15 } from "@mui/material";
8785
+ import { jsx as jsx18 } from "react/jsx-runtime";
8658
8786
  var ConnectionStatus = ({
8659
8787
  showWhenGood = false,
8660
8788
  position = "top"
@@ -8668,28 +8796,28 @@ var ConnectionStatus = ({
8668
8796
  switch (connectionQuality) {
8669
8797
  case "offline":
8670
8798
  return {
8671
- icon: /* @__PURE__ */ jsx17(WifiOffIcon, { sx: { fontSize: 16 } }),
8799
+ icon: /* @__PURE__ */ jsx18(WifiOffIcon, { sx: { fontSize: 16 } }),
8672
8800
  label: "Offline",
8673
8801
  color: "error",
8674
8802
  severity: "high"
8675
8803
  };
8676
8804
  case "slow":
8677
8805
  return {
8678
- icon: /* @__PURE__ */ jsx17(SignalWifi2BarIcon, { sx: { fontSize: 16 } }),
8806
+ icon: /* @__PURE__ */ jsx18(SignalWifi2BarIcon, { sx: { fontSize: 16 } }),
8679
8807
  label: "Slow connection",
8680
8808
  color: "warning",
8681
8809
  severity: "medium"
8682
8810
  };
8683
8811
  case "fast":
8684
8812
  return {
8685
- icon: /* @__PURE__ */ jsx17(WifiIcon, { sx: { fontSize: 16 } }),
8813
+ icon: /* @__PURE__ */ jsx18(WifiIcon, { sx: { fontSize: 16 } }),
8686
8814
  label: "Connected",
8687
8815
  color: "success",
8688
8816
  severity: "low"
8689
8817
  };
8690
8818
  default:
8691
8819
  return {
8692
- icon: /* @__PURE__ */ jsx17(WifiIcon, { sx: { fontSize: 16 } }),
8820
+ icon: /* @__PURE__ */ jsx18(WifiIcon, { sx: { fontSize: 16 } }),
8693
8821
  label: "Unknown",
8694
8822
  color: "default",
8695
8823
  severity: "low"
@@ -8697,8 +8825,8 @@ var ConnectionStatus = ({
8697
8825
  }
8698
8826
  };
8699
8827
  const config = getStatusConfig();
8700
- return /* @__PURE__ */ jsx17(
8701
- Box14,
8828
+ return /* @__PURE__ */ jsx18(
8829
+ Box15,
8702
8830
  {
8703
8831
  sx: {
8704
8832
  position: "fixed",
@@ -8713,7 +8841,7 @@ var ConnectionStatus = ({
8713
8841
  "100%": { opacity: 1 }
8714
8842
  }
8715
8843
  },
8716
- children: /* @__PURE__ */ jsx17(
8844
+ children: /* @__PURE__ */ jsx18(
8717
8845
  Chip5,
8718
8846
  {
8719
8847
  icon: config.icon,
@@ -9026,7 +9154,7 @@ var useVoiceMode = (config) => {
9026
9154
  };
9027
9155
 
9028
9156
  // src/chat/chat.tsx
9029
- import { jsx as jsx18, jsxs as jsxs13 } from "react/jsx-runtime";
9157
+ import { jsx as jsx19, jsxs as jsxs14 } from "react/jsx-runtime";
9030
9158
  var ChatContent = () => {
9031
9159
  const packageSettings = usePackageSettingsStore((state) => state.settings);
9032
9160
  const featureFlag = useFeatureFlag();
@@ -9034,12 +9162,12 @@ var ChatContent = () => {
9034
9162
  const ossMode = isOSSMode() || !packageSettings?.featureFlags?.subscriptionType;
9035
9163
  const playgroundBypassAccess = packageSettings?.playgroundBypassAuth || typeof window !== "undefined" && window.location.pathname.includes("/playground");
9036
9164
  const notificationService = useNotificationService();
9037
- const [selectedTheme, setSelectedTheme] = useState15(null);
9038
- const [themeLoading, setThemeLoading] = useState15(true);
9165
+ const [selectedTheme, setSelectedTheme] = useState16(null);
9166
+ const [themeLoading, setThemeLoading] = useState16(true);
9039
9167
  const token = authenticationService.getToken();
9040
9168
  const claims = token ? authenticationService.parseJwtClaims(token) : null;
9041
9169
  const baseTheme = themeMap_default[selectedTheme ?? "bandit-dark"] || banditDarkTheme;
9042
- const banditTheme = useMemo3(() => {
9170
+ const banditTheme = useMemo4(() => {
9043
9171
  return createTheme(baseTheme, {
9044
9172
  components: {
9045
9173
  MuiInputBase: {
@@ -9123,14 +9251,14 @@ var ChatContent = () => {
9123
9251
  }, [packageSettings?.gatewayApiUrl, availableVoices.length, initialized, loadVoicesFromAPI, token]);
9124
9252
  const provider = useAIProviderStore((state) => state.provider);
9125
9253
  const inputRef = useRef13(null);
9126
- const [pastedImages, setPastedImages] = useState15([]);
9254
+ const [pastedImages, setPastedImages] = useState16([]);
9127
9255
  const inputContainerRef = useRef13(null);
9128
- const [inputHeight, setInputHeight] = useState15(80);
9129
- const [isSubmitting, setIsSubmitting] = useState15(false);
9130
- const [pendingMessage, setPendingMessage] = useState15(null);
9256
+ const [inputHeight, setInputHeight] = useState16(80);
9257
+ const [isSubmitting, setIsSubmitting] = useState16(false);
9258
+ const [pendingMessage, setPendingMessage] = useState16(null);
9131
9259
  const { conversations, currentId, _hasHydrated, hydrate } = useConversationStore();
9132
- const [isMobile, setIsMobile] = useState15(false);
9133
- const [drawerOpen, setDrawerOpen] = useState15(false);
9260
+ const [isMobile, setIsMobile] = useState16(false);
9261
+ const [drawerOpen, setDrawerOpen] = useState16(false);
9134
9262
  const { generateName } = useConversationNameGenerator();
9135
9263
  const { preferences } = usePreferencesStore();
9136
9264
  const { containerRef: chatContainerRef, targetRef: scrollTargetRef, scrollToBottom, getScrollState } = useAutoScroll({
@@ -9142,14 +9270,14 @@ var ChatContent = () => {
9142
9270
  const chatContainerEl = chatContainerRef.current;
9143
9271
  const scrollTargetEl = scrollTargetRef.current;
9144
9272
  const { isSlowConnection, connectionQuality, trackRequestStart, trackRequestEnd } = useNetworkStatus();
9145
- const [showScrollToBottom, setShowScrollToBottom] = useState15(false);
9146
- const [streamBuffer, setStreamBuffer] = useState15("");
9147
- const [responseStarted, setResponseStarted] = useState15(false);
9148
- const [isStreaming, setIsStreaming] = useState15(false);
9149
- const [isThinking, setIsThinking] = useState15(false);
9273
+ const [showScrollToBottom, setShowScrollToBottom] = useState16(false);
9274
+ const [streamBuffer, setStreamBuffer] = useState16("");
9275
+ const [responseStarted, setResponseStarted] = useState16(false);
9276
+ const [isStreaming, setIsStreaming] = useState16(false);
9277
+ const [isThinking, setIsThinking] = useState16(false);
9150
9278
  const initialLogoState = history.length === 0;
9151
- const [logoVisible, setLogoVisible] = useState15(initialLogoState);
9152
- const [logoShouldRender, setLogoShouldRender] = useState15(initialLogoState);
9279
+ const [logoVisible, setLogoVisible] = useState16(initialLogoState);
9280
+ const [logoShouldRender, setLogoShouldRender] = useState16(initialLogoState);
9153
9281
  const streamingGraceUntilRef = useRef13(0);
9154
9282
  const GRACE_MS = 450;
9155
9283
  const GRACE_OFFSET_DESKTOP = 28;
@@ -9158,8 +9286,8 @@ var ChatContent = () => {
9158
9286
  const lastSpokenResponseRef = useRef13(null);
9159
9287
  const previousConversationIdRef = useRef13(null);
9160
9288
  const logoFadeTimeoutRef = useRef13(null);
9161
- const [branding, setBranding] = useState15(null);
9162
- const [brandingLoading, setBrandingLoading] = useState15(true);
9289
+ const [branding, setBranding] = useState16(null);
9290
+ const [brandingLoading, setBrandingLoading] = useState16(true);
9163
9291
  const isBrandingLoadInProgressRef = useRef13(false);
9164
9292
  const logoOnly = history.length === 0 && !brandingLoading;
9165
9293
  useEffect15(() => {
@@ -9927,10 +10055,10 @@ var ChatContent = () => {
9927
10055
  }
9928
10056
  };
9929
10057
  if (!hydrated || brandingLoading || themeLoading) {
9930
- return /* @__PURE__ */ jsxs13(ThemeProvider, { theme: banditTheme, children: [
9931
- /* @__PURE__ */ jsx18(CssBaseline, {}),
9932
- /* @__PURE__ */ jsxs13(
9933
- Box15,
10058
+ return /* @__PURE__ */ jsxs14(ThemeProvider, { theme: banditTheme, children: [
10059
+ /* @__PURE__ */ jsx19(CssBaseline, {}),
10060
+ /* @__PURE__ */ jsxs14(
10061
+ Box16,
9934
10062
  {
9935
10063
  sx: (theme) => ({
9936
10064
  minHeight: "100dvh",
@@ -9943,8 +10071,8 @@ var ChatContent = () => {
9943
10071
  color: theme.palette.text.primary
9944
10072
  }),
9945
10073
  children: [
9946
- /* @__PURE__ */ jsx18(CircularProgress4, { size: 32, thickness: 4 }),
9947
- /* @__PURE__ */ jsx18(Typography11, { variant: "body2", color: "text.secondary", children: "Preparing your workspace..." })
10074
+ /* @__PURE__ */ jsx19(CircularProgress4, { size: 32, thickness: 4 }),
10075
+ /* @__PURE__ */ jsx19(Typography11, { variant: "body2", color: "text.secondary", children: "Preparing your workspace..." })
9948
10076
  ]
9949
10077
  }
9950
10078
  )
@@ -9952,15 +10080,15 @@ var ChatContent = () => {
9952
10080
  }
9953
10081
  const userHasAccess = playgroundBypassAccess || ossMode || claims?.roles?.includes("super-user") || claims?.roles?.includes("admin");
9954
10082
  if (!userHasAccess) {
9955
- return /* @__PURE__ */ jsxs13(ThemeProvider, { theme: banditTheme, children: [
9956
- /* @__PURE__ */ jsx18(CssBaseline, {}),
9957
- /* @__PURE__ */ jsx18(under_review_default, {})
10083
+ return /* @__PURE__ */ jsxs14(ThemeProvider, { theme: banditTheme, children: [
10084
+ /* @__PURE__ */ jsx19(CssBaseline, {}),
10085
+ /* @__PURE__ */ jsx19(under_review_default, {})
9958
10086
  ] });
9959
10087
  }
9960
- return /* @__PURE__ */ jsxs13(ThemeProvider, { theme: banditTheme, children: [
9961
- /* @__PURE__ */ jsx18(CssBaseline, {}),
9962
- /* @__PURE__ */ jsxs13(
9963
- Box15,
10088
+ return /* @__PURE__ */ jsxs14(ThemeProvider, { theme: banditTheme, children: [
10089
+ /* @__PURE__ */ jsx19(CssBaseline, {}),
10090
+ /* @__PURE__ */ jsxs14(
10091
+ Box16,
9964
10092
  {
9965
10093
  sx: (theme) => ({
9966
10094
  display: "flex",
@@ -9978,7 +10106,7 @@ var ChatContent = () => {
9978
10106
  transition: "left 0.3s ease-in-out, width 0.3s ease-in-out"
9979
10107
  }),
9980
10108
  children: [
9981
- /* @__PURE__ */ jsx18(
10109
+ /* @__PURE__ */ jsx19(
9982
10110
  chat_app_bar_default,
9983
10111
  {
9984
10112
  availableModels,
@@ -9990,8 +10118,8 @@ var ChatContent = () => {
9990
10118
  setDrawerOpen
9991
10119
  }
9992
10120
  ),
9993
- /* @__PURE__ */ jsx18(
9994
- Box15,
10121
+ /* @__PURE__ */ jsx19(
10122
+ Box16,
9995
10123
  {
9996
10124
  ref: chatContainerRef,
9997
10125
  sx: {
@@ -10011,8 +10139,8 @@ var ChatContent = () => {
10011
10139
  msOverflowStyle: "none",
10012
10140
  "&::-webkit-scrollbar": { display: "none" }
10013
10141
  },
10014
- children: /* @__PURE__ */ jsxs13(
10015
- Box15,
10142
+ children: /* @__PURE__ */ jsxs14(
10143
+ Box16,
10016
10144
  {
10017
10145
  sx: {
10018
10146
  width: "100%",
@@ -10022,9 +10150,9 @@ var ChatContent = () => {
10022
10150
  pt: 2
10023
10151
  },
10024
10152
  children: [
10025
- logoShouldRender && !brandingLoading && (branding?.logoBase64 ? /* @__PURE__ */ jsx18(custom_logo_default, { visible: logoVisible, atTop: true }) : /* @__PURE__ */ jsx18(bandit_chat_logo_default, { visible: logoVisible, atTop: true })),
10026
- /* @__PURE__ */ jsx18(
10027
- Box15,
10153
+ logoShouldRender && !brandingLoading && (branding?.logoBase64 ? /* @__PURE__ */ jsx19(custom_logo_default, { visible: logoVisible, atTop: true }) : /* @__PURE__ */ jsx19(bandit_chat_logo_default, { visible: logoVisible, atTop: true })),
10154
+ /* @__PURE__ */ jsx19(
10155
+ Box16,
10028
10156
  {
10029
10157
  sx: {
10030
10158
  margin: "0 auto",
@@ -10033,7 +10161,7 @@ var ChatContent = () => {
10033
10161
  flexShrink: 0,
10034
10162
  px: isMobile ? 0 : 0
10035
10163
  },
10036
- children: /* @__PURE__ */ jsx18(
10164
+ children: /* @__PURE__ */ jsx19(
10037
10165
  chat_messages_default,
10038
10166
  {
10039
10167
  isStreaming,
@@ -10057,7 +10185,7 @@ var ChatContent = () => {
10057
10185
  )
10058
10186
  }
10059
10187
  ),
10060
- showScrollToBottom && /* @__PURE__ */ jsx18(
10188
+ showScrollToBottom && /* @__PURE__ */ jsx19(
10061
10189
  chat_scroll_to_bottom_button_default,
10062
10190
  {
10063
10191
  inputHeight,
@@ -10066,8 +10194,8 @@ var ChatContent = () => {
10066
10194
  onClick: handleScrollToBottomClick
10067
10195
  }
10068
10196
  ),
10069
- history.length === 0 && componentStatus !== "Loading" && !isMobile && /* @__PURE__ */ jsx18(
10070
- Box15,
10197
+ history.length === 0 && componentStatus !== "Loading" && !isMobile && /* @__PURE__ */ jsx19(
10198
+ Box16,
10071
10199
  {
10072
10200
  sx: (theme) => ({
10073
10201
  position: "absolute",
@@ -10085,8 +10213,8 @@ var ChatContent = () => {
10085
10213
  })
10086
10214
  }
10087
10215
  ),
10088
- /* @__PURE__ */ jsxs13(
10089
- Box15,
10216
+ /* @__PURE__ */ jsxs14(
10217
+ Box16,
10090
10218
  {
10091
10219
  sx: {
10092
10220
  display: "flex",
@@ -10097,10 +10225,10 @@ var ChatContent = () => {
10097
10225
  maxWidth: "768px"
10098
10226
  },
10099
10227
  children: [
10100
- /* @__PURE__ */ jsx18(Box15, { sx: { flex: "1 1 auto" } }),
10101
- history.length === 0 && componentStatus !== "Loading" && !pendingMessage && preferences.chatSuggestionsEnabled && /* @__PURE__ */ jsx18(Box15, { sx: { marginBottom: "20px" }, children: /* @__PURE__ */ jsx18(QuerySuggestionPicker, { onSend: handleSend, inputHeight }) }),
10102
- /* @__PURE__ */ jsx18(ask_user_card_default, {}),
10103
- /* @__PURE__ */ jsx18(
10228
+ /* @__PURE__ */ jsx19(Box16, { sx: { flex: "1 1 auto" } }),
10229
+ history.length === 0 && componentStatus !== "Loading" && !pendingMessage && preferences.chatSuggestionsEnabled && /* @__PURE__ */ jsx19(Box16, { sx: { marginBottom: "20px" }, children: /* @__PURE__ */ jsx19(QuerySuggestionPicker, { onSend: handleSend, inputHeight }) }),
10230
+ /* @__PURE__ */ jsx19(ask_user_card_default, {}),
10231
+ /* @__PURE__ */ jsx19(
10104
10232
  chat_input_default,
10105
10233
  {
10106
10234
  inputValue,
@@ -10127,7 +10255,7 @@ var ChatContent = () => {
10127
10255
  ]
10128
10256
  }
10129
10257
  ),
10130
- preferences.feedbackEnabled && !isMobile && /* @__PURE__ */ jsx18(
10258
+ preferences.feedbackEnabled && !isMobile && /* @__PURE__ */ jsx19(
10131
10259
  FeedbackButton,
10132
10260
  {
10133
10261
  fullScreen: false,
@@ -10140,7 +10268,7 @@ var ChatContent = () => {
10140
10268
  }
10141
10269
  }
10142
10270
  ),
10143
- /* @__PURE__ */ jsx18(ConnectionStatus, { position: "top", showWhenGood: false })
10271
+ /* @__PURE__ */ jsx19(ConnectionStatus, { position: "top", showWhenGood: false })
10144
10272
  ]
10145
10273
  }
10146
10274
  )
@@ -10169,13 +10297,13 @@ var Chat = () => {
10169
10297
  });
10170
10298
  if (!allowUnauthenticated && !bypassAuth && !authenticationService.isAuthenticated()) {
10171
10299
  debugLogger.debug("User is not authenticated, redirecting to login");
10172
- return /* @__PURE__ */ jsx18(Navigate, { to: "/login", replace: true });
10300
+ return /* @__PURE__ */ jsx19(Navigate, { to: "/login", replace: true });
10173
10301
  }
10174
- return /* @__PURE__ */ jsx18(ChatContent, {});
10302
+ return /* @__PURE__ */ jsx19(ChatContent, {});
10175
10303
  };
10176
10304
  var chat_default = Chat;
10177
10305
 
10178
10306
  export {
10179
10307
  chat_default
10180
10308
  };
10181
- //# sourceMappingURL=chunk-VXK5FNOU.mjs.map
10309
+ //# sourceMappingURL=chunk-PGLLBIRL.mjs.map