@burtson-labs/bandit-engine 2.0.162 → 2.0.164
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.
- package/README.md +7 -22
- package/dist/aiProviderStore-PEGSX4PK.mjs +9 -0
- package/dist/chat-OSAVW6L2.mjs +16 -0
- package/dist/chat-provider.js.map +1 -1
- package/dist/chat-provider.mjs +7 -7
- package/dist/{chunk-ZNK3ELTZ.mjs → chunk-5KBTOCQZ.mjs} +4 -4
- package/dist/chunk-5KBTOCQZ.mjs.map +1 -0
- package/dist/{chunk-Q6LXVYTC.mjs → chunk-CQJGUYRW.mjs} +2 -2
- package/dist/chunk-CQJGUYRW.mjs.map +1 -0
- package/dist/{chunk-47MOBOP3.mjs → chunk-IZX2J65Q.mjs} +2 -2
- package/dist/chunk-IZX2J65Q.mjs.map +1 -0
- package/dist/{chunk-ODGVCSKV.mjs → chunk-J6SWNO7Z.mjs} +6 -27
- package/dist/chunk-J6SWNO7Z.mjs.map +1 -0
- package/dist/{chunk-3ACT5BTW.mjs → chunk-JYBQAKSZ.mjs} +125 -232
- package/dist/chunk-JYBQAKSZ.mjs.map +1 -0
- package/dist/{chunk-G5POQT2R.mjs → chunk-O6P37PFR.mjs} +4 -4
- package/dist/chunk-O6P37PFR.mjs.map +1 -0
- package/dist/{chunk-KCI46M23.mjs → chunk-OCVZVBQQ.mjs} +1 -1
- package/dist/chunk-OCVZVBQQ.mjs.map +1 -0
- package/dist/{chunk-IXIM7BNO.mjs → chunk-P4C5IRM5.mjs} +1 -1
- package/dist/chunk-P4C5IRM5.mjs.map +1 -0
- package/dist/{chunk-RUXYVMW2.mjs → chunk-PNQRS5EN.mjs} +11 -11
- package/dist/chunk-PNQRS5EN.mjs.map +1 -0
- package/dist/{chunk-WQEBTH2R.mjs → chunk-TY5VL3SG.mjs} +3 -3
- package/dist/chunk-TY5VL3SG.mjs.map +1 -0
- package/dist/{chunk-YHSYHU5P.mjs → chunk-URZSIL7X.mjs} +7 -7
- package/dist/chunk-URZSIL7X.mjs.map +1 -0
- package/dist/{chunk-OGMXL7BF.mjs → chunk-VBHI4TJC.mjs} +6 -6
- package/dist/chunk-VBHI4TJC.mjs.map +1 -0
- package/dist/{chunk-R6HMLYKQ.mjs → chunk-WLNZL6SP.mjs} +5 -16
- package/dist/chunk-WLNZL6SP.mjs.map +1 -0
- package/dist/index.d.mts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +577 -728
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -31
- package/dist/index.mjs.map +1 -1
- package/dist/management/management.js +217 -352
- package/dist/management/management.js.map +1 -1
- package/dist/management/management.mjs +10 -10
- package/dist/{memoryUtils-33TZKHSQ.mjs → memoryUtils-2FVXDSS6.mjs} +1 -1
- package/dist/memoryUtils-2FVXDSS6.mjs.map +1 -0
- package/dist/modals/chat-modal/chat-modal.js.map +1 -1
- package/dist/modals/chat-modal/chat-modal.mjs +6 -6
- package/dist/modelStore-7XYYDCNC.mjs +9 -0
- package/dist/shared/custom-element.js.map +1 -1
- package/dist/shared/custom-element.mjs +1 -1
- package/docs/05_contributing.md +1 -1
- package/docs/api_reference/assets/navigation.js +1 -1
- package/docs/api_reference/assets/search.js +1 -1
- package/docs/api_reference/classes/DebugLogger.html +11 -11
- package/docs/api_reference/classes/FeatureFlagService.html +13 -13
- package/docs/api_reference/classes/NotificationService.html +10 -10
- package/docs/api_reference/classes/StreamingTTSClient.html +9 -9
- package/docs/api_reference/classes/VectorDatabaseService.html +24 -24
- package/docs/api_reference/classes/VectorMigrationService.html +8 -8
- package/docs/api_reference/classes/VoiceService.html +2 -2
- package/docs/api_reference/enums/TTSState.html +2 -2
- package/docs/api_reference/functions/Chat.html +1 -1
- package/docs/api_reference/functions/ChatModal.html +1 -1
- package/docs/api_reference/functions/ChatProvider.html +1 -1
- package/docs/api_reference/functions/FeatureFlagProvider.html +1 -1
- package/docs/api_reference/functions/FeedbackButton.html +1 -1
- package/docs/api_reference/functions/FeedbackModal.html +1 -1
- package/docs/api_reference/functions/InterestsEditor.html +5 -0
- package/docs/api_reference/functions/Management.html +1 -1
- package/docs/api_reference/functions/NotificationProvider.html +1 -1
- package/docs/api_reference/functions/SubscriptionExpiredGuard.html +1 -1
- package/docs/api_reference/functions/SubscriptionExpiredModal.html +1 -1
- package/docs/api_reference/functions/defineCustomElement.html +1 -1
- package/docs/api_reference/functions/getCriticalConfig.html +2 -1
- package/docs/api_reference/functions/getFeatureMatrix.html +1 -1
- package/docs/api_reference/functions/getStreamingTTSClient.html +1 -1
- package/docs/api_reference/functions/getSystemConstants.html +2 -1
- package/docs/api_reference/functions/getTTSState.html +1 -1
- package/docs/api_reference/functions/handleHttpError.html +1 -1
- package/docs/api_reference/functions/handleSubscriptionUpgrade.html +1 -1
- package/docs/api_reference/functions/handleValidationError.html +1 -1
- package/docs/api_reference/functions/initializeCoreSystem.html +2 -1
- package/docs/api_reference/functions/isWorkspaceAdminRole.html +6 -0
- package/docs/api_reference/functions/pauseTTS.html +1 -1
- package/docs/api_reference/functions/previewTierUpgrade.html +1 -1
- package/docs/api_reference/functions/resolveManagementSections.html +2 -0
- package/docs/api_reference/functions/resumeTTS.html +1 -1
- package/docs/api_reference/functions/showInfoNotification.html +1 -1
- package/docs/api_reference/functions/showSuccessNotification.html +1 -1
- package/docs/api_reference/functions/speakWithStreaming.html +1 -1
- package/docs/api_reference/functions/stopTTS.html +1 -1
- package/docs/api_reference/functions/syncSubscriptionWithAPI.html +1 -1
- package/docs/api_reference/functions/updateSubscriptionTier.html +1 -1
- package/docs/api_reference/functions/useFeatureFlag.html +1 -1
- package/docs/api_reference/functions/useFeatureVisibility.html +1 -1
- package/docs/api_reference/functions/useFeatures.html +1 -1
- package/docs/api_reference/functions/useGatewayHealth.html +1 -1
- package/docs/api_reference/functions/useGatewayMemory.html +1 -1
- package/docs/api_reference/functions/useGatewayModels.html +1 -1
- package/docs/api_reference/functions/useGlobalTTS.html +1 -1
- package/docs/api_reference/functions/useManagementAccess.html +2 -0
- package/docs/api_reference/functions/useNotification.html +1 -1
- package/docs/api_reference/functions/useNotificationService.html +1 -1
- package/docs/api_reference/functions/useTTS.html +1 -1
- package/docs/api_reference/functions/useVectorStore.html +1 -1
- package/docs/api_reference/functions/useVoiceStore.html +2 -2
- package/docs/api_reference/functions/useVoices.html +1 -1
- package/docs/api_reference/functions/validateEnvironment.html +2 -1
- package/docs/api_reference/functions/validateSystemIntegrity.html +2 -1
- package/docs/api_reference/index.html +219 -155
- package/docs/api_reference/interfaces/AIChatRequest.html +2 -2
- package/docs/api_reference/interfaces/AIChatResponse.html +2 -2
- package/docs/api_reference/interfaces/AIGenerateRequest.html +2 -2
- package/docs/api_reference/interfaces/AIGenerateResponse.html +2 -2
- package/docs/api_reference/interfaces/AIMessage.html +2 -2
- package/docs/api_reference/interfaces/AIModel.html +2 -2
- package/docs/api_reference/interfaces/AIProviderConfig.html +5 -2
- package/docs/api_reference/interfaces/ChatConfig.html +3 -3
- package/docs/api_reference/interfaces/ChatModalProps.html +3 -3
- package/docs/api_reference/interfaces/CreateMemoryOptions.html +2 -2
- package/docs/api_reference/interfaces/FeatureEvaluation.html +7 -7
- package/docs/api_reference/interfaces/FeatureFlagConfig.html +9 -9
- package/docs/api_reference/interfaces/FeatureFlagContextValue.html +8 -8
- package/docs/api_reference/interfaces/FeatureFlagProviderProps.html +2 -2
- package/docs/api_reference/interfaces/FeedbackButtonProps.html +10 -10
- package/docs/api_reference/interfaces/FeedbackCategories.html +2 -2
- package/docs/api_reference/interfaces/FeedbackModalProps.html +2 -2
- package/docs/api_reference/interfaces/FeedbackPriorities.html +2 -2
- package/docs/api_reference/interfaces/FeedbackRequest.html +2 -2
- package/docs/api_reference/interfaces/FeedbackResponse.html +2 -2
- package/docs/api_reference/interfaces/FileUploadResult.html +2 -2
- package/docs/api_reference/interfaces/GatewayChatRequest.html +3 -2
- package/docs/api_reference/interfaces/GatewayChatResponse.html +2 -2
- package/docs/api_reference/interfaces/GatewayContract.html +2 -2
- package/docs/api_reference/interfaces/GatewayGenerateRequest.html +2 -2
- package/docs/api_reference/interfaces/GatewayGenerateResponse.html +2 -2
- package/docs/api_reference/interfaces/GatewayHealthResponse.html +2 -2
- package/docs/api_reference/interfaces/GatewayMemoryRecord.html +2 -2
- package/docs/api_reference/interfaces/GatewayMemoryResponse.html +2 -2
- package/docs/api_reference/interfaces/GatewayMessage.html +2 -2
- package/docs/api_reference/interfaces/GatewayMessageContent.html +2 -2
- package/docs/api_reference/interfaces/GatewayModel.html +2 -2
- package/docs/api_reference/interfaces/GatewayModelsResponse.html +2 -2
- package/docs/api_reference/interfaces/ManagementAccess.html +5 -0
- package/docs/api_reference/interfaces/ManagementAccessInput.html +5 -0
- package/docs/api_reference/interfaces/ManagementLink.html +7 -0
- package/docs/api_reference/interfaces/ManagementProps.html +22 -0
- package/docs/api_reference/interfaces/ManagementSectionDef.html +10 -0
- package/docs/api_reference/interfaces/MemorySearchFilters.html +2 -2
- package/docs/api_reference/interfaces/MigrationProgress.html +2 -2
- package/docs/api_reference/interfaces/MigrationStatus.html +2 -2
- package/docs/api_reference/interfaces/NotificationConfig.html +2 -2
- package/docs/api_reference/interfaces/NotificationContextType.html +2 -2
- package/docs/api_reference/interfaces/NotificationProviderProps.html +2 -2
- package/docs/api_reference/interfaces/PackageSettings.html +11 -2
- package/docs/api_reference/interfaces/SearchOptions.html +2 -2
- package/docs/api_reference/interfaces/SearchResult.html +2 -2
- package/docs/api_reference/interfaces/SubscriptionExpiredGuardProps.html +2 -2
- package/docs/api_reference/interfaces/SubscriptionExpiredModalProps.html +2 -2
- package/docs/api_reference/interfaces/TTSOptions.html +2 -2
- package/docs/api_reference/interfaces/TTSProgress.html +2 -2
- package/docs/api_reference/interfaces/TrialUsage.html +2 -2
- package/docs/api_reference/interfaces/UploadRequest.html +3 -3
- package/docs/api_reference/interfaces/UseTTSReturn.html +2 -2
- package/docs/api_reference/interfaces/VectorDocument.html +2 -2
- package/docs/api_reference/interfaces/VectorMemory.html +2 -2
- package/docs/api_reference/interfaces/VectorMemoryMetadata.html +2 -2
- package/docs/api_reference/interfaces/VectorStoreStatus.html +2 -2
- package/docs/api_reference/interfaces/VoiceModelsResponse.html +2 -2
- package/docs/api_reference/interfaces/VoiceState.html +2 -2
- package/docs/api_reference/media/PROTECTION-NOTICE.md +6 -55
- package/docs/api_reference/media/README.md +20 -1
- package/docs/api_reference/modules.html +18 -6
- package/docs/api_reference/types/FeatureKey.html +1 -1
- package/docs/api_reference/types/FeatureMatrix.html +1 -1
- package/docs/api_reference/types/GatewayQueryOptions.html +1 -1
- package/docs/api_reference/types/LogContext.html +1 -1
- package/docs/api_reference/types/ManagementRequest.html +1 -0
- package/docs/api_reference/types/ManagementSectionId.html +2 -0
- package/docs/api_reference/types/SubscriptionTier.html +1 -1
- package/docs/api_reference/variables/DEFAULT_TIER_FEATURES.html +1 -1
- package/docs/api_reference/variables/FeatureFlagContext.html +1 -1
- package/docs/api_reference/variables/MANAGEMENT_SECTIONS.html +1 -0
- package/docs/api_reference/variables/OSS_DEFAULT_FEATURES.html +1 -1
- package/docs/api_reference/variables/SYSTEM_FLAGS.html +2 -1
- package/docs/api_reference/variables/authenticationService.html +1 -1
- package/docs/api_reference/variables/debugLogger-1.html +1 -1
- package/docs/api_reference/variables/featureFlagService-1.html +1 -1
- package/docs/api_reference/variables/notificationService-1.html +1 -1
- package/docs/api_reference/variables/vectorDatabaseService-1.html +1 -1
- package/docs/api_reference/variables/vectorMigrationService-1.html +1 -1
- package/docs/api_reference/variables/voiceService-1.html +1 -1
- package/package.json +1 -1
- package/dist/aiProviderStore-JOB2H4LP.mjs +0 -9
- package/dist/chat-LB6UEEEW.mjs +0 -16
- package/dist/chunk-3ACT5BTW.mjs.map +0 -1
- package/dist/chunk-47MOBOP3.mjs.map +0 -1
- package/dist/chunk-G5POQT2R.mjs.map +0 -1
- package/dist/chunk-IXIM7BNO.mjs.map +0 -1
- package/dist/chunk-KCI46M23.mjs.map +0 -1
- package/dist/chunk-ODGVCSKV.mjs.map +0 -1
- package/dist/chunk-OGMXL7BF.mjs.map +0 -1
- package/dist/chunk-Q6LXVYTC.mjs.map +0 -1
- package/dist/chunk-R6HMLYKQ.mjs.map +0 -1
- package/dist/chunk-RUXYVMW2.mjs.map +0 -1
- package/dist/chunk-WQEBTH2R.mjs.map +0 -1
- package/dist/chunk-YHSYHU5P.mjs.map +0 -1
- package/dist/chunk-ZNK3ELTZ.mjs.map +0 -1
- package/dist/memoryUtils-33TZKHSQ.mjs.map +0 -1
- package/dist/modelStore-FGUGOWTL.mjs +0 -9
- package/docs/api_reference/media/PROTECTION-README.md +0 -39
- /package/dist/{aiProviderStore-JOB2H4LP.mjs.map → aiProviderStore-PEGSX4PK.mjs.map} +0 -0
- /package/dist/{chat-LB6UEEEW.mjs.map → chat-OSAVW6L2.mjs.map} +0 -0
- /package/dist/{modelStore-FGUGOWTL.mjs.map → modelStore-7XYYDCNC.mjs.map} +0 -0
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
StreamingMarkdown_default,
|
|
6
6
|
isNativeShell,
|
|
7
7
|
isStandalonePwa
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-IZX2J65Q.mjs";
|
|
9
9
|
import {
|
|
10
10
|
useMCPToolsStore
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-O6P37PFR.mjs";
|
|
12
12
|
import {
|
|
13
13
|
ArrowDown,
|
|
14
14
|
ArrowUp,
|
|
@@ -43,12 +43,11 @@ import {
|
|
|
43
43
|
registry_default,
|
|
44
44
|
sanitizeForTTS,
|
|
45
45
|
stopTTS,
|
|
46
|
-
suggestionTokens,
|
|
47
46
|
useCanvasStore,
|
|
48
47
|
useNotificationService,
|
|
49
48
|
useTTS,
|
|
50
49
|
useVoiceStore
|
|
51
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-WLNZL6SP.mjs";
|
|
52
51
|
import {
|
|
53
52
|
brandingService_default,
|
|
54
53
|
detectMessageMood,
|
|
@@ -58,8 +57,6 @@ import {
|
|
|
58
57
|
embeddingService,
|
|
59
58
|
generateConversationStarters,
|
|
60
59
|
getCurrentDateTimeContext,
|
|
61
|
-
getRandomTopicOfInterest,
|
|
62
|
-
pickDistinctRandomTopics,
|
|
63
60
|
sanitizeConversationName,
|
|
64
61
|
useAIQueryStore,
|
|
65
62
|
useConversationStore,
|
|
@@ -71,22 +68,22 @@ import {
|
|
|
71
68
|
useMemoryStore,
|
|
72
69
|
useProjectStore,
|
|
73
70
|
useVectorStore
|
|
74
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-J6SWNO7Z.mjs";
|
|
75
72
|
import {
|
|
76
73
|
indexedDBService_default,
|
|
77
74
|
useModelStore,
|
|
78
75
|
usePackageSettingsStore,
|
|
79
76
|
usePreferencesStore
|
|
80
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-TY5VL3SG.mjs";
|
|
81
78
|
import {
|
|
82
79
|
authenticationService,
|
|
83
80
|
readPersistedToken,
|
|
84
81
|
useAIProviderStore,
|
|
85
82
|
useAuthenticationStore
|
|
86
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-CQJGUYRW.mjs";
|
|
87
84
|
import {
|
|
88
85
|
debugLogger
|
|
89
|
-
} from "./chunk-
|
|
86
|
+
} from "./chunk-OCVZVBQQ.mjs";
|
|
90
87
|
|
|
91
88
|
// src/chat/chat.tsx
|
|
92
89
|
import { useCallback as useCallback6, useEffect as useEffect17, useLayoutEffect, useRef as useRef16, useState as useState19 } from "react";
|
|
@@ -176,8 +173,8 @@ var Logo = ({ visible, atTop = false }) => {
|
|
|
176
173
|
var custom_logo_default = Logo;
|
|
177
174
|
|
|
178
175
|
// src/chat/chat.tsx
|
|
179
|
-
import { Box as Box22, ThemeProvider, CssBaseline, Typography as
|
|
180
|
-
import { alpha as
|
|
176
|
+
import { Box as Box22, ThemeProvider, CssBaseline, Typography as Typography17, Button as Button12, IconButton as IconButton13 } from "@mui/material";
|
|
177
|
+
import { alpha as alpha13 } from "@mui/material/styles";
|
|
181
178
|
|
|
182
179
|
// src/chat/chat-skeleton.tsx
|
|
183
180
|
import { Box as Box2, Skeleton, Typography } from "@mui/material";
|
|
@@ -2707,6 +2704,9 @@ function resolveTelemetryConfig(opts) {
|
|
|
2707
2704
|
if (!hasAuth && opts.banditApiKey) {
|
|
2708
2705
|
headers["Authorization"] = `Bearer ${opts.banditApiKey}`;
|
|
2709
2706
|
}
|
|
2707
|
+
if (!hasAuth && !opts.banditApiKey && /^https:\/\/otlp\.burtson\.ai$/i.test(endpoint)) {
|
|
2708
|
+
return null;
|
|
2709
|
+
}
|
|
2710
2710
|
const mode = opts.telemetry.mode ?? "metrics+traces";
|
|
2711
2711
|
return { endpoint, headers, mode, serviceName: opts.telemetry.serviceName ?? "bandit-web" };
|
|
2712
2712
|
}
|
|
@@ -9769,204 +9769,87 @@ Respond with just the title and nothing else.
|
|
|
9769
9769
|
|
|
9770
9770
|
// src/chat/query-suggestion-picker.tsx
|
|
9771
9771
|
import { useEffect as useEffect14, useRef as useRef13, useState as useState17 } from "react";
|
|
9772
|
-
import { Box as Box18,
|
|
9773
|
-
import {
|
|
9774
|
-
import
|
|
9775
|
-
|
|
9776
|
-
|
|
9777
|
-
|
|
9778
|
-
|
|
9779
|
-
|
|
9780
|
-
|
|
9781
|
-
|
|
9782
|
-
|
|
9783
|
-
|
|
9784
|
-
|
|
9785
|
-
|
|
9786
|
-
var QuerySuggestionPicker = ({
|
|
9787
|
-
onSend,
|
|
9788
|
-
inputHeight
|
|
9789
|
-
}) => {
|
|
9790
|
-
const hasGenerated = useRef13(false);
|
|
9791
|
-
const [hasSentPrompt, setHasSentPrompt] = useState17(false);
|
|
9792
|
-
const [examplePrompts, setExamplePrompts] = useState17([]);
|
|
9793
|
-
const [visiblePrompts, setVisiblePrompts] = useState17([]);
|
|
9794
|
-
const scrollRef = useRef13(null);
|
|
9795
|
-
const theme = useTheme16();
|
|
9796
|
-
const isMobile = useMediaQuery7((theme2) => theme2.breakpoints.down("sm"));
|
|
9797
|
-
const { background, text, border, hoverBackground, hoverBorder } = suggestionTokens(theme);
|
|
9798
|
-
const { getCurrentModel, isLoading } = useModelStore();
|
|
9772
|
+
import { Box as Box18, Button as Button11, Typography as Typography14 } from "@mui/material";
|
|
9773
|
+
import { ArrowRight, FileText, Refresh, ListChecks, PenLine } from "@burtson-labs/icons/react";
|
|
9774
|
+
import { jsx as jsx20, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
9775
|
+
var STARTERS = [
|
|
9776
|
+
{ title: "Make sense of something", detail: "Find the important parts and the open questions.", icon: FileText, prompt: "Help me understand the material I share next. Summarize the key points, distinguish facts from assumptions, and call out what is missing." },
|
|
9777
|
+
{ title: "Think through a decision", detail: "Compare options against what matters to you.", icon: ListChecks, prompt: "Help me work through a decision. Ask me for the options, constraints, and what matters most, then compare the tradeoffs." },
|
|
9778
|
+
{ title: "Create a useful first draft", detail: "Turn a rough idea into something you can use.", icon: PenLine, prompt: "Help me turn an idea into a useful first draft. Ask me what I am making, who it is for, and what a good result looks like." }
|
|
9779
|
+
];
|
|
9780
|
+
function QuerySuggestionPicker({ onSend, onSelect }) {
|
|
9781
|
+
const [ideas, setIdeas] = useState17([]);
|
|
9782
|
+
const [generating, setGenerating] = useState17(false);
|
|
9783
|
+
const [message, setMessage] = useState17("");
|
|
9784
|
+
const mounted = useRef13(false);
|
|
9785
|
+
const generatingRef = useRef13(false);
|
|
9799
9786
|
useEffect14(() => {
|
|
9800
|
-
|
|
9801
|
-
|
|
9802
|
-
|
|
9803
|
-
const prefs = usePreferencesStore.getState().preferences;
|
|
9804
|
-
const interests = (prefs.interests ?? []).filter((i) => i && i.trim());
|
|
9805
|
-
const randomTopics = pickDistinctRandomTopics(interests.length ? 3 : 5);
|
|
9806
|
-
const topicOfInterest = Array.from(/* @__PURE__ */ new Set([...interests, ...randomTopics])).join(", ") || getRandomTopicOfInterest();
|
|
9807
|
-
const webSearchAvailable = useMCPToolsStore.getState().getEnabledTools().some((t) => t.name === "web_search");
|
|
9808
|
-
const knowledgeTopics = prefs.useKnowledgeForStarters ? useKnowledgeStore.getState().docs.map((d) => d.name).filter((n) => n && n.trim()).slice(0, 12) : void 0;
|
|
9809
|
-
const args = {
|
|
9810
|
-
limit: 9,
|
|
9811
|
-
topicOfInterest,
|
|
9812
|
-
modelSystemPrompt: currentModel?.systemPrompt,
|
|
9813
|
-
interests,
|
|
9814
|
-
knowledgeTopics,
|
|
9815
|
-
webSearchAvailable
|
|
9787
|
+
mounted.current = true;
|
|
9788
|
+
return () => {
|
|
9789
|
+
mounted.current = false;
|
|
9816
9790
|
};
|
|
9817
|
-
|
|
9818
|
-
|
|
9819
|
-
|
|
9820
|
-
|
|
9821
|
-
} else {
|
|
9822
|
-
setExamplePrompts([]);
|
|
9823
|
-
setVisiblePrompts([]);
|
|
9824
|
-
hasGenerated.current = false;
|
|
9825
|
-
}
|
|
9826
|
-
}).catch((error) => {
|
|
9827
|
-
setExamplePrompts([]);
|
|
9828
|
-
setVisiblePrompts([]);
|
|
9829
|
-
hasGenerated.current = false;
|
|
9791
|
+
}, []);
|
|
9792
|
+
const select = (prompt) => {
|
|
9793
|
+
if (onSelect) onSelect(prompt);
|
|
9794
|
+
else void Promise.resolve(onSend(prompt, [])).catch(() => {
|
|
9830
9795
|
});
|
|
9831
|
-
}
|
|
9832
|
-
|
|
9833
|
-
if (
|
|
9834
|
-
|
|
9835
|
-
|
|
9836
|
-
|
|
9837
|
-
|
|
9838
|
-
|
|
9839
|
-
|
|
9840
|
-
|
|
9841
|
-
|
|
9842
|
-
|
|
9843
|
-
|
|
9844
|
-
|
|
9845
|
-
|
|
9846
|
-
|
|
9847
|
-
setTimeout(() => {
|
|
9848
|
-
setVisiblePrompts(shuffled.slice(0, 3));
|
|
9849
|
-
}, 800);
|
|
9850
|
-
return shuffled;
|
|
9796
|
+
};
|
|
9797
|
+
const generateIdeas = async () => {
|
|
9798
|
+
if (generatingRef.current) return;
|
|
9799
|
+
generatingRef.current = true;
|
|
9800
|
+
setGenerating(true);
|
|
9801
|
+
setMessage("");
|
|
9802
|
+
try {
|
|
9803
|
+
const prefs = usePreferencesStore.getState().preferences;
|
|
9804
|
+
const interests = (prefs.interests ?? []).filter((value) => value?.trim());
|
|
9805
|
+
const prompts = await generateConversationStarters({
|
|
9806
|
+
limit: 3,
|
|
9807
|
+
topicOfInterest: interests.join(", ") || "practical writing, learning, and decisions",
|
|
9808
|
+
interests,
|
|
9809
|
+
modelSystemPrompt: useModelStore.getState().getCurrentModel()?.systemPrompt,
|
|
9810
|
+
knowledgeTopics: prefs.useKnowledgeForStarters ? useKnowledgeStore.getState().docs.map((doc) => doc.name).filter(Boolean).slice(0, 12) : void 0,
|
|
9811
|
+
webSearchAvailable: useMCPToolsStore.getState().getEnabledTools().some((tool) => tool.name === "web_search")
|
|
9851
9812
|
});
|
|
9852
|
-
|
|
9853
|
-
|
|
9854
|
-
|
|
9855
|
-
|
|
9856
|
-
|
|
9857
|
-
|
|
9858
|
-
{
|
|
9859
|
-
|
|
9860
|
-
|
|
9861
|
-
zIndex: 1200,
|
|
9862
|
-
width: "100%",
|
|
9863
|
-
display: "flex",
|
|
9864
|
-
flexDirection: "row",
|
|
9865
|
-
gap: isMobile ? 0.8 : 1,
|
|
9866
|
-
px: isMobile ? 1.5 : 2,
|
|
9867
|
-
overflowX: isMobile ? "auto" : "visible",
|
|
9868
|
-
scrollSnapType: isMobile ? "x mandatory" : "none",
|
|
9869
|
-
WebkitOverflowScrolling: "touch",
|
|
9870
|
-
pb: isMobile ? 0.4 : 0,
|
|
9871
|
-
"&::-webkit-scrollbar": { display: "none" }
|
|
9872
|
-
},
|
|
9873
|
-
children: displayPrompts.map((prompt, i) => /* @__PURE__ */ jsx20(
|
|
9874
|
-
Box18,
|
|
9875
|
-
{
|
|
9876
|
-
component: "button",
|
|
9877
|
-
type: "button",
|
|
9878
|
-
sx: {
|
|
9879
|
-
appearance: "none",
|
|
9880
|
-
font: "inherit",
|
|
9881
|
-
textAlign: "inherit",
|
|
9882
|
-
"&:focus-visible": { outline: `2px solid ${theme.palette.primary.main}`, outlineOffset: 2 },
|
|
9883
|
-
px: isMobile ? 1.4 : 2,
|
|
9884
|
-
py: isMobile ? 1.2 : 2,
|
|
9885
|
-
flex: isMobile ? "0 0 85%" : 1,
|
|
9886
|
-
minWidth: isMobile ? "85%" : "auto",
|
|
9887
|
-
display: "flex",
|
|
9888
|
-
alignItems: "flex-start",
|
|
9889
|
-
gap: isMobile ? 0.9 : 1,
|
|
9890
|
-
backgroundColor: background,
|
|
9891
|
-
borderRadius: 2,
|
|
9892
|
-
fontSize: isMobile ? "0.875rem" : "0.9rem",
|
|
9893
|
-
color: text,
|
|
9894
|
-
userSelect: "none",
|
|
9895
|
-
cursor: "pointer",
|
|
9896
|
-
border: `1px solid ${border || alpha12(text, 0.12)}`,
|
|
9897
|
-
boxShadow: theme.palette.mode === "dark" ? "0 4px 18px rgba(0,0,0,0.25)" : "0 6px 20px rgba(15,23,42,0.12)",
|
|
9898
|
-
scrollSnapAlign: isMobile ? "start" : "none",
|
|
9899
|
-
transition: "transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease",
|
|
9900
|
-
"&:hover": {
|
|
9901
|
-
backgroundColor: hoverBackground,
|
|
9902
|
-
borderColor: hoverBorder,
|
|
9903
|
-
transform: "translateY(-2px)",
|
|
9904
|
-
boxShadow: theme.palette.mode === "dark" ? "0 6px 22px rgba(0,0,0,0.28)" : "0 8px 24px rgba(15,23,42,0.14)"
|
|
9905
|
-
},
|
|
9906
|
-
"&:active": {
|
|
9907
|
-
transform: "translateY(0) scale(0.98)"
|
|
9908
|
-
}
|
|
9909
|
-
},
|
|
9910
|
-
onClick: () => {
|
|
9911
|
-
void Promise.resolve(onSend(prompt, [])).catch(() => {
|
|
9912
|
-
});
|
|
9913
|
-
setHasSentPrompt(true);
|
|
9914
|
-
},
|
|
9915
|
-
children: /* @__PURE__ */ jsx20(
|
|
9916
|
-
Box18,
|
|
9917
|
-
{
|
|
9918
|
-
sx: {
|
|
9919
|
-
flex: 1,
|
|
9920
|
-
lineHeight: 1.4,
|
|
9921
|
-
fontWeight: isMobile ? 500 : 400,
|
|
9922
|
-
textAlign: isMobile ? "left" : "center",
|
|
9923
|
-
...isMobile && { hyphens: "auto", wordBreak: "break-word" },
|
|
9924
|
-
"& code": {
|
|
9925
|
-
borderRadius: 4,
|
|
9926
|
-
fontSize: "0.92em",
|
|
9927
|
-
fontFamily: "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace",
|
|
9928
|
-
backgroundColor: theme.palette.mode === "dark" ? alpha12(theme.palette.common.white, 0.06) : alpha12(theme.palette.text.primary, 0.06),
|
|
9929
|
-
border: `1px solid ${alpha12(theme.palette.text.primary, 0.15)}`,
|
|
9930
|
-
padding: "0.15em 0.35em"
|
|
9931
|
-
},
|
|
9932
|
-
"& mark": {
|
|
9933
|
-
display: "inline-block",
|
|
9934
|
-
backgroundColor: theme.palette.mode === "dark" ? alpha12(theme.palette.common.white, 0.06) : alpha12(theme.palette.text.primary, 0.12),
|
|
9935
|
-
color: theme.palette.mode === "dark" ? theme.palette.common.white : theme.palette.text.primary,
|
|
9936
|
-
borderRadius: 4,
|
|
9937
|
-
padding: "0.1em 0.25em"
|
|
9938
|
-
}
|
|
9939
|
-
},
|
|
9940
|
-
children: /* @__PURE__ */ jsx20(
|
|
9941
|
-
ReactMarkdown,
|
|
9942
|
-
{
|
|
9943
|
-
remarkPlugins: [remarkGfm],
|
|
9944
|
-
rehypePlugins: [rehypeRaw],
|
|
9945
|
-
components: markdownComponents,
|
|
9946
|
-
children: prompt
|
|
9947
|
-
}
|
|
9948
|
-
)
|
|
9949
|
-
}
|
|
9950
|
-
)
|
|
9951
|
-
},
|
|
9952
|
-
`${i}-${prompt}`
|
|
9953
|
-
))
|
|
9813
|
+
if (!mounted.current) return;
|
|
9814
|
+
const next = prompts.filter((prompt) => typeof prompt === "string" && prompt.trim()).slice(0, 3);
|
|
9815
|
+
setIdeas(next);
|
|
9816
|
+
setMessage(next.length ? "New ideas are ready. Choose one to get started." : "Ideas are unavailable right now. You can still use a starter or write your own.");
|
|
9817
|
+
} catch {
|
|
9818
|
+
if (mounted.current) setMessage("Ideas are unavailable right now. You can still use a starter or write your own.");
|
|
9819
|
+
} finally {
|
|
9820
|
+
generatingRef.current = false;
|
|
9821
|
+
if (mounted.current) setGenerating(false);
|
|
9954
9822
|
}
|
|
9955
|
-
|
|
9956
|
-
}
|
|
9823
|
+
};
|
|
9824
|
+
return /* @__PURE__ */ jsxs17(Box18, { component: "section", "aria-label": "Start with a task", sx: { width: "100%", px: { xs: 2, sm: 3 } }, children: [
|
|
9825
|
+
/* @__PURE__ */ jsxs17(Box18, { sx: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: 1, mb: 1.5 }, children: [
|
|
9826
|
+
/* @__PURE__ */ jsx20(Typography14, { variant: "body2", sx: { fontWeight: 600 }, children: "What would move your work forward?" }),
|
|
9827
|
+
/* @__PURE__ */ jsx20(Button11, { size: "small", startIcon: /* @__PURE__ */ jsx20(Refresh, { size: 14 }), disabled: generating, onClick: () => void generateIdeas(), sx: { flexShrink: 0 }, children: generating ? "Finding ideas\u2026" : "Suggest ideas" })
|
|
9828
|
+
] }),
|
|
9829
|
+
/* @__PURE__ */ jsx20(Box18, { sx: { display: "grid", gridTemplateColumns: { xs: "1fr", sm: "repeat(3, minmax(0, 1fr))" }, gap: 1 }, children: (ideas.length ? ideas.map((prompt) => ({ title: prompt, detail: "", icon: ArrowRight, prompt })) : STARTERS).map(({ title, detail, icon: Icon, prompt }) => /* @__PURE__ */ jsxs17(Button11, { variant: "outlined", onClick: () => select(prompt), sx: { display: "flex", alignItems: "flex-start", justifyContent: "flex-start", gap: 1.2, textAlign: "left", textTransform: "none", p: { xs: 1.5, sm: 2 }, height: "100%", color: "text.primary", borderColor: "divider" }, children: [
|
|
9830
|
+
/* @__PURE__ */ jsx20(Box18, { component: "span", sx: { display: "flex", color: "primary.main", mt: 0.25 }, children: /* @__PURE__ */ jsx20(Icon, { size: 18 }) }),
|
|
9831
|
+
/* @__PURE__ */ jsxs17(Box18, { component: "span", children: [
|
|
9832
|
+
/* @__PURE__ */ jsx20(Typography14, { component: "span", variant: "body2", sx: { display: "block", fontWeight: 550, lineHeight: 1.45 }, children: title }),
|
|
9833
|
+
detail && /* @__PURE__ */ jsx20(Typography14, { component: "span", variant: "caption", sx: { display: "block", color: "text.secondary", mt: 0.5, lineHeight: 1.5 }, children: detail })
|
|
9834
|
+
] })
|
|
9835
|
+
] }, title)) }),
|
|
9836
|
+
/* @__PURE__ */ jsx20(Typography14, { variant: "caption", sx: { display: "block", color: "text.secondary", mt: 1.25 }, children: onSelect ? "Choose a starting point, then make it your own before sending." : "Choose a starting point or write your own message." }),
|
|
9837
|
+
message && /* @__PURE__ */ jsx20(Typography14, { role: "status", variant: "caption", sx: { display: "block", color: "text.secondary", mt: 1 }, children: message })
|
|
9838
|
+
] });
|
|
9839
|
+
}
|
|
9957
9840
|
|
|
9958
9841
|
// src/components/UnderReview.tsx
|
|
9959
|
-
import { Box as Box19, Typography as
|
|
9842
|
+
import { Box as Box19, Typography as Typography15, useTheme as useTheme16 } from "@mui/material";
|
|
9960
9843
|
import { useNavigate as useNavigate4 } from "react-router-dom";
|
|
9961
|
-
import { jsx as jsx21, jsxs as
|
|
9844
|
+
import { jsx as jsx21, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
9962
9845
|
var UnderReview = () => {
|
|
9963
|
-
const theme =
|
|
9846
|
+
const theme = useTheme16();
|
|
9964
9847
|
const navigate = useNavigate4();
|
|
9965
9848
|
const handleResetSession = () => {
|
|
9966
9849
|
authenticationService.clearToken();
|
|
9967
9850
|
navigate("/login");
|
|
9968
9851
|
};
|
|
9969
|
-
return /* @__PURE__ */
|
|
9852
|
+
return /* @__PURE__ */ jsxs18(
|
|
9970
9853
|
Box19,
|
|
9971
9854
|
{
|
|
9972
9855
|
sx: {
|
|
@@ -10008,8 +9891,8 @@ var UnderReview = () => {
|
|
|
10008
9891
|
title: "Reset session"
|
|
10009
9892
|
}
|
|
10010
9893
|
),
|
|
10011
|
-
/* @__PURE__ */ jsx21(
|
|
10012
|
-
/* @__PURE__ */
|
|
9894
|
+
/* @__PURE__ */ jsx21(Typography15, { variant: "h4", sx: { mb: 2, fontWeight: 700, color: theme.palette.error.main }, children: "Under Review" }),
|
|
9895
|
+
/* @__PURE__ */ jsxs18(Typography15, { variant: "body1", sx: { mb: 2, color: theme.palette.text.secondary }, children: [
|
|
10013
9896
|
"Your request to use this deployment is currently being reviewed.",
|
|
10014
9897
|
/* @__PURE__ */ jsx21("br", {}),
|
|
10015
9898
|
"For more info, contact your deployment admin or",
|
|
@@ -10024,10 +9907,10 @@ var UnderReview_default = UnderReview;
|
|
|
10024
9907
|
|
|
10025
9908
|
// src/components/feedback/FeedbackPulse.tsx
|
|
10026
9909
|
import { useEffect as useEffect15, useRef as useRef14, useState as useState18 } from "react";
|
|
10027
|
-
import { Box as Box20, IconButton as IconButton12, Paper as Paper2, Slide as Slide2, Typography as
|
|
10028
|
-
import { useTheme as
|
|
9910
|
+
import { Box as Box20, IconButton as IconButton12, Paper as Paper2, Slide as Slide2, Typography as Typography16 } from "@mui/material";
|
|
9911
|
+
import { useTheme as useTheme17, alpha as alpha12 } from "@mui/material/styles";
|
|
10029
9912
|
import { X as CloseIcon7, Smile as SmileIcon, Meh as MehIcon, Frown as FrownIcon } from "@burtson-labs/icons/react";
|
|
10030
|
-
import { Fragment as
|
|
9913
|
+
import { Fragment as Fragment11, jsx as jsx22, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
10031
9914
|
var STORAGE_KEY2 = "bandit-feedback-pulse-last";
|
|
10032
9915
|
var COOLDOWN_DAYS = 14;
|
|
10033
9916
|
var MIN_SESSION_MS = 5 * 60 * 1e3;
|
|
@@ -10048,7 +9931,7 @@ var recordInteraction = (outcome) => {
|
|
|
10048
9931
|
debugLogger.info("FeedbackPulse: interaction recorded", { outcome });
|
|
10049
9932
|
};
|
|
10050
9933
|
var FeedbackPulse = ({ isMobile, feedbackEmail }) => {
|
|
10051
|
-
const theme =
|
|
9934
|
+
const theme = useTheme17();
|
|
10052
9935
|
const [visible, setVisible] = useState18(false);
|
|
10053
9936
|
const [thanked, setThanked] = useState18(false);
|
|
10054
9937
|
const [modalOpen, setModalOpen] = useState18(false);
|
|
@@ -10101,7 +9984,7 @@ var FeedbackPulse = ({ isMobile, feedbackEmail }) => {
|
|
|
10101
9984
|
recordInteraction("dismissed");
|
|
10102
9985
|
setVisible(false);
|
|
10103
9986
|
};
|
|
10104
|
-
const choice = (icon, label, outcome) => /* @__PURE__ */
|
|
9987
|
+
const choice = (icon, label, outcome) => /* @__PURE__ */ jsxs19(
|
|
10105
9988
|
Box20,
|
|
10106
9989
|
{
|
|
10107
9990
|
component: "button",
|
|
@@ -10122,18 +10005,18 @@ var FeedbackPulse = ({ isMobile, feedbackEmail }) => {
|
|
|
10122
10005
|
color: theme.palette.text.secondary,
|
|
10123
10006
|
transition: "background-color 0.15s ease, transform 0.1s ease",
|
|
10124
10007
|
"&:hover": {
|
|
10125
|
-
bgcolor:
|
|
10008
|
+
bgcolor: alpha12(theme.palette.text.primary, 0.06),
|
|
10126
10009
|
color: theme.palette.text.primary
|
|
10127
10010
|
},
|
|
10128
10011
|
"&:active": { transform: "scale(0.96)" }
|
|
10129
10012
|
},
|
|
10130
10013
|
children: [
|
|
10131
10014
|
/* @__PURE__ */ jsx22(Box20, { component: "span", sx: { display: "inline-flex", lineHeight: 1 }, children: icon }),
|
|
10132
|
-
/* @__PURE__ */ jsx22(
|
|
10015
|
+
/* @__PURE__ */ jsx22(Typography16, { variant: "caption", sx: { fontWeight: 600 }, children: label })
|
|
10133
10016
|
]
|
|
10134
10017
|
}
|
|
10135
10018
|
);
|
|
10136
|
-
return /* @__PURE__ */
|
|
10019
|
+
return /* @__PURE__ */ jsxs19(Fragment11, { children: [
|
|
10137
10020
|
/* @__PURE__ */ jsx22(Slide2, { direction: isMobile ? "down" : "up", in: visible, mountOnEnter: true, unmountOnExit: true, children: /* @__PURE__ */ jsx22(
|
|
10138
10021
|
Paper2,
|
|
10139
10022
|
{
|
|
@@ -10151,14 +10034,14 @@ var FeedbackPulse = ({ isMobile, feedbackEmail }) => {
|
|
|
10151
10034
|
borderRadius: 3,
|
|
10152
10035
|
border: `1px solid ${theme.palette.divider}`,
|
|
10153
10036
|
bgcolor: theme.palette.background.paper,
|
|
10154
|
-
boxShadow: `0 12px 40px ${
|
|
10037
|
+
boxShadow: `0 12px 40px ${alpha12(theme.palette.common.black, theme.palette.mode === "dark" ? 0.5 : 0.18)}`
|
|
10155
10038
|
},
|
|
10156
|
-
children: thanked ? /* @__PURE__ */ jsx22(
|
|
10157
|
-
/* @__PURE__ */
|
|
10158
|
-
/* @__PURE__ */ jsx22(
|
|
10039
|
+
children: thanked ? /* @__PURE__ */ jsx22(Typography16, { sx: { textAlign: "center", py: 1.5, fontWeight: 600 }, children: "Thanks for the feedback!" }) : /* @__PURE__ */ jsxs19(Fragment11, { children: [
|
|
10040
|
+
/* @__PURE__ */ jsxs19(Box20, { sx: { display: "flex", alignItems: "center", mb: 0.5 }, children: [
|
|
10041
|
+
/* @__PURE__ */ jsx22(Typography16, { variant: "body2", sx: { fontWeight: 600, flex: 1 }, children: "How's Bandit doing?" }),
|
|
10159
10042
|
/* @__PURE__ */ jsx22(IconButton12, { size: "small", onClick: dismiss, "aria-label": "Dismiss feedback prompt", children: /* @__PURE__ */ jsx22(CloseIcon7, { size: 16 }) })
|
|
10160
10043
|
] }),
|
|
10161
|
-
/* @__PURE__ */
|
|
10044
|
+
/* @__PURE__ */ jsxs19(Box20, { sx: { display: "flex", justifyContent: "space-evenly" }, children: [
|
|
10162
10045
|
choice(/* @__PURE__ */ jsx22(SmileIcon, { size: 22, color: theme.palette.success.main }), "Good", "good"),
|
|
10163
10046
|
choice(/* @__PURE__ */ jsx22(MehIcon, { size: 22, color: theme.palette.warning.main }), "Fine", "fine"),
|
|
10164
10047
|
choice(/* @__PURE__ */ jsx22(FrownIcon, { size: 22, color: theme.palette.error.main }), "Bad", "bad")
|
|
@@ -10179,13 +10062,13 @@ var FeedbackPulse = ({ isMobile, feedbackEmail }) => {
|
|
|
10179
10062
|
var FeedbackPulse_default = FeedbackPulse;
|
|
10180
10063
|
|
|
10181
10064
|
// src/components/ConnectionStatus.tsx
|
|
10182
|
-
import { Box as Box21, Chip as Chip5, useTheme as
|
|
10065
|
+
import { Box as Box21, Chip as Chip5, useTheme as useTheme18 } from "@mui/material";
|
|
10183
10066
|
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
10184
10067
|
var ConnectionStatus = ({
|
|
10185
10068
|
showWhenGood = false,
|
|
10186
10069
|
position = "top"
|
|
10187
10070
|
}) => {
|
|
10188
|
-
const theme =
|
|
10071
|
+
const theme = useTheme18();
|
|
10189
10072
|
const { isOnline, connectionQuality, isSlowConnection } = useNetworkStatus();
|
|
10190
10073
|
if (connectionQuality === "fast" && !showWhenGood) {
|
|
10191
10074
|
return null;
|
|
@@ -10553,7 +10436,7 @@ var useVoiceMode = (config) => {
|
|
|
10553
10436
|
|
|
10554
10437
|
// src/chat/chat.tsx
|
|
10555
10438
|
import { Ghost as TempChatGhostIcon } from "@burtson-labs/icons/react";
|
|
10556
|
-
import { Fragment as
|
|
10439
|
+
import { Fragment as Fragment12, jsx as jsx24, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
10557
10440
|
var ChatContent = () => {
|
|
10558
10441
|
const packageSettings = usePackageSettingsStore((state) => state.settings);
|
|
10559
10442
|
const UnderReviewView = packageSettings?.components?.UnderReview ?? UnderReview_default;
|
|
@@ -11579,21 +11462,21 @@ var ChatContent = () => {
|
|
|
11579
11462
|
}
|
|
11580
11463
|
};
|
|
11581
11464
|
if (!hydrated || brandingLoading || themeLoading) {
|
|
11582
|
-
return /* @__PURE__ */
|
|
11465
|
+
return /* @__PURE__ */ jsxs20(ThemeProvider, { theme: banditTheme, children: [
|
|
11583
11466
|
/* @__PURE__ */ jsx24(CssBaseline, {}),
|
|
11584
11467
|
/* @__PURE__ */ jsx24(ChatStartupSkeleton, {})
|
|
11585
11468
|
] });
|
|
11586
11469
|
}
|
|
11587
11470
|
const userHasAccess = playgroundBypassAccess || ossMode || claims?.roles?.includes("super-user") || claims?.roles?.includes("admin");
|
|
11588
11471
|
if (!userHasAccess) {
|
|
11589
|
-
return /* @__PURE__ */
|
|
11472
|
+
return /* @__PURE__ */ jsxs20(ThemeProvider, { theme: banditTheme, children: [
|
|
11590
11473
|
/* @__PURE__ */ jsx24(CssBaseline, {}),
|
|
11591
11474
|
/* @__PURE__ */ jsx24(UnderReviewView, {})
|
|
11592
11475
|
] });
|
|
11593
11476
|
}
|
|
11594
|
-
return /* @__PURE__ */
|
|
11477
|
+
return /* @__PURE__ */ jsxs20(ThemeProvider, { theme: banditTheme, children: [
|
|
11595
11478
|
/* @__PURE__ */ jsx24(CssBaseline, {}),
|
|
11596
|
-
/* @__PURE__ */
|
|
11479
|
+
/* @__PURE__ */ jsxs20(
|
|
11597
11480
|
Box22,
|
|
11598
11481
|
{
|
|
11599
11482
|
sx: (theme) => ({
|
|
@@ -11676,7 +11559,7 @@ var ChatContent = () => {
|
|
|
11676
11559
|
} : void 0
|
|
11677
11560
|
}
|
|
11678
11561
|
),
|
|
11679
|
-
isTemporaryChat && /* @__PURE__ */
|
|
11562
|
+
isTemporaryChat && /* @__PURE__ */ jsxs20(Fragment12, { children: [
|
|
11680
11563
|
!isMobile && /* @__PURE__ */ jsx24(
|
|
11681
11564
|
Box22,
|
|
11682
11565
|
{
|
|
@@ -11692,7 +11575,7 @@ var ChatContent = () => {
|
|
|
11692
11575
|
})
|
|
11693
11576
|
}
|
|
11694
11577
|
),
|
|
11695
|
-
/* @__PURE__ */
|
|
11578
|
+
/* @__PURE__ */ jsxs20(
|
|
11696
11579
|
Box22,
|
|
11697
11580
|
{
|
|
11698
11581
|
sx: (theme) => ({
|
|
@@ -11750,7 +11633,7 @@ var ChatContent = () => {
|
|
|
11750
11633
|
"@media (pointer: coarse)": { "&::after": { content: '""', position: "absolute", inset: -11 } },
|
|
11751
11634
|
"&:hover": {
|
|
11752
11635
|
opacity: 1,
|
|
11753
|
-
bgcolor:
|
|
11636
|
+
bgcolor: alpha13(theme.palette.getContrastText(theme.palette.text.primary), 0.16)
|
|
11754
11637
|
}
|
|
11755
11638
|
}),
|
|
11756
11639
|
children: /* @__PURE__ */ jsx24(X, { fontSize: "inherit", "aria-hidden": true })
|
|
@@ -11784,7 +11667,7 @@ var ChatContent = () => {
|
|
|
11784
11667
|
msOverflowStyle: "none",
|
|
11785
11668
|
"&::-webkit-scrollbar": { display: "none" }
|
|
11786
11669
|
},
|
|
11787
|
-
children: /* @__PURE__ */
|
|
11670
|
+
children: /* @__PURE__ */ jsxs20(
|
|
11788
11671
|
Box22,
|
|
11789
11672
|
{
|
|
11790
11673
|
sx: {
|
|
@@ -11810,7 +11693,7 @@ var ChatContent = () => {
|
|
|
11810
11693
|
transition: "opacity 0.5s ease",
|
|
11811
11694
|
color: theme.palette.text.primary
|
|
11812
11695
|
}),
|
|
11813
|
-
children: /* @__PURE__ */ jsx24(
|
|
11696
|
+
children: /* @__PURE__ */ jsx24(Typography17, { sx: { fontWeight: 500, fontSize: { xs: "1.5rem", md: "1.9rem" }, lineHeight: 1.2 }, children: "What can I help with?" })
|
|
11814
11697
|
}
|
|
11815
11698
|
);
|
|
11816
11699
|
}
|
|
@@ -11827,13 +11710,13 @@ var ChatContent = () => {
|
|
|
11827
11710
|
transition: "opacity 0.5s ease",
|
|
11828
11711
|
color: theme.palette.text.primary
|
|
11829
11712
|
}),
|
|
11830
|
-
children: /* @__PURE__ */ jsx24(
|
|
11713
|
+
children: /* @__PURE__ */ jsx24(Typography17, { sx: { fontWeight: 600, fontSize: { xs: "1.6rem", md: "2.1rem" }, lineHeight: 1.2 }, children: branding?.brandingText?.trim() || "Bandit AI" })
|
|
11831
11714
|
}
|
|
11832
11715
|
);
|
|
11833
11716
|
}
|
|
11834
11717
|
return branding?.logoBase64 ? /* @__PURE__ */ jsx24(custom_logo_default, { visible: logoVisible, atTop: true }) : /* @__PURE__ */ jsx24(bandit_chat_logo_default, { visible: logoVisible, atTop: true });
|
|
11835
11718
|
})(),
|
|
11836
|
-
showKnowledgeNudge && /* @__PURE__ */
|
|
11719
|
+
showKnowledgeNudge && /* @__PURE__ */ jsxs20(
|
|
11837
11720
|
Box22,
|
|
11838
11721
|
{
|
|
11839
11722
|
sx: (theme) => ({
|
|
@@ -11853,12 +11736,12 @@ var ChatContent = () => {
|
|
|
11853
11736
|
transition: "opacity 0.5s ease"
|
|
11854
11737
|
}),
|
|
11855
11738
|
children: [
|
|
11856
|
-
/* @__PURE__ */
|
|
11857
|
-
/* @__PURE__ */ jsx24(
|
|
11858
|
-
/* @__PURE__ */ jsx24(
|
|
11739
|
+
/* @__PURE__ */ jsxs20(Box22, { sx: { flex: 1, minWidth: 0 }, children: [
|
|
11740
|
+
/* @__PURE__ */ jsx24(Typography17, { variant: "body2", sx: { fontWeight: 600 }, children: "Add your documents" }),
|
|
11741
|
+
/* @__PURE__ */ jsx24(Typography17, { variant: "caption", color: "text.secondary", children: "Upload your policies, handbooks or notes and Bandit answers from them, with sources." })
|
|
11859
11742
|
] }),
|
|
11860
11743
|
/* @__PURE__ */ jsx24(
|
|
11861
|
-
|
|
11744
|
+
Button12,
|
|
11862
11745
|
{
|
|
11863
11746
|
size: "small",
|
|
11864
11747
|
variant: "outlined",
|
|
@@ -11923,7 +11806,7 @@ var ChatContent = () => {
|
|
|
11923
11806
|
onClick: handleScrollToBottomClick
|
|
11924
11807
|
}
|
|
11925
11808
|
),
|
|
11926
|
-
/* @__PURE__ */
|
|
11809
|
+
/* @__PURE__ */ jsxs20(
|
|
11927
11810
|
Box22,
|
|
11928
11811
|
{
|
|
11929
11812
|
sx: {
|
|
@@ -11936,7 +11819,17 @@ var ChatContent = () => {
|
|
|
11936
11819
|
},
|
|
11937
11820
|
children: [
|
|
11938
11821
|
/* @__PURE__ */ jsx24(Box22, { sx: { flex: "1 1 auto" } }),
|
|
11939
|
-
history.length === 0 && componentStatus !== "Loading" && !pendingMessage && preferences.chatSuggestionsEnabled && /* @__PURE__ */ jsx24(Box22, { sx: { marginBottom: "20px" }, children: /* @__PURE__ */ jsx24(
|
|
11822
|
+
history.length === 0 && componentStatus !== "Loading" && !pendingMessage && preferences.chatSuggestionsEnabled && /* @__PURE__ */ jsx24(Box22, { sx: { marginBottom: "20px", width: "100%" }, children: /* @__PURE__ */ jsx24(
|
|
11823
|
+
QuerySuggestionPicker,
|
|
11824
|
+
{
|
|
11825
|
+
onSend: handleSend,
|
|
11826
|
+
onSelect: (prompt) => {
|
|
11827
|
+
setInputValue(prompt);
|
|
11828
|
+
inputRef.current?.focus();
|
|
11829
|
+
},
|
|
11830
|
+
inputHeight
|
|
11831
|
+
}
|
|
11832
|
+
) }),
|
|
11940
11833
|
/* @__PURE__ */ jsx24(rate_limit_prompt_default, {}),
|
|
11941
11834
|
/* @__PURE__ */ jsx24(ask_user_card_default, {}),
|
|
11942
11835
|
/* @__PURE__ */ jsx24(
|
|
@@ -12007,4 +11900,4 @@ export {
|
|
|
12007
11900
|
IS_STORE_BUILD,
|
|
12008
11901
|
chat_default
|
|
12009
11902
|
};
|
|
12010
|
-
//# sourceMappingURL=chunk-
|
|
11903
|
+
//# sourceMappingURL=chunk-JYBQAKSZ.mjs.map
|