@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.
@@ -21890,6 +21890,167 @@ var init_ask_user_card = __esm({
21890
21890
  }
21891
21891
  });
21892
21892
 
21893
+ // src/store/rateLimitStore.ts
21894
+ var import_zustand17, useRateLimitStore, parseRateLimitError;
21895
+ var init_rateLimitStore = __esm({
21896
+ "src/store/rateLimitStore.ts"() {
21897
+ "use strict";
21898
+ import_zustand17 = require("zustand");
21899
+ useRateLimitStore = (0, import_zustand17.create)((set) => ({
21900
+ prompt: null,
21901
+ show: (prompt) => set({ prompt }),
21902
+ dismiss: () => set({ prompt: null })
21903
+ }));
21904
+ parseRateLimitError = (error) => {
21905
+ if (!error || typeof error !== "object") {
21906
+ return null;
21907
+ }
21908
+ const response = error.response;
21909
+ const status = response?.status;
21910
+ const data = response?.data;
21911
+ const payload = data && typeof data === "object" ? data : {};
21912
+ const isRateLimited = status === 429 || payload.error === "rate_limited" || payload.upgrade === true;
21913
+ if (!isRateLimited) {
21914
+ return null;
21915
+ }
21916
+ const scope = payload.scope === "weekly" ? "weekly" : "session";
21917
+ const message = typeof payload.message === "string" ? payload.message : void 0;
21918
+ const haystack = `${message ?? ""}`.toLowerCase();
21919
+ const frontier = /frontier|premium|cloud|pro model/.test(haystack);
21920
+ return { scope, message, frontier };
21921
+ };
21922
+ }
21923
+ });
21924
+
21925
+ // src/chat/rate-limit-prompt.tsx
21926
+ var import_react47, import_material40, import_react_router_dom2, import_jsx_runtime40, RateLimitPrompt, rate_limit_prompt_default;
21927
+ var init_rate_limit_prompt = __esm({
21928
+ "src/chat/rate-limit-prompt.tsx"() {
21929
+ "use strict";
21930
+ import_react47 = require("react");
21931
+ import_material40 = require("@mui/material");
21932
+ import_react_router_dom2 = require("react-router-dom");
21933
+ init_lucide_icons();
21934
+ init_rateLimitStore();
21935
+ init_debugLogger();
21936
+ import_jsx_runtime40 = require("react/jsx-runtime");
21937
+ RateLimitPrompt = () => {
21938
+ const theme = (0, import_material40.useTheme)();
21939
+ const prompt = useRateLimitStore((s) => s.prompt);
21940
+ const dismiss = useRateLimitStore((s) => s.dismiss);
21941
+ const hasLoggedRouterWarningRef = (0, import_react47.useRef)(false);
21942
+ let navigate = null;
21943
+ try {
21944
+ navigate = (0, import_react_router_dom2.useNavigate)();
21945
+ } catch (error) {
21946
+ if (!hasLoggedRouterWarningRef.current) {
21947
+ debugLogger.warn("RateLimitPrompt: Navigation not available (missing Router context)", { error });
21948
+ hasLoggedRouterWarningRef.current = true;
21949
+ }
21950
+ navigate = null;
21951
+ }
21952
+ const safeNavigate = (to) => {
21953
+ if (navigate) {
21954
+ navigate(to);
21955
+ } else if (typeof window !== "undefined") {
21956
+ window.location.href = to;
21957
+ }
21958
+ };
21959
+ if (!prompt) {
21960
+ return null;
21961
+ }
21962
+ const { scope, frontier } = prompt;
21963
+ const title = scope === "weekly" ? "You've reached your weekly limit" : "You've hit your session limit";
21964
+ const body = (() => {
21965
+ if (frontier) {
21966
+ 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.";
21967
+ }
21968
+ 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.";
21969
+ })();
21970
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
21971
+ import_material40.Box,
21972
+ {
21973
+ role: "status",
21974
+ sx: {
21975
+ mb: 1.5,
21976
+ px: 2,
21977
+ py: 1.5,
21978
+ borderRadius: 2,
21979
+ display: "flex",
21980
+ alignItems: "flex-start",
21981
+ gap: 1.5,
21982
+ border: `1px solid ${theme.palette.primary.main}33`,
21983
+ bgcolor: theme.palette.primary.main + "0F",
21984
+ backdropFilter: "blur(8px)"
21985
+ },
21986
+ children: [
21987
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
21988
+ import_material40.Box,
21989
+ {
21990
+ sx: {
21991
+ mt: 0.25,
21992
+ display: "flex",
21993
+ alignItems: "center",
21994
+ justifyContent: "center",
21995
+ width: 32,
21996
+ height: 32,
21997
+ flexShrink: 0,
21998
+ borderRadius: "50%",
21999
+ bgcolor: theme.palette.primary.main + "22",
22000
+ color: theme.palette.primary.main
22001
+ },
22002
+ children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(AutoAwesomeIcon, { fontSize: "small" })
22003
+ }
22004
+ ),
22005
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_material40.Box, { sx: { flex: 1, minWidth: 0 }, children: [
22006
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_material40.Typography, { variant: "subtitle2", sx: { fontWeight: 600, color: theme.palette.text.primary }, children: title }),
22007
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_material40.Typography, { variant: "body2", sx: { color: theme.palette.text.secondary, mt: 0.25 }, children: body }),
22008
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_material40.Box, { sx: { display: "flex", gap: 1, mt: 1, flexWrap: "wrap" }, children: [
22009
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
22010
+ import_material40.Button,
22011
+ {
22012
+ size: "small",
22013
+ variant: "contained",
22014
+ disableElevation: true,
22015
+ startIcon: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(AutoAwesomeIcon, { sx: { fontSize: "0.9rem" } }),
22016
+ onClick: () => {
22017
+ dismiss();
22018
+ safeNavigate("/plans");
22019
+ },
22020
+ sx: { textTransform: "none", fontWeight: 600, borderRadius: 2 },
22021
+ children: "Upgrade to keep chatting"
22022
+ }
22023
+ ),
22024
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
22025
+ import_material40.Button,
22026
+ {
22027
+ size: "small",
22028
+ variant: "text",
22029
+ onClick: () => dismiss(),
22030
+ sx: { textTransform: "none", color: theme.palette.text.secondary },
22031
+ children: scope === "weekly" ? "Maybe later" : "I'll wait"
22032
+ }
22033
+ )
22034
+ ] })
22035
+ ] }),
22036
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
22037
+ import_material40.IconButton,
22038
+ {
22039
+ size: "small",
22040
+ "aria-label": "Dismiss upgrade prompt",
22041
+ onClick: () => dismiss(),
22042
+ sx: { color: theme.palette.text.secondary, mt: -0.5, mr: -0.5 },
22043
+ children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(CloseIcon, { fontSize: "small" })
22044
+ }
22045
+ )
22046
+ ]
22047
+ }
22048
+ );
22049
+ };
22050
+ rate_limit_prompt_default = RateLimitPrompt;
22051
+ }
22052
+ });
22053
+
21893
22054
  // src/services/telemetry/otlpExporter.ts
21894
22055
  function redactSecretsString(s) {
21895
22056
  return s.replace(/\b(?:sk|tvly|ghp|gho|pk|rk)[-_][A-Za-z0-9]{8,}\b/gi, "[redacted]").replace(/\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g, "[redacted-jwt]").replace(/\bBearer\s+[A-Za-z0-9._-]{8,}/gi, "Bearer [redacted]");
@@ -22215,11 +22376,11 @@ var init_telemetry = __esm({
22215
22376
  });
22216
22377
 
22217
22378
  // src/store/engineStore.ts
22218
- var import_zustand17, STORAGE_KEY2, readStored, useEngineStore;
22379
+ var import_zustand18, STORAGE_KEY2, readStored, useEngineStore;
22219
22380
  var init_engineStore = __esm({
22220
22381
  "src/store/engineStore.ts"() {
22221
22382
  "use strict";
22222
- import_zustand17 = require("zustand");
22383
+ import_zustand18 = require("zustand");
22223
22384
  init_packageSettingsStore();
22224
22385
  init_authenticationService();
22225
22386
  init_debugLogger();
@@ -22231,7 +22392,7 @@ var init_engineStore = __esm({
22231
22392
  return null;
22232
22393
  }
22233
22394
  };
22234
- useEngineStore = (0, import_zustand17.create)((set, get) => ({
22395
+ useEngineStore = (0, import_zustand18.create)((set, get) => ({
22235
22396
  selectedEngine: readStored(),
22236
22397
  engines: [],
22237
22398
  loaded: false,
@@ -22811,15 +22972,15 @@ The user explicitly asked you to remember this. Respond with a short third-perso
22811
22972
  });
22812
22973
 
22813
22974
  // src/chat/hooks/useMoodEngine.tsx
22814
- var import_react47, useMoodEngine, moodPromptMap;
22975
+ var import_react48, useMoodEngine, moodPromptMap;
22815
22976
  var init_useMoodEngine = __esm({
22816
22977
  "src/chat/hooks/useMoodEngine.tsx"() {
22817
22978
  "use strict";
22818
- import_react47 = require("react");
22979
+ import_react48 = require("react");
22819
22980
  init_prompts();
22820
22981
  init_debugLogger();
22821
22982
  useMoodEngine = () => {
22822
- const [mood, setMood] = (0, import_react47.useState)("neutral");
22983
+ const [mood, setMood] = (0, import_react48.useState)("neutral");
22823
22984
  const analyzeMood = async (message) => {
22824
22985
  try {
22825
22986
  const detected = await detectMessageMood(message);
@@ -23033,12 +23194,12 @@ var init_mcp = __esm({
23033
23194
  });
23034
23195
 
23035
23196
  // src/chat/hooks/useAIProvider.tsx
23036
- var import_react48, lightBudget, medBudget, heavyBudget, modelConfigs, PERSONAL_TAG_HINTS, PERSONAL_TOPIC_HINTS, clamp, parseDateToEpoch, normalizeVectorMemory, isPersonalMemory, computeRecencyBoost, computeBoostedScore, formatMemoryLine, prepareAdvancedMemoryContext, useAIProvider;
23197
+ var import_react49, lightBudget, medBudget, heavyBudget, modelConfigs, PERSONAL_TAG_HINTS, PERSONAL_TOPIC_HINTS, clamp, parseDateToEpoch, normalizeVectorMemory, isPersonalMemory, computeRecencyBoost, computeBoostedScore, formatMemoryLine, prepareAdvancedMemoryContext, useAIProvider;
23037
23198
  var init_useAIProvider = __esm({
23038
23199
  "src/chat/hooks/useAIProvider.tsx"() {
23039
23200
  "use strict";
23040
23201
  init_debugLogger();
23041
- import_react48 = require("react");
23202
+ import_react49 = require("react");
23042
23203
  init_knowledgeStore();
23043
23204
  init_aiProviderStore();
23044
23205
  init_telemetry();
@@ -23053,6 +23214,7 @@ var init_useAIProvider = __esm({
23053
23214
  init_preferencesStore();
23054
23215
  init_mcp();
23055
23216
  init_askUserStore();
23217
+ init_rateLimitStore();
23056
23218
  lightBudget = {
23057
23219
  maxTokens: 2048,
23058
23220
  memoryTokenBudget: 750,
@@ -23340,25 +23502,25 @@ var init_useAIProvider = __esm({
23340
23502
  inputRef,
23341
23503
  onError
23342
23504
  }) => {
23343
- const currentSubRef = (0, import_react48.useRef)(null);
23344
- const lastPartialRef = (0, import_react48.useRef)({
23505
+ const currentSubRef = (0, import_react49.useRef)(null);
23506
+ const lastPartialRef = (0, import_react49.useRef)({
23345
23507
  text: "",
23346
23508
  images: [],
23347
23509
  usedDocs: [],
23348
23510
  question: ""
23349
23511
  });
23350
- const flushTimerRef = (0, import_react48.useRef)(null);
23512
+ const flushTimerRef = (0, import_react49.useRef)(null);
23351
23513
  const { provider } = useAIProviderStore.getState();
23352
23514
  const { preferences } = usePreferencesStore.getState();
23353
23515
  const { docs } = useKnowledgeStore.getState();
23354
23516
  const { analyzeMood, moodTokenBoost } = useMoodEngine();
23355
23517
  const { runMemoryScan } = useMemoryEnhancer();
23356
23518
  const { isVectorEnabled, searchMemories, searchDocuments, getUserMemories } = useVectorStore();
23357
- const pinnedVectorCacheRef = (0, import_react48.useRef)({
23519
+ const pinnedVectorCacheRef = (0, import_react49.useRef)({
23358
23520
  fetchedAt: 0,
23359
23521
  memories: []
23360
23522
  });
23361
- const getPinnedVectorMemories = (0, import_react48.useCallback)(async () => {
23523
+ const getPinnedVectorMemories = (0, import_react49.useCallback)(async () => {
23362
23524
  if (!isVectorEnabled) {
23363
23525
  return [];
23364
23526
  }
@@ -23383,7 +23545,7 @@ var init_useAIProvider = __esm({
23383
23545
  flushTimerRef.current = null;
23384
23546
  }
23385
23547
  };
23386
- const runAIProvider = (0, import_react48.useCallback)(
23548
+ const runAIProvider = (0, import_react49.useCallback)(
23387
23549
  async (systemPrompt, question, images) => {
23388
23550
  if (!provider) {
23389
23551
  debugLogger.error("No AI provider configured");
@@ -23400,6 +23562,7 @@ var init_useAIProvider = __esm({
23400
23562
  setResponse("");
23401
23563
  setStreamBuffer("");
23402
23564
  clearFlushTimer();
23565
+ useRateLimitStore.getState().dismiss();
23403
23566
  const imageList = Array.isArray(images) ? [...images] : [];
23404
23567
  const conversationStoreState = useConversationStore.getState();
23405
23568
  const { addToCurrent, replaceLastAnswer, conversations, currentId } = conversationStoreState;
@@ -23916,6 +24079,29 @@ ${protocol}`;
23916
24079
  overrideComponentStatus("Idle");
23917
24080
  setIsSubmitting(false);
23918
24081
  setIsStreaming(false);
24082
+ const rateLimit = parseRateLimitError(err);
24083
+ if (rateLimit) {
24084
+ debugLogger.info("Chat hit usage limit (429) \u2014 showing upgrade prompt", {
24085
+ scope: rateLimit.scope,
24086
+ frontier: rateLimit.frontier
24087
+ });
24088
+ const { replaceLastAnswer: replaceLastAnswer2 } = useConversationStore.getState();
24089
+ replaceLastAnswer2(
24090
+ 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._",
24091
+ lastPartialRef.current.images,
24092
+ false,
24093
+ lastPartialRef.current.usedDocs,
24094
+ true
24095
+ );
24096
+ setResponse("");
24097
+ setStreamBuffer("");
24098
+ setIsThinking?.(false);
24099
+ setPendingMessage(null);
24100
+ setLogoVisible(false);
24101
+ useRateLimitStore.getState().show(rateLimit);
24102
+ telemetryEndTurn({ error: "rate_limited" });
24103
+ return;
24104
+ }
23919
24105
  flushNow();
23920
24106
  let partial = lastPartialRef.current.text || latestDisplayMessage || fullMessage;
23921
24107
  if (partial && !partial.trim().endsWith("\u2026") && !partial.trim().endsWith("...")) {
@@ -24509,11 +24695,11 @@ ${inlineImageBlocks.join("\n\n")}` : "");
24509
24695
  });
24510
24696
 
24511
24697
  // src/hooks/useAutoScroll.ts
24512
- var import_react49, SCROLL_STATE_CHANGED_EVENT, useAutoScroll;
24698
+ var import_react50, SCROLL_STATE_CHANGED_EVENT, useAutoScroll;
24513
24699
  var init_useAutoScroll = __esm({
24514
24700
  "src/hooks/useAutoScroll.ts"() {
24515
24701
  "use strict";
24516
- import_react49 = require("react");
24702
+ import_react50 = require("react");
24517
24703
  SCROLL_STATE_CHANGED_EVENT = "scrollStateChanged";
24518
24704
  useAutoScroll = (options = {}) => {
24519
24705
  const {
@@ -24522,10 +24708,10 @@ var init_useAutoScroll = __esm({
24522
24708
  enabled = true,
24523
24709
  isMobile = false
24524
24710
  } = options;
24525
- const containerRef = (0, import_react49.useRef)(null);
24526
- const targetRef = (0, import_react49.useRef)(null);
24527
- const shouldAutoScrollRef = (0, import_react49.useRef)(true);
24528
- const isNearBottom = (0, import_react49.useCallback)(() => {
24711
+ const containerRef = (0, import_react50.useRef)(null);
24712
+ const targetRef = (0, import_react50.useRef)(null);
24713
+ const shouldAutoScrollRef = (0, import_react50.useRef)(true);
24714
+ const isNearBottom = (0, import_react50.useCallback)(() => {
24529
24715
  const container = containerRef.current;
24530
24716
  if (!container) return true;
24531
24717
  const { scrollTop, scrollHeight, clientHeight } = container;
@@ -24533,7 +24719,7 @@ var init_useAutoScroll = __esm({
24533
24719
  const effectiveThreshold = Math.max(threshold, 10);
24534
24720
  return distanceFromBottom <= effectiveThreshold;
24535
24721
  }, [threshold]);
24536
- const scrollToBottom = (0, import_react49.useCallback)((forceBehavior) => {
24722
+ const scrollToBottom = (0, import_react50.useCallback)((forceBehavior) => {
24537
24723
  if (!enabled) return;
24538
24724
  const container = containerRef.current;
24539
24725
  if (container) {
@@ -24560,7 +24746,7 @@ var init_useAutoScroll = __esm({
24560
24746
  }
24561
24747
  }
24562
24748
  }, [enabled, behavior, isMobile]);
24563
- const forceScrollToBottom = (0, import_react49.useCallback)(() => {
24749
+ const forceScrollToBottom = (0, import_react50.useCallback)(() => {
24564
24750
  scrollToBottom("smooth");
24565
24751
  const container = containerRef.current;
24566
24752
  if (container) {
@@ -24578,7 +24764,7 @@ var init_useAutoScroll = __esm({
24578
24764
  rafId = requestAnimationFrame(tick);
24579
24765
  }
24580
24766
  }, [scrollToBottom, isNearBottom]);
24581
- const autoScrollIfNeeded = (0, import_react49.useCallback)(() => {
24767
+ const autoScrollIfNeeded = (0, import_react50.useCallback)(() => {
24582
24768
  if (enabled && shouldAutoScrollRef.current && isNearBottom()) {
24583
24769
  scrollToBottom();
24584
24770
  const container = containerRef.current;
@@ -24599,7 +24785,7 @@ var init_useAutoScroll = __esm({
24599
24785
  }
24600
24786
  }, [enabled, isNearBottom, scrollToBottom]);
24601
24787
  const containerElement = containerRef.current;
24602
- (0, import_react49.useEffect)(() => {
24788
+ (0, import_react50.useEffect)(() => {
24603
24789
  if (!containerElement) return;
24604
24790
  const handleScroll = () => {
24605
24791
  const currentlyNearBottom = isNearBottom();
@@ -24609,10 +24795,10 @@ var init_useAutoScroll = __esm({
24609
24795
  containerElement.addEventListener("scroll", handleScroll, { passive: true });
24610
24796
  return () => containerElement.removeEventListener("scroll", handleScroll);
24611
24797
  }, [containerElement, isNearBottom]);
24612
- (0, import_react49.useEffect)(() => {
24798
+ (0, import_react50.useEffect)(() => {
24613
24799
  autoScrollIfNeeded();
24614
24800
  });
24615
- const getScrollState = (0, import_react49.useCallback)(() => {
24801
+ const getScrollState = (0, import_react50.useCallback)(() => {
24616
24802
  const container = containerRef.current;
24617
24803
  if (!container) {
24618
24804
  return {
@@ -24650,24 +24836,24 @@ var init_useAutoScroll = __esm({
24650
24836
  });
24651
24837
 
24652
24838
  // src/hooks/useNetworkStatus.ts
24653
- var import_react50, useNetworkStatus;
24839
+ var import_react51, useNetworkStatus;
24654
24840
  var init_useNetworkStatus = __esm({
24655
24841
  "src/hooks/useNetworkStatus.ts"() {
24656
24842
  "use strict";
24657
- import_react50 = require("react");
24843
+ import_react51 = require("react");
24658
24844
  useNetworkStatus = () => {
24659
- const [networkStatus, setNetworkStatus] = (0, import_react50.useState)({
24845
+ const [networkStatus, setNetworkStatus] = (0, import_react51.useState)({
24660
24846
  isOnline: navigator.onLine,
24661
24847
  isSlowConnection: false,
24662
24848
  connectionQuality: "fast",
24663
24849
  lastRequestTime: 0
24664
24850
  });
24665
- const trackRequestStart = (0, import_react50.useCallback)(() => {
24851
+ const trackRequestStart = (0, import_react51.useCallback)(() => {
24666
24852
  const startTime = Date.now();
24667
24853
  setNetworkStatus((prev) => ({ ...prev, lastRequestTime: startTime }));
24668
24854
  return startTime;
24669
24855
  }, []);
24670
- const trackRequestEnd = (0, import_react50.useCallback)((startTime) => {
24856
+ const trackRequestEnd = (0, import_react51.useCallback)((startTime) => {
24671
24857
  const duration = Date.now() - startTime;
24672
24858
  const isSlowConnection = duration > 2e3;
24673
24859
  setNetworkStatus((prev) => ({
@@ -24676,7 +24862,7 @@ var init_useNetworkStatus = __esm({
24676
24862
  connectionQuality: !navigator.onLine ? "offline" : isSlowConnection ? "slow" : "fast"
24677
24863
  }));
24678
24864
  }, []);
24679
- (0, import_react50.useEffect)(() => {
24865
+ (0, import_react51.useEffect)(() => {
24680
24866
  const handleOnline = () => {
24681
24867
  setNetworkStatus((prev) => ({
24682
24868
  ...prev,
@@ -24698,7 +24884,7 @@ var init_useNetworkStatus = __esm({
24698
24884
  window.removeEventListener("offline", handleOffline);
24699
24885
  };
24700
24886
  }, []);
24701
- (0, import_react50.useEffect)(() => {
24887
+ (0, import_react51.useEffect)(() => {
24702
24888
  const { connection } = navigator;
24703
24889
  if (connection) {
24704
24890
  const updateConnectionInfo = () => {
@@ -24736,17 +24922,17 @@ var init_useNetworkStatus = __esm({
24736
24922
  });
24737
24923
 
24738
24924
  // src/chat/project-management-modal.tsx
24739
- var import_react51, import_material40, import_lucide_react7, import_styles24, import_jsx_runtime40, DEFAULT_COLORS2, ProjectManagementModal, project_management_modal_default;
24925
+ var import_react52, import_material41, import_lucide_react7, import_styles24, import_jsx_runtime41, DEFAULT_COLORS2, ProjectManagementModal, project_management_modal_default;
24740
24926
  var init_project_management_modal = __esm({
24741
24927
  "src/chat/project-management-modal.tsx"() {
24742
24928
  "use strict";
24743
- import_react51 = require("react");
24744
- import_material40 = require("@mui/material");
24929
+ import_react52 = require("react");
24930
+ import_material41 = require("@mui/material");
24745
24931
  import_lucide_react7 = require("lucide-react");
24746
24932
  import_styles24 = require("@mui/material/styles");
24747
24933
  init_projectStore();
24748
24934
  init_conversationStore();
24749
- import_jsx_runtime40 = require("react/jsx-runtime");
24935
+ import_jsx_runtime41 = require("react/jsx-runtime");
24750
24936
  DEFAULT_COLORS2 = [
24751
24937
  "#2196F3",
24752
24938
  "#4CAF50",
@@ -24764,7 +24950,7 @@ var init_project_management_modal = __esm({
24764
24950
  onClose
24765
24951
  }) => {
24766
24952
  const theme = (0, import_styles24.useTheme)();
24767
- const isMobile = (0, import_material40.useMediaQuery)(theme.breakpoints.down("sm"));
24953
+ const isMobile = (0, import_material41.useMediaQuery)(theme.breakpoints.down("sm"));
24768
24954
  const {
24769
24955
  projects,
24770
24956
  _hasHydrated,
@@ -24776,25 +24962,25 @@ var init_project_management_modal = __esm({
24776
24962
  hydrate
24777
24963
  } = useProjectStore();
24778
24964
  const { getConversationsByProject } = useConversationStore();
24779
- const [showCreateForm, setShowCreateForm] = (0, import_react51.useState)(false);
24780
- const [editingProject, setEditingProject] = (0, import_react51.useState)(null);
24781
- const [formData, setFormData] = (0, import_react51.useState)({
24965
+ const [showCreateForm, setShowCreateForm] = (0, import_react52.useState)(false);
24966
+ const [editingProject, setEditingProject] = (0, import_react52.useState)(null);
24967
+ const [formData, setFormData] = (0, import_react52.useState)({
24782
24968
  name: "",
24783
24969
  description: "",
24784
24970
  instructions: "",
24785
24971
  color: DEFAULT_COLORS2[0]
24786
24972
  });
24787
- const [menuAnchor, setMenuAnchor] = (0, import_react51.useState)(null);
24788
- const [selectedProject, setSelectedProject] = (0, import_react51.useState)(null);
24789
- const [loading, setLoading] = (0, import_react51.useState)(false);
24790
- const [error, setError] = (0, import_react51.useState)(null);
24791
- const modalContainerRef = (0, import_react51.useRef)(null);
24792
- (0, import_react51.useEffect)(() => {
24973
+ const [menuAnchor, setMenuAnchor] = (0, import_react52.useState)(null);
24974
+ const [selectedProject, setSelectedProject] = (0, import_react52.useState)(null);
24975
+ const [loading, setLoading] = (0, import_react52.useState)(false);
24976
+ const [error, setError] = (0, import_react52.useState)(null);
24977
+ const modalContainerRef = (0, import_react52.useRef)(null);
24978
+ (0, import_react52.useEffect)(() => {
24793
24979
  if (open && !_hasHydrated) {
24794
24980
  hydrate();
24795
24981
  }
24796
24982
  }, [open, _hasHydrated, hydrate]);
24797
- (0, import_react51.useEffect)(() => {
24983
+ (0, import_react52.useEffect)(() => {
24798
24984
  if (!open) {
24799
24985
  setMenuAnchor(null);
24800
24986
  setSelectedProject(null);
@@ -24904,8 +25090,8 @@ var init_project_management_modal = __esm({
24904
25090
  const hoverSurface = (0, import_styles24.alpha)(theme.palette.primary.main, theme.palette.mode === "dark" ? 0.22 : 0.08);
24905
25091
  const headerTitle = showCreateForm ? editingProject ? "Edit Project" : "Create Project" : "Manage Projects";
24906
25092
  const headerSubtitle = showCreateForm ? "Name, describe, and color-code your project." : "Organize conversations into cohesive projects.";
24907
- const content = /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
24908
- import_material40.Box,
25093
+ const content = /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
25094
+ import_material41.Box,
24909
25095
  {
24910
25096
  ref: modalContainerRef,
24911
25097
  sx: {
@@ -24923,8 +25109,8 @@ var init_project_management_modal = __esm({
24923
25109
  position: "relative"
24924
25110
  },
24925
25111
  children: [
24926
- isMobile && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
24927
- import_material40.Box,
25112
+ isMobile && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
25113
+ import_material41.Box,
24928
25114
  {
24929
25115
  sx: {
24930
25116
  width: 56,
@@ -24937,8 +25123,8 @@ var init_project_management_modal = __esm({
24937
25123
  }
24938
25124
  }
24939
25125
  ),
24940
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
24941
- import_material40.Box,
25126
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
25127
+ import_material41.Box,
24942
25128
  {
24943
25129
  sx: {
24944
25130
  px: isMobile ? 1.5 : 2.75,
@@ -24950,8 +25136,8 @@ var init_project_management_modal = __esm({
24950
25136
  gap: 1
24951
25137
  },
24952
25138
  children: [
24953
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
24954
- import_material40.Box,
25139
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
25140
+ import_material41.Box,
24955
25141
  {
24956
25142
  sx: {
24957
25143
  display: "flex",
@@ -24960,8 +25146,8 @@ var init_project_management_modal = __esm({
24960
25146
  gap: 1
24961
25147
  },
24962
25148
  children: [
24963
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
24964
- import_material40.Box,
25149
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
25150
+ import_material41.Box,
24965
25151
  {
24966
25152
  sx: {
24967
25153
  display: "flex",
@@ -24971,9 +25157,9 @@ var init_project_management_modal = __esm({
24971
25157
  flex: 1
24972
25158
  },
24973
25159
  children: [
24974
- showCreateForm && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_material40.IconButton, { onClick: resetForm, size: "small", sx: { mr: 0.5 }, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react7.ArrowLeft, { size: 16 }) }),
24975
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
24976
- import_material40.Typography,
25160
+ showCreateForm && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_material41.IconButton, { onClick: resetForm, size: "small", sx: { mr: 0.5 }, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_lucide_react7.ArrowLeft, { size: 16 }) }),
25161
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
25162
+ import_material41.Typography,
24977
25163
  {
24978
25164
  variant: "h6",
24979
25165
  sx: {
@@ -24989,16 +25175,16 @@ var init_project_management_modal = __esm({
24989
25175
  ]
24990
25176
  }
24991
25177
  ),
24992
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_material40.IconButton, { onClick: handleClose, size: "small", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react7.X, {}) })
25178
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_material41.IconButton, { onClick: handleClose, size: "small", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_lucide_react7.X, {}) })
24993
25179
  ]
24994
25180
  }
24995
25181
  ),
24996
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_material40.Typography, { variant: "body2", color: "text.secondary", children: headerSubtitle })
25182
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_material41.Typography, { variant: "body2", color: "text.secondary", children: headerSubtitle })
24997
25183
  ]
24998
25184
  }
24999
25185
  ),
25000
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
25001
- import_material40.Box,
25186
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
25187
+ import_material41.Box,
25002
25188
  {
25003
25189
  sx: {
25004
25190
  flex: 1,
@@ -25010,10 +25196,10 @@ var init_project_management_modal = __esm({
25010
25196
  gap: 2.5
25011
25197
  },
25012
25198
  children: [
25013
- error && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_material40.Alert, { severity: "error", onClose: () => setError(null), children: error }),
25014
- showCreateForm ? /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_material40.Box, { sx: { display: "flex", flexDirection: "column", gap: 2 }, children: [
25015
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
25016
- import_material40.TextField,
25199
+ error && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_material41.Alert, { severity: "error", onClose: () => setError(null), children: error }),
25200
+ showCreateForm ? /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_material41.Box, { sx: { display: "flex", flexDirection: "column", gap: 2 }, children: [
25201
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
25202
+ import_material41.TextField,
25017
25203
  {
25018
25204
  label: "Project name",
25019
25205
  value: formData.name,
@@ -25024,8 +25210,8 @@ var init_project_management_modal = __esm({
25024
25210
  autoFocus: true
25025
25211
  }
25026
25212
  ),
25027
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
25028
- import_material40.TextField,
25213
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
25214
+ import_material41.TextField,
25029
25215
  {
25030
25216
  label: "Description (optional)",
25031
25217
  value: formData.description,
@@ -25036,8 +25222,8 @@ var init_project_management_modal = __esm({
25036
25222
  disabled: loading
25037
25223
  }
25038
25224
  ),
25039
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
25040
- import_material40.TextField,
25225
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
25226
+ import_material41.TextField,
25041
25227
  {
25042
25228
  label: "Project instructions (optional)",
25043
25229
  helperText: "Standing context the assistant uses for every chat in this project \u2014 goals, tone, key facts.",
@@ -25049,10 +25235,10 @@ var init_project_management_modal = __esm({
25049
25235
  disabled: loading
25050
25236
  }
25051
25237
  ),
25052
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_material40.Box, { children: [
25053
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_material40.Typography, { variant: "subtitle2", sx: { mb: 1 }, children: "Color" }),
25054
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_material40.Box, { sx: { display: "flex", flexWrap: "wrap", gap: 1 }, children: DEFAULT_COLORS2.map((color) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
25055
- import_material40.Box,
25238
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_material41.Box, { children: [
25239
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_material41.Typography, { variant: "subtitle2", sx: { mb: 1 }, children: "Color" }),
25240
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_material41.Box, { sx: { display: "flex", flexWrap: "wrap", gap: 1 }, children: DEFAULT_COLORS2.map((color) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
25241
+ import_material41.Box,
25056
25242
  {
25057
25243
  sx: {
25058
25244
  width: 32,
@@ -25072,11 +25258,11 @@ var init_project_management_modal = __esm({
25072
25258
  color
25073
25259
  )) })
25074
25260
  ] })
25075
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_material40.Box, { sx: { display: "flex", flexDirection: "column", gap: 2 }, children: [
25076
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
25077
- import_material40.Button,
25261
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_material41.Box, { sx: { display: "flex", flexDirection: "column", gap: 2 }, children: [
25262
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
25263
+ import_material41.Button,
25078
25264
  {
25079
- startIcon: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react7.Plus, {}),
25265
+ startIcon: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_lucide_react7.Plus, {}),
25080
25266
  onClick: () => setShowCreateForm(true),
25081
25267
  variant: "contained",
25082
25268
  sx: {
@@ -25088,8 +25274,8 @@ var init_project_management_modal = __esm({
25088
25274
  children: "Create project"
25089
25275
  }
25090
25276
  ),
25091
- projects.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
25092
- import_material40.Box,
25277
+ projects.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
25278
+ import_material41.Box,
25093
25279
  {
25094
25280
  sx: {
25095
25281
  textAlign: "center",
@@ -25101,15 +25287,15 @@ var init_project_management_modal = __esm({
25101
25287
  backgroundColor: subtleSurface
25102
25288
  },
25103
25289
  children: [
25104
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react7.Folder, { size: 48, style: { marginBottom: 8, opacity: 0.5 } }),
25105
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_material40.Typography, { variant: "body1", sx: { fontWeight: 600 }, children: "No projects yet" }),
25106
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_material40.Typography, { variant: "body2", children: "Create your first project to organize conversations." })
25290
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_lucide_react7.Folder, { size: 48, style: { marginBottom: 8, opacity: 0.5 } }),
25291
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_material41.Typography, { variant: "body1", sx: { fontWeight: 600 }, children: "No projects yet" }),
25292
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_material41.Typography, { variant: "body2", children: "Create your first project to organize conversations." })
25107
25293
  ]
25108
25294
  }
25109
- ) : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_material40.List, { sx: { display: "flex", flexDirection: "column", gap: 1.25, py: 0 }, children: projects.map((project) => {
25295
+ ) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_material41.List, { sx: { display: "flex", flexDirection: "column", gap: 1.25, py: 0 }, children: projects.map((project) => {
25110
25296
  const conversationCount = getConversationsByProject(project.id).length;
25111
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_material40.ListItem, { disablePadding: true, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
25112
- import_material40.Box,
25297
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_material41.ListItem, { disablePadding: true, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
25298
+ import_material41.Box,
25113
25299
  {
25114
25300
  sx: {
25115
25301
  display: "flex",
@@ -25127,8 +25313,8 @@ var init_project_management_modal = __esm({
25127
25313
  }
25128
25314
  },
25129
25315
  children: [
25130
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
25131
- import_material40.Avatar,
25316
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
25317
+ import_material41.Avatar,
25132
25318
  {
25133
25319
  sx: {
25134
25320
  bgcolor: project.color,
@@ -25136,21 +25322,21 @@ var init_project_management_modal = __esm({
25136
25322
  height: 36,
25137
25323
  fontSize: "1rem"
25138
25324
  },
25139
- children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react7.Folder, { size: 16 })
25325
+ children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_lucide_react7.Folder, { size: 16 })
25140
25326
  }
25141
25327
  ),
25142
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_material40.Box, { sx: { flex: 1, minWidth: 0 }, children: [
25143
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_material40.Box, { sx: { display: "flex", alignItems: "center", gap: 1, flexWrap: "wrap" }, children: [
25144
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
25145
- import_material40.Typography,
25328
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_material41.Box, { sx: { flex: 1, minWidth: 0 }, children: [
25329
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_material41.Box, { sx: { display: "flex", alignItems: "center", gap: 1, flexWrap: "wrap" }, children: [
25330
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
25331
+ import_material41.Typography,
25146
25332
  {
25147
25333
  variant: "subtitle1",
25148
25334
  sx: { fontWeight: 600, overflow: "hidden", textOverflow: "ellipsis" },
25149
25335
  children: project.name
25150
25336
  }
25151
25337
  ),
25152
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
25153
- import_material40.Chip,
25338
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
25339
+ import_material41.Chip,
25154
25340
  {
25155
25341
  label: `${conversationCount}`,
25156
25342
  size: "small",
@@ -25164,8 +25350,8 @@ var init_project_management_modal = __esm({
25164
25350
  }
25165
25351
  )
25166
25352
  ] }),
25167
- project.description && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
25168
- import_material40.Typography,
25353
+ project.description && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
25354
+ import_material41.Typography,
25169
25355
  {
25170
25356
  variant: "body2",
25171
25357
  color: "text.secondary",
@@ -25174,8 +25360,8 @@ var init_project_management_modal = __esm({
25174
25360
  }
25175
25361
  )
25176
25362
  ] }),
25177
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
25178
- import_material40.IconButton,
25363
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
25364
+ import_material41.IconButton,
25179
25365
  {
25180
25366
  onClick: (e) => {
25181
25367
  e.stopPropagation();
@@ -25187,7 +25373,7 @@ var init_project_management_modal = __esm({
25187
25373
  mt: 0.25,
25188
25374
  zIndex: 1
25189
25375
  },
25190
- children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react7.MoreVertical, { size: 16 })
25376
+ children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_lucide_react7.MoreVertical, { size: 16 })
25191
25377
  }
25192
25378
  )
25193
25379
  ]
@@ -25198,8 +25384,8 @@ var init_project_management_modal = __esm({
25198
25384
  ]
25199
25385
  }
25200
25386
  ),
25201
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
25202
- import_material40.Box,
25387
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
25388
+ import_material41.Box,
25203
25389
  {
25204
25390
  sx: {
25205
25391
  px: isMobile ? 1.5 : 2.75,
@@ -25209,9 +25395,9 @@ var init_project_management_modal = __esm({
25209
25395
  justifyContent: "flex-end",
25210
25396
  gap: 1
25211
25397
  },
25212
- children: showCreateForm ? /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_jsx_runtime40.Fragment, { children: [
25213
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
25214
- import_material40.Button,
25398
+ children: showCreateForm ? /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
25399
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
25400
+ import_material41.Button,
25215
25401
  {
25216
25402
  onClick: resetForm,
25217
25403
  disabled: loading,
@@ -25219,22 +25405,22 @@ var init_project_management_modal = __esm({
25219
25405
  children: "Cancel"
25220
25406
  }
25221
25407
  ),
25222
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
25223
- import_material40.Button,
25408
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
25409
+ import_material41.Button,
25224
25410
  {
25225
25411
  onClick: editingProject ? handleEditProject : handleCreateProject,
25226
25412
  variant: "contained",
25227
25413
  disabled: loading,
25228
- startIcon: loading ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_material40.CircularProgress, { size: 16 }) : void 0,
25414
+ startIcon: loading ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_material41.CircularProgress, { size: 16 }) : void 0,
25229
25415
  sx: { textTransform: "none", borderRadius: 2 },
25230
25416
  children: editingProject ? "Update project" : "Create project"
25231
25417
  }
25232
25418
  )
25233
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_material40.Button, { onClick: handleClose, sx: { textTransform: "none", borderRadius: 2 }, children: "Close" })
25419
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_material41.Button, { onClick: handleClose, sx: { textTransform: "none", borderRadius: 2 }, children: "Close" })
25234
25420
  }
25235
25421
  ),
25236
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
25237
- import_material40.Menu,
25422
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
25423
+ import_material41.Menu,
25238
25424
  {
25239
25425
  anchorEl: menuAnchor,
25240
25426
  open: Boolean(menuAnchor),
@@ -25255,30 +25441,30 @@ var init_project_management_modal = __esm({
25255
25441
  }
25256
25442
  },
25257
25443
  children: [
25258
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
25259
- import_material40.MenuItem,
25444
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
25445
+ import_material41.MenuItem,
25260
25446
  {
25261
25447
  onClick: () => {
25262
25448
  if (!selectedProject) return;
25263
25449
  startEdit(selectedProject);
25264
25450
  },
25265
- children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_material40.Box, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
25266
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react7.Pencil, { size: 16 }),
25267
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_material40.Typography, { variant: "body2", color: "inherit", children: "Edit" })
25451
+ children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_material41.Box, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
25452
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_lucide_react7.Pencil, { size: 16 }),
25453
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_material41.Typography, { variant: "body2", color: "inherit", children: "Edit" })
25268
25454
  ] })
25269
25455
  }
25270
25456
  ),
25271
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
25272
- import_material40.MenuItem,
25457
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
25458
+ import_material41.MenuItem,
25273
25459
  {
25274
25460
  onClick: () => {
25275
25461
  if (!selectedProject) return;
25276
25462
  handleDeleteProject(selectedProject);
25277
25463
  },
25278
25464
  sx: { color: theme.palette.error.main },
25279
- children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_material40.Box, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
25280
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react7.Trash2, { size: 16 }),
25281
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_material40.Typography, { variant: "body2", color: "inherit", children: "Delete" })
25465
+ children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_material41.Box, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
25466
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_lucide_react7.Trash2, { size: 16 }),
25467
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_material41.Typography, { variant: "body2", color: "inherit", children: "Delete" })
25282
25468
  ] })
25283
25469
  }
25284
25470
  )
@@ -25288,8 +25474,8 @@ var init_project_management_modal = __esm({
25288
25474
  ]
25289
25475
  }
25290
25476
  );
25291
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_jsx_runtime40.Fragment, { children: isMobile ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
25292
- import_material40.SwipeableDrawer,
25477
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_jsx_runtime41.Fragment, { children: isMobile ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
25478
+ import_material41.SwipeableDrawer,
25293
25479
  {
25294
25480
  anchor: "bottom",
25295
25481
  open,
@@ -25308,8 +25494,8 @@ var init_project_management_modal = __esm({
25308
25494
  },
25309
25495
  children: content
25310
25496
  }
25311
- ) : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
25312
- import_material40.Modal,
25497
+ ) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
25498
+ import_material41.Modal,
25313
25499
  {
25314
25500
  open,
25315
25501
  onClose: handleClose,
@@ -25329,18 +25515,18 @@ var init_project_management_modal = __esm({
25329
25515
  });
25330
25516
 
25331
25517
  // src/chat/move-conversation-modal.tsx
25332
- var import_react52, import_material41, import_lucide_react8, import_styles25, import_jsx_runtime41, MoveConversationModal, move_conversation_modal_default;
25518
+ var import_react53, import_material42, import_lucide_react8, import_styles25, import_jsx_runtime42, MoveConversationModal, move_conversation_modal_default;
25333
25519
  var init_move_conversation_modal = __esm({
25334
25520
  "src/chat/move-conversation-modal.tsx"() {
25335
25521
  "use strict";
25336
- import_react52 = require("react");
25337
- import_material41 = require("@mui/material");
25522
+ import_react53 = require("react");
25523
+ import_material42 = require("@mui/material");
25338
25524
  import_lucide_react8 = require("lucide-react");
25339
25525
  import_styles25 = require("@mui/material/styles");
25340
25526
  init_projectStore();
25341
25527
  init_conversationStore();
25342
25528
  init_debugLogger();
25343
- import_jsx_runtime41 = require("react/jsx-runtime");
25529
+ import_jsx_runtime42 = require("react/jsx-runtime");
25344
25530
  MoveConversationModal = ({
25345
25531
  open,
25346
25532
  onClose,
@@ -25350,15 +25536,15 @@ var init_move_conversation_modal = __esm({
25350
25536
  const theme = (0, import_styles25.useTheme)();
25351
25537
  const { projects, _hasHydrated, hydrate } = useProjectStore();
25352
25538
  const { moveConversationToProject } = useConversationStore();
25353
- const [selectedProjectId, setSelectedProjectId] = (0, import_react52.useState)(
25539
+ const [selectedProjectId, setSelectedProjectId] = (0, import_react53.useState)(
25354
25540
  currentProjectId
25355
25541
  );
25356
- (0, import_react52.useEffect)(() => {
25542
+ (0, import_react53.useEffect)(() => {
25357
25543
  if (open && !_hasHydrated) {
25358
25544
  hydrate();
25359
25545
  }
25360
25546
  }, [open, _hasHydrated, hydrate]);
25361
- (0, import_react52.useEffect)(() => {
25547
+ (0, import_react53.useEffect)(() => {
25362
25548
  setSelectedProjectId(currentProjectId);
25363
25549
  }, [currentProjectId, open]);
25364
25550
  const handleMove = async () => {
@@ -25377,8 +25563,8 @@ var init_move_conversation_modal = __esm({
25377
25563
  };
25378
25564
  const conversationCount = conversations.length;
25379
25565
  const isMultiple = conversationCount > 1;
25380
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
25381
- import_material41.Dialog,
25566
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
25567
+ import_material42.Dialog,
25382
25568
  {
25383
25569
  open,
25384
25570
  onClose,
@@ -25391,40 +25577,40 @@ var init_move_conversation_modal = __esm({
25391
25577
  }
25392
25578
  },
25393
25579
  children: [
25394
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_material41.DialogTitle, { children: [
25580
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_material42.DialogTitle, { children: [
25395
25581
  "Move ",
25396
25582
  isMultiple ? `${conversationCount} Conversations` : "Conversation"
25397
25583
  ] }),
25398
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_material41.DialogContent, { sx: { px: 3 }, children: [
25399
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_material41.Typography, { 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:` }),
25400
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_material41.List, { children: [
25401
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_material41.ListItem, { disablePadding: true, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
25402
- import_material41.ListItemButton,
25584
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_material42.DialogContent, { sx: { px: 3 }, children: [
25585
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_material42.Typography, { 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:` }),
25586
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_material42.List, { children: [
25587
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_material42.ListItem, { disablePadding: true, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
25588
+ import_material42.ListItemButton,
25403
25589
  {
25404
25590
  onClick: () => setSelectedProjectId(null),
25405
25591
  selected: selectedProjectId === null,
25406
25592
  children: [
25407
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_material41.ListItemIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
25408
- import_material41.Radio,
25593
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_material42.ListItemIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
25594
+ import_material42.Radio,
25409
25595
  {
25410
25596
  checked: selectedProjectId === null,
25411
25597
  onChange: () => setSelectedProjectId(null),
25412
25598
  size: "small"
25413
25599
  }
25414
25600
  ) }),
25415
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_material41.ListItemIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
25416
- import_material41.Avatar,
25601
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_material42.ListItemIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
25602
+ import_material42.Avatar,
25417
25603
  {
25418
25604
  sx: {
25419
25605
  bgcolor: theme.palette.grey[400],
25420
25606
  width: 32,
25421
25607
  height: 32
25422
25608
  },
25423
- children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_lucide_react8.Inbox, {})
25609
+ children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react8.Inbox, {})
25424
25610
  }
25425
25611
  ) }),
25426
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
25427
- import_material41.ListItemText,
25612
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
25613
+ import_material42.ListItemText,
25428
25614
  {
25429
25615
  primary: "No Project",
25430
25616
  secondary: "Keep conversations ungrouped"
@@ -25433,34 +25619,34 @@ var init_move_conversation_modal = __esm({
25433
25619
  ]
25434
25620
  }
25435
25621
  ) }),
25436
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_material41.Divider, { sx: { my: 1 } }),
25437
- projects.map((project) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_material41.ListItem, { disablePadding: true, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
25438
- import_material41.ListItemButton,
25622
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_material42.Divider, { sx: { my: 1 } }),
25623
+ projects.map((project) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_material42.ListItem, { disablePadding: true, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
25624
+ import_material42.ListItemButton,
25439
25625
  {
25440
25626
  onClick: () => setSelectedProjectId(project.id),
25441
25627
  selected: selectedProjectId === project.id,
25442
25628
  children: [
25443
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_material41.ListItemIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
25444
- import_material41.Radio,
25629
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_material42.ListItemIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
25630
+ import_material42.Radio,
25445
25631
  {
25446
25632
  checked: selectedProjectId === project.id,
25447
25633
  onChange: () => setSelectedProjectId(project.id),
25448
25634
  size: "small"
25449
25635
  }
25450
25636
  ) }),
25451
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_material41.ListItemIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
25452
- import_material41.Avatar,
25637
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_material42.ListItemIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
25638
+ import_material42.Avatar,
25453
25639
  {
25454
25640
  sx: {
25455
25641
  bgcolor: project.color,
25456
25642
  width: 32,
25457
25643
  height: 32
25458
25644
  },
25459
- children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_lucide_react8.Folder, {})
25645
+ children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react8.Folder, {})
25460
25646
  }
25461
25647
  ) }),
25462
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
25463
- import_material41.ListItemText,
25648
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
25649
+ import_material42.ListItemText,
25464
25650
  {
25465
25651
  primary: project.name,
25466
25652
  secondary: project.description
@@ -25469,17 +25655,17 @@ var init_move_conversation_modal = __esm({
25469
25655
  ]
25470
25656
  }
25471
25657
  ) }, project.id)),
25472
- projects.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_material41.Box, { sx: {
25658
+ projects.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_material42.Box, { sx: {
25473
25659
  textAlign: "center",
25474
25660
  py: 2,
25475
25661
  color: theme.palette.text.secondary
25476
- }, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_material41.Typography, { variant: "body2", children: "No projects available. Create a project first to organize conversations." }) })
25662
+ }, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_material42.Typography, { variant: "body2", children: "No projects available. Create a project first to organize conversations." }) })
25477
25663
  ] })
25478
25664
  ] }),
25479
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_material41.DialogActions, { sx: { px: 3, pb: 2 }, children: [
25480
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_material41.Button, { onClick: onClose, children: "Cancel" }),
25481
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
25482
- import_material41.Button,
25665
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_material42.DialogActions, { sx: { px: 3, pb: 2 }, children: [
25666
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_material42.Button, { onClick: onClose, children: "Cancel" }),
25667
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
25668
+ import_material42.Button,
25483
25669
  {
25484
25670
  onClick: handleMove,
25485
25671
  variant: "contained",
@@ -25500,15 +25686,15 @@ var init_move_conversation_modal = __esm({
25500
25686
  });
25501
25687
 
25502
25688
  // src/chat/simple-conversation-item.tsx
25503
- var import_react53, import_material42, import_lucide_react9, import_styles26, import_jsx_runtime42, SimpleConversationItem, simple_conversation_item_default;
25689
+ var import_react54, import_material43, import_lucide_react9, import_styles26, import_jsx_runtime43, SimpleConversationItem, simple_conversation_item_default;
25504
25690
  var init_simple_conversation_item = __esm({
25505
25691
  "src/chat/simple-conversation-item.tsx"() {
25506
25692
  "use strict";
25507
- import_react53 = require("react");
25508
- import_material42 = require("@mui/material");
25693
+ import_react54 = require("react");
25694
+ import_material43 = require("@mui/material");
25509
25695
  import_lucide_react9 = require("lucide-react");
25510
25696
  import_styles26 = require("@mui/material/styles");
25511
- import_jsx_runtime42 = require("react/jsx-runtime");
25697
+ import_jsx_runtime43 = require("react/jsx-runtime");
25512
25698
  SimpleConversationItem = ({
25513
25699
  conversation,
25514
25700
  isSelected,
@@ -25525,17 +25711,17 @@ var init_simple_conversation_item = __esm({
25525
25711
  isTouchDragActive
25526
25712
  }) => {
25527
25713
  const theme = (0, import_styles26.useTheme)();
25528
- const isMobile = (0, import_material42.useMediaQuery)(theme.breakpoints.down("sm"));
25529
- const [anchorEl, setAnchorEl] = (0, import_react53.useState)(null);
25530
- const [isEditing, setIsEditing] = (0, import_react53.useState)(false);
25531
- const [editName, setEditName] = (0, import_react53.useState)(conversation.name);
25532
- const [isDragging, setIsDragging] = (0, import_react53.useState)(false);
25533
- const [isTouchDragging, setIsTouchDragging] = (0, import_react53.useState)(false);
25534
- const [showRenameDialog, setShowRenameDialog] = (0, import_react53.useState)(false);
25535
- const longPressTimeoutRef = (0, import_react53.useRef)(null);
25536
- const touchStartPointRef = (0, import_react53.useRef)(null);
25537
- const activeTouchIdRef = (0, import_react53.useRef)(null);
25538
- const suppressClickRef = (0, import_react53.useRef)(false);
25714
+ const isMobile = (0, import_material43.useMediaQuery)(theme.breakpoints.down("sm"));
25715
+ const [anchorEl, setAnchorEl] = (0, import_react54.useState)(null);
25716
+ const [isEditing, setIsEditing] = (0, import_react54.useState)(false);
25717
+ const [editName, setEditName] = (0, import_react54.useState)(conversation.name);
25718
+ const [isDragging, setIsDragging] = (0, import_react54.useState)(false);
25719
+ const [isTouchDragging, setIsTouchDragging] = (0, import_react54.useState)(false);
25720
+ const [showRenameDialog, setShowRenameDialog] = (0, import_react54.useState)(false);
25721
+ const longPressTimeoutRef = (0, import_react54.useRef)(null);
25722
+ const touchStartPointRef = (0, import_react54.useRef)(null);
25723
+ const activeTouchIdRef = (0, import_react54.useRef)(null);
25724
+ const suppressClickRef = (0, import_react54.useRef)(false);
25539
25725
  const highlightText = (text, query) => {
25540
25726
  if (!query || !query.trim()) {
25541
25727
  return text;
@@ -25543,8 +25729,8 @@ var init_simple_conversation_item = __esm({
25543
25729
  const regex = new RegExp(`(${query.trim()})`, "gi");
25544
25730
  const parts = text.split(regex);
25545
25731
  return parts.map(
25546
- (part, index) => regex.test(part) ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
25547
- import_material42.Box,
25732
+ (part, index) => regex.test(part) ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
25733
+ import_material43.Box,
25548
25734
  {
25549
25735
  component: "span",
25550
25736
  sx: {
@@ -25674,14 +25860,14 @@ var init_simple_conversation_item = __esm({
25674
25860
  if (!isMobile) return;
25675
25861
  finalizeTouchDrag();
25676
25862
  };
25677
- (0, import_react53.useEffect)(() => {
25863
+ (0, import_react54.useEffect)(() => {
25678
25864
  if (!isTouchDragActive && isTouchDragging) {
25679
25865
  setIsTouchDragging(false);
25680
25866
  }
25681
25867
  }, [isTouchDragActive, isTouchDragging]);
25682
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
25683
- /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
25684
- import_material42.Box,
25868
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
25869
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
25870
+ import_material43.Box,
25685
25871
  {
25686
25872
  "data-project-id": conversation.projectId ?? "__ungrouped",
25687
25873
  draggable: !isMobile && !isEditing,
@@ -25733,7 +25919,7 @@ var init_simple_conversation_item = __esm({
25733
25919
  }
25734
25920
  },
25735
25921
  children: [
25736
- !isMobile && !isEditing && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
25922
+ !isMobile && !isEditing && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
25737
25923
  import_lucide_react9.GripVertical,
25738
25924
  {
25739
25925
  size: 16,
@@ -25741,9 +25927,9 @@ var init_simple_conversation_item = __esm({
25741
25927
  style: { marginRight: 4, cursor: "grab" }
25742
25928
  }
25743
25929
  ),
25744
- /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_material42.Box, { sx: { flex: 1, minWidth: 0 }, children: [
25745
- isEditing ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
25746
- import_material42.TextField,
25930
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_material43.Box, { sx: { flex: 1, minWidth: 0 }, children: [
25931
+ isEditing ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
25932
+ import_material43.TextField,
25747
25933
  {
25748
25934
  value: editName,
25749
25935
  onChange: (e) => setEditName(e.target.value),
@@ -25765,8 +25951,8 @@ var init_simple_conversation_item = __esm({
25765
25951
  }
25766
25952
  }
25767
25953
  }
25768
- ) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
25769
- import_material42.Typography,
25954
+ ) : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
25955
+ import_material43.Typography,
25770
25956
  {
25771
25957
  variant: "body2",
25772
25958
  sx: {
@@ -25780,8 +25966,8 @@ var init_simple_conversation_item = __esm({
25780
25966
  children: highlightText(conversation.name, searchQuery)
25781
25967
  }
25782
25968
  ),
25783
- !isEditing && snippet && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
25784
- import_material42.Typography,
25969
+ !isEditing && snippet && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
25970
+ import_material43.Typography,
25785
25971
  {
25786
25972
  variant: "caption",
25787
25973
  sx: {
@@ -25799,8 +25985,8 @@ var init_simple_conversation_item = __esm({
25799
25985
  }
25800
25986
  )
25801
25987
  ] }),
25802
- !isEditing && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
25803
- import_material42.IconButton,
25988
+ !isEditing && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
25989
+ import_material43.IconButton,
25804
25990
  {
25805
25991
  onClick: handleMenuOpen,
25806
25992
  size: "small",
@@ -25828,11 +26014,11 @@ var init_simple_conversation_item = __esm({
25828
26014
  }
25829
26015
  }
25830
26016
  },
25831
- children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react9.MoreVertical, { size: 16 })
26017
+ children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react9.MoreVertical, { size: 16 })
25832
26018
  }
25833
26019
  ),
25834
- /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
25835
- import_material42.Menu,
26020
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
26021
+ import_material43.Menu,
25836
26022
  {
25837
26023
  anchorEl,
25838
26024
  open: Boolean(anchorEl),
@@ -25858,17 +26044,17 @@ var init_simple_conversation_item = __esm({
25858
26044
  }
25859
26045
  },
25860
26046
  children: [
25861
- onRename && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_material42.MenuItem, { onClick: handleEdit, children: [
25862
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_material42.ListItemIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react9.Pencil, { size: 16 }) }),
25863
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_material42.ListItemText, { children: "Rename" })
26047
+ onRename && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_material43.MenuItem, { onClick: handleEdit, children: [
26048
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_material43.ListItemIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react9.Pencil, { size: 16 }) }),
26049
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_material43.ListItemText, { children: "Rename" })
25864
26050
  ] }),
25865
- onMove && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_material42.MenuItem, { onClick: handleMove, children: [
25866
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_material42.ListItemIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react9.MailOpen, { size: 16 }) }),
25867
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_material42.ListItemText, { children: "Move to Project" })
26051
+ onMove && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_material43.MenuItem, { onClick: handleMove, children: [
26052
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_material43.ListItemIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react9.MailOpen, { size: 16 }) }),
26053
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_material43.ListItemText, { children: "Move to Project" })
25868
26054
  ] }),
25869
- /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_material42.MenuItem, { onClick: handleDelete, children: [
25870
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_material42.ListItemIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react9.Trash2, { size: 16 }) }),
25871
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_material42.ListItemText, { children: "Delete" })
26055
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_material43.MenuItem, { onClick: handleDelete, children: [
26056
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_material43.ListItemIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react9.Trash2, { size: 16 }) }),
26057
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_material43.ListItemText, { children: "Delete" })
25872
26058
  ] })
25873
26059
  ]
25874
26060
  }
@@ -25876,8 +26062,8 @@ var init_simple_conversation_item = __esm({
25876
26062
  ]
25877
26063
  }
25878
26064
  ),
25879
- isMobile && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
25880
- import_material42.Dialog,
26065
+ isMobile && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
26066
+ import_material43.Dialog,
25881
26067
  {
25882
26068
  open: showRenameDialog,
25883
26069
  onClose: () => {
@@ -25892,9 +26078,9 @@ var init_simple_conversation_item = __esm({
25892
26078
  }
25893
26079
  },
25894
26080
  children: [
25895
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_material42.DialogTitle, { sx: { pb: 1 }, children: "Rename Conversation" }),
25896
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_material42.DialogContent, { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
25897
- import_material42.TextField,
26081
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_material43.DialogTitle, { sx: { pb: 1 }, children: "Rename Conversation" }),
26082
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_material43.DialogContent, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
26083
+ import_material43.TextField,
25898
26084
  {
25899
26085
  value: editName,
25900
26086
  onChange: (e) => setEditName(e.target.value),
@@ -25906,9 +26092,9 @@ var init_simple_conversation_item = __esm({
25906
26092
  }
25907
26093
  }
25908
26094
  ) }),
25909
- /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_material42.DialogActions, { sx: { px: 3, pb: 2 }, children: [
25910
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
25911
- import_material42.Button,
26095
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_material43.DialogActions, { sx: { px: 3, pb: 2 }, children: [
26096
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
26097
+ import_material43.Button,
25912
26098
  {
25913
26099
  onClick: () => {
25914
26100
  setShowRenameDialog(false);
@@ -25917,8 +26103,8 @@ var init_simple_conversation_item = __esm({
25917
26103
  children: "Cancel"
25918
26104
  }
25919
26105
  ),
25920
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
25921
- import_material42.Button,
26106
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
26107
+ import_material43.Button,
25922
26108
  {
25923
26109
  onClick: () => {
25924
26110
  commitRename();
@@ -25940,18 +26126,18 @@ var init_simple_conversation_item = __esm({
25940
26126
  });
25941
26127
 
25942
26128
  // src/chat/project-header.tsx
25943
- var import_react54, import_material43, import_lucide_react10, import_styles27, import_jsx_runtime43, ProjectHeader, project_header_default;
26129
+ var import_react55, import_material44, import_lucide_react10, import_styles27, import_jsx_runtime44, ProjectHeader, project_header_default;
25944
26130
  var init_project_header = __esm({
25945
26131
  "src/chat/project-header.tsx"() {
25946
26132
  "use strict";
25947
- import_react54 = require("react");
25948
- import_material43 = require("@mui/material");
26133
+ import_react55 = require("react");
26134
+ import_material44 = require("@mui/material");
25949
26135
  import_lucide_react10 = require("lucide-react");
25950
26136
  import_styles27 = require("@mui/material/styles");
25951
26137
  init_conversationStore();
25952
26138
  init_projectStore();
25953
26139
  init_debugLogger();
25954
- import_jsx_runtime43 = require("react/jsx-runtime");
26140
+ import_jsx_runtime44 = require("react/jsx-runtime");
25955
26141
  ProjectHeader = ({
25956
26142
  projectId,
25957
26143
  projectName,
@@ -25968,10 +26154,10 @@ var init_project_header = __esm({
25968
26154
  const theme = (0, import_styles27.useTheme)();
25969
26155
  const { createNewConversation } = useConversationStore();
25970
26156
  const { renameProject } = useProjectStore();
25971
- const [isHovered, setIsHovered] = (0, import_react54.useState)(false);
25972
- const [isDragOver, setIsDragOver] = (0, import_react54.useState)(false);
25973
- const [renameDraft, setRenameDraft] = (0, import_react54.useState)(projectName);
25974
- const renameActionRef = (0, import_react54.useRef)("none");
26157
+ const [isHovered, setIsHovered] = (0, import_react55.useState)(false);
26158
+ const [isDragOver, setIsDragOver] = (0, import_react55.useState)(false);
26159
+ const [renameDraft, setRenameDraft] = (0, import_react55.useState)(projectName);
26160
+ const renameActionRef = (0, import_react55.useRef)("none");
25975
26161
  const isUngrouped = projectId === null;
25976
26162
  const Icon = isCollapsed ? import_lucide_react10.Folder : import_lucide_react10.FolderOpen;
25977
26163
  const handleAddConversation = (e) => {
@@ -26017,8 +26203,8 @@ var init_project_header = __esm({
26017
26203
  setRenameDraft(projectName);
26018
26204
  onRenameComplete?.();
26019
26205
  };
26020
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
26021
- import_material43.Box,
26206
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
26207
+ import_material44.Box,
26022
26208
  {
26023
26209
  "data-project-id": projectId ?? "__ungrouped",
26024
26210
  onMouseEnter: () => setIsHovered(true),
@@ -26034,37 +26220,37 @@ var init_project_header = __esm({
26034
26220
  py: 1.5,
26035
26221
  cursor: isUngrouped ? "default" : "pointer",
26036
26222
  // No pointer cursor for ungrouped
26037
- bgcolor: isDragOver || isTouchTarget ? (0, import_material43.alpha)(projectColor || theme.palette.primary.main, 0.1) : void 0,
26223
+ bgcolor: isDragOver || isTouchTarget ? (0, import_material44.alpha)(projectColor || theme.palette.primary.main, 0.1) : void 0,
26038
26224
  border: isDragOver || isTouchTarget ? `2px dashed ${projectColor || theme.palette.primary.main}` : "2px solid transparent",
26039
26225
  borderRadius: isDragOver || isTouchTarget ? 1 : 0,
26040
26226
  transition: "all 0.2s ease",
26041
26227
  "&:hover": !isUngrouped ? {
26042
26228
  // Only show hover for projects, not ungrouped
26043
- bgcolor: (0, import_material43.alpha)(theme.palette.text.primary, 0.04)
26229
+ bgcolor: (0, import_material44.alpha)(theme.palette.text.primary, 0.04)
26044
26230
  } : {}
26045
26231
  },
26046
26232
  children: [
26047
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
26048
- import_material43.Avatar,
26233
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
26234
+ import_material44.Avatar,
26049
26235
  {
26050
26236
  sx: {
26051
- bgcolor: isUngrouped ? (0, import_material43.alpha)(theme.palette.text.disabled, 0.1) : projectColor || theme.palette.grey[400],
26237
+ bgcolor: isUngrouped ? (0, import_material44.alpha)(theme.palette.text.disabled, 0.1) : projectColor || theme.palette.grey[400],
26052
26238
  width: 28,
26053
26239
  height: 28,
26054
26240
  mr: 1.5
26055
26241
  },
26056
- children: isUngrouped ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
26242
+ children: isUngrouped ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
26057
26243
  import_lucide_react10.Inbox,
26058
26244
  {
26059
26245
  size: 16,
26060
26246
  color: theme.palette.text.disabled,
26061
26247
  style: { opacity: 0.7 }
26062
26248
  }
26063
- ) : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Icon, { size: 16 })
26249
+ ) : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Icon, { size: 16 })
26064
26250
  }
26065
26251
  ),
26066
- isRenaming && !isUngrouped ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
26067
- import_material43.TextField,
26252
+ isRenaming && !isUngrouped ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
26253
+ import_material44.TextField,
26068
26254
  {
26069
26255
  value: renameDraft,
26070
26256
  onChange: (e) => setRenameDraft(e.target.value),
@@ -26110,8 +26296,8 @@ var init_project_header = __esm({
26110
26296
  }
26111
26297
  }
26112
26298
  }
26113
- ) : /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
26114
- import_material43.Typography,
26299
+ ) : /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
26300
+ import_material44.Typography,
26115
26301
  {
26116
26302
  variant: "subtitle2",
26117
26303
  sx: {
@@ -26123,8 +26309,8 @@ var init_project_header = __esm({
26123
26309
  },
26124
26310
  children: [
26125
26311
  projectName,
26126
- isDragOver && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
26127
- import_material43.Typography,
26312
+ isDragOver && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
26313
+ import_material44.Typography,
26128
26314
  {
26129
26315
  component: "span",
26130
26316
  variant: "caption",
@@ -26139,13 +26325,13 @@ var init_project_header = __esm({
26139
26325
  ]
26140
26326
  }
26141
26327
  ),
26142
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
26143
- import_material43.Chip,
26328
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
26329
+ import_material44.Chip,
26144
26330
  {
26145
26331
  label: conversationCount,
26146
26332
  size: "small",
26147
26333
  sx: {
26148
- bgcolor: isUngrouped ? (0, import_material43.alpha)(theme.palette.text.disabled, 0.1) : (0, import_material43.alpha)(projectColor || theme.palette.primary.main, 0.15),
26334
+ bgcolor: isUngrouped ? (0, import_material44.alpha)(theme.palette.text.disabled, 0.1) : (0, import_material44.alpha)(projectColor || theme.palette.primary.main, 0.15),
26149
26335
  color: isUngrouped ? theme.palette.text.disabled : projectColor || theme.palette.primary.main,
26150
26336
  minWidth: 28,
26151
26337
  height: 22,
@@ -26159,9 +26345,9 @@ var init_project_header = __esm({
26159
26345
  }
26160
26346
  }
26161
26347
  ),
26162
- isRenaming && !isUngrouped && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_material43.Box, { sx: { display: "flex", alignItems: "center", gap: 0.5, ml: 1 }, children: [
26163
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_material43.Tooltip, { title: "Cancel and remove", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
26164
- import_material43.IconButton,
26348
+ isRenaming && !isUngrouped && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_material44.Box, { sx: { display: "flex", alignItems: "center", gap: 0.5, ml: 1 }, children: [
26349
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material44.Tooltip, { title: "Cancel and remove", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
26350
+ import_material44.IconButton,
26165
26351
  {
26166
26352
  size: "small",
26167
26353
  onMouseDown: (e) => {
@@ -26169,12 +26355,12 @@ var init_project_header = __esm({
26169
26355
  renameActionRef.current = "delete";
26170
26356
  onRenameCancelDelete ? onRenameCancelDelete() : cancelRename();
26171
26357
  },
26172
- sx: { color: (0, import_material43.alpha)(theme.palette.error.main, 0.9) },
26173
- children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react10.X, { size: 16 })
26358
+ sx: { color: (0, import_material44.alpha)(theme.palette.error.main, 0.9) },
26359
+ children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react10.X, { size: 16 })
26174
26360
  }
26175
26361
  ) }),
26176
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_material43.Tooltip, { title: "Save", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
26177
- import_material43.IconButton,
26362
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material44.Tooltip, { title: "Save", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
26363
+ import_material44.IconButton,
26178
26364
  {
26179
26365
  size: "small",
26180
26366
  onMouseDown: (e) => {
@@ -26183,39 +26369,39 @@ var init_project_header = __esm({
26183
26369
  commitRename();
26184
26370
  },
26185
26371
  sx: { color: theme.palette.success.main },
26186
- children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react10.Check, { size: 16 })
26372
+ children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react10.Check, { size: 16 })
26187
26373
  }
26188
26374
  ) })
26189
26375
  ] }),
26190
- isHovered && !isDragOver && !isUngrouped && !isRenaming && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_material43.Tooltip, { title: `Add conversation to ${projectName.toLowerCase()}`, arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
26191
- import_material43.IconButton,
26376
+ isHovered && !isDragOver && !isUngrouped && !isRenaming && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material44.Tooltip, { title: `Add conversation to ${projectName.toLowerCase()}`, arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
26377
+ import_material44.IconButton,
26192
26378
  {
26193
26379
  onClick: handleAddConversation,
26194
26380
  size: "small",
26195
26381
  sx: {
26196
26382
  color: projectColor || theme.palette.primary.main,
26197
- bgcolor: (0, import_material43.alpha)(projectColor || theme.palette.primary.main, 0.1),
26383
+ bgcolor: (0, import_material44.alpha)(projectColor || theme.palette.primary.main, 0.1),
26198
26384
  width: 24,
26199
26385
  height: 24,
26200
26386
  mr: 0.5,
26201
26387
  "&:hover": {
26202
- bgcolor: (0, import_material43.alpha)(projectColor || theme.palette.primary.main, 0.2),
26388
+ bgcolor: (0, import_material44.alpha)(projectColor || theme.palette.primary.main, 0.2),
26203
26389
  transform: "scale(1.1)"
26204
26390
  },
26205
26391
  transition: "all 0.2s ease"
26206
26392
  },
26207
- children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react10.Plus, { size: 16 })
26393
+ children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react10.Plus, { size: 16 })
26208
26394
  }
26209
26395
  ) }),
26210
- !isUngrouped && !isRenaming && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
26211
- import_material43.IconButton,
26396
+ !isUngrouped && !isRenaming && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
26397
+ import_material44.IconButton,
26212
26398
  {
26213
26399
  size: "small",
26214
26400
  sx: {
26215
26401
  color: theme.palette.text.secondary,
26216
26402
  transition: "transform 0.2s ease"
26217
26403
  },
26218
- children: isCollapsed ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react10.ChevronDown, { size: 16 }) : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react10.ChevronUp, { size: 16 })
26404
+ children: isCollapsed ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react10.ChevronDown, { size: 16 }) : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react10.ChevronUp, { size: 16 })
26219
26405
  }
26220
26406
  )
26221
26407
  ]
@@ -26245,12 +26431,12 @@ var init_tooltips = __esm({
26245
26431
  });
26246
26432
 
26247
26433
  // src/chat/conversation-drawer.tsx
26248
- var import_react55, import_material44, import_lucide_react11, import_styles28, import_jsx_runtime44, BANDIT_AVATAR, coerceOptionalString, deriveInitials, ConversationDrawer, conversation_drawer_default;
26434
+ var import_react56, import_material45, import_lucide_react11, import_styles28, import_jsx_runtime45, BANDIT_AVATAR, coerceOptionalString, deriveInitials, ConversationDrawer, conversation_drawer_default;
26249
26435
  var init_conversation_drawer = __esm({
26250
26436
  "src/chat/conversation-drawer.tsx"() {
26251
26437
  "use strict";
26252
- import_react55 = require("react");
26253
- import_material44 = require("@mui/material");
26438
+ import_react56 = require("react");
26439
+ import_material45 = require("@mui/material");
26254
26440
  import_lucide_react11 = require("lucide-react");
26255
26441
  import_styles28 = require("@mui/material/styles");
26256
26442
  init_conversationStore();
@@ -26266,7 +26452,7 @@ var init_conversation_drawer = __esm({
26266
26452
  init_project_header();
26267
26453
  init_debugLogger();
26268
26454
  init_tooltips();
26269
- import_jsx_runtime44 = require("react/jsx-runtime");
26455
+ import_jsx_runtime45 = require("react/jsx-runtime");
26270
26456
  BANDIT_AVATAR = "https://cdn.burtson.ai/images/bandit-head.png";
26271
26457
  coerceOptionalString = (value) => {
26272
26458
  if (typeof value !== "string") return void 0;
@@ -26295,7 +26481,7 @@ var init_conversation_drawer = __esm({
26295
26481
  };
26296
26482
  ConversationDrawer = ({ open, onClose }) => {
26297
26483
  const theme = (0, import_styles28.useTheme)();
26298
- const isMobile = (0, import_material44.useMediaQuery)(theme.breakpoints.down("sm"));
26484
+ const isMobile = (0, import_material45.useMediaQuery)(theme.breakpoints.down("sm"));
26299
26485
  const { user: user2 } = useAuthenticationStore();
26300
26486
  const baseRadius = typeof theme.shape.borderRadius === "number" ? theme.shape.borderRadius : parseFloat(theme.shape.borderRadius) || 0;
26301
26487
  const drawerCornerRadius = baseRadius * 3;
@@ -26317,22 +26503,22 @@ var init_conversation_drawer = __esm({
26317
26503
  createProject,
26318
26504
  deleteProject
26319
26505
  } = useProjectStore();
26320
- const [projectManagementOpen, setProjectManagementOpen] = (0, import_react55.useState)(false);
26321
- const [memoryModalOpen, setMemoryModalOpen] = (0, import_react55.useState)(false);
26322
- const [collapsedProjects, setCollapsedProjects] = (0, import_react55.useState)(/* @__PURE__ */ new Set());
26323
- const didInitCollapseRef = (0, import_react55.useRef)(false);
26324
- const [searchQuery, setSearchQuery] = (0, import_react55.useState)("");
26325
- const [menuAnchorEl, setMenuAnchorEl] = (0, import_react55.useState)(null);
26326
- const [clearConfirmOpen, setClearConfirmOpen] = (0, import_react55.useState)(false);
26327
- const [moveModalOpen, setMoveModalOpen] = (0, import_react55.useState)(false);
26328
- const [conversationToMove, setConversationToMove] = (0, import_react55.useState)(null);
26329
- const [renameProjectId, setRenameProjectId] = (0, import_react55.useState)(null);
26330
- const getCustomClaim = (0, import_react55.useCallback)((key) => {
26506
+ const [projectManagementOpen, setProjectManagementOpen] = (0, import_react56.useState)(false);
26507
+ const [memoryModalOpen, setMemoryModalOpen] = (0, import_react56.useState)(false);
26508
+ const [collapsedProjects, setCollapsedProjects] = (0, import_react56.useState)(/* @__PURE__ */ new Set());
26509
+ const didInitCollapseRef = (0, import_react56.useRef)(false);
26510
+ const [searchQuery, setSearchQuery] = (0, import_react56.useState)("");
26511
+ const [menuAnchorEl, setMenuAnchorEl] = (0, import_react56.useState)(null);
26512
+ const [clearConfirmOpen, setClearConfirmOpen] = (0, import_react56.useState)(false);
26513
+ const [moveModalOpen, setMoveModalOpen] = (0, import_react56.useState)(false);
26514
+ const [conversationToMove, setConversationToMove] = (0, import_react56.useState)(null);
26515
+ const [renameProjectId, setRenameProjectId] = (0, import_react56.useState)(null);
26516
+ const getCustomClaim = (0, import_react56.useCallback)((key) => {
26331
26517
  if (!user2) return void 0;
26332
26518
  const record = user2;
26333
26519
  return coerceOptionalString(record[key]);
26334
26520
  }, [user2]);
26335
- const userDisplayName = (0, import_react55.useMemo)(() => {
26521
+ const userDisplayName = (0, import_react56.useMemo)(() => {
26336
26522
  if (!user2) return void 0;
26337
26523
  const candidateFields = [
26338
26524
  coerceOptionalString(user2.name),
@@ -26347,7 +26533,7 @@ var init_conversation_drawer = __esm({
26347
26533
  if (trimmedEmail) return trimmedEmail;
26348
26534
  return user2.sub;
26349
26535
  }, [user2, getCustomClaim]);
26350
- const userSecondaryText = (0, import_react55.useMemo)(() => {
26536
+ const userSecondaryText = (0, import_react56.useMemo)(() => {
26351
26537
  if (!user2) return void 0;
26352
26538
  const trimmedEmail = coerceOptionalString(user2.email);
26353
26539
  if (trimmedEmail && trimmedEmail !== userDisplayName) {
@@ -26359,13 +26545,13 @@ var init_conversation_drawer = __esm({
26359
26545
  }
26360
26546
  return void 0;
26361
26547
  }, [user2, userDisplayName]);
26362
- const [avatarImage, setAvatarImage] = (0, import_react55.useState)(BANDIT_AVATAR);
26363
- (0, import_react55.useEffect)(() => {
26548
+ const [avatarImage, setAvatarImage] = (0, import_react56.useState)(BANDIT_AVATAR);
26549
+ (0, import_react56.useEffect)(() => {
26364
26550
  const fresh = readPersistedToken();
26365
26551
  const store = useAuthenticationStore.getState();
26366
26552
  if (fresh && fresh !== store.token) store.setToken(fresh);
26367
26553
  }, []);
26368
- (0, import_react55.useEffect)(() => {
26554
+ (0, import_react56.useEffect)(() => {
26369
26555
  let active2 = true;
26370
26556
  let objectUrl = null;
26371
26557
  const resolveAvatar2 = async () => {
@@ -26406,13 +26592,13 @@ var init_conversation_drawer = __esm({
26406
26592
  };
26407
26593
  }, [getCustomClaim]);
26408
26594
  const avatarLabel = userDisplayName || user2?.email || "Bandit";
26409
- const avatarInitials = (0, import_react55.useMemo)(() => deriveInitials(avatarLabel), [avatarLabel]);
26410
- (0, import_react55.useEffect)(() => {
26595
+ const avatarInitials = (0, import_react56.useMemo)(() => deriveInitials(avatarLabel), [avatarLabel]);
26596
+ (0, import_react56.useEffect)(() => {
26411
26597
  if (!projectsHydrated) {
26412
26598
  hydrateProjects();
26413
26599
  }
26414
26600
  }, [projectsHydrated, hydrateProjects]);
26415
- (0, import_react55.useEffect)(() => {
26601
+ (0, import_react56.useEffect)(() => {
26416
26602
  if (projectsHydrated && !didInitCollapseRef.current) {
26417
26603
  didInitCollapseRef.current = true;
26418
26604
  if (projects && projects.length > 0) {
@@ -26425,7 +26611,7 @@ var init_conversation_drawer = __esm({
26425
26611
  const end = Math.min(text.length, idx + query.length + 60);
26426
26612
  return text.slice(start, end).replace(/\s+/g, " ").trim();
26427
26613
  };
26428
- const projectGroups = (0, import_react55.useMemo)(() => {
26614
+ const projectGroups = (0, import_react56.useMemo)(() => {
26429
26615
  const groups = projects.map((project) => ({
26430
26616
  id: project.id,
26431
26617
  name: project.name,
@@ -26448,7 +26634,7 @@ var init_conversation_drawer = __esm({
26448
26634
  }
26449
26635
  return groups.filter((group) => group.conversations.length > 0 || group.id !== null);
26450
26636
  }, [projects, conversations, collapsedProjects]);
26451
- const filteredProjectGroups = (0, import_react55.useMemo)(() => {
26637
+ const filteredProjectGroups = (0, import_react56.useMemo)(() => {
26452
26638
  if (!searchQuery.trim()) return projectGroups;
26453
26639
  const query = searchQuery.toLowerCase();
26454
26640
  return projectGroups.map((group) => {
@@ -26519,9 +26705,9 @@ var init_conversation_drawer = __esm({
26519
26705
  setMoveModalOpen(false);
26520
26706
  setConversationToMove(null);
26521
26707
  };
26522
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_jsx_runtime44.Fragment, { children: [
26523
- /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
26524
- import_material44.Drawer,
26708
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
26709
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
26710
+ import_material45.Drawer,
26525
26711
  {
26526
26712
  anchor: "left",
26527
26713
  open,
@@ -26534,7 +26720,7 @@ var init_conversation_drawer = __esm({
26534
26720
  width: isMobile ? `min(94vw, 360px)` : 340,
26535
26721
  maxWidth: 360,
26536
26722
  bgcolor: theme.palette.background.paper,
26537
- borderRight: `1px solid ${isMobile ? (0, import_material44.alpha)(theme.palette.divider, 0.4) : theme.palette.divider}`,
26723
+ borderRight: `1px solid ${isMobile ? (0, import_material45.alpha)(theme.palette.divider, 0.4) : theme.palette.divider}`,
26538
26724
  display: "flex",
26539
26725
  flexDirection: "column",
26540
26726
  height: isMobile ? `calc(100dvh - ${theme.spacing(4)})` : "100dvh",
@@ -26542,7 +26728,7 @@ var init_conversation_drawer = __esm({
26542
26728
  bottom: isMobile ? theme.spacing(2) : 0,
26543
26729
  left: 0,
26544
26730
  borderRadius: isMobile ? `0 ${drawerCornerRadius}px ${drawerCornerRadius}px 0` : 0,
26545
- boxShadow: isMobile ? `0 18px 36px ${(0, import_material44.alpha)(theme.palette.common.black, 0.28)}` : "none",
26731
+ boxShadow: isMobile ? `0 18px 36px ${(0, import_material45.alpha)(theme.palette.common.black, 0.28)}` : "none",
26546
26732
  overflow: "hidden"
26547
26733
  }
26548
26734
  },
@@ -26562,8 +26748,8 @@ var init_conversation_drawer = __esm({
26562
26748
  }
26563
26749
  },
26564
26750
  children: [
26565
- /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
26566
- import_material44.Box,
26751
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
26752
+ import_material45.Box,
26567
26753
  {
26568
26754
  sx: {
26569
26755
  p: 2,
@@ -26574,8 +26760,8 @@ var init_conversation_drawer = __esm({
26574
26760
  gap: 1
26575
26761
  },
26576
26762
  children: [
26577
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material44.Tooltip, { title: "Memories", arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
26578
- import_material44.IconButton,
26763
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_material45.Tooltip, { title: "Memories", arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
26764
+ import_material45.IconButton,
26579
26765
  {
26580
26766
  onClick: () => setMemoryModalOpen(true),
26581
26767
  size: "small",
@@ -26584,14 +26770,14 @@ var init_conversation_drawer = __esm({
26584
26770
  color: theme.palette.text.secondary,
26585
26771
  "&:hover": {
26586
26772
  color: theme.palette.primary.main,
26587
- bgcolor: (0, import_material44.alpha)(theme.palette.primary.main, 0.1)
26773
+ bgcolor: (0, import_material45.alpha)(theme.palette.primary.main, 0.1)
26588
26774
  }
26589
26775
  },
26590
- children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react11.Brain, {})
26776
+ children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react11.Brain, {})
26591
26777
  }
26592
26778
  ) }),
26593
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material44.Tooltip, { title: tooltip("manageProjects"), arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
26594
- import_material44.IconButton,
26779
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_material45.Tooltip, { title: tooltip("manageProjects"), arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
26780
+ import_material45.IconButton,
26595
26781
  {
26596
26782
  onClick: () => setProjectManagementOpen(true),
26597
26783
  size: "small",
@@ -26600,14 +26786,14 @@ var init_conversation_drawer = __esm({
26600
26786
  color: theme.palette.text.secondary,
26601
26787
  "&:hover": {
26602
26788
  color: theme.palette.primary.main,
26603
- bgcolor: (0, import_material44.alpha)(theme.palette.primary.main, 0.1)
26789
+ bgcolor: (0, import_material45.alpha)(theme.palette.primary.main, 0.1)
26604
26790
  }
26605
26791
  },
26606
- children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react11.Folder, {})
26792
+ children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react11.Folder, {})
26607
26793
  }
26608
26794
  ) }),
26609
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material44.Tooltip, { title: tooltip("conversationOptions"), arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
26610
- import_material44.IconButton,
26795
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_material45.Tooltip, { title: tooltip("conversationOptions"), arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
26796
+ import_material45.IconButton,
26611
26797
  {
26612
26798
  onClick: handleMenuOpen,
26613
26799
  size: "small",
@@ -26616,14 +26802,14 @@ var init_conversation_drawer = __esm({
26616
26802
  color: theme.palette.text.secondary,
26617
26803
  "&:hover": {
26618
26804
  color: theme.palette.text.primary,
26619
- bgcolor: (0, import_material44.alpha)(theme.palette.text.primary, 0.1)
26805
+ bgcolor: (0, import_material45.alpha)(theme.palette.text.primary, 0.1)
26620
26806
  }
26621
26807
  },
26622
- children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react11.MoreVertical, {})
26808
+ children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react11.MoreVertical, {})
26623
26809
  }
26624
26810
  ) }),
26625
- isMobile && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material44.Tooltip, { title: tooltip("closeConversationsPanel"), children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
26626
- import_material44.IconButton,
26811
+ isMobile && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_material45.Tooltip, { title: tooltip("closeConversationsPanel"), children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
26812
+ import_material45.IconButton,
26627
26813
  {
26628
26814
  onClick: (e) => {
26629
26815
  e.preventDefault();
@@ -26636,17 +26822,17 @@ var init_conversation_drawer = __esm({
26636
26822
  color: theme.palette.text.secondary,
26637
26823
  "&:hover": {
26638
26824
  color: theme.palette.error.main,
26639
- bgcolor: (0, import_material44.alpha)(theme.palette.error.main, 0.1)
26825
+ bgcolor: (0, import_material45.alpha)(theme.palette.error.main, 0.1)
26640
26826
  }
26641
26827
  },
26642
- children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react11.X, {})
26828
+ children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react11.X, {})
26643
26829
  }
26644
26830
  ) })
26645
26831
  ]
26646
26832
  }
26647
26833
  ),
26648
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material44.Box, { sx: { p: 2, pb: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
26649
- import_material44.TextField,
26834
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_material45.Box, { sx: { p: 2, pb: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
26835
+ import_material45.TextField,
26650
26836
  {
26651
26837
  fullWidth: true,
26652
26838
  size: "small",
@@ -26655,24 +26841,24 @@ var init_conversation_drawer = __esm({
26655
26841
  onChange: (e) => setSearchQuery(e.target.value),
26656
26842
  variant: "outlined",
26657
26843
  InputProps: {
26658
- startAdornment: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material44.InputAdornment, { position: "start", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react11.Search, { size: 16, color: theme.palette.text.secondary }) }),
26659
- endAdornment: searchQuery && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material44.InputAdornment, { position: "end", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material44.Tooltip, { title: tooltip("clearSearch"), children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
26660
- import_material44.IconButton,
26844
+ startAdornment: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_material45.InputAdornment, { position: "start", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react11.Search, { size: 16, color: theme.palette.text.secondary }) }),
26845
+ endAdornment: searchQuery && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_material45.InputAdornment, { position: "end", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_material45.Tooltip, { title: tooltip("clearSearch"), children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
26846
+ import_material45.IconButton,
26661
26847
  {
26662
26848
  onClick: handleSearchClear,
26663
26849
  size: "small",
26664
26850
  edge: "end",
26665
26851
  "aria-label": tooltip("clearSearch"),
26666
26852
  sx: { color: theme.palette.text.secondary },
26667
- children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react11.X, { size: 16 })
26853
+ children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react11.X, { size: 16 })
26668
26854
  }
26669
26855
  ) }) })
26670
26856
  },
26671
26857
  sx: {
26672
26858
  "& .MuiOutlinedInput-root": {
26673
- bgcolor: (0, import_material44.alpha)(theme.palette.background.default, 0.5),
26859
+ bgcolor: (0, import_material45.alpha)(theme.palette.background.default, 0.5),
26674
26860
  "&:hover": {
26675
- bgcolor: (0, import_material44.alpha)(theme.palette.background.default, 0.8)
26861
+ bgcolor: (0, import_material45.alpha)(theme.palette.background.default, 0.8)
26676
26862
  },
26677
26863
  "&.Mui-focused": {
26678
26864
  bgcolor: theme.palette.background.default
@@ -26681,9 +26867,9 @@ var init_conversation_drawer = __esm({
26681
26867
  }
26682
26868
  }
26683
26869
  ) }),
26684
- /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_material44.Box, { sx: { flex: 1, overflow: "auto", display: "flex", flexDirection: "column" }, children: [
26685
- /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
26686
- import_material44.Box,
26870
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_material45.Box, { sx: { flex: 1, overflow: "auto", display: "flex", flexDirection: "column" }, children: [
26871
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
26872
+ import_material45.Box,
26687
26873
  {
26688
26874
  onClick: async () => {
26689
26875
  const names = new Set(projects.map((p) => p.name));
@@ -26714,49 +26900,49 @@ var init_conversation_drawer = __esm({
26714
26900
  alignItems: "center",
26715
26901
  gap: 1.5,
26716
26902
  cursor: "pointer",
26717
- "&:hover": { bgcolor: (0, import_material44.alpha)(theme.palette.text.primary, 0.04) }
26903
+ "&:hover": { bgcolor: (0, import_material45.alpha)(theme.palette.text.primary, 0.04) }
26718
26904
  },
26719
26905
  children: [
26720
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
26721
- import_material44.Box,
26906
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
26907
+ import_material45.Box,
26722
26908
  {
26723
26909
  sx: {
26724
26910
  width: 28,
26725
26911
  height: 28,
26726
26912
  borderRadius: "50%",
26727
- bgcolor: (0, import_material44.alpha)(theme.palette.success.main, 0.15),
26913
+ bgcolor: (0, import_material45.alpha)(theme.palette.success.main, 0.15),
26728
26914
  display: "flex",
26729
26915
  alignItems: "center",
26730
26916
  justifyContent: "center",
26731
26917
  flexShrink: 0
26732
26918
  },
26733
- children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react11.Folder, { size: 16, color: theme.palette.success.main })
26919
+ children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react11.Folder, { size: 16, color: theme.palette.success.main })
26734
26920
  }
26735
26921
  ),
26736
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
26737
- import_material44.Typography,
26922
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
26923
+ import_material45.Typography,
26738
26924
  {
26739
26925
  variant: "subtitle2",
26740
26926
  sx: { flex: 1, fontWeight: 600, fontSize: "0.875rem" },
26741
26927
  children: "New Project"
26742
26928
  }
26743
26929
  ),
26744
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material44.Tooltip, { title: tooltip("addProject"), arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
26745
- import_material44.IconButton,
26930
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_material45.Tooltip, { title: tooltip("addProject"), arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
26931
+ import_material45.IconButton,
26746
26932
  {
26747
26933
  size: "small",
26748
26934
  "aria-label": tooltip("addProject"),
26749
26935
  sx: { color: theme.palette.success.main },
26750
- children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react11.Plus, { size: 16 })
26936
+ children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react11.Plus, { size: 16 })
26751
26937
  }
26752
26938
  ) })
26753
26939
  ]
26754
26940
  }
26755
26941
  ),
26756
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material44.Divider, { sx: { opacity: 0.3 } }),
26757
- filteredProjectGroups.map((group, index) => /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_material44.Box, { children: [
26758
- group.id === null && filteredProjectGroups.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
26759
- import_material44.Box,
26942
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_material45.Divider, { sx: { opacity: 0.3 } }),
26943
+ filteredProjectGroups.map((group, index) => /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_material45.Box, { children: [
26944
+ group.id === null && filteredProjectGroups.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
26945
+ import_material45.Box,
26760
26946
  {
26761
26947
  sx: {
26762
26948
  py: 2,
@@ -26766,9 +26952,9 @@ var init_conversation_drawer = __esm({
26766
26952
  gap: 2
26767
26953
  },
26768
26954
  children: [
26769
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material44.Divider, { sx: { flex: 1, opacity: 0.6 } }),
26770
- /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_material44.Box, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
26771
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
26955
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_material45.Divider, { sx: { flex: 1, opacity: 0.6 } }),
26956
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_material45.Box, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
26957
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
26772
26958
  import_lucide_react11.Inbox,
26773
26959
  {
26774
26960
  size: 14,
@@ -26776,8 +26962,8 @@ var init_conversation_drawer = __esm({
26776
26962
  style: { opacity: 0.7 }
26777
26963
  }
26778
26964
  ),
26779
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
26780
- import_material44.Typography,
26965
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
26966
+ import_material45.Typography,
26781
26967
  {
26782
26968
  variant: "caption",
26783
26969
  sx: {
@@ -26791,12 +26977,12 @@ var init_conversation_drawer = __esm({
26791
26977
  }
26792
26978
  )
26793
26979
  ] }),
26794
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material44.Divider, { sx: { flex: 1, opacity: 0.6 } })
26980
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_material45.Divider, { sx: { flex: 1, opacity: 0.6 } })
26795
26981
  ]
26796
26982
  }
26797
26983
  ),
26798
- group.id !== null ? /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_jsx_runtime44.Fragment, { children: [
26799
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
26984
+ group.id !== null ? /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
26985
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
26800
26986
  project_header_default,
26801
26987
  {
26802
26988
  projectId: group.id,
@@ -26825,8 +27011,8 @@ var init_conversation_drawer = __esm({
26825
27011
  }
26826
27012
  }
26827
27013
  ),
26828
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material44.Collapse, { in: !group.collapsed, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_material44.Box, { sx: { pb: 1 }, children: [
26829
- group.conversations.map((conversation) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
27014
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_material45.Collapse, { in: !group.collapsed, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_material45.Box, { sx: { pb: 1 }, children: [
27015
+ group.conversations.map((conversation) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
26830
27016
  simple_conversation_item_default,
26831
27017
  {
26832
27018
  conversation,
@@ -26846,8 +27032,8 @@ var init_conversation_drawer = __esm({
26846
27032
  },
26847
27033
  conversation.id
26848
27034
  )),
26849
- group.conversations.length === 0 && !group.collapsed && group.id !== null && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
26850
- import_material44.Box,
27035
+ group.conversations.length === 0 && !group.collapsed && group.id !== null && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
27036
+ import_material45.Box,
26851
27037
  {
26852
27038
  sx: {
26853
27039
  p: 3,
@@ -26855,17 +27041,17 @@ var init_conversation_drawer = __esm({
26855
27041
  color: theme.palette.text.secondary
26856
27042
  },
26857
27043
  children: [
26858
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material44.Typography, { variant: "body2", children: "No conversations in this project yet" }),
26859
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material44.Typography, { variant: "caption", sx: { mt: 1, display: "block" }, children: "Drag conversations here or use the + button above" })
27044
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_material45.Typography, { variant: "body2", children: "No conversations in this project yet" }),
27045
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_material45.Typography, { variant: "caption", sx: { mt: 1, display: "block" }, children: "Drag conversations here or use the + button above" })
26860
27046
  ]
26861
27047
  }
26862
27048
  )
26863
27049
  ] }) }),
26864
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material44.Divider, { sx: { opacity: 0.3 } })
27050
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_material45.Divider, { sx: { opacity: 0.3 } })
26865
27051
  ] }) : (
26866
27052
  // Special handling for ungrouped - no header, just conversations in scrollable area
26867
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
26868
- import_material44.Box,
27053
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
27054
+ import_material45.Box,
26869
27055
  {
26870
27056
  sx: {
26871
27057
  minHeight: 0,
@@ -26873,12 +27059,12 @@ var init_conversation_drawer = __esm({
26873
27059
  overflow: "auto",
26874
27060
  px: 1,
26875
27061
  py: 1,
26876
- bgcolor: (0, import_material44.alpha)(theme.palette.background.default, 0.3),
27062
+ bgcolor: (0, import_material45.alpha)(theme.palette.background.default, 0.3),
26877
27063
  borderRadius: "8px 8px 0 0",
26878
27064
  mx: 1,
26879
27065
  mb: 1
26880
27066
  },
26881
- children: group.conversations.map((conversation) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
27067
+ children: group.conversations.map((conversation) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
26882
27068
  simple_conversation_item_default,
26883
27069
  {
26884
27070
  conversation,
@@ -26902,8 +27088,8 @@ var init_conversation_drawer = __esm({
26902
27088
  )
26903
27089
  )
26904
27090
  ] }, group.id || "ungrouped")),
26905
- filteredProjectGroups.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
26906
- import_material44.Box,
27091
+ filteredProjectGroups.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
27092
+ import_material45.Box,
26907
27093
  {
26908
27094
  sx: {
26909
27095
  flex: 1,
@@ -26916,14 +27102,14 @@ var init_conversation_drawer = __esm({
26916
27102
  color: theme.palette.text.secondary
26917
27103
  },
26918
27104
  children: [
26919
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material44.Typography, { variant: "h6", sx: { mb: 1 }, children: searchQuery ? "No conversations found" : "No conversations yet" }),
26920
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material44.Typography, { variant: "body2", sx: { mb: 3, maxWidth: 280 }, children: searchQuery ? `No conversations match "${searchQuery}"` : "Start your first conversation to begin organizing your chats into projects" })
27105
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_material45.Typography, { variant: "h6", sx: { mb: 1 }, children: searchQuery ? "No conversations found" : "No conversations yet" }),
27106
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_material45.Typography, { variant: "body2", sx: { mb: 3, maxWidth: 280 }, children: searchQuery ? `No conversations match "${searchQuery}"` : "Start your first conversation to begin organizing your chats into projects" })
26921
27107
  ]
26922
27108
  }
26923
27109
  )
26924
27110
  ] }),
26925
- /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
26926
- import_material44.Box,
27111
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
27112
+ import_material45.Box,
26927
27113
  {
26928
27114
  onClick: user2 ? () => {
26929
27115
  window.location.href = "/profile";
@@ -26933,19 +27119,19 @@ var init_conversation_drawer = __esm({
26933
27119
  mt: "auto",
26934
27120
  px: 2,
26935
27121
  py: 1.75,
26936
- borderTop: `1px solid ${(0, import_material44.alpha)(theme.palette.divider, 0.6)}`,
27122
+ borderTop: `1px solid ${(0, import_material45.alpha)(theme.palette.divider, 0.6)}`,
26937
27123
  display: "flex",
26938
27124
  alignItems: "center",
26939
27125
  gap: 1.5,
26940
27126
  justifyContent: "center",
26941
- bgcolor: (0, import_material44.alpha)(theme.palette.background.default, isMobile ? 0.9 : 0.6),
27127
+ bgcolor: (0, import_material45.alpha)(theme.palette.background.default, isMobile ? 0.9 : 0.6),
26942
27128
  cursor: user2 ? "pointer" : "default",
26943
27129
  transition: "background-color 0.15s ease",
26944
- "&:hover": user2 ? { bgcolor: (0, import_material44.alpha)(theme.palette.primary.main, 0.08) } : void 0
27130
+ "&:hover": user2 ? { bgcolor: (0, import_material45.alpha)(theme.palette.primary.main, 0.08) } : void 0
26945
27131
  },
26946
27132
  children: [
26947
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
26948
- import_material44.Avatar,
27133
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
27134
+ import_material45.Avatar,
26949
27135
  {
26950
27136
  src: avatarImage,
26951
27137
  alt: avatarLabel,
@@ -26953,14 +27139,14 @@ var init_conversation_drawer = __esm({
26953
27139
  width: 36,
26954
27140
  height: 36,
26955
27141
  fontSize: "0.95rem",
26956
- bgcolor: (0, import_material44.alpha)(theme.palette.primary.main, 0.12),
27142
+ bgcolor: (0, import_material45.alpha)(theme.palette.primary.main, 0.12),
26957
27143
  color: theme.palette.primary.main
26958
27144
  },
26959
27145
  children: avatarInitials
26960
27146
  }
26961
27147
  ),
26962
- /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
26963
- import_material44.Box,
27148
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
27149
+ import_material45.Box,
26964
27150
  {
26965
27151
  sx: {
26966
27152
  minWidth: 0,
@@ -26972,8 +27158,8 @@ var init_conversation_drawer = __esm({
26972
27158
  gap: 0.25
26973
27159
  },
26974
27160
  children: [
26975
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
26976
- import_material44.Typography,
27161
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
27162
+ import_material45.Typography,
26977
27163
  {
26978
27164
  variant: "subtitle2",
26979
27165
  noWrap: true,
@@ -26981,8 +27167,8 @@ var init_conversation_drawer = __esm({
26981
27167
  children: user2 ? userDisplayName : "Not signed in"
26982
27168
  }
26983
27169
  ),
26984
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
26985
- import_material44.Typography,
27170
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
27171
+ import_material45.Typography,
26986
27172
  {
26987
27173
  variant: "caption",
26988
27174
  noWrap: true,
@@ -26993,9 +27179,9 @@ var init_conversation_drawer = __esm({
26993
27179
  ]
26994
27180
  }
26995
27181
  ),
26996
- user2 && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_jsx_runtime44.Fragment, { children: [
26997
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
26998
- import_material44.Box,
27182
+ user2 && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
27183
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
27184
+ import_material45.Box,
26999
27185
  {
27000
27186
  sx: {
27001
27187
  flexShrink: 0,
@@ -27005,14 +27191,14 @@ var init_conversation_drawer = __esm({
27005
27191
  width: 30,
27006
27192
  height: 30,
27007
27193
  borderRadius: "50%",
27008
- border: `1px solid ${(0, import_material44.alpha)(theme.palette.divider, 0.8)}`,
27194
+ border: `1px solid ${(0, import_material45.alpha)(theme.palette.divider, 0.8)}`,
27009
27195
  color: theme.palette.text.secondary
27010
27196
  },
27011
- children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react11.Settings, { size: 16 })
27197
+ children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react11.Settings, { size: 16 })
27012
27198
  }
27013
27199
  ),
27014
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
27015
- import_material44.IconButton,
27200
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
27201
+ import_material45.IconButton,
27016
27202
  {
27017
27203
  "aria-label": "Sign out",
27018
27204
  title: "Sign out",
@@ -27025,11 +27211,11 @@ var init_conversation_drawer = __esm({
27025
27211
  flexShrink: 0,
27026
27212
  width: 30,
27027
27213
  height: 30,
27028
- border: `1px solid ${(0, import_material44.alpha)(theme.palette.error.main, 0.4)}`,
27214
+ border: `1px solid ${(0, import_material45.alpha)(theme.palette.error.main, 0.4)}`,
27029
27215
  color: theme.palette.error.main,
27030
- "&:hover": { bgcolor: (0, import_material44.alpha)(theme.palette.error.main, 0.1) }
27216
+ "&:hover": { bgcolor: (0, import_material45.alpha)(theme.palette.error.main, 0.1) }
27031
27217
  },
27032
- children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react11.LogOut, { size: 16 })
27218
+ children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react11.LogOut, { size: 16 })
27033
27219
  }
27034
27220
  )
27035
27221
  ] })
@@ -27039,15 +27225,15 @@ var init_conversation_drawer = __esm({
27039
27225
  ]
27040
27226
  }
27041
27227
  ),
27042
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
27228
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
27043
27229
  project_management_modal_default,
27044
27230
  {
27045
27231
  open: projectManagementOpen,
27046
27232
  onClose: () => setProjectManagementOpen(false)
27047
27233
  }
27048
27234
  ),
27049
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(memory_modal_default, { open: memoryModalOpen, onClose: () => setMemoryModalOpen(false) }),
27050
- conversationToMove && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
27235
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(memory_modal_default, { open: memoryModalOpen, onClose: () => setMemoryModalOpen(false) }),
27236
+ conversationToMove && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
27051
27237
  move_conversation_modal_default,
27052
27238
  {
27053
27239
  open: moveModalOpen,
@@ -27056,8 +27242,8 @@ var init_conversation_drawer = __esm({
27056
27242
  currentProjectId: conversationToMove.projectId
27057
27243
  }
27058
27244
  ),
27059
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
27060
- import_material44.Menu,
27245
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
27246
+ import_material45.Menu,
27061
27247
  {
27062
27248
  anchorEl: menuAnchorEl,
27063
27249
  open: Boolean(menuAnchorEl),
@@ -27070,8 +27256,8 @@ var init_conversation_drawer = __esm({
27070
27256
  vertical: "bottom",
27071
27257
  horizontal: "right"
27072
27258
  },
27073
- children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
27074
- import_material44.MenuItem,
27259
+ children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
27260
+ import_material45.MenuItem,
27075
27261
  {
27076
27262
  onClick: () => {
27077
27263
  setClearConfirmOpen(true);
@@ -27079,27 +27265,27 @@ var init_conversation_drawer = __esm({
27079
27265
  },
27080
27266
  sx: { color: theme.palette.error.main },
27081
27267
  children: [
27082
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material44.ListItemIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react11.Trash2, { size: 16, color: theme.palette.error.main }) }),
27083
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material44.ListItemText, { children: "Clear All Conversations" })
27268
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_material45.ListItemIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react11.Trash2, { size: 16, color: theme.palette.error.main }) }),
27269
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_material45.ListItemText, { children: "Clear All Conversations" })
27084
27270
  ]
27085
27271
  }
27086
27272
  )
27087
27273
  }
27088
27274
  ),
27089
- /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
27090
- import_material44.Dialog,
27275
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
27276
+ import_material45.Dialog,
27091
27277
  {
27092
27278
  open: clearConfirmOpen,
27093
27279
  onClose: () => setClearConfirmOpen(false),
27094
27280
  maxWidth: "sm",
27095
27281
  fullWidth: true,
27096
27282
  children: [
27097
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material44.DialogTitle, { children: "Clear All Conversations?" }),
27098
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material44.DialogContent, { children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material44.Typography, { children: "This will permanently delete all conversations and cannot be undone. Are you sure you want to continue?" }) }),
27099
- /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_material44.DialogActions, { children: [
27100
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material44.Button, { onClick: () => setClearConfirmOpen(false), children: "Cancel" }),
27101
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
27102
- import_material44.Button,
27283
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_material45.DialogTitle, { children: "Clear All Conversations?" }),
27284
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_material45.DialogContent, { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_material45.Typography, { children: "This will permanently delete all conversations and cannot be undone. Are you sure you want to continue?" }) }),
27285
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_material45.DialogActions, { children: [
27286
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_material45.Button, { onClick: () => setClearConfirmOpen(false), children: "Cancel" }),
27287
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
27288
+ import_material45.Button,
27103
27289
  {
27104
27290
  onClick: handleClearAllConfirm,
27105
27291
  color: "error",
@@ -27118,12 +27304,12 @@ var init_conversation_drawer = __esm({
27118
27304
  });
27119
27305
 
27120
27306
  // src/chat/enhanced-mobile-conversations-modal.tsx
27121
- var import_react56, import_material45, import_lucide_react12, import_styles29, import_jsx_runtime45, BANDIT_AVATAR2, coerceOptionalString2, deriveInitials2, EnhancedMobileConversationsModal, enhanced_mobile_conversations_modal_default;
27307
+ var import_react57, import_material46, import_lucide_react12, import_styles29, import_jsx_runtime46, BANDIT_AVATAR2, coerceOptionalString2, deriveInitials2, EnhancedMobileConversationsModal, enhanced_mobile_conversations_modal_default;
27122
27308
  var init_enhanced_mobile_conversations_modal = __esm({
27123
27309
  "src/chat/enhanced-mobile-conversations-modal.tsx"() {
27124
27310
  "use strict";
27125
- import_react56 = require("react");
27126
- import_material45 = require("@mui/material");
27311
+ import_react57 = require("react");
27312
+ import_material46 = require("@mui/material");
27127
27313
  import_lucide_react12 = require("lucide-react");
27128
27314
  import_styles29 = require("@mui/material/styles");
27129
27315
  init_conversationStore();
@@ -27138,7 +27324,7 @@ var init_enhanced_mobile_conversations_modal = __esm({
27138
27324
  init_simple_conversation_item();
27139
27325
  init_project_header();
27140
27326
  init_debugLogger();
27141
- import_jsx_runtime45 = require("react/jsx-runtime");
27327
+ import_jsx_runtime46 = require("react/jsx-runtime");
27142
27328
  BANDIT_AVATAR2 = "https://cdn.burtson.ai/images/bandit-head.png";
27143
27329
  coerceOptionalString2 = (value) => {
27144
27330
  if (typeof value !== "string") return void 0;
@@ -27189,25 +27375,25 @@ var init_enhanced_mobile_conversations_modal = __esm({
27189
27375
  createProject,
27190
27376
  deleteProject
27191
27377
  } = useProjectStore();
27192
- const [projectManagementOpen, setProjectManagementOpen] = (0, import_react56.useState)(false);
27193
- const [memoryModalOpen, setMemoryModalOpen] = (0, import_react56.useState)(false);
27194
- const [collapsedProjects, setCollapsedProjects] = (0, import_react56.useState)(/* @__PURE__ */ new Set());
27195
- const didInitCollapseRef = (0, import_react56.useRef)(false);
27196
- const [searchQuery, setSearchQuery] = (0, import_react56.useState)("");
27197
- const [menuAnchorEl, setMenuAnchorEl] = (0, import_react56.useState)(null);
27198
- const [clearConfirmOpen, setClearConfirmOpen] = (0, import_react56.useState)(false);
27199
- const [moveModalOpen, setMoveModalOpen] = (0, import_react56.useState)(false);
27200
- const [conversationToMove, setConversationToMove] = (0, import_react56.useState)(null);
27201
- const [renameProjectId, setRenameProjectId] = (0, import_react56.useState)(null);
27202
- const [deletedConversationIds, setDeletedConversationIds] = (0, import_react56.useState)(/* @__PURE__ */ new Set());
27203
- const [touchDragState, setTouchDragState] = (0, import_react56.useState)({ conversationId: null, originProjectId: null, hoverProjectId: null });
27204
- const [avatarImage, setAvatarImage] = (0, import_react56.useState)(BANDIT_AVATAR2);
27205
- const getCustomClaim = (0, import_react56.useCallback)((key) => {
27378
+ const [projectManagementOpen, setProjectManagementOpen] = (0, import_react57.useState)(false);
27379
+ const [memoryModalOpen, setMemoryModalOpen] = (0, import_react57.useState)(false);
27380
+ const [collapsedProjects, setCollapsedProjects] = (0, import_react57.useState)(/* @__PURE__ */ new Set());
27381
+ const didInitCollapseRef = (0, import_react57.useRef)(false);
27382
+ const [searchQuery, setSearchQuery] = (0, import_react57.useState)("");
27383
+ const [menuAnchorEl, setMenuAnchorEl] = (0, import_react57.useState)(null);
27384
+ const [clearConfirmOpen, setClearConfirmOpen] = (0, import_react57.useState)(false);
27385
+ const [moveModalOpen, setMoveModalOpen] = (0, import_react57.useState)(false);
27386
+ const [conversationToMove, setConversationToMove] = (0, import_react57.useState)(null);
27387
+ const [renameProjectId, setRenameProjectId] = (0, import_react57.useState)(null);
27388
+ const [deletedConversationIds, setDeletedConversationIds] = (0, import_react57.useState)(/* @__PURE__ */ new Set());
27389
+ const [touchDragState, setTouchDragState] = (0, import_react57.useState)({ conversationId: null, originProjectId: null, hoverProjectId: null });
27390
+ const [avatarImage, setAvatarImage] = (0, import_react57.useState)(BANDIT_AVATAR2);
27391
+ const getCustomClaim = (0, import_react57.useCallback)((key) => {
27206
27392
  if (!user2) return void 0;
27207
27393
  const record = user2;
27208
27394
  return coerceOptionalString2(record[key]);
27209
27395
  }, [user2]);
27210
- const userDisplayName = (0, import_react56.useMemo)(() => {
27396
+ const userDisplayName = (0, import_react57.useMemo)(() => {
27211
27397
  if (!user2) return void 0;
27212
27398
  const candidateFields = [
27213
27399
  coerceOptionalString2(user2.name),
@@ -27222,7 +27408,7 @@ var init_enhanced_mobile_conversations_modal = __esm({
27222
27408
  if (trimmedEmail) return trimmedEmail;
27223
27409
  return user2.sub;
27224
27410
  }, [user2, getCustomClaim]);
27225
- const userSecondaryText = (0, import_react56.useMemo)(() => {
27411
+ const userSecondaryText = (0, import_react57.useMemo)(() => {
27226
27412
  if (!user2) return void 0;
27227
27413
  const trimmedEmail = coerceOptionalString2(user2.email);
27228
27414
  if (trimmedEmail && trimmedEmail !== userDisplayName) {
@@ -27234,7 +27420,7 @@ var init_enhanced_mobile_conversations_modal = __esm({
27234
27420
  }
27235
27421
  return void 0;
27236
27422
  }, [user2, userDisplayName]);
27237
- (0, import_react56.useEffect)(() => {
27423
+ (0, import_react57.useEffect)(() => {
27238
27424
  if (!open) return;
27239
27425
  const fresh = readPersistedToken();
27240
27426
  const authStore = useAuthenticationStore.getState();
@@ -27279,18 +27465,18 @@ var init_enhanced_mobile_conversations_modal = __esm({
27279
27465
  };
27280
27466
  }, [open, getCustomClaim]);
27281
27467
  const avatarLabel = userDisplayName || user2?.email || "Bandit";
27282
- const avatarInitials = (0, import_react56.useMemo)(() => deriveInitials2(avatarLabel), [avatarLabel]);
27468
+ const avatarInitials = (0, import_react57.useMemo)(() => deriveInitials2(avatarLabel), [avatarLabel]);
27283
27469
  const buildSnippet = (text, query, idx) => {
27284
27470
  const start = Math.max(0, idx - 40);
27285
27471
  const end = Math.min(text.length, idx + query.length + 60);
27286
27472
  return text.slice(start, end).replace(/\s+/g, " ").trim();
27287
27473
  };
27288
- (0, import_react56.useEffect)(() => {
27474
+ (0, import_react57.useEffect)(() => {
27289
27475
  if (open && !projectsHydrated) {
27290
27476
  hydrateProjects();
27291
27477
  }
27292
27478
  }, [open, projectsHydrated, hydrateProjects]);
27293
- (0, import_react56.useEffect)(() => {
27479
+ (0, import_react57.useEffect)(() => {
27294
27480
  if (projectsHydrated && !didInitCollapseRef.current) {
27295
27481
  didInitCollapseRef.current = true;
27296
27482
  if (projects && projects.length > 0) {
@@ -27298,7 +27484,7 @@ var init_enhanced_mobile_conversations_modal = __esm({
27298
27484
  }
27299
27485
  }
27300
27486
  }, [projectsHydrated, projects]);
27301
- const projectGroups = (0, import_react56.useMemo)(() => {
27487
+ const projectGroups = (0, import_react57.useMemo)(() => {
27302
27488
  const visibleConversations = conversations.filter(
27303
27489
  (conversation) => !deletedConversationIds.has(conversation.id)
27304
27490
  );
@@ -27324,11 +27510,11 @@ var init_enhanced_mobile_conversations_modal = __esm({
27324
27510
  }
27325
27511
  return groups.filter((group) => group.conversations.length > 0 || group.id !== null);
27326
27512
  }, [projects, conversations, collapsedProjects, deletedConversationIds]);
27327
- const visibleConversationCount = (0, import_react56.useMemo)(
27513
+ const visibleConversationCount = (0, import_react57.useMemo)(
27328
27514
  () => projectGroups.reduce((total, group) => total + group.conversations.length, 0),
27329
27515
  [projectGroups]
27330
27516
  );
27331
- const filteredProjectGroups = (0, import_react56.useMemo)(() => {
27517
+ const filteredProjectGroups = (0, import_react57.useMemo)(() => {
27332
27518
  if (!searchQuery.trim()) return projectGroups;
27333
27519
  const query = searchQuery.toLowerCase();
27334
27520
  return projectGroups.map((group) => {
@@ -27353,14 +27539,14 @@ var init_enhanced_mobile_conversations_modal = __esm({
27353
27539
  }).filter((group) => group.conversations.length > 0);
27354
27540
  }, [projectGroups, searchQuery]);
27355
27541
  const touchDragActive = Boolean(touchDragState.conversationId);
27356
- const getProjectIdFromPoint = (0, import_react56.useCallback)((clientX, clientY) => {
27542
+ const getProjectIdFromPoint = (0, import_react57.useCallback)((clientX, clientY) => {
27357
27543
  if (typeof document === "undefined") return null;
27358
27544
  const element = document.elementFromPoint(clientX, clientY);
27359
27545
  if (!element) return null;
27360
27546
  const projectNode = element.closest("[data-project-id]");
27361
27547
  return projectNode?.getAttribute("data-project-id") ?? null;
27362
27548
  }, []);
27363
- const handleTouchDragStart = (0, import_react56.useCallback)((conversation, touch) => {
27549
+ const handleTouchDragStart = (0, import_react57.useCallback)((conversation, touch) => {
27364
27550
  const initialHover = getProjectIdFromPoint(touch.clientX, touch.clientY);
27365
27551
  setTouchDragState({
27366
27552
  conversationId: conversation.id,
@@ -27368,7 +27554,7 @@ var init_enhanced_mobile_conversations_modal = __esm({
27368
27554
  hoverProjectId: initialHover ?? (conversation.projectId ?? null)
27369
27555
  });
27370
27556
  }, [getProjectIdFromPoint]);
27371
- const handleTouchDragMove = (0, import_react56.useCallback)((touch) => {
27557
+ const handleTouchDragMove = (0, import_react57.useCallback)((touch) => {
27372
27558
  setTouchDragState((prev) => {
27373
27559
  if (!prev.conversationId) return prev;
27374
27560
  const hoverId = getProjectIdFromPoint(touch.clientX, touch.clientY);
@@ -27376,7 +27562,7 @@ var init_enhanced_mobile_conversations_modal = __esm({
27376
27562
  return { ...prev, hoverProjectId: hoverId };
27377
27563
  });
27378
27564
  }, [getProjectIdFromPoint]);
27379
- const handleTouchDragEnd = (0, import_react56.useCallback)((touch) => {
27565
+ const handleTouchDragEnd = (0, import_react57.useCallback)((touch) => {
27380
27566
  setTouchDragState((prev) => {
27381
27567
  if (!prev.conversationId) {
27382
27568
  return { conversationId: null, originProjectId: null, hoverProjectId: null };
@@ -27404,11 +27590,11 @@ var init_enhanced_mobile_conversations_modal = __esm({
27404
27590
  return { conversationId: null, originProjectId: null, hoverProjectId: null };
27405
27591
  });
27406
27592
  }, [getProjectIdFromPoint, moveConversationToProject]);
27407
- const activeDragConversation = (0, import_react56.useMemo)(() => {
27593
+ const activeDragConversation = (0, import_react57.useMemo)(() => {
27408
27594
  if (!touchDragState.conversationId) return null;
27409
27595
  return conversations.find((conv) => conv.id === touchDragState.conversationId) || null;
27410
27596
  }, [touchDragState.conversationId, conversations]);
27411
- const activeHoverLabel = (0, import_react56.useMemo)(() => {
27597
+ const activeHoverLabel = (0, import_react57.useMemo)(() => {
27412
27598
  if (!touchDragState.hoverProjectId) return "";
27413
27599
  if (touchDragState.hoverProjectId === "__ungrouped") return "Ungrouped";
27414
27600
  const project = projects.find((p) => p.id === touchDragState.hoverProjectId);
@@ -27457,7 +27643,7 @@ var init_enhanced_mobile_conversations_modal = __esm({
27457
27643
  setMoveModalOpen(false);
27458
27644
  setConversationToMove(null);
27459
27645
  };
27460
- (0, import_react56.useEffect)(() => {
27646
+ (0, import_react57.useEffect)(() => {
27461
27647
  setDeletedConversationIds((prev) => {
27462
27648
  let changed = false;
27463
27649
  const active2 = new Set(conversations.map((conv) => conv.id));
@@ -27472,9 +27658,9 @@ var init_enhanced_mobile_conversations_modal = __esm({
27472
27658
  return changed ? next : prev;
27473
27659
  });
27474
27660
  }, [conversations]);
27475
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
27476
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
27477
- import_material45.Modal,
27661
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
27662
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
27663
+ import_material46.Modal,
27478
27664
  {
27479
27665
  open,
27480
27666
  onClose,
@@ -27482,8 +27668,8 @@ var init_enhanced_mobile_conversations_modal = __esm({
27482
27668
  display: "flex",
27483
27669
  alignItems: "flex-end"
27484
27670
  },
27485
- children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_material45.Slide, { direction: "up", in: open, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
27486
- import_material45.Box,
27671
+ children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_material46.Slide, { direction: "up", in: open, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
27672
+ import_material46.Box,
27487
27673
  {
27488
27674
  sx: {
27489
27675
  width: "100%",
@@ -27496,8 +27682,8 @@ var init_enhanced_mobile_conversations_modal = __esm({
27496
27682
  overflow: "hidden"
27497
27683
  },
27498
27684
  children: [
27499
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
27500
- import_material45.AppBar,
27685
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
27686
+ import_material46.AppBar,
27501
27687
  {
27502
27688
  position: "static",
27503
27689
  elevation: 0,
@@ -27506,10 +27692,10 @@ var init_enhanced_mobile_conversations_modal = __esm({
27506
27692
  color: theme.palette.text.primary,
27507
27693
  borderBottom: `1px solid ${theme.palette.divider}`
27508
27694
  },
27509
- children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_material45.Toolbar, { children: [
27510
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_material45.Typography, { variant: "h6", sx: { flex: 1, fontWeight: 600 }, children: "Conversations" }),
27511
- visibleConversationCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
27512
- import_material45.Chip,
27695
+ children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_material46.Toolbar, { children: [
27696
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_material46.Typography, { variant: "h6", sx: { flex: 1, fontWeight: 600 }, children: "Conversations" }),
27697
+ visibleConversationCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
27698
+ import_material46.Chip,
27513
27699
  {
27514
27700
  label: visibleConversationCount,
27515
27701
  size: "small",
@@ -27521,44 +27707,44 @@ var init_enhanced_mobile_conversations_modal = __esm({
27521
27707
  }
27522
27708
  }
27523
27709
  ),
27524
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
27525
- import_material45.IconButton,
27710
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
27711
+ import_material46.IconButton,
27526
27712
  {
27527
27713
  onClick: () => setMemoryModalOpen(true),
27528
27714
  "aria-label": "Memory",
27529
27715
  sx: { color: theme.palette.text.secondary },
27530
- children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react12.Brain, {})
27716
+ children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react12.Brain, {})
27531
27717
  }
27532
27718
  ),
27533
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
27534
- import_material45.IconButton,
27719
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
27720
+ import_material46.IconButton,
27535
27721
  {
27536
27722
  onClick: () => setProjectManagementOpen(true),
27537
27723
  sx: { color: theme.palette.text.secondary },
27538
- children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react12.Folder, {})
27724
+ children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react12.Folder, {})
27539
27725
  }
27540
27726
  ),
27541
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
27542
- import_material45.IconButton,
27727
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
27728
+ import_material46.IconButton,
27543
27729
  {
27544
27730
  onClick: handleMenuOpen,
27545
27731
  sx: { color: theme.palette.text.secondary },
27546
- children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react12.MoreVertical, {})
27732
+ children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react12.MoreVertical, {})
27547
27733
  }
27548
27734
  ),
27549
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
27550
- import_material45.IconButton,
27735
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
27736
+ import_material46.IconButton,
27551
27737
  {
27552
27738
  onClick: onClose,
27553
27739
  sx: { color: theme.palette.text.secondary },
27554
- children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react12.X, {})
27740
+ children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react12.X, {})
27555
27741
  }
27556
27742
  )
27557
27743
  ] })
27558
27744
  }
27559
27745
  ),
27560
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_material45.Box, { sx: { p: 2, pb: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
27561
- import_material45.TextField,
27746
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_material46.Box, { sx: { p: 2, pb: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
27747
+ import_material46.TextField,
27562
27748
  {
27563
27749
  fullWidth: true,
27564
27750
  size: "small",
@@ -27567,22 +27753,22 @@ var init_enhanced_mobile_conversations_modal = __esm({
27567
27753
  onChange: (e) => setSearchQuery(e.target.value),
27568
27754
  variant: "outlined",
27569
27755
  InputProps: {
27570
- startAdornment: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_material45.InputAdornment, { position: "start", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react12.Search, { size: 16, color: theme.palette.text.secondary }) }),
27571
- endAdornment: searchQuery && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_material45.InputAdornment, { position: "end", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
27572
- import_material45.IconButton,
27756
+ startAdornment: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_material46.InputAdornment, { position: "start", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react12.Search, { size: 16, color: theme.palette.text.secondary }) }),
27757
+ endAdornment: searchQuery && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_material46.InputAdornment, { position: "end", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
27758
+ import_material46.IconButton,
27573
27759
  {
27574
27760
  onClick: handleSearchClear,
27575
27761
  size: "small",
27576
27762
  edge: "end",
27577
27763
  sx: { color: theme.palette.text.secondary },
27578
- children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react12.X, { size: 16 })
27764
+ children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react12.X, { size: 16 })
27579
27765
  }
27580
27766
  ) })
27581
27767
  }
27582
27768
  }
27583
27769
  ) }),
27584
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
27585
- import_material45.Box,
27770
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
27771
+ import_material46.Box,
27586
27772
  {
27587
27773
  sx: {
27588
27774
  flex: 1,
@@ -27593,8 +27779,8 @@ var init_enhanced_mobile_conversations_modal = __esm({
27593
27779
  pb: 2
27594
27780
  },
27595
27781
  children: [
27596
- touchDragActive && activeDragConversation && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
27597
- import_material45.Box,
27782
+ touchDragActive && activeDragConversation && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
27783
+ import_material46.Box,
27598
27784
  {
27599
27785
  sx: {
27600
27786
  position: "absolute",
@@ -27619,8 +27805,8 @@ var init_enhanced_mobile_conversations_modal = __esm({
27619
27805
  overflow: "hidden"
27620
27806
  },
27621
27807
  children: [
27622
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
27623
- import_material45.Typography,
27808
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
27809
+ import_material46.Typography,
27624
27810
  {
27625
27811
  variant: "caption",
27626
27812
  sx: {
@@ -27632,8 +27818,8 @@ var init_enhanced_mobile_conversations_modal = __esm({
27632
27818
  },
27633
27819
  children: [
27634
27820
  "Move",
27635
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
27636
- import_material45.Box,
27821
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
27822
+ import_material46.Box,
27637
27823
  {
27638
27824
  component: "span",
27639
27825
  sx: {
@@ -27653,8 +27839,8 @@ var init_enhanced_mobile_conversations_modal = __esm({
27653
27839
  ]
27654
27840
  }
27655
27841
  ),
27656
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
27657
- import_material45.Typography,
27842
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
27843
+ import_material46.Typography,
27658
27844
  {
27659
27845
  variant: "caption",
27660
27846
  color: "inherit",
@@ -27662,11 +27848,11 @@ var init_enhanced_mobile_conversations_modal = __esm({
27662
27848
  fontWeight: 500,
27663
27849
  whiteSpace: "nowrap"
27664
27850
  },
27665
- children: activeHoverLabel ? /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
27851
+ children: activeHoverLabel ? /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
27666
27852
  "to",
27667
27853
  " ",
27668
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
27669
- import_material45.Box,
27854
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
27855
+ import_material46.Box,
27670
27856
  {
27671
27857
  component: "span",
27672
27858
  sx: {
@@ -27682,8 +27868,8 @@ var init_enhanced_mobile_conversations_modal = __esm({
27682
27868
  ]
27683
27869
  }
27684
27870
  ),
27685
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
27686
- import_material45.Box,
27871
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
27872
+ import_material46.Box,
27687
27873
  {
27688
27874
  onClick: async () => {
27689
27875
  const names = new Set(projects.map((p) => p.name));
@@ -27717,8 +27903,8 @@ var init_enhanced_mobile_conversations_modal = __esm({
27717
27903
  "&:hover": { bgcolor: (0, import_styles29.alpha)(theme.palette.text.primary, 0.04) }
27718
27904
  },
27719
27905
  children: [
27720
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
27721
- import_material45.Box,
27906
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
27907
+ import_material46.Box,
27722
27908
  {
27723
27909
  sx: {
27724
27910
  width: 28,
@@ -27730,25 +27916,25 @@ var init_enhanced_mobile_conversations_modal = __esm({
27730
27916
  justifyContent: "center",
27731
27917
  flexShrink: 0
27732
27918
  },
27733
- children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react12.Folder, { size: 16, color: theme.palette.success.main })
27919
+ children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react12.Folder, { size: 16, color: theme.palette.success.main })
27734
27920
  }
27735
27921
  ),
27736
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
27737
- import_material45.Typography,
27922
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
27923
+ import_material46.Typography,
27738
27924
  {
27739
27925
  variant: "subtitle2",
27740
27926
  sx: { flex: 1, fontWeight: 600, fontSize: "0.875rem" },
27741
27927
  children: "New Project"
27742
27928
  }
27743
27929
  ),
27744
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_material45.IconButton, { size: "small", sx: { color: theme.palette.success.main }, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react12.Plus, { size: 16 }) })
27930
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_material46.IconButton, { size: "small", sx: { color: theme.palette.success.main }, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react12.Plus, { size: 16 }) })
27745
27931
  ]
27746
27932
  }
27747
27933
  ),
27748
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_material45.Divider, { sx: { opacity: 0.3 } }),
27749
- filteredProjectGroups.map((group, index) => /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_material45.Box, { children: [
27750
- group.id === null && filteredProjectGroups.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
27751
- import_material45.Box,
27934
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_material46.Divider, { sx: { opacity: 0.3 } }),
27935
+ filteredProjectGroups.map((group, index) => /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_material46.Box, { children: [
27936
+ group.id === null && filteredProjectGroups.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
27937
+ import_material46.Box,
27752
27938
  {
27753
27939
  sx: {
27754
27940
  py: 2,
@@ -27758,9 +27944,9 @@ var init_enhanced_mobile_conversations_modal = __esm({
27758
27944
  gap: 2
27759
27945
  },
27760
27946
  children: [
27761
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_material45.Divider, { sx: { flex: 1, opacity: 0.6 } }),
27762
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_material45.Box, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
27763
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
27947
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_material46.Divider, { sx: { flex: 1, opacity: 0.6 } }),
27948
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_material46.Box, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
27949
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
27764
27950
  import_lucide_react12.Inbox,
27765
27951
  {
27766
27952
  size: 14,
@@ -27768,8 +27954,8 @@ var init_enhanced_mobile_conversations_modal = __esm({
27768
27954
  style: { opacity: 0.7 }
27769
27955
  }
27770
27956
  ),
27771
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
27772
- import_material45.Typography,
27957
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
27958
+ import_material46.Typography,
27773
27959
  {
27774
27960
  variant: "caption",
27775
27961
  sx: {
@@ -27783,12 +27969,12 @@ var init_enhanced_mobile_conversations_modal = __esm({
27783
27969
  }
27784
27970
  )
27785
27971
  ] }),
27786
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_material45.Divider, { sx: { flex: 1, opacity: 0.6 } })
27972
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_material46.Divider, { sx: { flex: 1, opacity: 0.6 } })
27787
27973
  ]
27788
27974
  }
27789
27975
  ),
27790
- group.id !== null ? /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
27791
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
27976
+ group.id !== null ? /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
27977
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
27792
27978
  project_header_default,
27793
27979
  {
27794
27980
  projectId: group.id,
@@ -27818,8 +28004,8 @@ var init_enhanced_mobile_conversations_modal = __esm({
27818
28004
  isTouchTarget: touchDragActive && touchDragState.hoverProjectId === group.id
27819
28005
  }
27820
28006
  ),
27821
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_material45.Collapse, { in: !group.collapsed, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
27822
- import_material45.Box,
28007
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_material46.Collapse, { in: !group.collapsed, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
28008
+ import_material46.Box,
27823
28009
  {
27824
28010
  "data-project-id": group.id ?? "__ungrouped",
27825
28011
  sx: {
@@ -27829,7 +28015,7 @@ var init_enhanced_mobile_conversations_modal = __esm({
27829
28015
  transition: "border 0.2s ease, background-color 0.2s ease",
27830
28016
  backgroundColor: touchDragActive && touchDragState.hoverProjectId === group.id ? (0, import_styles29.alpha)(theme.palette.primary.main, 0.08) : "transparent"
27831
28017
  },
27832
- children: group.conversations.map((conversation) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
28018
+ children: group.conversations.map((conversation) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
27833
28019
  simple_conversation_item_default,
27834
28020
  {
27835
28021
  conversation,
@@ -27863,8 +28049,8 @@ var init_enhanced_mobile_conversations_modal = __esm({
27863
28049
  ) })
27864
28050
  ] }) : (
27865
28051
  // Special handling for ungrouped - no header, just conversations in scrollable area
27866
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
27867
- import_material45.Box,
28052
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
28053
+ import_material46.Box,
27868
28054
  {
27869
28055
  sx: {
27870
28056
  minHeight: 0,
@@ -27880,7 +28066,7 @@ var init_enhanced_mobile_conversations_modal = __esm({
27880
28066
  backgroundColor: touchDragActive && touchDragState.hoverProjectId === "__ungrouped" ? (0, import_styles29.alpha)(theme.palette.primary.main, 0.08) : (0, import_styles29.alpha)(theme.palette.background.default, 0.3)
27881
28067
  },
27882
28068
  "data-project-id": "__ungrouped",
27883
- children: group.conversations.map((conversation) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
28069
+ children: group.conversations.map((conversation) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
27884
28070
  simple_conversation_item_default,
27885
28071
  {
27886
28072
  conversation,
@@ -27914,8 +28100,8 @@ var init_enhanced_mobile_conversations_modal = __esm({
27914
28100
  )
27915
28101
  )
27916
28102
  ] }, group.id || "ungrouped")),
27917
- filteredProjectGroups.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
27918
- import_material45.Box,
28103
+ filteredProjectGroups.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
28104
+ import_material46.Box,
27919
28105
  {
27920
28106
  sx: {
27921
28107
  flex: 1,
@@ -27928,16 +28114,16 @@ var init_enhanced_mobile_conversations_modal = __esm({
27928
28114
  color: theme.palette.text.secondary
27929
28115
  },
27930
28116
  children: [
27931
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_material45.Typography, { variant: "h6", sx: { mb: 1 }, children: searchQuery ? "No conversations found" : "No conversations yet" }),
27932
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_material45.Typography, { variant: "body2", sx: { mb: 3, maxWidth: 280 }, children: searchQuery ? `No conversations match "${searchQuery}"` : "Start your first conversation to begin organizing your chats into projects" })
28117
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_material46.Typography, { variant: "h6", sx: { mb: 1 }, children: searchQuery ? "No conversations found" : "No conversations yet" }),
28118
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_material46.Typography, { variant: "body2", sx: { mb: 3, maxWidth: 280 }, children: searchQuery ? `No conversations match "${searchQuery}"` : "Start your first conversation to begin organizing your chats into projects" })
27933
28119
  ]
27934
28120
  }
27935
28121
  )
27936
28122
  ]
27937
28123
  }
27938
28124
  ),
27939
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
27940
- import_material45.Box,
28125
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
28126
+ import_material46.Box,
27941
28127
  {
27942
28128
  onClick: user2 ? () => {
27943
28129
  window.location.href = "/profile";
@@ -27954,8 +28140,8 @@ var init_enhanced_mobile_conversations_modal = __esm({
27954
28140
  cursor: user2 ? "pointer" : "default"
27955
28141
  },
27956
28142
  children: [
27957
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
27958
- import_material45.Avatar,
28143
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
28144
+ import_material46.Avatar,
27959
28145
  {
27960
28146
  src: avatarImage,
27961
28147
  alt: avatarLabel,
@@ -27969,9 +28155,9 @@ var init_enhanced_mobile_conversations_modal = __esm({
27969
28155
  children: avatarInitials
27970
28156
  }
27971
28157
  ),
27972
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_material45.Box, { sx: { display: "flex", flexDirection: "column", flex: 1, minWidth: 0, gap: 0.25 }, children: [
27973
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
27974
- import_material45.Typography,
28158
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_material46.Box, { sx: { display: "flex", flexDirection: "column", flex: 1, minWidth: 0, gap: 0.25 }, children: [
28159
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
28160
+ import_material46.Typography,
27975
28161
  {
27976
28162
  variant: "subtitle2",
27977
28163
  noWrap: true,
@@ -27979,8 +28165,8 @@ var init_enhanced_mobile_conversations_modal = __esm({
27979
28165
  children: user2 ? userDisplayName : "Not signed in"
27980
28166
  }
27981
28167
  ),
27982
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
27983
- import_material45.Typography,
28168
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
28169
+ import_material46.Typography,
27984
28170
  {
27985
28171
  variant: "caption",
27986
28172
  noWrap: true,
@@ -27989,9 +28175,9 @@ var init_enhanced_mobile_conversations_modal = __esm({
27989
28175
  }
27990
28176
  )
27991
28177
  ] }),
27992
- user2 && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
27993
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
27994
- import_material45.Box,
28178
+ user2 && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
28179
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
28180
+ import_material46.Box,
27995
28181
  {
27996
28182
  sx: {
27997
28183
  flexShrink: 0,
@@ -28004,11 +28190,11 @@ var init_enhanced_mobile_conversations_modal = __esm({
28004
28190
  border: `1px solid ${(0, import_styles29.alpha)(theme.palette.divider, 0.8)}`,
28005
28191
  color: theme.palette.text.secondary
28006
28192
  },
28007
- children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react12.Settings, { size: 16 })
28193
+ children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react12.Settings, { size: 16 })
28008
28194
  }
28009
28195
  ),
28010
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
28011
- import_material45.IconButton,
28196
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
28197
+ import_material46.IconButton,
28012
28198
  {
28013
28199
  "aria-label": "Sign out",
28014
28200
  title: "Sign out",
@@ -28025,7 +28211,7 @@ var init_enhanced_mobile_conversations_modal = __esm({
28025
28211
  color: theme.palette.error.main,
28026
28212
  "&:hover": { bgcolor: (0, import_styles29.alpha)(theme.palette.error.main, 0.1) }
28027
28213
  },
28028
- children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react12.LogOut, { size: 16 })
28214
+ children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react12.LogOut, { size: 16 })
28029
28215
  }
28030
28216
  )
28031
28217
  ] })
@@ -28037,15 +28223,15 @@ var init_enhanced_mobile_conversations_modal = __esm({
28037
28223
  ) })
28038
28224
  }
28039
28225
  ),
28040
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
28226
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
28041
28227
  project_management_modal_default,
28042
28228
  {
28043
28229
  open: projectManagementOpen,
28044
28230
  onClose: () => setProjectManagementOpen(false)
28045
28231
  }
28046
28232
  ),
28047
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(memory_modal_default, { open: memoryModalOpen, onClose: () => setMemoryModalOpen(false) }),
28048
- conversationToMove && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
28233
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(memory_modal_default, { open: memoryModalOpen, onClose: () => setMemoryModalOpen(false) }),
28234
+ conversationToMove && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
28049
28235
  move_conversation_modal_default,
28050
28236
  {
28051
28237
  open: moveModalOpen,
@@ -28054,8 +28240,8 @@ var init_enhanced_mobile_conversations_modal = __esm({
28054
28240
  currentProjectId: conversationToMove.projectId
28055
28241
  }
28056
28242
  ),
28057
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
28058
- import_material45.Menu,
28243
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
28244
+ import_material46.Menu,
28059
28245
  {
28060
28246
  anchorEl: menuAnchorEl,
28061
28247
  open: Boolean(menuAnchorEl),
@@ -28068,8 +28254,8 @@ var init_enhanced_mobile_conversations_modal = __esm({
28068
28254
  vertical: "bottom",
28069
28255
  horizontal: "right"
28070
28256
  },
28071
- children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
28072
- import_material45.MenuItem,
28257
+ children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
28258
+ import_material46.MenuItem,
28073
28259
  {
28074
28260
  onClick: () => {
28075
28261
  setClearConfirmOpen(true);
@@ -28078,27 +28264,27 @@ var init_enhanced_mobile_conversations_modal = __esm({
28078
28264
  disabled: visibleConversationCount === 0,
28079
28265
  sx: { color: theme.palette.error.main },
28080
28266
  children: [
28081
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_material45.ListItemIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react12.Trash2, { size: 16, color: theme.palette.error.main }) }),
28082
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_material45.ListItemText, { children: "Clear All Conversations" })
28267
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_material46.ListItemIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react12.Trash2, { size: 16, color: theme.palette.error.main }) }),
28268
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_material46.ListItemText, { children: "Clear All Conversations" })
28083
28269
  ]
28084
28270
  }
28085
28271
  )
28086
28272
  }
28087
28273
  ),
28088
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
28089
- import_material45.Dialog,
28274
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
28275
+ import_material46.Dialog,
28090
28276
  {
28091
28277
  open: clearConfirmOpen,
28092
28278
  onClose: () => setClearConfirmOpen(false),
28093
28279
  maxWidth: "sm",
28094
28280
  fullWidth: true,
28095
28281
  children: [
28096
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_material45.DialogTitle, { children: "Clear All Conversations?" }),
28097
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_material45.DialogContent, { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_material45.Typography, { children: visibleConversationCount === 0 ? "No conversations available to clear." : `This will permanently delete ${visibleConversationCount} conversation${visibleConversationCount === 1 ? "" : "s"} and cannot be undone.` }) }),
28098
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_material45.DialogActions, { children: [
28099
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_material45.Button, { onClick: () => setClearConfirmOpen(false), children: "Cancel" }),
28100
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
28101
- import_material45.Button,
28282
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_material46.DialogTitle, { children: "Clear All Conversations?" }),
28283
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_material46.DialogContent, { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_material46.Typography, { children: visibleConversationCount === 0 ? "No conversations available to clear." : `This will permanently delete ${visibleConversationCount} conversation${visibleConversationCount === 1 ? "" : "s"} and cannot be undone.` }) }),
28284
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_material46.DialogActions, { children: [
28285
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_material46.Button, { onClick: () => setClearConfirmOpen(false), children: "Cancel" }),
28286
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
28287
+ import_material46.Button,
28102
28288
  {
28103
28289
  onClick: handleClearAllConfirm,
28104
28290
  color: "error",
@@ -28117,15 +28303,15 @@ var init_enhanced_mobile_conversations_modal = __esm({
28117
28303
  });
28118
28304
 
28119
28305
  // src/chat/chat-app-bar.tsx
28120
- var import_material46, import_react57, import_material47, import_react_router_dom2, import_shallow2, import_jsx_runtime46, CDN_BASE2, banditHead4, modelAvatars3, ChatAppBar, chat_app_bar_default;
28306
+ var import_material47, import_react58, import_material48, import_react_router_dom3, import_shallow2, import_jsx_runtime47, CDN_BASE2, banditHead4, modelAvatars3, ChatAppBar, chat_app_bar_default;
28121
28307
  var init_chat_app_bar = __esm({
28122
28308
  "src/chat/chat-app-bar.tsx"() {
28123
28309
  "use strict";
28124
- import_material46 = require("@mui/material");
28125
- init_modelStore();
28126
- import_react57 = require("react");
28127
28310
  import_material47 = require("@mui/material");
28128
- import_react_router_dom2 = require("react-router-dom");
28311
+ init_modelStore();
28312
+ import_react58 = require("react");
28313
+ import_material48 = require("@mui/material");
28314
+ import_react_router_dom3 = require("react-router-dom");
28129
28315
  init_lucide_icons();
28130
28316
  init_util();
28131
28317
  init_conversation_drawer();
@@ -28139,7 +28325,7 @@ var init_chat_app_bar = __esm({
28139
28325
  init_conversationSyncStore();
28140
28326
  init_engineStore();
28141
28327
  import_shallow2 = require("zustand/shallow");
28142
- import_jsx_runtime46 = require("react/jsx-runtime");
28328
+ import_jsx_runtime47 = require("react/jsx-runtime");
28143
28329
  CDN_BASE2 = "https://cdn.burtson.ai/";
28144
28330
  banditHead4 = `${CDN_BASE2}/images/bandit-head.png`;
28145
28331
  modelAvatars3 = {
@@ -28158,12 +28344,12 @@ var init_chat_app_bar = __esm({
28158
28344
  drawerOpen,
28159
28345
  setDrawerOpen
28160
28346
  }) => {
28161
- const theme = (0, import_material47.useTheme)();
28162
- const isMobile = (0, import_material47.useMediaQuery)(theme.breakpoints.down("sm"));
28163
- const hasLoggedRouterWarningRef = (0, import_react57.useRef)(false);
28347
+ const theme = (0, import_material48.useTheme)();
28348
+ const isMobile = (0, import_material48.useMediaQuery)(theme.breakpoints.down("sm"));
28349
+ const hasLoggedRouterWarningRef = (0, import_react58.useRef)(false);
28164
28350
  let navigate = null;
28165
28351
  try {
28166
- navigate = (0, import_react_router_dom2.useNavigate)();
28352
+ navigate = (0, import_react_router_dom3.useNavigate)();
28167
28353
  } catch (error) {
28168
28354
  if (!hasLoggedRouterWarningRef.current) {
28169
28355
  debugLogger.warn("ChatAppBar: Navigation not available (missing Router context)", { error });
@@ -28186,12 +28372,12 @@ var init_chat_app_bar = __esm({
28186
28372
  menuBackground,
28187
28373
  menuText
28188
28374
  } = theme.palette.chat.appBar;
28189
- const [modelAnchorEl, setModelAnchorEl] = (0, import_react57.useState)(null);
28190
- const [engineAnchorEl, setEngineAnchorEl] = (0, import_react57.useState)(null);
28191
- const [voiceAnchorEl, setVoiceAnchorEl] = (0, import_react57.useState)(null);
28192
- const [modalOpen, setModalOpen] = (0, import_react57.useState)(false);
28193
- const [confirmModelChangeOpen, setConfirmModelChangeOpen] = (0, import_react57.useState)(false);
28194
- const [pendingModel, setPendingModel] = (0, import_react57.useState)(null);
28375
+ const [modelAnchorEl, setModelAnchorEl] = (0, import_react58.useState)(null);
28376
+ const [engineAnchorEl, setEngineAnchorEl] = (0, import_react58.useState)(null);
28377
+ const [voiceAnchorEl, setVoiceAnchorEl] = (0, import_react58.useState)(null);
28378
+ const [modalOpen, setModalOpen] = (0, import_react58.useState)(false);
28379
+ const [confirmModelChangeOpen, setConfirmModelChangeOpen] = (0, import_react58.useState)(false);
28380
+ const [pendingModel, setPendingModel] = (0, import_react58.useState)(null);
28195
28381
  const { conversations, currentId, createNewConversation, _hasHydrated } = useConversationStore();
28196
28382
  const { preferences } = usePreferencesStore();
28197
28383
  const { settings: packageSettings } = usePackageSettingsStore();
@@ -28217,7 +28403,7 @@ var init_chat_app_bar = __esm({
28217
28403
  triggerSync: state.runSync,
28218
28404
  setSyncEnabled: state.setSyncEnabled
28219
28405
  }), import_shallow2.shallow);
28220
- (0, import_react57.useEffect)(() => {
28406
+ (0, import_react58.useEffect)(() => {
28221
28407
  if (isPlaygroundMode3 && syncEnabled) {
28222
28408
  void setSyncEnabled(false).catch((error) => {
28223
28409
  debugLogger.warn("ChatAppBar: Failed to disable sync in playground", {
@@ -28235,16 +28421,16 @@ var init_chat_app_bar = __esm({
28235
28421
  };
28236
28422
  const syncIndicatorIcon = (() => {
28237
28423
  if (isPlaygroundMode3 || !syncEnabled) {
28238
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(CloudOffIcon, { fontSize: "small", color: "disabled" });
28424
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(CloudOffIcon, { fontSize: "small", color: "disabled" });
28239
28425
  }
28240
28426
  switch (syncStatus) {
28241
28427
  case "syncing":
28242
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(SyncIcon, { fontSize: "small", sx: syncSpinSx, color: "primary" });
28428
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(SyncIcon, { fontSize: "small", sx: syncSpinSx, color: "primary" });
28243
28429
  case "error":
28244
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ErrorOutlineIcon, { fontSize: "small", color: "error" });
28430
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ErrorOutlineIcon, { fontSize: "small", color: "error" });
28245
28431
  case "idle":
28246
28432
  default:
28247
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(CloudDoneIcon, { fontSize: "small", color: "success" });
28433
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(CloudDoneIcon, { fontSize: "small", color: "success" });
28248
28434
  }
28249
28435
  })();
28250
28436
  const syncTooltip = (() => {
@@ -28277,8 +28463,14 @@ var init_chat_app_bar = __esm({
28277
28463
  }
28278
28464
  void triggerSync({ force: true });
28279
28465
  };
28280
- const { hasTTS, hasSTT, isAdmin, getCurrentTier, hasLimitedAdminDashboard } = useFeatures();
28466
+ const { hasTTS, hasSTT, isAdmin, getCurrentTier, hasLimitedAdminDashboard, isSubscribed } = useFeatures();
28281
28467
  const { showVoiceControls, showLimitedAdminPanel } = useFeatureVisibility();
28468
+ const frontierEligible = (() => {
28469
+ if (isAdmin() || isSubscribed()) return true;
28470
+ const tier = String(getCurrentTier());
28471
+ return tier !== "trial" && tier !== "expired" && tier !== "free" && tier !== "basic";
28472
+ })();
28473
+ const plansPath = "/plans";
28282
28474
  const isTTSAvailable = !!packageSettings?.gatewayApiUrl && preferences.ttsEnabled && hasTTS();
28283
28475
  const currentConversation = conversations.find((c) => c.id === currentId);
28284
28476
  const conversationCountDisplay = conversations.length > 99 ? "99+" : conversations.length.toString();
@@ -28315,7 +28507,7 @@ var init_chat_app_bar = __esm({
28315
28507
  const resolvedEngineId = currentEngine?.id ?? effectiveEngineId;
28316
28508
  const cleanEngineName = (name) => (name || "").replace(/\s*\([^)]*\)\s*$/, "").trim();
28317
28509
  const engineDisplay = cleanEngineName(currentEngine?.displayName) || "Engine";
28318
- (0, import_react57.useEffect)(() => {
28510
+ (0, import_react58.useEffect)(() => {
28319
28511
  useEngineStore.getState().fetchEngines();
28320
28512
  }, []);
28321
28513
  const pendingModelAvatar = useModelStore.getState().availableModels.find((m) => m.name === pendingModel)?.avatarBase64 || modelAvatars3[pendingModel || ""] || banditHead4;
@@ -28350,9 +28542,9 @@ var init_chat_app_bar = __esm({
28350
28542
  }
28351
28543
  safeNavigate("/");
28352
28544
  }
28353
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
28354
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
28355
- import_material47.Box,
28545
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
28546
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
28547
+ import_material48.Box,
28356
28548
  {
28357
28549
  sx: {
28358
28550
  position: "fixed",
@@ -28372,8 +28564,8 @@ var init_chat_app_bar = __esm({
28372
28564
  }
28373
28565
  },
28374
28566
  children: [
28375
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
28376
- import_material47.Box,
28567
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
28568
+ import_material48.Box,
28377
28569
  {
28378
28570
  sx: {
28379
28571
  display: "flex",
@@ -28393,17 +28585,17 @@ var init_chat_app_bar = __esm({
28393
28585
  }
28394
28586
  },
28395
28587
  children: [
28396
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_material47.Tooltip, { title: homeTooltip, arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
28397
- import_material47.IconButton,
28588
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_material48.Tooltip, { title: homeTooltip, arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
28589
+ import_material48.IconButton,
28398
28590
  {
28399
28591
  onClick: goToHome,
28400
28592
  sx: pillButtonStyles,
28401
28593
  "aria-label": "Go to home page",
28402
- children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(HomeIcon, {})
28594
+ children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(HomeIcon, {})
28403
28595
  }
28404
28596
  ) }),
28405
- showLimitedAdminPanel() && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_material47.Tooltip, { title: "Management & Settings", arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
28406
- import_material47.IconButton,
28597
+ showLimitedAdminPanel() && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_material48.Tooltip, { title: "Management & Settings", arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
28598
+ import_material48.IconButton,
28407
28599
  {
28408
28600
  onClick: () => safeNavigate(managementPath),
28409
28601
  sx: {
@@ -28414,11 +28606,11 @@ var init_chat_app_bar = __esm({
28414
28606
  }
28415
28607
  },
28416
28608
  "aria-label": "Open management settings",
28417
- children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(SettingsIcon, {})
28609
+ children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(SettingsIcon, {})
28418
28610
  }
28419
28611
  ) }),
28420
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_material47.Tooltip, { title: syncTooltip, arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
28421
- import_material47.IconButton,
28612
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_material48.Tooltip, { title: syncTooltip, arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
28613
+ import_material48.IconButton,
28422
28614
  {
28423
28615
  onClick: handleSyncBadgeClick,
28424
28616
  disabled: syncButtonDisabled,
@@ -28433,8 +28625,8 @@ var init_chat_app_bar = __esm({
28433
28625
  "aria-label": "Conversation sync status",
28434
28626
  children: [
28435
28627
  syncIndicatorIcon,
28436
- pendingCount > 0 && !syncButtonDisabled && syncStatus !== "syncing" && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
28437
- import_material47.Box,
28628
+ pendingCount > 0 && !syncButtonDisabled && syncStatus !== "syncing" && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
28629
+ import_material48.Box,
28438
28630
  {
28439
28631
  sx: {
28440
28632
  position: "absolute",
@@ -28459,8 +28651,8 @@ var init_chat_app_bar = __esm({
28459
28651
  ]
28460
28652
  }
28461
28653
  ) }),
28462
- !isMobile && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_material47.Tooltip, { title: `${drawerOpen ? "Close" : "Open"} Conversations`, arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
28463
- import_material47.IconButton,
28654
+ !isMobile && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_material48.Tooltip, { title: `${drawerOpen ? "Close" : "Open"} Conversations`, arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
28655
+ import_material48.IconButton,
28464
28656
  {
28465
28657
  onClick: () => setDrawerOpen(!drawerOpen),
28466
28658
  sx: {
@@ -28473,9 +28665,9 @@ var init_chat_app_bar = __esm({
28473
28665
  "aria-label": `${drawerOpen ? "Close" : "Open"} conversations drawer`,
28474
28666
  "aria-pressed": drawerOpen,
28475
28667
  children: [
28476
- drawerOpen ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(NotesIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(NotesIconOutlined, {}),
28477
- conversations.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
28478
- import_material47.Box,
28668
+ drawerOpen ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(NotesIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(NotesIconOutlined, {}),
28669
+ conversations.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
28670
+ import_material48.Box,
28479
28671
  {
28480
28672
  sx: {
28481
28673
  position: "absolute",
@@ -28500,8 +28692,8 @@ var init_chat_app_bar = __esm({
28500
28692
  ]
28501
28693
  }
28502
28694
  ) }),
28503
- !isMobile && canShowNewConversationButton && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_material47.Tooltip, { title: "Start New Conversation", arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
28504
- import_material47.IconButton,
28695
+ !isMobile && canShowNewConversationButton && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_material48.Tooltip, { title: "Start New Conversation", arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
28696
+ import_material48.IconButton,
28505
28697
  {
28506
28698
  onClick: () => createNewConversation(),
28507
28699
  sx: {
@@ -28514,14 +28706,14 @@ var init_chat_app_bar = __esm({
28514
28706
  }
28515
28707
  },
28516
28708
  "aria-label": "Create new conversation",
28517
- children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(AddIcon, {})
28709
+ children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(AddIcon, {})
28518
28710
  }
28519
28711
  ) })
28520
28712
  ]
28521
28713
  }
28522
28714
  ),
28523
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
28524
- import_material47.Box,
28715
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
28716
+ import_material48.Box,
28525
28717
  {
28526
28718
  sx: {
28527
28719
  display: "flex",
@@ -28541,8 +28733,8 @@ var init_chat_app_bar = __esm({
28541
28733
  }
28542
28734
  },
28543
28735
  children: [
28544
- isMobile && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_material47.Tooltip, { title: `Conversations (${conversations.length})`, arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
28545
- import_material47.IconButton,
28736
+ isMobile && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_material48.Tooltip, { title: `Conversations (${conversations.length})`, arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
28737
+ import_material48.IconButton,
28546
28738
  {
28547
28739
  onClick: () => setModalOpen(true),
28548
28740
  sx: {
@@ -28551,9 +28743,9 @@ var init_chat_app_bar = __esm({
28551
28743
  },
28552
28744
  "aria-label": `Open conversations modal with ${conversations.length} conversations`,
28553
28745
  children: [
28554
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(NotesIcon, { fontSize: "small" }),
28555
- conversations.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
28556
- import_material47.Box,
28746
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(NotesIcon, { fontSize: "small" }),
28747
+ conversations.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
28748
+ import_material48.Box,
28557
28749
  {
28558
28750
  sx: {
28559
28751
  position: "absolute",
@@ -28578,8 +28770,8 @@ var init_chat_app_bar = __esm({
28578
28770
  ]
28579
28771
  }
28580
28772
  ) }),
28581
- isMobile && canShowNewConversationButton && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_material47.Tooltip, { title: "Start New Conversation", arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
28582
- import_material47.IconButton,
28773
+ isMobile && canShowNewConversationButton && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_material48.Tooltip, { title: "Start New Conversation", arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
28774
+ import_material48.IconButton,
28583
28775
  {
28584
28776
  onClick: () => {
28585
28777
  createNewConversation();
@@ -28595,11 +28787,11 @@ var init_chat_app_bar = __esm({
28595
28787
  }
28596
28788
  },
28597
28789
  "aria-label": "Create new conversation",
28598
- children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(AddIcon, { fontSize: "small" })
28790
+ children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(AddIcon, { fontSize: "small" })
28599
28791
  }
28600
28792
  ) }),
28601
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_material47.Tooltip, { title: `Current AI: ${selectedModel.replace("Bandit-", "")}`, arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
28602
- import_material47.IconButton,
28793
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_material48.Tooltip, { title: `Current AI: ${selectedModel.replace("Bandit-", "")}`, arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
28794
+ import_material48.IconButton,
28603
28795
  {
28604
28796
  onClick: (e) => setModelAnchorEl(e.currentTarget),
28605
28797
  sx: {
@@ -28613,8 +28805,8 @@ var init_chat_app_bar = __esm({
28613
28805
  }
28614
28806
  },
28615
28807
  "aria-label": `Change AI personality. Currently using ${selectedModel}`,
28616
- children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
28617
- import_material46.Avatar,
28808
+ children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
28809
+ import_material47.Avatar,
28618
28810
  {
28619
28811
  src: currentAvatar,
28620
28812
  alt: selectedModel,
@@ -28630,17 +28822,17 @@ var init_chat_app_bar = __esm({
28630
28822
  )
28631
28823
  }
28632
28824
  ) }),
28633
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_material47.Tooltip, { title: `Engine \xB7 ${engineDisplay}`, arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
28634
- import_material47.IconButton,
28825
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_material48.Tooltip, { title: `Engine \xB7 ${engineDisplay}`, arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
28826
+ import_material48.IconButton,
28635
28827
  {
28636
28828
  onClick: (e) => setEngineAnchorEl(e.currentTarget),
28637
28829
  sx: pillButtonStyles,
28638
28830
  "aria-label": `Change base model (engine). Currently ${engineDisplay}`,
28639
- children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(AutoAwesomeIcon, { fontSize: "small" })
28831
+ children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(AutoAwesomeIcon, { fontSize: "small" })
28640
28832
  }
28641
28833
  ) }),
28642
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
28643
- import_material47.Menu,
28834
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
28835
+ import_material48.Menu,
28644
28836
  {
28645
28837
  anchorEl: engineAnchorEl,
28646
28838
  open: Boolean(engineAnchorEl),
@@ -28648,8 +28840,8 @@ var init_chat_app_bar = __esm({
28648
28840
  transformOrigin: { horizontal: "right", vertical: "top" },
28649
28841
  anchorOrigin: { horizontal: "right", vertical: "bottom" },
28650
28842
  children: [
28651
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_material47.Typography, { variant: "overline", sx: { px: 2, color: theme.palette.text.secondary }, children: "Engine \xB7 base model" }),
28652
- engines.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_material47.MenuItem, { disabled: true, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_material47.Typography, { variant: "body2", children: "No engines available" }) }),
28843
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_material48.Typography, { variant: "overline", sx: { px: 2, color: theme.palette.text.secondary }, children: "Engine \xB7 base model" }),
28844
+ engines.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_material48.MenuItem, { disabled: true, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_material48.Typography, { variant: "body2", children: "No engines available" }) }),
28653
28845
  engines.map((engine) => {
28654
28846
  const badges = [
28655
28847
  engine.vision && "vision",
@@ -28657,12 +28849,14 @@ var init_chat_app_bar = __esm({
28657
28849
  engine.thinking && "thinking",
28658
28850
  engine.cloud && "cloud"
28659
28851
  ].filter(Boolean);
28660
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
28661
- import_material47.MenuItem,
28852
+ const isGated = engine.cloud && !frontierEligible;
28853
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
28854
+ import_material48.MenuItem,
28662
28855
  {
28663
28856
  selected: engine.id === resolvedEngineId,
28664
- disabled: !engine.available,
28857
+ disabled: !engine.available || isGated,
28665
28858
  onClick: () => {
28859
+ if (isGated) return;
28666
28860
  useEngineStore.getState().setSelectedEngine(engine.id);
28667
28861
  setEngineAnchorEl(null);
28668
28862
  },
@@ -28674,16 +28868,63 @@ var init_chat_app_bar = __esm({
28674
28868
  py: 1,
28675
28869
  px: 2,
28676
28870
  maxWidth: 360,
28677
- whiteSpace: "normal"
28871
+ whiteSpace: "normal",
28872
+ // Keep gated rows readable (MUI disabled dims to ~38%) so the
28873
+ // upsell stays legible.
28874
+ ...isGated ? { opacity: 1, "&.Mui-disabled": { opacity: 1 } } : {}
28678
28875
  },
28679
28876
  children: [
28680
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_material47.Box, { sx: { display: "flex", alignItems: "center", gap: 1, width: "100%" }, children: [
28681
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_material47.Typography, { variant: "body2", sx: { fontWeight: 600, flex: 1 }, children: cleanEngineName(engine.displayName) }),
28682
- engine.id === resolvedEngineId && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_material47.Box, { sx: { width: 8, height: 8, borderRadius: "50%", bgcolor: theme.palette.primary.main } })
28877
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_material48.Box, { sx: { display: "flex", alignItems: "center", gap: 1, width: "100%" }, children: [
28878
+ isGated && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
28879
+ LockIcon,
28880
+ {
28881
+ fontSize: "small",
28882
+ sx: { fontSize: "0.95rem", color: theme.palette.text.secondary }
28883
+ }
28884
+ ),
28885
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
28886
+ import_material48.Typography,
28887
+ {
28888
+ variant: "body2",
28889
+ sx: {
28890
+ fontWeight: 600,
28891
+ flex: 1,
28892
+ color: isGated ? theme.palette.text.secondary : void 0
28893
+ },
28894
+ children: cleanEngineName(engine.displayName)
28895
+ }
28896
+ ),
28897
+ engine.id === resolvedEngineId && !isGated && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_material48.Box, { sx: { width: 8, height: 8, borderRadius: "50%", bgcolor: theme.palette.primary.main } })
28683
28898
  ] }),
28684
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_material47.Typography, { variant: "caption", sx: { color: theme.palette.text.secondary }, children: engine.available ? engine.description : engine.unavailableReason || "Unavailable" }),
28685
- badges.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_material47.Box, { sx: { display: "flex", gap: 0.5, flexWrap: "wrap", mt: 0.25 }, children: badges.map((b) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
28686
- import_material47.Box,
28899
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_material48.Typography, { 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" }),
28900
+ isGated && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
28901
+ import_material48.Button,
28902
+ {
28903
+ size: "small",
28904
+ variant: "text",
28905
+ startIcon: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(LockIcon, { sx: { fontSize: "0.85rem" } }),
28906
+ onClick: (e) => {
28907
+ e.stopPropagation();
28908
+ setEngineAnchorEl(null);
28909
+ safeNavigate(plansPath);
28910
+ },
28911
+ sx: {
28912
+ mt: 0.25,
28913
+ px: 0.75,
28914
+ py: 0.1,
28915
+ minWidth: 0,
28916
+ textTransform: "none",
28917
+ fontSize: "0.7rem",
28918
+ fontWeight: 600,
28919
+ color: theme.palette.primary.main,
28920
+ // Re-enable pointer events the disabled MenuItem strips.
28921
+ pointerEvents: "auto"
28922
+ },
28923
+ children: "Upgrade to unlock"
28924
+ }
28925
+ ),
28926
+ badges.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_material48.Box, { sx: { display: "flex", gap: 0.5, flexWrap: "wrap", mt: 0.25 }, children: badges.map((b) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
28927
+ import_material48.Box,
28687
28928
  {
28688
28929
  sx: {
28689
28930
  fontSize: "0.65rem",
@@ -28705,8 +28946,8 @@ var init_chat_app_bar = __esm({
28705
28946
  ]
28706
28947
  }
28707
28948
  ),
28708
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
28709
- import_material47.Menu,
28949
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
28950
+ import_material48.Menu,
28710
28951
  {
28711
28952
  anchorEl: modelAnchorEl,
28712
28953
  open: Boolean(modelAnchorEl),
@@ -28741,8 +28982,8 @@ var init_chat_app_bar = __esm({
28741
28982
  }
28742
28983
  }
28743
28984
  },
28744
- children: availableModels.map((model) => /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
28745
- import_material47.MenuItem,
28985
+ children: availableModels.map((model) => /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
28986
+ import_material48.MenuItem,
28746
28987
  {
28747
28988
  selected: model.name === selectedModel,
28748
28989
  onClick: () => {
@@ -28788,8 +29029,8 @@ var init_chat_app_bar = __esm({
28788
29029
  px: 2
28789
29030
  },
28790
29031
  children: [
28791
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
28792
- import_material46.Avatar,
29032
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
29033
+ import_material47.Avatar,
28793
29034
  {
28794
29035
  src: model.avatarBase64 || modelAvatars3[model.name] || banditHead4,
28795
29036
  alt: model.name,
@@ -28801,12 +29042,12 @@ var init_chat_app_bar = __esm({
28801
29042
  }
28802
29043
  }
28803
29044
  ),
28804
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_material47.Box, { sx: { flex: 1 }, children: [
28805
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_material47.Typography, { variant: "body2", sx: { fontWeight: 500 }, children: model.name.replace("Bandit-", "") }),
28806
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_material47.Typography, { variant: "caption", sx: { color: theme.palette.text.secondary, display: "block" }, children: model.name === selectedModel ? "Currently active" : "Switch to this AI" })
29045
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_material48.Box, { sx: { flex: 1 }, children: [
29046
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_material48.Typography, { variant: "body2", sx: { fontWeight: 500 }, children: model.name.replace("Bandit-", "") }),
29047
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_material48.Typography, { variant: "caption", sx: { color: theme.palette.text.secondary, display: "block" }, children: model.name === selectedModel ? "Currently active" : "Switch to this AI" })
28807
29048
  ] }),
28808
- model.name === selectedModel && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
28809
- import_material47.Box,
29049
+ model.name === selectedModel && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
29050
+ import_material48.Box,
28810
29051
  {
28811
29052
  sx: {
28812
29053
  width: 8,
@@ -28822,9 +29063,9 @@ var init_chat_app_bar = __esm({
28822
29063
  ))
28823
29064
  }
28824
29065
  ),
28825
- isTTSAvailable && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
28826
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_material47.Tooltip, { title: `Voice: ${selectedVoice ? toTitleCase(selectedVoice.split("-")[1]) : "Default"}`, arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
28827
- import_material47.IconButton,
29066
+ isTTSAvailable && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
29067
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_material48.Tooltip, { title: `Voice: ${selectedVoice ? toTitleCase(selectedVoice.split("-")[1]) : "Default"}`, arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
29068
+ import_material48.IconButton,
28828
29069
  {
28829
29070
  onClick: (e) => setVoiceAnchorEl(e.currentTarget),
28830
29071
  sx: {
@@ -28837,11 +29078,11 @@ var init_chat_app_bar = __esm({
28837
29078
  }
28838
29079
  },
28839
29080
  "aria-label": `Change voice. Currently using ${selectedVoice ? toTitleCase(selectedVoice.split("-")[1]) : "default"}`,
28840
- children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(RecordVoiceOverIcon, { fontSize: "small" })
29081
+ children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(RecordVoiceOverIcon, { fontSize: "small" })
28841
29082
  }
28842
29083
  ) }),
28843
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
28844
- import_material47.Menu,
29084
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
29085
+ import_material48.Menu,
28845
29086
  {
28846
29087
  anchorEl: voiceAnchorEl,
28847
29088
  open: Boolean(voiceAnchorEl),
@@ -28877,22 +29118,22 @@ var init_chat_app_bar = __esm({
28877
29118
  }
28878
29119
  }
28879
29120
  },
28880
- children: availableVoices.length > 0 ? availableVoices.map((voice) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
28881
- import_material47.MenuItem,
29121
+ children: availableVoices.length > 0 ? availableVoices.map((voice) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
29122
+ import_material48.MenuItem,
28882
29123
  {
28883
29124
  selected: voice === selectedVoice,
28884
29125
  onClick: () => {
28885
29126
  handleVoiceChange(voice);
28886
29127
  setVoiceAnchorEl(null);
28887
29128
  },
28888
- children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_material47.Box, { sx: { display: "flex", alignItems: "center", gap: 1, width: "100%" }, children: [
28889
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(RecordVoiceOverIcon, { fontSize: "small", sx: { color: theme.palette.text.secondary } }),
28890
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_material47.Box, { sx: { flex: 1 }, children: [
28891
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_material47.Typography, { variant: "body2", children: toTitleCase(voice.split("-")[1]) }),
28892
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_material47.Typography, { variant: "caption", sx: { color: theme.palette.text.secondary }, children: voice === selectedVoice ? "Currently active" : "Switch to this voice" })
29129
+ children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_material48.Box, { sx: { display: "flex", alignItems: "center", gap: 1, width: "100%" }, children: [
29130
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(RecordVoiceOverIcon, { fontSize: "small", sx: { color: theme.palette.text.secondary } }),
29131
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_material48.Box, { sx: { flex: 1 }, children: [
29132
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_material48.Typography, { variant: "body2", children: toTitleCase(voice.split("-")[1]) }),
29133
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_material48.Typography, { variant: "caption", sx: { color: theme.palette.text.secondary }, children: voice === selectedVoice ? "Currently active" : "Switch to this voice" })
28893
29134
  ] }),
28894
- voice === selectedVoice && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
28895
- import_material47.Box,
29135
+ voice === selectedVoice && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
29136
+ import_material48.Box,
28896
29137
  {
28897
29138
  sx: {
28898
29139
  width: 8,
@@ -28905,7 +29146,7 @@ var init_chat_app_bar = __esm({
28905
29146
  ] })
28906
29147
  },
28907
29148
  voice
28908
- )) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_material47.MenuItem, { disabled: true, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_material47.Typography, { variant: "body2", color: "text.secondary", children: "No voices available" }) })
29149
+ )) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_material48.MenuItem, { disabled: true, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_material48.Typography, { variant: "body2", color: "text.secondary", children: "No voices available" }) })
28909
29150
  }
28910
29151
  )
28911
29152
  ] })
@@ -28915,34 +29156,34 @@ var init_chat_app_bar = __esm({
28915
29156
  ]
28916
29157
  }
28917
29158
  ),
28918
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(conversation_drawer_default, { open: drawerOpen, onClose: () => setDrawerOpen(false) }),
28919
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(enhanced_mobile_conversations_modal_default, { open: modalOpen, onClose: () => setModalOpen(false) }),
28920
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
28921
- import_material47.Dialog,
29159
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(conversation_drawer_default, { open: drawerOpen, onClose: () => setDrawerOpen(false) }),
29160
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(enhanced_mobile_conversations_modal_default, { open: modalOpen, onClose: () => setModalOpen(false) }),
29161
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
29162
+ import_material48.Dialog,
28922
29163
  {
28923
29164
  open: confirmModelChangeOpen,
28924
29165
  onClose: () => setConfirmModelChangeOpen(false),
28925
29166
  children: [
28926
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_material47.DialogTitle, { children: "Change personality and start new conversation?" }),
28927
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_material47.DialogContent, { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_material47.Box, { display: "flex", alignItems: "center", gap: 2, mt: 1, justifyContent: "center", children: [
28928
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
28929
- import_material46.Avatar,
29167
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_material48.DialogTitle, { children: "Change personality and start new conversation?" }),
29168
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_material48.DialogContent, { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_material48.Box, { display: "flex", alignItems: "center", gap: 2, mt: 1, justifyContent: "center", children: [
29169
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
29170
+ import_material47.Avatar,
28930
29171
  {
28931
29172
  src: pendingModelAvatar,
28932
29173
  alt: pendingModel || "Personality Avatar",
28933
29174
  sx: { width: 40, height: 40, filter: "brightness(1.7)" }
28934
29175
  }
28935
29176
  ),
28936
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_material47.Typography, { variant: "body2", children: [
29177
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_material48.Typography, { variant: "body2", children: [
28937
29178
  "Your current conversation will be saved, and a new one will begin with ",
28938
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("strong", { children: pendingModel }),
29179
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("strong", { children: pendingModel }),
28939
29180
  "."
28940
29181
  ] })
28941
29182
  ] }) }),
28942
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_material47.DialogActions, { children: [
28943
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_material47.Button, { onClick: () => setConfirmModelChangeOpen(false), children: "Cancel" }),
28944
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
28945
- import_material47.Button,
29183
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_material48.DialogActions, { children: [
29184
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_material48.Button, { onClick: () => setConfirmModelChangeOpen(false), children: "Cancel" }),
29185
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
29186
+ import_material48.Button,
28946
29187
  {
28947
29188
  onClick: () => {
28948
29189
  if (pendingModel) {
@@ -29056,12 +29297,12 @@ Respond with just the title and nothing else.
29056
29297
  });
29057
29298
 
29058
29299
  // src/chat/query-suggestion-picker.tsx
29059
- var import_react58, import_material48, import_styles30, import_react_markdown3, import_remark_gfm3, import_rehype_raw3, import_jsx_runtime47, markdownComponents, QuerySuggestionPicker;
29300
+ var import_react59, import_material49, import_styles30, import_react_markdown3, import_remark_gfm3, import_rehype_raw3, import_jsx_runtime48, markdownComponents, QuerySuggestionPicker;
29060
29301
  var init_query_suggestion_picker = __esm({
29061
29302
  "src/chat/query-suggestion-picker.tsx"() {
29062
29303
  "use strict";
29063
- import_react58 = require("react");
29064
- import_material48 = require("@mui/material");
29304
+ import_react59 = require("react");
29305
+ import_material49 = require("@mui/material");
29065
29306
  import_styles30 = require("@mui/material/styles");
29066
29307
  import_react_markdown3 = __toESM(require("react-markdown"));
29067
29308
  import_remark_gfm3 = __toESM(require("remark-gfm"));
@@ -29072,29 +29313,29 @@ var init_query_suggestion_picker = __esm({
29072
29313
  init_preferencesStore();
29073
29314
  init_knowledgeStore();
29074
29315
  init_mcpToolsStore();
29075
- import_jsx_runtime47 = require("react/jsx-runtime");
29316
+ import_jsx_runtime48 = require("react/jsx-runtime");
29076
29317
  markdownComponents = {
29077
- p: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { ...props }),
29078
- mark: ({ node, children, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("mark", { ...props, children }),
29318
+ p: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { ...props }),
29319
+ mark: ({ node, children, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("mark", { ...props, children }),
29079
29320
  code: ({ node, children, ...props }) => {
29080
29321
  const { inline, ...rest } = props;
29081
- return inline ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("code", { ...rest, children }) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("code", { ...rest, children });
29322
+ return inline ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("code", { ...rest, children }) : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("code", { ...rest, children });
29082
29323
  }
29083
29324
  };
29084
29325
  QuerySuggestionPicker = ({
29085
29326
  onSend,
29086
29327
  inputHeight
29087
29328
  }) => {
29088
- const hasGenerated = (0, import_react58.useRef)(false);
29089
- const [hasSentPrompt, setHasSentPrompt] = (0, import_react58.useState)(false);
29090
- const [examplePrompts, setExamplePrompts] = (0, import_react58.useState)([]);
29091
- const [visiblePrompts, setVisiblePrompts] = (0, import_react58.useState)([]);
29092
- const scrollRef = (0, import_react58.useRef)(null);
29329
+ const hasGenerated = (0, import_react59.useRef)(false);
29330
+ const [hasSentPrompt, setHasSentPrompt] = (0, import_react59.useState)(false);
29331
+ const [examplePrompts, setExamplePrompts] = (0, import_react59.useState)([]);
29332
+ const [visiblePrompts, setVisiblePrompts] = (0, import_react59.useState)([]);
29333
+ const scrollRef = (0, import_react59.useRef)(null);
29093
29334
  const theme = (0, import_styles30.useTheme)();
29094
- const isMobile = (0, import_material48.useMediaQuery)((theme2) => theme2.breakpoints.down("sm"));
29335
+ const isMobile = (0, import_material49.useMediaQuery)((theme2) => theme2.breakpoints.down("sm"));
29095
29336
  const { background, text, border, hoverBackground, hoverBorder } = theme.palette.chat.suggestion;
29096
29337
  const { getCurrentModel, isLoading } = useModelStore();
29097
- (0, import_react58.useEffect)(() => {
29338
+ (0, import_react59.useEffect)(() => {
29098
29339
  if (hasGenerated.current || isLoading) return;
29099
29340
  hasGenerated.current = true;
29100
29341
  const currentModel = getCurrentModel();
@@ -29127,12 +29368,12 @@ var init_query_suggestion_picker = __esm({
29127
29368
  hasGenerated.current = false;
29128
29369
  });
29129
29370
  }, [getCurrentModel, isLoading]);
29130
- (0, import_react58.useEffect)(() => {
29371
+ (0, import_react59.useEffect)(() => {
29131
29372
  if (!isLoading) {
29132
29373
  hasGenerated.current = false;
29133
29374
  }
29134
29375
  }, [isLoading]);
29135
- (0, import_react58.useEffect)(() => {
29376
+ (0, import_react59.useEffect)(() => {
29136
29377
  if (hasSentPrompt || examplePrompts.length === 0) return;
29137
29378
  const interval = setInterval(() => {
29138
29379
  setExamplePrompts((prev) => {
@@ -29151,8 +29392,8 @@ var init_query_suggestion_picker = __esm({
29151
29392
  return () => clearInterval(interval);
29152
29393
  }, [hasSentPrompt, examplePrompts.length]);
29153
29394
  const displayPrompts = isMobile ? visiblePrompts.slice(0, Math.min(visiblePrompts.length, 6)) : visiblePrompts;
29154
- return displayPrompts.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_jsx_runtime47.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
29155
- import_material48.Box,
29395
+ return displayPrompts.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_jsx_runtime48.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
29396
+ import_material49.Box,
29156
29397
  {
29157
29398
  ref: scrollRef,
29158
29399
  sx: {
@@ -29168,8 +29409,8 @@ var init_query_suggestion_picker = __esm({
29168
29409
  pb: isMobile ? 0.4 : 0,
29169
29410
  "&::-webkit-scrollbar": { display: "none" }
29170
29411
  },
29171
- children: displayPrompts.map((prompt, i) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
29172
- import_material48.Box,
29412
+ children: displayPrompts.map((prompt, i) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
29413
+ import_material49.Box,
29173
29414
  {
29174
29415
  sx: {
29175
29416
  px: isMobile ? 1.4 : 2,
@@ -29203,8 +29444,8 @@ var init_query_suggestion_picker = __esm({
29203
29444
  onSend(prompt, []);
29204
29445
  setHasSentPrompt(true);
29205
29446
  },
29206
- children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
29207
- import_material48.Box,
29447
+ children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
29448
+ import_material49.Box,
29208
29449
  {
29209
29450
  sx: {
29210
29451
  flex: 1,
@@ -29228,7 +29469,7 @@ var init_query_suggestion_picker = __esm({
29228
29469
  padding: "0.1em 0.25em"
29229
29470
  }
29230
29471
  },
29231
- children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
29472
+ children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
29232
29473
  import_react_markdown3.default,
29233
29474
  {
29234
29475
  remarkPlugins: [import_remark_gfm3.default],
@@ -29249,22 +29490,22 @@ var init_query_suggestion_picker = __esm({
29249
29490
  });
29250
29491
 
29251
29492
  // ../../src/pages/under-review.tsx
29252
- var import_material49, import_react_router_dom3, import_jsx_runtime48, UnderReview, under_review_default;
29493
+ var import_material50, import_react_router_dom4, import_jsx_runtime49, UnderReview, under_review_default;
29253
29494
  var init_under_review = __esm({
29254
29495
  "../../src/pages/under-review.tsx"() {
29255
29496
  "use strict";
29256
- import_material49 = require("@mui/material");
29257
- import_react_router_dom3 = require("react-router-dom");
29258
- import_jsx_runtime48 = require("react/jsx-runtime");
29497
+ import_material50 = require("@mui/material");
29498
+ import_react_router_dom4 = require("react-router-dom");
29499
+ import_jsx_runtime49 = require("react/jsx-runtime");
29259
29500
  UnderReview = () => {
29260
- const theme = (0, import_material49.useTheme)();
29261
- const navigate = (0, import_react_router_dom3.useNavigate)();
29501
+ const theme = (0, import_material50.useTheme)();
29502
+ const navigate = (0, import_react_router_dom4.useNavigate)();
29262
29503
  const handleSneakyLogout = () => {
29263
29504
  localStorage.removeItem("authToken");
29264
29505
  navigate("/login");
29265
29506
  };
29266
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
29267
- import_material49.Box,
29507
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
29508
+ import_material50.Box,
29268
29509
  {
29269
29510
  sx: {
29270
29511
  minHeight: "100vh",
@@ -29279,8 +29520,8 @@ var init_under_review = __esm({
29279
29520
  position: "relative"
29280
29521
  },
29281
29522
  children: [
29282
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
29283
- import_material49.Box,
29523
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
29524
+ import_material50.Box,
29284
29525
  {
29285
29526
  onClick: handleSneakyLogout,
29286
29527
  sx: {
@@ -29305,13 +29546,13 @@ var init_under_review = __esm({
29305
29546
  title: "Reset session"
29306
29547
  }
29307
29548
  ),
29308
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_material49.Typography, { variant: "h4", sx: { mb: 2, fontWeight: 700, color: theme.palette.error.main }, children: "Under Review" }),
29309
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_material49.Typography, { variant: "body1", sx: { mb: 2, color: theme.palette.text.secondary }, children: [
29549
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_material50.Typography, { variant: "h4", sx: { mb: 2, fontWeight: 700, color: theme.palette.error.main }, children: "Under Review" }),
29550
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_material50.Typography, { variant: "body1", sx: { mb: 2, color: theme.palette.text.secondary }, children: [
29310
29551
  "Your request to use our services is currently being reviewed.",
29311
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("br", {}),
29552
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("br", {}),
29312
29553
  "For more info, please contact ",
29313
29554
  " ",
29314
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("a", { href: "mailto:team@banditai.ai", style: { color: theme.palette.primary.main, fontWeight: 600 }, children: "team@banditai.ai" })
29555
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("a", { href: "mailto:team@banditai.ai", style: { color: theme.palette.primary.main, fontWeight: 600 }, children: "team@banditai.ai" })
29315
29556
  ] })
29316
29557
  ]
29317
29558
  }
@@ -29322,19 +29563,19 @@ var init_under_review = __esm({
29322
29563
  });
29323
29564
 
29324
29565
  // src/components/ConnectionStatus.tsx
29325
- var import_material50, import_jsx_runtime49, ConnectionStatus;
29566
+ var import_material51, import_jsx_runtime50, ConnectionStatus;
29326
29567
  var init_ConnectionStatus = __esm({
29327
29568
  "src/components/ConnectionStatus.tsx"() {
29328
29569
  "use strict";
29329
- import_material50 = require("@mui/material");
29570
+ import_material51 = require("@mui/material");
29330
29571
  init_useNetworkStatus();
29331
29572
  init_lucide_icons();
29332
- import_jsx_runtime49 = require("react/jsx-runtime");
29573
+ import_jsx_runtime50 = require("react/jsx-runtime");
29333
29574
  ConnectionStatus = ({
29334
29575
  showWhenGood = false,
29335
29576
  position = "top"
29336
29577
  }) => {
29337
- const theme = (0, import_material50.useTheme)();
29578
+ const theme = (0, import_material51.useTheme)();
29338
29579
  const { isOnline, connectionQuality, isSlowConnection } = useNetworkStatus();
29339
29580
  if (connectionQuality === "fast" && !showWhenGood) {
29340
29581
  return null;
@@ -29343,28 +29584,28 @@ var init_ConnectionStatus = __esm({
29343
29584
  switch (connectionQuality) {
29344
29585
  case "offline":
29345
29586
  return {
29346
- icon: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(WifiOffIcon, { sx: { fontSize: 16 } }),
29587
+ icon: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(WifiOffIcon, { sx: { fontSize: 16 } }),
29347
29588
  label: "Offline",
29348
29589
  color: "error",
29349
29590
  severity: "high"
29350
29591
  };
29351
29592
  case "slow":
29352
29593
  return {
29353
- icon: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SignalWifi2BarIcon, { sx: { fontSize: 16 } }),
29594
+ icon: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SignalWifi2BarIcon, { sx: { fontSize: 16 } }),
29354
29595
  label: "Slow connection",
29355
29596
  color: "warning",
29356
29597
  severity: "medium"
29357
29598
  };
29358
29599
  case "fast":
29359
29600
  return {
29360
- icon: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(WifiIcon, { sx: { fontSize: 16 } }),
29601
+ icon: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(WifiIcon, { sx: { fontSize: 16 } }),
29361
29602
  label: "Connected",
29362
29603
  color: "success",
29363
29604
  severity: "low"
29364
29605
  };
29365
29606
  default:
29366
29607
  return {
29367
- icon: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(WifiIcon, { sx: { fontSize: 16 } }),
29608
+ icon: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(WifiIcon, { sx: { fontSize: 16 } }),
29368
29609
  label: "Unknown",
29369
29610
  color: "default",
29370
29611
  severity: "low"
@@ -29372,8 +29613,8 @@ var init_ConnectionStatus = __esm({
29372
29613
  }
29373
29614
  };
29374
29615
  const config = getStatusConfig();
29375
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
29376
- import_material50.Box,
29616
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
29617
+ import_material51.Box,
29377
29618
  {
29378
29619
  sx: {
29379
29620
  position: "fixed",
@@ -29388,8 +29629,8 @@ var init_ConnectionStatus = __esm({
29388
29629
  "100%": { opacity: 1 }
29389
29630
  }
29390
29631
  },
29391
- children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
29392
- import_material50.Chip,
29632
+ children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
29633
+ import_material51.Chip,
29393
29634
  {
29394
29635
  icon: config.icon,
29395
29636
  label: config.label,
@@ -29414,11 +29655,11 @@ var init_ConnectionStatus = __esm({
29414
29655
  });
29415
29656
 
29416
29657
  // src/hooks/useVoiceMode.ts
29417
- var import_react59, RMS_BASELINE, RMS_NORMALIZER, computeRms, pickSupportedMimeType, useVoiceMode;
29658
+ var import_react60, RMS_BASELINE, RMS_NORMALIZER, computeRms, pickSupportedMimeType, useVoiceMode;
29418
29659
  var init_useVoiceMode = __esm({
29419
29660
  "src/hooks/useVoiceMode.ts"() {
29420
29661
  "use strict";
29421
- import_react59 = require("react");
29662
+ import_react60 = require("react");
29422
29663
  init_stt_client();
29423
29664
  init_debugLogger();
29424
29665
  init_voiceModeStore();
@@ -29451,11 +29692,11 @@ var init_useVoiceMode = __esm({
29451
29692
  const setError = useVoiceModeStore((state) => state.setError);
29452
29693
  const resetTransientState = useVoiceModeStore((state) => state.resetTransientState);
29453
29694
  const setLastTranscript = useVoiceModeStore((state) => state.setLastTranscript);
29454
- const configRef = (0, import_react59.useRef)(config);
29455
- (0, import_react59.useEffect)(() => {
29695
+ const configRef = (0, import_react60.useRef)(config);
29696
+ (0, import_react60.useEffect)(() => {
29456
29697
  configRef.current = config;
29457
29698
  }, [config]);
29458
- (0, import_react59.useEffect)(() => {
29699
+ (0, import_react60.useEffect)(() => {
29459
29700
  if (!enabled) {
29460
29701
  return () => void 0;
29461
29702
  }
@@ -29716,25 +29957,26 @@ var chat_exports = {};
29716
29957
  __export(chat_exports, {
29717
29958
  default: () => chat_default
29718
29959
  });
29719
- var import_react60, import_material51, import_styles31, import_react_router_dom4, import_jsx_runtime50, ChatContent, Chat, chat_default;
29960
+ var import_react61, import_material52, import_styles31, import_react_router_dom5, import_jsx_runtime51, ChatContent, Chat, chat_default;
29720
29961
  var init_chat2 = __esm({
29721
29962
  "src/chat/chat.tsx"() {
29722
29963
  "use strict";
29723
- import_react60 = require("react");
29964
+ import_react61 = require("react");
29724
29965
  init_custom_logo();
29725
29966
  init_indexedDBService();
29726
- import_material51 = require("@mui/material");
29967
+ import_material52 = require("@mui/material");
29727
29968
  import_styles31 = require("@mui/material/styles");
29728
29969
  init_aiQueryStore();
29729
29970
  init_modelStore();
29730
29971
  init_canvasStore();
29731
29972
  init_canvas_panel();
29732
- import_react_router_dom4 = require("react-router-dom");
29973
+ import_react_router_dom5 = require("react-router-dom");
29733
29974
  init_chat_scroll_to_bottom_button();
29734
29975
  init_bandit_chat_logo();
29735
29976
  init_chat_messages();
29736
29977
  init_chat_input();
29737
29978
  init_ask_user_card();
29979
+ init_rate_limit_prompt();
29738
29980
  init_useAIProvider();
29739
29981
  init_useAutoScroll();
29740
29982
  init_useNetworkStatus();
@@ -29761,7 +30003,7 @@ var init_chat2 = __esm({
29761
30003
  init_voiceModeStore();
29762
30004
  init_ttsSanitizer();
29763
30005
  init_FeatureFlagContext();
29764
- import_jsx_runtime50 = require("react/jsx-runtime");
30006
+ import_jsx_runtime51 = require("react/jsx-runtime");
29765
30007
  ChatContent = () => {
29766
30008
  const packageSettings = usePackageSettingsStore((state) => state.settings);
29767
30009
  const featureFlag = useFeatureFlag();
@@ -29769,12 +30011,12 @@ var init_chat2 = __esm({
29769
30011
  const ossMode = isOSSMode() || !packageSettings?.featureFlags?.subscriptionType;
29770
30012
  const playgroundBypassAccess = packageSettings?.playgroundBypassAuth || typeof window !== "undefined" && window.location.pathname.includes("/playground");
29771
30013
  const notificationService2 = useNotificationService();
29772
- const [selectedTheme, setSelectedTheme] = (0, import_react60.useState)(null);
29773
- const [themeLoading, setThemeLoading] = (0, import_react60.useState)(true);
30014
+ const [selectedTheme, setSelectedTheme] = (0, import_react61.useState)(null);
30015
+ const [themeLoading, setThemeLoading] = (0, import_react61.useState)(true);
29774
30016
  const token = authenticationService.getToken();
29775
30017
  const claims = token ? authenticationService.parseJwtClaims(token) : null;
29776
30018
  const baseTheme = themeMap_default[selectedTheme ?? "bandit-dark"] || banditDarkTheme;
29777
- const banditTheme = (0, import_react60.useMemo)(() => {
30019
+ const banditTheme = (0, import_react61.useMemo)(() => {
29778
30020
  return (0, import_styles31.createTheme)(baseTheme, {
29779
30021
  components: {
29780
30022
  MuiInputBase: {
@@ -29822,12 +30064,12 @@ var init_chat2 = __esm({
29822
30064
  } = useVoiceStore();
29823
30065
  const isVoiceModeEnabled = useVoiceModeStore((state) => state.enabled);
29824
30066
  const canvasOpen = useCanvasStore((state) => state.open);
29825
- const previousVoiceModeEnabledRef = (0, import_react60.useRef)(isVoiceModeEnabled);
29826
- const historyRef = (0, import_react60.useRef)(history);
29827
- (0, import_react60.useEffect)(() => {
30067
+ const previousVoiceModeEnabledRef = (0, import_react61.useRef)(isVoiceModeEnabled);
30068
+ const historyRef = (0, import_react61.useRef)(history);
30069
+ (0, import_react61.useEffect)(() => {
29828
30070
  historyRef.current = history;
29829
30071
  }, [history]);
29830
- (0, import_react60.useEffect)(() => {
30072
+ (0, import_react61.useEffect)(() => {
29831
30073
  if (!hydrated) return;
29832
30074
  const params = new URLSearchParams(window.location.search);
29833
30075
  const title = params.get("title") || "";
@@ -29843,7 +30085,7 @@ var init_chat2 = __esm({
29843
30085
  stop: ttsStop,
29844
30086
  isAvailable: isTTSAvailable
29845
30087
  } = useTTS();
29846
- (0, import_react60.useEffect)(() => {
30088
+ (0, import_react61.useEffect)(() => {
29847
30089
  const timer = setTimeout(() => {
29848
30090
  const isAuthenticated = authenticationService.isAuthenticated();
29849
30091
  if (!initialized || availableVoices.length === 0) {
@@ -29857,7 +30099,7 @@ var init_chat2 = __esm({
29857
30099
  }, 500);
29858
30100
  return () => clearTimeout(timer);
29859
30101
  }, [initialized, availableVoices.length, loadVoicesFromAPI, token]);
29860
- (0, import_react60.useEffect)(() => {
30102
+ (0, import_react61.useEffect)(() => {
29861
30103
  const isAuthenticated = authenticationService.isAuthenticated();
29862
30104
  if (packageSettings?.gatewayApiUrl && availableVoices.length === 0 && !initialized) {
29863
30105
  if (token && isAuthenticated) {
@@ -29869,15 +30111,15 @@ var init_chat2 = __esm({
29869
30111
  }
29870
30112
  }, [packageSettings?.gatewayApiUrl, availableVoices.length, initialized, loadVoicesFromAPI, token]);
29871
30113
  const provider = useAIProviderStore((state) => state.provider);
29872
- const inputRef = (0, import_react60.useRef)(null);
29873
- const [pastedImages, setPastedImages] = (0, import_react60.useState)([]);
29874
- const inputContainerRef = (0, import_react60.useRef)(null);
29875
- const [inputHeight, setInputHeight] = (0, import_react60.useState)(80);
29876
- const [isSubmitting, setIsSubmitting] = (0, import_react60.useState)(false);
29877
- const [pendingMessage, setPendingMessage] = (0, import_react60.useState)(null);
30114
+ const inputRef = (0, import_react61.useRef)(null);
30115
+ const [pastedImages, setPastedImages] = (0, import_react61.useState)([]);
30116
+ const inputContainerRef = (0, import_react61.useRef)(null);
30117
+ const [inputHeight, setInputHeight] = (0, import_react61.useState)(80);
30118
+ const [isSubmitting, setIsSubmitting] = (0, import_react61.useState)(false);
30119
+ const [pendingMessage, setPendingMessage] = (0, import_react61.useState)(null);
29878
30120
  const { conversations, currentId, _hasHydrated, hydrate } = useConversationStore();
29879
- const [isMobile, setIsMobile] = (0, import_react60.useState)(false);
29880
- const [drawerOpen, setDrawerOpen] = (0, import_react60.useState)(false);
30121
+ const [isMobile, setIsMobile] = (0, import_react61.useState)(false);
30122
+ const [drawerOpen, setDrawerOpen] = (0, import_react61.useState)(false);
29881
30123
  const { generateName } = useConversationNameGenerator();
29882
30124
  const { preferences } = usePreferencesStore();
29883
30125
  const { containerRef: chatContainerRef, targetRef: scrollTargetRef, scrollToBottom, getScrollState } = useAutoScroll({
@@ -29889,27 +30131,27 @@ var init_chat2 = __esm({
29889
30131
  const chatContainerEl = chatContainerRef.current;
29890
30132
  const scrollTargetEl = scrollTargetRef.current;
29891
30133
  const { isSlowConnection, connectionQuality, trackRequestStart, trackRequestEnd } = useNetworkStatus();
29892
- const [showScrollToBottom, setShowScrollToBottom] = (0, import_react60.useState)(false);
29893
- const [streamBuffer, setStreamBuffer] = (0, import_react60.useState)("");
29894
- const [responseStarted, setResponseStarted] = (0, import_react60.useState)(false);
29895
- const [isStreaming, setIsStreaming] = (0, import_react60.useState)(false);
29896
- const [isThinking, setIsThinking] = (0, import_react60.useState)(false);
30134
+ const [showScrollToBottom, setShowScrollToBottom] = (0, import_react61.useState)(false);
30135
+ const [streamBuffer, setStreamBuffer] = (0, import_react61.useState)("");
30136
+ const [responseStarted, setResponseStarted] = (0, import_react61.useState)(false);
30137
+ const [isStreaming, setIsStreaming] = (0, import_react61.useState)(false);
30138
+ const [isThinking, setIsThinking] = (0, import_react61.useState)(false);
29897
30139
  const initialLogoState = history.length === 0;
29898
- const [logoVisible, setLogoVisible] = (0, import_react60.useState)(initialLogoState);
29899
- const [logoShouldRender, setLogoShouldRender] = (0, import_react60.useState)(initialLogoState);
29900
- const streamingGraceUntilRef = (0, import_react60.useRef)(0);
30140
+ const [logoVisible, setLogoVisible] = (0, import_react61.useState)(initialLogoState);
30141
+ const [logoShouldRender, setLogoShouldRender] = (0, import_react61.useState)(initialLogoState);
30142
+ const streamingGraceUntilRef = (0, import_react61.useRef)(0);
29901
30143
  const GRACE_MS = 450;
29902
30144
  const GRACE_OFFSET_DESKTOP = 28;
29903
30145
  const GRACE_OFFSET_MOBILE = 20;
29904
- const followStreamRef = (0, import_react60.useRef)(true);
29905
- const lastSpokenResponseRef = (0, import_react60.useRef)(null);
29906
- const previousConversationIdRef = (0, import_react60.useRef)(null);
29907
- const logoFadeTimeoutRef = (0, import_react60.useRef)(null);
29908
- const [branding, setBranding] = (0, import_react60.useState)(null);
29909
- const [brandingLoading, setBrandingLoading] = (0, import_react60.useState)(true);
29910
- const isBrandingLoadInProgressRef = (0, import_react60.useRef)(false);
30146
+ const followStreamRef = (0, import_react61.useRef)(true);
30147
+ const lastSpokenResponseRef = (0, import_react61.useRef)(null);
30148
+ const previousConversationIdRef = (0, import_react61.useRef)(null);
30149
+ const logoFadeTimeoutRef = (0, import_react61.useRef)(null);
30150
+ const [branding, setBranding] = (0, import_react61.useState)(null);
30151
+ const [brandingLoading, setBrandingLoading] = (0, import_react61.useState)(true);
30152
+ const isBrandingLoadInProgressRef = (0, import_react61.useRef)(false);
29911
30153
  const logoOnly = history.length === 0 && !brandingLoading;
29912
- (0, import_react60.useEffect)(() => {
30154
+ (0, import_react61.useEffect)(() => {
29913
30155
  const isEmptyConversation = (history?.length ?? 0) === 0;
29914
30156
  const isSending = Boolean(pendingMessage);
29915
30157
  const shouldShowLogo = isEmptyConversation && !isSending;
@@ -29939,7 +30181,7 @@ var init_chat2 = __esm({
29939
30181
  }, 500);
29940
30182
  }
29941
30183
  }, [history, pendingMessage]);
29942
- (0, import_react60.useEffect)(() => {
30184
+ (0, import_react61.useEffect)(() => {
29943
30185
  if (!brandingLoading && !themeLoading) {
29944
30186
  return;
29945
30187
  }
@@ -29955,18 +30197,18 @@ var init_chat2 = __esm({
29955
30197
  }, 2500);
29956
30198
  return () => window.clearTimeout(timeoutId);
29957
30199
  }, [brandingLoading, themeLoading, selectedTheme]);
29958
- (0, import_react60.useEffect)(() => () => {
30200
+ (0, import_react61.useEffect)(() => () => {
29959
30201
  if (logoFadeTimeoutRef.current) {
29960
30202
  window.clearTimeout(logoFadeTimeoutRef.current);
29961
30203
  logoFadeTimeoutRef.current = null;
29962
30204
  }
29963
30205
  }, []);
29964
- (0, import_react60.useEffect)(() => {
30206
+ (0, import_react61.useEffect)(() => {
29965
30207
  if (isStreaming && streamBuffer.trim() === "") {
29966
30208
  streamingGraceUntilRef.current = Date.now() + GRACE_MS;
29967
30209
  }
29968
30210
  }, [isStreaming, streamBuffer]);
29969
- (0, import_react60.useEffect)(() => {
30211
+ (0, import_react61.useEffect)(() => {
29970
30212
  if (!isStreaming) return;
29971
30213
  const container = chatContainerRef.current;
29972
30214
  if (!container) return;
@@ -29977,13 +30219,13 @@ var init_chat2 = __esm({
29977
30219
  container.scrollTo({ top: targetTop, behavior: "smooth" });
29978
30220
  }
29979
30221
  }, [streamBuffer, isStreaming, isMobile, chatContainerRef]);
29980
- (0, import_react60.useEffect)(() => {
30222
+ (0, import_react61.useEffect)(() => {
29981
30223
  if (!_hasHydrated) {
29982
30224
  debugLogger.info("Chat component triggering conversation store hydration");
29983
30225
  hydrate();
29984
30226
  }
29985
30227
  }, [_hasHydrated, hydrate]);
29986
- (0, import_react60.useEffect)(() => {
30228
+ (0, import_react61.useEffect)(() => {
29987
30229
  const loadBrandingAndTheme = async () => {
29988
30230
  if (isBrandingLoadInProgressRef.current) {
29989
30231
  debugLogger.warn("Branding loading already in progress, skipping");
@@ -30170,19 +30412,19 @@ var init_chat2 = __esm({
30170
30412
  window.removeEventListener("bandit-theme-changed", handleThemeChange);
30171
30413
  };
30172
30414
  }, []);
30173
- (0, import_react60.useEffect)(() => {
30415
+ (0, import_react61.useEffect)(() => {
30174
30416
  if (!chatContainerEl) return;
30175
30417
  const blurInputOnScroll = () => inputRef.current?.blur();
30176
30418
  chatContainerEl.addEventListener("scroll", blurInputOnScroll);
30177
30419
  return () => chatContainerEl.removeEventListener("scroll", blurInputOnScroll);
30178
30420
  }, [chatContainerEl]);
30179
- (0, import_react60.useEffect)(() => {
30421
+ (0, import_react61.useEffect)(() => {
30180
30422
  const handleResize = () => setIsMobile(window.innerWidth <= 768);
30181
30423
  handleResize();
30182
30424
  window.addEventListener("resize", handleResize);
30183
30425
  return () => window.removeEventListener("resize", handleResize);
30184
30426
  }, []);
30185
- (0, import_react60.useEffect)(() => {
30427
+ (0, import_react61.useEffect)(() => {
30186
30428
  const setViewportHeight = () => {
30187
30429
  document.documentElement.style.setProperty(
30188
30430
  "--vh",
@@ -30193,7 +30435,7 @@ var init_chat2 = __esm({
30193
30435
  window.addEventListener("resize", setViewportHeight);
30194
30436
  return () => window.removeEventListener("resize", setViewportHeight);
30195
30437
  }, []);
30196
- (0, import_react60.useEffect)(() => {
30438
+ (0, import_react61.useEffect)(() => {
30197
30439
  if (!chatContainerEl) return;
30198
30440
  let rafId = null;
30199
30441
  const update = () => {
@@ -30212,7 +30454,7 @@ var init_chat2 = __esm({
30212
30454
  chatContainerEl.removeEventListener(SCROLL_STATE_CHANGED_EVENT, update);
30213
30455
  };
30214
30456
  }, [chatContainerEl, getScrollState]);
30215
- (0, import_react60.useEffect)(() => {
30457
+ (0, import_react61.useEffect)(() => {
30216
30458
  if (!chatContainerEl) return;
30217
30459
  let observer = null;
30218
30460
  let rafId = null;
@@ -30247,7 +30489,7 @@ var init_chat2 = __esm({
30247
30489
  if (observer) observer.disconnect();
30248
30490
  };
30249
30491
  }, [chatContainerEl, scrollTargetEl, scrollTargetRef, getScrollState, inputHeight, history.length]);
30250
- (0, import_react60.useEffect)(() => {
30492
+ (0, import_react61.useEffect)(() => {
30251
30493
  const isTransitioning = isStreaming || streamBuffer.trim() === "";
30252
30494
  const delay = isTransitioning ? 400 : 100;
30253
30495
  const timer = setTimeout(() => {
@@ -30256,7 +30498,7 @@ var init_chat2 = __esm({
30256
30498
  }, delay);
30257
30499
  return () => clearTimeout(timer);
30258
30500
  }, [history, streamBuffer, getScrollState, isStreaming]);
30259
- (0, import_react60.useLayoutEffect)(() => {
30501
+ (0, import_react61.useLayoutEffect)(() => {
30260
30502
  const scrollState = getScrollState();
30261
30503
  const now = Date.now();
30262
30504
  if (isStreaming && scrollState.shouldAutoScroll && followStreamRef.current) {
@@ -30290,7 +30532,7 @@ var init_chat2 = __esm({
30290
30532
  return () => clearTimeout(scrollTimer);
30291
30533
  }
30292
30534
  }, [history, isStreaming, scrollToBottom, getScrollState, isMobile, chatContainerRef]);
30293
- (0, import_react60.useEffect)(() => {
30535
+ (0, import_react61.useEffect)(() => {
30294
30536
  const observer = new ResizeObserver(() => {
30295
30537
  if (inputContainerRef.current)
30296
30538
  setInputHeight(inputContainerRef.current.offsetHeight);
@@ -30301,7 +30543,7 @@ var init_chat2 = __esm({
30301
30543
  }
30302
30544
  return () => observer.disconnect();
30303
30545
  }, []);
30304
- (0, import_react60.useEffect)(() => {
30546
+ (0, import_react61.useEffect)(() => {
30305
30547
  if (!hydrated || !_hasHydrated) return;
30306
30548
  if (currentId === null) {
30307
30549
  useAIQueryStore.setState({ history: [] });
@@ -30350,7 +30592,7 @@ var init_chat2 = __esm({
30350
30592
  setResponse,
30351
30593
  setComponentStatus
30352
30594
  ]);
30353
- (0, import_react60.useEffect)(() => {
30595
+ (0, import_react61.useEffect)(() => {
30354
30596
  debugLogger.info("Chat component conversation state", {
30355
30597
  hasHydrated: _hasHydrated,
30356
30598
  conversationCount: conversations.length,
@@ -30359,7 +30601,7 @@ var init_chat2 = __esm({
30359
30601
  storeState: "main-chat"
30360
30602
  });
30361
30603
  }, [_hasHydrated, conversations, currentId]);
30362
- (0, import_react60.useEffect)(() => {
30604
+ (0, import_react61.useEffect)(() => {
30363
30605
  if (!_hasHydrated || !chatContainerEl) return;
30364
30606
  let rafId = null;
30365
30607
  const sync = () => {
@@ -30394,7 +30636,7 @@ var init_chat2 = __esm({
30394
30636
  notificationService2?.handleHttpError(error);
30395
30637
  }
30396
30638
  });
30397
- const handleStop = (0, import_react60.useCallback)(() => {
30639
+ const handleStop = (0, import_react61.useCallback)(() => {
30398
30640
  try {
30399
30641
  aiProvider.cancel();
30400
30642
  } catch (error) {
@@ -30403,7 +30645,7 @@ var init_chat2 = __esm({
30403
30645
  });
30404
30646
  }
30405
30647
  }, [aiProvider]);
30406
- const handleVoiceInterrupt = (0, import_react60.useCallback)(() => {
30648
+ const handleVoiceInterrupt = (0, import_react61.useCallback)(() => {
30407
30649
  try {
30408
30650
  ttsStop();
30409
30651
  } catch (error) {
@@ -30422,7 +30664,7 @@ var init_chat2 = __esm({
30422
30664
  handleStop();
30423
30665
  }
30424
30666
  }, [ttsStop, isStreaming, handleStop]);
30425
- const handleSend = (0, import_react60.useCallback)(
30667
+ const handleSend = (0, import_react61.useCallback)(
30426
30668
  (question, images, displayQuestion) => {
30427
30669
  const requestStartTime = trackRequestStart();
30428
30670
  const questionForDisplay = displayQuestion || question;
@@ -30532,7 +30774,7 @@ var init_chat2 = __esm({
30532
30774
  trackRequestStart
30533
30775
  ]
30534
30776
  );
30535
- const handleVoiceTranscription = (0, import_react60.useCallback)(
30777
+ const handleVoiceTranscription = (0, import_react61.useCallback)(
30536
30778
  (text) => {
30537
30779
  const cleaned = text.trim();
30538
30780
  if (!cleaned) {
@@ -30549,7 +30791,7 @@ var init_chat2 = __esm({
30549
30791
  onInterrupt: handleVoiceInterrupt,
30550
30792
  onError: (message) => notificationService2?.showError?.(message)
30551
30793
  });
30552
- (0, import_react60.useEffect)(() => {
30794
+ (0, import_react61.useEffect)(() => {
30553
30795
  const previouslyEnabled = previousVoiceModeEnabledRef.current;
30554
30796
  previousVoiceModeEnabledRef.current = isVoiceModeEnabled;
30555
30797
  if (!previouslyEnabled && isVoiceModeEnabled) {
@@ -30574,7 +30816,7 @@ var init_chat2 = __esm({
30574
30816
  }
30575
30817
  }
30576
30818
  }, [isVoiceModeEnabled, ttsStop]);
30577
- (0, import_react60.useEffect)(() => {
30819
+ (0, import_react61.useEffect)(() => {
30578
30820
  if (!isVoiceModeEnabled || !isStreaming) {
30579
30821
  return;
30580
30822
  }
@@ -30594,7 +30836,7 @@ var init_chat2 = __esm({
30594
30836
  }
30595
30837
  lastSpokenResponseRef.current = null;
30596
30838
  }, [isStreaming, isVoiceModeEnabled, ttsStop]);
30597
- (0, import_react60.useEffect)(() => {
30839
+ (0, import_react61.useEffect)(() => {
30598
30840
  if (!isVoiceModeEnabled) {
30599
30841
  lastSpokenResponseRef.current = null;
30600
30842
  return;
@@ -30635,13 +30877,13 @@ var init_chat2 = __esm({
30635
30877
  cancelled = true;
30636
30878
  };
30637
30879
  }, [history, isStreaming, isVoiceModeEnabled, isTTSAvailable, ttsSpeak]);
30638
- const handleModelChange = (0, import_react60.useCallback)(
30880
+ const handleModelChange = (0, import_react61.useCallback)(
30639
30881
  (modelId) => {
30640
30882
  setSelectedModel(modelId);
30641
30883
  },
30642
30884
  [setSelectedModel]
30643
30885
  );
30644
- const handleVoiceChange = (0, import_react60.useCallback)(async (voiceId) => {
30886
+ const handleVoiceChange = (0, import_react61.useCallback)(async (voiceId) => {
30645
30887
  ttsStop();
30646
30888
  stopTTS();
30647
30889
  setSelectedVoice(voiceId);
@@ -30674,10 +30916,10 @@ var init_chat2 = __esm({
30674
30916
  }
30675
30917
  };
30676
30918
  if (!hydrated || brandingLoading || themeLoading) {
30677
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_material51.ThemeProvider, { theme: banditTheme, children: [
30678
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_material51.CssBaseline, {}),
30679
- /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
30680
- import_material51.Box,
30919
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_material52.ThemeProvider, { theme: banditTheme, children: [
30920
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_material52.CssBaseline, {}),
30921
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
30922
+ import_material52.Box,
30681
30923
  {
30682
30924
  sx: (theme) => ({
30683
30925
  minHeight: "100dvh",
@@ -30690,8 +30932,8 @@ var init_chat2 = __esm({
30690
30932
  color: theme.palette.text.primary
30691
30933
  }),
30692
30934
  children: [
30693
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_material51.CircularProgress, { size: 32, thickness: 4 }),
30694
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_material51.Typography, { variant: "body2", color: "text.secondary", children: "Preparing your workspace..." })
30935
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_material52.CircularProgress, { size: 32, thickness: 4 }),
30936
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_material52.Typography, { variant: "body2", color: "text.secondary", children: "Preparing your workspace..." })
30695
30937
  ]
30696
30938
  }
30697
30939
  )
@@ -30699,15 +30941,15 @@ var init_chat2 = __esm({
30699
30941
  }
30700
30942
  const userHasAccess = playgroundBypassAccess || ossMode || claims?.roles?.includes("super-user") || claims?.roles?.includes("admin");
30701
30943
  if (!userHasAccess) {
30702
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_material51.ThemeProvider, { theme: banditTheme, children: [
30703
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_material51.CssBaseline, {}),
30704
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(under_review_default, {})
30944
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_material52.ThemeProvider, { theme: banditTheme, children: [
30945
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_material52.CssBaseline, {}),
30946
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(under_review_default, {})
30705
30947
  ] });
30706
30948
  }
30707
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_material51.ThemeProvider, { theme: banditTheme, children: [
30708
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_material51.CssBaseline, {}),
30709
- /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
30710
- import_material51.Box,
30949
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_material52.ThemeProvider, { theme: banditTheme, children: [
30950
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_material52.CssBaseline, {}),
30951
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
30952
+ import_material52.Box,
30711
30953
  {
30712
30954
  sx: (theme) => ({
30713
30955
  display: "flex",
@@ -30725,7 +30967,7 @@ var init_chat2 = __esm({
30725
30967
  transition: "left 0.3s ease-in-out, width 0.3s ease-in-out"
30726
30968
  }),
30727
30969
  children: [
30728
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
30970
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
30729
30971
  chat_app_bar_default,
30730
30972
  {
30731
30973
  availableModels,
@@ -30737,8 +30979,8 @@ var init_chat2 = __esm({
30737
30979
  setDrawerOpen
30738
30980
  }
30739
30981
  ),
30740
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
30741
- import_material51.Box,
30982
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
30983
+ import_material52.Box,
30742
30984
  {
30743
30985
  ref: chatContainerRef,
30744
30986
  sx: {
@@ -30758,8 +31000,8 @@ var init_chat2 = __esm({
30758
31000
  msOverflowStyle: "none",
30759
31001
  "&::-webkit-scrollbar": { display: "none" }
30760
31002
  },
30761
- children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
30762
- import_material51.Box,
31003
+ children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
31004
+ import_material52.Box,
30763
31005
  {
30764
31006
  sx: {
30765
31007
  width: "100%",
@@ -30769,9 +31011,9 @@ var init_chat2 = __esm({
30769
31011
  pt: 2
30770
31012
  },
30771
31013
  children: [
30772
- logoShouldRender && !brandingLoading && (branding?.logoBase64 ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(custom_logo_default, { visible: logoVisible, atTop: true }) : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(bandit_chat_logo_default, { visible: logoVisible, atTop: true })),
30773
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
30774
- import_material51.Box,
31014
+ logoShouldRender && !brandingLoading && (branding?.logoBase64 ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(custom_logo_default, { visible: logoVisible, atTop: true }) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(bandit_chat_logo_default, { visible: logoVisible, atTop: true })),
31015
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
31016
+ import_material52.Box,
30775
31017
  {
30776
31018
  sx: {
30777
31019
  margin: "0 auto",
@@ -30780,7 +31022,7 @@ var init_chat2 = __esm({
30780
31022
  flexShrink: 0,
30781
31023
  px: isMobile ? 0 : 0
30782
31024
  },
30783
- children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
31025
+ children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
30784
31026
  chat_messages_default,
30785
31027
  {
30786
31028
  isStreaming,
@@ -30804,7 +31046,7 @@ var init_chat2 = __esm({
30804
31046
  )
30805
31047
  }
30806
31048
  ),
30807
- showScrollToBottom && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
31049
+ showScrollToBottom && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
30808
31050
  chat_scroll_to_bottom_button_default,
30809
31051
  {
30810
31052
  inputHeight,
@@ -30813,8 +31055,8 @@ var init_chat2 = __esm({
30813
31055
  onClick: handleScrollToBottomClick
30814
31056
  }
30815
31057
  ),
30816
- history.length === 0 && componentStatus !== "Loading" && !isMobile && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
30817
- import_material51.Box,
31058
+ history.length === 0 && componentStatus !== "Loading" && !isMobile && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
31059
+ import_material52.Box,
30818
31060
  {
30819
31061
  sx: (theme) => ({
30820
31062
  position: "absolute",
@@ -30832,8 +31074,8 @@ var init_chat2 = __esm({
30832
31074
  })
30833
31075
  }
30834
31076
  ),
30835
- /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
30836
- import_material51.Box,
31077
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
31078
+ import_material52.Box,
30837
31079
  {
30838
31080
  sx: {
30839
31081
  display: "flex",
@@ -30844,10 +31086,11 @@ var init_chat2 = __esm({
30844
31086
  maxWidth: "768px"
30845
31087
  },
30846
31088
  children: [
30847
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_material51.Box, { sx: { flex: "1 1 auto" } }),
30848
- history.length === 0 && componentStatus !== "Loading" && !pendingMessage && preferences.chatSuggestionsEnabled && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_material51.Box, { sx: { marginBottom: "20px" }, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(QuerySuggestionPicker, { onSend: handleSend, inputHeight }) }),
30849
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ask_user_card_default, {}),
30850
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
31089
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_material52.Box, { sx: { flex: "1 1 auto" } }),
31090
+ history.length === 0 && componentStatus !== "Loading" && !pendingMessage && preferences.chatSuggestionsEnabled && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_material52.Box, { sx: { marginBottom: "20px" }, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(QuerySuggestionPicker, { onSend: handleSend, inputHeight }) }),
31091
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(rate_limit_prompt_default, {}),
31092
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ask_user_card_default, {}),
31093
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
30851
31094
  chat_input_default,
30852
31095
  {
30853
31096
  inputValue,
@@ -30874,7 +31117,7 @@ var init_chat2 = __esm({
30874
31117
  ]
30875
31118
  }
30876
31119
  ),
30877
- preferences.feedbackEnabled && !isMobile && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
31120
+ preferences.feedbackEnabled && !isMobile && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
30878
31121
  FeedbackButton,
30879
31122
  {
30880
31123
  fullScreen: false,
@@ -30887,11 +31130,11 @@ var init_chat2 = __esm({
30887
31130
  }
30888
31131
  }
30889
31132
  ),
30890
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ConnectionStatus, { position: "top", showWhenGood: false })
31133
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ConnectionStatus, { position: "top", showWhenGood: false })
30891
31134
  ]
30892
31135
  }
30893
31136
  ),
30894
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(canvas_panel_default, { isMobile })
31137
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(canvas_panel_default, { isMobile })
30895
31138
  ] });
30896
31139
  };
30897
31140
  Chat = () => {
@@ -30917,9 +31160,9 @@ var init_chat2 = __esm({
30917
31160
  });
30918
31161
  if (!allowUnauthenticated && !bypassAuth && !authenticationService.isAuthenticated()) {
30919
31162
  debugLogger.debug("User is not authenticated, redirecting to login");
30920
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react_router_dom4.Navigate, { to: "/login", replace: true });
31163
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react_router_dom5.Navigate, { to: "/login", replace: true });
30921
31164
  }
30922
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ChatContent, {});
31165
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ChatContent, {});
30923
31166
  };
30924
31167
  chat_default = Chat;
30925
31168
  }
@@ -30931,13 +31174,13 @@ __export(management_exports, {
30931
31174
  default: () => management_default
30932
31175
  });
30933
31176
  module.exports = __toCommonJS(management_exports);
30934
- var import_react61 = require("react");
31177
+ var import_react62 = require("react");
30935
31178
  var import_useMediaQuery2 = __toESM(require("@mui/material/useMediaQuery"));
30936
31179
  var import_styles32 = require("@mui/material/styles");
30937
31180
  init_useKnowledgeStore();
30938
31181
  init_indexedDBService();
30939
- var import_material52 = require("@mui/material");
30940
- var import_react_router_dom5 = require("react-router-dom");
31182
+ var import_material53 = require("@mui/material");
31183
+ var import_react_router_dom6 = require("react-router-dom");
30941
31184
 
30942
31185
  // src/modals/chat-modal/chat-modal.tsx
30943
31186
  var import_react23 = require("react");
@@ -43429,7 +43672,7 @@ init_authenticationStore();
43429
43672
  init_useNotificationService();
43430
43673
  init_useFeatures();
43431
43674
  init_lucide_icons();
43432
- var import_jsx_runtime51 = require("react/jsx-runtime");
43675
+ var import_jsx_runtime52 = require("react/jsx-runtime");
43433
43676
  var preloadChatPage = () => Promise.resolve().then(() => (init_chat2(), chat_exports));
43434
43677
  var buildCapabilitiesUrl = (gatewayApiUrl) => {
43435
43678
  const trimmed = gatewayApiUrl.replace(/\/$/, "");
@@ -43439,10 +43682,10 @@ var buildCapabilitiesUrl = (gatewayApiUrl) => {
43439
43682
  return `${trimmed}/api/capabilities`;
43440
43683
  };
43441
43684
  var Management = () => {
43442
- const navigate = (0, import_react_router_dom5.useNavigate)();
43685
+ const navigate = (0, import_react_router_dom6.useNavigate)();
43443
43686
  const notificationService2 = useNotificationService();
43444
43687
  const isMobile = (0, import_useMediaQuery2.default)("(max-width:900px)");
43445
- const [sidebarOpen, setSidebarOpen] = (0, import_react61.useState)(false);
43688
+ const [sidebarOpen, setSidebarOpen] = (0, import_react62.useState)(false);
43446
43689
  const getOptimalFabLogo = async () => {
43447
43690
  const banditHead6 = "https://cdn.burtson.ai/images/bandit-head.png";
43448
43691
  try {
@@ -43482,16 +43725,16 @@ var Management = () => {
43482
43725
  hasTransparentLogo,
43483
43726
  setHasTransparentLogo
43484
43727
  } = useModelStore();
43485
- const [modalOpen, setModalOpen] = (0, import_react61.useState)(false);
43728
+ const [modalOpen, setModalOpen] = (0, import_react62.useState)(false);
43486
43729
  const banditHead5 = "https://cdn.burtson.ai/images/bandit-head.png";
43487
- const [fabLogo, setFabLogo] = (0, import_react61.useState)(banditHead5);
43488
- const [tabIndex, setTabIndex] = (0, import_react61.useState)(4);
43489
- const [logoFile, setLogoFile] = (0, import_react61.useState)(null);
43490
- const [logoBase64, setLogoBase64] = (0, import_react61.useState)(null);
43491
- const [brandingText, setBrandingText] = (0, import_react61.useState)("");
43492
- const [theme, setTheme] = (0, import_react61.useState)("bandit-dark");
43493
- const [customAvatarBase64, setCustomAvatarBase64] = (0, import_react61.useState)(null);
43494
- const [presetAvatar, setPresetAvatar] = (0, import_react61.useState)(null);
43730
+ const [fabLogo, setFabLogo] = (0, import_react62.useState)(banditHead5);
43731
+ const [tabIndex, setTabIndex] = (0, import_react62.useState)(4);
43732
+ const [logoFile, setLogoFile] = (0, import_react62.useState)(null);
43733
+ const [logoBase64, setLogoBase64] = (0, import_react62.useState)(null);
43734
+ const [brandingText, setBrandingText] = (0, import_react62.useState)("");
43735
+ const [theme, setTheme] = (0, import_react62.useState)("bandit-dark");
43736
+ const [customAvatarBase64, setCustomAvatarBase64] = (0, import_react62.useState)(null);
43737
+ const [presetAvatar, setPresetAvatar] = (0, import_react62.useState)(null);
43495
43738
  const showSnackbarMessage = (message, severity = "success") => {
43496
43739
  if (severity === "success") {
43497
43740
  notificationService2?.showSuccess(message);
@@ -43499,9 +43742,9 @@ var Management = () => {
43499
43742
  notificationService2?.showError(message);
43500
43743
  }
43501
43744
  };
43502
- const [restoreDialogOpen, setRestoreDialogOpen] = (0, import_react61.useState)(false);
43503
- const [brandingLoaded, setBrandingLoaded] = (0, import_react61.useState)(false);
43504
- const [isLoadingBranding, setIsLoadingBranding] = (0, import_react61.useState)(false);
43745
+ const [restoreDialogOpen, setRestoreDialogOpen] = (0, import_react62.useState)(false);
43746
+ const [brandingLoaded, setBrandingLoaded] = (0, import_react62.useState)(false);
43747
+ const [isLoadingBranding, setIsLoadingBranding] = (0, import_react62.useState)(false);
43505
43748
  const { initModels } = useModelStore();
43506
43749
  const { settings: packageSettings } = usePackageSettingsStore();
43507
43750
  const authToken = useAuthenticationStore((state) => state.token);
@@ -43509,8 +43752,8 @@ var Management = () => {
43509
43752
  const { hasAdminDashboard, hasLimitedAdminDashboard, getCurrentTier, hasAdvancedSearch } = useFeatures();
43510
43753
  const { showAdminPanel, showLimitedAdminPanel } = useFeatureVisibility();
43511
43754
  const { provider: currentProvider, config: currentProviderConfig } = useAIProviderStore();
43512
- const [seedPacksEnabled, setSeedPacksEnabled] = (0, import_react61.useState)(false);
43513
- const [localSelectedModel, setLocalSelectedModel] = (0, import_react61.useState)({
43755
+ const [seedPacksEnabled, setSeedPacksEnabled] = (0, import_react62.useState)(false);
43756
+ const [localSelectedModel, setLocalSelectedModel] = (0, import_react62.useState)({
43514
43757
  name: "",
43515
43758
  tagline: "",
43516
43759
  systemPrompt: "",
@@ -43523,7 +43766,7 @@ var Management = () => {
43523
43766
  loadDocuments,
43524
43767
  clearAllDocuments
43525
43768
  } = useKnowledgeStore2();
43526
- (0, import_react61.useEffect)(() => {
43769
+ (0, import_react62.useEffect)(() => {
43527
43770
  if (selectedModel) {
43528
43771
  const selected = availableModels.find((m) => m.name === selectedModel);
43529
43772
  if (selected) {
@@ -43547,7 +43790,7 @@ var Management = () => {
43547
43790
  }
43548
43791
  }
43549
43792
  }, [selectedModel, availableModels]);
43550
- const loadBrandingConfig = (0, import_react61.useCallback)(async () => {
43793
+ const loadBrandingConfig = (0, import_react62.useCallback)(async () => {
43551
43794
  if (isLoadingBranding || brandingLoaded) {
43552
43795
  debugLogger.warn("Branding loading already in progress or completed, skipping");
43553
43796
  return;
@@ -43662,15 +43905,15 @@ var Management = () => {
43662
43905
  setTagline,
43663
43906
  setTheme
43664
43907
  ]);
43665
- (0, import_react61.useEffect)(() => {
43908
+ (0, import_react62.useEffect)(() => {
43666
43909
  void loadBrandingConfig();
43667
43910
  }, [loadBrandingConfig]);
43668
43911
  const handleOpenModal = () => setModalOpen(true);
43669
43912
  const handleCloseModal = () => setModalOpen(false);
43670
- (0, import_react61.useEffect)(() => {
43913
+ (0, import_react62.useEffect)(() => {
43671
43914
  getOptimalFabLogo().then(setFabLogo);
43672
43915
  }, []);
43673
- (0, import_react61.useEffect)(() => {
43916
+ (0, import_react62.useEffect)(() => {
43674
43917
  if (logoBase64) {
43675
43918
  setFabLogo(logoBase64);
43676
43919
  } else {
@@ -44117,7 +44360,7 @@ var Management = () => {
44117
44360
  reader.readAsText(file);
44118
44361
  }
44119
44362
  };
44120
- (0, import_react61.useEffect)(() => {
44363
+ (0, import_react62.useEffect)(() => {
44121
44364
  if (localSelectedModel.selectedModel && !availableModels.some((m) => m.name === localSelectedModel.selectedModel)) {
44122
44365
  setLocalSelectedModel((prev) => ({
44123
44366
  ...prev,
@@ -44125,10 +44368,10 @@ var Management = () => {
44125
44368
  }));
44126
44369
  }
44127
44370
  }, [availableModels, localSelectedModel.selectedModel]);
44128
- (0, import_react61.useEffect)(() => {
44371
+ (0, import_react62.useEffect)(() => {
44129
44372
  loadDocuments();
44130
44373
  }, [loadDocuments]);
44131
- (0, import_react61.useEffect)(() => {
44374
+ (0, import_react62.useEffect)(() => {
44132
44375
  const gatewayApiUrl = packageSettings?.gatewayApiUrl;
44133
44376
  if (!gatewayApiUrl || gatewayApiUrl.toLowerCase().startsWith("playground://")) {
44134
44377
  setSeedPacksEnabled(false);
@@ -44171,7 +44414,7 @@ var Management = () => {
44171
44414
  isActive = false;
44172
44415
  };
44173
44416
  }, [packageSettings?.gatewayApiUrl, authToken]);
44174
- const currentTheme = (0, import_react61.useMemo)(() => {
44417
+ const currentTheme = (0, import_react62.useMemo)(() => {
44175
44418
  const baseTheme = predefinedThemes[theme] || banditDarkTheme;
44176
44419
  return (0, import_styles32.createTheme)(baseTheme, {
44177
44420
  // Management-scoped density: condenses every settings tab at once. This
@@ -44228,43 +44471,43 @@ var Management = () => {
44228
44471
  const allNavTabs = [
44229
44472
  {
44230
44473
  label: "Personalities",
44231
- icon: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(FaceRetouchingNaturalIcon, {}),
44474
+ icon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(FaceRetouchingNaturalIcon, {}),
44232
44475
  requiresFeature: "limitedAdminDashboard",
44233
44476
  requiresAdmin: true
44234
44477
  },
44235
44478
  {
44236
44479
  label: "Branding",
44237
- icon: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(BrushIcon, {}),
44480
+ icon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(BrushIcon, {}),
44238
44481
  requiresFeature: "limitedAdminDashboard",
44239
44482
  requiresAdmin: true
44240
44483
  },
44241
44484
  {
44242
44485
  label: "Knowledge",
44243
- icon: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(MenuBookIcon, {}),
44486
+ icon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(MenuBookIcon, {}),
44244
44487
  requiresFeature: "limitedAdminDashboard",
44245
44488
  requiresAdmin: true
44246
44489
  },
44247
44490
  {
44248
44491
  label: "Storage",
44249
- icon: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(StorageIcon, {}),
44492
+ icon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(StorageIcon, {}),
44250
44493
  requiresFeature: "limitedAdminDashboard",
44251
44494
  requiresAdmin: true
44252
44495
  },
44253
44496
  {
44254
44497
  label: "Preferences",
44255
- icon: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(TuneIcon, {}),
44498
+ icon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(TuneIcon, {}),
44256
44499
  requiresFeature: "limitedAdminDashboard",
44257
44500
  requiresAdmin: false
44258
44501
  },
44259
44502
  {
44260
44503
  label: "Provider",
44261
- icon: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(CloudIcon, {}),
44504
+ icon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(CloudIcon, {}),
44262
44505
  requiresFeature: "advancedSearch",
44263
44506
  requiresAdmin: true
44264
44507
  },
44265
44508
  {
44266
44509
  label: "Tools",
44267
- icon: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(BuildIcon, {}),
44510
+ icon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(BuildIcon, {}),
44268
44511
  requiresFeature: "advancedSearch",
44269
44512
  requiresAdmin: true
44270
44513
  }
@@ -44274,7 +44517,9 @@ var Management = () => {
44274
44517
  "platform_admin"
44275
44518
  ]);
44276
44519
  const userRoles = (authenticationService.parseJwtClaims(authenticationService.getToken() ?? "")?.roles ?? []).map((r) => r.toLowerCase());
44277
- const isWorkspaceAdmin = userRoles.some((r) => platformAdminRoles.has(r));
44520
+ const isWorkspaceAdmin = userRoles.some(
44521
+ (r) => platformAdminRoles.has(r) || r.endsWith("-admin")
44522
+ );
44278
44523
  const navTabs = allNavTabs.filter((tab) => {
44279
44524
  if (tab.requiresAdmin && !isWorkspaceAdmin) return false;
44280
44525
  if (tab.requiresFeature === "limitedAdminDashboard") {
@@ -44290,7 +44535,7 @@ var Management = () => {
44290
44535
  });
44291
44536
  const preferredDefaultTabIndex = navTabs.findIndex((tab) => tab.label === "Preferences");
44292
44537
  const defaultTabIndex = preferredDefaultTabIndex >= 0 ? preferredDefaultTabIndex : 0;
44293
- (0, import_react61.useEffect)(() => {
44538
+ (0, import_react62.useEffect)(() => {
44294
44539
  setTabIndex((current) => {
44295
44540
  if (current < 0 || current >= navTabs.length) {
44296
44541
  return defaultTabIndex;
@@ -44300,8 +44545,8 @@ var Management = () => {
44300
44545
  }, [navTabs.length, defaultTabIndex]);
44301
44546
  const mobileQuickTabs = navTabs.slice(0, 5);
44302
44547
  const hasMobileOverflowTabs = navTabs.length > mobileQuickTabs.length;
44303
- const navigationContent = /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
44304
- import_material52.Box,
44548
+ const navigationContent = /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
44549
+ import_material53.Box,
44305
44550
  {
44306
44551
  sx: {
44307
44552
  display: "flex",
@@ -44311,8 +44556,8 @@ var Management = () => {
44311
44556
  bgcolor: "inherit"
44312
44557
  },
44313
44558
  children: [
44314
- isMobile && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
44315
- import_material52.Box,
44559
+ isMobile && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
44560
+ import_material53.Box,
44316
44561
  {
44317
44562
  sx: {
44318
44563
  height: 6,
@@ -44325,15 +44570,15 @@ var Management = () => {
44325
44570
  }
44326
44571
  }
44327
44572
  ),
44328
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_material52.Box, { sx: { p: isMobile ? 2.5 : 3, pb: isMobile ? 1.5 : 2 }, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
44329
- import_material52.Button,
44573
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_material53.Box, { sx: { p: isMobile ? 2.5 : 3, pb: isMobile ? 1.5 : 2 }, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
44574
+ import_material53.Button,
44330
44575
  {
44331
44576
  onClick: () => {
44332
44577
  if (isMobile) setSidebarOpen(false);
44333
44578
  navigate("/chat");
44334
44579
  },
44335
44580
  onMouseEnter: preloadChatPage,
44336
- startIcon: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ChevronLeftIcon, { sx: { fontSize: 20 } }),
44581
+ startIcon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ChevronLeftIcon, { sx: { fontSize: 20 } }),
44337
44582
  fullWidth: true,
44338
44583
  variant: "outlined",
44339
44584
  sx: {
@@ -44360,9 +44605,9 @@ var Management = () => {
44360
44605
  children: "Back to Chat"
44361
44606
  }
44362
44607
  ) }),
44363
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_material52.Divider, { sx: { mx: isMobile ? 2 : 3, mb: 2, opacity: 0.6 } }),
44364
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_material52.Box, { sx: { flex: 1, px: isMobile ? 1.5 : 2, pb: 3, overflowY: "auto" }, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_material52.List, { sx: { px: 0, py: 0 }, children: navTabs.map((tab, idx) => /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
44365
- import_material52.ListItemButton,
44608
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_material53.Divider, { sx: { mx: isMobile ? 2 : 3, mb: 2, opacity: 0.6 } }),
44609
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_material53.Box, { sx: { flex: 1, px: isMobile ? 1.5 : 2, pb: 3, overflowY: "auto" }, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_material53.List, { sx: { px: 0, py: 0 }, children: navTabs.map((tab, idx) => /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
44610
+ import_material53.ListItemButton,
44366
44611
  {
44367
44612
  selected: tabIndex === idx,
44368
44613
  onClick: () => {
@@ -44402,9 +44647,9 @@ var Management = () => {
44402
44647
  "& .MuiListItemIcon-root svg": { width: 17, height: 17 }
44403
44648
  },
44404
44649
  children: [
44405
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_material52.ListItemIcon, { children: tab.icon }),
44406
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
44407
- import_material52.ListItemText,
44650
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_material53.ListItemIcon, { children: tab.icon }),
44651
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
44652
+ import_material53.ListItemText,
44408
44653
  {
44409
44654
  primary: tab.label,
44410
44655
  primaryTypographyProps: {
@@ -44421,10 +44666,10 @@ var Management = () => {
44421
44666
  }
44422
44667
  );
44423
44668
  if (!brandingLoaded) return null;
44424
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_material52.ThemeProvider, { theme: currentTheme, children: [
44425
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_material52.CssBaseline, {}),
44426
- /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
44427
- import_material52.Box,
44669
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_material53.ThemeProvider, { theme: currentTheme, children: [
44670
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_material53.CssBaseline, {}),
44671
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
44672
+ import_material53.Box,
44428
44673
  {
44429
44674
  display: "flex",
44430
44675
  height: "100vh",
@@ -44436,8 +44681,8 @@ var Management = () => {
44436
44681
  position: "relative"
44437
44682
  },
44438
44683
  children: [
44439
- isMobile && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
44440
- import_material52.Box,
44684
+ isMobile && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
44685
+ import_material53.Box,
44441
44686
  {
44442
44687
  sx: {
44443
44688
  width: "100%",
@@ -44456,8 +44701,8 @@ var Management = () => {
44456
44701
  boxShadow: "0 2px 8px rgba(0,0,0,0.1)"
44457
44702
  },
44458
44703
  children: [
44459
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
44460
- import_material52.Button,
44704
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
44705
+ import_material53.Button,
44461
44706
  {
44462
44707
  onClick: () => setSidebarOpen((o) => !o),
44463
44708
  sx: {
@@ -44478,7 +44723,7 @@ var Management = () => {
44478
44723
  transform: sidebarOpen ? "rotate(90deg) scale(0.95)" : "scale(0.95)"
44479
44724
  }
44480
44725
  },
44481
- children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
44726
+ children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
44482
44727
  "path",
44483
44728
  {
44484
44729
  d: sidebarOpen ? "M18 6L6 18M6 6L18 18" : "M3 12H21M3 6H21M3 18H21",
@@ -44490,8 +44735,8 @@ var Management = () => {
44490
44735
  ) })
44491
44736
  }
44492
44737
  ),
44493
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
44494
- import_material52.Typography,
44738
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
44739
+ import_material53.Typography,
44495
44740
  {
44496
44741
  variant: "h6",
44497
44742
  sx: {
@@ -44503,14 +44748,14 @@ var Management = () => {
44503
44748
  children: "Management"
44504
44749
  }
44505
44750
  ),
44506
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_material52.Box, { sx: {
44751
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_material53.Box, { sx: {
44507
44752
  px: 2,
44508
44753
  py: 0.5,
44509
44754
  borderRadius: 2,
44510
44755
  bgcolor: (theme2) => theme2.palette.mode === "dark" ? "rgba(25,118,210,0.12)" : "rgba(25,118,210,0.08)",
44511
44756
  border: (theme2) => `1px solid ${theme2.palette.primary.main}20`
44512
- }, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
44513
- import_material52.Typography,
44757
+ }, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
44758
+ import_material53.Typography,
44514
44759
  {
44515
44760
  variant: "caption",
44516
44761
  sx: {
@@ -44524,8 +44769,8 @@ var Management = () => {
44524
44769
  ]
44525
44770
  }
44526
44771
  ),
44527
- isMobile && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
44528
- import_material52.Box,
44772
+ isMobile && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
44773
+ import_material53.Box,
44529
44774
  {
44530
44775
  sx: {
44531
44776
  width: "100%",
@@ -44542,8 +44787,8 @@ var Management = () => {
44542
44787
  mobileQuickTabs.map((tab) => {
44543
44788
  const quickTabIndex = navTabs.findIndex((navTab) => navTab.label === tab.label);
44544
44789
  const selected = tabIndex === quickTabIndex;
44545
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
44546
- import_material52.Button,
44790
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
44791
+ import_material53.Button,
44547
44792
  {
44548
44793
  size: "small",
44549
44794
  onClick: () => setTabIndex(quickTabIndex),
@@ -44568,8 +44813,8 @@ var Management = () => {
44568
44813
  tab.label
44569
44814
  );
44570
44815
  }),
44571
- hasMobileOverflowTabs && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
44572
- import_material52.Button,
44816
+ hasMobileOverflowTabs && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
44817
+ import_material53.Button,
44573
44818
  {
44574
44819
  size: "small",
44575
44820
  onClick: () => setSidebarOpen(true),
@@ -44591,8 +44836,8 @@ var Management = () => {
44591
44836
  ]
44592
44837
  }
44593
44838
  ),
44594
- isMobile ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
44595
- import_material52.SwipeableDrawer,
44839
+ isMobile ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
44840
+ import_material53.SwipeableDrawer,
44596
44841
  {
44597
44842
  anchor: "bottom",
44598
44843
  open: sidebarOpen,
@@ -44612,8 +44857,8 @@ var Management = () => {
44612
44857
  },
44613
44858
  children: navigationContent
44614
44859
  }
44615
- ) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
44616
- import_material52.Box,
44860
+ ) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
44861
+ import_material53.Box,
44617
44862
  {
44618
44863
  sx: {
44619
44864
  width: 240,
@@ -44636,8 +44881,8 @@ var Management = () => {
44636
44881
  children: navigationContent
44637
44882
  }
44638
44883
  ),
44639
- /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
44640
- import_material52.Box,
44884
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
44885
+ import_material53.Box,
44641
44886
  {
44642
44887
  sx: {
44643
44888
  flex: 1,
@@ -44656,7 +44901,7 @@ var Management = () => {
44656
44901
  transition: "margin-left 0.2s"
44657
44902
  },
44658
44903
  children: [
44659
- navTabs[tabIndex]?.label === "Personalities" && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
44904
+ navTabs[tabIndex]?.label === "Personalities" && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
44660
44905
  PersonalitiesTab_default,
44661
44906
  {
44662
44907
  availableModels,
@@ -44675,7 +44920,7 @@ var Management = () => {
44675
44920
  showSnackbar: showSnackbarMessage
44676
44921
  }
44677
44922
  ),
44678
- navTabs[tabIndex]?.label === "Branding" && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
44923
+ navTabs[tabIndex]?.label === "Branding" && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
44679
44924
  BrandingTab_default,
44680
44925
  {
44681
44926
  logoFile,
@@ -44694,7 +44939,7 @@ var Management = () => {
44694
44939
  setLogoBase64
44695
44940
  }
44696
44941
  ),
44697
- navTabs[tabIndex]?.label === "Knowledge" && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
44942
+ navTabs[tabIndex]?.label === "Knowledge" && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
44698
44943
  KnowledgeHubTab_default,
44699
44944
  {
44700
44945
  documents,
@@ -44707,8 +44952,8 @@ var Management = () => {
44707
44952
  seedPacksEnabled
44708
44953
  }
44709
44954
  ),
44710
- navTabs[tabIndex]?.label === "Storage" && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(StorageTab_default, { currentTheme }),
44711
- navTabs[tabIndex]?.label === "Preferences" && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
44955
+ navTabs[tabIndex]?.label === "Storage" && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(StorageTab_default, { currentTheme }),
44956
+ navTabs[tabIndex]?.label === "Preferences" && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
44712
44957
  PreferencesTab_default,
44713
44958
  {
44714
44959
  preferences,
@@ -44718,13 +44963,13 @@ var Management = () => {
44718
44963
  showSnackbar: showSnackbarMessage
44719
44964
  }
44720
44965
  ),
44721
- navTabs[tabIndex]?.label === "Provider" && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ProviderTab, {}),
44722
- navTabs[tabIndex]?.label === "Tools" && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(MCPToolsTabV2_default, {})
44966
+ navTabs[tabIndex]?.label === "Provider" && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ProviderTab, {}),
44967
+ navTabs[tabIndex]?.label === "Tools" && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(MCPToolsTabV2_default, {})
44723
44968
  ]
44724
44969
  }
44725
44970
  ),
44726
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
44727
- import_material52.Fab,
44971
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
44972
+ import_material53.Fab,
44728
44973
  {
44729
44974
  "aria-label": "AI",
44730
44975
  onClick: handleOpenModal,
@@ -44745,7 +44990,7 @@ var Management = () => {
44745
44990
  boxShadow: theme2.shadows[6],
44746
44991
  zIndex: 2e3
44747
44992
  }),
44748
- children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
44993
+ children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
44749
44994
  "img",
44750
44995
  {
44751
44996
  src: fabLogo,
@@ -44759,7 +45004,7 @@ var Management = () => {
44759
45004
  )
44760
45005
  }
44761
45006
  ),
44762
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(chat_modal_default, { open: modalOpen, onClose: handleCloseModal })
45007
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(chat_modal_default, { open: modalOpen, onClose: handleCloseModal })
44763
45008
  ]
44764
45009
  }
44765
45010
  )