@burtson-labs/bandit-engine 2.0.44 → 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.
Files changed (57) hide show
  1. package/README.md +7 -5
  2. package/dist/{aiProviderStore-UQI33C5E.mjs → aiProviderStore-3N3VE6D4.mjs} +2 -2
  3. package/dist/chat-CQWZOJH4.mjs +16 -0
  4. package/dist/chat-provider.js +45 -10
  5. package/dist/chat-provider.js.map +1 -1
  6. package/dist/chat-provider.mjs +6 -6
  7. package/dist/{chunk-UXE67LR7.mjs → chunk-6WZUQHZT.mjs} +11 -7
  8. package/dist/chunk-6WZUQHZT.mjs.map +1 -0
  9. package/dist/{chunk-XUBYA5I7.mjs → chunk-7ZDS33S2.mjs} +34 -6
  10. package/dist/chunk-7ZDS33S2.mjs.map +1 -0
  11. package/dist/{chunk-SBNENBUQ.mjs → chunk-AXFX2HUK.mjs} +12 -12
  12. package/dist/{chunk-SBNENBUQ.mjs.map → chunk-AXFX2HUK.mjs.map} +1 -1
  13. package/dist/{chunk-54ZQ3FSN.mjs → chunk-BENL3EF2.mjs} +7 -4
  14. package/dist/chunk-BENL3EF2.mjs.map +1 -0
  15. package/dist/{chunk-RTQDQ6TC.mjs → chunk-EHNWQ4T3.mjs} +2 -2
  16. package/dist/{chunk-KBKWVG7X.mjs → chunk-HKJTRBWC.mjs} +5 -5
  17. package/dist/chunk-KHKWYHXD.mjs +482 -0
  18. package/dist/chunk-KHKWYHXD.mjs.map +1 -0
  19. package/dist/{chunk-QV4ELNLP.mjs → chunk-Q2N7CCZI.mjs} +881 -1289
  20. package/dist/chunk-Q2N7CCZI.mjs.map +1 -0
  21. package/dist/{chunk-ERV7GLY3.mjs → chunk-TVF45U7B.mjs} +5 -5
  22. package/dist/{chunk-H4PBQ5LJ.mjs → chunk-VL3CMSDO.mjs} +4 -4
  23. package/dist/{chunk-JRGCRBWE.mjs → chunk-ZTTGERUG.mjs} +2201 -615
  24. package/dist/chunk-ZTTGERUG.mjs.map +1 -0
  25. package/dist/cli.js +46 -46
  26. package/dist/cli.js.map +1 -1
  27. package/dist/{gateway-5yt_3QDP.d.mts → gateway-oScD5tvE.d.mts} +4 -3
  28. package/dist/{gateway-5yt_3QDP.d.ts → gateway-oScD5tvE.d.ts} +4 -3
  29. package/dist/index.d.mts +2 -2
  30. package/dist/index.d.ts +2 -2
  31. package/dist/index.js +2178 -507
  32. package/dist/index.js.map +1 -1
  33. package/dist/index.mjs +11 -10
  34. package/dist/index.mjs.map +1 -1
  35. package/dist/management/management.js +3462 -1791
  36. package/dist/management/management.js.map +1 -1
  37. package/dist/management/management.mjs +9 -8
  38. package/dist/modals/chat-modal/chat-modal.js +53 -18
  39. package/dist/modals/chat-modal/chat-modal.js.map +1 -1
  40. package/dist/modals/chat-modal/chat-modal.mjs +5 -5
  41. package/dist/{modelStore-UMJBDSEF.mjs → modelStore-XWFHNTBT.mjs} +2 -2
  42. package/dist/public-types.d.mts +2 -1
  43. package/dist/public-types.d.ts +2 -1
  44. package/package.json +3 -3
  45. package/dist/chat-7U633EWN.mjs +0 -15
  46. package/dist/chunk-54ZQ3FSN.mjs.map +0 -1
  47. package/dist/chunk-JRGCRBWE.mjs.map +0 -1
  48. package/dist/chunk-QV4ELNLP.mjs.map +0 -1
  49. package/dist/chunk-UXE67LR7.mjs.map +0 -1
  50. package/dist/chunk-XUBYA5I7.mjs.map +0 -1
  51. /package/dist/{aiProviderStore-UQI33C5E.mjs.map → aiProviderStore-3N3VE6D4.mjs.map} +0 -0
  52. /package/dist/{chat-7U633EWN.mjs.map → chat-CQWZOJH4.mjs.map} +0 -0
  53. /package/dist/{chunk-RTQDQ6TC.mjs.map → chunk-EHNWQ4T3.mjs.map} +0 -0
  54. /package/dist/{chunk-KBKWVG7X.mjs.map → chunk-HKJTRBWC.mjs.map} +0 -0
  55. /package/dist/{chunk-ERV7GLY3.mjs.map → chunk-TVF45U7B.mjs.map} +0 -0
  56. /package/dist/{chunk-H4PBQ5LJ.mjs.map → chunk-VL3CMSDO.mjs.map} +0 -0
  57. /package/dist/{modelStore-UMJBDSEF.mjs.map → modelStore-XWFHNTBT.mjs.map} +0 -0
@@ -1,29 +1,30 @@
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
- } from "./chunk-RTQDQ6TC.mjs";
9
+ } from "./chunk-EHNWQ4T3.mjs";
7
10
  import {
8
11
  FeedbackButton,
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,
19
19
  useNotificationService,
20
20
  useTTS,
21
21
  useVoiceStore
22
- } from "./chunk-SBNENBUQ.mjs";
22
+ } from "./chunk-AXFX2HUK.mjs";
23
23
  import {
24
24
  authenticationService,
25
25
  brandingService_default,
26
26
  detectMessageMood,
27
+ detectTransparency,
27
28
  detectUserInterestAndExcitement,
28
29
  determineRelevantDocuments,
29
30
  embeddingService,
@@ -43,22 +44,22 @@ import {
43
44
  useMemoryStore,
44
45
  useProjectStore,
45
46
  useVectorStore
46
- } from "./chunk-UXE67LR7.mjs";
47
+ } from "./chunk-6WZUQHZT.mjs";
47
48
  import {
48
49
  indexedDBService_default,
49
50
  useModelStore,
50
51
  usePackageSettingsStore,
51
52
  usePreferencesStore
52
- } from "./chunk-XUBYA5I7.mjs";
53
+ } from "./chunk-7ZDS33S2.mjs";
53
54
  import {
54
55
  useAIProviderStore
55
- } from "./chunk-54ZQ3FSN.mjs";
56
+ } from "./chunk-BENL3EF2.mjs";
56
57
  import {
57
58
  debugLogger
58
59
  } from "./chunk-KCI46M23.mjs";
59
60
 
60
61
  // src/chat/chat.tsx
61
- 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";
62
63
 
63
64
  // src/chat/custom-logo.tsx
64
65
  import React, { useEffect } from "react";
@@ -82,7 +83,20 @@ var Logo = ({ visible, atTop = false }) => {
82
83
  const brandingData = await brandingService_default.getBranding();
83
84
  if (brandingData) {
84
85
  setLogoBase64(brandingData.logoBase64 || null);
85
- setHasTransparentLogo(brandingData.hasTransparentLogo ?? true);
86
+ if (brandingData.logoBase64) {
87
+ try {
88
+ const detected = await detectTransparency(brandingData.logoBase64);
89
+ const isPng = brandingData.logoBase64.startsWith("data:image/png");
90
+ const finalTransparent = detected || isPng || brandingData.hasTransparentLogo === true;
91
+ setHasTransparentLogo(finalTransparent);
92
+ } catch {
93
+ const isPng = brandingData.logoBase64.startsWith("data:image/png");
94
+ const finalTransparent = brandingData.hasTransparentLogo === true || isPng;
95
+ setHasTransparentLogo(finalTransparent);
96
+ }
97
+ } else {
98
+ setHasTransparentLogo(brandingData.hasTransparentLogo ?? true);
99
+ }
86
100
  }
87
101
  } catch (e) {
88
102
  debugLogger.error("Failed to load branding from service", { error: e });
@@ -92,7 +106,7 @@ var Logo = ({ visible, atTop = false }) => {
92
106
  };
93
107
  loadBranding();
94
108
  }, []);
95
- return logoBase64 && /* @__PURE__ */ jsx(Fragment, { children: loading ? null : hasTransparentLogo ? /* @__PURE__ */ jsx(
109
+ return logoBase64 && /* @__PURE__ */ jsx(Fragment, { children: loading ? null : hasTransparentLogo !== false ? /* @__PURE__ */ jsx(
96
110
  Box,
97
111
  {
98
112
  component: "img",
@@ -104,7 +118,8 @@ var Logo = ({ visible, atTop = false }) => {
104
118
  maxWidth: 600,
105
119
  aspectRatio: "1 / 1",
106
120
  margin: "0 auto",
107
- mt: atTop ? 2 : 6
121
+ mt: atTop ? 2 : 6,
122
+ display: "block"
108
123
  }
109
124
  }
110
125
  ) : /* @__PURE__ */ jsx(
@@ -131,7 +146,8 @@ var Logo = ({ visible, atTop = false }) => {
131
146
  var custom_logo_default = Logo;
132
147
 
133
148
  // src/chat/chat.tsx
134
- 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";
135
151
  import { Navigate } from "react-router-dom";
136
152
 
137
153
  // src/chat/chat-scroll-to-bottom-button.tsx
@@ -144,8 +160,8 @@ var ChatScrollToBottomButton = ({
144
160
  drawerOpen = false,
145
161
  isMobile = false
146
162
  }) => {
147
- const verticalBuffer = isMobile ? 36 : 56;
148
- const bottomOffset = Math.max(inputHeight + verticalBuffer, verticalBuffer + 72);
163
+ const verticalBuffer = isMobile ? 28 : 48;
164
+ const bottomOffset = Math.max(inputHeight + verticalBuffer, verticalBuffer + 64);
149
165
  return /* @__PURE__ */ jsx2(
150
166
  IconButton,
151
167
  {
@@ -161,9 +177,12 @@ var ChatScrollToBottomButton = ({
161
177
  borderColor: (theme) => theme.palette.divider,
162
178
  zIndex: (theme) => Math.max(theme.zIndex.modal + 1, 1400),
163
179
  boxShadow: 3,
164
- transition: "bottom 0.3s ease, left 0.3s ease-in-out",
180
+ transition: "bottom 0.25s ease, left 0.3s ease-in-out, transform 0.2s ease",
165
181
  "&:hover": {
166
182
  bgcolor: (theme) => theme.palette.action.hover
183
+ },
184
+ "&:active": {
185
+ transform: "translateX(-50%) translateY(1px)"
167
186
  }
168
187
  },
169
188
  children: /* @__PURE__ */ jsx2(ArrowDownwardIcon, { sx: { color: "inherit" } })
@@ -205,482 +224,8 @@ var BanditChatLogo = ({ atTop = false, visible = false }) => {
205
224
  var bandit_chat_logo_default = BanditChatLogo;
206
225
 
207
226
  // src/chat/chat-messages.tsx
208
- import { Box as Box3 } from "@mui/material";
209
-
210
- // src/components/StreamingMarkdown.tsx
211
- import React3, { useEffect as useEffect3, useMemo, useRef, useState as useState2 } from "react";
212
- import { Box as Box2, Tooltip, IconButton as IconButton2 } from "@mui/material";
213
- import ReactMarkdown from "react-markdown";
214
- import remarkGfm from "remark-gfm";
215
- import rehypeRaw from "rehype-raw";
216
- import rehypeSanitize from "rehype-sanitize";
217
- import { useTheme as useTheme3, alpha } from "@mui/material/styles";
218
- import CheckIcon from "@mui/icons-material/Check";
219
- import ContentCopyIcon from "@mui/icons-material/ContentCopy";
227
+ import { Box as Box2 } from "@mui/material";
220
228
  import { jsx as jsx4, jsxs } from "react/jsx-runtime";
221
- var StreamingMarkdown = ({
222
- content,
223
- isStreaming = false,
224
- sources
225
- }) => {
226
- const theme = useTheme3();
227
- const showCursor = isStreaming && content.trim().length > 0;
228
- const showLoader = isStreaming && content.trim().length === 0;
229
- const prevSanitizedRef = useRef("");
230
- const containerRef = useRef(null);
231
- const stableSourcesRef = useRef([]);
232
- const effectiveSources = useMemo(() => {
233
- if (Array.isArray(sources) && sources.length > 0) {
234
- stableSourcesRef.current = sources;
235
- return sources;
236
- }
237
- if (sources === void 0) {
238
- return stableSourcesRef.current;
239
- }
240
- stableSourcesRef.current = [];
241
- return [];
242
- }, [sources]);
243
- const normalizeTables = (markdown) => {
244
- const lines = markdown.split("\n");
245
- const output = [];
246
- let inTable = false;
247
- let tableRows = [];
248
- const flushTable = () => {
249
- if (tableRows.length === 0) return;
250
- const maxCols = Math.max(...tableRows.map((r) => r.length));
251
- const padded = tableRows.map((row) => [...row, ...Array(maxCols - row.length).fill("")]);
252
- const header = padded[0];
253
- const separator = Array(maxCols).fill("---");
254
- output.push("| " + header.join(" | ") + " |");
255
- output.push("| " + separator.join(" | ") + " |");
256
- for (let i = 1; i < padded.length; i++) {
257
- const row = padded[i];
258
- if (row.every((cell) => /^-+$/.test(cell))) continue;
259
- output.push("| " + row.join(" | ") + " |");
260
- }
261
- tableRows = [];
262
- inTable = false;
263
- };
264
- for (const line of lines) {
265
- if (/^\s*\|.*\|\s*$/.test(line)) {
266
- inTable = true;
267
- const cells = line.trim().slice(1, -1).split("|").map((c) => c.trim());
268
- tableRows.push(cells);
269
- } else {
270
- if (inTable) flushTable();
271
- output.push(line);
272
- }
273
- }
274
- if (inTable) flushTable();
275
- return output.join("\n");
276
- };
277
- const sanitizeMarkdown = (raw) => {
278
- let sanitized = raw.replace(/<[/]?start_of_turn>|<[/]?end[_]?of[_]?turn>/gi, "");
279
- sanitized = sanitized.replace(/<div class="MuiBox-root[^"]*"[^>]*>([\s\S]*?)<\/div>/g, (_, inner) => inner.trim()).replace(/<div[^>]*>\s*<\/div>/g, "");
280
- sanitized = sanitized.replace(/\r?\n\s*:\s*/g, ": ");
281
- sanitized = sanitized.replace(/\r?\n\s*,\s*/g, ", ");
282
- sanitized = normalizeTables(sanitized);
283
- return sanitized;
284
- };
285
- const sanitizedContent = sanitizeMarkdown(content);
286
- const contentWithSources = useMemo(() => {
287
- if (!effectiveSources.length || isStreaming) {
288
- return sanitizedContent;
289
- }
290
- const existingSection = /\*\*Sources?\*\*/i.test(sanitizedContent);
291
- if (existingSection) {
292
- return sanitizedContent;
293
- }
294
- const listMarkdown = effectiveSources.map((doc, index) => `- ${index + 1}. ${doc.name}`).join("\n");
295
- return `${sanitizedContent}
296
-
297
- **Sources**
298
- ${listMarkdown}`;
299
- }, [sanitizedContent, effectiveSources, isStreaming]);
300
- const escapeHtml = (str) => str.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/\"/g, "&quot;").replace(/'/g, "&#39;");
301
- const isPlainAppend = (s) => {
302
- return !/[`*_\[\]<>|#~]/.test(s);
303
- };
304
- let renderContent = contentWithSources;
305
- if (isStreaming) {
306
- const prev = prevSanitizedRef.current;
307
- let i = 0;
308
- const max = Math.min(prev.length, sanitizedContent.length);
309
- while (i < max && prev.charCodeAt(i) === sanitizedContent.charCodeAt(i)) i++;
310
- const base = sanitizedContent.slice(0, i);
311
- const appended = sanitizedContent.slice(i);
312
- if (appended && isPlainAppend(appended)) {
313
- const parts = appended.split(/(\s+)/);
314
- let delayMs = 0;
315
- const step = 42;
316
- const wrapped = parts.map((p) => {
317
- if (/^\s+$/.test(p) || p === "") return p;
318
- const safe = escapeHtml(p);
319
- const out = `<span class="bl-fade-word" data-bl-delay="${delayMs}">${safe}</span>`;
320
- delayMs += step;
321
- return out;
322
- }).join("");
323
- renderContent = base + wrapped;
324
- }
325
- }
326
- useEffect3(() => {
327
- prevSanitizedRef.current = contentWithSources;
328
- }, [contentWithSources]);
329
- useEffect3(() => {
330
- if (!containerRef.current) return;
331
- const nodes = containerRef.current.querySelectorAll(".bl-fade-word");
332
- nodes.forEach((node) => {
333
- const delay = node.getAttribute("data-bl-delay");
334
- if (delay) {
335
- node.style.setProperty("--bl-delay", `${delay}ms`);
336
- node.style.animationDelay = `${delay}ms`;
337
- }
338
- });
339
- }, [renderContent, sanitizedContent, isStreaming]);
340
- const MarkRenderer = ({ children, ...props }) => {
341
- const inlineBg = theme.palette.mode === "dark" ? alpha(theme.palette.common.white, 0.06) : alpha(theme.palette.text.primary, 0.06);
342
- const inlineBorder = `1px solid ${alpha(theme.palette.text.primary, 0.15)}`;
343
- return /* @__PURE__ */ jsx4(
344
- Box2,
345
- {
346
- component: "span",
347
- sx: {
348
- display: "inline-block",
349
- backgroundColor: inlineBg,
350
- border: inlineBorder,
351
- color: "inherit",
352
- padding: "0.15em 0.35em",
353
- borderRadius: "4px",
354
- fontWeight: 500,
355
- fontSize: "0.92em",
356
- lineHeight: 1.4,
357
- whiteSpace: "normal",
358
- width: "fit-content",
359
- maxWidth: "100%",
360
- fontFamily: "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace"
361
- },
362
- ...props,
363
- children
364
- }
365
- );
366
- };
367
- const LinkRenderer = ({ href, children, ...props }) => /* @__PURE__ */ jsx4(
368
- "a",
369
- {
370
- href,
371
- target: "_blank",
372
- rel: "noopener noreferrer",
373
- style: { color: theme.palette.primary.main, textDecoration: "underline" },
374
- ...props,
375
- children
376
- }
377
- );
378
- const CodeRenderer = ({ inline, className, children, ...props }) => {
379
- const match = /language-([\w-]+)/.exec(className || "");
380
- const requestedLanguage = match?.[1]?.toLowerCase() ?? "";
381
- const codeText = String(children).replace(/\n$/, "");
382
- const isProbablyBlock = codeText.includes("\n") || Boolean(requestedLanguage);
383
- const [copied, setCopied] = useState2(false);
384
- const handleCopy = () => {
385
- void navigator.clipboard.writeText(codeText);
386
- setCopied(true);
387
- setTimeout(() => setCopied(false), 2e3);
388
- };
389
- const highlightTree = useMemo(
390
- () => isProbablyBlock ? getHighlightTree(codeText, requestedLanguage) : null,
391
- [isProbablyBlock, codeText, requestedLanguage]
392
- );
393
- const highlightedNodes = useMemo(
394
- () => highlightTree ? renderLowlightChildren(
395
- (highlightTree.children || []).filter(
396
- (node) => node.type === "element" || node.type === "text"
397
- ),
398
- `hl-${requestedLanguage || "auto"}`
399
- ) : [],
400
- [highlightTree, requestedLanguage]
401
- );
402
- const dataLanguage = highlightTree && highlightTree.data && typeof highlightTree.data === "object" && "language" in highlightTree.data ? String(highlightTree.data.language ?? "") : "";
403
- if (!highlightTree) {
404
- const inlineBg = theme.palette.mode === "dark" ? alpha(theme.palette.common.white, 0.06) : alpha(theme.palette.text.primary, 0.06);
405
- const inlineBorder = `1px solid ${alpha(theme.palette.text.primary, 0.15)}`;
406
- return /* @__PURE__ */ jsx4(
407
- "code",
408
- {
409
- style: {
410
- borderRadius: 4,
411
- fontSize: "0.92em",
412
- fontFamily: "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace",
413
- backgroundColor: inlineBg,
414
- border: inlineBorder,
415
- padding: "0.15em 0.35em"
416
- },
417
- ...props,
418
- children
419
- }
420
- );
421
- }
422
- const resolvedLanguage = (requestedLanguage || dataLanguage || "code").toString();
423
- const languageLabel = resolvedLanguage.toUpperCase();
424
- const languageClass = resolvedLanguage.toLowerCase();
425
- const highlightColors = theme.palette.mode === "dark" ? {
426
- background: "#0f172a",
427
- text: "#e2e8f0",
428
- keyword: "#c792ea",
429
- string: "#7fdbca",
430
- number: "#f78c6c",
431
- comment: "#64748b",
432
- function: "#82aaff",
433
- variable: "#f07178"
434
- } : {
435
- background: "#f4f6ff",
436
- text: "#1e293b",
437
- keyword: "#7c3aed",
438
- string: "#0f766e",
439
- number: "#b45309",
440
- comment: "#6b7280",
441
- function: "#2563eb",
442
- variable: "#d97706"
443
- };
444
- return /* @__PURE__ */ jsxs(
445
- Box2,
446
- {
447
- sx: {
448
- borderRadius: "4px",
449
- overflow: "auto",
450
- my: "0.5rem",
451
- px: 0,
452
- py: 0,
453
- mt: 1,
454
- mb: 0.5,
455
- fontSize: "0.9rem",
456
- position: "relative",
457
- fontFamily: "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace",
458
- width: "100%",
459
- maxWidth: "100%"
460
- },
461
- children: [
462
- /* @__PURE__ */ jsxs(
463
- Box2,
464
- {
465
- sx: {
466
- px: 2,
467
- py: 1,
468
- bgcolor: theme.palette.mode === "dark" ? alpha(theme.palette.common.white, 0.04) : alpha(theme.palette.text.primary, 0.04),
469
- color: theme.palette.text.secondary,
470
- fontSize: "0.75rem",
471
- borderBottom: `1px solid ${alpha(theme.palette.text.primary, 0.1)}`,
472
- display: "flex",
473
- justifyContent: "space-between",
474
- alignItems: "center",
475
- fontFamily: "inherit"
476
- },
477
- children: [
478
- /* @__PURE__ */ jsx4("span", { children: languageLabel }),
479
- /* @__PURE__ */ jsx4(Tooltip, { title: copied ? "Copied!" : "Copy", arrow: true, children: /* @__PURE__ */ jsx4(
480
- IconButton2,
481
- {
482
- size: "small",
483
- onClick: handleCopy,
484
- sx: {
485
- color: copied ? theme.palette.success.main : theme.palette.text.secondary,
486
- "&:hover": { color: theme.palette.text.primary },
487
- padding: "4px"
488
- },
489
- children: copied ? /* @__PURE__ */ jsx4(CheckIcon, { fontSize: "small" }) : /* @__PURE__ */ jsx4(ContentCopyIcon, { fontSize: "small" })
490
- }
491
- ) })
492
- ]
493
- }
494
- ),
495
- /* @__PURE__ */ jsx4(
496
- Box2,
497
- {
498
- sx: {
499
- overflowX: "auto",
500
- maxWidth: "100%",
501
- "& .hljs": {
502
- display: "block",
503
- overflowX: "auto",
504
- padding: "16px",
505
- margin: 0,
506
- backgroundColor: highlightColors.background,
507
- color: highlightColors.text,
508
- fontSize: "0.9rem"
509
- },
510
- "& .hljs-comment, & .hljs-quote": {
511
- color: highlightColors.comment,
512
- fontStyle: "italic"
513
- },
514
- "& .hljs-keyword, & .hljs-selector-tag, & .hljs-literal, & .hljs-built_in": {
515
- color: highlightColors.keyword
516
- },
517
- "& .hljs-string, & .hljs-doctag, & .hljs-template-tag, & .hljs-attr": {
518
- color: highlightColors.string
519
- },
520
- "& .hljs-number, & .hljs-symbol, & .hljs-bullet, & .hljs-meta": {
521
- color: highlightColors.number
522
- },
523
- "& .hljs-title, & .hljs-section, & .hljs-selector-id, & .hljs-function": {
524
- color: highlightColors.function
525
- },
526
- "& .hljs-variable, & .hljs-params, & .hljs-property": {
527
- color: highlightColors.variable
528
- }
529
- },
530
- children: /* @__PURE__ */ jsx4("pre", { className: `hljs language-${languageClass}`, ...props, children: /* @__PURE__ */ jsx4("code", { className: "hljs", children: highlightedNodes }) })
531
- }
532
- )
533
- ]
534
- }
535
- );
536
- };
537
- const EmRenderer = ({ children, ...props }) => {
538
- const onlyChild = Array.isArray(children) && children.length === 1 ? children[0] : null;
539
- if (onlyChild && React3.isValidElement(onlyChild) && typeof onlyChild.props?.className === "string" && onlyChild.props.className.includes("MuiBox-root")) {
540
- const inner = onlyChild.props.children;
541
- if (typeof inner === "string" && inner.trim().toUpperCase() === "CODE") {
542
- return null;
543
- }
544
- return /* @__PURE__ */ jsx4(
545
- Box2,
546
- {
547
- sx: {
548
- fontFamily: "monospace",
549
- fontSize: "0.9rem",
550
- backgroundColor: theme.palette.background.default,
551
- color: theme.palette.text.primary,
552
- padding: "12px 16px",
553
- borderRadius: "4px",
554
- border: `1px solid ${theme.palette.divider}`,
555
- my: 1,
556
- display: "inline-block"
557
- },
558
- children: inner
559
- }
560
- );
561
- }
562
- return /* @__PURE__ */ jsx4("em", { ...props, children });
563
- };
564
- const TableRenderer = ({ children, ...props }) => /* @__PURE__ */ jsx4(Box2, { sx: { overflowX: "auto", my: 1 }, children: /* @__PURE__ */ jsx4("table", { style: { borderCollapse: "collapse", width: "100%" }, ...props, children }) });
565
- const OrderedListRenderer = ({ children, ...props }) => /* @__PURE__ */ jsx4("ol", { style: { paddingLeft: 24, marginLeft: 16, listStyleType: "decimal" }, ...props, children });
566
- const UnorderedListRenderer = ({ children, ...props }) => /* @__PURE__ */ jsx4(
567
- "ul",
568
- {
569
- style: {
570
- paddingLeft: "1.5rem",
571
- marginTop: "0.5rem",
572
- marginBottom: "0.25rem",
573
- listStyle: "disc"
574
- },
575
- ...props,
576
- children
577
- }
578
- );
579
- const BlockQuoteRenderer = ({ children, ...props }) => /* @__PURE__ */ jsx4(
580
- Box2,
581
- {
582
- component: "blockquote",
583
- sx: {
584
- borderLeft: `4px solid ${theme.palette.divider}`,
585
- pl: 2,
586
- ml: 0,
587
- color: theme.palette.text.secondary
588
- },
589
- ...props,
590
- children
591
- }
592
- );
593
- const TableHeaderRenderer = ({ children, ...props }) => /* @__PURE__ */ jsx4(
594
- "th",
595
- {
596
- style: {
597
- border: "1px solid #ddd",
598
- padding: "8px",
599
- backgroundColor: theme.palette.mode === "dark" ? "#333" : "#f2f2f2",
600
- textAlign: "left"
601
- },
602
- ...props,
603
- children
604
- }
605
- );
606
- const TableCellRenderer = ({ children, ...props }) => /* @__PURE__ */ jsx4(
607
- "td",
608
- {
609
- style: {
610
- border: "1px solid #ddd",
611
- padding: "8px"
612
- },
613
- ...props,
614
- children
615
- }
616
- );
617
- const ParagraphRenderer = ({ children, ...props }) => /* @__PURE__ */ jsx4("p", { style: { marginTop: "0.5rem", marginBottom: "0.5rem" }, ...props, children });
618
- const components = {
619
- mark: MarkRenderer,
620
- code: CodeRenderer,
621
- a: LinkRenderer,
622
- em: EmRenderer,
623
- table: TableRenderer,
624
- ol: OrderedListRenderer,
625
- ul: UnorderedListRenderer,
626
- blockquote: BlockQuoteRenderer,
627
- th: TableHeaderRenderer,
628
- td: TableCellRenderer,
629
- p: ParagraphRenderer
630
- };
631
- return /* @__PURE__ */ jsx4(
632
- Box2,
633
- {
634
- ref: containerRef,
635
- sx: {
636
- // Base transition for minor layout changes
637
- transition: "opacity 120ms ease-out, transform 120ms ease-out",
638
- "& .cursor": {
639
- display: showCursor ? "inline" : "none",
640
- animation: "blink 1s step-start infinite"
641
- },
642
- "@keyframes blink": {
643
- "50%": { opacity: 0 }
644
- },
645
- "& .bl-fade-word": {
646
- opacity: 0,
647
- animation: "bl-fade-in 420ms ease-out forwards"
648
- },
649
- "@keyframes bl-fade-in": {
650
- from: { opacity: 0, transform: "translateY(1.5px)" },
651
- to: { opacity: 1, transform: "translateY(0)" }
652
- },
653
- // Subtle fade-in for each render while streaming to reduce choppiness perception
654
- opacity: isStreaming ? 0.985 : 1,
655
- transform: isStreaming ? "translateY(0.25px)" : "none",
656
- // Reduce layout jumpiness between updates
657
- "& p:last-child": { marginBottom: 0 },
658
- // Add min height when showing loader to prevent layout shift
659
- minHeight: showLoader ? "40px" : "auto"
660
- },
661
- children: showLoader ? (
662
- // Show loading indicator when streaming but no content yet
663
- /* @__PURE__ */ jsx4(Box2, { sx: { display: "flex", alignItems: "center", minHeight: "40px", pl: 2 }, children: /* @__PURE__ */ jsxs("div", { className: "typing-only", children: [
664
- /* @__PURE__ */ jsx4("span", { className: "dot" }),
665
- /* @__PURE__ */ jsx4("span", { className: "dot" }),
666
- /* @__PURE__ */ jsx4("span", { className: "dot" })
667
- ] }) })
668
- ) : /* @__PURE__ */ jsx4(
669
- ReactMarkdown,
670
- {
671
- remarkPlugins: [remarkGfm],
672
- rehypePlugins: [rehypeRaw, [rehypeSanitize, markdownSanitizeSchema]],
673
- components,
674
- children: (renderContent || sanitizedContent) + (showCursor ? " \u258A" : "")
675
- }
676
- )
677
- }
678
- );
679
- };
680
- var StreamingMarkdown_default = StreamingMarkdown;
681
-
682
- // src/chat/chat-messages.tsx
683
- import { jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
684
229
  var ChatMessages = ({
685
230
  pendingMessage,
686
231
  streamBuffer,
@@ -699,7 +244,7 @@ var ChatMessages = ({
699
244
  const lastIndex = history.length - 1;
700
245
  const hasActivePlaceholder = lastIndex >= 0 && history[lastIndex]?.answer === "...";
701
246
  if (!responseStarted && !pendingMessage && history.length === 0) return null;
702
- 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: [
703
248
  history.map((entry, index) => {
704
249
  const isLast = index === lastIndex;
705
250
  const isPlaceholder = entry.answer === "...";
@@ -707,8 +252,8 @@ var ChatMessages = ({
707
252
  const content = isLast ? isStreaming ? streamBuffer || "" : isPlaceholder ? "" : entry.answer : entry.answer;
708
253
  const rawSources = entry.sourceFiles;
709
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;
710
- const responseNode = /* @__PURE__ */ jsxs2(
711
- Box3,
255
+ const responseNode = /* @__PURE__ */ jsxs(
256
+ Box2,
712
257
  {
713
258
  sx: {
714
259
  minHeight: isLast ? isMobile ? "80px" : "60px" : void 0,
@@ -717,8 +262,8 @@ var ChatMessages = ({
717
262
  transition: "min-height 0.25s cubic-bezier(0.4, 0, 0.2, 1)"
718
263
  },
719
264
  children: [
720
- /* @__PURE__ */ jsx5(
721
- Box3,
265
+ /* @__PURE__ */ jsx4(
266
+ Box2,
722
267
  {
723
268
  sx: {
724
269
  position: showLoader ? "static" : "absolute",
@@ -731,15 +276,15 @@ var ChatMessages = ({
731
276
  pointerEvents: showLoader ? "auto" : "none",
732
277
  zIndex: showLoader ? 1 : 0
733
278
  },
734
- children: /* @__PURE__ */ jsx5(Box3, { sx: { display: "flex", alignItems: "center", minHeight: "40px", pl: 2 }, children: /* @__PURE__ */ jsxs2("div", { className: "typing-only", children: [
735
- /* @__PURE__ */ jsx5("span", { className: "dot" }),
736
- /* @__PURE__ */ jsx5("span", { className: "dot" }),
737
- /* @__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" })
738
283
  ] }) })
739
284
  }
740
285
  ),
741
- /* @__PURE__ */ jsx5(
742
- Box3,
286
+ /* @__PURE__ */ jsx4(
287
+ Box2,
743
288
  {
744
289
  sx: {
745
290
  position: showLoader ? "absolute" : "static",
@@ -752,7 +297,7 @@ var ChatMessages = ({
752
297
  pointerEvents: showLoader ? "none" : "auto",
753
298
  zIndex: 1
754
299
  },
755
- children: /* @__PURE__ */ jsx5(
300
+ children: /* @__PURE__ */ jsx4(
756
301
  StreamingMarkdown_default,
757
302
  {
758
303
  content,
@@ -765,7 +310,7 @@ var ChatMessages = ({
765
310
  ]
766
311
  }
767
312
  );
768
- return /* @__PURE__ */ jsx5(Box3, { children: /* @__PURE__ */ jsx5(
313
+ return /* @__PURE__ */ jsx4(Box2, { children: /* @__PURE__ */ jsx4(
769
314
  ai_response_text_field_default,
770
315
  {
771
316
  question: entry.question,
@@ -780,14 +325,14 @@ var ChatMessages = ({
780
325
  }
781
326
  ) }, index);
782
327
  }),
783
- /* @__PURE__ */ jsx5("div", { style: { height: "1px" }, ref: scrollTargetRef })
328
+ /* @__PURE__ */ jsx4("div", { style: { height: "1px" }, ref: scrollTargetRef })
784
329
  ] });
785
330
  };
786
331
  var chat_messages_default = ChatMessages;
787
332
 
788
333
  // src/chat/chat-input.tsx
789
- import { useEffect as useEffect4, useRef as useRef3, useState as useState4 } from "react";
790
- 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";
791
336
  import CloseIcon2 from "@mui/icons-material/Close";
792
337
  import ArrowUpwardIcon from "@mui/icons-material/ArrowUpward";
793
338
  import PsychologyIcon from "@mui/icons-material/Psychology";
@@ -797,9 +342,9 @@ import GraphicEqIcon from "@mui/icons-material/GraphicEq";
797
342
  import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
798
343
 
799
344
  // src/services/stt/transcriber.tsx
800
- import { useState as useState3, useRef as useRef2 } from "react";
345
+ import { useState as useState2, useRef } from "react";
801
346
  import MicIcon from "@mui/icons-material/Mic";
802
- import CheckIcon2 from "@mui/icons-material/Check";
347
+ import CheckIcon from "@mui/icons-material/Check";
803
348
  import CloseIcon from "@mui/icons-material/Close";
804
349
 
805
350
  // src/services/stt/sound-recorder.service.ts
@@ -944,9 +489,9 @@ var STTClient = class {
944
489
  };
945
490
 
946
491
  // src/services/stt/transcriber.tsx
947
- import { CircularProgress, IconButton as IconButton3, useTheme as useTheme4 } from "@mui/material";
492
+ import { CircularProgress, IconButton as IconButton2, useTheme as useTheme3 } from "@mui/material";
948
493
  import { from as from2, Subscription, switchMap as switchMap2 } from "rxjs";
949
- 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";
950
495
  var initialButtonStyles = (badgeBackground, fileText, hoverBadgeBackground) => ({
951
496
  bgcolor: badgeBackground,
952
497
  color: fileText,
@@ -956,14 +501,14 @@ var initialButtonStyles = (badgeBackground, fileText, hoverBadgeBackground) => (
956
501
  "&:hover": { bgcolor: hoverBadgeBackground }
957
502
  });
958
503
  var Transcriber = ({ onTranscriptionCompleted }) => {
959
- const theme = useTheme4();
504
+ const theme = useTheme3();
960
505
  const badgeBackground = theme.palette.chat.badge;
961
506
  const fileText = theme.palette.chat.fileText;
962
507
  const hoverBadgeBackground = theme.palette.chat.badgeHover;
963
- const [status, setStatus] = useState3("IDLE");
964
- const recorderRef = useRef2(new SoundRecorderService());
965
- const [iconButtonStyles] = useState3(() => initialButtonStyles(badgeBackground, fileText, hoverBadgeBackground));
966
- 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());
967
512
  const start = () => {
968
513
  recordingSub.unsubscribe();
969
514
  const recording = recorderRef.current.start();
@@ -994,7 +539,7 @@ var Transcriber = ({ onTranscriptionCompleted }) => {
994
539
  setStatus("LOADING");
995
540
  stop();
996
541
  };
997
- return /* @__PURE__ */ jsx6(
542
+ return /* @__PURE__ */ jsx5(
998
543
  "div",
999
544
  {
1000
545
  style: {
@@ -1004,34 +549,34 @@ var Transcriber = ({ onTranscriptionCompleted }) => {
1004
549
  backgroundColor: status === "RECORDING" ? "rgba(0,0,0,.3)" : "rgba(0,0,0,0)",
1005
550
  borderRadius: "50px"
1006
551
  },
1007
- 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: [
1008
- /* @__PURE__ */ jsx6(
1009
- 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,
1010
555
  {
1011
556
  onClick: handleCancelClick,
1012
557
  sx: { ...iconButtonStyles, marginRight: 1 },
1013
- children: /* @__PURE__ */ jsx6(CloseIcon, {})
558
+ children: /* @__PURE__ */ jsx5(CloseIcon, {})
1014
559
  }
1015
560
  ),
1016
- /* @__PURE__ */ jsx6(
1017
- IconButton3,
561
+ /* @__PURE__ */ jsx5(
562
+ IconButton2,
1018
563
  {
1019
564
  sx: {
1020
565
  ...iconButtonStyles,
1021
566
  filter: "invert(110%)"
1022
567
  },
1023
568
  onClick: handleSubmitClick,
1024
- children: /* @__PURE__ */ jsx6(CheckIcon2, {})
569
+ children: /* @__PURE__ */ jsx5(CheckIcon, {})
1025
570
  }
1026
571
  )
1027
- ] }) : 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
1028
573
  }
1029
574
  );
1030
575
  };
1031
576
  var transcriber_default = Transcriber;
1032
577
 
1033
578
  // src/chat/chat-input.tsx
1034
- import { useTheme as useTheme5, alpha as alpha2 } from "@mui/material/styles";
579
+ import { useTheme as useTheme4, alpha } from "@mui/material/styles";
1035
580
 
1036
581
  // src/store/voiceModeStore.ts
1037
582
  import { create } from "zustand";
@@ -1070,7 +615,7 @@ var useVoiceModeStore = create((set) => ({
1070
615
 
1071
616
  // src/chat/chat-input.tsx
1072
617
  import { shallow } from "zustand/shallow";
1073
- 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";
1074
619
  var ChatInput = (props) => {
1075
620
  const {
1076
621
  inputValue,
@@ -1085,7 +630,7 @@ var ChatInput = (props) => {
1085
630
  onStop,
1086
631
  isStreaming
1087
632
  } = props;
1088
- const theme = useTheme5();
633
+ const theme = useTheme4();
1089
634
  const inputBackground = theme.palette.chat.input;
1090
635
  const shellBackground = theme.palette.chat.shell;
1091
636
  const badgeBackground = theme.palette.chat.badge;
@@ -1113,13 +658,13 @@ var ChatInput = (props) => {
1113
658
  }),
1114
659
  shallow
1115
660
  );
1116
- const [memoryOpen, setMemoryOpen] = useState4(false);
1117
- const [fileInputs, setFileInputs] = useState4([]);
1118
- const fileInputRef = useRef3(null);
1119
- const [brandingText, setBrandingText] = useState4("");
1120
- const [feedbackModalOpen, setFeedbackModalOpen] = useState4(false);
1121
- const [isKeyboardOpen, setKeyboardOpen] = useState4(false);
1122
- 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);
1123
668
  const compactMobile = isMobile;
1124
669
  const primaryIconSize = isMobile ? 32 : 40;
1125
670
  const sendIconSize = isMobile ? 36 : 44;
@@ -1128,10 +673,10 @@ var ChatInput = (props) => {
1128
673
  const attachmentChipPaddingY = isMobile ? 0.55 : 0.75;
1129
674
  const mobileShellPadding = `calc(var(--input-offset, 1.5rem) - 0.4rem)`;
1130
675
  const streamingActive = Boolean(isStreaming);
1131
- 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;
1132
677
  const sendButtonColor = streamingActive ? theme.palette.common.white : fileIconBg;
1133
- const sendButtonHover = streamingActive ? alpha2(theme.palette.error.main, theme.palette.mode === "dark" ? 0.9 : 0.82) : hoverBadgeBackground;
1134
- 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";
1135
680
  const { hasSTT, hasMemory, hasDocumentKnowledge } = useFeatures();
1136
681
  const { showMemoryToggle, showDocumentUpload } = useFeatureVisibility();
1137
682
  const isSTTAvailable = !!packageSettings?.gatewayApiUrl && preferences.sttEnabled && hasSTT();
@@ -1142,7 +687,7 @@ var ChatInput = (props) => {
1142
687
  const isFeedbackEnabled = preferences.feedbackEnabled;
1143
688
  const gatewayUrlLower = packageSettings?.gatewayApiUrl?.toLowerCase?.() ?? "";
1144
689
  const isPlaygroundMode2 = packageSettings?.playgroundMode === true || gatewayUrlLower.startsWith("playground://") || typeof window !== "undefined" && window.location.pathname.includes("/playground");
1145
- useEffect4(() => {
690
+ useEffect3(() => {
1146
691
  const lockViewportHeight = () => {
1147
692
  if (isMobile) {
1148
693
  document.documentElement.style.setProperty("--vh", `${window.innerHeight * 0.01}px`);
@@ -1156,7 +701,7 @@ var ChatInput = (props) => {
1156
701
  window.addEventListener("resize", lockViewportHeight);
1157
702
  return () => window.removeEventListener("resize", lockViewportHeight);
1158
703
  }, [isMobile]);
1159
- useEffect4(() => {
704
+ useEffect3(() => {
1160
705
  if (!isMobile) {
1161
706
  setKeyboardOpen(false);
1162
707
  return;
@@ -1179,7 +724,7 @@ var ChatInput = (props) => {
1179
724
  window.removeEventListener("resize", detectKeyboard);
1180
725
  };
1181
726
  }, [isMobile]);
1182
- useEffect4(() => {
727
+ useEffect3(() => {
1183
728
  const loadBrandingText = async () => {
1184
729
  try {
1185
730
  const branding = await brandingService_default.getBranding();
@@ -1191,7 +736,7 @@ var ChatInput = (props) => {
1191
736
  };
1192
737
  loadBrandingText();
1193
738
  }, []);
1194
- useEffect4(() => {
739
+ useEffect3(() => {
1195
740
  const handlePaste = (e) => {
1196
741
  const items = e.clipboardData?.items;
1197
742
  if (items) {
@@ -1360,15 +905,15 @@ ${sanitize(
1360
905
  const hasFeedbackAction = isFeedbackEnabled && isMobile;
1361
906
  const hasSttAction = isSTTAvailable && !isVoiceModeEnabled;
1362
907
  const hasSecondaryActions = isMobile && (hasAttachmentAction || hasMemoryAction || hasFeedbackAction || hasSttAction);
1363
- useEffect4(() => {
908
+ useEffect3(() => {
1364
909
  if (!isMobile || !hasSecondaryActions) {
1365
910
  setMoreActionsOpen(false);
1366
911
  }
1367
912
  }, [isMobile, hasSecondaryActions]);
1368
913
  const renderAttachmentButton = (key) => {
1369
914
  if (!hasAttachmentAction) return null;
1370
- return /* @__PURE__ */ jsx7(Tooltip2, { title: "Attach files or images", children: /* @__PURE__ */ jsx7(
1371
- IconButton4,
915
+ return /* @__PURE__ */ jsx6(Tooltip, { title: "Attach files or images", children: /* @__PURE__ */ jsx6(
916
+ IconButton3,
1372
917
  {
1373
918
  onClick: () => fileInputRef.current?.click(),
1374
919
  sx: {
@@ -1385,8 +930,8 @@ ${sanitize(
1385
930
  };
1386
931
  const renderMemoryButton = (key) => {
1387
932
  if (!hasMemoryAction) return null;
1388
- return /* @__PURE__ */ jsx7(Tooltip2, { title: "Memory", children: /* @__PURE__ */ jsx7(
1389
- IconButton4,
933
+ return /* @__PURE__ */ jsx6(Tooltip, { title: "Memory", children: /* @__PURE__ */ jsx6(
934
+ IconButton3,
1390
935
  {
1391
936
  onClick: () => setMemoryOpen(true),
1392
937
  sx: {
@@ -1397,14 +942,14 @@ ${sanitize(
1397
942
  borderRadius: "50%",
1398
943
  "&:hover": { bgcolor: hoverBadgeBackground }
1399
944
  },
1400
- children: /* @__PURE__ */ jsx7(PsychologyIcon, { fontSize: "small" })
945
+ children: /* @__PURE__ */ jsx6(PsychologyIcon, { fontSize: "small" })
1401
946
  }
1402
947
  ) }, key ?? "memory");
1403
948
  };
1404
949
  const renderFeedbackButton = (key) => {
1405
950
  if (!hasFeedbackAction) return null;
1406
- return /* @__PURE__ */ jsx7(Tooltip2, { title: "Send Feedback", children: /* @__PURE__ */ jsx7(
1407
- IconButton4,
951
+ return /* @__PURE__ */ jsx6(Tooltip, { title: "Send Feedback", children: /* @__PURE__ */ jsx6(
952
+ IconButton3,
1408
953
  {
1409
954
  onClick: () => setFeedbackModalOpen(true),
1410
955
  sx: {
@@ -1415,17 +960,17 @@ ${sanitize(
1415
960
  borderRadius: "50%",
1416
961
  "&:hover": { bgcolor: hoverBadgeBackground }
1417
962
  },
1418
- children: /* @__PURE__ */ jsx7(FeedbackIcon, { fontSize: "small" })
963
+ children: /* @__PURE__ */ jsx6(FeedbackIcon, { fontSize: "small" })
1419
964
  }
1420
965
  ) }, key ?? "feedback");
1421
966
  };
1422
967
  const renderSttButton = (key) => {
1423
968
  if (!hasSttAction) return null;
1424
- 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");
1425
970
  };
1426
- return /* @__PURE__ */ jsxs4(Fragment3, { children: [
1427
- /* @__PURE__ */ jsxs4(
1428
- Box4,
971
+ return /* @__PURE__ */ jsxs3(Fragment3, { children: [
972
+ /* @__PURE__ */ jsxs3(
973
+ Box3,
1429
974
  {
1430
975
  sx: {
1431
976
  width: "100%",
@@ -1444,8 +989,8 @@ ${sanitize(
1444
989
  },
1445
990
  ref: inputContainerRef,
1446
991
  children: [
1447
- /* @__PURE__ */ jsxs4(
1448
- Box4,
992
+ /* @__PURE__ */ jsxs3(
993
+ Box3,
1449
994
  {
1450
995
  sx: {
1451
996
  width: "100%",
@@ -1460,8 +1005,8 @@ ${sanitize(
1460
1005
  gap: isMobile ? compactMobile ? 0.75 : 1 : 1
1461
1006
  },
1462
1007
  children: [
1463
- /* @__PURE__ */ jsxs4(
1464
- Box4,
1008
+ /* @__PURE__ */ jsxs3(
1009
+ Box3,
1465
1010
  {
1466
1011
  sx: {
1467
1012
  display: "flex",
@@ -1471,8 +1016,8 @@ ${sanitize(
1471
1016
  flexDirection: "row"
1472
1017
  },
1473
1018
  children: [
1474
- fileInputs.map((file, idx) => /* @__PURE__ */ jsxs4(
1475
- Box4,
1019
+ fileInputs.map((file, idx) => /* @__PURE__ */ jsxs3(
1020
+ Box3,
1476
1021
  {
1477
1022
  sx: {
1478
1023
  position: "relative",
@@ -1485,7 +1030,7 @@ ${sanitize(
1485
1030
  gap: isMobile ? compactMobile ? 0.6 : 0.9 : 1
1486
1031
  },
1487
1032
  children: [
1488
- /* @__PURE__ */ jsx7(
1033
+ /* @__PURE__ */ jsx6(
1489
1034
  Avatar2,
1490
1035
  {
1491
1036
  sx: {
@@ -1499,22 +1044,22 @@ ${sanitize(
1499
1044
  children: getFileIcon(file.name)
1500
1045
  }
1501
1046
  ),
1502
- /* @__PURE__ */ jsx7(Typography, { variant: "caption", sx: { color: fileText }, children: file.name }),
1503
- /* @__PURE__ */ jsx7(
1504
- IconButton4,
1047
+ /* @__PURE__ */ jsx6(Typography, { variant: "caption", sx: { color: fileText }, children: file.name }),
1048
+ /* @__PURE__ */ jsx6(
1049
+ IconButton3,
1505
1050
  {
1506
1051
  size: "small",
1507
1052
  onClick: () => setFileInputs((prev) => prev.filter((_, i) => i !== idx)),
1508
1053
  sx: { ml: 0.5, color: theme.palette.mode === "dark" ? "#aaa" : "#444" },
1509
- children: /* @__PURE__ */ jsx7(CloseIcon2, { sx: { fontSize: 14 } })
1054
+ children: /* @__PURE__ */ jsx6(CloseIcon2, { sx: { fontSize: 14 } })
1510
1055
  }
1511
1056
  )
1512
1057
  ]
1513
1058
  },
1514
1059
  idx
1515
1060
  )),
1516
- pastedImages.map((img, idx) => /* @__PURE__ */ jsxs4(Box4, { sx: { position: "relative" }, children: [
1517
- /* @__PURE__ */ jsx7(
1061
+ pastedImages.map((img, idx) => /* @__PURE__ */ jsxs3(Box3, { sx: { position: "relative" }, children: [
1062
+ /* @__PURE__ */ jsx6(
1518
1063
  Avatar2,
1519
1064
  {
1520
1065
  src: img,
@@ -1526,8 +1071,8 @@ ${sanitize(
1526
1071
  }
1527
1072
  }
1528
1073
  ),
1529
- /* @__PURE__ */ jsx7(
1530
- IconButton4,
1074
+ /* @__PURE__ */ jsx6(
1075
+ IconButton3,
1531
1076
  {
1532
1077
  size: "small",
1533
1078
  onClick: () => removeImage(idx),
@@ -1543,7 +1088,7 @@ ${sanitize(
1543
1088
  bgcolor: "rgba(255, 5, 5, 0.85)"
1544
1089
  }
1545
1090
  },
1546
- children: /* @__PURE__ */ jsx7(
1091
+ children: /* @__PURE__ */ jsx6(
1547
1092
  CloseIcon2,
1548
1093
  {
1549
1094
  sx: {
@@ -1555,7 +1100,7 @@ ${sanitize(
1555
1100
  }
1556
1101
  )
1557
1102
  ] }, `img-${idx}`)),
1558
- /* @__PURE__ */ jsx7(
1103
+ /* @__PURE__ */ jsx6(
1559
1104
  "input",
1560
1105
  {
1561
1106
  type: "file",
@@ -1592,15 +1137,15 @@ ${sanitize(
1592
1137
  ]
1593
1138
  }
1594
1139
  ),
1595
- /* @__PURE__ */ jsx7(
1596
- Box4,
1140
+ /* @__PURE__ */ jsx6(
1141
+ Box3,
1597
1142
  {
1598
1143
  sx: {
1599
1144
  display: "flex",
1600
1145
  maxHeight: "200px",
1601
1146
  overflowY: "auto"
1602
1147
  },
1603
- children: /* @__PURE__ */ jsx7(
1148
+ children: /* @__PURE__ */ jsx6(
1604
1149
  TextField,
1605
1150
  {
1606
1151
  fullWidth: true,
@@ -1632,8 +1177,8 @@ ${sanitize(
1632
1177
  )
1633
1178
  }
1634
1179
  ),
1635
- /* @__PURE__ */ jsxs4(
1636
- Box4,
1180
+ /* @__PURE__ */ jsxs3(
1181
+ Box3,
1637
1182
  {
1638
1183
  sx: {
1639
1184
  display: "flex",
@@ -1643,8 +1188,8 @@ ${sanitize(
1643
1188
  mt: isMobile ? 0.5 : 1
1644
1189
  },
1645
1190
  children: [
1646
- /* @__PURE__ */ jsxs4(
1647
- Box4,
1191
+ /* @__PURE__ */ jsxs3(
1192
+ Box3,
1648
1193
  {
1649
1194
  sx: {
1650
1195
  display: "flex",
@@ -1653,34 +1198,34 @@ ${sanitize(
1653
1198
  minHeight: primaryIconSize
1654
1199
  },
1655
1200
  children: [
1656
- isVoiceModeEligible && /* @__PURE__ */ jsxs4(Fragment3, { children: [
1657
- /* @__PURE__ */ jsx7(
1658
- Tooltip2,
1201
+ isVoiceModeEligible && /* @__PURE__ */ jsxs3(Fragment3, { children: [
1202
+ /* @__PURE__ */ jsx6(
1203
+ Tooltip,
1659
1204
  {
1660
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",
1661
- children: /* @__PURE__ */ jsx7(
1662
- IconButton4,
1206
+ children: /* @__PURE__ */ jsx6(
1207
+ IconButton3,
1663
1208
  {
1664
1209
  onClick: toggleVoiceMode,
1665
1210
  sx: {
1666
1211
  width: primaryIconSize,
1667
1212
  height: primaryIconSize,
1668
1213
  borderRadius: "50%",
1669
- 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,
1670
1215
  color: isVoiceModeEnabled ? theme.palette.common.white : fileText,
1671
- 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",
1672
1217
  transform: isVoiceModeEnabled && voiceStatus === "recording" ? "scale(1.05)" : "none",
1673
1218
  transition: "transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease",
1674
1219
  "&:hover": {
1675
- 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
1676
1221
  }
1677
1222
  },
1678
- 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 } })
1679
1224
  }
1680
1225
  )
1681
1226
  }
1682
1227
  ),
1683
- !isMobile && isVoiceModeEnabled && /* @__PURE__ */ jsx7(
1228
+ !isMobile && isVoiceModeEnabled && /* @__PURE__ */ jsx6(
1684
1229
  Typography,
1685
1230
  {
1686
1231
  variant: "caption",
@@ -1698,8 +1243,8 @@ ${sanitize(
1698
1243
  !isMobile && renderAttachmentButton("attach-inline"),
1699
1244
  !isMobile && renderMemoryButton("memory-inline"),
1700
1245
  !isMobile && renderSttButton("stt-inline"),
1701
- isMobile && hasSecondaryActions && /* @__PURE__ */ jsx7(
1702
- IconButton4,
1246
+ isMobile && hasSecondaryActions && /* @__PURE__ */ jsx6(
1247
+ IconButton3,
1703
1248
  {
1704
1249
  onClick: () => setMoreActionsOpen((prev) => !prev),
1705
1250
  sx: {
@@ -1711,7 +1256,7 @@ ${sanitize(
1711
1256
  transition: "background-color 0.2s ease",
1712
1257
  "&:hover": { bgcolor: hoverBadgeBackground }
1713
1258
  },
1714
- children: /* @__PURE__ */ jsx7(
1259
+ children: /* @__PURE__ */ jsx6(
1715
1260
  ExpandMoreIcon,
1716
1261
  {
1717
1262
  fontSize: "small",
@@ -1726,8 +1271,8 @@ ${sanitize(
1726
1271
  ]
1727
1272
  }
1728
1273
  ),
1729
- /* @__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(
1730
- 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,
1731
1276
  {
1732
1277
  onClick: isStreaming ? onStop || (() => {
1733
1278
  }) : handleSubmit,
@@ -1743,14 +1288,14 @@ ${sanitize(
1743
1288
  "&:hover": { bgcolor: sendButtonHover },
1744
1289
  "&.Mui-disabled": { opacity: 0.5 }
1745
1290
  },
1746
- 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" })
1747
1292
  }
1748
1293
  ) }) }) })
1749
1294
  ]
1750
1295
  }
1751
1296
  ),
1752
- isMobile && hasSecondaryActions && /* @__PURE__ */ jsx7(Collapse, { in: moreActionsOpen, unmountOnExit: true, children: /* @__PURE__ */ jsxs4(
1753
- Box4,
1297
+ isMobile && hasSecondaryActions && /* @__PURE__ */ jsx6(Collapse, { in: moreActionsOpen, unmountOnExit: true, children: /* @__PURE__ */ jsxs3(
1298
+ Box3,
1754
1299
  {
1755
1300
  sx: {
1756
1301
  display: "flex",
@@ -1771,7 +1316,7 @@ ${sanitize(
1771
1316
  ]
1772
1317
  }
1773
1318
  ),
1774
- /* @__PURE__ */ jsxs4(
1319
+ /* @__PURE__ */ jsxs3(
1775
1320
  Typography,
1776
1321
  {
1777
1322
  variant: "caption",
@@ -1797,8 +1342,8 @@ ${sanitize(
1797
1342
  ]
1798
1343
  }
1799
1344
  ),
1800
- isMemoryEnabled && /* @__PURE__ */ jsx7(memory_modal_default, { open: memoryOpen, onClose: () => setMemoryOpen(false) }),
1801
- isFeedbackEnabled && /* @__PURE__ */ jsx7(
1345
+ isMemoryEnabled && /* @__PURE__ */ jsx6(memory_modal_default, { open: memoryOpen, onClose: () => setMemoryOpen(false) }),
1346
+ isFeedbackEnabled && /* @__PURE__ */ jsx6(
1802
1347
  FeedbackModal,
1803
1348
  {
1804
1349
  open: feedbackModalOpen,
@@ -1811,7 +1356,7 @@ ${sanitize(
1811
1356
  var chat_input_default = ChatInput;
1812
1357
 
1813
1358
  // src/chat/hooks/useAIProvider.tsx
1814
- import { useCallback, useRef as useRef4 } from "react";
1359
+ import { useCallback, useRef as useRef3 } from "react";
1815
1360
 
1816
1361
  // src/chat/hooks/useMemoryEnhancer.tsx
1817
1362
  import { lastValueFrom, map as map2 } from "rxjs";
@@ -2338,9 +1883,9 @@ The user explicitly asked you to remember this. Respond with a short third-perso
2338
1883
  };
2339
1884
 
2340
1885
  // src/chat/hooks/useMoodEngine.tsx
2341
- import { useState as useState5 } from "react";
1886
+ import { useState as useState4 } from "react";
2342
1887
  var useMoodEngine = () => {
2343
- const [mood, setMood] = useState5("neutral");
1888
+ const [mood, setMood] = useState4("neutral");
2344
1889
  const analyzeMood = async (message) => {
2345
1890
  try {
2346
1891
  const detected = await detectMessageMood(message);
@@ -2784,21 +2329,21 @@ var useAIProvider = ({
2784
2329
  inputRef,
2785
2330
  onError
2786
2331
  }) => {
2787
- const currentSubRef = useRef4(null);
2788
- const lastPartialRef = useRef4({
2332
+ const currentSubRef = useRef3(null);
2333
+ const lastPartialRef = useRef3({
2789
2334
  text: "",
2790
2335
  images: [],
2791
2336
  usedDocs: [],
2792
2337
  question: ""
2793
2338
  });
2794
- const flushTimerRef = useRef4(null);
2339
+ const flushTimerRef = useRef3(null);
2795
2340
  const { provider } = useAIProviderStore.getState();
2796
2341
  const { preferences } = usePreferencesStore.getState();
2797
2342
  const { docs } = useKnowledgeStore.getState();
2798
2343
  const { analyzeMood, moodTokenBoost } = useMoodEngine();
2799
2344
  const { runMemoryScan } = useMemoryEnhancer();
2800
2345
  const { isVectorEnabled, searchMemories, searchDocuments, getUserMemories } = useVectorStore();
2801
- const pinnedVectorCacheRef = useRef4({
2346
+ const pinnedVectorCacheRef = useRef3({
2802
2347
  fetchedAt: 0,
2803
2348
  memories: []
2804
2349
  });
@@ -3601,7 +3146,7 @@ ${items.map((item, index) => {
3601
3146
  };
3602
3147
 
3603
3148
  // src/hooks/useAutoScroll.ts
3604
- 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";
3605
3150
  var SCROLL_STATE_CHANGED_EVENT = "scrollStateChanged";
3606
3151
  var useAutoScroll = (options = {}) => {
3607
3152
  const {
@@ -3610,9 +3155,9 @@ var useAutoScroll = (options = {}) => {
3610
3155
  enabled = true,
3611
3156
  isMobile = false
3612
3157
  } = options;
3613
- const containerRef = useRef5(null);
3614
- const targetRef = useRef5(null);
3615
- const shouldAutoScrollRef = useRef5(true);
3158
+ const containerRef = useRef4(null);
3159
+ const targetRef = useRef4(null);
3160
+ const shouldAutoScrollRef = useRef4(true);
3616
3161
  const isNearBottom = useCallback2(() => {
3617
3162
  const container = containerRef.current;
3618
3163
  if (!container) return true;
@@ -3687,7 +3232,7 @@ var useAutoScroll = (options = {}) => {
3687
3232
  }
3688
3233
  }, [enabled, isNearBottom, scrollToBottom]);
3689
3234
  const containerElement = containerRef.current;
3690
- useEffect5(() => {
3235
+ useEffect4(() => {
3691
3236
  if (!containerElement) return;
3692
3237
  const handleScroll = () => {
3693
3238
  const currentlyNearBottom = isNearBottom();
@@ -3697,7 +3242,7 @@ var useAutoScroll = (options = {}) => {
3697
3242
  containerElement.addEventListener("scroll", handleScroll, { passive: true });
3698
3243
  return () => containerElement.removeEventListener("scroll", handleScroll);
3699
3244
  }, [containerElement, isNearBottom]);
3700
- useEffect5(() => {
3245
+ useEffect4(() => {
3701
3246
  autoScrollIfNeeded();
3702
3247
  });
3703
3248
  const getScrollState = useCallback2(() => {
@@ -3736,9 +3281,9 @@ var useAutoScroll = (options = {}) => {
3736
3281
  };
3737
3282
 
3738
3283
  // src/hooks/useNetworkStatus.ts
3739
- 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";
3740
3285
  var useNetworkStatus = () => {
3741
- const [networkStatus, setNetworkStatus] = useState6({
3286
+ const [networkStatus, setNetworkStatus] = useState5({
3742
3287
  isOnline: navigator.onLine,
3743
3288
  isSlowConnection: false,
3744
3289
  connectionQuality: "fast",
@@ -3758,7 +3303,7 @@ var useNetworkStatus = () => {
3758
3303
  connectionQuality: !navigator.onLine ? "offline" : isSlowConnection ? "slow" : "fast"
3759
3304
  }));
3760
3305
  }, []);
3761
- useEffect6(() => {
3306
+ useEffect5(() => {
3762
3307
  const handleOnline = () => {
3763
3308
  setNetworkStatus((prev) => ({
3764
3309
  ...prev,
@@ -3780,7 +3325,7 @@ var useNetworkStatus = () => {
3780
3325
  window.removeEventListener("offline", handleOffline);
3781
3326
  };
3782
3327
  }, []);
3783
- useEffect6(() => {
3328
+ useEffect5(() => {
3784
3329
  const { connection } = navigator;
3785
3330
  if (connection) {
3786
3331
  const updateConnectionInfo = () => {
@@ -3817,15 +3362,15 @@ var useNetworkStatus = () => {
3817
3362
 
3818
3363
  // src/chat/chat-app-bar.tsx
3819
3364
  import { Avatar as Avatar8 } from "@mui/material";
3820
- 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";
3821
3366
  import {
3822
- Box as Box11,
3823
- IconButton as IconButton10,
3367
+ Box as Box10,
3368
+ IconButton as IconButton9,
3824
3369
  Menu as Menu5,
3825
3370
  MenuItem as MenuItem5,
3826
- Tooltip as Tooltip5,
3371
+ Tooltip as Tooltip4,
3827
3372
  useMediaQuery as useMediaQuery5,
3828
- useTheme as useTheme12,
3373
+ useTheme as useTheme11,
3829
3374
  Dialog as Dialog5,
3830
3375
  DialogTitle as DialogTitle5,
3831
3376
  DialogContent as DialogContent5,
@@ -3846,13 +3391,13 @@ import ErrorOutlineIcon from "@mui/icons-material/ErrorOutline";
3846
3391
  import { useNavigate } from "react-router-dom";
3847
3392
 
3848
3393
  // src/chat/conversation-drawer.tsx
3849
- 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";
3850
3395
  import {
3851
3396
  Drawer,
3852
- Box as Box9,
3397
+ Box as Box8,
3853
3398
  Typography as Typography6,
3854
- IconButton as IconButton8,
3855
- Tooltip as Tooltip4,
3399
+ IconButton as IconButton7,
3400
+ Tooltip as Tooltip3,
3856
3401
  TextField as TextField5,
3857
3402
  InputAdornment,
3858
3403
  useMediaQuery as useMediaQuery4,
@@ -3868,7 +3413,7 @@ import {
3868
3413
  DialogActions as DialogActions3,
3869
3414
  Button as Button4,
3870
3415
  Avatar as Avatar6,
3871
- alpha as alpha6
3416
+ alpha as alpha5
3872
3417
  } from "@mui/material";
3873
3418
  import {
3874
3419
  Close as CloseIcon5,
@@ -3880,18 +3425,18 @@ import {
3880
3425
  Inbox as InboxIcon3
3881
3426
  } from "@mui/icons-material";
3882
3427
  import { Add as AddIcon3 } from "@mui/icons-material";
3883
- import { useTheme as useTheme10 } from "@mui/material/styles";
3428
+ import { useTheme as useTheme9 } from "@mui/material/styles";
3884
3429
 
3885
3430
  // src/chat/project-management-modal.tsx
3886
- 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";
3887
3432
  import {
3888
3433
  Modal,
3889
3434
  Button,
3890
3435
  TextField as TextField2,
3891
3436
  List,
3892
3437
  ListItem,
3893
- IconButton as IconButton5,
3894
- Box as Box5,
3438
+ IconButton as IconButton4,
3439
+ Box as Box4,
3895
3440
  Typography as Typography2,
3896
3441
  Avatar as Avatar3,
3897
3442
  Chip,
@@ -3911,8 +3456,8 @@ import {
3911
3456
  Close as CloseIcon3,
3912
3457
  ArrowBack as ArrowBackIcon
3913
3458
  } from "@mui/icons-material";
3914
- import { useTheme as useTheme6, alpha as alpha3 } from "@mui/material/styles";
3915
- 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";
3916
3461
  var DEFAULT_COLORS = [
3917
3462
  "#2196F3",
3918
3463
  "#4CAF50",
@@ -3929,7 +3474,7 @@ var ProjectManagementModal = ({
3929
3474
  open,
3930
3475
  onClose
3931
3476
  }) => {
3932
- const theme = useTheme6();
3477
+ const theme = useTheme5();
3933
3478
  const isMobile = useMediaQuery2(theme.breakpoints.down("sm"));
3934
3479
  const {
3935
3480
  projects,
@@ -3941,24 +3486,24 @@ var ProjectManagementModal = ({
3941
3486
  hydrate
3942
3487
  } = useProjectStore();
3943
3488
  const { getConversationsByProject } = useConversationStore();
3944
- const [showCreateForm, setShowCreateForm] = useState7(false);
3945
- const [editingProject, setEditingProject] = useState7(null);
3946
- const [formData, setFormData] = useState7({
3489
+ const [showCreateForm, setShowCreateForm] = useState6(false);
3490
+ const [editingProject, setEditingProject] = useState6(null);
3491
+ const [formData, setFormData] = useState6({
3947
3492
  name: "",
3948
3493
  description: "",
3949
3494
  color: DEFAULT_COLORS[0]
3950
3495
  });
3951
- const [menuAnchor, setMenuAnchor] = useState7(null);
3952
- const [selectedProject, setSelectedProject] = useState7(null);
3953
- const [loading, setLoading] = useState7(false);
3954
- const [error, setError] = useState7(null);
3955
- const modalContainerRef = useRef6(null);
3956
- 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(() => {
3957
3502
  if (open && !_hasHydrated) {
3958
3503
  hydrate();
3959
3504
  }
3960
3505
  }, [open, _hasHydrated, hydrate]);
3961
- useEffect7(() => {
3506
+ useEffect6(() => {
3962
3507
  if (!open) {
3963
3508
  setMenuAnchor(null);
3964
3509
  setSelectedProject(null);
@@ -4055,13 +3600,13 @@ var ProjectManagementModal = ({
4055
3600
  const chatPalette = theme.palette.chat ?? {};
4056
3601
  const overlayZIndex = (theme.zIndex?.modal ?? 1300) + 20;
4057
3602
  const surfaceColor = isMobile ? theme.palette.background.paper : chatPalette.shell ?? theme.palette.background.paper;
4058
- const borderColor = chatPalette.appBar?.border ?? alpha3(theme.palette.divider, 0.12);
4059
- const subtleSurface = theme.palette.mode === "dark" ? alpha3(theme.palette.common.white, 0.04) : alpha3(theme.palette.common.black, 0.03);
4060
- 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);
4061
3606
  const headerTitle = showCreateForm ? editingProject ? "Edit Project" : "Create Project" : "Manage Projects";
4062
3607
  const headerSubtitle = showCreateForm ? "Name, describe, and color-code your project." : "Organize conversations into cohesive projects.";
4063
- const content = /* @__PURE__ */ jsxs5(
4064
- Box5,
3608
+ const content = /* @__PURE__ */ jsxs4(
3609
+ Box4,
4065
3610
  {
4066
3611
  ref: modalContainerRef,
4067
3612
  sx: {
@@ -4072,29 +3617,29 @@ var ProjectManagementModal = ({
4072
3617
  bgcolor: surfaceColor,
4073
3618
  borderRadius: isMobile ? "22px 22px 0 0" : 3,
4074
3619
  overflow: "hidden",
4075
- boxShadow: isMobile ? "none" : `0 20px 60px ${alpha3(theme.palette.common.black, 0.32)}`,
4076
- 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)}`,
4077
3622
  display: "flex",
4078
3623
  flexDirection: "column",
4079
3624
  position: "relative"
4080
3625
  },
4081
3626
  children: [
4082
- isMobile && /* @__PURE__ */ jsx8(
4083
- Box5,
3627
+ isMobile && /* @__PURE__ */ jsx7(
3628
+ Box4,
4084
3629
  {
4085
3630
  sx: {
4086
3631
  width: 56,
4087
3632
  height: 6,
4088
3633
  borderRadius: 999,
4089
- bgcolor: alpha3(theme.palette.text.primary, 0.18),
3634
+ bgcolor: alpha2(theme.palette.text.primary, 0.18),
4090
3635
  alignSelf: "center",
4091
3636
  mt: 1.25,
4092
3637
  mb: 0.75
4093
3638
  }
4094
3639
  }
4095
3640
  ),
4096
- /* @__PURE__ */ jsxs5(
4097
- Box5,
3641
+ /* @__PURE__ */ jsxs4(
3642
+ Box4,
4098
3643
  {
4099
3644
  sx: {
4100
3645
  px: isMobile ? 1.5 : 2.75,
@@ -4106,8 +3651,8 @@ var ProjectManagementModal = ({
4106
3651
  gap: 1
4107
3652
  },
4108
3653
  children: [
4109
- /* @__PURE__ */ jsxs5(
4110
- Box5,
3654
+ /* @__PURE__ */ jsxs4(
3655
+ Box4,
4111
3656
  {
4112
3657
  sx: {
4113
3658
  display: "flex",
@@ -4116,8 +3661,8 @@ var ProjectManagementModal = ({
4116
3661
  gap: 1
4117
3662
  },
4118
3663
  children: [
4119
- /* @__PURE__ */ jsxs5(
4120
- Box5,
3664
+ /* @__PURE__ */ jsxs4(
3665
+ Box4,
4121
3666
  {
4122
3667
  sx: {
4123
3668
  display: "flex",
@@ -4127,8 +3672,8 @@ var ProjectManagementModal = ({
4127
3672
  flex: 1
4128
3673
  },
4129
3674
  children: [
4130
- showCreateForm && /* @__PURE__ */ jsx8(IconButton5, { onClick: resetForm, size: "small", sx: { mr: 0.5 }, children: /* @__PURE__ */ jsx8(ArrowBackIcon, { fontSize: "small" }) }),
4131
- /* @__PURE__ */ jsx8(
3675
+ showCreateForm && /* @__PURE__ */ jsx7(IconButton4, { onClick: resetForm, size: "small", sx: { mr: 0.5 }, children: /* @__PURE__ */ jsx7(ArrowBackIcon, { fontSize: "small" }) }),
3676
+ /* @__PURE__ */ jsx7(
4132
3677
  Typography2,
4133
3678
  {
4134
3679
  variant: "h6",
@@ -4145,16 +3690,16 @@ var ProjectManagementModal = ({
4145
3690
  ]
4146
3691
  }
4147
3692
  ),
4148
- /* @__PURE__ */ jsx8(IconButton5, { onClick: handleClose, size: "small", children: /* @__PURE__ */ jsx8(CloseIcon3, {}) })
3693
+ /* @__PURE__ */ jsx7(IconButton4, { onClick: handleClose, size: "small", children: /* @__PURE__ */ jsx7(CloseIcon3, {}) })
4149
3694
  ]
4150
3695
  }
4151
3696
  ),
4152
- /* @__PURE__ */ jsx8(Typography2, { variant: "body2", color: "text.secondary", children: headerSubtitle })
3697
+ /* @__PURE__ */ jsx7(Typography2, { variant: "body2", color: "text.secondary", children: headerSubtitle })
4153
3698
  ]
4154
3699
  }
4155
3700
  ),
4156
- /* @__PURE__ */ jsxs5(
4157
- Box5,
3701
+ /* @__PURE__ */ jsxs4(
3702
+ Box4,
4158
3703
  {
4159
3704
  sx: {
4160
3705
  flex: 1,
@@ -4166,9 +3711,9 @@ var ProjectManagementModal = ({
4166
3711
  gap: 2.5
4167
3712
  },
4168
3713
  children: [
4169
- error && /* @__PURE__ */ jsx8(Alert, { severity: "error", onClose: () => setError(null), children: error }),
4170
- showCreateForm ? /* @__PURE__ */ jsxs5(Box5, { sx: { display: "flex", flexDirection: "column", gap: 2 }, children: [
4171
- /* @__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(
4172
3717
  TextField2,
4173
3718
  {
4174
3719
  label: "Project name",
@@ -4180,7 +3725,7 @@ var ProjectManagementModal = ({
4180
3725
  autoFocus: true
4181
3726
  }
4182
3727
  ),
4183
- /* @__PURE__ */ jsx8(
3728
+ /* @__PURE__ */ jsx7(
4184
3729
  TextField2,
4185
3730
  {
4186
3731
  label: "Description (optional)",
@@ -4192,10 +3737,10 @@ var ProjectManagementModal = ({
4192
3737
  disabled: loading
4193
3738
  }
4194
3739
  ),
4195
- /* @__PURE__ */ jsxs5(Box5, { children: [
4196
- /* @__PURE__ */ jsx8(Typography2, { variant: "subtitle2", sx: { mb: 1 }, children: "Color" }),
4197
- /* @__PURE__ */ jsx8(Box5, { sx: { display: "flex", flexWrap: "wrap", gap: 1 }, children: DEFAULT_COLORS.map((color) => /* @__PURE__ */ jsx8(
4198
- 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,
4199
3744
  {
4200
3745
  sx: {
4201
3746
  width: 32,
@@ -4215,11 +3760,11 @@ var ProjectManagementModal = ({
4215
3760
  color
4216
3761
  )) })
4217
3762
  ] })
4218
- ] }) : /* @__PURE__ */ jsxs5(Box5, { sx: { display: "flex", flexDirection: "column", gap: 2 }, children: [
4219
- /* @__PURE__ */ jsx8(
3763
+ ] }) : /* @__PURE__ */ jsxs4(Box4, { sx: { display: "flex", flexDirection: "column", gap: 2 }, children: [
3764
+ /* @__PURE__ */ jsx7(
4220
3765
  Button,
4221
3766
  {
4222
- startIcon: /* @__PURE__ */ jsx8(AddIcon, {}),
3767
+ startIcon: /* @__PURE__ */ jsx7(AddIcon, {}),
4223
3768
  onClick: () => setShowCreateForm(true),
4224
3769
  variant: "contained",
4225
3770
  sx: {
@@ -4231,8 +3776,8 @@ var ProjectManagementModal = ({
4231
3776
  children: "Create project"
4232
3777
  }
4233
3778
  ),
4234
- projects.length === 0 ? /* @__PURE__ */ jsxs5(
4235
- Box5,
3779
+ projects.length === 0 ? /* @__PURE__ */ jsxs4(
3780
+ Box4,
4236
3781
  {
4237
3782
  sx: {
4238
3783
  textAlign: "center",
@@ -4240,19 +3785,19 @@ var ProjectManagementModal = ({
4240
3785
  px: 2,
4241
3786
  color: theme.palette.text.secondary,
4242
3787
  borderRadius: 2,
4243
- border: `1px dashed ${alpha3(theme.palette.divider, 0.4)}`,
3788
+ border: `1px dashed ${alpha2(theme.palette.divider, 0.4)}`,
4244
3789
  backgroundColor: subtleSurface
4245
3790
  },
4246
3791
  children: [
4247
- /* @__PURE__ */ jsx8(FolderIcon, { sx: { fontSize: 48, mb: 2, opacity: 0.5 } }),
4248
- /* @__PURE__ */ jsx8(Typography2, { variant: "body1", sx: { fontWeight: 600 }, children: "No projects yet" }),
4249
- /* @__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." })
4250
3795
  ]
4251
3796
  }
4252
- ) : /* @__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) => {
4253
3798
  const conversationCount = getConversationsByProject(project.id).length;
4254
- return /* @__PURE__ */ jsx8(ListItem, { disablePadding: true, children: /* @__PURE__ */ jsxs5(
4255
- Box5,
3799
+ return /* @__PURE__ */ jsx7(ListItem, { disablePadding: true, children: /* @__PURE__ */ jsxs4(
3800
+ Box4,
4256
3801
  {
4257
3802
  sx: {
4258
3803
  display: "flex",
@@ -4270,7 +3815,7 @@ var ProjectManagementModal = ({
4270
3815
  }
4271
3816
  },
4272
3817
  children: [
4273
- /* @__PURE__ */ jsx8(
3818
+ /* @__PURE__ */ jsx7(
4274
3819
  Avatar3,
4275
3820
  {
4276
3821
  sx: {
@@ -4279,12 +3824,12 @@ var ProjectManagementModal = ({
4279
3824
  height: 36,
4280
3825
  fontSize: "1rem"
4281
3826
  },
4282
- children: /* @__PURE__ */ jsx8(FolderIcon, { fontSize: "small" })
3827
+ children: /* @__PURE__ */ jsx7(FolderIcon, { fontSize: "small" })
4283
3828
  }
4284
3829
  ),
4285
- /* @__PURE__ */ jsxs5(Box5, { sx: { flex: 1, minWidth: 0 }, children: [
4286
- /* @__PURE__ */ jsxs5(Box5, { sx: { display: "flex", alignItems: "center", gap: 1, flexWrap: "wrap" }, children: [
4287
- /* @__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(
4288
3833
  Typography2,
4289
3834
  {
4290
3835
  variant: "subtitle1",
@@ -4292,7 +3837,7 @@ var ProjectManagementModal = ({
4292
3837
  children: project.name
4293
3838
  }
4294
3839
  ),
4295
- /* @__PURE__ */ jsx8(
3840
+ /* @__PURE__ */ jsx7(
4296
3841
  Chip,
4297
3842
  {
4298
3843
  label: `${conversationCount}`,
@@ -4301,13 +3846,13 @@ var ProjectManagementModal = ({
4301
3846
  height: 22,
4302
3847
  borderRadius: 999,
4303
3848
  fontWeight: 600,
4304
- bgcolor: alpha3(theme.palette.text.primary, 0.08),
3849
+ bgcolor: alpha2(theme.palette.text.primary, 0.08),
4305
3850
  color: theme.palette.text.primary
4306
3851
  }
4307
3852
  }
4308
3853
  )
4309
3854
  ] }),
4310
- project.description && /* @__PURE__ */ jsx8(
3855
+ project.description && /* @__PURE__ */ jsx7(
4311
3856
  Typography2,
4312
3857
  {
4313
3858
  variant: "body2",
@@ -4317,8 +3862,8 @@ var ProjectManagementModal = ({
4317
3862
  }
4318
3863
  )
4319
3864
  ] }),
4320
- /* @__PURE__ */ jsx8(
4321
- IconButton5,
3865
+ /* @__PURE__ */ jsx7(
3866
+ IconButton4,
4322
3867
  {
4323
3868
  onClick: (e) => {
4324
3869
  e.stopPropagation();
@@ -4330,7 +3875,7 @@ var ProjectManagementModal = ({
4330
3875
  mt: 0.25,
4331
3876
  zIndex: 1
4332
3877
  },
4333
- children: /* @__PURE__ */ jsx8(MoreVertIcon, { fontSize: "small" })
3878
+ children: /* @__PURE__ */ jsx7(MoreVertIcon, { fontSize: "small" })
4334
3879
  }
4335
3880
  )
4336
3881
  ]
@@ -4341,8 +3886,8 @@ var ProjectManagementModal = ({
4341
3886
  ]
4342
3887
  }
4343
3888
  ),
4344
- /* @__PURE__ */ jsx8(
4345
- Box5,
3889
+ /* @__PURE__ */ jsx7(
3890
+ Box4,
4346
3891
  {
4347
3892
  sx: {
4348
3893
  px: isMobile ? 1.5 : 2.75,
@@ -4352,8 +3897,8 @@ var ProjectManagementModal = ({
4352
3897
  justifyContent: "flex-end",
4353
3898
  gap: 1
4354
3899
  },
4355
- children: showCreateForm ? /* @__PURE__ */ jsxs5(Fragment4, { children: [
4356
- /* @__PURE__ */ jsx8(
3900
+ children: showCreateForm ? /* @__PURE__ */ jsxs4(Fragment4, { children: [
3901
+ /* @__PURE__ */ jsx7(
4357
3902
  Button,
4358
3903
  {
4359
3904
  onClick: resetForm,
@@ -4362,21 +3907,21 @@ var ProjectManagementModal = ({
4362
3907
  children: "Cancel"
4363
3908
  }
4364
3909
  ),
4365
- /* @__PURE__ */ jsx8(
3910
+ /* @__PURE__ */ jsx7(
4366
3911
  Button,
4367
3912
  {
4368
3913
  onClick: editingProject ? handleEditProject : handleCreateProject,
4369
3914
  variant: "contained",
4370
3915
  disabled: loading,
4371
- startIcon: loading ? /* @__PURE__ */ jsx8(CircularProgress3, { size: 16 }) : void 0,
3916
+ startIcon: loading ? /* @__PURE__ */ jsx7(CircularProgress3, { size: 16 }) : void 0,
4372
3917
  sx: { textTransform: "none", borderRadius: 2 },
4373
3918
  children: editingProject ? "Update project" : "Create project"
4374
3919
  }
4375
3920
  )
4376
- ] }) : /* @__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" })
4377
3922
  }
4378
3923
  ),
4379
- /* @__PURE__ */ jsxs5(
3924
+ /* @__PURE__ */ jsxs4(
4380
3925
  Menu,
4381
3926
  {
4382
3927
  anchorEl: menuAnchor,
@@ -4398,20 +3943,20 @@ var ProjectManagementModal = ({
4398
3943
  }
4399
3944
  },
4400
3945
  children: [
4401
- /* @__PURE__ */ jsx8(
3946
+ /* @__PURE__ */ jsx7(
4402
3947
  MenuItem,
4403
3948
  {
4404
3949
  onClick: () => {
4405
3950
  if (!selectedProject) return;
4406
3951
  startEdit(selectedProject);
4407
3952
  },
4408
- children: /* @__PURE__ */ jsxs5(Box5, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
4409
- /* @__PURE__ */ jsx8(EditIcon, { fontSize: "small" }),
4410
- /* @__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" })
4411
3956
  ] })
4412
3957
  }
4413
3958
  ),
4414
- /* @__PURE__ */ jsx8(
3959
+ /* @__PURE__ */ jsx7(
4415
3960
  MenuItem,
4416
3961
  {
4417
3962
  onClick: () => {
@@ -4419,9 +3964,9 @@ var ProjectManagementModal = ({
4419
3964
  handleDeleteProject(selectedProject);
4420
3965
  },
4421
3966
  sx: { color: theme.palette.error.main },
4422
- children: /* @__PURE__ */ jsxs5(Box5, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
4423
- /* @__PURE__ */ jsx8(DeleteIcon, { fontSize: "small" }),
4424
- /* @__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" })
4425
3970
  ] })
4426
3971
  }
4427
3972
  )
@@ -4431,7 +3976,7 @@ var ProjectManagementModal = ({
4431
3976
  ]
4432
3977
  }
4433
3978
  );
4434
- return /* @__PURE__ */ jsx8(Fragment4, { children: isMobile ? /* @__PURE__ */ jsx8(
3979
+ return /* @__PURE__ */ jsx7(Fragment4, { children: isMobile ? /* @__PURE__ */ jsx7(
4435
3980
  SwipeableDrawer,
4436
3981
  {
4437
3982
  anchor: "bottom",
@@ -4451,7 +3996,7 @@ var ProjectManagementModal = ({
4451
3996
  },
4452
3997
  children: content
4453
3998
  }
4454
- ) : /* @__PURE__ */ jsx8(
3999
+ ) : /* @__PURE__ */ jsx7(
4455
4000
  Modal,
4456
4001
  {
4457
4002
  open,
@@ -4470,7 +4015,7 @@ var ProjectManagementModal = ({
4470
4015
  var project_management_modal_default = ProjectManagementModal;
4471
4016
 
4472
4017
  // src/chat/move-conversation-modal.tsx
4473
- import { useState as useState8, useEffect as useEffect8 } from "react";
4018
+ import { useState as useState7, useEffect as useEffect7 } from "react";
4474
4019
  import {
4475
4020
  Dialog,
4476
4021
  DialogTitle,
@@ -4485,33 +4030,33 @@ import {
4485
4030
  Typography as Typography3,
4486
4031
  Avatar as Avatar4,
4487
4032
  Radio,
4488
- Box as Box6,
4033
+ Box as Box5,
4489
4034
  Divider
4490
4035
  } from "@mui/material";
4491
4036
  import {
4492
4037
  Folder as FolderIcon2,
4493
4038
  Inbox as InboxIcon
4494
4039
  } from "@mui/icons-material";
4495
- import { useTheme as useTheme7 } from "@mui/material/styles";
4496
- 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";
4497
4042
  var MoveConversationModal = ({
4498
4043
  open,
4499
4044
  onClose,
4500
4045
  conversations,
4501
4046
  currentProjectId = null
4502
4047
  }) => {
4503
- const theme = useTheme7();
4048
+ const theme = useTheme6();
4504
4049
  const { projects, _hasHydrated, hydrate } = useProjectStore();
4505
4050
  const { moveConversationToProject } = useConversationStore();
4506
- const [selectedProjectId, setSelectedProjectId] = useState8(
4051
+ const [selectedProjectId, setSelectedProjectId] = useState7(
4507
4052
  currentProjectId
4508
4053
  );
4509
- useEffect8(() => {
4054
+ useEffect7(() => {
4510
4055
  if (open && !_hasHydrated) {
4511
4056
  hydrate();
4512
4057
  }
4513
4058
  }, [open, _hasHydrated, hydrate]);
4514
- useEffect8(() => {
4059
+ useEffect7(() => {
4515
4060
  setSelectedProjectId(currentProjectId);
4516
4061
  }, [currentProjectId, open]);
4517
4062
  const handleMove = async () => {
@@ -4530,7 +4075,7 @@ var MoveConversationModal = ({
4530
4075
  };
4531
4076
  const conversationCount = conversations.length;
4532
4077
  const isMultiple = conversationCount > 1;
4533
- return /* @__PURE__ */ jsxs6(
4078
+ return /* @__PURE__ */ jsxs5(
4534
4079
  Dialog,
4535
4080
  {
4536
4081
  open,
@@ -4544,20 +4089,20 @@ var MoveConversationModal = ({
4544
4089
  }
4545
4090
  },
4546
4091
  children: [
4547
- /* @__PURE__ */ jsxs6(DialogTitle, { children: [
4092
+ /* @__PURE__ */ jsxs5(DialogTitle, { children: [
4548
4093
  "Move ",
4549
4094
  isMultiple ? `${conversationCount} Conversations` : "Conversation"
4550
4095
  ] }),
4551
- /* @__PURE__ */ jsxs6(DialogContent, { sx: { px: 3 }, children: [
4552
- /* @__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:` }),
4553
- /* @__PURE__ */ jsxs6(List2, { children: [
4554
- /* @__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(
4555
4100
  ListItemButton,
4556
4101
  {
4557
4102
  onClick: () => setSelectedProjectId(null),
4558
4103
  selected: selectedProjectId === null,
4559
4104
  children: [
4560
- /* @__PURE__ */ jsx9(ListItemIcon, { children: /* @__PURE__ */ jsx9(
4105
+ /* @__PURE__ */ jsx8(ListItemIcon, { children: /* @__PURE__ */ jsx8(
4561
4106
  Radio,
4562
4107
  {
4563
4108
  checked: selectedProjectId === null,
@@ -4565,7 +4110,7 @@ var MoveConversationModal = ({
4565
4110
  size: "small"
4566
4111
  }
4567
4112
  ) }),
4568
- /* @__PURE__ */ jsx9(ListItemIcon, { children: /* @__PURE__ */ jsx9(
4113
+ /* @__PURE__ */ jsx8(ListItemIcon, { children: /* @__PURE__ */ jsx8(
4569
4114
  Avatar4,
4570
4115
  {
4571
4116
  sx: {
@@ -4573,10 +4118,10 @@ var MoveConversationModal = ({
4573
4118
  width: 32,
4574
4119
  height: 32
4575
4120
  },
4576
- children: /* @__PURE__ */ jsx9(InboxIcon, {})
4121
+ children: /* @__PURE__ */ jsx8(InboxIcon, {})
4577
4122
  }
4578
4123
  ) }),
4579
- /* @__PURE__ */ jsx9(
4124
+ /* @__PURE__ */ jsx8(
4580
4125
  ListItemText,
4581
4126
  {
4582
4127
  primary: "No Project",
@@ -4586,14 +4131,14 @@ var MoveConversationModal = ({
4586
4131
  ]
4587
4132
  }
4588
4133
  ) }),
4589
- /* @__PURE__ */ jsx9(Divider, { sx: { my: 1 } }),
4590
- 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(
4591
4136
  ListItemButton,
4592
4137
  {
4593
4138
  onClick: () => setSelectedProjectId(project.id),
4594
4139
  selected: selectedProjectId === project.id,
4595
4140
  children: [
4596
- /* @__PURE__ */ jsx9(ListItemIcon, { children: /* @__PURE__ */ jsx9(
4141
+ /* @__PURE__ */ jsx8(ListItemIcon, { children: /* @__PURE__ */ jsx8(
4597
4142
  Radio,
4598
4143
  {
4599
4144
  checked: selectedProjectId === project.id,
@@ -4601,7 +4146,7 @@ var MoveConversationModal = ({
4601
4146
  size: "small"
4602
4147
  }
4603
4148
  ) }),
4604
- /* @__PURE__ */ jsx9(ListItemIcon, { children: /* @__PURE__ */ jsx9(
4149
+ /* @__PURE__ */ jsx8(ListItemIcon, { children: /* @__PURE__ */ jsx8(
4605
4150
  Avatar4,
4606
4151
  {
4607
4152
  sx: {
@@ -4609,10 +4154,10 @@ var MoveConversationModal = ({
4609
4154
  width: 32,
4610
4155
  height: 32
4611
4156
  },
4612
- children: /* @__PURE__ */ jsx9(FolderIcon2, {})
4157
+ children: /* @__PURE__ */ jsx8(FolderIcon2, {})
4613
4158
  }
4614
4159
  ) }),
4615
- /* @__PURE__ */ jsx9(
4160
+ /* @__PURE__ */ jsx8(
4616
4161
  ListItemText,
4617
4162
  {
4618
4163
  primary: project.name,
@@ -4622,16 +4167,16 @@ var MoveConversationModal = ({
4622
4167
  ]
4623
4168
  }
4624
4169
  ) }, project.id)),
4625
- projects.length === 0 && /* @__PURE__ */ jsx9(Box6, { sx: {
4170
+ projects.length === 0 && /* @__PURE__ */ jsx8(Box5, { sx: {
4626
4171
  textAlign: "center",
4627
4172
  py: 2,
4628
4173
  color: theme.palette.text.secondary
4629
- }, 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." }) })
4630
4175
  ] })
4631
4176
  ] }),
4632
- /* @__PURE__ */ jsxs6(DialogActions, { sx: { px: 3, pb: 2 }, children: [
4633
- /* @__PURE__ */ jsx9(Button2, { onClick: onClose, children: "Cancel" }),
4634
- /* @__PURE__ */ jsxs6(
4177
+ /* @__PURE__ */ jsxs5(DialogActions, { sx: { px: 3, pb: 2 }, children: [
4178
+ /* @__PURE__ */ jsx8(Button2, { onClick: onClose, children: "Cancel" }),
4179
+ /* @__PURE__ */ jsxs5(
4635
4180
  Button2,
4636
4181
  {
4637
4182
  onClick: handleMove,
@@ -4651,11 +4196,11 @@ var MoveConversationModal = ({
4651
4196
  var move_conversation_modal_default = MoveConversationModal;
4652
4197
 
4653
4198
  // src/chat/simple-conversation-item.tsx
4654
- 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";
4655
4200
  import {
4656
- Box as Box7,
4201
+ Box as Box6,
4657
4202
  Typography as Typography4,
4658
- IconButton as IconButton6,
4203
+ IconButton as IconButton5,
4659
4204
  Menu as Menu2,
4660
4205
  MenuItem as MenuItem2,
4661
4206
  ListItemIcon as ListItemIcon2,
@@ -4675,8 +4220,8 @@ import {
4675
4220
  DragIndicator as DragIcon,
4676
4221
  MoveToInbox as MoveIcon
4677
4222
  } from "@mui/icons-material";
4678
- import { useTheme as useTheme8, alpha as alpha4 } from "@mui/material/styles";
4679
- 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";
4680
4225
  var SimpleConversationItem = ({
4681
4226
  conversation,
4682
4227
  isSelected,
@@ -4692,18 +4237,18 @@ var SimpleConversationItem = ({
4692
4237
  onTouchDragEnd,
4693
4238
  isTouchDragActive
4694
4239
  }) => {
4695
- const theme = useTheme8();
4240
+ const theme = useTheme7();
4696
4241
  const isMobile = useMediaQuery3(theme.breakpoints.down("sm"));
4697
- const [anchorEl, setAnchorEl] = useState9(null);
4698
- const [isEditing, setIsEditing] = useState9(false);
4699
- const [editName, setEditName] = useState9(conversation.name);
4700
- const [isDragging, setIsDragging] = useState9(false);
4701
- const [isTouchDragging, setIsTouchDragging] = useState9(false);
4702
- const [showRenameDialog, setShowRenameDialog] = useState9(false);
4703
- const longPressTimeoutRef = useRef7(null);
4704
- const touchStartPointRef = useRef7(null);
4705
- const activeTouchIdRef = useRef7(null);
4706
- 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);
4707
4252
  const highlightText = (text, query) => {
4708
4253
  if (!query || !query.trim()) {
4709
4254
  return text;
@@ -4711,12 +4256,12 @@ var SimpleConversationItem = ({
4711
4256
  const regex = new RegExp(`(${query.trim()})`, "gi");
4712
4257
  const parts = text.split(regex);
4713
4258
  return parts.map(
4714
- (part, index) => regex.test(part) ? /* @__PURE__ */ jsx10(
4715
- Box7,
4259
+ (part, index) => regex.test(part) ? /* @__PURE__ */ jsx9(
4260
+ Box6,
4716
4261
  {
4717
4262
  component: "span",
4718
4263
  sx: {
4719
- bgcolor: alpha4(theme.palette.warning.main, 0.3),
4264
+ bgcolor: alpha3(theme.palette.warning.main, 0.3),
4720
4265
  color: theme.palette.text.primary,
4721
4266
  fontWeight: 600,
4722
4267
  borderRadius: 0.5,
@@ -4842,14 +4387,14 @@ var SimpleConversationItem = ({
4842
4387
  if (!isMobile) return;
4843
4388
  finalizeTouchDrag();
4844
4389
  };
4845
- useEffect9(() => {
4390
+ useEffect8(() => {
4846
4391
  if (!isTouchDragActive && isTouchDragging) {
4847
4392
  setIsTouchDragging(false);
4848
4393
  }
4849
4394
  }, [isTouchDragActive, isTouchDragging]);
4850
- return /* @__PURE__ */ jsxs7(Fragment5, { children: [
4851
- /* @__PURE__ */ jsxs7(
4852
- Box7,
4395
+ return /* @__PURE__ */ jsxs6(Fragment5, { children: [
4396
+ /* @__PURE__ */ jsxs6(
4397
+ Box6,
4853
4398
  {
4854
4399
  "data-project-id": conversation.projectId ?? "__ungrouped",
4855
4400
  draggable: !isMobile && !isEditing,
@@ -4876,17 +4421,17 @@ var SimpleConversationItem = ({
4876
4421
  mx: 1,
4877
4422
  borderRadius: 1,
4878
4423
  cursor: isEditing || isTouchDragging ? "default" : "pointer",
4879
- bgcolor: isSelected ? alpha4(projectColor || theme.palette.primary.main, 0.15) : "transparent",
4880
- 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",
4881
4426
  opacity: isDragging || isTouchDragActive ? 0.55 : 1,
4882
4427
  transition: "all 0.2s ease",
4883
4428
  transform: isTouchDragActive ? "scale(0.98)" : "none",
4884
- 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,
4885
4430
  touchAction: isTouchDragActive ? "none" : void 0,
4886
4431
  userSelect: isTouchDragging || isTouchDragActive ? "none" : void 0,
4887
4432
  WebkitUserSelect: isTouchDragging || isTouchDragActive ? "none" : void 0,
4888
4433
  "&:hover": !isEditing && !isTouchDragging ? {
4889
- bgcolor: alpha4(theme.palette.text.primary, 0.04)
4434
+ bgcolor: alpha3(theme.palette.text.primary, 0.04)
4890
4435
  } : {},
4891
4436
  // Better touch handling on mobile
4892
4437
  ...isMobile && {
@@ -4896,12 +4441,12 @@ var SimpleConversationItem = ({
4896
4441
  WebkitUserSelect: "none",
4897
4442
  WebkitTouchCallout: "none",
4898
4443
  "&:active": {
4899
- bgcolor: alpha4(theme.palette.text.primary, 0.08)
4444
+ bgcolor: alpha3(theme.palette.text.primary, 0.08)
4900
4445
  }
4901
4446
  }
4902
4447
  },
4903
4448
  children: [
4904
- !isMobile && !isEditing && /* @__PURE__ */ jsx10(
4449
+ !isMobile && !isEditing && /* @__PURE__ */ jsx9(
4905
4450
  DragIcon,
4906
4451
  {
4907
4452
  sx: {
@@ -4915,8 +4460,8 @@ var SimpleConversationItem = ({
4915
4460
  }
4916
4461
  }
4917
4462
  ),
4918
- /* @__PURE__ */ jsxs7(Box7, { sx: { flex: 1, minWidth: 0 }, children: [
4919
- isEditing ? /* @__PURE__ */ jsx10(
4463
+ /* @__PURE__ */ jsxs6(Box6, { sx: { flex: 1, minWidth: 0 }, children: [
4464
+ isEditing ? /* @__PURE__ */ jsx9(
4920
4465
  TextField3,
4921
4466
  {
4922
4467
  value: editName,
@@ -4939,7 +4484,7 @@ var SimpleConversationItem = ({
4939
4484
  }
4940
4485
  }
4941
4486
  }
4942
- ) : /* @__PURE__ */ jsx10(
4487
+ ) : /* @__PURE__ */ jsx9(
4943
4488
  Typography4,
4944
4489
  {
4945
4490
  variant: "body2",
@@ -4954,7 +4499,7 @@ var SimpleConversationItem = ({
4954
4499
  children: highlightText(conversation.name, searchQuery)
4955
4500
  }
4956
4501
  ),
4957
- !isEditing && snippet && /* @__PURE__ */ jsx10(
4502
+ !isEditing && snippet && /* @__PURE__ */ jsx9(
4958
4503
  Typography4,
4959
4504
  {
4960
4505
  variant: "caption",
@@ -4963,7 +4508,7 @@ var SimpleConversationItem = ({
4963
4508
  WebkitLineClamp: 2,
4964
4509
  WebkitBoxOrient: "vertical",
4965
4510
  overflow: "hidden",
4966
- color: alpha4(theme.palette.text.secondary, 0.9),
4511
+ color: alpha3(theme.palette.text.secondary, 0.9),
4967
4512
  mt: 0.25,
4968
4513
  lineHeight: 1.3,
4969
4514
  fontSize: "0.72rem"
@@ -4973,8 +4518,8 @@ var SimpleConversationItem = ({
4973
4518
  }
4974
4519
  )
4975
4520
  ] }),
4976
- !isEditing && /* @__PURE__ */ jsx10(
4977
- IconButton6,
4521
+ !isEditing && /* @__PURE__ */ jsx9(
4522
+ IconButton5,
4978
4523
  {
4979
4524
  onClick: handleMenuOpen,
4980
4525
  size: "small",
@@ -5002,10 +4547,10 @@ var SimpleConversationItem = ({
5002
4547
  }
5003
4548
  }
5004
4549
  },
5005
- children: /* @__PURE__ */ jsx10(MoreVertIcon2, { fontSize: "small" })
4550
+ children: /* @__PURE__ */ jsx9(MoreVertIcon2, { fontSize: "small" })
5006
4551
  }
5007
4552
  ),
5008
- /* @__PURE__ */ jsxs7(
4553
+ /* @__PURE__ */ jsxs6(
5009
4554
  Menu2,
5010
4555
  {
5011
4556
  anchorEl,
@@ -5032,17 +4577,17 @@ var SimpleConversationItem = ({
5032
4577
  }
5033
4578
  },
5034
4579
  children: [
5035
- onRename && /* @__PURE__ */ jsxs7(MenuItem2, { onClick: handleEdit, children: [
5036
- /* @__PURE__ */ jsx10(ListItemIcon2, { children: /* @__PURE__ */ jsx10(EditIcon2, { fontSize: "small" }) }),
5037
- /* @__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" })
5038
4583
  ] }),
5039
- onMove && /* @__PURE__ */ jsxs7(MenuItem2, { onClick: handleMove, children: [
5040
- /* @__PURE__ */ jsx10(ListItemIcon2, { children: /* @__PURE__ */ jsx10(MoveIcon, { fontSize: "small" }) }),
5041
- /* @__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" })
5042
4587
  ] }),
5043
- /* @__PURE__ */ jsxs7(MenuItem2, { onClick: handleDelete, children: [
5044
- /* @__PURE__ */ jsx10(ListItemIcon2, { children: /* @__PURE__ */ jsx10(DeleteIcon2, { fontSize: "small" }) }),
5045
- /* @__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" })
5046
4591
  ] })
5047
4592
  ]
5048
4593
  }
@@ -5050,7 +4595,7 @@ var SimpleConversationItem = ({
5050
4595
  ]
5051
4596
  }
5052
4597
  ),
5053
- isMobile && /* @__PURE__ */ jsxs7(
4598
+ isMobile && /* @__PURE__ */ jsxs6(
5054
4599
  Dialog2,
5055
4600
  {
5056
4601
  open: showRenameDialog,
@@ -5066,8 +4611,8 @@ var SimpleConversationItem = ({
5066
4611
  }
5067
4612
  },
5068
4613
  children: [
5069
- /* @__PURE__ */ jsx10(DialogTitle2, { sx: { pb: 1 }, children: "Rename Conversation" }),
5070
- /* @__PURE__ */ jsx10(DialogContent2, { children: /* @__PURE__ */ jsx10(
4614
+ /* @__PURE__ */ jsx9(DialogTitle2, { sx: { pb: 1 }, children: "Rename Conversation" }),
4615
+ /* @__PURE__ */ jsx9(DialogContent2, { children: /* @__PURE__ */ jsx9(
5071
4616
  TextField3,
5072
4617
  {
5073
4618
  value: editName,
@@ -5080,8 +4625,8 @@ var SimpleConversationItem = ({
5080
4625
  }
5081
4626
  }
5082
4627
  ) }),
5083
- /* @__PURE__ */ jsxs7(DialogActions2, { sx: { px: 3, pb: 2 }, children: [
5084
- /* @__PURE__ */ jsx10(
4628
+ /* @__PURE__ */ jsxs6(DialogActions2, { sx: { px: 3, pb: 2 }, children: [
4629
+ /* @__PURE__ */ jsx9(
5085
4630
  Button3,
5086
4631
  {
5087
4632
  onClick: () => {
@@ -5091,7 +4636,7 @@ var SimpleConversationItem = ({
5091
4636
  children: "Cancel"
5092
4637
  }
5093
4638
  ),
5094
- /* @__PURE__ */ jsx10(
4639
+ /* @__PURE__ */ jsx9(
5095
4640
  Button3,
5096
4641
  {
5097
4642
  onClick: () => {
@@ -5112,16 +4657,16 @@ var SimpleConversationItem = ({
5112
4657
  var simple_conversation_item_default = SimpleConversationItem;
5113
4658
 
5114
4659
  // src/chat/project-header.tsx
5115
- import { useRef as useRef8, useState as useState10 } from "react";
4660
+ import { useRef as useRef7, useState as useState9 } from "react";
5116
4661
  import {
5117
- Box as Box8,
4662
+ Box as Box7,
5118
4663
  Typography as Typography5,
5119
- IconButton as IconButton7,
4664
+ IconButton as IconButton6,
5120
4665
  Avatar as Avatar5,
5121
4666
  Chip as Chip2,
5122
- Tooltip as Tooltip3,
4667
+ Tooltip as Tooltip2,
5123
4668
  TextField as TextField4,
5124
- alpha as alpha5
4669
+ alpha as alpha4
5125
4670
  } from "@mui/material";
5126
4671
  import {
5127
4672
  ExpandMore as ExpandMoreIcon2,
@@ -5131,10 +4676,10 @@ import {
5131
4676
  FolderOpen as FolderOpenIcon,
5132
4677
  Inbox as InboxIcon2,
5133
4678
  Close as CloseIcon4,
5134
- Check as CheckIcon3
4679
+ Check as CheckIcon2
5135
4680
  } from "@mui/icons-material";
5136
- import { useTheme as useTheme9 } from "@mui/material/styles";
5137
- 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";
5138
4683
  var ProjectHeader = ({
5139
4684
  projectId,
5140
4685
  projectName,
@@ -5148,13 +4693,13 @@ var ProjectHeader = ({
5148
4693
  onRenameCancelDelete,
5149
4694
  isTouchTarget
5150
4695
  }) => {
5151
- const theme = useTheme9();
4696
+ const theme = useTheme8();
5152
4697
  const { createNewConversation } = useConversationStore();
5153
4698
  const { renameProject } = useProjectStore();
5154
- const [isHovered, setIsHovered] = useState10(false);
5155
- const [isDragOver, setIsDragOver] = useState10(false);
5156
- const [renameDraft, setRenameDraft] = useState10(projectName);
5157
- 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");
5158
4703
  const isUngrouped = projectId === null;
5159
4704
  const Icon = isCollapsed ? FolderIcon3 : FolderOpenIcon;
5160
4705
  const handleAddConversation = (e) => {
@@ -5200,8 +4745,8 @@ var ProjectHeader = ({
5200
4745
  setRenameDraft(projectName);
5201
4746
  onRenameComplete?.();
5202
4747
  };
5203
- return /* @__PURE__ */ jsxs8(
5204
- Box8,
4748
+ return /* @__PURE__ */ jsxs7(
4749
+ Box7,
5205
4750
  {
5206
4751
  "data-project-id": projectId ?? "__ungrouped",
5207
4752
  onMouseEnter: () => setIsHovered(true),
@@ -5217,26 +4762,26 @@ var ProjectHeader = ({
5217
4762
  py: 1.5,
5218
4763
  cursor: isUngrouped ? "default" : "pointer",
5219
4764
  // No pointer cursor for ungrouped
5220
- 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,
5221
4766
  border: isDragOver || isTouchTarget ? `2px dashed ${projectColor || theme.palette.primary.main}` : "2px solid transparent",
5222
4767
  borderRadius: isDragOver || isTouchTarget ? 1 : 0,
5223
4768
  transition: "all 0.2s ease",
5224
4769
  "&:hover": !isUngrouped ? {
5225
4770
  // Only show hover for projects, not ungrouped
5226
- bgcolor: alpha5(theme.palette.text.primary, 0.04)
4771
+ bgcolor: alpha4(theme.palette.text.primary, 0.04)
5227
4772
  } : {}
5228
4773
  },
5229
4774
  children: [
5230
- /* @__PURE__ */ jsx11(
4775
+ /* @__PURE__ */ jsx10(
5231
4776
  Avatar5,
5232
4777
  {
5233
4778
  sx: {
5234
- 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],
5235
4780
  width: 28,
5236
4781
  height: 28,
5237
4782
  mr: 1.5
5238
4783
  },
5239
- children: isUngrouped ? /* @__PURE__ */ jsx11(
4784
+ children: isUngrouped ? /* @__PURE__ */ jsx10(
5240
4785
  InboxIcon2,
5241
4786
  {
5242
4787
  fontSize: "small",
@@ -5245,10 +4790,10 @@ var ProjectHeader = ({
5245
4790
  opacity: 0.7
5246
4791
  }
5247
4792
  }
5248
- ) : /* @__PURE__ */ jsx11(Icon, { fontSize: "small" })
4793
+ ) : /* @__PURE__ */ jsx10(Icon, { fontSize: "small" })
5249
4794
  }
5250
4795
  ),
5251
- isRenaming && !isUngrouped ? /* @__PURE__ */ jsx11(
4796
+ isRenaming && !isUngrouped ? /* @__PURE__ */ jsx10(
5252
4797
  TextField4,
5253
4798
  {
5254
4799
  value: renameDraft,
@@ -5295,7 +4840,7 @@ var ProjectHeader = ({
5295
4840
  }
5296
4841
  }
5297
4842
  }
5298
- ) : /* @__PURE__ */ jsxs8(
4843
+ ) : /* @__PURE__ */ jsxs7(
5299
4844
  Typography5,
5300
4845
  {
5301
4846
  variant: "subtitle2",
@@ -5308,7 +4853,7 @@ var ProjectHeader = ({
5308
4853
  },
5309
4854
  children: [
5310
4855
  projectName,
5311
- isDragOver && /* @__PURE__ */ jsx11(
4856
+ isDragOver && /* @__PURE__ */ jsx10(
5312
4857
  Typography5,
5313
4858
  {
5314
4859
  component: "span",
@@ -5324,13 +4869,13 @@ var ProjectHeader = ({
5324
4869
  ]
5325
4870
  }
5326
4871
  ),
5327
- /* @__PURE__ */ jsx11(
4872
+ /* @__PURE__ */ jsx10(
5328
4873
  Chip2,
5329
4874
  {
5330
4875
  label: conversationCount,
5331
4876
  size: "small",
5332
4877
  sx: {
5333
- 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),
5334
4879
  color: isUngrouped ? theme.palette.text.disabled : projectColor || theme.palette.primary.main,
5335
4880
  minWidth: 28,
5336
4881
  height: 22,
@@ -5344,9 +4889,9 @@ var ProjectHeader = ({
5344
4889
  }
5345
4890
  }
5346
4891
  ),
5347
- isRenaming && !isUngrouped && /* @__PURE__ */ jsxs8(Box8, { sx: { display: "flex", alignItems: "center", gap: 0.5, ml: 1 }, children: [
5348
- /* @__PURE__ */ jsx11(Tooltip3, { title: "Cancel and remove", children: /* @__PURE__ */ jsx11(
5349
- 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,
5350
4895
  {
5351
4896
  size: "small",
5352
4897
  onMouseDown: (e) => {
@@ -5354,12 +4899,12 @@ var ProjectHeader = ({
5354
4899
  renameActionRef.current = "delete";
5355
4900
  onRenameCancelDelete ? onRenameCancelDelete() : cancelRename();
5356
4901
  },
5357
- sx: { color: alpha5(theme.palette.error.main, 0.9) },
5358
- children: /* @__PURE__ */ jsx11(CloseIcon4, { fontSize: "small" })
4902
+ sx: { color: alpha4(theme.palette.error.main, 0.9) },
4903
+ children: /* @__PURE__ */ jsx10(CloseIcon4, { fontSize: "small" })
5359
4904
  }
5360
4905
  ) }),
5361
- /* @__PURE__ */ jsx11(Tooltip3, { title: "Save", children: /* @__PURE__ */ jsx11(
5362
- IconButton7,
4906
+ /* @__PURE__ */ jsx10(Tooltip2, { title: "Save", children: /* @__PURE__ */ jsx10(
4907
+ IconButton6,
5363
4908
  {
5364
4909
  size: "small",
5365
4910
  onMouseDown: (e) => {
@@ -5368,39 +4913,39 @@ var ProjectHeader = ({
5368
4913
  commitRename();
5369
4914
  },
5370
4915
  sx: { color: theme.palette.success.main },
5371
- children: /* @__PURE__ */ jsx11(CheckIcon3, { fontSize: "small" })
4916
+ children: /* @__PURE__ */ jsx10(CheckIcon2, { fontSize: "small" })
5372
4917
  }
5373
4918
  ) })
5374
4919
  ] }),
5375
- isHovered && !isDragOver && !isUngrouped && !isRenaming && /* @__PURE__ */ jsx11(Tooltip3, { title: `Add conversation to ${projectName.toLowerCase()}`, arrow: true, children: /* @__PURE__ */ jsx11(
5376
- IconButton7,
4920
+ isHovered && !isDragOver && !isUngrouped && !isRenaming && /* @__PURE__ */ jsx10(Tooltip2, { title: `Add conversation to ${projectName.toLowerCase()}`, arrow: true, children: /* @__PURE__ */ jsx10(
4921
+ IconButton6,
5377
4922
  {
5378
4923
  onClick: handleAddConversation,
5379
4924
  size: "small",
5380
4925
  sx: {
5381
4926
  color: projectColor || theme.palette.primary.main,
5382
- bgcolor: alpha5(projectColor || theme.palette.primary.main, 0.1),
4927
+ bgcolor: alpha4(projectColor || theme.palette.primary.main, 0.1),
5383
4928
  width: 24,
5384
4929
  height: 24,
5385
4930
  mr: 0.5,
5386
4931
  "&:hover": {
5387
- bgcolor: alpha5(projectColor || theme.palette.primary.main, 0.2),
4932
+ bgcolor: alpha4(projectColor || theme.palette.primary.main, 0.2),
5388
4933
  transform: "scale(1.1)"
5389
4934
  },
5390
4935
  transition: "all 0.2s ease"
5391
4936
  },
5392
- children: /* @__PURE__ */ jsx11(AddIcon2, { fontSize: "small" })
4937
+ children: /* @__PURE__ */ jsx10(AddIcon2, { fontSize: "small" })
5393
4938
  }
5394
4939
  ) }),
5395
- !isUngrouped && !isRenaming && /* @__PURE__ */ jsx11(
5396
- IconButton7,
4940
+ !isUngrouped && !isRenaming && /* @__PURE__ */ jsx10(
4941
+ IconButton6,
5397
4942
  {
5398
4943
  size: "small",
5399
4944
  sx: {
5400
4945
  color: theme.palette.text.secondary,
5401
4946
  transition: "transform 0.2s ease"
5402
4947
  },
5403
- 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" })
5404
4949
  }
5405
4950
  )
5406
4951
  ]
@@ -5422,7 +4967,7 @@ var TOOLTIP_COPY = {
5422
4967
  var tooltip = (key) => TOOLTIP_COPY[key];
5423
4968
 
5424
4969
  // src/chat/conversation-drawer.tsx
5425
- 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";
5426
4971
  var BANDIT_AVATAR = "https://cdn.burtson.ai/images/bandit-head.png";
5427
4972
  var coerceOptionalString = (value) => {
5428
4973
  if (typeof value !== "string") return void 0;
@@ -5450,7 +4995,7 @@ var deriveInitials = (value) => {
5450
4995
  return sanitized.slice(0, 2).toUpperCase();
5451
4996
  };
5452
4997
  var ConversationDrawer = ({ open, onClose }) => {
5453
- const theme = useTheme10();
4998
+ const theme = useTheme9();
5454
4999
  const isMobile = useMediaQuery4(theme.breakpoints.down("sm"));
5455
5000
  const { user } = useAuthenticationStore();
5456
5001
  const baseRadius = typeof theme.shape.borderRadius === "number" ? theme.shape.borderRadius : parseFloat(theme.shape.borderRadius) || 0;
@@ -5473,21 +5018,21 @@ var ConversationDrawer = ({ open, onClose }) => {
5473
5018
  createProject,
5474
5019
  deleteProject
5475
5020
  } = useProjectStore();
5476
- const [projectManagementOpen, setProjectManagementOpen] = useState11(false);
5477
- const [collapsedProjects, setCollapsedProjects] = useState11(/* @__PURE__ */ new Set());
5478
- const didInitCollapseRef = useRef9(false);
5479
- const [searchQuery, setSearchQuery] = useState11("");
5480
- const [menuAnchorEl, setMenuAnchorEl] = useState11(null);
5481
- const [clearConfirmOpen, setClearConfirmOpen] = useState11(false);
5482
- const [moveModalOpen, setMoveModalOpen] = useState11(false);
5483
- const [conversationToMove, setConversationToMove] = useState11(null);
5484
- 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);
5485
5030
  const getCustomClaim = useCallback4((key) => {
5486
5031
  if (!user) return void 0;
5487
5032
  const record = user;
5488
5033
  return coerceOptionalString(record[key]);
5489
5034
  }, [user]);
5490
- const userDisplayName = useMemo2(() => {
5035
+ const userDisplayName = useMemo(() => {
5491
5036
  if (!user) return void 0;
5492
5037
  const candidateFields = [
5493
5038
  coerceOptionalString(user.name),
@@ -5502,7 +5047,7 @@ var ConversationDrawer = ({ open, onClose }) => {
5502
5047
  if (trimmedEmail) return trimmedEmail;
5503
5048
  return user.sub;
5504
5049
  }, [user, getCustomClaim]);
5505
- const userSecondaryText = useMemo2(() => {
5050
+ const userSecondaryText = useMemo(() => {
5506
5051
  if (!user) return void 0;
5507
5052
  const trimmedEmail = coerceOptionalString(user.email);
5508
5053
  if (trimmedEmail && trimmedEmail !== userDisplayName) {
@@ -5514,8 +5059,8 @@ var ConversationDrawer = ({ open, onClose }) => {
5514
5059
  }
5515
5060
  return void 0;
5516
5061
  }, [user, userDisplayName]);
5517
- const [avatarImage, setAvatarImage] = useState11(BANDIT_AVATAR);
5518
- useEffect10(() => {
5062
+ const [avatarImage, setAvatarImage] = useState10(BANDIT_AVATAR);
5063
+ useEffect9(() => {
5519
5064
  const fetchBranding = async () => {
5520
5065
  try {
5521
5066
  const branding = await brandingService_default.getBranding();
@@ -5530,13 +5075,13 @@ var ConversationDrawer = ({ open, onClose }) => {
5530
5075
  fetchBranding();
5531
5076
  }, []);
5532
5077
  const avatarLabel = userDisplayName || user?.email || "Bandit";
5533
- const avatarInitials = useMemo2(() => deriveInitials(avatarLabel), [avatarLabel]);
5534
- useEffect10(() => {
5078
+ const avatarInitials = useMemo(() => deriveInitials(avatarLabel), [avatarLabel]);
5079
+ useEffect9(() => {
5535
5080
  if (!projectsHydrated) {
5536
5081
  hydrateProjects();
5537
5082
  }
5538
5083
  }, [projectsHydrated, hydrateProjects]);
5539
- useEffect10(() => {
5084
+ useEffect9(() => {
5540
5085
  if (projectsHydrated && !didInitCollapseRef.current) {
5541
5086
  didInitCollapseRef.current = true;
5542
5087
  if (projects && projects.length > 0) {
@@ -5549,7 +5094,7 @@ var ConversationDrawer = ({ open, onClose }) => {
5549
5094
  const end = Math.min(text.length, idx + query.length + 60);
5550
5095
  return text.slice(start, end).replace(/\s+/g, " ").trim();
5551
5096
  };
5552
- const projectGroups = useMemo2(() => {
5097
+ const projectGroups = useMemo(() => {
5553
5098
  const groups = projects.map((project) => ({
5554
5099
  id: project.id,
5555
5100
  name: project.name,
@@ -5572,7 +5117,7 @@ var ConversationDrawer = ({ open, onClose }) => {
5572
5117
  }
5573
5118
  return groups.filter((group) => group.conversations.length > 0 || group.id !== null);
5574
5119
  }, [projects, conversations, collapsedProjects]);
5575
- const filteredProjectGroups = useMemo2(() => {
5120
+ const filteredProjectGroups = useMemo(() => {
5576
5121
  if (!searchQuery.trim()) return projectGroups;
5577
5122
  const query = searchQuery.toLowerCase();
5578
5123
  return projectGroups.map((group) => {
@@ -5643,8 +5188,8 @@ var ConversationDrawer = ({ open, onClose }) => {
5643
5188
  setMoveModalOpen(false);
5644
5189
  setConversationToMove(null);
5645
5190
  };
5646
- return /* @__PURE__ */ jsxs9(Fragment6, { children: [
5647
- /* @__PURE__ */ jsxs9(
5191
+ return /* @__PURE__ */ jsxs8(Fragment6, { children: [
5192
+ /* @__PURE__ */ jsxs8(
5648
5193
  Drawer,
5649
5194
  {
5650
5195
  anchor: "left",
@@ -5658,7 +5203,7 @@ var ConversationDrawer = ({ open, onClose }) => {
5658
5203
  width: isMobile ? `min(94vw, 360px)` : 340,
5659
5204
  maxWidth: 360,
5660
5205
  bgcolor: theme.palette.background.paper,
5661
- 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}`,
5662
5207
  display: "flex",
5663
5208
  flexDirection: "column",
5664
5209
  height: isMobile ? `calc(100dvh - ${theme.spacing(4)})` : "100dvh",
@@ -5666,7 +5211,7 @@ var ConversationDrawer = ({ open, onClose }) => {
5666
5211
  bottom: isMobile ? theme.spacing(2) : 0,
5667
5212
  left: 0,
5668
5213
  borderRadius: isMobile ? `0 ${drawerCornerRadius}px ${drawerCornerRadius}px 0` : 0,
5669
- 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",
5670
5215
  overflow: "hidden"
5671
5216
  }
5672
5217
  },
@@ -5686,8 +5231,8 @@ var ConversationDrawer = ({ open, onClose }) => {
5686
5231
  }
5687
5232
  },
5688
5233
  children: [
5689
- /* @__PURE__ */ jsxs9(
5690
- Box9,
5234
+ /* @__PURE__ */ jsxs8(
5235
+ Box8,
5691
5236
  {
5692
5237
  sx: {
5693
5238
  p: 2,
@@ -5698,8 +5243,8 @@ var ConversationDrawer = ({ open, onClose }) => {
5698
5243
  gap: 1
5699
5244
  },
5700
5245
  children: [
5701
- /* @__PURE__ */ jsx12(Tooltip4, { title: tooltip("manageProjects"), arrow: true, children: /* @__PURE__ */ jsx12(
5702
- IconButton8,
5246
+ /* @__PURE__ */ jsx11(Tooltip3, { title: tooltip("manageProjects"), arrow: true, children: /* @__PURE__ */ jsx11(
5247
+ IconButton7,
5703
5248
  {
5704
5249
  onClick: () => setProjectManagementOpen(true),
5705
5250
  size: "small",
@@ -5708,14 +5253,14 @@ var ConversationDrawer = ({ open, onClose }) => {
5708
5253
  color: theme.palette.text.secondary,
5709
5254
  "&:hover": {
5710
5255
  color: theme.palette.primary.main,
5711
- bgcolor: alpha6(theme.palette.primary.main, 0.1)
5256
+ bgcolor: alpha5(theme.palette.primary.main, 0.1)
5712
5257
  }
5713
5258
  },
5714
- children: /* @__PURE__ */ jsx12(FolderIcon4, {})
5259
+ children: /* @__PURE__ */ jsx11(FolderIcon4, {})
5715
5260
  }
5716
5261
  ) }),
5717
- /* @__PURE__ */ jsx12(Tooltip4, { title: tooltip("conversationOptions"), arrow: true, children: /* @__PURE__ */ jsx12(
5718
- IconButton8,
5262
+ /* @__PURE__ */ jsx11(Tooltip3, { title: tooltip("conversationOptions"), arrow: true, children: /* @__PURE__ */ jsx11(
5263
+ IconButton7,
5719
5264
  {
5720
5265
  onClick: handleMenuOpen,
5721
5266
  size: "small",
@@ -5724,14 +5269,14 @@ var ConversationDrawer = ({ open, onClose }) => {
5724
5269
  color: theme.palette.text.secondary,
5725
5270
  "&:hover": {
5726
5271
  color: theme.palette.text.primary,
5727
- bgcolor: alpha6(theme.palette.text.primary, 0.1)
5272
+ bgcolor: alpha5(theme.palette.text.primary, 0.1)
5728
5273
  }
5729
5274
  },
5730
- children: /* @__PURE__ */ jsx12(MoreVertIcon3, {})
5275
+ children: /* @__PURE__ */ jsx11(MoreVertIcon3, {})
5731
5276
  }
5732
5277
  ) }),
5733
- isMobile && /* @__PURE__ */ jsx12(Tooltip4, { title: tooltip("closeConversationsPanel"), children: /* @__PURE__ */ jsx12(
5734
- IconButton8,
5278
+ isMobile && /* @__PURE__ */ jsx11(Tooltip3, { title: tooltip("closeConversationsPanel"), children: /* @__PURE__ */ jsx11(
5279
+ IconButton7,
5735
5280
  {
5736
5281
  onClick: (e) => {
5737
5282
  e.preventDefault();
@@ -5744,16 +5289,16 @@ var ConversationDrawer = ({ open, onClose }) => {
5744
5289
  color: theme.palette.text.secondary,
5745
5290
  "&:hover": {
5746
5291
  color: theme.palette.error.main,
5747
- bgcolor: alpha6(theme.palette.error.main, 0.1)
5292
+ bgcolor: alpha5(theme.palette.error.main, 0.1)
5748
5293
  }
5749
5294
  },
5750
- children: /* @__PURE__ */ jsx12(CloseIcon5, {})
5295
+ children: /* @__PURE__ */ jsx11(CloseIcon5, {})
5751
5296
  }
5752
5297
  ) })
5753
5298
  ]
5754
5299
  }
5755
5300
  ),
5756
- /* @__PURE__ */ jsx12(Box9, { sx: { p: 2, pb: 1 }, children: /* @__PURE__ */ jsx12(
5301
+ /* @__PURE__ */ jsx11(Box8, { sx: { p: 2, pb: 1 }, children: /* @__PURE__ */ jsx11(
5757
5302
  TextField5,
5758
5303
  {
5759
5304
  fullWidth: true,
@@ -5763,24 +5308,24 @@ var ConversationDrawer = ({ open, onClose }) => {
5763
5308
  onChange: (e) => setSearchQuery(e.target.value),
5764
5309
  variant: "outlined",
5765
5310
  InputProps: {
5766
- startAdornment: /* @__PURE__ */ jsx12(InputAdornment, { position: "start", children: /* @__PURE__ */ jsx12(SearchIcon, { fontSize: "small", sx: { color: theme.palette.text.secondary } }) }),
5767
- endAdornment: searchQuery && /* @__PURE__ */ jsx12(InputAdornment, { position: "end", children: /* @__PURE__ */ jsx12(Tooltip4, { title: tooltip("clearSearch"), children: /* @__PURE__ */ jsx12(
5768
- 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,
5769
5314
  {
5770
5315
  onClick: handleSearchClear,
5771
5316
  size: "small",
5772
5317
  edge: "end",
5773
5318
  "aria-label": tooltip("clearSearch"),
5774
5319
  sx: { color: theme.palette.text.secondary },
5775
- children: /* @__PURE__ */ jsx12(ClearIcon, { fontSize: "small" })
5320
+ children: /* @__PURE__ */ jsx11(ClearIcon, { fontSize: "small" })
5776
5321
  }
5777
5322
  ) }) })
5778
5323
  },
5779
5324
  sx: {
5780
5325
  "& .MuiOutlinedInput-root": {
5781
- bgcolor: alpha6(theme.palette.background.default, 0.5),
5326
+ bgcolor: alpha5(theme.palette.background.default, 0.5),
5782
5327
  "&:hover": {
5783
- bgcolor: alpha6(theme.palette.background.default, 0.8)
5328
+ bgcolor: alpha5(theme.palette.background.default, 0.8)
5784
5329
  },
5785
5330
  "&.Mui-focused": {
5786
5331
  bgcolor: theme.palette.background.default
@@ -5789,9 +5334,9 @@ var ConversationDrawer = ({ open, onClose }) => {
5789
5334
  }
5790
5335
  }
5791
5336
  ) }),
5792
- /* @__PURE__ */ jsxs9(Box9, { sx: { flex: 1, overflow: "auto", display: "flex", flexDirection: "column" }, children: [
5793
- /* @__PURE__ */ jsxs9(
5794
- Box9,
5337
+ /* @__PURE__ */ jsxs8(Box8, { sx: { flex: 1, overflow: "auto", display: "flex", flexDirection: "column" }, children: [
5338
+ /* @__PURE__ */ jsxs8(
5339
+ Box8,
5795
5340
  {
5796
5341
  onClick: async () => {
5797
5342
  const names = new Set(projects.map((p) => p.name));
@@ -5822,26 +5367,26 @@ var ConversationDrawer = ({ open, onClose }) => {
5822
5367
  alignItems: "center",
5823
5368
  gap: 1.5,
5824
5369
  cursor: "pointer",
5825
- "&:hover": { bgcolor: alpha6(theme.palette.text.primary, 0.04) }
5370
+ "&:hover": { bgcolor: alpha5(theme.palette.text.primary, 0.04) }
5826
5371
  },
5827
5372
  children: [
5828
- /* @__PURE__ */ jsx12(
5829
- Box9,
5373
+ /* @__PURE__ */ jsx11(
5374
+ Box8,
5830
5375
  {
5831
5376
  sx: {
5832
5377
  width: 28,
5833
5378
  height: 28,
5834
5379
  borderRadius: "50%",
5835
- bgcolor: alpha6(theme.palette.success.main, 0.15),
5380
+ bgcolor: alpha5(theme.palette.success.main, 0.15),
5836
5381
  display: "flex",
5837
5382
  alignItems: "center",
5838
5383
  justifyContent: "center",
5839
5384
  flexShrink: 0
5840
5385
  },
5841
- 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 } })
5842
5387
  }
5843
5388
  ),
5844
- /* @__PURE__ */ jsx12(
5389
+ /* @__PURE__ */ jsx11(
5845
5390
  Typography6,
5846
5391
  {
5847
5392
  variant: "subtitle2",
@@ -5849,22 +5394,22 @@ var ConversationDrawer = ({ open, onClose }) => {
5849
5394
  children: "New Project"
5850
5395
  }
5851
5396
  ),
5852
- /* @__PURE__ */ jsx12(Tooltip4, { title: tooltip("addProject"), arrow: true, children: /* @__PURE__ */ jsx12(
5853
- IconButton8,
5397
+ /* @__PURE__ */ jsx11(Tooltip3, { title: tooltip("addProject"), arrow: true, children: /* @__PURE__ */ jsx11(
5398
+ IconButton7,
5854
5399
  {
5855
5400
  size: "small",
5856
5401
  "aria-label": tooltip("addProject"),
5857
5402
  sx: { color: theme.palette.success.main },
5858
- children: /* @__PURE__ */ jsx12(AddIcon3, { fontSize: "small" })
5403
+ children: /* @__PURE__ */ jsx11(AddIcon3, { fontSize: "small" })
5859
5404
  }
5860
5405
  ) })
5861
5406
  ]
5862
5407
  }
5863
5408
  ),
5864
- /* @__PURE__ */ jsx12(Divider2, { sx: { opacity: 0.3 } }),
5865
- filteredProjectGroups.map((group, index) => /* @__PURE__ */ jsxs9(Box9, { children: [
5866
- group.id === null && filteredProjectGroups.length > 1 && /* @__PURE__ */ jsxs9(
5867
- 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,
5868
5413
  {
5869
5414
  sx: {
5870
5415
  py: 2,
@@ -5874,9 +5419,9 @@ var ConversationDrawer = ({ open, onClose }) => {
5874
5419
  gap: 2
5875
5420
  },
5876
5421
  children: [
5877
- /* @__PURE__ */ jsx12(Divider2, { sx: { flex: 1, opacity: 0.6 } }),
5878
- /* @__PURE__ */ jsxs9(Box9, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
5879
- /* @__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(
5880
5425
  InboxIcon3,
5881
5426
  {
5882
5427
  sx: {
@@ -5886,7 +5431,7 @@ var ConversationDrawer = ({ open, onClose }) => {
5886
5431
  }
5887
5432
  }
5888
5433
  ),
5889
- /* @__PURE__ */ jsx12(
5434
+ /* @__PURE__ */ jsx11(
5890
5435
  Typography6,
5891
5436
  {
5892
5437
  variant: "caption",
@@ -5901,12 +5446,12 @@ var ConversationDrawer = ({ open, onClose }) => {
5901
5446
  }
5902
5447
  )
5903
5448
  ] }),
5904
- /* @__PURE__ */ jsx12(Divider2, { sx: { flex: 1, opacity: 0.6 } })
5449
+ /* @__PURE__ */ jsx11(Divider2, { sx: { flex: 1, opacity: 0.6 } })
5905
5450
  ]
5906
5451
  }
5907
5452
  ),
5908
- group.id !== null ? /* @__PURE__ */ jsxs9(Fragment6, { children: [
5909
- /* @__PURE__ */ jsx12(
5453
+ group.id !== null ? /* @__PURE__ */ jsxs8(Fragment6, { children: [
5454
+ /* @__PURE__ */ jsx11(
5910
5455
  project_header_default,
5911
5456
  {
5912
5457
  projectId: group.id,
@@ -5935,8 +5480,8 @@ var ConversationDrawer = ({ open, onClose }) => {
5935
5480
  }
5936
5481
  }
5937
5482
  ),
5938
- /* @__PURE__ */ jsx12(Collapse2, { in: !group.collapsed, children: /* @__PURE__ */ jsxs9(Box9, { sx: { pb: 1 }, children: [
5939
- 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(
5940
5485
  simple_conversation_item_default,
5941
5486
  {
5942
5487
  conversation,
@@ -5956,8 +5501,8 @@ var ConversationDrawer = ({ open, onClose }) => {
5956
5501
  },
5957
5502
  conversation.id
5958
5503
  )),
5959
- group.conversations.length === 0 && !group.collapsed && group.id !== null && /* @__PURE__ */ jsxs9(
5960
- Box9,
5504
+ group.conversations.length === 0 && !group.collapsed && group.id !== null && /* @__PURE__ */ jsxs8(
5505
+ Box8,
5961
5506
  {
5962
5507
  sx: {
5963
5508
  p: 3,
@@ -5965,17 +5510,17 @@ var ConversationDrawer = ({ open, onClose }) => {
5965
5510
  color: theme.palette.text.secondary
5966
5511
  },
5967
5512
  children: [
5968
- /* @__PURE__ */ jsx12(Typography6, { variant: "body2", children: "No conversations in this project yet" }),
5969
- /* @__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" })
5970
5515
  ]
5971
5516
  }
5972
5517
  )
5973
5518
  ] }) }),
5974
- /* @__PURE__ */ jsx12(Divider2, { sx: { opacity: 0.3 } })
5519
+ /* @__PURE__ */ jsx11(Divider2, { sx: { opacity: 0.3 } })
5975
5520
  ] }) : (
5976
5521
  // Special handling for ungrouped - no header, just conversations in scrollable area
5977
- /* @__PURE__ */ jsx12(
5978
- Box9,
5522
+ /* @__PURE__ */ jsx11(
5523
+ Box8,
5979
5524
  {
5980
5525
  sx: {
5981
5526
  minHeight: 0,
@@ -5983,12 +5528,12 @@ var ConversationDrawer = ({ open, onClose }) => {
5983
5528
  overflow: "auto",
5984
5529
  px: 1,
5985
5530
  py: 1,
5986
- bgcolor: alpha6(theme.palette.background.default, 0.3),
5531
+ bgcolor: alpha5(theme.palette.background.default, 0.3),
5987
5532
  borderRadius: "8px 8px 0 0",
5988
5533
  mx: 1,
5989
5534
  mb: 1
5990
5535
  },
5991
- children: group.conversations.map((conversation) => /* @__PURE__ */ jsx12(
5536
+ children: group.conversations.map((conversation) => /* @__PURE__ */ jsx11(
5992
5537
  simple_conversation_item_default,
5993
5538
  {
5994
5539
  conversation,
@@ -6012,8 +5557,8 @@ var ConversationDrawer = ({ open, onClose }) => {
6012
5557
  )
6013
5558
  )
6014
5559
  ] }, group.id || "ungrouped")),
6015
- filteredProjectGroups.length === 0 && /* @__PURE__ */ jsxs9(
6016
- Box9,
5560
+ filteredProjectGroups.length === 0 && /* @__PURE__ */ jsxs8(
5561
+ Box8,
6017
5562
  {
6018
5563
  sx: {
6019
5564
  flex: 1,
@@ -6026,28 +5571,28 @@ var ConversationDrawer = ({ open, onClose }) => {
6026
5571
  color: theme.palette.text.secondary
6027
5572
  },
6028
5573
  children: [
6029
- /* @__PURE__ */ jsx12(Typography6, { variant: "h6", sx: { mb: 1 }, children: searchQuery ? "No conversations found" : "No conversations yet" }),
6030
- /* @__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" })
6031
5576
  ]
6032
5577
  }
6033
5578
  )
6034
5579
  ] }),
6035
- /* @__PURE__ */ jsxs9(
6036
- Box9,
5580
+ /* @__PURE__ */ jsxs8(
5581
+ Box8,
6037
5582
  {
6038
5583
  sx: {
6039
5584
  mt: "auto",
6040
5585
  px: 2,
6041
5586
  py: 1.75,
6042
- borderTop: `1px solid ${alpha6(theme.palette.divider, 0.6)}`,
5587
+ borderTop: `1px solid ${alpha5(theme.palette.divider, 0.6)}`,
6043
5588
  display: "flex",
6044
5589
  alignItems: "center",
6045
5590
  gap: 1.5,
6046
5591
  justifyContent: "center",
6047
- bgcolor: alpha6(theme.palette.background.default, isMobile ? 0.9 : 0.6)
5592
+ bgcolor: alpha5(theme.palette.background.default, isMobile ? 0.9 : 0.6)
6048
5593
  },
6049
5594
  children: [
6050
- /* @__PURE__ */ jsx12(
5595
+ /* @__PURE__ */ jsx11(
6051
5596
  Avatar6,
6052
5597
  {
6053
5598
  src: avatarImage,
@@ -6056,14 +5601,14 @@ var ConversationDrawer = ({ open, onClose }) => {
6056
5601
  width: 36,
6057
5602
  height: 36,
6058
5603
  fontSize: "0.95rem",
6059
- bgcolor: alpha6(theme.palette.primary.main, 0.12),
5604
+ bgcolor: alpha5(theme.palette.primary.main, 0.12),
6060
5605
  color: theme.palette.primary.main
6061
5606
  },
6062
5607
  children: avatarInitials
6063
5608
  }
6064
5609
  ),
6065
- /* @__PURE__ */ jsxs9(
6066
- Box9,
5610
+ /* @__PURE__ */ jsxs8(
5611
+ Box8,
6067
5612
  {
6068
5613
  sx: {
6069
5614
  minWidth: 0,
@@ -6075,7 +5620,7 @@ var ConversationDrawer = ({ open, onClose }) => {
6075
5620
  gap: 0.25
6076
5621
  },
6077
5622
  children: [
6078
- /* @__PURE__ */ jsx12(
5623
+ /* @__PURE__ */ jsx11(
6079
5624
  Typography6,
6080
5625
  {
6081
5626
  variant: "subtitle2",
@@ -6084,7 +5629,7 @@ var ConversationDrawer = ({ open, onClose }) => {
6084
5629
  children: user ? userDisplayName : "Not signed in"
6085
5630
  }
6086
5631
  ),
6087
- !user && /* @__PURE__ */ jsx12(
5632
+ !user && /* @__PURE__ */ jsx11(
6088
5633
  Typography6,
6089
5634
  {
6090
5635
  variant: "caption",
@@ -6101,14 +5646,14 @@ var ConversationDrawer = ({ open, onClose }) => {
6101
5646
  ]
6102
5647
  }
6103
5648
  ),
6104
- /* @__PURE__ */ jsx12(
5649
+ /* @__PURE__ */ jsx11(
6105
5650
  project_management_modal_default,
6106
5651
  {
6107
5652
  open: projectManagementOpen,
6108
5653
  onClose: () => setProjectManagementOpen(false)
6109
5654
  }
6110
5655
  ),
6111
- conversationToMove && /* @__PURE__ */ jsx12(
5656
+ conversationToMove && /* @__PURE__ */ jsx11(
6112
5657
  move_conversation_modal_default,
6113
5658
  {
6114
5659
  open: moveModalOpen,
@@ -6117,7 +5662,7 @@ var ConversationDrawer = ({ open, onClose }) => {
6117
5662
  currentProjectId: conversationToMove.projectId
6118
5663
  }
6119
5664
  ),
6120
- /* @__PURE__ */ jsx12(
5665
+ /* @__PURE__ */ jsx11(
6121
5666
  Menu3,
6122
5667
  {
6123
5668
  anchorEl: menuAnchorEl,
@@ -6131,7 +5676,7 @@ var ConversationDrawer = ({ open, onClose }) => {
6131
5676
  vertical: "bottom",
6132
5677
  horizontal: "right"
6133
5678
  },
6134
- children: /* @__PURE__ */ jsxs9(
5679
+ children: /* @__PURE__ */ jsxs8(
6135
5680
  MenuItem3,
6136
5681
  {
6137
5682
  onClick: () => {
@@ -6140,14 +5685,14 @@ var ConversationDrawer = ({ open, onClose }) => {
6140
5685
  },
6141
5686
  sx: { color: theme.palette.error.main },
6142
5687
  children: [
6143
- /* @__PURE__ */ jsx12(ListItemIcon3, { children: /* @__PURE__ */ jsx12(DeleteSweepIcon, { fontSize: "small", sx: { color: theme.palette.error.main } }) }),
6144
- /* @__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" })
6145
5690
  ]
6146
5691
  }
6147
5692
  )
6148
5693
  }
6149
5694
  ),
6150
- /* @__PURE__ */ jsxs9(
5695
+ /* @__PURE__ */ jsxs8(
6151
5696
  Dialog3,
6152
5697
  {
6153
5698
  open: clearConfirmOpen,
@@ -6155,11 +5700,11 @@ var ConversationDrawer = ({ open, onClose }) => {
6155
5700
  maxWidth: "sm",
6156
5701
  fullWidth: true,
6157
5702
  children: [
6158
- /* @__PURE__ */ jsx12(DialogTitle3, { children: "Clear All Conversations?" }),
6159
- /* @__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?" }) }),
6160
- /* @__PURE__ */ jsxs9(DialogActions3, { children: [
6161
- /* @__PURE__ */ jsx12(Button4, { onClick: () => setClearConfirmOpen(false), children: "Cancel" }),
6162
- /* @__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(
6163
5708
  Button4,
6164
5709
  {
6165
5710
  onClick: handleClearAllConfirm,
@@ -6177,10 +5722,10 @@ var ConversationDrawer = ({ open, onClose }) => {
6177
5722
  var conversation_drawer_default = ConversationDrawer;
6178
5723
 
6179
5724
  // src/chat/enhanced-mobile-conversations-modal.tsx
6180
- 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";
6181
5726
  import {
6182
- Box as Box10,
6183
- IconButton as IconButton9,
5727
+ Box as Box9,
5728
+ IconButton as IconButton8,
6184
5729
  Modal as Modal2,
6185
5730
  Typography as Typography7,
6186
5731
  TextField as TextField6,
@@ -6212,8 +5757,8 @@ import {
6212
5757
  Inbox as InboxIcon4
6213
5758
  } from "@mui/icons-material";
6214
5759
  import { Add as AddIcon4 } from "@mui/icons-material";
6215
- import { useTheme as useTheme11, alpha as alpha7 } from "@mui/material/styles";
6216
- 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";
6217
5762
  var BANDIT_AVATAR2 = "https://cdn.burtson.ai/images/bandit-head.png";
6218
5763
  var coerceOptionalString2 = (value) => {
6219
5764
  if (typeof value !== "string") return void 0;
@@ -6244,7 +5789,7 @@ var EnhancedMobileConversationsModal = ({
6244
5789
  open,
6245
5790
  onClose
6246
5791
  }) => {
6247
- const theme = useTheme11();
5792
+ const theme = useTheme10();
6248
5793
  const { user } = useAuthenticationStore();
6249
5794
  const {
6250
5795
  conversations,
@@ -6264,24 +5809,24 @@ var EnhancedMobileConversationsModal = ({
6264
5809
  createProject,
6265
5810
  deleteProject
6266
5811
  } = useProjectStore();
6267
- const [projectManagementOpen, setProjectManagementOpen] = useState12(false);
6268
- const [collapsedProjects, setCollapsedProjects] = useState12(/* @__PURE__ */ new Set());
6269
- const didInitCollapseRef = useRef10(false);
6270
- const [searchQuery, setSearchQuery] = useState12("");
6271
- const [menuAnchorEl, setMenuAnchorEl] = useState12(null);
6272
- const [clearConfirmOpen, setClearConfirmOpen] = useState12(false);
6273
- const [moveModalOpen, setMoveModalOpen] = useState12(false);
6274
- const [conversationToMove, setConversationToMove] = useState12(null);
6275
- const [renameProjectId, setRenameProjectId] = useState12(null);
6276
- const [deletedConversationIds, setDeletedConversationIds] = useState12(/* @__PURE__ */ new Set());
6277
- const [touchDragState, setTouchDragState] = useState12({ conversationId: null, originProjectId: null, hoverProjectId: null });
6278
- 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);
6279
5824
  const getCustomClaim = useCallback5((key) => {
6280
5825
  if (!user) return void 0;
6281
5826
  const record = user;
6282
5827
  return coerceOptionalString2(record[key]);
6283
5828
  }, [user]);
6284
- const userDisplayName = useMemo3(() => {
5829
+ const userDisplayName = useMemo2(() => {
6285
5830
  if (!user) return void 0;
6286
5831
  const candidateFields = [
6287
5832
  coerceOptionalString2(user.name),
@@ -6296,7 +5841,7 @@ var EnhancedMobileConversationsModal = ({
6296
5841
  if (trimmedEmail) return trimmedEmail;
6297
5842
  return user.sub;
6298
5843
  }, [user, getCustomClaim]);
6299
- const userSecondaryText = useMemo3(() => {
5844
+ const userSecondaryText = useMemo2(() => {
6300
5845
  if (!user) return void 0;
6301
5846
  const trimmedEmail = coerceOptionalString2(user.email);
6302
5847
  if (trimmedEmail && trimmedEmail !== userDisplayName) {
@@ -6308,7 +5853,7 @@ var EnhancedMobileConversationsModal = ({
6308
5853
  }
6309
5854
  return void 0;
6310
5855
  }, [user, userDisplayName]);
6311
- useEffect11(() => {
5856
+ useEffect10(() => {
6312
5857
  const fetchBranding = async () => {
6313
5858
  try {
6314
5859
  const branding = await brandingService_default.getBranding();
@@ -6325,18 +5870,18 @@ var EnhancedMobileConversationsModal = ({
6325
5870
  }
6326
5871
  }, [open]);
6327
5872
  const avatarLabel = userDisplayName || user?.email || "Bandit";
6328
- const avatarInitials = useMemo3(() => deriveInitials2(avatarLabel), [avatarLabel]);
5873
+ const avatarInitials = useMemo2(() => deriveInitials2(avatarLabel), [avatarLabel]);
6329
5874
  const buildSnippet = (text, query, idx) => {
6330
5875
  const start = Math.max(0, idx - 40);
6331
5876
  const end = Math.min(text.length, idx + query.length + 60);
6332
5877
  return text.slice(start, end).replace(/\s+/g, " ").trim();
6333
5878
  };
6334
- useEffect11(() => {
5879
+ useEffect10(() => {
6335
5880
  if (open && !projectsHydrated) {
6336
5881
  hydrateProjects();
6337
5882
  }
6338
5883
  }, [open, projectsHydrated, hydrateProjects]);
6339
- useEffect11(() => {
5884
+ useEffect10(() => {
6340
5885
  if (projectsHydrated && !didInitCollapseRef.current) {
6341
5886
  didInitCollapseRef.current = true;
6342
5887
  if (projects && projects.length > 0) {
@@ -6344,7 +5889,7 @@ var EnhancedMobileConversationsModal = ({
6344
5889
  }
6345
5890
  }
6346
5891
  }, [projectsHydrated, projects]);
6347
- const projectGroups = useMemo3(() => {
5892
+ const projectGroups = useMemo2(() => {
6348
5893
  const visibleConversations = conversations.filter(
6349
5894
  (conversation) => !deletedConversationIds.has(conversation.id)
6350
5895
  );
@@ -6370,11 +5915,11 @@ var EnhancedMobileConversationsModal = ({
6370
5915
  }
6371
5916
  return groups.filter((group) => group.conversations.length > 0 || group.id !== null);
6372
5917
  }, [projects, conversations, collapsedProjects, deletedConversationIds]);
6373
- const visibleConversationCount = useMemo3(
5918
+ const visibleConversationCount = useMemo2(
6374
5919
  () => projectGroups.reduce((total, group) => total + group.conversations.length, 0),
6375
5920
  [projectGroups]
6376
5921
  );
6377
- const filteredProjectGroups = useMemo3(() => {
5922
+ const filteredProjectGroups = useMemo2(() => {
6378
5923
  if (!searchQuery.trim()) return projectGroups;
6379
5924
  const query = searchQuery.toLowerCase();
6380
5925
  return projectGroups.map((group) => {
@@ -6450,11 +5995,11 @@ var EnhancedMobileConversationsModal = ({
6450
5995
  return { conversationId: null, originProjectId: null, hoverProjectId: null };
6451
5996
  });
6452
5997
  }, [getProjectIdFromPoint, moveConversationToProject]);
6453
- const activeDragConversation = useMemo3(() => {
5998
+ const activeDragConversation = useMemo2(() => {
6454
5999
  if (!touchDragState.conversationId) return null;
6455
6000
  return conversations.find((conv) => conv.id === touchDragState.conversationId) || null;
6456
6001
  }, [touchDragState.conversationId, conversations]);
6457
- const activeHoverLabel = useMemo3(() => {
6002
+ const activeHoverLabel = useMemo2(() => {
6458
6003
  if (!touchDragState.hoverProjectId) return "";
6459
6004
  if (touchDragState.hoverProjectId === "__ungrouped") return "Ungrouped";
6460
6005
  const project = projects.find((p) => p.id === touchDragState.hoverProjectId);
@@ -6503,7 +6048,7 @@ var EnhancedMobileConversationsModal = ({
6503
6048
  setMoveModalOpen(false);
6504
6049
  setConversationToMove(null);
6505
6050
  };
6506
- useEffect11(() => {
6051
+ useEffect10(() => {
6507
6052
  setDeletedConversationIds((prev) => {
6508
6053
  let changed = false;
6509
6054
  const active = new Set(conversations.map((conv) => conv.id));
@@ -6518,8 +6063,8 @@ var EnhancedMobileConversationsModal = ({
6518
6063
  return changed ? next : prev;
6519
6064
  });
6520
6065
  }, [conversations]);
6521
- return /* @__PURE__ */ jsxs10(Fragment7, { children: [
6522
- /* @__PURE__ */ jsx13(
6066
+ return /* @__PURE__ */ jsxs9(Fragment7, { children: [
6067
+ /* @__PURE__ */ jsx12(
6523
6068
  Modal2,
6524
6069
  {
6525
6070
  open,
@@ -6528,8 +6073,8 @@ var EnhancedMobileConversationsModal = ({
6528
6073
  display: "flex",
6529
6074
  alignItems: "flex-end"
6530
6075
  },
6531
- children: /* @__PURE__ */ jsx13(Slide, { direction: "up", in: open, children: /* @__PURE__ */ jsxs10(
6532
- Box10,
6076
+ children: /* @__PURE__ */ jsx12(Slide, { direction: "up", in: open, children: /* @__PURE__ */ jsxs9(
6077
+ Box9,
6533
6078
  {
6534
6079
  sx: {
6535
6080
  width: "100%",
@@ -6542,7 +6087,7 @@ var EnhancedMobileConversationsModal = ({
6542
6087
  overflow: "hidden"
6543
6088
  },
6544
6089
  children: [
6545
- /* @__PURE__ */ jsx13(
6090
+ /* @__PURE__ */ jsx12(
6546
6091
  AppBar,
6547
6092
  {
6548
6093
  position: "static",
@@ -6552,9 +6097,9 @@ var EnhancedMobileConversationsModal = ({
6552
6097
  color: theme.palette.text.primary,
6553
6098
  borderBottom: `1px solid ${theme.palette.divider}`
6554
6099
  },
6555
- children: /* @__PURE__ */ jsxs10(Toolbar, { children: [
6556
- /* @__PURE__ */ jsx13(Typography7, { variant: "h6", sx: { flex: 1, fontWeight: 600 }, children: "Conversations" }),
6557
- 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(
6558
6103
  Chip3,
6559
6104
  {
6560
6105
  label: visibleConversationCount,
@@ -6567,34 +6112,34 @@ var EnhancedMobileConversationsModal = ({
6567
6112
  }
6568
6113
  }
6569
6114
  ),
6570
- /* @__PURE__ */ jsx13(
6571
- IconButton9,
6115
+ /* @__PURE__ */ jsx12(
6116
+ IconButton8,
6572
6117
  {
6573
6118
  onClick: () => setProjectManagementOpen(true),
6574
6119
  sx: { color: theme.palette.text.secondary },
6575
- children: /* @__PURE__ */ jsx13(FolderIcon5, {})
6120
+ children: /* @__PURE__ */ jsx12(FolderIcon5, {})
6576
6121
  }
6577
6122
  ),
6578
- /* @__PURE__ */ jsx13(
6579
- IconButton9,
6123
+ /* @__PURE__ */ jsx12(
6124
+ IconButton8,
6580
6125
  {
6581
6126
  onClick: handleMenuOpen,
6582
6127
  sx: { color: theme.palette.text.secondary },
6583
- children: /* @__PURE__ */ jsx13(MoreVertIcon4, {})
6128
+ children: /* @__PURE__ */ jsx12(MoreVertIcon4, {})
6584
6129
  }
6585
6130
  ),
6586
- /* @__PURE__ */ jsx13(
6587
- IconButton9,
6131
+ /* @__PURE__ */ jsx12(
6132
+ IconButton8,
6588
6133
  {
6589
6134
  onClick: onClose,
6590
6135
  sx: { color: theme.palette.text.secondary },
6591
- children: /* @__PURE__ */ jsx13(CloseIcon6, {})
6136
+ children: /* @__PURE__ */ jsx12(CloseIcon6, {})
6592
6137
  }
6593
6138
  )
6594
6139
  ] })
6595
6140
  }
6596
6141
  ),
6597
- /* @__PURE__ */ jsx13(Box10, { sx: { p: 2, pb: 1 }, children: /* @__PURE__ */ jsx13(
6142
+ /* @__PURE__ */ jsx12(Box9, { sx: { p: 2, pb: 1 }, children: /* @__PURE__ */ jsx12(
6598
6143
  TextField6,
6599
6144
  {
6600
6145
  fullWidth: true,
@@ -6604,22 +6149,22 @@ var EnhancedMobileConversationsModal = ({
6604
6149
  onChange: (e) => setSearchQuery(e.target.value),
6605
6150
  variant: "outlined",
6606
6151
  InputProps: {
6607
- startAdornment: /* @__PURE__ */ jsx13(InputAdornment2, { position: "start", children: /* @__PURE__ */ jsx13(SearchIcon2, { fontSize: "small", sx: { color: theme.palette.text.secondary } }) }),
6608
- endAdornment: searchQuery && /* @__PURE__ */ jsx13(InputAdornment2, { position: "end", children: /* @__PURE__ */ jsx13(
6609
- 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,
6610
6155
  {
6611
6156
  onClick: handleSearchClear,
6612
6157
  size: "small",
6613
6158
  edge: "end",
6614
6159
  sx: { color: theme.palette.text.secondary },
6615
- children: /* @__PURE__ */ jsx13(ClearIcon2, { fontSize: "small" })
6160
+ children: /* @__PURE__ */ jsx12(ClearIcon2, { fontSize: "small" })
6616
6161
  }
6617
6162
  ) })
6618
6163
  }
6619
6164
  }
6620
6165
  ) }),
6621
- /* @__PURE__ */ jsxs10(
6622
- Box10,
6166
+ /* @__PURE__ */ jsxs9(
6167
+ Box9,
6623
6168
  {
6624
6169
  sx: {
6625
6170
  flex: 1,
@@ -6630,8 +6175,8 @@ var EnhancedMobileConversationsModal = ({
6630
6175
  pb: 2
6631
6176
  },
6632
6177
  children: [
6633
- touchDragActive && activeDragConversation && /* @__PURE__ */ jsxs10(
6634
- Box10,
6178
+ touchDragActive && activeDragConversation && /* @__PURE__ */ jsxs9(
6179
+ Box9,
6635
6180
  {
6636
6181
  sx: {
6637
6182
  position: "absolute",
@@ -6640,13 +6185,13 @@ var EnhancedMobileConversationsModal = ({
6640
6185
  transform: "translate(-50%, -100%)",
6641
6186
  zIndex: theme.zIndex.modal + 10,
6642
6187
  pointerEvents: "none",
6643
- 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),
6644
6189
  color: theme.palette.mode === "dark" ? theme.palette.common.white : theme.palette.text.primary,
6645
- 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)}`,
6646
6191
  borderRadius: 999,
6647
6192
  px: 2,
6648
6193
  py: 0.75,
6649
- boxShadow: `0 16px 32px ${alpha7(theme.palette.common.black, 0.3)}`,
6194
+ boxShadow: `0 16px 32px ${alpha6(theme.palette.common.black, 0.3)}`,
6650
6195
  display: "flex",
6651
6196
  alignItems: "center",
6652
6197
  gap: 1,
@@ -6656,7 +6201,7 @@ var EnhancedMobileConversationsModal = ({
6656
6201
  overflow: "hidden"
6657
6202
  },
6658
6203
  children: [
6659
- /* @__PURE__ */ jsxs10(
6204
+ /* @__PURE__ */ jsxs9(
6660
6205
  Typography7,
6661
6206
  {
6662
6207
  variant: "caption",
@@ -6669,8 +6214,8 @@ var EnhancedMobileConversationsModal = ({
6669
6214
  },
6670
6215
  children: [
6671
6216
  "Move",
6672
- /* @__PURE__ */ jsxs10(
6673
- Box10,
6217
+ /* @__PURE__ */ jsxs9(
6218
+ Box9,
6674
6219
  {
6675
6220
  component: "span",
6676
6221
  sx: {
@@ -6690,7 +6235,7 @@ var EnhancedMobileConversationsModal = ({
6690
6235
  ]
6691
6236
  }
6692
6237
  ),
6693
- /* @__PURE__ */ jsx13(
6238
+ /* @__PURE__ */ jsx12(
6694
6239
  Typography7,
6695
6240
  {
6696
6241
  variant: "caption",
@@ -6699,11 +6244,11 @@ var EnhancedMobileConversationsModal = ({
6699
6244
  fontWeight: 500,
6700
6245
  whiteSpace: "nowrap"
6701
6246
  },
6702
- children: activeHoverLabel ? /* @__PURE__ */ jsxs10(Fragment7, { children: [
6247
+ children: activeHoverLabel ? /* @__PURE__ */ jsxs9(Fragment7, { children: [
6703
6248
  "to",
6704
6249
  " ",
6705
- /* @__PURE__ */ jsx13(
6706
- Box10,
6250
+ /* @__PURE__ */ jsx12(
6251
+ Box9,
6707
6252
  {
6708
6253
  component: "span",
6709
6254
  sx: {
@@ -6719,8 +6264,8 @@ var EnhancedMobileConversationsModal = ({
6719
6264
  ]
6720
6265
  }
6721
6266
  ),
6722
- /* @__PURE__ */ jsxs10(
6723
- Box10,
6267
+ /* @__PURE__ */ jsxs9(
6268
+ Box9,
6724
6269
  {
6725
6270
  onClick: async () => {
6726
6271
  const names = new Set(projects.map((p) => p.name));
@@ -6751,26 +6296,26 @@ var EnhancedMobileConversationsModal = ({
6751
6296
  alignItems: "center",
6752
6297
  gap: 1.5,
6753
6298
  cursor: "pointer",
6754
- "&:hover": { bgcolor: alpha7(theme.palette.text.primary, 0.04) }
6299
+ "&:hover": { bgcolor: alpha6(theme.palette.text.primary, 0.04) }
6755
6300
  },
6756
6301
  children: [
6757
- /* @__PURE__ */ jsx13(
6758
- Box10,
6302
+ /* @__PURE__ */ jsx12(
6303
+ Box9,
6759
6304
  {
6760
6305
  sx: {
6761
6306
  width: 28,
6762
6307
  height: 28,
6763
6308
  borderRadius: "50%",
6764
- bgcolor: alpha7(theme.palette.success.main, 0.15),
6309
+ bgcolor: alpha6(theme.palette.success.main, 0.15),
6765
6310
  display: "flex",
6766
6311
  alignItems: "center",
6767
6312
  justifyContent: "center",
6768
6313
  flexShrink: 0
6769
6314
  },
6770
- 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 } })
6771
6316
  }
6772
6317
  ),
6773
- /* @__PURE__ */ jsx13(
6318
+ /* @__PURE__ */ jsx12(
6774
6319
  Typography7,
6775
6320
  {
6776
6321
  variant: "subtitle2",
@@ -6778,14 +6323,14 @@ var EnhancedMobileConversationsModal = ({
6778
6323
  children: "New Project"
6779
6324
  }
6780
6325
  ),
6781
- /* @__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" }) })
6782
6327
  ]
6783
6328
  }
6784
6329
  ),
6785
- /* @__PURE__ */ jsx13(Divider3, { sx: { opacity: 0.3 } }),
6786
- filteredProjectGroups.map((group, index) => /* @__PURE__ */ jsxs10(Box10, { children: [
6787
- group.id === null && filteredProjectGroups.length > 1 && /* @__PURE__ */ jsxs10(
6788
- 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,
6789
6334
  {
6790
6335
  sx: {
6791
6336
  py: 2,
@@ -6795,9 +6340,9 @@ var EnhancedMobileConversationsModal = ({
6795
6340
  gap: 2
6796
6341
  },
6797
6342
  children: [
6798
- /* @__PURE__ */ jsx13(Divider3, { sx: { flex: 1, opacity: 0.6 } }),
6799
- /* @__PURE__ */ jsxs10(Box10, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
6800
- /* @__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(
6801
6346
  InboxIcon4,
6802
6347
  {
6803
6348
  sx: {
@@ -6807,7 +6352,7 @@ var EnhancedMobileConversationsModal = ({
6807
6352
  }
6808
6353
  }
6809
6354
  ),
6810
- /* @__PURE__ */ jsx13(
6355
+ /* @__PURE__ */ jsx12(
6811
6356
  Typography7,
6812
6357
  {
6813
6358
  variant: "caption",
@@ -6822,12 +6367,12 @@ var EnhancedMobileConversationsModal = ({
6822
6367
  }
6823
6368
  )
6824
6369
  ] }),
6825
- /* @__PURE__ */ jsx13(Divider3, { sx: { flex: 1, opacity: 0.6 } })
6370
+ /* @__PURE__ */ jsx12(Divider3, { sx: { flex: 1, opacity: 0.6 } })
6826
6371
  ]
6827
6372
  }
6828
6373
  ),
6829
- group.id !== null ? /* @__PURE__ */ jsxs10(Fragment7, { children: [
6830
- /* @__PURE__ */ jsx13(
6374
+ group.id !== null ? /* @__PURE__ */ jsxs9(Fragment7, { children: [
6375
+ /* @__PURE__ */ jsx12(
6831
6376
  project_header_default,
6832
6377
  {
6833
6378
  projectId: group.id,
@@ -6857,8 +6402,8 @@ var EnhancedMobileConversationsModal = ({
6857
6402
  isTouchTarget: touchDragActive && touchDragState.hoverProjectId === group.id
6858
6403
  }
6859
6404
  ),
6860
- /* @__PURE__ */ jsx13(Collapse3, { in: !group.collapsed, children: /* @__PURE__ */ jsx13(
6861
- Box10,
6405
+ /* @__PURE__ */ jsx12(Collapse3, { in: !group.collapsed, children: /* @__PURE__ */ jsx12(
6406
+ Box9,
6862
6407
  {
6863
6408
  "data-project-id": group.id ?? "__ungrouped",
6864
6409
  sx: {
@@ -6866,9 +6411,9 @@ var EnhancedMobileConversationsModal = ({
6866
6411
  border: touchDragActive && touchDragState.hoverProjectId === group.id ? `2px dashed ${theme.palette.primary.main}` : "1px solid transparent",
6867
6412
  borderRadius: touchDragActive && touchDragState.hoverProjectId === group.id ? 2 : 0,
6868
6413
  transition: "border 0.2s ease, background-color 0.2s ease",
6869
- 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"
6870
6415
  },
6871
- children: group.conversations.map((conversation) => /* @__PURE__ */ jsx13(
6416
+ children: group.conversations.map((conversation) => /* @__PURE__ */ jsx12(
6872
6417
  simple_conversation_item_default,
6873
6418
  {
6874
6419
  conversation,
@@ -6902,24 +6447,24 @@ var EnhancedMobileConversationsModal = ({
6902
6447
  ) })
6903
6448
  ] }) : (
6904
6449
  // Special handling for ungrouped - no header, just conversations in scrollable area
6905
- /* @__PURE__ */ jsx13(
6906
- Box10,
6450
+ /* @__PURE__ */ jsx12(
6451
+ Box9,
6907
6452
  {
6908
6453
  sx: {
6909
6454
  minHeight: 0,
6910
6455
  overflow: "auto",
6911
6456
  px: 1,
6912
6457
  py: 1,
6913
- bgcolor: alpha7(theme.palette.background.default, 0.3),
6458
+ bgcolor: alpha6(theme.palette.background.default, 0.3),
6914
6459
  borderRadius: "8px 8px 0 0",
6915
6460
  mx: 1,
6916
6461
  mb: 1,
6917
6462
  border: touchDragActive && touchDragState.hoverProjectId === "__ungrouped" ? `2px dashed ${theme.palette.primary.main}` : "1px solid transparent",
6918
6463
  transition: "border 0.2s ease, background-color 0.2s ease",
6919
- 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)
6920
6465
  },
6921
6466
  "data-project-id": "__ungrouped",
6922
- children: group.conversations.map((conversation) => /* @__PURE__ */ jsx13(
6467
+ children: group.conversations.map((conversation) => /* @__PURE__ */ jsx12(
6923
6468
  simple_conversation_item_default,
6924
6469
  {
6925
6470
  conversation,
@@ -6953,8 +6498,8 @@ var EnhancedMobileConversationsModal = ({
6953
6498
  )
6954
6499
  )
6955
6500
  ] }, group.id || "ungrouped")),
6956
- filteredProjectGroups.length === 0 && /* @__PURE__ */ jsxs10(
6957
- Box10,
6501
+ filteredProjectGroups.length === 0 && /* @__PURE__ */ jsxs9(
6502
+ Box9,
6958
6503
  {
6959
6504
  sx: {
6960
6505
  flex: 1,
@@ -6967,31 +6512,31 @@ var EnhancedMobileConversationsModal = ({
6967
6512
  color: theme.palette.text.secondary
6968
6513
  },
6969
6514
  children: [
6970
- /* @__PURE__ */ jsx13(Typography7, { variant: "h6", sx: { mb: 1 }, children: searchQuery ? "No conversations found" : "No conversations yet" }),
6971
- /* @__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" })
6972
6517
  ]
6973
6518
  }
6974
6519
  )
6975
6520
  ]
6976
6521
  }
6977
6522
  ),
6978
- /* @__PURE__ */ jsxs10(
6979
- Box10,
6523
+ /* @__PURE__ */ jsxs9(
6524
+ Box9,
6980
6525
  {
6981
6526
  sx: {
6982
6527
  mt: "auto",
6983
6528
  px: 2,
6984
6529
  py: 1.75,
6985
- borderTop: `1px solid ${alpha7(theme.palette.divider, 0.6)}`,
6530
+ borderTop: `1px solid ${alpha6(theme.palette.divider, 0.6)}`,
6986
6531
  display: "flex",
6987
6532
  alignItems: "center",
6988
6533
  justifyContent: "center",
6989
6534
  gap: 1.25,
6990
- bgcolor: alpha7(theme.palette.background.default, 0.88),
6535
+ bgcolor: alpha6(theme.palette.background.default, 0.88),
6991
6536
  flexWrap: "wrap"
6992
6537
  },
6993
6538
  children: [
6994
- /* @__PURE__ */ jsx13(
6539
+ /* @__PURE__ */ jsx12(
6995
6540
  Avatar7,
6996
6541
  {
6997
6542
  src: avatarImage,
@@ -7000,14 +6545,14 @@ var EnhancedMobileConversationsModal = ({
7000
6545
  width: 40,
7001
6546
  height: 40,
7002
6547
  fontSize: "1rem",
7003
- bgcolor: alpha7(theme.palette.primary.main, 0.12),
6548
+ bgcolor: alpha6(theme.palette.primary.main, 0.12),
7004
6549
  color: theme.palette.primary.main
7005
6550
  },
7006
6551
  children: avatarInitials
7007
6552
  }
7008
6553
  ),
7009
- /* @__PURE__ */ jsxs10(Box10, { sx: { display: "flex", flexDirection: "column", alignItems: "center", gap: 0.5, minWidth: 0 }, children: [
7010
- /* @__PURE__ */ jsx13(
6554
+ /* @__PURE__ */ jsxs9(Box9, { sx: { display: "flex", flexDirection: "column", alignItems: "center", gap: 0.5, minWidth: 0 }, children: [
6555
+ /* @__PURE__ */ jsx12(
7011
6556
  Typography7,
7012
6557
  {
7013
6558
  variant: "subtitle2",
@@ -7016,7 +6561,7 @@ var EnhancedMobileConversationsModal = ({
7016
6561
  children: user ? userDisplayName : "Not signed in"
7017
6562
  }
7018
6563
  ),
7019
- !user && /* @__PURE__ */ jsx13(
6564
+ !user && /* @__PURE__ */ jsx12(
7020
6565
  Typography7,
7021
6566
  {
7022
6567
  variant: "caption",
@@ -7034,14 +6579,14 @@ var EnhancedMobileConversationsModal = ({
7034
6579
  ) })
7035
6580
  }
7036
6581
  ),
7037
- /* @__PURE__ */ jsx13(
6582
+ /* @__PURE__ */ jsx12(
7038
6583
  project_management_modal_default,
7039
6584
  {
7040
6585
  open: projectManagementOpen,
7041
6586
  onClose: () => setProjectManagementOpen(false)
7042
6587
  }
7043
6588
  ),
7044
- conversationToMove && /* @__PURE__ */ jsx13(
6589
+ conversationToMove && /* @__PURE__ */ jsx12(
7045
6590
  move_conversation_modal_default,
7046
6591
  {
7047
6592
  open: moveModalOpen,
@@ -7050,7 +6595,7 @@ var EnhancedMobileConversationsModal = ({
7050
6595
  currentProjectId: conversationToMove.projectId
7051
6596
  }
7052
6597
  ),
7053
- /* @__PURE__ */ jsx13(
6598
+ /* @__PURE__ */ jsx12(
7054
6599
  Menu4,
7055
6600
  {
7056
6601
  anchorEl: menuAnchorEl,
@@ -7064,7 +6609,7 @@ var EnhancedMobileConversationsModal = ({
7064
6609
  vertical: "bottom",
7065
6610
  horizontal: "right"
7066
6611
  },
7067
- children: /* @__PURE__ */ jsxs10(
6612
+ children: /* @__PURE__ */ jsxs9(
7068
6613
  MenuItem4,
7069
6614
  {
7070
6615
  onClick: () => {
@@ -7074,14 +6619,14 @@ var EnhancedMobileConversationsModal = ({
7074
6619
  disabled: visibleConversationCount === 0,
7075
6620
  sx: { color: theme.palette.error.main },
7076
6621
  children: [
7077
- /* @__PURE__ */ jsx13(ListItemIcon4, { children: /* @__PURE__ */ jsx13(DeleteSweepIcon2, { fontSize: "small", sx: { color: theme.palette.error.main } }) }),
7078
- /* @__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" })
7079
6624
  ]
7080
6625
  }
7081
6626
  )
7082
6627
  }
7083
6628
  ),
7084
- /* @__PURE__ */ jsxs10(
6629
+ /* @__PURE__ */ jsxs9(
7085
6630
  Dialog4,
7086
6631
  {
7087
6632
  open: clearConfirmOpen,
@@ -7089,11 +6634,11 @@ var EnhancedMobileConversationsModal = ({
7089
6634
  maxWidth: "sm",
7090
6635
  fullWidth: true,
7091
6636
  children: [
7092
- /* @__PURE__ */ jsx13(DialogTitle4, { children: "Clear All Conversations?" }),
7093
- /* @__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.` }) }),
7094
- /* @__PURE__ */ jsxs10(DialogActions4, { children: [
7095
- /* @__PURE__ */ jsx13(Button5, { onClick: () => setClearConfirmOpen(false), children: "Cancel" }),
7096
- /* @__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(
7097
6642
  Button5,
7098
6643
  {
7099
6644
  onClick: handleClearAllConfirm,
@@ -7112,7 +6657,7 @@ var enhanced_mobile_conversations_modal_default = EnhancedMobileConversationsMod
7112
6657
 
7113
6658
  // src/chat/chat-app-bar.tsx
7114
6659
  import { shallow as shallow2 } from "zustand/shallow";
7115
- 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";
7116
6661
  var CDN_BASE = "https://cdn.burtson.ai/";
7117
6662
  var banditHead = `${CDN_BASE}/images/bandit-head.png`;
7118
6663
  var modelAvatars = {
@@ -7131,9 +6676,9 @@ var ChatAppBar = ({
7131
6676
  drawerOpen,
7132
6677
  setDrawerOpen
7133
6678
  }) => {
7134
- const theme = useTheme12();
6679
+ const theme = useTheme11();
7135
6680
  const isMobile = useMediaQuery5(theme.breakpoints.down("sm"));
7136
- const hasLoggedRouterWarningRef = useRef11(false);
6681
+ const hasLoggedRouterWarningRef = useRef10(false);
7137
6682
  let navigate = null;
7138
6683
  try {
7139
6684
  navigate = useNavigate();
@@ -7159,11 +6704,11 @@ var ChatAppBar = ({
7159
6704
  menuBackground,
7160
6705
  menuText
7161
6706
  } = theme.palette.chat.appBar;
7162
- const [modelAnchorEl, setModelAnchorEl] = useState13(null);
7163
- const [voiceAnchorEl, setVoiceAnchorEl] = useState13(null);
7164
- const [modalOpen, setModalOpen] = useState13(false);
7165
- const [confirmModelChangeOpen, setConfirmModelChangeOpen] = useState13(false);
7166
- 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);
7167
6712
  const { conversations, currentId, createNewConversation, _hasHydrated } = useConversationStore();
7168
6713
  const { preferences } = usePreferencesStore();
7169
6714
  const { settings: packageSettings } = usePackageSettingsStore();
@@ -7189,7 +6734,7 @@ var ChatAppBar = ({
7189
6734
  triggerSync: state.runSync,
7190
6735
  setSyncEnabled: state.setSyncEnabled
7191
6736
  }), shallow2);
7192
- useEffect12(() => {
6737
+ useEffect11(() => {
7193
6738
  if (isPlaygroundMode2 && syncEnabled) {
7194
6739
  void setSyncEnabled(false).catch((error) => {
7195
6740
  debugLogger.warn("ChatAppBar: Failed to disable sync in playground", {
@@ -7207,16 +6752,16 @@ var ChatAppBar = ({
7207
6752
  };
7208
6753
  const syncIndicatorIcon = (() => {
7209
6754
  if (isPlaygroundMode2 || !syncEnabled) {
7210
- return /* @__PURE__ */ jsx14(CloudOffIcon, { fontSize: "small", color: "disabled" });
6755
+ return /* @__PURE__ */ jsx13(CloudOffIcon, { fontSize: "small", color: "disabled" });
7211
6756
  }
7212
6757
  switch (syncStatus) {
7213
6758
  case "syncing":
7214
- return /* @__PURE__ */ jsx14(SyncIcon, { fontSize: "small", sx: syncSpinSx, color: "primary" });
6759
+ return /* @__PURE__ */ jsx13(SyncIcon, { fontSize: "small", sx: syncSpinSx, color: "primary" });
7215
6760
  case "error":
7216
- return /* @__PURE__ */ jsx14(ErrorOutlineIcon, { fontSize: "small", color: "error" });
6761
+ return /* @__PURE__ */ jsx13(ErrorOutlineIcon, { fontSize: "small", color: "error" });
7217
6762
  case "idle":
7218
6763
  default:
7219
- return /* @__PURE__ */ jsx14(CloudDoneIcon, { fontSize: "small", color: "success" });
6764
+ return /* @__PURE__ */ jsx13(CloudDoneIcon, { fontSize: "small", color: "success" });
7220
6765
  }
7221
6766
  })();
7222
6767
  const syncTooltip = (() => {
@@ -7281,9 +6826,18 @@ var ChatAppBar = ({
7281
6826
  const currentModel = useModelStore((s) => s.availableModels.find((m) => m.name === selectedModel));
7282
6827
  const currentAvatar = currentModel?.avatarBase64 || modelAvatars[selectedModel] || banditHead;
7283
6828
  const pendingModelAvatar = useModelStore.getState().availableModels.find((m) => m.name === pendingModel)?.avatarBase64 || modelAvatars[pendingModel || ""] || banditHead;
6829
+ const resolvedHomeUrl = preferences.homeUrl?.trim() || packageSettings?.homeUrl?.trim() || "";
6830
+ const homeTooltip = (() => {
6831
+ if (!resolvedHomeUrl) return "Home";
6832
+ try {
6833
+ return `Home (${new URL(resolvedHomeUrl).hostname})`;
6834
+ } catch {
6835
+ return "Home";
6836
+ }
6837
+ })();
7284
6838
  function goToHome() {
7285
- if (preferences.homeUrl && preferences.homeUrl.trim()) {
7286
- window.location.href = preferences.homeUrl;
6839
+ if (resolvedHomeUrl) {
6840
+ window.location.href = resolvedHomeUrl;
7287
6841
  return;
7288
6842
  }
7289
6843
  if (typeof window !== "undefined") {
@@ -7303,9 +6857,9 @@ var ChatAppBar = ({
7303
6857
  }
7304
6858
  safeNavigate("/");
7305
6859
  }
7306
- return /* @__PURE__ */ jsxs11(Fragment8, { children: [
7307
- /* @__PURE__ */ jsxs11(
7308
- Box11,
6860
+ return /* @__PURE__ */ jsxs10(Fragment8, { children: [
6861
+ /* @__PURE__ */ jsxs10(
6862
+ Box10,
7309
6863
  {
7310
6864
  sx: {
7311
6865
  position: "fixed",
@@ -7325,8 +6879,8 @@ var ChatAppBar = ({
7325
6879
  }
7326
6880
  },
7327
6881
  children: [
7328
- /* @__PURE__ */ jsxs11(
7329
- Box11,
6882
+ /* @__PURE__ */ jsxs10(
6883
+ Box10,
7330
6884
  {
7331
6885
  sx: {
7332
6886
  display: "flex",
@@ -7346,17 +6900,17 @@ var ChatAppBar = ({
7346
6900
  }
7347
6901
  },
7348
6902
  children: [
7349
- /* @__PURE__ */ jsx14(Tooltip5, { title: preferences.homeUrl && preferences.homeUrl.trim() ? `Home (${new URL(preferences.homeUrl).hostname})` : "Home", arrow: true, children: /* @__PURE__ */ jsx14(
7350
- IconButton10,
6903
+ /* @__PURE__ */ jsx13(Tooltip4, { title: homeTooltip, arrow: true, children: /* @__PURE__ */ jsx13(
6904
+ IconButton9,
7351
6905
  {
7352
6906
  onClick: goToHome,
7353
6907
  sx: pillButtonStyles,
7354
6908
  "aria-label": "Go to home page",
7355
- children: /* @__PURE__ */ jsx14(HomeIcon, {})
6909
+ children: /* @__PURE__ */ jsx13(HomeIcon, {})
7356
6910
  }
7357
6911
  ) }),
7358
- showLimitedAdminPanel() && /* @__PURE__ */ jsx14(Tooltip5, { title: "Management & Settings", arrow: true, children: /* @__PURE__ */ jsx14(
7359
- IconButton10,
6912
+ showLimitedAdminPanel() && /* @__PURE__ */ jsx13(Tooltip4, { title: "Management & Settings", arrow: true, children: /* @__PURE__ */ jsx13(
6913
+ IconButton9,
7360
6914
  {
7361
6915
  onClick: () => safeNavigate(managementPath),
7362
6916
  sx: {
@@ -7367,11 +6921,11 @@ var ChatAppBar = ({
7367
6921
  }
7368
6922
  },
7369
6923
  "aria-label": "Open management settings",
7370
- children: /* @__PURE__ */ jsx14(SettingsIcon, {})
6924
+ children: /* @__PURE__ */ jsx13(SettingsIcon, {})
7371
6925
  }
7372
6926
  ) }),
7373
- /* @__PURE__ */ jsx14(Tooltip5, { title: syncTooltip, arrow: true, children: /* @__PURE__ */ jsxs11(
7374
- IconButton10,
6927
+ /* @__PURE__ */ jsx13(Tooltip4, { title: syncTooltip, arrow: true, children: /* @__PURE__ */ jsxs10(
6928
+ IconButton9,
7375
6929
  {
7376
6930
  onClick: handleSyncBadgeClick,
7377
6931
  disabled: syncButtonDisabled,
@@ -7386,8 +6940,8 @@ var ChatAppBar = ({
7386
6940
  "aria-label": "Conversation sync status",
7387
6941
  children: [
7388
6942
  syncIndicatorIcon,
7389
- pendingCount > 0 && !syncButtonDisabled && syncStatus !== "syncing" && /* @__PURE__ */ jsx14(
7390
- Box11,
6943
+ pendingCount > 0 && !syncButtonDisabled && syncStatus !== "syncing" && /* @__PURE__ */ jsx13(
6944
+ Box10,
7391
6945
  {
7392
6946
  sx: {
7393
6947
  position: "absolute",
@@ -7412,8 +6966,8 @@ var ChatAppBar = ({
7412
6966
  ]
7413
6967
  }
7414
6968
  ) }),
7415
- !isMobile && /* @__PURE__ */ jsx14(Tooltip5, { title: `${drawerOpen ? "Close" : "Open"} Conversations`, arrow: true, children: /* @__PURE__ */ jsxs11(
7416
- IconButton10,
6969
+ !isMobile && /* @__PURE__ */ jsx13(Tooltip4, { title: `${drawerOpen ? "Close" : "Open"} Conversations`, arrow: true, children: /* @__PURE__ */ jsxs10(
6970
+ IconButton9,
7417
6971
  {
7418
6972
  onClick: () => setDrawerOpen(!drawerOpen),
7419
6973
  sx: {
@@ -7426,9 +6980,9 @@ var ChatAppBar = ({
7426
6980
  "aria-label": `${drawerOpen ? "Close" : "Open"} conversations drawer`,
7427
6981
  "aria-pressed": drawerOpen,
7428
6982
  children: [
7429
- drawerOpen ? /* @__PURE__ */ jsx14(NotesIcon, {}) : /* @__PURE__ */ jsx14(NotesIconOutlined, {}),
7430
- conversations.length > 0 && /* @__PURE__ */ jsx14(
7431
- Box11,
6983
+ drawerOpen ? /* @__PURE__ */ jsx13(NotesIcon, {}) : /* @__PURE__ */ jsx13(NotesIconOutlined, {}),
6984
+ conversations.length > 0 && /* @__PURE__ */ jsx13(
6985
+ Box10,
7432
6986
  {
7433
6987
  sx: {
7434
6988
  position: "absolute",
@@ -7453,8 +7007,8 @@ var ChatAppBar = ({
7453
7007
  ]
7454
7008
  }
7455
7009
  ) }),
7456
- !isMobile && canShowNewConversationButton && /* @__PURE__ */ jsx14(Tooltip5, { title: "Start New Conversation", arrow: true, children: /* @__PURE__ */ jsx14(
7457
- IconButton10,
7010
+ !isMobile && canShowNewConversationButton && /* @__PURE__ */ jsx13(Tooltip4, { title: "Start New Conversation", arrow: true, children: /* @__PURE__ */ jsx13(
7011
+ IconButton9,
7458
7012
  {
7459
7013
  onClick: () => createNewConversation(),
7460
7014
  sx: {
@@ -7467,14 +7021,14 @@ var ChatAppBar = ({
7467
7021
  }
7468
7022
  },
7469
7023
  "aria-label": "Create new conversation",
7470
- children: /* @__PURE__ */ jsx14(AddIcon5, {})
7024
+ children: /* @__PURE__ */ jsx13(AddIcon5, {})
7471
7025
  }
7472
7026
  ) })
7473
7027
  ]
7474
7028
  }
7475
7029
  ),
7476
- /* @__PURE__ */ jsxs11(
7477
- Box11,
7030
+ /* @__PURE__ */ jsxs10(
7031
+ Box10,
7478
7032
  {
7479
7033
  sx: {
7480
7034
  display: "flex",
@@ -7494,8 +7048,8 @@ var ChatAppBar = ({
7494
7048
  }
7495
7049
  },
7496
7050
  children: [
7497
- isMobile && /* @__PURE__ */ jsx14(Tooltip5, { title: `Conversations (${conversations.length})`, arrow: true, children: /* @__PURE__ */ jsxs11(
7498
- IconButton10,
7051
+ isMobile && /* @__PURE__ */ jsx13(Tooltip4, { title: `Conversations (${conversations.length})`, arrow: true, children: /* @__PURE__ */ jsxs10(
7052
+ IconButton9,
7499
7053
  {
7500
7054
  onClick: () => setModalOpen(true),
7501
7055
  sx: {
@@ -7504,9 +7058,9 @@ var ChatAppBar = ({
7504
7058
  },
7505
7059
  "aria-label": `Open conversations modal with ${conversations.length} conversations`,
7506
7060
  children: [
7507
- /* @__PURE__ */ jsx14(NotesIcon, { fontSize: "small" }),
7508
- conversations.length > 0 && /* @__PURE__ */ jsx14(
7509
- Box11,
7061
+ /* @__PURE__ */ jsx13(NotesIcon, { fontSize: "small" }),
7062
+ conversations.length > 0 && /* @__PURE__ */ jsx13(
7063
+ Box10,
7510
7064
  {
7511
7065
  sx: {
7512
7066
  position: "absolute",
@@ -7531,8 +7085,8 @@ var ChatAppBar = ({
7531
7085
  ]
7532
7086
  }
7533
7087
  ) }),
7534
- isMobile && canShowNewConversationButton && /* @__PURE__ */ jsx14(Tooltip5, { title: "Start New Conversation", arrow: true, children: /* @__PURE__ */ jsx14(
7535
- IconButton10,
7088
+ isMobile && canShowNewConversationButton && /* @__PURE__ */ jsx13(Tooltip4, { title: "Start New Conversation", arrow: true, children: /* @__PURE__ */ jsx13(
7089
+ IconButton9,
7536
7090
  {
7537
7091
  onClick: () => {
7538
7092
  createNewConversation();
@@ -7548,11 +7102,11 @@ var ChatAppBar = ({
7548
7102
  }
7549
7103
  },
7550
7104
  "aria-label": "Create new conversation",
7551
- children: /* @__PURE__ */ jsx14(AddIcon5, { fontSize: "small" })
7105
+ children: /* @__PURE__ */ jsx13(AddIcon5, { fontSize: "small" })
7552
7106
  }
7553
7107
  ) }),
7554
- /* @__PURE__ */ jsx14(Tooltip5, { title: `Current AI: ${selectedModel.replace("Bandit-", "")}`, arrow: true, children: /* @__PURE__ */ jsx14(
7555
- IconButton10,
7108
+ /* @__PURE__ */ jsx13(Tooltip4, { title: `Current AI: ${selectedModel.replace("Bandit-", "")}`, arrow: true, children: /* @__PURE__ */ jsx13(
7109
+ IconButton9,
7556
7110
  {
7557
7111
  onClick: (e) => setModelAnchorEl(e.currentTarget),
7558
7112
  sx: {
@@ -7566,7 +7120,7 @@ var ChatAppBar = ({
7566
7120
  }
7567
7121
  },
7568
7122
  "aria-label": `Change AI personality. Currently using ${selectedModel}`,
7569
- children: /* @__PURE__ */ jsx14(
7123
+ children: /* @__PURE__ */ jsx13(
7570
7124
  Avatar8,
7571
7125
  {
7572
7126
  src: currentAvatar,
@@ -7583,7 +7137,7 @@ var ChatAppBar = ({
7583
7137
  )
7584
7138
  }
7585
7139
  ) }),
7586
- /* @__PURE__ */ jsx14(
7140
+ /* @__PURE__ */ jsx13(
7587
7141
  Menu5,
7588
7142
  {
7589
7143
  anchorEl: modelAnchorEl,
@@ -7619,7 +7173,7 @@ var ChatAppBar = ({
7619
7173
  }
7620
7174
  }
7621
7175
  },
7622
- children: availableModels.map((model) => /* @__PURE__ */ jsxs11(
7176
+ children: availableModels.map((model) => /* @__PURE__ */ jsxs10(
7623
7177
  MenuItem5,
7624
7178
  {
7625
7179
  selected: model.name === selectedModel,
@@ -7630,9 +7184,15 @@ var ChatAppBar = ({
7630
7184
  (async () => {
7631
7185
  try {
7632
7186
  const storeConfigs = [{ name: "config", keyPath: "id" }];
7633
- const current = await indexedDBService_default.get("banditConfig", 1, "config", "main", storeConfigs);
7187
+ const current = await indexedDBService_default.get(
7188
+ "banditConfig",
7189
+ 1,
7190
+ "config",
7191
+ "main",
7192
+ storeConfigs
7193
+ );
7634
7194
  const updated = {
7635
- ...current,
7195
+ ...current ?? {},
7636
7196
  id: "main",
7637
7197
  model: {
7638
7198
  ...current?.model || {},
@@ -7660,7 +7220,7 @@ var ChatAppBar = ({
7660
7220
  px: 2
7661
7221
  },
7662
7222
  children: [
7663
- /* @__PURE__ */ jsx14(
7223
+ /* @__PURE__ */ jsx13(
7664
7224
  Avatar8,
7665
7225
  {
7666
7226
  src: model.avatarBase64 || modelAvatars[model.name] || banditHead,
@@ -7673,12 +7233,12 @@ var ChatAppBar = ({
7673
7233
  }
7674
7234
  }
7675
7235
  ),
7676
- /* @__PURE__ */ jsxs11(Box11, { sx: { flex: 1 }, children: [
7677
- /* @__PURE__ */ jsx14(Typography8, { variant: "body2", sx: { fontWeight: 500 }, children: model.name.replace("Bandit-", "") }),
7678
- /* @__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" })
7679
7239
  ] }),
7680
- model.name === selectedModel && /* @__PURE__ */ jsx14(
7681
- Box11,
7240
+ model.name === selectedModel && /* @__PURE__ */ jsx13(
7241
+ Box10,
7682
7242
  {
7683
7243
  sx: {
7684
7244
  width: 8,
@@ -7694,9 +7254,9 @@ var ChatAppBar = ({
7694
7254
  ))
7695
7255
  }
7696
7256
  ),
7697
- isTTSAvailable && /* @__PURE__ */ jsxs11(Fragment8, { children: [
7698
- /* @__PURE__ */ jsx14(Tooltip5, { title: `Voice: ${selectedVoice ? toTitleCase(selectedVoice.split("-")[1]) : "Default"}`, arrow: true, children: /* @__PURE__ */ jsx14(
7699
- 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,
7700
7260
  {
7701
7261
  onClick: (e) => setVoiceAnchorEl(e.currentTarget),
7702
7262
  sx: {
@@ -7709,10 +7269,10 @@ var ChatAppBar = ({
7709
7269
  }
7710
7270
  },
7711
7271
  "aria-label": `Change voice. Currently using ${selectedVoice ? toTitleCase(selectedVoice.split("-")[1]) : "default"}`,
7712
- children: /* @__PURE__ */ jsx14(RecordVoiceOverIcon, { fontSize: "small" })
7272
+ children: /* @__PURE__ */ jsx13(RecordVoiceOverIcon, { fontSize: "small" })
7713
7273
  }
7714
7274
  ) }),
7715
- /* @__PURE__ */ jsx14(
7275
+ /* @__PURE__ */ jsx13(
7716
7276
  Menu5,
7717
7277
  {
7718
7278
  anchorEl: voiceAnchorEl,
@@ -7749,7 +7309,7 @@ var ChatAppBar = ({
7749
7309
  }
7750
7310
  }
7751
7311
  },
7752
- children: availableVoices.length > 0 ? availableVoices.map((voice) => /* @__PURE__ */ jsx14(
7312
+ children: availableVoices.length > 0 ? availableVoices.map((voice) => /* @__PURE__ */ jsx13(
7753
7313
  MenuItem5,
7754
7314
  {
7755
7315
  selected: voice === selectedVoice,
@@ -7757,14 +7317,14 @@ var ChatAppBar = ({
7757
7317
  handleVoiceChange(voice);
7758
7318
  setVoiceAnchorEl(null);
7759
7319
  },
7760
- children: /* @__PURE__ */ jsxs11(Box11, { sx: { display: "flex", alignItems: "center", gap: 1, width: "100%" }, children: [
7761
- /* @__PURE__ */ jsx14(RecordVoiceOverIcon, { fontSize: "small", sx: { color: theme.palette.text.secondary } }),
7762
- /* @__PURE__ */ jsxs11(Box11, { sx: { flex: 1 }, children: [
7763
- /* @__PURE__ */ jsx14(Typography8, { variant: "body2", children: toTitleCase(voice.split("-")[1]) }),
7764
- /* @__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" })
7765
7325
  ] }),
7766
- voice === selectedVoice && /* @__PURE__ */ jsx14(
7767
- Box11,
7326
+ voice === selectedVoice && /* @__PURE__ */ jsx13(
7327
+ Box10,
7768
7328
  {
7769
7329
  sx: {
7770
7330
  width: 8,
@@ -7777,7 +7337,7 @@ var ChatAppBar = ({
7777
7337
  ] })
7778
7338
  },
7779
7339
  voice
7780
- )) : /* @__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" }) })
7781
7341
  }
7782
7342
  )
7783
7343
  ] })
@@ -7787,17 +7347,17 @@ var ChatAppBar = ({
7787
7347
  ]
7788
7348
  }
7789
7349
  ),
7790
- /* @__PURE__ */ jsx14(conversation_drawer_default, { open: drawerOpen, onClose: () => setDrawerOpen(false) }),
7791
- /* @__PURE__ */ jsx14(enhanced_mobile_conversations_modal_default, { open: modalOpen, onClose: () => setModalOpen(false) }),
7792
- /* @__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(
7793
7353
  Dialog5,
7794
7354
  {
7795
7355
  open: confirmModelChangeOpen,
7796
7356
  onClose: () => setConfirmModelChangeOpen(false),
7797
7357
  children: [
7798
- /* @__PURE__ */ jsx14(DialogTitle5, { children: "Change personality and start new conversation?" }),
7799
- /* @__PURE__ */ jsx14(DialogContent5, { children: /* @__PURE__ */ jsxs11(Box11, { display: "flex", alignItems: "center", gap: 2, mt: 1, justifyContent: "center", children: [
7800
- /* @__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(
7801
7361
  Avatar8,
7802
7362
  {
7803
7363
  src: pendingModelAvatar,
@@ -7805,15 +7365,15 @@ var ChatAppBar = ({
7805
7365
  sx: { width: 40, height: 40, filter: "brightness(1.7)" }
7806
7366
  }
7807
7367
  ),
7808
- /* @__PURE__ */ jsxs11(Typography8, { variant: "body2", children: [
7368
+ /* @__PURE__ */ jsxs10(Typography8, { variant: "body2", children: [
7809
7369
  "Your current conversation will be saved, and a new one will begin with ",
7810
- /* @__PURE__ */ jsx14("strong", { children: pendingModel }),
7370
+ /* @__PURE__ */ jsx13("strong", { children: pendingModel }),
7811
7371
  "."
7812
7372
  ] })
7813
7373
  ] }) }),
7814
- /* @__PURE__ */ jsxs11(DialogActions5, { children: [
7815
- /* @__PURE__ */ jsx14(Button6, { onClick: () => setConfirmModelChangeOpen(false), children: "Cancel" }),
7816
- /* @__PURE__ */ jsx14(
7374
+ /* @__PURE__ */ jsxs10(DialogActions5, { children: [
7375
+ /* @__PURE__ */ jsx13(Button6, { onClick: () => setConfirmModelChangeOpen(false), children: "Cancel" }),
7376
+ /* @__PURE__ */ jsx13(
7817
7377
  Button6,
7818
7378
  {
7819
7379
  onClick: () => {
@@ -7824,9 +7384,15 @@ var ChatAppBar = ({
7824
7384
  (async () => {
7825
7385
  try {
7826
7386
  const storeConfigs = [{ name: "config", keyPath: "id" }];
7827
- const current = await indexedDBService_default.get("banditConfig", 1, "config", "main", storeConfigs);
7387
+ const current = await indexedDBService_default.get(
7388
+ "banditConfig",
7389
+ 1,
7390
+ "config",
7391
+ "main",
7392
+ storeConfigs
7393
+ );
7828
7394
  const updated = {
7829
- ...current,
7395
+ ...current ?? {},
7830
7396
  id: "main",
7831
7397
  model: {
7832
7398
  ...current?.model || {},
@@ -7910,35 +7476,35 @@ Respond with just the title and nothing else.
7910
7476
  };
7911
7477
 
7912
7478
  // src/chat/query-suggestion-picker.tsx
7913
- import { useEffect as useEffect13, useRef as useRef12, useState as useState14 } from "react";
7914
- import { Box as Box12, useMediaQuery as useMediaQuery6 } from "@mui/material";
7915
- import { useTheme as useTheme13, alpha as alpha8 } from "@mui/material/styles";
7916
- import ReactMarkdown2 from "react-markdown";
7917
- import remarkGfm2 from "remark-gfm";
7918
- import rehypeRaw2 from "rehype-raw";
7919
- 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";
7920
7486
  var markdownComponents = {
7921
- p: ({ node, ...props }) => /* @__PURE__ */ jsx15("span", { ...props }),
7922
- 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 }),
7923
7489
  code: ({ node, children, ...props }) => {
7924
7490
  const { inline, ...rest } = props;
7925
- 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 });
7926
7492
  }
7927
7493
  };
7928
7494
  var QuerySuggestionPicker = ({
7929
7495
  onSend,
7930
7496
  inputHeight
7931
7497
  }) => {
7932
- const hasGenerated = useRef12(false);
7933
- const [hasSentPrompt, setHasSentPrompt] = useState14(false);
7934
- const [examplePrompts, setExamplePrompts] = useState14([]);
7935
- const [visiblePrompts, setVisiblePrompts] = useState14([]);
7936
- const scrollRef = useRef12(null);
7937
- 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();
7938
7504
  const isMobile = useMediaQuery6((theme2) => theme2.breakpoints.down("sm"));
7939
7505
  const { background, text, border, hoverBackground, hoverBorder } = theme.palette.chat.suggestion;
7940
7506
  const { getCurrentModel, isLoading } = useModelStore();
7941
- useEffect13(() => {
7507
+ useEffect12(() => {
7942
7508
  if (hasGenerated.current || isLoading) return;
7943
7509
  hasGenerated.current = true;
7944
7510
  const currentModel = getCurrentModel();
@@ -7965,12 +7531,12 @@ var QuerySuggestionPicker = ({
7965
7531
  hasGenerated.current = false;
7966
7532
  });
7967
7533
  }, [getCurrentModel, isLoading]);
7968
- useEffect13(() => {
7534
+ useEffect12(() => {
7969
7535
  if (!isLoading) {
7970
7536
  hasGenerated.current = false;
7971
7537
  }
7972
7538
  }, [isLoading]);
7973
- useEffect13(() => {
7539
+ useEffect12(() => {
7974
7540
  if (hasSentPrompt || examplePrompts.length === 0) return;
7975
7541
  const interval = setInterval(() => {
7976
7542
  setExamplePrompts((prev) => {
@@ -7989,8 +7555,8 @@ var QuerySuggestionPicker = ({
7989
7555
  return () => clearInterval(interval);
7990
7556
  }, [hasSentPrompt, examplePrompts.length]);
7991
7557
  const displayPrompts = isMobile ? visiblePrompts.slice(0, Math.min(visiblePrompts.length, 6)) : visiblePrompts;
7992
- return displayPrompts.length > 0 && /* @__PURE__ */ jsx15(Fragment9, { children: /* @__PURE__ */ jsx15(
7993
- Box12,
7558
+ return displayPrompts.length > 0 && /* @__PURE__ */ jsx14(Fragment9, { children: /* @__PURE__ */ jsx14(
7559
+ Box11,
7994
7560
  {
7995
7561
  ref: scrollRef,
7996
7562
  sx: {
@@ -8006,8 +7572,8 @@ var QuerySuggestionPicker = ({
8006
7572
  pb: isMobile ? 0.4 : 0,
8007
7573
  "&::-webkit-scrollbar": { display: "none" }
8008
7574
  },
8009
- children: displayPrompts.map((prompt, i) => /* @__PURE__ */ jsx15(
8010
- Box12,
7575
+ children: displayPrompts.map((prompt, i) => /* @__PURE__ */ jsx14(
7576
+ Box11,
8011
7577
  {
8012
7578
  sx: {
8013
7579
  px: isMobile ? 1.4 : 2,
@@ -8023,7 +7589,7 @@ var QuerySuggestionPicker = ({
8023
7589
  color: text,
8024
7590
  userSelect: "none",
8025
7591
  cursor: "pointer",
8026
- border: `1px solid ${border || alpha8(text, 0.12)}`,
7592
+ border: `1px solid ${border || alpha7(text, 0.12)}`,
8027
7593
  boxShadow: theme.palette.mode === "dark" ? "0 4px 18px rgba(0,0,0,0.25)" : "0 6px 20px rgba(15,23,42,0.12)",
8028
7594
  scrollSnapAlign: isMobile ? "start" : "none",
8029
7595
  transition: "transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease",
@@ -8041,8 +7607,8 @@ var QuerySuggestionPicker = ({
8041
7607
  onSend(prompt, []);
8042
7608
  setHasSentPrompt(true);
8043
7609
  },
8044
- children: /* @__PURE__ */ jsx15(
8045
- Box12,
7610
+ children: /* @__PURE__ */ jsx14(
7611
+ Box11,
8046
7612
  {
8047
7613
  sx: {
8048
7614
  flex: 1,
@@ -8054,23 +7620,23 @@ var QuerySuggestionPicker = ({
8054
7620
  borderRadius: 4,
8055
7621
  fontSize: "0.92em",
8056
7622
  fontFamily: "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace",
8057
- backgroundColor: theme.palette.mode === "dark" ? alpha8(theme.palette.common.white, 0.06) : alpha8(theme.palette.text.primary, 0.06),
8058
- 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)}`,
8059
7625
  padding: "0.15em 0.35em"
8060
7626
  },
8061
7627
  "& mark": {
8062
7628
  display: "inline-block",
8063
- 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),
8064
7630
  color: theme.palette.mode === "dark" ? theme.palette.common.white : theme.palette.text.primary,
8065
7631
  borderRadius: 4,
8066
7632
  padding: "0.1em 0.25em"
8067
7633
  }
8068
7634
  },
8069
- children: /* @__PURE__ */ jsx15(
8070
- ReactMarkdown2,
7635
+ children: /* @__PURE__ */ jsx14(
7636
+ ReactMarkdown,
8071
7637
  {
8072
- remarkPlugins: [remarkGfm2],
8073
- rehypePlugins: [rehypeRaw2],
7638
+ remarkPlugins: [remarkGfm],
7639
+ rehypePlugins: [rehypeRaw],
8074
7640
  components: markdownComponents,
8075
7641
  children: prompt
8076
7642
  }
@@ -8085,18 +7651,18 @@ var QuerySuggestionPicker = ({
8085
7651
  };
8086
7652
 
8087
7653
  // ../../src/pages/under-review.tsx
8088
- 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";
8089
7655
  import { useNavigate as useNavigate2 } from "react-router-dom";
8090
- import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
7656
+ import { jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
8091
7657
  var UnderReview = () => {
8092
- const theme = useTheme14();
7658
+ const theme = useTheme13();
8093
7659
  const navigate = useNavigate2();
8094
7660
  const handleSneakyLogout = () => {
8095
7661
  localStorage.removeItem("authToken");
8096
7662
  navigate("/login");
8097
7663
  };
8098
- return /* @__PURE__ */ jsxs12(
8099
- Box13,
7664
+ return /* @__PURE__ */ jsxs11(
7665
+ Box12,
8100
7666
  {
8101
7667
  sx: {
8102
7668
  minHeight: "100vh",
@@ -8111,8 +7677,8 @@ var UnderReview = () => {
8111
7677
  position: "relative"
8112
7678
  },
8113
7679
  children: [
8114
- /* @__PURE__ */ jsx16(
8115
- Box13,
7680
+ /* @__PURE__ */ jsx15(
7681
+ Box12,
8116
7682
  {
8117
7683
  onClick: handleSneakyLogout,
8118
7684
  sx: {
@@ -8137,13 +7703,13 @@ var UnderReview = () => {
8137
7703
  title: "Reset session"
8138
7704
  }
8139
7705
  ),
8140
- /* @__PURE__ */ jsx16(Typography9, { variant: "h4", sx: { mb: 2, fontWeight: 700, color: theme.palette.error.main }, children: "Under Review" }),
8141
- /* @__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: [
8142
7708
  "Your request to use our services is currently being reviewed.",
8143
- /* @__PURE__ */ jsx16("br", {}),
7709
+ /* @__PURE__ */ jsx15("br", {}),
8144
7710
  "For more info, please contact ",
8145
7711
  " ",
8146
- /* @__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" })
8147
7713
  ] })
8148
7714
  ]
8149
7715
  }
@@ -8152,16 +7718,16 @@ var UnderReview = () => {
8152
7718
  var under_review_default = UnderReview;
8153
7719
 
8154
7720
  // src/components/ConnectionStatus.tsx
8155
- 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";
8156
7722
  import WifiIcon from "@mui/icons-material/Wifi";
8157
7723
  import WifiOffIcon from "@mui/icons-material/WifiOff";
8158
7724
  import SignalWifi2BarIcon from "@mui/icons-material/SignalWifi2Bar";
8159
- import { jsx as jsx17 } from "react/jsx-runtime";
7725
+ import { jsx as jsx16 } from "react/jsx-runtime";
8160
7726
  var ConnectionStatus = ({
8161
7727
  showWhenGood = false,
8162
7728
  position = "top"
8163
7729
  }) => {
8164
- const theme = useTheme15();
7730
+ const theme = useTheme14();
8165
7731
  const { isOnline, connectionQuality, isSlowConnection } = useNetworkStatus();
8166
7732
  if (connectionQuality === "fast" && !showWhenGood) {
8167
7733
  return null;
@@ -8170,28 +7736,28 @@ var ConnectionStatus = ({
8170
7736
  switch (connectionQuality) {
8171
7737
  case "offline":
8172
7738
  return {
8173
- icon: /* @__PURE__ */ jsx17(WifiOffIcon, { sx: { fontSize: 16 } }),
7739
+ icon: /* @__PURE__ */ jsx16(WifiOffIcon, { sx: { fontSize: 16 } }),
8174
7740
  label: "Offline",
8175
7741
  color: "error",
8176
7742
  severity: "high"
8177
7743
  };
8178
7744
  case "slow":
8179
7745
  return {
8180
- icon: /* @__PURE__ */ jsx17(SignalWifi2BarIcon, { sx: { fontSize: 16 } }),
7746
+ icon: /* @__PURE__ */ jsx16(SignalWifi2BarIcon, { sx: { fontSize: 16 } }),
8181
7747
  label: "Slow connection",
8182
7748
  color: "warning",
8183
7749
  severity: "medium"
8184
7750
  };
8185
7751
  case "fast":
8186
7752
  return {
8187
- icon: /* @__PURE__ */ jsx17(WifiIcon, { sx: { fontSize: 16 } }),
7753
+ icon: /* @__PURE__ */ jsx16(WifiIcon, { sx: { fontSize: 16 } }),
8188
7754
  label: "Connected",
8189
7755
  color: "success",
8190
7756
  severity: "low"
8191
7757
  };
8192
7758
  default:
8193
7759
  return {
8194
- icon: /* @__PURE__ */ jsx17(WifiIcon, { sx: { fontSize: 16 } }),
7760
+ icon: /* @__PURE__ */ jsx16(WifiIcon, { sx: { fontSize: 16 } }),
8195
7761
  label: "Unknown",
8196
7762
  color: "default",
8197
7763
  severity: "low"
@@ -8199,8 +7765,8 @@ var ConnectionStatus = ({
8199
7765
  }
8200
7766
  };
8201
7767
  const config = getStatusConfig();
8202
- return /* @__PURE__ */ jsx17(
8203
- Box14,
7768
+ return /* @__PURE__ */ jsx16(
7769
+ Box13,
8204
7770
  {
8205
7771
  sx: {
8206
7772
  position: "fixed",
@@ -8215,7 +7781,7 @@ var ConnectionStatus = ({
8215
7781
  "100%": { opacity: 1 }
8216
7782
  }
8217
7783
  },
8218
- children: /* @__PURE__ */ jsx17(
7784
+ children: /* @__PURE__ */ jsx16(
8219
7785
  Chip4,
8220
7786
  {
8221
7787
  icon: config.icon,
@@ -8239,7 +7805,7 @@ var ConnectionStatus = ({
8239
7805
  };
8240
7806
 
8241
7807
  // src/hooks/useVoiceMode.ts
8242
- import { useEffect as useEffect14, useRef as useRef13 } from "react";
7808
+ import { useEffect as useEffect13, useRef as useRef12 } from "react";
8243
7809
  var RMS_BASELINE = 128;
8244
7810
  var RMS_NORMALIZER = 128;
8245
7811
  var computeRms = (data) => {
@@ -8256,11 +7822,11 @@ var useVoiceMode = (config) => {
8256
7822
  const setError = useVoiceModeStore((state) => state.setError);
8257
7823
  const resetTransientState = useVoiceModeStore((state) => state.resetTransientState);
8258
7824
  const setLastTranscript = useVoiceModeStore((state) => state.setLastTranscript);
8259
- const configRef = useRef13(config);
8260
- useEffect14(() => {
7825
+ const configRef = useRef12(config);
7826
+ useEffect13(() => {
8261
7827
  configRef.current = config;
8262
7828
  }, [config]);
8263
- useEffect14(() => {
7829
+ useEffect13(() => {
8264
7830
  if (!enabled) {
8265
7831
  return () => void 0;
8266
7832
  }
@@ -8487,7 +8053,7 @@ var useVoiceMode = (config) => {
8487
8053
  };
8488
8054
 
8489
8055
  // src/chat/chat.tsx
8490
- import { jsx as jsx18, jsxs as jsxs13 } from "react/jsx-runtime";
8056
+ import { jsx as jsx17, jsxs as jsxs12 } from "react/jsx-runtime";
8491
8057
  var ChatContent = () => {
8492
8058
  const packageSettings = usePackageSettingsStore((state) => state.settings);
8493
8059
  const featureFlag = useFeatureFlag();
@@ -8495,11 +8061,37 @@ var ChatContent = () => {
8495
8061
  const ossMode = isOSSMode() || !packageSettings?.featureFlags?.subscriptionType;
8496
8062
  const playgroundBypassAccess = packageSettings?.playgroundBypassAuth || typeof window !== "undefined" && window.location.pathname.includes("/playground");
8497
8063
  const notificationService = useNotificationService();
8498
- const [selectedTheme, setSelectedTheme] = useState15(null);
8499
- const [themeLoading, setThemeLoading] = useState15(true);
8064
+ const [selectedTheme, setSelectedTheme] = useState14(null);
8065
+ const [themeLoading, setThemeLoading] = useState14(true);
8500
8066
  const token = authenticationService.getToken();
8501
8067
  const claims = token ? authenticationService.parseJwtClaims(token) : null;
8502
- 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]);
8503
8095
  const {
8504
8096
  inputValue,
8505
8097
  setInputValue,
@@ -8521,9 +8113,9 @@ var ChatContent = () => {
8521
8113
  initialized
8522
8114
  } = useVoiceStore();
8523
8115
  const isVoiceModeEnabled = useVoiceModeStore((state) => state.enabled);
8524
- const previousVoiceModeEnabledRef = useRef14(isVoiceModeEnabled);
8525
- const historyRef = useRef14(history);
8526
- useEffect15(() => {
8116
+ const previousVoiceModeEnabledRef = useRef13(isVoiceModeEnabled);
8117
+ const historyRef = useRef13(history);
8118
+ useEffect14(() => {
8527
8119
  historyRef.current = history;
8528
8120
  }, [history]);
8529
8121
  const {
@@ -8531,7 +8123,7 @@ var ChatContent = () => {
8531
8123
  stop: ttsStop,
8532
8124
  isAvailable: isTTSAvailable
8533
8125
  } = useTTS();
8534
- useEffect15(() => {
8126
+ useEffect14(() => {
8535
8127
  const timer = setTimeout(() => {
8536
8128
  const isAuthenticated = authenticationService.isAuthenticated();
8537
8129
  if (!initialized || availableVoices.length === 0) {
@@ -8545,7 +8137,7 @@ var ChatContent = () => {
8545
8137
  }, 500);
8546
8138
  return () => clearTimeout(timer);
8547
8139
  }, [initialized, availableVoices.length, loadVoicesFromAPI, token]);
8548
- useEffect15(() => {
8140
+ useEffect14(() => {
8549
8141
  const isAuthenticated = authenticationService.isAuthenticated();
8550
8142
  if (packageSettings?.gatewayApiUrl && availableVoices.length === 0 && !initialized) {
8551
8143
  if (token && isAuthenticated) {
@@ -8557,15 +8149,15 @@ var ChatContent = () => {
8557
8149
  }
8558
8150
  }, [packageSettings?.gatewayApiUrl, availableVoices.length, initialized, loadVoicesFromAPI, token]);
8559
8151
  const provider = useAIProviderStore((state) => state.provider);
8560
- const inputRef = useRef14(null);
8561
- const [pastedImages, setPastedImages] = useState15([]);
8562
- const inputContainerRef = useRef14(null);
8563
- const [inputHeight, setInputHeight] = useState15(80);
8564
- const [isSubmitting, setIsSubmitting] = useState15(false);
8565
- 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);
8566
8158
  const { conversations, currentId, _hasHydrated, hydrate } = useConversationStore();
8567
- const [isMobile, setIsMobile] = useState15(false);
8568
- const [drawerOpen, setDrawerOpen] = useState15(false);
8159
+ const [isMobile, setIsMobile] = useState14(false);
8160
+ const [drawerOpen, setDrawerOpen] = useState14(false);
8569
8161
  const { generateName } = useConversationNameGenerator();
8570
8162
  const { preferences } = usePreferencesStore();
8571
8163
  const { containerRef: chatContainerRef, targetRef: scrollTargetRef, scrollToBottom, getScrollState } = useAutoScroll({
@@ -8577,26 +8169,26 @@ var ChatContent = () => {
8577
8169
  const chatContainerEl = chatContainerRef.current;
8578
8170
  const scrollTargetEl = scrollTargetRef.current;
8579
8171
  const { isSlowConnection, connectionQuality, trackRequestStart, trackRequestEnd } = useNetworkStatus();
8580
- const [showScrollToBottom, setShowScrollToBottom] = useState15(false);
8581
- const [streamBuffer, setStreamBuffer] = useState15("");
8582
- const [responseStarted, setResponseStarted] = useState15(false);
8583
- 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);
8584
8176
  const initialLogoState = history.length === 0;
8585
- const [logoVisible, setLogoVisible] = useState15(initialLogoState);
8586
- const [logoShouldRender, setLogoShouldRender] = useState15(initialLogoState);
8587
- const streamingGraceUntilRef = useRef14(0);
8177
+ const [logoVisible, setLogoVisible] = useState14(initialLogoState);
8178
+ const [logoShouldRender, setLogoShouldRender] = useState14(initialLogoState);
8179
+ const streamingGraceUntilRef = useRef13(0);
8588
8180
  const GRACE_MS = 450;
8589
8181
  const GRACE_OFFSET_DESKTOP = 28;
8590
8182
  const GRACE_OFFSET_MOBILE = 20;
8591
- const followStreamRef = useRef14(true);
8592
- const lastSpokenResponseRef = useRef14(null);
8593
- const previousConversationIdRef = useRef14(null);
8594
- const logoFadeTimeoutRef = useRef14(null);
8595
- const [branding, setBranding] = useState15(null);
8596
- const [brandingLoading, setBrandingLoading] = useState15(true);
8597
- 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);
8598
8190
  const logoOnly = history.length === 0 && !brandingLoading;
8599
- useEffect15(() => {
8191
+ useEffect14(() => {
8600
8192
  const isEmptyConversation = (history?.length ?? 0) === 0;
8601
8193
  const isSending = Boolean(pendingMessage);
8602
8194
  const shouldShowLogo = isEmptyConversation && !isSending;
@@ -8626,18 +8218,18 @@ var ChatContent = () => {
8626
8218
  }, 500);
8627
8219
  }
8628
8220
  }, [history, pendingMessage]);
8629
- useEffect15(() => () => {
8221
+ useEffect14(() => () => {
8630
8222
  if (logoFadeTimeoutRef.current) {
8631
8223
  window.clearTimeout(logoFadeTimeoutRef.current);
8632
8224
  logoFadeTimeoutRef.current = null;
8633
8225
  }
8634
8226
  }, []);
8635
- useEffect15(() => {
8227
+ useEffect14(() => {
8636
8228
  if (isStreaming && streamBuffer.trim() === "") {
8637
8229
  streamingGraceUntilRef.current = Date.now() + GRACE_MS;
8638
8230
  }
8639
8231
  }, [isStreaming, streamBuffer]);
8640
- useEffect15(() => {
8232
+ useEffect14(() => {
8641
8233
  if (!isStreaming) return;
8642
8234
  const container = chatContainerRef.current;
8643
8235
  if (!container) return;
@@ -8648,13 +8240,13 @@ var ChatContent = () => {
8648
8240
  container.scrollTo({ top: targetTop, behavior: "smooth" });
8649
8241
  }
8650
8242
  }, [streamBuffer, isStreaming, isMobile, chatContainerRef]);
8651
- useEffect15(() => {
8243
+ useEffect14(() => {
8652
8244
  if (!_hasHydrated) {
8653
8245
  debugLogger.info("Chat component triggering conversation store hydration");
8654
8246
  hydrate();
8655
8247
  }
8656
8248
  }, [_hasHydrated, hydrate]);
8657
- useEffect15(() => {
8249
+ useEffect14(() => {
8658
8250
  const loadBrandingAndTheme = async () => {
8659
8251
  if (isBrandingLoadInProgressRef.current) {
8660
8252
  debugLogger.warn("Branding loading already in progress, skipping");
@@ -8841,19 +8433,19 @@ var ChatContent = () => {
8841
8433
  window.removeEventListener("bandit-theme-changed", handleThemeChange);
8842
8434
  };
8843
8435
  }, []);
8844
- useEffect15(() => {
8436
+ useEffect14(() => {
8845
8437
  if (!chatContainerEl) return;
8846
8438
  const blurInputOnScroll = () => inputRef.current?.blur();
8847
8439
  chatContainerEl.addEventListener("scroll", blurInputOnScroll);
8848
8440
  return () => chatContainerEl.removeEventListener("scroll", blurInputOnScroll);
8849
8441
  }, [chatContainerEl]);
8850
- useEffect15(() => {
8442
+ useEffect14(() => {
8851
8443
  const handleResize = () => setIsMobile(window.innerWidth <= 768);
8852
8444
  handleResize();
8853
8445
  window.addEventListener("resize", handleResize);
8854
8446
  return () => window.removeEventListener("resize", handleResize);
8855
8447
  }, []);
8856
- useEffect15(() => {
8448
+ useEffect14(() => {
8857
8449
  const setViewportHeight = () => {
8858
8450
  document.documentElement.style.setProperty(
8859
8451
  "--vh",
@@ -8864,7 +8456,7 @@ var ChatContent = () => {
8864
8456
  window.addEventListener("resize", setViewportHeight);
8865
8457
  return () => window.removeEventListener("resize", setViewportHeight);
8866
8458
  }, []);
8867
- useEffect15(() => {
8459
+ useEffect14(() => {
8868
8460
  if (!chatContainerEl) return;
8869
8461
  let rafId = null;
8870
8462
  const update = () => {
@@ -8883,7 +8475,7 @@ var ChatContent = () => {
8883
8475
  chatContainerEl.removeEventListener(SCROLL_STATE_CHANGED_EVENT, update);
8884
8476
  };
8885
8477
  }, [chatContainerEl, getScrollState]);
8886
- useEffect15(() => {
8478
+ useEffect14(() => {
8887
8479
  if (!chatContainerEl) return;
8888
8480
  let observer = null;
8889
8481
  let rafId = null;
@@ -8918,7 +8510,7 @@ var ChatContent = () => {
8918
8510
  if (observer) observer.disconnect();
8919
8511
  };
8920
8512
  }, [chatContainerEl, scrollTargetEl, scrollTargetRef, getScrollState, inputHeight, history.length]);
8921
- useEffect15(() => {
8513
+ useEffect14(() => {
8922
8514
  const isTransitioning = isStreaming || streamBuffer.trim() === "";
8923
8515
  const delay = isTransitioning ? 400 : 100;
8924
8516
  const timer = setTimeout(() => {
@@ -8961,7 +8553,7 @@ var ChatContent = () => {
8961
8553
  return () => clearTimeout(scrollTimer);
8962
8554
  }
8963
8555
  }, [history, isStreaming, scrollToBottom, getScrollState, isMobile, chatContainerRef]);
8964
- useEffect15(() => {
8556
+ useEffect14(() => {
8965
8557
  const observer = new ResizeObserver(() => {
8966
8558
  if (inputContainerRef.current)
8967
8559
  setInputHeight(inputContainerRef.current.offsetHeight);
@@ -8972,7 +8564,7 @@ var ChatContent = () => {
8972
8564
  }
8973
8565
  return () => observer.disconnect();
8974
8566
  }, []);
8975
- useEffect15(() => {
8567
+ useEffect14(() => {
8976
8568
  if (!hydrated || !_hasHydrated) return;
8977
8569
  if (currentId === null) {
8978
8570
  useAIQueryStore.setState({ history: [] });
@@ -9021,7 +8613,7 @@ var ChatContent = () => {
9021
8613
  setResponse,
9022
8614
  setComponentStatus
9023
8615
  ]);
9024
- useEffect15(() => {
8616
+ useEffect14(() => {
9025
8617
  debugLogger.info("Chat component conversation state", {
9026
8618
  hasHydrated: _hasHydrated,
9027
8619
  conversationCount: conversations.length,
@@ -9030,7 +8622,7 @@ var ChatContent = () => {
9030
8622
  storeState: "main-chat"
9031
8623
  });
9032
8624
  }, [_hasHydrated, conversations, currentId]);
9033
- useEffect15(() => {
8625
+ useEffect14(() => {
9034
8626
  if (!_hasHydrated || !chatContainerEl) return;
9035
8627
  let rafId = null;
9036
8628
  const sync = () => {
@@ -9219,7 +8811,7 @@ var ChatContent = () => {
9219
8811
  onInterrupt: handleVoiceInterrupt,
9220
8812
  onError: (message) => notificationService?.showError?.(message)
9221
8813
  });
9222
- useEffect15(() => {
8814
+ useEffect14(() => {
9223
8815
  const previouslyEnabled = previousVoiceModeEnabledRef.current;
9224
8816
  previousVoiceModeEnabledRef.current = isVoiceModeEnabled;
9225
8817
  if (!previouslyEnabled && isVoiceModeEnabled) {
@@ -9244,7 +8836,7 @@ var ChatContent = () => {
9244
8836
  }
9245
8837
  }
9246
8838
  }, [isVoiceModeEnabled, ttsStop]);
9247
- useEffect15(() => {
8839
+ useEffect14(() => {
9248
8840
  if (!isVoiceModeEnabled || !isStreaming) {
9249
8841
  return;
9250
8842
  }
@@ -9264,7 +8856,7 @@ var ChatContent = () => {
9264
8856
  }
9265
8857
  lastSpokenResponseRef.current = null;
9266
8858
  }, [isStreaming, isVoiceModeEnabled, ttsStop]);
9267
- useEffect15(() => {
8859
+ useEffect14(() => {
9268
8860
  if (!isVoiceModeEnabled) {
9269
8861
  lastSpokenResponseRef.current = null;
9270
8862
  return;
@@ -9346,15 +8938,15 @@ var ChatContent = () => {
9346
8938
  if (!hydrated || brandingLoading || themeLoading) return null;
9347
8939
  const userHasAccess = playgroundBypassAccess || ossMode || claims?.roles?.includes("super-user") || claims?.roles?.includes("admin");
9348
8940
  if (!userHasAccess) {
9349
- return /* @__PURE__ */ jsxs13(ThemeProvider, { theme: banditTheme, children: [
9350
- /* @__PURE__ */ jsx18(CssBaseline, {}),
9351
- /* @__PURE__ */ jsx18(under_review_default, {})
8941
+ return /* @__PURE__ */ jsxs12(ThemeProvider, { theme: banditTheme, children: [
8942
+ /* @__PURE__ */ jsx17(CssBaseline, {}),
8943
+ /* @__PURE__ */ jsx17(under_review_default, {})
9352
8944
  ] });
9353
8945
  }
9354
- return /* @__PURE__ */ jsxs13(ThemeProvider, { theme: banditTheme, children: [
9355
- /* @__PURE__ */ jsx18(CssBaseline, {}),
9356
- /* @__PURE__ */ jsxs13(
9357
- Box15,
8946
+ return /* @__PURE__ */ jsxs12(ThemeProvider, { theme: banditTheme, children: [
8947
+ /* @__PURE__ */ jsx17(CssBaseline, {}),
8948
+ /* @__PURE__ */ jsxs12(
8949
+ Box14,
9358
8950
  {
9359
8951
  sx: (theme) => ({
9360
8952
  display: "flex",
@@ -9372,7 +8964,7 @@ var ChatContent = () => {
9372
8964
  transition: "left 0.3s ease-in-out, width 0.3s ease-in-out"
9373
8965
  }),
9374
8966
  children: [
9375
- /* @__PURE__ */ jsx18(
8967
+ /* @__PURE__ */ jsx17(
9376
8968
  chat_app_bar_default,
9377
8969
  {
9378
8970
  availableModels,
@@ -9384,8 +8976,8 @@ var ChatContent = () => {
9384
8976
  setDrawerOpen
9385
8977
  }
9386
8978
  ),
9387
- /* @__PURE__ */ jsx18(
9388
- Box15,
8979
+ /* @__PURE__ */ jsx17(
8980
+ Box14,
9389
8981
  {
9390
8982
  ref: chatContainerRef,
9391
8983
  sx: {
@@ -9405,8 +8997,8 @@ var ChatContent = () => {
9405
8997
  msOverflowStyle: "none",
9406
8998
  "&::-webkit-scrollbar": { display: "none" }
9407
8999
  },
9408
- children: /* @__PURE__ */ jsxs13(
9409
- Box15,
9000
+ children: /* @__PURE__ */ jsxs12(
9001
+ Box14,
9410
9002
  {
9411
9003
  sx: {
9412
9004
  width: "100%",
@@ -9416,9 +9008,9 @@ var ChatContent = () => {
9416
9008
  pt: 2
9417
9009
  },
9418
9010
  children: [
9419
- logoShouldRender && !brandingLoading && (branding?.logoBase64 ? /* @__PURE__ */ jsx18(custom_logo_default, { visible: logoVisible, atTop: true }) : /* @__PURE__ */ jsx18(bandit_chat_logo_default, { visible: logoVisible, atTop: true })),
9420
- /* @__PURE__ */ jsx18(
9421
- 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,
9422
9014
  {
9423
9015
  sx: {
9424
9016
  margin: "0 auto",
@@ -9427,7 +9019,7 @@ var ChatContent = () => {
9427
9019
  flexShrink: 0,
9428
9020
  px: isMobile ? 0 : 0
9429
9021
  },
9430
- children: /* @__PURE__ */ jsx18(
9022
+ children: /* @__PURE__ */ jsx17(
9431
9023
  chat_messages_default,
9432
9024
  {
9433
9025
  isStreaming,
@@ -9450,7 +9042,7 @@ var ChatContent = () => {
9450
9042
  )
9451
9043
  }
9452
9044
  ),
9453
- showScrollToBottom && /* @__PURE__ */ jsx18(
9045
+ showScrollToBottom && /* @__PURE__ */ jsx17(
9454
9046
  chat_scroll_to_bottom_button_default,
9455
9047
  {
9456
9048
  inputHeight,
@@ -9459,8 +9051,8 @@ var ChatContent = () => {
9459
9051
  onClick: handleScrollToBottomClick
9460
9052
  }
9461
9053
  ),
9462
- history.length === 0 && componentStatus !== "Loading" && !isMobile && /* @__PURE__ */ jsx18(
9463
- Box15,
9054
+ history.length === 0 && componentStatus !== "Loading" && !isMobile && /* @__PURE__ */ jsx17(
9055
+ Box14,
9464
9056
  {
9465
9057
  sx: (theme) => ({
9466
9058
  position: "absolute",
@@ -9478,8 +9070,8 @@ var ChatContent = () => {
9478
9070
  })
9479
9071
  }
9480
9072
  ),
9481
- /* @__PURE__ */ jsxs13(
9482
- Box15,
9073
+ /* @__PURE__ */ jsxs12(
9074
+ Box14,
9483
9075
  {
9484
9076
  sx: {
9485
9077
  display: "flex",
@@ -9490,9 +9082,9 @@ var ChatContent = () => {
9490
9082
  maxWidth: "768px"
9491
9083
  },
9492
9084
  children: [
9493
- /* @__PURE__ */ jsx18(Box15, { sx: { flex: "1 1 auto" } }),
9494
- history.length === 0 && componentStatus !== "Loading" && !pendingMessage && preferences.chatSuggestionsEnabled && /* @__PURE__ */ jsx18(Box15, { sx: { marginBottom: "20px" }, children: /* @__PURE__ */ jsx18(QuerySuggestionPicker, { onSend: handleSend, inputHeight }) }),
9495
- /* @__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(
9496
9088
  chat_input_default,
9497
9089
  {
9498
9090
  inputValue,
@@ -9519,7 +9111,7 @@ var ChatContent = () => {
9519
9111
  ]
9520
9112
  }
9521
9113
  ),
9522
- preferences.feedbackEnabled && !isMobile && /* @__PURE__ */ jsx18(
9114
+ preferences.feedbackEnabled && !isMobile && /* @__PURE__ */ jsx17(
9523
9115
  FeedbackButton,
9524
9116
  {
9525
9117
  fullScreen: false,
@@ -9532,7 +9124,7 @@ var ChatContent = () => {
9532
9124
  }
9533
9125
  }
9534
9126
  ),
9535
- /* @__PURE__ */ jsx18(ConnectionStatus, { position: "top", showWhenGood: false })
9127
+ /* @__PURE__ */ jsx17(ConnectionStatus, { position: "top", showWhenGood: false })
9536
9128
  ]
9537
9129
  }
9538
9130
  )
@@ -9561,13 +9153,13 @@ var Chat = () => {
9561
9153
  });
9562
9154
  if (!allowUnauthenticated && !bypassAuth && !authenticationService.isAuthenticated()) {
9563
9155
  debugLogger.debug("User is not authenticated, redirecting to login");
9564
- return /* @__PURE__ */ jsx18(Navigate, { to: "/login", replace: true });
9156
+ return /* @__PURE__ */ jsx17(Navigate, { to: "/login", replace: true });
9565
9157
  }
9566
- return /* @__PURE__ */ jsx18(ChatContent, {});
9158
+ return /* @__PURE__ */ jsx17(ChatContent, {});
9567
9159
  };
9568
9160
  var chat_default = Chat;
9569
9161
 
9570
9162
  export {
9571
9163
  chat_default
9572
9164
  };
9573
- //# sourceMappingURL=chunk-QV4ELNLP.mjs.map
9165
+ //# sourceMappingURL=chunk-Q2N7CCZI.mjs.map