@burtson-labs/bandit-engine 2.0.117 → 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.
@@ -24,6 +24,7 @@ import {
24
24
  GraphicEqIcon,
25
25
  HearingDisabledIcon,
26
26
  HomeIcon,
27
+ LockIcon,
27
28
  MicIcon,
28
29
  NotesIcon,
29
30
  NotesIconOutlined,
@@ -86,7 +87,7 @@ import {
86
87
  } from "./chunk-KCI46M23.mjs";
87
88
 
88
89
  // src/chat/chat.tsx
89
- 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";
90
91
 
91
92
  // src/chat/custom-logo.tsx
92
93
  import React, { useEffect } from "react";
@@ -173,7 +174,7 @@ var Logo = ({ visible, atTop = false }) => {
173
174
  var custom_logo_default = Logo;
174
175
 
175
176
  // src/chat/chat.tsx
176
- 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";
177
178
  import { createTheme } from "@mui/material/styles";
178
179
 
179
180
  // src/chat/canvas-panel.tsx
@@ -1855,8 +1856,156 @@ var AskUserCard = () => {
1855
1856
  };
1856
1857
  var ask_user_card_default = AskUserCard;
1857
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
+
1858
2007
  // src/chat/hooks/useAIProvider.tsx
1859
- import { useCallback, useRef as useRef3 } from "react";
2008
+ import { useCallback, useRef as useRef4 } from "react";
1860
2009
 
1861
2010
  // src/services/telemetry/otlpExporter.ts
1862
2011
  function redactSecretsString(s) {
@@ -2166,7 +2315,7 @@ function telemetryEndTurn(outcome) {
2166
2315
  }
2167
2316
 
2168
2317
  // src/store/engineStore.ts
2169
- import { create as create3 } from "zustand";
2318
+ import { create as create4 } from "zustand";
2170
2319
  var STORAGE_KEY = "bandit.selectedEngine";
2171
2320
  var readStored = () => {
2172
2321
  try {
@@ -2175,7 +2324,7 @@ var readStored = () => {
2175
2324
  return null;
2176
2325
  }
2177
2326
  };
2178
- var useEngineStore = create3((set, get) => ({
2327
+ var useEngineStore = create4((set, get) => ({
2179
2328
  selectedEngine: readStored(),
2180
2329
  engines: [],
2181
2330
  loaded: false,
@@ -3221,21 +3370,21 @@ var useAIProvider = ({
3221
3370
  inputRef,
3222
3371
  onError
3223
3372
  }) => {
3224
- const currentSubRef = useRef3(null);
3225
- const lastPartialRef = useRef3({
3373
+ const currentSubRef = useRef4(null);
3374
+ const lastPartialRef = useRef4({
3226
3375
  text: "",
3227
3376
  images: [],
3228
3377
  usedDocs: [],
3229
3378
  question: ""
3230
3379
  });
3231
- const flushTimerRef = useRef3(null);
3380
+ const flushTimerRef = useRef4(null);
3232
3381
  const { provider } = useAIProviderStore.getState();
3233
3382
  const { preferences } = usePreferencesStore.getState();
3234
3383
  const { docs } = useKnowledgeStore.getState();
3235
3384
  const { analyzeMood, moodTokenBoost } = useMoodEngine();
3236
3385
  const { runMemoryScan } = useMemoryEnhancer();
3237
3386
  const { isVectorEnabled, searchMemories, searchDocuments, getUserMemories } = useVectorStore();
3238
- const pinnedVectorCacheRef = useRef3({
3387
+ const pinnedVectorCacheRef = useRef4({
3239
3388
  fetchedAt: 0,
3240
3389
  memories: []
3241
3390
  });
@@ -3281,6 +3430,7 @@ var useAIProvider = ({
3281
3430
  setResponse("");
3282
3431
  setStreamBuffer("");
3283
3432
  clearFlushTimer();
3433
+ useRateLimitStore.getState().dismiss();
3284
3434
  const imageList = Array.isArray(images) ? [...images] : [];
3285
3435
  const conversationStoreState = useConversationStore.getState();
3286
3436
  const { addToCurrent, replaceLastAnswer, conversations, currentId } = conversationStoreState;
@@ -3797,6 +3947,29 @@ ${protocol}`;
3797
3947
  overrideComponentStatus("Idle");
3798
3948
  setIsSubmitting(false);
3799
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
+ }
3800
3973
  flushNow();
3801
3974
  let partial = lastPartialRef.current.text || latestDisplayMessage || fullMessage;
3802
3975
  if (partial && !partial.trim().endsWith("\u2026") && !partial.trim().endsWith("...")) {
@@ -4388,7 +4561,7 @@ ${inlineImageBlocks.join("\n\n")}` : "");
4388
4561
  };
4389
4562
 
4390
4563
  // src/hooks/useAutoScroll.ts
4391
- 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";
4392
4565
  var SCROLL_STATE_CHANGED_EVENT = "scrollStateChanged";
4393
4566
  var useAutoScroll = (options = {}) => {
4394
4567
  const {
@@ -4397,9 +4570,9 @@ var useAutoScroll = (options = {}) => {
4397
4570
  enabled = true,
4398
4571
  isMobile = false
4399
4572
  } = options;
4400
- const containerRef = useRef4(null);
4401
- const targetRef = useRef4(null);
4402
- const shouldAutoScrollRef = useRef4(true);
4573
+ const containerRef = useRef5(null);
4574
+ const targetRef = useRef5(null);
4575
+ const shouldAutoScrollRef = useRef5(true);
4403
4576
  const isNearBottom = useCallback2(() => {
4404
4577
  const container = containerRef.current;
4405
4578
  if (!container) return true;
@@ -4604,31 +4777,31 @@ var useNetworkStatus = () => {
4604
4777
 
4605
4778
  // src/chat/chat-app-bar.tsx
4606
4779
  import { Avatar as Avatar8 } from "@mui/material";
4607
- 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";
4608
4781
  import {
4609
- Box as Box13,
4610
- IconButton as IconButton10,
4782
+ Box as Box14,
4783
+ IconButton as IconButton11,
4611
4784
  Menu as Menu5,
4612
4785
  MenuItem as MenuItem5,
4613
4786
  Tooltip as Tooltip6,
4614
4787
  useMediaQuery as useMediaQuery5,
4615
- useTheme as useTheme12,
4788
+ useTheme as useTheme13,
4616
4789
  Dialog as Dialog6,
4617
4790
  DialogTitle as DialogTitle5,
4618
4791
  DialogContent as DialogContent5,
4619
4792
  DialogActions as DialogActions5,
4620
- Typography as Typography9,
4621
- Button as Button7
4793
+ Typography as Typography10,
4794
+ Button as Button8
4622
4795
  } from "@mui/material";
4623
- import { useNavigate } from "react-router-dom";
4796
+ import { useNavigate as useNavigate2 } from "react-router-dom";
4624
4797
 
4625
4798
  // src/chat/conversation-drawer.tsx
4626
- 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";
4627
4800
  import {
4628
4801
  Drawer,
4629
- Box as Box11,
4630
- Typography as Typography7,
4631
- IconButton as IconButton8,
4802
+ Box as Box12,
4803
+ Typography as Typography8,
4804
+ IconButton as IconButton9,
4632
4805
  Tooltip as Tooltip5,
4633
4806
  TextField as TextField7,
4634
4807
  InputAdornment,
@@ -4643,24 +4816,24 @@ import {
4643
4816
  DialogTitle as DialogTitle3,
4644
4817
  DialogContent as DialogContent3,
4645
4818
  DialogActions as DialogActions3,
4646
- Button as Button5,
4819
+ Button as Button6,
4647
4820
  Avatar as Avatar6,
4648
4821
  alpha as alpha6
4649
4822
  } from "@mui/material";
4650
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";
4651
- import { useTheme as useTheme10 } from "@mui/material/styles";
4824
+ import { useTheme as useTheme11 } from "@mui/material/styles";
4652
4825
 
4653
4826
  // src/chat/project-management-modal.tsx
4654
- 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";
4655
4828
  import {
4656
4829
  Modal,
4657
- Button as Button2,
4830
+ Button as Button3,
4658
4831
  TextField as TextField4,
4659
4832
  List,
4660
4833
  ListItem,
4661
- IconButton as IconButton5,
4662
- Box as Box7,
4663
- Typography as Typography3,
4834
+ IconButton as IconButton6,
4835
+ Box as Box8,
4836
+ Typography as Typography4,
4664
4837
  Avatar as Avatar3,
4665
4838
  Chip as Chip2,
4666
4839
  Menu,
@@ -4671,8 +4844,8 @@ import {
4671
4844
  useMediaQuery as useMediaQuery2
4672
4845
  } from "@mui/material";
4673
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";
4674
- import { useTheme as useTheme6, alpha as alpha3 } from "@mui/material/styles";
4675
- 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";
4676
4849
  var DEFAULT_COLORS = [
4677
4850
  "#2196F3",
4678
4851
  "#4CAF50",
@@ -4689,7 +4862,7 @@ var ProjectManagementModal = ({
4689
4862
  open,
4690
4863
  onClose
4691
4864
  }) => {
4692
- const theme = useTheme6();
4865
+ const theme = useTheme7();
4693
4866
  const isMobile = useMediaQuery2(theme.breakpoints.down("sm"));
4694
4867
  const {
4695
4868
  projects,
@@ -4714,7 +4887,7 @@ var ProjectManagementModal = ({
4714
4887
  const [selectedProject, setSelectedProject] = useState9(null);
4715
4888
  const [loading, setLoading] = useState9(false);
4716
4889
  const [error, setError] = useState9(null);
4717
- const modalContainerRef = useRef5(null);
4890
+ const modalContainerRef = useRef6(null);
4718
4891
  useEffect7(() => {
4719
4892
  if (open && !_hasHydrated) {
4720
4893
  hydrate();
@@ -4830,8 +5003,8 @@ var ProjectManagementModal = ({
4830
5003
  const hoverSurface = alpha3(theme.palette.primary.main, theme.palette.mode === "dark" ? 0.22 : 0.08);
4831
5004
  const headerTitle = showCreateForm ? editingProject ? "Edit Project" : "Create Project" : "Manage Projects";
4832
5005
  const headerSubtitle = showCreateForm ? "Name, describe, and color-code your project." : "Organize conversations into cohesive projects.";
4833
- const content = /* @__PURE__ */ jsxs7(
4834
- Box7,
5006
+ const content = /* @__PURE__ */ jsxs8(
5007
+ Box8,
4835
5008
  {
4836
5009
  ref: modalContainerRef,
4837
5010
  sx: {
@@ -4849,8 +5022,8 @@ var ProjectManagementModal = ({
4849
5022
  position: "relative"
4850
5023
  },
4851
5024
  children: [
4852
- isMobile && /* @__PURE__ */ jsx10(
4853
- Box7,
5025
+ isMobile && /* @__PURE__ */ jsx11(
5026
+ Box8,
4854
5027
  {
4855
5028
  sx: {
4856
5029
  width: 56,
@@ -4863,8 +5036,8 @@ var ProjectManagementModal = ({
4863
5036
  }
4864
5037
  }
4865
5038
  ),
4866
- /* @__PURE__ */ jsxs7(
4867
- Box7,
5039
+ /* @__PURE__ */ jsxs8(
5040
+ Box8,
4868
5041
  {
4869
5042
  sx: {
4870
5043
  px: isMobile ? 1.5 : 2.75,
@@ -4876,8 +5049,8 @@ var ProjectManagementModal = ({
4876
5049
  gap: 1
4877
5050
  },
4878
5051
  children: [
4879
- /* @__PURE__ */ jsxs7(
4880
- Box7,
5052
+ /* @__PURE__ */ jsxs8(
5053
+ Box8,
4881
5054
  {
4882
5055
  sx: {
4883
5056
  display: "flex",
@@ -4886,8 +5059,8 @@ var ProjectManagementModal = ({
4886
5059
  gap: 1
4887
5060
  },
4888
5061
  children: [
4889
- /* @__PURE__ */ jsxs7(
4890
- Box7,
5062
+ /* @__PURE__ */ jsxs8(
5063
+ Box8,
4891
5064
  {
4892
5065
  sx: {
4893
5066
  display: "flex",
@@ -4897,9 +5070,9 @@ var ProjectManagementModal = ({
4897
5070
  flex: 1
4898
5071
  },
4899
5072
  children: [
4900
- showCreateForm && /* @__PURE__ */ jsx10(IconButton5, { onClick: resetForm, size: "small", sx: { mr: 0.5 }, children: /* @__PURE__ */ jsx10(ArrowBackIcon, { size: 16 }) }),
4901
- /* @__PURE__ */ jsx10(
4902
- 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,
4903
5076
  {
4904
5077
  variant: "h6",
4905
5078
  sx: {
@@ -4915,16 +5088,16 @@ var ProjectManagementModal = ({
4915
5088
  ]
4916
5089
  }
4917
5090
  ),
4918
- /* @__PURE__ */ jsx10(IconButton5, { onClick: handleClose, size: "small", children: /* @__PURE__ */ jsx10(CloseIcon3, {}) })
5091
+ /* @__PURE__ */ jsx11(IconButton6, { onClick: handleClose, size: "small", children: /* @__PURE__ */ jsx11(CloseIcon3, {}) })
4919
5092
  ]
4920
5093
  }
4921
5094
  ),
4922
- /* @__PURE__ */ jsx10(Typography3, { variant: "body2", color: "text.secondary", children: headerSubtitle })
5095
+ /* @__PURE__ */ jsx11(Typography4, { variant: "body2", color: "text.secondary", children: headerSubtitle })
4923
5096
  ]
4924
5097
  }
4925
5098
  ),
4926
- /* @__PURE__ */ jsxs7(
4927
- Box7,
5099
+ /* @__PURE__ */ jsxs8(
5100
+ Box8,
4928
5101
  {
4929
5102
  sx: {
4930
5103
  flex: 1,
@@ -4936,9 +5109,9 @@ var ProjectManagementModal = ({
4936
5109
  gap: 2.5
4937
5110
  },
4938
5111
  children: [
4939
- error && /* @__PURE__ */ jsx10(Alert, { severity: "error", onClose: () => setError(null), children: error }),
4940
- showCreateForm ? /* @__PURE__ */ jsxs7(Box7, { sx: { display: "flex", flexDirection: "column", gap: 2 }, children: [
4941
- /* @__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(
4942
5115
  TextField4,
4943
5116
  {
4944
5117
  label: "Project name",
@@ -4950,7 +5123,7 @@ var ProjectManagementModal = ({
4950
5123
  autoFocus: true
4951
5124
  }
4952
5125
  ),
4953
- /* @__PURE__ */ jsx10(
5126
+ /* @__PURE__ */ jsx11(
4954
5127
  TextField4,
4955
5128
  {
4956
5129
  label: "Description (optional)",
@@ -4962,7 +5135,7 @@ var ProjectManagementModal = ({
4962
5135
  disabled: loading
4963
5136
  }
4964
5137
  ),
4965
- /* @__PURE__ */ jsx10(
5138
+ /* @__PURE__ */ jsx11(
4966
5139
  TextField4,
4967
5140
  {
4968
5141
  label: "Project instructions (optional)",
@@ -4975,10 +5148,10 @@ var ProjectManagementModal = ({
4975
5148
  disabled: loading
4976
5149
  }
4977
5150
  ),
4978
- /* @__PURE__ */ jsxs7(Box7, { children: [
4979
- /* @__PURE__ */ jsx10(Typography3, { variant: "subtitle2", sx: { mb: 1 }, children: "Color" }),
4980
- /* @__PURE__ */ jsx10(Box7, { sx: { display: "flex", flexWrap: "wrap", gap: 1 }, children: DEFAULT_COLORS.map((color) => /* @__PURE__ */ jsx10(
4981
- 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,
4982
5155
  {
4983
5156
  sx: {
4984
5157
  width: 32,
@@ -4998,11 +5171,11 @@ var ProjectManagementModal = ({
4998
5171
  color
4999
5172
  )) })
5000
5173
  ] })
5001
- ] }) : /* @__PURE__ */ jsxs7(Box7, { sx: { display: "flex", flexDirection: "column", gap: 2 }, children: [
5002
- /* @__PURE__ */ jsx10(
5003
- Button2,
5174
+ ] }) : /* @__PURE__ */ jsxs8(Box8, { sx: { display: "flex", flexDirection: "column", gap: 2 }, children: [
5175
+ /* @__PURE__ */ jsx11(
5176
+ Button3,
5004
5177
  {
5005
- startIcon: /* @__PURE__ */ jsx10(AddIcon2, {}),
5178
+ startIcon: /* @__PURE__ */ jsx11(AddIcon2, {}),
5006
5179
  onClick: () => setShowCreateForm(true),
5007
5180
  variant: "contained",
5008
5181
  sx: {
@@ -5014,8 +5187,8 @@ var ProjectManagementModal = ({
5014
5187
  children: "Create project"
5015
5188
  }
5016
5189
  ),
5017
- projects.length === 0 ? /* @__PURE__ */ jsxs7(
5018
- Box7,
5190
+ projects.length === 0 ? /* @__PURE__ */ jsxs8(
5191
+ Box8,
5019
5192
  {
5020
5193
  sx: {
5021
5194
  textAlign: "center",
@@ -5027,15 +5200,15 @@ var ProjectManagementModal = ({
5027
5200
  backgroundColor: subtleSurface
5028
5201
  },
5029
5202
  children: [
5030
- /* @__PURE__ */ jsx10(FolderIcon, { size: 48, style: { marginBottom: 8, opacity: 0.5 } }),
5031
- /* @__PURE__ */ jsx10(Typography3, { variant: "body1", sx: { fontWeight: 600 }, children: "No projects yet" }),
5032
- /* @__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." })
5033
5206
  ]
5034
5207
  }
5035
- ) : /* @__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) => {
5036
5209
  const conversationCount = getConversationsByProject(project.id).length;
5037
- return /* @__PURE__ */ jsx10(ListItem, { disablePadding: true, children: /* @__PURE__ */ jsxs7(
5038
- Box7,
5210
+ return /* @__PURE__ */ jsx11(ListItem, { disablePadding: true, children: /* @__PURE__ */ jsxs8(
5211
+ Box8,
5039
5212
  {
5040
5213
  sx: {
5041
5214
  display: "flex",
@@ -5053,7 +5226,7 @@ var ProjectManagementModal = ({
5053
5226
  }
5054
5227
  },
5055
5228
  children: [
5056
- /* @__PURE__ */ jsx10(
5229
+ /* @__PURE__ */ jsx11(
5057
5230
  Avatar3,
5058
5231
  {
5059
5232
  sx: {
@@ -5062,20 +5235,20 @@ var ProjectManagementModal = ({
5062
5235
  height: 36,
5063
5236
  fontSize: "1rem"
5064
5237
  },
5065
- children: /* @__PURE__ */ jsx10(FolderIcon, { size: 16 })
5238
+ children: /* @__PURE__ */ jsx11(FolderIcon, { size: 16 })
5066
5239
  }
5067
5240
  ),
5068
- /* @__PURE__ */ jsxs7(Box7, { sx: { flex: 1, minWidth: 0 }, children: [
5069
- /* @__PURE__ */ jsxs7(Box7, { sx: { display: "flex", alignItems: "center", gap: 1, flexWrap: "wrap" }, children: [
5070
- /* @__PURE__ */ jsx10(
5071
- 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,
5072
5245
  {
5073
5246
  variant: "subtitle1",
5074
5247
  sx: { fontWeight: 600, overflow: "hidden", textOverflow: "ellipsis" },
5075
5248
  children: project.name
5076
5249
  }
5077
5250
  ),
5078
- /* @__PURE__ */ jsx10(
5251
+ /* @__PURE__ */ jsx11(
5079
5252
  Chip2,
5080
5253
  {
5081
5254
  label: `${conversationCount}`,
@@ -5090,8 +5263,8 @@ var ProjectManagementModal = ({
5090
5263
  }
5091
5264
  )
5092
5265
  ] }),
5093
- project.description && /* @__PURE__ */ jsx10(
5094
- Typography3,
5266
+ project.description && /* @__PURE__ */ jsx11(
5267
+ Typography4,
5095
5268
  {
5096
5269
  variant: "body2",
5097
5270
  color: "text.secondary",
@@ -5100,8 +5273,8 @@ var ProjectManagementModal = ({
5100
5273
  }
5101
5274
  )
5102
5275
  ] }),
5103
- /* @__PURE__ */ jsx10(
5104
- IconButton5,
5276
+ /* @__PURE__ */ jsx11(
5277
+ IconButton6,
5105
5278
  {
5106
5279
  onClick: (e) => {
5107
5280
  e.stopPropagation();
@@ -5113,7 +5286,7 @@ var ProjectManagementModal = ({
5113
5286
  mt: 0.25,
5114
5287
  zIndex: 1
5115
5288
  },
5116
- children: /* @__PURE__ */ jsx10(MoreVertIcon, { size: 16 })
5289
+ children: /* @__PURE__ */ jsx11(MoreVertIcon, { size: 16 })
5117
5290
  }
5118
5291
  )
5119
5292
  ]
@@ -5124,8 +5297,8 @@ var ProjectManagementModal = ({
5124
5297
  ]
5125
5298
  }
5126
5299
  ),
5127
- /* @__PURE__ */ jsx10(
5128
- Box7,
5300
+ /* @__PURE__ */ jsx11(
5301
+ Box8,
5129
5302
  {
5130
5303
  sx: {
5131
5304
  px: isMobile ? 1.5 : 2.75,
@@ -5135,9 +5308,9 @@ var ProjectManagementModal = ({
5135
5308
  justifyContent: "flex-end",
5136
5309
  gap: 1
5137
5310
  },
5138
- children: showCreateForm ? /* @__PURE__ */ jsxs7(Fragment5, { children: [
5139
- /* @__PURE__ */ jsx10(
5140
- Button2,
5311
+ children: showCreateForm ? /* @__PURE__ */ jsxs8(Fragment5, { children: [
5312
+ /* @__PURE__ */ jsx11(
5313
+ Button3,
5141
5314
  {
5142
5315
  onClick: resetForm,
5143
5316
  disabled: loading,
@@ -5145,21 +5318,21 @@ var ProjectManagementModal = ({
5145
5318
  children: "Cancel"
5146
5319
  }
5147
5320
  ),
5148
- /* @__PURE__ */ jsx10(
5149
- Button2,
5321
+ /* @__PURE__ */ jsx11(
5322
+ Button3,
5150
5323
  {
5151
5324
  onClick: editingProject ? handleEditProject : handleCreateProject,
5152
5325
  variant: "contained",
5153
5326
  disabled: loading,
5154
- startIcon: loading ? /* @__PURE__ */ jsx10(CircularProgress3, { size: 16 }) : void 0,
5327
+ startIcon: loading ? /* @__PURE__ */ jsx11(CircularProgress3, { size: 16 }) : void 0,
5155
5328
  sx: { textTransform: "none", borderRadius: 2 },
5156
5329
  children: editingProject ? "Update project" : "Create project"
5157
5330
  }
5158
5331
  )
5159
- ] }) : /* @__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" })
5160
5333
  }
5161
5334
  ),
5162
- /* @__PURE__ */ jsxs7(
5335
+ /* @__PURE__ */ jsxs8(
5163
5336
  Menu,
5164
5337
  {
5165
5338
  anchorEl: menuAnchor,
@@ -5181,20 +5354,20 @@ var ProjectManagementModal = ({
5181
5354
  }
5182
5355
  },
5183
5356
  children: [
5184
- /* @__PURE__ */ jsx10(
5357
+ /* @__PURE__ */ jsx11(
5185
5358
  MenuItem,
5186
5359
  {
5187
5360
  onClick: () => {
5188
5361
  if (!selectedProject) return;
5189
5362
  startEdit(selectedProject);
5190
5363
  },
5191
- children: /* @__PURE__ */ jsxs7(Box7, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
5192
- /* @__PURE__ */ jsx10(EditIcon2, { size: 16 }),
5193
- /* @__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" })
5194
5367
  ] })
5195
5368
  }
5196
5369
  ),
5197
- /* @__PURE__ */ jsx10(
5370
+ /* @__PURE__ */ jsx11(
5198
5371
  MenuItem,
5199
5372
  {
5200
5373
  onClick: () => {
@@ -5202,9 +5375,9 @@ var ProjectManagementModal = ({
5202
5375
  handleDeleteProject(selectedProject);
5203
5376
  },
5204
5377
  sx: { color: theme.palette.error.main },
5205
- children: /* @__PURE__ */ jsxs7(Box7, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
5206
- /* @__PURE__ */ jsx10(DeleteIcon, { size: 16 }),
5207
- /* @__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" })
5208
5381
  ] })
5209
5382
  }
5210
5383
  )
@@ -5214,7 +5387,7 @@ var ProjectManagementModal = ({
5214
5387
  ]
5215
5388
  }
5216
5389
  );
5217
- return /* @__PURE__ */ jsx10(Fragment5, { children: isMobile ? /* @__PURE__ */ jsx10(
5390
+ return /* @__PURE__ */ jsx11(Fragment5, { children: isMobile ? /* @__PURE__ */ jsx11(
5218
5391
  SwipeableDrawer,
5219
5392
  {
5220
5393
  anchor: "bottom",
@@ -5234,7 +5407,7 @@ var ProjectManagementModal = ({
5234
5407
  },
5235
5408
  children: content
5236
5409
  }
5237
- ) : /* @__PURE__ */ jsx10(
5410
+ ) : /* @__PURE__ */ jsx11(
5238
5411
  Modal,
5239
5412
  {
5240
5413
  open,
@@ -5259,28 +5432,28 @@ import {
5259
5432
  DialogTitle,
5260
5433
  DialogContent,
5261
5434
  DialogActions,
5262
- Button as Button3,
5435
+ Button as Button4,
5263
5436
  List as List2,
5264
5437
  ListItem as ListItem2,
5265
5438
  ListItemButton,
5266
5439
  ListItemText,
5267
5440
  ListItemIcon,
5268
- Typography as Typography4,
5441
+ Typography as Typography5,
5269
5442
  Avatar as Avatar4,
5270
5443
  Radio,
5271
- Box as Box8,
5444
+ Box as Box9,
5272
5445
  Divider
5273
5446
  } from "@mui/material";
5274
5447
  import { Folder as FolderIcon2, Inbox as InboxIcon } from "lucide-react";
5275
- import { useTheme as useTheme7 } from "@mui/material/styles";
5276
- 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";
5277
5450
  var MoveConversationModal = ({
5278
5451
  open,
5279
5452
  onClose,
5280
5453
  conversations,
5281
5454
  currentProjectId = null
5282
5455
  }) => {
5283
- const theme = useTheme7();
5456
+ const theme = useTheme8();
5284
5457
  const { projects, _hasHydrated, hydrate } = useProjectStore();
5285
5458
  const { moveConversationToProject } = useConversationStore();
5286
5459
  const [selectedProjectId, setSelectedProjectId] = useState10(
@@ -5310,7 +5483,7 @@ var MoveConversationModal = ({
5310
5483
  };
5311
5484
  const conversationCount = conversations.length;
5312
5485
  const isMultiple = conversationCount > 1;
5313
- return /* @__PURE__ */ jsxs8(
5486
+ return /* @__PURE__ */ jsxs9(
5314
5487
  Dialog2,
5315
5488
  {
5316
5489
  open,
@@ -5324,20 +5497,20 @@ var MoveConversationModal = ({
5324
5497
  }
5325
5498
  },
5326
5499
  children: [
5327
- /* @__PURE__ */ jsxs8(DialogTitle, { children: [
5500
+ /* @__PURE__ */ jsxs9(DialogTitle, { children: [
5328
5501
  "Move ",
5329
5502
  isMultiple ? `${conversationCount} Conversations` : "Conversation"
5330
5503
  ] }),
5331
- /* @__PURE__ */ jsxs8(DialogContent, { sx: { px: 3 }, children: [
5332
- /* @__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:` }),
5333
- /* @__PURE__ */ jsxs8(List2, { children: [
5334
- /* @__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(
5335
5508
  ListItemButton,
5336
5509
  {
5337
5510
  onClick: () => setSelectedProjectId(null),
5338
5511
  selected: selectedProjectId === null,
5339
5512
  children: [
5340
- /* @__PURE__ */ jsx11(ListItemIcon, { children: /* @__PURE__ */ jsx11(
5513
+ /* @__PURE__ */ jsx12(ListItemIcon, { children: /* @__PURE__ */ jsx12(
5341
5514
  Radio,
5342
5515
  {
5343
5516
  checked: selectedProjectId === null,
@@ -5345,7 +5518,7 @@ var MoveConversationModal = ({
5345
5518
  size: "small"
5346
5519
  }
5347
5520
  ) }),
5348
- /* @__PURE__ */ jsx11(ListItemIcon, { children: /* @__PURE__ */ jsx11(
5521
+ /* @__PURE__ */ jsx12(ListItemIcon, { children: /* @__PURE__ */ jsx12(
5349
5522
  Avatar4,
5350
5523
  {
5351
5524
  sx: {
@@ -5353,10 +5526,10 @@ var MoveConversationModal = ({
5353
5526
  width: 32,
5354
5527
  height: 32
5355
5528
  },
5356
- children: /* @__PURE__ */ jsx11(InboxIcon, {})
5529
+ children: /* @__PURE__ */ jsx12(InboxIcon, {})
5357
5530
  }
5358
5531
  ) }),
5359
- /* @__PURE__ */ jsx11(
5532
+ /* @__PURE__ */ jsx12(
5360
5533
  ListItemText,
5361
5534
  {
5362
5535
  primary: "No Project",
@@ -5366,14 +5539,14 @@ var MoveConversationModal = ({
5366
5539
  ]
5367
5540
  }
5368
5541
  ) }),
5369
- /* @__PURE__ */ jsx11(Divider, { sx: { my: 1 } }),
5370
- 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(
5371
5544
  ListItemButton,
5372
5545
  {
5373
5546
  onClick: () => setSelectedProjectId(project.id),
5374
5547
  selected: selectedProjectId === project.id,
5375
5548
  children: [
5376
- /* @__PURE__ */ jsx11(ListItemIcon, { children: /* @__PURE__ */ jsx11(
5549
+ /* @__PURE__ */ jsx12(ListItemIcon, { children: /* @__PURE__ */ jsx12(
5377
5550
  Radio,
5378
5551
  {
5379
5552
  checked: selectedProjectId === project.id,
@@ -5381,7 +5554,7 @@ var MoveConversationModal = ({
5381
5554
  size: "small"
5382
5555
  }
5383
5556
  ) }),
5384
- /* @__PURE__ */ jsx11(ListItemIcon, { children: /* @__PURE__ */ jsx11(
5557
+ /* @__PURE__ */ jsx12(ListItemIcon, { children: /* @__PURE__ */ jsx12(
5385
5558
  Avatar4,
5386
5559
  {
5387
5560
  sx: {
@@ -5389,10 +5562,10 @@ var MoveConversationModal = ({
5389
5562
  width: 32,
5390
5563
  height: 32
5391
5564
  },
5392
- children: /* @__PURE__ */ jsx11(FolderIcon2, {})
5565
+ children: /* @__PURE__ */ jsx12(FolderIcon2, {})
5393
5566
  }
5394
5567
  ) }),
5395
- /* @__PURE__ */ jsx11(
5568
+ /* @__PURE__ */ jsx12(
5396
5569
  ListItemText,
5397
5570
  {
5398
5571
  primary: project.name,
@@ -5402,17 +5575,17 @@ var MoveConversationModal = ({
5402
5575
  ]
5403
5576
  }
5404
5577
  ) }, project.id)),
5405
- projects.length === 0 && /* @__PURE__ */ jsx11(Box8, { sx: {
5578
+ projects.length === 0 && /* @__PURE__ */ jsx12(Box9, { sx: {
5406
5579
  textAlign: "center",
5407
5580
  py: 2,
5408
5581
  color: theme.palette.text.secondary
5409
- }, 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." }) })
5410
5583
  ] })
5411
5584
  ] }),
5412
- /* @__PURE__ */ jsxs8(DialogActions, { sx: { px: 3, pb: 2 }, children: [
5413
- /* @__PURE__ */ jsx11(Button3, { onClick: onClose, children: "Cancel" }),
5414
- /* @__PURE__ */ jsxs8(
5415
- Button3,
5585
+ /* @__PURE__ */ jsxs9(DialogActions, { sx: { px: 3, pb: 2 }, children: [
5586
+ /* @__PURE__ */ jsx12(Button4, { onClick: onClose, children: "Cancel" }),
5587
+ /* @__PURE__ */ jsxs9(
5588
+ Button4,
5416
5589
  {
5417
5590
  onClick: handleMove,
5418
5591
  variant: "contained",
@@ -5431,11 +5604,11 @@ var MoveConversationModal = ({
5431
5604
  var move_conversation_modal_default = MoveConversationModal;
5432
5605
 
5433
5606
  // src/chat/simple-conversation-item.tsx
5434
- 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";
5435
5608
  import {
5436
- Box as Box9,
5437
- Typography as Typography5,
5438
- IconButton as IconButton6,
5609
+ Box as Box10,
5610
+ Typography as Typography6,
5611
+ IconButton as IconButton7,
5439
5612
  Menu as Menu2,
5440
5613
  MenuItem as MenuItem2,
5441
5614
  ListItemIcon as ListItemIcon2,
@@ -5446,11 +5619,11 @@ import {
5446
5619
  DialogTitle as DialogTitle2,
5447
5620
  DialogContent as DialogContent2,
5448
5621
  DialogActions as DialogActions2,
5449
- Button as Button4
5622
+ Button as Button5
5450
5623
  } from "@mui/material";
5451
5624
  import { MoreVertical as MoreVertIcon2, Pencil as EditIcon3, Trash2 as DeleteIcon2, GripVertical as DragIcon, MailOpen as MoveIcon } from "lucide-react";
5452
- import { useTheme as useTheme8, alpha as alpha4 } from "@mui/material/styles";
5453
- 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";
5454
5627
  var SimpleConversationItem = ({
5455
5628
  conversation,
5456
5629
  isSelected,
@@ -5466,7 +5639,7 @@ var SimpleConversationItem = ({
5466
5639
  onTouchDragEnd,
5467
5640
  isTouchDragActive
5468
5641
  }) => {
5469
- const theme = useTheme8();
5642
+ const theme = useTheme9();
5470
5643
  const isMobile = useMediaQuery3(theme.breakpoints.down("sm"));
5471
5644
  const [anchorEl, setAnchorEl] = useState11(null);
5472
5645
  const [isEditing, setIsEditing] = useState11(false);
@@ -5474,10 +5647,10 @@ var SimpleConversationItem = ({
5474
5647
  const [isDragging, setIsDragging] = useState11(false);
5475
5648
  const [isTouchDragging, setIsTouchDragging] = useState11(false);
5476
5649
  const [showRenameDialog, setShowRenameDialog] = useState11(false);
5477
- const longPressTimeoutRef = useRef6(null);
5478
- const touchStartPointRef = useRef6(null);
5479
- const activeTouchIdRef = useRef6(null);
5480
- const suppressClickRef = useRef6(false);
5650
+ const longPressTimeoutRef = useRef7(null);
5651
+ const touchStartPointRef = useRef7(null);
5652
+ const activeTouchIdRef = useRef7(null);
5653
+ const suppressClickRef = useRef7(false);
5481
5654
  const highlightText = (text, query) => {
5482
5655
  if (!query || !query.trim()) {
5483
5656
  return text;
@@ -5485,8 +5658,8 @@ var SimpleConversationItem = ({
5485
5658
  const regex = new RegExp(`(${query.trim()})`, "gi");
5486
5659
  const parts = text.split(regex);
5487
5660
  return parts.map(
5488
- (part, index) => regex.test(part) ? /* @__PURE__ */ jsx12(
5489
- Box9,
5661
+ (part, index) => regex.test(part) ? /* @__PURE__ */ jsx13(
5662
+ Box10,
5490
5663
  {
5491
5664
  component: "span",
5492
5665
  sx: {
@@ -5621,9 +5794,9 @@ var SimpleConversationItem = ({
5621
5794
  setIsTouchDragging(false);
5622
5795
  }
5623
5796
  }, [isTouchDragActive, isTouchDragging]);
5624
- return /* @__PURE__ */ jsxs9(Fragment6, { children: [
5625
- /* @__PURE__ */ jsxs9(
5626
- Box9,
5797
+ return /* @__PURE__ */ jsxs10(Fragment6, { children: [
5798
+ /* @__PURE__ */ jsxs10(
5799
+ Box10,
5627
5800
  {
5628
5801
  "data-project-id": conversation.projectId ?? "__ungrouped",
5629
5802
  draggable: !isMobile && !isEditing,
@@ -5675,7 +5848,7 @@ var SimpleConversationItem = ({
5675
5848
  }
5676
5849
  },
5677
5850
  children: [
5678
- !isMobile && !isEditing && /* @__PURE__ */ jsx12(
5851
+ !isMobile && !isEditing && /* @__PURE__ */ jsx13(
5679
5852
  DragIcon,
5680
5853
  {
5681
5854
  size: 16,
@@ -5683,8 +5856,8 @@ var SimpleConversationItem = ({
5683
5856
  style: { marginRight: 4, cursor: "grab" }
5684
5857
  }
5685
5858
  ),
5686
- /* @__PURE__ */ jsxs9(Box9, { sx: { flex: 1, minWidth: 0 }, children: [
5687
- isEditing ? /* @__PURE__ */ jsx12(
5859
+ /* @__PURE__ */ jsxs10(Box10, { sx: { flex: 1, minWidth: 0 }, children: [
5860
+ isEditing ? /* @__PURE__ */ jsx13(
5688
5861
  TextField5,
5689
5862
  {
5690
5863
  value: editName,
@@ -5707,8 +5880,8 @@ var SimpleConversationItem = ({
5707
5880
  }
5708
5881
  }
5709
5882
  }
5710
- ) : /* @__PURE__ */ jsx12(
5711
- Typography5,
5883
+ ) : /* @__PURE__ */ jsx13(
5884
+ Typography6,
5712
5885
  {
5713
5886
  variant: "body2",
5714
5887
  sx: {
@@ -5722,8 +5895,8 @@ var SimpleConversationItem = ({
5722
5895
  children: highlightText(conversation.name, searchQuery)
5723
5896
  }
5724
5897
  ),
5725
- !isEditing && snippet && /* @__PURE__ */ jsx12(
5726
- Typography5,
5898
+ !isEditing && snippet && /* @__PURE__ */ jsx13(
5899
+ Typography6,
5727
5900
  {
5728
5901
  variant: "caption",
5729
5902
  sx: {
@@ -5741,8 +5914,8 @@ var SimpleConversationItem = ({
5741
5914
  }
5742
5915
  )
5743
5916
  ] }),
5744
- !isEditing && /* @__PURE__ */ jsx12(
5745
- IconButton6,
5917
+ !isEditing && /* @__PURE__ */ jsx13(
5918
+ IconButton7,
5746
5919
  {
5747
5920
  onClick: handleMenuOpen,
5748
5921
  size: "small",
@@ -5770,10 +5943,10 @@ var SimpleConversationItem = ({
5770
5943
  }
5771
5944
  }
5772
5945
  },
5773
- children: /* @__PURE__ */ jsx12(MoreVertIcon2, { size: 16 })
5946
+ children: /* @__PURE__ */ jsx13(MoreVertIcon2, { size: 16 })
5774
5947
  }
5775
5948
  ),
5776
- /* @__PURE__ */ jsxs9(
5949
+ /* @__PURE__ */ jsxs10(
5777
5950
  Menu2,
5778
5951
  {
5779
5952
  anchorEl,
@@ -5800,17 +5973,17 @@ var SimpleConversationItem = ({
5800
5973
  }
5801
5974
  },
5802
5975
  children: [
5803
- onRename && /* @__PURE__ */ jsxs9(MenuItem2, { onClick: handleEdit, children: [
5804
- /* @__PURE__ */ jsx12(ListItemIcon2, { children: /* @__PURE__ */ jsx12(EditIcon3, { size: 16 }) }),
5805
- /* @__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" })
5806
5979
  ] }),
5807
- onMove && /* @__PURE__ */ jsxs9(MenuItem2, { onClick: handleMove, children: [
5808
- /* @__PURE__ */ jsx12(ListItemIcon2, { children: /* @__PURE__ */ jsx12(MoveIcon, { size: 16 }) }),
5809
- /* @__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" })
5810
5983
  ] }),
5811
- /* @__PURE__ */ jsxs9(MenuItem2, { onClick: handleDelete, children: [
5812
- /* @__PURE__ */ jsx12(ListItemIcon2, { children: /* @__PURE__ */ jsx12(DeleteIcon2, { size: 16 }) }),
5813
- /* @__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" })
5814
5987
  ] })
5815
5988
  ]
5816
5989
  }
@@ -5818,7 +5991,7 @@ var SimpleConversationItem = ({
5818
5991
  ]
5819
5992
  }
5820
5993
  ),
5821
- isMobile && /* @__PURE__ */ jsxs9(
5994
+ isMobile && /* @__PURE__ */ jsxs10(
5822
5995
  Dialog3,
5823
5996
  {
5824
5997
  open: showRenameDialog,
@@ -5834,8 +6007,8 @@ var SimpleConversationItem = ({
5834
6007
  }
5835
6008
  },
5836
6009
  children: [
5837
- /* @__PURE__ */ jsx12(DialogTitle2, { sx: { pb: 1 }, children: "Rename Conversation" }),
5838
- /* @__PURE__ */ jsx12(DialogContent2, { children: /* @__PURE__ */ jsx12(
6010
+ /* @__PURE__ */ jsx13(DialogTitle2, { sx: { pb: 1 }, children: "Rename Conversation" }),
6011
+ /* @__PURE__ */ jsx13(DialogContent2, { children: /* @__PURE__ */ jsx13(
5839
6012
  TextField5,
5840
6013
  {
5841
6014
  value: editName,
@@ -5848,9 +6021,9 @@ var SimpleConversationItem = ({
5848
6021
  }
5849
6022
  }
5850
6023
  ) }),
5851
- /* @__PURE__ */ jsxs9(DialogActions2, { sx: { px: 3, pb: 2 }, children: [
5852
- /* @__PURE__ */ jsx12(
5853
- Button4,
6024
+ /* @__PURE__ */ jsxs10(DialogActions2, { sx: { px: 3, pb: 2 }, children: [
6025
+ /* @__PURE__ */ jsx13(
6026
+ Button5,
5854
6027
  {
5855
6028
  onClick: () => {
5856
6029
  setShowRenameDialog(false);
@@ -5859,8 +6032,8 @@ var SimpleConversationItem = ({
5859
6032
  children: "Cancel"
5860
6033
  }
5861
6034
  ),
5862
- /* @__PURE__ */ jsx12(
5863
- Button4,
6035
+ /* @__PURE__ */ jsx13(
6036
+ Button5,
5864
6037
  {
5865
6038
  onClick: () => {
5866
6039
  commitRename();
@@ -5880,11 +6053,11 @@ var SimpleConversationItem = ({
5880
6053
  var simple_conversation_item_default = SimpleConversationItem;
5881
6054
 
5882
6055
  // src/chat/project-header.tsx
5883
- import { useRef as useRef7, useState as useState12 } from "react";
6056
+ import { useRef as useRef8, useState as useState12 } from "react";
5884
6057
  import {
5885
- Box as Box10,
5886
- Typography as Typography6,
5887
- IconButton as IconButton7,
6058
+ Box as Box11,
6059
+ Typography as Typography7,
6060
+ IconButton as IconButton8,
5888
6061
  Avatar as Avatar5,
5889
6062
  Chip as Chip3,
5890
6063
  Tooltip as Tooltip4,
@@ -5892,8 +6065,8 @@ import {
5892
6065
  alpha as alpha5
5893
6066
  } from "@mui/material";
5894
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";
5895
- import { useTheme as useTheme9 } from "@mui/material/styles";
5896
- 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";
5897
6070
  var ProjectHeader = ({
5898
6071
  projectId,
5899
6072
  projectName,
@@ -5907,13 +6080,13 @@ var ProjectHeader = ({
5907
6080
  onRenameCancelDelete,
5908
6081
  isTouchTarget
5909
6082
  }) => {
5910
- const theme = useTheme9();
6083
+ const theme = useTheme10();
5911
6084
  const { createNewConversation } = useConversationStore();
5912
6085
  const { renameProject } = useProjectStore();
5913
6086
  const [isHovered, setIsHovered] = useState12(false);
5914
6087
  const [isDragOver, setIsDragOver] = useState12(false);
5915
6088
  const [renameDraft, setRenameDraft] = useState12(projectName);
5916
- const renameActionRef = useRef7("none");
6089
+ const renameActionRef = useRef8("none");
5917
6090
  const isUngrouped = projectId === null;
5918
6091
  const Icon = isCollapsed ? FolderIcon3 : FolderOpenIcon;
5919
6092
  const handleAddConversation = (e) => {
@@ -5959,8 +6132,8 @@ var ProjectHeader = ({
5959
6132
  setRenameDraft(projectName);
5960
6133
  onRenameComplete?.();
5961
6134
  };
5962
- return /* @__PURE__ */ jsxs10(
5963
- Box10,
6135
+ return /* @__PURE__ */ jsxs11(
6136
+ Box11,
5964
6137
  {
5965
6138
  "data-project-id": projectId ?? "__ungrouped",
5966
6139
  onMouseEnter: () => setIsHovered(true),
@@ -5986,7 +6159,7 @@ var ProjectHeader = ({
5986
6159
  } : {}
5987
6160
  },
5988
6161
  children: [
5989
- /* @__PURE__ */ jsx13(
6162
+ /* @__PURE__ */ jsx14(
5990
6163
  Avatar5,
5991
6164
  {
5992
6165
  sx: {
@@ -5995,17 +6168,17 @@ var ProjectHeader = ({
5995
6168
  height: 28,
5996
6169
  mr: 1.5
5997
6170
  },
5998
- children: isUngrouped ? /* @__PURE__ */ jsx13(
6171
+ children: isUngrouped ? /* @__PURE__ */ jsx14(
5999
6172
  InboxIcon2,
6000
6173
  {
6001
6174
  size: 16,
6002
6175
  color: theme.palette.text.disabled,
6003
6176
  style: { opacity: 0.7 }
6004
6177
  }
6005
- ) : /* @__PURE__ */ jsx13(Icon, { size: 16 })
6178
+ ) : /* @__PURE__ */ jsx14(Icon, { size: 16 })
6006
6179
  }
6007
6180
  ),
6008
- isRenaming && !isUngrouped ? /* @__PURE__ */ jsx13(
6181
+ isRenaming && !isUngrouped ? /* @__PURE__ */ jsx14(
6009
6182
  TextField6,
6010
6183
  {
6011
6184
  value: renameDraft,
@@ -6052,8 +6225,8 @@ var ProjectHeader = ({
6052
6225
  }
6053
6226
  }
6054
6227
  }
6055
- ) : /* @__PURE__ */ jsxs10(
6056
- Typography6,
6228
+ ) : /* @__PURE__ */ jsxs11(
6229
+ Typography7,
6057
6230
  {
6058
6231
  variant: "subtitle2",
6059
6232
  sx: {
@@ -6065,8 +6238,8 @@ var ProjectHeader = ({
6065
6238
  },
6066
6239
  children: [
6067
6240
  projectName,
6068
- isDragOver && /* @__PURE__ */ jsx13(
6069
- Typography6,
6241
+ isDragOver && /* @__PURE__ */ jsx14(
6242
+ Typography7,
6070
6243
  {
6071
6244
  component: "span",
6072
6245
  variant: "caption",
@@ -6081,7 +6254,7 @@ var ProjectHeader = ({
6081
6254
  ]
6082
6255
  }
6083
6256
  ),
6084
- /* @__PURE__ */ jsx13(
6257
+ /* @__PURE__ */ jsx14(
6085
6258
  Chip3,
6086
6259
  {
6087
6260
  label: conversationCount,
@@ -6101,9 +6274,9 @@ var ProjectHeader = ({
6101
6274
  }
6102
6275
  }
6103
6276
  ),
6104
- isRenaming && !isUngrouped && /* @__PURE__ */ jsxs10(Box10, { sx: { display: "flex", alignItems: "center", gap: 0.5, ml: 1 }, children: [
6105
- /* @__PURE__ */ jsx13(Tooltip4, { title: "Cancel and remove", children: /* @__PURE__ */ jsx13(
6106
- 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,
6107
6280
  {
6108
6281
  size: "small",
6109
6282
  onMouseDown: (e) => {
@@ -6112,11 +6285,11 @@ var ProjectHeader = ({
6112
6285
  onRenameCancelDelete ? onRenameCancelDelete() : cancelRename();
6113
6286
  },
6114
6287
  sx: { color: alpha5(theme.palette.error.main, 0.9) },
6115
- children: /* @__PURE__ */ jsx13(CloseIcon4, { size: 16 })
6288
+ children: /* @__PURE__ */ jsx14(CloseIcon4, { size: 16 })
6116
6289
  }
6117
6290
  ) }),
6118
- /* @__PURE__ */ jsx13(Tooltip4, { title: "Save", children: /* @__PURE__ */ jsx13(
6119
- IconButton7,
6291
+ /* @__PURE__ */ jsx14(Tooltip4, { title: "Save", children: /* @__PURE__ */ jsx14(
6292
+ IconButton8,
6120
6293
  {
6121
6294
  size: "small",
6122
6295
  onMouseDown: (e) => {
@@ -6125,12 +6298,12 @@ var ProjectHeader = ({
6125
6298
  commitRename();
6126
6299
  },
6127
6300
  sx: { color: theme.palette.success.main },
6128
- children: /* @__PURE__ */ jsx13(CheckIcon3, { size: 16 })
6301
+ children: /* @__PURE__ */ jsx14(CheckIcon3, { size: 16 })
6129
6302
  }
6130
6303
  ) })
6131
6304
  ] }),
6132
- isHovered && !isDragOver && !isUngrouped && !isRenaming && /* @__PURE__ */ jsx13(Tooltip4, { title: `Add conversation to ${projectName.toLowerCase()}`, arrow: true, children: /* @__PURE__ */ jsx13(
6133
- IconButton7,
6305
+ isHovered && !isDragOver && !isUngrouped && !isRenaming && /* @__PURE__ */ jsx14(Tooltip4, { title: `Add conversation to ${projectName.toLowerCase()}`, arrow: true, children: /* @__PURE__ */ jsx14(
6306
+ IconButton8,
6134
6307
  {
6135
6308
  onClick: handleAddConversation,
6136
6309
  size: "small",
@@ -6146,18 +6319,18 @@ var ProjectHeader = ({
6146
6319
  },
6147
6320
  transition: "all 0.2s ease"
6148
6321
  },
6149
- children: /* @__PURE__ */ jsx13(AddIcon3, { size: 16 })
6322
+ children: /* @__PURE__ */ jsx14(AddIcon3, { size: 16 })
6150
6323
  }
6151
6324
  ) }),
6152
- !isUngrouped && !isRenaming && /* @__PURE__ */ jsx13(
6153
- IconButton7,
6325
+ !isUngrouped && !isRenaming && /* @__PURE__ */ jsx14(
6326
+ IconButton8,
6154
6327
  {
6155
6328
  size: "small",
6156
6329
  sx: {
6157
6330
  color: theme.palette.text.secondary,
6158
6331
  transition: "transform 0.2s ease"
6159
6332
  },
6160
- 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 })
6161
6334
  }
6162
6335
  )
6163
6336
  ]
@@ -6179,7 +6352,7 @@ var TOOLTIP_COPY = {
6179
6352
  var tooltip = (key) => TOOLTIP_COPY[key];
6180
6353
 
6181
6354
  // src/chat/conversation-drawer.tsx
6182
- 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";
6183
6356
  var BANDIT_AVATAR = "https://cdn.burtson.ai/images/bandit-head.png";
6184
6357
  var coerceOptionalString = (value) => {
6185
6358
  if (typeof value !== "string") return void 0;
@@ -6207,7 +6380,7 @@ var deriveInitials = (value) => {
6207
6380
  return sanitized.slice(0, 2).toUpperCase();
6208
6381
  };
6209
6382
  var ConversationDrawer = ({ open, onClose }) => {
6210
- const theme = useTheme10();
6383
+ const theme = useTheme11();
6211
6384
  const isMobile = useMediaQuery4(theme.breakpoints.down("sm"));
6212
6385
  const { user } = useAuthenticationStore();
6213
6386
  const baseRadius = typeof theme.shape.borderRadius === "number" ? theme.shape.borderRadius : parseFloat(theme.shape.borderRadius) || 0;
@@ -6233,7 +6406,7 @@ var ConversationDrawer = ({ open, onClose }) => {
6233
6406
  const [projectManagementOpen, setProjectManagementOpen] = useState13(false);
6234
6407
  const [memoryModalOpen, setMemoryModalOpen] = useState13(false);
6235
6408
  const [collapsedProjects, setCollapsedProjects] = useState13(/* @__PURE__ */ new Set());
6236
- const didInitCollapseRef = useRef8(false);
6409
+ const didInitCollapseRef = useRef9(false);
6237
6410
  const [searchQuery, setSearchQuery] = useState13("");
6238
6411
  const [menuAnchorEl, setMenuAnchorEl] = useState13(null);
6239
6412
  const [clearConfirmOpen, setClearConfirmOpen] = useState13(false);
@@ -6432,8 +6605,8 @@ var ConversationDrawer = ({ open, onClose }) => {
6432
6605
  setMoveModalOpen(false);
6433
6606
  setConversationToMove(null);
6434
6607
  };
6435
- return /* @__PURE__ */ jsxs11(Fragment7, { children: [
6436
- /* @__PURE__ */ jsxs11(
6608
+ return /* @__PURE__ */ jsxs12(Fragment7, { children: [
6609
+ /* @__PURE__ */ jsxs12(
6437
6610
  Drawer,
6438
6611
  {
6439
6612
  anchor: "left",
@@ -6475,8 +6648,8 @@ var ConversationDrawer = ({ open, onClose }) => {
6475
6648
  }
6476
6649
  },
6477
6650
  children: [
6478
- /* @__PURE__ */ jsxs11(
6479
- Box11,
6651
+ /* @__PURE__ */ jsxs12(
6652
+ Box12,
6480
6653
  {
6481
6654
  sx: {
6482
6655
  p: 2,
@@ -6487,8 +6660,8 @@ var ConversationDrawer = ({ open, onClose }) => {
6487
6660
  gap: 1
6488
6661
  },
6489
6662
  children: [
6490
- /* @__PURE__ */ jsx14(Tooltip5, { title: "Memories", arrow: true, children: /* @__PURE__ */ jsx14(
6491
- IconButton8,
6663
+ /* @__PURE__ */ jsx15(Tooltip5, { title: "Memories", arrow: true, children: /* @__PURE__ */ jsx15(
6664
+ IconButton9,
6492
6665
  {
6493
6666
  onClick: () => setMemoryModalOpen(true),
6494
6667
  size: "small",
@@ -6500,11 +6673,11 @@ var ConversationDrawer = ({ open, onClose }) => {
6500
6673
  bgcolor: alpha6(theme.palette.primary.main, 0.1)
6501
6674
  }
6502
6675
  },
6503
- children: /* @__PURE__ */ jsx14(MemoryIcon, {})
6676
+ children: /* @__PURE__ */ jsx15(MemoryIcon, {})
6504
6677
  }
6505
6678
  ) }),
6506
- /* @__PURE__ */ jsx14(Tooltip5, { title: tooltip("manageProjects"), arrow: true, children: /* @__PURE__ */ jsx14(
6507
- IconButton8,
6679
+ /* @__PURE__ */ jsx15(Tooltip5, { title: tooltip("manageProjects"), arrow: true, children: /* @__PURE__ */ jsx15(
6680
+ IconButton9,
6508
6681
  {
6509
6682
  onClick: () => setProjectManagementOpen(true),
6510
6683
  size: "small",
@@ -6516,11 +6689,11 @@ var ConversationDrawer = ({ open, onClose }) => {
6516
6689
  bgcolor: alpha6(theme.palette.primary.main, 0.1)
6517
6690
  }
6518
6691
  },
6519
- children: /* @__PURE__ */ jsx14(FolderIcon4, {})
6692
+ children: /* @__PURE__ */ jsx15(FolderIcon4, {})
6520
6693
  }
6521
6694
  ) }),
6522
- /* @__PURE__ */ jsx14(Tooltip5, { title: tooltip("conversationOptions"), arrow: true, children: /* @__PURE__ */ jsx14(
6523
- IconButton8,
6695
+ /* @__PURE__ */ jsx15(Tooltip5, { title: tooltip("conversationOptions"), arrow: true, children: /* @__PURE__ */ jsx15(
6696
+ IconButton9,
6524
6697
  {
6525
6698
  onClick: handleMenuOpen,
6526
6699
  size: "small",
@@ -6532,11 +6705,11 @@ var ConversationDrawer = ({ open, onClose }) => {
6532
6705
  bgcolor: alpha6(theme.palette.text.primary, 0.1)
6533
6706
  }
6534
6707
  },
6535
- children: /* @__PURE__ */ jsx14(MoreVertIcon3, {})
6708
+ children: /* @__PURE__ */ jsx15(MoreVertIcon3, {})
6536
6709
  }
6537
6710
  ) }),
6538
- isMobile && /* @__PURE__ */ jsx14(Tooltip5, { title: tooltip("closeConversationsPanel"), children: /* @__PURE__ */ jsx14(
6539
- IconButton8,
6711
+ isMobile && /* @__PURE__ */ jsx15(Tooltip5, { title: tooltip("closeConversationsPanel"), children: /* @__PURE__ */ jsx15(
6712
+ IconButton9,
6540
6713
  {
6541
6714
  onClick: (e) => {
6542
6715
  e.preventDefault();
@@ -6552,13 +6725,13 @@ var ConversationDrawer = ({ open, onClose }) => {
6552
6725
  bgcolor: alpha6(theme.palette.error.main, 0.1)
6553
6726
  }
6554
6727
  },
6555
- children: /* @__PURE__ */ jsx14(CloseIcon5, {})
6728
+ children: /* @__PURE__ */ jsx15(CloseIcon5, {})
6556
6729
  }
6557
6730
  ) })
6558
6731
  ]
6559
6732
  }
6560
6733
  ),
6561
- /* @__PURE__ */ jsx14(Box11, { sx: { p: 2, pb: 1 }, children: /* @__PURE__ */ jsx14(
6734
+ /* @__PURE__ */ jsx15(Box12, { sx: { p: 2, pb: 1 }, children: /* @__PURE__ */ jsx15(
6562
6735
  TextField7,
6563
6736
  {
6564
6737
  fullWidth: true,
@@ -6568,16 +6741,16 @@ var ConversationDrawer = ({ open, onClose }) => {
6568
6741
  onChange: (e) => setSearchQuery(e.target.value),
6569
6742
  variant: "outlined",
6570
6743
  InputProps: {
6571
- startAdornment: /* @__PURE__ */ jsx14(InputAdornment, { position: "start", children: /* @__PURE__ */ jsx14(SearchIcon, { size: 16, color: theme.palette.text.secondary }) }),
6572
- endAdornment: searchQuery && /* @__PURE__ */ jsx14(InputAdornment, { position: "end", children: /* @__PURE__ */ jsx14(Tooltip5, { title: tooltip("clearSearch"), children: /* @__PURE__ */ jsx14(
6573
- 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,
6574
6747
  {
6575
6748
  onClick: handleSearchClear,
6576
6749
  size: "small",
6577
6750
  edge: "end",
6578
6751
  "aria-label": tooltip("clearSearch"),
6579
6752
  sx: { color: theme.palette.text.secondary },
6580
- children: /* @__PURE__ */ jsx14(ClearIcon, { size: 16 })
6753
+ children: /* @__PURE__ */ jsx15(ClearIcon, { size: 16 })
6581
6754
  }
6582
6755
  ) }) })
6583
6756
  },
@@ -6594,9 +6767,9 @@ var ConversationDrawer = ({ open, onClose }) => {
6594
6767
  }
6595
6768
  }
6596
6769
  ) }),
6597
- /* @__PURE__ */ jsxs11(Box11, { sx: { flex: 1, overflow: "auto", display: "flex", flexDirection: "column" }, children: [
6598
- /* @__PURE__ */ jsxs11(
6599
- Box11,
6770
+ /* @__PURE__ */ jsxs12(Box12, { sx: { flex: 1, overflow: "auto", display: "flex", flexDirection: "column" }, children: [
6771
+ /* @__PURE__ */ jsxs12(
6772
+ Box12,
6600
6773
  {
6601
6774
  onClick: async () => {
6602
6775
  const names = new Set(projects.map((p) => p.name));
@@ -6630,8 +6803,8 @@ var ConversationDrawer = ({ open, onClose }) => {
6630
6803
  "&:hover": { bgcolor: alpha6(theme.palette.text.primary, 0.04) }
6631
6804
  },
6632
6805
  children: [
6633
- /* @__PURE__ */ jsx14(
6634
- Box11,
6806
+ /* @__PURE__ */ jsx15(
6807
+ Box12,
6635
6808
  {
6636
6809
  sx: {
6637
6810
  width: 28,
@@ -6643,33 +6816,33 @@ var ConversationDrawer = ({ open, onClose }) => {
6643
6816
  justifyContent: "center",
6644
6817
  flexShrink: 0
6645
6818
  },
6646
- children: /* @__PURE__ */ jsx14(FolderIcon4, { size: 16, color: theme.palette.success.main })
6819
+ children: /* @__PURE__ */ jsx15(FolderIcon4, { size: 16, color: theme.palette.success.main })
6647
6820
  }
6648
6821
  ),
6649
- /* @__PURE__ */ jsx14(
6650
- Typography7,
6822
+ /* @__PURE__ */ jsx15(
6823
+ Typography8,
6651
6824
  {
6652
6825
  variant: "subtitle2",
6653
6826
  sx: { flex: 1, fontWeight: 600, fontSize: "0.875rem" },
6654
6827
  children: "New Project"
6655
6828
  }
6656
6829
  ),
6657
- /* @__PURE__ */ jsx14(Tooltip5, { title: tooltip("addProject"), arrow: true, children: /* @__PURE__ */ jsx14(
6658
- IconButton8,
6830
+ /* @__PURE__ */ jsx15(Tooltip5, { title: tooltip("addProject"), arrow: true, children: /* @__PURE__ */ jsx15(
6831
+ IconButton9,
6659
6832
  {
6660
6833
  size: "small",
6661
6834
  "aria-label": tooltip("addProject"),
6662
6835
  sx: { color: theme.palette.success.main },
6663
- children: /* @__PURE__ */ jsx14(AddIcon4, { size: 16 })
6836
+ children: /* @__PURE__ */ jsx15(AddIcon4, { size: 16 })
6664
6837
  }
6665
6838
  ) })
6666
6839
  ]
6667
6840
  }
6668
6841
  ),
6669
- /* @__PURE__ */ jsx14(Divider2, { sx: { opacity: 0.3 } }),
6670
- filteredProjectGroups.map((group, index) => /* @__PURE__ */ jsxs11(Box11, { children: [
6671
- group.id === null && filteredProjectGroups.length > 1 && /* @__PURE__ */ jsxs11(
6672
- 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,
6673
6846
  {
6674
6847
  sx: {
6675
6848
  py: 2,
@@ -6679,9 +6852,9 @@ var ConversationDrawer = ({ open, onClose }) => {
6679
6852
  gap: 2
6680
6853
  },
6681
6854
  children: [
6682
- /* @__PURE__ */ jsx14(Divider2, { sx: { flex: 1, opacity: 0.6 } }),
6683
- /* @__PURE__ */ jsxs11(Box11, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
6684
- /* @__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(
6685
6858
  InboxIcon3,
6686
6859
  {
6687
6860
  size: 14,
@@ -6689,8 +6862,8 @@ var ConversationDrawer = ({ open, onClose }) => {
6689
6862
  style: { opacity: 0.7 }
6690
6863
  }
6691
6864
  ),
6692
- /* @__PURE__ */ jsx14(
6693
- Typography7,
6865
+ /* @__PURE__ */ jsx15(
6866
+ Typography8,
6694
6867
  {
6695
6868
  variant: "caption",
6696
6869
  sx: {
@@ -6704,12 +6877,12 @@ var ConversationDrawer = ({ open, onClose }) => {
6704
6877
  }
6705
6878
  )
6706
6879
  ] }),
6707
- /* @__PURE__ */ jsx14(Divider2, { sx: { flex: 1, opacity: 0.6 } })
6880
+ /* @__PURE__ */ jsx15(Divider2, { sx: { flex: 1, opacity: 0.6 } })
6708
6881
  ]
6709
6882
  }
6710
6883
  ),
6711
- group.id !== null ? /* @__PURE__ */ jsxs11(Fragment7, { children: [
6712
- /* @__PURE__ */ jsx14(
6884
+ group.id !== null ? /* @__PURE__ */ jsxs12(Fragment7, { children: [
6885
+ /* @__PURE__ */ jsx15(
6713
6886
  project_header_default,
6714
6887
  {
6715
6888
  projectId: group.id,
@@ -6738,8 +6911,8 @@ var ConversationDrawer = ({ open, onClose }) => {
6738
6911
  }
6739
6912
  }
6740
6913
  ),
6741
- /* @__PURE__ */ jsx14(Collapse2, { in: !group.collapsed, children: /* @__PURE__ */ jsxs11(Box11, { sx: { pb: 1 }, children: [
6742
- 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(
6743
6916
  simple_conversation_item_default,
6744
6917
  {
6745
6918
  conversation,
@@ -6759,8 +6932,8 @@ var ConversationDrawer = ({ open, onClose }) => {
6759
6932
  },
6760
6933
  conversation.id
6761
6934
  )),
6762
- group.conversations.length === 0 && !group.collapsed && group.id !== null && /* @__PURE__ */ jsxs11(
6763
- Box11,
6935
+ group.conversations.length === 0 && !group.collapsed && group.id !== null && /* @__PURE__ */ jsxs12(
6936
+ Box12,
6764
6937
  {
6765
6938
  sx: {
6766
6939
  p: 3,
@@ -6768,17 +6941,17 @@ var ConversationDrawer = ({ open, onClose }) => {
6768
6941
  color: theme.palette.text.secondary
6769
6942
  },
6770
6943
  children: [
6771
- /* @__PURE__ */ jsx14(Typography7, { variant: "body2", children: "No conversations in this project yet" }),
6772
- /* @__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" })
6773
6946
  ]
6774
6947
  }
6775
6948
  )
6776
6949
  ] }) }),
6777
- /* @__PURE__ */ jsx14(Divider2, { sx: { opacity: 0.3 } })
6950
+ /* @__PURE__ */ jsx15(Divider2, { sx: { opacity: 0.3 } })
6778
6951
  ] }) : (
6779
6952
  // Special handling for ungrouped - no header, just conversations in scrollable area
6780
- /* @__PURE__ */ jsx14(
6781
- Box11,
6953
+ /* @__PURE__ */ jsx15(
6954
+ Box12,
6782
6955
  {
6783
6956
  sx: {
6784
6957
  minHeight: 0,
@@ -6791,7 +6964,7 @@ var ConversationDrawer = ({ open, onClose }) => {
6791
6964
  mx: 1,
6792
6965
  mb: 1
6793
6966
  },
6794
- children: group.conversations.map((conversation) => /* @__PURE__ */ jsx14(
6967
+ children: group.conversations.map((conversation) => /* @__PURE__ */ jsx15(
6795
6968
  simple_conversation_item_default,
6796
6969
  {
6797
6970
  conversation,
@@ -6815,8 +6988,8 @@ var ConversationDrawer = ({ open, onClose }) => {
6815
6988
  )
6816
6989
  )
6817
6990
  ] }, group.id || "ungrouped")),
6818
- filteredProjectGroups.length === 0 && /* @__PURE__ */ jsxs11(
6819
- Box11,
6991
+ filteredProjectGroups.length === 0 && /* @__PURE__ */ jsxs12(
6992
+ Box12,
6820
6993
  {
6821
6994
  sx: {
6822
6995
  flex: 1,
@@ -6829,14 +7002,14 @@ var ConversationDrawer = ({ open, onClose }) => {
6829
7002
  color: theme.palette.text.secondary
6830
7003
  },
6831
7004
  children: [
6832
- /* @__PURE__ */ jsx14(Typography7, { variant: "h6", sx: { mb: 1 }, children: searchQuery ? "No conversations found" : "No conversations yet" }),
6833
- /* @__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" })
6834
7007
  ]
6835
7008
  }
6836
7009
  )
6837
7010
  ] }),
6838
- /* @__PURE__ */ jsxs11(
6839
- Box11,
7011
+ /* @__PURE__ */ jsxs12(
7012
+ Box12,
6840
7013
  {
6841
7014
  onClick: user ? () => {
6842
7015
  window.location.href = "/profile";
@@ -6857,7 +7030,7 @@ var ConversationDrawer = ({ open, onClose }) => {
6857
7030
  "&:hover": user ? { bgcolor: alpha6(theme.palette.primary.main, 0.08) } : void 0
6858
7031
  },
6859
7032
  children: [
6860
- /* @__PURE__ */ jsx14(
7033
+ /* @__PURE__ */ jsx15(
6861
7034
  Avatar6,
6862
7035
  {
6863
7036
  src: avatarImage,
@@ -6872,8 +7045,8 @@ var ConversationDrawer = ({ open, onClose }) => {
6872
7045
  children: avatarInitials
6873
7046
  }
6874
7047
  ),
6875
- /* @__PURE__ */ jsxs11(
6876
- Box11,
7048
+ /* @__PURE__ */ jsxs12(
7049
+ Box12,
6877
7050
  {
6878
7051
  sx: {
6879
7052
  minWidth: 0,
@@ -6885,8 +7058,8 @@ var ConversationDrawer = ({ open, onClose }) => {
6885
7058
  gap: 0.25
6886
7059
  },
6887
7060
  children: [
6888
- /* @__PURE__ */ jsx14(
6889
- Typography7,
7061
+ /* @__PURE__ */ jsx15(
7062
+ Typography8,
6890
7063
  {
6891
7064
  variant: "subtitle2",
6892
7065
  noWrap: true,
@@ -6894,8 +7067,8 @@ var ConversationDrawer = ({ open, onClose }) => {
6894
7067
  children: user ? userDisplayName : "Not signed in"
6895
7068
  }
6896
7069
  ),
6897
- /* @__PURE__ */ jsx14(
6898
- Typography7,
7070
+ /* @__PURE__ */ jsx15(
7071
+ Typography8,
6899
7072
  {
6900
7073
  variant: "caption",
6901
7074
  noWrap: true,
@@ -6906,9 +7079,9 @@ var ConversationDrawer = ({ open, onClose }) => {
6906
7079
  ]
6907
7080
  }
6908
7081
  ),
6909
- user && /* @__PURE__ */ jsxs11(Fragment7, { children: [
6910
- /* @__PURE__ */ jsx14(
6911
- Box11,
7082
+ user && /* @__PURE__ */ jsxs12(Fragment7, { children: [
7083
+ /* @__PURE__ */ jsx15(
7084
+ Box12,
6912
7085
  {
6913
7086
  sx: {
6914
7087
  flexShrink: 0,
@@ -6921,11 +7094,11 @@ var ConversationDrawer = ({ open, onClose }) => {
6921
7094
  border: `1px solid ${alpha6(theme.palette.divider, 0.8)}`,
6922
7095
  color: theme.palette.text.secondary
6923
7096
  },
6924
- children: /* @__PURE__ */ jsx14(SettingsIcon2, { size: 16 })
7097
+ children: /* @__PURE__ */ jsx15(SettingsIcon2, { size: 16 })
6925
7098
  }
6926
7099
  ),
6927
- /* @__PURE__ */ jsx14(
6928
- IconButton8,
7100
+ /* @__PURE__ */ jsx15(
7101
+ IconButton9,
6929
7102
  {
6930
7103
  "aria-label": "Sign out",
6931
7104
  title: "Sign out",
@@ -6942,7 +7115,7 @@ var ConversationDrawer = ({ open, onClose }) => {
6942
7115
  color: theme.palette.error.main,
6943
7116
  "&:hover": { bgcolor: alpha6(theme.palette.error.main, 0.1) }
6944
7117
  },
6945
- children: /* @__PURE__ */ jsx14(LogOutIcon, { size: 16 })
7118
+ children: /* @__PURE__ */ jsx15(LogOutIcon, { size: 16 })
6946
7119
  }
6947
7120
  )
6948
7121
  ] })
@@ -6952,15 +7125,15 @@ var ConversationDrawer = ({ open, onClose }) => {
6952
7125
  ]
6953
7126
  }
6954
7127
  ),
6955
- /* @__PURE__ */ jsx14(
7128
+ /* @__PURE__ */ jsx15(
6956
7129
  project_management_modal_default,
6957
7130
  {
6958
7131
  open: projectManagementOpen,
6959
7132
  onClose: () => setProjectManagementOpen(false)
6960
7133
  }
6961
7134
  ),
6962
- /* @__PURE__ */ jsx14(memory_modal_default, { open: memoryModalOpen, onClose: () => setMemoryModalOpen(false) }),
6963
- conversationToMove && /* @__PURE__ */ jsx14(
7135
+ /* @__PURE__ */ jsx15(memory_modal_default, { open: memoryModalOpen, onClose: () => setMemoryModalOpen(false) }),
7136
+ conversationToMove && /* @__PURE__ */ jsx15(
6964
7137
  move_conversation_modal_default,
6965
7138
  {
6966
7139
  open: moveModalOpen,
@@ -6969,7 +7142,7 @@ var ConversationDrawer = ({ open, onClose }) => {
6969
7142
  currentProjectId: conversationToMove.projectId
6970
7143
  }
6971
7144
  ),
6972
- /* @__PURE__ */ jsx14(
7145
+ /* @__PURE__ */ jsx15(
6973
7146
  Menu3,
6974
7147
  {
6975
7148
  anchorEl: menuAnchorEl,
@@ -6983,7 +7156,7 @@ var ConversationDrawer = ({ open, onClose }) => {
6983
7156
  vertical: "bottom",
6984
7157
  horizontal: "right"
6985
7158
  },
6986
- children: /* @__PURE__ */ jsxs11(
7159
+ children: /* @__PURE__ */ jsxs12(
6987
7160
  MenuItem3,
6988
7161
  {
6989
7162
  onClick: () => {
@@ -6992,14 +7165,14 @@ var ConversationDrawer = ({ open, onClose }) => {
6992
7165
  },
6993
7166
  sx: { color: theme.palette.error.main },
6994
7167
  children: [
6995
- /* @__PURE__ */ jsx14(ListItemIcon3, { children: /* @__PURE__ */ jsx14(DeleteSweepIcon, { size: 16, color: theme.palette.error.main }) }),
6996
- /* @__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" })
6997
7170
  ]
6998
7171
  }
6999
7172
  )
7000
7173
  }
7001
7174
  ),
7002
- /* @__PURE__ */ jsxs11(
7175
+ /* @__PURE__ */ jsxs12(
7003
7176
  Dialog4,
7004
7177
  {
7005
7178
  open: clearConfirmOpen,
@@ -7007,12 +7180,12 @@ var ConversationDrawer = ({ open, onClose }) => {
7007
7180
  maxWidth: "sm",
7008
7181
  fullWidth: true,
7009
7182
  children: [
7010
- /* @__PURE__ */ jsx14(DialogTitle3, { children: "Clear All Conversations?" }),
7011
- /* @__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?" }) }),
7012
- /* @__PURE__ */ jsxs11(DialogActions3, { children: [
7013
- /* @__PURE__ */ jsx14(Button5, { onClick: () => setClearConfirmOpen(false), children: "Cancel" }),
7014
- /* @__PURE__ */ jsx14(
7015
- 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,
7016
7189
  {
7017
7190
  onClick: handleClearAllConfirm,
7018
7191
  color: "error",
@@ -7029,12 +7202,12 @@ var ConversationDrawer = ({ open, onClose }) => {
7029
7202
  var conversation_drawer_default = ConversationDrawer;
7030
7203
 
7031
7204
  // src/chat/enhanced-mobile-conversations-modal.tsx
7032
- 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";
7033
7206
  import {
7034
- Box as Box12,
7035
- IconButton as IconButton9,
7207
+ Box as Box13,
7208
+ IconButton as IconButton10,
7036
7209
  Modal as Modal2,
7037
- Typography as Typography8,
7210
+ Typography as Typography9,
7038
7211
  TextField as TextField8,
7039
7212
  InputAdornment as InputAdornment2,
7040
7213
  Slide,
@@ -7048,15 +7221,15 @@ import {
7048
7221
  DialogTitle as DialogTitle4,
7049
7222
  DialogContent as DialogContent4,
7050
7223
  DialogActions as DialogActions4,
7051
- Button as Button6,
7224
+ Button as Button7,
7052
7225
  AppBar,
7053
7226
  Toolbar,
7054
7227
  Avatar as Avatar7,
7055
7228
  Chip as Chip4
7056
7229
  } from "@mui/material";
7057
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";
7058
- import { useTheme as useTheme11, alpha as alpha7 } from "@mui/material/styles";
7059
- 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";
7060
7233
  var BANDIT_AVATAR2 = "https://cdn.burtson.ai/images/bandit-head.png";
7061
7234
  var coerceOptionalString2 = (value) => {
7062
7235
  if (typeof value !== "string") return void 0;
@@ -7087,7 +7260,7 @@ var EnhancedMobileConversationsModal = ({
7087
7260
  open,
7088
7261
  onClose
7089
7262
  }) => {
7090
- const theme = useTheme11();
7263
+ const theme = useTheme12();
7091
7264
  const { user } = useAuthenticationStore();
7092
7265
  const {
7093
7266
  conversations,
@@ -7110,7 +7283,7 @@ var EnhancedMobileConversationsModal = ({
7110
7283
  const [projectManagementOpen, setProjectManagementOpen] = useState14(false);
7111
7284
  const [memoryModalOpen, setMemoryModalOpen] = useState14(false);
7112
7285
  const [collapsedProjects, setCollapsedProjects] = useState14(/* @__PURE__ */ new Set());
7113
- const didInitCollapseRef = useRef9(false);
7286
+ const didInitCollapseRef = useRef10(false);
7114
7287
  const [searchQuery, setSearchQuery] = useState14("");
7115
7288
  const [menuAnchorEl, setMenuAnchorEl] = useState14(null);
7116
7289
  const [clearConfirmOpen, setClearConfirmOpen] = useState14(false);
@@ -7390,8 +7563,8 @@ var EnhancedMobileConversationsModal = ({
7390
7563
  return changed ? next : prev;
7391
7564
  });
7392
7565
  }, [conversations]);
7393
- return /* @__PURE__ */ jsxs12(Fragment8, { children: [
7394
- /* @__PURE__ */ jsx15(
7566
+ return /* @__PURE__ */ jsxs13(Fragment8, { children: [
7567
+ /* @__PURE__ */ jsx16(
7395
7568
  Modal2,
7396
7569
  {
7397
7570
  open,
@@ -7400,8 +7573,8 @@ var EnhancedMobileConversationsModal = ({
7400
7573
  display: "flex",
7401
7574
  alignItems: "flex-end"
7402
7575
  },
7403
- children: /* @__PURE__ */ jsx15(Slide, { direction: "up", in: open, children: /* @__PURE__ */ jsxs12(
7404
- Box12,
7576
+ children: /* @__PURE__ */ jsx16(Slide, { direction: "up", in: open, children: /* @__PURE__ */ jsxs13(
7577
+ Box13,
7405
7578
  {
7406
7579
  sx: {
7407
7580
  width: "100%",
@@ -7414,7 +7587,7 @@ var EnhancedMobileConversationsModal = ({
7414
7587
  overflow: "hidden"
7415
7588
  },
7416
7589
  children: [
7417
- /* @__PURE__ */ jsx15(
7590
+ /* @__PURE__ */ jsx16(
7418
7591
  AppBar,
7419
7592
  {
7420
7593
  position: "static",
@@ -7424,9 +7597,9 @@ var EnhancedMobileConversationsModal = ({
7424
7597
  color: theme.palette.text.primary,
7425
7598
  borderBottom: `1px solid ${theme.palette.divider}`
7426
7599
  },
7427
- children: /* @__PURE__ */ jsxs12(Toolbar, { children: [
7428
- /* @__PURE__ */ jsx15(Typography8, { variant: "h6", sx: { flex: 1, fontWeight: 600 }, children: "Conversations" }),
7429
- 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(
7430
7603
  Chip4,
7431
7604
  {
7432
7605
  label: visibleConversationCount,
@@ -7439,43 +7612,43 @@ var EnhancedMobileConversationsModal = ({
7439
7612
  }
7440
7613
  }
7441
7614
  ),
7442
- /* @__PURE__ */ jsx15(
7443
- IconButton9,
7615
+ /* @__PURE__ */ jsx16(
7616
+ IconButton10,
7444
7617
  {
7445
7618
  onClick: () => setMemoryModalOpen(true),
7446
7619
  "aria-label": "Memory",
7447
7620
  sx: { color: theme.palette.text.secondary },
7448
- children: /* @__PURE__ */ jsx15(MemoryIcon2, {})
7621
+ children: /* @__PURE__ */ jsx16(MemoryIcon2, {})
7449
7622
  }
7450
7623
  ),
7451
- /* @__PURE__ */ jsx15(
7452
- IconButton9,
7624
+ /* @__PURE__ */ jsx16(
7625
+ IconButton10,
7453
7626
  {
7454
7627
  onClick: () => setProjectManagementOpen(true),
7455
7628
  sx: { color: theme.palette.text.secondary },
7456
- children: /* @__PURE__ */ jsx15(FolderIcon5, {})
7629
+ children: /* @__PURE__ */ jsx16(FolderIcon5, {})
7457
7630
  }
7458
7631
  ),
7459
- /* @__PURE__ */ jsx15(
7460
- IconButton9,
7632
+ /* @__PURE__ */ jsx16(
7633
+ IconButton10,
7461
7634
  {
7462
7635
  onClick: handleMenuOpen,
7463
7636
  sx: { color: theme.palette.text.secondary },
7464
- children: /* @__PURE__ */ jsx15(MoreVertIcon4, {})
7637
+ children: /* @__PURE__ */ jsx16(MoreVertIcon4, {})
7465
7638
  }
7466
7639
  ),
7467
- /* @__PURE__ */ jsx15(
7468
- IconButton9,
7640
+ /* @__PURE__ */ jsx16(
7641
+ IconButton10,
7469
7642
  {
7470
7643
  onClick: onClose,
7471
7644
  sx: { color: theme.palette.text.secondary },
7472
- children: /* @__PURE__ */ jsx15(CloseIcon6, {})
7645
+ children: /* @__PURE__ */ jsx16(CloseIcon6, {})
7473
7646
  }
7474
7647
  )
7475
7648
  ] })
7476
7649
  }
7477
7650
  ),
7478
- /* @__PURE__ */ jsx15(Box12, { sx: { p: 2, pb: 1 }, children: /* @__PURE__ */ jsx15(
7651
+ /* @__PURE__ */ jsx16(Box13, { sx: { p: 2, pb: 1 }, children: /* @__PURE__ */ jsx16(
7479
7652
  TextField8,
7480
7653
  {
7481
7654
  fullWidth: true,
@@ -7485,22 +7658,22 @@ var EnhancedMobileConversationsModal = ({
7485
7658
  onChange: (e) => setSearchQuery(e.target.value),
7486
7659
  variant: "outlined",
7487
7660
  InputProps: {
7488
- startAdornment: /* @__PURE__ */ jsx15(InputAdornment2, { position: "start", children: /* @__PURE__ */ jsx15(SearchIcon2, { size: 16, color: theme.palette.text.secondary }) }),
7489
- endAdornment: searchQuery && /* @__PURE__ */ jsx15(InputAdornment2, { position: "end", children: /* @__PURE__ */ jsx15(
7490
- 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,
7491
7664
  {
7492
7665
  onClick: handleSearchClear,
7493
7666
  size: "small",
7494
7667
  edge: "end",
7495
7668
  sx: { color: theme.palette.text.secondary },
7496
- children: /* @__PURE__ */ jsx15(ClearIcon2, { size: 16 })
7669
+ children: /* @__PURE__ */ jsx16(ClearIcon2, { size: 16 })
7497
7670
  }
7498
7671
  ) })
7499
7672
  }
7500
7673
  }
7501
7674
  ) }),
7502
- /* @__PURE__ */ jsxs12(
7503
- Box12,
7675
+ /* @__PURE__ */ jsxs13(
7676
+ Box13,
7504
7677
  {
7505
7678
  sx: {
7506
7679
  flex: 1,
@@ -7511,8 +7684,8 @@ var EnhancedMobileConversationsModal = ({
7511
7684
  pb: 2
7512
7685
  },
7513
7686
  children: [
7514
- touchDragActive && activeDragConversation && /* @__PURE__ */ jsxs12(
7515
- Box12,
7687
+ touchDragActive && activeDragConversation && /* @__PURE__ */ jsxs13(
7688
+ Box13,
7516
7689
  {
7517
7690
  sx: {
7518
7691
  position: "absolute",
@@ -7537,8 +7710,8 @@ var EnhancedMobileConversationsModal = ({
7537
7710
  overflow: "hidden"
7538
7711
  },
7539
7712
  children: [
7540
- /* @__PURE__ */ jsxs12(
7541
- Typography8,
7713
+ /* @__PURE__ */ jsxs13(
7714
+ Typography9,
7542
7715
  {
7543
7716
  variant: "caption",
7544
7717
  sx: {
@@ -7550,8 +7723,8 @@ var EnhancedMobileConversationsModal = ({
7550
7723
  },
7551
7724
  children: [
7552
7725
  "Move",
7553
- /* @__PURE__ */ jsxs12(
7554
- Box12,
7726
+ /* @__PURE__ */ jsxs13(
7727
+ Box13,
7555
7728
  {
7556
7729
  component: "span",
7557
7730
  sx: {
@@ -7571,8 +7744,8 @@ var EnhancedMobileConversationsModal = ({
7571
7744
  ]
7572
7745
  }
7573
7746
  ),
7574
- /* @__PURE__ */ jsx15(
7575
- Typography8,
7747
+ /* @__PURE__ */ jsx16(
7748
+ Typography9,
7576
7749
  {
7577
7750
  variant: "caption",
7578
7751
  color: "inherit",
@@ -7580,11 +7753,11 @@ var EnhancedMobileConversationsModal = ({
7580
7753
  fontWeight: 500,
7581
7754
  whiteSpace: "nowrap"
7582
7755
  },
7583
- children: activeHoverLabel ? /* @__PURE__ */ jsxs12(Fragment8, { children: [
7756
+ children: activeHoverLabel ? /* @__PURE__ */ jsxs13(Fragment8, { children: [
7584
7757
  "to",
7585
7758
  " ",
7586
- /* @__PURE__ */ jsx15(
7587
- Box12,
7759
+ /* @__PURE__ */ jsx16(
7760
+ Box13,
7588
7761
  {
7589
7762
  component: "span",
7590
7763
  sx: {
@@ -7600,8 +7773,8 @@ var EnhancedMobileConversationsModal = ({
7600
7773
  ]
7601
7774
  }
7602
7775
  ),
7603
- /* @__PURE__ */ jsxs12(
7604
- Box12,
7776
+ /* @__PURE__ */ jsxs13(
7777
+ Box13,
7605
7778
  {
7606
7779
  onClick: async () => {
7607
7780
  const names = new Set(projects.map((p) => p.name));
@@ -7635,8 +7808,8 @@ var EnhancedMobileConversationsModal = ({
7635
7808
  "&:hover": { bgcolor: alpha7(theme.palette.text.primary, 0.04) }
7636
7809
  },
7637
7810
  children: [
7638
- /* @__PURE__ */ jsx15(
7639
- Box12,
7811
+ /* @__PURE__ */ jsx16(
7812
+ Box13,
7640
7813
  {
7641
7814
  sx: {
7642
7815
  width: 28,
@@ -7648,25 +7821,25 @@ var EnhancedMobileConversationsModal = ({
7648
7821
  justifyContent: "center",
7649
7822
  flexShrink: 0
7650
7823
  },
7651
- children: /* @__PURE__ */ jsx15(FolderIcon5, { size: 16, color: theme.palette.success.main })
7824
+ children: /* @__PURE__ */ jsx16(FolderIcon5, { size: 16, color: theme.palette.success.main })
7652
7825
  }
7653
7826
  ),
7654
- /* @__PURE__ */ jsx15(
7655
- Typography8,
7827
+ /* @__PURE__ */ jsx16(
7828
+ Typography9,
7656
7829
  {
7657
7830
  variant: "subtitle2",
7658
7831
  sx: { flex: 1, fontWeight: 600, fontSize: "0.875rem" },
7659
7832
  children: "New Project"
7660
7833
  }
7661
7834
  ),
7662
- /* @__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 }) })
7663
7836
  ]
7664
7837
  }
7665
7838
  ),
7666
- /* @__PURE__ */ jsx15(Divider3, { sx: { opacity: 0.3 } }),
7667
- filteredProjectGroups.map((group, index) => /* @__PURE__ */ jsxs12(Box12, { children: [
7668
- group.id === null && filteredProjectGroups.length > 1 && /* @__PURE__ */ jsxs12(
7669
- 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,
7670
7843
  {
7671
7844
  sx: {
7672
7845
  py: 2,
@@ -7676,9 +7849,9 @@ var EnhancedMobileConversationsModal = ({
7676
7849
  gap: 2
7677
7850
  },
7678
7851
  children: [
7679
- /* @__PURE__ */ jsx15(Divider3, { sx: { flex: 1, opacity: 0.6 } }),
7680
- /* @__PURE__ */ jsxs12(Box12, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
7681
- /* @__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(
7682
7855
  InboxIcon4,
7683
7856
  {
7684
7857
  size: 14,
@@ -7686,8 +7859,8 @@ var EnhancedMobileConversationsModal = ({
7686
7859
  style: { opacity: 0.7 }
7687
7860
  }
7688
7861
  ),
7689
- /* @__PURE__ */ jsx15(
7690
- Typography8,
7862
+ /* @__PURE__ */ jsx16(
7863
+ Typography9,
7691
7864
  {
7692
7865
  variant: "caption",
7693
7866
  sx: {
@@ -7701,12 +7874,12 @@ var EnhancedMobileConversationsModal = ({
7701
7874
  }
7702
7875
  )
7703
7876
  ] }),
7704
- /* @__PURE__ */ jsx15(Divider3, { sx: { flex: 1, opacity: 0.6 } })
7877
+ /* @__PURE__ */ jsx16(Divider3, { sx: { flex: 1, opacity: 0.6 } })
7705
7878
  ]
7706
7879
  }
7707
7880
  ),
7708
- group.id !== null ? /* @__PURE__ */ jsxs12(Fragment8, { children: [
7709
- /* @__PURE__ */ jsx15(
7881
+ group.id !== null ? /* @__PURE__ */ jsxs13(Fragment8, { children: [
7882
+ /* @__PURE__ */ jsx16(
7710
7883
  project_header_default,
7711
7884
  {
7712
7885
  projectId: group.id,
@@ -7736,8 +7909,8 @@ var EnhancedMobileConversationsModal = ({
7736
7909
  isTouchTarget: touchDragActive && touchDragState.hoverProjectId === group.id
7737
7910
  }
7738
7911
  ),
7739
- /* @__PURE__ */ jsx15(Collapse3, { in: !group.collapsed, children: /* @__PURE__ */ jsx15(
7740
- Box12,
7912
+ /* @__PURE__ */ jsx16(Collapse3, { in: !group.collapsed, children: /* @__PURE__ */ jsx16(
7913
+ Box13,
7741
7914
  {
7742
7915
  "data-project-id": group.id ?? "__ungrouped",
7743
7916
  sx: {
@@ -7747,7 +7920,7 @@ var EnhancedMobileConversationsModal = ({
7747
7920
  transition: "border 0.2s ease, background-color 0.2s ease",
7748
7921
  backgroundColor: touchDragActive && touchDragState.hoverProjectId === group.id ? alpha7(theme.palette.primary.main, 0.08) : "transparent"
7749
7922
  },
7750
- children: group.conversations.map((conversation) => /* @__PURE__ */ jsx15(
7923
+ children: group.conversations.map((conversation) => /* @__PURE__ */ jsx16(
7751
7924
  simple_conversation_item_default,
7752
7925
  {
7753
7926
  conversation,
@@ -7781,8 +7954,8 @@ var EnhancedMobileConversationsModal = ({
7781
7954
  ) })
7782
7955
  ] }) : (
7783
7956
  // Special handling for ungrouped - no header, just conversations in scrollable area
7784
- /* @__PURE__ */ jsx15(
7785
- Box12,
7957
+ /* @__PURE__ */ jsx16(
7958
+ Box13,
7786
7959
  {
7787
7960
  sx: {
7788
7961
  minHeight: 0,
@@ -7798,7 +7971,7 @@ var EnhancedMobileConversationsModal = ({
7798
7971
  backgroundColor: touchDragActive && touchDragState.hoverProjectId === "__ungrouped" ? alpha7(theme.palette.primary.main, 0.08) : alpha7(theme.palette.background.default, 0.3)
7799
7972
  },
7800
7973
  "data-project-id": "__ungrouped",
7801
- children: group.conversations.map((conversation) => /* @__PURE__ */ jsx15(
7974
+ children: group.conversations.map((conversation) => /* @__PURE__ */ jsx16(
7802
7975
  simple_conversation_item_default,
7803
7976
  {
7804
7977
  conversation,
@@ -7832,8 +8005,8 @@ var EnhancedMobileConversationsModal = ({
7832
8005
  )
7833
8006
  )
7834
8007
  ] }, group.id || "ungrouped")),
7835
- filteredProjectGroups.length === 0 && /* @__PURE__ */ jsxs12(
7836
- Box12,
8008
+ filteredProjectGroups.length === 0 && /* @__PURE__ */ jsxs13(
8009
+ Box13,
7837
8010
  {
7838
8011
  sx: {
7839
8012
  flex: 1,
@@ -7846,16 +8019,16 @@ var EnhancedMobileConversationsModal = ({
7846
8019
  color: theme.palette.text.secondary
7847
8020
  },
7848
8021
  children: [
7849
- /* @__PURE__ */ jsx15(Typography8, { variant: "h6", sx: { mb: 1 }, children: searchQuery ? "No conversations found" : "No conversations yet" }),
7850
- /* @__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" })
7851
8024
  ]
7852
8025
  }
7853
8026
  )
7854
8027
  ]
7855
8028
  }
7856
8029
  ),
7857
- /* @__PURE__ */ jsxs12(
7858
- Box12,
8030
+ /* @__PURE__ */ jsxs13(
8031
+ Box13,
7859
8032
  {
7860
8033
  onClick: user ? () => {
7861
8034
  window.location.href = "/profile";
@@ -7872,7 +8045,7 @@ var EnhancedMobileConversationsModal = ({
7872
8045
  cursor: user ? "pointer" : "default"
7873
8046
  },
7874
8047
  children: [
7875
- /* @__PURE__ */ jsx15(
8048
+ /* @__PURE__ */ jsx16(
7876
8049
  Avatar7,
7877
8050
  {
7878
8051
  src: avatarImage,
@@ -7887,9 +8060,9 @@ var EnhancedMobileConversationsModal = ({
7887
8060
  children: avatarInitials
7888
8061
  }
7889
8062
  ),
7890
- /* @__PURE__ */ jsxs12(Box12, { sx: { display: "flex", flexDirection: "column", flex: 1, minWidth: 0, gap: 0.25 }, children: [
7891
- /* @__PURE__ */ jsx15(
7892
- Typography8,
8063
+ /* @__PURE__ */ jsxs13(Box13, { sx: { display: "flex", flexDirection: "column", flex: 1, minWidth: 0, gap: 0.25 }, children: [
8064
+ /* @__PURE__ */ jsx16(
8065
+ Typography9,
7893
8066
  {
7894
8067
  variant: "subtitle2",
7895
8068
  noWrap: true,
@@ -7897,8 +8070,8 @@ var EnhancedMobileConversationsModal = ({
7897
8070
  children: user ? userDisplayName : "Not signed in"
7898
8071
  }
7899
8072
  ),
7900
- /* @__PURE__ */ jsx15(
7901
- Typography8,
8073
+ /* @__PURE__ */ jsx16(
8074
+ Typography9,
7902
8075
  {
7903
8076
  variant: "caption",
7904
8077
  noWrap: true,
@@ -7907,9 +8080,9 @@ var EnhancedMobileConversationsModal = ({
7907
8080
  }
7908
8081
  )
7909
8082
  ] }),
7910
- user && /* @__PURE__ */ jsxs12(Fragment8, { children: [
7911
- /* @__PURE__ */ jsx15(
7912
- Box12,
8083
+ user && /* @__PURE__ */ jsxs13(Fragment8, { children: [
8084
+ /* @__PURE__ */ jsx16(
8085
+ Box13,
7913
8086
  {
7914
8087
  sx: {
7915
8088
  flexShrink: 0,
@@ -7922,11 +8095,11 @@ var EnhancedMobileConversationsModal = ({
7922
8095
  border: `1px solid ${alpha7(theme.palette.divider, 0.8)}`,
7923
8096
  color: theme.palette.text.secondary
7924
8097
  },
7925
- children: /* @__PURE__ */ jsx15(SettingsIcon3, { size: 16 })
8098
+ children: /* @__PURE__ */ jsx16(SettingsIcon3, { size: 16 })
7926
8099
  }
7927
8100
  ),
7928
- /* @__PURE__ */ jsx15(
7929
- IconButton9,
8101
+ /* @__PURE__ */ jsx16(
8102
+ IconButton10,
7930
8103
  {
7931
8104
  "aria-label": "Sign out",
7932
8105
  title: "Sign out",
@@ -7943,7 +8116,7 @@ var EnhancedMobileConversationsModal = ({
7943
8116
  color: theme.palette.error.main,
7944
8117
  "&:hover": { bgcolor: alpha7(theme.palette.error.main, 0.1) }
7945
8118
  },
7946
- children: /* @__PURE__ */ jsx15(LogOutIcon2, { size: 16 })
8119
+ children: /* @__PURE__ */ jsx16(LogOutIcon2, { size: 16 })
7947
8120
  }
7948
8121
  )
7949
8122
  ] })
@@ -7955,15 +8128,15 @@ var EnhancedMobileConversationsModal = ({
7955
8128
  ) })
7956
8129
  }
7957
8130
  ),
7958
- /* @__PURE__ */ jsx15(
8131
+ /* @__PURE__ */ jsx16(
7959
8132
  project_management_modal_default,
7960
8133
  {
7961
8134
  open: projectManagementOpen,
7962
8135
  onClose: () => setProjectManagementOpen(false)
7963
8136
  }
7964
8137
  ),
7965
- /* @__PURE__ */ jsx15(memory_modal_default, { open: memoryModalOpen, onClose: () => setMemoryModalOpen(false) }),
7966
- conversationToMove && /* @__PURE__ */ jsx15(
8138
+ /* @__PURE__ */ jsx16(memory_modal_default, { open: memoryModalOpen, onClose: () => setMemoryModalOpen(false) }),
8139
+ conversationToMove && /* @__PURE__ */ jsx16(
7967
8140
  move_conversation_modal_default,
7968
8141
  {
7969
8142
  open: moveModalOpen,
@@ -7972,7 +8145,7 @@ var EnhancedMobileConversationsModal = ({
7972
8145
  currentProjectId: conversationToMove.projectId
7973
8146
  }
7974
8147
  ),
7975
- /* @__PURE__ */ jsx15(
8148
+ /* @__PURE__ */ jsx16(
7976
8149
  Menu4,
7977
8150
  {
7978
8151
  anchorEl: menuAnchorEl,
@@ -7986,7 +8159,7 @@ var EnhancedMobileConversationsModal = ({
7986
8159
  vertical: "bottom",
7987
8160
  horizontal: "right"
7988
8161
  },
7989
- children: /* @__PURE__ */ jsxs12(
8162
+ children: /* @__PURE__ */ jsxs13(
7990
8163
  MenuItem4,
7991
8164
  {
7992
8165
  onClick: () => {
@@ -7996,14 +8169,14 @@ var EnhancedMobileConversationsModal = ({
7996
8169
  disabled: visibleConversationCount === 0,
7997
8170
  sx: { color: theme.palette.error.main },
7998
8171
  children: [
7999
- /* @__PURE__ */ jsx15(ListItemIcon4, { children: /* @__PURE__ */ jsx15(DeleteSweepIcon2, { size: 16, color: theme.palette.error.main }) }),
8000
- /* @__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" })
8001
8174
  ]
8002
8175
  }
8003
8176
  )
8004
8177
  }
8005
8178
  ),
8006
- /* @__PURE__ */ jsxs12(
8179
+ /* @__PURE__ */ jsxs13(
8007
8180
  Dialog5,
8008
8181
  {
8009
8182
  open: clearConfirmOpen,
@@ -8011,12 +8184,12 @@ var EnhancedMobileConversationsModal = ({
8011
8184
  maxWidth: "sm",
8012
8185
  fullWidth: true,
8013
8186
  children: [
8014
- /* @__PURE__ */ jsx15(DialogTitle4, { children: "Clear All Conversations?" }),
8015
- /* @__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.` }) }),
8016
- /* @__PURE__ */ jsxs12(DialogActions4, { children: [
8017
- /* @__PURE__ */ jsx15(Button6, { onClick: () => setClearConfirmOpen(false), children: "Cancel" }),
8018
- /* @__PURE__ */ jsx15(
8019
- 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,
8020
8193
  {
8021
8194
  onClick: handleClearAllConfirm,
8022
8195
  color: "error",
@@ -8034,7 +8207,7 @@ var enhanced_mobile_conversations_modal_default = EnhancedMobileConversationsMod
8034
8207
 
8035
8208
  // src/chat/chat-app-bar.tsx
8036
8209
  import { shallow as shallow2 } from "zustand/shallow";
8037
- 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";
8038
8211
  var CDN_BASE = "https://cdn.burtson.ai/";
8039
8212
  var banditHead = `${CDN_BASE}/images/bandit-head.png`;
8040
8213
  var modelAvatars = {
@@ -8053,12 +8226,12 @@ var ChatAppBar = ({
8053
8226
  drawerOpen,
8054
8227
  setDrawerOpen
8055
8228
  }) => {
8056
- const theme = useTheme12();
8229
+ const theme = useTheme13();
8057
8230
  const isMobile = useMediaQuery5(theme.breakpoints.down("sm"));
8058
- const hasLoggedRouterWarningRef = useRef10(false);
8231
+ const hasLoggedRouterWarningRef = useRef11(false);
8059
8232
  let navigate = null;
8060
8233
  try {
8061
- navigate = useNavigate();
8234
+ navigate = useNavigate2();
8062
8235
  } catch (error) {
8063
8236
  if (!hasLoggedRouterWarningRef.current) {
8064
8237
  debugLogger.warn("ChatAppBar: Navigation not available (missing Router context)", { error });
@@ -8130,16 +8303,16 @@ var ChatAppBar = ({
8130
8303
  };
8131
8304
  const syncIndicatorIcon = (() => {
8132
8305
  if (isPlaygroundMode2 || !syncEnabled) {
8133
- return /* @__PURE__ */ jsx16(CloudOffIcon, { fontSize: "small", color: "disabled" });
8306
+ return /* @__PURE__ */ jsx17(CloudOffIcon, { fontSize: "small", color: "disabled" });
8134
8307
  }
8135
8308
  switch (syncStatus) {
8136
8309
  case "syncing":
8137
- return /* @__PURE__ */ jsx16(SyncIcon, { fontSize: "small", sx: syncSpinSx, color: "primary" });
8310
+ return /* @__PURE__ */ jsx17(SyncIcon, { fontSize: "small", sx: syncSpinSx, color: "primary" });
8138
8311
  case "error":
8139
- return /* @__PURE__ */ jsx16(ErrorOutlineIcon, { fontSize: "small", color: "error" });
8312
+ return /* @__PURE__ */ jsx17(ErrorOutlineIcon, { fontSize: "small", color: "error" });
8140
8313
  case "idle":
8141
8314
  default:
8142
- return /* @__PURE__ */ jsx16(CloudDoneIcon, { fontSize: "small", color: "success" });
8315
+ return /* @__PURE__ */ jsx17(CloudDoneIcon, { fontSize: "small", color: "success" });
8143
8316
  }
8144
8317
  })();
8145
8318
  const syncTooltip = (() => {
@@ -8172,8 +8345,14 @@ var ChatAppBar = ({
8172
8345
  }
8173
8346
  void triggerSync({ force: true });
8174
8347
  };
8175
- const { hasTTS, hasSTT, isAdmin, getCurrentTier, hasLimitedAdminDashboard } = useFeatures();
8348
+ const { hasTTS, hasSTT, isAdmin, getCurrentTier, hasLimitedAdminDashboard, isSubscribed } = useFeatures();
8176
8349
  const { showVoiceControls, showLimitedAdminPanel } = useFeatureVisibility();
8350
+ const frontierEligible = (() => {
8351
+ if (isAdmin() || isSubscribed()) return true;
8352
+ const tier = String(getCurrentTier());
8353
+ return tier !== "trial" && tier !== "expired" && tier !== "free" && tier !== "basic";
8354
+ })();
8355
+ const plansPath = "/plans";
8177
8356
  const isTTSAvailable = !!packageSettings?.gatewayApiUrl && preferences.ttsEnabled && hasTTS();
8178
8357
  const currentConversation = conversations.find((c) => c.id === currentId);
8179
8358
  const conversationCountDisplay = conversations.length > 99 ? "99+" : conversations.length.toString();
@@ -8245,9 +8424,9 @@ var ChatAppBar = ({
8245
8424
  }
8246
8425
  safeNavigate("/");
8247
8426
  }
8248
- return /* @__PURE__ */ jsxs13(Fragment9, { children: [
8249
- /* @__PURE__ */ jsxs13(
8250
- Box13,
8427
+ return /* @__PURE__ */ jsxs14(Fragment9, { children: [
8428
+ /* @__PURE__ */ jsxs14(
8429
+ Box14,
8251
8430
  {
8252
8431
  sx: {
8253
8432
  position: "fixed",
@@ -8267,8 +8446,8 @@ var ChatAppBar = ({
8267
8446
  }
8268
8447
  },
8269
8448
  children: [
8270
- /* @__PURE__ */ jsxs13(
8271
- Box13,
8449
+ /* @__PURE__ */ jsxs14(
8450
+ Box14,
8272
8451
  {
8273
8452
  sx: {
8274
8453
  display: "flex",
@@ -8288,17 +8467,17 @@ var ChatAppBar = ({
8288
8467
  }
8289
8468
  },
8290
8469
  children: [
8291
- /* @__PURE__ */ jsx16(Tooltip6, { title: homeTooltip, arrow: true, children: /* @__PURE__ */ jsx16(
8292
- IconButton10,
8470
+ /* @__PURE__ */ jsx17(Tooltip6, { title: homeTooltip, arrow: true, children: /* @__PURE__ */ jsx17(
8471
+ IconButton11,
8293
8472
  {
8294
8473
  onClick: goToHome,
8295
8474
  sx: pillButtonStyles,
8296
8475
  "aria-label": "Go to home page",
8297
- children: /* @__PURE__ */ jsx16(HomeIcon, {})
8476
+ children: /* @__PURE__ */ jsx17(HomeIcon, {})
8298
8477
  }
8299
8478
  ) }),
8300
- showLimitedAdminPanel() && /* @__PURE__ */ jsx16(Tooltip6, { title: "Management & Settings", arrow: true, children: /* @__PURE__ */ jsx16(
8301
- IconButton10,
8479
+ showLimitedAdminPanel() && /* @__PURE__ */ jsx17(Tooltip6, { title: "Management & Settings", arrow: true, children: /* @__PURE__ */ jsx17(
8480
+ IconButton11,
8302
8481
  {
8303
8482
  onClick: () => safeNavigate(managementPath),
8304
8483
  sx: {
@@ -8309,11 +8488,11 @@ var ChatAppBar = ({
8309
8488
  }
8310
8489
  },
8311
8490
  "aria-label": "Open management settings",
8312
- children: /* @__PURE__ */ jsx16(SettingsIcon, {})
8491
+ children: /* @__PURE__ */ jsx17(SettingsIcon, {})
8313
8492
  }
8314
8493
  ) }),
8315
- /* @__PURE__ */ jsx16(Tooltip6, { title: syncTooltip, arrow: true, children: /* @__PURE__ */ jsxs13(
8316
- IconButton10,
8494
+ /* @__PURE__ */ jsx17(Tooltip6, { title: syncTooltip, arrow: true, children: /* @__PURE__ */ jsxs14(
8495
+ IconButton11,
8317
8496
  {
8318
8497
  onClick: handleSyncBadgeClick,
8319
8498
  disabled: syncButtonDisabled,
@@ -8328,8 +8507,8 @@ var ChatAppBar = ({
8328
8507
  "aria-label": "Conversation sync status",
8329
8508
  children: [
8330
8509
  syncIndicatorIcon,
8331
- pendingCount > 0 && !syncButtonDisabled && syncStatus !== "syncing" && /* @__PURE__ */ jsx16(
8332
- Box13,
8510
+ pendingCount > 0 && !syncButtonDisabled && syncStatus !== "syncing" && /* @__PURE__ */ jsx17(
8511
+ Box14,
8333
8512
  {
8334
8513
  sx: {
8335
8514
  position: "absolute",
@@ -8354,8 +8533,8 @@ var ChatAppBar = ({
8354
8533
  ]
8355
8534
  }
8356
8535
  ) }),
8357
- !isMobile && /* @__PURE__ */ jsx16(Tooltip6, { title: `${drawerOpen ? "Close" : "Open"} Conversations`, arrow: true, children: /* @__PURE__ */ jsxs13(
8358
- IconButton10,
8536
+ !isMobile && /* @__PURE__ */ jsx17(Tooltip6, { title: `${drawerOpen ? "Close" : "Open"} Conversations`, arrow: true, children: /* @__PURE__ */ jsxs14(
8537
+ IconButton11,
8359
8538
  {
8360
8539
  onClick: () => setDrawerOpen(!drawerOpen),
8361
8540
  sx: {
@@ -8368,9 +8547,9 @@ var ChatAppBar = ({
8368
8547
  "aria-label": `${drawerOpen ? "Close" : "Open"} conversations drawer`,
8369
8548
  "aria-pressed": drawerOpen,
8370
8549
  children: [
8371
- drawerOpen ? /* @__PURE__ */ jsx16(NotesIcon, {}) : /* @__PURE__ */ jsx16(NotesIconOutlined, {}),
8372
- conversations.length > 0 && /* @__PURE__ */ jsx16(
8373
- Box13,
8550
+ drawerOpen ? /* @__PURE__ */ jsx17(NotesIcon, {}) : /* @__PURE__ */ jsx17(NotesIconOutlined, {}),
8551
+ conversations.length > 0 && /* @__PURE__ */ jsx17(
8552
+ Box14,
8374
8553
  {
8375
8554
  sx: {
8376
8555
  position: "absolute",
@@ -8395,8 +8574,8 @@ var ChatAppBar = ({
8395
8574
  ]
8396
8575
  }
8397
8576
  ) }),
8398
- !isMobile && canShowNewConversationButton && /* @__PURE__ */ jsx16(Tooltip6, { title: "Start New Conversation", arrow: true, children: /* @__PURE__ */ jsx16(
8399
- IconButton10,
8577
+ !isMobile && canShowNewConversationButton && /* @__PURE__ */ jsx17(Tooltip6, { title: "Start New Conversation", arrow: true, children: /* @__PURE__ */ jsx17(
8578
+ IconButton11,
8400
8579
  {
8401
8580
  onClick: () => createNewConversation(),
8402
8581
  sx: {
@@ -8409,14 +8588,14 @@ var ChatAppBar = ({
8409
8588
  }
8410
8589
  },
8411
8590
  "aria-label": "Create new conversation",
8412
- children: /* @__PURE__ */ jsx16(AddIcon, {})
8591
+ children: /* @__PURE__ */ jsx17(AddIcon, {})
8413
8592
  }
8414
8593
  ) })
8415
8594
  ]
8416
8595
  }
8417
8596
  ),
8418
- /* @__PURE__ */ jsxs13(
8419
- Box13,
8597
+ /* @__PURE__ */ jsxs14(
8598
+ Box14,
8420
8599
  {
8421
8600
  sx: {
8422
8601
  display: "flex",
@@ -8436,8 +8615,8 @@ var ChatAppBar = ({
8436
8615
  }
8437
8616
  },
8438
8617
  children: [
8439
- isMobile && /* @__PURE__ */ jsx16(Tooltip6, { title: `Conversations (${conversations.length})`, arrow: true, children: /* @__PURE__ */ jsxs13(
8440
- IconButton10,
8618
+ isMobile && /* @__PURE__ */ jsx17(Tooltip6, { title: `Conversations (${conversations.length})`, arrow: true, children: /* @__PURE__ */ jsxs14(
8619
+ IconButton11,
8441
8620
  {
8442
8621
  onClick: () => setModalOpen(true),
8443
8622
  sx: {
@@ -8446,9 +8625,9 @@ var ChatAppBar = ({
8446
8625
  },
8447
8626
  "aria-label": `Open conversations modal with ${conversations.length} conversations`,
8448
8627
  children: [
8449
- /* @__PURE__ */ jsx16(NotesIcon, { fontSize: "small" }),
8450
- conversations.length > 0 && /* @__PURE__ */ jsx16(
8451
- Box13,
8628
+ /* @__PURE__ */ jsx17(NotesIcon, { fontSize: "small" }),
8629
+ conversations.length > 0 && /* @__PURE__ */ jsx17(
8630
+ Box14,
8452
8631
  {
8453
8632
  sx: {
8454
8633
  position: "absolute",
@@ -8473,8 +8652,8 @@ var ChatAppBar = ({
8473
8652
  ]
8474
8653
  }
8475
8654
  ) }),
8476
- isMobile && canShowNewConversationButton && /* @__PURE__ */ jsx16(Tooltip6, { title: "Start New Conversation", arrow: true, children: /* @__PURE__ */ jsx16(
8477
- IconButton10,
8655
+ isMobile && canShowNewConversationButton && /* @__PURE__ */ jsx17(Tooltip6, { title: "Start New Conversation", arrow: true, children: /* @__PURE__ */ jsx17(
8656
+ IconButton11,
8478
8657
  {
8479
8658
  onClick: () => {
8480
8659
  createNewConversation();
@@ -8490,11 +8669,11 @@ var ChatAppBar = ({
8490
8669
  }
8491
8670
  },
8492
8671
  "aria-label": "Create new conversation",
8493
- children: /* @__PURE__ */ jsx16(AddIcon, { fontSize: "small" })
8672
+ children: /* @__PURE__ */ jsx17(AddIcon, { fontSize: "small" })
8494
8673
  }
8495
8674
  ) }),
8496
- /* @__PURE__ */ jsx16(Tooltip6, { title: `Current AI: ${selectedModel.replace("Bandit-", "")}`, arrow: true, children: /* @__PURE__ */ jsx16(
8497
- IconButton10,
8675
+ /* @__PURE__ */ jsx17(Tooltip6, { title: `Current AI: ${selectedModel.replace("Bandit-", "")}`, arrow: true, children: /* @__PURE__ */ jsx17(
8676
+ IconButton11,
8498
8677
  {
8499
8678
  onClick: (e) => setModelAnchorEl(e.currentTarget),
8500
8679
  sx: {
@@ -8508,7 +8687,7 @@ var ChatAppBar = ({
8508
8687
  }
8509
8688
  },
8510
8689
  "aria-label": `Change AI personality. Currently using ${selectedModel}`,
8511
- children: /* @__PURE__ */ jsx16(
8690
+ children: /* @__PURE__ */ jsx17(
8512
8691
  Avatar8,
8513
8692
  {
8514
8693
  src: currentAvatar,
@@ -8525,16 +8704,16 @@ var ChatAppBar = ({
8525
8704
  )
8526
8705
  }
8527
8706
  ) }),
8528
- /* @__PURE__ */ jsx16(Tooltip6, { title: `Engine \xB7 ${engineDisplay}`, arrow: true, children: /* @__PURE__ */ jsx16(
8529
- IconButton10,
8707
+ /* @__PURE__ */ jsx17(Tooltip6, { title: `Engine \xB7 ${engineDisplay}`, arrow: true, children: /* @__PURE__ */ jsx17(
8708
+ IconButton11,
8530
8709
  {
8531
8710
  onClick: (e) => setEngineAnchorEl(e.currentTarget),
8532
8711
  sx: pillButtonStyles,
8533
8712
  "aria-label": `Change base model (engine). Currently ${engineDisplay}`,
8534
- children: /* @__PURE__ */ jsx16(AutoAwesomeIcon, { fontSize: "small" })
8713
+ children: /* @__PURE__ */ jsx17(AutoAwesomeIcon, { fontSize: "small" })
8535
8714
  }
8536
8715
  ) }),
8537
- /* @__PURE__ */ jsxs13(
8716
+ /* @__PURE__ */ jsxs14(
8538
8717
  Menu5,
8539
8718
  {
8540
8719
  anchorEl: engineAnchorEl,
@@ -8543,8 +8722,8 @@ var ChatAppBar = ({
8543
8722
  transformOrigin: { horizontal: "right", vertical: "top" },
8544
8723
  anchorOrigin: { horizontal: "right", vertical: "bottom" },
8545
8724
  children: [
8546
- /* @__PURE__ */ jsx16(Typography9, { variant: "overline", sx: { px: 2, color: theme.palette.text.secondary }, children: "Engine \xB7 base model" }),
8547
- 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" }) }),
8548
8727
  engines.map((engine) => {
8549
8728
  const badges = [
8550
8729
  engine.vision && "vision",
@@ -8552,12 +8731,14 @@ var ChatAppBar = ({
8552
8731
  engine.thinking && "thinking",
8553
8732
  engine.cloud && "cloud"
8554
8733
  ].filter(Boolean);
8555
- return /* @__PURE__ */ jsxs13(
8734
+ const isGated = engine.cloud && !frontierEligible;
8735
+ return /* @__PURE__ */ jsxs14(
8556
8736
  MenuItem5,
8557
8737
  {
8558
8738
  selected: engine.id === resolvedEngineId,
8559
- disabled: !engine.available,
8739
+ disabled: !engine.available || isGated,
8560
8740
  onClick: () => {
8741
+ if (isGated) return;
8561
8742
  useEngineStore.getState().setSelectedEngine(engine.id);
8562
8743
  setEngineAnchorEl(null);
8563
8744
  },
@@ -8569,16 +8750,63 @@ var ChatAppBar = ({
8569
8750
  py: 1,
8570
8751
  px: 2,
8571
8752
  maxWidth: 360,
8572
- whiteSpace: "normal"
8753
+ whiteSpace: "normal",
8754
+ // Keep gated rows readable (MUI disabled dims to ~38%) so the
8755
+ // upsell stays legible.
8756
+ ...isGated ? { opacity: 1, "&.Mui-disabled": { opacity: 1 } } : {}
8573
8757
  },
8574
8758
  children: [
8575
- /* @__PURE__ */ jsxs13(Box13, { sx: { display: "flex", alignItems: "center", gap: 1, width: "100%" }, children: [
8576
- /* @__PURE__ */ jsx16(Typography9, { variant: "body2", sx: { fontWeight: 600, flex: 1 }, children: cleanEngineName(engine.displayName) }),
8577
- engine.id === resolvedEngineId && /* @__PURE__ */ jsx16(Box13, { sx: { width: 8, height: 8, borderRadius: "50%", bgcolor: theme.palette.primary.main } })
8759
+ /* @__PURE__ */ jsxs14(Box14, { sx: { display: "flex", alignItems: "center", gap: 1, width: "100%" }, children: [
8760
+ isGated && /* @__PURE__ */ jsx17(
8761
+ LockIcon,
8762
+ {
8763
+ fontSize: "small",
8764
+ sx: { fontSize: "0.95rem", color: theme.palette.text.secondary }
8765
+ }
8766
+ ),
8767
+ /* @__PURE__ */ jsx17(
8768
+ Typography10,
8769
+ {
8770
+ variant: "body2",
8771
+ sx: {
8772
+ fontWeight: 600,
8773
+ flex: 1,
8774
+ color: isGated ? theme.palette.text.secondary : void 0
8775
+ },
8776
+ children: cleanEngineName(engine.displayName)
8777
+ }
8778
+ ),
8779
+ engine.id === resolvedEngineId && !isGated && /* @__PURE__ */ jsx17(Box14, { sx: { width: 8, height: 8, borderRadius: "50%", bgcolor: theme.palette.primary.main } })
8578
8780
  ] }),
8579
- /* @__PURE__ */ jsx16(Typography9, { variant: "caption", sx: { color: theme.palette.text.secondary }, children: engine.available ? engine.description : engine.unavailableReason || "Unavailable" }),
8580
- badges.length > 0 && /* @__PURE__ */ jsx16(Box13, { sx: { display: "flex", gap: 0.5, flexWrap: "wrap", mt: 0.25 }, children: badges.map((b) => /* @__PURE__ */ jsx16(
8581
- Box13,
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,
8784
+ {
8785
+ size: "small",
8786
+ variant: "text",
8787
+ startIcon: /* @__PURE__ */ jsx17(LockIcon, { sx: { fontSize: "0.85rem" } }),
8788
+ onClick: (e) => {
8789
+ e.stopPropagation();
8790
+ setEngineAnchorEl(null);
8791
+ safeNavigate(plansPath);
8792
+ },
8793
+ sx: {
8794
+ mt: 0.25,
8795
+ px: 0.75,
8796
+ py: 0.1,
8797
+ minWidth: 0,
8798
+ textTransform: "none",
8799
+ fontSize: "0.7rem",
8800
+ fontWeight: 600,
8801
+ color: theme.palette.primary.main,
8802
+ // Re-enable pointer events the disabled MenuItem strips.
8803
+ pointerEvents: "auto"
8804
+ },
8805
+ children: "Upgrade to unlock"
8806
+ }
8807
+ ),
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,
8582
8810
  {
8583
8811
  sx: {
8584
8812
  fontSize: "0.65rem",
@@ -8600,7 +8828,7 @@ var ChatAppBar = ({
8600
8828
  ]
8601
8829
  }
8602
8830
  ),
8603
- /* @__PURE__ */ jsx16(
8831
+ /* @__PURE__ */ jsx17(
8604
8832
  Menu5,
8605
8833
  {
8606
8834
  anchorEl: modelAnchorEl,
@@ -8636,7 +8864,7 @@ var ChatAppBar = ({
8636
8864
  }
8637
8865
  }
8638
8866
  },
8639
- children: availableModels.map((model) => /* @__PURE__ */ jsxs13(
8867
+ children: availableModels.map((model) => /* @__PURE__ */ jsxs14(
8640
8868
  MenuItem5,
8641
8869
  {
8642
8870
  selected: model.name === selectedModel,
@@ -8683,7 +8911,7 @@ var ChatAppBar = ({
8683
8911
  px: 2
8684
8912
  },
8685
8913
  children: [
8686
- /* @__PURE__ */ jsx16(
8914
+ /* @__PURE__ */ jsx17(
8687
8915
  Avatar8,
8688
8916
  {
8689
8917
  src: model.avatarBase64 || modelAvatars[model.name] || banditHead,
@@ -8696,12 +8924,12 @@ var ChatAppBar = ({
8696
8924
  }
8697
8925
  }
8698
8926
  ),
8699
- /* @__PURE__ */ jsxs13(Box13, { sx: { flex: 1 }, children: [
8700
- /* @__PURE__ */ jsx16(Typography9, { variant: "body2", sx: { fontWeight: 500 }, children: model.name.replace("Bandit-", "") }),
8701
- /* @__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" })
8702
8930
  ] }),
8703
- model.name === selectedModel && /* @__PURE__ */ jsx16(
8704
- Box13,
8931
+ model.name === selectedModel && /* @__PURE__ */ jsx17(
8932
+ Box14,
8705
8933
  {
8706
8934
  sx: {
8707
8935
  width: 8,
@@ -8717,9 +8945,9 @@ var ChatAppBar = ({
8717
8945
  ))
8718
8946
  }
8719
8947
  ),
8720
- isTTSAvailable && /* @__PURE__ */ jsxs13(Fragment9, { children: [
8721
- /* @__PURE__ */ jsx16(Tooltip6, { title: `Voice: ${selectedVoice ? toTitleCase(selectedVoice.split("-")[1]) : "Default"}`, arrow: true, children: /* @__PURE__ */ jsx16(
8722
- 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,
8723
8951
  {
8724
8952
  onClick: (e) => setVoiceAnchorEl(e.currentTarget),
8725
8953
  sx: {
@@ -8732,10 +8960,10 @@ var ChatAppBar = ({
8732
8960
  }
8733
8961
  },
8734
8962
  "aria-label": `Change voice. Currently using ${selectedVoice ? toTitleCase(selectedVoice.split("-")[1]) : "default"}`,
8735
- children: /* @__PURE__ */ jsx16(RecordVoiceOverIcon, { fontSize: "small" })
8963
+ children: /* @__PURE__ */ jsx17(RecordVoiceOverIcon, { fontSize: "small" })
8736
8964
  }
8737
8965
  ) }),
8738
- /* @__PURE__ */ jsx16(
8966
+ /* @__PURE__ */ jsx17(
8739
8967
  Menu5,
8740
8968
  {
8741
8969
  anchorEl: voiceAnchorEl,
@@ -8772,7 +9000,7 @@ var ChatAppBar = ({
8772
9000
  }
8773
9001
  }
8774
9002
  },
8775
- children: availableVoices.length > 0 ? availableVoices.map((voice) => /* @__PURE__ */ jsx16(
9003
+ children: availableVoices.length > 0 ? availableVoices.map((voice) => /* @__PURE__ */ jsx17(
8776
9004
  MenuItem5,
8777
9005
  {
8778
9006
  selected: voice === selectedVoice,
@@ -8780,14 +9008,14 @@ var ChatAppBar = ({
8780
9008
  handleVoiceChange(voice);
8781
9009
  setVoiceAnchorEl(null);
8782
9010
  },
8783
- children: /* @__PURE__ */ jsxs13(Box13, { sx: { display: "flex", alignItems: "center", gap: 1, width: "100%" }, children: [
8784
- /* @__PURE__ */ jsx16(RecordVoiceOverIcon, { fontSize: "small", sx: { color: theme.palette.text.secondary } }),
8785
- /* @__PURE__ */ jsxs13(Box13, { sx: { flex: 1 }, children: [
8786
- /* @__PURE__ */ jsx16(Typography9, { variant: "body2", children: toTitleCase(voice.split("-")[1]) }),
8787
- /* @__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" })
8788
9016
  ] }),
8789
- voice === selectedVoice && /* @__PURE__ */ jsx16(
8790
- Box13,
9017
+ voice === selectedVoice && /* @__PURE__ */ jsx17(
9018
+ Box14,
8791
9019
  {
8792
9020
  sx: {
8793
9021
  width: 8,
@@ -8800,7 +9028,7 @@ var ChatAppBar = ({
8800
9028
  ] })
8801
9029
  },
8802
9030
  voice
8803
- )) : /* @__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" }) })
8804
9032
  }
8805
9033
  )
8806
9034
  ] })
@@ -8810,17 +9038,17 @@ var ChatAppBar = ({
8810
9038
  ]
8811
9039
  }
8812
9040
  ),
8813
- /* @__PURE__ */ jsx16(conversation_drawer_default, { open: drawerOpen, onClose: () => setDrawerOpen(false) }),
8814
- /* @__PURE__ */ jsx16(enhanced_mobile_conversations_modal_default, { open: modalOpen, onClose: () => setModalOpen(false) }),
8815
- /* @__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(
8816
9044
  Dialog6,
8817
9045
  {
8818
9046
  open: confirmModelChangeOpen,
8819
9047
  onClose: () => setConfirmModelChangeOpen(false),
8820
9048
  children: [
8821
- /* @__PURE__ */ jsx16(DialogTitle5, { children: "Change personality and start new conversation?" }),
8822
- /* @__PURE__ */ jsx16(DialogContent5, { children: /* @__PURE__ */ jsxs13(Box13, { display: "flex", alignItems: "center", gap: 2, mt: 1, justifyContent: "center", children: [
8823
- /* @__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(
8824
9052
  Avatar8,
8825
9053
  {
8826
9054
  src: pendingModelAvatar,
@@ -8828,16 +9056,16 @@ var ChatAppBar = ({
8828
9056
  sx: { width: 40, height: 40, filter: "brightness(1.7)" }
8829
9057
  }
8830
9058
  ),
8831
- /* @__PURE__ */ jsxs13(Typography9, { variant: "body2", children: [
9059
+ /* @__PURE__ */ jsxs14(Typography10, { variant: "body2", children: [
8832
9060
  "Your current conversation will be saved, and a new one will begin with ",
8833
- /* @__PURE__ */ jsx16("strong", { children: pendingModel }),
9061
+ /* @__PURE__ */ jsx17("strong", { children: pendingModel }),
8834
9062
  "."
8835
9063
  ] })
8836
9064
  ] }) }),
8837
- /* @__PURE__ */ jsxs13(DialogActions5, { children: [
8838
- /* @__PURE__ */ jsx16(Button7, { onClick: () => setConfirmModelChangeOpen(false), children: "Cancel" }),
8839
- /* @__PURE__ */ jsx16(
8840
- Button7,
9065
+ /* @__PURE__ */ jsxs14(DialogActions5, { children: [
9066
+ /* @__PURE__ */ jsx17(Button8, { onClick: () => setConfirmModelChangeOpen(false), children: "Cancel" }),
9067
+ /* @__PURE__ */ jsx17(
9068
+ Button8,
8841
9069
  {
8842
9070
  onClick: () => {
8843
9071
  if (pendingModel) {
@@ -8939,31 +9167,31 @@ Respond with just the title and nothing else.
8939
9167
  };
8940
9168
 
8941
9169
  // src/chat/query-suggestion-picker.tsx
8942
- import { useEffect as useEffect13, useRef as useRef11, useState as useState16 } from "react";
8943
- import { Box as Box14, useMediaQuery as useMediaQuery6 } from "@mui/material";
8944
- 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";
8945
9173
  import ReactMarkdown from "react-markdown";
8946
9174
  import remarkGfm from "remark-gfm";
8947
9175
  import rehypeRaw from "rehype-raw";
8948
- import { Fragment as Fragment10, jsx as jsx17 } from "react/jsx-runtime";
9176
+ import { Fragment as Fragment10, jsx as jsx18 } from "react/jsx-runtime";
8949
9177
  var markdownComponents = {
8950
- p: ({ node, ...props }) => /* @__PURE__ */ jsx17("span", { ...props }),
8951
- 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 }),
8952
9180
  code: ({ node, children, ...props }) => {
8953
9181
  const { inline, ...rest } = props;
8954
- 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 });
8955
9183
  }
8956
9184
  };
8957
9185
  var QuerySuggestionPicker = ({
8958
9186
  onSend,
8959
9187
  inputHeight
8960
9188
  }) => {
8961
- const hasGenerated = useRef11(false);
9189
+ const hasGenerated = useRef12(false);
8962
9190
  const [hasSentPrompt, setHasSentPrompt] = useState16(false);
8963
9191
  const [examplePrompts, setExamplePrompts] = useState16([]);
8964
9192
  const [visiblePrompts, setVisiblePrompts] = useState16([]);
8965
- const scrollRef = useRef11(null);
8966
- const theme = useTheme13();
9193
+ const scrollRef = useRef12(null);
9194
+ const theme = useTheme14();
8967
9195
  const isMobile = useMediaQuery6((theme2) => theme2.breakpoints.down("sm"));
8968
9196
  const { background, text, border, hoverBackground, hoverBorder } = theme.palette.chat.suggestion;
8969
9197
  const { getCurrentModel, isLoading } = useModelStore();
@@ -9024,8 +9252,8 @@ var QuerySuggestionPicker = ({
9024
9252
  return () => clearInterval(interval);
9025
9253
  }, [hasSentPrompt, examplePrompts.length]);
9026
9254
  const displayPrompts = isMobile ? visiblePrompts.slice(0, Math.min(visiblePrompts.length, 6)) : visiblePrompts;
9027
- return displayPrompts.length > 0 && /* @__PURE__ */ jsx17(Fragment10, { children: /* @__PURE__ */ jsx17(
9028
- Box14,
9255
+ return displayPrompts.length > 0 && /* @__PURE__ */ jsx18(Fragment10, { children: /* @__PURE__ */ jsx18(
9256
+ Box15,
9029
9257
  {
9030
9258
  ref: scrollRef,
9031
9259
  sx: {
@@ -9041,8 +9269,8 @@ var QuerySuggestionPicker = ({
9041
9269
  pb: isMobile ? 0.4 : 0,
9042
9270
  "&::-webkit-scrollbar": { display: "none" }
9043
9271
  },
9044
- children: displayPrompts.map((prompt, i) => /* @__PURE__ */ jsx17(
9045
- Box14,
9272
+ children: displayPrompts.map((prompt, i) => /* @__PURE__ */ jsx18(
9273
+ Box15,
9046
9274
  {
9047
9275
  sx: {
9048
9276
  px: isMobile ? 1.4 : 2,
@@ -9076,8 +9304,8 @@ var QuerySuggestionPicker = ({
9076
9304
  onSend(prompt, []);
9077
9305
  setHasSentPrompt(true);
9078
9306
  },
9079
- children: /* @__PURE__ */ jsx17(
9080
- Box14,
9307
+ children: /* @__PURE__ */ jsx18(
9308
+ Box15,
9081
9309
  {
9082
9310
  sx: {
9083
9311
  flex: 1,
@@ -9101,7 +9329,7 @@ var QuerySuggestionPicker = ({
9101
9329
  padding: "0.1em 0.25em"
9102
9330
  }
9103
9331
  },
9104
- children: /* @__PURE__ */ jsx17(
9332
+ children: /* @__PURE__ */ jsx18(
9105
9333
  ReactMarkdown,
9106
9334
  {
9107
9335
  remarkPlugins: [remarkGfm],
@@ -9120,18 +9348,18 @@ var QuerySuggestionPicker = ({
9120
9348
  };
9121
9349
 
9122
9350
  // ../../src/pages/under-review.tsx
9123
- import { Box as Box15, Typography as Typography10, useTheme as useTheme14 } from "@mui/material";
9124
- import { useNavigate as useNavigate2 } from "react-router-dom";
9125
- 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";
9126
9354
  var UnderReview = () => {
9127
- const theme = useTheme14();
9128
- const navigate = useNavigate2();
9355
+ const theme = useTheme15();
9356
+ const navigate = useNavigate3();
9129
9357
  const handleSneakyLogout = () => {
9130
9358
  localStorage.removeItem("authToken");
9131
9359
  navigate("/login");
9132
9360
  };
9133
- return /* @__PURE__ */ jsxs14(
9134
- Box15,
9361
+ return /* @__PURE__ */ jsxs15(
9362
+ Box16,
9135
9363
  {
9136
9364
  sx: {
9137
9365
  minHeight: "100vh",
@@ -9146,8 +9374,8 @@ var UnderReview = () => {
9146
9374
  position: "relative"
9147
9375
  },
9148
9376
  children: [
9149
- /* @__PURE__ */ jsx18(
9150
- Box15,
9377
+ /* @__PURE__ */ jsx19(
9378
+ Box16,
9151
9379
  {
9152
9380
  onClick: handleSneakyLogout,
9153
9381
  sx: {
@@ -9172,13 +9400,13 @@ var UnderReview = () => {
9172
9400
  title: "Reset session"
9173
9401
  }
9174
9402
  ),
9175
- /* @__PURE__ */ jsx18(Typography10, { variant: "h4", sx: { mb: 2, fontWeight: 700, color: theme.palette.error.main }, children: "Under Review" }),
9176
- /* @__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: [
9177
9405
  "Your request to use our services is currently being reviewed.",
9178
- /* @__PURE__ */ jsx18("br", {}),
9406
+ /* @__PURE__ */ jsx19("br", {}),
9179
9407
  "For more info, please contact ",
9180
9408
  " ",
9181
- /* @__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" })
9182
9410
  ] })
9183
9411
  ]
9184
9412
  }
@@ -9187,13 +9415,13 @@ var UnderReview = () => {
9187
9415
  var under_review_default = UnderReview;
9188
9416
 
9189
9417
  // src/components/ConnectionStatus.tsx
9190
- import { Box as Box16, Chip as Chip5, useTheme as useTheme15 } from "@mui/material";
9191
- 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";
9192
9420
  var ConnectionStatus = ({
9193
9421
  showWhenGood = false,
9194
9422
  position = "top"
9195
9423
  }) => {
9196
- const theme = useTheme15();
9424
+ const theme = useTheme16();
9197
9425
  const { isOnline, connectionQuality, isSlowConnection } = useNetworkStatus();
9198
9426
  if (connectionQuality === "fast" && !showWhenGood) {
9199
9427
  return null;
@@ -9202,28 +9430,28 @@ var ConnectionStatus = ({
9202
9430
  switch (connectionQuality) {
9203
9431
  case "offline":
9204
9432
  return {
9205
- icon: /* @__PURE__ */ jsx19(WifiOffIcon, { sx: { fontSize: 16 } }),
9433
+ icon: /* @__PURE__ */ jsx20(WifiOffIcon, { sx: { fontSize: 16 } }),
9206
9434
  label: "Offline",
9207
9435
  color: "error",
9208
9436
  severity: "high"
9209
9437
  };
9210
9438
  case "slow":
9211
9439
  return {
9212
- icon: /* @__PURE__ */ jsx19(SignalWifi2BarIcon, { sx: { fontSize: 16 } }),
9440
+ icon: /* @__PURE__ */ jsx20(SignalWifi2BarIcon, { sx: { fontSize: 16 } }),
9213
9441
  label: "Slow connection",
9214
9442
  color: "warning",
9215
9443
  severity: "medium"
9216
9444
  };
9217
9445
  case "fast":
9218
9446
  return {
9219
- icon: /* @__PURE__ */ jsx19(WifiIcon, { sx: { fontSize: 16 } }),
9447
+ icon: /* @__PURE__ */ jsx20(WifiIcon, { sx: { fontSize: 16 } }),
9220
9448
  label: "Connected",
9221
9449
  color: "success",
9222
9450
  severity: "low"
9223
9451
  };
9224
9452
  default:
9225
9453
  return {
9226
- icon: /* @__PURE__ */ jsx19(WifiIcon, { sx: { fontSize: 16 } }),
9454
+ icon: /* @__PURE__ */ jsx20(WifiIcon, { sx: { fontSize: 16 } }),
9227
9455
  label: "Unknown",
9228
9456
  color: "default",
9229
9457
  severity: "low"
@@ -9231,8 +9459,8 @@ var ConnectionStatus = ({
9231
9459
  }
9232
9460
  };
9233
9461
  const config = getStatusConfig();
9234
- return /* @__PURE__ */ jsx19(
9235
- Box16,
9462
+ return /* @__PURE__ */ jsx20(
9463
+ Box17,
9236
9464
  {
9237
9465
  sx: {
9238
9466
  position: "fixed",
@@ -9247,7 +9475,7 @@ var ConnectionStatus = ({
9247
9475
  "100%": { opacity: 1 }
9248
9476
  }
9249
9477
  },
9250
- children: /* @__PURE__ */ jsx19(
9478
+ children: /* @__PURE__ */ jsx20(
9251
9479
  Chip5,
9252
9480
  {
9253
9481
  icon: config.icon,
@@ -9271,7 +9499,7 @@ var ConnectionStatus = ({
9271
9499
  };
9272
9500
 
9273
9501
  // src/hooks/useVoiceMode.ts
9274
- import { useEffect as useEffect14, useRef as useRef12 } from "react";
9502
+ import { useEffect as useEffect14, useRef as useRef13 } from "react";
9275
9503
  var RMS_BASELINE = 128;
9276
9504
  var RMS_NORMALIZER = 128;
9277
9505
  var computeRms = (data) => {
@@ -9301,7 +9529,7 @@ var useVoiceMode = (config) => {
9301
9529
  const setError = useVoiceModeStore((state) => state.setError);
9302
9530
  const resetTransientState = useVoiceModeStore((state) => state.resetTransientState);
9303
9531
  const setLastTranscript = useVoiceModeStore((state) => state.setLastTranscript);
9304
- const configRef = useRef12(config);
9532
+ const configRef = useRef13(config);
9305
9533
  useEffect14(() => {
9306
9534
  configRef.current = config;
9307
9535
  }, [config]);
@@ -9560,7 +9788,7 @@ var useVoiceMode = (config) => {
9560
9788
  };
9561
9789
 
9562
9790
  // src/chat/chat.tsx
9563
- import { jsx as jsx20, jsxs as jsxs15 } from "react/jsx-runtime";
9791
+ import { jsx as jsx21, jsxs as jsxs16 } from "react/jsx-runtime";
9564
9792
  var ChatContent = () => {
9565
9793
  const packageSettings = usePackageSettingsStore((state) => state.settings);
9566
9794
  const featureFlag = useFeatureFlag();
@@ -9621,8 +9849,8 @@ var ChatContent = () => {
9621
9849
  } = useVoiceStore();
9622
9850
  const isVoiceModeEnabled = useVoiceModeStore((state) => state.enabled);
9623
9851
  const canvasOpen = useCanvasStore((state) => state.open);
9624
- const previousVoiceModeEnabledRef = useRef13(isVoiceModeEnabled);
9625
- const historyRef = useRef13(history);
9852
+ const previousVoiceModeEnabledRef = useRef14(isVoiceModeEnabled);
9853
+ const historyRef = useRef14(history);
9626
9854
  useEffect15(() => {
9627
9855
  historyRef.current = history;
9628
9856
  }, [history]);
@@ -9668,9 +9896,9 @@ var ChatContent = () => {
9668
9896
  }
9669
9897
  }, [packageSettings?.gatewayApiUrl, availableVoices.length, initialized, loadVoicesFromAPI, token]);
9670
9898
  const provider = useAIProviderStore((state) => state.provider);
9671
- const inputRef = useRef13(null);
9899
+ const inputRef = useRef14(null);
9672
9900
  const [pastedImages, setPastedImages] = useState17([]);
9673
- const inputContainerRef = useRef13(null);
9901
+ const inputContainerRef = useRef14(null);
9674
9902
  const [inputHeight, setInputHeight] = useState17(80);
9675
9903
  const [isSubmitting, setIsSubmitting] = useState17(false);
9676
9904
  const [pendingMessage, setPendingMessage] = useState17(null);
@@ -9696,17 +9924,17 @@ var ChatContent = () => {
9696
9924
  const initialLogoState = history.length === 0;
9697
9925
  const [logoVisible, setLogoVisible] = useState17(initialLogoState);
9698
9926
  const [logoShouldRender, setLogoShouldRender] = useState17(initialLogoState);
9699
- const streamingGraceUntilRef = useRef13(0);
9927
+ const streamingGraceUntilRef = useRef14(0);
9700
9928
  const GRACE_MS = 450;
9701
9929
  const GRACE_OFFSET_DESKTOP = 28;
9702
9930
  const GRACE_OFFSET_MOBILE = 20;
9703
- const followStreamRef = useRef13(true);
9704
- const lastSpokenResponseRef = useRef13(null);
9705
- const previousConversationIdRef = useRef13(null);
9706
- const logoFadeTimeoutRef = useRef13(null);
9931
+ const followStreamRef = useRef14(true);
9932
+ const lastSpokenResponseRef = useRef14(null);
9933
+ const previousConversationIdRef = useRef14(null);
9934
+ const logoFadeTimeoutRef = useRef14(null);
9707
9935
  const [branding, setBranding] = useState17(null);
9708
9936
  const [brandingLoading, setBrandingLoading] = useState17(true);
9709
- const isBrandingLoadInProgressRef = useRef13(false);
9937
+ const isBrandingLoadInProgressRef = useRef14(false);
9710
9938
  const logoOnly = history.length === 0 && !brandingLoading;
9711
9939
  useEffect15(() => {
9712
9940
  const isEmptyConversation = (history?.length ?? 0) === 0;
@@ -10473,10 +10701,10 @@ var ChatContent = () => {
10473
10701
  }
10474
10702
  };
10475
10703
  if (!hydrated || brandingLoading || themeLoading) {
10476
- return /* @__PURE__ */ jsxs15(ThemeProvider, { theme: banditTheme, children: [
10477
- /* @__PURE__ */ jsx20(CssBaseline, {}),
10478
- /* @__PURE__ */ jsxs15(
10479
- Box17,
10704
+ return /* @__PURE__ */ jsxs16(ThemeProvider, { theme: banditTheme, children: [
10705
+ /* @__PURE__ */ jsx21(CssBaseline, {}),
10706
+ /* @__PURE__ */ jsxs16(
10707
+ Box18,
10480
10708
  {
10481
10709
  sx: (theme) => ({
10482
10710
  minHeight: "100dvh",
@@ -10489,8 +10717,8 @@ var ChatContent = () => {
10489
10717
  color: theme.palette.text.primary
10490
10718
  }),
10491
10719
  children: [
10492
- /* @__PURE__ */ jsx20(CircularProgress4, { size: 32, thickness: 4 }),
10493
- /* @__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..." })
10494
10722
  ]
10495
10723
  }
10496
10724
  )
@@ -10498,15 +10726,15 @@ var ChatContent = () => {
10498
10726
  }
10499
10727
  const userHasAccess = playgroundBypassAccess || ossMode || claims?.roles?.includes("super-user") || claims?.roles?.includes("admin");
10500
10728
  if (!userHasAccess) {
10501
- return /* @__PURE__ */ jsxs15(ThemeProvider, { theme: banditTheme, children: [
10502
- /* @__PURE__ */ jsx20(CssBaseline, {}),
10503
- /* @__PURE__ */ jsx20(under_review_default, {})
10729
+ return /* @__PURE__ */ jsxs16(ThemeProvider, { theme: banditTheme, children: [
10730
+ /* @__PURE__ */ jsx21(CssBaseline, {}),
10731
+ /* @__PURE__ */ jsx21(under_review_default, {})
10504
10732
  ] });
10505
10733
  }
10506
- return /* @__PURE__ */ jsxs15(ThemeProvider, { theme: banditTheme, children: [
10507
- /* @__PURE__ */ jsx20(CssBaseline, {}),
10508
- /* @__PURE__ */ jsxs15(
10509
- Box17,
10734
+ return /* @__PURE__ */ jsxs16(ThemeProvider, { theme: banditTheme, children: [
10735
+ /* @__PURE__ */ jsx21(CssBaseline, {}),
10736
+ /* @__PURE__ */ jsxs16(
10737
+ Box18,
10510
10738
  {
10511
10739
  sx: (theme) => ({
10512
10740
  display: "flex",
@@ -10524,7 +10752,7 @@ var ChatContent = () => {
10524
10752
  transition: "left 0.3s ease-in-out, width 0.3s ease-in-out"
10525
10753
  }),
10526
10754
  children: [
10527
- /* @__PURE__ */ jsx20(
10755
+ /* @__PURE__ */ jsx21(
10528
10756
  chat_app_bar_default,
10529
10757
  {
10530
10758
  availableModels,
@@ -10536,8 +10764,8 @@ var ChatContent = () => {
10536
10764
  setDrawerOpen
10537
10765
  }
10538
10766
  ),
10539
- /* @__PURE__ */ jsx20(
10540
- Box17,
10767
+ /* @__PURE__ */ jsx21(
10768
+ Box18,
10541
10769
  {
10542
10770
  ref: chatContainerRef,
10543
10771
  sx: {
@@ -10557,8 +10785,8 @@ var ChatContent = () => {
10557
10785
  msOverflowStyle: "none",
10558
10786
  "&::-webkit-scrollbar": { display: "none" }
10559
10787
  },
10560
- children: /* @__PURE__ */ jsxs15(
10561
- Box17,
10788
+ children: /* @__PURE__ */ jsxs16(
10789
+ Box18,
10562
10790
  {
10563
10791
  sx: {
10564
10792
  width: "100%",
@@ -10568,9 +10796,9 @@ var ChatContent = () => {
10568
10796
  pt: 2
10569
10797
  },
10570
10798
  children: [
10571
- logoShouldRender && !brandingLoading && (branding?.logoBase64 ? /* @__PURE__ */ jsx20(custom_logo_default, { visible: logoVisible, atTop: true }) : /* @__PURE__ */ jsx20(bandit_chat_logo_default, { visible: logoVisible, atTop: true })),
10572
- /* @__PURE__ */ jsx20(
10573
- 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,
10574
10802
  {
10575
10803
  sx: {
10576
10804
  margin: "0 auto",
@@ -10579,7 +10807,7 @@ var ChatContent = () => {
10579
10807
  flexShrink: 0,
10580
10808
  px: isMobile ? 0 : 0
10581
10809
  },
10582
- children: /* @__PURE__ */ jsx20(
10810
+ children: /* @__PURE__ */ jsx21(
10583
10811
  chat_messages_default,
10584
10812
  {
10585
10813
  isStreaming,
@@ -10603,7 +10831,7 @@ var ChatContent = () => {
10603
10831
  )
10604
10832
  }
10605
10833
  ),
10606
- showScrollToBottom && /* @__PURE__ */ jsx20(
10834
+ showScrollToBottom && /* @__PURE__ */ jsx21(
10607
10835
  chat_scroll_to_bottom_button_default,
10608
10836
  {
10609
10837
  inputHeight,
@@ -10612,8 +10840,8 @@ var ChatContent = () => {
10612
10840
  onClick: handleScrollToBottomClick
10613
10841
  }
10614
10842
  ),
10615
- history.length === 0 && componentStatus !== "Loading" && !isMobile && /* @__PURE__ */ jsx20(
10616
- Box17,
10843
+ history.length === 0 && componentStatus !== "Loading" && !isMobile && /* @__PURE__ */ jsx21(
10844
+ Box18,
10617
10845
  {
10618
10846
  sx: (theme) => ({
10619
10847
  position: "absolute",
@@ -10631,8 +10859,8 @@ var ChatContent = () => {
10631
10859
  })
10632
10860
  }
10633
10861
  ),
10634
- /* @__PURE__ */ jsxs15(
10635
- Box17,
10862
+ /* @__PURE__ */ jsxs16(
10863
+ Box18,
10636
10864
  {
10637
10865
  sx: {
10638
10866
  display: "flex",
@@ -10643,10 +10871,11 @@ var ChatContent = () => {
10643
10871
  maxWidth: "768px"
10644
10872
  },
10645
10873
  children: [
10646
- /* @__PURE__ */ jsx20(Box17, { sx: { flex: "1 1 auto" } }),
10647
- history.length === 0 && componentStatus !== "Loading" && !pendingMessage && preferences.chatSuggestionsEnabled && /* @__PURE__ */ jsx20(Box17, { sx: { marginBottom: "20px" }, children: /* @__PURE__ */ jsx20(QuerySuggestionPicker, { onSend: handleSend, inputHeight }) }),
10648
- /* @__PURE__ */ jsx20(ask_user_card_default, {}),
10649
- /* @__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(
10650
10879
  chat_input_default,
10651
10880
  {
10652
10881
  inputValue,
@@ -10673,7 +10902,7 @@ var ChatContent = () => {
10673
10902
  ]
10674
10903
  }
10675
10904
  ),
10676
- preferences.feedbackEnabled && !isMobile && /* @__PURE__ */ jsx20(
10905
+ preferences.feedbackEnabled && !isMobile && /* @__PURE__ */ jsx21(
10677
10906
  FeedbackButton,
10678
10907
  {
10679
10908
  fullScreen: false,
@@ -10686,11 +10915,11 @@ var ChatContent = () => {
10686
10915
  }
10687
10916
  }
10688
10917
  ),
10689
- /* @__PURE__ */ jsx20(ConnectionStatus, { position: "top", showWhenGood: false })
10918
+ /* @__PURE__ */ jsx21(ConnectionStatus, { position: "top", showWhenGood: false })
10690
10919
  ]
10691
10920
  }
10692
10921
  ),
10693
- /* @__PURE__ */ jsx20(canvas_panel_default, { isMobile })
10922
+ /* @__PURE__ */ jsx21(canvas_panel_default, { isMobile })
10694
10923
  ] });
10695
10924
  };
10696
10925
  var Chat = () => {
@@ -10716,13 +10945,13 @@ var Chat = () => {
10716
10945
  });
10717
10946
  if (!allowUnauthenticated && !bypassAuth && !authenticationService.isAuthenticated()) {
10718
10947
  debugLogger.debug("User is not authenticated, redirecting to login");
10719
- return /* @__PURE__ */ jsx20(Navigate, { to: "/login", replace: true });
10948
+ return /* @__PURE__ */ jsx21(Navigate, { to: "/login", replace: true });
10720
10949
  }
10721
- return /* @__PURE__ */ jsx20(ChatContent, {});
10950
+ return /* @__PURE__ */ jsx21(ChatContent, {});
10722
10951
  };
10723
10952
  var chat_default = Chat;
10724
10953
 
10725
10954
  export {
10726
10955
  chat_default
10727
10956
  };
10728
- //# sourceMappingURL=chunk-UEWOOLEB.mjs.map
10957
+ //# sourceMappingURL=chunk-BD6R7MTV.mjs.map