@burtson-labs/bandit-engine 2.0.89 → 2.0.92
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-NRUN7HOH.mjs → chat-L3VMBI6A.mjs} +4 -4
- package/dist/{chunk-BDD6YEWH.mjs → chunk-AGT77Z3A.mjs} +2 -2
- package/dist/{chunk-GAOJ4PB2.mjs → chunk-AS6WS4H2.mjs} +5 -5
- package/dist/{chunk-4VTF3MY4.mjs → chunk-IVLVUNIB.mjs} +44 -7
- package/dist/chunk-IVLVUNIB.mjs.map +1 -0
- package/dist/{chunk-PROLD2QV.mjs → chunk-JJNPBLJ7.mjs} +999 -793
- package/dist/chunk-JJNPBLJ7.mjs.map +1 -0
- package/dist/{chunk-OB2W4OR4.mjs → chunk-RUMVTVNM.mjs} +2 -2
- package/dist/index.js +7532 -7283
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -5
- package/dist/management/management.js +1379 -1130
- package/dist/management/management.js.map +1 -1
- package/dist/management/management.mjs +4 -4
- package/dist/modals/chat-modal/chat-modal.js +36 -0
- package/dist/modals/chat-modal/chat-modal.js.map +1 -1
- package/dist/modals/chat-modal/chat-modal.mjs +2 -2
- package/package.json +1 -1
- package/dist/chunk-4VTF3MY4.mjs.map +0 -1
- package/dist/chunk-PROLD2QV.mjs.map +0 -1
- /package/dist/{chat-NRUN7HOH.mjs.map → chat-L3VMBI6A.mjs.map} +0 -0
- /package/dist/{chunk-BDD6YEWH.mjs.map → chunk-AGT77Z3A.mjs.map} +0 -0
- /package/dist/{chunk-GAOJ4PB2.mjs.map → chunk-AS6WS4H2.mjs.map} +0 -0
- /package/dist/{chunk-OB2W4OR4.mjs.map → chunk-RUMVTVNM.mjs.map} +0 -0
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-ONQMRE2G.mjs";
|
|
4
4
|
import {
|
|
5
5
|
StreamingMarkdown_default
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-RUMVTVNM.mjs";
|
|
7
7
|
import {
|
|
8
8
|
useMCPToolsStore
|
|
9
9
|
} from "./chunk-L2EKYO4F.mjs";
|
|
@@ -40,10 +40,11 @@ import {
|
|
|
40
40
|
sanitizeForTTS,
|
|
41
41
|
stopTTS,
|
|
42
42
|
themeMap_default,
|
|
43
|
+
useCanvasStore,
|
|
43
44
|
useNotificationService,
|
|
44
45
|
useTTS,
|
|
45
46
|
useVoiceStore
|
|
46
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-IVLVUNIB.mjs";
|
|
47
48
|
import {
|
|
48
49
|
authenticationService,
|
|
49
50
|
brandingService_default,
|
|
@@ -85,7 +86,7 @@ import {
|
|
|
85
86
|
} from "./chunk-KCI46M23.mjs";
|
|
86
87
|
|
|
87
88
|
// src/chat/chat.tsx
|
|
88
|
-
import { useCallback as useCallback6, useEffect as useEffect15, useLayoutEffect, useMemo as useMemo4, useRef as useRef13, useState as
|
|
89
|
+
import { useCallback as useCallback6, useEffect as useEffect15, useLayoutEffect, useMemo as useMemo4, useRef as useRef13, useState as useState17 } from "react";
|
|
89
90
|
|
|
90
91
|
// src/chat/custom-logo.tsx
|
|
91
92
|
import React, { useEffect } from "react";
|
|
@@ -172,13 +173,165 @@ var Logo = ({ visible, atTop = false }) => {
|
|
|
172
173
|
var custom_logo_default = Logo;
|
|
173
174
|
|
|
174
175
|
// src/chat/chat.tsx
|
|
175
|
-
import { Box as
|
|
176
|
+
import { Box as Box17, ThemeProvider, CssBaseline, CircularProgress as CircularProgress4, Typography as Typography11 } from "@mui/material";
|
|
176
177
|
import { createTheme } from "@mui/material/styles";
|
|
178
|
+
|
|
179
|
+
// src/chat/canvas-panel.tsx
|
|
180
|
+
import { useState } from "react";
|
|
181
|
+
import { Box as Box2, Dialog, IconButton, Tab, Tabs, TextField, Tooltip } from "@mui/material";
|
|
182
|
+
import {
|
|
183
|
+
X as CloseIcon2,
|
|
184
|
+
Copy as CopyIcon,
|
|
185
|
+
Check as CheckIcon2,
|
|
186
|
+
Download as DownloadIcon,
|
|
187
|
+
Eye as PreviewIcon,
|
|
188
|
+
Pencil as EditIcon
|
|
189
|
+
} from "lucide-react";
|
|
190
|
+
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
191
|
+
var CANVAS_WIDTH = "min(46vw, 760px)";
|
|
192
|
+
var CanvasBody = () => {
|
|
193
|
+
const { content, title, language, setContent, setTitle, close } = useCanvasStore();
|
|
194
|
+
const [tab, setTab] = useState("edit");
|
|
195
|
+
const [copied, setCopied] = useState(false);
|
|
196
|
+
const copy = async () => {
|
|
197
|
+
try {
|
|
198
|
+
await navigator.clipboard.writeText(content);
|
|
199
|
+
setCopied(true);
|
|
200
|
+
setTimeout(() => setCopied(false), 1500);
|
|
201
|
+
} catch {
|
|
202
|
+
}
|
|
203
|
+
};
|
|
204
|
+
const download = () => {
|
|
205
|
+
const safe = (title || "canvas").replace(/[^\w.-]+/g, "_") || "canvas";
|
|
206
|
+
const ext = language ? language : "md";
|
|
207
|
+
const blob = new Blob([content], { type: "text/plain;charset=utf-8" });
|
|
208
|
+
const url = URL.createObjectURL(blob);
|
|
209
|
+
const a = document.createElement("a");
|
|
210
|
+
a.href = url;
|
|
211
|
+
a.download = `${safe}.${ext}`;
|
|
212
|
+
a.click();
|
|
213
|
+
URL.revokeObjectURL(url);
|
|
214
|
+
};
|
|
215
|
+
return /* @__PURE__ */ jsxs(Box2, { sx: { display: "flex", flexDirection: "column", height: "100%", bgcolor: "background.paper" }, children: [
|
|
216
|
+
/* @__PURE__ */ jsxs(
|
|
217
|
+
Box2,
|
|
218
|
+
{
|
|
219
|
+
sx: {
|
|
220
|
+
display: "flex",
|
|
221
|
+
alignItems: "center",
|
|
222
|
+
gap: 0.5,
|
|
223
|
+
px: 1.5,
|
|
224
|
+
py: 1,
|
|
225
|
+
borderBottom: "1px solid",
|
|
226
|
+
borderColor: "divider",
|
|
227
|
+
flexShrink: 0
|
|
228
|
+
},
|
|
229
|
+
children: [
|
|
230
|
+
/* @__PURE__ */ jsx2(
|
|
231
|
+
TextField,
|
|
232
|
+
{
|
|
233
|
+
value: title,
|
|
234
|
+
onChange: (e) => setTitle(e.target.value),
|
|
235
|
+
variant: "standard",
|
|
236
|
+
placeholder: "Untitled",
|
|
237
|
+
InputProps: { disableUnderline: true, sx: { fontWeight: 700, fontSize: 15 } },
|
|
238
|
+
sx: { flex: 1, minWidth: 0 }
|
|
239
|
+
}
|
|
240
|
+
),
|
|
241
|
+
/* @__PURE__ */ jsx2(Tooltip, { title: copied ? "Copied" : "Copy", arrow: true, children: /* @__PURE__ */ jsx2(IconButton, { size: "small", onClick: copy, "aria-label": "Copy canvas", children: copied ? /* @__PURE__ */ jsx2(CheckIcon2, { size: 16 }) : /* @__PURE__ */ jsx2(CopyIcon, { size: 16 }) }) }),
|
|
242
|
+
/* @__PURE__ */ jsx2(Tooltip, { title: `Download .${language || "md"}`, arrow: true, children: /* @__PURE__ */ jsx2(IconButton, { size: "small", onClick: download, "aria-label": "Download canvas", children: /* @__PURE__ */ jsx2(DownloadIcon, { size: 16 }) }) }),
|
|
243
|
+
/* @__PURE__ */ jsx2(Tooltip, { title: "Close canvas", arrow: true, children: /* @__PURE__ */ jsx2(IconButton, { size: "small", onClick: close, "aria-label": "Close canvas", children: /* @__PURE__ */ jsx2(CloseIcon2, { size: 18 }) }) })
|
|
244
|
+
]
|
|
245
|
+
}
|
|
246
|
+
),
|
|
247
|
+
/* @__PURE__ */ jsxs(
|
|
248
|
+
Tabs,
|
|
249
|
+
{
|
|
250
|
+
value: tab,
|
|
251
|
+
onChange: (_, v) => setTab(v),
|
|
252
|
+
variant: "fullWidth",
|
|
253
|
+
sx: {
|
|
254
|
+
minHeight: 40,
|
|
255
|
+
borderBottom: "1px solid",
|
|
256
|
+
borderColor: "divider",
|
|
257
|
+
flexShrink: 0,
|
|
258
|
+
"& .MuiTab-root": { minHeight: 40, textTransform: "none", fontWeight: 600 }
|
|
259
|
+
},
|
|
260
|
+
children: [
|
|
261
|
+
/* @__PURE__ */ jsx2(Tab, { value: "edit", label: "Edit", icon: /* @__PURE__ */ jsx2(EditIcon, { size: 14 }), iconPosition: "start" }),
|
|
262
|
+
/* @__PURE__ */ jsx2(Tab, { value: "preview", label: "Preview", icon: /* @__PURE__ */ jsx2(PreviewIcon, { size: 14 }), iconPosition: "start" })
|
|
263
|
+
]
|
|
264
|
+
}
|
|
265
|
+
),
|
|
266
|
+
/* @__PURE__ */ jsx2(Box2, { sx: { flex: 1, overflow: "auto", minHeight: 0 }, children: tab === "edit" ? /* @__PURE__ */ jsx2(
|
|
267
|
+
Box2,
|
|
268
|
+
{
|
|
269
|
+
component: "textarea",
|
|
270
|
+
value: content,
|
|
271
|
+
onChange: (e) => setContent(e.target.value),
|
|
272
|
+
spellCheck: false,
|
|
273
|
+
placeholder: "Write or edit here\u2026",
|
|
274
|
+
sx: {
|
|
275
|
+
width: "100%",
|
|
276
|
+
height: "100%",
|
|
277
|
+
boxSizing: "border-box",
|
|
278
|
+
border: 0,
|
|
279
|
+
outline: 0,
|
|
280
|
+
resize: "none",
|
|
281
|
+
p: 2,
|
|
282
|
+
bgcolor: "transparent",
|
|
283
|
+
color: "text.primary",
|
|
284
|
+
fontFamily: language ? "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" : "inherit",
|
|
285
|
+
fontSize: 14,
|
|
286
|
+
lineHeight: 1.6
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
) : /* @__PURE__ */ jsx2(Box2, { sx: { p: 2 }, children: /* @__PURE__ */ jsx2(StreamingMarkdown_default, { content, isStreaming: false }) }) })
|
|
290
|
+
] });
|
|
291
|
+
};
|
|
292
|
+
var CanvasPanel = ({ isMobile }) => {
|
|
293
|
+
const open = useCanvasStore((s) => s.open);
|
|
294
|
+
const close = useCanvasStore((s) => s.close);
|
|
295
|
+
if (!open) return null;
|
|
296
|
+
if (isMobile) {
|
|
297
|
+
return /* @__PURE__ */ jsx2(
|
|
298
|
+
Dialog,
|
|
299
|
+
{
|
|
300
|
+
fullScreen: true,
|
|
301
|
+
open,
|
|
302
|
+
onClose: close,
|
|
303
|
+
slotProps: { paper: { sx: { bgcolor: "background.paper" } } },
|
|
304
|
+
children: /* @__PURE__ */ jsx2(CanvasBody, {})
|
|
305
|
+
}
|
|
306
|
+
);
|
|
307
|
+
}
|
|
308
|
+
return /* @__PURE__ */ jsx2(
|
|
309
|
+
Box2,
|
|
310
|
+
{
|
|
311
|
+
sx: (theme) => ({
|
|
312
|
+
position: "fixed",
|
|
313
|
+
top: 0,
|
|
314
|
+
right: 0,
|
|
315
|
+
bottom: 0,
|
|
316
|
+
width: CANVAS_WIDTH,
|
|
317
|
+
zIndex: 1,
|
|
318
|
+
borderLeft: "1px solid",
|
|
319
|
+
borderColor: "divider",
|
|
320
|
+
boxShadow: "-8px 0 28px rgba(0,0,0,0.22)",
|
|
321
|
+
bgcolor: theme.palette.background.paper
|
|
322
|
+
}),
|
|
323
|
+
children: /* @__PURE__ */ jsx2(CanvasBody, {})
|
|
324
|
+
}
|
|
325
|
+
);
|
|
326
|
+
};
|
|
327
|
+
var canvas_panel_default = CanvasPanel;
|
|
328
|
+
|
|
329
|
+
// src/chat/chat.tsx
|
|
177
330
|
import { Navigate } from "react-router-dom";
|
|
178
331
|
|
|
179
332
|
// src/chat/chat-scroll-to-bottom-button.tsx
|
|
180
|
-
import { IconButton } from "@mui/material";
|
|
181
|
-
import { jsx as
|
|
333
|
+
import { IconButton as IconButton2 } from "@mui/material";
|
|
334
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
182
335
|
var ChatScrollToBottomButton = ({
|
|
183
336
|
inputHeight,
|
|
184
337
|
onClick,
|
|
@@ -187,8 +340,8 @@ var ChatScrollToBottomButton = ({
|
|
|
187
340
|
}) => {
|
|
188
341
|
const verticalBuffer = isMobile ? 44 : 80;
|
|
189
342
|
const bottomOffset = Math.max(inputHeight + verticalBuffer, verticalBuffer + 72);
|
|
190
|
-
return /* @__PURE__ */
|
|
191
|
-
|
|
343
|
+
return /* @__PURE__ */ jsx3(
|
|
344
|
+
IconButton2,
|
|
192
345
|
{
|
|
193
346
|
onClick,
|
|
194
347
|
sx: {
|
|
@@ -210,22 +363,22 @@ var ChatScrollToBottomButton = ({
|
|
|
210
363
|
transform: "translateX(-50%) translateY(1px)"
|
|
211
364
|
}
|
|
212
365
|
},
|
|
213
|
-
children: /* @__PURE__ */
|
|
366
|
+
children: /* @__PURE__ */ jsx3(ArrowDownwardIcon, { sx: { color: "inherit" } })
|
|
214
367
|
}
|
|
215
368
|
);
|
|
216
369
|
};
|
|
217
370
|
var chat_scroll_to_bottom_button_default = ChatScrollToBottomButton;
|
|
218
371
|
|
|
219
372
|
// src/chat/bandit-chat-logo.tsx
|
|
220
|
-
import { useEffect as useEffect2, useState } from "react";
|
|
373
|
+
import { useEffect as useEffect2, useState as useState2 } from "react";
|
|
221
374
|
import { useTheme as useTheme2 } from "@mui/material/styles";
|
|
222
|
-
import { jsx as
|
|
375
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
223
376
|
var darkLogo = "https://cdn.burtson.ai/logos/bandit-ai-logo-simple.png";
|
|
224
377
|
var lightLogo = "https://cdn.burtson.ai/logos/bandit-ai-logo-simple-alt.png";
|
|
225
378
|
var BanditChatLogo = ({ atTop = false, visible = false }) => {
|
|
226
379
|
const theme = useTheme2();
|
|
227
380
|
const logoUrl = theme.palette.mode === "light" ? lightLogo : darkLogo;
|
|
228
|
-
const [isVisible, setIsVisible] =
|
|
381
|
+
const [isVisible, setIsVisible] = useState2(false);
|
|
229
382
|
useEffect2(() => {
|
|
230
383
|
if (visible) {
|
|
231
384
|
const timeout = setTimeout(() => setIsVisible(true), 50);
|
|
@@ -235,7 +388,7 @@ var BanditChatLogo = ({ atTop = false, visible = false }) => {
|
|
|
235
388
|
}, [visible]);
|
|
236
389
|
const backgroundStyle = { backgroundImage: `url(${logoUrl})` };
|
|
237
390
|
const className = `bandit-logo ${isVisible ? "bandit-logo-visible" : "bandit-logo-hidden"}`;
|
|
238
|
-
return /* @__PURE__ */
|
|
391
|
+
return /* @__PURE__ */ jsx4("div", { className: "bandit-logo-container", style: atTop ? { alignItems: "flex-start" } : void 0, children: /* @__PURE__ */ jsx4(
|
|
239
392
|
"div",
|
|
240
393
|
{
|
|
241
394
|
className,
|
|
@@ -249,12 +402,12 @@ var BanditChatLogo = ({ atTop = false, visible = false }) => {
|
|
|
249
402
|
var bandit_chat_logo_default = BanditChatLogo;
|
|
250
403
|
|
|
251
404
|
// src/chat/chat-messages.tsx
|
|
252
|
-
import { Box as
|
|
405
|
+
import { Box as Box4 } from "@mui/material";
|
|
253
406
|
|
|
254
407
|
// src/chat/source-chips.tsx
|
|
255
|
-
import { useMemo, useState as
|
|
256
|
-
import { Box as
|
|
257
|
-
import { jsx as
|
|
408
|
+
import { useMemo, useState as useState3 } from "react";
|
|
409
|
+
import { Box as Box3, Tooltip as Tooltip2 } from "@mui/material";
|
|
410
|
+
import { Fragment as Fragment2, jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
258
411
|
var parseWebSources = (content) => {
|
|
259
412
|
if (!content) return [];
|
|
260
413
|
const idx = content.lastIndexOf("**Sources**");
|
|
@@ -291,91 +444,142 @@ var domainOf = (url) => {
|
|
|
291
444
|
}
|
|
292
445
|
};
|
|
293
446
|
var SourceChip = ({ source }) => {
|
|
294
|
-
const [failed, setFailed] =
|
|
447
|
+
const [failed, setFailed] = useState3(false);
|
|
295
448
|
const domain = domainOf(source.url);
|
|
296
449
|
const label = source.title?.trim() || domain;
|
|
297
|
-
return /* @__PURE__ */
|
|
298
|
-
|
|
450
|
+
return /* @__PURE__ */ jsx5(
|
|
451
|
+
Tooltip2,
|
|
299
452
|
{
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
453
|
+
title: /* @__PURE__ */ jsxs2(Fragment2, { children: [
|
|
454
|
+
/* @__PURE__ */ jsx5(Box3, { sx: { fontWeight: 600 }, children: label }),
|
|
455
|
+
/* @__PURE__ */ jsx5(Box3, { sx: { opacity: 0.75, fontSize: 11, wordBreak: "break-all", mt: 0.25 }, children: source.url })
|
|
456
|
+
] }),
|
|
457
|
+
arrow: true,
|
|
458
|
+
children: /* @__PURE__ */ jsxs2(
|
|
459
|
+
Box3,
|
|
460
|
+
{
|
|
461
|
+
component: "a",
|
|
462
|
+
href: source.url,
|
|
463
|
+
target: "_blank",
|
|
464
|
+
rel: "noopener noreferrer",
|
|
465
|
+
className: "source-chip",
|
|
466
|
+
sx: {
|
|
467
|
+
display: "inline-flex",
|
|
468
|
+
alignItems: "center",
|
|
469
|
+
flexShrink: 0,
|
|
470
|
+
height: 26,
|
|
471
|
+
px: 0.4,
|
|
472
|
+
borderRadius: 999,
|
|
473
|
+
border: "1px solid",
|
|
474
|
+
borderColor: "divider",
|
|
475
|
+
bgcolor: "background.paper",
|
|
476
|
+
textDecoration: "none",
|
|
477
|
+
color: "text.primary",
|
|
478
|
+
fontSize: 12.5,
|
|
479
|
+
lineHeight: 1.4,
|
|
480
|
+
transition: "border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease",
|
|
481
|
+
"&:hover": { borderColor: "primary.main", bgcolor: "action.hover", boxShadow: 1, zIndex: 2 }
|
|
482
|
+
},
|
|
483
|
+
children: [
|
|
484
|
+
failed ? /* @__PURE__ */ jsx5(
|
|
485
|
+
Box3,
|
|
486
|
+
{
|
|
487
|
+
sx: {
|
|
488
|
+
width: 18,
|
|
489
|
+
height: 18,
|
|
490
|
+
borderRadius: "50%",
|
|
491
|
+
bgcolor: "primary.main",
|
|
492
|
+
color: "primary.contrastText",
|
|
493
|
+
display: "grid",
|
|
494
|
+
placeItems: "center",
|
|
495
|
+
fontSize: 9,
|
|
496
|
+
fontWeight: 700,
|
|
497
|
+
flexShrink: 0
|
|
498
|
+
},
|
|
499
|
+
children: domain.charAt(0).toUpperCase()
|
|
500
|
+
}
|
|
501
|
+
) : /* @__PURE__ */ jsx5(
|
|
502
|
+
Box3,
|
|
503
|
+
{
|
|
504
|
+
component: "img",
|
|
505
|
+
src: `https://icons.duckduckgo.com/ip3/${domain}.ico`,
|
|
506
|
+
alt: "",
|
|
507
|
+
loading: "lazy",
|
|
508
|
+
onError: () => setFailed(true),
|
|
509
|
+
sx: { width: 18, height: 18, borderRadius: "50%", flexShrink: 0 }
|
|
510
|
+
}
|
|
511
|
+
),
|
|
512
|
+
/* @__PURE__ */ jsx5(
|
|
513
|
+
Box3,
|
|
514
|
+
{
|
|
515
|
+
className: "chip-label",
|
|
516
|
+
component: "span",
|
|
517
|
+
sx: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" },
|
|
518
|
+
children: label
|
|
519
|
+
}
|
|
520
|
+
)
|
|
521
|
+
]
|
|
522
|
+
}
|
|
523
|
+
)
|
|
360
524
|
}
|
|
361
|
-
)
|
|
525
|
+
);
|
|
362
526
|
};
|
|
363
527
|
var SourceChips = ({ content }) => {
|
|
364
528
|
const sources = useMemo(() => parseWebSources(content), [content]);
|
|
365
529
|
if (sources.length === 0) return null;
|
|
366
|
-
return /* @__PURE__ */
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
530
|
+
return /* @__PURE__ */ jsxs2(Box3, { sx: { display: "flex", alignItems: "center", gap: 0.75, mt: 1.5, flexWrap: "wrap" }, "aria-label": "Sources", children: [
|
|
531
|
+
/* @__PURE__ */ jsx5(
|
|
532
|
+
Box3,
|
|
533
|
+
{
|
|
534
|
+
component: "span",
|
|
535
|
+
sx: {
|
|
536
|
+
fontSize: 11,
|
|
537
|
+
fontWeight: 700,
|
|
538
|
+
color: "text.secondary",
|
|
539
|
+
textTransform: "uppercase",
|
|
540
|
+
letterSpacing: 0.5,
|
|
541
|
+
flexShrink: 0
|
|
542
|
+
},
|
|
543
|
+
children: "Sources"
|
|
544
|
+
}
|
|
545
|
+
),
|
|
546
|
+
/* @__PURE__ */ jsx5(
|
|
547
|
+
Box3,
|
|
548
|
+
{
|
|
549
|
+
sx: {
|
|
550
|
+
display: "flex",
|
|
551
|
+
alignItems: "center",
|
|
552
|
+
flexWrap: "wrap",
|
|
553
|
+
rowGap: 0.5,
|
|
554
|
+
// Touch / no-hover devices: chips stay expanded (no hover to reveal).
|
|
555
|
+
"& .source-chip": { ml: "4px" },
|
|
556
|
+
"& .source-chip:first-of-type": { ml: 0 },
|
|
557
|
+
"& .chip-label": { maxWidth: 200, opacity: 1, ml: 0.6 },
|
|
558
|
+
// Hover-capable devices: collapse into an overlapping favicon stack
|
|
559
|
+
// that spreads out and reveals titles when the rail is hovered.
|
|
560
|
+
"@media (hover: hover)": {
|
|
561
|
+
"& .source-chip": { ml: "-10px", transition: "margin-left 0.22s ease" },
|
|
562
|
+
"& .source-chip:first-of-type": { ml: 0 },
|
|
563
|
+
"& .chip-label": {
|
|
564
|
+
maxWidth: 0,
|
|
565
|
+
opacity: 0,
|
|
566
|
+
ml: 0,
|
|
567
|
+
transition: "max-width 0.28s ease, opacity 0.18s ease, margin-left 0.2s ease"
|
|
568
|
+
},
|
|
569
|
+
"&:hover .source-chip": { ml: "6px" },
|
|
570
|
+
"&:hover .source-chip:first-of-type": { ml: 0 },
|
|
571
|
+
"&:hover .chip-label": { maxWidth: 200, opacity: 1, ml: 0.6 }
|
|
572
|
+
}
|
|
573
|
+
},
|
|
574
|
+
children: sources.map((s, i) => /* @__PURE__ */ jsx5(SourceChip, { source: s }, `${s.url}-${i}`))
|
|
575
|
+
}
|
|
576
|
+
)
|
|
577
|
+
] });
|
|
374
578
|
};
|
|
375
579
|
var source_chips_default = SourceChips;
|
|
376
580
|
|
|
377
581
|
// src/chat/chat-messages.tsx
|
|
378
|
-
import { jsx as
|
|
582
|
+
import { jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
379
583
|
var ChatMessages = ({
|
|
380
584
|
pendingMessage,
|
|
381
585
|
streamBuffer,
|
|
@@ -395,7 +599,7 @@ var ChatMessages = ({
|
|
|
395
599
|
const lastIndex = history.length - 1;
|
|
396
600
|
const hasActivePlaceholder = lastIndex >= 0 && history[lastIndex]?.answer === "...";
|
|
397
601
|
if (!responseStarted && !pendingMessage && history.length === 0) return null;
|
|
398
|
-
return /* @__PURE__ */
|
|
602
|
+
return /* @__PURE__ */ jsxs3(Box4, { sx: { px: isMobile ? 0 : 0, pt: "100px", display: "flex", flexDirection: "column", gap: 2 }, children: [
|
|
399
603
|
history.map((entry, index) => {
|
|
400
604
|
const isLast = index === lastIndex;
|
|
401
605
|
const isPlaceholder = entry.answer === "...";
|
|
@@ -404,8 +608,8 @@ var ChatMessages = ({
|
|
|
404
608
|
const content = isLast ? isStreaming ? streamBuffer || "" : isPlaceholder ? "" : entry.answer : entry.answer;
|
|
405
609
|
const rawSources = entry.sourceFiles;
|
|
406
610
|
const sourceSummaries = rawSources ? rawSources.filter((doc) => doc && typeof doc.name === "string" && doc.name.trim()).map((doc) => ({ id: doc.id || doc.name, name: doc.name.trim() })) : void 0;
|
|
407
|
-
const responseNode = /* @__PURE__ */
|
|
408
|
-
|
|
611
|
+
const responseNode = /* @__PURE__ */ jsxs3(
|
|
612
|
+
Box4,
|
|
409
613
|
{
|
|
410
614
|
sx: {
|
|
411
615
|
minHeight: isLast ? isMobile ? "80px" : "60px" : void 0,
|
|
@@ -414,8 +618,8 @@ var ChatMessages = ({
|
|
|
414
618
|
transition: "min-height 0.25s cubic-bezier(0.4, 0, 0.2, 1)"
|
|
415
619
|
},
|
|
416
620
|
children: [
|
|
417
|
-
/* @__PURE__ */
|
|
418
|
-
|
|
621
|
+
/* @__PURE__ */ jsx6(
|
|
622
|
+
Box4,
|
|
419
623
|
{
|
|
420
624
|
sx: {
|
|
421
625
|
position: showLoader ? "static" : "absolute",
|
|
@@ -428,14 +632,14 @@ var ChatMessages = ({
|
|
|
428
632
|
pointerEvents: showLoader ? "auto" : "none",
|
|
429
633
|
zIndex: showLoader ? 1 : 0
|
|
430
634
|
},
|
|
431
|
-
children: /* @__PURE__ */
|
|
432
|
-
/* @__PURE__ */
|
|
433
|
-
/* @__PURE__ */
|
|
434
|
-
/* @__PURE__ */
|
|
435
|
-
/* @__PURE__ */
|
|
635
|
+
children: /* @__PURE__ */ jsxs3(Box4, { sx: { display: "flex", alignItems: "center", gap: 1, minHeight: "40px", pl: 2 }, children: [
|
|
636
|
+
/* @__PURE__ */ jsxs3("div", { className: "typing-only", children: [
|
|
637
|
+
/* @__PURE__ */ jsx6("span", { className: "dot" }),
|
|
638
|
+
/* @__PURE__ */ jsx6("span", { className: "dot" }),
|
|
639
|
+
/* @__PURE__ */ jsx6("span", { className: "dot" })
|
|
436
640
|
] }),
|
|
437
|
-
showThinking && /* @__PURE__ */
|
|
438
|
-
|
|
641
|
+
showThinking && /* @__PURE__ */ jsx6(
|
|
642
|
+
Box4,
|
|
439
643
|
{
|
|
440
644
|
component: "span",
|
|
441
645
|
sx: {
|
|
@@ -451,8 +655,8 @@ var ChatMessages = ({
|
|
|
451
655
|
] })
|
|
452
656
|
}
|
|
453
657
|
),
|
|
454
|
-
/* @__PURE__ */
|
|
455
|
-
|
|
658
|
+
/* @__PURE__ */ jsxs3(
|
|
659
|
+
Box4,
|
|
456
660
|
{
|
|
457
661
|
sx: {
|
|
458
662
|
position: showLoader ? "absolute" : "static",
|
|
@@ -466,22 +670,22 @@ var ChatMessages = ({
|
|
|
466
670
|
zIndex: 1
|
|
467
671
|
},
|
|
468
672
|
children: [
|
|
469
|
-
/* @__PURE__ */
|
|
673
|
+
/* @__PURE__ */ jsx6(
|
|
470
674
|
StreamingMarkdown_default,
|
|
471
675
|
{
|
|
472
|
-
content:
|
|
676
|
+
content: stripSourcesForDisplay(content),
|
|
473
677
|
isStreaming: isStreaming && isLast,
|
|
474
678
|
sources: sourceSummaries
|
|
475
679
|
}
|
|
476
680
|
),
|
|
477
|
-
/* @__PURE__ */
|
|
681
|
+
/* @__PURE__ */ jsx6(source_chips_default, { content })
|
|
478
682
|
]
|
|
479
683
|
}
|
|
480
684
|
)
|
|
481
685
|
]
|
|
482
686
|
}
|
|
483
687
|
);
|
|
484
|
-
return /* @__PURE__ */
|
|
688
|
+
return /* @__PURE__ */ jsx6(Box4, { children: /* @__PURE__ */ jsx6(
|
|
485
689
|
ai_response_text_field_default,
|
|
486
690
|
{
|
|
487
691
|
question: entry.question,
|
|
@@ -496,17 +700,17 @@ var ChatMessages = ({
|
|
|
496
700
|
}
|
|
497
701
|
) }, index);
|
|
498
702
|
}),
|
|
499
|
-
/* @__PURE__ */
|
|
703
|
+
/* @__PURE__ */ jsx6("div", { style: { height: "1px" }, ref: scrollTargetRef })
|
|
500
704
|
] });
|
|
501
705
|
};
|
|
502
706
|
var chat_messages_default = ChatMessages;
|
|
503
707
|
|
|
504
708
|
// src/chat/chat-input.tsx
|
|
505
|
-
import { useEffect as useEffect3, useRef as useRef2, useState as
|
|
506
|
-
import { Box as
|
|
709
|
+
import { useEffect as useEffect3, useRef as useRef2, useState as useState5 } from "react";
|
|
710
|
+
import { Box as Box5, TextField as TextField2, IconButton as IconButton4, Tooltip as Tooltip3, Avatar as Avatar2, Typography, CircularProgress as CircularProgress2, Collapse } from "@mui/material";
|
|
507
711
|
|
|
508
712
|
// src/services/stt/transcriber.tsx
|
|
509
|
-
import { useState as
|
|
713
|
+
import { useState as useState4, useRef } from "react";
|
|
510
714
|
|
|
511
715
|
// src/services/stt/sound-recorder.service.ts
|
|
512
716
|
import { first, from, fromEvent, map, shareReplay, switchMap } from "rxjs";
|
|
@@ -650,9 +854,9 @@ var STTClient = class {
|
|
|
650
854
|
};
|
|
651
855
|
|
|
652
856
|
// src/services/stt/transcriber.tsx
|
|
653
|
-
import { CircularProgress, IconButton as
|
|
857
|
+
import { CircularProgress, IconButton as IconButton3, useTheme as useTheme3 } from "@mui/material";
|
|
654
858
|
import { from as from2, Subscription, switchMap as switchMap2 } from "rxjs";
|
|
655
|
-
import { Fragment as
|
|
859
|
+
import { Fragment as Fragment3, jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
656
860
|
var initialButtonStyles = (badgeBackground, fileText, hoverBadgeBackground) => ({
|
|
657
861
|
bgcolor: badgeBackground,
|
|
658
862
|
color: fileText,
|
|
@@ -666,10 +870,10 @@ var Transcriber = ({ onTranscriptionCompleted }) => {
|
|
|
666
870
|
const badgeBackground = theme.palette.chat.badge;
|
|
667
871
|
const fileText = theme.palette.chat.fileText;
|
|
668
872
|
const hoverBadgeBackground = theme.palette.chat.badgeHover;
|
|
669
|
-
const [status, setStatus] =
|
|
873
|
+
const [status, setStatus] = useState4("IDLE");
|
|
670
874
|
const recorderRef = useRef(new SoundRecorderService());
|
|
671
|
-
const [iconButtonStyles] =
|
|
672
|
-
const [recordingSub, setRecordingSub] =
|
|
875
|
+
const [iconButtonStyles] = useState4(() => initialButtonStyles(badgeBackground, fileText, hoverBadgeBackground));
|
|
876
|
+
const [recordingSub, setRecordingSub] = useState4(() => new Subscription());
|
|
673
877
|
const start = () => {
|
|
674
878
|
recordingSub.unsubscribe();
|
|
675
879
|
const recording = recorderRef.current.start();
|
|
@@ -700,7 +904,7 @@ var Transcriber = ({ onTranscriptionCompleted }) => {
|
|
|
700
904
|
setStatus("LOADING");
|
|
701
905
|
stop();
|
|
702
906
|
};
|
|
703
|
-
return /* @__PURE__ */
|
|
907
|
+
return /* @__PURE__ */ jsx7(
|
|
704
908
|
"div",
|
|
705
909
|
{
|
|
706
910
|
style: {
|
|
@@ -710,27 +914,27 @@ var Transcriber = ({ onTranscriptionCompleted }) => {
|
|
|
710
914
|
backgroundColor: status === "RECORDING" ? "rgba(0,0,0,.3)" : "rgba(0,0,0,0)",
|
|
711
915
|
borderRadius: "50px"
|
|
712
916
|
},
|
|
713
|
-
children: status === "IDLE" ? /* @__PURE__ */
|
|
714
|
-
/* @__PURE__ */
|
|
715
|
-
|
|
917
|
+
children: status === "IDLE" ? /* @__PURE__ */ jsx7(IconButton3, { sx: { ...iconButtonStyles }, onClick: handleRecordClick, children: /* @__PURE__ */ jsx7(MicIcon, { sx: { color: "#aaa", cursor: "pointer" } }) }) : status === "RECORDING" ? /* @__PURE__ */ jsxs4(Fragment3, { children: [
|
|
918
|
+
/* @__PURE__ */ jsx7(
|
|
919
|
+
IconButton3,
|
|
716
920
|
{
|
|
717
921
|
onClick: handleCancelClick,
|
|
718
922
|
sx: { ...iconButtonStyles, marginRight: 1 },
|
|
719
|
-
children: /* @__PURE__ */
|
|
923
|
+
children: /* @__PURE__ */ jsx7(CloseIcon, {})
|
|
720
924
|
}
|
|
721
925
|
),
|
|
722
|
-
/* @__PURE__ */
|
|
723
|
-
|
|
926
|
+
/* @__PURE__ */ jsx7(
|
|
927
|
+
IconButton3,
|
|
724
928
|
{
|
|
725
929
|
sx: {
|
|
726
930
|
...iconButtonStyles,
|
|
727
931
|
filter: "invert(110%)"
|
|
728
932
|
},
|
|
729
933
|
onClick: handleSubmitClick,
|
|
730
|
-
children: /* @__PURE__ */
|
|
934
|
+
children: /* @__PURE__ */ jsx7(CheckIcon, {})
|
|
731
935
|
}
|
|
732
936
|
)
|
|
733
|
-
] }) : status === "LOADING" ? /* @__PURE__ */
|
|
937
|
+
] }) : status === "LOADING" ? /* @__PURE__ */ jsx7(IconButton3, { sx: { ...iconButtonStyles }, children: /* @__PURE__ */ jsx7(CircularProgress, { size: 20 }) }) : null
|
|
734
938
|
}
|
|
735
939
|
);
|
|
736
940
|
};
|
|
@@ -776,7 +980,7 @@ var useVoiceModeStore = create((set) => ({
|
|
|
776
980
|
|
|
777
981
|
// src/chat/chat-input.tsx
|
|
778
982
|
import { shallow } from "zustand/shallow";
|
|
779
|
-
import { Fragment as
|
|
983
|
+
import { Fragment as Fragment4, jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
780
984
|
var ChatInput = (props) => {
|
|
781
985
|
const {
|
|
782
986
|
inputValue,
|
|
@@ -819,13 +1023,13 @@ var ChatInput = (props) => {
|
|
|
819
1023
|
}),
|
|
820
1024
|
shallow
|
|
821
1025
|
);
|
|
822
|
-
const [memoryOpen, setMemoryOpen] =
|
|
823
|
-
const [fileInputs, setFileInputs] =
|
|
1026
|
+
const [memoryOpen, setMemoryOpen] = useState5(false);
|
|
1027
|
+
const [fileInputs, setFileInputs] = useState5([]);
|
|
824
1028
|
const fileInputRef = useRef2(null);
|
|
825
|
-
const [brandingText, setBrandingText] =
|
|
826
|
-
const [feedbackModalOpen, setFeedbackModalOpen] =
|
|
827
|
-
const [isKeyboardOpen, setKeyboardOpen] =
|
|
828
|
-
const [moreActionsOpen, setMoreActionsOpen] =
|
|
1029
|
+
const [brandingText, setBrandingText] = useState5("");
|
|
1030
|
+
const [feedbackModalOpen, setFeedbackModalOpen] = useState5(false);
|
|
1031
|
+
const [isKeyboardOpen, setKeyboardOpen] = useState5(false);
|
|
1032
|
+
const [moreActionsOpen, setMoreActionsOpen] = useState5(false);
|
|
829
1033
|
const compactMobile = isMobile;
|
|
830
1034
|
const primaryIconSize = isMobile ? 32 : 40;
|
|
831
1035
|
const sendIconSize = isMobile ? 36 : 44;
|
|
@@ -1073,8 +1277,8 @@ ${sanitize(
|
|
|
1073
1277
|
}, [isMobile, hasSecondaryActions]);
|
|
1074
1278
|
const renderAttachmentButton = (key) => {
|
|
1075
1279
|
if (!hasAttachmentAction) return null;
|
|
1076
|
-
return /* @__PURE__ */
|
|
1077
|
-
|
|
1280
|
+
return /* @__PURE__ */ jsx8(Tooltip3, { title: "Attach files or images", children: /* @__PURE__ */ jsx8(
|
|
1281
|
+
IconButton4,
|
|
1078
1282
|
{
|
|
1079
1283
|
onClick: () => fileInputRef.current?.click(),
|
|
1080
1284
|
sx: {
|
|
@@ -1091,8 +1295,8 @@ ${sanitize(
|
|
|
1091
1295
|
};
|
|
1092
1296
|
const renderMemoryButton = (key) => {
|
|
1093
1297
|
if (!hasMemoryAction) return null;
|
|
1094
|
-
return /* @__PURE__ */
|
|
1095
|
-
|
|
1298
|
+
return /* @__PURE__ */ jsx8(Tooltip3, { title: "Memory", children: /* @__PURE__ */ jsx8(
|
|
1299
|
+
IconButton4,
|
|
1096
1300
|
{
|
|
1097
1301
|
onClick: () => setMemoryOpen(true),
|
|
1098
1302
|
sx: {
|
|
@@ -1103,14 +1307,14 @@ ${sanitize(
|
|
|
1103
1307
|
borderRadius: "50%",
|
|
1104
1308
|
"&:hover": { bgcolor: hoverBadgeBackground }
|
|
1105
1309
|
},
|
|
1106
|
-
children: /* @__PURE__ */
|
|
1310
|
+
children: /* @__PURE__ */ jsx8(PsychologyIcon, { fontSize: "small" })
|
|
1107
1311
|
}
|
|
1108
1312
|
) }, key ?? "memory");
|
|
1109
1313
|
};
|
|
1110
1314
|
const renderFeedbackButton = (key) => {
|
|
1111
1315
|
if (!hasFeedbackAction) return null;
|
|
1112
|
-
return /* @__PURE__ */
|
|
1113
|
-
|
|
1316
|
+
return /* @__PURE__ */ jsx8(Tooltip3, { title: "Send Feedback", children: /* @__PURE__ */ jsx8(
|
|
1317
|
+
IconButton4,
|
|
1114
1318
|
{
|
|
1115
1319
|
onClick: () => setFeedbackModalOpen(true),
|
|
1116
1320
|
sx: {
|
|
@@ -1121,17 +1325,17 @@ ${sanitize(
|
|
|
1121
1325
|
borderRadius: "50%",
|
|
1122
1326
|
"&:hover": { bgcolor: hoverBadgeBackground }
|
|
1123
1327
|
},
|
|
1124
|
-
children: /* @__PURE__ */
|
|
1328
|
+
children: /* @__PURE__ */ jsx8(FeedbackIcon, { fontSize: "small" })
|
|
1125
1329
|
}
|
|
1126
1330
|
) }, key ?? "feedback");
|
|
1127
1331
|
};
|
|
1128
1332
|
const renderSttButton = (key) => {
|
|
1129
1333
|
if (!hasSttAction) return null;
|
|
1130
|
-
return /* @__PURE__ */
|
|
1334
|
+
return /* @__PURE__ */ jsx8(Box5, { sx: { display: "flex", alignItems: "center" }, children: /* @__PURE__ */ jsx8(transcriber_default, { onTranscriptionCompleted: handleTranscriptionCompleted }) }, key ?? "stt");
|
|
1131
1335
|
};
|
|
1132
|
-
return /* @__PURE__ */
|
|
1133
|
-
/* @__PURE__ */
|
|
1134
|
-
|
|
1336
|
+
return /* @__PURE__ */ jsxs5(Fragment4, { children: [
|
|
1337
|
+
/* @__PURE__ */ jsxs5(
|
|
1338
|
+
Box5,
|
|
1135
1339
|
{
|
|
1136
1340
|
sx: {
|
|
1137
1341
|
width: "100%",
|
|
@@ -1150,8 +1354,8 @@ ${sanitize(
|
|
|
1150
1354
|
},
|
|
1151
1355
|
ref: inputContainerRef,
|
|
1152
1356
|
children: [
|
|
1153
|
-
/* @__PURE__ */
|
|
1154
|
-
|
|
1357
|
+
/* @__PURE__ */ jsxs5(
|
|
1358
|
+
Box5,
|
|
1155
1359
|
{
|
|
1156
1360
|
sx: {
|
|
1157
1361
|
width: "100%",
|
|
@@ -1166,8 +1370,8 @@ ${sanitize(
|
|
|
1166
1370
|
gap: isMobile ? compactMobile ? 0.75 : 1 : 1
|
|
1167
1371
|
},
|
|
1168
1372
|
children: [
|
|
1169
|
-
/* @__PURE__ */
|
|
1170
|
-
|
|
1373
|
+
/* @__PURE__ */ jsxs5(
|
|
1374
|
+
Box5,
|
|
1171
1375
|
{
|
|
1172
1376
|
sx: {
|
|
1173
1377
|
display: "flex",
|
|
@@ -1177,8 +1381,8 @@ ${sanitize(
|
|
|
1177
1381
|
flexDirection: "row"
|
|
1178
1382
|
},
|
|
1179
1383
|
children: [
|
|
1180
|
-
fileInputs.map((file, idx) => /* @__PURE__ */
|
|
1181
|
-
|
|
1384
|
+
fileInputs.map((file, idx) => /* @__PURE__ */ jsxs5(
|
|
1385
|
+
Box5,
|
|
1182
1386
|
{
|
|
1183
1387
|
sx: {
|
|
1184
1388
|
position: "relative",
|
|
@@ -1191,7 +1395,7 @@ ${sanitize(
|
|
|
1191
1395
|
gap: isMobile ? compactMobile ? 0.6 : 0.9 : 1
|
|
1192
1396
|
},
|
|
1193
1397
|
children: [
|
|
1194
|
-
/* @__PURE__ */
|
|
1398
|
+
/* @__PURE__ */ jsx8(
|
|
1195
1399
|
Avatar2,
|
|
1196
1400
|
{
|
|
1197
1401
|
sx: {
|
|
@@ -1205,22 +1409,22 @@ ${sanitize(
|
|
|
1205
1409
|
children: getFileIcon(file.name)
|
|
1206
1410
|
}
|
|
1207
1411
|
),
|
|
1208
|
-
/* @__PURE__ */
|
|
1209
|
-
/* @__PURE__ */
|
|
1210
|
-
|
|
1412
|
+
/* @__PURE__ */ jsx8(Typography, { variant: "caption", sx: { color: fileText }, children: file.name }),
|
|
1413
|
+
/* @__PURE__ */ jsx8(
|
|
1414
|
+
IconButton4,
|
|
1211
1415
|
{
|
|
1212
1416
|
size: "small",
|
|
1213
1417
|
onClick: () => setFileInputs((prev) => prev.filter((_, i) => i !== idx)),
|
|
1214
1418
|
sx: { ml: 0.5, color: theme.palette.mode === "dark" ? "#aaa" : "#444" },
|
|
1215
|
-
children: /* @__PURE__ */
|
|
1419
|
+
children: /* @__PURE__ */ jsx8(CloseIcon, { sx: { fontSize: 14 } })
|
|
1216
1420
|
}
|
|
1217
1421
|
)
|
|
1218
1422
|
]
|
|
1219
1423
|
},
|
|
1220
1424
|
idx
|
|
1221
1425
|
)),
|
|
1222
|
-
pastedImages.map((img, idx) => /* @__PURE__ */
|
|
1223
|
-
/* @__PURE__ */
|
|
1426
|
+
pastedImages.map((img, idx) => /* @__PURE__ */ jsxs5(Box5, { sx: { position: "relative" }, children: [
|
|
1427
|
+
/* @__PURE__ */ jsx8(
|
|
1224
1428
|
Avatar2,
|
|
1225
1429
|
{
|
|
1226
1430
|
src: img,
|
|
@@ -1232,8 +1436,8 @@ ${sanitize(
|
|
|
1232
1436
|
}
|
|
1233
1437
|
}
|
|
1234
1438
|
),
|
|
1235
|
-
/* @__PURE__ */
|
|
1236
|
-
|
|
1439
|
+
/* @__PURE__ */ jsx8(
|
|
1440
|
+
IconButton4,
|
|
1237
1441
|
{
|
|
1238
1442
|
size: "small",
|
|
1239
1443
|
onClick: () => removeImage(idx),
|
|
@@ -1249,7 +1453,7 @@ ${sanitize(
|
|
|
1249
1453
|
bgcolor: "rgba(255, 5, 5, 0.85)"
|
|
1250
1454
|
}
|
|
1251
1455
|
},
|
|
1252
|
-
children: /* @__PURE__ */
|
|
1456
|
+
children: /* @__PURE__ */ jsx8(
|
|
1253
1457
|
CloseIcon,
|
|
1254
1458
|
{
|
|
1255
1459
|
sx: {
|
|
@@ -1261,7 +1465,7 @@ ${sanitize(
|
|
|
1261
1465
|
}
|
|
1262
1466
|
)
|
|
1263
1467
|
] }, `img-${idx}`)),
|
|
1264
|
-
/* @__PURE__ */
|
|
1468
|
+
/* @__PURE__ */ jsx8(
|
|
1265
1469
|
"input",
|
|
1266
1470
|
{
|
|
1267
1471
|
type: "file",
|
|
@@ -1298,16 +1502,16 @@ ${sanitize(
|
|
|
1298
1502
|
]
|
|
1299
1503
|
}
|
|
1300
1504
|
),
|
|
1301
|
-
/* @__PURE__ */
|
|
1302
|
-
|
|
1505
|
+
/* @__PURE__ */ jsx8(
|
|
1506
|
+
Box5,
|
|
1303
1507
|
{
|
|
1304
1508
|
sx: {
|
|
1305
1509
|
display: "flex",
|
|
1306
1510
|
maxHeight: "200px",
|
|
1307
1511
|
overflowY: "auto"
|
|
1308
1512
|
},
|
|
1309
|
-
children: /* @__PURE__ */
|
|
1310
|
-
|
|
1513
|
+
children: /* @__PURE__ */ jsx8(
|
|
1514
|
+
TextField2,
|
|
1311
1515
|
{
|
|
1312
1516
|
fullWidth: true,
|
|
1313
1517
|
multiline: true,
|
|
@@ -1338,8 +1542,8 @@ ${sanitize(
|
|
|
1338
1542
|
)
|
|
1339
1543
|
}
|
|
1340
1544
|
),
|
|
1341
|
-
/* @__PURE__ */
|
|
1342
|
-
|
|
1545
|
+
/* @__PURE__ */ jsxs5(
|
|
1546
|
+
Box5,
|
|
1343
1547
|
{
|
|
1344
1548
|
sx: {
|
|
1345
1549
|
display: "flex",
|
|
@@ -1349,8 +1553,8 @@ ${sanitize(
|
|
|
1349
1553
|
mt: isMobile ? 0.5 : 1
|
|
1350
1554
|
},
|
|
1351
1555
|
children: [
|
|
1352
|
-
/* @__PURE__ */
|
|
1353
|
-
|
|
1556
|
+
/* @__PURE__ */ jsxs5(
|
|
1557
|
+
Box5,
|
|
1354
1558
|
{
|
|
1355
1559
|
sx: {
|
|
1356
1560
|
display: "flex",
|
|
@@ -1359,13 +1563,13 @@ ${sanitize(
|
|
|
1359
1563
|
minHeight: primaryIconSize
|
|
1360
1564
|
},
|
|
1361
1565
|
children: [
|
|
1362
|
-
isVoiceModeEligible && /* @__PURE__ */
|
|
1363
|
-
/* @__PURE__ */
|
|
1364
|
-
|
|
1566
|
+
isVoiceModeEligible && /* @__PURE__ */ jsxs5(Fragment4, { children: [
|
|
1567
|
+
/* @__PURE__ */ jsx8(
|
|
1568
|
+
Tooltip3,
|
|
1365
1569
|
{
|
|
1366
1570
|
title: !isVoiceModeEnabled ? "Enable voice mode" : voiceStatus === "error" ? voiceError || "Voice mode error" : voiceStatus === "processing" ? "Transcribing your speech" : voiceStatus === "recording" ? "Recording - click to stop" : voiceStatus === "initializing" ? "Preparing microphone" : "Listening - click to turn off",
|
|
1367
|
-
children: /* @__PURE__ */
|
|
1368
|
-
|
|
1571
|
+
children: /* @__PURE__ */ jsx8(
|
|
1572
|
+
IconButton4,
|
|
1369
1573
|
{
|
|
1370
1574
|
onClick: toggleVoiceMode,
|
|
1371
1575
|
sx: {
|
|
@@ -1381,12 +1585,12 @@ ${sanitize(
|
|
|
1381
1585
|
bgcolor: isVoiceModeEnabled ? alpha(theme.palette.error.main, theme.palette.mode === "dark" ? 0.55 : 0.38) : hoverBadgeBackground
|
|
1382
1586
|
}
|
|
1383
1587
|
},
|
|
1384
|
-
children: !isVoiceModeEnabled ? /* @__PURE__ */
|
|
1588
|
+
children: !isVoiceModeEnabled ? /* @__PURE__ */ jsx8(GraphicEqIcon, { fontSize: "small", sx: { color: theme.palette.mode === "dark" ? fileText : theme.palette.text.secondary } }) : voiceStatus === "processing" || voiceStatus === "initializing" ? /* @__PURE__ */ jsx8(CircularProgress2, { size: 18, sx: { color: fileText } }) : voiceStatus === "error" ? /* @__PURE__ */ jsx8(HearingDisabledIcon, { fontSize: "small", sx: { color: theme.palette.error.light } }) : voiceStatus === "recording" ? /* @__PURE__ */ jsx8(GraphicEqIcon, { fontSize: "small", sx: { color: theme.palette.error.light } }) : /* @__PURE__ */ jsx8(GraphicEqIcon, { fontSize: "small", sx: { color: theme.palette.common.white } })
|
|
1385
1589
|
}
|
|
1386
1590
|
)
|
|
1387
1591
|
}
|
|
1388
1592
|
),
|
|
1389
|
-
!isMobile && isVoiceModeEnabled && /* @__PURE__ */
|
|
1593
|
+
!isMobile && isVoiceModeEnabled && /* @__PURE__ */ jsx8(
|
|
1390
1594
|
Typography,
|
|
1391
1595
|
{
|
|
1392
1596
|
variant: "caption",
|
|
@@ -1404,8 +1608,8 @@ ${sanitize(
|
|
|
1404
1608
|
!isMobile && renderAttachmentButton("attach-inline"),
|
|
1405
1609
|
!isMobile && renderMemoryButton("memory-inline"),
|
|
1406
1610
|
!isMobile && renderSttButton("stt-inline"),
|
|
1407
|
-
isMobile && hasSecondaryActions && /* @__PURE__ */
|
|
1408
|
-
|
|
1611
|
+
isMobile && hasSecondaryActions && /* @__PURE__ */ jsx8(
|
|
1612
|
+
IconButton4,
|
|
1409
1613
|
{
|
|
1410
1614
|
onClick: () => setMoreActionsOpen((prev) => !prev),
|
|
1411
1615
|
sx: {
|
|
@@ -1417,7 +1621,7 @@ ${sanitize(
|
|
|
1417
1621
|
transition: "background-color 0.2s ease",
|
|
1418
1622
|
"&:hover": { bgcolor: hoverBadgeBackground }
|
|
1419
1623
|
},
|
|
1420
|
-
children: /* @__PURE__ */
|
|
1624
|
+
children: /* @__PURE__ */ jsx8(
|
|
1421
1625
|
ExpandMoreIcon,
|
|
1422
1626
|
{
|
|
1423
1627
|
fontSize: "small",
|
|
@@ -1432,8 +1636,8 @@ ${sanitize(
|
|
|
1432
1636
|
]
|
|
1433
1637
|
}
|
|
1434
1638
|
),
|
|
1435
|
-
/* @__PURE__ */
|
|
1436
|
-
|
|
1639
|
+
/* @__PURE__ */ jsx8(Box5, { sx: { display: "flex", alignItems: "center", gap: isMobile ? 0.6 : 1 }, children: /* @__PURE__ */ jsx8(Tooltip3, { title: isStreaming ? "Stop response" : "Send message", children: /* @__PURE__ */ jsx8("span", { children: /* @__PURE__ */ jsx8(
|
|
1640
|
+
IconButton4,
|
|
1437
1641
|
{
|
|
1438
1642
|
onClick: isStreaming ? onStop || (() => {
|
|
1439
1643
|
}) : handleSubmit,
|
|
@@ -1449,14 +1653,14 @@ ${sanitize(
|
|
|
1449
1653
|
"&:hover": { bgcolor: sendButtonHover },
|
|
1450
1654
|
"&.Mui-disabled": { opacity: 0.5 }
|
|
1451
1655
|
},
|
|
1452
|
-
children: isStreaming ? /* @__PURE__ */
|
|
1656
|
+
children: isStreaming ? /* @__PURE__ */ jsx8(CloseIcon, { fontSize: "small" }) : /* @__PURE__ */ jsx8(ArrowUpwardIcon, { fontSize: "small" })
|
|
1453
1657
|
}
|
|
1454
1658
|
) }) }) })
|
|
1455
1659
|
]
|
|
1456
1660
|
}
|
|
1457
1661
|
),
|
|
1458
|
-
isMobile && hasSecondaryActions && /* @__PURE__ */
|
|
1459
|
-
|
|
1662
|
+
isMobile && hasSecondaryActions && /* @__PURE__ */ jsx8(Collapse, { in: moreActionsOpen, unmountOnExit: true, children: /* @__PURE__ */ jsxs5(
|
|
1663
|
+
Box5,
|
|
1460
1664
|
{
|
|
1461
1665
|
sx: {
|
|
1462
1666
|
display: "flex",
|
|
@@ -1477,7 +1681,7 @@ ${sanitize(
|
|
|
1477
1681
|
]
|
|
1478
1682
|
}
|
|
1479
1683
|
),
|
|
1480
|
-
/* @__PURE__ */
|
|
1684
|
+
/* @__PURE__ */ jsxs5(
|
|
1481
1685
|
Typography,
|
|
1482
1686
|
{
|
|
1483
1687
|
variant: "caption",
|
|
@@ -1503,8 +1707,8 @@ ${sanitize(
|
|
|
1503
1707
|
]
|
|
1504
1708
|
}
|
|
1505
1709
|
),
|
|
1506
|
-
isMemoryEnabled && /* @__PURE__ */
|
|
1507
|
-
isFeedbackEnabled && /* @__PURE__ */
|
|
1710
|
+
isMemoryEnabled && /* @__PURE__ */ jsx8(memory_modal_default, { open: memoryOpen, onClose: () => setMemoryOpen(false) }),
|
|
1711
|
+
isFeedbackEnabled && /* @__PURE__ */ jsx8(
|
|
1508
1712
|
FeedbackModal,
|
|
1509
1713
|
{
|
|
1510
1714
|
open: feedbackModalOpen,
|
|
@@ -1517,8 +1721,8 @@ ${sanitize(
|
|
|
1517
1721
|
var chat_input_default = ChatInput;
|
|
1518
1722
|
|
|
1519
1723
|
// src/chat/ask-user-card.tsx
|
|
1520
|
-
import { useEffect as useEffect4, useState as
|
|
1521
|
-
import { Box as
|
|
1724
|
+
import { useEffect as useEffect4, useState as useState6 } from "react";
|
|
1725
|
+
import { Box as Box6, Paper, Typography as Typography2, Button, TextField as TextField3, Chip, Stack } from "@mui/material";
|
|
1522
1726
|
import { useTheme as useTheme5, alpha as alpha2 } from "@mui/material/styles";
|
|
1523
1727
|
|
|
1524
1728
|
// src/store/askUserStore.ts
|
|
@@ -1584,12 +1788,12 @@ var parseAskUserQuestions = (rawJson) => {
|
|
|
1584
1788
|
};
|
|
1585
1789
|
|
|
1586
1790
|
// src/chat/ask-user-card.tsx
|
|
1587
|
-
import { jsx as
|
|
1791
|
+
import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1588
1792
|
var AskUserCard = () => {
|
|
1589
1793
|
const theme = useTheme5();
|
|
1590
1794
|
const { pending, submit, cancel } = useAskUserStore();
|
|
1591
|
-
const [selected, setSelected] =
|
|
1592
|
-
const [freeform, setFreeform] =
|
|
1795
|
+
const [selected, setSelected] = useState6({});
|
|
1796
|
+
const [freeform, setFreeform] = useState6({});
|
|
1593
1797
|
useEffect4(() => {
|
|
1594
1798
|
if (!pending) return;
|
|
1595
1799
|
const preselected = {};
|
|
@@ -1610,7 +1814,7 @@ var AskUserCard = () => {
|
|
|
1610
1814
|
});
|
|
1611
1815
|
submit(final);
|
|
1612
1816
|
};
|
|
1613
|
-
return /* @__PURE__ */
|
|
1817
|
+
return /* @__PURE__ */ jsx9(Box6, { sx: { width: "100%", display: "flex", justifyContent: "center", px: { xs: 1, sm: 2 }, mb: 1.5 }, children: /* @__PURE__ */ jsxs6(
|
|
1614
1818
|
Paper,
|
|
1615
1819
|
{
|
|
1616
1820
|
elevation: 0,
|
|
@@ -1623,13 +1827,13 @@ var AskUserCard = () => {
|
|
|
1623
1827
|
bgcolor: alpha2(theme.palette.primary.main, 0.06)
|
|
1624
1828
|
},
|
|
1625
1829
|
children: [
|
|
1626
|
-
/* @__PURE__ */
|
|
1627
|
-
pending.questions.map((q) => /* @__PURE__ */
|
|
1628
|
-
q.header && /* @__PURE__ */
|
|
1629
|
-
/* @__PURE__ */
|
|
1630
|
-
q.options && q.options.length > 0 && /* @__PURE__ */
|
|
1830
|
+
/* @__PURE__ */ jsx9(Typography2, { variant: "caption", sx: { color: theme.palette.primary.main, fontWeight: 700, letterSpacing: 0.4 }, children: "BANDIT NEEDS A QUICK DECISION" }),
|
|
1831
|
+
pending.questions.map((q) => /* @__PURE__ */ jsxs6(Box6, { sx: { mt: 1.5 }, children: [
|
|
1832
|
+
q.header && /* @__PURE__ */ jsx9(Chip, { label: q.header, size: "small", sx: { mb: 0.75, fontWeight: 600 }, color: "primary", variant: "outlined" }),
|
|
1833
|
+
/* @__PURE__ */ jsx9(Typography2, { sx: { fontWeight: 600, color: theme.palette.text.primary, mb: 1 }, children: q.question }),
|
|
1834
|
+
q.options && q.options.length > 0 && /* @__PURE__ */ jsx9(Stack, { spacing: 1, children: q.options.map((opt) => {
|
|
1631
1835
|
const isSel = selected[q.id] === opt.label && !freeform[q.id]?.trim();
|
|
1632
|
-
return /* @__PURE__ */
|
|
1836
|
+
return /* @__PURE__ */ jsx9(
|
|
1633
1837
|
Button,
|
|
1634
1838
|
{
|
|
1635
1839
|
onClick: () => {
|
|
@@ -1646,9 +1850,9 @@ var AskUserCard = () => {
|
|
|
1646
1850
|
px: 1.5,
|
|
1647
1851
|
borderColor: alpha2(theme.palette.primary.main, 0.4)
|
|
1648
1852
|
},
|
|
1649
|
-
children: /* @__PURE__ */
|
|
1650
|
-
/* @__PURE__ */
|
|
1651
|
-
opt.description && /* @__PURE__ */
|
|
1853
|
+
children: /* @__PURE__ */ jsxs6(Box6, { children: [
|
|
1854
|
+
/* @__PURE__ */ jsx9(Typography2, { sx: { fontWeight: 600, lineHeight: 1.3 }, children: opt.label }),
|
|
1855
|
+
opt.description && /* @__PURE__ */ jsx9(
|
|
1652
1856
|
Typography2,
|
|
1653
1857
|
{
|
|
1654
1858
|
variant: "caption",
|
|
@@ -1661,8 +1865,8 @@ var AskUserCard = () => {
|
|
|
1661
1865
|
opt.label
|
|
1662
1866
|
);
|
|
1663
1867
|
}) }),
|
|
1664
|
-
q.allowFreeform !== false && /* @__PURE__ */
|
|
1665
|
-
|
|
1868
|
+
q.allowFreeform !== false && /* @__PURE__ */ jsx9(
|
|
1869
|
+
TextField3,
|
|
1666
1870
|
{
|
|
1667
1871
|
fullWidth: true,
|
|
1668
1872
|
size: "small",
|
|
@@ -1673,9 +1877,9 @@ var AskUserCard = () => {
|
|
|
1673
1877
|
}
|
|
1674
1878
|
)
|
|
1675
1879
|
] }, q.id)),
|
|
1676
|
-
/* @__PURE__ */
|
|
1677
|
-
/* @__PURE__ */
|
|
1678
|
-
/* @__PURE__ */
|
|
1880
|
+
/* @__PURE__ */ jsxs6(Box6, { sx: { display: "flex", justifyContent: "flex-end", gap: 1, mt: 2 }, children: [
|
|
1881
|
+
/* @__PURE__ */ jsx9(Button, { onClick: cancel, color: "inherit", sx: { textTransform: "none", color: theme.palette.text.secondary }, children: "Skip" }),
|
|
1882
|
+
/* @__PURE__ */ jsx9(Button, { onClick: handleSubmit, disabled: !allAnswered, variant: "contained", sx: { textTransform: "none" }, children: "Submit" })
|
|
1679
1883
|
] })
|
|
1680
1884
|
]
|
|
1681
1885
|
}
|
|
@@ -2567,9 +2771,9 @@ The user explicitly asked you to remember this. Respond with a short third-perso
|
|
|
2567
2771
|
};
|
|
2568
2772
|
|
|
2569
2773
|
// src/chat/hooks/useMoodEngine.tsx
|
|
2570
|
-
import { useState as
|
|
2774
|
+
import { useState as useState7 } from "react";
|
|
2571
2775
|
var useMoodEngine = () => {
|
|
2572
|
-
const [mood, setMood] =
|
|
2776
|
+
const [mood, setMood] = useState7("neutral");
|
|
2573
2777
|
const analyzeMood = async (message) => {
|
|
2574
2778
|
try {
|
|
2575
2779
|
const detected = await detectMessageMood(message);
|
|
@@ -4288,9 +4492,9 @@ var useAutoScroll = (options = {}) => {
|
|
|
4288
4492
|
};
|
|
4289
4493
|
|
|
4290
4494
|
// src/hooks/useNetworkStatus.ts
|
|
4291
|
-
import { useState as
|
|
4495
|
+
import { useState as useState8, useEffect as useEffect6, useCallback as useCallback3 } from "react";
|
|
4292
4496
|
var useNetworkStatus = () => {
|
|
4293
|
-
const [networkStatus, setNetworkStatus] =
|
|
4497
|
+
const [networkStatus, setNetworkStatus] = useState8({
|
|
4294
4498
|
isOnline: navigator.onLine,
|
|
4295
4499
|
isSlowConnection: false,
|
|
4296
4500
|
connectionQuality: "fast",
|
|
@@ -4369,16 +4573,16 @@ var useNetworkStatus = () => {
|
|
|
4369
4573
|
|
|
4370
4574
|
// src/chat/chat-app-bar.tsx
|
|
4371
4575
|
import { Avatar as Avatar8 } from "@mui/material";
|
|
4372
|
-
import { useEffect as useEffect12, useRef as useRef10, useState as
|
|
4576
|
+
import { useEffect as useEffect12, useRef as useRef10, useState as useState15 } from "react";
|
|
4373
4577
|
import {
|
|
4374
|
-
Box as
|
|
4375
|
-
IconButton as
|
|
4578
|
+
Box as Box13,
|
|
4579
|
+
IconButton as IconButton10,
|
|
4376
4580
|
Menu as Menu5,
|
|
4377
4581
|
MenuItem as MenuItem5,
|
|
4378
|
-
Tooltip as
|
|
4582
|
+
Tooltip as Tooltip6,
|
|
4379
4583
|
useMediaQuery as useMediaQuery5,
|
|
4380
4584
|
useTheme as useTheme12,
|
|
4381
|
-
Dialog as
|
|
4585
|
+
Dialog as Dialog6,
|
|
4382
4586
|
DialogTitle as DialogTitle5,
|
|
4383
4587
|
DialogContent as DialogContent5,
|
|
4384
4588
|
DialogActions as DialogActions5,
|
|
@@ -4388,14 +4592,14 @@ import {
|
|
|
4388
4592
|
import { useNavigate } from "react-router-dom";
|
|
4389
4593
|
|
|
4390
4594
|
// src/chat/conversation-drawer.tsx
|
|
4391
|
-
import { useState as
|
|
4595
|
+
import { useState as useState13, useMemo as useMemo2, useEffect as useEffect10, useRef as useRef8, useCallback as useCallback4 } from "react";
|
|
4392
4596
|
import {
|
|
4393
4597
|
Drawer,
|
|
4394
|
-
Box as
|
|
4598
|
+
Box as Box11,
|
|
4395
4599
|
Typography as Typography7,
|
|
4396
|
-
IconButton as
|
|
4397
|
-
Tooltip as
|
|
4398
|
-
TextField as
|
|
4600
|
+
IconButton as IconButton8,
|
|
4601
|
+
Tooltip as Tooltip5,
|
|
4602
|
+
TextField as TextField7,
|
|
4399
4603
|
InputAdornment,
|
|
4400
4604
|
useMediaQuery as useMediaQuery4,
|
|
4401
4605
|
Collapse as Collapse2,
|
|
@@ -4404,7 +4608,7 @@ import {
|
|
|
4404
4608
|
MenuItem as MenuItem3,
|
|
4405
4609
|
ListItemIcon as ListItemIcon3,
|
|
4406
4610
|
ListItemText as ListItemText3,
|
|
4407
|
-
Dialog as
|
|
4611
|
+
Dialog as Dialog4,
|
|
4408
4612
|
DialogTitle as DialogTitle3,
|
|
4409
4613
|
DialogContent as DialogContent3,
|
|
4410
4614
|
DialogActions as DialogActions3,
|
|
@@ -4412,19 +4616,19 @@ import {
|
|
|
4412
4616
|
Avatar as Avatar6,
|
|
4413
4617
|
alpha as alpha6
|
|
4414
4618
|
} from "@mui/material";
|
|
4415
|
-
import { X as
|
|
4619
|
+
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 } from "lucide-react";
|
|
4416
4620
|
import { useTheme as useTheme10 } from "@mui/material/styles";
|
|
4417
4621
|
|
|
4418
4622
|
// src/chat/project-management-modal.tsx
|
|
4419
|
-
import { useState as
|
|
4623
|
+
import { useState as useState9, useEffect as useEffect7, useRef as useRef5 } from "react";
|
|
4420
4624
|
import {
|
|
4421
4625
|
Modal,
|
|
4422
4626
|
Button as Button2,
|
|
4423
|
-
TextField as
|
|
4627
|
+
TextField as TextField4,
|
|
4424
4628
|
List,
|
|
4425
4629
|
ListItem,
|
|
4426
|
-
IconButton as
|
|
4427
|
-
Box as
|
|
4630
|
+
IconButton as IconButton5,
|
|
4631
|
+
Box as Box7,
|
|
4428
4632
|
Typography as Typography3,
|
|
4429
4633
|
Avatar as Avatar3,
|
|
4430
4634
|
Chip as Chip2,
|
|
@@ -4435,9 +4639,9 @@ import {
|
|
|
4435
4639
|
SwipeableDrawer,
|
|
4436
4640
|
useMediaQuery as useMediaQuery2
|
|
4437
4641
|
} from "@mui/material";
|
|
4438
|
-
import { Plus as AddIcon2, Pencil as
|
|
4642
|
+
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";
|
|
4439
4643
|
import { useTheme as useTheme6, alpha as alpha3 } from "@mui/material/styles";
|
|
4440
|
-
import { Fragment as
|
|
4644
|
+
import { Fragment as Fragment5, jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
4441
4645
|
var DEFAULT_COLORS = [
|
|
4442
4646
|
"#2196F3",
|
|
4443
4647
|
"#4CAF50",
|
|
@@ -4467,18 +4671,18 @@ var ProjectManagementModal = ({
|
|
|
4467
4671
|
hydrate
|
|
4468
4672
|
} = useProjectStore();
|
|
4469
4673
|
const { getConversationsByProject } = useConversationStore();
|
|
4470
|
-
const [showCreateForm, setShowCreateForm] =
|
|
4471
|
-
const [editingProject, setEditingProject] =
|
|
4472
|
-
const [formData, setFormData] =
|
|
4674
|
+
const [showCreateForm, setShowCreateForm] = useState9(false);
|
|
4675
|
+
const [editingProject, setEditingProject] = useState9(null);
|
|
4676
|
+
const [formData, setFormData] = useState9({
|
|
4473
4677
|
name: "",
|
|
4474
4678
|
description: "",
|
|
4475
4679
|
instructions: "",
|
|
4476
4680
|
color: DEFAULT_COLORS[0]
|
|
4477
4681
|
});
|
|
4478
|
-
const [menuAnchor, setMenuAnchor] =
|
|
4479
|
-
const [selectedProject, setSelectedProject] =
|
|
4480
|
-
const [loading, setLoading] =
|
|
4481
|
-
const [error, setError] =
|
|
4682
|
+
const [menuAnchor, setMenuAnchor] = useState9(null);
|
|
4683
|
+
const [selectedProject, setSelectedProject] = useState9(null);
|
|
4684
|
+
const [loading, setLoading] = useState9(false);
|
|
4685
|
+
const [error, setError] = useState9(null);
|
|
4482
4686
|
const modalContainerRef = useRef5(null);
|
|
4483
4687
|
useEffect7(() => {
|
|
4484
4688
|
if (open && !_hasHydrated) {
|
|
@@ -4595,8 +4799,8 @@ var ProjectManagementModal = ({
|
|
|
4595
4799
|
const hoverSurface = alpha3(theme.palette.primary.main, theme.palette.mode === "dark" ? 0.22 : 0.08);
|
|
4596
4800
|
const headerTitle = showCreateForm ? editingProject ? "Edit Project" : "Create Project" : "Manage Projects";
|
|
4597
4801
|
const headerSubtitle = showCreateForm ? "Name, describe, and color-code your project." : "Organize conversations into cohesive projects.";
|
|
4598
|
-
const content = /* @__PURE__ */
|
|
4599
|
-
|
|
4802
|
+
const content = /* @__PURE__ */ jsxs7(
|
|
4803
|
+
Box7,
|
|
4600
4804
|
{
|
|
4601
4805
|
ref: modalContainerRef,
|
|
4602
4806
|
sx: {
|
|
@@ -4614,8 +4818,8 @@ var ProjectManagementModal = ({
|
|
|
4614
4818
|
position: "relative"
|
|
4615
4819
|
},
|
|
4616
4820
|
children: [
|
|
4617
|
-
isMobile && /* @__PURE__ */
|
|
4618
|
-
|
|
4821
|
+
isMobile && /* @__PURE__ */ jsx10(
|
|
4822
|
+
Box7,
|
|
4619
4823
|
{
|
|
4620
4824
|
sx: {
|
|
4621
4825
|
width: 56,
|
|
@@ -4628,8 +4832,8 @@ var ProjectManagementModal = ({
|
|
|
4628
4832
|
}
|
|
4629
4833
|
}
|
|
4630
4834
|
),
|
|
4631
|
-
/* @__PURE__ */
|
|
4632
|
-
|
|
4835
|
+
/* @__PURE__ */ jsxs7(
|
|
4836
|
+
Box7,
|
|
4633
4837
|
{
|
|
4634
4838
|
sx: {
|
|
4635
4839
|
px: isMobile ? 1.5 : 2.75,
|
|
@@ -4641,8 +4845,8 @@ var ProjectManagementModal = ({
|
|
|
4641
4845
|
gap: 1
|
|
4642
4846
|
},
|
|
4643
4847
|
children: [
|
|
4644
|
-
/* @__PURE__ */
|
|
4645
|
-
|
|
4848
|
+
/* @__PURE__ */ jsxs7(
|
|
4849
|
+
Box7,
|
|
4646
4850
|
{
|
|
4647
4851
|
sx: {
|
|
4648
4852
|
display: "flex",
|
|
@@ -4651,8 +4855,8 @@ var ProjectManagementModal = ({
|
|
|
4651
4855
|
gap: 1
|
|
4652
4856
|
},
|
|
4653
4857
|
children: [
|
|
4654
|
-
/* @__PURE__ */
|
|
4655
|
-
|
|
4858
|
+
/* @__PURE__ */ jsxs7(
|
|
4859
|
+
Box7,
|
|
4656
4860
|
{
|
|
4657
4861
|
sx: {
|
|
4658
4862
|
display: "flex",
|
|
@@ -4662,8 +4866,8 @@ var ProjectManagementModal = ({
|
|
|
4662
4866
|
flex: 1
|
|
4663
4867
|
},
|
|
4664
4868
|
children: [
|
|
4665
|
-
showCreateForm && /* @__PURE__ */
|
|
4666
|
-
/* @__PURE__ */
|
|
4869
|
+
showCreateForm && /* @__PURE__ */ jsx10(IconButton5, { onClick: resetForm, size: "small", sx: { mr: 0.5 }, children: /* @__PURE__ */ jsx10(ArrowBackIcon, { size: 16 }) }),
|
|
4870
|
+
/* @__PURE__ */ jsx10(
|
|
4667
4871
|
Typography3,
|
|
4668
4872
|
{
|
|
4669
4873
|
variant: "h6",
|
|
@@ -4680,16 +4884,16 @@ var ProjectManagementModal = ({
|
|
|
4680
4884
|
]
|
|
4681
4885
|
}
|
|
4682
4886
|
),
|
|
4683
|
-
/* @__PURE__ */
|
|
4887
|
+
/* @__PURE__ */ jsx10(IconButton5, { onClick: handleClose, size: "small", children: /* @__PURE__ */ jsx10(CloseIcon3, {}) })
|
|
4684
4888
|
]
|
|
4685
4889
|
}
|
|
4686
4890
|
),
|
|
4687
|
-
/* @__PURE__ */
|
|
4891
|
+
/* @__PURE__ */ jsx10(Typography3, { variant: "body2", color: "text.secondary", children: headerSubtitle })
|
|
4688
4892
|
]
|
|
4689
4893
|
}
|
|
4690
4894
|
),
|
|
4691
|
-
/* @__PURE__ */
|
|
4692
|
-
|
|
4895
|
+
/* @__PURE__ */ jsxs7(
|
|
4896
|
+
Box7,
|
|
4693
4897
|
{
|
|
4694
4898
|
sx: {
|
|
4695
4899
|
flex: 1,
|
|
@@ -4701,10 +4905,10 @@ var ProjectManagementModal = ({
|
|
|
4701
4905
|
gap: 2.5
|
|
4702
4906
|
},
|
|
4703
4907
|
children: [
|
|
4704
|
-
error && /* @__PURE__ */
|
|
4705
|
-
showCreateForm ? /* @__PURE__ */
|
|
4706
|
-
/* @__PURE__ */
|
|
4707
|
-
|
|
4908
|
+
error && /* @__PURE__ */ jsx10(Alert, { severity: "error", onClose: () => setError(null), children: error }),
|
|
4909
|
+
showCreateForm ? /* @__PURE__ */ jsxs7(Box7, { sx: { display: "flex", flexDirection: "column", gap: 2 }, children: [
|
|
4910
|
+
/* @__PURE__ */ jsx10(
|
|
4911
|
+
TextField4,
|
|
4708
4912
|
{
|
|
4709
4913
|
label: "Project name",
|
|
4710
4914
|
value: formData.name,
|
|
@@ -4715,8 +4919,8 @@ var ProjectManagementModal = ({
|
|
|
4715
4919
|
autoFocus: true
|
|
4716
4920
|
}
|
|
4717
4921
|
),
|
|
4718
|
-
/* @__PURE__ */
|
|
4719
|
-
|
|
4922
|
+
/* @__PURE__ */ jsx10(
|
|
4923
|
+
TextField4,
|
|
4720
4924
|
{
|
|
4721
4925
|
label: "Description (optional)",
|
|
4722
4926
|
value: formData.description,
|
|
@@ -4727,8 +4931,8 @@ var ProjectManagementModal = ({
|
|
|
4727
4931
|
disabled: loading
|
|
4728
4932
|
}
|
|
4729
4933
|
),
|
|
4730
|
-
/* @__PURE__ */
|
|
4731
|
-
|
|
4934
|
+
/* @__PURE__ */ jsx10(
|
|
4935
|
+
TextField4,
|
|
4732
4936
|
{
|
|
4733
4937
|
label: "Project instructions (optional)",
|
|
4734
4938
|
helperText: "Standing context the assistant uses for every chat in this project \u2014 goals, tone, key facts.",
|
|
@@ -4740,10 +4944,10 @@ var ProjectManagementModal = ({
|
|
|
4740
4944
|
disabled: loading
|
|
4741
4945
|
}
|
|
4742
4946
|
),
|
|
4743
|
-
/* @__PURE__ */
|
|
4744
|
-
/* @__PURE__ */
|
|
4745
|
-
/* @__PURE__ */
|
|
4746
|
-
|
|
4947
|
+
/* @__PURE__ */ jsxs7(Box7, { children: [
|
|
4948
|
+
/* @__PURE__ */ jsx10(Typography3, { variant: "subtitle2", sx: { mb: 1 }, children: "Color" }),
|
|
4949
|
+
/* @__PURE__ */ jsx10(Box7, { sx: { display: "flex", flexWrap: "wrap", gap: 1 }, children: DEFAULT_COLORS.map((color) => /* @__PURE__ */ jsx10(
|
|
4950
|
+
Box7,
|
|
4747
4951
|
{
|
|
4748
4952
|
sx: {
|
|
4749
4953
|
width: 32,
|
|
@@ -4763,11 +4967,11 @@ var ProjectManagementModal = ({
|
|
|
4763
4967
|
color
|
|
4764
4968
|
)) })
|
|
4765
4969
|
] })
|
|
4766
|
-
] }) : /* @__PURE__ */
|
|
4767
|
-
/* @__PURE__ */
|
|
4970
|
+
] }) : /* @__PURE__ */ jsxs7(Box7, { sx: { display: "flex", flexDirection: "column", gap: 2 }, children: [
|
|
4971
|
+
/* @__PURE__ */ jsx10(
|
|
4768
4972
|
Button2,
|
|
4769
4973
|
{
|
|
4770
|
-
startIcon: /* @__PURE__ */
|
|
4974
|
+
startIcon: /* @__PURE__ */ jsx10(AddIcon2, {}),
|
|
4771
4975
|
onClick: () => setShowCreateForm(true),
|
|
4772
4976
|
variant: "contained",
|
|
4773
4977
|
sx: {
|
|
@@ -4779,8 +4983,8 @@ var ProjectManagementModal = ({
|
|
|
4779
4983
|
children: "Create project"
|
|
4780
4984
|
}
|
|
4781
4985
|
),
|
|
4782
|
-
projects.length === 0 ? /* @__PURE__ */
|
|
4783
|
-
|
|
4986
|
+
projects.length === 0 ? /* @__PURE__ */ jsxs7(
|
|
4987
|
+
Box7,
|
|
4784
4988
|
{
|
|
4785
4989
|
sx: {
|
|
4786
4990
|
textAlign: "center",
|
|
@@ -4792,15 +4996,15 @@ var ProjectManagementModal = ({
|
|
|
4792
4996
|
backgroundColor: subtleSurface
|
|
4793
4997
|
},
|
|
4794
4998
|
children: [
|
|
4795
|
-
/* @__PURE__ */
|
|
4796
|
-
/* @__PURE__ */
|
|
4797
|
-
/* @__PURE__ */
|
|
4999
|
+
/* @__PURE__ */ jsx10(FolderIcon, { size: 48, style: { marginBottom: 8, opacity: 0.5 } }),
|
|
5000
|
+
/* @__PURE__ */ jsx10(Typography3, { variant: "body1", sx: { fontWeight: 600 }, children: "No projects yet" }),
|
|
5001
|
+
/* @__PURE__ */ jsx10(Typography3, { variant: "body2", children: "Create your first project to organize conversations." })
|
|
4798
5002
|
]
|
|
4799
5003
|
}
|
|
4800
|
-
) : /* @__PURE__ */
|
|
5004
|
+
) : /* @__PURE__ */ jsx10(List, { sx: { display: "flex", flexDirection: "column", gap: 1.25, py: 0 }, children: projects.map((project) => {
|
|
4801
5005
|
const conversationCount = getConversationsByProject(project.id).length;
|
|
4802
|
-
return /* @__PURE__ */
|
|
4803
|
-
|
|
5006
|
+
return /* @__PURE__ */ jsx10(ListItem, { disablePadding: true, children: /* @__PURE__ */ jsxs7(
|
|
5007
|
+
Box7,
|
|
4804
5008
|
{
|
|
4805
5009
|
sx: {
|
|
4806
5010
|
display: "flex",
|
|
@@ -4818,7 +5022,7 @@ var ProjectManagementModal = ({
|
|
|
4818
5022
|
}
|
|
4819
5023
|
},
|
|
4820
5024
|
children: [
|
|
4821
|
-
/* @__PURE__ */
|
|
5025
|
+
/* @__PURE__ */ jsx10(
|
|
4822
5026
|
Avatar3,
|
|
4823
5027
|
{
|
|
4824
5028
|
sx: {
|
|
@@ -4827,12 +5031,12 @@ var ProjectManagementModal = ({
|
|
|
4827
5031
|
height: 36,
|
|
4828
5032
|
fontSize: "1rem"
|
|
4829
5033
|
},
|
|
4830
|
-
children: /* @__PURE__ */
|
|
5034
|
+
children: /* @__PURE__ */ jsx10(FolderIcon, { size: 16 })
|
|
4831
5035
|
}
|
|
4832
5036
|
),
|
|
4833
|
-
/* @__PURE__ */
|
|
4834
|
-
/* @__PURE__ */
|
|
4835
|
-
/* @__PURE__ */
|
|
5037
|
+
/* @__PURE__ */ jsxs7(Box7, { sx: { flex: 1, minWidth: 0 }, children: [
|
|
5038
|
+
/* @__PURE__ */ jsxs7(Box7, { sx: { display: "flex", alignItems: "center", gap: 1, flexWrap: "wrap" }, children: [
|
|
5039
|
+
/* @__PURE__ */ jsx10(
|
|
4836
5040
|
Typography3,
|
|
4837
5041
|
{
|
|
4838
5042
|
variant: "subtitle1",
|
|
@@ -4840,7 +5044,7 @@ var ProjectManagementModal = ({
|
|
|
4840
5044
|
children: project.name
|
|
4841
5045
|
}
|
|
4842
5046
|
),
|
|
4843
|
-
/* @__PURE__ */
|
|
5047
|
+
/* @__PURE__ */ jsx10(
|
|
4844
5048
|
Chip2,
|
|
4845
5049
|
{
|
|
4846
5050
|
label: `${conversationCount}`,
|
|
@@ -4855,7 +5059,7 @@ var ProjectManagementModal = ({
|
|
|
4855
5059
|
}
|
|
4856
5060
|
)
|
|
4857
5061
|
] }),
|
|
4858
|
-
project.description && /* @__PURE__ */
|
|
5062
|
+
project.description && /* @__PURE__ */ jsx10(
|
|
4859
5063
|
Typography3,
|
|
4860
5064
|
{
|
|
4861
5065
|
variant: "body2",
|
|
@@ -4865,8 +5069,8 @@ var ProjectManagementModal = ({
|
|
|
4865
5069
|
}
|
|
4866
5070
|
)
|
|
4867
5071
|
] }),
|
|
4868
|
-
/* @__PURE__ */
|
|
4869
|
-
|
|
5072
|
+
/* @__PURE__ */ jsx10(
|
|
5073
|
+
IconButton5,
|
|
4870
5074
|
{
|
|
4871
5075
|
onClick: (e) => {
|
|
4872
5076
|
e.stopPropagation();
|
|
@@ -4878,7 +5082,7 @@ var ProjectManagementModal = ({
|
|
|
4878
5082
|
mt: 0.25,
|
|
4879
5083
|
zIndex: 1
|
|
4880
5084
|
},
|
|
4881
|
-
children: /* @__PURE__ */
|
|
5085
|
+
children: /* @__PURE__ */ jsx10(MoreVertIcon, { size: 16 })
|
|
4882
5086
|
}
|
|
4883
5087
|
)
|
|
4884
5088
|
]
|
|
@@ -4889,8 +5093,8 @@ var ProjectManagementModal = ({
|
|
|
4889
5093
|
]
|
|
4890
5094
|
}
|
|
4891
5095
|
),
|
|
4892
|
-
/* @__PURE__ */
|
|
4893
|
-
|
|
5096
|
+
/* @__PURE__ */ jsx10(
|
|
5097
|
+
Box7,
|
|
4894
5098
|
{
|
|
4895
5099
|
sx: {
|
|
4896
5100
|
px: isMobile ? 1.5 : 2.75,
|
|
@@ -4900,8 +5104,8 @@ var ProjectManagementModal = ({
|
|
|
4900
5104
|
justifyContent: "flex-end",
|
|
4901
5105
|
gap: 1
|
|
4902
5106
|
},
|
|
4903
|
-
children: showCreateForm ? /* @__PURE__ */
|
|
4904
|
-
/* @__PURE__ */
|
|
5107
|
+
children: showCreateForm ? /* @__PURE__ */ jsxs7(Fragment5, { children: [
|
|
5108
|
+
/* @__PURE__ */ jsx10(
|
|
4905
5109
|
Button2,
|
|
4906
5110
|
{
|
|
4907
5111
|
onClick: resetForm,
|
|
@@ -4910,21 +5114,21 @@ var ProjectManagementModal = ({
|
|
|
4910
5114
|
children: "Cancel"
|
|
4911
5115
|
}
|
|
4912
5116
|
),
|
|
4913
|
-
/* @__PURE__ */
|
|
5117
|
+
/* @__PURE__ */ jsx10(
|
|
4914
5118
|
Button2,
|
|
4915
5119
|
{
|
|
4916
5120
|
onClick: editingProject ? handleEditProject : handleCreateProject,
|
|
4917
5121
|
variant: "contained",
|
|
4918
5122
|
disabled: loading,
|
|
4919
|
-
startIcon: loading ? /* @__PURE__ */
|
|
5123
|
+
startIcon: loading ? /* @__PURE__ */ jsx10(CircularProgress3, { size: 16 }) : void 0,
|
|
4920
5124
|
sx: { textTransform: "none", borderRadius: 2 },
|
|
4921
5125
|
children: editingProject ? "Update project" : "Create project"
|
|
4922
5126
|
}
|
|
4923
5127
|
)
|
|
4924
|
-
] }) : /* @__PURE__ */
|
|
5128
|
+
] }) : /* @__PURE__ */ jsx10(Button2, { onClick: handleClose, sx: { textTransform: "none", borderRadius: 2 }, children: "Close" })
|
|
4925
5129
|
}
|
|
4926
5130
|
),
|
|
4927
|
-
/* @__PURE__ */
|
|
5131
|
+
/* @__PURE__ */ jsxs7(
|
|
4928
5132
|
Menu,
|
|
4929
5133
|
{
|
|
4930
5134
|
anchorEl: menuAnchor,
|
|
@@ -4946,20 +5150,20 @@ var ProjectManagementModal = ({
|
|
|
4946
5150
|
}
|
|
4947
5151
|
},
|
|
4948
5152
|
children: [
|
|
4949
|
-
/* @__PURE__ */
|
|
5153
|
+
/* @__PURE__ */ jsx10(
|
|
4950
5154
|
MenuItem,
|
|
4951
5155
|
{
|
|
4952
5156
|
onClick: () => {
|
|
4953
5157
|
if (!selectedProject) return;
|
|
4954
5158
|
startEdit(selectedProject);
|
|
4955
5159
|
},
|
|
4956
|
-
children: /* @__PURE__ */
|
|
4957
|
-
/* @__PURE__ */
|
|
4958
|
-
/* @__PURE__ */
|
|
5160
|
+
children: /* @__PURE__ */ jsxs7(Box7, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
5161
|
+
/* @__PURE__ */ jsx10(EditIcon2, { size: 16 }),
|
|
5162
|
+
/* @__PURE__ */ jsx10(Typography3, { variant: "body2", color: "inherit", children: "Edit" })
|
|
4959
5163
|
] })
|
|
4960
5164
|
}
|
|
4961
5165
|
),
|
|
4962
|
-
/* @__PURE__ */
|
|
5166
|
+
/* @__PURE__ */ jsx10(
|
|
4963
5167
|
MenuItem,
|
|
4964
5168
|
{
|
|
4965
5169
|
onClick: () => {
|
|
@@ -4967,9 +5171,9 @@ var ProjectManagementModal = ({
|
|
|
4967
5171
|
handleDeleteProject(selectedProject);
|
|
4968
5172
|
},
|
|
4969
5173
|
sx: { color: theme.palette.error.main },
|
|
4970
|
-
children: /* @__PURE__ */
|
|
4971
|
-
/* @__PURE__ */
|
|
4972
|
-
/* @__PURE__ */
|
|
5174
|
+
children: /* @__PURE__ */ jsxs7(Box7, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
5175
|
+
/* @__PURE__ */ jsx10(DeleteIcon, { size: 16 }),
|
|
5176
|
+
/* @__PURE__ */ jsx10(Typography3, { variant: "body2", color: "inherit", children: "Delete" })
|
|
4973
5177
|
] })
|
|
4974
5178
|
}
|
|
4975
5179
|
)
|
|
@@ -4979,7 +5183,7 @@ var ProjectManagementModal = ({
|
|
|
4979
5183
|
]
|
|
4980
5184
|
}
|
|
4981
5185
|
);
|
|
4982
|
-
return /* @__PURE__ */
|
|
5186
|
+
return /* @__PURE__ */ jsx10(Fragment5, { children: isMobile ? /* @__PURE__ */ jsx10(
|
|
4983
5187
|
SwipeableDrawer,
|
|
4984
5188
|
{
|
|
4985
5189
|
anchor: "bottom",
|
|
@@ -4999,7 +5203,7 @@ var ProjectManagementModal = ({
|
|
|
4999
5203
|
},
|
|
5000
5204
|
children: content
|
|
5001
5205
|
}
|
|
5002
|
-
) : /* @__PURE__ */
|
|
5206
|
+
) : /* @__PURE__ */ jsx10(
|
|
5003
5207
|
Modal,
|
|
5004
5208
|
{
|
|
5005
5209
|
open,
|
|
@@ -5018,9 +5222,9 @@ var ProjectManagementModal = ({
|
|
|
5018
5222
|
var project_management_modal_default = ProjectManagementModal;
|
|
5019
5223
|
|
|
5020
5224
|
// src/chat/move-conversation-modal.tsx
|
|
5021
|
-
import { useState as
|
|
5225
|
+
import { useState as useState10, useEffect as useEffect8 } from "react";
|
|
5022
5226
|
import {
|
|
5023
|
-
Dialog,
|
|
5227
|
+
Dialog as Dialog2,
|
|
5024
5228
|
DialogTitle,
|
|
5025
5229
|
DialogContent,
|
|
5026
5230
|
DialogActions,
|
|
@@ -5033,12 +5237,12 @@ import {
|
|
|
5033
5237
|
Typography as Typography4,
|
|
5034
5238
|
Avatar as Avatar4,
|
|
5035
5239
|
Radio,
|
|
5036
|
-
Box as
|
|
5240
|
+
Box as Box8,
|
|
5037
5241
|
Divider
|
|
5038
5242
|
} from "@mui/material";
|
|
5039
5243
|
import { Folder as FolderIcon2, Inbox as InboxIcon } from "lucide-react";
|
|
5040
5244
|
import { useTheme as useTheme7 } from "@mui/material/styles";
|
|
5041
|
-
import { jsx as
|
|
5245
|
+
import { jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
5042
5246
|
var MoveConversationModal = ({
|
|
5043
5247
|
open,
|
|
5044
5248
|
onClose,
|
|
@@ -5048,7 +5252,7 @@ var MoveConversationModal = ({
|
|
|
5048
5252
|
const theme = useTheme7();
|
|
5049
5253
|
const { projects, _hasHydrated, hydrate } = useProjectStore();
|
|
5050
5254
|
const { moveConversationToProject } = useConversationStore();
|
|
5051
|
-
const [selectedProjectId, setSelectedProjectId] =
|
|
5255
|
+
const [selectedProjectId, setSelectedProjectId] = useState10(
|
|
5052
5256
|
currentProjectId
|
|
5053
5257
|
);
|
|
5054
5258
|
useEffect8(() => {
|
|
@@ -5075,8 +5279,8 @@ var MoveConversationModal = ({
|
|
|
5075
5279
|
};
|
|
5076
5280
|
const conversationCount = conversations.length;
|
|
5077
5281
|
const isMultiple = conversationCount > 1;
|
|
5078
|
-
return /* @__PURE__ */
|
|
5079
|
-
|
|
5282
|
+
return /* @__PURE__ */ jsxs8(
|
|
5283
|
+
Dialog2,
|
|
5080
5284
|
{
|
|
5081
5285
|
open,
|
|
5082
5286
|
onClose,
|
|
@@ -5089,20 +5293,20 @@ var MoveConversationModal = ({
|
|
|
5089
5293
|
}
|
|
5090
5294
|
},
|
|
5091
5295
|
children: [
|
|
5092
|
-
/* @__PURE__ */
|
|
5296
|
+
/* @__PURE__ */ jsxs8(DialogTitle, { children: [
|
|
5093
5297
|
"Move ",
|
|
5094
5298
|
isMultiple ? `${conversationCount} Conversations` : "Conversation"
|
|
5095
5299
|
] }),
|
|
5096
|
-
/* @__PURE__ */
|
|
5097
|
-
/* @__PURE__ */
|
|
5098
|
-
/* @__PURE__ */
|
|
5099
|
-
/* @__PURE__ */
|
|
5300
|
+
/* @__PURE__ */ jsxs8(DialogContent, { sx: { px: 3 }, children: [
|
|
5301
|
+
/* @__PURE__ */ jsx11(Typography4, { variant: "body2", color: "text.secondary", sx: { mb: 2 }, children: isMultiple ? `Select a project to move ${conversationCount} conversations to:` : `Select a project to move "${conversations[0]?.name}" to:` }),
|
|
5302
|
+
/* @__PURE__ */ jsxs8(List2, { children: [
|
|
5303
|
+
/* @__PURE__ */ jsx11(ListItem2, { disablePadding: true, children: /* @__PURE__ */ jsxs8(
|
|
5100
5304
|
ListItemButton,
|
|
5101
5305
|
{
|
|
5102
5306
|
onClick: () => setSelectedProjectId(null),
|
|
5103
5307
|
selected: selectedProjectId === null,
|
|
5104
5308
|
children: [
|
|
5105
|
-
/* @__PURE__ */
|
|
5309
|
+
/* @__PURE__ */ jsx11(ListItemIcon, { children: /* @__PURE__ */ jsx11(
|
|
5106
5310
|
Radio,
|
|
5107
5311
|
{
|
|
5108
5312
|
checked: selectedProjectId === null,
|
|
@@ -5110,7 +5314,7 @@ var MoveConversationModal = ({
|
|
|
5110
5314
|
size: "small"
|
|
5111
5315
|
}
|
|
5112
5316
|
) }),
|
|
5113
|
-
/* @__PURE__ */
|
|
5317
|
+
/* @__PURE__ */ jsx11(ListItemIcon, { children: /* @__PURE__ */ jsx11(
|
|
5114
5318
|
Avatar4,
|
|
5115
5319
|
{
|
|
5116
5320
|
sx: {
|
|
@@ -5118,10 +5322,10 @@ var MoveConversationModal = ({
|
|
|
5118
5322
|
width: 32,
|
|
5119
5323
|
height: 32
|
|
5120
5324
|
},
|
|
5121
|
-
children: /* @__PURE__ */
|
|
5325
|
+
children: /* @__PURE__ */ jsx11(InboxIcon, {})
|
|
5122
5326
|
}
|
|
5123
5327
|
) }),
|
|
5124
|
-
/* @__PURE__ */
|
|
5328
|
+
/* @__PURE__ */ jsx11(
|
|
5125
5329
|
ListItemText,
|
|
5126
5330
|
{
|
|
5127
5331
|
primary: "No Project",
|
|
@@ -5131,14 +5335,14 @@ var MoveConversationModal = ({
|
|
|
5131
5335
|
]
|
|
5132
5336
|
}
|
|
5133
5337
|
) }),
|
|
5134
|
-
/* @__PURE__ */
|
|
5135
|
-
projects.map((project) => /* @__PURE__ */
|
|
5338
|
+
/* @__PURE__ */ jsx11(Divider, { sx: { my: 1 } }),
|
|
5339
|
+
projects.map((project) => /* @__PURE__ */ jsx11(ListItem2, { disablePadding: true, children: /* @__PURE__ */ jsxs8(
|
|
5136
5340
|
ListItemButton,
|
|
5137
5341
|
{
|
|
5138
5342
|
onClick: () => setSelectedProjectId(project.id),
|
|
5139
5343
|
selected: selectedProjectId === project.id,
|
|
5140
5344
|
children: [
|
|
5141
|
-
/* @__PURE__ */
|
|
5345
|
+
/* @__PURE__ */ jsx11(ListItemIcon, { children: /* @__PURE__ */ jsx11(
|
|
5142
5346
|
Radio,
|
|
5143
5347
|
{
|
|
5144
5348
|
checked: selectedProjectId === project.id,
|
|
@@ -5146,7 +5350,7 @@ var MoveConversationModal = ({
|
|
|
5146
5350
|
size: "small"
|
|
5147
5351
|
}
|
|
5148
5352
|
) }),
|
|
5149
|
-
/* @__PURE__ */
|
|
5353
|
+
/* @__PURE__ */ jsx11(ListItemIcon, { children: /* @__PURE__ */ jsx11(
|
|
5150
5354
|
Avatar4,
|
|
5151
5355
|
{
|
|
5152
5356
|
sx: {
|
|
@@ -5154,10 +5358,10 @@ var MoveConversationModal = ({
|
|
|
5154
5358
|
width: 32,
|
|
5155
5359
|
height: 32
|
|
5156
5360
|
},
|
|
5157
|
-
children: /* @__PURE__ */
|
|
5361
|
+
children: /* @__PURE__ */ jsx11(FolderIcon2, {})
|
|
5158
5362
|
}
|
|
5159
5363
|
) }),
|
|
5160
|
-
/* @__PURE__ */
|
|
5364
|
+
/* @__PURE__ */ jsx11(
|
|
5161
5365
|
ListItemText,
|
|
5162
5366
|
{
|
|
5163
5367
|
primary: project.name,
|
|
@@ -5167,16 +5371,16 @@ var MoveConversationModal = ({
|
|
|
5167
5371
|
]
|
|
5168
5372
|
}
|
|
5169
5373
|
) }, project.id)),
|
|
5170
|
-
projects.length === 0 && /* @__PURE__ */
|
|
5374
|
+
projects.length === 0 && /* @__PURE__ */ jsx11(Box8, { sx: {
|
|
5171
5375
|
textAlign: "center",
|
|
5172
5376
|
py: 2,
|
|
5173
5377
|
color: theme.palette.text.secondary
|
|
5174
|
-
}, children: /* @__PURE__ */
|
|
5378
|
+
}, children: /* @__PURE__ */ jsx11(Typography4, { variant: "body2", children: "No projects available. Create a project first to organize conversations." }) })
|
|
5175
5379
|
] })
|
|
5176
5380
|
] }),
|
|
5177
|
-
/* @__PURE__ */
|
|
5178
|
-
/* @__PURE__ */
|
|
5179
|
-
/* @__PURE__ */
|
|
5381
|
+
/* @__PURE__ */ jsxs8(DialogActions, { sx: { px: 3, pb: 2 }, children: [
|
|
5382
|
+
/* @__PURE__ */ jsx11(Button3, { onClick: onClose, children: "Cancel" }),
|
|
5383
|
+
/* @__PURE__ */ jsxs8(
|
|
5180
5384
|
Button3,
|
|
5181
5385
|
{
|
|
5182
5386
|
onClick: handleMove,
|
|
@@ -5196,26 +5400,26 @@ var MoveConversationModal = ({
|
|
|
5196
5400
|
var move_conversation_modal_default = MoveConversationModal;
|
|
5197
5401
|
|
|
5198
5402
|
// src/chat/simple-conversation-item.tsx
|
|
5199
|
-
import { useState as
|
|
5403
|
+
import { useState as useState11, useRef as useRef6, useEffect as useEffect9 } from "react";
|
|
5200
5404
|
import {
|
|
5201
|
-
Box as
|
|
5405
|
+
Box as Box9,
|
|
5202
5406
|
Typography as Typography5,
|
|
5203
|
-
IconButton as
|
|
5407
|
+
IconButton as IconButton6,
|
|
5204
5408
|
Menu as Menu2,
|
|
5205
5409
|
MenuItem as MenuItem2,
|
|
5206
5410
|
ListItemIcon as ListItemIcon2,
|
|
5207
5411
|
ListItemText as ListItemText2,
|
|
5208
5412
|
useMediaQuery as useMediaQuery3,
|
|
5209
|
-
TextField as
|
|
5210
|
-
Dialog as
|
|
5413
|
+
TextField as TextField5,
|
|
5414
|
+
Dialog as Dialog3,
|
|
5211
5415
|
DialogTitle as DialogTitle2,
|
|
5212
5416
|
DialogContent as DialogContent2,
|
|
5213
5417
|
DialogActions as DialogActions2,
|
|
5214
5418
|
Button as Button4
|
|
5215
5419
|
} from "@mui/material";
|
|
5216
|
-
import { MoreVertical as MoreVertIcon2, Pencil as
|
|
5420
|
+
import { MoreVertical as MoreVertIcon2, Pencil as EditIcon3, Trash2 as DeleteIcon2, GripVertical as DragIcon, MailOpen as MoveIcon } from "lucide-react";
|
|
5217
5421
|
import { useTheme as useTheme8, alpha as alpha4 } from "@mui/material/styles";
|
|
5218
|
-
import { Fragment as
|
|
5422
|
+
import { Fragment as Fragment6, jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
5219
5423
|
var SimpleConversationItem = ({
|
|
5220
5424
|
conversation,
|
|
5221
5425
|
isSelected,
|
|
@@ -5233,12 +5437,12 @@ var SimpleConversationItem = ({
|
|
|
5233
5437
|
}) => {
|
|
5234
5438
|
const theme = useTheme8();
|
|
5235
5439
|
const isMobile = useMediaQuery3(theme.breakpoints.down("sm"));
|
|
5236
|
-
const [anchorEl, setAnchorEl] =
|
|
5237
|
-
const [isEditing, setIsEditing] =
|
|
5238
|
-
const [editName, setEditName] =
|
|
5239
|
-
const [isDragging, setIsDragging] =
|
|
5240
|
-
const [isTouchDragging, setIsTouchDragging] =
|
|
5241
|
-
const [showRenameDialog, setShowRenameDialog] =
|
|
5440
|
+
const [anchorEl, setAnchorEl] = useState11(null);
|
|
5441
|
+
const [isEditing, setIsEditing] = useState11(false);
|
|
5442
|
+
const [editName, setEditName] = useState11(conversation.name);
|
|
5443
|
+
const [isDragging, setIsDragging] = useState11(false);
|
|
5444
|
+
const [isTouchDragging, setIsTouchDragging] = useState11(false);
|
|
5445
|
+
const [showRenameDialog, setShowRenameDialog] = useState11(false);
|
|
5242
5446
|
const longPressTimeoutRef = useRef6(null);
|
|
5243
5447
|
const touchStartPointRef = useRef6(null);
|
|
5244
5448
|
const activeTouchIdRef = useRef6(null);
|
|
@@ -5250,8 +5454,8 @@ var SimpleConversationItem = ({
|
|
|
5250
5454
|
const regex = new RegExp(`(${query.trim()})`, "gi");
|
|
5251
5455
|
const parts = text.split(regex);
|
|
5252
5456
|
return parts.map(
|
|
5253
|
-
(part, index) => regex.test(part) ? /* @__PURE__ */
|
|
5254
|
-
|
|
5457
|
+
(part, index) => regex.test(part) ? /* @__PURE__ */ jsx12(
|
|
5458
|
+
Box9,
|
|
5255
5459
|
{
|
|
5256
5460
|
component: "span",
|
|
5257
5461
|
sx: {
|
|
@@ -5386,9 +5590,9 @@ var SimpleConversationItem = ({
|
|
|
5386
5590
|
setIsTouchDragging(false);
|
|
5387
5591
|
}
|
|
5388
5592
|
}, [isTouchDragActive, isTouchDragging]);
|
|
5389
|
-
return /* @__PURE__ */
|
|
5390
|
-
/* @__PURE__ */
|
|
5391
|
-
|
|
5593
|
+
return /* @__PURE__ */ jsxs9(Fragment6, { children: [
|
|
5594
|
+
/* @__PURE__ */ jsxs9(
|
|
5595
|
+
Box9,
|
|
5392
5596
|
{
|
|
5393
5597
|
"data-project-id": conversation.projectId ?? "__ungrouped",
|
|
5394
5598
|
draggable: !isMobile && !isEditing,
|
|
@@ -5440,7 +5644,7 @@ var SimpleConversationItem = ({
|
|
|
5440
5644
|
}
|
|
5441
5645
|
},
|
|
5442
5646
|
children: [
|
|
5443
|
-
!isMobile && !isEditing && /* @__PURE__ */
|
|
5647
|
+
!isMobile && !isEditing && /* @__PURE__ */ jsx12(
|
|
5444
5648
|
DragIcon,
|
|
5445
5649
|
{
|
|
5446
5650
|
size: 16,
|
|
@@ -5448,9 +5652,9 @@ var SimpleConversationItem = ({
|
|
|
5448
5652
|
style: { marginRight: 4, cursor: "grab" }
|
|
5449
5653
|
}
|
|
5450
5654
|
),
|
|
5451
|
-
/* @__PURE__ */
|
|
5452
|
-
isEditing ? /* @__PURE__ */
|
|
5453
|
-
|
|
5655
|
+
/* @__PURE__ */ jsxs9(Box9, { sx: { flex: 1, minWidth: 0 }, children: [
|
|
5656
|
+
isEditing ? /* @__PURE__ */ jsx12(
|
|
5657
|
+
TextField5,
|
|
5454
5658
|
{
|
|
5455
5659
|
value: editName,
|
|
5456
5660
|
onChange: (e) => setEditName(e.target.value),
|
|
@@ -5472,7 +5676,7 @@ var SimpleConversationItem = ({
|
|
|
5472
5676
|
}
|
|
5473
5677
|
}
|
|
5474
5678
|
}
|
|
5475
|
-
) : /* @__PURE__ */
|
|
5679
|
+
) : /* @__PURE__ */ jsx12(
|
|
5476
5680
|
Typography5,
|
|
5477
5681
|
{
|
|
5478
5682
|
variant: "body2",
|
|
@@ -5487,7 +5691,7 @@ var SimpleConversationItem = ({
|
|
|
5487
5691
|
children: highlightText(conversation.name, searchQuery)
|
|
5488
5692
|
}
|
|
5489
5693
|
),
|
|
5490
|
-
!isEditing && snippet && /* @__PURE__ */
|
|
5694
|
+
!isEditing && snippet && /* @__PURE__ */ jsx12(
|
|
5491
5695
|
Typography5,
|
|
5492
5696
|
{
|
|
5493
5697
|
variant: "caption",
|
|
@@ -5506,8 +5710,8 @@ var SimpleConversationItem = ({
|
|
|
5506
5710
|
}
|
|
5507
5711
|
)
|
|
5508
5712
|
] }),
|
|
5509
|
-
!isEditing && /* @__PURE__ */
|
|
5510
|
-
|
|
5713
|
+
!isEditing && /* @__PURE__ */ jsx12(
|
|
5714
|
+
IconButton6,
|
|
5511
5715
|
{
|
|
5512
5716
|
onClick: handleMenuOpen,
|
|
5513
5717
|
size: "small",
|
|
@@ -5535,10 +5739,10 @@ var SimpleConversationItem = ({
|
|
|
5535
5739
|
}
|
|
5536
5740
|
}
|
|
5537
5741
|
},
|
|
5538
|
-
children: /* @__PURE__ */
|
|
5742
|
+
children: /* @__PURE__ */ jsx12(MoreVertIcon2, { size: 16 })
|
|
5539
5743
|
}
|
|
5540
5744
|
),
|
|
5541
|
-
/* @__PURE__ */
|
|
5745
|
+
/* @__PURE__ */ jsxs9(
|
|
5542
5746
|
Menu2,
|
|
5543
5747
|
{
|
|
5544
5748
|
anchorEl,
|
|
@@ -5565,17 +5769,17 @@ var SimpleConversationItem = ({
|
|
|
5565
5769
|
}
|
|
5566
5770
|
},
|
|
5567
5771
|
children: [
|
|
5568
|
-
onRename && /* @__PURE__ */
|
|
5569
|
-
/* @__PURE__ */
|
|
5570
|
-
/* @__PURE__ */
|
|
5772
|
+
onRename && /* @__PURE__ */ jsxs9(MenuItem2, { onClick: handleEdit, children: [
|
|
5773
|
+
/* @__PURE__ */ jsx12(ListItemIcon2, { children: /* @__PURE__ */ jsx12(EditIcon3, { size: 16 }) }),
|
|
5774
|
+
/* @__PURE__ */ jsx12(ListItemText2, { children: "Rename" })
|
|
5571
5775
|
] }),
|
|
5572
|
-
onMove && /* @__PURE__ */
|
|
5573
|
-
/* @__PURE__ */
|
|
5574
|
-
/* @__PURE__ */
|
|
5776
|
+
onMove && /* @__PURE__ */ jsxs9(MenuItem2, { onClick: handleMove, children: [
|
|
5777
|
+
/* @__PURE__ */ jsx12(ListItemIcon2, { children: /* @__PURE__ */ jsx12(MoveIcon, { size: 16 }) }),
|
|
5778
|
+
/* @__PURE__ */ jsx12(ListItemText2, { children: "Move to Project" })
|
|
5575
5779
|
] }),
|
|
5576
|
-
/* @__PURE__ */
|
|
5577
|
-
/* @__PURE__ */
|
|
5578
|
-
/* @__PURE__ */
|
|
5780
|
+
/* @__PURE__ */ jsxs9(MenuItem2, { onClick: handleDelete, children: [
|
|
5781
|
+
/* @__PURE__ */ jsx12(ListItemIcon2, { children: /* @__PURE__ */ jsx12(DeleteIcon2, { size: 16 }) }),
|
|
5782
|
+
/* @__PURE__ */ jsx12(ListItemText2, { children: "Delete" })
|
|
5579
5783
|
] })
|
|
5580
5784
|
]
|
|
5581
5785
|
}
|
|
@@ -5583,8 +5787,8 @@ var SimpleConversationItem = ({
|
|
|
5583
5787
|
]
|
|
5584
5788
|
}
|
|
5585
5789
|
),
|
|
5586
|
-
isMobile && /* @__PURE__ */
|
|
5587
|
-
|
|
5790
|
+
isMobile && /* @__PURE__ */ jsxs9(
|
|
5791
|
+
Dialog3,
|
|
5588
5792
|
{
|
|
5589
5793
|
open: showRenameDialog,
|
|
5590
5794
|
onClose: () => {
|
|
@@ -5599,9 +5803,9 @@ var SimpleConversationItem = ({
|
|
|
5599
5803
|
}
|
|
5600
5804
|
},
|
|
5601
5805
|
children: [
|
|
5602
|
-
/* @__PURE__ */
|
|
5603
|
-
/* @__PURE__ */
|
|
5604
|
-
|
|
5806
|
+
/* @__PURE__ */ jsx12(DialogTitle2, { sx: { pb: 1 }, children: "Rename Conversation" }),
|
|
5807
|
+
/* @__PURE__ */ jsx12(DialogContent2, { children: /* @__PURE__ */ jsx12(
|
|
5808
|
+
TextField5,
|
|
5605
5809
|
{
|
|
5606
5810
|
value: editName,
|
|
5607
5811
|
onChange: (e) => setEditName(e.target.value),
|
|
@@ -5613,8 +5817,8 @@ var SimpleConversationItem = ({
|
|
|
5613
5817
|
}
|
|
5614
5818
|
}
|
|
5615
5819
|
) }),
|
|
5616
|
-
/* @__PURE__ */
|
|
5617
|
-
/* @__PURE__ */
|
|
5820
|
+
/* @__PURE__ */ jsxs9(DialogActions2, { sx: { px: 3, pb: 2 }, children: [
|
|
5821
|
+
/* @__PURE__ */ jsx12(
|
|
5618
5822
|
Button4,
|
|
5619
5823
|
{
|
|
5620
5824
|
onClick: () => {
|
|
@@ -5624,7 +5828,7 @@ var SimpleConversationItem = ({
|
|
|
5624
5828
|
children: "Cancel"
|
|
5625
5829
|
}
|
|
5626
5830
|
),
|
|
5627
|
-
/* @__PURE__ */
|
|
5831
|
+
/* @__PURE__ */ jsx12(
|
|
5628
5832
|
Button4,
|
|
5629
5833
|
{
|
|
5630
5834
|
onClick: () => {
|
|
@@ -5645,20 +5849,20 @@ var SimpleConversationItem = ({
|
|
|
5645
5849
|
var simple_conversation_item_default = SimpleConversationItem;
|
|
5646
5850
|
|
|
5647
5851
|
// src/chat/project-header.tsx
|
|
5648
|
-
import { useRef as useRef7, useState as
|
|
5852
|
+
import { useRef as useRef7, useState as useState12 } from "react";
|
|
5649
5853
|
import {
|
|
5650
|
-
Box as
|
|
5854
|
+
Box as Box10,
|
|
5651
5855
|
Typography as Typography6,
|
|
5652
|
-
IconButton as
|
|
5856
|
+
IconButton as IconButton7,
|
|
5653
5857
|
Avatar as Avatar5,
|
|
5654
5858
|
Chip as Chip3,
|
|
5655
|
-
Tooltip as
|
|
5656
|
-
TextField as
|
|
5859
|
+
Tooltip as Tooltip4,
|
|
5860
|
+
TextField as TextField6,
|
|
5657
5861
|
alpha as alpha5
|
|
5658
5862
|
} from "@mui/material";
|
|
5659
|
-
import { ChevronDown as ExpandMoreIcon2, ChevronUp as ExpandLessIcon, Plus as AddIcon3, Folder as FolderIcon3, FolderOpen as FolderOpenIcon, Inbox as InboxIcon2, X as
|
|
5863
|
+
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";
|
|
5660
5864
|
import { useTheme as useTheme9 } from "@mui/material/styles";
|
|
5661
|
-
import { jsx as
|
|
5865
|
+
import { jsx as jsx13, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
5662
5866
|
var ProjectHeader = ({
|
|
5663
5867
|
projectId,
|
|
5664
5868
|
projectName,
|
|
@@ -5675,9 +5879,9 @@ var ProjectHeader = ({
|
|
|
5675
5879
|
const theme = useTheme9();
|
|
5676
5880
|
const { createNewConversation } = useConversationStore();
|
|
5677
5881
|
const { renameProject } = useProjectStore();
|
|
5678
|
-
const [isHovered, setIsHovered] =
|
|
5679
|
-
const [isDragOver, setIsDragOver] =
|
|
5680
|
-
const [renameDraft, setRenameDraft] =
|
|
5882
|
+
const [isHovered, setIsHovered] = useState12(false);
|
|
5883
|
+
const [isDragOver, setIsDragOver] = useState12(false);
|
|
5884
|
+
const [renameDraft, setRenameDraft] = useState12(projectName);
|
|
5681
5885
|
const renameActionRef = useRef7("none");
|
|
5682
5886
|
const isUngrouped = projectId === null;
|
|
5683
5887
|
const Icon = isCollapsed ? FolderIcon3 : FolderOpenIcon;
|
|
@@ -5724,8 +5928,8 @@ var ProjectHeader = ({
|
|
|
5724
5928
|
setRenameDraft(projectName);
|
|
5725
5929
|
onRenameComplete?.();
|
|
5726
5930
|
};
|
|
5727
|
-
return /* @__PURE__ */
|
|
5728
|
-
|
|
5931
|
+
return /* @__PURE__ */ jsxs10(
|
|
5932
|
+
Box10,
|
|
5729
5933
|
{
|
|
5730
5934
|
"data-project-id": projectId ?? "__ungrouped",
|
|
5731
5935
|
onMouseEnter: () => setIsHovered(true),
|
|
@@ -5751,7 +5955,7 @@ var ProjectHeader = ({
|
|
|
5751
5955
|
} : {}
|
|
5752
5956
|
},
|
|
5753
5957
|
children: [
|
|
5754
|
-
/* @__PURE__ */
|
|
5958
|
+
/* @__PURE__ */ jsx13(
|
|
5755
5959
|
Avatar5,
|
|
5756
5960
|
{
|
|
5757
5961
|
sx: {
|
|
@@ -5760,18 +5964,18 @@ var ProjectHeader = ({
|
|
|
5760
5964
|
height: 28,
|
|
5761
5965
|
mr: 1.5
|
|
5762
5966
|
},
|
|
5763
|
-
children: isUngrouped ? /* @__PURE__ */
|
|
5967
|
+
children: isUngrouped ? /* @__PURE__ */ jsx13(
|
|
5764
5968
|
InboxIcon2,
|
|
5765
5969
|
{
|
|
5766
5970
|
size: 16,
|
|
5767
5971
|
color: theme.palette.text.disabled,
|
|
5768
5972
|
style: { opacity: 0.7 }
|
|
5769
5973
|
}
|
|
5770
|
-
) : /* @__PURE__ */
|
|
5974
|
+
) : /* @__PURE__ */ jsx13(Icon, { size: 16 })
|
|
5771
5975
|
}
|
|
5772
5976
|
),
|
|
5773
|
-
isRenaming && !isUngrouped ? /* @__PURE__ */
|
|
5774
|
-
|
|
5977
|
+
isRenaming && !isUngrouped ? /* @__PURE__ */ jsx13(
|
|
5978
|
+
TextField6,
|
|
5775
5979
|
{
|
|
5776
5980
|
value: renameDraft,
|
|
5777
5981
|
onChange: (e) => setRenameDraft(e.target.value),
|
|
@@ -5817,7 +6021,7 @@ var ProjectHeader = ({
|
|
|
5817
6021
|
}
|
|
5818
6022
|
}
|
|
5819
6023
|
}
|
|
5820
|
-
) : /* @__PURE__ */
|
|
6024
|
+
) : /* @__PURE__ */ jsxs10(
|
|
5821
6025
|
Typography6,
|
|
5822
6026
|
{
|
|
5823
6027
|
variant: "subtitle2",
|
|
@@ -5830,7 +6034,7 @@ var ProjectHeader = ({
|
|
|
5830
6034
|
},
|
|
5831
6035
|
children: [
|
|
5832
6036
|
projectName,
|
|
5833
|
-
isDragOver && /* @__PURE__ */
|
|
6037
|
+
isDragOver && /* @__PURE__ */ jsx13(
|
|
5834
6038
|
Typography6,
|
|
5835
6039
|
{
|
|
5836
6040
|
component: "span",
|
|
@@ -5846,7 +6050,7 @@ var ProjectHeader = ({
|
|
|
5846
6050
|
]
|
|
5847
6051
|
}
|
|
5848
6052
|
),
|
|
5849
|
-
/* @__PURE__ */
|
|
6053
|
+
/* @__PURE__ */ jsx13(
|
|
5850
6054
|
Chip3,
|
|
5851
6055
|
{
|
|
5852
6056
|
label: conversationCount,
|
|
@@ -5866,9 +6070,9 @@ var ProjectHeader = ({
|
|
|
5866
6070
|
}
|
|
5867
6071
|
}
|
|
5868
6072
|
),
|
|
5869
|
-
isRenaming && !isUngrouped && /* @__PURE__ */
|
|
5870
|
-
/* @__PURE__ */
|
|
5871
|
-
|
|
6073
|
+
isRenaming && !isUngrouped && /* @__PURE__ */ jsxs10(Box10, { sx: { display: "flex", alignItems: "center", gap: 0.5, ml: 1 }, children: [
|
|
6074
|
+
/* @__PURE__ */ jsx13(Tooltip4, { title: "Cancel and remove", children: /* @__PURE__ */ jsx13(
|
|
6075
|
+
IconButton7,
|
|
5872
6076
|
{
|
|
5873
6077
|
size: "small",
|
|
5874
6078
|
onMouseDown: (e) => {
|
|
@@ -5877,11 +6081,11 @@ var ProjectHeader = ({
|
|
|
5877
6081
|
onRenameCancelDelete ? onRenameCancelDelete() : cancelRename();
|
|
5878
6082
|
},
|
|
5879
6083
|
sx: { color: alpha5(theme.palette.error.main, 0.9) },
|
|
5880
|
-
children: /* @__PURE__ */
|
|
6084
|
+
children: /* @__PURE__ */ jsx13(CloseIcon4, { size: 16 })
|
|
5881
6085
|
}
|
|
5882
6086
|
) }),
|
|
5883
|
-
/* @__PURE__ */
|
|
5884
|
-
|
|
6087
|
+
/* @__PURE__ */ jsx13(Tooltip4, { title: "Save", children: /* @__PURE__ */ jsx13(
|
|
6088
|
+
IconButton7,
|
|
5885
6089
|
{
|
|
5886
6090
|
size: "small",
|
|
5887
6091
|
onMouseDown: (e) => {
|
|
@@ -5890,12 +6094,12 @@ var ProjectHeader = ({
|
|
|
5890
6094
|
commitRename();
|
|
5891
6095
|
},
|
|
5892
6096
|
sx: { color: theme.palette.success.main },
|
|
5893
|
-
children: /* @__PURE__ */
|
|
6097
|
+
children: /* @__PURE__ */ jsx13(CheckIcon3, { size: 16 })
|
|
5894
6098
|
}
|
|
5895
6099
|
) })
|
|
5896
6100
|
] }),
|
|
5897
|
-
isHovered && !isDragOver && !isUngrouped && !isRenaming && /* @__PURE__ */
|
|
5898
|
-
|
|
6101
|
+
isHovered && !isDragOver && !isUngrouped && !isRenaming && /* @__PURE__ */ jsx13(Tooltip4, { title: `Add conversation to ${projectName.toLowerCase()}`, arrow: true, children: /* @__PURE__ */ jsx13(
|
|
6102
|
+
IconButton7,
|
|
5899
6103
|
{
|
|
5900
6104
|
onClick: handleAddConversation,
|
|
5901
6105
|
size: "small",
|
|
@@ -5911,18 +6115,18 @@ var ProjectHeader = ({
|
|
|
5911
6115
|
},
|
|
5912
6116
|
transition: "all 0.2s ease"
|
|
5913
6117
|
},
|
|
5914
|
-
children: /* @__PURE__ */
|
|
6118
|
+
children: /* @__PURE__ */ jsx13(AddIcon3, { size: 16 })
|
|
5915
6119
|
}
|
|
5916
6120
|
) }),
|
|
5917
|
-
!isUngrouped && !isRenaming && /* @__PURE__ */
|
|
5918
|
-
|
|
6121
|
+
!isUngrouped && !isRenaming && /* @__PURE__ */ jsx13(
|
|
6122
|
+
IconButton7,
|
|
5919
6123
|
{
|
|
5920
6124
|
size: "small",
|
|
5921
6125
|
sx: {
|
|
5922
6126
|
color: theme.palette.text.secondary,
|
|
5923
6127
|
transition: "transform 0.2s ease"
|
|
5924
6128
|
},
|
|
5925
|
-
children: isCollapsed ? /* @__PURE__ */
|
|
6129
|
+
children: isCollapsed ? /* @__PURE__ */ jsx13(ExpandMoreIcon2, { size: 16 }) : /* @__PURE__ */ jsx13(ExpandLessIcon, { size: 16 })
|
|
5926
6130
|
}
|
|
5927
6131
|
)
|
|
5928
6132
|
]
|
|
@@ -5944,7 +6148,7 @@ var TOOLTIP_COPY = {
|
|
|
5944
6148
|
var tooltip = (key) => TOOLTIP_COPY[key];
|
|
5945
6149
|
|
|
5946
6150
|
// src/chat/conversation-drawer.tsx
|
|
5947
|
-
import { Fragment as
|
|
6151
|
+
import { Fragment as Fragment7, jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
5948
6152
|
var BANDIT_AVATAR = "https://cdn.burtson.ai/images/bandit-head.png";
|
|
5949
6153
|
var coerceOptionalString = (value) => {
|
|
5950
6154
|
if (typeof value !== "string") return void 0;
|
|
@@ -5995,16 +6199,16 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
5995
6199
|
createProject,
|
|
5996
6200
|
deleteProject
|
|
5997
6201
|
} = useProjectStore();
|
|
5998
|
-
const [projectManagementOpen, setProjectManagementOpen] =
|
|
5999
|
-
const [memoryModalOpen, setMemoryModalOpen] =
|
|
6000
|
-
const [collapsedProjects, setCollapsedProjects] =
|
|
6202
|
+
const [projectManagementOpen, setProjectManagementOpen] = useState13(false);
|
|
6203
|
+
const [memoryModalOpen, setMemoryModalOpen] = useState13(false);
|
|
6204
|
+
const [collapsedProjects, setCollapsedProjects] = useState13(/* @__PURE__ */ new Set());
|
|
6001
6205
|
const didInitCollapseRef = useRef8(false);
|
|
6002
|
-
const [searchQuery, setSearchQuery] =
|
|
6003
|
-
const [menuAnchorEl, setMenuAnchorEl] =
|
|
6004
|
-
const [clearConfirmOpen, setClearConfirmOpen] =
|
|
6005
|
-
const [moveModalOpen, setMoveModalOpen] =
|
|
6006
|
-
const [conversationToMove, setConversationToMove] =
|
|
6007
|
-
const [renameProjectId, setRenameProjectId] =
|
|
6206
|
+
const [searchQuery, setSearchQuery] = useState13("");
|
|
6207
|
+
const [menuAnchorEl, setMenuAnchorEl] = useState13(null);
|
|
6208
|
+
const [clearConfirmOpen, setClearConfirmOpen] = useState13(false);
|
|
6209
|
+
const [moveModalOpen, setMoveModalOpen] = useState13(false);
|
|
6210
|
+
const [conversationToMove, setConversationToMove] = useState13(null);
|
|
6211
|
+
const [renameProjectId, setRenameProjectId] = useState13(null);
|
|
6008
6212
|
const getCustomClaim = useCallback4((key) => {
|
|
6009
6213
|
if (!user) return void 0;
|
|
6010
6214
|
const record = user;
|
|
@@ -6037,7 +6241,7 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6037
6241
|
}
|
|
6038
6242
|
return void 0;
|
|
6039
6243
|
}, [user, userDisplayName]);
|
|
6040
|
-
const [avatarImage, setAvatarImage] =
|
|
6244
|
+
const [avatarImage, setAvatarImage] = useState13(BANDIT_AVATAR);
|
|
6041
6245
|
useEffect10(() => {
|
|
6042
6246
|
const fresh = readPersistedToken();
|
|
6043
6247
|
const store = useAuthenticationStore.getState();
|
|
@@ -6197,8 +6401,8 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6197
6401
|
setMoveModalOpen(false);
|
|
6198
6402
|
setConversationToMove(null);
|
|
6199
6403
|
};
|
|
6200
|
-
return /* @__PURE__ */
|
|
6201
|
-
/* @__PURE__ */
|
|
6404
|
+
return /* @__PURE__ */ jsxs11(Fragment7, { children: [
|
|
6405
|
+
/* @__PURE__ */ jsxs11(
|
|
6202
6406
|
Drawer,
|
|
6203
6407
|
{
|
|
6204
6408
|
anchor: "left",
|
|
@@ -6240,8 +6444,8 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6240
6444
|
}
|
|
6241
6445
|
},
|
|
6242
6446
|
children: [
|
|
6243
|
-
/* @__PURE__ */
|
|
6244
|
-
|
|
6447
|
+
/* @__PURE__ */ jsxs11(
|
|
6448
|
+
Box11,
|
|
6245
6449
|
{
|
|
6246
6450
|
sx: {
|
|
6247
6451
|
p: 2,
|
|
@@ -6252,8 +6456,8 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6252
6456
|
gap: 1
|
|
6253
6457
|
},
|
|
6254
6458
|
children: [
|
|
6255
|
-
/* @__PURE__ */
|
|
6256
|
-
|
|
6459
|
+
/* @__PURE__ */ jsx14(Tooltip5, { title: "Memories", arrow: true, children: /* @__PURE__ */ jsx14(
|
|
6460
|
+
IconButton8,
|
|
6257
6461
|
{
|
|
6258
6462
|
onClick: () => setMemoryModalOpen(true),
|
|
6259
6463
|
size: "small",
|
|
@@ -6265,11 +6469,11 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6265
6469
|
bgcolor: alpha6(theme.palette.primary.main, 0.1)
|
|
6266
6470
|
}
|
|
6267
6471
|
},
|
|
6268
|
-
children: /* @__PURE__ */
|
|
6472
|
+
children: /* @__PURE__ */ jsx14(MemoryIcon, {})
|
|
6269
6473
|
}
|
|
6270
6474
|
) }),
|
|
6271
|
-
/* @__PURE__ */
|
|
6272
|
-
|
|
6475
|
+
/* @__PURE__ */ jsx14(Tooltip5, { title: tooltip("manageProjects"), arrow: true, children: /* @__PURE__ */ jsx14(
|
|
6476
|
+
IconButton8,
|
|
6273
6477
|
{
|
|
6274
6478
|
onClick: () => setProjectManagementOpen(true),
|
|
6275
6479
|
size: "small",
|
|
@@ -6281,11 +6485,11 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6281
6485
|
bgcolor: alpha6(theme.palette.primary.main, 0.1)
|
|
6282
6486
|
}
|
|
6283
6487
|
},
|
|
6284
|
-
children: /* @__PURE__ */
|
|
6488
|
+
children: /* @__PURE__ */ jsx14(FolderIcon4, {})
|
|
6285
6489
|
}
|
|
6286
6490
|
) }),
|
|
6287
|
-
/* @__PURE__ */
|
|
6288
|
-
|
|
6491
|
+
/* @__PURE__ */ jsx14(Tooltip5, { title: tooltip("conversationOptions"), arrow: true, children: /* @__PURE__ */ jsx14(
|
|
6492
|
+
IconButton8,
|
|
6289
6493
|
{
|
|
6290
6494
|
onClick: handleMenuOpen,
|
|
6291
6495
|
size: "small",
|
|
@@ -6297,11 +6501,11 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6297
6501
|
bgcolor: alpha6(theme.palette.text.primary, 0.1)
|
|
6298
6502
|
}
|
|
6299
6503
|
},
|
|
6300
|
-
children: /* @__PURE__ */
|
|
6504
|
+
children: /* @__PURE__ */ jsx14(MoreVertIcon3, {})
|
|
6301
6505
|
}
|
|
6302
6506
|
) }),
|
|
6303
|
-
isMobile && /* @__PURE__ */
|
|
6304
|
-
|
|
6507
|
+
isMobile && /* @__PURE__ */ jsx14(Tooltip5, { title: tooltip("closeConversationsPanel"), children: /* @__PURE__ */ jsx14(
|
|
6508
|
+
IconButton8,
|
|
6305
6509
|
{
|
|
6306
6510
|
onClick: (e) => {
|
|
6307
6511
|
e.preventDefault();
|
|
@@ -6317,14 +6521,14 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6317
6521
|
bgcolor: alpha6(theme.palette.error.main, 0.1)
|
|
6318
6522
|
}
|
|
6319
6523
|
},
|
|
6320
|
-
children: /* @__PURE__ */
|
|
6524
|
+
children: /* @__PURE__ */ jsx14(CloseIcon5, {})
|
|
6321
6525
|
}
|
|
6322
6526
|
) })
|
|
6323
6527
|
]
|
|
6324
6528
|
}
|
|
6325
6529
|
),
|
|
6326
|
-
/* @__PURE__ */
|
|
6327
|
-
|
|
6530
|
+
/* @__PURE__ */ jsx14(Box11, { sx: { p: 2, pb: 1 }, children: /* @__PURE__ */ jsx14(
|
|
6531
|
+
TextField7,
|
|
6328
6532
|
{
|
|
6329
6533
|
fullWidth: true,
|
|
6330
6534
|
size: "small",
|
|
@@ -6333,16 +6537,16 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6333
6537
|
onChange: (e) => setSearchQuery(e.target.value),
|
|
6334
6538
|
variant: "outlined",
|
|
6335
6539
|
InputProps: {
|
|
6336
|
-
startAdornment: /* @__PURE__ */
|
|
6337
|
-
endAdornment: searchQuery && /* @__PURE__ */
|
|
6338
|
-
|
|
6540
|
+
startAdornment: /* @__PURE__ */ jsx14(InputAdornment, { position: "start", children: /* @__PURE__ */ jsx14(SearchIcon, { size: 16, color: theme.palette.text.secondary }) }),
|
|
6541
|
+
endAdornment: searchQuery && /* @__PURE__ */ jsx14(InputAdornment, { position: "end", children: /* @__PURE__ */ jsx14(Tooltip5, { title: tooltip("clearSearch"), children: /* @__PURE__ */ jsx14(
|
|
6542
|
+
IconButton8,
|
|
6339
6543
|
{
|
|
6340
6544
|
onClick: handleSearchClear,
|
|
6341
6545
|
size: "small",
|
|
6342
6546
|
edge: "end",
|
|
6343
6547
|
"aria-label": tooltip("clearSearch"),
|
|
6344
6548
|
sx: { color: theme.palette.text.secondary },
|
|
6345
|
-
children: /* @__PURE__ */
|
|
6549
|
+
children: /* @__PURE__ */ jsx14(ClearIcon, { size: 16 })
|
|
6346
6550
|
}
|
|
6347
6551
|
) }) })
|
|
6348
6552
|
},
|
|
@@ -6359,9 +6563,9 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6359
6563
|
}
|
|
6360
6564
|
}
|
|
6361
6565
|
) }),
|
|
6362
|
-
/* @__PURE__ */
|
|
6363
|
-
/* @__PURE__ */
|
|
6364
|
-
|
|
6566
|
+
/* @__PURE__ */ jsxs11(Box11, { sx: { flex: 1, overflow: "auto", display: "flex", flexDirection: "column" }, children: [
|
|
6567
|
+
/* @__PURE__ */ jsxs11(
|
|
6568
|
+
Box11,
|
|
6365
6569
|
{
|
|
6366
6570
|
onClick: async () => {
|
|
6367
6571
|
const names = new Set(projects.map((p) => p.name));
|
|
@@ -6395,8 +6599,8 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6395
6599
|
"&:hover": { bgcolor: alpha6(theme.palette.text.primary, 0.04) }
|
|
6396
6600
|
},
|
|
6397
6601
|
children: [
|
|
6398
|
-
/* @__PURE__ */
|
|
6399
|
-
|
|
6602
|
+
/* @__PURE__ */ jsx14(
|
|
6603
|
+
Box11,
|
|
6400
6604
|
{
|
|
6401
6605
|
sx: {
|
|
6402
6606
|
width: 28,
|
|
@@ -6408,10 +6612,10 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6408
6612
|
justifyContent: "center",
|
|
6409
6613
|
flexShrink: 0
|
|
6410
6614
|
},
|
|
6411
|
-
children: /* @__PURE__ */
|
|
6615
|
+
children: /* @__PURE__ */ jsx14(FolderIcon4, { size: 16, color: theme.palette.success.main })
|
|
6412
6616
|
}
|
|
6413
6617
|
),
|
|
6414
|
-
/* @__PURE__ */
|
|
6618
|
+
/* @__PURE__ */ jsx14(
|
|
6415
6619
|
Typography7,
|
|
6416
6620
|
{
|
|
6417
6621
|
variant: "subtitle2",
|
|
@@ -6419,22 +6623,22 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6419
6623
|
children: "New Project"
|
|
6420
6624
|
}
|
|
6421
6625
|
),
|
|
6422
|
-
/* @__PURE__ */
|
|
6423
|
-
|
|
6626
|
+
/* @__PURE__ */ jsx14(Tooltip5, { title: tooltip("addProject"), arrow: true, children: /* @__PURE__ */ jsx14(
|
|
6627
|
+
IconButton8,
|
|
6424
6628
|
{
|
|
6425
6629
|
size: "small",
|
|
6426
6630
|
"aria-label": tooltip("addProject"),
|
|
6427
6631
|
sx: { color: theme.palette.success.main },
|
|
6428
|
-
children: /* @__PURE__ */
|
|
6632
|
+
children: /* @__PURE__ */ jsx14(AddIcon4, { size: 16 })
|
|
6429
6633
|
}
|
|
6430
6634
|
) })
|
|
6431
6635
|
]
|
|
6432
6636
|
}
|
|
6433
6637
|
),
|
|
6434
|
-
/* @__PURE__ */
|
|
6435
|
-
filteredProjectGroups.map((group, index) => /* @__PURE__ */
|
|
6436
|
-
group.id === null && filteredProjectGroups.length > 1 && /* @__PURE__ */
|
|
6437
|
-
|
|
6638
|
+
/* @__PURE__ */ jsx14(Divider2, { sx: { opacity: 0.3 } }),
|
|
6639
|
+
filteredProjectGroups.map((group, index) => /* @__PURE__ */ jsxs11(Box11, { children: [
|
|
6640
|
+
group.id === null && filteredProjectGroups.length > 1 && /* @__PURE__ */ jsxs11(
|
|
6641
|
+
Box11,
|
|
6438
6642
|
{
|
|
6439
6643
|
sx: {
|
|
6440
6644
|
py: 2,
|
|
@@ -6444,9 +6648,9 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6444
6648
|
gap: 2
|
|
6445
6649
|
},
|
|
6446
6650
|
children: [
|
|
6447
|
-
/* @__PURE__ */
|
|
6448
|
-
/* @__PURE__ */
|
|
6449
|
-
/* @__PURE__ */
|
|
6651
|
+
/* @__PURE__ */ jsx14(Divider2, { sx: { flex: 1, opacity: 0.6 } }),
|
|
6652
|
+
/* @__PURE__ */ jsxs11(Box11, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
6653
|
+
/* @__PURE__ */ jsx14(
|
|
6450
6654
|
InboxIcon3,
|
|
6451
6655
|
{
|
|
6452
6656
|
size: 14,
|
|
@@ -6454,7 +6658,7 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6454
6658
|
style: { opacity: 0.7 }
|
|
6455
6659
|
}
|
|
6456
6660
|
),
|
|
6457
|
-
/* @__PURE__ */
|
|
6661
|
+
/* @__PURE__ */ jsx14(
|
|
6458
6662
|
Typography7,
|
|
6459
6663
|
{
|
|
6460
6664
|
variant: "caption",
|
|
@@ -6469,12 +6673,12 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6469
6673
|
}
|
|
6470
6674
|
)
|
|
6471
6675
|
] }),
|
|
6472
|
-
/* @__PURE__ */
|
|
6676
|
+
/* @__PURE__ */ jsx14(Divider2, { sx: { flex: 1, opacity: 0.6 } })
|
|
6473
6677
|
]
|
|
6474
6678
|
}
|
|
6475
6679
|
),
|
|
6476
|
-
group.id !== null ? /* @__PURE__ */
|
|
6477
|
-
/* @__PURE__ */
|
|
6680
|
+
group.id !== null ? /* @__PURE__ */ jsxs11(Fragment7, { children: [
|
|
6681
|
+
/* @__PURE__ */ jsx14(
|
|
6478
6682
|
project_header_default,
|
|
6479
6683
|
{
|
|
6480
6684
|
projectId: group.id,
|
|
@@ -6503,8 +6707,8 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6503
6707
|
}
|
|
6504
6708
|
}
|
|
6505
6709
|
),
|
|
6506
|
-
/* @__PURE__ */
|
|
6507
|
-
group.conversations.map((conversation) => /* @__PURE__ */
|
|
6710
|
+
/* @__PURE__ */ jsx14(Collapse2, { in: !group.collapsed, children: /* @__PURE__ */ jsxs11(Box11, { sx: { pb: 1 }, children: [
|
|
6711
|
+
group.conversations.map((conversation) => /* @__PURE__ */ jsx14(
|
|
6508
6712
|
simple_conversation_item_default,
|
|
6509
6713
|
{
|
|
6510
6714
|
conversation,
|
|
@@ -6524,8 +6728,8 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6524
6728
|
},
|
|
6525
6729
|
conversation.id
|
|
6526
6730
|
)),
|
|
6527
|
-
group.conversations.length === 0 && !group.collapsed && group.id !== null && /* @__PURE__ */
|
|
6528
|
-
|
|
6731
|
+
group.conversations.length === 0 && !group.collapsed && group.id !== null && /* @__PURE__ */ jsxs11(
|
|
6732
|
+
Box11,
|
|
6529
6733
|
{
|
|
6530
6734
|
sx: {
|
|
6531
6735
|
p: 3,
|
|
@@ -6533,17 +6737,17 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6533
6737
|
color: theme.palette.text.secondary
|
|
6534
6738
|
},
|
|
6535
6739
|
children: [
|
|
6536
|
-
/* @__PURE__ */
|
|
6537
|
-
/* @__PURE__ */
|
|
6740
|
+
/* @__PURE__ */ jsx14(Typography7, { variant: "body2", children: "No conversations in this project yet" }),
|
|
6741
|
+
/* @__PURE__ */ jsx14(Typography7, { variant: "caption", sx: { mt: 1, display: "block" }, children: "Drag conversations here or use the + button above" })
|
|
6538
6742
|
]
|
|
6539
6743
|
}
|
|
6540
6744
|
)
|
|
6541
6745
|
] }) }),
|
|
6542
|
-
/* @__PURE__ */
|
|
6746
|
+
/* @__PURE__ */ jsx14(Divider2, { sx: { opacity: 0.3 } })
|
|
6543
6747
|
] }) : (
|
|
6544
6748
|
// Special handling for ungrouped - no header, just conversations in scrollable area
|
|
6545
|
-
/* @__PURE__ */
|
|
6546
|
-
|
|
6749
|
+
/* @__PURE__ */ jsx14(
|
|
6750
|
+
Box11,
|
|
6547
6751
|
{
|
|
6548
6752
|
sx: {
|
|
6549
6753
|
minHeight: 0,
|
|
@@ -6556,7 +6760,7 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6556
6760
|
mx: 1,
|
|
6557
6761
|
mb: 1
|
|
6558
6762
|
},
|
|
6559
|
-
children: group.conversations.map((conversation) => /* @__PURE__ */
|
|
6763
|
+
children: group.conversations.map((conversation) => /* @__PURE__ */ jsx14(
|
|
6560
6764
|
simple_conversation_item_default,
|
|
6561
6765
|
{
|
|
6562
6766
|
conversation,
|
|
@@ -6580,8 +6784,8 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6580
6784
|
)
|
|
6581
6785
|
)
|
|
6582
6786
|
] }, group.id || "ungrouped")),
|
|
6583
|
-
filteredProjectGroups.length === 0 && /* @__PURE__ */
|
|
6584
|
-
|
|
6787
|
+
filteredProjectGroups.length === 0 && /* @__PURE__ */ jsxs11(
|
|
6788
|
+
Box11,
|
|
6585
6789
|
{
|
|
6586
6790
|
sx: {
|
|
6587
6791
|
flex: 1,
|
|
@@ -6594,14 +6798,14 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6594
6798
|
color: theme.palette.text.secondary
|
|
6595
6799
|
},
|
|
6596
6800
|
children: [
|
|
6597
|
-
/* @__PURE__ */
|
|
6598
|
-
/* @__PURE__ */
|
|
6801
|
+
/* @__PURE__ */ jsx14(Typography7, { variant: "h6", sx: { mb: 1 }, children: searchQuery ? "No conversations found" : "No conversations yet" }),
|
|
6802
|
+
/* @__PURE__ */ jsx14(Typography7, { variant: "body2", sx: { mb: 3, maxWidth: 280 }, children: searchQuery ? `No conversations match "${searchQuery}"` : "Start your first conversation to begin organizing your chats into projects" })
|
|
6599
6803
|
]
|
|
6600
6804
|
}
|
|
6601
6805
|
)
|
|
6602
6806
|
] }),
|
|
6603
|
-
/* @__PURE__ */
|
|
6604
|
-
|
|
6807
|
+
/* @__PURE__ */ jsxs11(
|
|
6808
|
+
Box11,
|
|
6605
6809
|
{
|
|
6606
6810
|
onClick: user ? () => {
|
|
6607
6811
|
window.location.href = "/profile";
|
|
@@ -6622,7 +6826,7 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6622
6826
|
"&:hover": user ? { bgcolor: alpha6(theme.palette.primary.main, 0.08) } : void 0
|
|
6623
6827
|
},
|
|
6624
6828
|
children: [
|
|
6625
|
-
/* @__PURE__ */
|
|
6829
|
+
/* @__PURE__ */ jsx14(
|
|
6626
6830
|
Avatar6,
|
|
6627
6831
|
{
|
|
6628
6832
|
src: avatarImage,
|
|
@@ -6637,8 +6841,8 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6637
6841
|
children: avatarInitials
|
|
6638
6842
|
}
|
|
6639
6843
|
),
|
|
6640
|
-
/* @__PURE__ */
|
|
6641
|
-
|
|
6844
|
+
/* @__PURE__ */ jsxs11(
|
|
6845
|
+
Box11,
|
|
6642
6846
|
{
|
|
6643
6847
|
sx: {
|
|
6644
6848
|
minWidth: 0,
|
|
@@ -6650,7 +6854,7 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6650
6854
|
gap: 0.25
|
|
6651
6855
|
},
|
|
6652
6856
|
children: [
|
|
6653
|
-
/* @__PURE__ */
|
|
6857
|
+
/* @__PURE__ */ jsx14(
|
|
6654
6858
|
Typography7,
|
|
6655
6859
|
{
|
|
6656
6860
|
variant: "subtitle2",
|
|
@@ -6659,7 +6863,7 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6659
6863
|
children: user ? userDisplayName : "Not signed in"
|
|
6660
6864
|
}
|
|
6661
6865
|
),
|
|
6662
|
-
/* @__PURE__ */
|
|
6866
|
+
/* @__PURE__ */ jsx14(
|
|
6663
6867
|
Typography7,
|
|
6664
6868
|
{
|
|
6665
6869
|
variant: "caption",
|
|
@@ -6671,8 +6875,8 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6671
6875
|
]
|
|
6672
6876
|
}
|
|
6673
6877
|
),
|
|
6674
|
-
user && /* @__PURE__ */
|
|
6675
|
-
|
|
6878
|
+
user && /* @__PURE__ */ jsx14(
|
|
6879
|
+
Box11,
|
|
6676
6880
|
{
|
|
6677
6881
|
sx: {
|
|
6678
6882
|
flexShrink: 0,
|
|
@@ -6685,7 +6889,7 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6685
6889
|
border: `1px solid ${alpha6(theme.palette.divider, 0.8)}`,
|
|
6686
6890
|
color: theme.palette.text.secondary
|
|
6687
6891
|
},
|
|
6688
|
-
children: /* @__PURE__ */
|
|
6892
|
+
children: /* @__PURE__ */ jsx14(SettingsIcon2, { size: 16 })
|
|
6689
6893
|
}
|
|
6690
6894
|
)
|
|
6691
6895
|
]
|
|
@@ -6694,15 +6898,15 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6694
6898
|
]
|
|
6695
6899
|
}
|
|
6696
6900
|
),
|
|
6697
|
-
/* @__PURE__ */
|
|
6901
|
+
/* @__PURE__ */ jsx14(
|
|
6698
6902
|
project_management_modal_default,
|
|
6699
6903
|
{
|
|
6700
6904
|
open: projectManagementOpen,
|
|
6701
6905
|
onClose: () => setProjectManagementOpen(false)
|
|
6702
6906
|
}
|
|
6703
6907
|
),
|
|
6704
|
-
/* @__PURE__ */
|
|
6705
|
-
conversationToMove && /* @__PURE__ */
|
|
6908
|
+
/* @__PURE__ */ jsx14(memory_modal_default, { open: memoryModalOpen, onClose: () => setMemoryModalOpen(false) }),
|
|
6909
|
+
conversationToMove && /* @__PURE__ */ jsx14(
|
|
6706
6910
|
move_conversation_modal_default,
|
|
6707
6911
|
{
|
|
6708
6912
|
open: moveModalOpen,
|
|
@@ -6711,7 +6915,7 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6711
6915
|
currentProjectId: conversationToMove.projectId
|
|
6712
6916
|
}
|
|
6713
6917
|
),
|
|
6714
|
-
/* @__PURE__ */
|
|
6918
|
+
/* @__PURE__ */ jsx14(
|
|
6715
6919
|
Menu3,
|
|
6716
6920
|
{
|
|
6717
6921
|
anchorEl: menuAnchorEl,
|
|
@@ -6725,7 +6929,7 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6725
6929
|
vertical: "bottom",
|
|
6726
6930
|
horizontal: "right"
|
|
6727
6931
|
},
|
|
6728
|
-
children: /* @__PURE__ */
|
|
6932
|
+
children: /* @__PURE__ */ jsxs11(
|
|
6729
6933
|
MenuItem3,
|
|
6730
6934
|
{
|
|
6731
6935
|
onClick: () => {
|
|
@@ -6734,26 +6938,26 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6734
6938
|
},
|
|
6735
6939
|
sx: { color: theme.palette.error.main },
|
|
6736
6940
|
children: [
|
|
6737
|
-
/* @__PURE__ */
|
|
6738
|
-
/* @__PURE__ */
|
|
6941
|
+
/* @__PURE__ */ jsx14(ListItemIcon3, { children: /* @__PURE__ */ jsx14(DeleteSweepIcon, { size: 16, color: theme.palette.error.main }) }),
|
|
6942
|
+
/* @__PURE__ */ jsx14(ListItemText3, { children: "Clear All Conversations" })
|
|
6739
6943
|
]
|
|
6740
6944
|
}
|
|
6741
6945
|
)
|
|
6742
6946
|
}
|
|
6743
6947
|
),
|
|
6744
|
-
/* @__PURE__ */
|
|
6745
|
-
|
|
6948
|
+
/* @__PURE__ */ jsxs11(
|
|
6949
|
+
Dialog4,
|
|
6746
6950
|
{
|
|
6747
6951
|
open: clearConfirmOpen,
|
|
6748
6952
|
onClose: () => setClearConfirmOpen(false),
|
|
6749
6953
|
maxWidth: "sm",
|
|
6750
6954
|
fullWidth: true,
|
|
6751
6955
|
children: [
|
|
6752
|
-
/* @__PURE__ */
|
|
6753
|
-
/* @__PURE__ */
|
|
6754
|
-
/* @__PURE__ */
|
|
6755
|
-
/* @__PURE__ */
|
|
6756
|
-
/* @__PURE__ */
|
|
6956
|
+
/* @__PURE__ */ jsx14(DialogTitle3, { children: "Clear All Conversations?" }),
|
|
6957
|
+
/* @__PURE__ */ jsx14(DialogContent3, { children: /* @__PURE__ */ jsx14(Typography7, { children: "This will permanently delete all conversations and cannot be undone. Are you sure you want to continue?" }) }),
|
|
6958
|
+
/* @__PURE__ */ jsxs11(DialogActions3, { children: [
|
|
6959
|
+
/* @__PURE__ */ jsx14(Button5, { onClick: () => setClearConfirmOpen(false), children: "Cancel" }),
|
|
6960
|
+
/* @__PURE__ */ jsx14(
|
|
6757
6961
|
Button5,
|
|
6758
6962
|
{
|
|
6759
6963
|
onClick: handleClearAllConfirm,
|
|
@@ -6771,13 +6975,13 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6771
6975
|
var conversation_drawer_default = ConversationDrawer;
|
|
6772
6976
|
|
|
6773
6977
|
// src/chat/enhanced-mobile-conversations-modal.tsx
|
|
6774
|
-
import { useState as
|
|
6978
|
+
import { useState as useState14, useMemo as useMemo3, useEffect as useEffect11, useRef as useRef9, useCallback as useCallback5 } from "react";
|
|
6775
6979
|
import {
|
|
6776
|
-
Box as
|
|
6777
|
-
IconButton as
|
|
6980
|
+
Box as Box12,
|
|
6981
|
+
IconButton as IconButton9,
|
|
6778
6982
|
Modal as Modal2,
|
|
6779
6983
|
Typography as Typography8,
|
|
6780
|
-
TextField as
|
|
6984
|
+
TextField as TextField8,
|
|
6781
6985
|
InputAdornment as InputAdornment2,
|
|
6782
6986
|
Slide,
|
|
6783
6987
|
Collapse as Collapse3,
|
|
@@ -6786,7 +6990,7 @@ import {
|
|
|
6786
6990
|
MenuItem as MenuItem4,
|
|
6787
6991
|
ListItemIcon as ListItemIcon4,
|
|
6788
6992
|
ListItemText as ListItemText4,
|
|
6789
|
-
Dialog as
|
|
6993
|
+
Dialog as Dialog5,
|
|
6790
6994
|
DialogTitle as DialogTitle4,
|
|
6791
6995
|
DialogContent as DialogContent4,
|
|
6792
6996
|
DialogActions as DialogActions4,
|
|
@@ -6796,9 +7000,9 @@ import {
|
|
|
6796
7000
|
Avatar as Avatar7,
|
|
6797
7001
|
Chip as Chip4
|
|
6798
7002
|
} from "@mui/material";
|
|
6799
|
-
import { X as
|
|
7003
|
+
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 } from "lucide-react";
|
|
6800
7004
|
import { useTheme as useTheme11, alpha as alpha7 } from "@mui/material/styles";
|
|
6801
|
-
import { Fragment as
|
|
7005
|
+
import { Fragment as Fragment8, jsx as jsx15, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
6802
7006
|
var BANDIT_AVATAR2 = "https://cdn.burtson.ai/images/bandit-head.png";
|
|
6803
7007
|
var coerceOptionalString2 = (value) => {
|
|
6804
7008
|
if (typeof value !== "string") return void 0;
|
|
@@ -6849,19 +7053,19 @@ var EnhancedMobileConversationsModal = ({
|
|
|
6849
7053
|
createProject,
|
|
6850
7054
|
deleteProject
|
|
6851
7055
|
} = useProjectStore();
|
|
6852
|
-
const [projectManagementOpen, setProjectManagementOpen] =
|
|
6853
|
-
const [memoryModalOpen, setMemoryModalOpen] =
|
|
6854
|
-
const [collapsedProjects, setCollapsedProjects] =
|
|
7056
|
+
const [projectManagementOpen, setProjectManagementOpen] = useState14(false);
|
|
7057
|
+
const [memoryModalOpen, setMemoryModalOpen] = useState14(false);
|
|
7058
|
+
const [collapsedProjects, setCollapsedProjects] = useState14(/* @__PURE__ */ new Set());
|
|
6855
7059
|
const didInitCollapseRef = useRef9(false);
|
|
6856
|
-
const [searchQuery, setSearchQuery] =
|
|
6857
|
-
const [menuAnchorEl, setMenuAnchorEl] =
|
|
6858
|
-
const [clearConfirmOpen, setClearConfirmOpen] =
|
|
6859
|
-
const [moveModalOpen, setMoveModalOpen] =
|
|
6860
|
-
const [conversationToMove, setConversationToMove] =
|
|
6861
|
-
const [renameProjectId, setRenameProjectId] =
|
|
6862
|
-
const [deletedConversationIds, setDeletedConversationIds] =
|
|
6863
|
-
const [touchDragState, setTouchDragState] =
|
|
6864
|
-
const [avatarImage, setAvatarImage] =
|
|
7060
|
+
const [searchQuery, setSearchQuery] = useState14("");
|
|
7061
|
+
const [menuAnchorEl, setMenuAnchorEl] = useState14(null);
|
|
7062
|
+
const [clearConfirmOpen, setClearConfirmOpen] = useState14(false);
|
|
7063
|
+
const [moveModalOpen, setMoveModalOpen] = useState14(false);
|
|
7064
|
+
const [conversationToMove, setConversationToMove] = useState14(null);
|
|
7065
|
+
const [renameProjectId, setRenameProjectId] = useState14(null);
|
|
7066
|
+
const [deletedConversationIds, setDeletedConversationIds] = useState14(/* @__PURE__ */ new Set());
|
|
7067
|
+
const [touchDragState, setTouchDragState] = useState14({ conversationId: null, originProjectId: null, hoverProjectId: null });
|
|
7068
|
+
const [avatarImage, setAvatarImage] = useState14(BANDIT_AVATAR2);
|
|
6865
7069
|
const getCustomClaim = useCallback5((key) => {
|
|
6866
7070
|
if (!user) return void 0;
|
|
6867
7071
|
const record = user;
|
|
@@ -7132,8 +7336,8 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7132
7336
|
return changed ? next : prev;
|
|
7133
7337
|
});
|
|
7134
7338
|
}, [conversations]);
|
|
7135
|
-
return /* @__PURE__ */
|
|
7136
|
-
/* @__PURE__ */
|
|
7339
|
+
return /* @__PURE__ */ jsxs12(Fragment8, { children: [
|
|
7340
|
+
/* @__PURE__ */ jsx15(
|
|
7137
7341
|
Modal2,
|
|
7138
7342
|
{
|
|
7139
7343
|
open,
|
|
@@ -7142,8 +7346,8 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7142
7346
|
display: "flex",
|
|
7143
7347
|
alignItems: "flex-end"
|
|
7144
7348
|
},
|
|
7145
|
-
children: /* @__PURE__ */
|
|
7146
|
-
|
|
7349
|
+
children: /* @__PURE__ */ jsx15(Slide, { direction: "up", in: open, children: /* @__PURE__ */ jsxs12(
|
|
7350
|
+
Box12,
|
|
7147
7351
|
{
|
|
7148
7352
|
sx: {
|
|
7149
7353
|
width: "100%",
|
|
@@ -7156,7 +7360,7 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7156
7360
|
overflow: "hidden"
|
|
7157
7361
|
},
|
|
7158
7362
|
children: [
|
|
7159
|
-
/* @__PURE__ */
|
|
7363
|
+
/* @__PURE__ */ jsx15(
|
|
7160
7364
|
AppBar,
|
|
7161
7365
|
{
|
|
7162
7366
|
position: "static",
|
|
@@ -7166,9 +7370,9 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7166
7370
|
color: theme.palette.text.primary,
|
|
7167
7371
|
borderBottom: `1px solid ${theme.palette.divider}`
|
|
7168
7372
|
},
|
|
7169
|
-
children: /* @__PURE__ */
|
|
7170
|
-
/* @__PURE__ */
|
|
7171
|
-
visibleConversationCount > 0 && /* @__PURE__ */
|
|
7373
|
+
children: /* @__PURE__ */ jsxs12(Toolbar, { children: [
|
|
7374
|
+
/* @__PURE__ */ jsx15(Typography8, { variant: "h6", sx: { flex: 1, fontWeight: 600 }, children: "Conversations" }),
|
|
7375
|
+
visibleConversationCount > 0 && /* @__PURE__ */ jsx15(
|
|
7172
7376
|
Chip4,
|
|
7173
7377
|
{
|
|
7174
7378
|
label: visibleConversationCount,
|
|
@@ -7181,44 +7385,44 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7181
7385
|
}
|
|
7182
7386
|
}
|
|
7183
7387
|
),
|
|
7184
|
-
/* @__PURE__ */
|
|
7185
|
-
|
|
7388
|
+
/* @__PURE__ */ jsx15(
|
|
7389
|
+
IconButton9,
|
|
7186
7390
|
{
|
|
7187
7391
|
onClick: () => setMemoryModalOpen(true),
|
|
7188
7392
|
"aria-label": "Memory",
|
|
7189
7393
|
sx: { color: theme.palette.text.secondary },
|
|
7190
|
-
children: /* @__PURE__ */
|
|
7394
|
+
children: /* @__PURE__ */ jsx15(MemoryIcon2, {})
|
|
7191
7395
|
}
|
|
7192
7396
|
),
|
|
7193
|
-
/* @__PURE__ */
|
|
7194
|
-
|
|
7397
|
+
/* @__PURE__ */ jsx15(
|
|
7398
|
+
IconButton9,
|
|
7195
7399
|
{
|
|
7196
7400
|
onClick: () => setProjectManagementOpen(true),
|
|
7197
7401
|
sx: { color: theme.palette.text.secondary },
|
|
7198
|
-
children: /* @__PURE__ */
|
|
7402
|
+
children: /* @__PURE__ */ jsx15(FolderIcon5, {})
|
|
7199
7403
|
}
|
|
7200
7404
|
),
|
|
7201
|
-
/* @__PURE__ */
|
|
7202
|
-
|
|
7405
|
+
/* @__PURE__ */ jsx15(
|
|
7406
|
+
IconButton9,
|
|
7203
7407
|
{
|
|
7204
7408
|
onClick: handleMenuOpen,
|
|
7205
7409
|
sx: { color: theme.palette.text.secondary },
|
|
7206
|
-
children: /* @__PURE__ */
|
|
7410
|
+
children: /* @__PURE__ */ jsx15(MoreVertIcon4, {})
|
|
7207
7411
|
}
|
|
7208
7412
|
),
|
|
7209
|
-
/* @__PURE__ */
|
|
7210
|
-
|
|
7413
|
+
/* @__PURE__ */ jsx15(
|
|
7414
|
+
IconButton9,
|
|
7211
7415
|
{
|
|
7212
7416
|
onClick: onClose,
|
|
7213
7417
|
sx: { color: theme.palette.text.secondary },
|
|
7214
|
-
children: /* @__PURE__ */
|
|
7418
|
+
children: /* @__PURE__ */ jsx15(CloseIcon6, {})
|
|
7215
7419
|
}
|
|
7216
7420
|
)
|
|
7217
7421
|
] })
|
|
7218
7422
|
}
|
|
7219
7423
|
),
|
|
7220
|
-
/* @__PURE__ */
|
|
7221
|
-
|
|
7424
|
+
/* @__PURE__ */ jsx15(Box12, { sx: { p: 2, pb: 1 }, children: /* @__PURE__ */ jsx15(
|
|
7425
|
+
TextField8,
|
|
7222
7426
|
{
|
|
7223
7427
|
fullWidth: true,
|
|
7224
7428
|
size: "small",
|
|
@@ -7227,22 +7431,22 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7227
7431
|
onChange: (e) => setSearchQuery(e.target.value),
|
|
7228
7432
|
variant: "outlined",
|
|
7229
7433
|
InputProps: {
|
|
7230
|
-
startAdornment: /* @__PURE__ */
|
|
7231
|
-
endAdornment: searchQuery && /* @__PURE__ */
|
|
7232
|
-
|
|
7434
|
+
startAdornment: /* @__PURE__ */ jsx15(InputAdornment2, { position: "start", children: /* @__PURE__ */ jsx15(SearchIcon2, { size: 16, color: theme.palette.text.secondary }) }),
|
|
7435
|
+
endAdornment: searchQuery && /* @__PURE__ */ jsx15(InputAdornment2, { position: "end", children: /* @__PURE__ */ jsx15(
|
|
7436
|
+
IconButton9,
|
|
7233
7437
|
{
|
|
7234
7438
|
onClick: handleSearchClear,
|
|
7235
7439
|
size: "small",
|
|
7236
7440
|
edge: "end",
|
|
7237
7441
|
sx: { color: theme.palette.text.secondary },
|
|
7238
|
-
children: /* @__PURE__ */
|
|
7442
|
+
children: /* @__PURE__ */ jsx15(ClearIcon2, { size: 16 })
|
|
7239
7443
|
}
|
|
7240
7444
|
) })
|
|
7241
7445
|
}
|
|
7242
7446
|
}
|
|
7243
7447
|
) }),
|
|
7244
|
-
/* @__PURE__ */
|
|
7245
|
-
|
|
7448
|
+
/* @__PURE__ */ jsxs12(
|
|
7449
|
+
Box12,
|
|
7246
7450
|
{
|
|
7247
7451
|
sx: {
|
|
7248
7452
|
flex: 1,
|
|
@@ -7253,8 +7457,8 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7253
7457
|
pb: 2
|
|
7254
7458
|
},
|
|
7255
7459
|
children: [
|
|
7256
|
-
touchDragActive && activeDragConversation && /* @__PURE__ */
|
|
7257
|
-
|
|
7460
|
+
touchDragActive && activeDragConversation && /* @__PURE__ */ jsxs12(
|
|
7461
|
+
Box12,
|
|
7258
7462
|
{
|
|
7259
7463
|
sx: {
|
|
7260
7464
|
position: "absolute",
|
|
@@ -7279,7 +7483,7 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7279
7483
|
overflow: "hidden"
|
|
7280
7484
|
},
|
|
7281
7485
|
children: [
|
|
7282
|
-
/* @__PURE__ */
|
|
7486
|
+
/* @__PURE__ */ jsxs12(
|
|
7283
7487
|
Typography8,
|
|
7284
7488
|
{
|
|
7285
7489
|
variant: "caption",
|
|
@@ -7292,8 +7496,8 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7292
7496
|
},
|
|
7293
7497
|
children: [
|
|
7294
7498
|
"Move",
|
|
7295
|
-
/* @__PURE__ */
|
|
7296
|
-
|
|
7499
|
+
/* @__PURE__ */ jsxs12(
|
|
7500
|
+
Box12,
|
|
7297
7501
|
{
|
|
7298
7502
|
component: "span",
|
|
7299
7503
|
sx: {
|
|
@@ -7313,7 +7517,7 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7313
7517
|
]
|
|
7314
7518
|
}
|
|
7315
7519
|
),
|
|
7316
|
-
/* @__PURE__ */
|
|
7520
|
+
/* @__PURE__ */ jsx15(
|
|
7317
7521
|
Typography8,
|
|
7318
7522
|
{
|
|
7319
7523
|
variant: "caption",
|
|
@@ -7322,11 +7526,11 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7322
7526
|
fontWeight: 500,
|
|
7323
7527
|
whiteSpace: "nowrap"
|
|
7324
7528
|
},
|
|
7325
|
-
children: activeHoverLabel ? /* @__PURE__ */
|
|
7529
|
+
children: activeHoverLabel ? /* @__PURE__ */ jsxs12(Fragment8, { children: [
|
|
7326
7530
|
"to",
|
|
7327
7531
|
" ",
|
|
7328
|
-
/* @__PURE__ */
|
|
7329
|
-
|
|
7532
|
+
/* @__PURE__ */ jsx15(
|
|
7533
|
+
Box12,
|
|
7330
7534
|
{
|
|
7331
7535
|
component: "span",
|
|
7332
7536
|
sx: {
|
|
@@ -7342,8 +7546,8 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7342
7546
|
]
|
|
7343
7547
|
}
|
|
7344
7548
|
),
|
|
7345
|
-
/* @__PURE__ */
|
|
7346
|
-
|
|
7549
|
+
/* @__PURE__ */ jsxs12(
|
|
7550
|
+
Box12,
|
|
7347
7551
|
{
|
|
7348
7552
|
onClick: async () => {
|
|
7349
7553
|
const names = new Set(projects.map((p) => p.name));
|
|
@@ -7377,8 +7581,8 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7377
7581
|
"&:hover": { bgcolor: alpha7(theme.palette.text.primary, 0.04) }
|
|
7378
7582
|
},
|
|
7379
7583
|
children: [
|
|
7380
|
-
/* @__PURE__ */
|
|
7381
|
-
|
|
7584
|
+
/* @__PURE__ */ jsx15(
|
|
7585
|
+
Box12,
|
|
7382
7586
|
{
|
|
7383
7587
|
sx: {
|
|
7384
7588
|
width: 28,
|
|
@@ -7390,10 +7594,10 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7390
7594
|
justifyContent: "center",
|
|
7391
7595
|
flexShrink: 0
|
|
7392
7596
|
},
|
|
7393
|
-
children: /* @__PURE__ */
|
|
7597
|
+
children: /* @__PURE__ */ jsx15(FolderIcon5, { size: 16, color: theme.palette.success.main })
|
|
7394
7598
|
}
|
|
7395
7599
|
),
|
|
7396
|
-
/* @__PURE__ */
|
|
7600
|
+
/* @__PURE__ */ jsx15(
|
|
7397
7601
|
Typography8,
|
|
7398
7602
|
{
|
|
7399
7603
|
variant: "subtitle2",
|
|
@@ -7401,14 +7605,14 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7401
7605
|
children: "New Project"
|
|
7402
7606
|
}
|
|
7403
7607
|
),
|
|
7404
|
-
/* @__PURE__ */
|
|
7608
|
+
/* @__PURE__ */ jsx15(IconButton9, { size: "small", sx: { color: theme.palette.success.main }, children: /* @__PURE__ */ jsx15(AddIcon5, { size: 16 }) })
|
|
7405
7609
|
]
|
|
7406
7610
|
}
|
|
7407
7611
|
),
|
|
7408
|
-
/* @__PURE__ */
|
|
7409
|
-
filteredProjectGroups.map((group, index) => /* @__PURE__ */
|
|
7410
|
-
group.id === null && filteredProjectGroups.length > 1 && /* @__PURE__ */
|
|
7411
|
-
|
|
7612
|
+
/* @__PURE__ */ jsx15(Divider3, { sx: { opacity: 0.3 } }),
|
|
7613
|
+
filteredProjectGroups.map((group, index) => /* @__PURE__ */ jsxs12(Box12, { children: [
|
|
7614
|
+
group.id === null && filteredProjectGroups.length > 1 && /* @__PURE__ */ jsxs12(
|
|
7615
|
+
Box12,
|
|
7412
7616
|
{
|
|
7413
7617
|
sx: {
|
|
7414
7618
|
py: 2,
|
|
@@ -7418,9 +7622,9 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7418
7622
|
gap: 2
|
|
7419
7623
|
},
|
|
7420
7624
|
children: [
|
|
7421
|
-
/* @__PURE__ */
|
|
7422
|
-
/* @__PURE__ */
|
|
7423
|
-
/* @__PURE__ */
|
|
7625
|
+
/* @__PURE__ */ jsx15(Divider3, { sx: { flex: 1, opacity: 0.6 } }),
|
|
7626
|
+
/* @__PURE__ */ jsxs12(Box12, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
7627
|
+
/* @__PURE__ */ jsx15(
|
|
7424
7628
|
InboxIcon4,
|
|
7425
7629
|
{
|
|
7426
7630
|
size: 14,
|
|
@@ -7428,7 +7632,7 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7428
7632
|
style: { opacity: 0.7 }
|
|
7429
7633
|
}
|
|
7430
7634
|
),
|
|
7431
|
-
/* @__PURE__ */
|
|
7635
|
+
/* @__PURE__ */ jsx15(
|
|
7432
7636
|
Typography8,
|
|
7433
7637
|
{
|
|
7434
7638
|
variant: "caption",
|
|
@@ -7443,12 +7647,12 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7443
7647
|
}
|
|
7444
7648
|
)
|
|
7445
7649
|
] }),
|
|
7446
|
-
/* @__PURE__ */
|
|
7650
|
+
/* @__PURE__ */ jsx15(Divider3, { sx: { flex: 1, opacity: 0.6 } })
|
|
7447
7651
|
]
|
|
7448
7652
|
}
|
|
7449
7653
|
),
|
|
7450
|
-
group.id !== null ? /* @__PURE__ */
|
|
7451
|
-
/* @__PURE__ */
|
|
7654
|
+
group.id !== null ? /* @__PURE__ */ jsxs12(Fragment8, { children: [
|
|
7655
|
+
/* @__PURE__ */ jsx15(
|
|
7452
7656
|
project_header_default,
|
|
7453
7657
|
{
|
|
7454
7658
|
projectId: group.id,
|
|
@@ -7478,8 +7682,8 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7478
7682
|
isTouchTarget: touchDragActive && touchDragState.hoverProjectId === group.id
|
|
7479
7683
|
}
|
|
7480
7684
|
),
|
|
7481
|
-
/* @__PURE__ */
|
|
7482
|
-
|
|
7685
|
+
/* @__PURE__ */ jsx15(Collapse3, { in: !group.collapsed, children: /* @__PURE__ */ jsx15(
|
|
7686
|
+
Box12,
|
|
7483
7687
|
{
|
|
7484
7688
|
"data-project-id": group.id ?? "__ungrouped",
|
|
7485
7689
|
sx: {
|
|
@@ -7489,7 +7693,7 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7489
7693
|
transition: "border 0.2s ease, background-color 0.2s ease",
|
|
7490
7694
|
backgroundColor: touchDragActive && touchDragState.hoverProjectId === group.id ? alpha7(theme.palette.primary.main, 0.08) : "transparent"
|
|
7491
7695
|
},
|
|
7492
|
-
children: group.conversations.map((conversation) => /* @__PURE__ */
|
|
7696
|
+
children: group.conversations.map((conversation) => /* @__PURE__ */ jsx15(
|
|
7493
7697
|
simple_conversation_item_default,
|
|
7494
7698
|
{
|
|
7495
7699
|
conversation,
|
|
@@ -7523,8 +7727,8 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7523
7727
|
) })
|
|
7524
7728
|
] }) : (
|
|
7525
7729
|
// Special handling for ungrouped - no header, just conversations in scrollable area
|
|
7526
|
-
/* @__PURE__ */
|
|
7527
|
-
|
|
7730
|
+
/* @__PURE__ */ jsx15(
|
|
7731
|
+
Box12,
|
|
7528
7732
|
{
|
|
7529
7733
|
sx: {
|
|
7530
7734
|
minHeight: 0,
|
|
@@ -7540,7 +7744,7 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7540
7744
|
backgroundColor: touchDragActive && touchDragState.hoverProjectId === "__ungrouped" ? alpha7(theme.palette.primary.main, 0.08) : alpha7(theme.palette.background.default, 0.3)
|
|
7541
7745
|
},
|
|
7542
7746
|
"data-project-id": "__ungrouped",
|
|
7543
|
-
children: group.conversations.map((conversation) => /* @__PURE__ */
|
|
7747
|
+
children: group.conversations.map((conversation) => /* @__PURE__ */ jsx15(
|
|
7544
7748
|
simple_conversation_item_default,
|
|
7545
7749
|
{
|
|
7546
7750
|
conversation,
|
|
@@ -7574,8 +7778,8 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7574
7778
|
)
|
|
7575
7779
|
)
|
|
7576
7780
|
] }, group.id || "ungrouped")),
|
|
7577
|
-
filteredProjectGroups.length === 0 && /* @__PURE__ */
|
|
7578
|
-
|
|
7781
|
+
filteredProjectGroups.length === 0 && /* @__PURE__ */ jsxs12(
|
|
7782
|
+
Box12,
|
|
7579
7783
|
{
|
|
7580
7784
|
sx: {
|
|
7581
7785
|
flex: 1,
|
|
@@ -7588,16 +7792,16 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7588
7792
|
color: theme.palette.text.secondary
|
|
7589
7793
|
},
|
|
7590
7794
|
children: [
|
|
7591
|
-
/* @__PURE__ */
|
|
7592
|
-
/* @__PURE__ */
|
|
7795
|
+
/* @__PURE__ */ jsx15(Typography8, { variant: "h6", sx: { mb: 1 }, children: searchQuery ? "No conversations found" : "No conversations yet" }),
|
|
7796
|
+
/* @__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" })
|
|
7593
7797
|
]
|
|
7594
7798
|
}
|
|
7595
7799
|
)
|
|
7596
7800
|
]
|
|
7597
7801
|
}
|
|
7598
7802
|
),
|
|
7599
|
-
/* @__PURE__ */
|
|
7600
|
-
|
|
7803
|
+
/* @__PURE__ */ jsxs12(
|
|
7804
|
+
Box12,
|
|
7601
7805
|
{
|
|
7602
7806
|
onClick: user ? () => {
|
|
7603
7807
|
window.location.href = "/profile";
|
|
@@ -7614,7 +7818,7 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7614
7818
|
cursor: user ? "pointer" : "default"
|
|
7615
7819
|
},
|
|
7616
7820
|
children: [
|
|
7617
|
-
/* @__PURE__ */
|
|
7821
|
+
/* @__PURE__ */ jsx15(
|
|
7618
7822
|
Avatar7,
|
|
7619
7823
|
{
|
|
7620
7824
|
src: avatarImage,
|
|
@@ -7629,8 +7833,8 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7629
7833
|
children: avatarInitials
|
|
7630
7834
|
}
|
|
7631
7835
|
),
|
|
7632
|
-
/* @__PURE__ */
|
|
7633
|
-
/* @__PURE__ */
|
|
7836
|
+
/* @__PURE__ */ jsxs12(Box12, { sx: { display: "flex", flexDirection: "column", flex: 1, minWidth: 0, gap: 0.25 }, children: [
|
|
7837
|
+
/* @__PURE__ */ jsx15(
|
|
7634
7838
|
Typography8,
|
|
7635
7839
|
{
|
|
7636
7840
|
variant: "subtitle2",
|
|
@@ -7639,7 +7843,7 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7639
7843
|
children: user ? userDisplayName : "Not signed in"
|
|
7640
7844
|
}
|
|
7641
7845
|
),
|
|
7642
|
-
/* @__PURE__ */
|
|
7846
|
+
/* @__PURE__ */ jsx15(
|
|
7643
7847
|
Typography8,
|
|
7644
7848
|
{
|
|
7645
7849
|
variant: "caption",
|
|
@@ -7649,8 +7853,8 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7649
7853
|
}
|
|
7650
7854
|
)
|
|
7651
7855
|
] }),
|
|
7652
|
-
user && /* @__PURE__ */
|
|
7653
|
-
|
|
7856
|
+
user && /* @__PURE__ */ jsx15(
|
|
7857
|
+
Box12,
|
|
7654
7858
|
{
|
|
7655
7859
|
sx: {
|
|
7656
7860
|
flexShrink: 0,
|
|
@@ -7663,7 +7867,7 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7663
7867
|
border: `1px solid ${alpha7(theme.palette.divider, 0.8)}`,
|
|
7664
7868
|
color: theme.palette.text.secondary
|
|
7665
7869
|
},
|
|
7666
|
-
children: /* @__PURE__ */
|
|
7870
|
+
children: /* @__PURE__ */ jsx15(SettingsIcon3, { size: 16 })
|
|
7667
7871
|
}
|
|
7668
7872
|
)
|
|
7669
7873
|
]
|
|
@@ -7674,15 +7878,15 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7674
7878
|
) })
|
|
7675
7879
|
}
|
|
7676
7880
|
),
|
|
7677
|
-
/* @__PURE__ */
|
|
7881
|
+
/* @__PURE__ */ jsx15(
|
|
7678
7882
|
project_management_modal_default,
|
|
7679
7883
|
{
|
|
7680
7884
|
open: projectManagementOpen,
|
|
7681
7885
|
onClose: () => setProjectManagementOpen(false)
|
|
7682
7886
|
}
|
|
7683
7887
|
),
|
|
7684
|
-
/* @__PURE__ */
|
|
7685
|
-
conversationToMove && /* @__PURE__ */
|
|
7888
|
+
/* @__PURE__ */ jsx15(memory_modal_default, { open: memoryModalOpen, onClose: () => setMemoryModalOpen(false) }),
|
|
7889
|
+
conversationToMove && /* @__PURE__ */ jsx15(
|
|
7686
7890
|
move_conversation_modal_default,
|
|
7687
7891
|
{
|
|
7688
7892
|
open: moveModalOpen,
|
|
@@ -7691,7 +7895,7 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7691
7895
|
currentProjectId: conversationToMove.projectId
|
|
7692
7896
|
}
|
|
7693
7897
|
),
|
|
7694
|
-
/* @__PURE__ */
|
|
7898
|
+
/* @__PURE__ */ jsx15(
|
|
7695
7899
|
Menu4,
|
|
7696
7900
|
{
|
|
7697
7901
|
anchorEl: menuAnchorEl,
|
|
@@ -7705,7 +7909,7 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7705
7909
|
vertical: "bottom",
|
|
7706
7910
|
horizontal: "right"
|
|
7707
7911
|
},
|
|
7708
|
-
children: /* @__PURE__ */
|
|
7912
|
+
children: /* @__PURE__ */ jsxs12(
|
|
7709
7913
|
MenuItem4,
|
|
7710
7914
|
{
|
|
7711
7915
|
onClick: () => {
|
|
@@ -7715,26 +7919,26 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7715
7919
|
disabled: visibleConversationCount === 0,
|
|
7716
7920
|
sx: { color: theme.palette.error.main },
|
|
7717
7921
|
children: [
|
|
7718
|
-
/* @__PURE__ */
|
|
7719
|
-
/* @__PURE__ */
|
|
7922
|
+
/* @__PURE__ */ jsx15(ListItemIcon4, { children: /* @__PURE__ */ jsx15(DeleteSweepIcon2, { size: 16, color: theme.palette.error.main }) }),
|
|
7923
|
+
/* @__PURE__ */ jsx15(ListItemText4, { children: "Clear All Conversations" })
|
|
7720
7924
|
]
|
|
7721
7925
|
}
|
|
7722
7926
|
)
|
|
7723
7927
|
}
|
|
7724
7928
|
),
|
|
7725
|
-
/* @__PURE__ */
|
|
7726
|
-
|
|
7929
|
+
/* @__PURE__ */ jsxs12(
|
|
7930
|
+
Dialog5,
|
|
7727
7931
|
{
|
|
7728
7932
|
open: clearConfirmOpen,
|
|
7729
7933
|
onClose: () => setClearConfirmOpen(false),
|
|
7730
7934
|
maxWidth: "sm",
|
|
7731
7935
|
fullWidth: true,
|
|
7732
7936
|
children: [
|
|
7733
|
-
/* @__PURE__ */
|
|
7734
|
-
/* @__PURE__ */
|
|
7735
|
-
/* @__PURE__ */
|
|
7736
|
-
/* @__PURE__ */
|
|
7737
|
-
/* @__PURE__ */
|
|
7937
|
+
/* @__PURE__ */ jsx15(DialogTitle4, { children: "Clear All Conversations?" }),
|
|
7938
|
+
/* @__PURE__ */ jsx15(DialogContent4, { children: /* @__PURE__ */ jsx15(Typography8, { children: visibleConversationCount === 0 ? "No conversations available to clear." : `This will permanently delete ${visibleConversationCount} conversation${visibleConversationCount === 1 ? "" : "s"} and cannot be undone.` }) }),
|
|
7939
|
+
/* @__PURE__ */ jsxs12(DialogActions4, { children: [
|
|
7940
|
+
/* @__PURE__ */ jsx15(Button6, { onClick: () => setClearConfirmOpen(false), children: "Cancel" }),
|
|
7941
|
+
/* @__PURE__ */ jsx15(
|
|
7738
7942
|
Button6,
|
|
7739
7943
|
{
|
|
7740
7944
|
onClick: handleClearAllConfirm,
|
|
@@ -7753,7 +7957,7 @@ var enhanced_mobile_conversations_modal_default = EnhancedMobileConversationsMod
|
|
|
7753
7957
|
|
|
7754
7958
|
// src/chat/chat-app-bar.tsx
|
|
7755
7959
|
import { shallow as shallow2 } from "zustand/shallow";
|
|
7756
|
-
import { Fragment as
|
|
7960
|
+
import { Fragment as Fragment9, jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
7757
7961
|
var CDN_BASE = "https://cdn.burtson.ai/";
|
|
7758
7962
|
var banditHead = `${CDN_BASE}/images/bandit-head.png`;
|
|
7759
7963
|
var modelAvatars = {
|
|
@@ -7800,12 +8004,12 @@ var ChatAppBar = ({
|
|
|
7800
8004
|
menuBackground,
|
|
7801
8005
|
menuText
|
|
7802
8006
|
} = theme.palette.chat.appBar;
|
|
7803
|
-
const [modelAnchorEl, setModelAnchorEl] =
|
|
7804
|
-
const [engineAnchorEl, setEngineAnchorEl] =
|
|
7805
|
-
const [voiceAnchorEl, setVoiceAnchorEl] =
|
|
7806
|
-
const [modalOpen, setModalOpen] =
|
|
7807
|
-
const [confirmModelChangeOpen, setConfirmModelChangeOpen] =
|
|
7808
|
-
const [pendingModel, setPendingModel] =
|
|
8007
|
+
const [modelAnchorEl, setModelAnchorEl] = useState15(null);
|
|
8008
|
+
const [engineAnchorEl, setEngineAnchorEl] = useState15(null);
|
|
8009
|
+
const [voiceAnchorEl, setVoiceAnchorEl] = useState15(null);
|
|
8010
|
+
const [modalOpen, setModalOpen] = useState15(false);
|
|
8011
|
+
const [confirmModelChangeOpen, setConfirmModelChangeOpen] = useState15(false);
|
|
8012
|
+
const [pendingModel, setPendingModel] = useState15(null);
|
|
7809
8013
|
const { conversations, currentId, createNewConversation, _hasHydrated } = useConversationStore();
|
|
7810
8014
|
const { preferences } = usePreferencesStore();
|
|
7811
8015
|
const { settings: packageSettings } = usePackageSettingsStore();
|
|
@@ -7849,16 +8053,16 @@ var ChatAppBar = ({
|
|
|
7849
8053
|
};
|
|
7850
8054
|
const syncIndicatorIcon = (() => {
|
|
7851
8055
|
if (isPlaygroundMode2 || !syncEnabled) {
|
|
7852
|
-
return /* @__PURE__ */
|
|
8056
|
+
return /* @__PURE__ */ jsx16(CloudOffIcon, { fontSize: "small", color: "disabled" });
|
|
7853
8057
|
}
|
|
7854
8058
|
switch (syncStatus) {
|
|
7855
8059
|
case "syncing":
|
|
7856
|
-
return /* @__PURE__ */
|
|
8060
|
+
return /* @__PURE__ */ jsx16(SyncIcon, { fontSize: "small", sx: syncSpinSx, color: "primary" });
|
|
7857
8061
|
case "error":
|
|
7858
|
-
return /* @__PURE__ */
|
|
8062
|
+
return /* @__PURE__ */ jsx16(ErrorOutlineIcon, { fontSize: "small", color: "error" });
|
|
7859
8063
|
case "idle":
|
|
7860
8064
|
default:
|
|
7861
|
-
return /* @__PURE__ */
|
|
8065
|
+
return /* @__PURE__ */ jsx16(CloudDoneIcon, { fontSize: "small", color: "success" });
|
|
7862
8066
|
}
|
|
7863
8067
|
})();
|
|
7864
8068
|
const syncTooltip = (() => {
|
|
@@ -7964,9 +8168,9 @@ var ChatAppBar = ({
|
|
|
7964
8168
|
}
|
|
7965
8169
|
safeNavigate("/");
|
|
7966
8170
|
}
|
|
7967
|
-
return /* @__PURE__ */
|
|
7968
|
-
/* @__PURE__ */
|
|
7969
|
-
|
|
8171
|
+
return /* @__PURE__ */ jsxs13(Fragment9, { children: [
|
|
8172
|
+
/* @__PURE__ */ jsxs13(
|
|
8173
|
+
Box13,
|
|
7970
8174
|
{
|
|
7971
8175
|
sx: {
|
|
7972
8176
|
position: "fixed",
|
|
@@ -7986,8 +8190,8 @@ var ChatAppBar = ({
|
|
|
7986
8190
|
}
|
|
7987
8191
|
},
|
|
7988
8192
|
children: [
|
|
7989
|
-
/* @__PURE__ */
|
|
7990
|
-
|
|
8193
|
+
/* @__PURE__ */ jsxs13(
|
|
8194
|
+
Box13,
|
|
7991
8195
|
{
|
|
7992
8196
|
sx: {
|
|
7993
8197
|
display: "flex",
|
|
@@ -8007,17 +8211,17 @@ var ChatAppBar = ({
|
|
|
8007
8211
|
}
|
|
8008
8212
|
},
|
|
8009
8213
|
children: [
|
|
8010
|
-
/* @__PURE__ */
|
|
8011
|
-
|
|
8214
|
+
/* @__PURE__ */ jsx16(Tooltip6, { title: homeTooltip, arrow: true, children: /* @__PURE__ */ jsx16(
|
|
8215
|
+
IconButton10,
|
|
8012
8216
|
{
|
|
8013
8217
|
onClick: goToHome,
|
|
8014
8218
|
sx: pillButtonStyles,
|
|
8015
8219
|
"aria-label": "Go to home page",
|
|
8016
|
-
children: /* @__PURE__ */
|
|
8220
|
+
children: /* @__PURE__ */ jsx16(HomeIcon, {})
|
|
8017
8221
|
}
|
|
8018
8222
|
) }),
|
|
8019
|
-
showLimitedAdminPanel() && /* @__PURE__ */
|
|
8020
|
-
|
|
8223
|
+
showLimitedAdminPanel() && /* @__PURE__ */ jsx16(Tooltip6, { title: "Management & Settings", arrow: true, children: /* @__PURE__ */ jsx16(
|
|
8224
|
+
IconButton10,
|
|
8021
8225
|
{
|
|
8022
8226
|
onClick: () => safeNavigate(managementPath),
|
|
8023
8227
|
sx: {
|
|
@@ -8028,11 +8232,11 @@ var ChatAppBar = ({
|
|
|
8028
8232
|
}
|
|
8029
8233
|
},
|
|
8030
8234
|
"aria-label": "Open management settings",
|
|
8031
|
-
children: /* @__PURE__ */
|
|
8235
|
+
children: /* @__PURE__ */ jsx16(SettingsIcon, {})
|
|
8032
8236
|
}
|
|
8033
8237
|
) }),
|
|
8034
|
-
/* @__PURE__ */
|
|
8035
|
-
|
|
8238
|
+
/* @__PURE__ */ jsx16(Tooltip6, { title: syncTooltip, arrow: true, children: /* @__PURE__ */ jsxs13(
|
|
8239
|
+
IconButton10,
|
|
8036
8240
|
{
|
|
8037
8241
|
onClick: handleSyncBadgeClick,
|
|
8038
8242
|
disabled: syncButtonDisabled,
|
|
@@ -8047,8 +8251,8 @@ var ChatAppBar = ({
|
|
|
8047
8251
|
"aria-label": "Conversation sync status",
|
|
8048
8252
|
children: [
|
|
8049
8253
|
syncIndicatorIcon,
|
|
8050
|
-
pendingCount > 0 && !syncButtonDisabled && syncStatus !== "syncing" && /* @__PURE__ */
|
|
8051
|
-
|
|
8254
|
+
pendingCount > 0 && !syncButtonDisabled && syncStatus !== "syncing" && /* @__PURE__ */ jsx16(
|
|
8255
|
+
Box13,
|
|
8052
8256
|
{
|
|
8053
8257
|
sx: {
|
|
8054
8258
|
position: "absolute",
|
|
@@ -8073,8 +8277,8 @@ var ChatAppBar = ({
|
|
|
8073
8277
|
]
|
|
8074
8278
|
}
|
|
8075
8279
|
) }),
|
|
8076
|
-
!isMobile && /* @__PURE__ */
|
|
8077
|
-
|
|
8280
|
+
!isMobile && /* @__PURE__ */ jsx16(Tooltip6, { title: `${drawerOpen ? "Close" : "Open"} Conversations`, arrow: true, children: /* @__PURE__ */ jsxs13(
|
|
8281
|
+
IconButton10,
|
|
8078
8282
|
{
|
|
8079
8283
|
onClick: () => setDrawerOpen(!drawerOpen),
|
|
8080
8284
|
sx: {
|
|
@@ -8087,9 +8291,9 @@ var ChatAppBar = ({
|
|
|
8087
8291
|
"aria-label": `${drawerOpen ? "Close" : "Open"} conversations drawer`,
|
|
8088
8292
|
"aria-pressed": drawerOpen,
|
|
8089
8293
|
children: [
|
|
8090
|
-
drawerOpen ? /* @__PURE__ */
|
|
8091
|
-
conversations.length > 0 && /* @__PURE__ */
|
|
8092
|
-
|
|
8294
|
+
drawerOpen ? /* @__PURE__ */ jsx16(NotesIcon, {}) : /* @__PURE__ */ jsx16(NotesIconOutlined, {}),
|
|
8295
|
+
conversations.length > 0 && /* @__PURE__ */ jsx16(
|
|
8296
|
+
Box13,
|
|
8093
8297
|
{
|
|
8094
8298
|
sx: {
|
|
8095
8299
|
position: "absolute",
|
|
@@ -8114,8 +8318,8 @@ var ChatAppBar = ({
|
|
|
8114
8318
|
]
|
|
8115
8319
|
}
|
|
8116
8320
|
) }),
|
|
8117
|
-
!isMobile && canShowNewConversationButton && /* @__PURE__ */
|
|
8118
|
-
|
|
8321
|
+
!isMobile && canShowNewConversationButton && /* @__PURE__ */ jsx16(Tooltip6, { title: "Start New Conversation", arrow: true, children: /* @__PURE__ */ jsx16(
|
|
8322
|
+
IconButton10,
|
|
8119
8323
|
{
|
|
8120
8324
|
onClick: () => createNewConversation(),
|
|
8121
8325
|
sx: {
|
|
@@ -8128,14 +8332,14 @@ var ChatAppBar = ({
|
|
|
8128
8332
|
}
|
|
8129
8333
|
},
|
|
8130
8334
|
"aria-label": "Create new conversation",
|
|
8131
|
-
children: /* @__PURE__ */
|
|
8335
|
+
children: /* @__PURE__ */ jsx16(AddIcon, {})
|
|
8132
8336
|
}
|
|
8133
8337
|
) })
|
|
8134
8338
|
]
|
|
8135
8339
|
}
|
|
8136
8340
|
),
|
|
8137
|
-
/* @__PURE__ */
|
|
8138
|
-
|
|
8341
|
+
/* @__PURE__ */ jsxs13(
|
|
8342
|
+
Box13,
|
|
8139
8343
|
{
|
|
8140
8344
|
sx: {
|
|
8141
8345
|
display: "flex",
|
|
@@ -8155,8 +8359,8 @@ var ChatAppBar = ({
|
|
|
8155
8359
|
}
|
|
8156
8360
|
},
|
|
8157
8361
|
children: [
|
|
8158
|
-
isMobile && /* @__PURE__ */
|
|
8159
|
-
|
|
8362
|
+
isMobile && /* @__PURE__ */ jsx16(Tooltip6, { title: `Conversations (${conversations.length})`, arrow: true, children: /* @__PURE__ */ jsxs13(
|
|
8363
|
+
IconButton10,
|
|
8160
8364
|
{
|
|
8161
8365
|
onClick: () => setModalOpen(true),
|
|
8162
8366
|
sx: {
|
|
@@ -8165,9 +8369,9 @@ var ChatAppBar = ({
|
|
|
8165
8369
|
},
|
|
8166
8370
|
"aria-label": `Open conversations modal with ${conversations.length} conversations`,
|
|
8167
8371
|
children: [
|
|
8168
|
-
/* @__PURE__ */
|
|
8169
|
-
conversations.length > 0 && /* @__PURE__ */
|
|
8170
|
-
|
|
8372
|
+
/* @__PURE__ */ jsx16(NotesIcon, { fontSize: "small" }),
|
|
8373
|
+
conversations.length > 0 && /* @__PURE__ */ jsx16(
|
|
8374
|
+
Box13,
|
|
8171
8375
|
{
|
|
8172
8376
|
sx: {
|
|
8173
8377
|
position: "absolute",
|
|
@@ -8192,8 +8396,8 @@ var ChatAppBar = ({
|
|
|
8192
8396
|
]
|
|
8193
8397
|
}
|
|
8194
8398
|
) }),
|
|
8195
|
-
isMobile && canShowNewConversationButton && /* @__PURE__ */
|
|
8196
|
-
|
|
8399
|
+
isMobile && canShowNewConversationButton && /* @__PURE__ */ jsx16(Tooltip6, { title: "Start New Conversation", arrow: true, children: /* @__PURE__ */ jsx16(
|
|
8400
|
+
IconButton10,
|
|
8197
8401
|
{
|
|
8198
8402
|
onClick: () => {
|
|
8199
8403
|
createNewConversation();
|
|
@@ -8209,11 +8413,11 @@ var ChatAppBar = ({
|
|
|
8209
8413
|
}
|
|
8210
8414
|
},
|
|
8211
8415
|
"aria-label": "Create new conversation",
|
|
8212
|
-
children: /* @__PURE__ */
|
|
8416
|
+
children: /* @__PURE__ */ jsx16(AddIcon, { fontSize: "small" })
|
|
8213
8417
|
}
|
|
8214
8418
|
) }),
|
|
8215
|
-
/* @__PURE__ */
|
|
8216
|
-
|
|
8419
|
+
/* @__PURE__ */ jsx16(Tooltip6, { title: `Current AI: ${selectedModel.replace("Bandit-", "")}`, arrow: true, children: /* @__PURE__ */ jsx16(
|
|
8420
|
+
IconButton10,
|
|
8217
8421
|
{
|
|
8218
8422
|
onClick: (e) => setModelAnchorEl(e.currentTarget),
|
|
8219
8423
|
sx: {
|
|
@@ -8227,7 +8431,7 @@ var ChatAppBar = ({
|
|
|
8227
8431
|
}
|
|
8228
8432
|
},
|
|
8229
8433
|
"aria-label": `Change AI personality. Currently using ${selectedModel}`,
|
|
8230
|
-
children: /* @__PURE__ */
|
|
8434
|
+
children: /* @__PURE__ */ jsx16(
|
|
8231
8435
|
Avatar8,
|
|
8232
8436
|
{
|
|
8233
8437
|
src: currentAvatar,
|
|
@@ -8244,16 +8448,16 @@ var ChatAppBar = ({
|
|
|
8244
8448
|
)
|
|
8245
8449
|
}
|
|
8246
8450
|
) }),
|
|
8247
|
-
/* @__PURE__ */
|
|
8248
|
-
|
|
8451
|
+
/* @__PURE__ */ jsx16(Tooltip6, { title: `Engine \xB7 ${engineDisplay}`, arrow: true, children: /* @__PURE__ */ jsx16(
|
|
8452
|
+
IconButton10,
|
|
8249
8453
|
{
|
|
8250
8454
|
onClick: (e) => setEngineAnchorEl(e.currentTarget),
|
|
8251
8455
|
sx: pillButtonStyles,
|
|
8252
8456
|
"aria-label": `Change base model (engine). Currently ${engineDisplay}`,
|
|
8253
|
-
children: /* @__PURE__ */
|
|
8457
|
+
children: /* @__PURE__ */ jsx16(AutoAwesomeIcon, { fontSize: "small" })
|
|
8254
8458
|
}
|
|
8255
8459
|
) }),
|
|
8256
|
-
/* @__PURE__ */
|
|
8460
|
+
/* @__PURE__ */ jsxs13(
|
|
8257
8461
|
Menu5,
|
|
8258
8462
|
{
|
|
8259
8463
|
anchorEl: engineAnchorEl,
|
|
@@ -8262,8 +8466,8 @@ var ChatAppBar = ({
|
|
|
8262
8466
|
transformOrigin: { horizontal: "right", vertical: "top" },
|
|
8263
8467
|
anchorOrigin: { horizontal: "right", vertical: "bottom" },
|
|
8264
8468
|
children: [
|
|
8265
|
-
/* @__PURE__ */
|
|
8266
|
-
engines.length === 0 && /* @__PURE__ */
|
|
8469
|
+
/* @__PURE__ */ jsx16(Typography9, { variant: "overline", sx: { px: 2, color: theme.palette.text.secondary }, children: "Engine \xB7 base model" }),
|
|
8470
|
+
engines.length === 0 && /* @__PURE__ */ jsx16(MenuItem5, { disabled: true, children: /* @__PURE__ */ jsx16(Typography9, { variant: "body2", children: "No engines available" }) }),
|
|
8267
8471
|
engines.map((engine) => {
|
|
8268
8472
|
const badges = [
|
|
8269
8473
|
engine.vision && "vision",
|
|
@@ -8271,7 +8475,7 @@ var ChatAppBar = ({
|
|
|
8271
8475
|
engine.thinking && "thinking",
|
|
8272
8476
|
engine.cloud && "cloud"
|
|
8273
8477
|
].filter(Boolean);
|
|
8274
|
-
return /* @__PURE__ */
|
|
8478
|
+
return /* @__PURE__ */ jsxs13(
|
|
8275
8479
|
MenuItem5,
|
|
8276
8480
|
{
|
|
8277
8481
|
selected: engine.id === resolvedEngineId,
|
|
@@ -8291,13 +8495,13 @@ var ChatAppBar = ({
|
|
|
8291
8495
|
whiteSpace: "normal"
|
|
8292
8496
|
},
|
|
8293
8497
|
children: [
|
|
8294
|
-
/* @__PURE__ */
|
|
8295
|
-
/* @__PURE__ */
|
|
8296
|
-
engine.id === resolvedEngineId && /* @__PURE__ */
|
|
8498
|
+
/* @__PURE__ */ jsxs13(Box13, { sx: { display: "flex", alignItems: "center", gap: 1, width: "100%" }, children: [
|
|
8499
|
+
/* @__PURE__ */ jsx16(Typography9, { variant: "body2", sx: { fontWeight: 600, flex: 1 }, children: cleanEngineName(engine.displayName) }),
|
|
8500
|
+
engine.id === resolvedEngineId && /* @__PURE__ */ jsx16(Box13, { sx: { width: 8, height: 8, borderRadius: "50%", bgcolor: theme.palette.primary.main } })
|
|
8297
8501
|
] }),
|
|
8298
|
-
/* @__PURE__ */
|
|
8299
|
-
badges.length > 0 && /* @__PURE__ */
|
|
8300
|
-
|
|
8502
|
+
/* @__PURE__ */ jsx16(Typography9, { variant: "caption", sx: { color: theme.palette.text.secondary }, children: engine.available ? engine.description : engine.unavailableReason || "Unavailable" }),
|
|
8503
|
+
badges.length > 0 && /* @__PURE__ */ jsx16(Box13, { sx: { display: "flex", gap: 0.5, flexWrap: "wrap", mt: 0.25 }, children: badges.map((b) => /* @__PURE__ */ jsx16(
|
|
8504
|
+
Box13,
|
|
8301
8505
|
{
|
|
8302
8506
|
sx: {
|
|
8303
8507
|
fontSize: "0.65rem",
|
|
@@ -8319,7 +8523,7 @@ var ChatAppBar = ({
|
|
|
8319
8523
|
]
|
|
8320
8524
|
}
|
|
8321
8525
|
),
|
|
8322
|
-
/* @__PURE__ */
|
|
8526
|
+
/* @__PURE__ */ jsx16(
|
|
8323
8527
|
Menu5,
|
|
8324
8528
|
{
|
|
8325
8529
|
anchorEl: modelAnchorEl,
|
|
@@ -8355,7 +8559,7 @@ var ChatAppBar = ({
|
|
|
8355
8559
|
}
|
|
8356
8560
|
}
|
|
8357
8561
|
},
|
|
8358
|
-
children: availableModels.map((model) => /* @__PURE__ */
|
|
8562
|
+
children: availableModels.map((model) => /* @__PURE__ */ jsxs13(
|
|
8359
8563
|
MenuItem5,
|
|
8360
8564
|
{
|
|
8361
8565
|
selected: model.name === selectedModel,
|
|
@@ -8402,7 +8606,7 @@ var ChatAppBar = ({
|
|
|
8402
8606
|
px: 2
|
|
8403
8607
|
},
|
|
8404
8608
|
children: [
|
|
8405
|
-
/* @__PURE__ */
|
|
8609
|
+
/* @__PURE__ */ jsx16(
|
|
8406
8610
|
Avatar8,
|
|
8407
8611
|
{
|
|
8408
8612
|
src: model.avatarBase64 || modelAvatars[model.name] || banditHead,
|
|
@@ -8415,12 +8619,12 @@ var ChatAppBar = ({
|
|
|
8415
8619
|
}
|
|
8416
8620
|
}
|
|
8417
8621
|
),
|
|
8418
|
-
/* @__PURE__ */
|
|
8419
|
-
/* @__PURE__ */
|
|
8420
|
-
/* @__PURE__ */
|
|
8622
|
+
/* @__PURE__ */ jsxs13(Box13, { sx: { flex: 1 }, children: [
|
|
8623
|
+
/* @__PURE__ */ jsx16(Typography9, { variant: "body2", sx: { fontWeight: 500 }, children: model.name.replace("Bandit-", "") }),
|
|
8624
|
+
/* @__PURE__ */ jsx16(Typography9, { variant: "caption", sx: { color: theme.palette.text.secondary, display: "block" }, children: model.name === selectedModel ? "Currently active" : "Switch to this AI" })
|
|
8421
8625
|
] }),
|
|
8422
|
-
model.name === selectedModel && /* @__PURE__ */
|
|
8423
|
-
|
|
8626
|
+
model.name === selectedModel && /* @__PURE__ */ jsx16(
|
|
8627
|
+
Box13,
|
|
8424
8628
|
{
|
|
8425
8629
|
sx: {
|
|
8426
8630
|
width: 8,
|
|
@@ -8436,9 +8640,9 @@ var ChatAppBar = ({
|
|
|
8436
8640
|
))
|
|
8437
8641
|
}
|
|
8438
8642
|
),
|
|
8439
|
-
isTTSAvailable && /* @__PURE__ */
|
|
8440
|
-
/* @__PURE__ */
|
|
8441
|
-
|
|
8643
|
+
isTTSAvailable && /* @__PURE__ */ jsxs13(Fragment9, { children: [
|
|
8644
|
+
/* @__PURE__ */ jsx16(Tooltip6, { title: `Voice: ${selectedVoice ? toTitleCase(selectedVoice.split("-")[1]) : "Default"}`, arrow: true, children: /* @__PURE__ */ jsx16(
|
|
8645
|
+
IconButton10,
|
|
8442
8646
|
{
|
|
8443
8647
|
onClick: (e) => setVoiceAnchorEl(e.currentTarget),
|
|
8444
8648
|
sx: {
|
|
@@ -8451,10 +8655,10 @@ var ChatAppBar = ({
|
|
|
8451
8655
|
}
|
|
8452
8656
|
},
|
|
8453
8657
|
"aria-label": `Change voice. Currently using ${selectedVoice ? toTitleCase(selectedVoice.split("-")[1]) : "default"}`,
|
|
8454
|
-
children: /* @__PURE__ */
|
|
8658
|
+
children: /* @__PURE__ */ jsx16(RecordVoiceOverIcon, { fontSize: "small" })
|
|
8455
8659
|
}
|
|
8456
8660
|
) }),
|
|
8457
|
-
/* @__PURE__ */
|
|
8661
|
+
/* @__PURE__ */ jsx16(
|
|
8458
8662
|
Menu5,
|
|
8459
8663
|
{
|
|
8460
8664
|
anchorEl: voiceAnchorEl,
|
|
@@ -8491,7 +8695,7 @@ var ChatAppBar = ({
|
|
|
8491
8695
|
}
|
|
8492
8696
|
}
|
|
8493
8697
|
},
|
|
8494
|
-
children: availableVoices.length > 0 ? availableVoices.map((voice) => /* @__PURE__ */
|
|
8698
|
+
children: availableVoices.length > 0 ? availableVoices.map((voice) => /* @__PURE__ */ jsx16(
|
|
8495
8699
|
MenuItem5,
|
|
8496
8700
|
{
|
|
8497
8701
|
selected: voice === selectedVoice,
|
|
@@ -8499,14 +8703,14 @@ var ChatAppBar = ({
|
|
|
8499
8703
|
handleVoiceChange(voice);
|
|
8500
8704
|
setVoiceAnchorEl(null);
|
|
8501
8705
|
},
|
|
8502
|
-
children: /* @__PURE__ */
|
|
8503
|
-
/* @__PURE__ */
|
|
8504
|
-
/* @__PURE__ */
|
|
8505
|
-
/* @__PURE__ */
|
|
8506
|
-
/* @__PURE__ */
|
|
8706
|
+
children: /* @__PURE__ */ jsxs13(Box13, { sx: { display: "flex", alignItems: "center", gap: 1, width: "100%" }, children: [
|
|
8707
|
+
/* @__PURE__ */ jsx16(RecordVoiceOverIcon, { fontSize: "small", sx: { color: theme.palette.text.secondary } }),
|
|
8708
|
+
/* @__PURE__ */ jsxs13(Box13, { sx: { flex: 1 }, children: [
|
|
8709
|
+
/* @__PURE__ */ jsx16(Typography9, { variant: "body2", children: toTitleCase(voice.split("-")[1]) }),
|
|
8710
|
+
/* @__PURE__ */ jsx16(Typography9, { variant: "caption", sx: { color: theme.palette.text.secondary }, children: voice === selectedVoice ? "Currently active" : "Switch to this voice" })
|
|
8507
8711
|
] }),
|
|
8508
|
-
voice === selectedVoice && /* @__PURE__ */
|
|
8509
|
-
|
|
8712
|
+
voice === selectedVoice && /* @__PURE__ */ jsx16(
|
|
8713
|
+
Box13,
|
|
8510
8714
|
{
|
|
8511
8715
|
sx: {
|
|
8512
8716
|
width: 8,
|
|
@@ -8519,7 +8723,7 @@ var ChatAppBar = ({
|
|
|
8519
8723
|
] })
|
|
8520
8724
|
},
|
|
8521
8725
|
voice
|
|
8522
|
-
)) : /* @__PURE__ */
|
|
8726
|
+
)) : /* @__PURE__ */ jsx16(MenuItem5, { disabled: true, children: /* @__PURE__ */ jsx16(Typography9, { variant: "body2", color: "text.secondary", children: "No voices available" }) })
|
|
8523
8727
|
}
|
|
8524
8728
|
)
|
|
8525
8729
|
] })
|
|
@@ -8529,17 +8733,17 @@ var ChatAppBar = ({
|
|
|
8529
8733
|
]
|
|
8530
8734
|
}
|
|
8531
8735
|
),
|
|
8532
|
-
/* @__PURE__ */
|
|
8533
|
-
/* @__PURE__ */
|
|
8534
|
-
/* @__PURE__ */
|
|
8535
|
-
|
|
8736
|
+
/* @__PURE__ */ jsx16(conversation_drawer_default, { open: drawerOpen, onClose: () => setDrawerOpen(false) }),
|
|
8737
|
+
/* @__PURE__ */ jsx16(enhanced_mobile_conversations_modal_default, { open: modalOpen, onClose: () => setModalOpen(false) }),
|
|
8738
|
+
/* @__PURE__ */ jsxs13(
|
|
8739
|
+
Dialog6,
|
|
8536
8740
|
{
|
|
8537
8741
|
open: confirmModelChangeOpen,
|
|
8538
8742
|
onClose: () => setConfirmModelChangeOpen(false),
|
|
8539
8743
|
children: [
|
|
8540
|
-
/* @__PURE__ */
|
|
8541
|
-
/* @__PURE__ */
|
|
8542
|
-
/* @__PURE__ */
|
|
8744
|
+
/* @__PURE__ */ jsx16(DialogTitle5, { children: "Change personality and start new conversation?" }),
|
|
8745
|
+
/* @__PURE__ */ jsx16(DialogContent5, { children: /* @__PURE__ */ jsxs13(Box13, { display: "flex", alignItems: "center", gap: 2, mt: 1, justifyContent: "center", children: [
|
|
8746
|
+
/* @__PURE__ */ jsx16(
|
|
8543
8747
|
Avatar8,
|
|
8544
8748
|
{
|
|
8545
8749
|
src: pendingModelAvatar,
|
|
@@ -8547,15 +8751,15 @@ var ChatAppBar = ({
|
|
|
8547
8751
|
sx: { width: 40, height: 40, filter: "brightness(1.7)" }
|
|
8548
8752
|
}
|
|
8549
8753
|
),
|
|
8550
|
-
/* @__PURE__ */
|
|
8754
|
+
/* @__PURE__ */ jsxs13(Typography9, { variant: "body2", children: [
|
|
8551
8755
|
"Your current conversation will be saved, and a new one will begin with ",
|
|
8552
|
-
/* @__PURE__ */
|
|
8756
|
+
/* @__PURE__ */ jsx16("strong", { children: pendingModel }),
|
|
8553
8757
|
"."
|
|
8554
8758
|
] })
|
|
8555
8759
|
] }) }),
|
|
8556
|
-
/* @__PURE__ */
|
|
8557
|
-
/* @__PURE__ */
|
|
8558
|
-
/* @__PURE__ */
|
|
8760
|
+
/* @__PURE__ */ jsxs13(DialogActions5, { children: [
|
|
8761
|
+
/* @__PURE__ */ jsx16(Button7, { onClick: () => setConfirmModelChangeOpen(false), children: "Cancel" }),
|
|
8762
|
+
/* @__PURE__ */ jsx16(
|
|
8559
8763
|
Button7,
|
|
8560
8764
|
{
|
|
8561
8765
|
onClick: () => {
|
|
@@ -8658,19 +8862,19 @@ Respond with just the title and nothing else.
|
|
|
8658
8862
|
};
|
|
8659
8863
|
|
|
8660
8864
|
// src/chat/query-suggestion-picker.tsx
|
|
8661
|
-
import { useEffect as useEffect13, useRef as useRef11, useState as
|
|
8662
|
-
import { Box as
|
|
8865
|
+
import { useEffect as useEffect13, useRef as useRef11, useState as useState16 } from "react";
|
|
8866
|
+
import { Box as Box14, useMediaQuery as useMediaQuery6 } from "@mui/material";
|
|
8663
8867
|
import { useTheme as useTheme13, alpha as alpha8 } from "@mui/material/styles";
|
|
8664
8868
|
import ReactMarkdown from "react-markdown";
|
|
8665
8869
|
import remarkGfm from "remark-gfm";
|
|
8666
8870
|
import rehypeRaw from "rehype-raw";
|
|
8667
|
-
import { Fragment as
|
|
8871
|
+
import { Fragment as Fragment10, jsx as jsx17 } from "react/jsx-runtime";
|
|
8668
8872
|
var markdownComponents = {
|
|
8669
|
-
p: ({ node, ...props }) => /* @__PURE__ */
|
|
8670
|
-
mark: ({ node, children, ...props }) => /* @__PURE__ */
|
|
8873
|
+
p: ({ node, ...props }) => /* @__PURE__ */ jsx17("span", { ...props }),
|
|
8874
|
+
mark: ({ node, children, ...props }) => /* @__PURE__ */ jsx17("mark", { ...props, children }),
|
|
8671
8875
|
code: ({ node, children, ...props }) => {
|
|
8672
8876
|
const { inline, ...rest } = props;
|
|
8673
|
-
return inline ? /* @__PURE__ */
|
|
8877
|
+
return inline ? /* @__PURE__ */ jsx17("code", { ...rest, children }) : /* @__PURE__ */ jsx17("code", { ...rest, children });
|
|
8674
8878
|
}
|
|
8675
8879
|
};
|
|
8676
8880
|
var QuerySuggestionPicker = ({
|
|
@@ -8678,9 +8882,9 @@ var QuerySuggestionPicker = ({
|
|
|
8678
8882
|
inputHeight
|
|
8679
8883
|
}) => {
|
|
8680
8884
|
const hasGenerated = useRef11(false);
|
|
8681
|
-
const [hasSentPrompt, setHasSentPrompt] =
|
|
8682
|
-
const [examplePrompts, setExamplePrompts] =
|
|
8683
|
-
const [visiblePrompts, setVisiblePrompts] =
|
|
8885
|
+
const [hasSentPrompt, setHasSentPrompt] = useState16(false);
|
|
8886
|
+
const [examplePrompts, setExamplePrompts] = useState16([]);
|
|
8887
|
+
const [visiblePrompts, setVisiblePrompts] = useState16([]);
|
|
8684
8888
|
const scrollRef = useRef11(null);
|
|
8685
8889
|
const theme = useTheme13();
|
|
8686
8890
|
const isMobile = useMediaQuery6((theme2) => theme2.breakpoints.down("sm"));
|
|
@@ -8743,8 +8947,8 @@ var QuerySuggestionPicker = ({
|
|
|
8743
8947
|
return () => clearInterval(interval);
|
|
8744
8948
|
}, [hasSentPrompt, examplePrompts.length]);
|
|
8745
8949
|
const displayPrompts = isMobile ? visiblePrompts.slice(0, Math.min(visiblePrompts.length, 6)) : visiblePrompts;
|
|
8746
|
-
return displayPrompts.length > 0 && /* @__PURE__ */
|
|
8747
|
-
|
|
8950
|
+
return displayPrompts.length > 0 && /* @__PURE__ */ jsx17(Fragment10, { children: /* @__PURE__ */ jsx17(
|
|
8951
|
+
Box14,
|
|
8748
8952
|
{
|
|
8749
8953
|
ref: scrollRef,
|
|
8750
8954
|
sx: {
|
|
@@ -8760,8 +8964,8 @@ var QuerySuggestionPicker = ({
|
|
|
8760
8964
|
pb: isMobile ? 0.4 : 0,
|
|
8761
8965
|
"&::-webkit-scrollbar": { display: "none" }
|
|
8762
8966
|
},
|
|
8763
|
-
children: displayPrompts.map((prompt, i) => /* @__PURE__ */
|
|
8764
|
-
|
|
8967
|
+
children: displayPrompts.map((prompt, i) => /* @__PURE__ */ jsx17(
|
|
8968
|
+
Box14,
|
|
8765
8969
|
{
|
|
8766
8970
|
sx: {
|
|
8767
8971
|
px: isMobile ? 1.4 : 2,
|
|
@@ -8795,8 +8999,8 @@ var QuerySuggestionPicker = ({
|
|
|
8795
8999
|
onSend(prompt, []);
|
|
8796
9000
|
setHasSentPrompt(true);
|
|
8797
9001
|
},
|
|
8798
|
-
children: /* @__PURE__ */
|
|
8799
|
-
|
|
9002
|
+
children: /* @__PURE__ */ jsx17(
|
|
9003
|
+
Box14,
|
|
8800
9004
|
{
|
|
8801
9005
|
sx: {
|
|
8802
9006
|
flex: 1,
|
|
@@ -8820,7 +9024,7 @@ var QuerySuggestionPicker = ({
|
|
|
8820
9024
|
padding: "0.1em 0.25em"
|
|
8821
9025
|
}
|
|
8822
9026
|
},
|
|
8823
|
-
children: /* @__PURE__ */
|
|
9027
|
+
children: /* @__PURE__ */ jsx17(
|
|
8824
9028
|
ReactMarkdown,
|
|
8825
9029
|
{
|
|
8826
9030
|
remarkPlugins: [remarkGfm],
|
|
@@ -8839,9 +9043,9 @@ var QuerySuggestionPicker = ({
|
|
|
8839
9043
|
};
|
|
8840
9044
|
|
|
8841
9045
|
// ../../src/pages/under-review.tsx
|
|
8842
|
-
import { Box as
|
|
9046
|
+
import { Box as Box15, Typography as Typography10, useTheme as useTheme14 } from "@mui/material";
|
|
8843
9047
|
import { useNavigate as useNavigate2 } from "react-router-dom";
|
|
8844
|
-
import { jsx as
|
|
9048
|
+
import { jsx as jsx18, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
8845
9049
|
var UnderReview = () => {
|
|
8846
9050
|
const theme = useTheme14();
|
|
8847
9051
|
const navigate = useNavigate2();
|
|
@@ -8849,8 +9053,8 @@ var UnderReview = () => {
|
|
|
8849
9053
|
localStorage.removeItem("authToken");
|
|
8850
9054
|
navigate("/login");
|
|
8851
9055
|
};
|
|
8852
|
-
return /* @__PURE__ */
|
|
8853
|
-
|
|
9056
|
+
return /* @__PURE__ */ jsxs14(
|
|
9057
|
+
Box15,
|
|
8854
9058
|
{
|
|
8855
9059
|
sx: {
|
|
8856
9060
|
minHeight: "100vh",
|
|
@@ -8865,8 +9069,8 @@ var UnderReview = () => {
|
|
|
8865
9069
|
position: "relative"
|
|
8866
9070
|
},
|
|
8867
9071
|
children: [
|
|
8868
|
-
/* @__PURE__ */
|
|
8869
|
-
|
|
9072
|
+
/* @__PURE__ */ jsx18(
|
|
9073
|
+
Box15,
|
|
8870
9074
|
{
|
|
8871
9075
|
onClick: handleSneakyLogout,
|
|
8872
9076
|
sx: {
|
|
@@ -8891,13 +9095,13 @@ var UnderReview = () => {
|
|
|
8891
9095
|
title: "Reset session"
|
|
8892
9096
|
}
|
|
8893
9097
|
),
|
|
8894
|
-
/* @__PURE__ */
|
|
8895
|
-
/* @__PURE__ */
|
|
9098
|
+
/* @__PURE__ */ jsx18(Typography10, { variant: "h4", sx: { mb: 2, fontWeight: 700, color: theme.palette.error.main }, children: "Under Review" }),
|
|
9099
|
+
/* @__PURE__ */ jsxs14(Typography10, { variant: "body1", sx: { mb: 2, color: theme.palette.text.secondary }, children: [
|
|
8896
9100
|
"Your request to use our services is currently being reviewed.",
|
|
8897
|
-
/* @__PURE__ */
|
|
9101
|
+
/* @__PURE__ */ jsx18("br", {}),
|
|
8898
9102
|
"For more info, please contact ",
|
|
8899
9103
|
" ",
|
|
8900
|
-
/* @__PURE__ */
|
|
9104
|
+
/* @__PURE__ */ jsx18("a", { href: "mailto:team@banditai.ai", style: { color: theme.palette.primary.main, fontWeight: 600 }, children: "team@banditai.ai" })
|
|
8901
9105
|
] })
|
|
8902
9106
|
]
|
|
8903
9107
|
}
|
|
@@ -8906,8 +9110,8 @@ var UnderReview = () => {
|
|
|
8906
9110
|
var under_review_default = UnderReview;
|
|
8907
9111
|
|
|
8908
9112
|
// src/components/ConnectionStatus.tsx
|
|
8909
|
-
import { Box as
|
|
8910
|
-
import { jsx as
|
|
9113
|
+
import { Box as Box16, Chip as Chip5, useTheme as useTheme15 } from "@mui/material";
|
|
9114
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
8911
9115
|
var ConnectionStatus = ({
|
|
8912
9116
|
showWhenGood = false,
|
|
8913
9117
|
position = "top"
|
|
@@ -8921,28 +9125,28 @@ var ConnectionStatus = ({
|
|
|
8921
9125
|
switch (connectionQuality) {
|
|
8922
9126
|
case "offline":
|
|
8923
9127
|
return {
|
|
8924
|
-
icon: /* @__PURE__ */
|
|
9128
|
+
icon: /* @__PURE__ */ jsx19(WifiOffIcon, { sx: { fontSize: 16 } }),
|
|
8925
9129
|
label: "Offline",
|
|
8926
9130
|
color: "error",
|
|
8927
9131
|
severity: "high"
|
|
8928
9132
|
};
|
|
8929
9133
|
case "slow":
|
|
8930
9134
|
return {
|
|
8931
|
-
icon: /* @__PURE__ */
|
|
9135
|
+
icon: /* @__PURE__ */ jsx19(SignalWifi2BarIcon, { sx: { fontSize: 16 } }),
|
|
8932
9136
|
label: "Slow connection",
|
|
8933
9137
|
color: "warning",
|
|
8934
9138
|
severity: "medium"
|
|
8935
9139
|
};
|
|
8936
9140
|
case "fast":
|
|
8937
9141
|
return {
|
|
8938
|
-
icon: /* @__PURE__ */
|
|
9142
|
+
icon: /* @__PURE__ */ jsx19(WifiIcon, { sx: { fontSize: 16 } }),
|
|
8939
9143
|
label: "Connected",
|
|
8940
9144
|
color: "success",
|
|
8941
9145
|
severity: "low"
|
|
8942
9146
|
};
|
|
8943
9147
|
default:
|
|
8944
9148
|
return {
|
|
8945
|
-
icon: /* @__PURE__ */
|
|
9149
|
+
icon: /* @__PURE__ */ jsx19(WifiIcon, { sx: { fontSize: 16 } }),
|
|
8946
9150
|
label: "Unknown",
|
|
8947
9151
|
color: "default",
|
|
8948
9152
|
severity: "low"
|
|
@@ -8950,8 +9154,8 @@ var ConnectionStatus = ({
|
|
|
8950
9154
|
}
|
|
8951
9155
|
};
|
|
8952
9156
|
const config = getStatusConfig();
|
|
8953
|
-
return /* @__PURE__ */
|
|
8954
|
-
|
|
9157
|
+
return /* @__PURE__ */ jsx19(
|
|
9158
|
+
Box16,
|
|
8955
9159
|
{
|
|
8956
9160
|
sx: {
|
|
8957
9161
|
position: "fixed",
|
|
@@ -8966,7 +9170,7 @@ var ConnectionStatus = ({
|
|
|
8966
9170
|
"100%": { opacity: 1 }
|
|
8967
9171
|
}
|
|
8968
9172
|
},
|
|
8969
|
-
children: /* @__PURE__ */
|
|
9173
|
+
children: /* @__PURE__ */ jsx19(
|
|
8970
9174
|
Chip5,
|
|
8971
9175
|
{
|
|
8972
9176
|
icon: config.icon,
|
|
@@ -9279,7 +9483,7 @@ var useVoiceMode = (config) => {
|
|
|
9279
9483
|
};
|
|
9280
9484
|
|
|
9281
9485
|
// src/chat/chat.tsx
|
|
9282
|
-
import { jsx as
|
|
9486
|
+
import { jsx as jsx20, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
9283
9487
|
var ChatContent = () => {
|
|
9284
9488
|
const packageSettings = usePackageSettingsStore((state) => state.settings);
|
|
9285
9489
|
const featureFlag = useFeatureFlag();
|
|
@@ -9287,8 +9491,8 @@ var ChatContent = () => {
|
|
|
9287
9491
|
const ossMode = isOSSMode() || !packageSettings?.featureFlags?.subscriptionType;
|
|
9288
9492
|
const playgroundBypassAccess = packageSettings?.playgroundBypassAuth || typeof window !== "undefined" && window.location.pathname.includes("/playground");
|
|
9289
9493
|
const notificationService = useNotificationService();
|
|
9290
|
-
const [selectedTheme, setSelectedTheme] =
|
|
9291
|
-
const [themeLoading, setThemeLoading] =
|
|
9494
|
+
const [selectedTheme, setSelectedTheme] = useState17(null);
|
|
9495
|
+
const [themeLoading, setThemeLoading] = useState17(true);
|
|
9292
9496
|
const token = authenticationService.getToken();
|
|
9293
9497
|
const claims = token ? authenticationService.parseJwtClaims(token) : null;
|
|
9294
9498
|
const baseTheme = themeMap_default[selectedTheme ?? "bandit-dark"] || banditDarkTheme;
|
|
@@ -9339,6 +9543,7 @@ var ChatContent = () => {
|
|
|
9339
9543
|
initialized
|
|
9340
9544
|
} = useVoiceStore();
|
|
9341
9545
|
const isVoiceModeEnabled = useVoiceModeStore((state) => state.enabled);
|
|
9546
|
+
const canvasOpen = useCanvasStore((state) => state.open);
|
|
9342
9547
|
const previousVoiceModeEnabledRef = useRef13(isVoiceModeEnabled);
|
|
9343
9548
|
const historyRef = useRef13(history);
|
|
9344
9549
|
useEffect15(() => {
|
|
@@ -9387,14 +9592,14 @@ var ChatContent = () => {
|
|
|
9387
9592
|
}, [packageSettings?.gatewayApiUrl, availableVoices.length, initialized, loadVoicesFromAPI, token]);
|
|
9388
9593
|
const provider = useAIProviderStore((state) => state.provider);
|
|
9389
9594
|
const inputRef = useRef13(null);
|
|
9390
|
-
const [pastedImages, setPastedImages] =
|
|
9595
|
+
const [pastedImages, setPastedImages] = useState17([]);
|
|
9391
9596
|
const inputContainerRef = useRef13(null);
|
|
9392
|
-
const [inputHeight, setInputHeight] =
|
|
9393
|
-
const [isSubmitting, setIsSubmitting] =
|
|
9394
|
-
const [pendingMessage, setPendingMessage] =
|
|
9597
|
+
const [inputHeight, setInputHeight] = useState17(80);
|
|
9598
|
+
const [isSubmitting, setIsSubmitting] = useState17(false);
|
|
9599
|
+
const [pendingMessage, setPendingMessage] = useState17(null);
|
|
9395
9600
|
const { conversations, currentId, _hasHydrated, hydrate } = useConversationStore();
|
|
9396
|
-
const [isMobile, setIsMobile] =
|
|
9397
|
-
const [drawerOpen, setDrawerOpen] =
|
|
9601
|
+
const [isMobile, setIsMobile] = useState17(false);
|
|
9602
|
+
const [drawerOpen, setDrawerOpen] = useState17(false);
|
|
9398
9603
|
const { generateName } = useConversationNameGenerator();
|
|
9399
9604
|
const { preferences } = usePreferencesStore();
|
|
9400
9605
|
const { containerRef: chatContainerRef, targetRef: scrollTargetRef, scrollToBottom, getScrollState } = useAutoScroll({
|
|
@@ -9406,14 +9611,14 @@ var ChatContent = () => {
|
|
|
9406
9611
|
const chatContainerEl = chatContainerRef.current;
|
|
9407
9612
|
const scrollTargetEl = scrollTargetRef.current;
|
|
9408
9613
|
const { isSlowConnection, connectionQuality, trackRequestStart, trackRequestEnd } = useNetworkStatus();
|
|
9409
|
-
const [showScrollToBottom, setShowScrollToBottom] =
|
|
9410
|
-
const [streamBuffer, setStreamBuffer] =
|
|
9411
|
-
const [responseStarted, setResponseStarted] =
|
|
9412
|
-
const [isStreaming, setIsStreaming] =
|
|
9413
|
-
const [isThinking, setIsThinking] =
|
|
9614
|
+
const [showScrollToBottom, setShowScrollToBottom] = useState17(false);
|
|
9615
|
+
const [streamBuffer, setStreamBuffer] = useState17("");
|
|
9616
|
+
const [responseStarted, setResponseStarted] = useState17(false);
|
|
9617
|
+
const [isStreaming, setIsStreaming] = useState17(false);
|
|
9618
|
+
const [isThinking, setIsThinking] = useState17(false);
|
|
9414
9619
|
const initialLogoState = history.length === 0;
|
|
9415
|
-
const [logoVisible, setLogoVisible] =
|
|
9416
|
-
const [logoShouldRender, setLogoShouldRender] =
|
|
9620
|
+
const [logoVisible, setLogoVisible] = useState17(initialLogoState);
|
|
9621
|
+
const [logoShouldRender, setLogoShouldRender] = useState17(initialLogoState);
|
|
9417
9622
|
const streamingGraceUntilRef = useRef13(0);
|
|
9418
9623
|
const GRACE_MS = 450;
|
|
9419
9624
|
const GRACE_OFFSET_DESKTOP = 28;
|
|
@@ -9422,8 +9627,8 @@ var ChatContent = () => {
|
|
|
9422
9627
|
const lastSpokenResponseRef = useRef13(null);
|
|
9423
9628
|
const previousConversationIdRef = useRef13(null);
|
|
9424
9629
|
const logoFadeTimeoutRef = useRef13(null);
|
|
9425
|
-
const [branding, setBranding] =
|
|
9426
|
-
const [brandingLoading, setBrandingLoading] =
|
|
9630
|
+
const [branding, setBranding] = useState17(null);
|
|
9631
|
+
const [brandingLoading, setBrandingLoading] = useState17(true);
|
|
9427
9632
|
const isBrandingLoadInProgressRef = useRef13(false);
|
|
9428
9633
|
const logoOnly = history.length === 0 && !brandingLoading;
|
|
9429
9634
|
useEffect15(() => {
|
|
@@ -10191,10 +10396,10 @@ var ChatContent = () => {
|
|
|
10191
10396
|
}
|
|
10192
10397
|
};
|
|
10193
10398
|
if (!hydrated || brandingLoading || themeLoading) {
|
|
10194
|
-
return /* @__PURE__ */
|
|
10195
|
-
/* @__PURE__ */
|
|
10196
|
-
/* @__PURE__ */
|
|
10197
|
-
|
|
10399
|
+
return /* @__PURE__ */ jsxs15(ThemeProvider, { theme: banditTheme, children: [
|
|
10400
|
+
/* @__PURE__ */ jsx20(CssBaseline, {}),
|
|
10401
|
+
/* @__PURE__ */ jsxs15(
|
|
10402
|
+
Box17,
|
|
10198
10403
|
{
|
|
10199
10404
|
sx: (theme) => ({
|
|
10200
10405
|
minHeight: "100dvh",
|
|
@@ -10207,8 +10412,8 @@ var ChatContent = () => {
|
|
|
10207
10412
|
color: theme.palette.text.primary
|
|
10208
10413
|
}),
|
|
10209
10414
|
children: [
|
|
10210
|
-
/* @__PURE__ */
|
|
10211
|
-
/* @__PURE__ */
|
|
10415
|
+
/* @__PURE__ */ jsx20(CircularProgress4, { size: 32, thickness: 4 }),
|
|
10416
|
+
/* @__PURE__ */ jsx20(Typography11, { variant: "body2", color: "text.secondary", children: "Preparing your workspace..." })
|
|
10212
10417
|
]
|
|
10213
10418
|
}
|
|
10214
10419
|
)
|
|
@@ -10216,15 +10421,15 @@ var ChatContent = () => {
|
|
|
10216
10421
|
}
|
|
10217
10422
|
const userHasAccess = playgroundBypassAccess || ossMode || claims?.roles?.includes("super-user") || claims?.roles?.includes("admin");
|
|
10218
10423
|
if (!userHasAccess) {
|
|
10219
|
-
return /* @__PURE__ */
|
|
10220
|
-
/* @__PURE__ */
|
|
10221
|
-
/* @__PURE__ */
|
|
10424
|
+
return /* @__PURE__ */ jsxs15(ThemeProvider, { theme: banditTheme, children: [
|
|
10425
|
+
/* @__PURE__ */ jsx20(CssBaseline, {}),
|
|
10426
|
+
/* @__PURE__ */ jsx20(under_review_default, {})
|
|
10222
10427
|
] });
|
|
10223
10428
|
}
|
|
10224
|
-
return /* @__PURE__ */
|
|
10225
|
-
/* @__PURE__ */
|
|
10226
|
-
/* @__PURE__ */
|
|
10227
|
-
|
|
10429
|
+
return /* @__PURE__ */ jsxs15(ThemeProvider, { theme: banditTheme, children: [
|
|
10430
|
+
/* @__PURE__ */ jsx20(CssBaseline, {}),
|
|
10431
|
+
/* @__PURE__ */ jsxs15(
|
|
10432
|
+
Box17,
|
|
10228
10433
|
{
|
|
10229
10434
|
sx: (theme) => ({
|
|
10230
10435
|
display: "flex",
|
|
@@ -10237,12 +10442,12 @@ var ChatContent = () => {
|
|
|
10237
10442
|
position: "fixed",
|
|
10238
10443
|
top: 0,
|
|
10239
10444
|
left: drawerOpen && !isMobile ? "340px" : 0,
|
|
10240
|
-
width: drawerOpen && !isMobile ? "calc(100vw - 340px)" : "100vw",
|
|
10445
|
+
width: !isMobile && canvasOpen ? `calc(100vw - ${drawerOpen ? "340px" : "0px"} - ${CANVAS_WIDTH})` : drawerOpen && !isMobile ? "calc(100vw - 340px)" : "100vw",
|
|
10241
10446
|
zIndex: 0,
|
|
10242
10447
|
transition: "left 0.3s ease-in-out, width 0.3s ease-in-out"
|
|
10243
10448
|
}),
|
|
10244
10449
|
children: [
|
|
10245
|
-
/* @__PURE__ */
|
|
10450
|
+
/* @__PURE__ */ jsx20(
|
|
10246
10451
|
chat_app_bar_default,
|
|
10247
10452
|
{
|
|
10248
10453
|
availableModels,
|
|
@@ -10254,8 +10459,8 @@ var ChatContent = () => {
|
|
|
10254
10459
|
setDrawerOpen
|
|
10255
10460
|
}
|
|
10256
10461
|
),
|
|
10257
|
-
/* @__PURE__ */
|
|
10258
|
-
|
|
10462
|
+
/* @__PURE__ */ jsx20(
|
|
10463
|
+
Box17,
|
|
10259
10464
|
{
|
|
10260
10465
|
ref: chatContainerRef,
|
|
10261
10466
|
sx: {
|
|
@@ -10275,8 +10480,8 @@ var ChatContent = () => {
|
|
|
10275
10480
|
msOverflowStyle: "none",
|
|
10276
10481
|
"&::-webkit-scrollbar": { display: "none" }
|
|
10277
10482
|
},
|
|
10278
|
-
children: /* @__PURE__ */
|
|
10279
|
-
|
|
10483
|
+
children: /* @__PURE__ */ jsxs15(
|
|
10484
|
+
Box17,
|
|
10280
10485
|
{
|
|
10281
10486
|
sx: {
|
|
10282
10487
|
width: "100%",
|
|
@@ -10286,9 +10491,9 @@ var ChatContent = () => {
|
|
|
10286
10491
|
pt: 2
|
|
10287
10492
|
},
|
|
10288
10493
|
children: [
|
|
10289
|
-
logoShouldRender && !brandingLoading && (branding?.logoBase64 ? /* @__PURE__ */
|
|
10290
|
-
/* @__PURE__ */
|
|
10291
|
-
|
|
10494
|
+
logoShouldRender && !brandingLoading && (branding?.logoBase64 ? /* @__PURE__ */ jsx20(custom_logo_default, { visible: logoVisible, atTop: true }) : /* @__PURE__ */ jsx20(bandit_chat_logo_default, { visible: logoVisible, atTop: true })),
|
|
10495
|
+
/* @__PURE__ */ jsx20(
|
|
10496
|
+
Box17,
|
|
10292
10497
|
{
|
|
10293
10498
|
sx: {
|
|
10294
10499
|
margin: "0 auto",
|
|
@@ -10297,7 +10502,7 @@ var ChatContent = () => {
|
|
|
10297
10502
|
flexShrink: 0,
|
|
10298
10503
|
px: isMobile ? 0 : 0
|
|
10299
10504
|
},
|
|
10300
|
-
children: /* @__PURE__ */
|
|
10505
|
+
children: /* @__PURE__ */ jsx20(
|
|
10301
10506
|
chat_messages_default,
|
|
10302
10507
|
{
|
|
10303
10508
|
isStreaming,
|
|
@@ -10321,7 +10526,7 @@ var ChatContent = () => {
|
|
|
10321
10526
|
)
|
|
10322
10527
|
}
|
|
10323
10528
|
),
|
|
10324
|
-
showScrollToBottom && /* @__PURE__ */
|
|
10529
|
+
showScrollToBottom && /* @__PURE__ */ jsx20(
|
|
10325
10530
|
chat_scroll_to_bottom_button_default,
|
|
10326
10531
|
{
|
|
10327
10532
|
inputHeight,
|
|
@@ -10330,8 +10535,8 @@ var ChatContent = () => {
|
|
|
10330
10535
|
onClick: handleScrollToBottomClick
|
|
10331
10536
|
}
|
|
10332
10537
|
),
|
|
10333
|
-
history.length === 0 && componentStatus !== "Loading" && !isMobile && /* @__PURE__ */
|
|
10334
|
-
|
|
10538
|
+
history.length === 0 && componentStatus !== "Loading" && !isMobile && /* @__PURE__ */ jsx20(
|
|
10539
|
+
Box17,
|
|
10335
10540
|
{
|
|
10336
10541
|
sx: (theme) => ({
|
|
10337
10542
|
position: "absolute",
|
|
@@ -10349,8 +10554,8 @@ var ChatContent = () => {
|
|
|
10349
10554
|
})
|
|
10350
10555
|
}
|
|
10351
10556
|
),
|
|
10352
|
-
/* @__PURE__ */
|
|
10353
|
-
|
|
10557
|
+
/* @__PURE__ */ jsxs15(
|
|
10558
|
+
Box17,
|
|
10354
10559
|
{
|
|
10355
10560
|
sx: {
|
|
10356
10561
|
display: "flex",
|
|
@@ -10361,10 +10566,10 @@ var ChatContent = () => {
|
|
|
10361
10566
|
maxWidth: "768px"
|
|
10362
10567
|
},
|
|
10363
10568
|
children: [
|
|
10364
|
-
/* @__PURE__ */
|
|
10365
|
-
history.length === 0 && componentStatus !== "Loading" && !pendingMessage && preferences.chatSuggestionsEnabled && /* @__PURE__ */
|
|
10366
|
-
/* @__PURE__ */
|
|
10367
|
-
/* @__PURE__ */
|
|
10569
|
+
/* @__PURE__ */ jsx20(Box17, { sx: { flex: "1 1 auto" } }),
|
|
10570
|
+
history.length === 0 && componentStatus !== "Loading" && !pendingMessage && preferences.chatSuggestionsEnabled && /* @__PURE__ */ jsx20(Box17, { sx: { marginBottom: "20px" }, children: /* @__PURE__ */ jsx20(QuerySuggestionPicker, { onSend: handleSend, inputHeight }) }),
|
|
10571
|
+
/* @__PURE__ */ jsx20(ask_user_card_default, {}),
|
|
10572
|
+
/* @__PURE__ */ jsx20(
|
|
10368
10573
|
chat_input_default,
|
|
10369
10574
|
{
|
|
10370
10575
|
inputValue,
|
|
@@ -10391,7 +10596,7 @@ var ChatContent = () => {
|
|
|
10391
10596
|
]
|
|
10392
10597
|
}
|
|
10393
10598
|
),
|
|
10394
|
-
preferences.feedbackEnabled && !isMobile && /* @__PURE__ */
|
|
10599
|
+
preferences.feedbackEnabled && !isMobile && /* @__PURE__ */ jsx20(
|
|
10395
10600
|
FeedbackButton,
|
|
10396
10601
|
{
|
|
10397
10602
|
fullScreen: false,
|
|
@@ -10404,10 +10609,11 @@ var ChatContent = () => {
|
|
|
10404
10609
|
}
|
|
10405
10610
|
}
|
|
10406
10611
|
),
|
|
10407
|
-
/* @__PURE__ */
|
|
10612
|
+
/* @__PURE__ */ jsx20(ConnectionStatus, { position: "top", showWhenGood: false })
|
|
10408
10613
|
]
|
|
10409
10614
|
}
|
|
10410
|
-
)
|
|
10615
|
+
),
|
|
10616
|
+
/* @__PURE__ */ jsx20(canvas_panel_default, { isMobile })
|
|
10411
10617
|
] });
|
|
10412
10618
|
};
|
|
10413
10619
|
var Chat = () => {
|
|
@@ -10433,13 +10639,13 @@ var Chat = () => {
|
|
|
10433
10639
|
});
|
|
10434
10640
|
if (!allowUnauthenticated && !bypassAuth && !authenticationService.isAuthenticated()) {
|
|
10435
10641
|
debugLogger.debug("User is not authenticated, redirecting to login");
|
|
10436
|
-
return /* @__PURE__ */
|
|
10642
|
+
return /* @__PURE__ */ jsx20(Navigate, { to: "/login", replace: true });
|
|
10437
10643
|
}
|
|
10438
|
-
return /* @__PURE__ */
|
|
10644
|
+
return /* @__PURE__ */ jsx20(ChatContent, {});
|
|
10439
10645
|
};
|
|
10440
10646
|
var chat_default = Chat;
|
|
10441
10647
|
|
|
10442
10648
|
export {
|
|
10443
10649
|
chat_default
|
|
10444
10650
|
};
|
|
10445
|
-
//# sourceMappingURL=chunk-
|
|
10651
|
+
//# sourceMappingURL=chunk-JJNPBLJ7.mjs.map
|