@burtson-labs/bandit-engine 2.0.49 → 2.0.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,9 @@
1
1
  import {
2
2
  styleInject
3
3
  } from "./chunk-ONQMRE2G.mjs";
4
+ import {
5
+ StreamingMarkdown_default
6
+ } from "./chunk-KHKWYHXD.mjs";
4
7
  import {
5
8
  useMCPToolsStore
6
9
  } from "./chunk-EHNWQ4T3.mjs";
@@ -9,10 +12,7 @@ import {
9
12
  FeedbackModal,
10
13
  ai_response_text_field_default,
11
14
  banditDarkTheme,
12
- getHighlightTree,
13
- markdownSanitizeSchema,
14
15
  memory_modal_default,
15
- renderLowlightChildren,
16
16
  sanitizeForTTS,
17
17
  stopTTS,
18
18
  themeMap_default,
@@ -59,7 +59,7 @@ import {
59
59
  } from "./chunk-KCI46M23.mjs";
60
60
 
61
61
  // src/chat/chat.tsx
62
- import { useCallback as useCallback6, useEffect as useEffect15, useLayoutEffect, useRef as useRef14, useState as useState15 } from "react";
62
+ import { useCallback as useCallback6, useEffect as useEffect14, useLayoutEffect, useMemo as useMemo3, useRef as useRef13, useState as useState14 } from "react";
63
63
 
64
64
  // src/chat/custom-logo.tsx
65
65
  import React, { useEffect } from "react";
@@ -146,7 +146,8 @@ var Logo = ({ visible, atTop = false }) => {
146
146
  var custom_logo_default = Logo;
147
147
 
148
148
  // src/chat/chat.tsx
149
- import { Box as Box15, ThemeProvider, CssBaseline } from "@mui/material";
149
+ import { Box as Box14, ThemeProvider, CssBaseline } from "@mui/material";
150
+ import { createTheme } from "@mui/material/styles";
150
151
  import { Navigate } from "react-router-dom";
151
152
 
152
153
  // src/chat/chat-scroll-to-bottom-button.tsx
@@ -223,482 +224,8 @@ var BanditChatLogo = ({ atTop = false, visible = false }) => {
223
224
  var bandit_chat_logo_default = BanditChatLogo;
224
225
 
225
226
  // src/chat/chat-messages.tsx
226
- import { Box as Box3 } from "@mui/material";
227
-
228
- // src/components/StreamingMarkdown.tsx
229
- import React3, { useEffect as useEffect3, useMemo, useRef, useState as useState2 } from "react";
230
- import { Box as Box2, Tooltip, IconButton as IconButton2 } from "@mui/material";
231
- import ReactMarkdown from "react-markdown";
232
- import remarkGfm from "remark-gfm";
233
- import rehypeRaw from "rehype-raw";
234
- import rehypeSanitize from "rehype-sanitize";
235
- import { useTheme as useTheme3, alpha } from "@mui/material/styles";
236
- import CheckIcon from "@mui/icons-material/Check";
237
- import ContentCopyIcon from "@mui/icons-material/ContentCopy";
227
+ import { Box as Box2 } from "@mui/material";
238
228
  import { jsx as jsx4, jsxs } from "react/jsx-runtime";
239
- var StreamingMarkdown = ({
240
- content,
241
- isStreaming = false,
242
- sources
243
- }) => {
244
- const theme = useTheme3();
245
- const showCursor = isStreaming && content.trim().length > 0;
246
- const showLoader = isStreaming && content.trim().length === 0;
247
- const prevSanitizedRef = useRef("");
248
- const containerRef = useRef(null);
249
- const stableSourcesRef = useRef([]);
250
- const effectiveSources = useMemo(() => {
251
- if (Array.isArray(sources) && sources.length > 0) {
252
- stableSourcesRef.current = sources;
253
- return sources;
254
- }
255
- if (sources === void 0) {
256
- return stableSourcesRef.current;
257
- }
258
- stableSourcesRef.current = [];
259
- return [];
260
- }, [sources]);
261
- const normalizeTables = (markdown) => {
262
- const lines = markdown.split("\n");
263
- const output = [];
264
- let inTable = false;
265
- let tableRows = [];
266
- const flushTable = () => {
267
- if (tableRows.length === 0) return;
268
- const maxCols = Math.max(...tableRows.map((r) => r.length));
269
- const padded = tableRows.map((row) => [...row, ...Array(maxCols - row.length).fill("")]);
270
- const header = padded[0];
271
- const separator = Array(maxCols).fill("---");
272
- output.push("| " + header.join(" | ") + " |");
273
- output.push("| " + separator.join(" | ") + " |");
274
- for (let i = 1; i < padded.length; i++) {
275
- const row = padded[i];
276
- if (row.every((cell) => /^-+$/.test(cell))) continue;
277
- output.push("| " + row.join(" | ") + " |");
278
- }
279
- tableRows = [];
280
- inTable = false;
281
- };
282
- for (const line of lines) {
283
- if (/^\s*\|.*\|\s*$/.test(line)) {
284
- inTable = true;
285
- const cells = line.trim().slice(1, -1).split("|").map((c) => c.trim());
286
- tableRows.push(cells);
287
- } else {
288
- if (inTable) flushTable();
289
- output.push(line);
290
- }
291
- }
292
- if (inTable) flushTable();
293
- return output.join("\n");
294
- };
295
- const sanitizeMarkdown = (raw) => {
296
- let sanitized = raw.replace(/<[/]?start_of_turn>|<[/]?end[_]?of[_]?turn>/gi, "");
297
- sanitized = sanitized.replace(/<div class="MuiBox-root[^"]*"[^>]*>([\s\S]*?)<\/div>/g, (_, inner) => inner.trim()).replace(/<div[^>]*>\s*<\/div>/g, "");
298
- sanitized = sanitized.replace(/\r?\n\s*:\s*/g, ": ");
299
- sanitized = sanitized.replace(/\r?\n\s*,\s*/g, ", ");
300
- sanitized = normalizeTables(sanitized);
301
- return sanitized;
302
- };
303
- const sanitizedContent = sanitizeMarkdown(content);
304
- const contentWithSources = useMemo(() => {
305
- if (!effectiveSources.length || isStreaming) {
306
- return sanitizedContent;
307
- }
308
- const existingSection = /\*\*Sources?\*\*/i.test(sanitizedContent);
309
- if (existingSection) {
310
- return sanitizedContent;
311
- }
312
- const listMarkdown = effectiveSources.map((doc, index) => `- ${index + 1}. ${doc.name}`).join("\n");
313
- return `${sanitizedContent}
314
-
315
- **Sources**
316
- ${listMarkdown}`;
317
- }, [sanitizedContent, effectiveSources, isStreaming]);
318
- const escapeHtml = (str) => str.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/\"/g, "&quot;").replace(/'/g, "&#39;");
319
- const isPlainAppend = (s) => {
320
- return !/[`*_\[\]<>|#~]/.test(s);
321
- };
322
- let renderContent = contentWithSources;
323
- if (isStreaming) {
324
- const prev = prevSanitizedRef.current;
325
- let i = 0;
326
- const max = Math.min(prev.length, sanitizedContent.length);
327
- while (i < max && prev.charCodeAt(i) === sanitizedContent.charCodeAt(i)) i++;
328
- const base = sanitizedContent.slice(0, i);
329
- const appended = sanitizedContent.slice(i);
330
- if (appended && isPlainAppend(appended)) {
331
- const parts = appended.split(/(\s+)/);
332
- let delayMs = 0;
333
- const step = 42;
334
- const wrapped = parts.map((p) => {
335
- if (/^\s+$/.test(p) || p === "") return p;
336
- const safe = escapeHtml(p);
337
- const out = `<span class="bl-fade-word" data-bl-delay="${delayMs}">${safe}</span>`;
338
- delayMs += step;
339
- return out;
340
- }).join("");
341
- renderContent = base + wrapped;
342
- }
343
- }
344
- useEffect3(() => {
345
- prevSanitizedRef.current = contentWithSources;
346
- }, [contentWithSources]);
347
- useEffect3(() => {
348
- if (!containerRef.current) return;
349
- const nodes = containerRef.current.querySelectorAll(".bl-fade-word");
350
- nodes.forEach((node) => {
351
- const delay = node.getAttribute("data-bl-delay");
352
- if (delay) {
353
- node.style.setProperty("--bl-delay", `${delay}ms`);
354
- node.style.animationDelay = `${delay}ms`;
355
- }
356
- });
357
- }, [renderContent, sanitizedContent, isStreaming]);
358
- const MarkRenderer = ({ children, ...props }) => {
359
- const inlineBg = theme.palette.mode === "dark" ? alpha(theme.palette.common.white, 0.06) : alpha(theme.palette.text.primary, 0.06);
360
- const inlineBorder = `1px solid ${alpha(theme.palette.text.primary, 0.15)}`;
361
- return /* @__PURE__ */ jsx4(
362
- Box2,
363
- {
364
- component: "span",
365
- sx: {
366
- display: "inline-block",
367
- backgroundColor: inlineBg,
368
- border: inlineBorder,
369
- color: "inherit",
370
- padding: "0.15em 0.35em",
371
- borderRadius: "4px",
372
- fontWeight: 500,
373
- fontSize: "0.92em",
374
- lineHeight: 1.4,
375
- whiteSpace: "normal",
376
- width: "fit-content",
377
- maxWidth: "100%",
378
- fontFamily: "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace"
379
- },
380
- ...props,
381
- children
382
- }
383
- );
384
- };
385
- const LinkRenderer = ({ href, children, ...props }) => /* @__PURE__ */ jsx4(
386
- "a",
387
- {
388
- href,
389
- target: "_blank",
390
- rel: "noopener noreferrer",
391
- style: { color: theme.palette.primary.main, textDecoration: "underline" },
392
- ...props,
393
- children
394
- }
395
- );
396
- const CodeRenderer = ({ inline, className, children, ...props }) => {
397
- const match = /language-([\w-]+)/.exec(className || "");
398
- const requestedLanguage = match?.[1]?.toLowerCase() ?? "";
399
- const codeText = String(children).replace(/\n$/, "");
400
- const isProbablyBlock = codeText.includes("\n") || Boolean(requestedLanguage);
401
- const [copied, setCopied] = useState2(false);
402
- const handleCopy = () => {
403
- void navigator.clipboard.writeText(codeText);
404
- setCopied(true);
405
- setTimeout(() => setCopied(false), 2e3);
406
- };
407
- const highlightTree = useMemo(
408
- () => isProbablyBlock ? getHighlightTree(codeText, requestedLanguage) : null,
409
- [isProbablyBlock, codeText, requestedLanguage]
410
- );
411
- const highlightedNodes = useMemo(
412
- () => highlightTree ? renderLowlightChildren(
413
- (highlightTree.children || []).filter(
414
- (node) => node.type === "element" || node.type === "text"
415
- ),
416
- `hl-${requestedLanguage || "auto"}`
417
- ) : [],
418
- [highlightTree, requestedLanguage]
419
- );
420
- const dataLanguage = highlightTree && highlightTree.data && typeof highlightTree.data === "object" && "language" in highlightTree.data ? String(highlightTree.data.language ?? "") : "";
421
- if (!highlightTree) {
422
- const inlineBg = theme.palette.mode === "dark" ? alpha(theme.palette.common.white, 0.06) : alpha(theme.palette.text.primary, 0.06);
423
- const inlineBorder = `1px solid ${alpha(theme.palette.text.primary, 0.15)}`;
424
- return /* @__PURE__ */ jsx4(
425
- "code",
426
- {
427
- style: {
428
- borderRadius: 4,
429
- fontSize: "0.92em",
430
- fontFamily: "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace",
431
- backgroundColor: inlineBg,
432
- border: inlineBorder,
433
- padding: "0.15em 0.35em"
434
- },
435
- ...props,
436
- children
437
- }
438
- );
439
- }
440
- const resolvedLanguage = (requestedLanguage || dataLanguage || "code").toString();
441
- const languageLabel = resolvedLanguage.toUpperCase();
442
- const languageClass = resolvedLanguage.toLowerCase();
443
- const highlightColors = theme.palette.mode === "dark" ? {
444
- background: "#0f172a",
445
- text: "#e2e8f0",
446
- keyword: "#c792ea",
447
- string: "#7fdbca",
448
- number: "#f78c6c",
449
- comment: "#64748b",
450
- function: "#82aaff",
451
- variable: "#f07178"
452
- } : {
453
- background: "#f4f6ff",
454
- text: "#1e293b",
455
- keyword: "#7c3aed",
456
- string: "#0f766e",
457
- number: "#b45309",
458
- comment: "#6b7280",
459
- function: "#2563eb",
460
- variable: "#d97706"
461
- };
462
- return /* @__PURE__ */ jsxs(
463
- Box2,
464
- {
465
- sx: {
466
- borderRadius: "4px",
467
- overflow: "auto",
468
- my: "0.5rem",
469
- px: 0,
470
- py: 0,
471
- mt: 1,
472
- mb: 0.5,
473
- fontSize: "0.9rem",
474
- position: "relative",
475
- fontFamily: "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace",
476
- width: "100%",
477
- maxWidth: "100%"
478
- },
479
- children: [
480
- /* @__PURE__ */ jsxs(
481
- Box2,
482
- {
483
- sx: {
484
- px: 2,
485
- py: 1,
486
- bgcolor: theme.palette.mode === "dark" ? alpha(theme.palette.common.white, 0.04) : alpha(theme.palette.text.primary, 0.04),
487
- color: theme.palette.text.secondary,
488
- fontSize: "0.75rem",
489
- borderBottom: `1px solid ${alpha(theme.palette.text.primary, 0.1)}`,
490
- display: "flex",
491
- justifyContent: "space-between",
492
- alignItems: "center",
493
- fontFamily: "inherit"
494
- },
495
- children: [
496
- /* @__PURE__ */ jsx4("span", { children: languageLabel }),
497
- /* @__PURE__ */ jsx4(Tooltip, { title: copied ? "Copied!" : "Copy", arrow: true, children: /* @__PURE__ */ jsx4(
498
- IconButton2,
499
- {
500
- size: "small",
501
- onClick: handleCopy,
502
- sx: {
503
- color: copied ? theme.palette.success.main : theme.palette.text.secondary,
504
- "&:hover": { color: theme.palette.text.primary },
505
- padding: "4px"
506
- },
507
- children: copied ? /* @__PURE__ */ jsx4(CheckIcon, { fontSize: "small" }) : /* @__PURE__ */ jsx4(ContentCopyIcon, { fontSize: "small" })
508
- }
509
- ) })
510
- ]
511
- }
512
- ),
513
- /* @__PURE__ */ jsx4(
514
- Box2,
515
- {
516
- sx: {
517
- overflowX: "auto",
518
- maxWidth: "100%",
519
- "& .hljs": {
520
- display: "block",
521
- overflowX: "auto",
522
- padding: "16px",
523
- margin: 0,
524
- backgroundColor: highlightColors.background,
525
- color: highlightColors.text,
526
- fontSize: "0.9rem"
527
- },
528
- "& .hljs-comment, & .hljs-quote": {
529
- color: highlightColors.comment,
530
- fontStyle: "italic"
531
- },
532
- "& .hljs-keyword, & .hljs-selector-tag, & .hljs-literal, & .hljs-built_in": {
533
- color: highlightColors.keyword
534
- },
535
- "& .hljs-string, & .hljs-doctag, & .hljs-template-tag, & .hljs-attr": {
536
- color: highlightColors.string
537
- },
538
- "& .hljs-number, & .hljs-symbol, & .hljs-bullet, & .hljs-meta": {
539
- color: highlightColors.number
540
- },
541
- "& .hljs-title, & .hljs-section, & .hljs-selector-id, & .hljs-function": {
542
- color: highlightColors.function
543
- },
544
- "& .hljs-variable, & .hljs-params, & .hljs-property": {
545
- color: highlightColors.variable
546
- }
547
- },
548
- children: /* @__PURE__ */ jsx4("pre", { className: `hljs language-${languageClass}`, ...props, children: /* @__PURE__ */ jsx4("code", { className: "hljs", children: highlightedNodes }) })
549
- }
550
- )
551
- ]
552
- }
553
- );
554
- };
555
- const EmRenderer = ({ children, ...props }) => {
556
- const onlyChild = Array.isArray(children) && children.length === 1 ? children[0] : null;
557
- if (onlyChild && React3.isValidElement(onlyChild) && typeof onlyChild.props?.className === "string" && onlyChild.props.className.includes("MuiBox-root")) {
558
- const inner = onlyChild.props.children;
559
- if (typeof inner === "string" && inner.trim().toUpperCase() === "CODE") {
560
- return null;
561
- }
562
- return /* @__PURE__ */ jsx4(
563
- Box2,
564
- {
565
- sx: {
566
- fontFamily: "monospace",
567
- fontSize: "0.9rem",
568
- backgroundColor: theme.palette.background.default,
569
- color: theme.palette.text.primary,
570
- padding: "12px 16px",
571
- borderRadius: "4px",
572
- border: `1px solid ${theme.palette.divider}`,
573
- my: 1,
574
- display: "inline-block"
575
- },
576
- children: inner
577
- }
578
- );
579
- }
580
- return /* @__PURE__ */ jsx4("em", { ...props, children });
581
- };
582
- const TableRenderer = ({ children, ...props }) => /* @__PURE__ */ jsx4(Box2, { sx: { overflowX: "auto", my: 1 }, children: /* @__PURE__ */ jsx4("table", { style: { borderCollapse: "collapse", width: "100%" }, ...props, children }) });
583
- const OrderedListRenderer = ({ children, ...props }) => /* @__PURE__ */ jsx4("ol", { style: { paddingLeft: 24, marginLeft: 16, listStyleType: "decimal" }, ...props, children });
584
- const UnorderedListRenderer = ({ children, ...props }) => /* @__PURE__ */ jsx4(
585
- "ul",
586
- {
587
- style: {
588
- paddingLeft: "1.5rem",
589
- marginTop: "0.5rem",
590
- marginBottom: "0.25rem",
591
- listStyle: "disc"
592
- },
593
- ...props,
594
- children
595
- }
596
- );
597
- const BlockQuoteRenderer = ({ children, ...props }) => /* @__PURE__ */ jsx4(
598
- Box2,
599
- {
600
- component: "blockquote",
601
- sx: {
602
- borderLeft: `4px solid ${theme.palette.divider}`,
603
- pl: 2,
604
- ml: 0,
605
- color: theme.palette.text.secondary
606
- },
607
- ...props,
608
- children
609
- }
610
- );
611
- const TableHeaderRenderer = ({ children, ...props }) => /* @__PURE__ */ jsx4(
612
- "th",
613
- {
614
- style: {
615
- border: "1px solid #ddd",
616
- padding: "8px",
617
- backgroundColor: theme.palette.mode === "dark" ? "#333" : "#f2f2f2",
618
- textAlign: "left"
619
- },
620
- ...props,
621
- children
622
- }
623
- );
624
- const TableCellRenderer = ({ children, ...props }) => /* @__PURE__ */ jsx4(
625
- "td",
626
- {
627
- style: {
628
- border: "1px solid #ddd",
629
- padding: "8px"
630
- },
631
- ...props,
632
- children
633
- }
634
- );
635
- const ParagraphRenderer = ({ children, ...props }) => /* @__PURE__ */ jsx4("p", { style: { marginTop: "0.5rem", marginBottom: "0.5rem" }, ...props, children });
636
- const components = {
637
- mark: MarkRenderer,
638
- code: CodeRenderer,
639
- a: LinkRenderer,
640
- em: EmRenderer,
641
- table: TableRenderer,
642
- ol: OrderedListRenderer,
643
- ul: UnorderedListRenderer,
644
- blockquote: BlockQuoteRenderer,
645
- th: TableHeaderRenderer,
646
- td: TableCellRenderer,
647
- p: ParagraphRenderer
648
- };
649
- return /* @__PURE__ */ jsx4(
650
- Box2,
651
- {
652
- ref: containerRef,
653
- sx: {
654
- // Base transition for minor layout changes
655
- transition: "opacity 120ms ease-out, transform 120ms ease-out",
656
- "& .cursor": {
657
- display: showCursor ? "inline" : "none",
658
- animation: "blink 1s step-start infinite"
659
- },
660
- "@keyframes blink": {
661
- "50%": { opacity: 0 }
662
- },
663
- "& .bl-fade-word": {
664
- opacity: 0,
665
- animation: "bl-fade-in 420ms ease-out forwards"
666
- },
667
- "@keyframes bl-fade-in": {
668
- from: { opacity: 0, transform: "translateY(1.5px)" },
669
- to: { opacity: 1, transform: "translateY(0)" }
670
- },
671
- // Subtle fade-in for each render while streaming to reduce choppiness perception
672
- opacity: isStreaming ? 0.985 : 1,
673
- transform: isStreaming ? "translateY(0.25px)" : "none",
674
- // Reduce layout jumpiness between updates
675
- "& p:last-child": { marginBottom: 0 },
676
- // Add min height when showing loader to prevent layout shift
677
- minHeight: showLoader ? "40px" : "auto"
678
- },
679
- children: showLoader ? (
680
- // Show loading indicator when streaming but no content yet
681
- /* @__PURE__ */ jsx4(Box2, { sx: { display: "flex", alignItems: "center", minHeight: "40px", pl: 2 }, children: /* @__PURE__ */ jsxs("div", { className: "typing-only", children: [
682
- /* @__PURE__ */ jsx4("span", { className: "dot" }),
683
- /* @__PURE__ */ jsx4("span", { className: "dot" }),
684
- /* @__PURE__ */ jsx4("span", { className: "dot" })
685
- ] }) })
686
- ) : /* @__PURE__ */ jsx4(
687
- ReactMarkdown,
688
- {
689
- remarkPlugins: [remarkGfm],
690
- rehypePlugins: [rehypeRaw, [rehypeSanitize, markdownSanitizeSchema]],
691
- components,
692
- children: (renderContent || sanitizedContent) + (showCursor ? " \u258A" : "")
693
- }
694
- )
695
- }
696
- );
697
- };
698
- var StreamingMarkdown_default = StreamingMarkdown;
699
-
700
- // src/chat/chat-messages.tsx
701
- import { jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
702
229
  var ChatMessages = ({
703
230
  pendingMessage,
704
231
  streamBuffer,
@@ -717,7 +244,7 @@ var ChatMessages = ({
717
244
  const lastIndex = history.length - 1;
718
245
  const hasActivePlaceholder = lastIndex >= 0 && history[lastIndex]?.answer === "...";
719
246
  if (!responseStarted && !pendingMessage && history.length === 0) return null;
720
- return /* @__PURE__ */ jsxs2(Box3, { sx: { px: isMobile ? 0 : 0, pt: "100px", display: "flex", flexDirection: "column", gap: 2 }, children: [
247
+ return /* @__PURE__ */ jsxs(Box2, { sx: { px: isMobile ? 0 : 0, pt: "100px", display: "flex", flexDirection: "column", gap: 2 }, children: [
721
248
  history.map((entry, index) => {
722
249
  const isLast = index === lastIndex;
723
250
  const isPlaceholder = entry.answer === "...";
@@ -725,8 +252,8 @@ var ChatMessages = ({
725
252
  const content = isLast ? isStreaming ? streamBuffer || "" : isPlaceholder ? "" : entry.answer : entry.answer;
726
253
  const rawSources = entry.sourceFiles;
727
254
  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;
728
- const responseNode = /* @__PURE__ */ jsxs2(
729
- Box3,
255
+ const responseNode = /* @__PURE__ */ jsxs(
256
+ Box2,
730
257
  {
731
258
  sx: {
732
259
  minHeight: isLast ? isMobile ? "80px" : "60px" : void 0,
@@ -735,8 +262,8 @@ var ChatMessages = ({
735
262
  transition: "min-height 0.25s cubic-bezier(0.4, 0, 0.2, 1)"
736
263
  },
737
264
  children: [
738
- /* @__PURE__ */ jsx5(
739
- Box3,
265
+ /* @__PURE__ */ jsx4(
266
+ Box2,
740
267
  {
741
268
  sx: {
742
269
  position: showLoader ? "static" : "absolute",
@@ -749,15 +276,15 @@ var ChatMessages = ({
749
276
  pointerEvents: showLoader ? "auto" : "none",
750
277
  zIndex: showLoader ? 1 : 0
751
278
  },
752
- children: /* @__PURE__ */ jsx5(Box3, { sx: { display: "flex", alignItems: "center", minHeight: "40px", pl: 2 }, children: /* @__PURE__ */ jsxs2("div", { className: "typing-only", children: [
753
- /* @__PURE__ */ jsx5("span", { className: "dot" }),
754
- /* @__PURE__ */ jsx5("span", { className: "dot" }),
755
- /* @__PURE__ */ jsx5("span", { className: "dot" })
279
+ children: /* @__PURE__ */ jsx4(Box2, { sx: { display: "flex", alignItems: "center", minHeight: "40px", pl: 2 }, children: /* @__PURE__ */ jsxs("div", { className: "typing-only", children: [
280
+ /* @__PURE__ */ jsx4("span", { className: "dot" }),
281
+ /* @__PURE__ */ jsx4("span", { className: "dot" }),
282
+ /* @__PURE__ */ jsx4("span", { className: "dot" })
756
283
  ] }) })
757
284
  }
758
285
  ),
759
- /* @__PURE__ */ jsx5(
760
- Box3,
286
+ /* @__PURE__ */ jsx4(
287
+ Box2,
761
288
  {
762
289
  sx: {
763
290
  position: showLoader ? "absolute" : "static",
@@ -770,7 +297,7 @@ var ChatMessages = ({
770
297
  pointerEvents: showLoader ? "none" : "auto",
771
298
  zIndex: 1
772
299
  },
773
- children: /* @__PURE__ */ jsx5(
300
+ children: /* @__PURE__ */ jsx4(
774
301
  StreamingMarkdown_default,
775
302
  {
776
303
  content,
@@ -783,7 +310,7 @@ var ChatMessages = ({
783
310
  ]
784
311
  }
785
312
  );
786
- return /* @__PURE__ */ jsx5(Box3, { children: /* @__PURE__ */ jsx5(
313
+ return /* @__PURE__ */ jsx4(Box2, { children: /* @__PURE__ */ jsx4(
787
314
  ai_response_text_field_default,
788
315
  {
789
316
  question: entry.question,
@@ -798,14 +325,14 @@ var ChatMessages = ({
798
325
  }
799
326
  ) }, index);
800
327
  }),
801
- /* @__PURE__ */ jsx5("div", { style: { height: "1px" }, ref: scrollTargetRef })
328
+ /* @__PURE__ */ jsx4("div", { style: { height: "1px" }, ref: scrollTargetRef })
802
329
  ] });
803
330
  };
804
331
  var chat_messages_default = ChatMessages;
805
332
 
806
333
  // src/chat/chat-input.tsx
807
- import { useEffect as useEffect4, useRef as useRef3, useState as useState4 } from "react";
808
- import { Box as Box4, TextField, IconButton as IconButton4, Tooltip as Tooltip2, Avatar as Avatar2, Typography, CircularProgress as CircularProgress2, Collapse } from "@mui/material";
334
+ import { useEffect as useEffect3, useRef as useRef2, useState as useState3 } from "react";
335
+ import { Box as Box3, TextField, IconButton as IconButton3, Tooltip, Avatar as Avatar2, Typography, CircularProgress as CircularProgress2, Collapse } from "@mui/material";
809
336
  import CloseIcon2 from "@mui/icons-material/Close";
810
337
  import ArrowUpwardIcon from "@mui/icons-material/ArrowUpward";
811
338
  import PsychologyIcon from "@mui/icons-material/Psychology";
@@ -815,9 +342,9 @@ import GraphicEqIcon from "@mui/icons-material/GraphicEq";
815
342
  import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
816
343
 
817
344
  // src/services/stt/transcriber.tsx
818
- import { useState as useState3, useRef as useRef2 } from "react";
345
+ import { useState as useState2, useRef } from "react";
819
346
  import MicIcon from "@mui/icons-material/Mic";
820
- import CheckIcon2 from "@mui/icons-material/Check";
347
+ import CheckIcon from "@mui/icons-material/Check";
821
348
  import CloseIcon from "@mui/icons-material/Close";
822
349
 
823
350
  // src/services/stt/sound-recorder.service.ts
@@ -962,9 +489,9 @@ var STTClient = class {
962
489
  };
963
490
 
964
491
  // src/services/stt/transcriber.tsx
965
- import { CircularProgress, IconButton as IconButton3, useTheme as useTheme4 } from "@mui/material";
492
+ import { CircularProgress, IconButton as IconButton2, useTheme as useTheme3 } from "@mui/material";
966
493
  import { from as from2, Subscription, switchMap as switchMap2 } from "rxjs";
967
- import { Fragment as Fragment2, jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
494
+ import { Fragment as Fragment2, jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
968
495
  var initialButtonStyles = (badgeBackground, fileText, hoverBadgeBackground) => ({
969
496
  bgcolor: badgeBackground,
970
497
  color: fileText,
@@ -974,14 +501,14 @@ var initialButtonStyles = (badgeBackground, fileText, hoverBadgeBackground) => (
974
501
  "&:hover": { bgcolor: hoverBadgeBackground }
975
502
  });
976
503
  var Transcriber = ({ onTranscriptionCompleted }) => {
977
- const theme = useTheme4();
504
+ const theme = useTheme3();
978
505
  const badgeBackground = theme.palette.chat.badge;
979
506
  const fileText = theme.palette.chat.fileText;
980
507
  const hoverBadgeBackground = theme.palette.chat.badgeHover;
981
- const [status, setStatus] = useState3("IDLE");
982
- const recorderRef = useRef2(new SoundRecorderService());
983
- const [iconButtonStyles] = useState3(() => initialButtonStyles(badgeBackground, fileText, hoverBadgeBackground));
984
- const [recordingSub, setRecordingSub] = useState3(() => new Subscription());
508
+ const [status, setStatus] = useState2("IDLE");
509
+ const recorderRef = useRef(new SoundRecorderService());
510
+ const [iconButtonStyles] = useState2(() => initialButtonStyles(badgeBackground, fileText, hoverBadgeBackground));
511
+ const [recordingSub, setRecordingSub] = useState2(() => new Subscription());
985
512
  const start = () => {
986
513
  recordingSub.unsubscribe();
987
514
  const recording = recorderRef.current.start();
@@ -1012,7 +539,7 @@ var Transcriber = ({ onTranscriptionCompleted }) => {
1012
539
  setStatus("LOADING");
1013
540
  stop();
1014
541
  };
1015
- return /* @__PURE__ */ jsx6(
542
+ return /* @__PURE__ */ jsx5(
1016
543
  "div",
1017
544
  {
1018
545
  style: {
@@ -1022,34 +549,34 @@ var Transcriber = ({ onTranscriptionCompleted }) => {
1022
549
  backgroundColor: status === "RECORDING" ? "rgba(0,0,0,.3)" : "rgba(0,0,0,0)",
1023
550
  borderRadius: "50px"
1024
551
  },
1025
- children: status === "IDLE" ? /* @__PURE__ */ jsx6(IconButton3, { sx: { ...iconButtonStyles }, onClick: handleRecordClick, children: /* @__PURE__ */ jsx6(MicIcon, { sx: { color: "#aaa", cursor: "pointer" } }) }) : status === "RECORDING" ? /* @__PURE__ */ jsxs3(Fragment2, { children: [
1026
- /* @__PURE__ */ jsx6(
1027
- IconButton3,
552
+ 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: [
553
+ /* @__PURE__ */ jsx5(
554
+ IconButton2,
1028
555
  {
1029
556
  onClick: handleCancelClick,
1030
557
  sx: { ...iconButtonStyles, marginRight: 1 },
1031
- children: /* @__PURE__ */ jsx6(CloseIcon, {})
558
+ children: /* @__PURE__ */ jsx5(CloseIcon, {})
1032
559
  }
1033
560
  ),
1034
- /* @__PURE__ */ jsx6(
1035
- IconButton3,
561
+ /* @__PURE__ */ jsx5(
562
+ IconButton2,
1036
563
  {
1037
564
  sx: {
1038
565
  ...iconButtonStyles,
1039
566
  filter: "invert(110%)"
1040
567
  },
1041
568
  onClick: handleSubmitClick,
1042
- children: /* @__PURE__ */ jsx6(CheckIcon2, {})
569
+ children: /* @__PURE__ */ jsx5(CheckIcon, {})
1043
570
  }
1044
571
  )
1045
- ] }) : status === "LOADING" ? /* @__PURE__ */ jsx6(IconButton3, { sx: { ...iconButtonStyles }, children: /* @__PURE__ */ jsx6(CircularProgress, { size: 20 }) }) : null
572
+ ] }) : status === "LOADING" ? /* @__PURE__ */ jsx5(IconButton2, { sx: { ...iconButtonStyles }, children: /* @__PURE__ */ jsx5(CircularProgress, { size: 20 }) }) : null
1046
573
  }
1047
574
  );
1048
575
  };
1049
576
  var transcriber_default = Transcriber;
1050
577
 
1051
578
  // src/chat/chat-input.tsx
1052
- import { useTheme as useTheme5, alpha as alpha2 } from "@mui/material/styles";
579
+ import { useTheme as useTheme4, alpha } from "@mui/material/styles";
1053
580
 
1054
581
  // src/store/voiceModeStore.ts
1055
582
  import { create } from "zustand";
@@ -1088,7 +615,7 @@ var useVoiceModeStore = create((set) => ({
1088
615
 
1089
616
  // src/chat/chat-input.tsx
1090
617
  import { shallow } from "zustand/shallow";
1091
- import { Fragment as Fragment3, jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
618
+ import { Fragment as Fragment3, jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
1092
619
  var ChatInput = (props) => {
1093
620
  const {
1094
621
  inputValue,
@@ -1103,7 +630,7 @@ var ChatInput = (props) => {
1103
630
  onStop,
1104
631
  isStreaming
1105
632
  } = props;
1106
- const theme = useTheme5();
633
+ const theme = useTheme4();
1107
634
  const inputBackground = theme.palette.chat.input;
1108
635
  const shellBackground = theme.palette.chat.shell;
1109
636
  const badgeBackground = theme.palette.chat.badge;
@@ -1131,13 +658,13 @@ var ChatInput = (props) => {
1131
658
  }),
1132
659
  shallow
1133
660
  );
1134
- const [memoryOpen, setMemoryOpen] = useState4(false);
1135
- const [fileInputs, setFileInputs] = useState4([]);
1136
- const fileInputRef = useRef3(null);
1137
- const [brandingText, setBrandingText] = useState4("");
1138
- const [feedbackModalOpen, setFeedbackModalOpen] = useState4(false);
1139
- const [isKeyboardOpen, setKeyboardOpen] = useState4(false);
1140
- const [moreActionsOpen, setMoreActionsOpen] = useState4(false);
661
+ const [memoryOpen, setMemoryOpen] = useState3(false);
662
+ const [fileInputs, setFileInputs] = useState3([]);
663
+ const fileInputRef = useRef2(null);
664
+ const [brandingText, setBrandingText] = useState3("");
665
+ const [feedbackModalOpen, setFeedbackModalOpen] = useState3(false);
666
+ const [isKeyboardOpen, setKeyboardOpen] = useState3(false);
667
+ const [moreActionsOpen, setMoreActionsOpen] = useState3(false);
1141
668
  const compactMobile = isMobile;
1142
669
  const primaryIconSize = isMobile ? 32 : 40;
1143
670
  const sendIconSize = isMobile ? 36 : 44;
@@ -1146,10 +673,10 @@ var ChatInput = (props) => {
1146
673
  const attachmentChipPaddingY = isMobile ? 0.55 : 0.75;
1147
674
  const mobileShellPadding = `calc(var(--input-offset, 1.5rem) - 0.4rem)`;
1148
675
  const streamingActive = Boolean(isStreaming);
1149
- const sendButtonBackground = streamingActive ? alpha2(theme.palette.error.main, theme.palette.mode === "dark" ? 0.75 : 0.65) : fileText;
676
+ const sendButtonBackground = streamingActive ? alpha(theme.palette.error.main, theme.palette.mode === "dark" ? 0.75 : 0.65) : fileText;
1150
677
  const sendButtonColor = streamingActive ? theme.palette.common.white : fileIconBg;
1151
- const sendButtonHover = streamingActive ? alpha2(theme.palette.error.main, theme.palette.mode === "dark" ? 0.9 : 0.82) : hoverBadgeBackground;
1152
- const sendButtonShadow = streamingActive ? `0 0 0 3px ${alpha2(theme.palette.error.main, 0.18)}` : "none";
678
+ const sendButtonHover = streamingActive ? alpha(theme.palette.error.main, theme.palette.mode === "dark" ? 0.9 : 0.82) : hoverBadgeBackground;
679
+ const sendButtonShadow = streamingActive ? `0 0 0 3px ${alpha(theme.palette.error.main, 0.18)}` : "none";
1153
680
  const { hasSTT, hasMemory, hasDocumentKnowledge } = useFeatures();
1154
681
  const { showMemoryToggle, showDocumentUpload } = useFeatureVisibility();
1155
682
  const isSTTAvailable = !!packageSettings?.gatewayApiUrl && preferences.sttEnabled && hasSTT();
@@ -1160,7 +687,7 @@ var ChatInput = (props) => {
1160
687
  const isFeedbackEnabled = preferences.feedbackEnabled;
1161
688
  const gatewayUrlLower = packageSettings?.gatewayApiUrl?.toLowerCase?.() ?? "";
1162
689
  const isPlaygroundMode2 = packageSettings?.playgroundMode === true || gatewayUrlLower.startsWith("playground://") || typeof window !== "undefined" && window.location.pathname.includes("/playground");
1163
- useEffect4(() => {
690
+ useEffect3(() => {
1164
691
  const lockViewportHeight = () => {
1165
692
  if (isMobile) {
1166
693
  document.documentElement.style.setProperty("--vh", `${window.innerHeight * 0.01}px`);
@@ -1174,7 +701,7 @@ var ChatInput = (props) => {
1174
701
  window.addEventListener("resize", lockViewportHeight);
1175
702
  return () => window.removeEventListener("resize", lockViewportHeight);
1176
703
  }, [isMobile]);
1177
- useEffect4(() => {
704
+ useEffect3(() => {
1178
705
  if (!isMobile) {
1179
706
  setKeyboardOpen(false);
1180
707
  return;
@@ -1197,7 +724,7 @@ var ChatInput = (props) => {
1197
724
  window.removeEventListener("resize", detectKeyboard);
1198
725
  };
1199
726
  }, [isMobile]);
1200
- useEffect4(() => {
727
+ useEffect3(() => {
1201
728
  const loadBrandingText = async () => {
1202
729
  try {
1203
730
  const branding = await brandingService_default.getBranding();
@@ -1209,7 +736,7 @@ var ChatInput = (props) => {
1209
736
  };
1210
737
  loadBrandingText();
1211
738
  }, []);
1212
- useEffect4(() => {
739
+ useEffect3(() => {
1213
740
  const handlePaste = (e) => {
1214
741
  const items = e.clipboardData?.items;
1215
742
  if (items) {
@@ -1378,15 +905,15 @@ ${sanitize(
1378
905
  const hasFeedbackAction = isFeedbackEnabled && isMobile;
1379
906
  const hasSttAction = isSTTAvailable && !isVoiceModeEnabled;
1380
907
  const hasSecondaryActions = isMobile && (hasAttachmentAction || hasMemoryAction || hasFeedbackAction || hasSttAction);
1381
- useEffect4(() => {
908
+ useEffect3(() => {
1382
909
  if (!isMobile || !hasSecondaryActions) {
1383
910
  setMoreActionsOpen(false);
1384
911
  }
1385
912
  }, [isMobile, hasSecondaryActions]);
1386
913
  const renderAttachmentButton = (key) => {
1387
914
  if (!hasAttachmentAction) return null;
1388
- return /* @__PURE__ */ jsx7(Tooltip2, { title: "Attach files or images", children: /* @__PURE__ */ jsx7(
1389
- IconButton4,
915
+ return /* @__PURE__ */ jsx6(Tooltip, { title: "Attach files or images", children: /* @__PURE__ */ jsx6(
916
+ IconButton3,
1390
917
  {
1391
918
  onClick: () => fileInputRef.current?.click(),
1392
919
  sx: {
@@ -1403,8 +930,8 @@ ${sanitize(
1403
930
  };
1404
931
  const renderMemoryButton = (key) => {
1405
932
  if (!hasMemoryAction) return null;
1406
- return /* @__PURE__ */ jsx7(Tooltip2, { title: "Memory", children: /* @__PURE__ */ jsx7(
1407
- IconButton4,
933
+ return /* @__PURE__ */ jsx6(Tooltip, { title: "Memory", children: /* @__PURE__ */ jsx6(
934
+ IconButton3,
1408
935
  {
1409
936
  onClick: () => setMemoryOpen(true),
1410
937
  sx: {
@@ -1415,14 +942,14 @@ ${sanitize(
1415
942
  borderRadius: "50%",
1416
943
  "&:hover": { bgcolor: hoverBadgeBackground }
1417
944
  },
1418
- children: /* @__PURE__ */ jsx7(PsychologyIcon, { fontSize: "small" })
945
+ children: /* @__PURE__ */ jsx6(PsychologyIcon, { fontSize: "small" })
1419
946
  }
1420
947
  ) }, key ?? "memory");
1421
948
  };
1422
949
  const renderFeedbackButton = (key) => {
1423
950
  if (!hasFeedbackAction) return null;
1424
- return /* @__PURE__ */ jsx7(Tooltip2, { title: "Send Feedback", children: /* @__PURE__ */ jsx7(
1425
- IconButton4,
951
+ return /* @__PURE__ */ jsx6(Tooltip, { title: "Send Feedback", children: /* @__PURE__ */ jsx6(
952
+ IconButton3,
1426
953
  {
1427
954
  onClick: () => setFeedbackModalOpen(true),
1428
955
  sx: {
@@ -1433,17 +960,17 @@ ${sanitize(
1433
960
  borderRadius: "50%",
1434
961
  "&:hover": { bgcolor: hoverBadgeBackground }
1435
962
  },
1436
- children: /* @__PURE__ */ jsx7(FeedbackIcon, { fontSize: "small" })
963
+ children: /* @__PURE__ */ jsx6(FeedbackIcon, { fontSize: "small" })
1437
964
  }
1438
965
  ) }, key ?? "feedback");
1439
966
  };
1440
967
  const renderSttButton = (key) => {
1441
968
  if (!hasSttAction) return null;
1442
- return /* @__PURE__ */ jsx7(Box4, { sx: { display: "flex", alignItems: "center" }, children: /* @__PURE__ */ jsx7(transcriber_default, { onTranscriptionCompleted: handleTranscriptionCompleted }) }, key ?? "stt");
969
+ return /* @__PURE__ */ jsx6(Box3, { sx: { display: "flex", alignItems: "center" }, children: /* @__PURE__ */ jsx6(transcriber_default, { onTranscriptionCompleted: handleTranscriptionCompleted }) }, key ?? "stt");
1443
970
  };
1444
- return /* @__PURE__ */ jsxs4(Fragment3, { children: [
1445
- /* @__PURE__ */ jsxs4(
1446
- Box4,
971
+ return /* @__PURE__ */ jsxs3(Fragment3, { children: [
972
+ /* @__PURE__ */ jsxs3(
973
+ Box3,
1447
974
  {
1448
975
  sx: {
1449
976
  width: "100%",
@@ -1462,8 +989,8 @@ ${sanitize(
1462
989
  },
1463
990
  ref: inputContainerRef,
1464
991
  children: [
1465
- /* @__PURE__ */ jsxs4(
1466
- Box4,
992
+ /* @__PURE__ */ jsxs3(
993
+ Box3,
1467
994
  {
1468
995
  sx: {
1469
996
  width: "100%",
@@ -1478,8 +1005,8 @@ ${sanitize(
1478
1005
  gap: isMobile ? compactMobile ? 0.75 : 1 : 1
1479
1006
  },
1480
1007
  children: [
1481
- /* @__PURE__ */ jsxs4(
1482
- Box4,
1008
+ /* @__PURE__ */ jsxs3(
1009
+ Box3,
1483
1010
  {
1484
1011
  sx: {
1485
1012
  display: "flex",
@@ -1489,8 +1016,8 @@ ${sanitize(
1489
1016
  flexDirection: "row"
1490
1017
  },
1491
1018
  children: [
1492
- fileInputs.map((file, idx) => /* @__PURE__ */ jsxs4(
1493
- Box4,
1019
+ fileInputs.map((file, idx) => /* @__PURE__ */ jsxs3(
1020
+ Box3,
1494
1021
  {
1495
1022
  sx: {
1496
1023
  position: "relative",
@@ -1503,7 +1030,7 @@ ${sanitize(
1503
1030
  gap: isMobile ? compactMobile ? 0.6 : 0.9 : 1
1504
1031
  },
1505
1032
  children: [
1506
- /* @__PURE__ */ jsx7(
1033
+ /* @__PURE__ */ jsx6(
1507
1034
  Avatar2,
1508
1035
  {
1509
1036
  sx: {
@@ -1517,22 +1044,22 @@ ${sanitize(
1517
1044
  children: getFileIcon(file.name)
1518
1045
  }
1519
1046
  ),
1520
- /* @__PURE__ */ jsx7(Typography, { variant: "caption", sx: { color: fileText }, children: file.name }),
1521
- /* @__PURE__ */ jsx7(
1522
- IconButton4,
1047
+ /* @__PURE__ */ jsx6(Typography, { variant: "caption", sx: { color: fileText }, children: file.name }),
1048
+ /* @__PURE__ */ jsx6(
1049
+ IconButton3,
1523
1050
  {
1524
1051
  size: "small",
1525
1052
  onClick: () => setFileInputs((prev) => prev.filter((_, i) => i !== idx)),
1526
1053
  sx: { ml: 0.5, color: theme.palette.mode === "dark" ? "#aaa" : "#444" },
1527
- children: /* @__PURE__ */ jsx7(CloseIcon2, { sx: { fontSize: 14 } })
1054
+ children: /* @__PURE__ */ jsx6(CloseIcon2, { sx: { fontSize: 14 } })
1528
1055
  }
1529
1056
  )
1530
1057
  ]
1531
1058
  },
1532
1059
  idx
1533
1060
  )),
1534
- pastedImages.map((img, idx) => /* @__PURE__ */ jsxs4(Box4, { sx: { position: "relative" }, children: [
1535
- /* @__PURE__ */ jsx7(
1061
+ pastedImages.map((img, idx) => /* @__PURE__ */ jsxs3(Box3, { sx: { position: "relative" }, children: [
1062
+ /* @__PURE__ */ jsx6(
1536
1063
  Avatar2,
1537
1064
  {
1538
1065
  src: img,
@@ -1544,8 +1071,8 @@ ${sanitize(
1544
1071
  }
1545
1072
  }
1546
1073
  ),
1547
- /* @__PURE__ */ jsx7(
1548
- IconButton4,
1074
+ /* @__PURE__ */ jsx6(
1075
+ IconButton3,
1549
1076
  {
1550
1077
  size: "small",
1551
1078
  onClick: () => removeImage(idx),
@@ -1561,7 +1088,7 @@ ${sanitize(
1561
1088
  bgcolor: "rgba(255, 5, 5, 0.85)"
1562
1089
  }
1563
1090
  },
1564
- children: /* @__PURE__ */ jsx7(
1091
+ children: /* @__PURE__ */ jsx6(
1565
1092
  CloseIcon2,
1566
1093
  {
1567
1094
  sx: {
@@ -1573,7 +1100,7 @@ ${sanitize(
1573
1100
  }
1574
1101
  )
1575
1102
  ] }, `img-${idx}`)),
1576
- /* @__PURE__ */ jsx7(
1103
+ /* @__PURE__ */ jsx6(
1577
1104
  "input",
1578
1105
  {
1579
1106
  type: "file",
@@ -1610,15 +1137,15 @@ ${sanitize(
1610
1137
  ]
1611
1138
  }
1612
1139
  ),
1613
- /* @__PURE__ */ jsx7(
1614
- Box4,
1140
+ /* @__PURE__ */ jsx6(
1141
+ Box3,
1615
1142
  {
1616
1143
  sx: {
1617
1144
  display: "flex",
1618
1145
  maxHeight: "200px",
1619
1146
  overflowY: "auto"
1620
1147
  },
1621
- children: /* @__PURE__ */ jsx7(
1148
+ children: /* @__PURE__ */ jsx6(
1622
1149
  TextField,
1623
1150
  {
1624
1151
  fullWidth: true,
@@ -1650,8 +1177,8 @@ ${sanitize(
1650
1177
  )
1651
1178
  }
1652
1179
  ),
1653
- /* @__PURE__ */ jsxs4(
1654
- Box4,
1180
+ /* @__PURE__ */ jsxs3(
1181
+ Box3,
1655
1182
  {
1656
1183
  sx: {
1657
1184
  display: "flex",
@@ -1661,8 +1188,8 @@ ${sanitize(
1661
1188
  mt: isMobile ? 0.5 : 1
1662
1189
  },
1663
1190
  children: [
1664
- /* @__PURE__ */ jsxs4(
1665
- Box4,
1191
+ /* @__PURE__ */ jsxs3(
1192
+ Box3,
1666
1193
  {
1667
1194
  sx: {
1668
1195
  display: "flex",
@@ -1671,34 +1198,34 @@ ${sanitize(
1671
1198
  minHeight: primaryIconSize
1672
1199
  },
1673
1200
  children: [
1674
- isVoiceModeEligible && /* @__PURE__ */ jsxs4(Fragment3, { children: [
1675
- /* @__PURE__ */ jsx7(
1676
- Tooltip2,
1201
+ isVoiceModeEligible && /* @__PURE__ */ jsxs3(Fragment3, { children: [
1202
+ /* @__PURE__ */ jsx6(
1203
+ Tooltip,
1677
1204
  {
1678
1205
  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",
1679
- children: /* @__PURE__ */ jsx7(
1680
- IconButton4,
1206
+ children: /* @__PURE__ */ jsx6(
1207
+ IconButton3,
1681
1208
  {
1682
1209
  onClick: toggleVoiceMode,
1683
1210
  sx: {
1684
1211
  width: primaryIconSize,
1685
1212
  height: primaryIconSize,
1686
1213
  borderRadius: "50%",
1687
- bgcolor: isVoiceModeEnabled ? alpha2(theme.palette.error.main, theme.palette.mode === "dark" ? 0.45 : 0.3) : badgeBackground,
1214
+ bgcolor: isVoiceModeEnabled ? alpha(theme.palette.error.main, theme.palette.mode === "dark" ? 0.45 : 0.3) : badgeBackground,
1688
1215
  color: isVoiceModeEnabled ? theme.palette.common.white : fileText,
1689
- boxShadow: isVoiceModeEnabled && voiceStatus === "recording" ? `0 0 0 2px ${alpha2(theme.palette.error.main, 0.25)}` : "none",
1216
+ boxShadow: isVoiceModeEnabled && voiceStatus === "recording" ? `0 0 0 2px ${alpha(theme.palette.error.main, 0.25)}` : "none",
1690
1217
  transform: isVoiceModeEnabled && voiceStatus === "recording" ? "scale(1.05)" : "none",
1691
1218
  transition: "transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease",
1692
1219
  "&:hover": {
1693
- bgcolor: isVoiceModeEnabled ? alpha2(theme.palette.error.main, theme.palette.mode === "dark" ? 0.55 : 0.38) : hoverBadgeBackground
1220
+ bgcolor: isVoiceModeEnabled ? alpha(theme.palette.error.main, theme.palette.mode === "dark" ? 0.55 : 0.38) : hoverBadgeBackground
1694
1221
  }
1695
1222
  },
1696
- 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 } })
1223
+ 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 } })
1697
1224
  }
1698
1225
  )
1699
1226
  }
1700
1227
  ),
1701
- !isMobile && isVoiceModeEnabled && /* @__PURE__ */ jsx7(
1228
+ !isMobile && isVoiceModeEnabled && /* @__PURE__ */ jsx6(
1702
1229
  Typography,
1703
1230
  {
1704
1231
  variant: "caption",
@@ -1716,8 +1243,8 @@ ${sanitize(
1716
1243
  !isMobile && renderAttachmentButton("attach-inline"),
1717
1244
  !isMobile && renderMemoryButton("memory-inline"),
1718
1245
  !isMobile && renderSttButton("stt-inline"),
1719
- isMobile && hasSecondaryActions && /* @__PURE__ */ jsx7(
1720
- IconButton4,
1246
+ isMobile && hasSecondaryActions && /* @__PURE__ */ jsx6(
1247
+ IconButton3,
1721
1248
  {
1722
1249
  onClick: () => setMoreActionsOpen((prev) => !prev),
1723
1250
  sx: {
@@ -1729,7 +1256,7 @@ ${sanitize(
1729
1256
  transition: "background-color 0.2s ease",
1730
1257
  "&:hover": { bgcolor: hoverBadgeBackground }
1731
1258
  },
1732
- children: /* @__PURE__ */ jsx7(
1259
+ children: /* @__PURE__ */ jsx6(
1733
1260
  ExpandMoreIcon,
1734
1261
  {
1735
1262
  fontSize: "small",
@@ -1744,8 +1271,8 @@ ${sanitize(
1744
1271
  ]
1745
1272
  }
1746
1273
  ),
1747
- /* @__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(
1748
- IconButton4,
1274
+ /* @__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(
1275
+ IconButton3,
1749
1276
  {
1750
1277
  onClick: isStreaming ? onStop || (() => {
1751
1278
  }) : handleSubmit,
@@ -1761,14 +1288,14 @@ ${sanitize(
1761
1288
  "&:hover": { bgcolor: sendButtonHover },
1762
1289
  "&.Mui-disabled": { opacity: 0.5 }
1763
1290
  },
1764
- children: isStreaming ? /* @__PURE__ */ jsx7(CloseIcon2, { fontSize: "small" }) : /* @__PURE__ */ jsx7(ArrowUpwardIcon, { fontSize: "small" })
1291
+ children: isStreaming ? /* @__PURE__ */ jsx6(CloseIcon2, { fontSize: "small" }) : /* @__PURE__ */ jsx6(ArrowUpwardIcon, { fontSize: "small" })
1765
1292
  }
1766
1293
  ) }) }) })
1767
1294
  ]
1768
1295
  }
1769
1296
  ),
1770
- isMobile && hasSecondaryActions && /* @__PURE__ */ jsx7(Collapse, { in: moreActionsOpen, unmountOnExit: true, children: /* @__PURE__ */ jsxs4(
1771
- Box4,
1297
+ isMobile && hasSecondaryActions && /* @__PURE__ */ jsx6(Collapse, { in: moreActionsOpen, unmountOnExit: true, children: /* @__PURE__ */ jsxs3(
1298
+ Box3,
1772
1299
  {
1773
1300
  sx: {
1774
1301
  display: "flex",
@@ -1789,7 +1316,7 @@ ${sanitize(
1789
1316
  ]
1790
1317
  }
1791
1318
  ),
1792
- /* @__PURE__ */ jsxs4(
1319
+ /* @__PURE__ */ jsxs3(
1793
1320
  Typography,
1794
1321
  {
1795
1322
  variant: "caption",
@@ -1815,8 +1342,8 @@ ${sanitize(
1815
1342
  ]
1816
1343
  }
1817
1344
  ),
1818
- isMemoryEnabled && /* @__PURE__ */ jsx7(memory_modal_default, { open: memoryOpen, onClose: () => setMemoryOpen(false) }),
1819
- isFeedbackEnabled && /* @__PURE__ */ jsx7(
1345
+ isMemoryEnabled && /* @__PURE__ */ jsx6(memory_modal_default, { open: memoryOpen, onClose: () => setMemoryOpen(false) }),
1346
+ isFeedbackEnabled && /* @__PURE__ */ jsx6(
1820
1347
  FeedbackModal,
1821
1348
  {
1822
1349
  open: feedbackModalOpen,
@@ -1829,7 +1356,7 @@ ${sanitize(
1829
1356
  var chat_input_default = ChatInput;
1830
1357
 
1831
1358
  // src/chat/hooks/useAIProvider.tsx
1832
- import { useCallback, useRef as useRef4 } from "react";
1359
+ import { useCallback, useRef as useRef3 } from "react";
1833
1360
 
1834
1361
  // src/chat/hooks/useMemoryEnhancer.tsx
1835
1362
  import { lastValueFrom, map as map2 } from "rxjs";
@@ -2356,9 +1883,9 @@ The user explicitly asked you to remember this. Respond with a short third-perso
2356
1883
  };
2357
1884
 
2358
1885
  // src/chat/hooks/useMoodEngine.tsx
2359
- import { useState as useState5 } from "react";
1886
+ import { useState as useState4 } from "react";
2360
1887
  var useMoodEngine = () => {
2361
- const [mood, setMood] = useState5("neutral");
1888
+ const [mood, setMood] = useState4("neutral");
2362
1889
  const analyzeMood = async (message) => {
2363
1890
  try {
2364
1891
  const detected = await detectMessageMood(message);
@@ -2802,21 +2329,21 @@ var useAIProvider = ({
2802
2329
  inputRef,
2803
2330
  onError
2804
2331
  }) => {
2805
- const currentSubRef = useRef4(null);
2806
- const lastPartialRef = useRef4({
2332
+ const currentSubRef = useRef3(null);
2333
+ const lastPartialRef = useRef3({
2807
2334
  text: "",
2808
2335
  images: [],
2809
2336
  usedDocs: [],
2810
2337
  question: ""
2811
2338
  });
2812
- const flushTimerRef = useRef4(null);
2339
+ const flushTimerRef = useRef3(null);
2813
2340
  const { provider } = useAIProviderStore.getState();
2814
2341
  const { preferences } = usePreferencesStore.getState();
2815
2342
  const { docs } = useKnowledgeStore.getState();
2816
2343
  const { analyzeMood, moodTokenBoost } = useMoodEngine();
2817
2344
  const { runMemoryScan } = useMemoryEnhancer();
2818
2345
  const { isVectorEnabled, searchMemories, searchDocuments, getUserMemories } = useVectorStore();
2819
- const pinnedVectorCacheRef = useRef4({
2346
+ const pinnedVectorCacheRef = useRef3({
2820
2347
  fetchedAt: 0,
2821
2348
  memories: []
2822
2349
  });
@@ -3619,7 +3146,7 @@ ${items.map((item, index) => {
3619
3146
  };
3620
3147
 
3621
3148
  // src/hooks/useAutoScroll.ts
3622
- import { useRef as useRef5, useEffect as useEffect5, useCallback as useCallback2 } from "react";
3149
+ import { useRef as useRef4, useEffect as useEffect4, useCallback as useCallback2 } from "react";
3623
3150
  var SCROLL_STATE_CHANGED_EVENT = "scrollStateChanged";
3624
3151
  var useAutoScroll = (options = {}) => {
3625
3152
  const {
@@ -3628,9 +3155,9 @@ var useAutoScroll = (options = {}) => {
3628
3155
  enabled = true,
3629
3156
  isMobile = false
3630
3157
  } = options;
3631
- const containerRef = useRef5(null);
3632
- const targetRef = useRef5(null);
3633
- const shouldAutoScrollRef = useRef5(true);
3158
+ const containerRef = useRef4(null);
3159
+ const targetRef = useRef4(null);
3160
+ const shouldAutoScrollRef = useRef4(true);
3634
3161
  const isNearBottom = useCallback2(() => {
3635
3162
  const container = containerRef.current;
3636
3163
  if (!container) return true;
@@ -3705,7 +3232,7 @@ var useAutoScroll = (options = {}) => {
3705
3232
  }
3706
3233
  }, [enabled, isNearBottom, scrollToBottom]);
3707
3234
  const containerElement = containerRef.current;
3708
- useEffect5(() => {
3235
+ useEffect4(() => {
3709
3236
  if (!containerElement) return;
3710
3237
  const handleScroll = () => {
3711
3238
  const currentlyNearBottom = isNearBottom();
@@ -3715,7 +3242,7 @@ var useAutoScroll = (options = {}) => {
3715
3242
  containerElement.addEventListener("scroll", handleScroll, { passive: true });
3716
3243
  return () => containerElement.removeEventListener("scroll", handleScroll);
3717
3244
  }, [containerElement, isNearBottom]);
3718
- useEffect5(() => {
3245
+ useEffect4(() => {
3719
3246
  autoScrollIfNeeded();
3720
3247
  });
3721
3248
  const getScrollState = useCallback2(() => {
@@ -3754,9 +3281,9 @@ var useAutoScroll = (options = {}) => {
3754
3281
  };
3755
3282
 
3756
3283
  // src/hooks/useNetworkStatus.ts
3757
- import { useState as useState6, useEffect as useEffect6, useCallback as useCallback3 } from "react";
3284
+ import { useState as useState5, useEffect as useEffect5, useCallback as useCallback3 } from "react";
3758
3285
  var useNetworkStatus = () => {
3759
- const [networkStatus, setNetworkStatus] = useState6({
3286
+ const [networkStatus, setNetworkStatus] = useState5({
3760
3287
  isOnline: navigator.onLine,
3761
3288
  isSlowConnection: false,
3762
3289
  connectionQuality: "fast",
@@ -3776,7 +3303,7 @@ var useNetworkStatus = () => {
3776
3303
  connectionQuality: !navigator.onLine ? "offline" : isSlowConnection ? "slow" : "fast"
3777
3304
  }));
3778
3305
  }, []);
3779
- useEffect6(() => {
3306
+ useEffect5(() => {
3780
3307
  const handleOnline = () => {
3781
3308
  setNetworkStatus((prev) => ({
3782
3309
  ...prev,
@@ -3798,7 +3325,7 @@ var useNetworkStatus = () => {
3798
3325
  window.removeEventListener("offline", handleOffline);
3799
3326
  };
3800
3327
  }, []);
3801
- useEffect6(() => {
3328
+ useEffect5(() => {
3802
3329
  const { connection } = navigator;
3803
3330
  if (connection) {
3804
3331
  const updateConnectionInfo = () => {
@@ -3835,15 +3362,15 @@ var useNetworkStatus = () => {
3835
3362
 
3836
3363
  // src/chat/chat-app-bar.tsx
3837
3364
  import { Avatar as Avatar8 } from "@mui/material";
3838
- import { useEffect as useEffect12, useRef as useRef11, useState as useState13 } from "react";
3365
+ import { useEffect as useEffect11, useRef as useRef10, useState as useState12 } from "react";
3839
3366
  import {
3840
- Box as Box11,
3841
- IconButton as IconButton10,
3367
+ Box as Box10,
3368
+ IconButton as IconButton9,
3842
3369
  Menu as Menu5,
3843
3370
  MenuItem as MenuItem5,
3844
- Tooltip as Tooltip5,
3371
+ Tooltip as Tooltip4,
3845
3372
  useMediaQuery as useMediaQuery5,
3846
- useTheme as useTheme12,
3373
+ useTheme as useTheme11,
3847
3374
  Dialog as Dialog5,
3848
3375
  DialogTitle as DialogTitle5,
3849
3376
  DialogContent as DialogContent5,
@@ -3864,13 +3391,13 @@ import ErrorOutlineIcon from "@mui/icons-material/ErrorOutline";
3864
3391
  import { useNavigate } from "react-router-dom";
3865
3392
 
3866
3393
  // src/chat/conversation-drawer.tsx
3867
- import { useState as useState11, useMemo as useMemo2, useEffect as useEffect10, useRef as useRef9, useCallback as useCallback4 } from "react";
3394
+ import { useState as useState10, useMemo, useEffect as useEffect9, useRef as useRef8, useCallback as useCallback4 } from "react";
3868
3395
  import {
3869
3396
  Drawer,
3870
- Box as Box9,
3397
+ Box as Box8,
3871
3398
  Typography as Typography6,
3872
- IconButton as IconButton8,
3873
- Tooltip as Tooltip4,
3399
+ IconButton as IconButton7,
3400
+ Tooltip as Tooltip3,
3874
3401
  TextField as TextField5,
3875
3402
  InputAdornment,
3876
3403
  useMediaQuery as useMediaQuery4,
@@ -3886,7 +3413,7 @@ import {
3886
3413
  DialogActions as DialogActions3,
3887
3414
  Button as Button4,
3888
3415
  Avatar as Avatar6,
3889
- alpha as alpha6
3416
+ alpha as alpha5
3890
3417
  } from "@mui/material";
3891
3418
  import {
3892
3419
  Close as CloseIcon5,
@@ -3898,18 +3425,18 @@ import {
3898
3425
  Inbox as InboxIcon3
3899
3426
  } from "@mui/icons-material";
3900
3427
  import { Add as AddIcon3 } from "@mui/icons-material";
3901
- import { useTheme as useTheme10 } from "@mui/material/styles";
3428
+ import { useTheme as useTheme9 } from "@mui/material/styles";
3902
3429
 
3903
3430
  // src/chat/project-management-modal.tsx
3904
- import { useState as useState7, useEffect as useEffect7, useRef as useRef6 } from "react";
3431
+ import { useState as useState6, useEffect as useEffect6, useRef as useRef5 } from "react";
3905
3432
  import {
3906
3433
  Modal,
3907
3434
  Button,
3908
3435
  TextField as TextField2,
3909
3436
  List,
3910
3437
  ListItem,
3911
- IconButton as IconButton5,
3912
- Box as Box5,
3438
+ IconButton as IconButton4,
3439
+ Box as Box4,
3913
3440
  Typography as Typography2,
3914
3441
  Avatar as Avatar3,
3915
3442
  Chip,
@@ -3929,8 +3456,8 @@ import {
3929
3456
  Close as CloseIcon3,
3930
3457
  ArrowBack as ArrowBackIcon
3931
3458
  } from "@mui/icons-material";
3932
- import { useTheme as useTheme6, alpha as alpha3 } from "@mui/material/styles";
3933
- import { Fragment as Fragment4, jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
3459
+ import { useTheme as useTheme5, alpha as alpha2 } from "@mui/material/styles";
3460
+ import { Fragment as Fragment4, jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
3934
3461
  var DEFAULT_COLORS = [
3935
3462
  "#2196F3",
3936
3463
  "#4CAF50",
@@ -3947,7 +3474,7 @@ var ProjectManagementModal = ({
3947
3474
  open,
3948
3475
  onClose
3949
3476
  }) => {
3950
- const theme = useTheme6();
3477
+ const theme = useTheme5();
3951
3478
  const isMobile = useMediaQuery2(theme.breakpoints.down("sm"));
3952
3479
  const {
3953
3480
  projects,
@@ -3959,24 +3486,24 @@ var ProjectManagementModal = ({
3959
3486
  hydrate
3960
3487
  } = useProjectStore();
3961
3488
  const { getConversationsByProject } = useConversationStore();
3962
- const [showCreateForm, setShowCreateForm] = useState7(false);
3963
- const [editingProject, setEditingProject] = useState7(null);
3964
- const [formData, setFormData] = useState7({
3489
+ const [showCreateForm, setShowCreateForm] = useState6(false);
3490
+ const [editingProject, setEditingProject] = useState6(null);
3491
+ const [formData, setFormData] = useState6({
3965
3492
  name: "",
3966
3493
  description: "",
3967
3494
  color: DEFAULT_COLORS[0]
3968
3495
  });
3969
- const [menuAnchor, setMenuAnchor] = useState7(null);
3970
- const [selectedProject, setSelectedProject] = useState7(null);
3971
- const [loading, setLoading] = useState7(false);
3972
- const [error, setError] = useState7(null);
3973
- const modalContainerRef = useRef6(null);
3974
- useEffect7(() => {
3496
+ const [menuAnchor, setMenuAnchor] = useState6(null);
3497
+ const [selectedProject, setSelectedProject] = useState6(null);
3498
+ const [loading, setLoading] = useState6(false);
3499
+ const [error, setError] = useState6(null);
3500
+ const modalContainerRef = useRef5(null);
3501
+ useEffect6(() => {
3975
3502
  if (open && !_hasHydrated) {
3976
3503
  hydrate();
3977
3504
  }
3978
3505
  }, [open, _hasHydrated, hydrate]);
3979
- useEffect7(() => {
3506
+ useEffect6(() => {
3980
3507
  if (!open) {
3981
3508
  setMenuAnchor(null);
3982
3509
  setSelectedProject(null);
@@ -4073,13 +3600,13 @@ var ProjectManagementModal = ({
4073
3600
  const chatPalette = theme.palette.chat ?? {};
4074
3601
  const overlayZIndex = (theme.zIndex?.modal ?? 1300) + 20;
4075
3602
  const surfaceColor = isMobile ? theme.palette.background.paper : chatPalette.shell ?? theme.palette.background.paper;
4076
- const borderColor = chatPalette.appBar?.border ?? alpha3(theme.palette.divider, 0.12);
4077
- const subtleSurface = theme.palette.mode === "dark" ? alpha3(theme.palette.common.white, 0.04) : alpha3(theme.palette.common.black, 0.03);
4078
- const hoverSurface = alpha3(theme.palette.primary.main, theme.palette.mode === "dark" ? 0.22 : 0.08);
3603
+ const borderColor = chatPalette.appBar?.border ?? alpha2(theme.palette.divider, 0.12);
3604
+ const subtleSurface = theme.palette.mode === "dark" ? alpha2(theme.palette.common.white, 0.04) : alpha2(theme.palette.common.black, 0.03);
3605
+ const hoverSurface = alpha2(theme.palette.primary.main, theme.palette.mode === "dark" ? 0.22 : 0.08);
4079
3606
  const headerTitle = showCreateForm ? editingProject ? "Edit Project" : "Create Project" : "Manage Projects";
4080
3607
  const headerSubtitle = showCreateForm ? "Name, describe, and color-code your project." : "Organize conversations into cohesive projects.";
4081
- const content = /* @__PURE__ */ jsxs5(
4082
- Box5,
3608
+ const content = /* @__PURE__ */ jsxs4(
3609
+ Box4,
4083
3610
  {
4084
3611
  ref: modalContainerRef,
4085
3612
  sx: {
@@ -4090,29 +3617,29 @@ var ProjectManagementModal = ({
4090
3617
  bgcolor: surfaceColor,
4091
3618
  borderRadius: isMobile ? "22px 22px 0 0" : 3,
4092
3619
  overflow: "hidden",
4093
- boxShadow: isMobile ? "none" : `0 20px 60px ${alpha3(theme.palette.common.black, 0.32)}`,
4094
- border: isMobile ? "none" : `1px solid ${alpha3(theme.palette.divider, 0.18)}`,
3620
+ boxShadow: isMobile ? "none" : `0 20px 60px ${alpha2(theme.palette.common.black, 0.32)}`,
3621
+ border: isMobile ? "none" : `1px solid ${alpha2(theme.palette.divider, 0.18)}`,
4095
3622
  display: "flex",
4096
3623
  flexDirection: "column",
4097
3624
  position: "relative"
4098
3625
  },
4099
3626
  children: [
4100
- isMobile && /* @__PURE__ */ jsx8(
4101
- Box5,
3627
+ isMobile && /* @__PURE__ */ jsx7(
3628
+ Box4,
4102
3629
  {
4103
3630
  sx: {
4104
3631
  width: 56,
4105
3632
  height: 6,
4106
3633
  borderRadius: 999,
4107
- bgcolor: alpha3(theme.palette.text.primary, 0.18),
3634
+ bgcolor: alpha2(theme.palette.text.primary, 0.18),
4108
3635
  alignSelf: "center",
4109
3636
  mt: 1.25,
4110
3637
  mb: 0.75
4111
3638
  }
4112
3639
  }
4113
3640
  ),
4114
- /* @__PURE__ */ jsxs5(
4115
- Box5,
3641
+ /* @__PURE__ */ jsxs4(
3642
+ Box4,
4116
3643
  {
4117
3644
  sx: {
4118
3645
  px: isMobile ? 1.5 : 2.75,
@@ -4124,8 +3651,8 @@ var ProjectManagementModal = ({
4124
3651
  gap: 1
4125
3652
  },
4126
3653
  children: [
4127
- /* @__PURE__ */ jsxs5(
4128
- Box5,
3654
+ /* @__PURE__ */ jsxs4(
3655
+ Box4,
4129
3656
  {
4130
3657
  sx: {
4131
3658
  display: "flex",
@@ -4134,8 +3661,8 @@ var ProjectManagementModal = ({
4134
3661
  gap: 1
4135
3662
  },
4136
3663
  children: [
4137
- /* @__PURE__ */ jsxs5(
4138
- Box5,
3664
+ /* @__PURE__ */ jsxs4(
3665
+ Box4,
4139
3666
  {
4140
3667
  sx: {
4141
3668
  display: "flex",
@@ -4145,8 +3672,8 @@ var ProjectManagementModal = ({
4145
3672
  flex: 1
4146
3673
  },
4147
3674
  children: [
4148
- showCreateForm && /* @__PURE__ */ jsx8(IconButton5, { onClick: resetForm, size: "small", sx: { mr: 0.5 }, children: /* @__PURE__ */ jsx8(ArrowBackIcon, { fontSize: "small" }) }),
4149
- /* @__PURE__ */ jsx8(
3675
+ showCreateForm && /* @__PURE__ */ jsx7(IconButton4, { onClick: resetForm, size: "small", sx: { mr: 0.5 }, children: /* @__PURE__ */ jsx7(ArrowBackIcon, { fontSize: "small" }) }),
3676
+ /* @__PURE__ */ jsx7(
4150
3677
  Typography2,
4151
3678
  {
4152
3679
  variant: "h6",
@@ -4163,16 +3690,16 @@ var ProjectManagementModal = ({
4163
3690
  ]
4164
3691
  }
4165
3692
  ),
4166
- /* @__PURE__ */ jsx8(IconButton5, { onClick: handleClose, size: "small", children: /* @__PURE__ */ jsx8(CloseIcon3, {}) })
3693
+ /* @__PURE__ */ jsx7(IconButton4, { onClick: handleClose, size: "small", children: /* @__PURE__ */ jsx7(CloseIcon3, {}) })
4167
3694
  ]
4168
3695
  }
4169
3696
  ),
4170
- /* @__PURE__ */ jsx8(Typography2, { variant: "body2", color: "text.secondary", children: headerSubtitle })
3697
+ /* @__PURE__ */ jsx7(Typography2, { variant: "body2", color: "text.secondary", children: headerSubtitle })
4171
3698
  ]
4172
3699
  }
4173
3700
  ),
4174
- /* @__PURE__ */ jsxs5(
4175
- Box5,
3701
+ /* @__PURE__ */ jsxs4(
3702
+ Box4,
4176
3703
  {
4177
3704
  sx: {
4178
3705
  flex: 1,
@@ -4184,9 +3711,9 @@ var ProjectManagementModal = ({
4184
3711
  gap: 2.5
4185
3712
  },
4186
3713
  children: [
4187
- error && /* @__PURE__ */ jsx8(Alert, { severity: "error", onClose: () => setError(null), children: error }),
4188
- showCreateForm ? /* @__PURE__ */ jsxs5(Box5, { sx: { display: "flex", flexDirection: "column", gap: 2 }, children: [
4189
- /* @__PURE__ */ jsx8(
3714
+ error && /* @__PURE__ */ jsx7(Alert, { severity: "error", onClose: () => setError(null), children: error }),
3715
+ showCreateForm ? /* @__PURE__ */ jsxs4(Box4, { sx: { display: "flex", flexDirection: "column", gap: 2 }, children: [
3716
+ /* @__PURE__ */ jsx7(
4190
3717
  TextField2,
4191
3718
  {
4192
3719
  label: "Project name",
@@ -4198,7 +3725,7 @@ var ProjectManagementModal = ({
4198
3725
  autoFocus: true
4199
3726
  }
4200
3727
  ),
4201
- /* @__PURE__ */ jsx8(
3728
+ /* @__PURE__ */ jsx7(
4202
3729
  TextField2,
4203
3730
  {
4204
3731
  label: "Description (optional)",
@@ -4210,10 +3737,10 @@ var ProjectManagementModal = ({
4210
3737
  disabled: loading
4211
3738
  }
4212
3739
  ),
4213
- /* @__PURE__ */ jsxs5(Box5, { children: [
4214
- /* @__PURE__ */ jsx8(Typography2, { variant: "subtitle2", sx: { mb: 1 }, children: "Color" }),
4215
- /* @__PURE__ */ jsx8(Box5, { sx: { display: "flex", flexWrap: "wrap", gap: 1 }, children: DEFAULT_COLORS.map((color) => /* @__PURE__ */ jsx8(
4216
- Box5,
3740
+ /* @__PURE__ */ jsxs4(Box4, { children: [
3741
+ /* @__PURE__ */ jsx7(Typography2, { variant: "subtitle2", sx: { mb: 1 }, children: "Color" }),
3742
+ /* @__PURE__ */ jsx7(Box4, { sx: { display: "flex", flexWrap: "wrap", gap: 1 }, children: DEFAULT_COLORS.map((color) => /* @__PURE__ */ jsx7(
3743
+ Box4,
4217
3744
  {
4218
3745
  sx: {
4219
3746
  width: 32,
@@ -4233,11 +3760,11 @@ var ProjectManagementModal = ({
4233
3760
  color
4234
3761
  )) })
4235
3762
  ] })
4236
- ] }) : /* @__PURE__ */ jsxs5(Box5, { sx: { display: "flex", flexDirection: "column", gap: 2 }, children: [
4237
- /* @__PURE__ */ jsx8(
3763
+ ] }) : /* @__PURE__ */ jsxs4(Box4, { sx: { display: "flex", flexDirection: "column", gap: 2 }, children: [
3764
+ /* @__PURE__ */ jsx7(
4238
3765
  Button,
4239
3766
  {
4240
- startIcon: /* @__PURE__ */ jsx8(AddIcon, {}),
3767
+ startIcon: /* @__PURE__ */ jsx7(AddIcon, {}),
4241
3768
  onClick: () => setShowCreateForm(true),
4242
3769
  variant: "contained",
4243
3770
  sx: {
@@ -4249,8 +3776,8 @@ var ProjectManagementModal = ({
4249
3776
  children: "Create project"
4250
3777
  }
4251
3778
  ),
4252
- projects.length === 0 ? /* @__PURE__ */ jsxs5(
4253
- Box5,
3779
+ projects.length === 0 ? /* @__PURE__ */ jsxs4(
3780
+ Box4,
4254
3781
  {
4255
3782
  sx: {
4256
3783
  textAlign: "center",
@@ -4258,19 +3785,19 @@ var ProjectManagementModal = ({
4258
3785
  px: 2,
4259
3786
  color: theme.palette.text.secondary,
4260
3787
  borderRadius: 2,
4261
- border: `1px dashed ${alpha3(theme.palette.divider, 0.4)}`,
3788
+ border: `1px dashed ${alpha2(theme.palette.divider, 0.4)}`,
4262
3789
  backgroundColor: subtleSurface
4263
3790
  },
4264
3791
  children: [
4265
- /* @__PURE__ */ jsx8(FolderIcon, { sx: { fontSize: 48, mb: 2, opacity: 0.5 } }),
4266
- /* @__PURE__ */ jsx8(Typography2, { variant: "body1", sx: { fontWeight: 600 }, children: "No projects yet" }),
4267
- /* @__PURE__ */ jsx8(Typography2, { variant: "body2", children: "Create your first project to organize conversations." })
3792
+ /* @__PURE__ */ jsx7(FolderIcon, { sx: { fontSize: 48, mb: 2, opacity: 0.5 } }),
3793
+ /* @__PURE__ */ jsx7(Typography2, { variant: "body1", sx: { fontWeight: 600 }, children: "No projects yet" }),
3794
+ /* @__PURE__ */ jsx7(Typography2, { variant: "body2", children: "Create your first project to organize conversations." })
4268
3795
  ]
4269
3796
  }
4270
- ) : /* @__PURE__ */ jsx8(List, { sx: { display: "flex", flexDirection: "column", gap: 1.25, py: 0 }, children: projects.map((project) => {
3797
+ ) : /* @__PURE__ */ jsx7(List, { sx: { display: "flex", flexDirection: "column", gap: 1.25, py: 0 }, children: projects.map((project) => {
4271
3798
  const conversationCount = getConversationsByProject(project.id).length;
4272
- return /* @__PURE__ */ jsx8(ListItem, { disablePadding: true, children: /* @__PURE__ */ jsxs5(
4273
- Box5,
3799
+ return /* @__PURE__ */ jsx7(ListItem, { disablePadding: true, children: /* @__PURE__ */ jsxs4(
3800
+ Box4,
4274
3801
  {
4275
3802
  sx: {
4276
3803
  display: "flex",
@@ -4288,7 +3815,7 @@ var ProjectManagementModal = ({
4288
3815
  }
4289
3816
  },
4290
3817
  children: [
4291
- /* @__PURE__ */ jsx8(
3818
+ /* @__PURE__ */ jsx7(
4292
3819
  Avatar3,
4293
3820
  {
4294
3821
  sx: {
@@ -4297,12 +3824,12 @@ var ProjectManagementModal = ({
4297
3824
  height: 36,
4298
3825
  fontSize: "1rem"
4299
3826
  },
4300
- children: /* @__PURE__ */ jsx8(FolderIcon, { fontSize: "small" })
3827
+ children: /* @__PURE__ */ jsx7(FolderIcon, { fontSize: "small" })
4301
3828
  }
4302
3829
  ),
4303
- /* @__PURE__ */ jsxs5(Box5, { sx: { flex: 1, minWidth: 0 }, children: [
4304
- /* @__PURE__ */ jsxs5(Box5, { sx: { display: "flex", alignItems: "center", gap: 1, flexWrap: "wrap" }, children: [
4305
- /* @__PURE__ */ jsx8(
3830
+ /* @__PURE__ */ jsxs4(Box4, { sx: { flex: 1, minWidth: 0 }, children: [
3831
+ /* @__PURE__ */ jsxs4(Box4, { sx: { display: "flex", alignItems: "center", gap: 1, flexWrap: "wrap" }, children: [
3832
+ /* @__PURE__ */ jsx7(
4306
3833
  Typography2,
4307
3834
  {
4308
3835
  variant: "subtitle1",
@@ -4310,7 +3837,7 @@ var ProjectManagementModal = ({
4310
3837
  children: project.name
4311
3838
  }
4312
3839
  ),
4313
- /* @__PURE__ */ jsx8(
3840
+ /* @__PURE__ */ jsx7(
4314
3841
  Chip,
4315
3842
  {
4316
3843
  label: `${conversationCount}`,
@@ -4319,13 +3846,13 @@ var ProjectManagementModal = ({
4319
3846
  height: 22,
4320
3847
  borderRadius: 999,
4321
3848
  fontWeight: 600,
4322
- bgcolor: alpha3(theme.palette.text.primary, 0.08),
3849
+ bgcolor: alpha2(theme.palette.text.primary, 0.08),
4323
3850
  color: theme.palette.text.primary
4324
3851
  }
4325
3852
  }
4326
3853
  )
4327
3854
  ] }),
4328
- project.description && /* @__PURE__ */ jsx8(
3855
+ project.description && /* @__PURE__ */ jsx7(
4329
3856
  Typography2,
4330
3857
  {
4331
3858
  variant: "body2",
@@ -4335,8 +3862,8 @@ var ProjectManagementModal = ({
4335
3862
  }
4336
3863
  )
4337
3864
  ] }),
4338
- /* @__PURE__ */ jsx8(
4339
- IconButton5,
3865
+ /* @__PURE__ */ jsx7(
3866
+ IconButton4,
4340
3867
  {
4341
3868
  onClick: (e) => {
4342
3869
  e.stopPropagation();
@@ -4348,7 +3875,7 @@ var ProjectManagementModal = ({
4348
3875
  mt: 0.25,
4349
3876
  zIndex: 1
4350
3877
  },
4351
- children: /* @__PURE__ */ jsx8(MoreVertIcon, { fontSize: "small" })
3878
+ children: /* @__PURE__ */ jsx7(MoreVertIcon, { fontSize: "small" })
4352
3879
  }
4353
3880
  )
4354
3881
  ]
@@ -4359,8 +3886,8 @@ var ProjectManagementModal = ({
4359
3886
  ]
4360
3887
  }
4361
3888
  ),
4362
- /* @__PURE__ */ jsx8(
4363
- Box5,
3889
+ /* @__PURE__ */ jsx7(
3890
+ Box4,
4364
3891
  {
4365
3892
  sx: {
4366
3893
  px: isMobile ? 1.5 : 2.75,
@@ -4370,8 +3897,8 @@ var ProjectManagementModal = ({
4370
3897
  justifyContent: "flex-end",
4371
3898
  gap: 1
4372
3899
  },
4373
- children: showCreateForm ? /* @__PURE__ */ jsxs5(Fragment4, { children: [
4374
- /* @__PURE__ */ jsx8(
3900
+ children: showCreateForm ? /* @__PURE__ */ jsxs4(Fragment4, { children: [
3901
+ /* @__PURE__ */ jsx7(
4375
3902
  Button,
4376
3903
  {
4377
3904
  onClick: resetForm,
@@ -4380,21 +3907,21 @@ var ProjectManagementModal = ({
4380
3907
  children: "Cancel"
4381
3908
  }
4382
3909
  ),
4383
- /* @__PURE__ */ jsx8(
3910
+ /* @__PURE__ */ jsx7(
4384
3911
  Button,
4385
3912
  {
4386
3913
  onClick: editingProject ? handleEditProject : handleCreateProject,
4387
3914
  variant: "contained",
4388
3915
  disabled: loading,
4389
- startIcon: loading ? /* @__PURE__ */ jsx8(CircularProgress3, { size: 16 }) : void 0,
3916
+ startIcon: loading ? /* @__PURE__ */ jsx7(CircularProgress3, { size: 16 }) : void 0,
4390
3917
  sx: { textTransform: "none", borderRadius: 2 },
4391
3918
  children: editingProject ? "Update project" : "Create project"
4392
3919
  }
4393
3920
  )
4394
- ] }) : /* @__PURE__ */ jsx8(Button, { onClick: handleClose, sx: { textTransform: "none", borderRadius: 2 }, children: "Close" })
3921
+ ] }) : /* @__PURE__ */ jsx7(Button, { onClick: handleClose, sx: { textTransform: "none", borderRadius: 2 }, children: "Close" })
4395
3922
  }
4396
3923
  ),
4397
- /* @__PURE__ */ jsxs5(
3924
+ /* @__PURE__ */ jsxs4(
4398
3925
  Menu,
4399
3926
  {
4400
3927
  anchorEl: menuAnchor,
@@ -4416,20 +3943,20 @@ var ProjectManagementModal = ({
4416
3943
  }
4417
3944
  },
4418
3945
  children: [
4419
- /* @__PURE__ */ jsx8(
3946
+ /* @__PURE__ */ jsx7(
4420
3947
  MenuItem,
4421
3948
  {
4422
3949
  onClick: () => {
4423
3950
  if (!selectedProject) return;
4424
3951
  startEdit(selectedProject);
4425
3952
  },
4426
- children: /* @__PURE__ */ jsxs5(Box5, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
4427
- /* @__PURE__ */ jsx8(EditIcon, { fontSize: "small" }),
4428
- /* @__PURE__ */ jsx8(Typography2, { variant: "body2", color: "inherit", children: "Edit" })
3953
+ children: /* @__PURE__ */ jsxs4(Box4, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
3954
+ /* @__PURE__ */ jsx7(EditIcon, { fontSize: "small" }),
3955
+ /* @__PURE__ */ jsx7(Typography2, { variant: "body2", color: "inherit", children: "Edit" })
4429
3956
  ] })
4430
3957
  }
4431
3958
  ),
4432
- /* @__PURE__ */ jsx8(
3959
+ /* @__PURE__ */ jsx7(
4433
3960
  MenuItem,
4434
3961
  {
4435
3962
  onClick: () => {
@@ -4437,9 +3964,9 @@ var ProjectManagementModal = ({
4437
3964
  handleDeleteProject(selectedProject);
4438
3965
  },
4439
3966
  sx: { color: theme.palette.error.main },
4440
- children: /* @__PURE__ */ jsxs5(Box5, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
4441
- /* @__PURE__ */ jsx8(DeleteIcon, { fontSize: "small" }),
4442
- /* @__PURE__ */ jsx8(Typography2, { variant: "body2", color: "inherit", children: "Delete" })
3967
+ children: /* @__PURE__ */ jsxs4(Box4, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
3968
+ /* @__PURE__ */ jsx7(DeleteIcon, { fontSize: "small" }),
3969
+ /* @__PURE__ */ jsx7(Typography2, { variant: "body2", color: "inherit", children: "Delete" })
4443
3970
  ] })
4444
3971
  }
4445
3972
  )
@@ -4449,7 +3976,7 @@ var ProjectManagementModal = ({
4449
3976
  ]
4450
3977
  }
4451
3978
  );
4452
- return /* @__PURE__ */ jsx8(Fragment4, { children: isMobile ? /* @__PURE__ */ jsx8(
3979
+ return /* @__PURE__ */ jsx7(Fragment4, { children: isMobile ? /* @__PURE__ */ jsx7(
4453
3980
  SwipeableDrawer,
4454
3981
  {
4455
3982
  anchor: "bottom",
@@ -4469,7 +3996,7 @@ var ProjectManagementModal = ({
4469
3996
  },
4470
3997
  children: content
4471
3998
  }
4472
- ) : /* @__PURE__ */ jsx8(
3999
+ ) : /* @__PURE__ */ jsx7(
4473
4000
  Modal,
4474
4001
  {
4475
4002
  open,
@@ -4488,7 +4015,7 @@ var ProjectManagementModal = ({
4488
4015
  var project_management_modal_default = ProjectManagementModal;
4489
4016
 
4490
4017
  // src/chat/move-conversation-modal.tsx
4491
- import { useState as useState8, useEffect as useEffect8 } from "react";
4018
+ import { useState as useState7, useEffect as useEffect7 } from "react";
4492
4019
  import {
4493
4020
  Dialog,
4494
4021
  DialogTitle,
@@ -4503,33 +4030,33 @@ import {
4503
4030
  Typography as Typography3,
4504
4031
  Avatar as Avatar4,
4505
4032
  Radio,
4506
- Box as Box6,
4033
+ Box as Box5,
4507
4034
  Divider
4508
4035
  } from "@mui/material";
4509
4036
  import {
4510
4037
  Folder as FolderIcon2,
4511
4038
  Inbox as InboxIcon
4512
4039
  } from "@mui/icons-material";
4513
- import { useTheme as useTheme7 } from "@mui/material/styles";
4514
- import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
4040
+ import { useTheme as useTheme6 } from "@mui/material/styles";
4041
+ import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
4515
4042
  var MoveConversationModal = ({
4516
4043
  open,
4517
4044
  onClose,
4518
4045
  conversations,
4519
4046
  currentProjectId = null
4520
4047
  }) => {
4521
- const theme = useTheme7();
4048
+ const theme = useTheme6();
4522
4049
  const { projects, _hasHydrated, hydrate } = useProjectStore();
4523
4050
  const { moveConversationToProject } = useConversationStore();
4524
- const [selectedProjectId, setSelectedProjectId] = useState8(
4051
+ const [selectedProjectId, setSelectedProjectId] = useState7(
4525
4052
  currentProjectId
4526
4053
  );
4527
- useEffect8(() => {
4054
+ useEffect7(() => {
4528
4055
  if (open && !_hasHydrated) {
4529
4056
  hydrate();
4530
4057
  }
4531
4058
  }, [open, _hasHydrated, hydrate]);
4532
- useEffect8(() => {
4059
+ useEffect7(() => {
4533
4060
  setSelectedProjectId(currentProjectId);
4534
4061
  }, [currentProjectId, open]);
4535
4062
  const handleMove = async () => {
@@ -4548,7 +4075,7 @@ var MoveConversationModal = ({
4548
4075
  };
4549
4076
  const conversationCount = conversations.length;
4550
4077
  const isMultiple = conversationCount > 1;
4551
- return /* @__PURE__ */ jsxs6(
4078
+ return /* @__PURE__ */ jsxs5(
4552
4079
  Dialog,
4553
4080
  {
4554
4081
  open,
@@ -4562,20 +4089,20 @@ var MoveConversationModal = ({
4562
4089
  }
4563
4090
  },
4564
4091
  children: [
4565
- /* @__PURE__ */ jsxs6(DialogTitle, { children: [
4092
+ /* @__PURE__ */ jsxs5(DialogTitle, { children: [
4566
4093
  "Move ",
4567
4094
  isMultiple ? `${conversationCount} Conversations` : "Conversation"
4568
4095
  ] }),
4569
- /* @__PURE__ */ jsxs6(DialogContent, { sx: { px: 3 }, children: [
4570
- /* @__PURE__ */ jsx9(Typography3, { variant: "body2", color: "text.secondary", sx: { mb: 2 }, children: isMultiple ? `Select a project to move ${conversationCount} conversations to:` : `Select a project to move "${conversations[0]?.name}" to:` }),
4571
- /* @__PURE__ */ jsxs6(List2, { children: [
4572
- /* @__PURE__ */ jsx9(ListItem2, { disablePadding: true, children: /* @__PURE__ */ jsxs6(
4096
+ /* @__PURE__ */ jsxs5(DialogContent, { sx: { px: 3 }, children: [
4097
+ /* @__PURE__ */ jsx8(Typography3, { variant: "body2", color: "text.secondary", sx: { mb: 2 }, children: isMultiple ? `Select a project to move ${conversationCount} conversations to:` : `Select a project to move "${conversations[0]?.name}" to:` }),
4098
+ /* @__PURE__ */ jsxs5(List2, { children: [
4099
+ /* @__PURE__ */ jsx8(ListItem2, { disablePadding: true, children: /* @__PURE__ */ jsxs5(
4573
4100
  ListItemButton,
4574
4101
  {
4575
4102
  onClick: () => setSelectedProjectId(null),
4576
4103
  selected: selectedProjectId === null,
4577
4104
  children: [
4578
- /* @__PURE__ */ jsx9(ListItemIcon, { children: /* @__PURE__ */ jsx9(
4105
+ /* @__PURE__ */ jsx8(ListItemIcon, { children: /* @__PURE__ */ jsx8(
4579
4106
  Radio,
4580
4107
  {
4581
4108
  checked: selectedProjectId === null,
@@ -4583,7 +4110,7 @@ var MoveConversationModal = ({
4583
4110
  size: "small"
4584
4111
  }
4585
4112
  ) }),
4586
- /* @__PURE__ */ jsx9(ListItemIcon, { children: /* @__PURE__ */ jsx9(
4113
+ /* @__PURE__ */ jsx8(ListItemIcon, { children: /* @__PURE__ */ jsx8(
4587
4114
  Avatar4,
4588
4115
  {
4589
4116
  sx: {
@@ -4591,10 +4118,10 @@ var MoveConversationModal = ({
4591
4118
  width: 32,
4592
4119
  height: 32
4593
4120
  },
4594
- children: /* @__PURE__ */ jsx9(InboxIcon, {})
4121
+ children: /* @__PURE__ */ jsx8(InboxIcon, {})
4595
4122
  }
4596
4123
  ) }),
4597
- /* @__PURE__ */ jsx9(
4124
+ /* @__PURE__ */ jsx8(
4598
4125
  ListItemText,
4599
4126
  {
4600
4127
  primary: "No Project",
@@ -4604,14 +4131,14 @@ var MoveConversationModal = ({
4604
4131
  ]
4605
4132
  }
4606
4133
  ) }),
4607
- /* @__PURE__ */ jsx9(Divider, { sx: { my: 1 } }),
4608
- projects.map((project) => /* @__PURE__ */ jsx9(ListItem2, { disablePadding: true, children: /* @__PURE__ */ jsxs6(
4134
+ /* @__PURE__ */ jsx8(Divider, { sx: { my: 1 } }),
4135
+ projects.map((project) => /* @__PURE__ */ jsx8(ListItem2, { disablePadding: true, children: /* @__PURE__ */ jsxs5(
4609
4136
  ListItemButton,
4610
4137
  {
4611
4138
  onClick: () => setSelectedProjectId(project.id),
4612
4139
  selected: selectedProjectId === project.id,
4613
4140
  children: [
4614
- /* @__PURE__ */ jsx9(ListItemIcon, { children: /* @__PURE__ */ jsx9(
4141
+ /* @__PURE__ */ jsx8(ListItemIcon, { children: /* @__PURE__ */ jsx8(
4615
4142
  Radio,
4616
4143
  {
4617
4144
  checked: selectedProjectId === project.id,
@@ -4619,7 +4146,7 @@ var MoveConversationModal = ({
4619
4146
  size: "small"
4620
4147
  }
4621
4148
  ) }),
4622
- /* @__PURE__ */ jsx9(ListItemIcon, { children: /* @__PURE__ */ jsx9(
4149
+ /* @__PURE__ */ jsx8(ListItemIcon, { children: /* @__PURE__ */ jsx8(
4623
4150
  Avatar4,
4624
4151
  {
4625
4152
  sx: {
@@ -4627,10 +4154,10 @@ var MoveConversationModal = ({
4627
4154
  width: 32,
4628
4155
  height: 32
4629
4156
  },
4630
- children: /* @__PURE__ */ jsx9(FolderIcon2, {})
4157
+ children: /* @__PURE__ */ jsx8(FolderIcon2, {})
4631
4158
  }
4632
4159
  ) }),
4633
- /* @__PURE__ */ jsx9(
4160
+ /* @__PURE__ */ jsx8(
4634
4161
  ListItemText,
4635
4162
  {
4636
4163
  primary: project.name,
@@ -4640,16 +4167,16 @@ var MoveConversationModal = ({
4640
4167
  ]
4641
4168
  }
4642
4169
  ) }, project.id)),
4643
- projects.length === 0 && /* @__PURE__ */ jsx9(Box6, { sx: {
4170
+ projects.length === 0 && /* @__PURE__ */ jsx8(Box5, { sx: {
4644
4171
  textAlign: "center",
4645
4172
  py: 2,
4646
4173
  color: theme.palette.text.secondary
4647
- }, children: /* @__PURE__ */ jsx9(Typography3, { variant: "body2", children: "No projects available. Create a project first to organize conversations." }) })
4174
+ }, children: /* @__PURE__ */ jsx8(Typography3, { variant: "body2", children: "No projects available. Create a project first to organize conversations." }) })
4648
4175
  ] })
4649
4176
  ] }),
4650
- /* @__PURE__ */ jsxs6(DialogActions, { sx: { px: 3, pb: 2 }, children: [
4651
- /* @__PURE__ */ jsx9(Button2, { onClick: onClose, children: "Cancel" }),
4652
- /* @__PURE__ */ jsxs6(
4177
+ /* @__PURE__ */ jsxs5(DialogActions, { sx: { px: 3, pb: 2 }, children: [
4178
+ /* @__PURE__ */ jsx8(Button2, { onClick: onClose, children: "Cancel" }),
4179
+ /* @__PURE__ */ jsxs5(
4653
4180
  Button2,
4654
4181
  {
4655
4182
  onClick: handleMove,
@@ -4669,11 +4196,11 @@ var MoveConversationModal = ({
4669
4196
  var move_conversation_modal_default = MoveConversationModal;
4670
4197
 
4671
4198
  // src/chat/simple-conversation-item.tsx
4672
- import { useState as useState9, useRef as useRef7, useEffect as useEffect9 } from "react";
4199
+ import { useState as useState8, useRef as useRef6, useEffect as useEffect8 } from "react";
4673
4200
  import {
4674
- Box as Box7,
4201
+ Box as Box6,
4675
4202
  Typography as Typography4,
4676
- IconButton as IconButton6,
4203
+ IconButton as IconButton5,
4677
4204
  Menu as Menu2,
4678
4205
  MenuItem as MenuItem2,
4679
4206
  ListItemIcon as ListItemIcon2,
@@ -4693,8 +4220,8 @@ import {
4693
4220
  DragIndicator as DragIcon,
4694
4221
  MoveToInbox as MoveIcon
4695
4222
  } from "@mui/icons-material";
4696
- import { useTheme as useTheme8, alpha as alpha4 } from "@mui/material/styles";
4697
- import { Fragment as Fragment5, jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
4223
+ import { useTheme as useTheme7, alpha as alpha3 } from "@mui/material/styles";
4224
+ import { Fragment as Fragment5, jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
4698
4225
  var SimpleConversationItem = ({
4699
4226
  conversation,
4700
4227
  isSelected,
@@ -4710,18 +4237,18 @@ var SimpleConversationItem = ({
4710
4237
  onTouchDragEnd,
4711
4238
  isTouchDragActive
4712
4239
  }) => {
4713
- const theme = useTheme8();
4240
+ const theme = useTheme7();
4714
4241
  const isMobile = useMediaQuery3(theme.breakpoints.down("sm"));
4715
- const [anchorEl, setAnchorEl] = useState9(null);
4716
- const [isEditing, setIsEditing] = useState9(false);
4717
- const [editName, setEditName] = useState9(conversation.name);
4718
- const [isDragging, setIsDragging] = useState9(false);
4719
- const [isTouchDragging, setIsTouchDragging] = useState9(false);
4720
- const [showRenameDialog, setShowRenameDialog] = useState9(false);
4721
- const longPressTimeoutRef = useRef7(null);
4722
- const touchStartPointRef = useRef7(null);
4723
- const activeTouchIdRef = useRef7(null);
4724
- const suppressClickRef = useRef7(false);
4242
+ const [anchorEl, setAnchorEl] = useState8(null);
4243
+ const [isEditing, setIsEditing] = useState8(false);
4244
+ const [editName, setEditName] = useState8(conversation.name);
4245
+ const [isDragging, setIsDragging] = useState8(false);
4246
+ const [isTouchDragging, setIsTouchDragging] = useState8(false);
4247
+ const [showRenameDialog, setShowRenameDialog] = useState8(false);
4248
+ const longPressTimeoutRef = useRef6(null);
4249
+ const touchStartPointRef = useRef6(null);
4250
+ const activeTouchIdRef = useRef6(null);
4251
+ const suppressClickRef = useRef6(false);
4725
4252
  const highlightText = (text, query) => {
4726
4253
  if (!query || !query.trim()) {
4727
4254
  return text;
@@ -4729,12 +4256,12 @@ var SimpleConversationItem = ({
4729
4256
  const regex = new RegExp(`(${query.trim()})`, "gi");
4730
4257
  const parts = text.split(regex);
4731
4258
  return parts.map(
4732
- (part, index) => regex.test(part) ? /* @__PURE__ */ jsx10(
4733
- Box7,
4259
+ (part, index) => regex.test(part) ? /* @__PURE__ */ jsx9(
4260
+ Box6,
4734
4261
  {
4735
4262
  component: "span",
4736
4263
  sx: {
4737
- bgcolor: alpha4(theme.palette.warning.main, 0.3),
4264
+ bgcolor: alpha3(theme.palette.warning.main, 0.3),
4738
4265
  color: theme.palette.text.primary,
4739
4266
  fontWeight: 600,
4740
4267
  borderRadius: 0.5,
@@ -4860,14 +4387,14 @@ var SimpleConversationItem = ({
4860
4387
  if (!isMobile) return;
4861
4388
  finalizeTouchDrag();
4862
4389
  };
4863
- useEffect9(() => {
4390
+ useEffect8(() => {
4864
4391
  if (!isTouchDragActive && isTouchDragging) {
4865
4392
  setIsTouchDragging(false);
4866
4393
  }
4867
4394
  }, [isTouchDragActive, isTouchDragging]);
4868
- return /* @__PURE__ */ jsxs7(Fragment5, { children: [
4869
- /* @__PURE__ */ jsxs7(
4870
- Box7,
4395
+ return /* @__PURE__ */ jsxs6(Fragment5, { children: [
4396
+ /* @__PURE__ */ jsxs6(
4397
+ Box6,
4871
4398
  {
4872
4399
  "data-project-id": conversation.projectId ?? "__ungrouped",
4873
4400
  draggable: !isMobile && !isEditing,
@@ -4894,17 +4421,17 @@ var SimpleConversationItem = ({
4894
4421
  mx: 1,
4895
4422
  borderRadius: 1,
4896
4423
  cursor: isEditing || isTouchDragging ? "default" : "pointer",
4897
- bgcolor: isSelected ? alpha4(projectColor || theme.palette.primary.main, 0.15) : "transparent",
4898
- border: isSelected ? `1px solid ${alpha4(projectColor || theme.palette.primary.main, 0.3)}` : "1px solid transparent",
4424
+ bgcolor: isSelected ? alpha3(projectColor || theme.palette.primary.main, 0.15) : "transparent",
4425
+ border: isSelected ? `1px solid ${alpha3(projectColor || theme.palette.primary.main, 0.3)}` : "1px solid transparent",
4899
4426
  opacity: isDragging || isTouchDragActive ? 0.55 : 1,
4900
4427
  transition: "all 0.2s ease",
4901
4428
  transform: isTouchDragActive ? "scale(0.98)" : "none",
4902
- boxShadow: isTouchDragActive ? `0 12px 24px ${alpha4(theme.palette.common.black, 0.25)}` : void 0,
4429
+ boxShadow: isTouchDragActive ? `0 12px 24px ${alpha3(theme.palette.common.black, 0.25)}` : void 0,
4903
4430
  touchAction: isTouchDragActive ? "none" : void 0,
4904
4431
  userSelect: isTouchDragging || isTouchDragActive ? "none" : void 0,
4905
4432
  WebkitUserSelect: isTouchDragging || isTouchDragActive ? "none" : void 0,
4906
4433
  "&:hover": !isEditing && !isTouchDragging ? {
4907
- bgcolor: alpha4(theme.palette.text.primary, 0.04)
4434
+ bgcolor: alpha3(theme.palette.text.primary, 0.04)
4908
4435
  } : {},
4909
4436
  // Better touch handling on mobile
4910
4437
  ...isMobile && {
@@ -4914,12 +4441,12 @@ var SimpleConversationItem = ({
4914
4441
  WebkitUserSelect: "none",
4915
4442
  WebkitTouchCallout: "none",
4916
4443
  "&:active": {
4917
- bgcolor: alpha4(theme.palette.text.primary, 0.08)
4444
+ bgcolor: alpha3(theme.palette.text.primary, 0.08)
4918
4445
  }
4919
4446
  }
4920
4447
  },
4921
4448
  children: [
4922
- !isMobile && !isEditing && /* @__PURE__ */ jsx10(
4449
+ !isMobile && !isEditing && /* @__PURE__ */ jsx9(
4923
4450
  DragIcon,
4924
4451
  {
4925
4452
  sx: {
@@ -4933,8 +4460,8 @@ var SimpleConversationItem = ({
4933
4460
  }
4934
4461
  }
4935
4462
  ),
4936
- /* @__PURE__ */ jsxs7(Box7, { sx: { flex: 1, minWidth: 0 }, children: [
4937
- isEditing ? /* @__PURE__ */ jsx10(
4463
+ /* @__PURE__ */ jsxs6(Box6, { sx: { flex: 1, minWidth: 0 }, children: [
4464
+ isEditing ? /* @__PURE__ */ jsx9(
4938
4465
  TextField3,
4939
4466
  {
4940
4467
  value: editName,
@@ -4957,7 +4484,7 @@ var SimpleConversationItem = ({
4957
4484
  }
4958
4485
  }
4959
4486
  }
4960
- ) : /* @__PURE__ */ jsx10(
4487
+ ) : /* @__PURE__ */ jsx9(
4961
4488
  Typography4,
4962
4489
  {
4963
4490
  variant: "body2",
@@ -4972,7 +4499,7 @@ var SimpleConversationItem = ({
4972
4499
  children: highlightText(conversation.name, searchQuery)
4973
4500
  }
4974
4501
  ),
4975
- !isEditing && snippet && /* @__PURE__ */ jsx10(
4502
+ !isEditing && snippet && /* @__PURE__ */ jsx9(
4976
4503
  Typography4,
4977
4504
  {
4978
4505
  variant: "caption",
@@ -4981,7 +4508,7 @@ var SimpleConversationItem = ({
4981
4508
  WebkitLineClamp: 2,
4982
4509
  WebkitBoxOrient: "vertical",
4983
4510
  overflow: "hidden",
4984
- color: alpha4(theme.palette.text.secondary, 0.9),
4511
+ color: alpha3(theme.palette.text.secondary, 0.9),
4985
4512
  mt: 0.25,
4986
4513
  lineHeight: 1.3,
4987
4514
  fontSize: "0.72rem"
@@ -4991,8 +4518,8 @@ var SimpleConversationItem = ({
4991
4518
  }
4992
4519
  )
4993
4520
  ] }),
4994
- !isEditing && /* @__PURE__ */ jsx10(
4995
- IconButton6,
4521
+ !isEditing && /* @__PURE__ */ jsx9(
4522
+ IconButton5,
4996
4523
  {
4997
4524
  onClick: handleMenuOpen,
4998
4525
  size: "small",
@@ -5020,10 +4547,10 @@ var SimpleConversationItem = ({
5020
4547
  }
5021
4548
  }
5022
4549
  },
5023
- children: /* @__PURE__ */ jsx10(MoreVertIcon2, { fontSize: "small" })
4550
+ children: /* @__PURE__ */ jsx9(MoreVertIcon2, { fontSize: "small" })
5024
4551
  }
5025
4552
  ),
5026
- /* @__PURE__ */ jsxs7(
4553
+ /* @__PURE__ */ jsxs6(
5027
4554
  Menu2,
5028
4555
  {
5029
4556
  anchorEl,
@@ -5050,17 +4577,17 @@ var SimpleConversationItem = ({
5050
4577
  }
5051
4578
  },
5052
4579
  children: [
5053
- onRename && /* @__PURE__ */ jsxs7(MenuItem2, { onClick: handleEdit, children: [
5054
- /* @__PURE__ */ jsx10(ListItemIcon2, { children: /* @__PURE__ */ jsx10(EditIcon2, { fontSize: "small" }) }),
5055
- /* @__PURE__ */ jsx10(ListItemText2, { children: "Rename" })
4580
+ onRename && /* @__PURE__ */ jsxs6(MenuItem2, { onClick: handleEdit, children: [
4581
+ /* @__PURE__ */ jsx9(ListItemIcon2, { children: /* @__PURE__ */ jsx9(EditIcon2, { fontSize: "small" }) }),
4582
+ /* @__PURE__ */ jsx9(ListItemText2, { children: "Rename" })
5056
4583
  ] }),
5057
- onMove && /* @__PURE__ */ jsxs7(MenuItem2, { onClick: handleMove, children: [
5058
- /* @__PURE__ */ jsx10(ListItemIcon2, { children: /* @__PURE__ */ jsx10(MoveIcon, { fontSize: "small" }) }),
5059
- /* @__PURE__ */ jsx10(ListItemText2, { children: "Move to Project" })
4584
+ onMove && /* @__PURE__ */ jsxs6(MenuItem2, { onClick: handleMove, children: [
4585
+ /* @__PURE__ */ jsx9(ListItemIcon2, { children: /* @__PURE__ */ jsx9(MoveIcon, { fontSize: "small" }) }),
4586
+ /* @__PURE__ */ jsx9(ListItemText2, { children: "Move to Project" })
5060
4587
  ] }),
5061
- /* @__PURE__ */ jsxs7(MenuItem2, { onClick: handleDelete, children: [
5062
- /* @__PURE__ */ jsx10(ListItemIcon2, { children: /* @__PURE__ */ jsx10(DeleteIcon2, { fontSize: "small" }) }),
5063
- /* @__PURE__ */ jsx10(ListItemText2, { children: "Delete" })
4588
+ /* @__PURE__ */ jsxs6(MenuItem2, { onClick: handleDelete, children: [
4589
+ /* @__PURE__ */ jsx9(ListItemIcon2, { children: /* @__PURE__ */ jsx9(DeleteIcon2, { fontSize: "small" }) }),
4590
+ /* @__PURE__ */ jsx9(ListItemText2, { children: "Delete" })
5064
4591
  ] })
5065
4592
  ]
5066
4593
  }
@@ -5068,7 +4595,7 @@ var SimpleConversationItem = ({
5068
4595
  ]
5069
4596
  }
5070
4597
  ),
5071
- isMobile && /* @__PURE__ */ jsxs7(
4598
+ isMobile && /* @__PURE__ */ jsxs6(
5072
4599
  Dialog2,
5073
4600
  {
5074
4601
  open: showRenameDialog,
@@ -5084,8 +4611,8 @@ var SimpleConversationItem = ({
5084
4611
  }
5085
4612
  },
5086
4613
  children: [
5087
- /* @__PURE__ */ jsx10(DialogTitle2, { sx: { pb: 1 }, children: "Rename Conversation" }),
5088
- /* @__PURE__ */ jsx10(DialogContent2, { children: /* @__PURE__ */ jsx10(
4614
+ /* @__PURE__ */ jsx9(DialogTitle2, { sx: { pb: 1 }, children: "Rename Conversation" }),
4615
+ /* @__PURE__ */ jsx9(DialogContent2, { children: /* @__PURE__ */ jsx9(
5089
4616
  TextField3,
5090
4617
  {
5091
4618
  value: editName,
@@ -5098,8 +4625,8 @@ var SimpleConversationItem = ({
5098
4625
  }
5099
4626
  }
5100
4627
  ) }),
5101
- /* @__PURE__ */ jsxs7(DialogActions2, { sx: { px: 3, pb: 2 }, children: [
5102
- /* @__PURE__ */ jsx10(
4628
+ /* @__PURE__ */ jsxs6(DialogActions2, { sx: { px: 3, pb: 2 }, children: [
4629
+ /* @__PURE__ */ jsx9(
5103
4630
  Button3,
5104
4631
  {
5105
4632
  onClick: () => {
@@ -5109,7 +4636,7 @@ var SimpleConversationItem = ({
5109
4636
  children: "Cancel"
5110
4637
  }
5111
4638
  ),
5112
- /* @__PURE__ */ jsx10(
4639
+ /* @__PURE__ */ jsx9(
5113
4640
  Button3,
5114
4641
  {
5115
4642
  onClick: () => {
@@ -5130,16 +4657,16 @@ var SimpleConversationItem = ({
5130
4657
  var simple_conversation_item_default = SimpleConversationItem;
5131
4658
 
5132
4659
  // src/chat/project-header.tsx
5133
- import { useRef as useRef8, useState as useState10 } from "react";
4660
+ import { useRef as useRef7, useState as useState9 } from "react";
5134
4661
  import {
5135
- Box as Box8,
4662
+ Box as Box7,
5136
4663
  Typography as Typography5,
5137
- IconButton as IconButton7,
4664
+ IconButton as IconButton6,
5138
4665
  Avatar as Avatar5,
5139
4666
  Chip as Chip2,
5140
- Tooltip as Tooltip3,
4667
+ Tooltip as Tooltip2,
5141
4668
  TextField as TextField4,
5142
- alpha as alpha5
4669
+ alpha as alpha4
5143
4670
  } from "@mui/material";
5144
4671
  import {
5145
4672
  ExpandMore as ExpandMoreIcon2,
@@ -5149,10 +4676,10 @@ import {
5149
4676
  FolderOpen as FolderOpenIcon,
5150
4677
  Inbox as InboxIcon2,
5151
4678
  Close as CloseIcon4,
5152
- Check as CheckIcon3
4679
+ Check as CheckIcon2
5153
4680
  } from "@mui/icons-material";
5154
- import { useTheme as useTheme9 } from "@mui/material/styles";
5155
- import { jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
4681
+ import { useTheme as useTheme8 } from "@mui/material/styles";
4682
+ import { jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
5156
4683
  var ProjectHeader = ({
5157
4684
  projectId,
5158
4685
  projectName,
@@ -5166,13 +4693,13 @@ var ProjectHeader = ({
5166
4693
  onRenameCancelDelete,
5167
4694
  isTouchTarget
5168
4695
  }) => {
5169
- const theme = useTheme9();
4696
+ const theme = useTheme8();
5170
4697
  const { createNewConversation } = useConversationStore();
5171
4698
  const { renameProject } = useProjectStore();
5172
- const [isHovered, setIsHovered] = useState10(false);
5173
- const [isDragOver, setIsDragOver] = useState10(false);
5174
- const [renameDraft, setRenameDraft] = useState10(projectName);
5175
- const renameActionRef = useRef8("none");
4699
+ const [isHovered, setIsHovered] = useState9(false);
4700
+ const [isDragOver, setIsDragOver] = useState9(false);
4701
+ const [renameDraft, setRenameDraft] = useState9(projectName);
4702
+ const renameActionRef = useRef7("none");
5176
4703
  const isUngrouped = projectId === null;
5177
4704
  const Icon = isCollapsed ? FolderIcon3 : FolderOpenIcon;
5178
4705
  const handleAddConversation = (e) => {
@@ -5218,8 +4745,8 @@ var ProjectHeader = ({
5218
4745
  setRenameDraft(projectName);
5219
4746
  onRenameComplete?.();
5220
4747
  };
5221
- return /* @__PURE__ */ jsxs8(
5222
- Box8,
4748
+ return /* @__PURE__ */ jsxs7(
4749
+ Box7,
5223
4750
  {
5224
4751
  "data-project-id": projectId ?? "__ungrouped",
5225
4752
  onMouseEnter: () => setIsHovered(true),
@@ -5235,26 +4762,26 @@ var ProjectHeader = ({
5235
4762
  py: 1.5,
5236
4763
  cursor: isUngrouped ? "default" : "pointer",
5237
4764
  // No pointer cursor for ungrouped
5238
- bgcolor: isDragOver || isTouchTarget ? alpha5(projectColor || theme.palette.primary.main, 0.1) : void 0,
4765
+ bgcolor: isDragOver || isTouchTarget ? alpha4(projectColor || theme.palette.primary.main, 0.1) : void 0,
5239
4766
  border: isDragOver || isTouchTarget ? `2px dashed ${projectColor || theme.palette.primary.main}` : "2px solid transparent",
5240
4767
  borderRadius: isDragOver || isTouchTarget ? 1 : 0,
5241
4768
  transition: "all 0.2s ease",
5242
4769
  "&:hover": !isUngrouped ? {
5243
4770
  // Only show hover for projects, not ungrouped
5244
- bgcolor: alpha5(theme.palette.text.primary, 0.04)
4771
+ bgcolor: alpha4(theme.palette.text.primary, 0.04)
5245
4772
  } : {}
5246
4773
  },
5247
4774
  children: [
5248
- /* @__PURE__ */ jsx11(
4775
+ /* @__PURE__ */ jsx10(
5249
4776
  Avatar5,
5250
4777
  {
5251
4778
  sx: {
5252
- bgcolor: isUngrouped ? alpha5(theme.palette.text.disabled, 0.1) : projectColor || theme.palette.grey[400],
4779
+ bgcolor: isUngrouped ? alpha4(theme.palette.text.disabled, 0.1) : projectColor || theme.palette.grey[400],
5253
4780
  width: 28,
5254
4781
  height: 28,
5255
4782
  mr: 1.5
5256
4783
  },
5257
- children: isUngrouped ? /* @__PURE__ */ jsx11(
4784
+ children: isUngrouped ? /* @__PURE__ */ jsx10(
5258
4785
  InboxIcon2,
5259
4786
  {
5260
4787
  fontSize: "small",
@@ -5263,10 +4790,10 @@ var ProjectHeader = ({
5263
4790
  opacity: 0.7
5264
4791
  }
5265
4792
  }
5266
- ) : /* @__PURE__ */ jsx11(Icon, { fontSize: "small" })
4793
+ ) : /* @__PURE__ */ jsx10(Icon, { fontSize: "small" })
5267
4794
  }
5268
4795
  ),
5269
- isRenaming && !isUngrouped ? /* @__PURE__ */ jsx11(
4796
+ isRenaming && !isUngrouped ? /* @__PURE__ */ jsx10(
5270
4797
  TextField4,
5271
4798
  {
5272
4799
  value: renameDraft,
@@ -5313,7 +4840,7 @@ var ProjectHeader = ({
5313
4840
  }
5314
4841
  }
5315
4842
  }
5316
- ) : /* @__PURE__ */ jsxs8(
4843
+ ) : /* @__PURE__ */ jsxs7(
5317
4844
  Typography5,
5318
4845
  {
5319
4846
  variant: "subtitle2",
@@ -5326,7 +4853,7 @@ var ProjectHeader = ({
5326
4853
  },
5327
4854
  children: [
5328
4855
  projectName,
5329
- isDragOver && /* @__PURE__ */ jsx11(
4856
+ isDragOver && /* @__PURE__ */ jsx10(
5330
4857
  Typography5,
5331
4858
  {
5332
4859
  component: "span",
@@ -5342,13 +4869,13 @@ var ProjectHeader = ({
5342
4869
  ]
5343
4870
  }
5344
4871
  ),
5345
- /* @__PURE__ */ jsx11(
4872
+ /* @__PURE__ */ jsx10(
5346
4873
  Chip2,
5347
4874
  {
5348
4875
  label: conversationCount,
5349
4876
  size: "small",
5350
4877
  sx: {
5351
- bgcolor: isUngrouped ? alpha5(theme.palette.text.disabled, 0.1) : alpha5(projectColor || theme.palette.primary.main, 0.15),
4878
+ bgcolor: isUngrouped ? alpha4(theme.palette.text.disabled, 0.1) : alpha4(projectColor || theme.palette.primary.main, 0.15),
5352
4879
  color: isUngrouped ? theme.palette.text.disabled : projectColor || theme.palette.primary.main,
5353
4880
  minWidth: 28,
5354
4881
  height: 22,
@@ -5362,9 +4889,9 @@ var ProjectHeader = ({
5362
4889
  }
5363
4890
  }
5364
4891
  ),
5365
- isRenaming && !isUngrouped && /* @__PURE__ */ jsxs8(Box8, { sx: { display: "flex", alignItems: "center", gap: 0.5, ml: 1 }, children: [
5366
- /* @__PURE__ */ jsx11(Tooltip3, { title: "Cancel and remove", children: /* @__PURE__ */ jsx11(
5367
- IconButton7,
4892
+ isRenaming && !isUngrouped && /* @__PURE__ */ jsxs7(Box7, { sx: { display: "flex", alignItems: "center", gap: 0.5, ml: 1 }, children: [
4893
+ /* @__PURE__ */ jsx10(Tooltip2, { title: "Cancel and remove", children: /* @__PURE__ */ jsx10(
4894
+ IconButton6,
5368
4895
  {
5369
4896
  size: "small",
5370
4897
  onMouseDown: (e) => {
@@ -5372,12 +4899,12 @@ var ProjectHeader = ({
5372
4899
  renameActionRef.current = "delete";
5373
4900
  onRenameCancelDelete ? onRenameCancelDelete() : cancelRename();
5374
4901
  },
5375
- sx: { color: alpha5(theme.palette.error.main, 0.9) },
5376
- children: /* @__PURE__ */ jsx11(CloseIcon4, { fontSize: "small" })
4902
+ sx: { color: alpha4(theme.palette.error.main, 0.9) },
4903
+ children: /* @__PURE__ */ jsx10(CloseIcon4, { fontSize: "small" })
5377
4904
  }
5378
4905
  ) }),
5379
- /* @__PURE__ */ jsx11(Tooltip3, { title: "Save", children: /* @__PURE__ */ jsx11(
5380
- IconButton7,
4906
+ /* @__PURE__ */ jsx10(Tooltip2, { title: "Save", children: /* @__PURE__ */ jsx10(
4907
+ IconButton6,
5381
4908
  {
5382
4909
  size: "small",
5383
4910
  onMouseDown: (e) => {
@@ -5386,39 +4913,39 @@ var ProjectHeader = ({
5386
4913
  commitRename();
5387
4914
  },
5388
4915
  sx: { color: theme.palette.success.main },
5389
- children: /* @__PURE__ */ jsx11(CheckIcon3, { fontSize: "small" })
4916
+ children: /* @__PURE__ */ jsx10(CheckIcon2, { fontSize: "small" })
5390
4917
  }
5391
4918
  ) })
5392
4919
  ] }),
5393
- isHovered && !isDragOver && !isUngrouped && !isRenaming && /* @__PURE__ */ jsx11(Tooltip3, { title: `Add conversation to ${projectName.toLowerCase()}`, arrow: true, children: /* @__PURE__ */ jsx11(
5394
- IconButton7,
4920
+ isHovered && !isDragOver && !isUngrouped && !isRenaming && /* @__PURE__ */ jsx10(Tooltip2, { title: `Add conversation to ${projectName.toLowerCase()}`, arrow: true, children: /* @__PURE__ */ jsx10(
4921
+ IconButton6,
5395
4922
  {
5396
4923
  onClick: handleAddConversation,
5397
4924
  size: "small",
5398
4925
  sx: {
5399
4926
  color: projectColor || theme.palette.primary.main,
5400
- bgcolor: alpha5(projectColor || theme.palette.primary.main, 0.1),
4927
+ bgcolor: alpha4(projectColor || theme.palette.primary.main, 0.1),
5401
4928
  width: 24,
5402
4929
  height: 24,
5403
4930
  mr: 0.5,
5404
4931
  "&:hover": {
5405
- bgcolor: alpha5(projectColor || theme.palette.primary.main, 0.2),
4932
+ bgcolor: alpha4(projectColor || theme.palette.primary.main, 0.2),
5406
4933
  transform: "scale(1.1)"
5407
4934
  },
5408
4935
  transition: "all 0.2s ease"
5409
4936
  },
5410
- children: /* @__PURE__ */ jsx11(AddIcon2, { fontSize: "small" })
4937
+ children: /* @__PURE__ */ jsx10(AddIcon2, { fontSize: "small" })
5411
4938
  }
5412
4939
  ) }),
5413
- !isUngrouped && !isRenaming && /* @__PURE__ */ jsx11(
5414
- IconButton7,
4940
+ !isUngrouped && !isRenaming && /* @__PURE__ */ jsx10(
4941
+ IconButton6,
5415
4942
  {
5416
4943
  size: "small",
5417
4944
  sx: {
5418
4945
  color: theme.palette.text.secondary,
5419
4946
  transition: "transform 0.2s ease"
5420
4947
  },
5421
- children: isCollapsed ? /* @__PURE__ */ jsx11(ExpandMoreIcon2, { fontSize: "small" }) : /* @__PURE__ */ jsx11(ExpandLessIcon, { fontSize: "small" })
4948
+ children: isCollapsed ? /* @__PURE__ */ jsx10(ExpandMoreIcon2, { fontSize: "small" }) : /* @__PURE__ */ jsx10(ExpandLessIcon, { fontSize: "small" })
5422
4949
  }
5423
4950
  )
5424
4951
  ]
@@ -5440,7 +4967,7 @@ var TOOLTIP_COPY = {
5440
4967
  var tooltip = (key) => TOOLTIP_COPY[key];
5441
4968
 
5442
4969
  // src/chat/conversation-drawer.tsx
5443
- import { Fragment as Fragment6, jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
4970
+ import { Fragment as Fragment6, jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
5444
4971
  var BANDIT_AVATAR = "https://cdn.burtson.ai/images/bandit-head.png";
5445
4972
  var coerceOptionalString = (value) => {
5446
4973
  if (typeof value !== "string") return void 0;
@@ -5468,7 +4995,7 @@ var deriveInitials = (value) => {
5468
4995
  return sanitized.slice(0, 2).toUpperCase();
5469
4996
  };
5470
4997
  var ConversationDrawer = ({ open, onClose }) => {
5471
- const theme = useTheme10();
4998
+ const theme = useTheme9();
5472
4999
  const isMobile = useMediaQuery4(theme.breakpoints.down("sm"));
5473
5000
  const { user } = useAuthenticationStore();
5474
5001
  const baseRadius = typeof theme.shape.borderRadius === "number" ? theme.shape.borderRadius : parseFloat(theme.shape.borderRadius) || 0;
@@ -5491,21 +5018,21 @@ var ConversationDrawer = ({ open, onClose }) => {
5491
5018
  createProject,
5492
5019
  deleteProject
5493
5020
  } = useProjectStore();
5494
- const [projectManagementOpen, setProjectManagementOpen] = useState11(false);
5495
- const [collapsedProjects, setCollapsedProjects] = useState11(/* @__PURE__ */ new Set());
5496
- const didInitCollapseRef = useRef9(false);
5497
- const [searchQuery, setSearchQuery] = useState11("");
5498
- const [menuAnchorEl, setMenuAnchorEl] = useState11(null);
5499
- const [clearConfirmOpen, setClearConfirmOpen] = useState11(false);
5500
- const [moveModalOpen, setMoveModalOpen] = useState11(false);
5501
- const [conversationToMove, setConversationToMove] = useState11(null);
5502
- const [renameProjectId, setRenameProjectId] = useState11(null);
5021
+ const [projectManagementOpen, setProjectManagementOpen] = useState10(false);
5022
+ const [collapsedProjects, setCollapsedProjects] = useState10(/* @__PURE__ */ new Set());
5023
+ const didInitCollapseRef = useRef8(false);
5024
+ const [searchQuery, setSearchQuery] = useState10("");
5025
+ const [menuAnchorEl, setMenuAnchorEl] = useState10(null);
5026
+ const [clearConfirmOpen, setClearConfirmOpen] = useState10(false);
5027
+ const [moveModalOpen, setMoveModalOpen] = useState10(false);
5028
+ const [conversationToMove, setConversationToMove] = useState10(null);
5029
+ const [renameProjectId, setRenameProjectId] = useState10(null);
5503
5030
  const getCustomClaim = useCallback4((key) => {
5504
5031
  if (!user) return void 0;
5505
5032
  const record = user;
5506
5033
  return coerceOptionalString(record[key]);
5507
5034
  }, [user]);
5508
- const userDisplayName = useMemo2(() => {
5035
+ const userDisplayName = useMemo(() => {
5509
5036
  if (!user) return void 0;
5510
5037
  const candidateFields = [
5511
5038
  coerceOptionalString(user.name),
@@ -5520,7 +5047,7 @@ var ConversationDrawer = ({ open, onClose }) => {
5520
5047
  if (trimmedEmail) return trimmedEmail;
5521
5048
  return user.sub;
5522
5049
  }, [user, getCustomClaim]);
5523
- const userSecondaryText = useMemo2(() => {
5050
+ const userSecondaryText = useMemo(() => {
5524
5051
  if (!user) return void 0;
5525
5052
  const trimmedEmail = coerceOptionalString(user.email);
5526
5053
  if (trimmedEmail && trimmedEmail !== userDisplayName) {
@@ -5532,8 +5059,8 @@ var ConversationDrawer = ({ open, onClose }) => {
5532
5059
  }
5533
5060
  return void 0;
5534
5061
  }, [user, userDisplayName]);
5535
- const [avatarImage, setAvatarImage] = useState11(BANDIT_AVATAR);
5536
- useEffect10(() => {
5062
+ const [avatarImage, setAvatarImage] = useState10(BANDIT_AVATAR);
5063
+ useEffect9(() => {
5537
5064
  const fetchBranding = async () => {
5538
5065
  try {
5539
5066
  const branding = await brandingService_default.getBranding();
@@ -5548,13 +5075,13 @@ var ConversationDrawer = ({ open, onClose }) => {
5548
5075
  fetchBranding();
5549
5076
  }, []);
5550
5077
  const avatarLabel = userDisplayName || user?.email || "Bandit";
5551
- const avatarInitials = useMemo2(() => deriveInitials(avatarLabel), [avatarLabel]);
5552
- useEffect10(() => {
5078
+ const avatarInitials = useMemo(() => deriveInitials(avatarLabel), [avatarLabel]);
5079
+ useEffect9(() => {
5553
5080
  if (!projectsHydrated) {
5554
5081
  hydrateProjects();
5555
5082
  }
5556
5083
  }, [projectsHydrated, hydrateProjects]);
5557
- useEffect10(() => {
5084
+ useEffect9(() => {
5558
5085
  if (projectsHydrated && !didInitCollapseRef.current) {
5559
5086
  didInitCollapseRef.current = true;
5560
5087
  if (projects && projects.length > 0) {
@@ -5567,7 +5094,7 @@ var ConversationDrawer = ({ open, onClose }) => {
5567
5094
  const end = Math.min(text.length, idx + query.length + 60);
5568
5095
  return text.slice(start, end).replace(/\s+/g, " ").trim();
5569
5096
  };
5570
- const projectGroups = useMemo2(() => {
5097
+ const projectGroups = useMemo(() => {
5571
5098
  const groups = projects.map((project) => ({
5572
5099
  id: project.id,
5573
5100
  name: project.name,
@@ -5590,7 +5117,7 @@ var ConversationDrawer = ({ open, onClose }) => {
5590
5117
  }
5591
5118
  return groups.filter((group) => group.conversations.length > 0 || group.id !== null);
5592
5119
  }, [projects, conversations, collapsedProjects]);
5593
- const filteredProjectGroups = useMemo2(() => {
5120
+ const filteredProjectGroups = useMemo(() => {
5594
5121
  if (!searchQuery.trim()) return projectGroups;
5595
5122
  const query = searchQuery.toLowerCase();
5596
5123
  return projectGroups.map((group) => {
@@ -5661,8 +5188,8 @@ var ConversationDrawer = ({ open, onClose }) => {
5661
5188
  setMoveModalOpen(false);
5662
5189
  setConversationToMove(null);
5663
5190
  };
5664
- return /* @__PURE__ */ jsxs9(Fragment6, { children: [
5665
- /* @__PURE__ */ jsxs9(
5191
+ return /* @__PURE__ */ jsxs8(Fragment6, { children: [
5192
+ /* @__PURE__ */ jsxs8(
5666
5193
  Drawer,
5667
5194
  {
5668
5195
  anchor: "left",
@@ -5676,7 +5203,7 @@ var ConversationDrawer = ({ open, onClose }) => {
5676
5203
  width: isMobile ? `min(94vw, 360px)` : 340,
5677
5204
  maxWidth: 360,
5678
5205
  bgcolor: theme.palette.background.paper,
5679
- borderRight: `1px solid ${isMobile ? alpha6(theme.palette.divider, 0.4) : theme.palette.divider}`,
5206
+ borderRight: `1px solid ${isMobile ? alpha5(theme.palette.divider, 0.4) : theme.palette.divider}`,
5680
5207
  display: "flex",
5681
5208
  flexDirection: "column",
5682
5209
  height: isMobile ? `calc(100dvh - ${theme.spacing(4)})` : "100dvh",
@@ -5684,7 +5211,7 @@ var ConversationDrawer = ({ open, onClose }) => {
5684
5211
  bottom: isMobile ? theme.spacing(2) : 0,
5685
5212
  left: 0,
5686
5213
  borderRadius: isMobile ? `0 ${drawerCornerRadius}px ${drawerCornerRadius}px 0` : 0,
5687
- boxShadow: isMobile ? `0 18px 36px ${alpha6(theme.palette.common.black, 0.28)}` : "none",
5214
+ boxShadow: isMobile ? `0 18px 36px ${alpha5(theme.palette.common.black, 0.28)}` : "none",
5688
5215
  overflow: "hidden"
5689
5216
  }
5690
5217
  },
@@ -5704,8 +5231,8 @@ var ConversationDrawer = ({ open, onClose }) => {
5704
5231
  }
5705
5232
  },
5706
5233
  children: [
5707
- /* @__PURE__ */ jsxs9(
5708
- Box9,
5234
+ /* @__PURE__ */ jsxs8(
5235
+ Box8,
5709
5236
  {
5710
5237
  sx: {
5711
5238
  p: 2,
@@ -5716,8 +5243,8 @@ var ConversationDrawer = ({ open, onClose }) => {
5716
5243
  gap: 1
5717
5244
  },
5718
5245
  children: [
5719
- /* @__PURE__ */ jsx12(Tooltip4, { title: tooltip("manageProjects"), arrow: true, children: /* @__PURE__ */ jsx12(
5720
- IconButton8,
5246
+ /* @__PURE__ */ jsx11(Tooltip3, { title: tooltip("manageProjects"), arrow: true, children: /* @__PURE__ */ jsx11(
5247
+ IconButton7,
5721
5248
  {
5722
5249
  onClick: () => setProjectManagementOpen(true),
5723
5250
  size: "small",
@@ -5726,14 +5253,14 @@ var ConversationDrawer = ({ open, onClose }) => {
5726
5253
  color: theme.palette.text.secondary,
5727
5254
  "&:hover": {
5728
5255
  color: theme.palette.primary.main,
5729
- bgcolor: alpha6(theme.palette.primary.main, 0.1)
5256
+ bgcolor: alpha5(theme.palette.primary.main, 0.1)
5730
5257
  }
5731
5258
  },
5732
- children: /* @__PURE__ */ jsx12(FolderIcon4, {})
5259
+ children: /* @__PURE__ */ jsx11(FolderIcon4, {})
5733
5260
  }
5734
5261
  ) }),
5735
- /* @__PURE__ */ jsx12(Tooltip4, { title: tooltip("conversationOptions"), arrow: true, children: /* @__PURE__ */ jsx12(
5736
- IconButton8,
5262
+ /* @__PURE__ */ jsx11(Tooltip3, { title: tooltip("conversationOptions"), arrow: true, children: /* @__PURE__ */ jsx11(
5263
+ IconButton7,
5737
5264
  {
5738
5265
  onClick: handleMenuOpen,
5739
5266
  size: "small",
@@ -5742,14 +5269,14 @@ var ConversationDrawer = ({ open, onClose }) => {
5742
5269
  color: theme.palette.text.secondary,
5743
5270
  "&:hover": {
5744
5271
  color: theme.palette.text.primary,
5745
- bgcolor: alpha6(theme.palette.text.primary, 0.1)
5272
+ bgcolor: alpha5(theme.palette.text.primary, 0.1)
5746
5273
  }
5747
5274
  },
5748
- children: /* @__PURE__ */ jsx12(MoreVertIcon3, {})
5275
+ children: /* @__PURE__ */ jsx11(MoreVertIcon3, {})
5749
5276
  }
5750
5277
  ) }),
5751
- isMobile && /* @__PURE__ */ jsx12(Tooltip4, { title: tooltip("closeConversationsPanel"), children: /* @__PURE__ */ jsx12(
5752
- IconButton8,
5278
+ isMobile && /* @__PURE__ */ jsx11(Tooltip3, { title: tooltip("closeConversationsPanel"), children: /* @__PURE__ */ jsx11(
5279
+ IconButton7,
5753
5280
  {
5754
5281
  onClick: (e) => {
5755
5282
  e.preventDefault();
@@ -5762,16 +5289,16 @@ var ConversationDrawer = ({ open, onClose }) => {
5762
5289
  color: theme.palette.text.secondary,
5763
5290
  "&:hover": {
5764
5291
  color: theme.palette.error.main,
5765
- bgcolor: alpha6(theme.palette.error.main, 0.1)
5292
+ bgcolor: alpha5(theme.palette.error.main, 0.1)
5766
5293
  }
5767
5294
  },
5768
- children: /* @__PURE__ */ jsx12(CloseIcon5, {})
5295
+ children: /* @__PURE__ */ jsx11(CloseIcon5, {})
5769
5296
  }
5770
5297
  ) })
5771
5298
  ]
5772
5299
  }
5773
5300
  ),
5774
- /* @__PURE__ */ jsx12(Box9, { sx: { p: 2, pb: 1 }, children: /* @__PURE__ */ jsx12(
5301
+ /* @__PURE__ */ jsx11(Box8, { sx: { p: 2, pb: 1 }, children: /* @__PURE__ */ jsx11(
5775
5302
  TextField5,
5776
5303
  {
5777
5304
  fullWidth: true,
@@ -5781,24 +5308,24 @@ var ConversationDrawer = ({ open, onClose }) => {
5781
5308
  onChange: (e) => setSearchQuery(e.target.value),
5782
5309
  variant: "outlined",
5783
5310
  InputProps: {
5784
- startAdornment: /* @__PURE__ */ jsx12(InputAdornment, { position: "start", children: /* @__PURE__ */ jsx12(SearchIcon, { fontSize: "small", sx: { color: theme.palette.text.secondary } }) }),
5785
- endAdornment: searchQuery && /* @__PURE__ */ jsx12(InputAdornment, { position: "end", children: /* @__PURE__ */ jsx12(Tooltip4, { title: tooltip("clearSearch"), children: /* @__PURE__ */ jsx12(
5786
- IconButton8,
5311
+ startAdornment: /* @__PURE__ */ jsx11(InputAdornment, { position: "start", children: /* @__PURE__ */ jsx11(SearchIcon, { fontSize: "small", sx: { color: theme.palette.text.secondary } }) }),
5312
+ endAdornment: searchQuery && /* @__PURE__ */ jsx11(InputAdornment, { position: "end", children: /* @__PURE__ */ jsx11(Tooltip3, { title: tooltip("clearSearch"), children: /* @__PURE__ */ jsx11(
5313
+ IconButton7,
5787
5314
  {
5788
5315
  onClick: handleSearchClear,
5789
5316
  size: "small",
5790
5317
  edge: "end",
5791
5318
  "aria-label": tooltip("clearSearch"),
5792
5319
  sx: { color: theme.palette.text.secondary },
5793
- children: /* @__PURE__ */ jsx12(ClearIcon, { fontSize: "small" })
5320
+ children: /* @__PURE__ */ jsx11(ClearIcon, { fontSize: "small" })
5794
5321
  }
5795
5322
  ) }) })
5796
5323
  },
5797
5324
  sx: {
5798
5325
  "& .MuiOutlinedInput-root": {
5799
- bgcolor: alpha6(theme.palette.background.default, 0.5),
5326
+ bgcolor: alpha5(theme.palette.background.default, 0.5),
5800
5327
  "&:hover": {
5801
- bgcolor: alpha6(theme.palette.background.default, 0.8)
5328
+ bgcolor: alpha5(theme.palette.background.default, 0.8)
5802
5329
  },
5803
5330
  "&.Mui-focused": {
5804
5331
  bgcolor: theme.palette.background.default
@@ -5807,9 +5334,9 @@ var ConversationDrawer = ({ open, onClose }) => {
5807
5334
  }
5808
5335
  }
5809
5336
  ) }),
5810
- /* @__PURE__ */ jsxs9(Box9, { sx: { flex: 1, overflow: "auto", display: "flex", flexDirection: "column" }, children: [
5811
- /* @__PURE__ */ jsxs9(
5812
- Box9,
5337
+ /* @__PURE__ */ jsxs8(Box8, { sx: { flex: 1, overflow: "auto", display: "flex", flexDirection: "column" }, children: [
5338
+ /* @__PURE__ */ jsxs8(
5339
+ Box8,
5813
5340
  {
5814
5341
  onClick: async () => {
5815
5342
  const names = new Set(projects.map((p) => p.name));
@@ -5840,26 +5367,26 @@ var ConversationDrawer = ({ open, onClose }) => {
5840
5367
  alignItems: "center",
5841
5368
  gap: 1.5,
5842
5369
  cursor: "pointer",
5843
- "&:hover": { bgcolor: alpha6(theme.palette.text.primary, 0.04) }
5370
+ "&:hover": { bgcolor: alpha5(theme.palette.text.primary, 0.04) }
5844
5371
  },
5845
5372
  children: [
5846
- /* @__PURE__ */ jsx12(
5847
- Box9,
5373
+ /* @__PURE__ */ jsx11(
5374
+ Box8,
5848
5375
  {
5849
5376
  sx: {
5850
5377
  width: 28,
5851
5378
  height: 28,
5852
5379
  borderRadius: "50%",
5853
- bgcolor: alpha6(theme.palette.success.main, 0.15),
5380
+ bgcolor: alpha5(theme.palette.success.main, 0.15),
5854
5381
  display: "flex",
5855
5382
  alignItems: "center",
5856
5383
  justifyContent: "center",
5857
5384
  flexShrink: 0
5858
5385
  },
5859
- children: /* @__PURE__ */ jsx12(FolderIcon4, { fontSize: "small", sx: { color: theme.palette.success.main } })
5386
+ children: /* @__PURE__ */ jsx11(FolderIcon4, { fontSize: "small", sx: { color: theme.palette.success.main } })
5860
5387
  }
5861
5388
  ),
5862
- /* @__PURE__ */ jsx12(
5389
+ /* @__PURE__ */ jsx11(
5863
5390
  Typography6,
5864
5391
  {
5865
5392
  variant: "subtitle2",
@@ -5867,22 +5394,22 @@ var ConversationDrawer = ({ open, onClose }) => {
5867
5394
  children: "New Project"
5868
5395
  }
5869
5396
  ),
5870
- /* @__PURE__ */ jsx12(Tooltip4, { title: tooltip("addProject"), arrow: true, children: /* @__PURE__ */ jsx12(
5871
- IconButton8,
5397
+ /* @__PURE__ */ jsx11(Tooltip3, { title: tooltip("addProject"), arrow: true, children: /* @__PURE__ */ jsx11(
5398
+ IconButton7,
5872
5399
  {
5873
5400
  size: "small",
5874
5401
  "aria-label": tooltip("addProject"),
5875
5402
  sx: { color: theme.palette.success.main },
5876
- children: /* @__PURE__ */ jsx12(AddIcon3, { fontSize: "small" })
5403
+ children: /* @__PURE__ */ jsx11(AddIcon3, { fontSize: "small" })
5877
5404
  }
5878
5405
  ) })
5879
5406
  ]
5880
5407
  }
5881
5408
  ),
5882
- /* @__PURE__ */ jsx12(Divider2, { sx: { opacity: 0.3 } }),
5883
- filteredProjectGroups.map((group, index) => /* @__PURE__ */ jsxs9(Box9, { children: [
5884
- group.id === null && filteredProjectGroups.length > 1 && /* @__PURE__ */ jsxs9(
5885
- Box9,
5409
+ /* @__PURE__ */ jsx11(Divider2, { sx: { opacity: 0.3 } }),
5410
+ filteredProjectGroups.map((group, index) => /* @__PURE__ */ jsxs8(Box8, { children: [
5411
+ group.id === null && filteredProjectGroups.length > 1 && /* @__PURE__ */ jsxs8(
5412
+ Box8,
5886
5413
  {
5887
5414
  sx: {
5888
5415
  py: 2,
@@ -5892,9 +5419,9 @@ var ConversationDrawer = ({ open, onClose }) => {
5892
5419
  gap: 2
5893
5420
  },
5894
5421
  children: [
5895
- /* @__PURE__ */ jsx12(Divider2, { sx: { flex: 1, opacity: 0.6 } }),
5896
- /* @__PURE__ */ jsxs9(Box9, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
5897
- /* @__PURE__ */ jsx12(
5422
+ /* @__PURE__ */ jsx11(Divider2, { sx: { flex: 1, opacity: 0.6 } }),
5423
+ /* @__PURE__ */ jsxs8(Box8, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
5424
+ /* @__PURE__ */ jsx11(
5898
5425
  InboxIcon3,
5899
5426
  {
5900
5427
  sx: {
@@ -5904,7 +5431,7 @@ var ConversationDrawer = ({ open, onClose }) => {
5904
5431
  }
5905
5432
  }
5906
5433
  ),
5907
- /* @__PURE__ */ jsx12(
5434
+ /* @__PURE__ */ jsx11(
5908
5435
  Typography6,
5909
5436
  {
5910
5437
  variant: "caption",
@@ -5919,12 +5446,12 @@ var ConversationDrawer = ({ open, onClose }) => {
5919
5446
  }
5920
5447
  )
5921
5448
  ] }),
5922
- /* @__PURE__ */ jsx12(Divider2, { sx: { flex: 1, opacity: 0.6 } })
5449
+ /* @__PURE__ */ jsx11(Divider2, { sx: { flex: 1, opacity: 0.6 } })
5923
5450
  ]
5924
5451
  }
5925
5452
  ),
5926
- group.id !== null ? /* @__PURE__ */ jsxs9(Fragment6, { children: [
5927
- /* @__PURE__ */ jsx12(
5453
+ group.id !== null ? /* @__PURE__ */ jsxs8(Fragment6, { children: [
5454
+ /* @__PURE__ */ jsx11(
5928
5455
  project_header_default,
5929
5456
  {
5930
5457
  projectId: group.id,
@@ -5953,8 +5480,8 @@ var ConversationDrawer = ({ open, onClose }) => {
5953
5480
  }
5954
5481
  }
5955
5482
  ),
5956
- /* @__PURE__ */ jsx12(Collapse2, { in: !group.collapsed, children: /* @__PURE__ */ jsxs9(Box9, { sx: { pb: 1 }, children: [
5957
- group.conversations.map((conversation) => /* @__PURE__ */ jsx12(
5483
+ /* @__PURE__ */ jsx11(Collapse2, { in: !group.collapsed, children: /* @__PURE__ */ jsxs8(Box8, { sx: { pb: 1 }, children: [
5484
+ group.conversations.map((conversation) => /* @__PURE__ */ jsx11(
5958
5485
  simple_conversation_item_default,
5959
5486
  {
5960
5487
  conversation,
@@ -5974,8 +5501,8 @@ var ConversationDrawer = ({ open, onClose }) => {
5974
5501
  },
5975
5502
  conversation.id
5976
5503
  )),
5977
- group.conversations.length === 0 && !group.collapsed && group.id !== null && /* @__PURE__ */ jsxs9(
5978
- Box9,
5504
+ group.conversations.length === 0 && !group.collapsed && group.id !== null && /* @__PURE__ */ jsxs8(
5505
+ Box8,
5979
5506
  {
5980
5507
  sx: {
5981
5508
  p: 3,
@@ -5983,17 +5510,17 @@ var ConversationDrawer = ({ open, onClose }) => {
5983
5510
  color: theme.palette.text.secondary
5984
5511
  },
5985
5512
  children: [
5986
- /* @__PURE__ */ jsx12(Typography6, { variant: "body2", children: "No conversations in this project yet" }),
5987
- /* @__PURE__ */ jsx12(Typography6, { variant: "caption", sx: { mt: 1, display: "block" }, children: "Drag conversations here or use the + button above" })
5513
+ /* @__PURE__ */ jsx11(Typography6, { variant: "body2", children: "No conversations in this project yet" }),
5514
+ /* @__PURE__ */ jsx11(Typography6, { variant: "caption", sx: { mt: 1, display: "block" }, children: "Drag conversations here or use the + button above" })
5988
5515
  ]
5989
5516
  }
5990
5517
  )
5991
5518
  ] }) }),
5992
- /* @__PURE__ */ jsx12(Divider2, { sx: { opacity: 0.3 } })
5519
+ /* @__PURE__ */ jsx11(Divider2, { sx: { opacity: 0.3 } })
5993
5520
  ] }) : (
5994
5521
  // Special handling for ungrouped - no header, just conversations in scrollable area
5995
- /* @__PURE__ */ jsx12(
5996
- Box9,
5522
+ /* @__PURE__ */ jsx11(
5523
+ Box8,
5997
5524
  {
5998
5525
  sx: {
5999
5526
  minHeight: 0,
@@ -6001,12 +5528,12 @@ var ConversationDrawer = ({ open, onClose }) => {
6001
5528
  overflow: "auto",
6002
5529
  px: 1,
6003
5530
  py: 1,
6004
- bgcolor: alpha6(theme.palette.background.default, 0.3),
5531
+ bgcolor: alpha5(theme.palette.background.default, 0.3),
6005
5532
  borderRadius: "8px 8px 0 0",
6006
5533
  mx: 1,
6007
5534
  mb: 1
6008
5535
  },
6009
- children: group.conversations.map((conversation) => /* @__PURE__ */ jsx12(
5536
+ children: group.conversations.map((conversation) => /* @__PURE__ */ jsx11(
6010
5537
  simple_conversation_item_default,
6011
5538
  {
6012
5539
  conversation,
@@ -6030,8 +5557,8 @@ var ConversationDrawer = ({ open, onClose }) => {
6030
5557
  )
6031
5558
  )
6032
5559
  ] }, group.id || "ungrouped")),
6033
- filteredProjectGroups.length === 0 && /* @__PURE__ */ jsxs9(
6034
- Box9,
5560
+ filteredProjectGroups.length === 0 && /* @__PURE__ */ jsxs8(
5561
+ Box8,
6035
5562
  {
6036
5563
  sx: {
6037
5564
  flex: 1,
@@ -6044,28 +5571,28 @@ var ConversationDrawer = ({ open, onClose }) => {
6044
5571
  color: theme.palette.text.secondary
6045
5572
  },
6046
5573
  children: [
6047
- /* @__PURE__ */ jsx12(Typography6, { variant: "h6", sx: { mb: 1 }, children: searchQuery ? "No conversations found" : "No conversations yet" }),
6048
- /* @__PURE__ */ jsx12(Typography6, { variant: "body2", sx: { mb: 3, maxWidth: 280 }, children: searchQuery ? `No conversations match "${searchQuery}"` : "Start your first conversation to begin organizing your chats into projects" })
5574
+ /* @__PURE__ */ jsx11(Typography6, { variant: "h6", sx: { mb: 1 }, children: searchQuery ? "No conversations found" : "No conversations yet" }),
5575
+ /* @__PURE__ */ jsx11(Typography6, { variant: "body2", sx: { mb: 3, maxWidth: 280 }, children: searchQuery ? `No conversations match "${searchQuery}"` : "Start your first conversation to begin organizing your chats into projects" })
6049
5576
  ]
6050
5577
  }
6051
5578
  )
6052
5579
  ] }),
6053
- /* @__PURE__ */ jsxs9(
6054
- Box9,
5580
+ /* @__PURE__ */ jsxs8(
5581
+ Box8,
6055
5582
  {
6056
5583
  sx: {
6057
5584
  mt: "auto",
6058
5585
  px: 2,
6059
5586
  py: 1.75,
6060
- borderTop: `1px solid ${alpha6(theme.palette.divider, 0.6)}`,
5587
+ borderTop: `1px solid ${alpha5(theme.palette.divider, 0.6)}`,
6061
5588
  display: "flex",
6062
5589
  alignItems: "center",
6063
5590
  gap: 1.5,
6064
5591
  justifyContent: "center",
6065
- bgcolor: alpha6(theme.palette.background.default, isMobile ? 0.9 : 0.6)
5592
+ bgcolor: alpha5(theme.palette.background.default, isMobile ? 0.9 : 0.6)
6066
5593
  },
6067
5594
  children: [
6068
- /* @__PURE__ */ jsx12(
5595
+ /* @__PURE__ */ jsx11(
6069
5596
  Avatar6,
6070
5597
  {
6071
5598
  src: avatarImage,
@@ -6074,14 +5601,14 @@ var ConversationDrawer = ({ open, onClose }) => {
6074
5601
  width: 36,
6075
5602
  height: 36,
6076
5603
  fontSize: "0.95rem",
6077
- bgcolor: alpha6(theme.palette.primary.main, 0.12),
5604
+ bgcolor: alpha5(theme.palette.primary.main, 0.12),
6078
5605
  color: theme.palette.primary.main
6079
5606
  },
6080
5607
  children: avatarInitials
6081
5608
  }
6082
5609
  ),
6083
- /* @__PURE__ */ jsxs9(
6084
- Box9,
5610
+ /* @__PURE__ */ jsxs8(
5611
+ Box8,
6085
5612
  {
6086
5613
  sx: {
6087
5614
  minWidth: 0,
@@ -6093,7 +5620,7 @@ var ConversationDrawer = ({ open, onClose }) => {
6093
5620
  gap: 0.25
6094
5621
  },
6095
5622
  children: [
6096
- /* @__PURE__ */ jsx12(
5623
+ /* @__PURE__ */ jsx11(
6097
5624
  Typography6,
6098
5625
  {
6099
5626
  variant: "subtitle2",
@@ -6102,7 +5629,7 @@ var ConversationDrawer = ({ open, onClose }) => {
6102
5629
  children: user ? userDisplayName : "Not signed in"
6103
5630
  }
6104
5631
  ),
6105
- !user && /* @__PURE__ */ jsx12(
5632
+ !user && /* @__PURE__ */ jsx11(
6106
5633
  Typography6,
6107
5634
  {
6108
5635
  variant: "caption",
@@ -6119,14 +5646,14 @@ var ConversationDrawer = ({ open, onClose }) => {
6119
5646
  ]
6120
5647
  }
6121
5648
  ),
6122
- /* @__PURE__ */ jsx12(
5649
+ /* @__PURE__ */ jsx11(
6123
5650
  project_management_modal_default,
6124
5651
  {
6125
5652
  open: projectManagementOpen,
6126
5653
  onClose: () => setProjectManagementOpen(false)
6127
5654
  }
6128
5655
  ),
6129
- conversationToMove && /* @__PURE__ */ jsx12(
5656
+ conversationToMove && /* @__PURE__ */ jsx11(
6130
5657
  move_conversation_modal_default,
6131
5658
  {
6132
5659
  open: moveModalOpen,
@@ -6135,7 +5662,7 @@ var ConversationDrawer = ({ open, onClose }) => {
6135
5662
  currentProjectId: conversationToMove.projectId
6136
5663
  }
6137
5664
  ),
6138
- /* @__PURE__ */ jsx12(
5665
+ /* @__PURE__ */ jsx11(
6139
5666
  Menu3,
6140
5667
  {
6141
5668
  anchorEl: menuAnchorEl,
@@ -6149,7 +5676,7 @@ var ConversationDrawer = ({ open, onClose }) => {
6149
5676
  vertical: "bottom",
6150
5677
  horizontal: "right"
6151
5678
  },
6152
- children: /* @__PURE__ */ jsxs9(
5679
+ children: /* @__PURE__ */ jsxs8(
6153
5680
  MenuItem3,
6154
5681
  {
6155
5682
  onClick: () => {
@@ -6158,14 +5685,14 @@ var ConversationDrawer = ({ open, onClose }) => {
6158
5685
  },
6159
5686
  sx: { color: theme.palette.error.main },
6160
5687
  children: [
6161
- /* @__PURE__ */ jsx12(ListItemIcon3, { children: /* @__PURE__ */ jsx12(DeleteSweepIcon, { fontSize: "small", sx: { color: theme.palette.error.main } }) }),
6162
- /* @__PURE__ */ jsx12(ListItemText3, { children: "Clear All Conversations" })
5688
+ /* @__PURE__ */ jsx11(ListItemIcon3, { children: /* @__PURE__ */ jsx11(DeleteSweepIcon, { fontSize: "small", sx: { color: theme.palette.error.main } }) }),
5689
+ /* @__PURE__ */ jsx11(ListItemText3, { children: "Clear All Conversations" })
6163
5690
  ]
6164
5691
  }
6165
5692
  )
6166
5693
  }
6167
5694
  ),
6168
- /* @__PURE__ */ jsxs9(
5695
+ /* @__PURE__ */ jsxs8(
6169
5696
  Dialog3,
6170
5697
  {
6171
5698
  open: clearConfirmOpen,
@@ -6173,11 +5700,11 @@ var ConversationDrawer = ({ open, onClose }) => {
6173
5700
  maxWidth: "sm",
6174
5701
  fullWidth: true,
6175
5702
  children: [
6176
- /* @__PURE__ */ jsx12(DialogTitle3, { children: "Clear All Conversations?" }),
6177
- /* @__PURE__ */ jsx12(DialogContent3, { children: /* @__PURE__ */ jsx12(Typography6, { children: "This will permanently delete all conversations and cannot be undone. Are you sure you want to continue?" }) }),
6178
- /* @__PURE__ */ jsxs9(DialogActions3, { children: [
6179
- /* @__PURE__ */ jsx12(Button4, { onClick: () => setClearConfirmOpen(false), children: "Cancel" }),
6180
- /* @__PURE__ */ jsx12(
5703
+ /* @__PURE__ */ jsx11(DialogTitle3, { children: "Clear All Conversations?" }),
5704
+ /* @__PURE__ */ jsx11(DialogContent3, { children: /* @__PURE__ */ jsx11(Typography6, { children: "This will permanently delete all conversations and cannot be undone. Are you sure you want to continue?" }) }),
5705
+ /* @__PURE__ */ jsxs8(DialogActions3, { children: [
5706
+ /* @__PURE__ */ jsx11(Button4, { onClick: () => setClearConfirmOpen(false), children: "Cancel" }),
5707
+ /* @__PURE__ */ jsx11(
6181
5708
  Button4,
6182
5709
  {
6183
5710
  onClick: handleClearAllConfirm,
@@ -6195,10 +5722,10 @@ var ConversationDrawer = ({ open, onClose }) => {
6195
5722
  var conversation_drawer_default = ConversationDrawer;
6196
5723
 
6197
5724
  // src/chat/enhanced-mobile-conversations-modal.tsx
6198
- import { useState as useState12, useMemo as useMemo3, useEffect as useEffect11, useRef as useRef10, useCallback as useCallback5 } from "react";
5725
+ import { useState as useState11, useMemo as useMemo2, useEffect as useEffect10, useRef as useRef9, useCallback as useCallback5 } from "react";
6199
5726
  import {
6200
- Box as Box10,
6201
- IconButton as IconButton9,
5727
+ Box as Box9,
5728
+ IconButton as IconButton8,
6202
5729
  Modal as Modal2,
6203
5730
  Typography as Typography7,
6204
5731
  TextField as TextField6,
@@ -6230,8 +5757,8 @@ import {
6230
5757
  Inbox as InboxIcon4
6231
5758
  } from "@mui/icons-material";
6232
5759
  import { Add as AddIcon4 } from "@mui/icons-material";
6233
- import { useTheme as useTheme11, alpha as alpha7 } from "@mui/material/styles";
6234
- import { Fragment as Fragment7, jsx as jsx13, jsxs as jsxs10 } from "react/jsx-runtime";
5760
+ import { useTheme as useTheme10, alpha as alpha6 } from "@mui/material/styles";
5761
+ import { Fragment as Fragment7, jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
6235
5762
  var BANDIT_AVATAR2 = "https://cdn.burtson.ai/images/bandit-head.png";
6236
5763
  var coerceOptionalString2 = (value) => {
6237
5764
  if (typeof value !== "string") return void 0;
@@ -6262,7 +5789,7 @@ var EnhancedMobileConversationsModal = ({
6262
5789
  open,
6263
5790
  onClose
6264
5791
  }) => {
6265
- const theme = useTheme11();
5792
+ const theme = useTheme10();
6266
5793
  const { user } = useAuthenticationStore();
6267
5794
  const {
6268
5795
  conversations,
@@ -6282,24 +5809,24 @@ var EnhancedMobileConversationsModal = ({
6282
5809
  createProject,
6283
5810
  deleteProject
6284
5811
  } = useProjectStore();
6285
- const [projectManagementOpen, setProjectManagementOpen] = useState12(false);
6286
- const [collapsedProjects, setCollapsedProjects] = useState12(/* @__PURE__ */ new Set());
6287
- const didInitCollapseRef = useRef10(false);
6288
- const [searchQuery, setSearchQuery] = useState12("");
6289
- const [menuAnchorEl, setMenuAnchorEl] = useState12(null);
6290
- const [clearConfirmOpen, setClearConfirmOpen] = useState12(false);
6291
- const [moveModalOpen, setMoveModalOpen] = useState12(false);
6292
- const [conversationToMove, setConversationToMove] = useState12(null);
6293
- const [renameProjectId, setRenameProjectId] = useState12(null);
6294
- const [deletedConversationIds, setDeletedConversationIds] = useState12(/* @__PURE__ */ new Set());
6295
- const [touchDragState, setTouchDragState] = useState12({ conversationId: null, originProjectId: null, hoverProjectId: null });
6296
- const [avatarImage, setAvatarImage] = useState12(BANDIT_AVATAR2);
5812
+ const [projectManagementOpen, setProjectManagementOpen] = useState11(false);
5813
+ const [collapsedProjects, setCollapsedProjects] = useState11(/* @__PURE__ */ new Set());
5814
+ const didInitCollapseRef = useRef9(false);
5815
+ const [searchQuery, setSearchQuery] = useState11("");
5816
+ const [menuAnchorEl, setMenuAnchorEl] = useState11(null);
5817
+ const [clearConfirmOpen, setClearConfirmOpen] = useState11(false);
5818
+ const [moveModalOpen, setMoveModalOpen] = useState11(false);
5819
+ const [conversationToMove, setConversationToMove] = useState11(null);
5820
+ const [renameProjectId, setRenameProjectId] = useState11(null);
5821
+ const [deletedConversationIds, setDeletedConversationIds] = useState11(/* @__PURE__ */ new Set());
5822
+ const [touchDragState, setTouchDragState] = useState11({ conversationId: null, originProjectId: null, hoverProjectId: null });
5823
+ const [avatarImage, setAvatarImage] = useState11(BANDIT_AVATAR2);
6297
5824
  const getCustomClaim = useCallback5((key) => {
6298
5825
  if (!user) return void 0;
6299
5826
  const record = user;
6300
5827
  return coerceOptionalString2(record[key]);
6301
5828
  }, [user]);
6302
- const userDisplayName = useMemo3(() => {
5829
+ const userDisplayName = useMemo2(() => {
6303
5830
  if (!user) return void 0;
6304
5831
  const candidateFields = [
6305
5832
  coerceOptionalString2(user.name),
@@ -6314,7 +5841,7 @@ var EnhancedMobileConversationsModal = ({
6314
5841
  if (trimmedEmail) return trimmedEmail;
6315
5842
  return user.sub;
6316
5843
  }, [user, getCustomClaim]);
6317
- const userSecondaryText = useMemo3(() => {
5844
+ const userSecondaryText = useMemo2(() => {
6318
5845
  if (!user) return void 0;
6319
5846
  const trimmedEmail = coerceOptionalString2(user.email);
6320
5847
  if (trimmedEmail && trimmedEmail !== userDisplayName) {
@@ -6326,7 +5853,7 @@ var EnhancedMobileConversationsModal = ({
6326
5853
  }
6327
5854
  return void 0;
6328
5855
  }, [user, userDisplayName]);
6329
- useEffect11(() => {
5856
+ useEffect10(() => {
6330
5857
  const fetchBranding = async () => {
6331
5858
  try {
6332
5859
  const branding = await brandingService_default.getBranding();
@@ -6343,18 +5870,18 @@ var EnhancedMobileConversationsModal = ({
6343
5870
  }
6344
5871
  }, [open]);
6345
5872
  const avatarLabel = userDisplayName || user?.email || "Bandit";
6346
- const avatarInitials = useMemo3(() => deriveInitials2(avatarLabel), [avatarLabel]);
5873
+ const avatarInitials = useMemo2(() => deriveInitials2(avatarLabel), [avatarLabel]);
6347
5874
  const buildSnippet = (text, query, idx) => {
6348
5875
  const start = Math.max(0, idx - 40);
6349
5876
  const end = Math.min(text.length, idx + query.length + 60);
6350
5877
  return text.slice(start, end).replace(/\s+/g, " ").trim();
6351
5878
  };
6352
- useEffect11(() => {
5879
+ useEffect10(() => {
6353
5880
  if (open && !projectsHydrated) {
6354
5881
  hydrateProjects();
6355
5882
  }
6356
5883
  }, [open, projectsHydrated, hydrateProjects]);
6357
- useEffect11(() => {
5884
+ useEffect10(() => {
6358
5885
  if (projectsHydrated && !didInitCollapseRef.current) {
6359
5886
  didInitCollapseRef.current = true;
6360
5887
  if (projects && projects.length > 0) {
@@ -6362,7 +5889,7 @@ var EnhancedMobileConversationsModal = ({
6362
5889
  }
6363
5890
  }
6364
5891
  }, [projectsHydrated, projects]);
6365
- const projectGroups = useMemo3(() => {
5892
+ const projectGroups = useMemo2(() => {
6366
5893
  const visibleConversations = conversations.filter(
6367
5894
  (conversation) => !deletedConversationIds.has(conversation.id)
6368
5895
  );
@@ -6388,11 +5915,11 @@ var EnhancedMobileConversationsModal = ({
6388
5915
  }
6389
5916
  return groups.filter((group) => group.conversations.length > 0 || group.id !== null);
6390
5917
  }, [projects, conversations, collapsedProjects, deletedConversationIds]);
6391
- const visibleConversationCount = useMemo3(
5918
+ const visibleConversationCount = useMemo2(
6392
5919
  () => projectGroups.reduce((total, group) => total + group.conversations.length, 0),
6393
5920
  [projectGroups]
6394
5921
  );
6395
- const filteredProjectGroups = useMemo3(() => {
5922
+ const filteredProjectGroups = useMemo2(() => {
6396
5923
  if (!searchQuery.trim()) return projectGroups;
6397
5924
  const query = searchQuery.toLowerCase();
6398
5925
  return projectGroups.map((group) => {
@@ -6468,11 +5995,11 @@ var EnhancedMobileConversationsModal = ({
6468
5995
  return { conversationId: null, originProjectId: null, hoverProjectId: null };
6469
5996
  });
6470
5997
  }, [getProjectIdFromPoint, moveConversationToProject]);
6471
- const activeDragConversation = useMemo3(() => {
5998
+ const activeDragConversation = useMemo2(() => {
6472
5999
  if (!touchDragState.conversationId) return null;
6473
6000
  return conversations.find((conv) => conv.id === touchDragState.conversationId) || null;
6474
6001
  }, [touchDragState.conversationId, conversations]);
6475
- const activeHoverLabel = useMemo3(() => {
6002
+ const activeHoverLabel = useMemo2(() => {
6476
6003
  if (!touchDragState.hoverProjectId) return "";
6477
6004
  if (touchDragState.hoverProjectId === "__ungrouped") return "Ungrouped";
6478
6005
  const project = projects.find((p) => p.id === touchDragState.hoverProjectId);
@@ -6521,7 +6048,7 @@ var EnhancedMobileConversationsModal = ({
6521
6048
  setMoveModalOpen(false);
6522
6049
  setConversationToMove(null);
6523
6050
  };
6524
- useEffect11(() => {
6051
+ useEffect10(() => {
6525
6052
  setDeletedConversationIds((prev) => {
6526
6053
  let changed = false;
6527
6054
  const active = new Set(conversations.map((conv) => conv.id));
@@ -6536,8 +6063,8 @@ var EnhancedMobileConversationsModal = ({
6536
6063
  return changed ? next : prev;
6537
6064
  });
6538
6065
  }, [conversations]);
6539
- return /* @__PURE__ */ jsxs10(Fragment7, { children: [
6540
- /* @__PURE__ */ jsx13(
6066
+ return /* @__PURE__ */ jsxs9(Fragment7, { children: [
6067
+ /* @__PURE__ */ jsx12(
6541
6068
  Modal2,
6542
6069
  {
6543
6070
  open,
@@ -6546,8 +6073,8 @@ var EnhancedMobileConversationsModal = ({
6546
6073
  display: "flex",
6547
6074
  alignItems: "flex-end"
6548
6075
  },
6549
- children: /* @__PURE__ */ jsx13(Slide, { direction: "up", in: open, children: /* @__PURE__ */ jsxs10(
6550
- Box10,
6076
+ children: /* @__PURE__ */ jsx12(Slide, { direction: "up", in: open, children: /* @__PURE__ */ jsxs9(
6077
+ Box9,
6551
6078
  {
6552
6079
  sx: {
6553
6080
  width: "100%",
@@ -6560,7 +6087,7 @@ var EnhancedMobileConversationsModal = ({
6560
6087
  overflow: "hidden"
6561
6088
  },
6562
6089
  children: [
6563
- /* @__PURE__ */ jsx13(
6090
+ /* @__PURE__ */ jsx12(
6564
6091
  AppBar,
6565
6092
  {
6566
6093
  position: "static",
@@ -6570,9 +6097,9 @@ var EnhancedMobileConversationsModal = ({
6570
6097
  color: theme.palette.text.primary,
6571
6098
  borderBottom: `1px solid ${theme.palette.divider}`
6572
6099
  },
6573
- children: /* @__PURE__ */ jsxs10(Toolbar, { children: [
6574
- /* @__PURE__ */ jsx13(Typography7, { variant: "h6", sx: { flex: 1, fontWeight: 600 }, children: "Conversations" }),
6575
- visibleConversationCount > 0 && /* @__PURE__ */ jsx13(
6100
+ children: /* @__PURE__ */ jsxs9(Toolbar, { children: [
6101
+ /* @__PURE__ */ jsx12(Typography7, { variant: "h6", sx: { flex: 1, fontWeight: 600 }, children: "Conversations" }),
6102
+ visibleConversationCount > 0 && /* @__PURE__ */ jsx12(
6576
6103
  Chip3,
6577
6104
  {
6578
6105
  label: visibleConversationCount,
@@ -6585,34 +6112,34 @@ var EnhancedMobileConversationsModal = ({
6585
6112
  }
6586
6113
  }
6587
6114
  ),
6588
- /* @__PURE__ */ jsx13(
6589
- IconButton9,
6115
+ /* @__PURE__ */ jsx12(
6116
+ IconButton8,
6590
6117
  {
6591
6118
  onClick: () => setProjectManagementOpen(true),
6592
6119
  sx: { color: theme.palette.text.secondary },
6593
- children: /* @__PURE__ */ jsx13(FolderIcon5, {})
6120
+ children: /* @__PURE__ */ jsx12(FolderIcon5, {})
6594
6121
  }
6595
6122
  ),
6596
- /* @__PURE__ */ jsx13(
6597
- IconButton9,
6123
+ /* @__PURE__ */ jsx12(
6124
+ IconButton8,
6598
6125
  {
6599
6126
  onClick: handleMenuOpen,
6600
6127
  sx: { color: theme.palette.text.secondary },
6601
- children: /* @__PURE__ */ jsx13(MoreVertIcon4, {})
6128
+ children: /* @__PURE__ */ jsx12(MoreVertIcon4, {})
6602
6129
  }
6603
6130
  ),
6604
- /* @__PURE__ */ jsx13(
6605
- IconButton9,
6131
+ /* @__PURE__ */ jsx12(
6132
+ IconButton8,
6606
6133
  {
6607
6134
  onClick: onClose,
6608
6135
  sx: { color: theme.palette.text.secondary },
6609
- children: /* @__PURE__ */ jsx13(CloseIcon6, {})
6136
+ children: /* @__PURE__ */ jsx12(CloseIcon6, {})
6610
6137
  }
6611
6138
  )
6612
6139
  ] })
6613
6140
  }
6614
6141
  ),
6615
- /* @__PURE__ */ jsx13(Box10, { sx: { p: 2, pb: 1 }, children: /* @__PURE__ */ jsx13(
6142
+ /* @__PURE__ */ jsx12(Box9, { sx: { p: 2, pb: 1 }, children: /* @__PURE__ */ jsx12(
6616
6143
  TextField6,
6617
6144
  {
6618
6145
  fullWidth: true,
@@ -6622,22 +6149,22 @@ var EnhancedMobileConversationsModal = ({
6622
6149
  onChange: (e) => setSearchQuery(e.target.value),
6623
6150
  variant: "outlined",
6624
6151
  InputProps: {
6625
- startAdornment: /* @__PURE__ */ jsx13(InputAdornment2, { position: "start", children: /* @__PURE__ */ jsx13(SearchIcon2, { fontSize: "small", sx: { color: theme.palette.text.secondary } }) }),
6626
- endAdornment: searchQuery && /* @__PURE__ */ jsx13(InputAdornment2, { position: "end", children: /* @__PURE__ */ jsx13(
6627
- IconButton9,
6152
+ startAdornment: /* @__PURE__ */ jsx12(InputAdornment2, { position: "start", children: /* @__PURE__ */ jsx12(SearchIcon2, { fontSize: "small", sx: { color: theme.palette.text.secondary } }) }),
6153
+ endAdornment: searchQuery && /* @__PURE__ */ jsx12(InputAdornment2, { position: "end", children: /* @__PURE__ */ jsx12(
6154
+ IconButton8,
6628
6155
  {
6629
6156
  onClick: handleSearchClear,
6630
6157
  size: "small",
6631
6158
  edge: "end",
6632
6159
  sx: { color: theme.palette.text.secondary },
6633
- children: /* @__PURE__ */ jsx13(ClearIcon2, { fontSize: "small" })
6160
+ children: /* @__PURE__ */ jsx12(ClearIcon2, { fontSize: "small" })
6634
6161
  }
6635
6162
  ) })
6636
6163
  }
6637
6164
  }
6638
6165
  ) }),
6639
- /* @__PURE__ */ jsxs10(
6640
- Box10,
6166
+ /* @__PURE__ */ jsxs9(
6167
+ Box9,
6641
6168
  {
6642
6169
  sx: {
6643
6170
  flex: 1,
@@ -6648,8 +6175,8 @@ var EnhancedMobileConversationsModal = ({
6648
6175
  pb: 2
6649
6176
  },
6650
6177
  children: [
6651
- touchDragActive && activeDragConversation && /* @__PURE__ */ jsxs10(
6652
- Box10,
6178
+ touchDragActive && activeDragConversation && /* @__PURE__ */ jsxs9(
6179
+ Box9,
6653
6180
  {
6654
6181
  sx: {
6655
6182
  position: "absolute",
@@ -6658,13 +6185,13 @@ var EnhancedMobileConversationsModal = ({
6658
6185
  transform: "translate(-50%, -100%)",
6659
6186
  zIndex: theme.zIndex.modal + 10,
6660
6187
  pointerEvents: "none",
6661
- bgcolor: theme.palette.mode === "dark" ? alpha7(theme.palette.common.black, 0.82) : alpha7(theme.palette.common.white, 0.95),
6188
+ bgcolor: theme.palette.mode === "dark" ? alpha6(theme.palette.common.black, 0.82) : alpha6(theme.palette.common.white, 0.95),
6662
6189
  color: theme.palette.mode === "dark" ? theme.palette.common.white : theme.palette.text.primary,
6663
- border: `1px solid ${theme.palette.mode === "dark" ? alpha7(theme.palette.common.white, 0.25) : alpha7(theme.palette.common.black, 0.2)}`,
6190
+ border: `1px solid ${theme.palette.mode === "dark" ? alpha6(theme.palette.common.white, 0.25) : alpha6(theme.palette.common.black, 0.2)}`,
6664
6191
  borderRadius: 999,
6665
6192
  px: 2,
6666
6193
  py: 0.75,
6667
- boxShadow: `0 16px 32px ${alpha7(theme.palette.common.black, 0.3)}`,
6194
+ boxShadow: `0 16px 32px ${alpha6(theme.palette.common.black, 0.3)}`,
6668
6195
  display: "flex",
6669
6196
  alignItems: "center",
6670
6197
  gap: 1,
@@ -6674,7 +6201,7 @@ var EnhancedMobileConversationsModal = ({
6674
6201
  overflow: "hidden"
6675
6202
  },
6676
6203
  children: [
6677
- /* @__PURE__ */ jsxs10(
6204
+ /* @__PURE__ */ jsxs9(
6678
6205
  Typography7,
6679
6206
  {
6680
6207
  variant: "caption",
@@ -6687,8 +6214,8 @@ var EnhancedMobileConversationsModal = ({
6687
6214
  },
6688
6215
  children: [
6689
6216
  "Move",
6690
- /* @__PURE__ */ jsxs10(
6691
- Box10,
6217
+ /* @__PURE__ */ jsxs9(
6218
+ Box9,
6692
6219
  {
6693
6220
  component: "span",
6694
6221
  sx: {
@@ -6708,7 +6235,7 @@ var EnhancedMobileConversationsModal = ({
6708
6235
  ]
6709
6236
  }
6710
6237
  ),
6711
- /* @__PURE__ */ jsx13(
6238
+ /* @__PURE__ */ jsx12(
6712
6239
  Typography7,
6713
6240
  {
6714
6241
  variant: "caption",
@@ -6717,11 +6244,11 @@ var EnhancedMobileConversationsModal = ({
6717
6244
  fontWeight: 500,
6718
6245
  whiteSpace: "nowrap"
6719
6246
  },
6720
- children: activeHoverLabel ? /* @__PURE__ */ jsxs10(Fragment7, { children: [
6247
+ children: activeHoverLabel ? /* @__PURE__ */ jsxs9(Fragment7, { children: [
6721
6248
  "to",
6722
6249
  " ",
6723
- /* @__PURE__ */ jsx13(
6724
- Box10,
6250
+ /* @__PURE__ */ jsx12(
6251
+ Box9,
6725
6252
  {
6726
6253
  component: "span",
6727
6254
  sx: {
@@ -6737,8 +6264,8 @@ var EnhancedMobileConversationsModal = ({
6737
6264
  ]
6738
6265
  }
6739
6266
  ),
6740
- /* @__PURE__ */ jsxs10(
6741
- Box10,
6267
+ /* @__PURE__ */ jsxs9(
6268
+ Box9,
6742
6269
  {
6743
6270
  onClick: async () => {
6744
6271
  const names = new Set(projects.map((p) => p.name));
@@ -6769,26 +6296,26 @@ var EnhancedMobileConversationsModal = ({
6769
6296
  alignItems: "center",
6770
6297
  gap: 1.5,
6771
6298
  cursor: "pointer",
6772
- "&:hover": { bgcolor: alpha7(theme.palette.text.primary, 0.04) }
6299
+ "&:hover": { bgcolor: alpha6(theme.palette.text.primary, 0.04) }
6773
6300
  },
6774
6301
  children: [
6775
- /* @__PURE__ */ jsx13(
6776
- Box10,
6302
+ /* @__PURE__ */ jsx12(
6303
+ Box9,
6777
6304
  {
6778
6305
  sx: {
6779
6306
  width: 28,
6780
6307
  height: 28,
6781
6308
  borderRadius: "50%",
6782
- bgcolor: alpha7(theme.palette.success.main, 0.15),
6309
+ bgcolor: alpha6(theme.palette.success.main, 0.15),
6783
6310
  display: "flex",
6784
6311
  alignItems: "center",
6785
6312
  justifyContent: "center",
6786
6313
  flexShrink: 0
6787
6314
  },
6788
- children: /* @__PURE__ */ jsx13(FolderIcon5, { fontSize: "small", sx: { color: theme.palette.success.main } })
6315
+ children: /* @__PURE__ */ jsx12(FolderIcon5, { fontSize: "small", sx: { color: theme.palette.success.main } })
6789
6316
  }
6790
6317
  ),
6791
- /* @__PURE__ */ jsx13(
6318
+ /* @__PURE__ */ jsx12(
6792
6319
  Typography7,
6793
6320
  {
6794
6321
  variant: "subtitle2",
@@ -6796,14 +6323,14 @@ var EnhancedMobileConversationsModal = ({
6796
6323
  children: "New Project"
6797
6324
  }
6798
6325
  ),
6799
- /* @__PURE__ */ jsx13(IconButton9, { size: "small", sx: { color: theme.palette.success.main }, children: /* @__PURE__ */ jsx13(AddIcon4, { fontSize: "small" }) })
6326
+ /* @__PURE__ */ jsx12(IconButton8, { size: "small", sx: { color: theme.palette.success.main }, children: /* @__PURE__ */ jsx12(AddIcon4, { fontSize: "small" }) })
6800
6327
  ]
6801
6328
  }
6802
6329
  ),
6803
- /* @__PURE__ */ jsx13(Divider3, { sx: { opacity: 0.3 } }),
6804
- filteredProjectGroups.map((group, index) => /* @__PURE__ */ jsxs10(Box10, { children: [
6805
- group.id === null && filteredProjectGroups.length > 1 && /* @__PURE__ */ jsxs10(
6806
- Box10,
6330
+ /* @__PURE__ */ jsx12(Divider3, { sx: { opacity: 0.3 } }),
6331
+ filteredProjectGroups.map((group, index) => /* @__PURE__ */ jsxs9(Box9, { children: [
6332
+ group.id === null && filteredProjectGroups.length > 1 && /* @__PURE__ */ jsxs9(
6333
+ Box9,
6807
6334
  {
6808
6335
  sx: {
6809
6336
  py: 2,
@@ -6813,9 +6340,9 @@ var EnhancedMobileConversationsModal = ({
6813
6340
  gap: 2
6814
6341
  },
6815
6342
  children: [
6816
- /* @__PURE__ */ jsx13(Divider3, { sx: { flex: 1, opacity: 0.6 } }),
6817
- /* @__PURE__ */ jsxs10(Box10, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
6818
- /* @__PURE__ */ jsx13(
6343
+ /* @__PURE__ */ jsx12(Divider3, { sx: { flex: 1, opacity: 0.6 } }),
6344
+ /* @__PURE__ */ jsxs9(Box9, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
6345
+ /* @__PURE__ */ jsx12(
6819
6346
  InboxIcon4,
6820
6347
  {
6821
6348
  sx: {
@@ -6825,7 +6352,7 @@ var EnhancedMobileConversationsModal = ({
6825
6352
  }
6826
6353
  }
6827
6354
  ),
6828
- /* @__PURE__ */ jsx13(
6355
+ /* @__PURE__ */ jsx12(
6829
6356
  Typography7,
6830
6357
  {
6831
6358
  variant: "caption",
@@ -6840,12 +6367,12 @@ var EnhancedMobileConversationsModal = ({
6840
6367
  }
6841
6368
  )
6842
6369
  ] }),
6843
- /* @__PURE__ */ jsx13(Divider3, { sx: { flex: 1, opacity: 0.6 } })
6370
+ /* @__PURE__ */ jsx12(Divider3, { sx: { flex: 1, opacity: 0.6 } })
6844
6371
  ]
6845
6372
  }
6846
6373
  ),
6847
- group.id !== null ? /* @__PURE__ */ jsxs10(Fragment7, { children: [
6848
- /* @__PURE__ */ jsx13(
6374
+ group.id !== null ? /* @__PURE__ */ jsxs9(Fragment7, { children: [
6375
+ /* @__PURE__ */ jsx12(
6849
6376
  project_header_default,
6850
6377
  {
6851
6378
  projectId: group.id,
@@ -6875,8 +6402,8 @@ var EnhancedMobileConversationsModal = ({
6875
6402
  isTouchTarget: touchDragActive && touchDragState.hoverProjectId === group.id
6876
6403
  }
6877
6404
  ),
6878
- /* @__PURE__ */ jsx13(Collapse3, { in: !group.collapsed, children: /* @__PURE__ */ jsx13(
6879
- Box10,
6405
+ /* @__PURE__ */ jsx12(Collapse3, { in: !group.collapsed, children: /* @__PURE__ */ jsx12(
6406
+ Box9,
6880
6407
  {
6881
6408
  "data-project-id": group.id ?? "__ungrouped",
6882
6409
  sx: {
@@ -6884,9 +6411,9 @@ var EnhancedMobileConversationsModal = ({
6884
6411
  border: touchDragActive && touchDragState.hoverProjectId === group.id ? `2px dashed ${theme.palette.primary.main}` : "1px solid transparent",
6885
6412
  borderRadius: touchDragActive && touchDragState.hoverProjectId === group.id ? 2 : 0,
6886
6413
  transition: "border 0.2s ease, background-color 0.2s ease",
6887
- backgroundColor: touchDragActive && touchDragState.hoverProjectId === group.id ? alpha7(theme.palette.primary.main, 0.08) : "transparent"
6414
+ backgroundColor: touchDragActive && touchDragState.hoverProjectId === group.id ? alpha6(theme.palette.primary.main, 0.08) : "transparent"
6888
6415
  },
6889
- children: group.conversations.map((conversation) => /* @__PURE__ */ jsx13(
6416
+ children: group.conversations.map((conversation) => /* @__PURE__ */ jsx12(
6890
6417
  simple_conversation_item_default,
6891
6418
  {
6892
6419
  conversation,
@@ -6920,24 +6447,24 @@ var EnhancedMobileConversationsModal = ({
6920
6447
  ) })
6921
6448
  ] }) : (
6922
6449
  // Special handling for ungrouped - no header, just conversations in scrollable area
6923
- /* @__PURE__ */ jsx13(
6924
- Box10,
6450
+ /* @__PURE__ */ jsx12(
6451
+ Box9,
6925
6452
  {
6926
6453
  sx: {
6927
6454
  minHeight: 0,
6928
6455
  overflow: "auto",
6929
6456
  px: 1,
6930
6457
  py: 1,
6931
- bgcolor: alpha7(theme.palette.background.default, 0.3),
6458
+ bgcolor: alpha6(theme.palette.background.default, 0.3),
6932
6459
  borderRadius: "8px 8px 0 0",
6933
6460
  mx: 1,
6934
6461
  mb: 1,
6935
6462
  border: touchDragActive && touchDragState.hoverProjectId === "__ungrouped" ? `2px dashed ${theme.palette.primary.main}` : "1px solid transparent",
6936
6463
  transition: "border 0.2s ease, background-color 0.2s ease",
6937
- backgroundColor: touchDragActive && touchDragState.hoverProjectId === "__ungrouped" ? alpha7(theme.palette.primary.main, 0.08) : alpha7(theme.palette.background.default, 0.3)
6464
+ backgroundColor: touchDragActive && touchDragState.hoverProjectId === "__ungrouped" ? alpha6(theme.palette.primary.main, 0.08) : alpha6(theme.palette.background.default, 0.3)
6938
6465
  },
6939
6466
  "data-project-id": "__ungrouped",
6940
- children: group.conversations.map((conversation) => /* @__PURE__ */ jsx13(
6467
+ children: group.conversations.map((conversation) => /* @__PURE__ */ jsx12(
6941
6468
  simple_conversation_item_default,
6942
6469
  {
6943
6470
  conversation,
@@ -6971,8 +6498,8 @@ var EnhancedMobileConversationsModal = ({
6971
6498
  )
6972
6499
  )
6973
6500
  ] }, group.id || "ungrouped")),
6974
- filteredProjectGroups.length === 0 && /* @__PURE__ */ jsxs10(
6975
- Box10,
6501
+ filteredProjectGroups.length === 0 && /* @__PURE__ */ jsxs9(
6502
+ Box9,
6976
6503
  {
6977
6504
  sx: {
6978
6505
  flex: 1,
@@ -6985,31 +6512,31 @@ var EnhancedMobileConversationsModal = ({
6985
6512
  color: theme.palette.text.secondary
6986
6513
  },
6987
6514
  children: [
6988
- /* @__PURE__ */ jsx13(Typography7, { variant: "h6", sx: { mb: 1 }, children: searchQuery ? "No conversations found" : "No conversations yet" }),
6989
- /* @__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" })
6515
+ /* @__PURE__ */ jsx12(Typography7, { variant: "h6", sx: { mb: 1 }, children: searchQuery ? "No conversations found" : "No conversations yet" }),
6516
+ /* @__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" })
6990
6517
  ]
6991
6518
  }
6992
6519
  )
6993
6520
  ]
6994
6521
  }
6995
6522
  ),
6996
- /* @__PURE__ */ jsxs10(
6997
- Box10,
6523
+ /* @__PURE__ */ jsxs9(
6524
+ Box9,
6998
6525
  {
6999
6526
  sx: {
7000
6527
  mt: "auto",
7001
6528
  px: 2,
7002
6529
  py: 1.75,
7003
- borderTop: `1px solid ${alpha7(theme.palette.divider, 0.6)}`,
6530
+ borderTop: `1px solid ${alpha6(theme.palette.divider, 0.6)}`,
7004
6531
  display: "flex",
7005
6532
  alignItems: "center",
7006
6533
  justifyContent: "center",
7007
6534
  gap: 1.25,
7008
- bgcolor: alpha7(theme.palette.background.default, 0.88),
6535
+ bgcolor: alpha6(theme.palette.background.default, 0.88),
7009
6536
  flexWrap: "wrap"
7010
6537
  },
7011
6538
  children: [
7012
- /* @__PURE__ */ jsx13(
6539
+ /* @__PURE__ */ jsx12(
7013
6540
  Avatar7,
7014
6541
  {
7015
6542
  src: avatarImage,
@@ -7018,14 +6545,14 @@ var EnhancedMobileConversationsModal = ({
7018
6545
  width: 40,
7019
6546
  height: 40,
7020
6547
  fontSize: "1rem",
7021
- bgcolor: alpha7(theme.palette.primary.main, 0.12),
6548
+ bgcolor: alpha6(theme.palette.primary.main, 0.12),
7022
6549
  color: theme.palette.primary.main
7023
6550
  },
7024
6551
  children: avatarInitials
7025
6552
  }
7026
6553
  ),
7027
- /* @__PURE__ */ jsxs10(Box10, { sx: { display: "flex", flexDirection: "column", alignItems: "center", gap: 0.5, minWidth: 0 }, children: [
7028
- /* @__PURE__ */ jsx13(
6554
+ /* @__PURE__ */ jsxs9(Box9, { sx: { display: "flex", flexDirection: "column", alignItems: "center", gap: 0.5, minWidth: 0 }, children: [
6555
+ /* @__PURE__ */ jsx12(
7029
6556
  Typography7,
7030
6557
  {
7031
6558
  variant: "subtitle2",
@@ -7034,7 +6561,7 @@ var EnhancedMobileConversationsModal = ({
7034
6561
  children: user ? userDisplayName : "Not signed in"
7035
6562
  }
7036
6563
  ),
7037
- !user && /* @__PURE__ */ jsx13(
6564
+ !user && /* @__PURE__ */ jsx12(
7038
6565
  Typography7,
7039
6566
  {
7040
6567
  variant: "caption",
@@ -7052,14 +6579,14 @@ var EnhancedMobileConversationsModal = ({
7052
6579
  ) })
7053
6580
  }
7054
6581
  ),
7055
- /* @__PURE__ */ jsx13(
6582
+ /* @__PURE__ */ jsx12(
7056
6583
  project_management_modal_default,
7057
6584
  {
7058
6585
  open: projectManagementOpen,
7059
6586
  onClose: () => setProjectManagementOpen(false)
7060
6587
  }
7061
6588
  ),
7062
- conversationToMove && /* @__PURE__ */ jsx13(
6589
+ conversationToMove && /* @__PURE__ */ jsx12(
7063
6590
  move_conversation_modal_default,
7064
6591
  {
7065
6592
  open: moveModalOpen,
@@ -7068,7 +6595,7 @@ var EnhancedMobileConversationsModal = ({
7068
6595
  currentProjectId: conversationToMove.projectId
7069
6596
  }
7070
6597
  ),
7071
- /* @__PURE__ */ jsx13(
6598
+ /* @__PURE__ */ jsx12(
7072
6599
  Menu4,
7073
6600
  {
7074
6601
  anchorEl: menuAnchorEl,
@@ -7082,7 +6609,7 @@ var EnhancedMobileConversationsModal = ({
7082
6609
  vertical: "bottom",
7083
6610
  horizontal: "right"
7084
6611
  },
7085
- children: /* @__PURE__ */ jsxs10(
6612
+ children: /* @__PURE__ */ jsxs9(
7086
6613
  MenuItem4,
7087
6614
  {
7088
6615
  onClick: () => {
@@ -7092,14 +6619,14 @@ var EnhancedMobileConversationsModal = ({
7092
6619
  disabled: visibleConversationCount === 0,
7093
6620
  sx: { color: theme.palette.error.main },
7094
6621
  children: [
7095
- /* @__PURE__ */ jsx13(ListItemIcon4, { children: /* @__PURE__ */ jsx13(DeleteSweepIcon2, { fontSize: "small", sx: { color: theme.palette.error.main } }) }),
7096
- /* @__PURE__ */ jsx13(ListItemText4, { children: "Clear All Conversations" })
6622
+ /* @__PURE__ */ jsx12(ListItemIcon4, { children: /* @__PURE__ */ jsx12(DeleteSweepIcon2, { fontSize: "small", sx: { color: theme.palette.error.main } }) }),
6623
+ /* @__PURE__ */ jsx12(ListItemText4, { children: "Clear All Conversations" })
7097
6624
  ]
7098
6625
  }
7099
6626
  )
7100
6627
  }
7101
6628
  ),
7102
- /* @__PURE__ */ jsxs10(
6629
+ /* @__PURE__ */ jsxs9(
7103
6630
  Dialog4,
7104
6631
  {
7105
6632
  open: clearConfirmOpen,
@@ -7107,11 +6634,11 @@ var EnhancedMobileConversationsModal = ({
7107
6634
  maxWidth: "sm",
7108
6635
  fullWidth: true,
7109
6636
  children: [
7110
- /* @__PURE__ */ jsx13(DialogTitle4, { children: "Clear All Conversations?" }),
7111
- /* @__PURE__ */ jsx13(DialogContent4, { children: /* @__PURE__ */ jsx13(Typography7, { children: visibleConversationCount === 0 ? "No conversations available to clear." : `This will permanently delete ${visibleConversationCount} conversation${visibleConversationCount === 1 ? "" : "s"} and cannot be undone.` }) }),
7112
- /* @__PURE__ */ jsxs10(DialogActions4, { children: [
7113
- /* @__PURE__ */ jsx13(Button5, { onClick: () => setClearConfirmOpen(false), children: "Cancel" }),
7114
- /* @__PURE__ */ jsx13(
6637
+ /* @__PURE__ */ jsx12(DialogTitle4, { children: "Clear All Conversations?" }),
6638
+ /* @__PURE__ */ jsx12(DialogContent4, { children: /* @__PURE__ */ jsx12(Typography7, { children: visibleConversationCount === 0 ? "No conversations available to clear." : `This will permanently delete ${visibleConversationCount} conversation${visibleConversationCount === 1 ? "" : "s"} and cannot be undone.` }) }),
6639
+ /* @__PURE__ */ jsxs9(DialogActions4, { children: [
6640
+ /* @__PURE__ */ jsx12(Button5, { onClick: () => setClearConfirmOpen(false), children: "Cancel" }),
6641
+ /* @__PURE__ */ jsx12(
7115
6642
  Button5,
7116
6643
  {
7117
6644
  onClick: handleClearAllConfirm,
@@ -7130,7 +6657,7 @@ var enhanced_mobile_conversations_modal_default = EnhancedMobileConversationsMod
7130
6657
 
7131
6658
  // src/chat/chat-app-bar.tsx
7132
6659
  import { shallow as shallow2 } from "zustand/shallow";
7133
- import { Fragment as Fragment8, jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
6660
+ import { Fragment as Fragment8, jsx as jsx13, jsxs as jsxs10 } from "react/jsx-runtime";
7134
6661
  var CDN_BASE = "https://cdn.burtson.ai/";
7135
6662
  var banditHead = `${CDN_BASE}/images/bandit-head.png`;
7136
6663
  var modelAvatars = {
@@ -7149,9 +6676,9 @@ var ChatAppBar = ({
7149
6676
  drawerOpen,
7150
6677
  setDrawerOpen
7151
6678
  }) => {
7152
- const theme = useTheme12();
6679
+ const theme = useTheme11();
7153
6680
  const isMobile = useMediaQuery5(theme.breakpoints.down("sm"));
7154
- const hasLoggedRouterWarningRef = useRef11(false);
6681
+ const hasLoggedRouterWarningRef = useRef10(false);
7155
6682
  let navigate = null;
7156
6683
  try {
7157
6684
  navigate = useNavigate();
@@ -7177,11 +6704,11 @@ var ChatAppBar = ({
7177
6704
  menuBackground,
7178
6705
  menuText
7179
6706
  } = theme.palette.chat.appBar;
7180
- const [modelAnchorEl, setModelAnchorEl] = useState13(null);
7181
- const [voiceAnchorEl, setVoiceAnchorEl] = useState13(null);
7182
- const [modalOpen, setModalOpen] = useState13(false);
7183
- const [confirmModelChangeOpen, setConfirmModelChangeOpen] = useState13(false);
7184
- const [pendingModel, setPendingModel] = useState13(null);
6707
+ const [modelAnchorEl, setModelAnchorEl] = useState12(null);
6708
+ const [voiceAnchorEl, setVoiceAnchorEl] = useState12(null);
6709
+ const [modalOpen, setModalOpen] = useState12(false);
6710
+ const [confirmModelChangeOpen, setConfirmModelChangeOpen] = useState12(false);
6711
+ const [pendingModel, setPendingModel] = useState12(null);
7185
6712
  const { conversations, currentId, createNewConversation, _hasHydrated } = useConversationStore();
7186
6713
  const { preferences } = usePreferencesStore();
7187
6714
  const { settings: packageSettings } = usePackageSettingsStore();
@@ -7207,7 +6734,7 @@ var ChatAppBar = ({
7207
6734
  triggerSync: state.runSync,
7208
6735
  setSyncEnabled: state.setSyncEnabled
7209
6736
  }), shallow2);
7210
- useEffect12(() => {
6737
+ useEffect11(() => {
7211
6738
  if (isPlaygroundMode2 && syncEnabled) {
7212
6739
  void setSyncEnabled(false).catch((error) => {
7213
6740
  debugLogger.warn("ChatAppBar: Failed to disable sync in playground", {
@@ -7225,16 +6752,16 @@ var ChatAppBar = ({
7225
6752
  };
7226
6753
  const syncIndicatorIcon = (() => {
7227
6754
  if (isPlaygroundMode2 || !syncEnabled) {
7228
- return /* @__PURE__ */ jsx14(CloudOffIcon, { fontSize: "small", color: "disabled" });
6755
+ return /* @__PURE__ */ jsx13(CloudOffIcon, { fontSize: "small", color: "disabled" });
7229
6756
  }
7230
6757
  switch (syncStatus) {
7231
6758
  case "syncing":
7232
- return /* @__PURE__ */ jsx14(SyncIcon, { fontSize: "small", sx: syncSpinSx, color: "primary" });
6759
+ return /* @__PURE__ */ jsx13(SyncIcon, { fontSize: "small", sx: syncSpinSx, color: "primary" });
7233
6760
  case "error":
7234
- return /* @__PURE__ */ jsx14(ErrorOutlineIcon, { fontSize: "small", color: "error" });
6761
+ return /* @__PURE__ */ jsx13(ErrorOutlineIcon, { fontSize: "small", color: "error" });
7235
6762
  case "idle":
7236
6763
  default:
7237
- return /* @__PURE__ */ jsx14(CloudDoneIcon, { fontSize: "small", color: "success" });
6764
+ return /* @__PURE__ */ jsx13(CloudDoneIcon, { fontSize: "small", color: "success" });
7238
6765
  }
7239
6766
  })();
7240
6767
  const syncTooltip = (() => {
@@ -7330,9 +6857,9 @@ var ChatAppBar = ({
7330
6857
  }
7331
6858
  safeNavigate("/");
7332
6859
  }
7333
- return /* @__PURE__ */ jsxs11(Fragment8, { children: [
7334
- /* @__PURE__ */ jsxs11(
7335
- Box11,
6860
+ return /* @__PURE__ */ jsxs10(Fragment8, { children: [
6861
+ /* @__PURE__ */ jsxs10(
6862
+ Box10,
7336
6863
  {
7337
6864
  sx: {
7338
6865
  position: "fixed",
@@ -7352,8 +6879,8 @@ var ChatAppBar = ({
7352
6879
  }
7353
6880
  },
7354
6881
  children: [
7355
- /* @__PURE__ */ jsxs11(
7356
- Box11,
6882
+ /* @__PURE__ */ jsxs10(
6883
+ Box10,
7357
6884
  {
7358
6885
  sx: {
7359
6886
  display: "flex",
@@ -7373,17 +6900,17 @@ var ChatAppBar = ({
7373
6900
  }
7374
6901
  },
7375
6902
  children: [
7376
- /* @__PURE__ */ jsx14(Tooltip5, { title: homeTooltip, arrow: true, children: /* @__PURE__ */ jsx14(
7377
- IconButton10,
6903
+ /* @__PURE__ */ jsx13(Tooltip4, { title: homeTooltip, arrow: true, children: /* @__PURE__ */ jsx13(
6904
+ IconButton9,
7378
6905
  {
7379
6906
  onClick: goToHome,
7380
6907
  sx: pillButtonStyles,
7381
6908
  "aria-label": "Go to home page",
7382
- children: /* @__PURE__ */ jsx14(HomeIcon, {})
6909
+ children: /* @__PURE__ */ jsx13(HomeIcon, {})
7383
6910
  }
7384
6911
  ) }),
7385
- showLimitedAdminPanel() && /* @__PURE__ */ jsx14(Tooltip5, { title: "Management & Settings", arrow: true, children: /* @__PURE__ */ jsx14(
7386
- IconButton10,
6912
+ showLimitedAdminPanel() && /* @__PURE__ */ jsx13(Tooltip4, { title: "Management & Settings", arrow: true, children: /* @__PURE__ */ jsx13(
6913
+ IconButton9,
7387
6914
  {
7388
6915
  onClick: () => safeNavigate(managementPath),
7389
6916
  sx: {
@@ -7394,11 +6921,11 @@ var ChatAppBar = ({
7394
6921
  }
7395
6922
  },
7396
6923
  "aria-label": "Open management settings",
7397
- children: /* @__PURE__ */ jsx14(SettingsIcon, {})
6924
+ children: /* @__PURE__ */ jsx13(SettingsIcon, {})
7398
6925
  }
7399
6926
  ) }),
7400
- /* @__PURE__ */ jsx14(Tooltip5, { title: syncTooltip, arrow: true, children: /* @__PURE__ */ jsxs11(
7401
- IconButton10,
6927
+ /* @__PURE__ */ jsx13(Tooltip4, { title: syncTooltip, arrow: true, children: /* @__PURE__ */ jsxs10(
6928
+ IconButton9,
7402
6929
  {
7403
6930
  onClick: handleSyncBadgeClick,
7404
6931
  disabled: syncButtonDisabled,
@@ -7413,8 +6940,8 @@ var ChatAppBar = ({
7413
6940
  "aria-label": "Conversation sync status",
7414
6941
  children: [
7415
6942
  syncIndicatorIcon,
7416
- pendingCount > 0 && !syncButtonDisabled && syncStatus !== "syncing" && /* @__PURE__ */ jsx14(
7417
- Box11,
6943
+ pendingCount > 0 && !syncButtonDisabled && syncStatus !== "syncing" && /* @__PURE__ */ jsx13(
6944
+ Box10,
7418
6945
  {
7419
6946
  sx: {
7420
6947
  position: "absolute",
@@ -7439,8 +6966,8 @@ var ChatAppBar = ({
7439
6966
  ]
7440
6967
  }
7441
6968
  ) }),
7442
- !isMobile && /* @__PURE__ */ jsx14(Tooltip5, { title: `${drawerOpen ? "Close" : "Open"} Conversations`, arrow: true, children: /* @__PURE__ */ jsxs11(
7443
- IconButton10,
6969
+ !isMobile && /* @__PURE__ */ jsx13(Tooltip4, { title: `${drawerOpen ? "Close" : "Open"} Conversations`, arrow: true, children: /* @__PURE__ */ jsxs10(
6970
+ IconButton9,
7444
6971
  {
7445
6972
  onClick: () => setDrawerOpen(!drawerOpen),
7446
6973
  sx: {
@@ -7453,9 +6980,9 @@ var ChatAppBar = ({
7453
6980
  "aria-label": `${drawerOpen ? "Close" : "Open"} conversations drawer`,
7454
6981
  "aria-pressed": drawerOpen,
7455
6982
  children: [
7456
- drawerOpen ? /* @__PURE__ */ jsx14(NotesIcon, {}) : /* @__PURE__ */ jsx14(NotesIconOutlined, {}),
7457
- conversations.length > 0 && /* @__PURE__ */ jsx14(
7458
- Box11,
6983
+ drawerOpen ? /* @__PURE__ */ jsx13(NotesIcon, {}) : /* @__PURE__ */ jsx13(NotesIconOutlined, {}),
6984
+ conversations.length > 0 && /* @__PURE__ */ jsx13(
6985
+ Box10,
7459
6986
  {
7460
6987
  sx: {
7461
6988
  position: "absolute",
@@ -7480,8 +7007,8 @@ var ChatAppBar = ({
7480
7007
  ]
7481
7008
  }
7482
7009
  ) }),
7483
- !isMobile && canShowNewConversationButton && /* @__PURE__ */ jsx14(Tooltip5, { title: "Start New Conversation", arrow: true, children: /* @__PURE__ */ jsx14(
7484
- IconButton10,
7010
+ !isMobile && canShowNewConversationButton && /* @__PURE__ */ jsx13(Tooltip4, { title: "Start New Conversation", arrow: true, children: /* @__PURE__ */ jsx13(
7011
+ IconButton9,
7485
7012
  {
7486
7013
  onClick: () => createNewConversation(),
7487
7014
  sx: {
@@ -7494,14 +7021,14 @@ var ChatAppBar = ({
7494
7021
  }
7495
7022
  },
7496
7023
  "aria-label": "Create new conversation",
7497
- children: /* @__PURE__ */ jsx14(AddIcon5, {})
7024
+ children: /* @__PURE__ */ jsx13(AddIcon5, {})
7498
7025
  }
7499
7026
  ) })
7500
7027
  ]
7501
7028
  }
7502
7029
  ),
7503
- /* @__PURE__ */ jsxs11(
7504
- Box11,
7030
+ /* @__PURE__ */ jsxs10(
7031
+ Box10,
7505
7032
  {
7506
7033
  sx: {
7507
7034
  display: "flex",
@@ -7521,8 +7048,8 @@ var ChatAppBar = ({
7521
7048
  }
7522
7049
  },
7523
7050
  children: [
7524
- isMobile && /* @__PURE__ */ jsx14(Tooltip5, { title: `Conversations (${conversations.length})`, arrow: true, children: /* @__PURE__ */ jsxs11(
7525
- IconButton10,
7051
+ isMobile && /* @__PURE__ */ jsx13(Tooltip4, { title: `Conversations (${conversations.length})`, arrow: true, children: /* @__PURE__ */ jsxs10(
7052
+ IconButton9,
7526
7053
  {
7527
7054
  onClick: () => setModalOpen(true),
7528
7055
  sx: {
@@ -7531,9 +7058,9 @@ var ChatAppBar = ({
7531
7058
  },
7532
7059
  "aria-label": `Open conversations modal with ${conversations.length} conversations`,
7533
7060
  children: [
7534
- /* @__PURE__ */ jsx14(NotesIcon, { fontSize: "small" }),
7535
- conversations.length > 0 && /* @__PURE__ */ jsx14(
7536
- Box11,
7061
+ /* @__PURE__ */ jsx13(NotesIcon, { fontSize: "small" }),
7062
+ conversations.length > 0 && /* @__PURE__ */ jsx13(
7063
+ Box10,
7537
7064
  {
7538
7065
  sx: {
7539
7066
  position: "absolute",
@@ -7558,8 +7085,8 @@ var ChatAppBar = ({
7558
7085
  ]
7559
7086
  }
7560
7087
  ) }),
7561
- isMobile && canShowNewConversationButton && /* @__PURE__ */ jsx14(Tooltip5, { title: "Start New Conversation", arrow: true, children: /* @__PURE__ */ jsx14(
7562
- IconButton10,
7088
+ isMobile && canShowNewConversationButton && /* @__PURE__ */ jsx13(Tooltip4, { title: "Start New Conversation", arrow: true, children: /* @__PURE__ */ jsx13(
7089
+ IconButton9,
7563
7090
  {
7564
7091
  onClick: () => {
7565
7092
  createNewConversation();
@@ -7575,11 +7102,11 @@ var ChatAppBar = ({
7575
7102
  }
7576
7103
  },
7577
7104
  "aria-label": "Create new conversation",
7578
- children: /* @__PURE__ */ jsx14(AddIcon5, { fontSize: "small" })
7105
+ children: /* @__PURE__ */ jsx13(AddIcon5, { fontSize: "small" })
7579
7106
  }
7580
7107
  ) }),
7581
- /* @__PURE__ */ jsx14(Tooltip5, { title: `Current AI: ${selectedModel.replace("Bandit-", "")}`, arrow: true, children: /* @__PURE__ */ jsx14(
7582
- IconButton10,
7108
+ /* @__PURE__ */ jsx13(Tooltip4, { title: `Current AI: ${selectedModel.replace("Bandit-", "")}`, arrow: true, children: /* @__PURE__ */ jsx13(
7109
+ IconButton9,
7583
7110
  {
7584
7111
  onClick: (e) => setModelAnchorEl(e.currentTarget),
7585
7112
  sx: {
@@ -7593,7 +7120,7 @@ var ChatAppBar = ({
7593
7120
  }
7594
7121
  },
7595
7122
  "aria-label": `Change AI personality. Currently using ${selectedModel}`,
7596
- children: /* @__PURE__ */ jsx14(
7123
+ children: /* @__PURE__ */ jsx13(
7597
7124
  Avatar8,
7598
7125
  {
7599
7126
  src: currentAvatar,
@@ -7610,7 +7137,7 @@ var ChatAppBar = ({
7610
7137
  )
7611
7138
  }
7612
7139
  ) }),
7613
- /* @__PURE__ */ jsx14(
7140
+ /* @__PURE__ */ jsx13(
7614
7141
  Menu5,
7615
7142
  {
7616
7143
  anchorEl: modelAnchorEl,
@@ -7646,7 +7173,7 @@ var ChatAppBar = ({
7646
7173
  }
7647
7174
  }
7648
7175
  },
7649
- children: availableModels.map((model) => /* @__PURE__ */ jsxs11(
7176
+ children: availableModels.map((model) => /* @__PURE__ */ jsxs10(
7650
7177
  MenuItem5,
7651
7178
  {
7652
7179
  selected: model.name === selectedModel,
@@ -7693,7 +7220,7 @@ var ChatAppBar = ({
7693
7220
  px: 2
7694
7221
  },
7695
7222
  children: [
7696
- /* @__PURE__ */ jsx14(
7223
+ /* @__PURE__ */ jsx13(
7697
7224
  Avatar8,
7698
7225
  {
7699
7226
  src: model.avatarBase64 || modelAvatars[model.name] || banditHead,
@@ -7706,12 +7233,12 @@ var ChatAppBar = ({
7706
7233
  }
7707
7234
  }
7708
7235
  ),
7709
- /* @__PURE__ */ jsxs11(Box11, { sx: { flex: 1 }, children: [
7710
- /* @__PURE__ */ jsx14(Typography8, { variant: "body2", sx: { fontWeight: 500 }, children: model.name.replace("Bandit-", "") }),
7711
- /* @__PURE__ */ jsx14(Typography8, { variant: "caption", sx: { color: theme.palette.text.secondary, display: "block" }, children: model.name === selectedModel ? "Currently active" : "Switch to this AI" })
7236
+ /* @__PURE__ */ jsxs10(Box10, { sx: { flex: 1 }, children: [
7237
+ /* @__PURE__ */ jsx13(Typography8, { variant: "body2", sx: { fontWeight: 500 }, children: model.name.replace("Bandit-", "") }),
7238
+ /* @__PURE__ */ jsx13(Typography8, { variant: "caption", sx: { color: theme.palette.text.secondary, display: "block" }, children: model.name === selectedModel ? "Currently active" : "Switch to this AI" })
7712
7239
  ] }),
7713
- model.name === selectedModel && /* @__PURE__ */ jsx14(
7714
- Box11,
7240
+ model.name === selectedModel && /* @__PURE__ */ jsx13(
7241
+ Box10,
7715
7242
  {
7716
7243
  sx: {
7717
7244
  width: 8,
@@ -7727,9 +7254,9 @@ var ChatAppBar = ({
7727
7254
  ))
7728
7255
  }
7729
7256
  ),
7730
- isTTSAvailable && /* @__PURE__ */ jsxs11(Fragment8, { children: [
7731
- /* @__PURE__ */ jsx14(Tooltip5, { title: `Voice: ${selectedVoice ? toTitleCase(selectedVoice.split("-")[1]) : "Default"}`, arrow: true, children: /* @__PURE__ */ jsx14(
7732
- IconButton10,
7257
+ isTTSAvailable && /* @__PURE__ */ jsxs10(Fragment8, { children: [
7258
+ /* @__PURE__ */ jsx13(Tooltip4, { title: `Voice: ${selectedVoice ? toTitleCase(selectedVoice.split("-")[1]) : "Default"}`, arrow: true, children: /* @__PURE__ */ jsx13(
7259
+ IconButton9,
7733
7260
  {
7734
7261
  onClick: (e) => setVoiceAnchorEl(e.currentTarget),
7735
7262
  sx: {
@@ -7742,10 +7269,10 @@ var ChatAppBar = ({
7742
7269
  }
7743
7270
  },
7744
7271
  "aria-label": `Change voice. Currently using ${selectedVoice ? toTitleCase(selectedVoice.split("-")[1]) : "default"}`,
7745
- children: /* @__PURE__ */ jsx14(RecordVoiceOverIcon, { fontSize: "small" })
7272
+ children: /* @__PURE__ */ jsx13(RecordVoiceOverIcon, { fontSize: "small" })
7746
7273
  }
7747
7274
  ) }),
7748
- /* @__PURE__ */ jsx14(
7275
+ /* @__PURE__ */ jsx13(
7749
7276
  Menu5,
7750
7277
  {
7751
7278
  anchorEl: voiceAnchorEl,
@@ -7782,7 +7309,7 @@ var ChatAppBar = ({
7782
7309
  }
7783
7310
  }
7784
7311
  },
7785
- children: availableVoices.length > 0 ? availableVoices.map((voice) => /* @__PURE__ */ jsx14(
7312
+ children: availableVoices.length > 0 ? availableVoices.map((voice) => /* @__PURE__ */ jsx13(
7786
7313
  MenuItem5,
7787
7314
  {
7788
7315
  selected: voice === selectedVoice,
@@ -7790,14 +7317,14 @@ var ChatAppBar = ({
7790
7317
  handleVoiceChange(voice);
7791
7318
  setVoiceAnchorEl(null);
7792
7319
  },
7793
- children: /* @__PURE__ */ jsxs11(Box11, { sx: { display: "flex", alignItems: "center", gap: 1, width: "100%" }, children: [
7794
- /* @__PURE__ */ jsx14(RecordVoiceOverIcon, { fontSize: "small", sx: { color: theme.palette.text.secondary } }),
7795
- /* @__PURE__ */ jsxs11(Box11, { sx: { flex: 1 }, children: [
7796
- /* @__PURE__ */ jsx14(Typography8, { variant: "body2", children: toTitleCase(voice.split("-")[1]) }),
7797
- /* @__PURE__ */ jsx14(Typography8, { variant: "caption", sx: { color: theme.palette.text.secondary }, children: voice === selectedVoice ? "Currently active" : "Switch to this voice" })
7320
+ children: /* @__PURE__ */ jsxs10(Box10, { sx: { display: "flex", alignItems: "center", gap: 1, width: "100%" }, children: [
7321
+ /* @__PURE__ */ jsx13(RecordVoiceOverIcon, { fontSize: "small", sx: { color: theme.palette.text.secondary } }),
7322
+ /* @__PURE__ */ jsxs10(Box10, { sx: { flex: 1 }, children: [
7323
+ /* @__PURE__ */ jsx13(Typography8, { variant: "body2", children: toTitleCase(voice.split("-")[1]) }),
7324
+ /* @__PURE__ */ jsx13(Typography8, { variant: "caption", sx: { color: theme.palette.text.secondary }, children: voice === selectedVoice ? "Currently active" : "Switch to this voice" })
7798
7325
  ] }),
7799
- voice === selectedVoice && /* @__PURE__ */ jsx14(
7800
- Box11,
7326
+ voice === selectedVoice && /* @__PURE__ */ jsx13(
7327
+ Box10,
7801
7328
  {
7802
7329
  sx: {
7803
7330
  width: 8,
@@ -7810,7 +7337,7 @@ var ChatAppBar = ({
7810
7337
  ] })
7811
7338
  },
7812
7339
  voice
7813
- )) : /* @__PURE__ */ jsx14(MenuItem5, { disabled: true, children: /* @__PURE__ */ jsx14(Typography8, { variant: "body2", color: "text.secondary", children: "No voices available" }) })
7340
+ )) : /* @__PURE__ */ jsx13(MenuItem5, { disabled: true, children: /* @__PURE__ */ jsx13(Typography8, { variant: "body2", color: "text.secondary", children: "No voices available" }) })
7814
7341
  }
7815
7342
  )
7816
7343
  ] })
@@ -7820,17 +7347,17 @@ var ChatAppBar = ({
7820
7347
  ]
7821
7348
  }
7822
7349
  ),
7823
- /* @__PURE__ */ jsx14(conversation_drawer_default, { open: drawerOpen, onClose: () => setDrawerOpen(false) }),
7824
- /* @__PURE__ */ jsx14(enhanced_mobile_conversations_modal_default, { open: modalOpen, onClose: () => setModalOpen(false) }),
7825
- /* @__PURE__ */ jsxs11(
7350
+ /* @__PURE__ */ jsx13(conversation_drawer_default, { open: drawerOpen, onClose: () => setDrawerOpen(false) }),
7351
+ /* @__PURE__ */ jsx13(enhanced_mobile_conversations_modal_default, { open: modalOpen, onClose: () => setModalOpen(false) }),
7352
+ /* @__PURE__ */ jsxs10(
7826
7353
  Dialog5,
7827
7354
  {
7828
7355
  open: confirmModelChangeOpen,
7829
7356
  onClose: () => setConfirmModelChangeOpen(false),
7830
7357
  children: [
7831
- /* @__PURE__ */ jsx14(DialogTitle5, { children: "Change personality and start new conversation?" }),
7832
- /* @__PURE__ */ jsx14(DialogContent5, { children: /* @__PURE__ */ jsxs11(Box11, { display: "flex", alignItems: "center", gap: 2, mt: 1, justifyContent: "center", children: [
7833
- /* @__PURE__ */ jsx14(
7358
+ /* @__PURE__ */ jsx13(DialogTitle5, { children: "Change personality and start new conversation?" }),
7359
+ /* @__PURE__ */ jsx13(DialogContent5, { children: /* @__PURE__ */ jsxs10(Box10, { display: "flex", alignItems: "center", gap: 2, mt: 1, justifyContent: "center", children: [
7360
+ /* @__PURE__ */ jsx13(
7834
7361
  Avatar8,
7835
7362
  {
7836
7363
  src: pendingModelAvatar,
@@ -7838,15 +7365,15 @@ var ChatAppBar = ({
7838
7365
  sx: { width: 40, height: 40, filter: "brightness(1.7)" }
7839
7366
  }
7840
7367
  ),
7841
- /* @__PURE__ */ jsxs11(Typography8, { variant: "body2", children: [
7368
+ /* @__PURE__ */ jsxs10(Typography8, { variant: "body2", children: [
7842
7369
  "Your current conversation will be saved, and a new one will begin with ",
7843
- /* @__PURE__ */ jsx14("strong", { children: pendingModel }),
7370
+ /* @__PURE__ */ jsx13("strong", { children: pendingModel }),
7844
7371
  "."
7845
7372
  ] })
7846
7373
  ] }) }),
7847
- /* @__PURE__ */ jsxs11(DialogActions5, { children: [
7848
- /* @__PURE__ */ jsx14(Button6, { onClick: () => setConfirmModelChangeOpen(false), children: "Cancel" }),
7849
- /* @__PURE__ */ jsx14(
7374
+ /* @__PURE__ */ jsxs10(DialogActions5, { children: [
7375
+ /* @__PURE__ */ jsx13(Button6, { onClick: () => setConfirmModelChangeOpen(false), children: "Cancel" }),
7376
+ /* @__PURE__ */ jsx13(
7850
7377
  Button6,
7851
7378
  {
7852
7379
  onClick: () => {
@@ -7949,35 +7476,35 @@ Respond with just the title and nothing else.
7949
7476
  };
7950
7477
 
7951
7478
  // src/chat/query-suggestion-picker.tsx
7952
- import { useEffect as useEffect13, useRef as useRef12, useState as useState14 } from "react";
7953
- import { Box as Box12, useMediaQuery as useMediaQuery6 } from "@mui/material";
7954
- import { useTheme as useTheme13, alpha as alpha8 } from "@mui/material/styles";
7955
- import ReactMarkdown2 from "react-markdown";
7956
- import remarkGfm2 from "remark-gfm";
7957
- import rehypeRaw2 from "rehype-raw";
7958
- import { Fragment as Fragment9, jsx as jsx15 } from "react/jsx-runtime";
7479
+ import { useEffect as useEffect12, useRef as useRef11, useState as useState13 } from "react";
7480
+ import { Box as Box11, useMediaQuery as useMediaQuery6 } from "@mui/material";
7481
+ import { useTheme as useTheme12, alpha as alpha7 } from "@mui/material/styles";
7482
+ import ReactMarkdown from "react-markdown";
7483
+ import remarkGfm from "remark-gfm";
7484
+ import rehypeRaw from "rehype-raw";
7485
+ import { Fragment as Fragment9, jsx as jsx14 } from "react/jsx-runtime";
7959
7486
  var markdownComponents = {
7960
- p: ({ node, ...props }) => /* @__PURE__ */ jsx15("span", { ...props }),
7961
- mark: ({ node, children, ...props }) => /* @__PURE__ */ jsx15("mark", { ...props, children }),
7487
+ p: ({ node, ...props }) => /* @__PURE__ */ jsx14("span", { ...props }),
7488
+ mark: ({ node, children, ...props }) => /* @__PURE__ */ jsx14("mark", { ...props, children }),
7962
7489
  code: ({ node, children, ...props }) => {
7963
7490
  const { inline, ...rest } = props;
7964
- return inline ? /* @__PURE__ */ jsx15("code", { ...rest, children }) : /* @__PURE__ */ jsx15("code", { ...rest, children });
7491
+ return inline ? /* @__PURE__ */ jsx14("code", { ...rest, children }) : /* @__PURE__ */ jsx14("code", { ...rest, children });
7965
7492
  }
7966
7493
  };
7967
7494
  var QuerySuggestionPicker = ({
7968
7495
  onSend,
7969
7496
  inputHeight
7970
7497
  }) => {
7971
- const hasGenerated = useRef12(false);
7972
- const [hasSentPrompt, setHasSentPrompt] = useState14(false);
7973
- const [examplePrompts, setExamplePrompts] = useState14([]);
7974
- const [visiblePrompts, setVisiblePrompts] = useState14([]);
7975
- const scrollRef = useRef12(null);
7976
- const theme = useTheme13();
7498
+ const hasGenerated = useRef11(false);
7499
+ const [hasSentPrompt, setHasSentPrompt] = useState13(false);
7500
+ const [examplePrompts, setExamplePrompts] = useState13([]);
7501
+ const [visiblePrompts, setVisiblePrompts] = useState13([]);
7502
+ const scrollRef = useRef11(null);
7503
+ const theme = useTheme12();
7977
7504
  const isMobile = useMediaQuery6((theme2) => theme2.breakpoints.down("sm"));
7978
7505
  const { background, text, border, hoverBackground, hoverBorder } = theme.palette.chat.suggestion;
7979
7506
  const { getCurrentModel, isLoading } = useModelStore();
7980
- useEffect13(() => {
7507
+ useEffect12(() => {
7981
7508
  if (hasGenerated.current || isLoading) return;
7982
7509
  hasGenerated.current = true;
7983
7510
  const currentModel = getCurrentModel();
@@ -8004,12 +7531,12 @@ var QuerySuggestionPicker = ({
8004
7531
  hasGenerated.current = false;
8005
7532
  });
8006
7533
  }, [getCurrentModel, isLoading]);
8007
- useEffect13(() => {
7534
+ useEffect12(() => {
8008
7535
  if (!isLoading) {
8009
7536
  hasGenerated.current = false;
8010
7537
  }
8011
7538
  }, [isLoading]);
8012
- useEffect13(() => {
7539
+ useEffect12(() => {
8013
7540
  if (hasSentPrompt || examplePrompts.length === 0) return;
8014
7541
  const interval = setInterval(() => {
8015
7542
  setExamplePrompts((prev) => {
@@ -8028,8 +7555,8 @@ var QuerySuggestionPicker = ({
8028
7555
  return () => clearInterval(interval);
8029
7556
  }, [hasSentPrompt, examplePrompts.length]);
8030
7557
  const displayPrompts = isMobile ? visiblePrompts.slice(0, Math.min(visiblePrompts.length, 6)) : visiblePrompts;
8031
- return displayPrompts.length > 0 && /* @__PURE__ */ jsx15(Fragment9, { children: /* @__PURE__ */ jsx15(
8032
- Box12,
7558
+ return displayPrompts.length > 0 && /* @__PURE__ */ jsx14(Fragment9, { children: /* @__PURE__ */ jsx14(
7559
+ Box11,
8033
7560
  {
8034
7561
  ref: scrollRef,
8035
7562
  sx: {
@@ -8045,8 +7572,8 @@ var QuerySuggestionPicker = ({
8045
7572
  pb: isMobile ? 0.4 : 0,
8046
7573
  "&::-webkit-scrollbar": { display: "none" }
8047
7574
  },
8048
- children: displayPrompts.map((prompt, i) => /* @__PURE__ */ jsx15(
8049
- Box12,
7575
+ children: displayPrompts.map((prompt, i) => /* @__PURE__ */ jsx14(
7576
+ Box11,
8050
7577
  {
8051
7578
  sx: {
8052
7579
  px: isMobile ? 1.4 : 2,
@@ -8062,7 +7589,7 @@ var QuerySuggestionPicker = ({
8062
7589
  color: text,
8063
7590
  userSelect: "none",
8064
7591
  cursor: "pointer",
8065
- border: `1px solid ${border || alpha8(text, 0.12)}`,
7592
+ border: `1px solid ${border || alpha7(text, 0.12)}`,
8066
7593
  boxShadow: theme.palette.mode === "dark" ? "0 4px 18px rgba(0,0,0,0.25)" : "0 6px 20px rgba(15,23,42,0.12)",
8067
7594
  scrollSnapAlign: isMobile ? "start" : "none",
8068
7595
  transition: "transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease",
@@ -8080,8 +7607,8 @@ var QuerySuggestionPicker = ({
8080
7607
  onSend(prompt, []);
8081
7608
  setHasSentPrompt(true);
8082
7609
  },
8083
- children: /* @__PURE__ */ jsx15(
8084
- Box12,
7610
+ children: /* @__PURE__ */ jsx14(
7611
+ Box11,
8085
7612
  {
8086
7613
  sx: {
8087
7614
  flex: 1,
@@ -8093,23 +7620,23 @@ var QuerySuggestionPicker = ({
8093
7620
  borderRadius: 4,
8094
7621
  fontSize: "0.92em",
8095
7622
  fontFamily: "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace",
8096
- backgroundColor: theme.palette.mode === "dark" ? alpha8(theme.palette.common.white, 0.06) : alpha8(theme.palette.text.primary, 0.06),
8097
- border: `1px solid ${alpha8(theme.palette.text.primary, 0.15)}`,
7623
+ backgroundColor: theme.palette.mode === "dark" ? alpha7(theme.palette.common.white, 0.06) : alpha7(theme.palette.text.primary, 0.06),
7624
+ border: `1px solid ${alpha7(theme.palette.text.primary, 0.15)}`,
8098
7625
  padding: "0.15em 0.35em"
8099
7626
  },
8100
7627
  "& mark": {
8101
7628
  display: "inline-block",
8102
- backgroundColor: theme.palette.mode === "dark" ? alpha8(theme.palette.common.white, 0.06) : alpha8(theme.palette.text.primary, 0.12),
7629
+ backgroundColor: theme.palette.mode === "dark" ? alpha7(theme.palette.common.white, 0.06) : alpha7(theme.palette.text.primary, 0.12),
8103
7630
  color: theme.palette.mode === "dark" ? theme.palette.common.white : theme.palette.text.primary,
8104
7631
  borderRadius: 4,
8105
7632
  padding: "0.1em 0.25em"
8106
7633
  }
8107
7634
  },
8108
- children: /* @__PURE__ */ jsx15(
8109
- ReactMarkdown2,
7635
+ children: /* @__PURE__ */ jsx14(
7636
+ ReactMarkdown,
8110
7637
  {
8111
- remarkPlugins: [remarkGfm2],
8112
- rehypePlugins: [rehypeRaw2],
7638
+ remarkPlugins: [remarkGfm],
7639
+ rehypePlugins: [rehypeRaw],
8113
7640
  components: markdownComponents,
8114
7641
  children: prompt
8115
7642
  }
@@ -8124,18 +7651,18 @@ var QuerySuggestionPicker = ({
8124
7651
  };
8125
7652
 
8126
7653
  // ../../src/pages/under-review.tsx
8127
- import { Box as Box13, Typography as Typography9, useTheme as useTheme14 } from "@mui/material";
7654
+ import { Box as Box12, Typography as Typography9, useTheme as useTheme13 } from "@mui/material";
8128
7655
  import { useNavigate as useNavigate2 } from "react-router-dom";
8129
- import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
7656
+ import { jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
8130
7657
  var UnderReview = () => {
8131
- const theme = useTheme14();
7658
+ const theme = useTheme13();
8132
7659
  const navigate = useNavigate2();
8133
7660
  const handleSneakyLogout = () => {
8134
7661
  localStorage.removeItem("authToken");
8135
7662
  navigate("/login");
8136
7663
  };
8137
- return /* @__PURE__ */ jsxs12(
8138
- Box13,
7664
+ return /* @__PURE__ */ jsxs11(
7665
+ Box12,
8139
7666
  {
8140
7667
  sx: {
8141
7668
  minHeight: "100vh",
@@ -8150,8 +7677,8 @@ var UnderReview = () => {
8150
7677
  position: "relative"
8151
7678
  },
8152
7679
  children: [
8153
- /* @__PURE__ */ jsx16(
8154
- Box13,
7680
+ /* @__PURE__ */ jsx15(
7681
+ Box12,
8155
7682
  {
8156
7683
  onClick: handleSneakyLogout,
8157
7684
  sx: {
@@ -8176,13 +7703,13 @@ var UnderReview = () => {
8176
7703
  title: "Reset session"
8177
7704
  }
8178
7705
  ),
8179
- /* @__PURE__ */ jsx16(Typography9, { variant: "h4", sx: { mb: 2, fontWeight: 700, color: theme.palette.error.main }, children: "Under Review" }),
8180
- /* @__PURE__ */ jsxs12(Typography9, { variant: "body1", sx: { mb: 2, color: theme.palette.text.secondary }, children: [
7706
+ /* @__PURE__ */ jsx15(Typography9, { variant: "h4", sx: { mb: 2, fontWeight: 700, color: theme.palette.error.main }, children: "Under Review" }),
7707
+ /* @__PURE__ */ jsxs11(Typography9, { variant: "body1", sx: { mb: 2, color: theme.palette.text.secondary }, children: [
8181
7708
  "Your request to use our services is currently being reviewed.",
8182
- /* @__PURE__ */ jsx16("br", {}),
7709
+ /* @__PURE__ */ jsx15("br", {}),
8183
7710
  "For more info, please contact ",
8184
7711
  " ",
8185
- /* @__PURE__ */ jsx16("a", { href: "mailto:team@burtson.ai", style: { color: theme.palette.primary.main, fontWeight: 600 }, children: "team@burtson.ai" })
7712
+ /* @__PURE__ */ jsx15("a", { href: "mailto:team@banditai.ai", style: { color: theme.palette.primary.main, fontWeight: 600 }, children: "team@banditai.ai" })
8186
7713
  ] })
8187
7714
  ]
8188
7715
  }
@@ -8191,16 +7718,16 @@ var UnderReview = () => {
8191
7718
  var under_review_default = UnderReview;
8192
7719
 
8193
7720
  // src/components/ConnectionStatus.tsx
8194
- import { Box as Box14, Chip as Chip4, useTheme as useTheme15 } from "@mui/material";
7721
+ import { Box as Box13, Chip as Chip4, useTheme as useTheme14 } from "@mui/material";
8195
7722
  import WifiIcon from "@mui/icons-material/Wifi";
8196
7723
  import WifiOffIcon from "@mui/icons-material/WifiOff";
8197
7724
  import SignalWifi2BarIcon from "@mui/icons-material/SignalWifi2Bar";
8198
- import { jsx as jsx17 } from "react/jsx-runtime";
7725
+ import { jsx as jsx16 } from "react/jsx-runtime";
8199
7726
  var ConnectionStatus = ({
8200
7727
  showWhenGood = false,
8201
7728
  position = "top"
8202
7729
  }) => {
8203
- const theme = useTheme15();
7730
+ const theme = useTheme14();
8204
7731
  const { isOnline, connectionQuality, isSlowConnection } = useNetworkStatus();
8205
7732
  if (connectionQuality === "fast" && !showWhenGood) {
8206
7733
  return null;
@@ -8209,28 +7736,28 @@ var ConnectionStatus = ({
8209
7736
  switch (connectionQuality) {
8210
7737
  case "offline":
8211
7738
  return {
8212
- icon: /* @__PURE__ */ jsx17(WifiOffIcon, { sx: { fontSize: 16 } }),
7739
+ icon: /* @__PURE__ */ jsx16(WifiOffIcon, { sx: { fontSize: 16 } }),
8213
7740
  label: "Offline",
8214
7741
  color: "error",
8215
7742
  severity: "high"
8216
7743
  };
8217
7744
  case "slow":
8218
7745
  return {
8219
- icon: /* @__PURE__ */ jsx17(SignalWifi2BarIcon, { sx: { fontSize: 16 } }),
7746
+ icon: /* @__PURE__ */ jsx16(SignalWifi2BarIcon, { sx: { fontSize: 16 } }),
8220
7747
  label: "Slow connection",
8221
7748
  color: "warning",
8222
7749
  severity: "medium"
8223
7750
  };
8224
7751
  case "fast":
8225
7752
  return {
8226
- icon: /* @__PURE__ */ jsx17(WifiIcon, { sx: { fontSize: 16 } }),
7753
+ icon: /* @__PURE__ */ jsx16(WifiIcon, { sx: { fontSize: 16 } }),
8227
7754
  label: "Connected",
8228
7755
  color: "success",
8229
7756
  severity: "low"
8230
7757
  };
8231
7758
  default:
8232
7759
  return {
8233
- icon: /* @__PURE__ */ jsx17(WifiIcon, { sx: { fontSize: 16 } }),
7760
+ icon: /* @__PURE__ */ jsx16(WifiIcon, { sx: { fontSize: 16 } }),
8234
7761
  label: "Unknown",
8235
7762
  color: "default",
8236
7763
  severity: "low"
@@ -8238,8 +7765,8 @@ var ConnectionStatus = ({
8238
7765
  }
8239
7766
  };
8240
7767
  const config = getStatusConfig();
8241
- return /* @__PURE__ */ jsx17(
8242
- Box14,
7768
+ return /* @__PURE__ */ jsx16(
7769
+ Box13,
8243
7770
  {
8244
7771
  sx: {
8245
7772
  position: "fixed",
@@ -8254,7 +7781,7 @@ var ConnectionStatus = ({
8254
7781
  "100%": { opacity: 1 }
8255
7782
  }
8256
7783
  },
8257
- children: /* @__PURE__ */ jsx17(
7784
+ children: /* @__PURE__ */ jsx16(
8258
7785
  Chip4,
8259
7786
  {
8260
7787
  icon: config.icon,
@@ -8278,7 +7805,7 @@ var ConnectionStatus = ({
8278
7805
  };
8279
7806
 
8280
7807
  // src/hooks/useVoiceMode.ts
8281
- import { useEffect as useEffect14, useRef as useRef13 } from "react";
7808
+ import { useEffect as useEffect13, useRef as useRef12 } from "react";
8282
7809
  var RMS_BASELINE = 128;
8283
7810
  var RMS_NORMALIZER = 128;
8284
7811
  var computeRms = (data) => {
@@ -8295,11 +7822,11 @@ var useVoiceMode = (config) => {
8295
7822
  const setError = useVoiceModeStore((state) => state.setError);
8296
7823
  const resetTransientState = useVoiceModeStore((state) => state.resetTransientState);
8297
7824
  const setLastTranscript = useVoiceModeStore((state) => state.setLastTranscript);
8298
- const configRef = useRef13(config);
8299
- useEffect14(() => {
7825
+ const configRef = useRef12(config);
7826
+ useEffect13(() => {
8300
7827
  configRef.current = config;
8301
7828
  }, [config]);
8302
- useEffect14(() => {
7829
+ useEffect13(() => {
8303
7830
  if (!enabled) {
8304
7831
  return () => void 0;
8305
7832
  }
@@ -8526,7 +8053,7 @@ var useVoiceMode = (config) => {
8526
8053
  };
8527
8054
 
8528
8055
  // src/chat/chat.tsx
8529
- import { jsx as jsx18, jsxs as jsxs13 } from "react/jsx-runtime";
8056
+ import { jsx as jsx17, jsxs as jsxs12 } from "react/jsx-runtime";
8530
8057
  var ChatContent = () => {
8531
8058
  const packageSettings = usePackageSettingsStore((state) => state.settings);
8532
8059
  const featureFlag = useFeatureFlag();
@@ -8534,11 +8061,37 @@ var ChatContent = () => {
8534
8061
  const ossMode = isOSSMode() || !packageSettings?.featureFlags?.subscriptionType;
8535
8062
  const playgroundBypassAccess = packageSettings?.playgroundBypassAuth || typeof window !== "undefined" && window.location.pathname.includes("/playground");
8536
8063
  const notificationService = useNotificationService();
8537
- const [selectedTheme, setSelectedTheme] = useState15(null);
8538
- const [themeLoading, setThemeLoading] = useState15(true);
8064
+ const [selectedTheme, setSelectedTheme] = useState14(null);
8065
+ const [themeLoading, setThemeLoading] = useState14(true);
8539
8066
  const token = authenticationService.getToken();
8540
8067
  const claims = token ? authenticationService.parseJwtClaims(token) : null;
8541
- const banditTheme = themeMap_default[selectedTheme ?? "bandit-dark"] || banditDarkTheme;
8068
+ const baseTheme = themeMap_default[selectedTheme ?? "bandit-dark"] || banditDarkTheme;
8069
+ const banditTheme = useMemo3(() => {
8070
+ return createTheme(baseTheme, {
8071
+ components: {
8072
+ MuiInputBase: {
8073
+ styleOverrides: {
8074
+ input: {
8075
+ outline: "none",
8076
+ boxShadow: "none",
8077
+ "&:focus, &:focus-visible": {
8078
+ outline: "none",
8079
+ boxShadow: "none"
8080
+ }
8081
+ },
8082
+ inputMultiline: {
8083
+ outline: "none",
8084
+ boxShadow: "none",
8085
+ "&:focus, &:focus-visible": {
8086
+ outline: "none",
8087
+ boxShadow: "none"
8088
+ }
8089
+ }
8090
+ }
8091
+ }
8092
+ }
8093
+ });
8094
+ }, [baseTheme]);
8542
8095
  const {
8543
8096
  inputValue,
8544
8097
  setInputValue,
@@ -8560,9 +8113,9 @@ var ChatContent = () => {
8560
8113
  initialized
8561
8114
  } = useVoiceStore();
8562
8115
  const isVoiceModeEnabled = useVoiceModeStore((state) => state.enabled);
8563
- const previousVoiceModeEnabledRef = useRef14(isVoiceModeEnabled);
8564
- const historyRef = useRef14(history);
8565
- useEffect15(() => {
8116
+ const previousVoiceModeEnabledRef = useRef13(isVoiceModeEnabled);
8117
+ const historyRef = useRef13(history);
8118
+ useEffect14(() => {
8566
8119
  historyRef.current = history;
8567
8120
  }, [history]);
8568
8121
  const {
@@ -8570,7 +8123,7 @@ var ChatContent = () => {
8570
8123
  stop: ttsStop,
8571
8124
  isAvailable: isTTSAvailable
8572
8125
  } = useTTS();
8573
- useEffect15(() => {
8126
+ useEffect14(() => {
8574
8127
  const timer = setTimeout(() => {
8575
8128
  const isAuthenticated = authenticationService.isAuthenticated();
8576
8129
  if (!initialized || availableVoices.length === 0) {
@@ -8584,7 +8137,7 @@ var ChatContent = () => {
8584
8137
  }, 500);
8585
8138
  return () => clearTimeout(timer);
8586
8139
  }, [initialized, availableVoices.length, loadVoicesFromAPI, token]);
8587
- useEffect15(() => {
8140
+ useEffect14(() => {
8588
8141
  const isAuthenticated = authenticationService.isAuthenticated();
8589
8142
  if (packageSettings?.gatewayApiUrl && availableVoices.length === 0 && !initialized) {
8590
8143
  if (token && isAuthenticated) {
@@ -8596,15 +8149,15 @@ var ChatContent = () => {
8596
8149
  }
8597
8150
  }, [packageSettings?.gatewayApiUrl, availableVoices.length, initialized, loadVoicesFromAPI, token]);
8598
8151
  const provider = useAIProviderStore((state) => state.provider);
8599
- const inputRef = useRef14(null);
8600
- const [pastedImages, setPastedImages] = useState15([]);
8601
- const inputContainerRef = useRef14(null);
8602
- const [inputHeight, setInputHeight] = useState15(80);
8603
- const [isSubmitting, setIsSubmitting] = useState15(false);
8604
- const [pendingMessage, setPendingMessage] = useState15(null);
8152
+ const inputRef = useRef13(null);
8153
+ const [pastedImages, setPastedImages] = useState14([]);
8154
+ const inputContainerRef = useRef13(null);
8155
+ const [inputHeight, setInputHeight] = useState14(80);
8156
+ const [isSubmitting, setIsSubmitting] = useState14(false);
8157
+ const [pendingMessage, setPendingMessage] = useState14(null);
8605
8158
  const { conversations, currentId, _hasHydrated, hydrate } = useConversationStore();
8606
- const [isMobile, setIsMobile] = useState15(false);
8607
- const [drawerOpen, setDrawerOpen] = useState15(false);
8159
+ const [isMobile, setIsMobile] = useState14(false);
8160
+ const [drawerOpen, setDrawerOpen] = useState14(false);
8608
8161
  const { generateName } = useConversationNameGenerator();
8609
8162
  const { preferences } = usePreferencesStore();
8610
8163
  const { containerRef: chatContainerRef, targetRef: scrollTargetRef, scrollToBottom, getScrollState } = useAutoScroll({
@@ -8616,26 +8169,26 @@ var ChatContent = () => {
8616
8169
  const chatContainerEl = chatContainerRef.current;
8617
8170
  const scrollTargetEl = scrollTargetRef.current;
8618
8171
  const { isSlowConnection, connectionQuality, trackRequestStart, trackRequestEnd } = useNetworkStatus();
8619
- const [showScrollToBottom, setShowScrollToBottom] = useState15(false);
8620
- const [streamBuffer, setStreamBuffer] = useState15("");
8621
- const [responseStarted, setResponseStarted] = useState15(false);
8622
- const [isStreaming, setIsStreaming] = useState15(false);
8172
+ const [showScrollToBottom, setShowScrollToBottom] = useState14(false);
8173
+ const [streamBuffer, setStreamBuffer] = useState14("");
8174
+ const [responseStarted, setResponseStarted] = useState14(false);
8175
+ const [isStreaming, setIsStreaming] = useState14(false);
8623
8176
  const initialLogoState = history.length === 0;
8624
- const [logoVisible, setLogoVisible] = useState15(initialLogoState);
8625
- const [logoShouldRender, setLogoShouldRender] = useState15(initialLogoState);
8626
- const streamingGraceUntilRef = useRef14(0);
8177
+ const [logoVisible, setLogoVisible] = useState14(initialLogoState);
8178
+ const [logoShouldRender, setLogoShouldRender] = useState14(initialLogoState);
8179
+ const streamingGraceUntilRef = useRef13(0);
8627
8180
  const GRACE_MS = 450;
8628
8181
  const GRACE_OFFSET_DESKTOP = 28;
8629
8182
  const GRACE_OFFSET_MOBILE = 20;
8630
- const followStreamRef = useRef14(true);
8631
- const lastSpokenResponseRef = useRef14(null);
8632
- const previousConversationIdRef = useRef14(null);
8633
- const logoFadeTimeoutRef = useRef14(null);
8634
- const [branding, setBranding] = useState15(null);
8635
- const [brandingLoading, setBrandingLoading] = useState15(true);
8636
- const isBrandingLoadInProgressRef = useRef14(false);
8183
+ const followStreamRef = useRef13(true);
8184
+ const lastSpokenResponseRef = useRef13(null);
8185
+ const previousConversationIdRef = useRef13(null);
8186
+ const logoFadeTimeoutRef = useRef13(null);
8187
+ const [branding, setBranding] = useState14(null);
8188
+ const [brandingLoading, setBrandingLoading] = useState14(true);
8189
+ const isBrandingLoadInProgressRef = useRef13(false);
8637
8190
  const logoOnly = history.length === 0 && !brandingLoading;
8638
- useEffect15(() => {
8191
+ useEffect14(() => {
8639
8192
  const isEmptyConversation = (history?.length ?? 0) === 0;
8640
8193
  const isSending = Boolean(pendingMessage);
8641
8194
  const shouldShowLogo = isEmptyConversation && !isSending;
@@ -8665,18 +8218,18 @@ var ChatContent = () => {
8665
8218
  }, 500);
8666
8219
  }
8667
8220
  }, [history, pendingMessage]);
8668
- useEffect15(() => () => {
8221
+ useEffect14(() => () => {
8669
8222
  if (logoFadeTimeoutRef.current) {
8670
8223
  window.clearTimeout(logoFadeTimeoutRef.current);
8671
8224
  logoFadeTimeoutRef.current = null;
8672
8225
  }
8673
8226
  }, []);
8674
- useEffect15(() => {
8227
+ useEffect14(() => {
8675
8228
  if (isStreaming && streamBuffer.trim() === "") {
8676
8229
  streamingGraceUntilRef.current = Date.now() + GRACE_MS;
8677
8230
  }
8678
8231
  }, [isStreaming, streamBuffer]);
8679
- useEffect15(() => {
8232
+ useEffect14(() => {
8680
8233
  if (!isStreaming) return;
8681
8234
  const container = chatContainerRef.current;
8682
8235
  if (!container) return;
@@ -8687,13 +8240,13 @@ var ChatContent = () => {
8687
8240
  container.scrollTo({ top: targetTop, behavior: "smooth" });
8688
8241
  }
8689
8242
  }, [streamBuffer, isStreaming, isMobile, chatContainerRef]);
8690
- useEffect15(() => {
8243
+ useEffect14(() => {
8691
8244
  if (!_hasHydrated) {
8692
8245
  debugLogger.info("Chat component triggering conversation store hydration");
8693
8246
  hydrate();
8694
8247
  }
8695
8248
  }, [_hasHydrated, hydrate]);
8696
- useEffect15(() => {
8249
+ useEffect14(() => {
8697
8250
  const loadBrandingAndTheme = async () => {
8698
8251
  if (isBrandingLoadInProgressRef.current) {
8699
8252
  debugLogger.warn("Branding loading already in progress, skipping");
@@ -8880,19 +8433,19 @@ var ChatContent = () => {
8880
8433
  window.removeEventListener("bandit-theme-changed", handleThemeChange);
8881
8434
  };
8882
8435
  }, []);
8883
- useEffect15(() => {
8436
+ useEffect14(() => {
8884
8437
  if (!chatContainerEl) return;
8885
8438
  const blurInputOnScroll = () => inputRef.current?.blur();
8886
8439
  chatContainerEl.addEventListener("scroll", blurInputOnScroll);
8887
8440
  return () => chatContainerEl.removeEventListener("scroll", blurInputOnScroll);
8888
8441
  }, [chatContainerEl]);
8889
- useEffect15(() => {
8442
+ useEffect14(() => {
8890
8443
  const handleResize = () => setIsMobile(window.innerWidth <= 768);
8891
8444
  handleResize();
8892
8445
  window.addEventListener("resize", handleResize);
8893
8446
  return () => window.removeEventListener("resize", handleResize);
8894
8447
  }, []);
8895
- useEffect15(() => {
8448
+ useEffect14(() => {
8896
8449
  const setViewportHeight = () => {
8897
8450
  document.documentElement.style.setProperty(
8898
8451
  "--vh",
@@ -8903,7 +8456,7 @@ var ChatContent = () => {
8903
8456
  window.addEventListener("resize", setViewportHeight);
8904
8457
  return () => window.removeEventListener("resize", setViewportHeight);
8905
8458
  }, []);
8906
- useEffect15(() => {
8459
+ useEffect14(() => {
8907
8460
  if (!chatContainerEl) return;
8908
8461
  let rafId = null;
8909
8462
  const update = () => {
@@ -8922,7 +8475,7 @@ var ChatContent = () => {
8922
8475
  chatContainerEl.removeEventListener(SCROLL_STATE_CHANGED_EVENT, update);
8923
8476
  };
8924
8477
  }, [chatContainerEl, getScrollState]);
8925
- useEffect15(() => {
8478
+ useEffect14(() => {
8926
8479
  if (!chatContainerEl) return;
8927
8480
  let observer = null;
8928
8481
  let rafId = null;
@@ -8957,7 +8510,7 @@ var ChatContent = () => {
8957
8510
  if (observer) observer.disconnect();
8958
8511
  };
8959
8512
  }, [chatContainerEl, scrollTargetEl, scrollTargetRef, getScrollState, inputHeight, history.length]);
8960
- useEffect15(() => {
8513
+ useEffect14(() => {
8961
8514
  const isTransitioning = isStreaming || streamBuffer.trim() === "";
8962
8515
  const delay = isTransitioning ? 400 : 100;
8963
8516
  const timer = setTimeout(() => {
@@ -9000,7 +8553,7 @@ var ChatContent = () => {
9000
8553
  return () => clearTimeout(scrollTimer);
9001
8554
  }
9002
8555
  }, [history, isStreaming, scrollToBottom, getScrollState, isMobile, chatContainerRef]);
9003
- useEffect15(() => {
8556
+ useEffect14(() => {
9004
8557
  const observer = new ResizeObserver(() => {
9005
8558
  if (inputContainerRef.current)
9006
8559
  setInputHeight(inputContainerRef.current.offsetHeight);
@@ -9011,7 +8564,7 @@ var ChatContent = () => {
9011
8564
  }
9012
8565
  return () => observer.disconnect();
9013
8566
  }, []);
9014
- useEffect15(() => {
8567
+ useEffect14(() => {
9015
8568
  if (!hydrated || !_hasHydrated) return;
9016
8569
  if (currentId === null) {
9017
8570
  useAIQueryStore.setState({ history: [] });
@@ -9060,7 +8613,7 @@ var ChatContent = () => {
9060
8613
  setResponse,
9061
8614
  setComponentStatus
9062
8615
  ]);
9063
- useEffect15(() => {
8616
+ useEffect14(() => {
9064
8617
  debugLogger.info("Chat component conversation state", {
9065
8618
  hasHydrated: _hasHydrated,
9066
8619
  conversationCount: conversations.length,
@@ -9069,7 +8622,7 @@ var ChatContent = () => {
9069
8622
  storeState: "main-chat"
9070
8623
  });
9071
8624
  }, [_hasHydrated, conversations, currentId]);
9072
- useEffect15(() => {
8625
+ useEffect14(() => {
9073
8626
  if (!_hasHydrated || !chatContainerEl) return;
9074
8627
  let rafId = null;
9075
8628
  const sync = () => {
@@ -9258,7 +8811,7 @@ var ChatContent = () => {
9258
8811
  onInterrupt: handleVoiceInterrupt,
9259
8812
  onError: (message) => notificationService?.showError?.(message)
9260
8813
  });
9261
- useEffect15(() => {
8814
+ useEffect14(() => {
9262
8815
  const previouslyEnabled = previousVoiceModeEnabledRef.current;
9263
8816
  previousVoiceModeEnabledRef.current = isVoiceModeEnabled;
9264
8817
  if (!previouslyEnabled && isVoiceModeEnabled) {
@@ -9283,7 +8836,7 @@ var ChatContent = () => {
9283
8836
  }
9284
8837
  }
9285
8838
  }, [isVoiceModeEnabled, ttsStop]);
9286
- useEffect15(() => {
8839
+ useEffect14(() => {
9287
8840
  if (!isVoiceModeEnabled || !isStreaming) {
9288
8841
  return;
9289
8842
  }
@@ -9303,7 +8856,7 @@ var ChatContent = () => {
9303
8856
  }
9304
8857
  lastSpokenResponseRef.current = null;
9305
8858
  }, [isStreaming, isVoiceModeEnabled, ttsStop]);
9306
- useEffect15(() => {
8859
+ useEffect14(() => {
9307
8860
  if (!isVoiceModeEnabled) {
9308
8861
  lastSpokenResponseRef.current = null;
9309
8862
  return;
@@ -9385,15 +8938,15 @@ var ChatContent = () => {
9385
8938
  if (!hydrated || brandingLoading || themeLoading) return null;
9386
8939
  const userHasAccess = playgroundBypassAccess || ossMode || claims?.roles?.includes("super-user") || claims?.roles?.includes("admin");
9387
8940
  if (!userHasAccess) {
9388
- return /* @__PURE__ */ jsxs13(ThemeProvider, { theme: banditTheme, children: [
9389
- /* @__PURE__ */ jsx18(CssBaseline, {}),
9390
- /* @__PURE__ */ jsx18(under_review_default, {})
8941
+ return /* @__PURE__ */ jsxs12(ThemeProvider, { theme: banditTheme, children: [
8942
+ /* @__PURE__ */ jsx17(CssBaseline, {}),
8943
+ /* @__PURE__ */ jsx17(under_review_default, {})
9391
8944
  ] });
9392
8945
  }
9393
- return /* @__PURE__ */ jsxs13(ThemeProvider, { theme: banditTheme, children: [
9394
- /* @__PURE__ */ jsx18(CssBaseline, {}),
9395
- /* @__PURE__ */ jsxs13(
9396
- Box15,
8946
+ return /* @__PURE__ */ jsxs12(ThemeProvider, { theme: banditTheme, children: [
8947
+ /* @__PURE__ */ jsx17(CssBaseline, {}),
8948
+ /* @__PURE__ */ jsxs12(
8949
+ Box14,
9397
8950
  {
9398
8951
  sx: (theme) => ({
9399
8952
  display: "flex",
@@ -9411,7 +8964,7 @@ var ChatContent = () => {
9411
8964
  transition: "left 0.3s ease-in-out, width 0.3s ease-in-out"
9412
8965
  }),
9413
8966
  children: [
9414
- /* @__PURE__ */ jsx18(
8967
+ /* @__PURE__ */ jsx17(
9415
8968
  chat_app_bar_default,
9416
8969
  {
9417
8970
  availableModels,
@@ -9423,8 +8976,8 @@ var ChatContent = () => {
9423
8976
  setDrawerOpen
9424
8977
  }
9425
8978
  ),
9426
- /* @__PURE__ */ jsx18(
9427
- Box15,
8979
+ /* @__PURE__ */ jsx17(
8980
+ Box14,
9428
8981
  {
9429
8982
  ref: chatContainerRef,
9430
8983
  sx: {
@@ -9444,8 +8997,8 @@ var ChatContent = () => {
9444
8997
  msOverflowStyle: "none",
9445
8998
  "&::-webkit-scrollbar": { display: "none" }
9446
8999
  },
9447
- children: /* @__PURE__ */ jsxs13(
9448
- Box15,
9000
+ children: /* @__PURE__ */ jsxs12(
9001
+ Box14,
9449
9002
  {
9450
9003
  sx: {
9451
9004
  width: "100%",
@@ -9455,9 +9008,9 @@ var ChatContent = () => {
9455
9008
  pt: 2
9456
9009
  },
9457
9010
  children: [
9458
- logoShouldRender && !brandingLoading && (branding?.logoBase64 ? /* @__PURE__ */ jsx18(custom_logo_default, { visible: logoVisible, atTop: true }) : /* @__PURE__ */ jsx18(bandit_chat_logo_default, { visible: logoVisible, atTop: true })),
9459
- /* @__PURE__ */ jsx18(
9460
- Box15,
9011
+ logoShouldRender && !brandingLoading && (branding?.logoBase64 ? /* @__PURE__ */ jsx17(custom_logo_default, { visible: logoVisible, atTop: true }) : /* @__PURE__ */ jsx17(bandit_chat_logo_default, { visible: logoVisible, atTop: true })),
9012
+ /* @__PURE__ */ jsx17(
9013
+ Box14,
9461
9014
  {
9462
9015
  sx: {
9463
9016
  margin: "0 auto",
@@ -9466,7 +9019,7 @@ var ChatContent = () => {
9466
9019
  flexShrink: 0,
9467
9020
  px: isMobile ? 0 : 0
9468
9021
  },
9469
- children: /* @__PURE__ */ jsx18(
9022
+ children: /* @__PURE__ */ jsx17(
9470
9023
  chat_messages_default,
9471
9024
  {
9472
9025
  isStreaming,
@@ -9489,7 +9042,7 @@ var ChatContent = () => {
9489
9042
  )
9490
9043
  }
9491
9044
  ),
9492
- showScrollToBottom && /* @__PURE__ */ jsx18(
9045
+ showScrollToBottom && /* @__PURE__ */ jsx17(
9493
9046
  chat_scroll_to_bottom_button_default,
9494
9047
  {
9495
9048
  inputHeight,
@@ -9498,8 +9051,8 @@ var ChatContent = () => {
9498
9051
  onClick: handleScrollToBottomClick
9499
9052
  }
9500
9053
  ),
9501
- history.length === 0 && componentStatus !== "Loading" && !isMobile && /* @__PURE__ */ jsx18(
9502
- Box15,
9054
+ history.length === 0 && componentStatus !== "Loading" && !isMobile && /* @__PURE__ */ jsx17(
9055
+ Box14,
9503
9056
  {
9504
9057
  sx: (theme) => ({
9505
9058
  position: "absolute",
@@ -9517,8 +9070,8 @@ var ChatContent = () => {
9517
9070
  })
9518
9071
  }
9519
9072
  ),
9520
- /* @__PURE__ */ jsxs13(
9521
- Box15,
9073
+ /* @__PURE__ */ jsxs12(
9074
+ Box14,
9522
9075
  {
9523
9076
  sx: {
9524
9077
  display: "flex",
@@ -9529,9 +9082,9 @@ var ChatContent = () => {
9529
9082
  maxWidth: "768px"
9530
9083
  },
9531
9084
  children: [
9532
- /* @__PURE__ */ jsx18(Box15, { sx: { flex: "1 1 auto" } }),
9533
- history.length === 0 && componentStatus !== "Loading" && !pendingMessage && preferences.chatSuggestionsEnabled && /* @__PURE__ */ jsx18(Box15, { sx: { marginBottom: "20px" }, children: /* @__PURE__ */ jsx18(QuerySuggestionPicker, { onSend: handleSend, inputHeight }) }),
9534
- /* @__PURE__ */ jsx18(
9085
+ /* @__PURE__ */ jsx17(Box14, { sx: { flex: "1 1 auto" } }),
9086
+ history.length === 0 && componentStatus !== "Loading" && !pendingMessage && preferences.chatSuggestionsEnabled && /* @__PURE__ */ jsx17(Box14, { sx: { marginBottom: "20px" }, children: /* @__PURE__ */ jsx17(QuerySuggestionPicker, { onSend: handleSend, inputHeight }) }),
9087
+ /* @__PURE__ */ jsx17(
9535
9088
  chat_input_default,
9536
9089
  {
9537
9090
  inputValue,
@@ -9558,7 +9111,7 @@ var ChatContent = () => {
9558
9111
  ]
9559
9112
  }
9560
9113
  ),
9561
- preferences.feedbackEnabled && !isMobile && /* @__PURE__ */ jsx18(
9114
+ preferences.feedbackEnabled && !isMobile && /* @__PURE__ */ jsx17(
9562
9115
  FeedbackButton,
9563
9116
  {
9564
9117
  fullScreen: false,
@@ -9571,7 +9124,7 @@ var ChatContent = () => {
9571
9124
  }
9572
9125
  }
9573
9126
  ),
9574
- /* @__PURE__ */ jsx18(ConnectionStatus, { position: "top", showWhenGood: false })
9127
+ /* @__PURE__ */ jsx17(ConnectionStatus, { position: "top", showWhenGood: false })
9575
9128
  ]
9576
9129
  }
9577
9130
  )
@@ -9600,13 +9153,13 @@ var Chat = () => {
9600
9153
  });
9601
9154
  if (!allowUnauthenticated && !bypassAuth && !authenticationService.isAuthenticated()) {
9602
9155
  debugLogger.debug("User is not authenticated, redirecting to login");
9603
- return /* @__PURE__ */ jsx18(Navigate, { to: "/login", replace: true });
9156
+ return /* @__PURE__ */ jsx17(Navigate, { to: "/login", replace: true });
9604
9157
  }
9605
- return /* @__PURE__ */ jsx18(ChatContent, {});
9158
+ return /* @__PURE__ */ jsx17(ChatContent, {});
9606
9159
  };
9607
9160
  var chat_default = Chat;
9608
9161
 
9609
9162
  export {
9610
9163
  chat_default
9611
9164
  };
9612
- //# sourceMappingURL=chunk-7HXARU5R.mjs.map
9165
+ //# sourceMappingURL=chunk-Q2N7CCZI.mjs.map