@burtson-labs/bandit-engine 2.0.118 → 2.0.119

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.
@@ -87,7 +87,7 @@ import {
87
87
  } from "./chunk-KCI46M23.mjs";
88
88
 
89
89
  // src/chat/chat.tsx
90
- import { useCallback as useCallback6, useEffect as useEffect15, useLayoutEffect, useMemo as useMemo4, useRef as useRef13, useState as useState17 } from "react";
90
+ import { useCallback as useCallback6, useEffect as useEffect15, useLayoutEffect, useMemo as useMemo4, useRef as useRef14, useState as useState17 } from "react";
91
91
 
92
92
  // src/chat/custom-logo.tsx
93
93
  import React, { useEffect } from "react";
@@ -174,7 +174,7 @@ var Logo = ({ visible, atTop = false }) => {
174
174
  var custom_logo_default = Logo;
175
175
 
176
176
  // src/chat/chat.tsx
177
- import { Box as Box17, ThemeProvider, CssBaseline, CircularProgress as CircularProgress4, Typography as Typography11 } from "@mui/material";
177
+ import { Box as Box18, ThemeProvider, CssBaseline, CircularProgress as CircularProgress4, Typography as Typography12 } from "@mui/material";
178
178
  import { createTheme } from "@mui/material/styles";
179
179
 
180
180
  // src/chat/canvas-panel.tsx
@@ -1856,8 +1856,156 @@ var AskUserCard = () => {
1856
1856
  };
1857
1857
  var ask_user_card_default = AskUserCard;
1858
1858
 
1859
+ // src/chat/rate-limit-prompt.tsx
1860
+ import { useRef as useRef3 } from "react";
1861
+ import { Box as Box7, Button as Button2, IconButton as IconButton5, Typography as Typography3, useTheme as useTheme6 } from "@mui/material";
1862
+ import { useNavigate } from "react-router-dom";
1863
+
1864
+ // src/store/rateLimitStore.ts
1865
+ import { create as create3 } from "zustand";
1866
+ var useRateLimitStore = create3((set) => ({
1867
+ prompt: null,
1868
+ show: (prompt) => set({ prompt }),
1869
+ dismiss: () => set({ prompt: null })
1870
+ }));
1871
+ var parseRateLimitError = (error) => {
1872
+ if (!error || typeof error !== "object") {
1873
+ return null;
1874
+ }
1875
+ const response = error.response;
1876
+ const status = response?.status;
1877
+ const data = response?.data;
1878
+ const payload = data && typeof data === "object" ? data : {};
1879
+ const isRateLimited = status === 429 || payload.error === "rate_limited" || payload.upgrade === true;
1880
+ if (!isRateLimited) {
1881
+ return null;
1882
+ }
1883
+ const scope = payload.scope === "weekly" ? "weekly" : "session";
1884
+ const message = typeof payload.message === "string" ? payload.message : void 0;
1885
+ const haystack = `${message ?? ""}`.toLowerCase();
1886
+ const frontier = /frontier|premium|cloud|pro model/.test(haystack);
1887
+ return { scope, message, frontier };
1888
+ };
1889
+
1890
+ // src/chat/rate-limit-prompt.tsx
1891
+ import { jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
1892
+ var RateLimitPrompt = () => {
1893
+ const theme = useTheme6();
1894
+ const prompt = useRateLimitStore((s) => s.prompt);
1895
+ const dismiss = useRateLimitStore((s) => s.dismiss);
1896
+ const hasLoggedRouterWarningRef = useRef3(false);
1897
+ let navigate = null;
1898
+ try {
1899
+ navigate = useNavigate();
1900
+ } catch (error) {
1901
+ if (!hasLoggedRouterWarningRef.current) {
1902
+ debugLogger.warn("RateLimitPrompt: Navigation not available (missing Router context)", { error });
1903
+ hasLoggedRouterWarningRef.current = true;
1904
+ }
1905
+ navigate = null;
1906
+ }
1907
+ const safeNavigate = (to) => {
1908
+ if (navigate) {
1909
+ navigate(to);
1910
+ } else if (typeof window !== "undefined") {
1911
+ window.location.href = to;
1912
+ }
1913
+ };
1914
+ if (!prompt) {
1915
+ return null;
1916
+ }
1917
+ const { scope, frontier } = prompt;
1918
+ const title = scope === "weekly" ? "You've reached your weekly limit" : "You've hit your session limit";
1919
+ const body = (() => {
1920
+ if (frontier) {
1921
+ return scope === "weekly" ? "You've used your weekly allowance on premium engines. Upgrade to keep chatting on the most capable models." : "You've hit your session limit on premium engines. It resets soon \u2014 or upgrade for higher limits and uninterrupted access.";
1922
+ }
1923
+ return scope === "weekly" ? "Your weekly chat allowance is used up. Upgrade to keep going without waiting." : "It resets shortly. Upgrade for higher limits and keep the conversation flowing.";
1924
+ })();
1925
+ return /* @__PURE__ */ jsxs7(
1926
+ Box7,
1927
+ {
1928
+ role: "status",
1929
+ sx: {
1930
+ mb: 1.5,
1931
+ px: 2,
1932
+ py: 1.5,
1933
+ borderRadius: 2,
1934
+ display: "flex",
1935
+ alignItems: "flex-start",
1936
+ gap: 1.5,
1937
+ border: `1px solid ${theme.palette.primary.main}33`,
1938
+ bgcolor: theme.palette.primary.main + "0F",
1939
+ backdropFilter: "blur(8px)"
1940
+ },
1941
+ children: [
1942
+ /* @__PURE__ */ jsx10(
1943
+ Box7,
1944
+ {
1945
+ sx: {
1946
+ mt: 0.25,
1947
+ display: "flex",
1948
+ alignItems: "center",
1949
+ justifyContent: "center",
1950
+ width: 32,
1951
+ height: 32,
1952
+ flexShrink: 0,
1953
+ borderRadius: "50%",
1954
+ bgcolor: theme.palette.primary.main + "22",
1955
+ color: theme.palette.primary.main
1956
+ },
1957
+ children: /* @__PURE__ */ jsx10(AutoAwesomeIcon, { fontSize: "small" })
1958
+ }
1959
+ ),
1960
+ /* @__PURE__ */ jsxs7(Box7, { sx: { flex: 1, minWidth: 0 }, children: [
1961
+ /* @__PURE__ */ jsx10(Typography3, { variant: "subtitle2", sx: { fontWeight: 600, color: theme.palette.text.primary }, children: title }),
1962
+ /* @__PURE__ */ jsx10(Typography3, { variant: "body2", sx: { color: theme.palette.text.secondary, mt: 0.25 }, children: body }),
1963
+ /* @__PURE__ */ jsxs7(Box7, { sx: { display: "flex", gap: 1, mt: 1, flexWrap: "wrap" }, children: [
1964
+ /* @__PURE__ */ jsx10(
1965
+ Button2,
1966
+ {
1967
+ size: "small",
1968
+ variant: "contained",
1969
+ disableElevation: true,
1970
+ startIcon: /* @__PURE__ */ jsx10(AutoAwesomeIcon, { sx: { fontSize: "0.9rem" } }),
1971
+ onClick: () => {
1972
+ dismiss();
1973
+ safeNavigate("/plans");
1974
+ },
1975
+ sx: { textTransform: "none", fontWeight: 600, borderRadius: 2 },
1976
+ children: "Upgrade to keep chatting"
1977
+ }
1978
+ ),
1979
+ /* @__PURE__ */ jsx10(
1980
+ Button2,
1981
+ {
1982
+ size: "small",
1983
+ variant: "text",
1984
+ onClick: () => dismiss(),
1985
+ sx: { textTransform: "none", color: theme.palette.text.secondary },
1986
+ children: scope === "weekly" ? "Maybe later" : "I'll wait"
1987
+ }
1988
+ )
1989
+ ] })
1990
+ ] }),
1991
+ /* @__PURE__ */ jsx10(
1992
+ IconButton5,
1993
+ {
1994
+ size: "small",
1995
+ "aria-label": "Dismiss upgrade prompt",
1996
+ onClick: () => dismiss(),
1997
+ sx: { color: theme.palette.text.secondary, mt: -0.5, mr: -0.5 },
1998
+ children: /* @__PURE__ */ jsx10(CloseIcon, { fontSize: "small" })
1999
+ }
2000
+ )
2001
+ ]
2002
+ }
2003
+ );
2004
+ };
2005
+ var rate_limit_prompt_default = RateLimitPrompt;
2006
+
1859
2007
  // src/chat/hooks/useAIProvider.tsx
1860
- import { useCallback, useRef as useRef3 } from "react";
2008
+ import { useCallback, useRef as useRef4 } from "react";
1861
2009
 
1862
2010
  // src/services/telemetry/otlpExporter.ts
1863
2011
  function redactSecretsString(s) {
@@ -2167,7 +2315,7 @@ function telemetryEndTurn(outcome) {
2167
2315
  }
2168
2316
 
2169
2317
  // src/store/engineStore.ts
2170
- import { create as create3 } from "zustand";
2318
+ import { create as create4 } from "zustand";
2171
2319
  var STORAGE_KEY = "bandit.selectedEngine";
2172
2320
  var readStored = () => {
2173
2321
  try {
@@ -2176,7 +2324,7 @@ var readStored = () => {
2176
2324
  return null;
2177
2325
  }
2178
2326
  };
2179
- var useEngineStore = create3((set, get) => ({
2327
+ var useEngineStore = create4((set, get) => ({
2180
2328
  selectedEngine: readStored(),
2181
2329
  engines: [],
2182
2330
  loaded: false,
@@ -3222,21 +3370,21 @@ var useAIProvider = ({
3222
3370
  inputRef,
3223
3371
  onError
3224
3372
  }) => {
3225
- const currentSubRef = useRef3(null);
3226
- const lastPartialRef = useRef3({
3373
+ const currentSubRef = useRef4(null);
3374
+ const lastPartialRef = useRef4({
3227
3375
  text: "",
3228
3376
  images: [],
3229
3377
  usedDocs: [],
3230
3378
  question: ""
3231
3379
  });
3232
- const flushTimerRef = useRef3(null);
3380
+ const flushTimerRef = useRef4(null);
3233
3381
  const { provider } = useAIProviderStore.getState();
3234
3382
  const { preferences } = usePreferencesStore.getState();
3235
3383
  const { docs } = useKnowledgeStore.getState();
3236
3384
  const { analyzeMood, moodTokenBoost } = useMoodEngine();
3237
3385
  const { runMemoryScan } = useMemoryEnhancer();
3238
3386
  const { isVectorEnabled, searchMemories, searchDocuments, getUserMemories } = useVectorStore();
3239
- const pinnedVectorCacheRef = useRef3({
3387
+ const pinnedVectorCacheRef = useRef4({
3240
3388
  fetchedAt: 0,
3241
3389
  memories: []
3242
3390
  });
@@ -3282,6 +3430,7 @@ var useAIProvider = ({
3282
3430
  setResponse("");
3283
3431
  setStreamBuffer("");
3284
3432
  clearFlushTimer();
3433
+ useRateLimitStore.getState().dismiss();
3285
3434
  const imageList = Array.isArray(images) ? [...images] : [];
3286
3435
  const conversationStoreState = useConversationStore.getState();
3287
3436
  const { addToCurrent, replaceLastAnswer, conversations, currentId } = conversationStoreState;
@@ -3798,6 +3947,29 @@ ${protocol}`;
3798
3947
  overrideComponentStatus("Idle");
3799
3948
  setIsSubmitting(false);
3800
3949
  setIsStreaming(false);
3950
+ const rateLimit = parseRateLimitError(err);
3951
+ if (rateLimit) {
3952
+ debugLogger.info("Chat hit usage limit (429) \u2014 showing upgrade prompt", {
3953
+ scope: rateLimit.scope,
3954
+ frontier: rateLimit.frontier
3955
+ });
3956
+ const { replaceLastAnswer: replaceLastAnswer2 } = useConversationStore.getState();
3957
+ replaceLastAnswer2(
3958
+ rateLimit.scope === "weekly" ? "_You've reached your weekly limit. Upgrade to keep chatting._" : "_You've hit your session limit. It resets soon \u2014 or upgrade for higher limits._",
3959
+ lastPartialRef.current.images,
3960
+ false,
3961
+ lastPartialRef.current.usedDocs,
3962
+ true
3963
+ );
3964
+ setResponse("");
3965
+ setStreamBuffer("");
3966
+ setIsThinking?.(false);
3967
+ setPendingMessage(null);
3968
+ setLogoVisible(false);
3969
+ useRateLimitStore.getState().show(rateLimit);
3970
+ telemetryEndTurn({ error: "rate_limited" });
3971
+ return;
3972
+ }
3801
3973
  flushNow();
3802
3974
  let partial = lastPartialRef.current.text || latestDisplayMessage || fullMessage;
3803
3975
  if (partial && !partial.trim().endsWith("\u2026") && !partial.trim().endsWith("...")) {
@@ -4389,7 +4561,7 @@ ${inlineImageBlocks.join("\n\n")}` : "");
4389
4561
  };
4390
4562
 
4391
4563
  // src/hooks/useAutoScroll.ts
4392
- import { useRef as useRef4, useEffect as useEffect5, useCallback as useCallback2 } from "react";
4564
+ import { useRef as useRef5, useEffect as useEffect5, useCallback as useCallback2 } from "react";
4393
4565
  var SCROLL_STATE_CHANGED_EVENT = "scrollStateChanged";
4394
4566
  var useAutoScroll = (options = {}) => {
4395
4567
  const {
@@ -4398,9 +4570,9 @@ var useAutoScroll = (options = {}) => {
4398
4570
  enabled = true,
4399
4571
  isMobile = false
4400
4572
  } = options;
4401
- const containerRef = useRef4(null);
4402
- const targetRef = useRef4(null);
4403
- const shouldAutoScrollRef = useRef4(true);
4573
+ const containerRef = useRef5(null);
4574
+ const targetRef = useRef5(null);
4575
+ const shouldAutoScrollRef = useRef5(true);
4404
4576
  const isNearBottom = useCallback2(() => {
4405
4577
  const container = containerRef.current;
4406
4578
  if (!container) return true;
@@ -4605,31 +4777,31 @@ var useNetworkStatus = () => {
4605
4777
 
4606
4778
  // src/chat/chat-app-bar.tsx
4607
4779
  import { Avatar as Avatar8 } from "@mui/material";
4608
- import { useEffect as useEffect12, useRef as useRef10, useState as useState15 } from "react";
4780
+ import { useEffect as useEffect12, useRef as useRef11, useState as useState15 } from "react";
4609
4781
  import {
4610
- Box as Box13,
4611
- IconButton as IconButton10,
4782
+ Box as Box14,
4783
+ IconButton as IconButton11,
4612
4784
  Menu as Menu5,
4613
4785
  MenuItem as MenuItem5,
4614
4786
  Tooltip as Tooltip6,
4615
4787
  useMediaQuery as useMediaQuery5,
4616
- useTheme as useTheme12,
4788
+ useTheme as useTheme13,
4617
4789
  Dialog as Dialog6,
4618
4790
  DialogTitle as DialogTitle5,
4619
4791
  DialogContent as DialogContent5,
4620
4792
  DialogActions as DialogActions5,
4621
- Typography as Typography9,
4622
- Button as Button7
4793
+ Typography as Typography10,
4794
+ Button as Button8
4623
4795
  } from "@mui/material";
4624
- import { useNavigate } from "react-router-dom";
4796
+ import { useNavigate as useNavigate2 } from "react-router-dom";
4625
4797
 
4626
4798
  // src/chat/conversation-drawer.tsx
4627
- import { useState as useState13, useMemo as useMemo2, useEffect as useEffect10, useRef as useRef8, useCallback as useCallback4 } from "react";
4799
+ import { useState as useState13, useMemo as useMemo2, useEffect as useEffect10, useRef as useRef9, useCallback as useCallback4 } from "react";
4628
4800
  import {
4629
4801
  Drawer,
4630
- Box as Box11,
4631
- Typography as Typography7,
4632
- IconButton as IconButton8,
4802
+ Box as Box12,
4803
+ Typography as Typography8,
4804
+ IconButton as IconButton9,
4633
4805
  Tooltip as Tooltip5,
4634
4806
  TextField as TextField7,
4635
4807
  InputAdornment,
@@ -4644,24 +4816,24 @@ import {
4644
4816
  DialogTitle as DialogTitle3,
4645
4817
  DialogContent as DialogContent3,
4646
4818
  DialogActions as DialogActions3,
4647
- Button as Button5,
4819
+ Button as Button6,
4648
4820
  Avatar as Avatar6,
4649
4821
  alpha as alpha6
4650
4822
  } from "@mui/material";
4651
4823
  import { X as CloseIcon5, X as ClearIcon, Search as SearchIcon, Folder as FolderIcon4, MoreVertical as MoreVertIcon3, Trash2 as DeleteSweepIcon, Inbox as InboxIcon3, Plus as AddIcon4, Settings as SettingsIcon2, Brain as MemoryIcon, LogOut as LogOutIcon } from "lucide-react";
4652
- import { useTheme as useTheme10 } from "@mui/material/styles";
4824
+ import { useTheme as useTheme11 } from "@mui/material/styles";
4653
4825
 
4654
4826
  // src/chat/project-management-modal.tsx
4655
- import { useState as useState9, useEffect as useEffect7, useRef as useRef5 } from "react";
4827
+ import { useState as useState9, useEffect as useEffect7, useRef as useRef6 } from "react";
4656
4828
  import {
4657
4829
  Modal,
4658
- Button as Button2,
4830
+ Button as Button3,
4659
4831
  TextField as TextField4,
4660
4832
  List,
4661
4833
  ListItem,
4662
- IconButton as IconButton5,
4663
- Box as Box7,
4664
- Typography as Typography3,
4834
+ IconButton as IconButton6,
4835
+ Box as Box8,
4836
+ Typography as Typography4,
4665
4837
  Avatar as Avatar3,
4666
4838
  Chip as Chip2,
4667
4839
  Menu,
@@ -4672,8 +4844,8 @@ import {
4672
4844
  useMediaQuery as useMediaQuery2
4673
4845
  } from "@mui/material";
4674
4846
  import { Plus as AddIcon2, Pencil as EditIcon2, Trash2 as DeleteIcon, MoreVertical as MoreVertIcon, Folder as FolderIcon, X as CloseIcon3, ArrowLeft as ArrowBackIcon } from "lucide-react";
4675
- import { useTheme as useTheme6, alpha as alpha3 } from "@mui/material/styles";
4676
- import { Fragment as Fragment5, jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
4847
+ import { useTheme as useTheme7, alpha as alpha3 } from "@mui/material/styles";
4848
+ import { Fragment as Fragment5, jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
4677
4849
  var DEFAULT_COLORS = [
4678
4850
  "#2196F3",
4679
4851
  "#4CAF50",
@@ -4690,7 +4862,7 @@ var ProjectManagementModal = ({
4690
4862
  open,
4691
4863
  onClose
4692
4864
  }) => {
4693
- const theme = useTheme6();
4865
+ const theme = useTheme7();
4694
4866
  const isMobile = useMediaQuery2(theme.breakpoints.down("sm"));
4695
4867
  const {
4696
4868
  projects,
@@ -4715,7 +4887,7 @@ var ProjectManagementModal = ({
4715
4887
  const [selectedProject, setSelectedProject] = useState9(null);
4716
4888
  const [loading, setLoading] = useState9(false);
4717
4889
  const [error, setError] = useState9(null);
4718
- const modalContainerRef = useRef5(null);
4890
+ const modalContainerRef = useRef6(null);
4719
4891
  useEffect7(() => {
4720
4892
  if (open && !_hasHydrated) {
4721
4893
  hydrate();
@@ -4831,8 +5003,8 @@ var ProjectManagementModal = ({
4831
5003
  const hoverSurface = alpha3(theme.palette.primary.main, theme.palette.mode === "dark" ? 0.22 : 0.08);
4832
5004
  const headerTitle = showCreateForm ? editingProject ? "Edit Project" : "Create Project" : "Manage Projects";
4833
5005
  const headerSubtitle = showCreateForm ? "Name, describe, and color-code your project." : "Organize conversations into cohesive projects.";
4834
- const content = /* @__PURE__ */ jsxs7(
4835
- Box7,
5006
+ const content = /* @__PURE__ */ jsxs8(
5007
+ Box8,
4836
5008
  {
4837
5009
  ref: modalContainerRef,
4838
5010
  sx: {
@@ -4850,8 +5022,8 @@ var ProjectManagementModal = ({
4850
5022
  position: "relative"
4851
5023
  },
4852
5024
  children: [
4853
- isMobile && /* @__PURE__ */ jsx10(
4854
- Box7,
5025
+ isMobile && /* @__PURE__ */ jsx11(
5026
+ Box8,
4855
5027
  {
4856
5028
  sx: {
4857
5029
  width: 56,
@@ -4864,8 +5036,8 @@ var ProjectManagementModal = ({
4864
5036
  }
4865
5037
  }
4866
5038
  ),
4867
- /* @__PURE__ */ jsxs7(
4868
- Box7,
5039
+ /* @__PURE__ */ jsxs8(
5040
+ Box8,
4869
5041
  {
4870
5042
  sx: {
4871
5043
  px: isMobile ? 1.5 : 2.75,
@@ -4877,8 +5049,8 @@ var ProjectManagementModal = ({
4877
5049
  gap: 1
4878
5050
  },
4879
5051
  children: [
4880
- /* @__PURE__ */ jsxs7(
4881
- Box7,
5052
+ /* @__PURE__ */ jsxs8(
5053
+ Box8,
4882
5054
  {
4883
5055
  sx: {
4884
5056
  display: "flex",
@@ -4887,8 +5059,8 @@ var ProjectManagementModal = ({
4887
5059
  gap: 1
4888
5060
  },
4889
5061
  children: [
4890
- /* @__PURE__ */ jsxs7(
4891
- Box7,
5062
+ /* @__PURE__ */ jsxs8(
5063
+ Box8,
4892
5064
  {
4893
5065
  sx: {
4894
5066
  display: "flex",
@@ -4898,9 +5070,9 @@ var ProjectManagementModal = ({
4898
5070
  flex: 1
4899
5071
  },
4900
5072
  children: [
4901
- showCreateForm && /* @__PURE__ */ jsx10(IconButton5, { onClick: resetForm, size: "small", sx: { mr: 0.5 }, children: /* @__PURE__ */ jsx10(ArrowBackIcon, { size: 16 }) }),
4902
- /* @__PURE__ */ jsx10(
4903
- Typography3,
5073
+ showCreateForm && /* @__PURE__ */ jsx11(IconButton6, { onClick: resetForm, size: "small", sx: { mr: 0.5 }, children: /* @__PURE__ */ jsx11(ArrowBackIcon, { size: 16 }) }),
5074
+ /* @__PURE__ */ jsx11(
5075
+ Typography4,
4904
5076
  {
4905
5077
  variant: "h6",
4906
5078
  sx: {
@@ -4916,16 +5088,16 @@ var ProjectManagementModal = ({
4916
5088
  ]
4917
5089
  }
4918
5090
  ),
4919
- /* @__PURE__ */ jsx10(IconButton5, { onClick: handleClose, size: "small", children: /* @__PURE__ */ jsx10(CloseIcon3, {}) })
5091
+ /* @__PURE__ */ jsx11(IconButton6, { onClick: handleClose, size: "small", children: /* @__PURE__ */ jsx11(CloseIcon3, {}) })
4920
5092
  ]
4921
5093
  }
4922
5094
  ),
4923
- /* @__PURE__ */ jsx10(Typography3, { variant: "body2", color: "text.secondary", children: headerSubtitle })
5095
+ /* @__PURE__ */ jsx11(Typography4, { variant: "body2", color: "text.secondary", children: headerSubtitle })
4924
5096
  ]
4925
5097
  }
4926
5098
  ),
4927
- /* @__PURE__ */ jsxs7(
4928
- Box7,
5099
+ /* @__PURE__ */ jsxs8(
5100
+ Box8,
4929
5101
  {
4930
5102
  sx: {
4931
5103
  flex: 1,
@@ -4937,9 +5109,9 @@ var ProjectManagementModal = ({
4937
5109
  gap: 2.5
4938
5110
  },
4939
5111
  children: [
4940
- error && /* @__PURE__ */ jsx10(Alert, { severity: "error", onClose: () => setError(null), children: error }),
4941
- showCreateForm ? /* @__PURE__ */ jsxs7(Box7, { sx: { display: "flex", flexDirection: "column", gap: 2 }, children: [
4942
- /* @__PURE__ */ jsx10(
5112
+ error && /* @__PURE__ */ jsx11(Alert, { severity: "error", onClose: () => setError(null), children: error }),
5113
+ showCreateForm ? /* @__PURE__ */ jsxs8(Box8, { sx: { display: "flex", flexDirection: "column", gap: 2 }, children: [
5114
+ /* @__PURE__ */ jsx11(
4943
5115
  TextField4,
4944
5116
  {
4945
5117
  label: "Project name",
@@ -4951,7 +5123,7 @@ var ProjectManagementModal = ({
4951
5123
  autoFocus: true
4952
5124
  }
4953
5125
  ),
4954
- /* @__PURE__ */ jsx10(
5126
+ /* @__PURE__ */ jsx11(
4955
5127
  TextField4,
4956
5128
  {
4957
5129
  label: "Description (optional)",
@@ -4963,7 +5135,7 @@ var ProjectManagementModal = ({
4963
5135
  disabled: loading
4964
5136
  }
4965
5137
  ),
4966
- /* @__PURE__ */ jsx10(
5138
+ /* @__PURE__ */ jsx11(
4967
5139
  TextField4,
4968
5140
  {
4969
5141
  label: "Project instructions (optional)",
@@ -4976,10 +5148,10 @@ var ProjectManagementModal = ({
4976
5148
  disabled: loading
4977
5149
  }
4978
5150
  ),
4979
- /* @__PURE__ */ jsxs7(Box7, { children: [
4980
- /* @__PURE__ */ jsx10(Typography3, { variant: "subtitle2", sx: { mb: 1 }, children: "Color" }),
4981
- /* @__PURE__ */ jsx10(Box7, { sx: { display: "flex", flexWrap: "wrap", gap: 1 }, children: DEFAULT_COLORS.map((color) => /* @__PURE__ */ jsx10(
4982
- Box7,
5151
+ /* @__PURE__ */ jsxs8(Box8, { children: [
5152
+ /* @__PURE__ */ jsx11(Typography4, { variant: "subtitle2", sx: { mb: 1 }, children: "Color" }),
5153
+ /* @__PURE__ */ jsx11(Box8, { sx: { display: "flex", flexWrap: "wrap", gap: 1 }, children: DEFAULT_COLORS.map((color) => /* @__PURE__ */ jsx11(
5154
+ Box8,
4983
5155
  {
4984
5156
  sx: {
4985
5157
  width: 32,
@@ -4999,11 +5171,11 @@ var ProjectManagementModal = ({
4999
5171
  color
5000
5172
  )) })
5001
5173
  ] })
5002
- ] }) : /* @__PURE__ */ jsxs7(Box7, { sx: { display: "flex", flexDirection: "column", gap: 2 }, children: [
5003
- /* @__PURE__ */ jsx10(
5004
- Button2,
5174
+ ] }) : /* @__PURE__ */ jsxs8(Box8, { sx: { display: "flex", flexDirection: "column", gap: 2 }, children: [
5175
+ /* @__PURE__ */ jsx11(
5176
+ Button3,
5005
5177
  {
5006
- startIcon: /* @__PURE__ */ jsx10(AddIcon2, {}),
5178
+ startIcon: /* @__PURE__ */ jsx11(AddIcon2, {}),
5007
5179
  onClick: () => setShowCreateForm(true),
5008
5180
  variant: "contained",
5009
5181
  sx: {
@@ -5015,8 +5187,8 @@ var ProjectManagementModal = ({
5015
5187
  children: "Create project"
5016
5188
  }
5017
5189
  ),
5018
- projects.length === 0 ? /* @__PURE__ */ jsxs7(
5019
- Box7,
5190
+ projects.length === 0 ? /* @__PURE__ */ jsxs8(
5191
+ Box8,
5020
5192
  {
5021
5193
  sx: {
5022
5194
  textAlign: "center",
@@ -5028,15 +5200,15 @@ var ProjectManagementModal = ({
5028
5200
  backgroundColor: subtleSurface
5029
5201
  },
5030
5202
  children: [
5031
- /* @__PURE__ */ jsx10(FolderIcon, { size: 48, style: { marginBottom: 8, opacity: 0.5 } }),
5032
- /* @__PURE__ */ jsx10(Typography3, { variant: "body1", sx: { fontWeight: 600 }, children: "No projects yet" }),
5033
- /* @__PURE__ */ jsx10(Typography3, { variant: "body2", children: "Create your first project to organize conversations." })
5203
+ /* @__PURE__ */ jsx11(FolderIcon, { size: 48, style: { marginBottom: 8, opacity: 0.5 } }),
5204
+ /* @__PURE__ */ jsx11(Typography4, { variant: "body1", sx: { fontWeight: 600 }, children: "No projects yet" }),
5205
+ /* @__PURE__ */ jsx11(Typography4, { variant: "body2", children: "Create your first project to organize conversations." })
5034
5206
  ]
5035
5207
  }
5036
- ) : /* @__PURE__ */ jsx10(List, { sx: { display: "flex", flexDirection: "column", gap: 1.25, py: 0 }, children: projects.map((project) => {
5208
+ ) : /* @__PURE__ */ jsx11(List, { sx: { display: "flex", flexDirection: "column", gap: 1.25, py: 0 }, children: projects.map((project) => {
5037
5209
  const conversationCount = getConversationsByProject(project.id).length;
5038
- return /* @__PURE__ */ jsx10(ListItem, { disablePadding: true, children: /* @__PURE__ */ jsxs7(
5039
- Box7,
5210
+ return /* @__PURE__ */ jsx11(ListItem, { disablePadding: true, children: /* @__PURE__ */ jsxs8(
5211
+ Box8,
5040
5212
  {
5041
5213
  sx: {
5042
5214
  display: "flex",
@@ -5054,7 +5226,7 @@ var ProjectManagementModal = ({
5054
5226
  }
5055
5227
  },
5056
5228
  children: [
5057
- /* @__PURE__ */ jsx10(
5229
+ /* @__PURE__ */ jsx11(
5058
5230
  Avatar3,
5059
5231
  {
5060
5232
  sx: {
@@ -5063,20 +5235,20 @@ var ProjectManagementModal = ({
5063
5235
  height: 36,
5064
5236
  fontSize: "1rem"
5065
5237
  },
5066
- children: /* @__PURE__ */ jsx10(FolderIcon, { size: 16 })
5238
+ children: /* @__PURE__ */ jsx11(FolderIcon, { size: 16 })
5067
5239
  }
5068
5240
  ),
5069
- /* @__PURE__ */ jsxs7(Box7, { sx: { flex: 1, minWidth: 0 }, children: [
5070
- /* @__PURE__ */ jsxs7(Box7, { sx: { display: "flex", alignItems: "center", gap: 1, flexWrap: "wrap" }, children: [
5071
- /* @__PURE__ */ jsx10(
5072
- Typography3,
5241
+ /* @__PURE__ */ jsxs8(Box8, { sx: { flex: 1, minWidth: 0 }, children: [
5242
+ /* @__PURE__ */ jsxs8(Box8, { sx: { display: "flex", alignItems: "center", gap: 1, flexWrap: "wrap" }, children: [
5243
+ /* @__PURE__ */ jsx11(
5244
+ Typography4,
5073
5245
  {
5074
5246
  variant: "subtitle1",
5075
5247
  sx: { fontWeight: 600, overflow: "hidden", textOverflow: "ellipsis" },
5076
5248
  children: project.name
5077
5249
  }
5078
5250
  ),
5079
- /* @__PURE__ */ jsx10(
5251
+ /* @__PURE__ */ jsx11(
5080
5252
  Chip2,
5081
5253
  {
5082
5254
  label: `${conversationCount}`,
@@ -5091,8 +5263,8 @@ var ProjectManagementModal = ({
5091
5263
  }
5092
5264
  )
5093
5265
  ] }),
5094
- project.description && /* @__PURE__ */ jsx10(
5095
- Typography3,
5266
+ project.description && /* @__PURE__ */ jsx11(
5267
+ Typography4,
5096
5268
  {
5097
5269
  variant: "body2",
5098
5270
  color: "text.secondary",
@@ -5101,8 +5273,8 @@ var ProjectManagementModal = ({
5101
5273
  }
5102
5274
  )
5103
5275
  ] }),
5104
- /* @__PURE__ */ jsx10(
5105
- IconButton5,
5276
+ /* @__PURE__ */ jsx11(
5277
+ IconButton6,
5106
5278
  {
5107
5279
  onClick: (e) => {
5108
5280
  e.stopPropagation();
@@ -5114,7 +5286,7 @@ var ProjectManagementModal = ({
5114
5286
  mt: 0.25,
5115
5287
  zIndex: 1
5116
5288
  },
5117
- children: /* @__PURE__ */ jsx10(MoreVertIcon, { size: 16 })
5289
+ children: /* @__PURE__ */ jsx11(MoreVertIcon, { size: 16 })
5118
5290
  }
5119
5291
  )
5120
5292
  ]
@@ -5125,8 +5297,8 @@ var ProjectManagementModal = ({
5125
5297
  ]
5126
5298
  }
5127
5299
  ),
5128
- /* @__PURE__ */ jsx10(
5129
- Box7,
5300
+ /* @__PURE__ */ jsx11(
5301
+ Box8,
5130
5302
  {
5131
5303
  sx: {
5132
5304
  px: isMobile ? 1.5 : 2.75,
@@ -5136,9 +5308,9 @@ var ProjectManagementModal = ({
5136
5308
  justifyContent: "flex-end",
5137
5309
  gap: 1
5138
5310
  },
5139
- children: showCreateForm ? /* @__PURE__ */ jsxs7(Fragment5, { children: [
5140
- /* @__PURE__ */ jsx10(
5141
- Button2,
5311
+ children: showCreateForm ? /* @__PURE__ */ jsxs8(Fragment5, { children: [
5312
+ /* @__PURE__ */ jsx11(
5313
+ Button3,
5142
5314
  {
5143
5315
  onClick: resetForm,
5144
5316
  disabled: loading,
@@ -5146,21 +5318,21 @@ var ProjectManagementModal = ({
5146
5318
  children: "Cancel"
5147
5319
  }
5148
5320
  ),
5149
- /* @__PURE__ */ jsx10(
5150
- Button2,
5321
+ /* @__PURE__ */ jsx11(
5322
+ Button3,
5151
5323
  {
5152
5324
  onClick: editingProject ? handleEditProject : handleCreateProject,
5153
5325
  variant: "contained",
5154
5326
  disabled: loading,
5155
- startIcon: loading ? /* @__PURE__ */ jsx10(CircularProgress3, { size: 16 }) : void 0,
5327
+ startIcon: loading ? /* @__PURE__ */ jsx11(CircularProgress3, { size: 16 }) : void 0,
5156
5328
  sx: { textTransform: "none", borderRadius: 2 },
5157
5329
  children: editingProject ? "Update project" : "Create project"
5158
5330
  }
5159
5331
  )
5160
- ] }) : /* @__PURE__ */ jsx10(Button2, { onClick: handleClose, sx: { textTransform: "none", borderRadius: 2 }, children: "Close" })
5332
+ ] }) : /* @__PURE__ */ jsx11(Button3, { onClick: handleClose, sx: { textTransform: "none", borderRadius: 2 }, children: "Close" })
5161
5333
  }
5162
5334
  ),
5163
- /* @__PURE__ */ jsxs7(
5335
+ /* @__PURE__ */ jsxs8(
5164
5336
  Menu,
5165
5337
  {
5166
5338
  anchorEl: menuAnchor,
@@ -5182,20 +5354,20 @@ var ProjectManagementModal = ({
5182
5354
  }
5183
5355
  },
5184
5356
  children: [
5185
- /* @__PURE__ */ jsx10(
5357
+ /* @__PURE__ */ jsx11(
5186
5358
  MenuItem,
5187
5359
  {
5188
5360
  onClick: () => {
5189
5361
  if (!selectedProject) return;
5190
5362
  startEdit(selectedProject);
5191
5363
  },
5192
- children: /* @__PURE__ */ jsxs7(Box7, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
5193
- /* @__PURE__ */ jsx10(EditIcon2, { size: 16 }),
5194
- /* @__PURE__ */ jsx10(Typography3, { variant: "body2", color: "inherit", children: "Edit" })
5364
+ children: /* @__PURE__ */ jsxs8(Box8, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
5365
+ /* @__PURE__ */ jsx11(EditIcon2, { size: 16 }),
5366
+ /* @__PURE__ */ jsx11(Typography4, { variant: "body2", color: "inherit", children: "Edit" })
5195
5367
  ] })
5196
5368
  }
5197
5369
  ),
5198
- /* @__PURE__ */ jsx10(
5370
+ /* @__PURE__ */ jsx11(
5199
5371
  MenuItem,
5200
5372
  {
5201
5373
  onClick: () => {
@@ -5203,9 +5375,9 @@ var ProjectManagementModal = ({
5203
5375
  handleDeleteProject(selectedProject);
5204
5376
  },
5205
5377
  sx: { color: theme.palette.error.main },
5206
- children: /* @__PURE__ */ jsxs7(Box7, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
5207
- /* @__PURE__ */ jsx10(DeleteIcon, { size: 16 }),
5208
- /* @__PURE__ */ jsx10(Typography3, { variant: "body2", color: "inherit", children: "Delete" })
5378
+ children: /* @__PURE__ */ jsxs8(Box8, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
5379
+ /* @__PURE__ */ jsx11(DeleteIcon, { size: 16 }),
5380
+ /* @__PURE__ */ jsx11(Typography4, { variant: "body2", color: "inherit", children: "Delete" })
5209
5381
  ] })
5210
5382
  }
5211
5383
  )
@@ -5215,7 +5387,7 @@ var ProjectManagementModal = ({
5215
5387
  ]
5216
5388
  }
5217
5389
  );
5218
- return /* @__PURE__ */ jsx10(Fragment5, { children: isMobile ? /* @__PURE__ */ jsx10(
5390
+ return /* @__PURE__ */ jsx11(Fragment5, { children: isMobile ? /* @__PURE__ */ jsx11(
5219
5391
  SwipeableDrawer,
5220
5392
  {
5221
5393
  anchor: "bottom",
@@ -5235,7 +5407,7 @@ var ProjectManagementModal = ({
5235
5407
  },
5236
5408
  children: content
5237
5409
  }
5238
- ) : /* @__PURE__ */ jsx10(
5410
+ ) : /* @__PURE__ */ jsx11(
5239
5411
  Modal,
5240
5412
  {
5241
5413
  open,
@@ -5260,28 +5432,28 @@ import {
5260
5432
  DialogTitle,
5261
5433
  DialogContent,
5262
5434
  DialogActions,
5263
- Button as Button3,
5435
+ Button as Button4,
5264
5436
  List as List2,
5265
5437
  ListItem as ListItem2,
5266
5438
  ListItemButton,
5267
5439
  ListItemText,
5268
5440
  ListItemIcon,
5269
- Typography as Typography4,
5441
+ Typography as Typography5,
5270
5442
  Avatar as Avatar4,
5271
5443
  Radio,
5272
- Box as Box8,
5444
+ Box as Box9,
5273
5445
  Divider
5274
5446
  } from "@mui/material";
5275
5447
  import { Folder as FolderIcon2, Inbox as InboxIcon } from "lucide-react";
5276
- import { useTheme as useTheme7 } from "@mui/material/styles";
5277
- import { jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
5448
+ import { useTheme as useTheme8 } from "@mui/material/styles";
5449
+ import { jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
5278
5450
  var MoveConversationModal = ({
5279
5451
  open,
5280
5452
  onClose,
5281
5453
  conversations,
5282
5454
  currentProjectId = null
5283
5455
  }) => {
5284
- const theme = useTheme7();
5456
+ const theme = useTheme8();
5285
5457
  const { projects, _hasHydrated, hydrate } = useProjectStore();
5286
5458
  const { moveConversationToProject } = useConversationStore();
5287
5459
  const [selectedProjectId, setSelectedProjectId] = useState10(
@@ -5311,7 +5483,7 @@ var MoveConversationModal = ({
5311
5483
  };
5312
5484
  const conversationCount = conversations.length;
5313
5485
  const isMultiple = conversationCount > 1;
5314
- return /* @__PURE__ */ jsxs8(
5486
+ return /* @__PURE__ */ jsxs9(
5315
5487
  Dialog2,
5316
5488
  {
5317
5489
  open,
@@ -5325,20 +5497,20 @@ var MoveConversationModal = ({
5325
5497
  }
5326
5498
  },
5327
5499
  children: [
5328
- /* @__PURE__ */ jsxs8(DialogTitle, { children: [
5500
+ /* @__PURE__ */ jsxs9(DialogTitle, { children: [
5329
5501
  "Move ",
5330
5502
  isMultiple ? `${conversationCount} Conversations` : "Conversation"
5331
5503
  ] }),
5332
- /* @__PURE__ */ jsxs8(DialogContent, { sx: { px: 3 }, children: [
5333
- /* @__PURE__ */ jsx11(Typography4, { variant: "body2", color: "text.secondary", sx: { mb: 2 }, children: isMultiple ? `Select a project to move ${conversationCount} conversations to:` : `Select a project to move "${conversations[0]?.name}" to:` }),
5334
- /* @__PURE__ */ jsxs8(List2, { children: [
5335
- /* @__PURE__ */ jsx11(ListItem2, { disablePadding: true, children: /* @__PURE__ */ jsxs8(
5504
+ /* @__PURE__ */ jsxs9(DialogContent, { sx: { px: 3 }, children: [
5505
+ /* @__PURE__ */ jsx12(Typography5, { 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:` }),
5506
+ /* @__PURE__ */ jsxs9(List2, { children: [
5507
+ /* @__PURE__ */ jsx12(ListItem2, { disablePadding: true, children: /* @__PURE__ */ jsxs9(
5336
5508
  ListItemButton,
5337
5509
  {
5338
5510
  onClick: () => setSelectedProjectId(null),
5339
5511
  selected: selectedProjectId === null,
5340
5512
  children: [
5341
- /* @__PURE__ */ jsx11(ListItemIcon, { children: /* @__PURE__ */ jsx11(
5513
+ /* @__PURE__ */ jsx12(ListItemIcon, { children: /* @__PURE__ */ jsx12(
5342
5514
  Radio,
5343
5515
  {
5344
5516
  checked: selectedProjectId === null,
@@ -5346,7 +5518,7 @@ var MoveConversationModal = ({
5346
5518
  size: "small"
5347
5519
  }
5348
5520
  ) }),
5349
- /* @__PURE__ */ jsx11(ListItemIcon, { children: /* @__PURE__ */ jsx11(
5521
+ /* @__PURE__ */ jsx12(ListItemIcon, { children: /* @__PURE__ */ jsx12(
5350
5522
  Avatar4,
5351
5523
  {
5352
5524
  sx: {
@@ -5354,10 +5526,10 @@ var MoveConversationModal = ({
5354
5526
  width: 32,
5355
5527
  height: 32
5356
5528
  },
5357
- children: /* @__PURE__ */ jsx11(InboxIcon, {})
5529
+ children: /* @__PURE__ */ jsx12(InboxIcon, {})
5358
5530
  }
5359
5531
  ) }),
5360
- /* @__PURE__ */ jsx11(
5532
+ /* @__PURE__ */ jsx12(
5361
5533
  ListItemText,
5362
5534
  {
5363
5535
  primary: "No Project",
@@ -5367,14 +5539,14 @@ var MoveConversationModal = ({
5367
5539
  ]
5368
5540
  }
5369
5541
  ) }),
5370
- /* @__PURE__ */ jsx11(Divider, { sx: { my: 1 } }),
5371
- projects.map((project) => /* @__PURE__ */ jsx11(ListItem2, { disablePadding: true, children: /* @__PURE__ */ jsxs8(
5542
+ /* @__PURE__ */ jsx12(Divider, { sx: { my: 1 } }),
5543
+ projects.map((project) => /* @__PURE__ */ jsx12(ListItem2, { disablePadding: true, children: /* @__PURE__ */ jsxs9(
5372
5544
  ListItemButton,
5373
5545
  {
5374
5546
  onClick: () => setSelectedProjectId(project.id),
5375
5547
  selected: selectedProjectId === project.id,
5376
5548
  children: [
5377
- /* @__PURE__ */ jsx11(ListItemIcon, { children: /* @__PURE__ */ jsx11(
5549
+ /* @__PURE__ */ jsx12(ListItemIcon, { children: /* @__PURE__ */ jsx12(
5378
5550
  Radio,
5379
5551
  {
5380
5552
  checked: selectedProjectId === project.id,
@@ -5382,7 +5554,7 @@ var MoveConversationModal = ({
5382
5554
  size: "small"
5383
5555
  }
5384
5556
  ) }),
5385
- /* @__PURE__ */ jsx11(ListItemIcon, { children: /* @__PURE__ */ jsx11(
5557
+ /* @__PURE__ */ jsx12(ListItemIcon, { children: /* @__PURE__ */ jsx12(
5386
5558
  Avatar4,
5387
5559
  {
5388
5560
  sx: {
@@ -5390,10 +5562,10 @@ var MoveConversationModal = ({
5390
5562
  width: 32,
5391
5563
  height: 32
5392
5564
  },
5393
- children: /* @__PURE__ */ jsx11(FolderIcon2, {})
5565
+ children: /* @__PURE__ */ jsx12(FolderIcon2, {})
5394
5566
  }
5395
5567
  ) }),
5396
- /* @__PURE__ */ jsx11(
5568
+ /* @__PURE__ */ jsx12(
5397
5569
  ListItemText,
5398
5570
  {
5399
5571
  primary: project.name,
@@ -5403,17 +5575,17 @@ var MoveConversationModal = ({
5403
5575
  ]
5404
5576
  }
5405
5577
  ) }, project.id)),
5406
- projects.length === 0 && /* @__PURE__ */ jsx11(Box8, { sx: {
5578
+ projects.length === 0 && /* @__PURE__ */ jsx12(Box9, { sx: {
5407
5579
  textAlign: "center",
5408
5580
  py: 2,
5409
5581
  color: theme.palette.text.secondary
5410
- }, children: /* @__PURE__ */ jsx11(Typography4, { variant: "body2", children: "No projects available. Create a project first to organize conversations." }) })
5582
+ }, children: /* @__PURE__ */ jsx12(Typography5, { variant: "body2", children: "No projects available. Create a project first to organize conversations." }) })
5411
5583
  ] })
5412
5584
  ] }),
5413
- /* @__PURE__ */ jsxs8(DialogActions, { sx: { px: 3, pb: 2 }, children: [
5414
- /* @__PURE__ */ jsx11(Button3, { onClick: onClose, children: "Cancel" }),
5415
- /* @__PURE__ */ jsxs8(
5416
- Button3,
5585
+ /* @__PURE__ */ jsxs9(DialogActions, { sx: { px: 3, pb: 2 }, children: [
5586
+ /* @__PURE__ */ jsx12(Button4, { onClick: onClose, children: "Cancel" }),
5587
+ /* @__PURE__ */ jsxs9(
5588
+ Button4,
5417
5589
  {
5418
5590
  onClick: handleMove,
5419
5591
  variant: "contained",
@@ -5432,11 +5604,11 @@ var MoveConversationModal = ({
5432
5604
  var move_conversation_modal_default = MoveConversationModal;
5433
5605
 
5434
5606
  // src/chat/simple-conversation-item.tsx
5435
- import { useState as useState11, useRef as useRef6, useEffect as useEffect9 } from "react";
5607
+ import { useState as useState11, useRef as useRef7, useEffect as useEffect9 } from "react";
5436
5608
  import {
5437
- Box as Box9,
5438
- Typography as Typography5,
5439
- IconButton as IconButton6,
5609
+ Box as Box10,
5610
+ Typography as Typography6,
5611
+ IconButton as IconButton7,
5440
5612
  Menu as Menu2,
5441
5613
  MenuItem as MenuItem2,
5442
5614
  ListItemIcon as ListItemIcon2,
@@ -5447,11 +5619,11 @@ import {
5447
5619
  DialogTitle as DialogTitle2,
5448
5620
  DialogContent as DialogContent2,
5449
5621
  DialogActions as DialogActions2,
5450
- Button as Button4
5622
+ Button as Button5
5451
5623
  } from "@mui/material";
5452
5624
  import { MoreVertical as MoreVertIcon2, Pencil as EditIcon3, Trash2 as DeleteIcon2, GripVertical as DragIcon, MailOpen as MoveIcon } from "lucide-react";
5453
- import { useTheme as useTheme8, alpha as alpha4 } from "@mui/material/styles";
5454
- import { Fragment as Fragment6, jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
5625
+ import { useTheme as useTheme9, alpha as alpha4 } from "@mui/material/styles";
5626
+ import { Fragment as Fragment6, jsx as jsx13, jsxs as jsxs10 } from "react/jsx-runtime";
5455
5627
  var SimpleConversationItem = ({
5456
5628
  conversation,
5457
5629
  isSelected,
@@ -5467,7 +5639,7 @@ var SimpleConversationItem = ({
5467
5639
  onTouchDragEnd,
5468
5640
  isTouchDragActive
5469
5641
  }) => {
5470
- const theme = useTheme8();
5642
+ const theme = useTheme9();
5471
5643
  const isMobile = useMediaQuery3(theme.breakpoints.down("sm"));
5472
5644
  const [anchorEl, setAnchorEl] = useState11(null);
5473
5645
  const [isEditing, setIsEditing] = useState11(false);
@@ -5475,10 +5647,10 @@ var SimpleConversationItem = ({
5475
5647
  const [isDragging, setIsDragging] = useState11(false);
5476
5648
  const [isTouchDragging, setIsTouchDragging] = useState11(false);
5477
5649
  const [showRenameDialog, setShowRenameDialog] = useState11(false);
5478
- const longPressTimeoutRef = useRef6(null);
5479
- const touchStartPointRef = useRef6(null);
5480
- const activeTouchIdRef = useRef6(null);
5481
- const suppressClickRef = useRef6(false);
5650
+ const longPressTimeoutRef = useRef7(null);
5651
+ const touchStartPointRef = useRef7(null);
5652
+ const activeTouchIdRef = useRef7(null);
5653
+ const suppressClickRef = useRef7(false);
5482
5654
  const highlightText = (text, query) => {
5483
5655
  if (!query || !query.trim()) {
5484
5656
  return text;
@@ -5486,8 +5658,8 @@ var SimpleConversationItem = ({
5486
5658
  const regex = new RegExp(`(${query.trim()})`, "gi");
5487
5659
  const parts = text.split(regex);
5488
5660
  return parts.map(
5489
- (part, index) => regex.test(part) ? /* @__PURE__ */ jsx12(
5490
- Box9,
5661
+ (part, index) => regex.test(part) ? /* @__PURE__ */ jsx13(
5662
+ Box10,
5491
5663
  {
5492
5664
  component: "span",
5493
5665
  sx: {
@@ -5622,9 +5794,9 @@ var SimpleConversationItem = ({
5622
5794
  setIsTouchDragging(false);
5623
5795
  }
5624
5796
  }, [isTouchDragActive, isTouchDragging]);
5625
- return /* @__PURE__ */ jsxs9(Fragment6, { children: [
5626
- /* @__PURE__ */ jsxs9(
5627
- Box9,
5797
+ return /* @__PURE__ */ jsxs10(Fragment6, { children: [
5798
+ /* @__PURE__ */ jsxs10(
5799
+ Box10,
5628
5800
  {
5629
5801
  "data-project-id": conversation.projectId ?? "__ungrouped",
5630
5802
  draggable: !isMobile && !isEditing,
@@ -5676,7 +5848,7 @@ var SimpleConversationItem = ({
5676
5848
  }
5677
5849
  },
5678
5850
  children: [
5679
- !isMobile && !isEditing && /* @__PURE__ */ jsx12(
5851
+ !isMobile && !isEditing && /* @__PURE__ */ jsx13(
5680
5852
  DragIcon,
5681
5853
  {
5682
5854
  size: 16,
@@ -5684,8 +5856,8 @@ var SimpleConversationItem = ({
5684
5856
  style: { marginRight: 4, cursor: "grab" }
5685
5857
  }
5686
5858
  ),
5687
- /* @__PURE__ */ jsxs9(Box9, { sx: { flex: 1, minWidth: 0 }, children: [
5688
- isEditing ? /* @__PURE__ */ jsx12(
5859
+ /* @__PURE__ */ jsxs10(Box10, { sx: { flex: 1, minWidth: 0 }, children: [
5860
+ isEditing ? /* @__PURE__ */ jsx13(
5689
5861
  TextField5,
5690
5862
  {
5691
5863
  value: editName,
@@ -5708,8 +5880,8 @@ var SimpleConversationItem = ({
5708
5880
  }
5709
5881
  }
5710
5882
  }
5711
- ) : /* @__PURE__ */ jsx12(
5712
- Typography5,
5883
+ ) : /* @__PURE__ */ jsx13(
5884
+ Typography6,
5713
5885
  {
5714
5886
  variant: "body2",
5715
5887
  sx: {
@@ -5723,8 +5895,8 @@ var SimpleConversationItem = ({
5723
5895
  children: highlightText(conversation.name, searchQuery)
5724
5896
  }
5725
5897
  ),
5726
- !isEditing && snippet && /* @__PURE__ */ jsx12(
5727
- Typography5,
5898
+ !isEditing && snippet && /* @__PURE__ */ jsx13(
5899
+ Typography6,
5728
5900
  {
5729
5901
  variant: "caption",
5730
5902
  sx: {
@@ -5742,8 +5914,8 @@ var SimpleConversationItem = ({
5742
5914
  }
5743
5915
  )
5744
5916
  ] }),
5745
- !isEditing && /* @__PURE__ */ jsx12(
5746
- IconButton6,
5917
+ !isEditing && /* @__PURE__ */ jsx13(
5918
+ IconButton7,
5747
5919
  {
5748
5920
  onClick: handleMenuOpen,
5749
5921
  size: "small",
@@ -5771,10 +5943,10 @@ var SimpleConversationItem = ({
5771
5943
  }
5772
5944
  }
5773
5945
  },
5774
- children: /* @__PURE__ */ jsx12(MoreVertIcon2, { size: 16 })
5946
+ children: /* @__PURE__ */ jsx13(MoreVertIcon2, { size: 16 })
5775
5947
  }
5776
5948
  ),
5777
- /* @__PURE__ */ jsxs9(
5949
+ /* @__PURE__ */ jsxs10(
5778
5950
  Menu2,
5779
5951
  {
5780
5952
  anchorEl,
@@ -5801,17 +5973,17 @@ var SimpleConversationItem = ({
5801
5973
  }
5802
5974
  },
5803
5975
  children: [
5804
- onRename && /* @__PURE__ */ jsxs9(MenuItem2, { onClick: handleEdit, children: [
5805
- /* @__PURE__ */ jsx12(ListItemIcon2, { children: /* @__PURE__ */ jsx12(EditIcon3, { size: 16 }) }),
5806
- /* @__PURE__ */ jsx12(ListItemText2, { children: "Rename" })
5976
+ onRename && /* @__PURE__ */ jsxs10(MenuItem2, { onClick: handleEdit, children: [
5977
+ /* @__PURE__ */ jsx13(ListItemIcon2, { children: /* @__PURE__ */ jsx13(EditIcon3, { size: 16 }) }),
5978
+ /* @__PURE__ */ jsx13(ListItemText2, { children: "Rename" })
5807
5979
  ] }),
5808
- onMove && /* @__PURE__ */ jsxs9(MenuItem2, { onClick: handleMove, children: [
5809
- /* @__PURE__ */ jsx12(ListItemIcon2, { children: /* @__PURE__ */ jsx12(MoveIcon, { size: 16 }) }),
5810
- /* @__PURE__ */ jsx12(ListItemText2, { children: "Move to Project" })
5980
+ onMove && /* @__PURE__ */ jsxs10(MenuItem2, { onClick: handleMove, children: [
5981
+ /* @__PURE__ */ jsx13(ListItemIcon2, { children: /* @__PURE__ */ jsx13(MoveIcon, { size: 16 }) }),
5982
+ /* @__PURE__ */ jsx13(ListItemText2, { children: "Move to Project" })
5811
5983
  ] }),
5812
- /* @__PURE__ */ jsxs9(MenuItem2, { onClick: handleDelete, children: [
5813
- /* @__PURE__ */ jsx12(ListItemIcon2, { children: /* @__PURE__ */ jsx12(DeleteIcon2, { size: 16 }) }),
5814
- /* @__PURE__ */ jsx12(ListItemText2, { children: "Delete" })
5984
+ /* @__PURE__ */ jsxs10(MenuItem2, { onClick: handleDelete, children: [
5985
+ /* @__PURE__ */ jsx13(ListItemIcon2, { children: /* @__PURE__ */ jsx13(DeleteIcon2, { size: 16 }) }),
5986
+ /* @__PURE__ */ jsx13(ListItemText2, { children: "Delete" })
5815
5987
  ] })
5816
5988
  ]
5817
5989
  }
@@ -5819,7 +5991,7 @@ var SimpleConversationItem = ({
5819
5991
  ]
5820
5992
  }
5821
5993
  ),
5822
- isMobile && /* @__PURE__ */ jsxs9(
5994
+ isMobile && /* @__PURE__ */ jsxs10(
5823
5995
  Dialog3,
5824
5996
  {
5825
5997
  open: showRenameDialog,
@@ -5835,8 +6007,8 @@ var SimpleConversationItem = ({
5835
6007
  }
5836
6008
  },
5837
6009
  children: [
5838
- /* @__PURE__ */ jsx12(DialogTitle2, { sx: { pb: 1 }, children: "Rename Conversation" }),
5839
- /* @__PURE__ */ jsx12(DialogContent2, { children: /* @__PURE__ */ jsx12(
6010
+ /* @__PURE__ */ jsx13(DialogTitle2, { sx: { pb: 1 }, children: "Rename Conversation" }),
6011
+ /* @__PURE__ */ jsx13(DialogContent2, { children: /* @__PURE__ */ jsx13(
5840
6012
  TextField5,
5841
6013
  {
5842
6014
  value: editName,
@@ -5849,9 +6021,9 @@ var SimpleConversationItem = ({
5849
6021
  }
5850
6022
  }
5851
6023
  ) }),
5852
- /* @__PURE__ */ jsxs9(DialogActions2, { sx: { px: 3, pb: 2 }, children: [
5853
- /* @__PURE__ */ jsx12(
5854
- Button4,
6024
+ /* @__PURE__ */ jsxs10(DialogActions2, { sx: { px: 3, pb: 2 }, children: [
6025
+ /* @__PURE__ */ jsx13(
6026
+ Button5,
5855
6027
  {
5856
6028
  onClick: () => {
5857
6029
  setShowRenameDialog(false);
@@ -5860,8 +6032,8 @@ var SimpleConversationItem = ({
5860
6032
  children: "Cancel"
5861
6033
  }
5862
6034
  ),
5863
- /* @__PURE__ */ jsx12(
5864
- Button4,
6035
+ /* @__PURE__ */ jsx13(
6036
+ Button5,
5865
6037
  {
5866
6038
  onClick: () => {
5867
6039
  commitRename();
@@ -5881,11 +6053,11 @@ var SimpleConversationItem = ({
5881
6053
  var simple_conversation_item_default = SimpleConversationItem;
5882
6054
 
5883
6055
  // src/chat/project-header.tsx
5884
- import { useRef as useRef7, useState as useState12 } from "react";
6056
+ import { useRef as useRef8, useState as useState12 } from "react";
5885
6057
  import {
5886
- Box as Box10,
5887
- Typography as Typography6,
5888
- IconButton as IconButton7,
6058
+ Box as Box11,
6059
+ Typography as Typography7,
6060
+ IconButton as IconButton8,
5889
6061
  Avatar as Avatar5,
5890
6062
  Chip as Chip3,
5891
6063
  Tooltip as Tooltip4,
@@ -5893,8 +6065,8 @@ import {
5893
6065
  alpha as alpha5
5894
6066
  } from "@mui/material";
5895
6067
  import { ChevronDown as ExpandMoreIcon2, ChevronUp as ExpandLessIcon, Plus as AddIcon3, Folder as FolderIcon3, FolderOpen as FolderOpenIcon, Inbox as InboxIcon2, X as CloseIcon4, Check as CheckIcon3 } from "lucide-react";
5896
- import { useTheme as useTheme9 } from "@mui/material/styles";
5897
- import { jsx as jsx13, jsxs as jsxs10 } from "react/jsx-runtime";
6068
+ import { useTheme as useTheme10 } from "@mui/material/styles";
6069
+ import { jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
5898
6070
  var ProjectHeader = ({
5899
6071
  projectId,
5900
6072
  projectName,
@@ -5908,13 +6080,13 @@ var ProjectHeader = ({
5908
6080
  onRenameCancelDelete,
5909
6081
  isTouchTarget
5910
6082
  }) => {
5911
- const theme = useTheme9();
6083
+ const theme = useTheme10();
5912
6084
  const { createNewConversation } = useConversationStore();
5913
6085
  const { renameProject } = useProjectStore();
5914
6086
  const [isHovered, setIsHovered] = useState12(false);
5915
6087
  const [isDragOver, setIsDragOver] = useState12(false);
5916
6088
  const [renameDraft, setRenameDraft] = useState12(projectName);
5917
- const renameActionRef = useRef7("none");
6089
+ const renameActionRef = useRef8("none");
5918
6090
  const isUngrouped = projectId === null;
5919
6091
  const Icon = isCollapsed ? FolderIcon3 : FolderOpenIcon;
5920
6092
  const handleAddConversation = (e) => {
@@ -5960,8 +6132,8 @@ var ProjectHeader = ({
5960
6132
  setRenameDraft(projectName);
5961
6133
  onRenameComplete?.();
5962
6134
  };
5963
- return /* @__PURE__ */ jsxs10(
5964
- Box10,
6135
+ return /* @__PURE__ */ jsxs11(
6136
+ Box11,
5965
6137
  {
5966
6138
  "data-project-id": projectId ?? "__ungrouped",
5967
6139
  onMouseEnter: () => setIsHovered(true),
@@ -5987,7 +6159,7 @@ var ProjectHeader = ({
5987
6159
  } : {}
5988
6160
  },
5989
6161
  children: [
5990
- /* @__PURE__ */ jsx13(
6162
+ /* @__PURE__ */ jsx14(
5991
6163
  Avatar5,
5992
6164
  {
5993
6165
  sx: {
@@ -5996,17 +6168,17 @@ var ProjectHeader = ({
5996
6168
  height: 28,
5997
6169
  mr: 1.5
5998
6170
  },
5999
- children: isUngrouped ? /* @__PURE__ */ jsx13(
6171
+ children: isUngrouped ? /* @__PURE__ */ jsx14(
6000
6172
  InboxIcon2,
6001
6173
  {
6002
6174
  size: 16,
6003
6175
  color: theme.palette.text.disabled,
6004
6176
  style: { opacity: 0.7 }
6005
6177
  }
6006
- ) : /* @__PURE__ */ jsx13(Icon, { size: 16 })
6178
+ ) : /* @__PURE__ */ jsx14(Icon, { size: 16 })
6007
6179
  }
6008
6180
  ),
6009
- isRenaming && !isUngrouped ? /* @__PURE__ */ jsx13(
6181
+ isRenaming && !isUngrouped ? /* @__PURE__ */ jsx14(
6010
6182
  TextField6,
6011
6183
  {
6012
6184
  value: renameDraft,
@@ -6053,8 +6225,8 @@ var ProjectHeader = ({
6053
6225
  }
6054
6226
  }
6055
6227
  }
6056
- ) : /* @__PURE__ */ jsxs10(
6057
- Typography6,
6228
+ ) : /* @__PURE__ */ jsxs11(
6229
+ Typography7,
6058
6230
  {
6059
6231
  variant: "subtitle2",
6060
6232
  sx: {
@@ -6066,8 +6238,8 @@ var ProjectHeader = ({
6066
6238
  },
6067
6239
  children: [
6068
6240
  projectName,
6069
- isDragOver && /* @__PURE__ */ jsx13(
6070
- Typography6,
6241
+ isDragOver && /* @__PURE__ */ jsx14(
6242
+ Typography7,
6071
6243
  {
6072
6244
  component: "span",
6073
6245
  variant: "caption",
@@ -6082,7 +6254,7 @@ var ProjectHeader = ({
6082
6254
  ]
6083
6255
  }
6084
6256
  ),
6085
- /* @__PURE__ */ jsx13(
6257
+ /* @__PURE__ */ jsx14(
6086
6258
  Chip3,
6087
6259
  {
6088
6260
  label: conversationCount,
@@ -6102,9 +6274,9 @@ var ProjectHeader = ({
6102
6274
  }
6103
6275
  }
6104
6276
  ),
6105
- isRenaming && !isUngrouped && /* @__PURE__ */ jsxs10(Box10, { sx: { display: "flex", alignItems: "center", gap: 0.5, ml: 1 }, children: [
6106
- /* @__PURE__ */ jsx13(Tooltip4, { title: "Cancel and remove", children: /* @__PURE__ */ jsx13(
6107
- IconButton7,
6277
+ isRenaming && !isUngrouped && /* @__PURE__ */ jsxs11(Box11, { sx: { display: "flex", alignItems: "center", gap: 0.5, ml: 1 }, children: [
6278
+ /* @__PURE__ */ jsx14(Tooltip4, { title: "Cancel and remove", children: /* @__PURE__ */ jsx14(
6279
+ IconButton8,
6108
6280
  {
6109
6281
  size: "small",
6110
6282
  onMouseDown: (e) => {
@@ -6113,11 +6285,11 @@ var ProjectHeader = ({
6113
6285
  onRenameCancelDelete ? onRenameCancelDelete() : cancelRename();
6114
6286
  },
6115
6287
  sx: { color: alpha5(theme.palette.error.main, 0.9) },
6116
- children: /* @__PURE__ */ jsx13(CloseIcon4, { size: 16 })
6288
+ children: /* @__PURE__ */ jsx14(CloseIcon4, { size: 16 })
6117
6289
  }
6118
6290
  ) }),
6119
- /* @__PURE__ */ jsx13(Tooltip4, { title: "Save", children: /* @__PURE__ */ jsx13(
6120
- IconButton7,
6291
+ /* @__PURE__ */ jsx14(Tooltip4, { title: "Save", children: /* @__PURE__ */ jsx14(
6292
+ IconButton8,
6121
6293
  {
6122
6294
  size: "small",
6123
6295
  onMouseDown: (e) => {
@@ -6126,12 +6298,12 @@ var ProjectHeader = ({
6126
6298
  commitRename();
6127
6299
  },
6128
6300
  sx: { color: theme.palette.success.main },
6129
- children: /* @__PURE__ */ jsx13(CheckIcon3, { size: 16 })
6301
+ children: /* @__PURE__ */ jsx14(CheckIcon3, { size: 16 })
6130
6302
  }
6131
6303
  ) })
6132
6304
  ] }),
6133
- isHovered && !isDragOver && !isUngrouped && !isRenaming && /* @__PURE__ */ jsx13(Tooltip4, { title: `Add conversation to ${projectName.toLowerCase()}`, arrow: true, children: /* @__PURE__ */ jsx13(
6134
- IconButton7,
6305
+ isHovered && !isDragOver && !isUngrouped && !isRenaming && /* @__PURE__ */ jsx14(Tooltip4, { title: `Add conversation to ${projectName.toLowerCase()}`, arrow: true, children: /* @__PURE__ */ jsx14(
6306
+ IconButton8,
6135
6307
  {
6136
6308
  onClick: handleAddConversation,
6137
6309
  size: "small",
@@ -6147,18 +6319,18 @@ var ProjectHeader = ({
6147
6319
  },
6148
6320
  transition: "all 0.2s ease"
6149
6321
  },
6150
- children: /* @__PURE__ */ jsx13(AddIcon3, { size: 16 })
6322
+ children: /* @__PURE__ */ jsx14(AddIcon3, { size: 16 })
6151
6323
  }
6152
6324
  ) }),
6153
- !isUngrouped && !isRenaming && /* @__PURE__ */ jsx13(
6154
- IconButton7,
6325
+ !isUngrouped && !isRenaming && /* @__PURE__ */ jsx14(
6326
+ IconButton8,
6155
6327
  {
6156
6328
  size: "small",
6157
6329
  sx: {
6158
6330
  color: theme.palette.text.secondary,
6159
6331
  transition: "transform 0.2s ease"
6160
6332
  },
6161
- children: isCollapsed ? /* @__PURE__ */ jsx13(ExpandMoreIcon2, { size: 16 }) : /* @__PURE__ */ jsx13(ExpandLessIcon, { size: 16 })
6333
+ children: isCollapsed ? /* @__PURE__ */ jsx14(ExpandMoreIcon2, { size: 16 }) : /* @__PURE__ */ jsx14(ExpandLessIcon, { size: 16 })
6162
6334
  }
6163
6335
  )
6164
6336
  ]
@@ -6180,7 +6352,7 @@ var TOOLTIP_COPY = {
6180
6352
  var tooltip = (key) => TOOLTIP_COPY[key];
6181
6353
 
6182
6354
  // src/chat/conversation-drawer.tsx
6183
- import { Fragment as Fragment7, jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
6355
+ import { Fragment as Fragment7, jsx as jsx15, jsxs as jsxs12 } from "react/jsx-runtime";
6184
6356
  var BANDIT_AVATAR = "https://cdn.burtson.ai/images/bandit-head.png";
6185
6357
  var coerceOptionalString = (value) => {
6186
6358
  if (typeof value !== "string") return void 0;
@@ -6208,7 +6380,7 @@ var deriveInitials = (value) => {
6208
6380
  return sanitized.slice(0, 2).toUpperCase();
6209
6381
  };
6210
6382
  var ConversationDrawer = ({ open, onClose }) => {
6211
- const theme = useTheme10();
6383
+ const theme = useTheme11();
6212
6384
  const isMobile = useMediaQuery4(theme.breakpoints.down("sm"));
6213
6385
  const { user } = useAuthenticationStore();
6214
6386
  const baseRadius = typeof theme.shape.borderRadius === "number" ? theme.shape.borderRadius : parseFloat(theme.shape.borderRadius) || 0;
@@ -6234,7 +6406,7 @@ var ConversationDrawer = ({ open, onClose }) => {
6234
6406
  const [projectManagementOpen, setProjectManagementOpen] = useState13(false);
6235
6407
  const [memoryModalOpen, setMemoryModalOpen] = useState13(false);
6236
6408
  const [collapsedProjects, setCollapsedProjects] = useState13(/* @__PURE__ */ new Set());
6237
- const didInitCollapseRef = useRef8(false);
6409
+ const didInitCollapseRef = useRef9(false);
6238
6410
  const [searchQuery, setSearchQuery] = useState13("");
6239
6411
  const [menuAnchorEl, setMenuAnchorEl] = useState13(null);
6240
6412
  const [clearConfirmOpen, setClearConfirmOpen] = useState13(false);
@@ -6433,8 +6605,8 @@ var ConversationDrawer = ({ open, onClose }) => {
6433
6605
  setMoveModalOpen(false);
6434
6606
  setConversationToMove(null);
6435
6607
  };
6436
- return /* @__PURE__ */ jsxs11(Fragment7, { children: [
6437
- /* @__PURE__ */ jsxs11(
6608
+ return /* @__PURE__ */ jsxs12(Fragment7, { children: [
6609
+ /* @__PURE__ */ jsxs12(
6438
6610
  Drawer,
6439
6611
  {
6440
6612
  anchor: "left",
@@ -6476,8 +6648,8 @@ var ConversationDrawer = ({ open, onClose }) => {
6476
6648
  }
6477
6649
  },
6478
6650
  children: [
6479
- /* @__PURE__ */ jsxs11(
6480
- Box11,
6651
+ /* @__PURE__ */ jsxs12(
6652
+ Box12,
6481
6653
  {
6482
6654
  sx: {
6483
6655
  p: 2,
@@ -6488,8 +6660,8 @@ var ConversationDrawer = ({ open, onClose }) => {
6488
6660
  gap: 1
6489
6661
  },
6490
6662
  children: [
6491
- /* @__PURE__ */ jsx14(Tooltip5, { title: "Memories", arrow: true, children: /* @__PURE__ */ jsx14(
6492
- IconButton8,
6663
+ /* @__PURE__ */ jsx15(Tooltip5, { title: "Memories", arrow: true, children: /* @__PURE__ */ jsx15(
6664
+ IconButton9,
6493
6665
  {
6494
6666
  onClick: () => setMemoryModalOpen(true),
6495
6667
  size: "small",
@@ -6501,11 +6673,11 @@ var ConversationDrawer = ({ open, onClose }) => {
6501
6673
  bgcolor: alpha6(theme.palette.primary.main, 0.1)
6502
6674
  }
6503
6675
  },
6504
- children: /* @__PURE__ */ jsx14(MemoryIcon, {})
6676
+ children: /* @__PURE__ */ jsx15(MemoryIcon, {})
6505
6677
  }
6506
6678
  ) }),
6507
- /* @__PURE__ */ jsx14(Tooltip5, { title: tooltip("manageProjects"), arrow: true, children: /* @__PURE__ */ jsx14(
6508
- IconButton8,
6679
+ /* @__PURE__ */ jsx15(Tooltip5, { title: tooltip("manageProjects"), arrow: true, children: /* @__PURE__ */ jsx15(
6680
+ IconButton9,
6509
6681
  {
6510
6682
  onClick: () => setProjectManagementOpen(true),
6511
6683
  size: "small",
@@ -6517,11 +6689,11 @@ var ConversationDrawer = ({ open, onClose }) => {
6517
6689
  bgcolor: alpha6(theme.palette.primary.main, 0.1)
6518
6690
  }
6519
6691
  },
6520
- children: /* @__PURE__ */ jsx14(FolderIcon4, {})
6692
+ children: /* @__PURE__ */ jsx15(FolderIcon4, {})
6521
6693
  }
6522
6694
  ) }),
6523
- /* @__PURE__ */ jsx14(Tooltip5, { title: tooltip("conversationOptions"), arrow: true, children: /* @__PURE__ */ jsx14(
6524
- IconButton8,
6695
+ /* @__PURE__ */ jsx15(Tooltip5, { title: tooltip("conversationOptions"), arrow: true, children: /* @__PURE__ */ jsx15(
6696
+ IconButton9,
6525
6697
  {
6526
6698
  onClick: handleMenuOpen,
6527
6699
  size: "small",
@@ -6533,11 +6705,11 @@ var ConversationDrawer = ({ open, onClose }) => {
6533
6705
  bgcolor: alpha6(theme.palette.text.primary, 0.1)
6534
6706
  }
6535
6707
  },
6536
- children: /* @__PURE__ */ jsx14(MoreVertIcon3, {})
6708
+ children: /* @__PURE__ */ jsx15(MoreVertIcon3, {})
6537
6709
  }
6538
6710
  ) }),
6539
- isMobile && /* @__PURE__ */ jsx14(Tooltip5, { title: tooltip("closeConversationsPanel"), children: /* @__PURE__ */ jsx14(
6540
- IconButton8,
6711
+ isMobile && /* @__PURE__ */ jsx15(Tooltip5, { title: tooltip("closeConversationsPanel"), children: /* @__PURE__ */ jsx15(
6712
+ IconButton9,
6541
6713
  {
6542
6714
  onClick: (e) => {
6543
6715
  e.preventDefault();
@@ -6553,13 +6725,13 @@ var ConversationDrawer = ({ open, onClose }) => {
6553
6725
  bgcolor: alpha6(theme.palette.error.main, 0.1)
6554
6726
  }
6555
6727
  },
6556
- children: /* @__PURE__ */ jsx14(CloseIcon5, {})
6728
+ children: /* @__PURE__ */ jsx15(CloseIcon5, {})
6557
6729
  }
6558
6730
  ) })
6559
6731
  ]
6560
6732
  }
6561
6733
  ),
6562
- /* @__PURE__ */ jsx14(Box11, { sx: { p: 2, pb: 1 }, children: /* @__PURE__ */ jsx14(
6734
+ /* @__PURE__ */ jsx15(Box12, { sx: { p: 2, pb: 1 }, children: /* @__PURE__ */ jsx15(
6563
6735
  TextField7,
6564
6736
  {
6565
6737
  fullWidth: true,
@@ -6569,16 +6741,16 @@ var ConversationDrawer = ({ open, onClose }) => {
6569
6741
  onChange: (e) => setSearchQuery(e.target.value),
6570
6742
  variant: "outlined",
6571
6743
  InputProps: {
6572
- startAdornment: /* @__PURE__ */ jsx14(InputAdornment, { position: "start", children: /* @__PURE__ */ jsx14(SearchIcon, { size: 16, color: theme.palette.text.secondary }) }),
6573
- endAdornment: searchQuery && /* @__PURE__ */ jsx14(InputAdornment, { position: "end", children: /* @__PURE__ */ jsx14(Tooltip5, { title: tooltip("clearSearch"), children: /* @__PURE__ */ jsx14(
6574
- IconButton8,
6744
+ startAdornment: /* @__PURE__ */ jsx15(InputAdornment, { position: "start", children: /* @__PURE__ */ jsx15(SearchIcon, { size: 16, color: theme.palette.text.secondary }) }),
6745
+ endAdornment: searchQuery && /* @__PURE__ */ jsx15(InputAdornment, { position: "end", children: /* @__PURE__ */ jsx15(Tooltip5, { title: tooltip("clearSearch"), children: /* @__PURE__ */ jsx15(
6746
+ IconButton9,
6575
6747
  {
6576
6748
  onClick: handleSearchClear,
6577
6749
  size: "small",
6578
6750
  edge: "end",
6579
6751
  "aria-label": tooltip("clearSearch"),
6580
6752
  sx: { color: theme.palette.text.secondary },
6581
- children: /* @__PURE__ */ jsx14(ClearIcon, { size: 16 })
6753
+ children: /* @__PURE__ */ jsx15(ClearIcon, { size: 16 })
6582
6754
  }
6583
6755
  ) }) })
6584
6756
  },
@@ -6595,9 +6767,9 @@ var ConversationDrawer = ({ open, onClose }) => {
6595
6767
  }
6596
6768
  }
6597
6769
  ) }),
6598
- /* @__PURE__ */ jsxs11(Box11, { sx: { flex: 1, overflow: "auto", display: "flex", flexDirection: "column" }, children: [
6599
- /* @__PURE__ */ jsxs11(
6600
- Box11,
6770
+ /* @__PURE__ */ jsxs12(Box12, { sx: { flex: 1, overflow: "auto", display: "flex", flexDirection: "column" }, children: [
6771
+ /* @__PURE__ */ jsxs12(
6772
+ Box12,
6601
6773
  {
6602
6774
  onClick: async () => {
6603
6775
  const names = new Set(projects.map((p) => p.name));
@@ -6631,8 +6803,8 @@ var ConversationDrawer = ({ open, onClose }) => {
6631
6803
  "&:hover": { bgcolor: alpha6(theme.palette.text.primary, 0.04) }
6632
6804
  },
6633
6805
  children: [
6634
- /* @__PURE__ */ jsx14(
6635
- Box11,
6806
+ /* @__PURE__ */ jsx15(
6807
+ Box12,
6636
6808
  {
6637
6809
  sx: {
6638
6810
  width: 28,
@@ -6644,33 +6816,33 @@ var ConversationDrawer = ({ open, onClose }) => {
6644
6816
  justifyContent: "center",
6645
6817
  flexShrink: 0
6646
6818
  },
6647
- children: /* @__PURE__ */ jsx14(FolderIcon4, { size: 16, color: theme.palette.success.main })
6819
+ children: /* @__PURE__ */ jsx15(FolderIcon4, { size: 16, color: theme.palette.success.main })
6648
6820
  }
6649
6821
  ),
6650
- /* @__PURE__ */ jsx14(
6651
- Typography7,
6822
+ /* @__PURE__ */ jsx15(
6823
+ Typography8,
6652
6824
  {
6653
6825
  variant: "subtitle2",
6654
6826
  sx: { flex: 1, fontWeight: 600, fontSize: "0.875rem" },
6655
6827
  children: "New Project"
6656
6828
  }
6657
6829
  ),
6658
- /* @__PURE__ */ jsx14(Tooltip5, { title: tooltip("addProject"), arrow: true, children: /* @__PURE__ */ jsx14(
6659
- IconButton8,
6830
+ /* @__PURE__ */ jsx15(Tooltip5, { title: tooltip("addProject"), arrow: true, children: /* @__PURE__ */ jsx15(
6831
+ IconButton9,
6660
6832
  {
6661
6833
  size: "small",
6662
6834
  "aria-label": tooltip("addProject"),
6663
6835
  sx: { color: theme.palette.success.main },
6664
- children: /* @__PURE__ */ jsx14(AddIcon4, { size: 16 })
6836
+ children: /* @__PURE__ */ jsx15(AddIcon4, { size: 16 })
6665
6837
  }
6666
6838
  ) })
6667
6839
  ]
6668
6840
  }
6669
6841
  ),
6670
- /* @__PURE__ */ jsx14(Divider2, { sx: { opacity: 0.3 } }),
6671
- filteredProjectGroups.map((group, index) => /* @__PURE__ */ jsxs11(Box11, { children: [
6672
- group.id === null && filteredProjectGroups.length > 1 && /* @__PURE__ */ jsxs11(
6673
- Box11,
6842
+ /* @__PURE__ */ jsx15(Divider2, { sx: { opacity: 0.3 } }),
6843
+ filteredProjectGroups.map((group, index) => /* @__PURE__ */ jsxs12(Box12, { children: [
6844
+ group.id === null && filteredProjectGroups.length > 1 && /* @__PURE__ */ jsxs12(
6845
+ Box12,
6674
6846
  {
6675
6847
  sx: {
6676
6848
  py: 2,
@@ -6680,9 +6852,9 @@ var ConversationDrawer = ({ open, onClose }) => {
6680
6852
  gap: 2
6681
6853
  },
6682
6854
  children: [
6683
- /* @__PURE__ */ jsx14(Divider2, { sx: { flex: 1, opacity: 0.6 } }),
6684
- /* @__PURE__ */ jsxs11(Box11, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
6685
- /* @__PURE__ */ jsx14(
6855
+ /* @__PURE__ */ jsx15(Divider2, { sx: { flex: 1, opacity: 0.6 } }),
6856
+ /* @__PURE__ */ jsxs12(Box12, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
6857
+ /* @__PURE__ */ jsx15(
6686
6858
  InboxIcon3,
6687
6859
  {
6688
6860
  size: 14,
@@ -6690,8 +6862,8 @@ var ConversationDrawer = ({ open, onClose }) => {
6690
6862
  style: { opacity: 0.7 }
6691
6863
  }
6692
6864
  ),
6693
- /* @__PURE__ */ jsx14(
6694
- Typography7,
6865
+ /* @__PURE__ */ jsx15(
6866
+ Typography8,
6695
6867
  {
6696
6868
  variant: "caption",
6697
6869
  sx: {
@@ -6705,12 +6877,12 @@ var ConversationDrawer = ({ open, onClose }) => {
6705
6877
  }
6706
6878
  )
6707
6879
  ] }),
6708
- /* @__PURE__ */ jsx14(Divider2, { sx: { flex: 1, opacity: 0.6 } })
6880
+ /* @__PURE__ */ jsx15(Divider2, { sx: { flex: 1, opacity: 0.6 } })
6709
6881
  ]
6710
6882
  }
6711
6883
  ),
6712
- group.id !== null ? /* @__PURE__ */ jsxs11(Fragment7, { children: [
6713
- /* @__PURE__ */ jsx14(
6884
+ group.id !== null ? /* @__PURE__ */ jsxs12(Fragment7, { children: [
6885
+ /* @__PURE__ */ jsx15(
6714
6886
  project_header_default,
6715
6887
  {
6716
6888
  projectId: group.id,
@@ -6739,8 +6911,8 @@ var ConversationDrawer = ({ open, onClose }) => {
6739
6911
  }
6740
6912
  }
6741
6913
  ),
6742
- /* @__PURE__ */ jsx14(Collapse2, { in: !group.collapsed, children: /* @__PURE__ */ jsxs11(Box11, { sx: { pb: 1 }, children: [
6743
- group.conversations.map((conversation) => /* @__PURE__ */ jsx14(
6914
+ /* @__PURE__ */ jsx15(Collapse2, { in: !group.collapsed, children: /* @__PURE__ */ jsxs12(Box12, { sx: { pb: 1 }, children: [
6915
+ group.conversations.map((conversation) => /* @__PURE__ */ jsx15(
6744
6916
  simple_conversation_item_default,
6745
6917
  {
6746
6918
  conversation,
@@ -6760,8 +6932,8 @@ var ConversationDrawer = ({ open, onClose }) => {
6760
6932
  },
6761
6933
  conversation.id
6762
6934
  )),
6763
- group.conversations.length === 0 && !group.collapsed && group.id !== null && /* @__PURE__ */ jsxs11(
6764
- Box11,
6935
+ group.conversations.length === 0 && !group.collapsed && group.id !== null && /* @__PURE__ */ jsxs12(
6936
+ Box12,
6765
6937
  {
6766
6938
  sx: {
6767
6939
  p: 3,
@@ -6769,17 +6941,17 @@ var ConversationDrawer = ({ open, onClose }) => {
6769
6941
  color: theme.palette.text.secondary
6770
6942
  },
6771
6943
  children: [
6772
- /* @__PURE__ */ jsx14(Typography7, { variant: "body2", children: "No conversations in this project yet" }),
6773
- /* @__PURE__ */ jsx14(Typography7, { variant: "caption", sx: { mt: 1, display: "block" }, children: "Drag conversations here or use the + button above" })
6944
+ /* @__PURE__ */ jsx15(Typography8, { variant: "body2", children: "No conversations in this project yet" }),
6945
+ /* @__PURE__ */ jsx15(Typography8, { variant: "caption", sx: { mt: 1, display: "block" }, children: "Drag conversations here or use the + button above" })
6774
6946
  ]
6775
6947
  }
6776
6948
  )
6777
6949
  ] }) }),
6778
- /* @__PURE__ */ jsx14(Divider2, { sx: { opacity: 0.3 } })
6950
+ /* @__PURE__ */ jsx15(Divider2, { sx: { opacity: 0.3 } })
6779
6951
  ] }) : (
6780
6952
  // Special handling for ungrouped - no header, just conversations in scrollable area
6781
- /* @__PURE__ */ jsx14(
6782
- Box11,
6953
+ /* @__PURE__ */ jsx15(
6954
+ Box12,
6783
6955
  {
6784
6956
  sx: {
6785
6957
  minHeight: 0,
@@ -6792,7 +6964,7 @@ var ConversationDrawer = ({ open, onClose }) => {
6792
6964
  mx: 1,
6793
6965
  mb: 1
6794
6966
  },
6795
- children: group.conversations.map((conversation) => /* @__PURE__ */ jsx14(
6967
+ children: group.conversations.map((conversation) => /* @__PURE__ */ jsx15(
6796
6968
  simple_conversation_item_default,
6797
6969
  {
6798
6970
  conversation,
@@ -6816,8 +6988,8 @@ var ConversationDrawer = ({ open, onClose }) => {
6816
6988
  )
6817
6989
  )
6818
6990
  ] }, group.id || "ungrouped")),
6819
- filteredProjectGroups.length === 0 && /* @__PURE__ */ jsxs11(
6820
- Box11,
6991
+ filteredProjectGroups.length === 0 && /* @__PURE__ */ jsxs12(
6992
+ Box12,
6821
6993
  {
6822
6994
  sx: {
6823
6995
  flex: 1,
@@ -6830,14 +7002,14 @@ var ConversationDrawer = ({ open, onClose }) => {
6830
7002
  color: theme.palette.text.secondary
6831
7003
  },
6832
7004
  children: [
6833
- /* @__PURE__ */ jsx14(Typography7, { variant: "h6", sx: { mb: 1 }, children: searchQuery ? "No conversations found" : "No conversations yet" }),
6834
- /* @__PURE__ */ jsx14(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" })
7005
+ /* @__PURE__ */ jsx15(Typography8, { variant: "h6", sx: { mb: 1 }, children: searchQuery ? "No conversations found" : "No conversations yet" }),
7006
+ /* @__PURE__ */ jsx15(Typography8, { variant: "body2", sx: { mb: 3, maxWidth: 280 }, children: searchQuery ? `No conversations match "${searchQuery}"` : "Start your first conversation to begin organizing your chats into projects" })
6835
7007
  ]
6836
7008
  }
6837
7009
  )
6838
7010
  ] }),
6839
- /* @__PURE__ */ jsxs11(
6840
- Box11,
7011
+ /* @__PURE__ */ jsxs12(
7012
+ Box12,
6841
7013
  {
6842
7014
  onClick: user ? () => {
6843
7015
  window.location.href = "/profile";
@@ -6858,7 +7030,7 @@ var ConversationDrawer = ({ open, onClose }) => {
6858
7030
  "&:hover": user ? { bgcolor: alpha6(theme.palette.primary.main, 0.08) } : void 0
6859
7031
  },
6860
7032
  children: [
6861
- /* @__PURE__ */ jsx14(
7033
+ /* @__PURE__ */ jsx15(
6862
7034
  Avatar6,
6863
7035
  {
6864
7036
  src: avatarImage,
@@ -6873,8 +7045,8 @@ var ConversationDrawer = ({ open, onClose }) => {
6873
7045
  children: avatarInitials
6874
7046
  }
6875
7047
  ),
6876
- /* @__PURE__ */ jsxs11(
6877
- Box11,
7048
+ /* @__PURE__ */ jsxs12(
7049
+ Box12,
6878
7050
  {
6879
7051
  sx: {
6880
7052
  minWidth: 0,
@@ -6886,8 +7058,8 @@ var ConversationDrawer = ({ open, onClose }) => {
6886
7058
  gap: 0.25
6887
7059
  },
6888
7060
  children: [
6889
- /* @__PURE__ */ jsx14(
6890
- Typography7,
7061
+ /* @__PURE__ */ jsx15(
7062
+ Typography8,
6891
7063
  {
6892
7064
  variant: "subtitle2",
6893
7065
  noWrap: true,
@@ -6895,8 +7067,8 @@ var ConversationDrawer = ({ open, onClose }) => {
6895
7067
  children: user ? userDisplayName : "Not signed in"
6896
7068
  }
6897
7069
  ),
6898
- /* @__PURE__ */ jsx14(
6899
- Typography7,
7070
+ /* @__PURE__ */ jsx15(
7071
+ Typography8,
6900
7072
  {
6901
7073
  variant: "caption",
6902
7074
  noWrap: true,
@@ -6907,9 +7079,9 @@ var ConversationDrawer = ({ open, onClose }) => {
6907
7079
  ]
6908
7080
  }
6909
7081
  ),
6910
- user && /* @__PURE__ */ jsxs11(Fragment7, { children: [
6911
- /* @__PURE__ */ jsx14(
6912
- Box11,
7082
+ user && /* @__PURE__ */ jsxs12(Fragment7, { children: [
7083
+ /* @__PURE__ */ jsx15(
7084
+ Box12,
6913
7085
  {
6914
7086
  sx: {
6915
7087
  flexShrink: 0,
@@ -6922,11 +7094,11 @@ var ConversationDrawer = ({ open, onClose }) => {
6922
7094
  border: `1px solid ${alpha6(theme.palette.divider, 0.8)}`,
6923
7095
  color: theme.palette.text.secondary
6924
7096
  },
6925
- children: /* @__PURE__ */ jsx14(SettingsIcon2, { size: 16 })
7097
+ children: /* @__PURE__ */ jsx15(SettingsIcon2, { size: 16 })
6926
7098
  }
6927
7099
  ),
6928
- /* @__PURE__ */ jsx14(
6929
- IconButton8,
7100
+ /* @__PURE__ */ jsx15(
7101
+ IconButton9,
6930
7102
  {
6931
7103
  "aria-label": "Sign out",
6932
7104
  title: "Sign out",
@@ -6943,7 +7115,7 @@ var ConversationDrawer = ({ open, onClose }) => {
6943
7115
  color: theme.palette.error.main,
6944
7116
  "&:hover": { bgcolor: alpha6(theme.palette.error.main, 0.1) }
6945
7117
  },
6946
- children: /* @__PURE__ */ jsx14(LogOutIcon, { size: 16 })
7118
+ children: /* @__PURE__ */ jsx15(LogOutIcon, { size: 16 })
6947
7119
  }
6948
7120
  )
6949
7121
  ] })
@@ -6953,15 +7125,15 @@ var ConversationDrawer = ({ open, onClose }) => {
6953
7125
  ]
6954
7126
  }
6955
7127
  ),
6956
- /* @__PURE__ */ jsx14(
7128
+ /* @__PURE__ */ jsx15(
6957
7129
  project_management_modal_default,
6958
7130
  {
6959
7131
  open: projectManagementOpen,
6960
7132
  onClose: () => setProjectManagementOpen(false)
6961
7133
  }
6962
7134
  ),
6963
- /* @__PURE__ */ jsx14(memory_modal_default, { open: memoryModalOpen, onClose: () => setMemoryModalOpen(false) }),
6964
- conversationToMove && /* @__PURE__ */ jsx14(
7135
+ /* @__PURE__ */ jsx15(memory_modal_default, { open: memoryModalOpen, onClose: () => setMemoryModalOpen(false) }),
7136
+ conversationToMove && /* @__PURE__ */ jsx15(
6965
7137
  move_conversation_modal_default,
6966
7138
  {
6967
7139
  open: moveModalOpen,
@@ -6970,7 +7142,7 @@ var ConversationDrawer = ({ open, onClose }) => {
6970
7142
  currentProjectId: conversationToMove.projectId
6971
7143
  }
6972
7144
  ),
6973
- /* @__PURE__ */ jsx14(
7145
+ /* @__PURE__ */ jsx15(
6974
7146
  Menu3,
6975
7147
  {
6976
7148
  anchorEl: menuAnchorEl,
@@ -6984,7 +7156,7 @@ var ConversationDrawer = ({ open, onClose }) => {
6984
7156
  vertical: "bottom",
6985
7157
  horizontal: "right"
6986
7158
  },
6987
- children: /* @__PURE__ */ jsxs11(
7159
+ children: /* @__PURE__ */ jsxs12(
6988
7160
  MenuItem3,
6989
7161
  {
6990
7162
  onClick: () => {
@@ -6993,14 +7165,14 @@ var ConversationDrawer = ({ open, onClose }) => {
6993
7165
  },
6994
7166
  sx: { color: theme.palette.error.main },
6995
7167
  children: [
6996
- /* @__PURE__ */ jsx14(ListItemIcon3, { children: /* @__PURE__ */ jsx14(DeleteSweepIcon, { size: 16, color: theme.palette.error.main }) }),
6997
- /* @__PURE__ */ jsx14(ListItemText3, { children: "Clear All Conversations" })
7168
+ /* @__PURE__ */ jsx15(ListItemIcon3, { children: /* @__PURE__ */ jsx15(DeleteSweepIcon, { size: 16, color: theme.palette.error.main }) }),
7169
+ /* @__PURE__ */ jsx15(ListItemText3, { children: "Clear All Conversations" })
6998
7170
  ]
6999
7171
  }
7000
7172
  )
7001
7173
  }
7002
7174
  ),
7003
- /* @__PURE__ */ jsxs11(
7175
+ /* @__PURE__ */ jsxs12(
7004
7176
  Dialog4,
7005
7177
  {
7006
7178
  open: clearConfirmOpen,
@@ -7008,12 +7180,12 @@ var ConversationDrawer = ({ open, onClose }) => {
7008
7180
  maxWidth: "sm",
7009
7181
  fullWidth: true,
7010
7182
  children: [
7011
- /* @__PURE__ */ jsx14(DialogTitle3, { children: "Clear All Conversations?" }),
7012
- /* @__PURE__ */ jsx14(DialogContent3, { children: /* @__PURE__ */ jsx14(Typography7, { children: "This will permanently delete all conversations and cannot be undone. Are you sure you want to continue?" }) }),
7013
- /* @__PURE__ */ jsxs11(DialogActions3, { children: [
7014
- /* @__PURE__ */ jsx14(Button5, { onClick: () => setClearConfirmOpen(false), children: "Cancel" }),
7015
- /* @__PURE__ */ jsx14(
7016
- Button5,
7183
+ /* @__PURE__ */ jsx15(DialogTitle3, { children: "Clear All Conversations?" }),
7184
+ /* @__PURE__ */ jsx15(DialogContent3, { children: /* @__PURE__ */ jsx15(Typography8, { children: "This will permanently delete all conversations and cannot be undone. Are you sure you want to continue?" }) }),
7185
+ /* @__PURE__ */ jsxs12(DialogActions3, { children: [
7186
+ /* @__PURE__ */ jsx15(Button6, { onClick: () => setClearConfirmOpen(false), children: "Cancel" }),
7187
+ /* @__PURE__ */ jsx15(
7188
+ Button6,
7017
7189
  {
7018
7190
  onClick: handleClearAllConfirm,
7019
7191
  color: "error",
@@ -7030,12 +7202,12 @@ var ConversationDrawer = ({ open, onClose }) => {
7030
7202
  var conversation_drawer_default = ConversationDrawer;
7031
7203
 
7032
7204
  // src/chat/enhanced-mobile-conversations-modal.tsx
7033
- import { useState as useState14, useMemo as useMemo3, useEffect as useEffect11, useRef as useRef9, useCallback as useCallback5 } from "react";
7205
+ import { useState as useState14, useMemo as useMemo3, useEffect as useEffect11, useRef as useRef10, useCallback as useCallback5 } from "react";
7034
7206
  import {
7035
- Box as Box12,
7036
- IconButton as IconButton9,
7207
+ Box as Box13,
7208
+ IconButton as IconButton10,
7037
7209
  Modal as Modal2,
7038
- Typography as Typography8,
7210
+ Typography as Typography9,
7039
7211
  TextField as TextField8,
7040
7212
  InputAdornment as InputAdornment2,
7041
7213
  Slide,
@@ -7049,15 +7221,15 @@ import {
7049
7221
  DialogTitle as DialogTitle4,
7050
7222
  DialogContent as DialogContent4,
7051
7223
  DialogActions as DialogActions4,
7052
- Button as Button6,
7224
+ Button as Button7,
7053
7225
  AppBar,
7054
7226
  Toolbar,
7055
7227
  Avatar as Avatar7,
7056
7228
  Chip as Chip4
7057
7229
  } from "@mui/material";
7058
7230
  import { X as CloseIcon6, X as ClearIcon2, Search as SearchIcon2, Folder as FolderIcon5, MoreVertical as MoreVertIcon4, Trash2 as DeleteSweepIcon2, Inbox as InboxIcon4, Plus as AddIcon5, Settings as SettingsIcon3, Brain as MemoryIcon2, LogOut as LogOutIcon2 } from "lucide-react";
7059
- import { useTheme as useTheme11, alpha as alpha7 } from "@mui/material/styles";
7060
- import { Fragment as Fragment8, jsx as jsx15, jsxs as jsxs12 } from "react/jsx-runtime";
7231
+ import { useTheme as useTheme12, alpha as alpha7 } from "@mui/material/styles";
7232
+ import { Fragment as Fragment8, jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
7061
7233
  var BANDIT_AVATAR2 = "https://cdn.burtson.ai/images/bandit-head.png";
7062
7234
  var coerceOptionalString2 = (value) => {
7063
7235
  if (typeof value !== "string") return void 0;
@@ -7088,7 +7260,7 @@ var EnhancedMobileConversationsModal = ({
7088
7260
  open,
7089
7261
  onClose
7090
7262
  }) => {
7091
- const theme = useTheme11();
7263
+ const theme = useTheme12();
7092
7264
  const { user } = useAuthenticationStore();
7093
7265
  const {
7094
7266
  conversations,
@@ -7111,7 +7283,7 @@ var EnhancedMobileConversationsModal = ({
7111
7283
  const [projectManagementOpen, setProjectManagementOpen] = useState14(false);
7112
7284
  const [memoryModalOpen, setMemoryModalOpen] = useState14(false);
7113
7285
  const [collapsedProjects, setCollapsedProjects] = useState14(/* @__PURE__ */ new Set());
7114
- const didInitCollapseRef = useRef9(false);
7286
+ const didInitCollapseRef = useRef10(false);
7115
7287
  const [searchQuery, setSearchQuery] = useState14("");
7116
7288
  const [menuAnchorEl, setMenuAnchorEl] = useState14(null);
7117
7289
  const [clearConfirmOpen, setClearConfirmOpen] = useState14(false);
@@ -7391,8 +7563,8 @@ var EnhancedMobileConversationsModal = ({
7391
7563
  return changed ? next : prev;
7392
7564
  });
7393
7565
  }, [conversations]);
7394
- return /* @__PURE__ */ jsxs12(Fragment8, { children: [
7395
- /* @__PURE__ */ jsx15(
7566
+ return /* @__PURE__ */ jsxs13(Fragment8, { children: [
7567
+ /* @__PURE__ */ jsx16(
7396
7568
  Modal2,
7397
7569
  {
7398
7570
  open,
@@ -7401,8 +7573,8 @@ var EnhancedMobileConversationsModal = ({
7401
7573
  display: "flex",
7402
7574
  alignItems: "flex-end"
7403
7575
  },
7404
- children: /* @__PURE__ */ jsx15(Slide, { direction: "up", in: open, children: /* @__PURE__ */ jsxs12(
7405
- Box12,
7576
+ children: /* @__PURE__ */ jsx16(Slide, { direction: "up", in: open, children: /* @__PURE__ */ jsxs13(
7577
+ Box13,
7406
7578
  {
7407
7579
  sx: {
7408
7580
  width: "100%",
@@ -7415,7 +7587,7 @@ var EnhancedMobileConversationsModal = ({
7415
7587
  overflow: "hidden"
7416
7588
  },
7417
7589
  children: [
7418
- /* @__PURE__ */ jsx15(
7590
+ /* @__PURE__ */ jsx16(
7419
7591
  AppBar,
7420
7592
  {
7421
7593
  position: "static",
@@ -7425,9 +7597,9 @@ var EnhancedMobileConversationsModal = ({
7425
7597
  color: theme.palette.text.primary,
7426
7598
  borderBottom: `1px solid ${theme.palette.divider}`
7427
7599
  },
7428
- children: /* @__PURE__ */ jsxs12(Toolbar, { children: [
7429
- /* @__PURE__ */ jsx15(Typography8, { variant: "h6", sx: { flex: 1, fontWeight: 600 }, children: "Conversations" }),
7430
- visibleConversationCount > 0 && /* @__PURE__ */ jsx15(
7600
+ children: /* @__PURE__ */ jsxs13(Toolbar, { children: [
7601
+ /* @__PURE__ */ jsx16(Typography9, { variant: "h6", sx: { flex: 1, fontWeight: 600 }, children: "Conversations" }),
7602
+ visibleConversationCount > 0 && /* @__PURE__ */ jsx16(
7431
7603
  Chip4,
7432
7604
  {
7433
7605
  label: visibleConversationCount,
@@ -7440,43 +7612,43 @@ var EnhancedMobileConversationsModal = ({
7440
7612
  }
7441
7613
  }
7442
7614
  ),
7443
- /* @__PURE__ */ jsx15(
7444
- IconButton9,
7615
+ /* @__PURE__ */ jsx16(
7616
+ IconButton10,
7445
7617
  {
7446
7618
  onClick: () => setMemoryModalOpen(true),
7447
7619
  "aria-label": "Memory",
7448
7620
  sx: { color: theme.palette.text.secondary },
7449
- children: /* @__PURE__ */ jsx15(MemoryIcon2, {})
7621
+ children: /* @__PURE__ */ jsx16(MemoryIcon2, {})
7450
7622
  }
7451
7623
  ),
7452
- /* @__PURE__ */ jsx15(
7453
- IconButton9,
7624
+ /* @__PURE__ */ jsx16(
7625
+ IconButton10,
7454
7626
  {
7455
7627
  onClick: () => setProjectManagementOpen(true),
7456
7628
  sx: { color: theme.palette.text.secondary },
7457
- children: /* @__PURE__ */ jsx15(FolderIcon5, {})
7629
+ children: /* @__PURE__ */ jsx16(FolderIcon5, {})
7458
7630
  }
7459
7631
  ),
7460
- /* @__PURE__ */ jsx15(
7461
- IconButton9,
7632
+ /* @__PURE__ */ jsx16(
7633
+ IconButton10,
7462
7634
  {
7463
7635
  onClick: handleMenuOpen,
7464
7636
  sx: { color: theme.palette.text.secondary },
7465
- children: /* @__PURE__ */ jsx15(MoreVertIcon4, {})
7637
+ children: /* @__PURE__ */ jsx16(MoreVertIcon4, {})
7466
7638
  }
7467
7639
  ),
7468
- /* @__PURE__ */ jsx15(
7469
- IconButton9,
7640
+ /* @__PURE__ */ jsx16(
7641
+ IconButton10,
7470
7642
  {
7471
7643
  onClick: onClose,
7472
7644
  sx: { color: theme.palette.text.secondary },
7473
- children: /* @__PURE__ */ jsx15(CloseIcon6, {})
7645
+ children: /* @__PURE__ */ jsx16(CloseIcon6, {})
7474
7646
  }
7475
7647
  )
7476
7648
  ] })
7477
7649
  }
7478
7650
  ),
7479
- /* @__PURE__ */ jsx15(Box12, { sx: { p: 2, pb: 1 }, children: /* @__PURE__ */ jsx15(
7651
+ /* @__PURE__ */ jsx16(Box13, { sx: { p: 2, pb: 1 }, children: /* @__PURE__ */ jsx16(
7480
7652
  TextField8,
7481
7653
  {
7482
7654
  fullWidth: true,
@@ -7486,22 +7658,22 @@ var EnhancedMobileConversationsModal = ({
7486
7658
  onChange: (e) => setSearchQuery(e.target.value),
7487
7659
  variant: "outlined",
7488
7660
  InputProps: {
7489
- startAdornment: /* @__PURE__ */ jsx15(InputAdornment2, { position: "start", children: /* @__PURE__ */ jsx15(SearchIcon2, { size: 16, color: theme.palette.text.secondary }) }),
7490
- endAdornment: searchQuery && /* @__PURE__ */ jsx15(InputAdornment2, { position: "end", children: /* @__PURE__ */ jsx15(
7491
- IconButton9,
7661
+ startAdornment: /* @__PURE__ */ jsx16(InputAdornment2, { position: "start", children: /* @__PURE__ */ jsx16(SearchIcon2, { size: 16, color: theme.palette.text.secondary }) }),
7662
+ endAdornment: searchQuery && /* @__PURE__ */ jsx16(InputAdornment2, { position: "end", children: /* @__PURE__ */ jsx16(
7663
+ IconButton10,
7492
7664
  {
7493
7665
  onClick: handleSearchClear,
7494
7666
  size: "small",
7495
7667
  edge: "end",
7496
7668
  sx: { color: theme.palette.text.secondary },
7497
- children: /* @__PURE__ */ jsx15(ClearIcon2, { size: 16 })
7669
+ children: /* @__PURE__ */ jsx16(ClearIcon2, { size: 16 })
7498
7670
  }
7499
7671
  ) })
7500
7672
  }
7501
7673
  }
7502
7674
  ) }),
7503
- /* @__PURE__ */ jsxs12(
7504
- Box12,
7675
+ /* @__PURE__ */ jsxs13(
7676
+ Box13,
7505
7677
  {
7506
7678
  sx: {
7507
7679
  flex: 1,
@@ -7512,8 +7684,8 @@ var EnhancedMobileConversationsModal = ({
7512
7684
  pb: 2
7513
7685
  },
7514
7686
  children: [
7515
- touchDragActive && activeDragConversation && /* @__PURE__ */ jsxs12(
7516
- Box12,
7687
+ touchDragActive && activeDragConversation && /* @__PURE__ */ jsxs13(
7688
+ Box13,
7517
7689
  {
7518
7690
  sx: {
7519
7691
  position: "absolute",
@@ -7538,8 +7710,8 @@ var EnhancedMobileConversationsModal = ({
7538
7710
  overflow: "hidden"
7539
7711
  },
7540
7712
  children: [
7541
- /* @__PURE__ */ jsxs12(
7542
- Typography8,
7713
+ /* @__PURE__ */ jsxs13(
7714
+ Typography9,
7543
7715
  {
7544
7716
  variant: "caption",
7545
7717
  sx: {
@@ -7551,8 +7723,8 @@ var EnhancedMobileConversationsModal = ({
7551
7723
  },
7552
7724
  children: [
7553
7725
  "Move",
7554
- /* @__PURE__ */ jsxs12(
7555
- Box12,
7726
+ /* @__PURE__ */ jsxs13(
7727
+ Box13,
7556
7728
  {
7557
7729
  component: "span",
7558
7730
  sx: {
@@ -7572,8 +7744,8 @@ var EnhancedMobileConversationsModal = ({
7572
7744
  ]
7573
7745
  }
7574
7746
  ),
7575
- /* @__PURE__ */ jsx15(
7576
- Typography8,
7747
+ /* @__PURE__ */ jsx16(
7748
+ Typography9,
7577
7749
  {
7578
7750
  variant: "caption",
7579
7751
  color: "inherit",
@@ -7581,11 +7753,11 @@ var EnhancedMobileConversationsModal = ({
7581
7753
  fontWeight: 500,
7582
7754
  whiteSpace: "nowrap"
7583
7755
  },
7584
- children: activeHoverLabel ? /* @__PURE__ */ jsxs12(Fragment8, { children: [
7756
+ children: activeHoverLabel ? /* @__PURE__ */ jsxs13(Fragment8, { children: [
7585
7757
  "to",
7586
7758
  " ",
7587
- /* @__PURE__ */ jsx15(
7588
- Box12,
7759
+ /* @__PURE__ */ jsx16(
7760
+ Box13,
7589
7761
  {
7590
7762
  component: "span",
7591
7763
  sx: {
@@ -7601,8 +7773,8 @@ var EnhancedMobileConversationsModal = ({
7601
7773
  ]
7602
7774
  }
7603
7775
  ),
7604
- /* @__PURE__ */ jsxs12(
7605
- Box12,
7776
+ /* @__PURE__ */ jsxs13(
7777
+ Box13,
7606
7778
  {
7607
7779
  onClick: async () => {
7608
7780
  const names = new Set(projects.map((p) => p.name));
@@ -7636,8 +7808,8 @@ var EnhancedMobileConversationsModal = ({
7636
7808
  "&:hover": { bgcolor: alpha7(theme.palette.text.primary, 0.04) }
7637
7809
  },
7638
7810
  children: [
7639
- /* @__PURE__ */ jsx15(
7640
- Box12,
7811
+ /* @__PURE__ */ jsx16(
7812
+ Box13,
7641
7813
  {
7642
7814
  sx: {
7643
7815
  width: 28,
@@ -7649,25 +7821,25 @@ var EnhancedMobileConversationsModal = ({
7649
7821
  justifyContent: "center",
7650
7822
  flexShrink: 0
7651
7823
  },
7652
- children: /* @__PURE__ */ jsx15(FolderIcon5, { size: 16, color: theme.palette.success.main })
7824
+ children: /* @__PURE__ */ jsx16(FolderIcon5, { size: 16, color: theme.palette.success.main })
7653
7825
  }
7654
7826
  ),
7655
- /* @__PURE__ */ jsx15(
7656
- Typography8,
7827
+ /* @__PURE__ */ jsx16(
7828
+ Typography9,
7657
7829
  {
7658
7830
  variant: "subtitle2",
7659
7831
  sx: { flex: 1, fontWeight: 600, fontSize: "0.875rem" },
7660
7832
  children: "New Project"
7661
7833
  }
7662
7834
  ),
7663
- /* @__PURE__ */ jsx15(IconButton9, { size: "small", sx: { color: theme.palette.success.main }, children: /* @__PURE__ */ jsx15(AddIcon5, { size: 16 }) })
7835
+ /* @__PURE__ */ jsx16(IconButton10, { size: "small", sx: { color: theme.palette.success.main }, children: /* @__PURE__ */ jsx16(AddIcon5, { size: 16 }) })
7664
7836
  ]
7665
7837
  }
7666
7838
  ),
7667
- /* @__PURE__ */ jsx15(Divider3, { sx: { opacity: 0.3 } }),
7668
- filteredProjectGroups.map((group, index) => /* @__PURE__ */ jsxs12(Box12, { children: [
7669
- group.id === null && filteredProjectGroups.length > 1 && /* @__PURE__ */ jsxs12(
7670
- Box12,
7839
+ /* @__PURE__ */ jsx16(Divider3, { sx: { opacity: 0.3 } }),
7840
+ filteredProjectGroups.map((group, index) => /* @__PURE__ */ jsxs13(Box13, { children: [
7841
+ group.id === null && filteredProjectGroups.length > 1 && /* @__PURE__ */ jsxs13(
7842
+ Box13,
7671
7843
  {
7672
7844
  sx: {
7673
7845
  py: 2,
@@ -7677,9 +7849,9 @@ var EnhancedMobileConversationsModal = ({
7677
7849
  gap: 2
7678
7850
  },
7679
7851
  children: [
7680
- /* @__PURE__ */ jsx15(Divider3, { sx: { flex: 1, opacity: 0.6 } }),
7681
- /* @__PURE__ */ jsxs12(Box12, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
7682
- /* @__PURE__ */ jsx15(
7852
+ /* @__PURE__ */ jsx16(Divider3, { sx: { flex: 1, opacity: 0.6 } }),
7853
+ /* @__PURE__ */ jsxs13(Box13, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
7854
+ /* @__PURE__ */ jsx16(
7683
7855
  InboxIcon4,
7684
7856
  {
7685
7857
  size: 14,
@@ -7687,8 +7859,8 @@ var EnhancedMobileConversationsModal = ({
7687
7859
  style: { opacity: 0.7 }
7688
7860
  }
7689
7861
  ),
7690
- /* @__PURE__ */ jsx15(
7691
- Typography8,
7862
+ /* @__PURE__ */ jsx16(
7863
+ Typography9,
7692
7864
  {
7693
7865
  variant: "caption",
7694
7866
  sx: {
@@ -7702,12 +7874,12 @@ var EnhancedMobileConversationsModal = ({
7702
7874
  }
7703
7875
  )
7704
7876
  ] }),
7705
- /* @__PURE__ */ jsx15(Divider3, { sx: { flex: 1, opacity: 0.6 } })
7877
+ /* @__PURE__ */ jsx16(Divider3, { sx: { flex: 1, opacity: 0.6 } })
7706
7878
  ]
7707
7879
  }
7708
7880
  ),
7709
- group.id !== null ? /* @__PURE__ */ jsxs12(Fragment8, { children: [
7710
- /* @__PURE__ */ jsx15(
7881
+ group.id !== null ? /* @__PURE__ */ jsxs13(Fragment8, { children: [
7882
+ /* @__PURE__ */ jsx16(
7711
7883
  project_header_default,
7712
7884
  {
7713
7885
  projectId: group.id,
@@ -7737,8 +7909,8 @@ var EnhancedMobileConversationsModal = ({
7737
7909
  isTouchTarget: touchDragActive && touchDragState.hoverProjectId === group.id
7738
7910
  }
7739
7911
  ),
7740
- /* @__PURE__ */ jsx15(Collapse3, { in: !group.collapsed, children: /* @__PURE__ */ jsx15(
7741
- Box12,
7912
+ /* @__PURE__ */ jsx16(Collapse3, { in: !group.collapsed, children: /* @__PURE__ */ jsx16(
7913
+ Box13,
7742
7914
  {
7743
7915
  "data-project-id": group.id ?? "__ungrouped",
7744
7916
  sx: {
@@ -7748,7 +7920,7 @@ var EnhancedMobileConversationsModal = ({
7748
7920
  transition: "border 0.2s ease, background-color 0.2s ease",
7749
7921
  backgroundColor: touchDragActive && touchDragState.hoverProjectId === group.id ? alpha7(theme.palette.primary.main, 0.08) : "transparent"
7750
7922
  },
7751
- children: group.conversations.map((conversation) => /* @__PURE__ */ jsx15(
7923
+ children: group.conversations.map((conversation) => /* @__PURE__ */ jsx16(
7752
7924
  simple_conversation_item_default,
7753
7925
  {
7754
7926
  conversation,
@@ -7782,8 +7954,8 @@ var EnhancedMobileConversationsModal = ({
7782
7954
  ) })
7783
7955
  ] }) : (
7784
7956
  // Special handling for ungrouped - no header, just conversations in scrollable area
7785
- /* @__PURE__ */ jsx15(
7786
- Box12,
7957
+ /* @__PURE__ */ jsx16(
7958
+ Box13,
7787
7959
  {
7788
7960
  sx: {
7789
7961
  minHeight: 0,
@@ -7799,7 +7971,7 @@ var EnhancedMobileConversationsModal = ({
7799
7971
  backgroundColor: touchDragActive && touchDragState.hoverProjectId === "__ungrouped" ? alpha7(theme.palette.primary.main, 0.08) : alpha7(theme.palette.background.default, 0.3)
7800
7972
  },
7801
7973
  "data-project-id": "__ungrouped",
7802
- children: group.conversations.map((conversation) => /* @__PURE__ */ jsx15(
7974
+ children: group.conversations.map((conversation) => /* @__PURE__ */ jsx16(
7803
7975
  simple_conversation_item_default,
7804
7976
  {
7805
7977
  conversation,
@@ -7833,8 +8005,8 @@ var EnhancedMobileConversationsModal = ({
7833
8005
  )
7834
8006
  )
7835
8007
  ] }, group.id || "ungrouped")),
7836
- filteredProjectGroups.length === 0 && /* @__PURE__ */ jsxs12(
7837
- Box12,
8008
+ filteredProjectGroups.length === 0 && /* @__PURE__ */ jsxs13(
8009
+ Box13,
7838
8010
  {
7839
8011
  sx: {
7840
8012
  flex: 1,
@@ -7847,16 +8019,16 @@ var EnhancedMobileConversationsModal = ({
7847
8019
  color: theme.palette.text.secondary
7848
8020
  },
7849
8021
  children: [
7850
- /* @__PURE__ */ jsx15(Typography8, { variant: "h6", sx: { mb: 1 }, children: searchQuery ? "No conversations found" : "No conversations yet" }),
7851
- /* @__PURE__ */ jsx15(Typography8, { variant: "body2", sx: { mb: 3, maxWidth: 280 }, children: searchQuery ? `No conversations match "${searchQuery}"` : "Start your first conversation to begin organizing your chats into projects" })
8022
+ /* @__PURE__ */ jsx16(Typography9, { variant: "h6", sx: { mb: 1 }, children: searchQuery ? "No conversations found" : "No conversations yet" }),
8023
+ /* @__PURE__ */ jsx16(Typography9, { variant: "body2", sx: { mb: 3, maxWidth: 280 }, children: searchQuery ? `No conversations match "${searchQuery}"` : "Start your first conversation to begin organizing your chats into projects" })
7852
8024
  ]
7853
8025
  }
7854
8026
  )
7855
8027
  ]
7856
8028
  }
7857
8029
  ),
7858
- /* @__PURE__ */ jsxs12(
7859
- Box12,
8030
+ /* @__PURE__ */ jsxs13(
8031
+ Box13,
7860
8032
  {
7861
8033
  onClick: user ? () => {
7862
8034
  window.location.href = "/profile";
@@ -7873,7 +8045,7 @@ var EnhancedMobileConversationsModal = ({
7873
8045
  cursor: user ? "pointer" : "default"
7874
8046
  },
7875
8047
  children: [
7876
- /* @__PURE__ */ jsx15(
8048
+ /* @__PURE__ */ jsx16(
7877
8049
  Avatar7,
7878
8050
  {
7879
8051
  src: avatarImage,
@@ -7888,9 +8060,9 @@ var EnhancedMobileConversationsModal = ({
7888
8060
  children: avatarInitials
7889
8061
  }
7890
8062
  ),
7891
- /* @__PURE__ */ jsxs12(Box12, { sx: { display: "flex", flexDirection: "column", flex: 1, minWidth: 0, gap: 0.25 }, children: [
7892
- /* @__PURE__ */ jsx15(
7893
- Typography8,
8063
+ /* @__PURE__ */ jsxs13(Box13, { sx: { display: "flex", flexDirection: "column", flex: 1, minWidth: 0, gap: 0.25 }, children: [
8064
+ /* @__PURE__ */ jsx16(
8065
+ Typography9,
7894
8066
  {
7895
8067
  variant: "subtitle2",
7896
8068
  noWrap: true,
@@ -7898,8 +8070,8 @@ var EnhancedMobileConversationsModal = ({
7898
8070
  children: user ? userDisplayName : "Not signed in"
7899
8071
  }
7900
8072
  ),
7901
- /* @__PURE__ */ jsx15(
7902
- Typography8,
8073
+ /* @__PURE__ */ jsx16(
8074
+ Typography9,
7903
8075
  {
7904
8076
  variant: "caption",
7905
8077
  noWrap: true,
@@ -7908,9 +8080,9 @@ var EnhancedMobileConversationsModal = ({
7908
8080
  }
7909
8081
  )
7910
8082
  ] }),
7911
- user && /* @__PURE__ */ jsxs12(Fragment8, { children: [
7912
- /* @__PURE__ */ jsx15(
7913
- Box12,
8083
+ user && /* @__PURE__ */ jsxs13(Fragment8, { children: [
8084
+ /* @__PURE__ */ jsx16(
8085
+ Box13,
7914
8086
  {
7915
8087
  sx: {
7916
8088
  flexShrink: 0,
@@ -7923,11 +8095,11 @@ var EnhancedMobileConversationsModal = ({
7923
8095
  border: `1px solid ${alpha7(theme.palette.divider, 0.8)}`,
7924
8096
  color: theme.palette.text.secondary
7925
8097
  },
7926
- children: /* @__PURE__ */ jsx15(SettingsIcon3, { size: 16 })
8098
+ children: /* @__PURE__ */ jsx16(SettingsIcon3, { size: 16 })
7927
8099
  }
7928
8100
  ),
7929
- /* @__PURE__ */ jsx15(
7930
- IconButton9,
8101
+ /* @__PURE__ */ jsx16(
8102
+ IconButton10,
7931
8103
  {
7932
8104
  "aria-label": "Sign out",
7933
8105
  title: "Sign out",
@@ -7944,7 +8116,7 @@ var EnhancedMobileConversationsModal = ({
7944
8116
  color: theme.palette.error.main,
7945
8117
  "&:hover": { bgcolor: alpha7(theme.palette.error.main, 0.1) }
7946
8118
  },
7947
- children: /* @__PURE__ */ jsx15(LogOutIcon2, { size: 16 })
8119
+ children: /* @__PURE__ */ jsx16(LogOutIcon2, { size: 16 })
7948
8120
  }
7949
8121
  )
7950
8122
  ] })
@@ -7956,15 +8128,15 @@ var EnhancedMobileConversationsModal = ({
7956
8128
  ) })
7957
8129
  }
7958
8130
  ),
7959
- /* @__PURE__ */ jsx15(
8131
+ /* @__PURE__ */ jsx16(
7960
8132
  project_management_modal_default,
7961
8133
  {
7962
8134
  open: projectManagementOpen,
7963
8135
  onClose: () => setProjectManagementOpen(false)
7964
8136
  }
7965
8137
  ),
7966
- /* @__PURE__ */ jsx15(memory_modal_default, { open: memoryModalOpen, onClose: () => setMemoryModalOpen(false) }),
7967
- conversationToMove && /* @__PURE__ */ jsx15(
8138
+ /* @__PURE__ */ jsx16(memory_modal_default, { open: memoryModalOpen, onClose: () => setMemoryModalOpen(false) }),
8139
+ conversationToMove && /* @__PURE__ */ jsx16(
7968
8140
  move_conversation_modal_default,
7969
8141
  {
7970
8142
  open: moveModalOpen,
@@ -7973,7 +8145,7 @@ var EnhancedMobileConversationsModal = ({
7973
8145
  currentProjectId: conversationToMove.projectId
7974
8146
  }
7975
8147
  ),
7976
- /* @__PURE__ */ jsx15(
8148
+ /* @__PURE__ */ jsx16(
7977
8149
  Menu4,
7978
8150
  {
7979
8151
  anchorEl: menuAnchorEl,
@@ -7987,7 +8159,7 @@ var EnhancedMobileConversationsModal = ({
7987
8159
  vertical: "bottom",
7988
8160
  horizontal: "right"
7989
8161
  },
7990
- children: /* @__PURE__ */ jsxs12(
8162
+ children: /* @__PURE__ */ jsxs13(
7991
8163
  MenuItem4,
7992
8164
  {
7993
8165
  onClick: () => {
@@ -7997,14 +8169,14 @@ var EnhancedMobileConversationsModal = ({
7997
8169
  disabled: visibleConversationCount === 0,
7998
8170
  sx: { color: theme.palette.error.main },
7999
8171
  children: [
8000
- /* @__PURE__ */ jsx15(ListItemIcon4, { children: /* @__PURE__ */ jsx15(DeleteSweepIcon2, { size: 16, color: theme.palette.error.main }) }),
8001
- /* @__PURE__ */ jsx15(ListItemText4, { children: "Clear All Conversations" })
8172
+ /* @__PURE__ */ jsx16(ListItemIcon4, { children: /* @__PURE__ */ jsx16(DeleteSweepIcon2, { size: 16, color: theme.palette.error.main }) }),
8173
+ /* @__PURE__ */ jsx16(ListItemText4, { children: "Clear All Conversations" })
8002
8174
  ]
8003
8175
  }
8004
8176
  )
8005
8177
  }
8006
8178
  ),
8007
- /* @__PURE__ */ jsxs12(
8179
+ /* @__PURE__ */ jsxs13(
8008
8180
  Dialog5,
8009
8181
  {
8010
8182
  open: clearConfirmOpen,
@@ -8012,12 +8184,12 @@ var EnhancedMobileConversationsModal = ({
8012
8184
  maxWidth: "sm",
8013
8185
  fullWidth: true,
8014
8186
  children: [
8015
- /* @__PURE__ */ jsx15(DialogTitle4, { children: "Clear All Conversations?" }),
8016
- /* @__PURE__ */ jsx15(DialogContent4, { children: /* @__PURE__ */ jsx15(Typography8, { children: visibleConversationCount === 0 ? "No conversations available to clear." : `This will permanently delete ${visibleConversationCount} conversation${visibleConversationCount === 1 ? "" : "s"} and cannot be undone.` }) }),
8017
- /* @__PURE__ */ jsxs12(DialogActions4, { children: [
8018
- /* @__PURE__ */ jsx15(Button6, { onClick: () => setClearConfirmOpen(false), children: "Cancel" }),
8019
- /* @__PURE__ */ jsx15(
8020
- Button6,
8187
+ /* @__PURE__ */ jsx16(DialogTitle4, { children: "Clear All Conversations?" }),
8188
+ /* @__PURE__ */ jsx16(DialogContent4, { children: /* @__PURE__ */ jsx16(Typography9, { children: visibleConversationCount === 0 ? "No conversations available to clear." : `This will permanently delete ${visibleConversationCount} conversation${visibleConversationCount === 1 ? "" : "s"} and cannot be undone.` }) }),
8189
+ /* @__PURE__ */ jsxs13(DialogActions4, { children: [
8190
+ /* @__PURE__ */ jsx16(Button7, { onClick: () => setClearConfirmOpen(false), children: "Cancel" }),
8191
+ /* @__PURE__ */ jsx16(
8192
+ Button7,
8021
8193
  {
8022
8194
  onClick: handleClearAllConfirm,
8023
8195
  color: "error",
@@ -8035,7 +8207,7 @@ var enhanced_mobile_conversations_modal_default = EnhancedMobileConversationsMod
8035
8207
 
8036
8208
  // src/chat/chat-app-bar.tsx
8037
8209
  import { shallow as shallow2 } from "zustand/shallow";
8038
- import { Fragment as Fragment9, jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
8210
+ import { Fragment as Fragment9, jsx as jsx17, jsxs as jsxs14 } from "react/jsx-runtime";
8039
8211
  var CDN_BASE = "https://cdn.burtson.ai/";
8040
8212
  var banditHead = `${CDN_BASE}/images/bandit-head.png`;
8041
8213
  var modelAvatars = {
@@ -8054,12 +8226,12 @@ var ChatAppBar = ({
8054
8226
  drawerOpen,
8055
8227
  setDrawerOpen
8056
8228
  }) => {
8057
- const theme = useTheme12();
8229
+ const theme = useTheme13();
8058
8230
  const isMobile = useMediaQuery5(theme.breakpoints.down("sm"));
8059
- const hasLoggedRouterWarningRef = useRef10(false);
8231
+ const hasLoggedRouterWarningRef = useRef11(false);
8060
8232
  let navigate = null;
8061
8233
  try {
8062
- navigate = useNavigate();
8234
+ navigate = useNavigate2();
8063
8235
  } catch (error) {
8064
8236
  if (!hasLoggedRouterWarningRef.current) {
8065
8237
  debugLogger.warn("ChatAppBar: Navigation not available (missing Router context)", { error });
@@ -8131,16 +8303,16 @@ var ChatAppBar = ({
8131
8303
  };
8132
8304
  const syncIndicatorIcon = (() => {
8133
8305
  if (isPlaygroundMode2 || !syncEnabled) {
8134
- return /* @__PURE__ */ jsx16(CloudOffIcon, { fontSize: "small", color: "disabled" });
8306
+ return /* @__PURE__ */ jsx17(CloudOffIcon, { fontSize: "small", color: "disabled" });
8135
8307
  }
8136
8308
  switch (syncStatus) {
8137
8309
  case "syncing":
8138
- return /* @__PURE__ */ jsx16(SyncIcon, { fontSize: "small", sx: syncSpinSx, color: "primary" });
8310
+ return /* @__PURE__ */ jsx17(SyncIcon, { fontSize: "small", sx: syncSpinSx, color: "primary" });
8139
8311
  case "error":
8140
- return /* @__PURE__ */ jsx16(ErrorOutlineIcon, { fontSize: "small", color: "error" });
8312
+ return /* @__PURE__ */ jsx17(ErrorOutlineIcon, { fontSize: "small", color: "error" });
8141
8313
  case "idle":
8142
8314
  default:
8143
- return /* @__PURE__ */ jsx16(CloudDoneIcon, { fontSize: "small", color: "success" });
8315
+ return /* @__PURE__ */ jsx17(CloudDoneIcon, { fontSize: "small", color: "success" });
8144
8316
  }
8145
8317
  })();
8146
8318
  const syncTooltip = (() => {
@@ -8252,9 +8424,9 @@ var ChatAppBar = ({
8252
8424
  }
8253
8425
  safeNavigate("/");
8254
8426
  }
8255
- return /* @__PURE__ */ jsxs13(Fragment9, { children: [
8256
- /* @__PURE__ */ jsxs13(
8257
- Box13,
8427
+ return /* @__PURE__ */ jsxs14(Fragment9, { children: [
8428
+ /* @__PURE__ */ jsxs14(
8429
+ Box14,
8258
8430
  {
8259
8431
  sx: {
8260
8432
  position: "fixed",
@@ -8274,8 +8446,8 @@ var ChatAppBar = ({
8274
8446
  }
8275
8447
  },
8276
8448
  children: [
8277
- /* @__PURE__ */ jsxs13(
8278
- Box13,
8449
+ /* @__PURE__ */ jsxs14(
8450
+ Box14,
8279
8451
  {
8280
8452
  sx: {
8281
8453
  display: "flex",
@@ -8295,17 +8467,17 @@ var ChatAppBar = ({
8295
8467
  }
8296
8468
  },
8297
8469
  children: [
8298
- /* @__PURE__ */ jsx16(Tooltip6, { title: homeTooltip, arrow: true, children: /* @__PURE__ */ jsx16(
8299
- IconButton10,
8470
+ /* @__PURE__ */ jsx17(Tooltip6, { title: homeTooltip, arrow: true, children: /* @__PURE__ */ jsx17(
8471
+ IconButton11,
8300
8472
  {
8301
8473
  onClick: goToHome,
8302
8474
  sx: pillButtonStyles,
8303
8475
  "aria-label": "Go to home page",
8304
- children: /* @__PURE__ */ jsx16(HomeIcon, {})
8476
+ children: /* @__PURE__ */ jsx17(HomeIcon, {})
8305
8477
  }
8306
8478
  ) }),
8307
- showLimitedAdminPanel() && /* @__PURE__ */ jsx16(Tooltip6, { title: "Management & Settings", arrow: true, children: /* @__PURE__ */ jsx16(
8308
- IconButton10,
8479
+ showLimitedAdminPanel() && /* @__PURE__ */ jsx17(Tooltip6, { title: "Management & Settings", arrow: true, children: /* @__PURE__ */ jsx17(
8480
+ IconButton11,
8309
8481
  {
8310
8482
  onClick: () => safeNavigate(managementPath),
8311
8483
  sx: {
@@ -8316,11 +8488,11 @@ var ChatAppBar = ({
8316
8488
  }
8317
8489
  },
8318
8490
  "aria-label": "Open management settings",
8319
- children: /* @__PURE__ */ jsx16(SettingsIcon, {})
8491
+ children: /* @__PURE__ */ jsx17(SettingsIcon, {})
8320
8492
  }
8321
8493
  ) }),
8322
- /* @__PURE__ */ jsx16(Tooltip6, { title: syncTooltip, arrow: true, children: /* @__PURE__ */ jsxs13(
8323
- IconButton10,
8494
+ /* @__PURE__ */ jsx17(Tooltip6, { title: syncTooltip, arrow: true, children: /* @__PURE__ */ jsxs14(
8495
+ IconButton11,
8324
8496
  {
8325
8497
  onClick: handleSyncBadgeClick,
8326
8498
  disabled: syncButtonDisabled,
@@ -8335,8 +8507,8 @@ var ChatAppBar = ({
8335
8507
  "aria-label": "Conversation sync status",
8336
8508
  children: [
8337
8509
  syncIndicatorIcon,
8338
- pendingCount > 0 && !syncButtonDisabled && syncStatus !== "syncing" && /* @__PURE__ */ jsx16(
8339
- Box13,
8510
+ pendingCount > 0 && !syncButtonDisabled && syncStatus !== "syncing" && /* @__PURE__ */ jsx17(
8511
+ Box14,
8340
8512
  {
8341
8513
  sx: {
8342
8514
  position: "absolute",
@@ -8361,8 +8533,8 @@ var ChatAppBar = ({
8361
8533
  ]
8362
8534
  }
8363
8535
  ) }),
8364
- !isMobile && /* @__PURE__ */ jsx16(Tooltip6, { title: `${drawerOpen ? "Close" : "Open"} Conversations`, arrow: true, children: /* @__PURE__ */ jsxs13(
8365
- IconButton10,
8536
+ !isMobile && /* @__PURE__ */ jsx17(Tooltip6, { title: `${drawerOpen ? "Close" : "Open"} Conversations`, arrow: true, children: /* @__PURE__ */ jsxs14(
8537
+ IconButton11,
8366
8538
  {
8367
8539
  onClick: () => setDrawerOpen(!drawerOpen),
8368
8540
  sx: {
@@ -8375,9 +8547,9 @@ var ChatAppBar = ({
8375
8547
  "aria-label": `${drawerOpen ? "Close" : "Open"} conversations drawer`,
8376
8548
  "aria-pressed": drawerOpen,
8377
8549
  children: [
8378
- drawerOpen ? /* @__PURE__ */ jsx16(NotesIcon, {}) : /* @__PURE__ */ jsx16(NotesIconOutlined, {}),
8379
- conversations.length > 0 && /* @__PURE__ */ jsx16(
8380
- Box13,
8550
+ drawerOpen ? /* @__PURE__ */ jsx17(NotesIcon, {}) : /* @__PURE__ */ jsx17(NotesIconOutlined, {}),
8551
+ conversations.length > 0 && /* @__PURE__ */ jsx17(
8552
+ Box14,
8381
8553
  {
8382
8554
  sx: {
8383
8555
  position: "absolute",
@@ -8402,8 +8574,8 @@ var ChatAppBar = ({
8402
8574
  ]
8403
8575
  }
8404
8576
  ) }),
8405
- !isMobile && canShowNewConversationButton && /* @__PURE__ */ jsx16(Tooltip6, { title: "Start New Conversation", arrow: true, children: /* @__PURE__ */ jsx16(
8406
- IconButton10,
8577
+ !isMobile && canShowNewConversationButton && /* @__PURE__ */ jsx17(Tooltip6, { title: "Start New Conversation", arrow: true, children: /* @__PURE__ */ jsx17(
8578
+ IconButton11,
8407
8579
  {
8408
8580
  onClick: () => createNewConversation(),
8409
8581
  sx: {
@@ -8416,14 +8588,14 @@ var ChatAppBar = ({
8416
8588
  }
8417
8589
  },
8418
8590
  "aria-label": "Create new conversation",
8419
- children: /* @__PURE__ */ jsx16(AddIcon, {})
8591
+ children: /* @__PURE__ */ jsx17(AddIcon, {})
8420
8592
  }
8421
8593
  ) })
8422
8594
  ]
8423
8595
  }
8424
8596
  ),
8425
- /* @__PURE__ */ jsxs13(
8426
- Box13,
8597
+ /* @__PURE__ */ jsxs14(
8598
+ Box14,
8427
8599
  {
8428
8600
  sx: {
8429
8601
  display: "flex",
@@ -8443,8 +8615,8 @@ var ChatAppBar = ({
8443
8615
  }
8444
8616
  },
8445
8617
  children: [
8446
- isMobile && /* @__PURE__ */ jsx16(Tooltip6, { title: `Conversations (${conversations.length})`, arrow: true, children: /* @__PURE__ */ jsxs13(
8447
- IconButton10,
8618
+ isMobile && /* @__PURE__ */ jsx17(Tooltip6, { title: `Conversations (${conversations.length})`, arrow: true, children: /* @__PURE__ */ jsxs14(
8619
+ IconButton11,
8448
8620
  {
8449
8621
  onClick: () => setModalOpen(true),
8450
8622
  sx: {
@@ -8453,9 +8625,9 @@ var ChatAppBar = ({
8453
8625
  },
8454
8626
  "aria-label": `Open conversations modal with ${conversations.length} conversations`,
8455
8627
  children: [
8456
- /* @__PURE__ */ jsx16(NotesIcon, { fontSize: "small" }),
8457
- conversations.length > 0 && /* @__PURE__ */ jsx16(
8458
- Box13,
8628
+ /* @__PURE__ */ jsx17(NotesIcon, { fontSize: "small" }),
8629
+ conversations.length > 0 && /* @__PURE__ */ jsx17(
8630
+ Box14,
8459
8631
  {
8460
8632
  sx: {
8461
8633
  position: "absolute",
@@ -8480,8 +8652,8 @@ var ChatAppBar = ({
8480
8652
  ]
8481
8653
  }
8482
8654
  ) }),
8483
- isMobile && canShowNewConversationButton && /* @__PURE__ */ jsx16(Tooltip6, { title: "Start New Conversation", arrow: true, children: /* @__PURE__ */ jsx16(
8484
- IconButton10,
8655
+ isMobile && canShowNewConversationButton && /* @__PURE__ */ jsx17(Tooltip6, { title: "Start New Conversation", arrow: true, children: /* @__PURE__ */ jsx17(
8656
+ IconButton11,
8485
8657
  {
8486
8658
  onClick: () => {
8487
8659
  createNewConversation();
@@ -8497,11 +8669,11 @@ var ChatAppBar = ({
8497
8669
  }
8498
8670
  },
8499
8671
  "aria-label": "Create new conversation",
8500
- children: /* @__PURE__ */ jsx16(AddIcon, { fontSize: "small" })
8672
+ children: /* @__PURE__ */ jsx17(AddIcon, { fontSize: "small" })
8501
8673
  }
8502
8674
  ) }),
8503
- /* @__PURE__ */ jsx16(Tooltip6, { title: `Current AI: ${selectedModel.replace("Bandit-", "")}`, arrow: true, children: /* @__PURE__ */ jsx16(
8504
- IconButton10,
8675
+ /* @__PURE__ */ jsx17(Tooltip6, { title: `Current AI: ${selectedModel.replace("Bandit-", "")}`, arrow: true, children: /* @__PURE__ */ jsx17(
8676
+ IconButton11,
8505
8677
  {
8506
8678
  onClick: (e) => setModelAnchorEl(e.currentTarget),
8507
8679
  sx: {
@@ -8515,7 +8687,7 @@ var ChatAppBar = ({
8515
8687
  }
8516
8688
  },
8517
8689
  "aria-label": `Change AI personality. Currently using ${selectedModel}`,
8518
- children: /* @__PURE__ */ jsx16(
8690
+ children: /* @__PURE__ */ jsx17(
8519
8691
  Avatar8,
8520
8692
  {
8521
8693
  src: currentAvatar,
@@ -8532,16 +8704,16 @@ var ChatAppBar = ({
8532
8704
  )
8533
8705
  }
8534
8706
  ) }),
8535
- /* @__PURE__ */ jsx16(Tooltip6, { title: `Engine \xB7 ${engineDisplay}`, arrow: true, children: /* @__PURE__ */ jsx16(
8536
- IconButton10,
8707
+ /* @__PURE__ */ jsx17(Tooltip6, { title: `Engine \xB7 ${engineDisplay}`, arrow: true, children: /* @__PURE__ */ jsx17(
8708
+ IconButton11,
8537
8709
  {
8538
8710
  onClick: (e) => setEngineAnchorEl(e.currentTarget),
8539
8711
  sx: pillButtonStyles,
8540
8712
  "aria-label": `Change base model (engine). Currently ${engineDisplay}`,
8541
- children: /* @__PURE__ */ jsx16(AutoAwesomeIcon, { fontSize: "small" })
8713
+ children: /* @__PURE__ */ jsx17(AutoAwesomeIcon, { fontSize: "small" })
8542
8714
  }
8543
8715
  ) }),
8544
- /* @__PURE__ */ jsxs13(
8716
+ /* @__PURE__ */ jsxs14(
8545
8717
  Menu5,
8546
8718
  {
8547
8719
  anchorEl: engineAnchorEl,
@@ -8550,8 +8722,8 @@ var ChatAppBar = ({
8550
8722
  transformOrigin: { horizontal: "right", vertical: "top" },
8551
8723
  anchorOrigin: { horizontal: "right", vertical: "bottom" },
8552
8724
  children: [
8553
- /* @__PURE__ */ jsx16(Typography9, { variant: "overline", sx: { px: 2, color: theme.palette.text.secondary }, children: "Engine \xB7 base model" }),
8554
- engines.length === 0 && /* @__PURE__ */ jsx16(MenuItem5, { disabled: true, children: /* @__PURE__ */ jsx16(Typography9, { variant: "body2", children: "No engines available" }) }),
8725
+ /* @__PURE__ */ jsx17(Typography10, { variant: "overline", sx: { px: 2, color: theme.palette.text.secondary }, children: "Engine \xB7 base model" }),
8726
+ engines.length === 0 && /* @__PURE__ */ jsx17(MenuItem5, { disabled: true, children: /* @__PURE__ */ jsx17(Typography10, { variant: "body2", children: "No engines available" }) }),
8555
8727
  engines.map((engine) => {
8556
8728
  const badges = [
8557
8729
  engine.vision && "vision",
@@ -8560,7 +8732,7 @@ var ChatAppBar = ({
8560
8732
  engine.cloud && "cloud"
8561
8733
  ].filter(Boolean);
8562
8734
  const isGated = engine.cloud && !frontierEligible;
8563
- return /* @__PURE__ */ jsxs13(
8735
+ return /* @__PURE__ */ jsxs14(
8564
8736
  MenuItem5,
8565
8737
  {
8566
8738
  selected: engine.id === resolvedEngineId,
@@ -8584,16 +8756,16 @@ var ChatAppBar = ({
8584
8756
  ...isGated ? { opacity: 1, "&.Mui-disabled": { opacity: 1 } } : {}
8585
8757
  },
8586
8758
  children: [
8587
- /* @__PURE__ */ jsxs13(Box13, { sx: { display: "flex", alignItems: "center", gap: 1, width: "100%" }, children: [
8588
- isGated && /* @__PURE__ */ jsx16(
8759
+ /* @__PURE__ */ jsxs14(Box14, { sx: { display: "flex", alignItems: "center", gap: 1, width: "100%" }, children: [
8760
+ isGated && /* @__PURE__ */ jsx17(
8589
8761
  LockIcon,
8590
8762
  {
8591
8763
  fontSize: "small",
8592
8764
  sx: { fontSize: "0.95rem", color: theme.palette.text.secondary }
8593
8765
  }
8594
8766
  ),
8595
- /* @__PURE__ */ jsx16(
8596
- Typography9,
8767
+ /* @__PURE__ */ jsx17(
8768
+ Typography10,
8597
8769
  {
8598
8770
  variant: "body2",
8599
8771
  sx: {
@@ -8604,15 +8776,15 @@ var ChatAppBar = ({
8604
8776
  children: cleanEngineName(engine.displayName)
8605
8777
  }
8606
8778
  ),
8607
- engine.id === resolvedEngineId && !isGated && /* @__PURE__ */ jsx16(Box13, { sx: { width: 8, height: 8, borderRadius: "50%", bgcolor: theme.palette.primary.main } })
8779
+ engine.id === resolvedEngineId && !isGated && /* @__PURE__ */ jsx17(Box14, { sx: { width: 8, height: 8, borderRadius: "50%", bgcolor: theme.palette.primary.main } })
8608
8780
  ] }),
8609
- /* @__PURE__ */ jsx16(Typography9, { variant: "caption", sx: { color: theme.palette.text.secondary }, children: isGated ? "Premium engine \u2014 available on a paid plan." : engine.available ? engine.description : engine.unavailableReason || "Unavailable" }),
8610
- isGated && /* @__PURE__ */ jsx16(
8611
- Button7,
8781
+ /* @__PURE__ */ jsx17(Typography10, { variant: "caption", sx: { color: theme.palette.text.secondary }, children: isGated ? "Premium engine \u2014 available on a paid plan." : engine.available ? engine.description : engine.unavailableReason || "Unavailable" }),
8782
+ isGated && /* @__PURE__ */ jsx17(
8783
+ Button8,
8612
8784
  {
8613
8785
  size: "small",
8614
8786
  variant: "text",
8615
- startIcon: /* @__PURE__ */ jsx16(LockIcon, { sx: { fontSize: "0.85rem" } }),
8787
+ startIcon: /* @__PURE__ */ jsx17(LockIcon, { sx: { fontSize: "0.85rem" } }),
8616
8788
  onClick: (e) => {
8617
8789
  e.stopPropagation();
8618
8790
  setEngineAnchorEl(null);
@@ -8633,8 +8805,8 @@ var ChatAppBar = ({
8633
8805
  children: "Upgrade to unlock"
8634
8806
  }
8635
8807
  ),
8636
- badges.length > 0 && /* @__PURE__ */ jsx16(Box13, { sx: { display: "flex", gap: 0.5, flexWrap: "wrap", mt: 0.25 }, children: badges.map((b) => /* @__PURE__ */ jsx16(
8637
- Box13,
8808
+ badges.length > 0 && /* @__PURE__ */ jsx17(Box14, { sx: { display: "flex", gap: 0.5, flexWrap: "wrap", mt: 0.25 }, children: badges.map((b) => /* @__PURE__ */ jsx17(
8809
+ Box14,
8638
8810
  {
8639
8811
  sx: {
8640
8812
  fontSize: "0.65rem",
@@ -8656,7 +8828,7 @@ var ChatAppBar = ({
8656
8828
  ]
8657
8829
  }
8658
8830
  ),
8659
- /* @__PURE__ */ jsx16(
8831
+ /* @__PURE__ */ jsx17(
8660
8832
  Menu5,
8661
8833
  {
8662
8834
  anchorEl: modelAnchorEl,
@@ -8692,7 +8864,7 @@ var ChatAppBar = ({
8692
8864
  }
8693
8865
  }
8694
8866
  },
8695
- children: availableModels.map((model) => /* @__PURE__ */ jsxs13(
8867
+ children: availableModels.map((model) => /* @__PURE__ */ jsxs14(
8696
8868
  MenuItem5,
8697
8869
  {
8698
8870
  selected: model.name === selectedModel,
@@ -8739,7 +8911,7 @@ var ChatAppBar = ({
8739
8911
  px: 2
8740
8912
  },
8741
8913
  children: [
8742
- /* @__PURE__ */ jsx16(
8914
+ /* @__PURE__ */ jsx17(
8743
8915
  Avatar8,
8744
8916
  {
8745
8917
  src: model.avatarBase64 || modelAvatars[model.name] || banditHead,
@@ -8752,12 +8924,12 @@ var ChatAppBar = ({
8752
8924
  }
8753
8925
  }
8754
8926
  ),
8755
- /* @__PURE__ */ jsxs13(Box13, { sx: { flex: 1 }, children: [
8756
- /* @__PURE__ */ jsx16(Typography9, { variant: "body2", sx: { fontWeight: 500 }, children: model.name.replace("Bandit-", "") }),
8757
- /* @__PURE__ */ jsx16(Typography9, { variant: "caption", sx: { color: theme.palette.text.secondary, display: "block" }, children: model.name === selectedModel ? "Currently active" : "Switch to this AI" })
8927
+ /* @__PURE__ */ jsxs14(Box14, { sx: { flex: 1 }, children: [
8928
+ /* @__PURE__ */ jsx17(Typography10, { variant: "body2", sx: { fontWeight: 500 }, children: model.name.replace("Bandit-", "") }),
8929
+ /* @__PURE__ */ jsx17(Typography10, { variant: "caption", sx: { color: theme.palette.text.secondary, display: "block" }, children: model.name === selectedModel ? "Currently active" : "Switch to this AI" })
8758
8930
  ] }),
8759
- model.name === selectedModel && /* @__PURE__ */ jsx16(
8760
- Box13,
8931
+ model.name === selectedModel && /* @__PURE__ */ jsx17(
8932
+ Box14,
8761
8933
  {
8762
8934
  sx: {
8763
8935
  width: 8,
@@ -8773,9 +8945,9 @@ var ChatAppBar = ({
8773
8945
  ))
8774
8946
  }
8775
8947
  ),
8776
- isTTSAvailable && /* @__PURE__ */ jsxs13(Fragment9, { children: [
8777
- /* @__PURE__ */ jsx16(Tooltip6, { title: `Voice: ${selectedVoice ? toTitleCase(selectedVoice.split("-")[1]) : "Default"}`, arrow: true, children: /* @__PURE__ */ jsx16(
8778
- IconButton10,
8948
+ isTTSAvailable && /* @__PURE__ */ jsxs14(Fragment9, { children: [
8949
+ /* @__PURE__ */ jsx17(Tooltip6, { title: `Voice: ${selectedVoice ? toTitleCase(selectedVoice.split("-")[1]) : "Default"}`, arrow: true, children: /* @__PURE__ */ jsx17(
8950
+ IconButton11,
8779
8951
  {
8780
8952
  onClick: (e) => setVoiceAnchorEl(e.currentTarget),
8781
8953
  sx: {
@@ -8788,10 +8960,10 @@ var ChatAppBar = ({
8788
8960
  }
8789
8961
  },
8790
8962
  "aria-label": `Change voice. Currently using ${selectedVoice ? toTitleCase(selectedVoice.split("-")[1]) : "default"}`,
8791
- children: /* @__PURE__ */ jsx16(RecordVoiceOverIcon, { fontSize: "small" })
8963
+ children: /* @__PURE__ */ jsx17(RecordVoiceOverIcon, { fontSize: "small" })
8792
8964
  }
8793
8965
  ) }),
8794
- /* @__PURE__ */ jsx16(
8966
+ /* @__PURE__ */ jsx17(
8795
8967
  Menu5,
8796
8968
  {
8797
8969
  anchorEl: voiceAnchorEl,
@@ -8828,7 +9000,7 @@ var ChatAppBar = ({
8828
9000
  }
8829
9001
  }
8830
9002
  },
8831
- children: availableVoices.length > 0 ? availableVoices.map((voice) => /* @__PURE__ */ jsx16(
9003
+ children: availableVoices.length > 0 ? availableVoices.map((voice) => /* @__PURE__ */ jsx17(
8832
9004
  MenuItem5,
8833
9005
  {
8834
9006
  selected: voice === selectedVoice,
@@ -8836,14 +9008,14 @@ var ChatAppBar = ({
8836
9008
  handleVoiceChange(voice);
8837
9009
  setVoiceAnchorEl(null);
8838
9010
  },
8839
- children: /* @__PURE__ */ jsxs13(Box13, { sx: { display: "flex", alignItems: "center", gap: 1, width: "100%" }, children: [
8840
- /* @__PURE__ */ jsx16(RecordVoiceOverIcon, { fontSize: "small", sx: { color: theme.palette.text.secondary } }),
8841
- /* @__PURE__ */ jsxs13(Box13, { sx: { flex: 1 }, children: [
8842
- /* @__PURE__ */ jsx16(Typography9, { variant: "body2", children: toTitleCase(voice.split("-")[1]) }),
8843
- /* @__PURE__ */ jsx16(Typography9, { variant: "caption", sx: { color: theme.palette.text.secondary }, children: voice === selectedVoice ? "Currently active" : "Switch to this voice" })
9011
+ children: /* @__PURE__ */ jsxs14(Box14, { sx: { display: "flex", alignItems: "center", gap: 1, width: "100%" }, children: [
9012
+ /* @__PURE__ */ jsx17(RecordVoiceOverIcon, { fontSize: "small", sx: { color: theme.palette.text.secondary } }),
9013
+ /* @__PURE__ */ jsxs14(Box14, { sx: { flex: 1 }, children: [
9014
+ /* @__PURE__ */ jsx17(Typography10, { variant: "body2", children: toTitleCase(voice.split("-")[1]) }),
9015
+ /* @__PURE__ */ jsx17(Typography10, { variant: "caption", sx: { color: theme.palette.text.secondary }, children: voice === selectedVoice ? "Currently active" : "Switch to this voice" })
8844
9016
  ] }),
8845
- voice === selectedVoice && /* @__PURE__ */ jsx16(
8846
- Box13,
9017
+ voice === selectedVoice && /* @__PURE__ */ jsx17(
9018
+ Box14,
8847
9019
  {
8848
9020
  sx: {
8849
9021
  width: 8,
@@ -8856,7 +9028,7 @@ var ChatAppBar = ({
8856
9028
  ] })
8857
9029
  },
8858
9030
  voice
8859
- )) : /* @__PURE__ */ jsx16(MenuItem5, { disabled: true, children: /* @__PURE__ */ jsx16(Typography9, { variant: "body2", color: "text.secondary", children: "No voices available" }) })
9031
+ )) : /* @__PURE__ */ jsx17(MenuItem5, { disabled: true, children: /* @__PURE__ */ jsx17(Typography10, { variant: "body2", color: "text.secondary", children: "No voices available" }) })
8860
9032
  }
8861
9033
  )
8862
9034
  ] })
@@ -8866,17 +9038,17 @@ var ChatAppBar = ({
8866
9038
  ]
8867
9039
  }
8868
9040
  ),
8869
- /* @__PURE__ */ jsx16(conversation_drawer_default, { open: drawerOpen, onClose: () => setDrawerOpen(false) }),
8870
- /* @__PURE__ */ jsx16(enhanced_mobile_conversations_modal_default, { open: modalOpen, onClose: () => setModalOpen(false) }),
8871
- /* @__PURE__ */ jsxs13(
9041
+ /* @__PURE__ */ jsx17(conversation_drawer_default, { open: drawerOpen, onClose: () => setDrawerOpen(false) }),
9042
+ /* @__PURE__ */ jsx17(enhanced_mobile_conversations_modal_default, { open: modalOpen, onClose: () => setModalOpen(false) }),
9043
+ /* @__PURE__ */ jsxs14(
8872
9044
  Dialog6,
8873
9045
  {
8874
9046
  open: confirmModelChangeOpen,
8875
9047
  onClose: () => setConfirmModelChangeOpen(false),
8876
9048
  children: [
8877
- /* @__PURE__ */ jsx16(DialogTitle5, { children: "Change personality and start new conversation?" }),
8878
- /* @__PURE__ */ jsx16(DialogContent5, { children: /* @__PURE__ */ jsxs13(Box13, { display: "flex", alignItems: "center", gap: 2, mt: 1, justifyContent: "center", children: [
8879
- /* @__PURE__ */ jsx16(
9049
+ /* @__PURE__ */ jsx17(DialogTitle5, { children: "Change personality and start new conversation?" }),
9050
+ /* @__PURE__ */ jsx17(DialogContent5, { children: /* @__PURE__ */ jsxs14(Box14, { display: "flex", alignItems: "center", gap: 2, mt: 1, justifyContent: "center", children: [
9051
+ /* @__PURE__ */ jsx17(
8880
9052
  Avatar8,
8881
9053
  {
8882
9054
  src: pendingModelAvatar,
@@ -8884,16 +9056,16 @@ var ChatAppBar = ({
8884
9056
  sx: { width: 40, height: 40, filter: "brightness(1.7)" }
8885
9057
  }
8886
9058
  ),
8887
- /* @__PURE__ */ jsxs13(Typography9, { variant: "body2", children: [
9059
+ /* @__PURE__ */ jsxs14(Typography10, { variant: "body2", children: [
8888
9060
  "Your current conversation will be saved, and a new one will begin with ",
8889
- /* @__PURE__ */ jsx16("strong", { children: pendingModel }),
9061
+ /* @__PURE__ */ jsx17("strong", { children: pendingModel }),
8890
9062
  "."
8891
9063
  ] })
8892
9064
  ] }) }),
8893
- /* @__PURE__ */ jsxs13(DialogActions5, { children: [
8894
- /* @__PURE__ */ jsx16(Button7, { onClick: () => setConfirmModelChangeOpen(false), children: "Cancel" }),
8895
- /* @__PURE__ */ jsx16(
8896
- Button7,
9065
+ /* @__PURE__ */ jsxs14(DialogActions5, { children: [
9066
+ /* @__PURE__ */ jsx17(Button8, { onClick: () => setConfirmModelChangeOpen(false), children: "Cancel" }),
9067
+ /* @__PURE__ */ jsx17(
9068
+ Button8,
8897
9069
  {
8898
9070
  onClick: () => {
8899
9071
  if (pendingModel) {
@@ -8995,31 +9167,31 @@ Respond with just the title and nothing else.
8995
9167
  };
8996
9168
 
8997
9169
  // src/chat/query-suggestion-picker.tsx
8998
- import { useEffect as useEffect13, useRef as useRef11, useState as useState16 } from "react";
8999
- import { Box as Box14, useMediaQuery as useMediaQuery6 } from "@mui/material";
9000
- import { useTheme as useTheme13, alpha as alpha8 } from "@mui/material/styles";
9170
+ import { useEffect as useEffect13, useRef as useRef12, useState as useState16 } from "react";
9171
+ import { Box as Box15, useMediaQuery as useMediaQuery6 } from "@mui/material";
9172
+ import { useTheme as useTheme14, alpha as alpha8 } from "@mui/material/styles";
9001
9173
  import ReactMarkdown from "react-markdown";
9002
9174
  import remarkGfm from "remark-gfm";
9003
9175
  import rehypeRaw from "rehype-raw";
9004
- import { Fragment as Fragment10, jsx as jsx17 } from "react/jsx-runtime";
9176
+ import { Fragment as Fragment10, jsx as jsx18 } from "react/jsx-runtime";
9005
9177
  var markdownComponents = {
9006
- p: ({ node, ...props }) => /* @__PURE__ */ jsx17("span", { ...props }),
9007
- mark: ({ node, children, ...props }) => /* @__PURE__ */ jsx17("mark", { ...props, children }),
9178
+ p: ({ node, ...props }) => /* @__PURE__ */ jsx18("span", { ...props }),
9179
+ mark: ({ node, children, ...props }) => /* @__PURE__ */ jsx18("mark", { ...props, children }),
9008
9180
  code: ({ node, children, ...props }) => {
9009
9181
  const { inline, ...rest } = props;
9010
- return inline ? /* @__PURE__ */ jsx17("code", { ...rest, children }) : /* @__PURE__ */ jsx17("code", { ...rest, children });
9182
+ return inline ? /* @__PURE__ */ jsx18("code", { ...rest, children }) : /* @__PURE__ */ jsx18("code", { ...rest, children });
9011
9183
  }
9012
9184
  };
9013
9185
  var QuerySuggestionPicker = ({
9014
9186
  onSend,
9015
9187
  inputHeight
9016
9188
  }) => {
9017
- const hasGenerated = useRef11(false);
9189
+ const hasGenerated = useRef12(false);
9018
9190
  const [hasSentPrompt, setHasSentPrompt] = useState16(false);
9019
9191
  const [examplePrompts, setExamplePrompts] = useState16([]);
9020
9192
  const [visiblePrompts, setVisiblePrompts] = useState16([]);
9021
- const scrollRef = useRef11(null);
9022
- const theme = useTheme13();
9193
+ const scrollRef = useRef12(null);
9194
+ const theme = useTheme14();
9023
9195
  const isMobile = useMediaQuery6((theme2) => theme2.breakpoints.down("sm"));
9024
9196
  const { background, text, border, hoverBackground, hoverBorder } = theme.palette.chat.suggestion;
9025
9197
  const { getCurrentModel, isLoading } = useModelStore();
@@ -9080,8 +9252,8 @@ var QuerySuggestionPicker = ({
9080
9252
  return () => clearInterval(interval);
9081
9253
  }, [hasSentPrompt, examplePrompts.length]);
9082
9254
  const displayPrompts = isMobile ? visiblePrompts.slice(0, Math.min(visiblePrompts.length, 6)) : visiblePrompts;
9083
- return displayPrompts.length > 0 && /* @__PURE__ */ jsx17(Fragment10, { children: /* @__PURE__ */ jsx17(
9084
- Box14,
9255
+ return displayPrompts.length > 0 && /* @__PURE__ */ jsx18(Fragment10, { children: /* @__PURE__ */ jsx18(
9256
+ Box15,
9085
9257
  {
9086
9258
  ref: scrollRef,
9087
9259
  sx: {
@@ -9097,8 +9269,8 @@ var QuerySuggestionPicker = ({
9097
9269
  pb: isMobile ? 0.4 : 0,
9098
9270
  "&::-webkit-scrollbar": { display: "none" }
9099
9271
  },
9100
- children: displayPrompts.map((prompt, i) => /* @__PURE__ */ jsx17(
9101
- Box14,
9272
+ children: displayPrompts.map((prompt, i) => /* @__PURE__ */ jsx18(
9273
+ Box15,
9102
9274
  {
9103
9275
  sx: {
9104
9276
  px: isMobile ? 1.4 : 2,
@@ -9132,8 +9304,8 @@ var QuerySuggestionPicker = ({
9132
9304
  onSend(prompt, []);
9133
9305
  setHasSentPrompt(true);
9134
9306
  },
9135
- children: /* @__PURE__ */ jsx17(
9136
- Box14,
9307
+ children: /* @__PURE__ */ jsx18(
9308
+ Box15,
9137
9309
  {
9138
9310
  sx: {
9139
9311
  flex: 1,
@@ -9157,7 +9329,7 @@ var QuerySuggestionPicker = ({
9157
9329
  padding: "0.1em 0.25em"
9158
9330
  }
9159
9331
  },
9160
- children: /* @__PURE__ */ jsx17(
9332
+ children: /* @__PURE__ */ jsx18(
9161
9333
  ReactMarkdown,
9162
9334
  {
9163
9335
  remarkPlugins: [remarkGfm],
@@ -9176,18 +9348,18 @@ var QuerySuggestionPicker = ({
9176
9348
  };
9177
9349
 
9178
9350
  // ../../src/pages/under-review.tsx
9179
- import { Box as Box15, Typography as Typography10, useTheme as useTheme14 } from "@mui/material";
9180
- import { useNavigate as useNavigate2 } from "react-router-dom";
9181
- import { jsx as jsx18, jsxs as jsxs14 } from "react/jsx-runtime";
9351
+ import { Box as Box16, Typography as Typography11, useTheme as useTheme15 } from "@mui/material";
9352
+ import { useNavigate as useNavigate3 } from "react-router-dom";
9353
+ import { jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
9182
9354
  var UnderReview = () => {
9183
- const theme = useTheme14();
9184
- const navigate = useNavigate2();
9355
+ const theme = useTheme15();
9356
+ const navigate = useNavigate3();
9185
9357
  const handleSneakyLogout = () => {
9186
9358
  localStorage.removeItem("authToken");
9187
9359
  navigate("/login");
9188
9360
  };
9189
- return /* @__PURE__ */ jsxs14(
9190
- Box15,
9361
+ return /* @__PURE__ */ jsxs15(
9362
+ Box16,
9191
9363
  {
9192
9364
  sx: {
9193
9365
  minHeight: "100vh",
@@ -9202,8 +9374,8 @@ var UnderReview = () => {
9202
9374
  position: "relative"
9203
9375
  },
9204
9376
  children: [
9205
- /* @__PURE__ */ jsx18(
9206
- Box15,
9377
+ /* @__PURE__ */ jsx19(
9378
+ Box16,
9207
9379
  {
9208
9380
  onClick: handleSneakyLogout,
9209
9381
  sx: {
@@ -9228,13 +9400,13 @@ var UnderReview = () => {
9228
9400
  title: "Reset session"
9229
9401
  }
9230
9402
  ),
9231
- /* @__PURE__ */ jsx18(Typography10, { variant: "h4", sx: { mb: 2, fontWeight: 700, color: theme.palette.error.main }, children: "Under Review" }),
9232
- /* @__PURE__ */ jsxs14(Typography10, { variant: "body1", sx: { mb: 2, color: theme.palette.text.secondary }, children: [
9403
+ /* @__PURE__ */ jsx19(Typography11, { variant: "h4", sx: { mb: 2, fontWeight: 700, color: theme.palette.error.main }, children: "Under Review" }),
9404
+ /* @__PURE__ */ jsxs15(Typography11, { variant: "body1", sx: { mb: 2, color: theme.palette.text.secondary }, children: [
9233
9405
  "Your request to use our services is currently being reviewed.",
9234
- /* @__PURE__ */ jsx18("br", {}),
9406
+ /* @__PURE__ */ jsx19("br", {}),
9235
9407
  "For more info, please contact ",
9236
9408
  " ",
9237
- /* @__PURE__ */ jsx18("a", { href: "mailto:team@banditai.ai", style: { color: theme.palette.primary.main, fontWeight: 600 }, children: "team@banditai.ai" })
9409
+ /* @__PURE__ */ jsx19("a", { href: "mailto:team@banditai.ai", style: { color: theme.palette.primary.main, fontWeight: 600 }, children: "team@banditai.ai" })
9238
9410
  ] })
9239
9411
  ]
9240
9412
  }
@@ -9243,13 +9415,13 @@ var UnderReview = () => {
9243
9415
  var under_review_default = UnderReview;
9244
9416
 
9245
9417
  // src/components/ConnectionStatus.tsx
9246
- import { Box as Box16, Chip as Chip5, useTheme as useTheme15 } from "@mui/material";
9247
- import { jsx as jsx19 } from "react/jsx-runtime";
9418
+ import { Box as Box17, Chip as Chip5, useTheme as useTheme16 } from "@mui/material";
9419
+ import { jsx as jsx20 } from "react/jsx-runtime";
9248
9420
  var ConnectionStatus = ({
9249
9421
  showWhenGood = false,
9250
9422
  position = "top"
9251
9423
  }) => {
9252
- const theme = useTheme15();
9424
+ const theme = useTheme16();
9253
9425
  const { isOnline, connectionQuality, isSlowConnection } = useNetworkStatus();
9254
9426
  if (connectionQuality === "fast" && !showWhenGood) {
9255
9427
  return null;
@@ -9258,28 +9430,28 @@ var ConnectionStatus = ({
9258
9430
  switch (connectionQuality) {
9259
9431
  case "offline":
9260
9432
  return {
9261
- icon: /* @__PURE__ */ jsx19(WifiOffIcon, { sx: { fontSize: 16 } }),
9433
+ icon: /* @__PURE__ */ jsx20(WifiOffIcon, { sx: { fontSize: 16 } }),
9262
9434
  label: "Offline",
9263
9435
  color: "error",
9264
9436
  severity: "high"
9265
9437
  };
9266
9438
  case "slow":
9267
9439
  return {
9268
- icon: /* @__PURE__ */ jsx19(SignalWifi2BarIcon, { sx: { fontSize: 16 } }),
9440
+ icon: /* @__PURE__ */ jsx20(SignalWifi2BarIcon, { sx: { fontSize: 16 } }),
9269
9441
  label: "Slow connection",
9270
9442
  color: "warning",
9271
9443
  severity: "medium"
9272
9444
  };
9273
9445
  case "fast":
9274
9446
  return {
9275
- icon: /* @__PURE__ */ jsx19(WifiIcon, { sx: { fontSize: 16 } }),
9447
+ icon: /* @__PURE__ */ jsx20(WifiIcon, { sx: { fontSize: 16 } }),
9276
9448
  label: "Connected",
9277
9449
  color: "success",
9278
9450
  severity: "low"
9279
9451
  };
9280
9452
  default:
9281
9453
  return {
9282
- icon: /* @__PURE__ */ jsx19(WifiIcon, { sx: { fontSize: 16 } }),
9454
+ icon: /* @__PURE__ */ jsx20(WifiIcon, { sx: { fontSize: 16 } }),
9283
9455
  label: "Unknown",
9284
9456
  color: "default",
9285
9457
  severity: "low"
@@ -9287,8 +9459,8 @@ var ConnectionStatus = ({
9287
9459
  }
9288
9460
  };
9289
9461
  const config = getStatusConfig();
9290
- return /* @__PURE__ */ jsx19(
9291
- Box16,
9462
+ return /* @__PURE__ */ jsx20(
9463
+ Box17,
9292
9464
  {
9293
9465
  sx: {
9294
9466
  position: "fixed",
@@ -9303,7 +9475,7 @@ var ConnectionStatus = ({
9303
9475
  "100%": { opacity: 1 }
9304
9476
  }
9305
9477
  },
9306
- children: /* @__PURE__ */ jsx19(
9478
+ children: /* @__PURE__ */ jsx20(
9307
9479
  Chip5,
9308
9480
  {
9309
9481
  icon: config.icon,
@@ -9327,7 +9499,7 @@ var ConnectionStatus = ({
9327
9499
  };
9328
9500
 
9329
9501
  // src/hooks/useVoiceMode.ts
9330
- import { useEffect as useEffect14, useRef as useRef12 } from "react";
9502
+ import { useEffect as useEffect14, useRef as useRef13 } from "react";
9331
9503
  var RMS_BASELINE = 128;
9332
9504
  var RMS_NORMALIZER = 128;
9333
9505
  var computeRms = (data) => {
@@ -9357,7 +9529,7 @@ var useVoiceMode = (config) => {
9357
9529
  const setError = useVoiceModeStore((state) => state.setError);
9358
9530
  const resetTransientState = useVoiceModeStore((state) => state.resetTransientState);
9359
9531
  const setLastTranscript = useVoiceModeStore((state) => state.setLastTranscript);
9360
- const configRef = useRef12(config);
9532
+ const configRef = useRef13(config);
9361
9533
  useEffect14(() => {
9362
9534
  configRef.current = config;
9363
9535
  }, [config]);
@@ -9616,7 +9788,7 @@ var useVoiceMode = (config) => {
9616
9788
  };
9617
9789
 
9618
9790
  // src/chat/chat.tsx
9619
- import { jsx as jsx20, jsxs as jsxs15 } from "react/jsx-runtime";
9791
+ import { jsx as jsx21, jsxs as jsxs16 } from "react/jsx-runtime";
9620
9792
  var ChatContent = () => {
9621
9793
  const packageSettings = usePackageSettingsStore((state) => state.settings);
9622
9794
  const featureFlag = useFeatureFlag();
@@ -9677,8 +9849,8 @@ var ChatContent = () => {
9677
9849
  } = useVoiceStore();
9678
9850
  const isVoiceModeEnabled = useVoiceModeStore((state) => state.enabled);
9679
9851
  const canvasOpen = useCanvasStore((state) => state.open);
9680
- const previousVoiceModeEnabledRef = useRef13(isVoiceModeEnabled);
9681
- const historyRef = useRef13(history);
9852
+ const previousVoiceModeEnabledRef = useRef14(isVoiceModeEnabled);
9853
+ const historyRef = useRef14(history);
9682
9854
  useEffect15(() => {
9683
9855
  historyRef.current = history;
9684
9856
  }, [history]);
@@ -9724,9 +9896,9 @@ var ChatContent = () => {
9724
9896
  }
9725
9897
  }, [packageSettings?.gatewayApiUrl, availableVoices.length, initialized, loadVoicesFromAPI, token]);
9726
9898
  const provider = useAIProviderStore((state) => state.provider);
9727
- const inputRef = useRef13(null);
9899
+ const inputRef = useRef14(null);
9728
9900
  const [pastedImages, setPastedImages] = useState17([]);
9729
- const inputContainerRef = useRef13(null);
9901
+ const inputContainerRef = useRef14(null);
9730
9902
  const [inputHeight, setInputHeight] = useState17(80);
9731
9903
  const [isSubmitting, setIsSubmitting] = useState17(false);
9732
9904
  const [pendingMessage, setPendingMessage] = useState17(null);
@@ -9752,17 +9924,17 @@ var ChatContent = () => {
9752
9924
  const initialLogoState = history.length === 0;
9753
9925
  const [logoVisible, setLogoVisible] = useState17(initialLogoState);
9754
9926
  const [logoShouldRender, setLogoShouldRender] = useState17(initialLogoState);
9755
- const streamingGraceUntilRef = useRef13(0);
9927
+ const streamingGraceUntilRef = useRef14(0);
9756
9928
  const GRACE_MS = 450;
9757
9929
  const GRACE_OFFSET_DESKTOP = 28;
9758
9930
  const GRACE_OFFSET_MOBILE = 20;
9759
- const followStreamRef = useRef13(true);
9760
- const lastSpokenResponseRef = useRef13(null);
9761
- const previousConversationIdRef = useRef13(null);
9762
- const logoFadeTimeoutRef = useRef13(null);
9931
+ const followStreamRef = useRef14(true);
9932
+ const lastSpokenResponseRef = useRef14(null);
9933
+ const previousConversationIdRef = useRef14(null);
9934
+ const logoFadeTimeoutRef = useRef14(null);
9763
9935
  const [branding, setBranding] = useState17(null);
9764
9936
  const [brandingLoading, setBrandingLoading] = useState17(true);
9765
- const isBrandingLoadInProgressRef = useRef13(false);
9937
+ const isBrandingLoadInProgressRef = useRef14(false);
9766
9938
  const logoOnly = history.length === 0 && !brandingLoading;
9767
9939
  useEffect15(() => {
9768
9940
  const isEmptyConversation = (history?.length ?? 0) === 0;
@@ -10529,10 +10701,10 @@ var ChatContent = () => {
10529
10701
  }
10530
10702
  };
10531
10703
  if (!hydrated || brandingLoading || themeLoading) {
10532
- return /* @__PURE__ */ jsxs15(ThemeProvider, { theme: banditTheme, children: [
10533
- /* @__PURE__ */ jsx20(CssBaseline, {}),
10534
- /* @__PURE__ */ jsxs15(
10535
- Box17,
10704
+ return /* @__PURE__ */ jsxs16(ThemeProvider, { theme: banditTheme, children: [
10705
+ /* @__PURE__ */ jsx21(CssBaseline, {}),
10706
+ /* @__PURE__ */ jsxs16(
10707
+ Box18,
10536
10708
  {
10537
10709
  sx: (theme) => ({
10538
10710
  minHeight: "100dvh",
@@ -10545,8 +10717,8 @@ var ChatContent = () => {
10545
10717
  color: theme.palette.text.primary
10546
10718
  }),
10547
10719
  children: [
10548
- /* @__PURE__ */ jsx20(CircularProgress4, { size: 32, thickness: 4 }),
10549
- /* @__PURE__ */ jsx20(Typography11, { variant: "body2", color: "text.secondary", children: "Preparing your workspace..." })
10720
+ /* @__PURE__ */ jsx21(CircularProgress4, { size: 32, thickness: 4 }),
10721
+ /* @__PURE__ */ jsx21(Typography12, { variant: "body2", color: "text.secondary", children: "Preparing your workspace..." })
10550
10722
  ]
10551
10723
  }
10552
10724
  )
@@ -10554,15 +10726,15 @@ var ChatContent = () => {
10554
10726
  }
10555
10727
  const userHasAccess = playgroundBypassAccess || ossMode || claims?.roles?.includes("super-user") || claims?.roles?.includes("admin");
10556
10728
  if (!userHasAccess) {
10557
- return /* @__PURE__ */ jsxs15(ThemeProvider, { theme: banditTheme, children: [
10558
- /* @__PURE__ */ jsx20(CssBaseline, {}),
10559
- /* @__PURE__ */ jsx20(under_review_default, {})
10729
+ return /* @__PURE__ */ jsxs16(ThemeProvider, { theme: banditTheme, children: [
10730
+ /* @__PURE__ */ jsx21(CssBaseline, {}),
10731
+ /* @__PURE__ */ jsx21(under_review_default, {})
10560
10732
  ] });
10561
10733
  }
10562
- return /* @__PURE__ */ jsxs15(ThemeProvider, { theme: banditTheme, children: [
10563
- /* @__PURE__ */ jsx20(CssBaseline, {}),
10564
- /* @__PURE__ */ jsxs15(
10565
- Box17,
10734
+ return /* @__PURE__ */ jsxs16(ThemeProvider, { theme: banditTheme, children: [
10735
+ /* @__PURE__ */ jsx21(CssBaseline, {}),
10736
+ /* @__PURE__ */ jsxs16(
10737
+ Box18,
10566
10738
  {
10567
10739
  sx: (theme) => ({
10568
10740
  display: "flex",
@@ -10580,7 +10752,7 @@ var ChatContent = () => {
10580
10752
  transition: "left 0.3s ease-in-out, width 0.3s ease-in-out"
10581
10753
  }),
10582
10754
  children: [
10583
- /* @__PURE__ */ jsx20(
10755
+ /* @__PURE__ */ jsx21(
10584
10756
  chat_app_bar_default,
10585
10757
  {
10586
10758
  availableModels,
@@ -10592,8 +10764,8 @@ var ChatContent = () => {
10592
10764
  setDrawerOpen
10593
10765
  }
10594
10766
  ),
10595
- /* @__PURE__ */ jsx20(
10596
- Box17,
10767
+ /* @__PURE__ */ jsx21(
10768
+ Box18,
10597
10769
  {
10598
10770
  ref: chatContainerRef,
10599
10771
  sx: {
@@ -10613,8 +10785,8 @@ var ChatContent = () => {
10613
10785
  msOverflowStyle: "none",
10614
10786
  "&::-webkit-scrollbar": { display: "none" }
10615
10787
  },
10616
- children: /* @__PURE__ */ jsxs15(
10617
- Box17,
10788
+ children: /* @__PURE__ */ jsxs16(
10789
+ Box18,
10618
10790
  {
10619
10791
  sx: {
10620
10792
  width: "100%",
@@ -10624,9 +10796,9 @@ var ChatContent = () => {
10624
10796
  pt: 2
10625
10797
  },
10626
10798
  children: [
10627
- logoShouldRender && !brandingLoading && (branding?.logoBase64 ? /* @__PURE__ */ jsx20(custom_logo_default, { visible: logoVisible, atTop: true }) : /* @__PURE__ */ jsx20(bandit_chat_logo_default, { visible: logoVisible, atTop: true })),
10628
- /* @__PURE__ */ jsx20(
10629
- Box17,
10799
+ logoShouldRender && !brandingLoading && (branding?.logoBase64 ? /* @__PURE__ */ jsx21(custom_logo_default, { visible: logoVisible, atTop: true }) : /* @__PURE__ */ jsx21(bandit_chat_logo_default, { visible: logoVisible, atTop: true })),
10800
+ /* @__PURE__ */ jsx21(
10801
+ Box18,
10630
10802
  {
10631
10803
  sx: {
10632
10804
  margin: "0 auto",
@@ -10635,7 +10807,7 @@ var ChatContent = () => {
10635
10807
  flexShrink: 0,
10636
10808
  px: isMobile ? 0 : 0
10637
10809
  },
10638
- children: /* @__PURE__ */ jsx20(
10810
+ children: /* @__PURE__ */ jsx21(
10639
10811
  chat_messages_default,
10640
10812
  {
10641
10813
  isStreaming,
@@ -10659,7 +10831,7 @@ var ChatContent = () => {
10659
10831
  )
10660
10832
  }
10661
10833
  ),
10662
- showScrollToBottom && /* @__PURE__ */ jsx20(
10834
+ showScrollToBottom && /* @__PURE__ */ jsx21(
10663
10835
  chat_scroll_to_bottom_button_default,
10664
10836
  {
10665
10837
  inputHeight,
@@ -10668,8 +10840,8 @@ var ChatContent = () => {
10668
10840
  onClick: handleScrollToBottomClick
10669
10841
  }
10670
10842
  ),
10671
- history.length === 0 && componentStatus !== "Loading" && !isMobile && /* @__PURE__ */ jsx20(
10672
- Box17,
10843
+ history.length === 0 && componentStatus !== "Loading" && !isMobile && /* @__PURE__ */ jsx21(
10844
+ Box18,
10673
10845
  {
10674
10846
  sx: (theme) => ({
10675
10847
  position: "absolute",
@@ -10687,8 +10859,8 @@ var ChatContent = () => {
10687
10859
  })
10688
10860
  }
10689
10861
  ),
10690
- /* @__PURE__ */ jsxs15(
10691
- Box17,
10862
+ /* @__PURE__ */ jsxs16(
10863
+ Box18,
10692
10864
  {
10693
10865
  sx: {
10694
10866
  display: "flex",
@@ -10699,10 +10871,11 @@ var ChatContent = () => {
10699
10871
  maxWidth: "768px"
10700
10872
  },
10701
10873
  children: [
10702
- /* @__PURE__ */ jsx20(Box17, { sx: { flex: "1 1 auto" } }),
10703
- history.length === 0 && componentStatus !== "Loading" && !pendingMessage && preferences.chatSuggestionsEnabled && /* @__PURE__ */ jsx20(Box17, { sx: { marginBottom: "20px" }, children: /* @__PURE__ */ jsx20(QuerySuggestionPicker, { onSend: handleSend, inputHeight }) }),
10704
- /* @__PURE__ */ jsx20(ask_user_card_default, {}),
10705
- /* @__PURE__ */ jsx20(
10874
+ /* @__PURE__ */ jsx21(Box18, { sx: { flex: "1 1 auto" } }),
10875
+ history.length === 0 && componentStatus !== "Loading" && !pendingMessage && preferences.chatSuggestionsEnabled && /* @__PURE__ */ jsx21(Box18, { sx: { marginBottom: "20px" }, children: /* @__PURE__ */ jsx21(QuerySuggestionPicker, { onSend: handleSend, inputHeight }) }),
10876
+ /* @__PURE__ */ jsx21(rate_limit_prompt_default, {}),
10877
+ /* @__PURE__ */ jsx21(ask_user_card_default, {}),
10878
+ /* @__PURE__ */ jsx21(
10706
10879
  chat_input_default,
10707
10880
  {
10708
10881
  inputValue,
@@ -10729,7 +10902,7 @@ var ChatContent = () => {
10729
10902
  ]
10730
10903
  }
10731
10904
  ),
10732
- preferences.feedbackEnabled && !isMobile && /* @__PURE__ */ jsx20(
10905
+ preferences.feedbackEnabled && !isMobile && /* @__PURE__ */ jsx21(
10733
10906
  FeedbackButton,
10734
10907
  {
10735
10908
  fullScreen: false,
@@ -10742,11 +10915,11 @@ var ChatContent = () => {
10742
10915
  }
10743
10916
  }
10744
10917
  ),
10745
- /* @__PURE__ */ jsx20(ConnectionStatus, { position: "top", showWhenGood: false })
10918
+ /* @__PURE__ */ jsx21(ConnectionStatus, { position: "top", showWhenGood: false })
10746
10919
  ]
10747
10920
  }
10748
10921
  ),
10749
- /* @__PURE__ */ jsx20(canvas_panel_default, { isMobile })
10922
+ /* @__PURE__ */ jsx21(canvas_panel_default, { isMobile })
10750
10923
  ] });
10751
10924
  };
10752
10925
  var Chat = () => {
@@ -10772,13 +10945,13 @@ var Chat = () => {
10772
10945
  });
10773
10946
  if (!allowUnauthenticated && !bypassAuth && !authenticationService.isAuthenticated()) {
10774
10947
  debugLogger.debug("User is not authenticated, redirecting to login");
10775
- return /* @__PURE__ */ jsx20(Navigate, { to: "/login", replace: true });
10948
+ return /* @__PURE__ */ jsx21(Navigate, { to: "/login", replace: true });
10776
10949
  }
10777
- return /* @__PURE__ */ jsx20(ChatContent, {});
10950
+ return /* @__PURE__ */ jsx21(ChatContent, {});
10778
10951
  };
10779
10952
  var chat_default = Chat;
10780
10953
 
10781
10954
  export {
10782
10955
  chat_default
10783
10956
  };
10784
- //# sourceMappingURL=chunk-RBMHAWU7.mjs.map
10957
+ //# sourceMappingURL=chunk-BD6R7MTV.mjs.map