@burtson-labs/bandit-engine 2.0.118 → 2.0.120
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/dist/{chat-RGXA26FO.mjs → chat-QOF3GSGB.mjs} +2 -2
- package/dist/{chunk-RBMHAWU7.mjs → chunk-32R7DYFL.mjs} +776 -594
- package/dist/chunk-32R7DYFL.mjs.map +1 -0
- package/dist/{chunk-YLETAU5Y.mjs → chunk-CVBR7PUH.mjs} +2 -2
- package/dist/index.js +3137 -2940
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/management/management.js +1097 -900
- package/dist/management/management.js.map +1 -1
- package/dist/management/management.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-RBMHAWU7.mjs.map +0 -1
- /package/dist/{chat-RGXA26FO.mjs.map → chat-QOF3GSGB.mjs.map} +0 -0
- /package/dist/{chunk-YLETAU5Y.mjs.map → chunk-CVBR7PUH.mjs.map} +0 -0
|
@@ -87,7 +87,7 @@ import {
|
|
|
87
87
|
} from "./chunk-KCI46M23.mjs";
|
|
88
88
|
|
|
89
89
|
// src/chat/chat.tsx
|
|
90
|
-
import { useCallback as useCallback6, useEffect as useEffect15, useLayoutEffect, useMemo as useMemo4, useRef as
|
|
90
|
+
import { useCallback as useCallback6, useEffect as useEffect15, useLayoutEffect, useMemo as useMemo4, useRef as useRef14, useState as useState17 } from "react";
|
|
91
91
|
|
|
92
92
|
// src/chat/custom-logo.tsx
|
|
93
93
|
import React, { useEffect } from "react";
|
|
@@ -174,7 +174,7 @@ var Logo = ({ visible, atTop = false }) => {
|
|
|
174
174
|
var custom_logo_default = Logo;
|
|
175
175
|
|
|
176
176
|
// src/chat/chat.tsx
|
|
177
|
-
import { Box as
|
|
177
|
+
import { Box as Box18, ThemeProvider, CssBaseline, CircularProgress as CircularProgress4, Typography as Typography12 } from "@mui/material";
|
|
178
178
|
import { createTheme } from "@mui/material/styles";
|
|
179
179
|
|
|
180
180
|
// src/chat/canvas-panel.tsx
|
|
@@ -1856,8 +1856,161 @@ var AskUserCard = () => {
|
|
|
1856
1856
|
};
|
|
1857
1857
|
var ask_user_card_default = AskUserCard;
|
|
1858
1858
|
|
|
1859
|
+
// src/chat/rate-limit-prompt.tsx
|
|
1860
|
+
import { useRef as useRef3 } from "react";
|
|
1861
|
+
import { Box as Box7, Button as Button2, IconButton as IconButton5, Typography as Typography3, useTheme as useTheme6 } from "@mui/material";
|
|
1862
|
+
import { useNavigate } from "react-router-dom";
|
|
1863
|
+
|
|
1864
|
+
// src/store/rateLimitStore.ts
|
|
1865
|
+
import { create as create3 } from "zustand";
|
|
1866
|
+
var useRateLimitStore = create3((set) => ({
|
|
1867
|
+
prompt: null,
|
|
1868
|
+
show: (prompt) => set({ prompt }),
|
|
1869
|
+
dismiss: () => set({ prompt: null })
|
|
1870
|
+
}));
|
|
1871
|
+
var parseRateLimitError = (error) => {
|
|
1872
|
+
if (!error || typeof error !== "object") {
|
|
1873
|
+
return null;
|
|
1874
|
+
}
|
|
1875
|
+
const response = error.response;
|
|
1876
|
+
const status = response?.status;
|
|
1877
|
+
const data = response?.data;
|
|
1878
|
+
const payload = data && typeof data === "object" ? data : {};
|
|
1879
|
+
const isRateLimited = status === 429 || payload.error === "rate_limited" || payload.upgrade === true;
|
|
1880
|
+
if (!isRateLimited) {
|
|
1881
|
+
return null;
|
|
1882
|
+
}
|
|
1883
|
+
const scope = payload.scope === "weekly" ? "weekly" : "session";
|
|
1884
|
+
const message = typeof payload.message === "string" ? payload.message : void 0;
|
|
1885
|
+
const haystack = `${message ?? ""}`.toLowerCase();
|
|
1886
|
+
const frontier = /frontier|premium|cloud|pro model/.test(haystack);
|
|
1887
|
+
return { scope, message, frontier };
|
|
1888
|
+
};
|
|
1889
|
+
|
|
1890
|
+
// src/chat/rate-limit-prompt.tsx
|
|
1891
|
+
import { jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1892
|
+
var RateLimitPrompt = () => {
|
|
1893
|
+
const theme = useTheme6();
|
|
1894
|
+
const prompt = useRateLimitStore((s) => s.prompt);
|
|
1895
|
+
const dismiss = useRateLimitStore((s) => s.dismiss);
|
|
1896
|
+
const hasLoggedRouterWarningRef = useRef3(false);
|
|
1897
|
+
let navigate = null;
|
|
1898
|
+
try {
|
|
1899
|
+
navigate = useNavigate();
|
|
1900
|
+
} catch (error) {
|
|
1901
|
+
if (!hasLoggedRouterWarningRef.current) {
|
|
1902
|
+
debugLogger.warn("RateLimitPrompt: Navigation not available (missing Router context)", { error });
|
|
1903
|
+
hasLoggedRouterWarningRef.current = true;
|
|
1904
|
+
}
|
|
1905
|
+
navigate = null;
|
|
1906
|
+
}
|
|
1907
|
+
const safeNavigate = (to) => {
|
|
1908
|
+
if (typeof window !== "undefined" && /^https?:\/\//.test(to)) {
|
|
1909
|
+
window.location.href = to;
|
|
1910
|
+
return;
|
|
1911
|
+
}
|
|
1912
|
+
if (navigate) {
|
|
1913
|
+
navigate(to);
|
|
1914
|
+
} else if (typeof window !== "undefined") {
|
|
1915
|
+
window.location.href = to;
|
|
1916
|
+
}
|
|
1917
|
+
};
|
|
1918
|
+
const plansUrl = typeof window !== "undefined" && !(window.location.hostname === "banditailabs.com" || window.location.hostname.endsWith(".banditailabs.com") || window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1") ? "https://banditailabs.com/plans" : "/plans";
|
|
1919
|
+
if (!prompt) {
|
|
1920
|
+
return null;
|
|
1921
|
+
}
|
|
1922
|
+
const { scope, frontier } = prompt;
|
|
1923
|
+
const title = scope === "weekly" ? "You've reached your weekly limit" : "You've hit your session limit";
|
|
1924
|
+
const body = (() => {
|
|
1925
|
+
if (frontier) {
|
|
1926
|
+
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.";
|
|
1927
|
+
}
|
|
1928
|
+
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.";
|
|
1929
|
+
})();
|
|
1930
|
+
return /* @__PURE__ */ jsxs7(
|
|
1931
|
+
Box7,
|
|
1932
|
+
{
|
|
1933
|
+
role: "status",
|
|
1934
|
+
sx: {
|
|
1935
|
+
mb: 1.5,
|
|
1936
|
+
px: 2,
|
|
1937
|
+
py: 1.5,
|
|
1938
|
+
borderRadius: 2,
|
|
1939
|
+
display: "flex",
|
|
1940
|
+
alignItems: "flex-start",
|
|
1941
|
+
gap: 1.5,
|
|
1942
|
+
border: `1px solid ${theme.palette.primary.main}33`,
|
|
1943
|
+
bgcolor: theme.palette.primary.main + "0F",
|
|
1944
|
+
backdropFilter: "blur(8px)"
|
|
1945
|
+
},
|
|
1946
|
+
children: [
|
|
1947
|
+
/* @__PURE__ */ jsx10(
|
|
1948
|
+
Box7,
|
|
1949
|
+
{
|
|
1950
|
+
sx: {
|
|
1951
|
+
mt: 0.25,
|
|
1952
|
+
display: "flex",
|
|
1953
|
+
alignItems: "center",
|
|
1954
|
+
justifyContent: "center",
|
|
1955
|
+
width: 32,
|
|
1956
|
+
height: 32,
|
|
1957
|
+
flexShrink: 0,
|
|
1958
|
+
borderRadius: "50%",
|
|
1959
|
+
bgcolor: theme.palette.primary.main + "22",
|
|
1960
|
+
color: theme.palette.primary.main
|
|
1961
|
+
},
|
|
1962
|
+
children: /* @__PURE__ */ jsx10(AutoAwesomeIcon, { fontSize: "small" })
|
|
1963
|
+
}
|
|
1964
|
+
),
|
|
1965
|
+
/* @__PURE__ */ jsxs7(Box7, { sx: { flex: 1, minWidth: 0 }, children: [
|
|
1966
|
+
/* @__PURE__ */ jsx10(Typography3, { variant: "subtitle2", sx: { fontWeight: 600, color: theme.palette.text.primary }, children: title }),
|
|
1967
|
+
/* @__PURE__ */ jsx10(Typography3, { variant: "body2", sx: { color: theme.palette.text.secondary, mt: 0.25 }, children: body }),
|
|
1968
|
+
/* @__PURE__ */ jsxs7(Box7, { sx: { display: "flex", gap: 1, mt: 1, flexWrap: "wrap" }, children: [
|
|
1969
|
+
/* @__PURE__ */ jsx10(
|
|
1970
|
+
Button2,
|
|
1971
|
+
{
|
|
1972
|
+
size: "small",
|
|
1973
|
+
variant: "contained",
|
|
1974
|
+
disableElevation: true,
|
|
1975
|
+
startIcon: /* @__PURE__ */ jsx10(AutoAwesomeIcon, { sx: { fontSize: "0.9rem" } }),
|
|
1976
|
+
onClick: () => {
|
|
1977
|
+
dismiss();
|
|
1978
|
+
safeNavigate(plansUrl);
|
|
1979
|
+
},
|
|
1980
|
+
sx: { textTransform: "none", fontWeight: 600, borderRadius: 2 },
|
|
1981
|
+
children: "Upgrade to keep chatting"
|
|
1982
|
+
}
|
|
1983
|
+
),
|
|
1984
|
+
/* @__PURE__ */ jsx10(
|
|
1985
|
+
Button2,
|
|
1986
|
+
{
|
|
1987
|
+
size: "small",
|
|
1988
|
+
variant: "text",
|
|
1989
|
+
onClick: () => dismiss(),
|
|
1990
|
+
sx: { textTransform: "none", color: theme.palette.text.secondary },
|
|
1991
|
+
children: scope === "weekly" ? "Maybe later" : "I'll wait"
|
|
1992
|
+
}
|
|
1993
|
+
)
|
|
1994
|
+
] })
|
|
1995
|
+
] }),
|
|
1996
|
+
/* @__PURE__ */ jsx10(
|
|
1997
|
+
IconButton5,
|
|
1998
|
+
{
|
|
1999
|
+
size: "small",
|
|
2000
|
+
"aria-label": "Dismiss upgrade prompt",
|
|
2001
|
+
onClick: () => dismiss(),
|
|
2002
|
+
sx: { color: theme.palette.text.secondary, mt: -0.5, mr: -0.5 },
|
|
2003
|
+
children: /* @__PURE__ */ jsx10(CloseIcon, { fontSize: "small" })
|
|
2004
|
+
}
|
|
2005
|
+
)
|
|
2006
|
+
]
|
|
2007
|
+
}
|
|
2008
|
+
);
|
|
2009
|
+
};
|
|
2010
|
+
var rate_limit_prompt_default = RateLimitPrompt;
|
|
2011
|
+
|
|
1859
2012
|
// src/chat/hooks/useAIProvider.tsx
|
|
1860
|
-
import { useCallback, useRef as
|
|
2013
|
+
import { useCallback, useRef as useRef4 } from "react";
|
|
1861
2014
|
|
|
1862
2015
|
// src/services/telemetry/otlpExporter.ts
|
|
1863
2016
|
function redactSecretsString(s) {
|
|
@@ -2167,7 +2320,7 @@ function telemetryEndTurn(outcome) {
|
|
|
2167
2320
|
}
|
|
2168
2321
|
|
|
2169
2322
|
// src/store/engineStore.ts
|
|
2170
|
-
import { create as
|
|
2323
|
+
import { create as create4 } from "zustand";
|
|
2171
2324
|
var STORAGE_KEY = "bandit.selectedEngine";
|
|
2172
2325
|
var readStored = () => {
|
|
2173
2326
|
try {
|
|
@@ -2176,7 +2329,7 @@ var readStored = () => {
|
|
|
2176
2329
|
return null;
|
|
2177
2330
|
}
|
|
2178
2331
|
};
|
|
2179
|
-
var useEngineStore =
|
|
2332
|
+
var useEngineStore = create4((set, get) => ({
|
|
2180
2333
|
selectedEngine: readStored(),
|
|
2181
2334
|
engines: [],
|
|
2182
2335
|
loaded: false,
|
|
@@ -3222,21 +3375,21 @@ var useAIProvider = ({
|
|
|
3222
3375
|
inputRef,
|
|
3223
3376
|
onError
|
|
3224
3377
|
}) => {
|
|
3225
|
-
const currentSubRef =
|
|
3226
|
-
const lastPartialRef =
|
|
3378
|
+
const currentSubRef = useRef4(null);
|
|
3379
|
+
const lastPartialRef = useRef4({
|
|
3227
3380
|
text: "",
|
|
3228
3381
|
images: [],
|
|
3229
3382
|
usedDocs: [],
|
|
3230
3383
|
question: ""
|
|
3231
3384
|
});
|
|
3232
|
-
const flushTimerRef =
|
|
3385
|
+
const flushTimerRef = useRef4(null);
|
|
3233
3386
|
const { provider } = useAIProviderStore.getState();
|
|
3234
3387
|
const { preferences } = usePreferencesStore.getState();
|
|
3235
3388
|
const { docs } = useKnowledgeStore.getState();
|
|
3236
3389
|
const { analyzeMood, moodTokenBoost } = useMoodEngine();
|
|
3237
3390
|
const { runMemoryScan } = useMemoryEnhancer();
|
|
3238
3391
|
const { isVectorEnabled, searchMemories, searchDocuments, getUserMemories } = useVectorStore();
|
|
3239
|
-
const pinnedVectorCacheRef =
|
|
3392
|
+
const pinnedVectorCacheRef = useRef4({
|
|
3240
3393
|
fetchedAt: 0,
|
|
3241
3394
|
memories: []
|
|
3242
3395
|
});
|
|
@@ -3282,6 +3435,7 @@ var useAIProvider = ({
|
|
|
3282
3435
|
setResponse("");
|
|
3283
3436
|
setStreamBuffer("");
|
|
3284
3437
|
clearFlushTimer();
|
|
3438
|
+
useRateLimitStore.getState().dismiss();
|
|
3285
3439
|
const imageList = Array.isArray(images) ? [...images] : [];
|
|
3286
3440
|
const conversationStoreState = useConversationStore.getState();
|
|
3287
3441
|
const { addToCurrent, replaceLastAnswer, conversations, currentId } = conversationStoreState;
|
|
@@ -3798,6 +3952,29 @@ ${protocol}`;
|
|
|
3798
3952
|
overrideComponentStatus("Idle");
|
|
3799
3953
|
setIsSubmitting(false);
|
|
3800
3954
|
setIsStreaming(false);
|
|
3955
|
+
const rateLimit = parseRateLimitError(err);
|
|
3956
|
+
if (rateLimit) {
|
|
3957
|
+
debugLogger.info("Chat hit usage limit (429) \u2014 showing upgrade prompt", {
|
|
3958
|
+
scope: rateLimit.scope,
|
|
3959
|
+
frontier: rateLimit.frontier
|
|
3960
|
+
});
|
|
3961
|
+
const { replaceLastAnswer: replaceLastAnswer2 } = useConversationStore.getState();
|
|
3962
|
+
replaceLastAnswer2(
|
|
3963
|
+
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._",
|
|
3964
|
+
lastPartialRef.current.images,
|
|
3965
|
+
false,
|
|
3966
|
+
lastPartialRef.current.usedDocs,
|
|
3967
|
+
true
|
|
3968
|
+
);
|
|
3969
|
+
setResponse("");
|
|
3970
|
+
setStreamBuffer("");
|
|
3971
|
+
setIsThinking?.(false);
|
|
3972
|
+
setPendingMessage(null);
|
|
3973
|
+
setLogoVisible(false);
|
|
3974
|
+
useRateLimitStore.getState().show(rateLimit);
|
|
3975
|
+
telemetryEndTurn({ error: "rate_limited" });
|
|
3976
|
+
return;
|
|
3977
|
+
}
|
|
3801
3978
|
flushNow();
|
|
3802
3979
|
let partial = lastPartialRef.current.text || latestDisplayMessage || fullMessage;
|
|
3803
3980
|
if (partial && !partial.trim().endsWith("\u2026") && !partial.trim().endsWith("...")) {
|
|
@@ -4389,7 +4566,7 @@ ${inlineImageBlocks.join("\n\n")}` : "");
|
|
|
4389
4566
|
};
|
|
4390
4567
|
|
|
4391
4568
|
// src/hooks/useAutoScroll.ts
|
|
4392
|
-
import { useRef as
|
|
4569
|
+
import { useRef as useRef5, useEffect as useEffect5, useCallback as useCallback2 } from "react";
|
|
4393
4570
|
var SCROLL_STATE_CHANGED_EVENT = "scrollStateChanged";
|
|
4394
4571
|
var useAutoScroll = (options = {}) => {
|
|
4395
4572
|
const {
|
|
@@ -4398,9 +4575,9 @@ var useAutoScroll = (options = {}) => {
|
|
|
4398
4575
|
enabled = true,
|
|
4399
4576
|
isMobile = false
|
|
4400
4577
|
} = options;
|
|
4401
|
-
const containerRef =
|
|
4402
|
-
const targetRef =
|
|
4403
|
-
const shouldAutoScrollRef =
|
|
4578
|
+
const containerRef = useRef5(null);
|
|
4579
|
+
const targetRef = useRef5(null);
|
|
4580
|
+
const shouldAutoScrollRef = useRef5(true);
|
|
4404
4581
|
const isNearBottom = useCallback2(() => {
|
|
4405
4582
|
const container = containerRef.current;
|
|
4406
4583
|
if (!container) return true;
|
|
@@ -4605,31 +4782,31 @@ var useNetworkStatus = () => {
|
|
|
4605
4782
|
|
|
4606
4783
|
// src/chat/chat-app-bar.tsx
|
|
4607
4784
|
import { Avatar as Avatar8 } from "@mui/material";
|
|
4608
|
-
import { useEffect as useEffect12, useRef as
|
|
4785
|
+
import { useEffect as useEffect12, useRef as useRef11, useState as useState15 } from "react";
|
|
4609
4786
|
import {
|
|
4610
|
-
Box as
|
|
4611
|
-
IconButton as
|
|
4787
|
+
Box as Box14,
|
|
4788
|
+
IconButton as IconButton11,
|
|
4612
4789
|
Menu as Menu5,
|
|
4613
4790
|
MenuItem as MenuItem5,
|
|
4614
4791
|
Tooltip as Tooltip6,
|
|
4615
4792
|
useMediaQuery as useMediaQuery5,
|
|
4616
|
-
useTheme as
|
|
4793
|
+
useTheme as useTheme13,
|
|
4617
4794
|
Dialog as Dialog6,
|
|
4618
4795
|
DialogTitle as DialogTitle5,
|
|
4619
4796
|
DialogContent as DialogContent5,
|
|
4620
4797
|
DialogActions as DialogActions5,
|
|
4621
|
-
Typography as
|
|
4622
|
-
Button as
|
|
4798
|
+
Typography as Typography10,
|
|
4799
|
+
Button as Button8
|
|
4623
4800
|
} from "@mui/material";
|
|
4624
|
-
import { useNavigate } from "react-router-dom";
|
|
4801
|
+
import { useNavigate as useNavigate2 } from "react-router-dom";
|
|
4625
4802
|
|
|
4626
4803
|
// src/chat/conversation-drawer.tsx
|
|
4627
|
-
import { useState as useState13, useMemo as useMemo2, useEffect as useEffect10, useRef as
|
|
4804
|
+
import { useState as useState13, useMemo as useMemo2, useEffect as useEffect10, useRef as useRef9, useCallback as useCallback4 } from "react";
|
|
4628
4805
|
import {
|
|
4629
4806
|
Drawer,
|
|
4630
|
-
Box as
|
|
4631
|
-
Typography as
|
|
4632
|
-
IconButton as
|
|
4807
|
+
Box as Box12,
|
|
4808
|
+
Typography as Typography8,
|
|
4809
|
+
IconButton as IconButton9,
|
|
4633
4810
|
Tooltip as Tooltip5,
|
|
4634
4811
|
TextField as TextField7,
|
|
4635
4812
|
InputAdornment,
|
|
@@ -4644,24 +4821,24 @@ import {
|
|
|
4644
4821
|
DialogTitle as DialogTitle3,
|
|
4645
4822
|
DialogContent as DialogContent3,
|
|
4646
4823
|
DialogActions as DialogActions3,
|
|
4647
|
-
Button as
|
|
4824
|
+
Button as Button6,
|
|
4648
4825
|
Avatar as Avatar6,
|
|
4649
4826
|
alpha as alpha6
|
|
4650
4827
|
} from "@mui/material";
|
|
4651
4828
|
import { X as CloseIcon5, X as ClearIcon, Search as SearchIcon, Folder as FolderIcon4, MoreVertical as MoreVertIcon3, Trash2 as DeleteSweepIcon, Inbox as InboxIcon3, Plus as AddIcon4, Settings as SettingsIcon2, Brain as MemoryIcon, LogOut as LogOutIcon } from "lucide-react";
|
|
4652
|
-
import { useTheme as
|
|
4829
|
+
import { useTheme as useTheme11 } from "@mui/material/styles";
|
|
4653
4830
|
|
|
4654
4831
|
// src/chat/project-management-modal.tsx
|
|
4655
|
-
import { useState as useState9, useEffect as useEffect7, useRef as
|
|
4832
|
+
import { useState as useState9, useEffect as useEffect7, useRef as useRef6 } from "react";
|
|
4656
4833
|
import {
|
|
4657
4834
|
Modal,
|
|
4658
|
-
Button as
|
|
4835
|
+
Button as Button3,
|
|
4659
4836
|
TextField as TextField4,
|
|
4660
4837
|
List,
|
|
4661
4838
|
ListItem,
|
|
4662
|
-
IconButton as
|
|
4663
|
-
Box as
|
|
4664
|
-
Typography as
|
|
4839
|
+
IconButton as IconButton6,
|
|
4840
|
+
Box as Box8,
|
|
4841
|
+
Typography as Typography4,
|
|
4665
4842
|
Avatar as Avatar3,
|
|
4666
4843
|
Chip as Chip2,
|
|
4667
4844
|
Menu,
|
|
@@ -4672,8 +4849,8 @@ import {
|
|
|
4672
4849
|
useMediaQuery as useMediaQuery2
|
|
4673
4850
|
} from "@mui/material";
|
|
4674
4851
|
import { Plus as AddIcon2, Pencil as EditIcon2, Trash2 as DeleteIcon, MoreVertical as MoreVertIcon, Folder as FolderIcon, X as CloseIcon3, ArrowLeft as ArrowBackIcon } from "lucide-react";
|
|
4675
|
-
import { useTheme as
|
|
4676
|
-
import { Fragment as Fragment5, jsx as
|
|
4852
|
+
import { useTheme as useTheme7, alpha as alpha3 } from "@mui/material/styles";
|
|
4853
|
+
import { Fragment as Fragment5, jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
4677
4854
|
var DEFAULT_COLORS = [
|
|
4678
4855
|
"#2196F3",
|
|
4679
4856
|
"#4CAF50",
|
|
@@ -4690,7 +4867,7 @@ var ProjectManagementModal = ({
|
|
|
4690
4867
|
open,
|
|
4691
4868
|
onClose
|
|
4692
4869
|
}) => {
|
|
4693
|
-
const theme =
|
|
4870
|
+
const theme = useTheme7();
|
|
4694
4871
|
const isMobile = useMediaQuery2(theme.breakpoints.down("sm"));
|
|
4695
4872
|
const {
|
|
4696
4873
|
projects,
|
|
@@ -4715,7 +4892,7 @@ var ProjectManagementModal = ({
|
|
|
4715
4892
|
const [selectedProject, setSelectedProject] = useState9(null);
|
|
4716
4893
|
const [loading, setLoading] = useState9(false);
|
|
4717
4894
|
const [error, setError] = useState9(null);
|
|
4718
|
-
const modalContainerRef =
|
|
4895
|
+
const modalContainerRef = useRef6(null);
|
|
4719
4896
|
useEffect7(() => {
|
|
4720
4897
|
if (open && !_hasHydrated) {
|
|
4721
4898
|
hydrate();
|
|
@@ -4831,8 +5008,8 @@ var ProjectManagementModal = ({
|
|
|
4831
5008
|
const hoverSurface = alpha3(theme.palette.primary.main, theme.palette.mode === "dark" ? 0.22 : 0.08);
|
|
4832
5009
|
const headerTitle = showCreateForm ? editingProject ? "Edit Project" : "Create Project" : "Manage Projects";
|
|
4833
5010
|
const headerSubtitle = showCreateForm ? "Name, describe, and color-code your project." : "Organize conversations into cohesive projects.";
|
|
4834
|
-
const content = /* @__PURE__ */
|
|
4835
|
-
|
|
5011
|
+
const content = /* @__PURE__ */ jsxs8(
|
|
5012
|
+
Box8,
|
|
4836
5013
|
{
|
|
4837
5014
|
ref: modalContainerRef,
|
|
4838
5015
|
sx: {
|
|
@@ -4850,8 +5027,8 @@ var ProjectManagementModal = ({
|
|
|
4850
5027
|
position: "relative"
|
|
4851
5028
|
},
|
|
4852
5029
|
children: [
|
|
4853
|
-
isMobile && /* @__PURE__ */
|
|
4854
|
-
|
|
5030
|
+
isMobile && /* @__PURE__ */ jsx11(
|
|
5031
|
+
Box8,
|
|
4855
5032
|
{
|
|
4856
5033
|
sx: {
|
|
4857
5034
|
width: 56,
|
|
@@ -4864,8 +5041,8 @@ var ProjectManagementModal = ({
|
|
|
4864
5041
|
}
|
|
4865
5042
|
}
|
|
4866
5043
|
),
|
|
4867
|
-
/* @__PURE__ */
|
|
4868
|
-
|
|
5044
|
+
/* @__PURE__ */ jsxs8(
|
|
5045
|
+
Box8,
|
|
4869
5046
|
{
|
|
4870
5047
|
sx: {
|
|
4871
5048
|
px: isMobile ? 1.5 : 2.75,
|
|
@@ -4877,8 +5054,8 @@ var ProjectManagementModal = ({
|
|
|
4877
5054
|
gap: 1
|
|
4878
5055
|
},
|
|
4879
5056
|
children: [
|
|
4880
|
-
/* @__PURE__ */
|
|
4881
|
-
|
|
5057
|
+
/* @__PURE__ */ jsxs8(
|
|
5058
|
+
Box8,
|
|
4882
5059
|
{
|
|
4883
5060
|
sx: {
|
|
4884
5061
|
display: "flex",
|
|
@@ -4887,8 +5064,8 @@ var ProjectManagementModal = ({
|
|
|
4887
5064
|
gap: 1
|
|
4888
5065
|
},
|
|
4889
5066
|
children: [
|
|
4890
|
-
/* @__PURE__ */
|
|
4891
|
-
|
|
5067
|
+
/* @__PURE__ */ jsxs8(
|
|
5068
|
+
Box8,
|
|
4892
5069
|
{
|
|
4893
5070
|
sx: {
|
|
4894
5071
|
display: "flex",
|
|
@@ -4898,9 +5075,9 @@ var ProjectManagementModal = ({
|
|
|
4898
5075
|
flex: 1
|
|
4899
5076
|
},
|
|
4900
5077
|
children: [
|
|
4901
|
-
showCreateForm && /* @__PURE__ */
|
|
4902
|
-
/* @__PURE__ */
|
|
4903
|
-
|
|
5078
|
+
showCreateForm && /* @__PURE__ */ jsx11(IconButton6, { onClick: resetForm, size: "small", sx: { mr: 0.5 }, children: /* @__PURE__ */ jsx11(ArrowBackIcon, { size: 16 }) }),
|
|
5079
|
+
/* @__PURE__ */ jsx11(
|
|
5080
|
+
Typography4,
|
|
4904
5081
|
{
|
|
4905
5082
|
variant: "h6",
|
|
4906
5083
|
sx: {
|
|
@@ -4916,16 +5093,16 @@ var ProjectManagementModal = ({
|
|
|
4916
5093
|
]
|
|
4917
5094
|
}
|
|
4918
5095
|
),
|
|
4919
|
-
/* @__PURE__ */
|
|
5096
|
+
/* @__PURE__ */ jsx11(IconButton6, { onClick: handleClose, size: "small", children: /* @__PURE__ */ jsx11(CloseIcon3, {}) })
|
|
4920
5097
|
]
|
|
4921
5098
|
}
|
|
4922
5099
|
),
|
|
4923
|
-
/* @__PURE__ */
|
|
5100
|
+
/* @__PURE__ */ jsx11(Typography4, { variant: "body2", color: "text.secondary", children: headerSubtitle })
|
|
4924
5101
|
]
|
|
4925
5102
|
}
|
|
4926
5103
|
),
|
|
4927
|
-
/* @__PURE__ */
|
|
4928
|
-
|
|
5104
|
+
/* @__PURE__ */ jsxs8(
|
|
5105
|
+
Box8,
|
|
4929
5106
|
{
|
|
4930
5107
|
sx: {
|
|
4931
5108
|
flex: 1,
|
|
@@ -4937,9 +5114,9 @@ var ProjectManagementModal = ({
|
|
|
4937
5114
|
gap: 2.5
|
|
4938
5115
|
},
|
|
4939
5116
|
children: [
|
|
4940
|
-
error && /* @__PURE__ */
|
|
4941
|
-
showCreateForm ? /* @__PURE__ */
|
|
4942
|
-
/* @__PURE__ */
|
|
5117
|
+
error && /* @__PURE__ */ jsx11(Alert, { severity: "error", onClose: () => setError(null), children: error }),
|
|
5118
|
+
showCreateForm ? /* @__PURE__ */ jsxs8(Box8, { sx: { display: "flex", flexDirection: "column", gap: 2 }, children: [
|
|
5119
|
+
/* @__PURE__ */ jsx11(
|
|
4943
5120
|
TextField4,
|
|
4944
5121
|
{
|
|
4945
5122
|
label: "Project name",
|
|
@@ -4951,7 +5128,7 @@ var ProjectManagementModal = ({
|
|
|
4951
5128
|
autoFocus: true
|
|
4952
5129
|
}
|
|
4953
5130
|
),
|
|
4954
|
-
/* @__PURE__ */
|
|
5131
|
+
/* @__PURE__ */ jsx11(
|
|
4955
5132
|
TextField4,
|
|
4956
5133
|
{
|
|
4957
5134
|
label: "Description (optional)",
|
|
@@ -4963,7 +5140,7 @@ var ProjectManagementModal = ({
|
|
|
4963
5140
|
disabled: loading
|
|
4964
5141
|
}
|
|
4965
5142
|
),
|
|
4966
|
-
/* @__PURE__ */
|
|
5143
|
+
/* @__PURE__ */ jsx11(
|
|
4967
5144
|
TextField4,
|
|
4968
5145
|
{
|
|
4969
5146
|
label: "Project instructions (optional)",
|
|
@@ -4976,10 +5153,10 @@ var ProjectManagementModal = ({
|
|
|
4976
5153
|
disabled: loading
|
|
4977
5154
|
}
|
|
4978
5155
|
),
|
|
4979
|
-
/* @__PURE__ */
|
|
4980
|
-
/* @__PURE__ */
|
|
4981
|
-
/* @__PURE__ */
|
|
4982
|
-
|
|
5156
|
+
/* @__PURE__ */ jsxs8(Box8, { children: [
|
|
5157
|
+
/* @__PURE__ */ jsx11(Typography4, { variant: "subtitle2", sx: { mb: 1 }, children: "Color" }),
|
|
5158
|
+
/* @__PURE__ */ jsx11(Box8, { sx: { display: "flex", flexWrap: "wrap", gap: 1 }, children: DEFAULT_COLORS.map((color) => /* @__PURE__ */ jsx11(
|
|
5159
|
+
Box8,
|
|
4983
5160
|
{
|
|
4984
5161
|
sx: {
|
|
4985
5162
|
width: 32,
|
|
@@ -4999,11 +5176,11 @@ var ProjectManagementModal = ({
|
|
|
4999
5176
|
color
|
|
5000
5177
|
)) })
|
|
5001
5178
|
] })
|
|
5002
|
-
] }) : /* @__PURE__ */
|
|
5003
|
-
/* @__PURE__ */
|
|
5004
|
-
|
|
5179
|
+
] }) : /* @__PURE__ */ jsxs8(Box8, { sx: { display: "flex", flexDirection: "column", gap: 2 }, children: [
|
|
5180
|
+
/* @__PURE__ */ jsx11(
|
|
5181
|
+
Button3,
|
|
5005
5182
|
{
|
|
5006
|
-
startIcon: /* @__PURE__ */
|
|
5183
|
+
startIcon: /* @__PURE__ */ jsx11(AddIcon2, {}),
|
|
5007
5184
|
onClick: () => setShowCreateForm(true),
|
|
5008
5185
|
variant: "contained",
|
|
5009
5186
|
sx: {
|
|
@@ -5015,8 +5192,8 @@ var ProjectManagementModal = ({
|
|
|
5015
5192
|
children: "Create project"
|
|
5016
5193
|
}
|
|
5017
5194
|
),
|
|
5018
|
-
projects.length === 0 ? /* @__PURE__ */
|
|
5019
|
-
|
|
5195
|
+
projects.length === 0 ? /* @__PURE__ */ jsxs8(
|
|
5196
|
+
Box8,
|
|
5020
5197
|
{
|
|
5021
5198
|
sx: {
|
|
5022
5199
|
textAlign: "center",
|
|
@@ -5028,15 +5205,15 @@ var ProjectManagementModal = ({
|
|
|
5028
5205
|
backgroundColor: subtleSurface
|
|
5029
5206
|
},
|
|
5030
5207
|
children: [
|
|
5031
|
-
/* @__PURE__ */
|
|
5032
|
-
/* @__PURE__ */
|
|
5033
|
-
/* @__PURE__ */
|
|
5208
|
+
/* @__PURE__ */ jsx11(FolderIcon, { size: 48, style: { marginBottom: 8, opacity: 0.5 } }),
|
|
5209
|
+
/* @__PURE__ */ jsx11(Typography4, { variant: "body1", sx: { fontWeight: 600 }, children: "No projects yet" }),
|
|
5210
|
+
/* @__PURE__ */ jsx11(Typography4, { variant: "body2", children: "Create your first project to organize conversations." })
|
|
5034
5211
|
]
|
|
5035
5212
|
}
|
|
5036
|
-
) : /* @__PURE__ */
|
|
5213
|
+
) : /* @__PURE__ */ jsx11(List, { sx: { display: "flex", flexDirection: "column", gap: 1.25, py: 0 }, children: projects.map((project) => {
|
|
5037
5214
|
const conversationCount = getConversationsByProject(project.id).length;
|
|
5038
|
-
return /* @__PURE__ */
|
|
5039
|
-
|
|
5215
|
+
return /* @__PURE__ */ jsx11(ListItem, { disablePadding: true, children: /* @__PURE__ */ jsxs8(
|
|
5216
|
+
Box8,
|
|
5040
5217
|
{
|
|
5041
5218
|
sx: {
|
|
5042
5219
|
display: "flex",
|
|
@@ -5054,7 +5231,7 @@ var ProjectManagementModal = ({
|
|
|
5054
5231
|
}
|
|
5055
5232
|
},
|
|
5056
5233
|
children: [
|
|
5057
|
-
/* @__PURE__ */
|
|
5234
|
+
/* @__PURE__ */ jsx11(
|
|
5058
5235
|
Avatar3,
|
|
5059
5236
|
{
|
|
5060
5237
|
sx: {
|
|
@@ -5063,20 +5240,20 @@ var ProjectManagementModal = ({
|
|
|
5063
5240
|
height: 36,
|
|
5064
5241
|
fontSize: "1rem"
|
|
5065
5242
|
},
|
|
5066
|
-
children: /* @__PURE__ */
|
|
5243
|
+
children: /* @__PURE__ */ jsx11(FolderIcon, { size: 16 })
|
|
5067
5244
|
}
|
|
5068
5245
|
),
|
|
5069
|
-
/* @__PURE__ */
|
|
5070
|
-
/* @__PURE__ */
|
|
5071
|
-
/* @__PURE__ */
|
|
5072
|
-
|
|
5246
|
+
/* @__PURE__ */ jsxs8(Box8, { sx: { flex: 1, minWidth: 0 }, children: [
|
|
5247
|
+
/* @__PURE__ */ jsxs8(Box8, { sx: { display: "flex", alignItems: "center", gap: 1, flexWrap: "wrap" }, children: [
|
|
5248
|
+
/* @__PURE__ */ jsx11(
|
|
5249
|
+
Typography4,
|
|
5073
5250
|
{
|
|
5074
5251
|
variant: "subtitle1",
|
|
5075
5252
|
sx: { fontWeight: 600, overflow: "hidden", textOverflow: "ellipsis" },
|
|
5076
5253
|
children: project.name
|
|
5077
5254
|
}
|
|
5078
5255
|
),
|
|
5079
|
-
/* @__PURE__ */
|
|
5256
|
+
/* @__PURE__ */ jsx11(
|
|
5080
5257
|
Chip2,
|
|
5081
5258
|
{
|
|
5082
5259
|
label: `${conversationCount}`,
|
|
@@ -5091,8 +5268,8 @@ var ProjectManagementModal = ({
|
|
|
5091
5268
|
}
|
|
5092
5269
|
)
|
|
5093
5270
|
] }),
|
|
5094
|
-
project.description && /* @__PURE__ */
|
|
5095
|
-
|
|
5271
|
+
project.description && /* @__PURE__ */ jsx11(
|
|
5272
|
+
Typography4,
|
|
5096
5273
|
{
|
|
5097
5274
|
variant: "body2",
|
|
5098
5275
|
color: "text.secondary",
|
|
@@ -5101,8 +5278,8 @@ var ProjectManagementModal = ({
|
|
|
5101
5278
|
}
|
|
5102
5279
|
)
|
|
5103
5280
|
] }),
|
|
5104
|
-
/* @__PURE__ */
|
|
5105
|
-
|
|
5281
|
+
/* @__PURE__ */ jsx11(
|
|
5282
|
+
IconButton6,
|
|
5106
5283
|
{
|
|
5107
5284
|
onClick: (e) => {
|
|
5108
5285
|
e.stopPropagation();
|
|
@@ -5114,7 +5291,7 @@ var ProjectManagementModal = ({
|
|
|
5114
5291
|
mt: 0.25,
|
|
5115
5292
|
zIndex: 1
|
|
5116
5293
|
},
|
|
5117
|
-
children: /* @__PURE__ */
|
|
5294
|
+
children: /* @__PURE__ */ jsx11(MoreVertIcon, { size: 16 })
|
|
5118
5295
|
}
|
|
5119
5296
|
)
|
|
5120
5297
|
]
|
|
@@ -5125,8 +5302,8 @@ var ProjectManagementModal = ({
|
|
|
5125
5302
|
]
|
|
5126
5303
|
}
|
|
5127
5304
|
),
|
|
5128
|
-
/* @__PURE__ */
|
|
5129
|
-
|
|
5305
|
+
/* @__PURE__ */ jsx11(
|
|
5306
|
+
Box8,
|
|
5130
5307
|
{
|
|
5131
5308
|
sx: {
|
|
5132
5309
|
px: isMobile ? 1.5 : 2.75,
|
|
@@ -5136,9 +5313,9 @@ var ProjectManagementModal = ({
|
|
|
5136
5313
|
justifyContent: "flex-end",
|
|
5137
5314
|
gap: 1
|
|
5138
5315
|
},
|
|
5139
|
-
children: showCreateForm ? /* @__PURE__ */
|
|
5140
|
-
/* @__PURE__ */
|
|
5141
|
-
|
|
5316
|
+
children: showCreateForm ? /* @__PURE__ */ jsxs8(Fragment5, { children: [
|
|
5317
|
+
/* @__PURE__ */ jsx11(
|
|
5318
|
+
Button3,
|
|
5142
5319
|
{
|
|
5143
5320
|
onClick: resetForm,
|
|
5144
5321
|
disabled: loading,
|
|
@@ -5146,21 +5323,21 @@ var ProjectManagementModal = ({
|
|
|
5146
5323
|
children: "Cancel"
|
|
5147
5324
|
}
|
|
5148
5325
|
),
|
|
5149
|
-
/* @__PURE__ */
|
|
5150
|
-
|
|
5326
|
+
/* @__PURE__ */ jsx11(
|
|
5327
|
+
Button3,
|
|
5151
5328
|
{
|
|
5152
5329
|
onClick: editingProject ? handleEditProject : handleCreateProject,
|
|
5153
5330
|
variant: "contained",
|
|
5154
5331
|
disabled: loading,
|
|
5155
|
-
startIcon: loading ? /* @__PURE__ */
|
|
5332
|
+
startIcon: loading ? /* @__PURE__ */ jsx11(CircularProgress3, { size: 16 }) : void 0,
|
|
5156
5333
|
sx: { textTransform: "none", borderRadius: 2 },
|
|
5157
5334
|
children: editingProject ? "Update project" : "Create project"
|
|
5158
5335
|
}
|
|
5159
5336
|
)
|
|
5160
|
-
] }) : /* @__PURE__ */
|
|
5337
|
+
] }) : /* @__PURE__ */ jsx11(Button3, { onClick: handleClose, sx: { textTransform: "none", borderRadius: 2 }, children: "Close" })
|
|
5161
5338
|
}
|
|
5162
5339
|
),
|
|
5163
|
-
/* @__PURE__ */
|
|
5340
|
+
/* @__PURE__ */ jsxs8(
|
|
5164
5341
|
Menu,
|
|
5165
5342
|
{
|
|
5166
5343
|
anchorEl: menuAnchor,
|
|
@@ -5182,20 +5359,20 @@ var ProjectManagementModal = ({
|
|
|
5182
5359
|
}
|
|
5183
5360
|
},
|
|
5184
5361
|
children: [
|
|
5185
|
-
/* @__PURE__ */
|
|
5362
|
+
/* @__PURE__ */ jsx11(
|
|
5186
5363
|
MenuItem,
|
|
5187
5364
|
{
|
|
5188
5365
|
onClick: () => {
|
|
5189
5366
|
if (!selectedProject) return;
|
|
5190
5367
|
startEdit(selectedProject);
|
|
5191
5368
|
},
|
|
5192
|
-
children: /* @__PURE__ */
|
|
5193
|
-
/* @__PURE__ */
|
|
5194
|
-
/* @__PURE__ */
|
|
5369
|
+
children: /* @__PURE__ */ jsxs8(Box8, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
5370
|
+
/* @__PURE__ */ jsx11(EditIcon2, { size: 16 }),
|
|
5371
|
+
/* @__PURE__ */ jsx11(Typography4, { variant: "body2", color: "inherit", children: "Edit" })
|
|
5195
5372
|
] })
|
|
5196
5373
|
}
|
|
5197
5374
|
),
|
|
5198
|
-
/* @__PURE__ */
|
|
5375
|
+
/* @__PURE__ */ jsx11(
|
|
5199
5376
|
MenuItem,
|
|
5200
5377
|
{
|
|
5201
5378
|
onClick: () => {
|
|
@@ -5203,9 +5380,9 @@ var ProjectManagementModal = ({
|
|
|
5203
5380
|
handleDeleteProject(selectedProject);
|
|
5204
5381
|
},
|
|
5205
5382
|
sx: { color: theme.palette.error.main },
|
|
5206
|
-
children: /* @__PURE__ */
|
|
5207
|
-
/* @__PURE__ */
|
|
5208
|
-
/* @__PURE__ */
|
|
5383
|
+
children: /* @__PURE__ */ jsxs8(Box8, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
5384
|
+
/* @__PURE__ */ jsx11(DeleteIcon, { size: 16 }),
|
|
5385
|
+
/* @__PURE__ */ jsx11(Typography4, { variant: "body2", color: "inherit", children: "Delete" })
|
|
5209
5386
|
] })
|
|
5210
5387
|
}
|
|
5211
5388
|
)
|
|
@@ -5215,7 +5392,7 @@ var ProjectManagementModal = ({
|
|
|
5215
5392
|
]
|
|
5216
5393
|
}
|
|
5217
5394
|
);
|
|
5218
|
-
return /* @__PURE__ */
|
|
5395
|
+
return /* @__PURE__ */ jsx11(Fragment5, { children: isMobile ? /* @__PURE__ */ jsx11(
|
|
5219
5396
|
SwipeableDrawer,
|
|
5220
5397
|
{
|
|
5221
5398
|
anchor: "bottom",
|
|
@@ -5235,7 +5412,7 @@ var ProjectManagementModal = ({
|
|
|
5235
5412
|
},
|
|
5236
5413
|
children: content
|
|
5237
5414
|
}
|
|
5238
|
-
) : /* @__PURE__ */
|
|
5415
|
+
) : /* @__PURE__ */ jsx11(
|
|
5239
5416
|
Modal,
|
|
5240
5417
|
{
|
|
5241
5418
|
open,
|
|
@@ -5260,28 +5437,28 @@ import {
|
|
|
5260
5437
|
DialogTitle,
|
|
5261
5438
|
DialogContent,
|
|
5262
5439
|
DialogActions,
|
|
5263
|
-
Button as
|
|
5440
|
+
Button as Button4,
|
|
5264
5441
|
List as List2,
|
|
5265
5442
|
ListItem as ListItem2,
|
|
5266
5443
|
ListItemButton,
|
|
5267
5444
|
ListItemText,
|
|
5268
5445
|
ListItemIcon,
|
|
5269
|
-
Typography as
|
|
5446
|
+
Typography as Typography5,
|
|
5270
5447
|
Avatar as Avatar4,
|
|
5271
5448
|
Radio,
|
|
5272
|
-
Box as
|
|
5449
|
+
Box as Box9,
|
|
5273
5450
|
Divider
|
|
5274
5451
|
} from "@mui/material";
|
|
5275
5452
|
import { Folder as FolderIcon2, Inbox as InboxIcon } from "lucide-react";
|
|
5276
|
-
import { useTheme as
|
|
5277
|
-
import { jsx as
|
|
5453
|
+
import { useTheme as useTheme8 } from "@mui/material/styles";
|
|
5454
|
+
import { jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
5278
5455
|
var MoveConversationModal = ({
|
|
5279
5456
|
open,
|
|
5280
5457
|
onClose,
|
|
5281
5458
|
conversations,
|
|
5282
5459
|
currentProjectId = null
|
|
5283
5460
|
}) => {
|
|
5284
|
-
const theme =
|
|
5461
|
+
const theme = useTheme8();
|
|
5285
5462
|
const { projects, _hasHydrated, hydrate } = useProjectStore();
|
|
5286
5463
|
const { moveConversationToProject } = useConversationStore();
|
|
5287
5464
|
const [selectedProjectId, setSelectedProjectId] = useState10(
|
|
@@ -5311,7 +5488,7 @@ var MoveConversationModal = ({
|
|
|
5311
5488
|
};
|
|
5312
5489
|
const conversationCount = conversations.length;
|
|
5313
5490
|
const isMultiple = conversationCount > 1;
|
|
5314
|
-
return /* @__PURE__ */
|
|
5491
|
+
return /* @__PURE__ */ jsxs9(
|
|
5315
5492
|
Dialog2,
|
|
5316
5493
|
{
|
|
5317
5494
|
open,
|
|
@@ -5325,20 +5502,20 @@ var MoveConversationModal = ({
|
|
|
5325
5502
|
}
|
|
5326
5503
|
},
|
|
5327
5504
|
children: [
|
|
5328
|
-
/* @__PURE__ */
|
|
5505
|
+
/* @__PURE__ */ jsxs9(DialogTitle, { children: [
|
|
5329
5506
|
"Move ",
|
|
5330
5507
|
isMultiple ? `${conversationCount} Conversations` : "Conversation"
|
|
5331
5508
|
] }),
|
|
5332
|
-
/* @__PURE__ */
|
|
5333
|
-
/* @__PURE__ */
|
|
5334
|
-
/* @__PURE__ */
|
|
5335
|
-
/* @__PURE__ */
|
|
5509
|
+
/* @__PURE__ */ jsxs9(DialogContent, { sx: { px: 3 }, children: [
|
|
5510
|
+
/* @__PURE__ */ jsx12(Typography5, { variant: "body2", color: "text.secondary", sx: { mb: 2 }, children: isMultiple ? `Select a project to move ${conversationCount} conversations to:` : `Select a project to move "${conversations[0]?.name}" to:` }),
|
|
5511
|
+
/* @__PURE__ */ jsxs9(List2, { children: [
|
|
5512
|
+
/* @__PURE__ */ jsx12(ListItem2, { disablePadding: true, children: /* @__PURE__ */ jsxs9(
|
|
5336
5513
|
ListItemButton,
|
|
5337
5514
|
{
|
|
5338
5515
|
onClick: () => setSelectedProjectId(null),
|
|
5339
5516
|
selected: selectedProjectId === null,
|
|
5340
5517
|
children: [
|
|
5341
|
-
/* @__PURE__ */
|
|
5518
|
+
/* @__PURE__ */ jsx12(ListItemIcon, { children: /* @__PURE__ */ jsx12(
|
|
5342
5519
|
Radio,
|
|
5343
5520
|
{
|
|
5344
5521
|
checked: selectedProjectId === null,
|
|
@@ -5346,7 +5523,7 @@ var MoveConversationModal = ({
|
|
|
5346
5523
|
size: "small"
|
|
5347
5524
|
}
|
|
5348
5525
|
) }),
|
|
5349
|
-
/* @__PURE__ */
|
|
5526
|
+
/* @__PURE__ */ jsx12(ListItemIcon, { children: /* @__PURE__ */ jsx12(
|
|
5350
5527
|
Avatar4,
|
|
5351
5528
|
{
|
|
5352
5529
|
sx: {
|
|
@@ -5354,10 +5531,10 @@ var MoveConversationModal = ({
|
|
|
5354
5531
|
width: 32,
|
|
5355
5532
|
height: 32
|
|
5356
5533
|
},
|
|
5357
|
-
children: /* @__PURE__ */
|
|
5534
|
+
children: /* @__PURE__ */ jsx12(InboxIcon, {})
|
|
5358
5535
|
}
|
|
5359
5536
|
) }),
|
|
5360
|
-
/* @__PURE__ */
|
|
5537
|
+
/* @__PURE__ */ jsx12(
|
|
5361
5538
|
ListItemText,
|
|
5362
5539
|
{
|
|
5363
5540
|
primary: "No Project",
|
|
@@ -5367,14 +5544,14 @@ var MoveConversationModal = ({
|
|
|
5367
5544
|
]
|
|
5368
5545
|
}
|
|
5369
5546
|
) }),
|
|
5370
|
-
/* @__PURE__ */
|
|
5371
|
-
projects.map((project) => /* @__PURE__ */
|
|
5547
|
+
/* @__PURE__ */ jsx12(Divider, { sx: { my: 1 } }),
|
|
5548
|
+
projects.map((project) => /* @__PURE__ */ jsx12(ListItem2, { disablePadding: true, children: /* @__PURE__ */ jsxs9(
|
|
5372
5549
|
ListItemButton,
|
|
5373
5550
|
{
|
|
5374
5551
|
onClick: () => setSelectedProjectId(project.id),
|
|
5375
5552
|
selected: selectedProjectId === project.id,
|
|
5376
5553
|
children: [
|
|
5377
|
-
/* @__PURE__ */
|
|
5554
|
+
/* @__PURE__ */ jsx12(ListItemIcon, { children: /* @__PURE__ */ jsx12(
|
|
5378
5555
|
Radio,
|
|
5379
5556
|
{
|
|
5380
5557
|
checked: selectedProjectId === project.id,
|
|
@@ -5382,7 +5559,7 @@ var MoveConversationModal = ({
|
|
|
5382
5559
|
size: "small"
|
|
5383
5560
|
}
|
|
5384
5561
|
) }),
|
|
5385
|
-
/* @__PURE__ */
|
|
5562
|
+
/* @__PURE__ */ jsx12(ListItemIcon, { children: /* @__PURE__ */ jsx12(
|
|
5386
5563
|
Avatar4,
|
|
5387
5564
|
{
|
|
5388
5565
|
sx: {
|
|
@@ -5390,10 +5567,10 @@ var MoveConversationModal = ({
|
|
|
5390
5567
|
width: 32,
|
|
5391
5568
|
height: 32
|
|
5392
5569
|
},
|
|
5393
|
-
children: /* @__PURE__ */
|
|
5570
|
+
children: /* @__PURE__ */ jsx12(FolderIcon2, {})
|
|
5394
5571
|
}
|
|
5395
5572
|
) }),
|
|
5396
|
-
/* @__PURE__ */
|
|
5573
|
+
/* @__PURE__ */ jsx12(
|
|
5397
5574
|
ListItemText,
|
|
5398
5575
|
{
|
|
5399
5576
|
primary: project.name,
|
|
@@ -5403,17 +5580,17 @@ var MoveConversationModal = ({
|
|
|
5403
5580
|
]
|
|
5404
5581
|
}
|
|
5405
5582
|
) }, project.id)),
|
|
5406
|
-
projects.length === 0 && /* @__PURE__ */
|
|
5583
|
+
projects.length === 0 && /* @__PURE__ */ jsx12(Box9, { sx: {
|
|
5407
5584
|
textAlign: "center",
|
|
5408
5585
|
py: 2,
|
|
5409
5586
|
color: theme.palette.text.secondary
|
|
5410
|
-
}, children: /* @__PURE__ */
|
|
5587
|
+
}, children: /* @__PURE__ */ jsx12(Typography5, { variant: "body2", children: "No projects available. Create a project first to organize conversations." }) })
|
|
5411
5588
|
] })
|
|
5412
5589
|
] }),
|
|
5413
|
-
/* @__PURE__ */
|
|
5414
|
-
/* @__PURE__ */
|
|
5415
|
-
/* @__PURE__ */
|
|
5416
|
-
|
|
5590
|
+
/* @__PURE__ */ jsxs9(DialogActions, { sx: { px: 3, pb: 2 }, children: [
|
|
5591
|
+
/* @__PURE__ */ jsx12(Button4, { onClick: onClose, children: "Cancel" }),
|
|
5592
|
+
/* @__PURE__ */ jsxs9(
|
|
5593
|
+
Button4,
|
|
5417
5594
|
{
|
|
5418
5595
|
onClick: handleMove,
|
|
5419
5596
|
variant: "contained",
|
|
@@ -5432,11 +5609,11 @@ var MoveConversationModal = ({
|
|
|
5432
5609
|
var move_conversation_modal_default = MoveConversationModal;
|
|
5433
5610
|
|
|
5434
5611
|
// src/chat/simple-conversation-item.tsx
|
|
5435
|
-
import { useState as useState11, useRef as
|
|
5612
|
+
import { useState as useState11, useRef as useRef7, useEffect as useEffect9 } from "react";
|
|
5436
5613
|
import {
|
|
5437
|
-
Box as
|
|
5438
|
-
Typography as
|
|
5439
|
-
IconButton as
|
|
5614
|
+
Box as Box10,
|
|
5615
|
+
Typography as Typography6,
|
|
5616
|
+
IconButton as IconButton7,
|
|
5440
5617
|
Menu as Menu2,
|
|
5441
5618
|
MenuItem as MenuItem2,
|
|
5442
5619
|
ListItemIcon as ListItemIcon2,
|
|
@@ -5447,11 +5624,11 @@ import {
|
|
|
5447
5624
|
DialogTitle as DialogTitle2,
|
|
5448
5625
|
DialogContent as DialogContent2,
|
|
5449
5626
|
DialogActions as DialogActions2,
|
|
5450
|
-
Button as
|
|
5627
|
+
Button as Button5
|
|
5451
5628
|
} from "@mui/material";
|
|
5452
5629
|
import { MoreVertical as MoreVertIcon2, Pencil as EditIcon3, Trash2 as DeleteIcon2, GripVertical as DragIcon, MailOpen as MoveIcon } from "lucide-react";
|
|
5453
|
-
import { useTheme as
|
|
5454
|
-
import { Fragment as Fragment6, jsx as
|
|
5630
|
+
import { useTheme as useTheme9, alpha as alpha4 } from "@mui/material/styles";
|
|
5631
|
+
import { Fragment as Fragment6, jsx as jsx13, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
5455
5632
|
var SimpleConversationItem = ({
|
|
5456
5633
|
conversation,
|
|
5457
5634
|
isSelected,
|
|
@@ -5467,7 +5644,7 @@ var SimpleConversationItem = ({
|
|
|
5467
5644
|
onTouchDragEnd,
|
|
5468
5645
|
isTouchDragActive
|
|
5469
5646
|
}) => {
|
|
5470
|
-
const theme =
|
|
5647
|
+
const theme = useTheme9();
|
|
5471
5648
|
const isMobile = useMediaQuery3(theme.breakpoints.down("sm"));
|
|
5472
5649
|
const [anchorEl, setAnchorEl] = useState11(null);
|
|
5473
5650
|
const [isEditing, setIsEditing] = useState11(false);
|
|
@@ -5475,10 +5652,10 @@ var SimpleConversationItem = ({
|
|
|
5475
5652
|
const [isDragging, setIsDragging] = useState11(false);
|
|
5476
5653
|
const [isTouchDragging, setIsTouchDragging] = useState11(false);
|
|
5477
5654
|
const [showRenameDialog, setShowRenameDialog] = useState11(false);
|
|
5478
|
-
const longPressTimeoutRef =
|
|
5479
|
-
const touchStartPointRef =
|
|
5480
|
-
const activeTouchIdRef =
|
|
5481
|
-
const suppressClickRef =
|
|
5655
|
+
const longPressTimeoutRef = useRef7(null);
|
|
5656
|
+
const touchStartPointRef = useRef7(null);
|
|
5657
|
+
const activeTouchIdRef = useRef7(null);
|
|
5658
|
+
const suppressClickRef = useRef7(false);
|
|
5482
5659
|
const highlightText = (text, query) => {
|
|
5483
5660
|
if (!query || !query.trim()) {
|
|
5484
5661
|
return text;
|
|
@@ -5486,8 +5663,8 @@ var SimpleConversationItem = ({
|
|
|
5486
5663
|
const regex = new RegExp(`(${query.trim()})`, "gi");
|
|
5487
5664
|
const parts = text.split(regex);
|
|
5488
5665
|
return parts.map(
|
|
5489
|
-
(part, index) => regex.test(part) ? /* @__PURE__ */
|
|
5490
|
-
|
|
5666
|
+
(part, index) => regex.test(part) ? /* @__PURE__ */ jsx13(
|
|
5667
|
+
Box10,
|
|
5491
5668
|
{
|
|
5492
5669
|
component: "span",
|
|
5493
5670
|
sx: {
|
|
@@ -5622,9 +5799,9 @@ var SimpleConversationItem = ({
|
|
|
5622
5799
|
setIsTouchDragging(false);
|
|
5623
5800
|
}
|
|
5624
5801
|
}, [isTouchDragActive, isTouchDragging]);
|
|
5625
|
-
return /* @__PURE__ */
|
|
5626
|
-
/* @__PURE__ */
|
|
5627
|
-
|
|
5802
|
+
return /* @__PURE__ */ jsxs10(Fragment6, { children: [
|
|
5803
|
+
/* @__PURE__ */ jsxs10(
|
|
5804
|
+
Box10,
|
|
5628
5805
|
{
|
|
5629
5806
|
"data-project-id": conversation.projectId ?? "__ungrouped",
|
|
5630
5807
|
draggable: !isMobile && !isEditing,
|
|
@@ -5676,7 +5853,7 @@ var SimpleConversationItem = ({
|
|
|
5676
5853
|
}
|
|
5677
5854
|
},
|
|
5678
5855
|
children: [
|
|
5679
|
-
!isMobile && !isEditing && /* @__PURE__ */
|
|
5856
|
+
!isMobile && !isEditing && /* @__PURE__ */ jsx13(
|
|
5680
5857
|
DragIcon,
|
|
5681
5858
|
{
|
|
5682
5859
|
size: 16,
|
|
@@ -5684,8 +5861,8 @@ var SimpleConversationItem = ({
|
|
|
5684
5861
|
style: { marginRight: 4, cursor: "grab" }
|
|
5685
5862
|
}
|
|
5686
5863
|
),
|
|
5687
|
-
/* @__PURE__ */
|
|
5688
|
-
isEditing ? /* @__PURE__ */
|
|
5864
|
+
/* @__PURE__ */ jsxs10(Box10, { sx: { flex: 1, minWidth: 0 }, children: [
|
|
5865
|
+
isEditing ? /* @__PURE__ */ jsx13(
|
|
5689
5866
|
TextField5,
|
|
5690
5867
|
{
|
|
5691
5868
|
value: editName,
|
|
@@ -5708,8 +5885,8 @@ var SimpleConversationItem = ({
|
|
|
5708
5885
|
}
|
|
5709
5886
|
}
|
|
5710
5887
|
}
|
|
5711
|
-
) : /* @__PURE__ */
|
|
5712
|
-
|
|
5888
|
+
) : /* @__PURE__ */ jsx13(
|
|
5889
|
+
Typography6,
|
|
5713
5890
|
{
|
|
5714
5891
|
variant: "body2",
|
|
5715
5892
|
sx: {
|
|
@@ -5723,8 +5900,8 @@ var SimpleConversationItem = ({
|
|
|
5723
5900
|
children: highlightText(conversation.name, searchQuery)
|
|
5724
5901
|
}
|
|
5725
5902
|
),
|
|
5726
|
-
!isEditing && snippet && /* @__PURE__ */
|
|
5727
|
-
|
|
5903
|
+
!isEditing && snippet && /* @__PURE__ */ jsx13(
|
|
5904
|
+
Typography6,
|
|
5728
5905
|
{
|
|
5729
5906
|
variant: "caption",
|
|
5730
5907
|
sx: {
|
|
@@ -5742,8 +5919,8 @@ var SimpleConversationItem = ({
|
|
|
5742
5919
|
}
|
|
5743
5920
|
)
|
|
5744
5921
|
] }),
|
|
5745
|
-
!isEditing && /* @__PURE__ */
|
|
5746
|
-
|
|
5922
|
+
!isEditing && /* @__PURE__ */ jsx13(
|
|
5923
|
+
IconButton7,
|
|
5747
5924
|
{
|
|
5748
5925
|
onClick: handleMenuOpen,
|
|
5749
5926
|
size: "small",
|
|
@@ -5771,10 +5948,10 @@ var SimpleConversationItem = ({
|
|
|
5771
5948
|
}
|
|
5772
5949
|
}
|
|
5773
5950
|
},
|
|
5774
|
-
children: /* @__PURE__ */
|
|
5951
|
+
children: /* @__PURE__ */ jsx13(MoreVertIcon2, { size: 16 })
|
|
5775
5952
|
}
|
|
5776
5953
|
),
|
|
5777
|
-
/* @__PURE__ */
|
|
5954
|
+
/* @__PURE__ */ jsxs10(
|
|
5778
5955
|
Menu2,
|
|
5779
5956
|
{
|
|
5780
5957
|
anchorEl,
|
|
@@ -5801,17 +5978,17 @@ var SimpleConversationItem = ({
|
|
|
5801
5978
|
}
|
|
5802
5979
|
},
|
|
5803
5980
|
children: [
|
|
5804
|
-
onRename && /* @__PURE__ */
|
|
5805
|
-
/* @__PURE__ */
|
|
5806
|
-
/* @__PURE__ */
|
|
5981
|
+
onRename && /* @__PURE__ */ jsxs10(MenuItem2, { onClick: handleEdit, children: [
|
|
5982
|
+
/* @__PURE__ */ jsx13(ListItemIcon2, { children: /* @__PURE__ */ jsx13(EditIcon3, { size: 16 }) }),
|
|
5983
|
+
/* @__PURE__ */ jsx13(ListItemText2, { children: "Rename" })
|
|
5807
5984
|
] }),
|
|
5808
|
-
onMove && /* @__PURE__ */
|
|
5809
|
-
/* @__PURE__ */
|
|
5810
|
-
/* @__PURE__ */
|
|
5985
|
+
onMove && /* @__PURE__ */ jsxs10(MenuItem2, { onClick: handleMove, children: [
|
|
5986
|
+
/* @__PURE__ */ jsx13(ListItemIcon2, { children: /* @__PURE__ */ jsx13(MoveIcon, { size: 16 }) }),
|
|
5987
|
+
/* @__PURE__ */ jsx13(ListItemText2, { children: "Move to Project" })
|
|
5811
5988
|
] }),
|
|
5812
|
-
/* @__PURE__ */
|
|
5813
|
-
/* @__PURE__ */
|
|
5814
|
-
/* @__PURE__ */
|
|
5989
|
+
/* @__PURE__ */ jsxs10(MenuItem2, { onClick: handleDelete, children: [
|
|
5990
|
+
/* @__PURE__ */ jsx13(ListItemIcon2, { children: /* @__PURE__ */ jsx13(DeleteIcon2, { size: 16 }) }),
|
|
5991
|
+
/* @__PURE__ */ jsx13(ListItemText2, { children: "Delete" })
|
|
5815
5992
|
] })
|
|
5816
5993
|
]
|
|
5817
5994
|
}
|
|
@@ -5819,7 +5996,7 @@ var SimpleConversationItem = ({
|
|
|
5819
5996
|
]
|
|
5820
5997
|
}
|
|
5821
5998
|
),
|
|
5822
|
-
isMobile && /* @__PURE__ */
|
|
5999
|
+
isMobile && /* @__PURE__ */ jsxs10(
|
|
5823
6000
|
Dialog3,
|
|
5824
6001
|
{
|
|
5825
6002
|
open: showRenameDialog,
|
|
@@ -5835,8 +6012,8 @@ var SimpleConversationItem = ({
|
|
|
5835
6012
|
}
|
|
5836
6013
|
},
|
|
5837
6014
|
children: [
|
|
5838
|
-
/* @__PURE__ */
|
|
5839
|
-
/* @__PURE__ */
|
|
6015
|
+
/* @__PURE__ */ jsx13(DialogTitle2, { sx: { pb: 1 }, children: "Rename Conversation" }),
|
|
6016
|
+
/* @__PURE__ */ jsx13(DialogContent2, { children: /* @__PURE__ */ jsx13(
|
|
5840
6017
|
TextField5,
|
|
5841
6018
|
{
|
|
5842
6019
|
value: editName,
|
|
@@ -5849,9 +6026,9 @@ var SimpleConversationItem = ({
|
|
|
5849
6026
|
}
|
|
5850
6027
|
}
|
|
5851
6028
|
) }),
|
|
5852
|
-
/* @__PURE__ */
|
|
5853
|
-
/* @__PURE__ */
|
|
5854
|
-
|
|
6029
|
+
/* @__PURE__ */ jsxs10(DialogActions2, { sx: { px: 3, pb: 2 }, children: [
|
|
6030
|
+
/* @__PURE__ */ jsx13(
|
|
6031
|
+
Button5,
|
|
5855
6032
|
{
|
|
5856
6033
|
onClick: () => {
|
|
5857
6034
|
setShowRenameDialog(false);
|
|
@@ -5860,8 +6037,8 @@ var SimpleConversationItem = ({
|
|
|
5860
6037
|
children: "Cancel"
|
|
5861
6038
|
}
|
|
5862
6039
|
),
|
|
5863
|
-
/* @__PURE__ */
|
|
5864
|
-
|
|
6040
|
+
/* @__PURE__ */ jsx13(
|
|
6041
|
+
Button5,
|
|
5865
6042
|
{
|
|
5866
6043
|
onClick: () => {
|
|
5867
6044
|
commitRename();
|
|
@@ -5881,11 +6058,11 @@ var SimpleConversationItem = ({
|
|
|
5881
6058
|
var simple_conversation_item_default = SimpleConversationItem;
|
|
5882
6059
|
|
|
5883
6060
|
// src/chat/project-header.tsx
|
|
5884
|
-
import { useRef as
|
|
6061
|
+
import { useRef as useRef8, useState as useState12 } from "react";
|
|
5885
6062
|
import {
|
|
5886
|
-
Box as
|
|
5887
|
-
Typography as
|
|
5888
|
-
IconButton as
|
|
6063
|
+
Box as Box11,
|
|
6064
|
+
Typography as Typography7,
|
|
6065
|
+
IconButton as IconButton8,
|
|
5889
6066
|
Avatar as Avatar5,
|
|
5890
6067
|
Chip as Chip3,
|
|
5891
6068
|
Tooltip as Tooltip4,
|
|
@@ -5893,8 +6070,8 @@ import {
|
|
|
5893
6070
|
alpha as alpha5
|
|
5894
6071
|
} from "@mui/material";
|
|
5895
6072
|
import { ChevronDown as ExpandMoreIcon2, ChevronUp as ExpandLessIcon, Plus as AddIcon3, Folder as FolderIcon3, FolderOpen as FolderOpenIcon, Inbox as InboxIcon2, X as CloseIcon4, Check as CheckIcon3 } from "lucide-react";
|
|
5896
|
-
import { useTheme as
|
|
5897
|
-
import { jsx as
|
|
6073
|
+
import { useTheme as useTheme10 } from "@mui/material/styles";
|
|
6074
|
+
import { jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
5898
6075
|
var ProjectHeader = ({
|
|
5899
6076
|
projectId,
|
|
5900
6077
|
projectName,
|
|
@@ -5908,13 +6085,13 @@ var ProjectHeader = ({
|
|
|
5908
6085
|
onRenameCancelDelete,
|
|
5909
6086
|
isTouchTarget
|
|
5910
6087
|
}) => {
|
|
5911
|
-
const theme =
|
|
6088
|
+
const theme = useTheme10();
|
|
5912
6089
|
const { createNewConversation } = useConversationStore();
|
|
5913
6090
|
const { renameProject } = useProjectStore();
|
|
5914
6091
|
const [isHovered, setIsHovered] = useState12(false);
|
|
5915
6092
|
const [isDragOver, setIsDragOver] = useState12(false);
|
|
5916
6093
|
const [renameDraft, setRenameDraft] = useState12(projectName);
|
|
5917
|
-
const renameActionRef =
|
|
6094
|
+
const renameActionRef = useRef8("none");
|
|
5918
6095
|
const isUngrouped = projectId === null;
|
|
5919
6096
|
const Icon = isCollapsed ? FolderIcon3 : FolderOpenIcon;
|
|
5920
6097
|
const handleAddConversation = (e) => {
|
|
@@ -5960,8 +6137,8 @@ var ProjectHeader = ({
|
|
|
5960
6137
|
setRenameDraft(projectName);
|
|
5961
6138
|
onRenameComplete?.();
|
|
5962
6139
|
};
|
|
5963
|
-
return /* @__PURE__ */
|
|
5964
|
-
|
|
6140
|
+
return /* @__PURE__ */ jsxs11(
|
|
6141
|
+
Box11,
|
|
5965
6142
|
{
|
|
5966
6143
|
"data-project-id": projectId ?? "__ungrouped",
|
|
5967
6144
|
onMouseEnter: () => setIsHovered(true),
|
|
@@ -5987,7 +6164,7 @@ var ProjectHeader = ({
|
|
|
5987
6164
|
} : {}
|
|
5988
6165
|
},
|
|
5989
6166
|
children: [
|
|
5990
|
-
/* @__PURE__ */
|
|
6167
|
+
/* @__PURE__ */ jsx14(
|
|
5991
6168
|
Avatar5,
|
|
5992
6169
|
{
|
|
5993
6170
|
sx: {
|
|
@@ -5996,17 +6173,17 @@ var ProjectHeader = ({
|
|
|
5996
6173
|
height: 28,
|
|
5997
6174
|
mr: 1.5
|
|
5998
6175
|
},
|
|
5999
|
-
children: isUngrouped ? /* @__PURE__ */
|
|
6176
|
+
children: isUngrouped ? /* @__PURE__ */ jsx14(
|
|
6000
6177
|
InboxIcon2,
|
|
6001
6178
|
{
|
|
6002
6179
|
size: 16,
|
|
6003
6180
|
color: theme.palette.text.disabled,
|
|
6004
6181
|
style: { opacity: 0.7 }
|
|
6005
6182
|
}
|
|
6006
|
-
) : /* @__PURE__ */
|
|
6183
|
+
) : /* @__PURE__ */ jsx14(Icon, { size: 16 })
|
|
6007
6184
|
}
|
|
6008
6185
|
),
|
|
6009
|
-
isRenaming && !isUngrouped ? /* @__PURE__ */
|
|
6186
|
+
isRenaming && !isUngrouped ? /* @__PURE__ */ jsx14(
|
|
6010
6187
|
TextField6,
|
|
6011
6188
|
{
|
|
6012
6189
|
value: renameDraft,
|
|
@@ -6053,8 +6230,8 @@ var ProjectHeader = ({
|
|
|
6053
6230
|
}
|
|
6054
6231
|
}
|
|
6055
6232
|
}
|
|
6056
|
-
) : /* @__PURE__ */
|
|
6057
|
-
|
|
6233
|
+
) : /* @__PURE__ */ jsxs11(
|
|
6234
|
+
Typography7,
|
|
6058
6235
|
{
|
|
6059
6236
|
variant: "subtitle2",
|
|
6060
6237
|
sx: {
|
|
@@ -6066,8 +6243,8 @@ var ProjectHeader = ({
|
|
|
6066
6243
|
},
|
|
6067
6244
|
children: [
|
|
6068
6245
|
projectName,
|
|
6069
|
-
isDragOver && /* @__PURE__ */
|
|
6070
|
-
|
|
6246
|
+
isDragOver && /* @__PURE__ */ jsx14(
|
|
6247
|
+
Typography7,
|
|
6071
6248
|
{
|
|
6072
6249
|
component: "span",
|
|
6073
6250
|
variant: "caption",
|
|
@@ -6082,7 +6259,7 @@ var ProjectHeader = ({
|
|
|
6082
6259
|
]
|
|
6083
6260
|
}
|
|
6084
6261
|
),
|
|
6085
|
-
/* @__PURE__ */
|
|
6262
|
+
/* @__PURE__ */ jsx14(
|
|
6086
6263
|
Chip3,
|
|
6087
6264
|
{
|
|
6088
6265
|
label: conversationCount,
|
|
@@ -6102,9 +6279,9 @@ var ProjectHeader = ({
|
|
|
6102
6279
|
}
|
|
6103
6280
|
}
|
|
6104
6281
|
),
|
|
6105
|
-
isRenaming && !isUngrouped && /* @__PURE__ */
|
|
6106
|
-
/* @__PURE__ */
|
|
6107
|
-
|
|
6282
|
+
isRenaming && !isUngrouped && /* @__PURE__ */ jsxs11(Box11, { sx: { display: "flex", alignItems: "center", gap: 0.5, ml: 1 }, children: [
|
|
6283
|
+
/* @__PURE__ */ jsx14(Tooltip4, { title: "Cancel and remove", children: /* @__PURE__ */ jsx14(
|
|
6284
|
+
IconButton8,
|
|
6108
6285
|
{
|
|
6109
6286
|
size: "small",
|
|
6110
6287
|
onMouseDown: (e) => {
|
|
@@ -6113,11 +6290,11 @@ var ProjectHeader = ({
|
|
|
6113
6290
|
onRenameCancelDelete ? onRenameCancelDelete() : cancelRename();
|
|
6114
6291
|
},
|
|
6115
6292
|
sx: { color: alpha5(theme.palette.error.main, 0.9) },
|
|
6116
|
-
children: /* @__PURE__ */
|
|
6293
|
+
children: /* @__PURE__ */ jsx14(CloseIcon4, { size: 16 })
|
|
6117
6294
|
}
|
|
6118
6295
|
) }),
|
|
6119
|
-
/* @__PURE__ */
|
|
6120
|
-
|
|
6296
|
+
/* @__PURE__ */ jsx14(Tooltip4, { title: "Save", children: /* @__PURE__ */ jsx14(
|
|
6297
|
+
IconButton8,
|
|
6121
6298
|
{
|
|
6122
6299
|
size: "small",
|
|
6123
6300
|
onMouseDown: (e) => {
|
|
@@ -6126,12 +6303,12 @@ var ProjectHeader = ({
|
|
|
6126
6303
|
commitRename();
|
|
6127
6304
|
},
|
|
6128
6305
|
sx: { color: theme.palette.success.main },
|
|
6129
|
-
children: /* @__PURE__ */
|
|
6306
|
+
children: /* @__PURE__ */ jsx14(CheckIcon3, { size: 16 })
|
|
6130
6307
|
}
|
|
6131
6308
|
) })
|
|
6132
6309
|
] }),
|
|
6133
|
-
isHovered && !isDragOver && !isUngrouped && !isRenaming && /* @__PURE__ */
|
|
6134
|
-
|
|
6310
|
+
isHovered && !isDragOver && !isUngrouped && !isRenaming && /* @__PURE__ */ jsx14(Tooltip4, { title: `Add conversation to ${projectName.toLowerCase()}`, arrow: true, children: /* @__PURE__ */ jsx14(
|
|
6311
|
+
IconButton8,
|
|
6135
6312
|
{
|
|
6136
6313
|
onClick: handleAddConversation,
|
|
6137
6314
|
size: "small",
|
|
@@ -6147,18 +6324,18 @@ var ProjectHeader = ({
|
|
|
6147
6324
|
},
|
|
6148
6325
|
transition: "all 0.2s ease"
|
|
6149
6326
|
},
|
|
6150
|
-
children: /* @__PURE__ */
|
|
6327
|
+
children: /* @__PURE__ */ jsx14(AddIcon3, { size: 16 })
|
|
6151
6328
|
}
|
|
6152
6329
|
) }),
|
|
6153
|
-
!isUngrouped && !isRenaming && /* @__PURE__ */
|
|
6154
|
-
|
|
6330
|
+
!isUngrouped && !isRenaming && /* @__PURE__ */ jsx14(
|
|
6331
|
+
IconButton8,
|
|
6155
6332
|
{
|
|
6156
6333
|
size: "small",
|
|
6157
6334
|
sx: {
|
|
6158
6335
|
color: theme.palette.text.secondary,
|
|
6159
6336
|
transition: "transform 0.2s ease"
|
|
6160
6337
|
},
|
|
6161
|
-
children: isCollapsed ? /* @__PURE__ */
|
|
6338
|
+
children: isCollapsed ? /* @__PURE__ */ jsx14(ExpandMoreIcon2, { size: 16 }) : /* @__PURE__ */ jsx14(ExpandLessIcon, { size: 16 })
|
|
6162
6339
|
}
|
|
6163
6340
|
)
|
|
6164
6341
|
]
|
|
@@ -6180,7 +6357,7 @@ var TOOLTIP_COPY = {
|
|
|
6180
6357
|
var tooltip = (key) => TOOLTIP_COPY[key];
|
|
6181
6358
|
|
|
6182
6359
|
// src/chat/conversation-drawer.tsx
|
|
6183
|
-
import { Fragment as Fragment7, jsx as
|
|
6360
|
+
import { Fragment as Fragment7, jsx as jsx15, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
6184
6361
|
var BANDIT_AVATAR = "https://cdn.burtson.ai/images/bandit-head.png";
|
|
6185
6362
|
var coerceOptionalString = (value) => {
|
|
6186
6363
|
if (typeof value !== "string") return void 0;
|
|
@@ -6208,7 +6385,7 @@ var deriveInitials = (value) => {
|
|
|
6208
6385
|
return sanitized.slice(0, 2).toUpperCase();
|
|
6209
6386
|
};
|
|
6210
6387
|
var ConversationDrawer = ({ open, onClose }) => {
|
|
6211
|
-
const theme =
|
|
6388
|
+
const theme = useTheme11();
|
|
6212
6389
|
const isMobile = useMediaQuery4(theme.breakpoints.down("sm"));
|
|
6213
6390
|
const { user } = useAuthenticationStore();
|
|
6214
6391
|
const baseRadius = typeof theme.shape.borderRadius === "number" ? theme.shape.borderRadius : parseFloat(theme.shape.borderRadius) || 0;
|
|
@@ -6234,7 +6411,7 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6234
6411
|
const [projectManagementOpen, setProjectManagementOpen] = useState13(false);
|
|
6235
6412
|
const [memoryModalOpen, setMemoryModalOpen] = useState13(false);
|
|
6236
6413
|
const [collapsedProjects, setCollapsedProjects] = useState13(/* @__PURE__ */ new Set());
|
|
6237
|
-
const didInitCollapseRef =
|
|
6414
|
+
const didInitCollapseRef = useRef9(false);
|
|
6238
6415
|
const [searchQuery, setSearchQuery] = useState13("");
|
|
6239
6416
|
const [menuAnchorEl, setMenuAnchorEl] = useState13(null);
|
|
6240
6417
|
const [clearConfirmOpen, setClearConfirmOpen] = useState13(false);
|
|
@@ -6433,8 +6610,8 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6433
6610
|
setMoveModalOpen(false);
|
|
6434
6611
|
setConversationToMove(null);
|
|
6435
6612
|
};
|
|
6436
|
-
return /* @__PURE__ */
|
|
6437
|
-
/* @__PURE__ */
|
|
6613
|
+
return /* @__PURE__ */ jsxs12(Fragment7, { children: [
|
|
6614
|
+
/* @__PURE__ */ jsxs12(
|
|
6438
6615
|
Drawer,
|
|
6439
6616
|
{
|
|
6440
6617
|
anchor: "left",
|
|
@@ -6476,8 +6653,8 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6476
6653
|
}
|
|
6477
6654
|
},
|
|
6478
6655
|
children: [
|
|
6479
|
-
/* @__PURE__ */
|
|
6480
|
-
|
|
6656
|
+
/* @__PURE__ */ jsxs12(
|
|
6657
|
+
Box12,
|
|
6481
6658
|
{
|
|
6482
6659
|
sx: {
|
|
6483
6660
|
p: 2,
|
|
@@ -6488,8 +6665,8 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6488
6665
|
gap: 1
|
|
6489
6666
|
},
|
|
6490
6667
|
children: [
|
|
6491
|
-
/* @__PURE__ */
|
|
6492
|
-
|
|
6668
|
+
/* @__PURE__ */ jsx15(Tooltip5, { title: "Memories", arrow: true, children: /* @__PURE__ */ jsx15(
|
|
6669
|
+
IconButton9,
|
|
6493
6670
|
{
|
|
6494
6671
|
onClick: () => setMemoryModalOpen(true),
|
|
6495
6672
|
size: "small",
|
|
@@ -6501,11 +6678,11 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6501
6678
|
bgcolor: alpha6(theme.palette.primary.main, 0.1)
|
|
6502
6679
|
}
|
|
6503
6680
|
},
|
|
6504
|
-
children: /* @__PURE__ */
|
|
6681
|
+
children: /* @__PURE__ */ jsx15(MemoryIcon, {})
|
|
6505
6682
|
}
|
|
6506
6683
|
) }),
|
|
6507
|
-
/* @__PURE__ */
|
|
6508
|
-
|
|
6684
|
+
/* @__PURE__ */ jsx15(Tooltip5, { title: tooltip("manageProjects"), arrow: true, children: /* @__PURE__ */ jsx15(
|
|
6685
|
+
IconButton9,
|
|
6509
6686
|
{
|
|
6510
6687
|
onClick: () => setProjectManagementOpen(true),
|
|
6511
6688
|
size: "small",
|
|
@@ -6517,11 +6694,11 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6517
6694
|
bgcolor: alpha6(theme.palette.primary.main, 0.1)
|
|
6518
6695
|
}
|
|
6519
6696
|
},
|
|
6520
|
-
children: /* @__PURE__ */
|
|
6697
|
+
children: /* @__PURE__ */ jsx15(FolderIcon4, {})
|
|
6521
6698
|
}
|
|
6522
6699
|
) }),
|
|
6523
|
-
/* @__PURE__ */
|
|
6524
|
-
|
|
6700
|
+
/* @__PURE__ */ jsx15(Tooltip5, { title: tooltip("conversationOptions"), arrow: true, children: /* @__PURE__ */ jsx15(
|
|
6701
|
+
IconButton9,
|
|
6525
6702
|
{
|
|
6526
6703
|
onClick: handleMenuOpen,
|
|
6527
6704
|
size: "small",
|
|
@@ -6533,11 +6710,11 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6533
6710
|
bgcolor: alpha6(theme.palette.text.primary, 0.1)
|
|
6534
6711
|
}
|
|
6535
6712
|
},
|
|
6536
|
-
children: /* @__PURE__ */
|
|
6713
|
+
children: /* @__PURE__ */ jsx15(MoreVertIcon3, {})
|
|
6537
6714
|
}
|
|
6538
6715
|
) }),
|
|
6539
|
-
isMobile && /* @__PURE__ */
|
|
6540
|
-
|
|
6716
|
+
isMobile && /* @__PURE__ */ jsx15(Tooltip5, { title: tooltip("closeConversationsPanel"), children: /* @__PURE__ */ jsx15(
|
|
6717
|
+
IconButton9,
|
|
6541
6718
|
{
|
|
6542
6719
|
onClick: (e) => {
|
|
6543
6720
|
e.preventDefault();
|
|
@@ -6553,13 +6730,13 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6553
6730
|
bgcolor: alpha6(theme.palette.error.main, 0.1)
|
|
6554
6731
|
}
|
|
6555
6732
|
},
|
|
6556
|
-
children: /* @__PURE__ */
|
|
6733
|
+
children: /* @__PURE__ */ jsx15(CloseIcon5, {})
|
|
6557
6734
|
}
|
|
6558
6735
|
) })
|
|
6559
6736
|
]
|
|
6560
6737
|
}
|
|
6561
6738
|
),
|
|
6562
|
-
/* @__PURE__ */
|
|
6739
|
+
/* @__PURE__ */ jsx15(Box12, { sx: { p: 2, pb: 1 }, children: /* @__PURE__ */ jsx15(
|
|
6563
6740
|
TextField7,
|
|
6564
6741
|
{
|
|
6565
6742
|
fullWidth: true,
|
|
@@ -6569,16 +6746,16 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6569
6746
|
onChange: (e) => setSearchQuery(e.target.value),
|
|
6570
6747
|
variant: "outlined",
|
|
6571
6748
|
InputProps: {
|
|
6572
|
-
startAdornment: /* @__PURE__ */
|
|
6573
|
-
endAdornment: searchQuery && /* @__PURE__ */
|
|
6574
|
-
|
|
6749
|
+
startAdornment: /* @__PURE__ */ jsx15(InputAdornment, { position: "start", children: /* @__PURE__ */ jsx15(SearchIcon, { size: 16, color: theme.palette.text.secondary }) }),
|
|
6750
|
+
endAdornment: searchQuery && /* @__PURE__ */ jsx15(InputAdornment, { position: "end", children: /* @__PURE__ */ jsx15(Tooltip5, { title: tooltip("clearSearch"), children: /* @__PURE__ */ jsx15(
|
|
6751
|
+
IconButton9,
|
|
6575
6752
|
{
|
|
6576
6753
|
onClick: handleSearchClear,
|
|
6577
6754
|
size: "small",
|
|
6578
6755
|
edge: "end",
|
|
6579
6756
|
"aria-label": tooltip("clearSearch"),
|
|
6580
6757
|
sx: { color: theme.palette.text.secondary },
|
|
6581
|
-
children: /* @__PURE__ */
|
|
6758
|
+
children: /* @__PURE__ */ jsx15(ClearIcon, { size: 16 })
|
|
6582
6759
|
}
|
|
6583
6760
|
) }) })
|
|
6584
6761
|
},
|
|
@@ -6595,9 +6772,9 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6595
6772
|
}
|
|
6596
6773
|
}
|
|
6597
6774
|
) }),
|
|
6598
|
-
/* @__PURE__ */
|
|
6599
|
-
/* @__PURE__ */
|
|
6600
|
-
|
|
6775
|
+
/* @__PURE__ */ jsxs12(Box12, { sx: { flex: 1, overflow: "auto", display: "flex", flexDirection: "column" }, children: [
|
|
6776
|
+
/* @__PURE__ */ jsxs12(
|
|
6777
|
+
Box12,
|
|
6601
6778
|
{
|
|
6602
6779
|
onClick: async () => {
|
|
6603
6780
|
const names = new Set(projects.map((p) => p.name));
|
|
@@ -6631,8 +6808,8 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6631
6808
|
"&:hover": { bgcolor: alpha6(theme.palette.text.primary, 0.04) }
|
|
6632
6809
|
},
|
|
6633
6810
|
children: [
|
|
6634
|
-
/* @__PURE__ */
|
|
6635
|
-
|
|
6811
|
+
/* @__PURE__ */ jsx15(
|
|
6812
|
+
Box12,
|
|
6636
6813
|
{
|
|
6637
6814
|
sx: {
|
|
6638
6815
|
width: 28,
|
|
@@ -6644,33 +6821,33 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6644
6821
|
justifyContent: "center",
|
|
6645
6822
|
flexShrink: 0
|
|
6646
6823
|
},
|
|
6647
|
-
children: /* @__PURE__ */
|
|
6824
|
+
children: /* @__PURE__ */ jsx15(FolderIcon4, { size: 16, color: theme.palette.success.main })
|
|
6648
6825
|
}
|
|
6649
6826
|
),
|
|
6650
|
-
/* @__PURE__ */
|
|
6651
|
-
|
|
6827
|
+
/* @__PURE__ */ jsx15(
|
|
6828
|
+
Typography8,
|
|
6652
6829
|
{
|
|
6653
6830
|
variant: "subtitle2",
|
|
6654
6831
|
sx: { flex: 1, fontWeight: 600, fontSize: "0.875rem" },
|
|
6655
6832
|
children: "New Project"
|
|
6656
6833
|
}
|
|
6657
6834
|
),
|
|
6658
|
-
/* @__PURE__ */
|
|
6659
|
-
|
|
6835
|
+
/* @__PURE__ */ jsx15(Tooltip5, { title: tooltip("addProject"), arrow: true, children: /* @__PURE__ */ jsx15(
|
|
6836
|
+
IconButton9,
|
|
6660
6837
|
{
|
|
6661
6838
|
size: "small",
|
|
6662
6839
|
"aria-label": tooltip("addProject"),
|
|
6663
6840
|
sx: { color: theme.palette.success.main },
|
|
6664
|
-
children: /* @__PURE__ */
|
|
6841
|
+
children: /* @__PURE__ */ jsx15(AddIcon4, { size: 16 })
|
|
6665
6842
|
}
|
|
6666
6843
|
) })
|
|
6667
6844
|
]
|
|
6668
6845
|
}
|
|
6669
6846
|
),
|
|
6670
|
-
/* @__PURE__ */
|
|
6671
|
-
filteredProjectGroups.map((group, index) => /* @__PURE__ */
|
|
6672
|
-
group.id === null && filteredProjectGroups.length > 1 && /* @__PURE__ */
|
|
6673
|
-
|
|
6847
|
+
/* @__PURE__ */ jsx15(Divider2, { sx: { opacity: 0.3 } }),
|
|
6848
|
+
filteredProjectGroups.map((group, index) => /* @__PURE__ */ jsxs12(Box12, { children: [
|
|
6849
|
+
group.id === null && filteredProjectGroups.length > 1 && /* @__PURE__ */ jsxs12(
|
|
6850
|
+
Box12,
|
|
6674
6851
|
{
|
|
6675
6852
|
sx: {
|
|
6676
6853
|
py: 2,
|
|
@@ -6680,9 +6857,9 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6680
6857
|
gap: 2
|
|
6681
6858
|
},
|
|
6682
6859
|
children: [
|
|
6683
|
-
/* @__PURE__ */
|
|
6684
|
-
/* @__PURE__ */
|
|
6685
|
-
/* @__PURE__ */
|
|
6860
|
+
/* @__PURE__ */ jsx15(Divider2, { sx: { flex: 1, opacity: 0.6 } }),
|
|
6861
|
+
/* @__PURE__ */ jsxs12(Box12, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
6862
|
+
/* @__PURE__ */ jsx15(
|
|
6686
6863
|
InboxIcon3,
|
|
6687
6864
|
{
|
|
6688
6865
|
size: 14,
|
|
@@ -6690,8 +6867,8 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6690
6867
|
style: { opacity: 0.7 }
|
|
6691
6868
|
}
|
|
6692
6869
|
),
|
|
6693
|
-
/* @__PURE__ */
|
|
6694
|
-
|
|
6870
|
+
/* @__PURE__ */ jsx15(
|
|
6871
|
+
Typography8,
|
|
6695
6872
|
{
|
|
6696
6873
|
variant: "caption",
|
|
6697
6874
|
sx: {
|
|
@@ -6705,12 +6882,12 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6705
6882
|
}
|
|
6706
6883
|
)
|
|
6707
6884
|
] }),
|
|
6708
|
-
/* @__PURE__ */
|
|
6885
|
+
/* @__PURE__ */ jsx15(Divider2, { sx: { flex: 1, opacity: 0.6 } })
|
|
6709
6886
|
]
|
|
6710
6887
|
}
|
|
6711
6888
|
),
|
|
6712
|
-
group.id !== null ? /* @__PURE__ */
|
|
6713
|
-
/* @__PURE__ */
|
|
6889
|
+
group.id !== null ? /* @__PURE__ */ jsxs12(Fragment7, { children: [
|
|
6890
|
+
/* @__PURE__ */ jsx15(
|
|
6714
6891
|
project_header_default,
|
|
6715
6892
|
{
|
|
6716
6893
|
projectId: group.id,
|
|
@@ -6739,8 +6916,8 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6739
6916
|
}
|
|
6740
6917
|
}
|
|
6741
6918
|
),
|
|
6742
|
-
/* @__PURE__ */
|
|
6743
|
-
group.conversations.map((conversation) => /* @__PURE__ */
|
|
6919
|
+
/* @__PURE__ */ jsx15(Collapse2, { in: !group.collapsed, children: /* @__PURE__ */ jsxs12(Box12, { sx: { pb: 1 }, children: [
|
|
6920
|
+
group.conversations.map((conversation) => /* @__PURE__ */ jsx15(
|
|
6744
6921
|
simple_conversation_item_default,
|
|
6745
6922
|
{
|
|
6746
6923
|
conversation,
|
|
@@ -6760,8 +6937,8 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6760
6937
|
},
|
|
6761
6938
|
conversation.id
|
|
6762
6939
|
)),
|
|
6763
|
-
group.conversations.length === 0 && !group.collapsed && group.id !== null && /* @__PURE__ */
|
|
6764
|
-
|
|
6940
|
+
group.conversations.length === 0 && !group.collapsed && group.id !== null && /* @__PURE__ */ jsxs12(
|
|
6941
|
+
Box12,
|
|
6765
6942
|
{
|
|
6766
6943
|
sx: {
|
|
6767
6944
|
p: 3,
|
|
@@ -6769,17 +6946,17 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6769
6946
|
color: theme.palette.text.secondary
|
|
6770
6947
|
},
|
|
6771
6948
|
children: [
|
|
6772
|
-
/* @__PURE__ */
|
|
6773
|
-
/* @__PURE__ */
|
|
6949
|
+
/* @__PURE__ */ jsx15(Typography8, { variant: "body2", children: "No conversations in this project yet" }),
|
|
6950
|
+
/* @__PURE__ */ jsx15(Typography8, { variant: "caption", sx: { mt: 1, display: "block" }, children: "Drag conversations here or use the + button above" })
|
|
6774
6951
|
]
|
|
6775
6952
|
}
|
|
6776
6953
|
)
|
|
6777
6954
|
] }) }),
|
|
6778
|
-
/* @__PURE__ */
|
|
6955
|
+
/* @__PURE__ */ jsx15(Divider2, { sx: { opacity: 0.3 } })
|
|
6779
6956
|
] }) : (
|
|
6780
6957
|
// Special handling for ungrouped - no header, just conversations in scrollable area
|
|
6781
|
-
/* @__PURE__ */
|
|
6782
|
-
|
|
6958
|
+
/* @__PURE__ */ jsx15(
|
|
6959
|
+
Box12,
|
|
6783
6960
|
{
|
|
6784
6961
|
sx: {
|
|
6785
6962
|
minHeight: 0,
|
|
@@ -6792,7 +6969,7 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6792
6969
|
mx: 1,
|
|
6793
6970
|
mb: 1
|
|
6794
6971
|
},
|
|
6795
|
-
children: group.conversations.map((conversation) => /* @__PURE__ */
|
|
6972
|
+
children: group.conversations.map((conversation) => /* @__PURE__ */ jsx15(
|
|
6796
6973
|
simple_conversation_item_default,
|
|
6797
6974
|
{
|
|
6798
6975
|
conversation,
|
|
@@ -6816,8 +6993,8 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6816
6993
|
)
|
|
6817
6994
|
)
|
|
6818
6995
|
] }, group.id || "ungrouped")),
|
|
6819
|
-
filteredProjectGroups.length === 0 && /* @__PURE__ */
|
|
6820
|
-
|
|
6996
|
+
filteredProjectGroups.length === 0 && /* @__PURE__ */ jsxs12(
|
|
6997
|
+
Box12,
|
|
6821
6998
|
{
|
|
6822
6999
|
sx: {
|
|
6823
7000
|
flex: 1,
|
|
@@ -6830,14 +7007,14 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6830
7007
|
color: theme.palette.text.secondary
|
|
6831
7008
|
},
|
|
6832
7009
|
children: [
|
|
6833
|
-
/* @__PURE__ */
|
|
6834
|
-
/* @__PURE__ */
|
|
7010
|
+
/* @__PURE__ */ jsx15(Typography8, { variant: "h6", sx: { mb: 1 }, children: searchQuery ? "No conversations found" : "No conversations yet" }),
|
|
7011
|
+
/* @__PURE__ */ jsx15(Typography8, { variant: "body2", sx: { mb: 3, maxWidth: 280 }, children: searchQuery ? `No conversations match "${searchQuery}"` : "Start your first conversation to begin organizing your chats into projects" })
|
|
6835
7012
|
]
|
|
6836
7013
|
}
|
|
6837
7014
|
)
|
|
6838
7015
|
] }),
|
|
6839
|
-
/* @__PURE__ */
|
|
6840
|
-
|
|
7016
|
+
/* @__PURE__ */ jsxs12(
|
|
7017
|
+
Box12,
|
|
6841
7018
|
{
|
|
6842
7019
|
onClick: user ? () => {
|
|
6843
7020
|
window.location.href = "/profile";
|
|
@@ -6858,7 +7035,7 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6858
7035
|
"&:hover": user ? { bgcolor: alpha6(theme.palette.primary.main, 0.08) } : void 0
|
|
6859
7036
|
},
|
|
6860
7037
|
children: [
|
|
6861
|
-
/* @__PURE__ */
|
|
7038
|
+
/* @__PURE__ */ jsx15(
|
|
6862
7039
|
Avatar6,
|
|
6863
7040
|
{
|
|
6864
7041
|
src: avatarImage,
|
|
@@ -6873,8 +7050,8 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6873
7050
|
children: avatarInitials
|
|
6874
7051
|
}
|
|
6875
7052
|
),
|
|
6876
|
-
/* @__PURE__ */
|
|
6877
|
-
|
|
7053
|
+
/* @__PURE__ */ jsxs12(
|
|
7054
|
+
Box12,
|
|
6878
7055
|
{
|
|
6879
7056
|
sx: {
|
|
6880
7057
|
minWidth: 0,
|
|
@@ -6886,8 +7063,8 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6886
7063
|
gap: 0.25
|
|
6887
7064
|
},
|
|
6888
7065
|
children: [
|
|
6889
|
-
/* @__PURE__ */
|
|
6890
|
-
|
|
7066
|
+
/* @__PURE__ */ jsx15(
|
|
7067
|
+
Typography8,
|
|
6891
7068
|
{
|
|
6892
7069
|
variant: "subtitle2",
|
|
6893
7070
|
noWrap: true,
|
|
@@ -6895,8 +7072,8 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6895
7072
|
children: user ? userDisplayName : "Not signed in"
|
|
6896
7073
|
}
|
|
6897
7074
|
),
|
|
6898
|
-
/* @__PURE__ */
|
|
6899
|
-
|
|
7075
|
+
/* @__PURE__ */ jsx15(
|
|
7076
|
+
Typography8,
|
|
6900
7077
|
{
|
|
6901
7078
|
variant: "caption",
|
|
6902
7079
|
noWrap: true,
|
|
@@ -6907,9 +7084,9 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6907
7084
|
]
|
|
6908
7085
|
}
|
|
6909
7086
|
),
|
|
6910
|
-
user && /* @__PURE__ */
|
|
6911
|
-
/* @__PURE__ */
|
|
6912
|
-
|
|
7087
|
+
user && /* @__PURE__ */ jsxs12(Fragment7, { children: [
|
|
7088
|
+
/* @__PURE__ */ jsx15(
|
|
7089
|
+
Box12,
|
|
6913
7090
|
{
|
|
6914
7091
|
sx: {
|
|
6915
7092
|
flexShrink: 0,
|
|
@@ -6922,11 +7099,11 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6922
7099
|
border: `1px solid ${alpha6(theme.palette.divider, 0.8)}`,
|
|
6923
7100
|
color: theme.palette.text.secondary
|
|
6924
7101
|
},
|
|
6925
|
-
children: /* @__PURE__ */
|
|
7102
|
+
children: /* @__PURE__ */ jsx15(SettingsIcon2, { size: 16 })
|
|
6926
7103
|
}
|
|
6927
7104
|
),
|
|
6928
|
-
/* @__PURE__ */
|
|
6929
|
-
|
|
7105
|
+
/* @__PURE__ */ jsx15(
|
|
7106
|
+
IconButton9,
|
|
6930
7107
|
{
|
|
6931
7108
|
"aria-label": "Sign out",
|
|
6932
7109
|
title: "Sign out",
|
|
@@ -6943,7 +7120,7 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6943
7120
|
color: theme.palette.error.main,
|
|
6944
7121
|
"&:hover": { bgcolor: alpha6(theme.palette.error.main, 0.1) }
|
|
6945
7122
|
},
|
|
6946
|
-
children: /* @__PURE__ */
|
|
7123
|
+
children: /* @__PURE__ */ jsx15(LogOutIcon, { size: 16 })
|
|
6947
7124
|
}
|
|
6948
7125
|
)
|
|
6949
7126
|
] })
|
|
@@ -6953,15 +7130,15 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6953
7130
|
]
|
|
6954
7131
|
}
|
|
6955
7132
|
),
|
|
6956
|
-
/* @__PURE__ */
|
|
7133
|
+
/* @__PURE__ */ jsx15(
|
|
6957
7134
|
project_management_modal_default,
|
|
6958
7135
|
{
|
|
6959
7136
|
open: projectManagementOpen,
|
|
6960
7137
|
onClose: () => setProjectManagementOpen(false)
|
|
6961
7138
|
}
|
|
6962
7139
|
),
|
|
6963
|
-
/* @__PURE__ */
|
|
6964
|
-
conversationToMove && /* @__PURE__ */
|
|
7140
|
+
/* @__PURE__ */ jsx15(memory_modal_default, { open: memoryModalOpen, onClose: () => setMemoryModalOpen(false) }),
|
|
7141
|
+
conversationToMove && /* @__PURE__ */ jsx15(
|
|
6965
7142
|
move_conversation_modal_default,
|
|
6966
7143
|
{
|
|
6967
7144
|
open: moveModalOpen,
|
|
@@ -6970,7 +7147,7 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6970
7147
|
currentProjectId: conversationToMove.projectId
|
|
6971
7148
|
}
|
|
6972
7149
|
),
|
|
6973
|
-
/* @__PURE__ */
|
|
7150
|
+
/* @__PURE__ */ jsx15(
|
|
6974
7151
|
Menu3,
|
|
6975
7152
|
{
|
|
6976
7153
|
anchorEl: menuAnchorEl,
|
|
@@ -6984,7 +7161,7 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6984
7161
|
vertical: "bottom",
|
|
6985
7162
|
horizontal: "right"
|
|
6986
7163
|
},
|
|
6987
|
-
children: /* @__PURE__ */
|
|
7164
|
+
children: /* @__PURE__ */ jsxs12(
|
|
6988
7165
|
MenuItem3,
|
|
6989
7166
|
{
|
|
6990
7167
|
onClick: () => {
|
|
@@ -6993,14 +7170,14 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6993
7170
|
},
|
|
6994
7171
|
sx: { color: theme.palette.error.main },
|
|
6995
7172
|
children: [
|
|
6996
|
-
/* @__PURE__ */
|
|
6997
|
-
/* @__PURE__ */
|
|
7173
|
+
/* @__PURE__ */ jsx15(ListItemIcon3, { children: /* @__PURE__ */ jsx15(DeleteSweepIcon, { size: 16, color: theme.palette.error.main }) }),
|
|
7174
|
+
/* @__PURE__ */ jsx15(ListItemText3, { children: "Clear All Conversations" })
|
|
6998
7175
|
]
|
|
6999
7176
|
}
|
|
7000
7177
|
)
|
|
7001
7178
|
}
|
|
7002
7179
|
),
|
|
7003
|
-
/* @__PURE__ */
|
|
7180
|
+
/* @__PURE__ */ jsxs12(
|
|
7004
7181
|
Dialog4,
|
|
7005
7182
|
{
|
|
7006
7183
|
open: clearConfirmOpen,
|
|
@@ -7008,12 +7185,12 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
7008
7185
|
maxWidth: "sm",
|
|
7009
7186
|
fullWidth: true,
|
|
7010
7187
|
children: [
|
|
7011
|
-
/* @__PURE__ */
|
|
7012
|
-
/* @__PURE__ */
|
|
7013
|
-
/* @__PURE__ */
|
|
7014
|
-
/* @__PURE__ */
|
|
7015
|
-
/* @__PURE__ */
|
|
7016
|
-
|
|
7188
|
+
/* @__PURE__ */ jsx15(DialogTitle3, { children: "Clear All Conversations?" }),
|
|
7189
|
+
/* @__PURE__ */ jsx15(DialogContent3, { children: /* @__PURE__ */ jsx15(Typography8, { children: "This will permanently delete all conversations and cannot be undone. Are you sure you want to continue?" }) }),
|
|
7190
|
+
/* @__PURE__ */ jsxs12(DialogActions3, { children: [
|
|
7191
|
+
/* @__PURE__ */ jsx15(Button6, { onClick: () => setClearConfirmOpen(false), children: "Cancel" }),
|
|
7192
|
+
/* @__PURE__ */ jsx15(
|
|
7193
|
+
Button6,
|
|
7017
7194
|
{
|
|
7018
7195
|
onClick: handleClearAllConfirm,
|
|
7019
7196
|
color: "error",
|
|
@@ -7030,12 +7207,12 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
7030
7207
|
var conversation_drawer_default = ConversationDrawer;
|
|
7031
7208
|
|
|
7032
7209
|
// src/chat/enhanced-mobile-conversations-modal.tsx
|
|
7033
|
-
import { useState as useState14, useMemo as useMemo3, useEffect as useEffect11, useRef as
|
|
7210
|
+
import { useState as useState14, useMemo as useMemo3, useEffect as useEffect11, useRef as useRef10, useCallback as useCallback5 } from "react";
|
|
7034
7211
|
import {
|
|
7035
|
-
Box as
|
|
7036
|
-
IconButton as
|
|
7212
|
+
Box as Box13,
|
|
7213
|
+
IconButton as IconButton10,
|
|
7037
7214
|
Modal as Modal2,
|
|
7038
|
-
Typography as
|
|
7215
|
+
Typography as Typography9,
|
|
7039
7216
|
TextField as TextField8,
|
|
7040
7217
|
InputAdornment as InputAdornment2,
|
|
7041
7218
|
Slide,
|
|
@@ -7049,15 +7226,15 @@ import {
|
|
|
7049
7226
|
DialogTitle as DialogTitle4,
|
|
7050
7227
|
DialogContent as DialogContent4,
|
|
7051
7228
|
DialogActions as DialogActions4,
|
|
7052
|
-
Button as
|
|
7229
|
+
Button as Button7,
|
|
7053
7230
|
AppBar,
|
|
7054
7231
|
Toolbar,
|
|
7055
7232
|
Avatar as Avatar7,
|
|
7056
7233
|
Chip as Chip4
|
|
7057
7234
|
} from "@mui/material";
|
|
7058
7235
|
import { X as CloseIcon6, X as ClearIcon2, Search as SearchIcon2, Folder as FolderIcon5, MoreVertical as MoreVertIcon4, Trash2 as DeleteSweepIcon2, Inbox as InboxIcon4, Plus as AddIcon5, Settings as SettingsIcon3, Brain as MemoryIcon2, LogOut as LogOutIcon2 } from "lucide-react";
|
|
7059
|
-
import { useTheme as
|
|
7060
|
-
import { Fragment as Fragment8, jsx as
|
|
7236
|
+
import { useTheme as useTheme12, alpha as alpha7 } from "@mui/material/styles";
|
|
7237
|
+
import { Fragment as Fragment8, jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
7061
7238
|
var BANDIT_AVATAR2 = "https://cdn.burtson.ai/images/bandit-head.png";
|
|
7062
7239
|
var coerceOptionalString2 = (value) => {
|
|
7063
7240
|
if (typeof value !== "string") return void 0;
|
|
@@ -7088,7 +7265,7 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7088
7265
|
open,
|
|
7089
7266
|
onClose
|
|
7090
7267
|
}) => {
|
|
7091
|
-
const theme =
|
|
7268
|
+
const theme = useTheme12();
|
|
7092
7269
|
const { user } = useAuthenticationStore();
|
|
7093
7270
|
const {
|
|
7094
7271
|
conversations,
|
|
@@ -7111,7 +7288,7 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7111
7288
|
const [projectManagementOpen, setProjectManagementOpen] = useState14(false);
|
|
7112
7289
|
const [memoryModalOpen, setMemoryModalOpen] = useState14(false);
|
|
7113
7290
|
const [collapsedProjects, setCollapsedProjects] = useState14(/* @__PURE__ */ new Set());
|
|
7114
|
-
const didInitCollapseRef =
|
|
7291
|
+
const didInitCollapseRef = useRef10(false);
|
|
7115
7292
|
const [searchQuery, setSearchQuery] = useState14("");
|
|
7116
7293
|
const [menuAnchorEl, setMenuAnchorEl] = useState14(null);
|
|
7117
7294
|
const [clearConfirmOpen, setClearConfirmOpen] = useState14(false);
|
|
@@ -7391,8 +7568,8 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7391
7568
|
return changed ? next : prev;
|
|
7392
7569
|
});
|
|
7393
7570
|
}, [conversations]);
|
|
7394
|
-
return /* @__PURE__ */
|
|
7395
|
-
/* @__PURE__ */
|
|
7571
|
+
return /* @__PURE__ */ jsxs13(Fragment8, { children: [
|
|
7572
|
+
/* @__PURE__ */ jsx16(
|
|
7396
7573
|
Modal2,
|
|
7397
7574
|
{
|
|
7398
7575
|
open,
|
|
@@ -7401,8 +7578,8 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7401
7578
|
display: "flex",
|
|
7402
7579
|
alignItems: "flex-end"
|
|
7403
7580
|
},
|
|
7404
|
-
children: /* @__PURE__ */
|
|
7405
|
-
|
|
7581
|
+
children: /* @__PURE__ */ jsx16(Slide, { direction: "up", in: open, children: /* @__PURE__ */ jsxs13(
|
|
7582
|
+
Box13,
|
|
7406
7583
|
{
|
|
7407
7584
|
sx: {
|
|
7408
7585
|
width: "100%",
|
|
@@ -7415,7 +7592,7 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7415
7592
|
overflow: "hidden"
|
|
7416
7593
|
},
|
|
7417
7594
|
children: [
|
|
7418
|
-
/* @__PURE__ */
|
|
7595
|
+
/* @__PURE__ */ jsx16(
|
|
7419
7596
|
AppBar,
|
|
7420
7597
|
{
|
|
7421
7598
|
position: "static",
|
|
@@ -7425,9 +7602,9 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7425
7602
|
color: theme.palette.text.primary,
|
|
7426
7603
|
borderBottom: `1px solid ${theme.palette.divider}`
|
|
7427
7604
|
},
|
|
7428
|
-
children: /* @__PURE__ */
|
|
7429
|
-
/* @__PURE__ */
|
|
7430
|
-
visibleConversationCount > 0 && /* @__PURE__ */
|
|
7605
|
+
children: /* @__PURE__ */ jsxs13(Toolbar, { children: [
|
|
7606
|
+
/* @__PURE__ */ jsx16(Typography9, { variant: "h6", sx: { flex: 1, fontWeight: 600 }, children: "Conversations" }),
|
|
7607
|
+
visibleConversationCount > 0 && /* @__PURE__ */ jsx16(
|
|
7431
7608
|
Chip4,
|
|
7432
7609
|
{
|
|
7433
7610
|
label: visibleConversationCount,
|
|
@@ -7440,43 +7617,43 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7440
7617
|
}
|
|
7441
7618
|
}
|
|
7442
7619
|
),
|
|
7443
|
-
/* @__PURE__ */
|
|
7444
|
-
|
|
7620
|
+
/* @__PURE__ */ jsx16(
|
|
7621
|
+
IconButton10,
|
|
7445
7622
|
{
|
|
7446
7623
|
onClick: () => setMemoryModalOpen(true),
|
|
7447
7624
|
"aria-label": "Memory",
|
|
7448
7625
|
sx: { color: theme.palette.text.secondary },
|
|
7449
|
-
children: /* @__PURE__ */
|
|
7626
|
+
children: /* @__PURE__ */ jsx16(MemoryIcon2, {})
|
|
7450
7627
|
}
|
|
7451
7628
|
),
|
|
7452
|
-
/* @__PURE__ */
|
|
7453
|
-
|
|
7629
|
+
/* @__PURE__ */ jsx16(
|
|
7630
|
+
IconButton10,
|
|
7454
7631
|
{
|
|
7455
7632
|
onClick: () => setProjectManagementOpen(true),
|
|
7456
7633
|
sx: { color: theme.palette.text.secondary },
|
|
7457
|
-
children: /* @__PURE__ */
|
|
7634
|
+
children: /* @__PURE__ */ jsx16(FolderIcon5, {})
|
|
7458
7635
|
}
|
|
7459
7636
|
),
|
|
7460
|
-
/* @__PURE__ */
|
|
7461
|
-
|
|
7637
|
+
/* @__PURE__ */ jsx16(
|
|
7638
|
+
IconButton10,
|
|
7462
7639
|
{
|
|
7463
7640
|
onClick: handleMenuOpen,
|
|
7464
7641
|
sx: { color: theme.palette.text.secondary },
|
|
7465
|
-
children: /* @__PURE__ */
|
|
7642
|
+
children: /* @__PURE__ */ jsx16(MoreVertIcon4, {})
|
|
7466
7643
|
}
|
|
7467
7644
|
),
|
|
7468
|
-
/* @__PURE__ */
|
|
7469
|
-
|
|
7645
|
+
/* @__PURE__ */ jsx16(
|
|
7646
|
+
IconButton10,
|
|
7470
7647
|
{
|
|
7471
7648
|
onClick: onClose,
|
|
7472
7649
|
sx: { color: theme.palette.text.secondary },
|
|
7473
|
-
children: /* @__PURE__ */
|
|
7650
|
+
children: /* @__PURE__ */ jsx16(CloseIcon6, {})
|
|
7474
7651
|
}
|
|
7475
7652
|
)
|
|
7476
7653
|
] })
|
|
7477
7654
|
}
|
|
7478
7655
|
),
|
|
7479
|
-
/* @__PURE__ */
|
|
7656
|
+
/* @__PURE__ */ jsx16(Box13, { sx: { p: 2, pb: 1 }, children: /* @__PURE__ */ jsx16(
|
|
7480
7657
|
TextField8,
|
|
7481
7658
|
{
|
|
7482
7659
|
fullWidth: true,
|
|
@@ -7486,22 +7663,22 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7486
7663
|
onChange: (e) => setSearchQuery(e.target.value),
|
|
7487
7664
|
variant: "outlined",
|
|
7488
7665
|
InputProps: {
|
|
7489
|
-
startAdornment: /* @__PURE__ */
|
|
7490
|
-
endAdornment: searchQuery && /* @__PURE__ */
|
|
7491
|
-
|
|
7666
|
+
startAdornment: /* @__PURE__ */ jsx16(InputAdornment2, { position: "start", children: /* @__PURE__ */ jsx16(SearchIcon2, { size: 16, color: theme.palette.text.secondary }) }),
|
|
7667
|
+
endAdornment: searchQuery && /* @__PURE__ */ jsx16(InputAdornment2, { position: "end", children: /* @__PURE__ */ jsx16(
|
|
7668
|
+
IconButton10,
|
|
7492
7669
|
{
|
|
7493
7670
|
onClick: handleSearchClear,
|
|
7494
7671
|
size: "small",
|
|
7495
7672
|
edge: "end",
|
|
7496
7673
|
sx: { color: theme.palette.text.secondary },
|
|
7497
|
-
children: /* @__PURE__ */
|
|
7674
|
+
children: /* @__PURE__ */ jsx16(ClearIcon2, { size: 16 })
|
|
7498
7675
|
}
|
|
7499
7676
|
) })
|
|
7500
7677
|
}
|
|
7501
7678
|
}
|
|
7502
7679
|
) }),
|
|
7503
|
-
/* @__PURE__ */
|
|
7504
|
-
|
|
7680
|
+
/* @__PURE__ */ jsxs13(
|
|
7681
|
+
Box13,
|
|
7505
7682
|
{
|
|
7506
7683
|
sx: {
|
|
7507
7684
|
flex: 1,
|
|
@@ -7512,8 +7689,8 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7512
7689
|
pb: 2
|
|
7513
7690
|
},
|
|
7514
7691
|
children: [
|
|
7515
|
-
touchDragActive && activeDragConversation && /* @__PURE__ */
|
|
7516
|
-
|
|
7692
|
+
touchDragActive && activeDragConversation && /* @__PURE__ */ jsxs13(
|
|
7693
|
+
Box13,
|
|
7517
7694
|
{
|
|
7518
7695
|
sx: {
|
|
7519
7696
|
position: "absolute",
|
|
@@ -7538,8 +7715,8 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7538
7715
|
overflow: "hidden"
|
|
7539
7716
|
},
|
|
7540
7717
|
children: [
|
|
7541
|
-
/* @__PURE__ */
|
|
7542
|
-
|
|
7718
|
+
/* @__PURE__ */ jsxs13(
|
|
7719
|
+
Typography9,
|
|
7543
7720
|
{
|
|
7544
7721
|
variant: "caption",
|
|
7545
7722
|
sx: {
|
|
@@ -7551,8 +7728,8 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7551
7728
|
},
|
|
7552
7729
|
children: [
|
|
7553
7730
|
"Move",
|
|
7554
|
-
/* @__PURE__ */
|
|
7555
|
-
|
|
7731
|
+
/* @__PURE__ */ jsxs13(
|
|
7732
|
+
Box13,
|
|
7556
7733
|
{
|
|
7557
7734
|
component: "span",
|
|
7558
7735
|
sx: {
|
|
@@ -7572,8 +7749,8 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7572
7749
|
]
|
|
7573
7750
|
}
|
|
7574
7751
|
),
|
|
7575
|
-
/* @__PURE__ */
|
|
7576
|
-
|
|
7752
|
+
/* @__PURE__ */ jsx16(
|
|
7753
|
+
Typography9,
|
|
7577
7754
|
{
|
|
7578
7755
|
variant: "caption",
|
|
7579
7756
|
color: "inherit",
|
|
@@ -7581,11 +7758,11 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7581
7758
|
fontWeight: 500,
|
|
7582
7759
|
whiteSpace: "nowrap"
|
|
7583
7760
|
},
|
|
7584
|
-
children: activeHoverLabel ? /* @__PURE__ */
|
|
7761
|
+
children: activeHoverLabel ? /* @__PURE__ */ jsxs13(Fragment8, { children: [
|
|
7585
7762
|
"to",
|
|
7586
7763
|
" ",
|
|
7587
|
-
/* @__PURE__ */
|
|
7588
|
-
|
|
7764
|
+
/* @__PURE__ */ jsx16(
|
|
7765
|
+
Box13,
|
|
7589
7766
|
{
|
|
7590
7767
|
component: "span",
|
|
7591
7768
|
sx: {
|
|
@@ -7601,8 +7778,8 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7601
7778
|
]
|
|
7602
7779
|
}
|
|
7603
7780
|
),
|
|
7604
|
-
/* @__PURE__ */
|
|
7605
|
-
|
|
7781
|
+
/* @__PURE__ */ jsxs13(
|
|
7782
|
+
Box13,
|
|
7606
7783
|
{
|
|
7607
7784
|
onClick: async () => {
|
|
7608
7785
|
const names = new Set(projects.map((p) => p.name));
|
|
@@ -7636,8 +7813,8 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7636
7813
|
"&:hover": { bgcolor: alpha7(theme.palette.text.primary, 0.04) }
|
|
7637
7814
|
},
|
|
7638
7815
|
children: [
|
|
7639
|
-
/* @__PURE__ */
|
|
7640
|
-
|
|
7816
|
+
/* @__PURE__ */ jsx16(
|
|
7817
|
+
Box13,
|
|
7641
7818
|
{
|
|
7642
7819
|
sx: {
|
|
7643
7820
|
width: 28,
|
|
@@ -7649,25 +7826,25 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7649
7826
|
justifyContent: "center",
|
|
7650
7827
|
flexShrink: 0
|
|
7651
7828
|
},
|
|
7652
|
-
children: /* @__PURE__ */
|
|
7829
|
+
children: /* @__PURE__ */ jsx16(FolderIcon5, { size: 16, color: theme.palette.success.main })
|
|
7653
7830
|
}
|
|
7654
7831
|
),
|
|
7655
|
-
/* @__PURE__ */
|
|
7656
|
-
|
|
7832
|
+
/* @__PURE__ */ jsx16(
|
|
7833
|
+
Typography9,
|
|
7657
7834
|
{
|
|
7658
7835
|
variant: "subtitle2",
|
|
7659
7836
|
sx: { flex: 1, fontWeight: 600, fontSize: "0.875rem" },
|
|
7660
7837
|
children: "New Project"
|
|
7661
7838
|
}
|
|
7662
7839
|
),
|
|
7663
|
-
/* @__PURE__ */
|
|
7840
|
+
/* @__PURE__ */ jsx16(IconButton10, { size: "small", sx: { color: theme.palette.success.main }, children: /* @__PURE__ */ jsx16(AddIcon5, { size: 16 }) })
|
|
7664
7841
|
]
|
|
7665
7842
|
}
|
|
7666
7843
|
),
|
|
7667
|
-
/* @__PURE__ */
|
|
7668
|
-
filteredProjectGroups.map((group, index) => /* @__PURE__ */
|
|
7669
|
-
group.id === null && filteredProjectGroups.length > 1 && /* @__PURE__ */
|
|
7670
|
-
|
|
7844
|
+
/* @__PURE__ */ jsx16(Divider3, { sx: { opacity: 0.3 } }),
|
|
7845
|
+
filteredProjectGroups.map((group, index) => /* @__PURE__ */ jsxs13(Box13, { children: [
|
|
7846
|
+
group.id === null && filteredProjectGroups.length > 1 && /* @__PURE__ */ jsxs13(
|
|
7847
|
+
Box13,
|
|
7671
7848
|
{
|
|
7672
7849
|
sx: {
|
|
7673
7850
|
py: 2,
|
|
@@ -7677,9 +7854,9 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7677
7854
|
gap: 2
|
|
7678
7855
|
},
|
|
7679
7856
|
children: [
|
|
7680
|
-
/* @__PURE__ */
|
|
7681
|
-
/* @__PURE__ */
|
|
7682
|
-
/* @__PURE__ */
|
|
7857
|
+
/* @__PURE__ */ jsx16(Divider3, { sx: { flex: 1, opacity: 0.6 } }),
|
|
7858
|
+
/* @__PURE__ */ jsxs13(Box13, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
7859
|
+
/* @__PURE__ */ jsx16(
|
|
7683
7860
|
InboxIcon4,
|
|
7684
7861
|
{
|
|
7685
7862
|
size: 14,
|
|
@@ -7687,8 +7864,8 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7687
7864
|
style: { opacity: 0.7 }
|
|
7688
7865
|
}
|
|
7689
7866
|
),
|
|
7690
|
-
/* @__PURE__ */
|
|
7691
|
-
|
|
7867
|
+
/* @__PURE__ */ jsx16(
|
|
7868
|
+
Typography9,
|
|
7692
7869
|
{
|
|
7693
7870
|
variant: "caption",
|
|
7694
7871
|
sx: {
|
|
@@ -7702,12 +7879,12 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7702
7879
|
}
|
|
7703
7880
|
)
|
|
7704
7881
|
] }),
|
|
7705
|
-
/* @__PURE__ */
|
|
7882
|
+
/* @__PURE__ */ jsx16(Divider3, { sx: { flex: 1, opacity: 0.6 } })
|
|
7706
7883
|
]
|
|
7707
7884
|
}
|
|
7708
7885
|
),
|
|
7709
|
-
group.id !== null ? /* @__PURE__ */
|
|
7710
|
-
/* @__PURE__ */
|
|
7886
|
+
group.id !== null ? /* @__PURE__ */ jsxs13(Fragment8, { children: [
|
|
7887
|
+
/* @__PURE__ */ jsx16(
|
|
7711
7888
|
project_header_default,
|
|
7712
7889
|
{
|
|
7713
7890
|
projectId: group.id,
|
|
@@ -7737,8 +7914,8 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7737
7914
|
isTouchTarget: touchDragActive && touchDragState.hoverProjectId === group.id
|
|
7738
7915
|
}
|
|
7739
7916
|
),
|
|
7740
|
-
/* @__PURE__ */
|
|
7741
|
-
|
|
7917
|
+
/* @__PURE__ */ jsx16(Collapse3, { in: !group.collapsed, children: /* @__PURE__ */ jsx16(
|
|
7918
|
+
Box13,
|
|
7742
7919
|
{
|
|
7743
7920
|
"data-project-id": group.id ?? "__ungrouped",
|
|
7744
7921
|
sx: {
|
|
@@ -7748,7 +7925,7 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7748
7925
|
transition: "border 0.2s ease, background-color 0.2s ease",
|
|
7749
7926
|
backgroundColor: touchDragActive && touchDragState.hoverProjectId === group.id ? alpha7(theme.palette.primary.main, 0.08) : "transparent"
|
|
7750
7927
|
},
|
|
7751
|
-
children: group.conversations.map((conversation) => /* @__PURE__ */
|
|
7928
|
+
children: group.conversations.map((conversation) => /* @__PURE__ */ jsx16(
|
|
7752
7929
|
simple_conversation_item_default,
|
|
7753
7930
|
{
|
|
7754
7931
|
conversation,
|
|
@@ -7782,8 +7959,8 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7782
7959
|
) })
|
|
7783
7960
|
] }) : (
|
|
7784
7961
|
// Special handling for ungrouped - no header, just conversations in scrollable area
|
|
7785
|
-
/* @__PURE__ */
|
|
7786
|
-
|
|
7962
|
+
/* @__PURE__ */ jsx16(
|
|
7963
|
+
Box13,
|
|
7787
7964
|
{
|
|
7788
7965
|
sx: {
|
|
7789
7966
|
minHeight: 0,
|
|
@@ -7799,7 +7976,7 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7799
7976
|
backgroundColor: touchDragActive && touchDragState.hoverProjectId === "__ungrouped" ? alpha7(theme.palette.primary.main, 0.08) : alpha7(theme.palette.background.default, 0.3)
|
|
7800
7977
|
},
|
|
7801
7978
|
"data-project-id": "__ungrouped",
|
|
7802
|
-
children: group.conversations.map((conversation) => /* @__PURE__ */
|
|
7979
|
+
children: group.conversations.map((conversation) => /* @__PURE__ */ jsx16(
|
|
7803
7980
|
simple_conversation_item_default,
|
|
7804
7981
|
{
|
|
7805
7982
|
conversation,
|
|
@@ -7833,8 +8010,8 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7833
8010
|
)
|
|
7834
8011
|
)
|
|
7835
8012
|
] }, group.id || "ungrouped")),
|
|
7836
|
-
filteredProjectGroups.length === 0 && /* @__PURE__ */
|
|
7837
|
-
|
|
8013
|
+
filteredProjectGroups.length === 0 && /* @__PURE__ */ jsxs13(
|
|
8014
|
+
Box13,
|
|
7838
8015
|
{
|
|
7839
8016
|
sx: {
|
|
7840
8017
|
flex: 1,
|
|
@@ -7847,16 +8024,16 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7847
8024
|
color: theme.palette.text.secondary
|
|
7848
8025
|
},
|
|
7849
8026
|
children: [
|
|
7850
|
-
/* @__PURE__ */
|
|
7851
|
-
/* @__PURE__ */
|
|
8027
|
+
/* @__PURE__ */ jsx16(Typography9, { variant: "h6", sx: { mb: 1 }, children: searchQuery ? "No conversations found" : "No conversations yet" }),
|
|
8028
|
+
/* @__PURE__ */ jsx16(Typography9, { variant: "body2", sx: { mb: 3, maxWidth: 280 }, children: searchQuery ? `No conversations match "${searchQuery}"` : "Start your first conversation to begin organizing your chats into projects" })
|
|
7852
8029
|
]
|
|
7853
8030
|
}
|
|
7854
8031
|
)
|
|
7855
8032
|
]
|
|
7856
8033
|
}
|
|
7857
8034
|
),
|
|
7858
|
-
/* @__PURE__ */
|
|
7859
|
-
|
|
8035
|
+
/* @__PURE__ */ jsxs13(
|
|
8036
|
+
Box13,
|
|
7860
8037
|
{
|
|
7861
8038
|
onClick: user ? () => {
|
|
7862
8039
|
window.location.href = "/profile";
|
|
@@ -7873,7 +8050,7 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7873
8050
|
cursor: user ? "pointer" : "default"
|
|
7874
8051
|
},
|
|
7875
8052
|
children: [
|
|
7876
|
-
/* @__PURE__ */
|
|
8053
|
+
/* @__PURE__ */ jsx16(
|
|
7877
8054
|
Avatar7,
|
|
7878
8055
|
{
|
|
7879
8056
|
src: avatarImage,
|
|
@@ -7888,9 +8065,9 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7888
8065
|
children: avatarInitials
|
|
7889
8066
|
}
|
|
7890
8067
|
),
|
|
7891
|
-
/* @__PURE__ */
|
|
7892
|
-
/* @__PURE__ */
|
|
7893
|
-
|
|
8068
|
+
/* @__PURE__ */ jsxs13(Box13, { sx: { display: "flex", flexDirection: "column", flex: 1, minWidth: 0, gap: 0.25 }, children: [
|
|
8069
|
+
/* @__PURE__ */ jsx16(
|
|
8070
|
+
Typography9,
|
|
7894
8071
|
{
|
|
7895
8072
|
variant: "subtitle2",
|
|
7896
8073
|
noWrap: true,
|
|
@@ -7898,8 +8075,8 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7898
8075
|
children: user ? userDisplayName : "Not signed in"
|
|
7899
8076
|
}
|
|
7900
8077
|
),
|
|
7901
|
-
/* @__PURE__ */
|
|
7902
|
-
|
|
8078
|
+
/* @__PURE__ */ jsx16(
|
|
8079
|
+
Typography9,
|
|
7903
8080
|
{
|
|
7904
8081
|
variant: "caption",
|
|
7905
8082
|
noWrap: true,
|
|
@@ -7908,9 +8085,9 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7908
8085
|
}
|
|
7909
8086
|
)
|
|
7910
8087
|
] }),
|
|
7911
|
-
user && /* @__PURE__ */
|
|
7912
|
-
/* @__PURE__ */
|
|
7913
|
-
|
|
8088
|
+
user && /* @__PURE__ */ jsxs13(Fragment8, { children: [
|
|
8089
|
+
/* @__PURE__ */ jsx16(
|
|
8090
|
+
Box13,
|
|
7914
8091
|
{
|
|
7915
8092
|
sx: {
|
|
7916
8093
|
flexShrink: 0,
|
|
@@ -7923,11 +8100,11 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7923
8100
|
border: `1px solid ${alpha7(theme.palette.divider, 0.8)}`,
|
|
7924
8101
|
color: theme.palette.text.secondary
|
|
7925
8102
|
},
|
|
7926
|
-
children: /* @__PURE__ */
|
|
8103
|
+
children: /* @__PURE__ */ jsx16(SettingsIcon3, { size: 16 })
|
|
7927
8104
|
}
|
|
7928
8105
|
),
|
|
7929
|
-
/* @__PURE__ */
|
|
7930
|
-
|
|
8106
|
+
/* @__PURE__ */ jsx16(
|
|
8107
|
+
IconButton10,
|
|
7931
8108
|
{
|
|
7932
8109
|
"aria-label": "Sign out",
|
|
7933
8110
|
title: "Sign out",
|
|
@@ -7944,7 +8121,7 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7944
8121
|
color: theme.palette.error.main,
|
|
7945
8122
|
"&:hover": { bgcolor: alpha7(theme.palette.error.main, 0.1) }
|
|
7946
8123
|
},
|
|
7947
|
-
children: /* @__PURE__ */
|
|
8124
|
+
children: /* @__PURE__ */ jsx16(LogOutIcon2, { size: 16 })
|
|
7948
8125
|
}
|
|
7949
8126
|
)
|
|
7950
8127
|
] })
|
|
@@ -7956,15 +8133,15 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7956
8133
|
) })
|
|
7957
8134
|
}
|
|
7958
8135
|
),
|
|
7959
|
-
/* @__PURE__ */
|
|
8136
|
+
/* @__PURE__ */ jsx16(
|
|
7960
8137
|
project_management_modal_default,
|
|
7961
8138
|
{
|
|
7962
8139
|
open: projectManagementOpen,
|
|
7963
8140
|
onClose: () => setProjectManagementOpen(false)
|
|
7964
8141
|
}
|
|
7965
8142
|
),
|
|
7966
|
-
/* @__PURE__ */
|
|
7967
|
-
conversationToMove && /* @__PURE__ */
|
|
8143
|
+
/* @__PURE__ */ jsx16(memory_modal_default, { open: memoryModalOpen, onClose: () => setMemoryModalOpen(false) }),
|
|
8144
|
+
conversationToMove && /* @__PURE__ */ jsx16(
|
|
7968
8145
|
move_conversation_modal_default,
|
|
7969
8146
|
{
|
|
7970
8147
|
open: moveModalOpen,
|
|
@@ -7973,7 +8150,7 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7973
8150
|
currentProjectId: conversationToMove.projectId
|
|
7974
8151
|
}
|
|
7975
8152
|
),
|
|
7976
|
-
/* @__PURE__ */
|
|
8153
|
+
/* @__PURE__ */ jsx16(
|
|
7977
8154
|
Menu4,
|
|
7978
8155
|
{
|
|
7979
8156
|
anchorEl: menuAnchorEl,
|
|
@@ -7987,7 +8164,7 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7987
8164
|
vertical: "bottom",
|
|
7988
8165
|
horizontal: "right"
|
|
7989
8166
|
},
|
|
7990
|
-
children: /* @__PURE__ */
|
|
8167
|
+
children: /* @__PURE__ */ jsxs13(
|
|
7991
8168
|
MenuItem4,
|
|
7992
8169
|
{
|
|
7993
8170
|
onClick: () => {
|
|
@@ -7997,14 +8174,14 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7997
8174
|
disabled: visibleConversationCount === 0,
|
|
7998
8175
|
sx: { color: theme.palette.error.main },
|
|
7999
8176
|
children: [
|
|
8000
|
-
/* @__PURE__ */
|
|
8001
|
-
/* @__PURE__ */
|
|
8177
|
+
/* @__PURE__ */ jsx16(ListItemIcon4, { children: /* @__PURE__ */ jsx16(DeleteSweepIcon2, { size: 16, color: theme.palette.error.main }) }),
|
|
8178
|
+
/* @__PURE__ */ jsx16(ListItemText4, { children: "Clear All Conversations" })
|
|
8002
8179
|
]
|
|
8003
8180
|
}
|
|
8004
8181
|
)
|
|
8005
8182
|
}
|
|
8006
8183
|
),
|
|
8007
|
-
/* @__PURE__ */
|
|
8184
|
+
/* @__PURE__ */ jsxs13(
|
|
8008
8185
|
Dialog5,
|
|
8009
8186
|
{
|
|
8010
8187
|
open: clearConfirmOpen,
|
|
@@ -8012,12 +8189,12 @@ var EnhancedMobileConversationsModal = ({
|
|
|
8012
8189
|
maxWidth: "sm",
|
|
8013
8190
|
fullWidth: true,
|
|
8014
8191
|
children: [
|
|
8015
|
-
/* @__PURE__ */
|
|
8016
|
-
/* @__PURE__ */
|
|
8017
|
-
/* @__PURE__ */
|
|
8018
|
-
/* @__PURE__ */
|
|
8019
|
-
/* @__PURE__ */
|
|
8020
|
-
|
|
8192
|
+
/* @__PURE__ */ jsx16(DialogTitle4, { children: "Clear All Conversations?" }),
|
|
8193
|
+
/* @__PURE__ */ jsx16(DialogContent4, { children: /* @__PURE__ */ jsx16(Typography9, { children: visibleConversationCount === 0 ? "No conversations available to clear." : `This will permanently delete ${visibleConversationCount} conversation${visibleConversationCount === 1 ? "" : "s"} and cannot be undone.` }) }),
|
|
8194
|
+
/* @__PURE__ */ jsxs13(DialogActions4, { children: [
|
|
8195
|
+
/* @__PURE__ */ jsx16(Button7, { onClick: () => setClearConfirmOpen(false), children: "Cancel" }),
|
|
8196
|
+
/* @__PURE__ */ jsx16(
|
|
8197
|
+
Button7,
|
|
8021
8198
|
{
|
|
8022
8199
|
onClick: handleClearAllConfirm,
|
|
8023
8200
|
color: "error",
|
|
@@ -8035,7 +8212,7 @@ var enhanced_mobile_conversations_modal_default = EnhancedMobileConversationsMod
|
|
|
8035
8212
|
|
|
8036
8213
|
// src/chat/chat-app-bar.tsx
|
|
8037
8214
|
import { shallow as shallow2 } from "zustand/shallow";
|
|
8038
|
-
import { Fragment as Fragment9, jsx as
|
|
8215
|
+
import { Fragment as Fragment9, jsx as jsx17, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
8039
8216
|
var CDN_BASE = "https://cdn.burtson.ai/";
|
|
8040
8217
|
var banditHead = `${CDN_BASE}/images/bandit-head.png`;
|
|
8041
8218
|
var modelAvatars = {
|
|
@@ -8054,12 +8231,12 @@ var ChatAppBar = ({
|
|
|
8054
8231
|
drawerOpen,
|
|
8055
8232
|
setDrawerOpen
|
|
8056
8233
|
}) => {
|
|
8057
|
-
const theme =
|
|
8234
|
+
const theme = useTheme13();
|
|
8058
8235
|
const isMobile = useMediaQuery5(theme.breakpoints.down("sm"));
|
|
8059
|
-
const hasLoggedRouterWarningRef =
|
|
8236
|
+
const hasLoggedRouterWarningRef = useRef11(false);
|
|
8060
8237
|
let navigate = null;
|
|
8061
8238
|
try {
|
|
8062
|
-
navigate =
|
|
8239
|
+
navigate = useNavigate2();
|
|
8063
8240
|
} catch (error) {
|
|
8064
8241
|
if (!hasLoggedRouterWarningRef.current) {
|
|
8065
8242
|
debugLogger.warn("ChatAppBar: Navigation not available (missing Router context)", { error });
|
|
@@ -8068,6 +8245,10 @@ var ChatAppBar = ({
|
|
|
8068
8245
|
navigate = null;
|
|
8069
8246
|
}
|
|
8070
8247
|
const safeNavigate = (to) => {
|
|
8248
|
+
if (typeof window !== "undefined" && /^https?:\/\//.test(to)) {
|
|
8249
|
+
window.location.href = to;
|
|
8250
|
+
return;
|
|
8251
|
+
}
|
|
8071
8252
|
if (navigate) {
|
|
8072
8253
|
navigate(to);
|
|
8073
8254
|
} else if (typeof window !== "undefined") {
|
|
@@ -8131,16 +8312,16 @@ var ChatAppBar = ({
|
|
|
8131
8312
|
};
|
|
8132
8313
|
const syncIndicatorIcon = (() => {
|
|
8133
8314
|
if (isPlaygroundMode2 || !syncEnabled) {
|
|
8134
|
-
return /* @__PURE__ */
|
|
8315
|
+
return /* @__PURE__ */ jsx17(CloudOffIcon, { fontSize: "small", color: "disabled" });
|
|
8135
8316
|
}
|
|
8136
8317
|
switch (syncStatus) {
|
|
8137
8318
|
case "syncing":
|
|
8138
|
-
return /* @__PURE__ */
|
|
8319
|
+
return /* @__PURE__ */ jsx17(SyncIcon, { fontSize: "small", sx: syncSpinSx, color: "primary" });
|
|
8139
8320
|
case "error":
|
|
8140
|
-
return /* @__PURE__ */
|
|
8321
|
+
return /* @__PURE__ */ jsx17(ErrorOutlineIcon, { fontSize: "small", color: "error" });
|
|
8141
8322
|
case "idle":
|
|
8142
8323
|
default:
|
|
8143
|
-
return /* @__PURE__ */
|
|
8324
|
+
return /* @__PURE__ */ jsx17(CloudDoneIcon, { fontSize: "small", color: "success" });
|
|
8144
8325
|
}
|
|
8145
8326
|
})();
|
|
8146
8327
|
const syncTooltip = (() => {
|
|
@@ -8180,7 +8361,7 @@ var ChatAppBar = ({
|
|
|
8180
8361
|
const tier = String(getCurrentTier());
|
|
8181
8362
|
return tier !== "trial" && tier !== "expired" && tier !== "free" && tier !== "basic";
|
|
8182
8363
|
})();
|
|
8183
|
-
const plansPath = "/plans";
|
|
8364
|
+
const plansPath = typeof window !== "undefined" && !(window.location.hostname === "banditailabs.com" || window.location.hostname.endsWith(".banditailabs.com") || window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1") ? "https://banditailabs.com/plans" : "/plans";
|
|
8184
8365
|
const isTTSAvailable = !!packageSettings?.gatewayApiUrl && preferences.ttsEnabled && hasTTS();
|
|
8185
8366
|
const currentConversation = conversations.find((c) => c.id === currentId);
|
|
8186
8367
|
const conversationCountDisplay = conversations.length > 99 ? "99+" : conversations.length.toString();
|
|
@@ -8252,9 +8433,9 @@ var ChatAppBar = ({
|
|
|
8252
8433
|
}
|
|
8253
8434
|
safeNavigate("/");
|
|
8254
8435
|
}
|
|
8255
|
-
return /* @__PURE__ */
|
|
8256
|
-
/* @__PURE__ */
|
|
8257
|
-
|
|
8436
|
+
return /* @__PURE__ */ jsxs14(Fragment9, { children: [
|
|
8437
|
+
/* @__PURE__ */ jsxs14(
|
|
8438
|
+
Box14,
|
|
8258
8439
|
{
|
|
8259
8440
|
sx: {
|
|
8260
8441
|
position: "fixed",
|
|
@@ -8274,8 +8455,8 @@ var ChatAppBar = ({
|
|
|
8274
8455
|
}
|
|
8275
8456
|
},
|
|
8276
8457
|
children: [
|
|
8277
|
-
/* @__PURE__ */
|
|
8278
|
-
|
|
8458
|
+
/* @__PURE__ */ jsxs14(
|
|
8459
|
+
Box14,
|
|
8279
8460
|
{
|
|
8280
8461
|
sx: {
|
|
8281
8462
|
display: "flex",
|
|
@@ -8295,17 +8476,17 @@ var ChatAppBar = ({
|
|
|
8295
8476
|
}
|
|
8296
8477
|
},
|
|
8297
8478
|
children: [
|
|
8298
|
-
/* @__PURE__ */
|
|
8299
|
-
|
|
8479
|
+
/* @__PURE__ */ jsx17(Tooltip6, { title: homeTooltip, arrow: true, children: /* @__PURE__ */ jsx17(
|
|
8480
|
+
IconButton11,
|
|
8300
8481
|
{
|
|
8301
8482
|
onClick: goToHome,
|
|
8302
8483
|
sx: pillButtonStyles,
|
|
8303
8484
|
"aria-label": "Go to home page",
|
|
8304
|
-
children: /* @__PURE__ */
|
|
8485
|
+
children: /* @__PURE__ */ jsx17(HomeIcon, {})
|
|
8305
8486
|
}
|
|
8306
8487
|
) }),
|
|
8307
|
-
showLimitedAdminPanel() && /* @__PURE__ */
|
|
8308
|
-
|
|
8488
|
+
showLimitedAdminPanel() && /* @__PURE__ */ jsx17(Tooltip6, { title: "Management & Settings", arrow: true, children: /* @__PURE__ */ jsx17(
|
|
8489
|
+
IconButton11,
|
|
8309
8490
|
{
|
|
8310
8491
|
onClick: () => safeNavigate(managementPath),
|
|
8311
8492
|
sx: {
|
|
@@ -8316,11 +8497,11 @@ var ChatAppBar = ({
|
|
|
8316
8497
|
}
|
|
8317
8498
|
},
|
|
8318
8499
|
"aria-label": "Open management settings",
|
|
8319
|
-
children: /* @__PURE__ */
|
|
8500
|
+
children: /* @__PURE__ */ jsx17(SettingsIcon, {})
|
|
8320
8501
|
}
|
|
8321
8502
|
) }),
|
|
8322
|
-
/* @__PURE__ */
|
|
8323
|
-
|
|
8503
|
+
/* @__PURE__ */ jsx17(Tooltip6, { title: syncTooltip, arrow: true, children: /* @__PURE__ */ jsxs14(
|
|
8504
|
+
IconButton11,
|
|
8324
8505
|
{
|
|
8325
8506
|
onClick: handleSyncBadgeClick,
|
|
8326
8507
|
disabled: syncButtonDisabled,
|
|
@@ -8335,8 +8516,8 @@ var ChatAppBar = ({
|
|
|
8335
8516
|
"aria-label": "Conversation sync status",
|
|
8336
8517
|
children: [
|
|
8337
8518
|
syncIndicatorIcon,
|
|
8338
|
-
pendingCount > 0 && !syncButtonDisabled && syncStatus !== "syncing" && /* @__PURE__ */
|
|
8339
|
-
|
|
8519
|
+
pendingCount > 0 && !syncButtonDisabled && syncStatus !== "syncing" && /* @__PURE__ */ jsx17(
|
|
8520
|
+
Box14,
|
|
8340
8521
|
{
|
|
8341
8522
|
sx: {
|
|
8342
8523
|
position: "absolute",
|
|
@@ -8361,8 +8542,8 @@ var ChatAppBar = ({
|
|
|
8361
8542
|
]
|
|
8362
8543
|
}
|
|
8363
8544
|
) }),
|
|
8364
|
-
!isMobile && /* @__PURE__ */
|
|
8365
|
-
|
|
8545
|
+
!isMobile && /* @__PURE__ */ jsx17(Tooltip6, { title: `${drawerOpen ? "Close" : "Open"} Conversations`, arrow: true, children: /* @__PURE__ */ jsxs14(
|
|
8546
|
+
IconButton11,
|
|
8366
8547
|
{
|
|
8367
8548
|
onClick: () => setDrawerOpen(!drawerOpen),
|
|
8368
8549
|
sx: {
|
|
@@ -8375,9 +8556,9 @@ var ChatAppBar = ({
|
|
|
8375
8556
|
"aria-label": `${drawerOpen ? "Close" : "Open"} conversations drawer`,
|
|
8376
8557
|
"aria-pressed": drawerOpen,
|
|
8377
8558
|
children: [
|
|
8378
|
-
drawerOpen ? /* @__PURE__ */
|
|
8379
|
-
conversations.length > 0 && /* @__PURE__ */
|
|
8380
|
-
|
|
8559
|
+
drawerOpen ? /* @__PURE__ */ jsx17(NotesIcon, {}) : /* @__PURE__ */ jsx17(NotesIconOutlined, {}),
|
|
8560
|
+
conversations.length > 0 && /* @__PURE__ */ jsx17(
|
|
8561
|
+
Box14,
|
|
8381
8562
|
{
|
|
8382
8563
|
sx: {
|
|
8383
8564
|
position: "absolute",
|
|
@@ -8402,8 +8583,8 @@ var ChatAppBar = ({
|
|
|
8402
8583
|
]
|
|
8403
8584
|
}
|
|
8404
8585
|
) }),
|
|
8405
|
-
!isMobile && canShowNewConversationButton && /* @__PURE__ */
|
|
8406
|
-
|
|
8586
|
+
!isMobile && canShowNewConversationButton && /* @__PURE__ */ jsx17(Tooltip6, { title: "Start New Conversation", arrow: true, children: /* @__PURE__ */ jsx17(
|
|
8587
|
+
IconButton11,
|
|
8407
8588
|
{
|
|
8408
8589
|
onClick: () => createNewConversation(),
|
|
8409
8590
|
sx: {
|
|
@@ -8416,14 +8597,14 @@ var ChatAppBar = ({
|
|
|
8416
8597
|
}
|
|
8417
8598
|
},
|
|
8418
8599
|
"aria-label": "Create new conversation",
|
|
8419
|
-
children: /* @__PURE__ */
|
|
8600
|
+
children: /* @__PURE__ */ jsx17(AddIcon, {})
|
|
8420
8601
|
}
|
|
8421
8602
|
) })
|
|
8422
8603
|
]
|
|
8423
8604
|
}
|
|
8424
8605
|
),
|
|
8425
|
-
/* @__PURE__ */
|
|
8426
|
-
|
|
8606
|
+
/* @__PURE__ */ jsxs14(
|
|
8607
|
+
Box14,
|
|
8427
8608
|
{
|
|
8428
8609
|
sx: {
|
|
8429
8610
|
display: "flex",
|
|
@@ -8443,8 +8624,8 @@ var ChatAppBar = ({
|
|
|
8443
8624
|
}
|
|
8444
8625
|
},
|
|
8445
8626
|
children: [
|
|
8446
|
-
isMobile && /* @__PURE__ */
|
|
8447
|
-
|
|
8627
|
+
isMobile && /* @__PURE__ */ jsx17(Tooltip6, { title: `Conversations (${conversations.length})`, arrow: true, children: /* @__PURE__ */ jsxs14(
|
|
8628
|
+
IconButton11,
|
|
8448
8629
|
{
|
|
8449
8630
|
onClick: () => setModalOpen(true),
|
|
8450
8631
|
sx: {
|
|
@@ -8453,9 +8634,9 @@ var ChatAppBar = ({
|
|
|
8453
8634
|
},
|
|
8454
8635
|
"aria-label": `Open conversations modal with ${conversations.length} conversations`,
|
|
8455
8636
|
children: [
|
|
8456
|
-
/* @__PURE__ */
|
|
8457
|
-
conversations.length > 0 && /* @__PURE__ */
|
|
8458
|
-
|
|
8637
|
+
/* @__PURE__ */ jsx17(NotesIcon, { fontSize: "small" }),
|
|
8638
|
+
conversations.length > 0 && /* @__PURE__ */ jsx17(
|
|
8639
|
+
Box14,
|
|
8459
8640
|
{
|
|
8460
8641
|
sx: {
|
|
8461
8642
|
position: "absolute",
|
|
@@ -8480,8 +8661,8 @@ var ChatAppBar = ({
|
|
|
8480
8661
|
]
|
|
8481
8662
|
}
|
|
8482
8663
|
) }),
|
|
8483
|
-
isMobile && canShowNewConversationButton && /* @__PURE__ */
|
|
8484
|
-
|
|
8664
|
+
isMobile && canShowNewConversationButton && /* @__PURE__ */ jsx17(Tooltip6, { title: "Start New Conversation", arrow: true, children: /* @__PURE__ */ jsx17(
|
|
8665
|
+
IconButton11,
|
|
8485
8666
|
{
|
|
8486
8667
|
onClick: () => {
|
|
8487
8668
|
createNewConversation();
|
|
@@ -8497,11 +8678,11 @@ var ChatAppBar = ({
|
|
|
8497
8678
|
}
|
|
8498
8679
|
},
|
|
8499
8680
|
"aria-label": "Create new conversation",
|
|
8500
|
-
children: /* @__PURE__ */
|
|
8681
|
+
children: /* @__PURE__ */ jsx17(AddIcon, { fontSize: "small" })
|
|
8501
8682
|
}
|
|
8502
8683
|
) }),
|
|
8503
|
-
/* @__PURE__ */
|
|
8504
|
-
|
|
8684
|
+
/* @__PURE__ */ jsx17(Tooltip6, { title: `Current AI: ${selectedModel.replace("Bandit-", "")}`, arrow: true, children: /* @__PURE__ */ jsx17(
|
|
8685
|
+
IconButton11,
|
|
8505
8686
|
{
|
|
8506
8687
|
onClick: (e) => setModelAnchorEl(e.currentTarget),
|
|
8507
8688
|
sx: {
|
|
@@ -8515,7 +8696,7 @@ var ChatAppBar = ({
|
|
|
8515
8696
|
}
|
|
8516
8697
|
},
|
|
8517
8698
|
"aria-label": `Change AI personality. Currently using ${selectedModel}`,
|
|
8518
|
-
children: /* @__PURE__ */
|
|
8699
|
+
children: /* @__PURE__ */ jsx17(
|
|
8519
8700
|
Avatar8,
|
|
8520
8701
|
{
|
|
8521
8702
|
src: currentAvatar,
|
|
@@ -8532,16 +8713,16 @@ var ChatAppBar = ({
|
|
|
8532
8713
|
)
|
|
8533
8714
|
}
|
|
8534
8715
|
) }),
|
|
8535
|
-
/* @__PURE__ */
|
|
8536
|
-
|
|
8716
|
+
/* @__PURE__ */ jsx17(Tooltip6, { title: `Engine \xB7 ${engineDisplay}`, arrow: true, children: /* @__PURE__ */ jsx17(
|
|
8717
|
+
IconButton11,
|
|
8537
8718
|
{
|
|
8538
8719
|
onClick: (e) => setEngineAnchorEl(e.currentTarget),
|
|
8539
8720
|
sx: pillButtonStyles,
|
|
8540
8721
|
"aria-label": `Change base model (engine). Currently ${engineDisplay}`,
|
|
8541
|
-
children: /* @__PURE__ */
|
|
8722
|
+
children: /* @__PURE__ */ jsx17(AutoAwesomeIcon, { fontSize: "small" })
|
|
8542
8723
|
}
|
|
8543
8724
|
) }),
|
|
8544
|
-
/* @__PURE__ */
|
|
8725
|
+
/* @__PURE__ */ jsxs14(
|
|
8545
8726
|
Menu5,
|
|
8546
8727
|
{
|
|
8547
8728
|
anchorEl: engineAnchorEl,
|
|
@@ -8550,8 +8731,8 @@ var ChatAppBar = ({
|
|
|
8550
8731
|
transformOrigin: { horizontal: "right", vertical: "top" },
|
|
8551
8732
|
anchorOrigin: { horizontal: "right", vertical: "bottom" },
|
|
8552
8733
|
children: [
|
|
8553
|
-
/* @__PURE__ */
|
|
8554
|
-
engines.length === 0 && /* @__PURE__ */
|
|
8734
|
+
/* @__PURE__ */ jsx17(Typography10, { variant: "overline", sx: { px: 2, color: theme.palette.text.secondary }, children: "Engine \xB7 base model" }),
|
|
8735
|
+
engines.length === 0 && /* @__PURE__ */ jsx17(MenuItem5, { disabled: true, children: /* @__PURE__ */ jsx17(Typography10, { variant: "body2", children: "No engines available" }) }),
|
|
8555
8736
|
engines.map((engine) => {
|
|
8556
8737
|
const badges = [
|
|
8557
8738
|
engine.vision && "vision",
|
|
@@ -8560,7 +8741,7 @@ var ChatAppBar = ({
|
|
|
8560
8741
|
engine.cloud && "cloud"
|
|
8561
8742
|
].filter(Boolean);
|
|
8562
8743
|
const isGated = engine.cloud && !frontierEligible;
|
|
8563
|
-
return /* @__PURE__ */
|
|
8744
|
+
return /* @__PURE__ */ jsxs14(
|
|
8564
8745
|
MenuItem5,
|
|
8565
8746
|
{
|
|
8566
8747
|
selected: engine.id === resolvedEngineId,
|
|
@@ -8584,16 +8765,16 @@ var ChatAppBar = ({
|
|
|
8584
8765
|
...isGated ? { opacity: 1, "&.Mui-disabled": { opacity: 1 } } : {}
|
|
8585
8766
|
},
|
|
8586
8767
|
children: [
|
|
8587
|
-
/* @__PURE__ */
|
|
8588
|
-
isGated && /* @__PURE__ */
|
|
8768
|
+
/* @__PURE__ */ jsxs14(Box14, { sx: { display: "flex", alignItems: "center", gap: 1, width: "100%" }, children: [
|
|
8769
|
+
isGated && /* @__PURE__ */ jsx17(
|
|
8589
8770
|
LockIcon,
|
|
8590
8771
|
{
|
|
8591
8772
|
fontSize: "small",
|
|
8592
8773
|
sx: { fontSize: "0.95rem", color: theme.palette.text.secondary }
|
|
8593
8774
|
}
|
|
8594
8775
|
),
|
|
8595
|
-
/* @__PURE__ */
|
|
8596
|
-
|
|
8776
|
+
/* @__PURE__ */ jsx17(
|
|
8777
|
+
Typography10,
|
|
8597
8778
|
{
|
|
8598
8779
|
variant: "body2",
|
|
8599
8780
|
sx: {
|
|
@@ -8604,15 +8785,15 @@ var ChatAppBar = ({
|
|
|
8604
8785
|
children: cleanEngineName(engine.displayName)
|
|
8605
8786
|
}
|
|
8606
8787
|
),
|
|
8607
|
-
engine.id === resolvedEngineId && !isGated && /* @__PURE__ */
|
|
8788
|
+
engine.id === resolvedEngineId && !isGated && /* @__PURE__ */ jsx17(Box14, { sx: { width: 8, height: 8, borderRadius: "50%", bgcolor: theme.palette.primary.main } })
|
|
8608
8789
|
] }),
|
|
8609
|
-
/* @__PURE__ */
|
|
8610
|
-
isGated && /* @__PURE__ */
|
|
8611
|
-
|
|
8790
|
+
/* @__PURE__ */ jsx17(Typography10, { variant: "caption", sx: { color: theme.palette.text.secondary }, children: isGated ? "Premium engine \u2014 available on a paid plan." : engine.available ? engine.description : engine.unavailableReason || "Unavailable" }),
|
|
8791
|
+
isGated && /* @__PURE__ */ jsx17(
|
|
8792
|
+
Button8,
|
|
8612
8793
|
{
|
|
8613
8794
|
size: "small",
|
|
8614
8795
|
variant: "text",
|
|
8615
|
-
startIcon: /* @__PURE__ */
|
|
8796
|
+
startIcon: /* @__PURE__ */ jsx17(LockIcon, { sx: { fontSize: "0.85rem" } }),
|
|
8616
8797
|
onClick: (e) => {
|
|
8617
8798
|
e.stopPropagation();
|
|
8618
8799
|
setEngineAnchorEl(null);
|
|
@@ -8633,8 +8814,8 @@ var ChatAppBar = ({
|
|
|
8633
8814
|
children: "Upgrade to unlock"
|
|
8634
8815
|
}
|
|
8635
8816
|
),
|
|
8636
|
-
badges.length > 0 && /* @__PURE__ */
|
|
8637
|
-
|
|
8817
|
+
badges.length > 0 && /* @__PURE__ */ jsx17(Box14, { sx: { display: "flex", gap: 0.5, flexWrap: "wrap", mt: 0.25 }, children: badges.map((b) => /* @__PURE__ */ jsx17(
|
|
8818
|
+
Box14,
|
|
8638
8819
|
{
|
|
8639
8820
|
sx: {
|
|
8640
8821
|
fontSize: "0.65rem",
|
|
@@ -8656,7 +8837,7 @@ var ChatAppBar = ({
|
|
|
8656
8837
|
]
|
|
8657
8838
|
}
|
|
8658
8839
|
),
|
|
8659
|
-
/* @__PURE__ */
|
|
8840
|
+
/* @__PURE__ */ jsx17(
|
|
8660
8841
|
Menu5,
|
|
8661
8842
|
{
|
|
8662
8843
|
anchorEl: modelAnchorEl,
|
|
@@ -8692,7 +8873,7 @@ var ChatAppBar = ({
|
|
|
8692
8873
|
}
|
|
8693
8874
|
}
|
|
8694
8875
|
},
|
|
8695
|
-
children: availableModels.map((model) => /* @__PURE__ */
|
|
8876
|
+
children: availableModels.map((model) => /* @__PURE__ */ jsxs14(
|
|
8696
8877
|
MenuItem5,
|
|
8697
8878
|
{
|
|
8698
8879
|
selected: model.name === selectedModel,
|
|
@@ -8739,7 +8920,7 @@ var ChatAppBar = ({
|
|
|
8739
8920
|
px: 2
|
|
8740
8921
|
},
|
|
8741
8922
|
children: [
|
|
8742
|
-
/* @__PURE__ */
|
|
8923
|
+
/* @__PURE__ */ jsx17(
|
|
8743
8924
|
Avatar8,
|
|
8744
8925
|
{
|
|
8745
8926
|
src: model.avatarBase64 || modelAvatars[model.name] || banditHead,
|
|
@@ -8752,12 +8933,12 @@ var ChatAppBar = ({
|
|
|
8752
8933
|
}
|
|
8753
8934
|
}
|
|
8754
8935
|
),
|
|
8755
|
-
/* @__PURE__ */
|
|
8756
|
-
/* @__PURE__ */
|
|
8757
|
-
/* @__PURE__ */
|
|
8936
|
+
/* @__PURE__ */ jsxs14(Box14, { sx: { flex: 1 }, children: [
|
|
8937
|
+
/* @__PURE__ */ jsx17(Typography10, { variant: "body2", sx: { fontWeight: 500 }, children: model.name.replace("Bandit-", "") }),
|
|
8938
|
+
/* @__PURE__ */ jsx17(Typography10, { variant: "caption", sx: { color: theme.palette.text.secondary, display: "block" }, children: model.name === selectedModel ? "Currently active" : "Switch to this AI" })
|
|
8758
8939
|
] }),
|
|
8759
|
-
model.name === selectedModel && /* @__PURE__ */
|
|
8760
|
-
|
|
8940
|
+
model.name === selectedModel && /* @__PURE__ */ jsx17(
|
|
8941
|
+
Box14,
|
|
8761
8942
|
{
|
|
8762
8943
|
sx: {
|
|
8763
8944
|
width: 8,
|
|
@@ -8773,9 +8954,9 @@ var ChatAppBar = ({
|
|
|
8773
8954
|
))
|
|
8774
8955
|
}
|
|
8775
8956
|
),
|
|
8776
|
-
isTTSAvailable && /* @__PURE__ */
|
|
8777
|
-
/* @__PURE__ */
|
|
8778
|
-
|
|
8957
|
+
isTTSAvailable && /* @__PURE__ */ jsxs14(Fragment9, { children: [
|
|
8958
|
+
/* @__PURE__ */ jsx17(Tooltip6, { title: `Voice: ${selectedVoice ? toTitleCase(selectedVoice.split("-")[1]) : "Default"}`, arrow: true, children: /* @__PURE__ */ jsx17(
|
|
8959
|
+
IconButton11,
|
|
8779
8960
|
{
|
|
8780
8961
|
onClick: (e) => setVoiceAnchorEl(e.currentTarget),
|
|
8781
8962
|
sx: {
|
|
@@ -8788,10 +8969,10 @@ var ChatAppBar = ({
|
|
|
8788
8969
|
}
|
|
8789
8970
|
},
|
|
8790
8971
|
"aria-label": `Change voice. Currently using ${selectedVoice ? toTitleCase(selectedVoice.split("-")[1]) : "default"}`,
|
|
8791
|
-
children: /* @__PURE__ */
|
|
8972
|
+
children: /* @__PURE__ */ jsx17(RecordVoiceOverIcon, { fontSize: "small" })
|
|
8792
8973
|
}
|
|
8793
8974
|
) }),
|
|
8794
|
-
/* @__PURE__ */
|
|
8975
|
+
/* @__PURE__ */ jsx17(
|
|
8795
8976
|
Menu5,
|
|
8796
8977
|
{
|
|
8797
8978
|
anchorEl: voiceAnchorEl,
|
|
@@ -8828,7 +9009,7 @@ var ChatAppBar = ({
|
|
|
8828
9009
|
}
|
|
8829
9010
|
}
|
|
8830
9011
|
},
|
|
8831
|
-
children: availableVoices.length > 0 ? availableVoices.map((voice) => /* @__PURE__ */
|
|
9012
|
+
children: availableVoices.length > 0 ? availableVoices.map((voice) => /* @__PURE__ */ jsx17(
|
|
8832
9013
|
MenuItem5,
|
|
8833
9014
|
{
|
|
8834
9015
|
selected: voice === selectedVoice,
|
|
@@ -8836,14 +9017,14 @@ var ChatAppBar = ({
|
|
|
8836
9017
|
handleVoiceChange(voice);
|
|
8837
9018
|
setVoiceAnchorEl(null);
|
|
8838
9019
|
},
|
|
8839
|
-
children: /* @__PURE__ */
|
|
8840
|
-
/* @__PURE__ */
|
|
8841
|
-
/* @__PURE__ */
|
|
8842
|
-
/* @__PURE__ */
|
|
8843
|
-
/* @__PURE__ */
|
|
9020
|
+
children: /* @__PURE__ */ jsxs14(Box14, { sx: { display: "flex", alignItems: "center", gap: 1, width: "100%" }, children: [
|
|
9021
|
+
/* @__PURE__ */ jsx17(RecordVoiceOverIcon, { fontSize: "small", sx: { color: theme.palette.text.secondary } }),
|
|
9022
|
+
/* @__PURE__ */ jsxs14(Box14, { sx: { flex: 1 }, children: [
|
|
9023
|
+
/* @__PURE__ */ jsx17(Typography10, { variant: "body2", children: toTitleCase(voice.split("-")[1]) }),
|
|
9024
|
+
/* @__PURE__ */ jsx17(Typography10, { variant: "caption", sx: { color: theme.palette.text.secondary }, children: voice === selectedVoice ? "Currently active" : "Switch to this voice" })
|
|
8844
9025
|
] }),
|
|
8845
|
-
voice === selectedVoice && /* @__PURE__ */
|
|
8846
|
-
|
|
9026
|
+
voice === selectedVoice && /* @__PURE__ */ jsx17(
|
|
9027
|
+
Box14,
|
|
8847
9028
|
{
|
|
8848
9029
|
sx: {
|
|
8849
9030
|
width: 8,
|
|
@@ -8856,7 +9037,7 @@ var ChatAppBar = ({
|
|
|
8856
9037
|
] })
|
|
8857
9038
|
},
|
|
8858
9039
|
voice
|
|
8859
|
-
)) : /* @__PURE__ */
|
|
9040
|
+
)) : /* @__PURE__ */ jsx17(MenuItem5, { disabled: true, children: /* @__PURE__ */ jsx17(Typography10, { variant: "body2", color: "text.secondary", children: "No voices available" }) })
|
|
8860
9041
|
}
|
|
8861
9042
|
)
|
|
8862
9043
|
] })
|
|
@@ -8866,17 +9047,17 @@ var ChatAppBar = ({
|
|
|
8866
9047
|
]
|
|
8867
9048
|
}
|
|
8868
9049
|
),
|
|
8869
|
-
/* @__PURE__ */
|
|
8870
|
-
/* @__PURE__ */
|
|
8871
|
-
/* @__PURE__ */
|
|
9050
|
+
/* @__PURE__ */ jsx17(conversation_drawer_default, { open: drawerOpen, onClose: () => setDrawerOpen(false) }),
|
|
9051
|
+
/* @__PURE__ */ jsx17(enhanced_mobile_conversations_modal_default, { open: modalOpen, onClose: () => setModalOpen(false) }),
|
|
9052
|
+
/* @__PURE__ */ jsxs14(
|
|
8872
9053
|
Dialog6,
|
|
8873
9054
|
{
|
|
8874
9055
|
open: confirmModelChangeOpen,
|
|
8875
9056
|
onClose: () => setConfirmModelChangeOpen(false),
|
|
8876
9057
|
children: [
|
|
8877
|
-
/* @__PURE__ */
|
|
8878
|
-
/* @__PURE__ */
|
|
8879
|
-
/* @__PURE__ */
|
|
9058
|
+
/* @__PURE__ */ jsx17(DialogTitle5, { children: "Change personality and start new conversation?" }),
|
|
9059
|
+
/* @__PURE__ */ jsx17(DialogContent5, { children: /* @__PURE__ */ jsxs14(Box14, { display: "flex", alignItems: "center", gap: 2, mt: 1, justifyContent: "center", children: [
|
|
9060
|
+
/* @__PURE__ */ jsx17(
|
|
8880
9061
|
Avatar8,
|
|
8881
9062
|
{
|
|
8882
9063
|
src: pendingModelAvatar,
|
|
@@ -8884,16 +9065,16 @@ var ChatAppBar = ({
|
|
|
8884
9065
|
sx: { width: 40, height: 40, filter: "brightness(1.7)" }
|
|
8885
9066
|
}
|
|
8886
9067
|
),
|
|
8887
|
-
/* @__PURE__ */
|
|
9068
|
+
/* @__PURE__ */ jsxs14(Typography10, { variant: "body2", children: [
|
|
8888
9069
|
"Your current conversation will be saved, and a new one will begin with ",
|
|
8889
|
-
/* @__PURE__ */
|
|
9070
|
+
/* @__PURE__ */ jsx17("strong", { children: pendingModel }),
|
|
8890
9071
|
"."
|
|
8891
9072
|
] })
|
|
8892
9073
|
] }) }),
|
|
8893
|
-
/* @__PURE__ */
|
|
8894
|
-
/* @__PURE__ */
|
|
8895
|
-
/* @__PURE__ */
|
|
8896
|
-
|
|
9074
|
+
/* @__PURE__ */ jsxs14(DialogActions5, { children: [
|
|
9075
|
+
/* @__PURE__ */ jsx17(Button8, { onClick: () => setConfirmModelChangeOpen(false), children: "Cancel" }),
|
|
9076
|
+
/* @__PURE__ */ jsx17(
|
|
9077
|
+
Button8,
|
|
8897
9078
|
{
|
|
8898
9079
|
onClick: () => {
|
|
8899
9080
|
if (pendingModel) {
|
|
@@ -8995,31 +9176,31 @@ Respond with just the title and nothing else.
|
|
|
8995
9176
|
};
|
|
8996
9177
|
|
|
8997
9178
|
// src/chat/query-suggestion-picker.tsx
|
|
8998
|
-
import { useEffect as useEffect13, useRef as
|
|
8999
|
-
import { Box as
|
|
9000
|
-
import { useTheme as
|
|
9179
|
+
import { useEffect as useEffect13, useRef as useRef12, useState as useState16 } from "react";
|
|
9180
|
+
import { Box as Box15, useMediaQuery as useMediaQuery6 } from "@mui/material";
|
|
9181
|
+
import { useTheme as useTheme14, alpha as alpha8 } from "@mui/material/styles";
|
|
9001
9182
|
import ReactMarkdown from "react-markdown";
|
|
9002
9183
|
import remarkGfm from "remark-gfm";
|
|
9003
9184
|
import rehypeRaw from "rehype-raw";
|
|
9004
|
-
import { Fragment as Fragment10, jsx as
|
|
9185
|
+
import { Fragment as Fragment10, jsx as jsx18 } from "react/jsx-runtime";
|
|
9005
9186
|
var markdownComponents = {
|
|
9006
|
-
p: ({ node, ...props }) => /* @__PURE__ */
|
|
9007
|
-
mark: ({ node, children, ...props }) => /* @__PURE__ */
|
|
9187
|
+
p: ({ node, ...props }) => /* @__PURE__ */ jsx18("span", { ...props }),
|
|
9188
|
+
mark: ({ node, children, ...props }) => /* @__PURE__ */ jsx18("mark", { ...props, children }),
|
|
9008
9189
|
code: ({ node, children, ...props }) => {
|
|
9009
9190
|
const { inline, ...rest } = props;
|
|
9010
|
-
return inline ? /* @__PURE__ */
|
|
9191
|
+
return inline ? /* @__PURE__ */ jsx18("code", { ...rest, children }) : /* @__PURE__ */ jsx18("code", { ...rest, children });
|
|
9011
9192
|
}
|
|
9012
9193
|
};
|
|
9013
9194
|
var QuerySuggestionPicker = ({
|
|
9014
9195
|
onSend,
|
|
9015
9196
|
inputHeight
|
|
9016
9197
|
}) => {
|
|
9017
|
-
const hasGenerated =
|
|
9198
|
+
const hasGenerated = useRef12(false);
|
|
9018
9199
|
const [hasSentPrompt, setHasSentPrompt] = useState16(false);
|
|
9019
9200
|
const [examplePrompts, setExamplePrompts] = useState16([]);
|
|
9020
9201
|
const [visiblePrompts, setVisiblePrompts] = useState16([]);
|
|
9021
|
-
const scrollRef =
|
|
9022
|
-
const theme =
|
|
9202
|
+
const scrollRef = useRef12(null);
|
|
9203
|
+
const theme = useTheme14();
|
|
9023
9204
|
const isMobile = useMediaQuery6((theme2) => theme2.breakpoints.down("sm"));
|
|
9024
9205
|
const { background, text, border, hoverBackground, hoverBorder } = theme.palette.chat.suggestion;
|
|
9025
9206
|
const { getCurrentModel, isLoading } = useModelStore();
|
|
@@ -9080,8 +9261,8 @@ var QuerySuggestionPicker = ({
|
|
|
9080
9261
|
return () => clearInterval(interval);
|
|
9081
9262
|
}, [hasSentPrompt, examplePrompts.length]);
|
|
9082
9263
|
const displayPrompts = isMobile ? visiblePrompts.slice(0, Math.min(visiblePrompts.length, 6)) : visiblePrompts;
|
|
9083
|
-
return displayPrompts.length > 0 && /* @__PURE__ */
|
|
9084
|
-
|
|
9264
|
+
return displayPrompts.length > 0 && /* @__PURE__ */ jsx18(Fragment10, { children: /* @__PURE__ */ jsx18(
|
|
9265
|
+
Box15,
|
|
9085
9266
|
{
|
|
9086
9267
|
ref: scrollRef,
|
|
9087
9268
|
sx: {
|
|
@@ -9097,8 +9278,8 @@ var QuerySuggestionPicker = ({
|
|
|
9097
9278
|
pb: isMobile ? 0.4 : 0,
|
|
9098
9279
|
"&::-webkit-scrollbar": { display: "none" }
|
|
9099
9280
|
},
|
|
9100
|
-
children: displayPrompts.map((prompt, i) => /* @__PURE__ */
|
|
9101
|
-
|
|
9281
|
+
children: displayPrompts.map((prompt, i) => /* @__PURE__ */ jsx18(
|
|
9282
|
+
Box15,
|
|
9102
9283
|
{
|
|
9103
9284
|
sx: {
|
|
9104
9285
|
px: isMobile ? 1.4 : 2,
|
|
@@ -9132,8 +9313,8 @@ var QuerySuggestionPicker = ({
|
|
|
9132
9313
|
onSend(prompt, []);
|
|
9133
9314
|
setHasSentPrompt(true);
|
|
9134
9315
|
},
|
|
9135
|
-
children: /* @__PURE__ */
|
|
9136
|
-
|
|
9316
|
+
children: /* @__PURE__ */ jsx18(
|
|
9317
|
+
Box15,
|
|
9137
9318
|
{
|
|
9138
9319
|
sx: {
|
|
9139
9320
|
flex: 1,
|
|
@@ -9157,7 +9338,7 @@ var QuerySuggestionPicker = ({
|
|
|
9157
9338
|
padding: "0.1em 0.25em"
|
|
9158
9339
|
}
|
|
9159
9340
|
},
|
|
9160
|
-
children: /* @__PURE__ */
|
|
9341
|
+
children: /* @__PURE__ */ jsx18(
|
|
9161
9342
|
ReactMarkdown,
|
|
9162
9343
|
{
|
|
9163
9344
|
remarkPlugins: [remarkGfm],
|
|
@@ -9176,18 +9357,18 @@ var QuerySuggestionPicker = ({
|
|
|
9176
9357
|
};
|
|
9177
9358
|
|
|
9178
9359
|
// ../../src/pages/under-review.tsx
|
|
9179
|
-
import { Box as
|
|
9180
|
-
import { useNavigate as
|
|
9181
|
-
import { jsx as
|
|
9360
|
+
import { Box as Box16, Typography as Typography11, useTheme as useTheme15 } from "@mui/material";
|
|
9361
|
+
import { useNavigate as useNavigate3 } from "react-router-dom";
|
|
9362
|
+
import { jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
9182
9363
|
var UnderReview = () => {
|
|
9183
|
-
const theme =
|
|
9184
|
-
const navigate =
|
|
9364
|
+
const theme = useTheme15();
|
|
9365
|
+
const navigate = useNavigate3();
|
|
9185
9366
|
const handleSneakyLogout = () => {
|
|
9186
9367
|
localStorage.removeItem("authToken");
|
|
9187
9368
|
navigate("/login");
|
|
9188
9369
|
};
|
|
9189
|
-
return /* @__PURE__ */
|
|
9190
|
-
|
|
9370
|
+
return /* @__PURE__ */ jsxs15(
|
|
9371
|
+
Box16,
|
|
9191
9372
|
{
|
|
9192
9373
|
sx: {
|
|
9193
9374
|
minHeight: "100vh",
|
|
@@ -9202,8 +9383,8 @@ var UnderReview = () => {
|
|
|
9202
9383
|
position: "relative"
|
|
9203
9384
|
},
|
|
9204
9385
|
children: [
|
|
9205
|
-
/* @__PURE__ */
|
|
9206
|
-
|
|
9386
|
+
/* @__PURE__ */ jsx19(
|
|
9387
|
+
Box16,
|
|
9207
9388
|
{
|
|
9208
9389
|
onClick: handleSneakyLogout,
|
|
9209
9390
|
sx: {
|
|
@@ -9228,13 +9409,13 @@ var UnderReview = () => {
|
|
|
9228
9409
|
title: "Reset session"
|
|
9229
9410
|
}
|
|
9230
9411
|
),
|
|
9231
|
-
/* @__PURE__ */
|
|
9232
|
-
/* @__PURE__ */
|
|
9412
|
+
/* @__PURE__ */ jsx19(Typography11, { variant: "h4", sx: { mb: 2, fontWeight: 700, color: theme.palette.error.main }, children: "Under Review" }),
|
|
9413
|
+
/* @__PURE__ */ jsxs15(Typography11, { variant: "body1", sx: { mb: 2, color: theme.palette.text.secondary }, children: [
|
|
9233
9414
|
"Your request to use our services is currently being reviewed.",
|
|
9234
|
-
/* @__PURE__ */
|
|
9415
|
+
/* @__PURE__ */ jsx19("br", {}),
|
|
9235
9416
|
"For more info, please contact ",
|
|
9236
9417
|
" ",
|
|
9237
|
-
/* @__PURE__ */
|
|
9418
|
+
/* @__PURE__ */ jsx19("a", { href: "mailto:team@banditai.ai", style: { color: theme.palette.primary.main, fontWeight: 600 }, children: "team@banditai.ai" })
|
|
9238
9419
|
] })
|
|
9239
9420
|
]
|
|
9240
9421
|
}
|
|
@@ -9243,13 +9424,13 @@ var UnderReview = () => {
|
|
|
9243
9424
|
var under_review_default = UnderReview;
|
|
9244
9425
|
|
|
9245
9426
|
// src/components/ConnectionStatus.tsx
|
|
9246
|
-
import { Box as
|
|
9247
|
-
import { jsx as
|
|
9427
|
+
import { Box as Box17, Chip as Chip5, useTheme as useTheme16 } from "@mui/material";
|
|
9428
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
9248
9429
|
var ConnectionStatus = ({
|
|
9249
9430
|
showWhenGood = false,
|
|
9250
9431
|
position = "top"
|
|
9251
9432
|
}) => {
|
|
9252
|
-
const theme =
|
|
9433
|
+
const theme = useTheme16();
|
|
9253
9434
|
const { isOnline, connectionQuality, isSlowConnection } = useNetworkStatus();
|
|
9254
9435
|
if (connectionQuality === "fast" && !showWhenGood) {
|
|
9255
9436
|
return null;
|
|
@@ -9258,28 +9439,28 @@ var ConnectionStatus = ({
|
|
|
9258
9439
|
switch (connectionQuality) {
|
|
9259
9440
|
case "offline":
|
|
9260
9441
|
return {
|
|
9261
|
-
icon: /* @__PURE__ */
|
|
9442
|
+
icon: /* @__PURE__ */ jsx20(WifiOffIcon, { sx: { fontSize: 16 } }),
|
|
9262
9443
|
label: "Offline",
|
|
9263
9444
|
color: "error",
|
|
9264
9445
|
severity: "high"
|
|
9265
9446
|
};
|
|
9266
9447
|
case "slow":
|
|
9267
9448
|
return {
|
|
9268
|
-
icon: /* @__PURE__ */
|
|
9449
|
+
icon: /* @__PURE__ */ jsx20(SignalWifi2BarIcon, { sx: { fontSize: 16 } }),
|
|
9269
9450
|
label: "Slow connection",
|
|
9270
9451
|
color: "warning",
|
|
9271
9452
|
severity: "medium"
|
|
9272
9453
|
};
|
|
9273
9454
|
case "fast":
|
|
9274
9455
|
return {
|
|
9275
|
-
icon: /* @__PURE__ */
|
|
9456
|
+
icon: /* @__PURE__ */ jsx20(WifiIcon, { sx: { fontSize: 16 } }),
|
|
9276
9457
|
label: "Connected",
|
|
9277
9458
|
color: "success",
|
|
9278
9459
|
severity: "low"
|
|
9279
9460
|
};
|
|
9280
9461
|
default:
|
|
9281
9462
|
return {
|
|
9282
|
-
icon: /* @__PURE__ */
|
|
9463
|
+
icon: /* @__PURE__ */ jsx20(WifiIcon, { sx: { fontSize: 16 } }),
|
|
9283
9464
|
label: "Unknown",
|
|
9284
9465
|
color: "default",
|
|
9285
9466
|
severity: "low"
|
|
@@ -9287,8 +9468,8 @@ var ConnectionStatus = ({
|
|
|
9287
9468
|
}
|
|
9288
9469
|
};
|
|
9289
9470
|
const config = getStatusConfig();
|
|
9290
|
-
return /* @__PURE__ */
|
|
9291
|
-
|
|
9471
|
+
return /* @__PURE__ */ jsx20(
|
|
9472
|
+
Box17,
|
|
9292
9473
|
{
|
|
9293
9474
|
sx: {
|
|
9294
9475
|
position: "fixed",
|
|
@@ -9303,7 +9484,7 @@ var ConnectionStatus = ({
|
|
|
9303
9484
|
"100%": { opacity: 1 }
|
|
9304
9485
|
}
|
|
9305
9486
|
},
|
|
9306
|
-
children: /* @__PURE__ */
|
|
9487
|
+
children: /* @__PURE__ */ jsx20(
|
|
9307
9488
|
Chip5,
|
|
9308
9489
|
{
|
|
9309
9490
|
icon: config.icon,
|
|
@@ -9327,7 +9508,7 @@ var ConnectionStatus = ({
|
|
|
9327
9508
|
};
|
|
9328
9509
|
|
|
9329
9510
|
// src/hooks/useVoiceMode.ts
|
|
9330
|
-
import { useEffect as useEffect14, useRef as
|
|
9511
|
+
import { useEffect as useEffect14, useRef as useRef13 } from "react";
|
|
9331
9512
|
var RMS_BASELINE = 128;
|
|
9332
9513
|
var RMS_NORMALIZER = 128;
|
|
9333
9514
|
var computeRms = (data) => {
|
|
@@ -9357,7 +9538,7 @@ var useVoiceMode = (config) => {
|
|
|
9357
9538
|
const setError = useVoiceModeStore((state) => state.setError);
|
|
9358
9539
|
const resetTransientState = useVoiceModeStore((state) => state.resetTransientState);
|
|
9359
9540
|
const setLastTranscript = useVoiceModeStore((state) => state.setLastTranscript);
|
|
9360
|
-
const configRef =
|
|
9541
|
+
const configRef = useRef13(config);
|
|
9361
9542
|
useEffect14(() => {
|
|
9362
9543
|
configRef.current = config;
|
|
9363
9544
|
}, [config]);
|
|
@@ -9616,7 +9797,7 @@ var useVoiceMode = (config) => {
|
|
|
9616
9797
|
};
|
|
9617
9798
|
|
|
9618
9799
|
// src/chat/chat.tsx
|
|
9619
|
-
import { jsx as
|
|
9800
|
+
import { jsx as jsx21, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
9620
9801
|
var ChatContent = () => {
|
|
9621
9802
|
const packageSettings = usePackageSettingsStore((state) => state.settings);
|
|
9622
9803
|
const featureFlag = useFeatureFlag();
|
|
@@ -9677,8 +9858,8 @@ var ChatContent = () => {
|
|
|
9677
9858
|
} = useVoiceStore();
|
|
9678
9859
|
const isVoiceModeEnabled = useVoiceModeStore((state) => state.enabled);
|
|
9679
9860
|
const canvasOpen = useCanvasStore((state) => state.open);
|
|
9680
|
-
const previousVoiceModeEnabledRef =
|
|
9681
|
-
const historyRef =
|
|
9861
|
+
const previousVoiceModeEnabledRef = useRef14(isVoiceModeEnabled);
|
|
9862
|
+
const historyRef = useRef14(history);
|
|
9682
9863
|
useEffect15(() => {
|
|
9683
9864
|
historyRef.current = history;
|
|
9684
9865
|
}, [history]);
|
|
@@ -9724,9 +9905,9 @@ var ChatContent = () => {
|
|
|
9724
9905
|
}
|
|
9725
9906
|
}, [packageSettings?.gatewayApiUrl, availableVoices.length, initialized, loadVoicesFromAPI, token]);
|
|
9726
9907
|
const provider = useAIProviderStore((state) => state.provider);
|
|
9727
|
-
const inputRef =
|
|
9908
|
+
const inputRef = useRef14(null);
|
|
9728
9909
|
const [pastedImages, setPastedImages] = useState17([]);
|
|
9729
|
-
const inputContainerRef =
|
|
9910
|
+
const inputContainerRef = useRef14(null);
|
|
9730
9911
|
const [inputHeight, setInputHeight] = useState17(80);
|
|
9731
9912
|
const [isSubmitting, setIsSubmitting] = useState17(false);
|
|
9732
9913
|
const [pendingMessage, setPendingMessage] = useState17(null);
|
|
@@ -9752,17 +9933,17 @@ var ChatContent = () => {
|
|
|
9752
9933
|
const initialLogoState = history.length === 0;
|
|
9753
9934
|
const [logoVisible, setLogoVisible] = useState17(initialLogoState);
|
|
9754
9935
|
const [logoShouldRender, setLogoShouldRender] = useState17(initialLogoState);
|
|
9755
|
-
const streamingGraceUntilRef =
|
|
9936
|
+
const streamingGraceUntilRef = useRef14(0);
|
|
9756
9937
|
const GRACE_MS = 450;
|
|
9757
9938
|
const GRACE_OFFSET_DESKTOP = 28;
|
|
9758
9939
|
const GRACE_OFFSET_MOBILE = 20;
|
|
9759
|
-
const followStreamRef =
|
|
9760
|
-
const lastSpokenResponseRef =
|
|
9761
|
-
const previousConversationIdRef =
|
|
9762
|
-
const logoFadeTimeoutRef =
|
|
9940
|
+
const followStreamRef = useRef14(true);
|
|
9941
|
+
const lastSpokenResponseRef = useRef14(null);
|
|
9942
|
+
const previousConversationIdRef = useRef14(null);
|
|
9943
|
+
const logoFadeTimeoutRef = useRef14(null);
|
|
9763
9944
|
const [branding, setBranding] = useState17(null);
|
|
9764
9945
|
const [brandingLoading, setBrandingLoading] = useState17(true);
|
|
9765
|
-
const isBrandingLoadInProgressRef =
|
|
9946
|
+
const isBrandingLoadInProgressRef = useRef14(false);
|
|
9766
9947
|
const logoOnly = history.length === 0 && !brandingLoading;
|
|
9767
9948
|
useEffect15(() => {
|
|
9768
9949
|
const isEmptyConversation = (history?.length ?? 0) === 0;
|
|
@@ -10529,10 +10710,10 @@ var ChatContent = () => {
|
|
|
10529
10710
|
}
|
|
10530
10711
|
};
|
|
10531
10712
|
if (!hydrated || brandingLoading || themeLoading) {
|
|
10532
|
-
return /* @__PURE__ */
|
|
10533
|
-
/* @__PURE__ */
|
|
10534
|
-
/* @__PURE__ */
|
|
10535
|
-
|
|
10713
|
+
return /* @__PURE__ */ jsxs16(ThemeProvider, { theme: banditTheme, children: [
|
|
10714
|
+
/* @__PURE__ */ jsx21(CssBaseline, {}),
|
|
10715
|
+
/* @__PURE__ */ jsxs16(
|
|
10716
|
+
Box18,
|
|
10536
10717
|
{
|
|
10537
10718
|
sx: (theme) => ({
|
|
10538
10719
|
minHeight: "100dvh",
|
|
@@ -10545,8 +10726,8 @@ var ChatContent = () => {
|
|
|
10545
10726
|
color: theme.palette.text.primary
|
|
10546
10727
|
}),
|
|
10547
10728
|
children: [
|
|
10548
|
-
/* @__PURE__ */
|
|
10549
|
-
/* @__PURE__ */
|
|
10729
|
+
/* @__PURE__ */ jsx21(CircularProgress4, { size: 32, thickness: 4 }),
|
|
10730
|
+
/* @__PURE__ */ jsx21(Typography12, { variant: "body2", color: "text.secondary", children: "Preparing your workspace..." })
|
|
10550
10731
|
]
|
|
10551
10732
|
}
|
|
10552
10733
|
)
|
|
@@ -10554,15 +10735,15 @@ var ChatContent = () => {
|
|
|
10554
10735
|
}
|
|
10555
10736
|
const userHasAccess = playgroundBypassAccess || ossMode || claims?.roles?.includes("super-user") || claims?.roles?.includes("admin");
|
|
10556
10737
|
if (!userHasAccess) {
|
|
10557
|
-
return /* @__PURE__ */
|
|
10558
|
-
/* @__PURE__ */
|
|
10559
|
-
/* @__PURE__ */
|
|
10738
|
+
return /* @__PURE__ */ jsxs16(ThemeProvider, { theme: banditTheme, children: [
|
|
10739
|
+
/* @__PURE__ */ jsx21(CssBaseline, {}),
|
|
10740
|
+
/* @__PURE__ */ jsx21(under_review_default, {})
|
|
10560
10741
|
] });
|
|
10561
10742
|
}
|
|
10562
|
-
return /* @__PURE__ */
|
|
10563
|
-
/* @__PURE__ */
|
|
10564
|
-
/* @__PURE__ */
|
|
10565
|
-
|
|
10743
|
+
return /* @__PURE__ */ jsxs16(ThemeProvider, { theme: banditTheme, children: [
|
|
10744
|
+
/* @__PURE__ */ jsx21(CssBaseline, {}),
|
|
10745
|
+
/* @__PURE__ */ jsxs16(
|
|
10746
|
+
Box18,
|
|
10566
10747
|
{
|
|
10567
10748
|
sx: (theme) => ({
|
|
10568
10749
|
display: "flex",
|
|
@@ -10580,7 +10761,7 @@ var ChatContent = () => {
|
|
|
10580
10761
|
transition: "left 0.3s ease-in-out, width 0.3s ease-in-out"
|
|
10581
10762
|
}),
|
|
10582
10763
|
children: [
|
|
10583
|
-
/* @__PURE__ */
|
|
10764
|
+
/* @__PURE__ */ jsx21(
|
|
10584
10765
|
chat_app_bar_default,
|
|
10585
10766
|
{
|
|
10586
10767
|
availableModels,
|
|
@@ -10592,8 +10773,8 @@ var ChatContent = () => {
|
|
|
10592
10773
|
setDrawerOpen
|
|
10593
10774
|
}
|
|
10594
10775
|
),
|
|
10595
|
-
/* @__PURE__ */
|
|
10596
|
-
|
|
10776
|
+
/* @__PURE__ */ jsx21(
|
|
10777
|
+
Box18,
|
|
10597
10778
|
{
|
|
10598
10779
|
ref: chatContainerRef,
|
|
10599
10780
|
sx: {
|
|
@@ -10613,8 +10794,8 @@ var ChatContent = () => {
|
|
|
10613
10794
|
msOverflowStyle: "none",
|
|
10614
10795
|
"&::-webkit-scrollbar": { display: "none" }
|
|
10615
10796
|
},
|
|
10616
|
-
children: /* @__PURE__ */
|
|
10617
|
-
|
|
10797
|
+
children: /* @__PURE__ */ jsxs16(
|
|
10798
|
+
Box18,
|
|
10618
10799
|
{
|
|
10619
10800
|
sx: {
|
|
10620
10801
|
width: "100%",
|
|
@@ -10624,9 +10805,9 @@ var ChatContent = () => {
|
|
|
10624
10805
|
pt: 2
|
|
10625
10806
|
},
|
|
10626
10807
|
children: [
|
|
10627
|
-
logoShouldRender && !brandingLoading && (branding?.logoBase64 ? /* @__PURE__ */
|
|
10628
|
-
/* @__PURE__ */
|
|
10629
|
-
|
|
10808
|
+
logoShouldRender && !brandingLoading && (branding?.logoBase64 ? /* @__PURE__ */ jsx21(custom_logo_default, { visible: logoVisible, atTop: true }) : /* @__PURE__ */ jsx21(bandit_chat_logo_default, { visible: logoVisible, atTop: true })),
|
|
10809
|
+
/* @__PURE__ */ jsx21(
|
|
10810
|
+
Box18,
|
|
10630
10811
|
{
|
|
10631
10812
|
sx: {
|
|
10632
10813
|
margin: "0 auto",
|
|
@@ -10635,7 +10816,7 @@ var ChatContent = () => {
|
|
|
10635
10816
|
flexShrink: 0,
|
|
10636
10817
|
px: isMobile ? 0 : 0
|
|
10637
10818
|
},
|
|
10638
|
-
children: /* @__PURE__ */
|
|
10819
|
+
children: /* @__PURE__ */ jsx21(
|
|
10639
10820
|
chat_messages_default,
|
|
10640
10821
|
{
|
|
10641
10822
|
isStreaming,
|
|
@@ -10659,7 +10840,7 @@ var ChatContent = () => {
|
|
|
10659
10840
|
)
|
|
10660
10841
|
}
|
|
10661
10842
|
),
|
|
10662
|
-
showScrollToBottom && /* @__PURE__ */
|
|
10843
|
+
showScrollToBottom && /* @__PURE__ */ jsx21(
|
|
10663
10844
|
chat_scroll_to_bottom_button_default,
|
|
10664
10845
|
{
|
|
10665
10846
|
inputHeight,
|
|
@@ -10668,8 +10849,8 @@ var ChatContent = () => {
|
|
|
10668
10849
|
onClick: handleScrollToBottomClick
|
|
10669
10850
|
}
|
|
10670
10851
|
),
|
|
10671
|
-
history.length === 0 && componentStatus !== "Loading" && !isMobile && /* @__PURE__ */
|
|
10672
|
-
|
|
10852
|
+
history.length === 0 && componentStatus !== "Loading" && !isMobile && /* @__PURE__ */ jsx21(
|
|
10853
|
+
Box18,
|
|
10673
10854
|
{
|
|
10674
10855
|
sx: (theme) => ({
|
|
10675
10856
|
position: "absolute",
|
|
@@ -10687,8 +10868,8 @@ var ChatContent = () => {
|
|
|
10687
10868
|
})
|
|
10688
10869
|
}
|
|
10689
10870
|
),
|
|
10690
|
-
/* @__PURE__ */
|
|
10691
|
-
|
|
10871
|
+
/* @__PURE__ */ jsxs16(
|
|
10872
|
+
Box18,
|
|
10692
10873
|
{
|
|
10693
10874
|
sx: {
|
|
10694
10875
|
display: "flex",
|
|
@@ -10699,10 +10880,11 @@ var ChatContent = () => {
|
|
|
10699
10880
|
maxWidth: "768px"
|
|
10700
10881
|
},
|
|
10701
10882
|
children: [
|
|
10702
|
-
/* @__PURE__ */
|
|
10703
|
-
history.length === 0 && componentStatus !== "Loading" && !pendingMessage && preferences.chatSuggestionsEnabled && /* @__PURE__ */
|
|
10704
|
-
/* @__PURE__ */
|
|
10705
|
-
/* @__PURE__ */
|
|
10883
|
+
/* @__PURE__ */ jsx21(Box18, { sx: { flex: "1 1 auto" } }),
|
|
10884
|
+
history.length === 0 && componentStatus !== "Loading" && !pendingMessage && preferences.chatSuggestionsEnabled && /* @__PURE__ */ jsx21(Box18, { sx: { marginBottom: "20px" }, children: /* @__PURE__ */ jsx21(QuerySuggestionPicker, { onSend: handleSend, inputHeight }) }),
|
|
10885
|
+
/* @__PURE__ */ jsx21(rate_limit_prompt_default, {}),
|
|
10886
|
+
/* @__PURE__ */ jsx21(ask_user_card_default, {}),
|
|
10887
|
+
/* @__PURE__ */ jsx21(
|
|
10706
10888
|
chat_input_default,
|
|
10707
10889
|
{
|
|
10708
10890
|
inputValue,
|
|
@@ -10729,7 +10911,7 @@ var ChatContent = () => {
|
|
|
10729
10911
|
]
|
|
10730
10912
|
}
|
|
10731
10913
|
),
|
|
10732
|
-
preferences.feedbackEnabled && !isMobile && /* @__PURE__ */
|
|
10914
|
+
preferences.feedbackEnabled && !isMobile && /* @__PURE__ */ jsx21(
|
|
10733
10915
|
FeedbackButton,
|
|
10734
10916
|
{
|
|
10735
10917
|
fullScreen: false,
|
|
@@ -10742,11 +10924,11 @@ var ChatContent = () => {
|
|
|
10742
10924
|
}
|
|
10743
10925
|
}
|
|
10744
10926
|
),
|
|
10745
|
-
/* @__PURE__ */
|
|
10927
|
+
/* @__PURE__ */ jsx21(ConnectionStatus, { position: "top", showWhenGood: false })
|
|
10746
10928
|
]
|
|
10747
10929
|
}
|
|
10748
10930
|
),
|
|
10749
|
-
/* @__PURE__ */
|
|
10931
|
+
/* @__PURE__ */ jsx21(canvas_panel_default, { isMobile })
|
|
10750
10932
|
] });
|
|
10751
10933
|
};
|
|
10752
10934
|
var Chat = () => {
|
|
@@ -10772,13 +10954,13 @@ var Chat = () => {
|
|
|
10772
10954
|
});
|
|
10773
10955
|
if (!allowUnauthenticated && !bypassAuth && !authenticationService.isAuthenticated()) {
|
|
10774
10956
|
debugLogger.debug("User is not authenticated, redirecting to login");
|
|
10775
|
-
return /* @__PURE__ */
|
|
10957
|
+
return /* @__PURE__ */ jsx21(Navigate, { to: "/login", replace: true });
|
|
10776
10958
|
}
|
|
10777
|
-
return /* @__PURE__ */
|
|
10959
|
+
return /* @__PURE__ */ jsx21(ChatContent, {});
|
|
10778
10960
|
};
|
|
10779
10961
|
var chat_default = Chat;
|
|
10780
10962
|
|
|
10781
10963
|
export {
|
|
10782
10964
|
chat_default
|
|
10783
10965
|
};
|
|
10784
|
-
//# sourceMappingURL=chunk-
|
|
10966
|
+
//# sourceMappingURL=chunk-32R7DYFL.mjs.map
|