@burtson-labs/bandit-engine 2.0.77 → 2.0.79

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.
@@ -4,7 +4,7 @@ import {
4
4
  getHighlightTree,
5
5
  markdownSanitizeSchema,
6
6
  renderLowlightChildren
7
- } from "./chunk-6DY7W4NK.mjs";
7
+ } from "./chunk-57L7TXB6.mjs";
8
8
 
9
9
  // src/components/StreamingMarkdown.tsx
10
10
  import React, { useEffect, useMemo, useRef, useState } from "react";
@@ -495,4 +495,4 @@ var StreamingMarkdown_default = React.memo(StreamingMarkdown, arePropsEqual);
495
495
  export {
496
496
  StreamingMarkdown_default
497
497
  };
498
- //# sourceMappingURL=chunk-U633CJBV.mjs.map
498
+ //# sourceMappingURL=chunk-YYYEMVBV.mjs.map
package/dist/index.d.mts CHANGED
@@ -14,6 +14,18 @@ declare const Chat: () => react_jsx_runtime.JSX.Element | null;
14
14
 
15
15
  declare const Management: () => react_jsx_runtime.JSX.Element | null;
16
16
 
17
+ interface InterestsEditorProps {
18
+ title?: string | null;
19
+ description?: string | null;
20
+ }
21
+ /**
22
+ * Topic picker for the user's interests. Self-contained — hydrates the
23
+ * preferences store on mount so it works anywhere (e.g. the account profile
24
+ * page, outside the chat). Edits persist to the same store the home-screen
25
+ * conversation starters read from.
26
+ */
27
+ declare const InterestsEditor: ({ title, description, }: InterestsEditorProps) => react_jsx_runtime.JSX.Element;
28
+
17
29
  declare function defineCustomElement<Props extends Record<string, unknown>>(name: string, Component: React.ComponentType<Props>): void;
18
30
 
19
31
  /**
@@ -1337,4 +1349,4 @@ declare const useVectorStore: () => {
1337
1349
  initializeVectorService: () => Promise<void>;
1338
1350
  };
1339
1351
 
1340
- export { Chat, type CreateMemoryOptions, DebugLogger, FeatureEvaluation, FeatureFlagConfig, FeatureFlagContext, type FeatureFlagContextValue, FeatureFlagProvider, type FeatureFlagProviderProps, FeatureFlagService, FeatureKey, FeedbackButton, type FeedbackButtonProps, type FeedbackCategories, FeedbackModal, type FeedbackModalProps, type FeedbackPriorities, type FeedbackRequest, type FeedbackResponse, type FileUploadResult, type GatewayQueryOptions, type LogContext, Management, type MemorySearchFilters, type MigrationProgress, type MigrationStatus, type NotificationConfig, type NotificationContextType, NotificationProvider, type NotificationProviderProps, NotificationService, SYSTEM_FLAGS, type SearchOptions, type SearchResult, StreamingTTSClient, SubscriptionExpiredGuard, type SubscriptionExpiredGuardProps, SubscriptionExpiredModal, type SubscriptionExpiredModalProps, SubscriptionTier, type TTSOptions, type TTSProgress, TTSState, TrialUsage, type UploadRequest, type UseTTSReturn, VectorDatabaseService, type VectorDocument, type VectorMemory, type VectorMemoryMetadata, VectorMigrationService, type VectorStoreStatus, type VoiceState, authenticationService, debugLogger, defineCustomElement, featureFlagService, getCriticalConfig, getFeatureMatrix, getStreamingTTSClient, getSystemConstants, getTTSState, handleHttpError, handleSubscriptionUpgrade, handleValidationError, initializeCoreSystem, notificationService, pauseTTS, previewTierUpgrade, resumeTTS, showInfoNotification, showSuccessNotification, speakStream as speakWithStreaming, stopTTS, syncSubscriptionWithAPI, updateSubscriptionTier, useFeatureFlag, useFeatureVisibility, useFeatures, useGatewayHealth, useGatewayMemory, useGatewayModels, useGlobalTTS, useNotification, useNotificationService, useTTS, useVectorStore, useVoiceStore, useVoices, validateEnvironment, validateSystemIntegrity, vectorDatabaseService, vectorMigrationService };
1352
+ export { Chat, type CreateMemoryOptions, DebugLogger, FeatureEvaluation, FeatureFlagConfig, FeatureFlagContext, type FeatureFlagContextValue, FeatureFlagProvider, type FeatureFlagProviderProps, FeatureFlagService, FeatureKey, FeedbackButton, type FeedbackButtonProps, type FeedbackCategories, FeedbackModal, type FeedbackModalProps, type FeedbackPriorities, type FeedbackRequest, type FeedbackResponse, type FileUploadResult, type GatewayQueryOptions, InterestsEditor, type LogContext, Management, type MemorySearchFilters, type MigrationProgress, type MigrationStatus, type NotificationConfig, type NotificationContextType, NotificationProvider, type NotificationProviderProps, NotificationService, SYSTEM_FLAGS, type SearchOptions, type SearchResult, StreamingTTSClient, SubscriptionExpiredGuard, type SubscriptionExpiredGuardProps, SubscriptionExpiredModal, type SubscriptionExpiredModalProps, SubscriptionTier, type TTSOptions, type TTSProgress, TTSState, TrialUsage, type UploadRequest, type UseTTSReturn, VectorDatabaseService, type VectorDocument, type VectorMemory, type VectorMemoryMetadata, VectorMigrationService, type VectorStoreStatus, type VoiceState, authenticationService, debugLogger, defineCustomElement, featureFlagService, getCriticalConfig, getFeatureMatrix, getStreamingTTSClient, getSystemConstants, getTTSState, handleHttpError, handleSubscriptionUpgrade, handleValidationError, initializeCoreSystem, notificationService, pauseTTS, previewTierUpgrade, resumeTTS, showInfoNotification, showSuccessNotification, speakStream as speakWithStreaming, stopTTS, syncSubscriptionWithAPI, updateSubscriptionTier, useFeatureFlag, useFeatureVisibility, useFeatures, useGatewayHealth, useGatewayMemory, useGatewayModels, useGlobalTTS, useNotification, useNotificationService, useTTS, useVectorStore, useVoiceStore, useVoices, validateEnvironment, validateSystemIntegrity, vectorDatabaseService, vectorMigrationService };
package/dist/index.d.ts CHANGED
@@ -14,6 +14,18 @@ declare const Chat: () => react_jsx_runtime.JSX.Element | null;
14
14
 
15
15
  declare const Management: () => react_jsx_runtime.JSX.Element | null;
16
16
 
17
+ interface InterestsEditorProps {
18
+ title?: string | null;
19
+ description?: string | null;
20
+ }
21
+ /**
22
+ * Topic picker for the user's interests. Self-contained — hydrates the
23
+ * preferences store on mount so it works anywhere (e.g. the account profile
24
+ * page, outside the chat). Edits persist to the same store the home-screen
25
+ * conversation starters read from.
26
+ */
27
+ declare const InterestsEditor: ({ title, description, }: InterestsEditorProps) => react_jsx_runtime.JSX.Element;
28
+
17
29
  declare function defineCustomElement<Props extends Record<string, unknown>>(name: string, Component: React.ComponentType<Props>): void;
18
30
 
19
31
  /**
@@ -1337,4 +1349,4 @@ declare const useVectorStore: () => {
1337
1349
  initializeVectorService: () => Promise<void>;
1338
1350
  };
1339
1351
 
1340
- export { Chat, type CreateMemoryOptions, DebugLogger, FeatureEvaluation, FeatureFlagConfig, FeatureFlagContext, type FeatureFlagContextValue, FeatureFlagProvider, type FeatureFlagProviderProps, FeatureFlagService, FeatureKey, FeedbackButton, type FeedbackButtonProps, type FeedbackCategories, FeedbackModal, type FeedbackModalProps, type FeedbackPriorities, type FeedbackRequest, type FeedbackResponse, type FileUploadResult, type GatewayQueryOptions, type LogContext, Management, type MemorySearchFilters, type MigrationProgress, type MigrationStatus, type NotificationConfig, type NotificationContextType, NotificationProvider, type NotificationProviderProps, NotificationService, SYSTEM_FLAGS, type SearchOptions, type SearchResult, StreamingTTSClient, SubscriptionExpiredGuard, type SubscriptionExpiredGuardProps, SubscriptionExpiredModal, type SubscriptionExpiredModalProps, SubscriptionTier, type TTSOptions, type TTSProgress, TTSState, TrialUsage, type UploadRequest, type UseTTSReturn, VectorDatabaseService, type VectorDocument, type VectorMemory, type VectorMemoryMetadata, VectorMigrationService, type VectorStoreStatus, type VoiceState, authenticationService, debugLogger, defineCustomElement, featureFlagService, getCriticalConfig, getFeatureMatrix, getStreamingTTSClient, getSystemConstants, getTTSState, handleHttpError, handleSubscriptionUpgrade, handleValidationError, initializeCoreSystem, notificationService, pauseTTS, previewTierUpgrade, resumeTTS, showInfoNotification, showSuccessNotification, speakStream as speakWithStreaming, stopTTS, syncSubscriptionWithAPI, updateSubscriptionTier, useFeatureFlag, useFeatureVisibility, useFeatures, useGatewayHealth, useGatewayMemory, useGatewayModels, useGlobalTTS, useNotification, useNotificationService, useTTS, useVectorStore, useVoiceStore, useVoices, validateEnvironment, validateSystemIntegrity, vectorDatabaseService, vectorMigrationService };
1352
+ export { Chat, type CreateMemoryOptions, DebugLogger, FeatureEvaluation, FeatureFlagConfig, FeatureFlagContext, type FeatureFlagContextValue, FeatureFlagProvider, type FeatureFlagProviderProps, FeatureFlagService, FeatureKey, FeedbackButton, type FeedbackButtonProps, type FeedbackCategories, FeedbackModal, type FeedbackModalProps, type FeedbackPriorities, type FeedbackRequest, type FeedbackResponse, type FileUploadResult, type GatewayQueryOptions, InterestsEditor, type LogContext, Management, type MemorySearchFilters, type MigrationProgress, type MigrationStatus, type NotificationConfig, type NotificationContextType, NotificationProvider, type NotificationProviderProps, NotificationService, SYSTEM_FLAGS, type SearchOptions, type SearchResult, StreamingTTSClient, SubscriptionExpiredGuard, type SubscriptionExpiredGuardProps, SubscriptionExpiredModal, type SubscriptionExpiredModalProps, SubscriptionTier, type TTSOptions, type TTSProgress, TTSState, TrialUsage, type UploadRequest, type UseTTSReturn, VectorDatabaseService, type VectorDocument, type VectorMemory, type VectorMemoryMetadata, VectorMigrationService, type VectorStoreStatus, type VoiceState, authenticationService, debugLogger, defineCustomElement, featureFlagService, getCriticalConfig, getFeatureMatrix, getStreamingTTSClient, getSystemConstants, getTTSState, handleHttpError, handleSubscriptionUpgrade, handleValidationError, initializeCoreSystem, notificationService, pauseTTS, previewTierUpgrade, resumeTTS, showInfoNotification, showSuccessNotification, speakStream as speakWithStreaming, stopTTS, syncSubscriptionWithAPI, updateSubscriptionTier, useFeatureFlag, useFeatureVisibility, useFeatures, useGatewayHealth, useGatewayMemory, useGatewayModels, useGlobalTTS, useNotification, useNotificationService, useTTS, useVectorStore, useVoiceStore, useVoices, validateEnvironment, validateSystemIntegrity, vectorDatabaseService, vectorMigrationService };
package/dist/index.js CHANGED
@@ -16262,7 +16262,7 @@ var init_memory_modal = __esm({
16262
16262
  {
16263
16263
  variant: "body2",
16264
16264
  sx: { color: theme.palette.text.secondary, fontSize: "0.85rem", textAlign: isMobileView ? "left" : "center" },
16265
- children: shouldUseVectorForMemories ? "\u{1F680} AI-Powered Vector Memory. Semantic search across your conversations." : "\u{1F9E0} Private. Local. Yours. You control your memories."
16265
+ children: shouldUseVectorForMemories ? "Semantic memory \u2014 searches meaning across your conversations." : "Private and local. You decide what's remembered."
16266
16266
  }
16267
16267
  ) }),
16268
16268
  /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
@@ -16495,7 +16495,7 @@ var init_memory_modal = __esm({
16495
16495
  fontStyle: "italic",
16496
16496
  mt: 0.5,
16497
16497
  display: "block"
16498
- }, children: "\u{1F4CC} Pinned" })
16498
+ }, children: "Pinned" })
16499
16499
  ] })
16500
16500
  ]
16501
16501
  }
@@ -18617,7 +18617,7 @@ ${sanitize(
18617
18617
  };
18618
18618
  const memory = localStorage.getItem("bandit-memory");
18619
18619
  const hasAttachmentAction = !isPlaygroundMode3 && fileInputs.length < 3 && isDocumentUploadEnabled;
18620
- const hasMemoryAction = isMemoryEnabled;
18620
+ const hasMemoryAction = false;
18621
18621
  const hasFeedbackAction = isFeedbackEnabled && isMobile;
18622
18622
  const hasSttAction = isSTTAvailable && !isVoiceModeEnabled;
18623
18623
  const hasSecondaryActions = isMobile && (hasAttachmentAction || hasMemoryAction || hasFeedbackAction || hasSttAction);
@@ -23501,6 +23501,7 @@ var init_conversation_drawer = __esm({
23501
23501
  init_conversationStore();
23502
23502
  init_projectStore();
23503
23503
  init_authenticationStore();
23504
+ init_packageSettingsStore();
23504
23505
  init_brandingService();
23505
23506
  init_project_management_modal();
23506
23507
  init_move_conversation_modal();
@@ -23602,19 +23603,45 @@ var init_conversation_drawer = __esm({
23602
23603
  }, [user2, userDisplayName]);
23603
23604
  const [avatarImage, setAvatarImage] = (0, import_react30.useState)(BANDIT_AVATAR);
23604
23605
  (0, import_react30.useEffect)(() => {
23605
- const fetchBranding = async () => {
23606
+ let active2 = true;
23607
+ let objectUrl = null;
23608
+ const resolveAvatar2 = async () => {
23609
+ try {
23610
+ const avatarId = getCustomClaim("avatarUrl");
23611
+ const fileStorageApiUrl = usePackageSettingsStore.getState().settings?.fileStorageApiUrl;
23612
+ const token = useAuthenticationStore.getState().token;
23613
+ if (avatarId && fileStorageApiUrl && token) {
23614
+ const base = fileStorageApiUrl.replace(/\/$/, "");
23615
+ const res = await fetch(`${base}/app-asset/download/${encodeURIComponent(avatarId)}`, {
23616
+ headers: { Authorization: `Bearer ${token}` }
23617
+ });
23618
+ if (res.ok) {
23619
+ const blob = await res.blob();
23620
+ if (active2) {
23621
+ objectUrl = URL.createObjectURL(blob);
23622
+ setAvatarImage(objectUrl);
23623
+ }
23624
+ return;
23625
+ }
23626
+ }
23627
+ } catch {
23628
+ }
23606
23629
  try {
23607
23630
  const branding = await brandingService_default.getBranding();
23608
- setAvatarImage(branding?.logoBase64 || BANDIT_AVATAR);
23631
+ if (active2) setAvatarImage(branding?.logoBase64 || BANDIT_AVATAR);
23609
23632
  } catch (error) {
23610
23633
  debugLogger.error("Failed to load branding avatar", {
23611
23634
  error: error instanceof Error ? error.message : String(error)
23612
23635
  });
23613
- setAvatarImage(BANDIT_AVATAR);
23636
+ if (active2) setAvatarImage(BANDIT_AVATAR);
23614
23637
  }
23615
23638
  };
23616
- fetchBranding();
23617
- }, []);
23639
+ resolveAvatar2();
23640
+ return () => {
23641
+ active2 = false;
23642
+ if (objectUrl) URL.revokeObjectURL(objectUrl);
23643
+ };
23644
+ }, [getCustomClaim]);
23618
23645
  const avatarLabel = userDisplayName || user2?.email || "Bandit";
23619
23646
  const avatarInitials = (0, import_react30.useMemo)(() => deriveInitials(avatarLabel), [avatarLabel]);
23620
23647
  (0, import_react30.useEffect)(() => {
@@ -24119,6 +24146,10 @@ var init_conversation_drawer = __esm({
24119
24146
  /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
24120
24147
  import_material21.Box,
24121
24148
  {
24149
+ onClick: user2 ? () => {
24150
+ window.location.href = "/profile";
24151
+ } : void 0,
24152
+ title: user2 ? "Profile & settings" : void 0,
24122
24153
  sx: {
24123
24154
  mt: "auto",
24124
24155
  px: 2,
@@ -24128,7 +24159,10 @@ var init_conversation_drawer = __esm({
24128
24159
  alignItems: "center",
24129
24160
  gap: 1.5,
24130
24161
  justifyContent: "center",
24131
- bgcolor: (0, import_material21.alpha)(theme.palette.background.default, isMobile ? 0.9 : 0.6)
24162
+ bgcolor: (0, import_material21.alpha)(theme.palette.background.default, isMobile ? 0.9 : 0.6),
24163
+ cursor: user2 ? "pointer" : "default",
24164
+ transition: "background-color 0.15s ease",
24165
+ "&:hover": user2 ? { bgcolor: (0, import_material21.alpha)(theme.palette.primary.main, 0.08) } : void 0
24132
24166
  },
24133
24167
  children: [
24134
24168
  /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
@@ -30613,6 +30647,7 @@ __export(index_exports, {
30613
30647
  FeatureFlagService: () => FeatureFlagService,
30614
30648
  FeedbackButton: () => FeedbackButton,
30615
30649
  FeedbackModal: () => FeedbackModal,
30650
+ InterestsEditor: () => InterestsEditor_default,
30616
30651
  Management: () => management_default,
30617
30652
  NotificationProvider: () => NotificationProvider,
30618
30653
  NotificationService: () => NotificationService,
@@ -35846,6 +35881,7 @@ var PersonalitiesTab_default = PersonalitiesTab;
35846
35881
 
35847
35882
  // src/management/components/PreferencesTab.tsx
35848
35883
  var import_react48 = require("react");
35884
+ init_memory_modal();
35849
35885
  var import_material39 = require("@mui/material");
35850
35886
  init_preferencesStore();
35851
35887
  init_getStableQuestionPrompt();
@@ -35942,6 +35978,7 @@ var PreferencesTab = ({
35942
35978
  const [syncToggleLoading, setSyncToggleLoading] = (0, import_react48.useState)(false);
35943
35979
  const [manualSyncLoading, setManualSyncLoading] = (0, import_react48.useState)(false);
35944
35980
  const [advancedVectorToggleLoading, setAdvancedVectorToggleLoading] = (0, import_react48.useState)(false);
35981
+ const [memoryModalOpen, setMemoryModalOpen] = (0, import_react48.useState)(false);
35945
35982
  const timeoutRef = (0, import_react48.useRef)(null);
35946
35983
  const fileInputRef = (0, import_react48.useRef)(null);
35947
35984
  const { exportPreferences, importPreferences, resetToDefaults } = usePreferencesStore();
@@ -36501,6 +36538,10 @@ var PreferencesTab = ({
36501
36538
  ] })
36502
36539
  }
36503
36540
  ),
36541
+ preferences.memoryEnabled && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_material39.Box, { sx: { pl: { xs: 0, sm: 6 }, mt: -0.5, mb: 0.5 }, children: [
36542
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_material39.Button, { size: "small", variant: "outlined", onClick: () => setMemoryModalOpen(true), children: "Manage memories" }),
36543
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(memory_modal_default, { open: memoryModalOpen, onClose: () => setMemoryModalOpen(false) })
36544
+ ] }),
36504
36545
  /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
36505
36546
  import_material39.FormControlLabel,
36506
36547
  {
@@ -44717,8 +44758,53 @@ var Management = () => {
44717
44758
  };
44718
44759
  var management_default = Management;
44719
44760
 
44761
+ // src/management/components/InterestsEditor.tsx
44762
+ var import_react61 = require("react");
44763
+ var import_material51 = require("@mui/material");
44764
+ init_preferencesStore();
44765
+ init_getStableQuestionPrompt();
44766
+ var import_jsx_runtime51 = require("react/jsx-runtime");
44767
+ var InterestsEditor = ({
44768
+ title = "Your interests",
44769
+ description = "Pick the topics you care about \u2014 your home-screen conversation starters lean toward them."
44770
+ }) => {
44771
+ const preferences = usePreferencesStore((s) => s.preferences);
44772
+ const updatePreference = usePreferencesStore((s) => s.updatePreference);
44773
+ const loadPreferences = usePreferencesStore((s) => s.loadPreferences);
44774
+ const isLoaded = usePreferencesStore((s) => s.isLoaded);
44775
+ (0, import_react61.useEffect)(() => {
44776
+ if (!isLoaded) {
44777
+ void loadPreferences();
44778
+ }
44779
+ }, [isLoaded, loadPreferences]);
44780
+ const interests = preferences?.interests ?? [];
44781
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_material51.Box, { children: [
44782
+ title && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_material51.Typography, { variant: "h6", sx: { fontWeight: 600, color: "text.primary" }, children: title }),
44783
+ description && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_material51.Typography, { variant: "body2", color: "text.secondary", sx: { mb: 1.5 }, children: description }),
44784
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_material51.Box, { sx: { display: "flex", flexWrap: "wrap", gap: 1 }, children: TOPICS.map((topic) => {
44785
+ const selected = interests.includes(topic);
44786
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
44787
+ import_material51.Chip,
44788
+ {
44789
+ label: topic,
44790
+ size: "small",
44791
+ color: selected ? "primary" : "default",
44792
+ variant: selected ? "filled" : "outlined",
44793
+ onClick: () => {
44794
+ const next = selected ? interests.filter((t) => t !== topic) : [...interests, topic];
44795
+ updatePreference("interests", next);
44796
+ },
44797
+ sx: { textTransform: "capitalize" }
44798
+ },
44799
+ topic
44800
+ );
44801
+ }) })
44802
+ ] });
44803
+ };
44804
+ var InterestsEditor_default = InterestsEditor;
44805
+
44720
44806
  // src/shared/custom-element.ts
44721
- var import_react61 = __toESM(require("react"));
44807
+ var import_react62 = __toESM(require("react"));
44722
44808
  var import_client = __toESM(require("react-dom/client"));
44723
44809
  function defineCustomElement(name, Component) {
44724
44810
  if (customElements.get(name)) return;
@@ -44746,7 +44832,7 @@ function defineCustomElement(name, Component) {
44746
44832
  if (!this.root) {
44747
44833
  this.root = import_client.default.createRoot(this.mountPoint);
44748
44834
  }
44749
- this.root.render(import_react61.default.createElement(Component, props));
44835
+ this.root.render(import_react62.default.createElement(Component, props));
44750
44836
  }
44751
44837
  }
44752
44838
  customElements.define(name, ReactElement);
@@ -44955,7 +45041,7 @@ var getFeatureMatrix = () => featureFlagService.generateFeatureMatrix();
44955
45041
  init_featureFlags();
44956
45042
 
44957
45043
  // src/hooks/useVoices.ts
44958
- var import_react62 = require("react");
45044
+ var import_react63 = require("react");
44959
45045
  init_voiceStore();
44960
45046
  init_packageSettingsStore();
44961
45047
  init_authenticationStore();
@@ -44975,7 +45061,7 @@ var useVoices = () => {
44975
45061
  } = useVoiceStore();
44976
45062
  const gatewayApiUrl = usePackageSettingsStore((state) => state.settings?.gatewayApiUrl);
44977
45063
  const { token } = useAuthenticationStore();
44978
- (0, import_react62.useEffect)(() => {
45064
+ (0, import_react63.useEffect)(() => {
44979
45065
  const isAuthenticated = authenticationService.isAuthenticated();
44980
45066
  if (gatewayApiUrl && token && isAuthenticated && !isServiceAvailable) {
44981
45067
  debugLogger.debug("Gateway API URL and JWT token available, loading voice models...");
@@ -45010,9 +45096,9 @@ init_useTTS();
45010
45096
  init_streaming_tts();
45011
45097
 
45012
45098
  // src/modals/SubscriptionExpiredModal.tsx
45013
- var import_material51 = require("@mui/material");
45099
+ var import_material52 = require("@mui/material");
45014
45100
  var import_lucide_react12 = require("lucide-react");
45015
- var import_jsx_runtime51 = require("react/jsx-runtime");
45101
+ var import_jsx_runtime52 = require("react/jsx-runtime");
45016
45102
  var SubscriptionExpiredModal = ({
45017
45103
  open,
45018
45104
  onNavigateHome,
@@ -45034,8 +45120,8 @@ var SubscriptionExpiredModal = ({
45034
45120
  window.location.href = "/manage-subscription";
45035
45121
  }
45036
45122
  };
45037
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
45038
- import_material51.Dialog,
45123
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
45124
+ import_material52.Dialog,
45039
45125
  {
45040
45126
  open,
45041
45127
  onClose,
@@ -45049,47 +45135,47 @@ var SubscriptionExpiredModal = ({
45049
45135
  }
45050
45136
  },
45051
45137
  children: [
45052
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_material51.DialogTitle, { sx: { textAlign: "center", pb: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_material51.Box, { sx: { display: "flex", alignItems: "center", justifyContent: "center", gap: 1, mb: 1 }, children: [
45053
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_lucide_react12.AlertTriangle, { size: 32, color: "warning" }),
45054
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_material51.Typography, { variant: "h5", component: "span", fontWeight: "bold", children: "Subscription Expired" })
45138
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_material52.DialogTitle, { sx: { textAlign: "center", pb: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_material52.Box, { sx: { display: "flex", alignItems: "center", justifyContent: "center", gap: 1, mb: 1 }, children: [
45139
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react12.AlertTriangle, { size: 32, color: "warning" }),
45140
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_material52.Typography, { variant: "h5", component: "span", fontWeight: "bold", children: "Subscription Expired" })
45055
45141
  ] }) }),
45056
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_material51.DialogContent, { sx: { pt: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_material51.Stack, { spacing: 2, children: [
45057
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_material51.Alert, { severity: "warning", sx: { mb: 2 }, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_material51.Typography, { variant: "body2", children: "Your subscription has expired and access to features has been restricted." }) }),
45058
- userEmail && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_material51.Typography, { variant: "body2", color: "text.secondary", sx: { textAlign: "center" }, children: [
45142
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_material52.DialogContent, { sx: { pt: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_material52.Stack, { spacing: 2, children: [
45143
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_material52.Alert, { severity: "warning", sx: { mb: 2 }, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_material52.Typography, { variant: "body2", children: "Your subscription has expired and access to features has been restricted." }) }),
45144
+ userEmail && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_material52.Typography, { variant: "body2", color: "text.secondary", sx: { textAlign: "center" }, children: [
45059
45145
  "Account: ",
45060
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("strong", { children: userEmail })
45146
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("strong", { children: userEmail })
45061
45147
  ] }),
45062
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_material51.Typography, { variant: "body1", sx: { textAlign: "center", color: "text.secondary" }, children: "To continue using all features, please renew your subscription or return to the main application." }),
45063
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_material51.Box, { sx: {
45148
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_material52.Typography, { variant: "body1", sx: { textAlign: "center", color: "text.secondary" }, children: "To continue using all features, please renew your subscription or return to the main application." }),
45149
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_material52.Box, { sx: {
45064
45150
  bgcolor: "background.paper",
45065
45151
  border: 1,
45066
45152
  borderColor: "divider",
45067
45153
  borderRadius: 1,
45068
45154
  p: 2,
45069
45155
  mt: 2
45070
- }, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_material51.Typography, { variant: "caption", color: "text.secondary", sx: { fontStyle: "italic" }, children: [
45071
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("strong", { children: "What's affected:" }),
45156
+ }, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_material52.Typography, { variant: "caption", color: "text.secondary", sx: { fontStyle: "italic" }, children: [
45157
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("strong", { children: "What's affected:" }),
45072
45158
  " All premium features including document upload, voice controls, advanced search, and admin dashboard access have been disabled until your subscription is renewed."
45073
45159
  ] }) })
45074
45160
  ] }) }),
45075
- /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_material51.DialogActions, { sx: { px: 3, pb: 3, gap: 1, justifyContent: "center" }, children: [
45076
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
45077
- import_material51.Button,
45161
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_material52.DialogActions, { sx: { px: 3, pb: 3, gap: 1, justifyContent: "center" }, children: [
45162
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
45163
+ import_material52.Button,
45078
45164
  {
45079
45165
  onClick: handleNavigateHome,
45080
45166
  variant: "outlined",
45081
- startIcon: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_lucide_react12.Home, {}),
45167
+ startIcon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react12.Home, {}),
45082
45168
  size: "large",
45083
45169
  sx: { minWidth: 140 },
45084
45170
  children: "Go Home"
45085
45171
  }
45086
45172
  ),
45087
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
45088
- import_material51.Button,
45173
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
45174
+ import_material52.Button,
45089
45175
  {
45090
45176
  onClick: handleManageSubscription,
45091
45177
  variant: "contained",
45092
- startIcon: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_lucide_react12.CreditCard, {}),
45178
+ startIcon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react12.CreditCard, {}),
45093
45179
  size: "large",
45094
45180
  color: "primary",
45095
45181
  sx: { minWidth: 140 },
@@ -45103,9 +45189,9 @@ var SubscriptionExpiredModal = ({
45103
45189
  };
45104
45190
 
45105
45191
  // src/guards/SubscriptionExpiredGuard.tsx
45106
- var import_react63 = require("react");
45192
+ var import_react64 = require("react");
45107
45193
  init_useFeatures();
45108
- var import_jsx_runtime52 = require("react/jsx-runtime");
45194
+ var import_jsx_runtime53 = require("react/jsx-runtime");
45109
45195
  var SubscriptionExpiredGuard = ({
45110
45196
  children,
45111
45197
  onNavigateHome,
@@ -45114,9 +45200,9 @@ var SubscriptionExpiredGuard = ({
45114
45200
  allowContinue = false
45115
45201
  }) => {
45116
45202
  const { isExpiredTier, getFullEvaluation } = useFeatures();
45117
- const [showModal, setShowModal] = (0, import_react63.useState)(false);
45118
- const [userDismissed, setUserDismissed] = (0, import_react63.useState)(false);
45119
- (0, import_react63.useEffect)(() => {
45203
+ const [showModal, setShowModal] = (0, import_react64.useState)(false);
45204
+ const [userDismissed, setUserDismissed] = (0, import_react64.useState)(false);
45205
+ (0, import_react64.useEffect)(() => {
45120
45206
  if (isExpiredTier() && !userDismissed) {
45121
45207
  setShowModal(true);
45122
45208
  } else {
@@ -45142,9 +45228,9 @@ var SubscriptionExpiredGuard = ({
45142
45228
  }
45143
45229
  return void 0;
45144
45230
  })() : void 0;
45145
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
45231
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_jsx_runtime53.Fragment, { children: [
45146
45232
  children,
45147
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
45233
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
45148
45234
  SubscriptionExpiredModal,
45149
45235
  {
45150
45236
  open: showModal,
@@ -45345,6 +45431,7 @@ init_useVectorStore();
45345
45431
  FeatureFlagService,
45346
45432
  FeedbackButton,
45347
45433
  FeedbackModal,
45434
+ InterestsEditor,
45348
45435
  Management,
45349
45436
  NotificationProvider,
45350
45437
  NotificationService,