@burtson-labs/bandit-engine 2.0.68 → 2.0.70
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-5QSGMPHN.mjs → chat-XW4JIAOE.mjs} +2 -2
- package/dist/{chunk-HUUWQOBF.mjs → chunk-5SA7PQK4.mjs} +2 -2
- package/dist/{chunk-EHBZ4D7R.mjs → chunk-PUUL2R3T.mjs} +878 -689
- package/dist/chunk-PUUL2R3T.mjs.map +1 -0
- package/dist/index.js +3159 -2957
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/management/management.js +1114 -912
- package/dist/management/management.js.map +1 -1
- package/dist/management/management.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-EHBZ4D7R.mjs.map +0 -1
- /package/dist/{chat-5QSGMPHN.mjs.map → chat-XW4JIAOE.mjs.map} +0 -0
- /package/dist/{chunk-HUUWQOBF.mjs.map → chunk-5SA7PQK4.mjs.map} +0 -0
|
@@ -84,7 +84,7 @@ import {
|
|
|
84
84
|
} from "./chunk-KCI46M23.mjs";
|
|
85
85
|
|
|
86
86
|
// src/chat/chat.tsx
|
|
87
|
-
import { useCallback as useCallback6, useEffect as
|
|
87
|
+
import { useCallback as useCallback6, useEffect as useEffect15, useLayoutEffect, useMemo as useMemo3, useRef as useRef13, useState as useState15 } from "react";
|
|
88
88
|
|
|
89
89
|
// src/chat/custom-logo.tsx
|
|
90
90
|
import React, { useEffect } from "react";
|
|
@@ -171,7 +171,7 @@ var Logo = ({ visible, atTop = false }) => {
|
|
|
171
171
|
var custom_logo_default = Logo;
|
|
172
172
|
|
|
173
173
|
// src/chat/chat.tsx
|
|
174
|
-
import { Box as
|
|
174
|
+
import { Box as Box15, ThemeProvider, CssBaseline, CircularProgress as CircularProgress4, Typography as Typography11 } from "@mui/material";
|
|
175
175
|
import { createTheme } from "@mui/material/styles";
|
|
176
176
|
import { Navigate } from "react-router-dom";
|
|
177
177
|
|
|
@@ -1387,6 +1387,173 @@ ${sanitize(
|
|
|
1387
1387
|
};
|
|
1388
1388
|
var chat_input_default = ChatInput;
|
|
1389
1389
|
|
|
1390
|
+
// src/chat/ask-user-card.tsx
|
|
1391
|
+
import { useEffect as useEffect4, useState as useState4 } from "react";
|
|
1392
|
+
import { Box as Box4, Paper, Typography as Typography2, Button, TextField as TextField2, Chip, Stack } from "@mui/material";
|
|
1393
|
+
import { useTheme as useTheme5, alpha as alpha2 } from "@mui/material/styles";
|
|
1394
|
+
|
|
1395
|
+
// src/store/askUserStore.ts
|
|
1396
|
+
import { create as create2 } from "zustand";
|
|
1397
|
+
var useAskUserStore = create2((set, get) => ({
|
|
1398
|
+
pending: null,
|
|
1399
|
+
resolver: null,
|
|
1400
|
+
ask: (questions) => new Promise((resolve) => {
|
|
1401
|
+
const prev = get().resolver;
|
|
1402
|
+
if (prev) prev(null);
|
|
1403
|
+
set({ pending: { questions }, resolver: resolve });
|
|
1404
|
+
}),
|
|
1405
|
+
submit: (answers) => {
|
|
1406
|
+
const r = get().resolver;
|
|
1407
|
+
set({ pending: null, resolver: null });
|
|
1408
|
+
if (r) r(answers);
|
|
1409
|
+
},
|
|
1410
|
+
cancel: () => {
|
|
1411
|
+
const r = get().resolver;
|
|
1412
|
+
set({ pending: null, resolver: null });
|
|
1413
|
+
if (r) r(null);
|
|
1414
|
+
}
|
|
1415
|
+
}));
|
|
1416
|
+
var parseAskUserQuestions = (rawJson) => {
|
|
1417
|
+
let parsed = rawJson;
|
|
1418
|
+
if (typeof rawJson === "string") {
|
|
1419
|
+
try {
|
|
1420
|
+
parsed = JSON.parse(rawJson);
|
|
1421
|
+
} catch {
|
|
1422
|
+
return [];
|
|
1423
|
+
}
|
|
1424
|
+
}
|
|
1425
|
+
const coerceOption = (raw) => {
|
|
1426
|
+
if (typeof raw === "string") return raw.trim() ? { label: raw.trim() } : null;
|
|
1427
|
+
if (raw && typeof raw === "object") {
|
|
1428
|
+
const o = raw;
|
|
1429
|
+
const label = typeof o.label === "string" ? o.label : typeof o.value === "string" ? o.value : typeof o.text === "string" ? o.text : "";
|
|
1430
|
+
if (!label.trim()) return null;
|
|
1431
|
+
return {
|
|
1432
|
+
label: label.trim(),
|
|
1433
|
+
description: typeof o.description === "string" ? o.description : void 0
|
|
1434
|
+
};
|
|
1435
|
+
}
|
|
1436
|
+
return null;
|
|
1437
|
+
};
|
|
1438
|
+
const list = Array.isArray(parsed) ? parsed : [parsed];
|
|
1439
|
+
const questions = [];
|
|
1440
|
+
list.forEach((raw, i) => {
|
|
1441
|
+
if (!raw || typeof raw !== "object") return;
|
|
1442
|
+
const r = raw;
|
|
1443
|
+
const text = typeof r.question === "string" ? r.question : typeof r.text === "string" ? r.text : typeof r.prompt === "string" ? r.prompt : "";
|
|
1444
|
+
if (!text.trim()) return;
|
|
1445
|
+
const options = (Array.isArray(r.options) ? r.options : []).map(coerceOption).filter((o) => o !== null);
|
|
1446
|
+
questions.push({
|
|
1447
|
+
id: typeof r.id === "string" && r.id.trim() ? r.id.trim() : `q${i + 1}`,
|
|
1448
|
+
question: text.trim(),
|
|
1449
|
+
header: typeof r.header === "string" && r.header.trim() ? r.header.trim() : void 0,
|
|
1450
|
+
options: options.length > 0 ? options : void 0,
|
|
1451
|
+
allowFreeform: r.allowFreeform === false ? false : true
|
|
1452
|
+
});
|
|
1453
|
+
});
|
|
1454
|
+
return questions;
|
|
1455
|
+
};
|
|
1456
|
+
|
|
1457
|
+
// src/chat/ask-user-card.tsx
|
|
1458
|
+
import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1459
|
+
var AskUserCard = () => {
|
|
1460
|
+
const theme = useTheme5();
|
|
1461
|
+
const { pending, submit, cancel } = useAskUserStore();
|
|
1462
|
+
const [selected, setSelected] = useState4({});
|
|
1463
|
+
const [freeform, setFreeform] = useState4({});
|
|
1464
|
+
useEffect4(() => {
|
|
1465
|
+
if (!pending) return;
|
|
1466
|
+
const preselected = {};
|
|
1467
|
+
pending.questions.forEach((q) => {
|
|
1468
|
+
const rec = q.options?.find((o) => /\(recommended\)/i.test(o.label));
|
|
1469
|
+
if (rec) preselected[q.id] = rec.label;
|
|
1470
|
+
});
|
|
1471
|
+
setSelected(preselected);
|
|
1472
|
+
setFreeform({});
|
|
1473
|
+
}, [pending]);
|
|
1474
|
+
if (!pending) return null;
|
|
1475
|
+
const answerFor = (qid) => freeform[qid]?.trim() ? freeform[qid].trim() : selected[qid] ?? "";
|
|
1476
|
+
const allAnswered = pending.questions.every((q) => answerFor(q.id).length > 0);
|
|
1477
|
+
const handleSubmit = () => {
|
|
1478
|
+
const final = {};
|
|
1479
|
+
pending.questions.forEach((q) => {
|
|
1480
|
+
final[q.id] = answerFor(q.id);
|
|
1481
|
+
});
|
|
1482
|
+
submit(final);
|
|
1483
|
+
};
|
|
1484
|
+
return /* @__PURE__ */ jsx7(Box4, { sx: { width: "100%", display: "flex", justifyContent: "center", px: { xs: 1, sm: 2 }, mb: 1.5 }, children: /* @__PURE__ */ jsxs4(
|
|
1485
|
+
Paper,
|
|
1486
|
+
{
|
|
1487
|
+
elevation: 0,
|
|
1488
|
+
sx: {
|
|
1489
|
+
width: "100%",
|
|
1490
|
+
maxWidth: 760,
|
|
1491
|
+
p: { xs: 1.75, sm: 2.25 },
|
|
1492
|
+
borderRadius: 2,
|
|
1493
|
+
border: `1px solid ${alpha2(theme.palette.primary.main, 0.45)}`,
|
|
1494
|
+
bgcolor: alpha2(theme.palette.primary.main, 0.06)
|
|
1495
|
+
},
|
|
1496
|
+
children: [
|
|
1497
|
+
/* @__PURE__ */ jsx7(Typography2, { variant: "caption", sx: { color: theme.palette.primary.main, fontWeight: 700, letterSpacing: 0.4 }, children: "BANDIT NEEDS A QUICK DECISION" }),
|
|
1498
|
+
pending.questions.map((q) => /* @__PURE__ */ jsxs4(Box4, { sx: { mt: 1.5 }, children: [
|
|
1499
|
+
q.header && /* @__PURE__ */ jsx7(Chip, { label: q.header, size: "small", sx: { mb: 0.75, fontWeight: 600 }, color: "primary", variant: "outlined" }),
|
|
1500
|
+
/* @__PURE__ */ jsx7(Typography2, { sx: { fontWeight: 600, color: theme.palette.text.primary, mb: 1 }, children: q.question }),
|
|
1501
|
+
q.options && q.options.length > 0 && /* @__PURE__ */ jsx7(Stack, { spacing: 1, children: q.options.map((opt) => {
|
|
1502
|
+
const isSel = selected[q.id] === opt.label && !freeform[q.id]?.trim();
|
|
1503
|
+
return /* @__PURE__ */ jsx7(
|
|
1504
|
+
Button,
|
|
1505
|
+
{
|
|
1506
|
+
onClick: () => {
|
|
1507
|
+
setSelected((p) => ({ ...p, [q.id]: opt.label }));
|
|
1508
|
+
setFreeform((p) => ({ ...p, [q.id]: "" }));
|
|
1509
|
+
},
|
|
1510
|
+
variant: isSel ? "contained" : "outlined",
|
|
1511
|
+
color: "primary",
|
|
1512
|
+
sx: {
|
|
1513
|
+
justifyContent: "flex-start",
|
|
1514
|
+
textAlign: "left",
|
|
1515
|
+
textTransform: "none",
|
|
1516
|
+
py: 1,
|
|
1517
|
+
px: 1.5,
|
|
1518
|
+
borderColor: alpha2(theme.palette.primary.main, 0.4)
|
|
1519
|
+
},
|
|
1520
|
+
children: /* @__PURE__ */ jsxs4(Box4, { children: [
|
|
1521
|
+
/* @__PURE__ */ jsx7(Typography2, { sx: { fontWeight: 600, lineHeight: 1.3 }, children: opt.label }),
|
|
1522
|
+
opt.description && /* @__PURE__ */ jsx7(
|
|
1523
|
+
Typography2,
|
|
1524
|
+
{
|
|
1525
|
+
variant: "caption",
|
|
1526
|
+
sx: { color: isSel ? alpha2("#fff", 0.85) : theme.palette.text.secondary, display: "block" },
|
|
1527
|
+
children: opt.description
|
|
1528
|
+
}
|
|
1529
|
+
)
|
|
1530
|
+
] })
|
|
1531
|
+
},
|
|
1532
|
+
opt.label
|
|
1533
|
+
);
|
|
1534
|
+
}) }),
|
|
1535
|
+
q.allowFreeform !== false && /* @__PURE__ */ jsx7(
|
|
1536
|
+
TextField2,
|
|
1537
|
+
{
|
|
1538
|
+
fullWidth: true,
|
|
1539
|
+
size: "small",
|
|
1540
|
+
placeholder: q.options && q.options.length ? "Or type your own answer\u2026" : "Type your answer\u2026",
|
|
1541
|
+
value: freeform[q.id] ?? "",
|
|
1542
|
+
onChange: (e) => setFreeform((p) => ({ ...p, [q.id]: e.target.value })),
|
|
1543
|
+
sx: { mt: q.options && q.options.length ? 1.25 : 0 }
|
|
1544
|
+
}
|
|
1545
|
+
)
|
|
1546
|
+
] }, q.id)),
|
|
1547
|
+
/* @__PURE__ */ jsxs4(Box4, { sx: { display: "flex", justifyContent: "flex-end", gap: 1, mt: 2 }, children: [
|
|
1548
|
+
/* @__PURE__ */ jsx7(Button, { onClick: cancel, color: "inherit", sx: { textTransform: "none", color: theme.palette.text.secondary }, children: "Skip" }),
|
|
1549
|
+
/* @__PURE__ */ jsx7(Button, { onClick: handleSubmit, disabled: !allAnswered, variant: "contained", sx: { textTransform: "none" }, children: "Submit" })
|
|
1550
|
+
] })
|
|
1551
|
+
]
|
|
1552
|
+
}
|
|
1553
|
+
) });
|
|
1554
|
+
};
|
|
1555
|
+
var ask_user_card_default = AskUserCard;
|
|
1556
|
+
|
|
1390
1557
|
// src/chat/hooks/useAIProvider.tsx
|
|
1391
1558
|
import { useCallback, useRef as useRef3 } from "react";
|
|
1392
1559
|
|
|
@@ -1698,7 +1865,7 @@ function telemetryEndTurn(outcome) {
|
|
|
1698
1865
|
}
|
|
1699
1866
|
|
|
1700
1867
|
// src/store/engineStore.ts
|
|
1701
|
-
import { create as
|
|
1868
|
+
import { create as create3 } from "zustand";
|
|
1702
1869
|
var STORAGE_KEY = "bandit.selectedEngine";
|
|
1703
1870
|
var readStored = () => {
|
|
1704
1871
|
try {
|
|
@@ -1707,7 +1874,7 @@ var readStored = () => {
|
|
|
1707
1874
|
return null;
|
|
1708
1875
|
}
|
|
1709
1876
|
};
|
|
1710
|
-
var useEngineStore =
|
|
1877
|
+
var useEngineStore = create3((set, get) => ({
|
|
1711
1878
|
selectedEngine: readStored(),
|
|
1712
1879
|
engines: [],
|
|
1713
1880
|
loaded: false,
|
|
@@ -2271,9 +2438,9 @@ The user explicitly asked you to remember this. Respond with a short third-perso
|
|
|
2271
2438
|
};
|
|
2272
2439
|
|
|
2273
2440
|
// src/chat/hooks/useMoodEngine.tsx
|
|
2274
|
-
import { useState as
|
|
2441
|
+
import { useState as useState5 } from "react";
|
|
2275
2442
|
var useMoodEngine = () => {
|
|
2276
|
-
const [mood, setMood] =
|
|
2443
|
+
const [mood, setMood] = useState5("neutral");
|
|
2277
2444
|
const analyzeMood = async (message) => {
|
|
2278
2445
|
try {
|
|
2279
2446
|
const detected = await detectMessageMood(message);
|
|
@@ -3119,6 +3286,7 @@ TOOL USAGE PROTOCOL (conservative approach)
|
|
|
3119
3286
|
* web_search() - when asked about recent/current events, breaking news, live information (weather, prices, sports scores), or when you need to look up documentation, libraries, APIs, error messages, or verify a specific fact
|
|
3120
3287
|
* web_fetch() - to read the FULL contents of a specific URL you already have. Reach for this when the user wants to "tell me more", "go deeper", "read/open that article", or asks for details about a specific source, link, or article from an EARLIER answer: take that item's URL from the previous Sources list in this conversation and fetch it, then answer from the page's actual content (not just the prior summary)
|
|
3121
3288
|
* image_generation() - ONLY when explicitly asked to create or generate an image
|
|
3289
|
+
* ask_user({"questions": [{"question": "...", "header": "Format", "options": [{"label": "Inline (Recommended)"}, {"label": "Download a file"}]}]}) - when you are genuinely BLOCKED on a decision that is the USER's to make and cannot resolve from the request, context, or sensible defaults (e.g. show content inline vs. let them download it, which format/option they want). Renders clickable options the user answers in one step \u2014 better than asking in prose and ending your turn. Give 1-4 questions, each with 2-4 options; if one is clearly best, list it first and append " (Recommended)". The user may also type their own answer; act on it directly.
|
|
3122
3290
|
- For general questions about concepts, definitions, explanations, or how-to topics, use your built-in knowledge WITHOUT calling tools.
|
|
3123
3291
|
- Examples of what NOT to use tools for: "who are you?", "what is React?", "explain machine learning", "how does X work?", general programming questions.
|
|
3124
3292
|
- When a tool is truly needed, call exactly ONE tool that best matches the request.
|
|
@@ -3314,6 +3482,28 @@ ${fn}(${argStr})
|
|
|
3314
3482
|
functionName,
|
|
3315
3483
|
parameters: parsedParams
|
|
3316
3484
|
});
|
|
3485
|
+
if (functionName === "ask_user" || functionName === "ask-user") {
|
|
3486
|
+
enhancedMessage = enhancedMessage.replace(match, "");
|
|
3487
|
+
clearFlushTimer();
|
|
3488
|
+
const askPreamble = stripToolBlocks(fullMessage).trim();
|
|
3489
|
+
setStreamBuffer(askPreamble || "_Waiting for your answer\u2026_");
|
|
3490
|
+
const questions = parseAskUserQuestions(
|
|
3491
|
+
parsedParams.questions ?? parsedParams
|
|
3492
|
+
);
|
|
3493
|
+
if (questions.length === 0) {
|
|
3494
|
+
summarizableResults.push({
|
|
3495
|
+
name: functionName,
|
|
3496
|
+
output: "ask_user failed: `questions` must be a JSON array of {question, options} objects. Ask the user in plain text instead."
|
|
3497
|
+
});
|
|
3498
|
+
continue;
|
|
3499
|
+
}
|
|
3500
|
+
telemetryEvent("tool_loop:ask_user", { count: questions.length });
|
|
3501
|
+
const answers = await useAskUserStore.getState().ask(questions);
|
|
3502
|
+
const answerText = answers ? "The user answered:\n\n" + questions.map((q) => `Q: ${q.question}
|
|
3503
|
+
A: ${(answers[q.id] || "").trim() || "(no answer)"}`).join("\n\n") : "The user dismissed the question(s) without answering. Proceed with your best judgment; do not immediately re-ask.";
|
|
3504
|
+
summarizableResults.push({ name: functionName, output: answerText });
|
|
3505
|
+
continue;
|
|
3506
|
+
}
|
|
3317
3507
|
const placeholderToken = `<<TOOL_LOADING_${functionName}_${Math.random().toString(36).slice(2)}>>`;
|
|
3318
3508
|
enhancedMessage = enhancedMessage.replace(match, placeholderToken);
|
|
3319
3509
|
clearFlushTimer();
|
|
@@ -3445,12 +3635,8 @@ Using these results together with your own knowledge, answer my original questio
|
|
|
3445
3635
|
options: { num_predict: tokenLimit + 250 }
|
|
3446
3636
|
};
|
|
3447
3637
|
clearFlushTimer();
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
summaryPreamble ? `${summaryPreamble}
|
|
3451
|
-
|
|
3452
|
-
_Writing the answer\u2026_` : "_Writing the answer\u2026_"
|
|
3453
|
-
);
|
|
3638
|
+
setStreamBuffer("");
|
|
3639
|
+
setIsThinking?.(true);
|
|
3454
3640
|
const summaryText = await new Promise((resolve) => {
|
|
3455
3641
|
let acc = "";
|
|
3456
3642
|
let settled = false;
|
|
@@ -3468,6 +3654,7 @@ _Writing the answer\u2026_` : "_Writing the answer\u2026_"
|
|
|
3468
3654
|
const visible = stripThinking(acc);
|
|
3469
3655
|
latestDisplayMessage = visible;
|
|
3470
3656
|
lastPartialRef.current.text = visible;
|
|
3657
|
+
if (visible) setIsThinking?.(false);
|
|
3471
3658
|
setStreamBuffer(visible);
|
|
3472
3659
|
}
|
|
3473
3660
|
},
|
|
@@ -3489,6 +3676,7 @@ _Writing the answer\u2026_` : "_Writing the answer\u2026_"
|
|
|
3489
3676
|
done("");
|
|
3490
3677
|
}, 3e4);
|
|
3491
3678
|
});
|
|
3679
|
+
setIsThinking?.(false);
|
|
3492
3680
|
if (summaryText.trim()) {
|
|
3493
3681
|
const cleanedSummary = summaryText.replace(
|
|
3494
3682
|
/\n{1,}\s*(?:[*_#>\s]*)(?:sources?|references?|citations?|further reading)(?:\s*:)?\s*(?:[*_]*)\s*\n[\s\S]*$/i,
|
|
@@ -3631,7 +3819,7 @@ ${inlineImageBlocks.join("\n\n")}` : "");
|
|
|
3631
3819
|
};
|
|
3632
3820
|
|
|
3633
3821
|
// src/hooks/useAutoScroll.ts
|
|
3634
|
-
import { useRef as useRef4, useEffect as
|
|
3822
|
+
import { useRef as useRef4, useEffect as useEffect5, useCallback as useCallback2 } from "react";
|
|
3635
3823
|
var SCROLL_STATE_CHANGED_EVENT = "scrollStateChanged";
|
|
3636
3824
|
var useAutoScroll = (options = {}) => {
|
|
3637
3825
|
const {
|
|
@@ -3717,7 +3905,7 @@ var useAutoScroll = (options = {}) => {
|
|
|
3717
3905
|
}
|
|
3718
3906
|
}, [enabled, isNearBottom, scrollToBottom]);
|
|
3719
3907
|
const containerElement = containerRef.current;
|
|
3720
|
-
|
|
3908
|
+
useEffect5(() => {
|
|
3721
3909
|
if (!containerElement) return;
|
|
3722
3910
|
const handleScroll = () => {
|
|
3723
3911
|
const currentlyNearBottom = isNearBottom();
|
|
@@ -3727,7 +3915,7 @@ var useAutoScroll = (options = {}) => {
|
|
|
3727
3915
|
containerElement.addEventListener("scroll", handleScroll, { passive: true });
|
|
3728
3916
|
return () => containerElement.removeEventListener("scroll", handleScroll);
|
|
3729
3917
|
}, [containerElement, isNearBottom]);
|
|
3730
|
-
|
|
3918
|
+
useEffect5(() => {
|
|
3731
3919
|
autoScrollIfNeeded();
|
|
3732
3920
|
});
|
|
3733
3921
|
const getScrollState = useCallback2(() => {
|
|
@@ -3766,9 +3954,9 @@ var useAutoScroll = (options = {}) => {
|
|
|
3766
3954
|
};
|
|
3767
3955
|
|
|
3768
3956
|
// src/hooks/useNetworkStatus.ts
|
|
3769
|
-
import { useState as
|
|
3957
|
+
import { useState as useState6, useEffect as useEffect6, useCallback as useCallback3 } from "react";
|
|
3770
3958
|
var useNetworkStatus = () => {
|
|
3771
|
-
const [networkStatus, setNetworkStatus] =
|
|
3959
|
+
const [networkStatus, setNetworkStatus] = useState6({
|
|
3772
3960
|
isOnline: navigator.onLine,
|
|
3773
3961
|
isSlowConnection: false,
|
|
3774
3962
|
connectionQuality: "fast",
|
|
@@ -3788,7 +3976,7 @@ var useNetworkStatus = () => {
|
|
|
3788
3976
|
connectionQuality: !navigator.onLine ? "offline" : isSlowConnection ? "slow" : "fast"
|
|
3789
3977
|
}));
|
|
3790
3978
|
}, []);
|
|
3791
|
-
|
|
3979
|
+
useEffect6(() => {
|
|
3792
3980
|
const handleOnline = () => {
|
|
3793
3981
|
setNetworkStatus((prev) => ({
|
|
3794
3982
|
...prev,
|
|
@@ -3810,7 +3998,7 @@ var useNetworkStatus = () => {
|
|
|
3810
3998
|
window.removeEventListener("offline", handleOffline);
|
|
3811
3999
|
};
|
|
3812
4000
|
}, []);
|
|
3813
|
-
|
|
4001
|
+
useEffect6(() => {
|
|
3814
4002
|
const { connection } = navigator;
|
|
3815
4003
|
if (connection) {
|
|
3816
4004
|
const updateConnectionInfo = () => {
|
|
@@ -3847,33 +4035,33 @@ var useNetworkStatus = () => {
|
|
|
3847
4035
|
|
|
3848
4036
|
// src/chat/chat-app-bar.tsx
|
|
3849
4037
|
import { Avatar as Avatar8 } from "@mui/material";
|
|
3850
|
-
import { useEffect as
|
|
4038
|
+
import { useEffect as useEffect12, useRef as useRef10, useState as useState13 } from "react";
|
|
3851
4039
|
import {
|
|
3852
|
-
Box as
|
|
4040
|
+
Box as Box11,
|
|
3853
4041
|
IconButton as IconButton9,
|
|
3854
4042
|
Menu as Menu5,
|
|
3855
4043
|
MenuItem as MenuItem5,
|
|
3856
4044
|
Tooltip as Tooltip4,
|
|
3857
4045
|
useMediaQuery as useMediaQuery5,
|
|
3858
|
-
useTheme as
|
|
4046
|
+
useTheme as useTheme12,
|
|
3859
4047
|
Dialog as Dialog5,
|
|
3860
4048
|
DialogTitle as DialogTitle5,
|
|
3861
4049
|
DialogContent as DialogContent5,
|
|
3862
4050
|
DialogActions as DialogActions5,
|
|
3863
|
-
Typography as
|
|
3864
|
-
Button as
|
|
4051
|
+
Typography as Typography9,
|
|
4052
|
+
Button as Button7
|
|
3865
4053
|
} from "@mui/material";
|
|
3866
4054
|
import { useNavigate } from "react-router-dom";
|
|
3867
4055
|
|
|
3868
4056
|
// src/chat/conversation-drawer.tsx
|
|
3869
|
-
import { useState as
|
|
4057
|
+
import { useState as useState11, useMemo, useEffect as useEffect10, useRef as useRef8, useCallback as useCallback4 } from "react";
|
|
3870
4058
|
import {
|
|
3871
4059
|
Drawer,
|
|
3872
|
-
Box as
|
|
3873
|
-
Typography as
|
|
4060
|
+
Box as Box9,
|
|
4061
|
+
Typography as Typography7,
|
|
3874
4062
|
IconButton as IconButton7,
|
|
3875
4063
|
Tooltip as Tooltip3,
|
|
3876
|
-
TextField as
|
|
4064
|
+
TextField as TextField6,
|
|
3877
4065
|
InputAdornment,
|
|
3878
4066
|
useMediaQuery as useMediaQuery4,
|
|
3879
4067
|
Collapse as Collapse2,
|
|
@@ -3886,26 +4074,26 @@ import {
|
|
|
3886
4074
|
DialogTitle as DialogTitle3,
|
|
3887
4075
|
DialogContent as DialogContent3,
|
|
3888
4076
|
DialogActions as DialogActions3,
|
|
3889
|
-
Button as
|
|
4077
|
+
Button as Button5,
|
|
3890
4078
|
Avatar as Avatar6,
|
|
3891
|
-
alpha as
|
|
4079
|
+
alpha as alpha6
|
|
3892
4080
|
} from "@mui/material";
|
|
3893
4081
|
import { X as CloseIcon4, X as ClearIcon, Search as SearchIcon, Folder as FolderIcon4, MoreVertical as MoreVertIcon3, Trash2 as DeleteSweepIcon, Inbox as InboxIcon3, Plus as AddIcon4 } from "lucide-react";
|
|
3894
|
-
import { useTheme as
|
|
4082
|
+
import { useTheme as useTheme10 } from "@mui/material/styles";
|
|
3895
4083
|
|
|
3896
4084
|
// src/chat/project-management-modal.tsx
|
|
3897
|
-
import { useState as
|
|
4085
|
+
import { useState as useState7, useEffect as useEffect7, useRef as useRef5 } from "react";
|
|
3898
4086
|
import {
|
|
3899
4087
|
Modal,
|
|
3900
|
-
Button,
|
|
3901
|
-
TextField as
|
|
4088
|
+
Button as Button2,
|
|
4089
|
+
TextField as TextField3,
|
|
3902
4090
|
List,
|
|
3903
4091
|
ListItem,
|
|
3904
4092
|
IconButton as IconButton4,
|
|
3905
|
-
Box as
|
|
3906
|
-
Typography as
|
|
4093
|
+
Box as Box5,
|
|
4094
|
+
Typography as Typography3,
|
|
3907
4095
|
Avatar as Avatar3,
|
|
3908
|
-
Chip,
|
|
4096
|
+
Chip as Chip2,
|
|
3909
4097
|
Menu,
|
|
3910
4098
|
MenuItem,
|
|
3911
4099
|
Alert,
|
|
@@ -3914,8 +4102,8 @@ import {
|
|
|
3914
4102
|
useMediaQuery as useMediaQuery2
|
|
3915
4103
|
} from "@mui/material";
|
|
3916
4104
|
import { Plus as AddIcon2, Pencil as EditIcon, Trash2 as DeleteIcon, MoreVertical as MoreVertIcon, Folder as FolderIcon, X as CloseIcon2, ArrowLeft as ArrowBackIcon } from "lucide-react";
|
|
3917
|
-
import { useTheme as
|
|
3918
|
-
import { Fragment as Fragment4, jsx as
|
|
4105
|
+
import { useTheme as useTheme6, alpha as alpha3 } from "@mui/material/styles";
|
|
4106
|
+
import { Fragment as Fragment4, jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
3919
4107
|
var DEFAULT_COLORS = [
|
|
3920
4108
|
"#2196F3",
|
|
3921
4109
|
"#4CAF50",
|
|
@@ -3932,7 +4120,7 @@ var ProjectManagementModal = ({
|
|
|
3932
4120
|
open,
|
|
3933
4121
|
onClose
|
|
3934
4122
|
}) => {
|
|
3935
|
-
const theme =
|
|
4123
|
+
const theme = useTheme6();
|
|
3936
4124
|
const isMobile = useMediaQuery2(theme.breakpoints.down("sm"));
|
|
3937
4125
|
const {
|
|
3938
4126
|
projects,
|
|
@@ -3944,24 +4132,24 @@ var ProjectManagementModal = ({
|
|
|
3944
4132
|
hydrate
|
|
3945
4133
|
} = useProjectStore();
|
|
3946
4134
|
const { getConversationsByProject } = useConversationStore();
|
|
3947
|
-
const [showCreateForm, setShowCreateForm] =
|
|
3948
|
-
const [editingProject, setEditingProject] =
|
|
3949
|
-
const [formData, setFormData] =
|
|
4135
|
+
const [showCreateForm, setShowCreateForm] = useState7(false);
|
|
4136
|
+
const [editingProject, setEditingProject] = useState7(null);
|
|
4137
|
+
const [formData, setFormData] = useState7({
|
|
3950
4138
|
name: "",
|
|
3951
4139
|
description: "",
|
|
3952
4140
|
color: DEFAULT_COLORS[0]
|
|
3953
4141
|
});
|
|
3954
|
-
const [menuAnchor, setMenuAnchor] =
|
|
3955
|
-
const [selectedProject, setSelectedProject] =
|
|
3956
|
-
const [loading, setLoading] =
|
|
3957
|
-
const [error, setError] =
|
|
4142
|
+
const [menuAnchor, setMenuAnchor] = useState7(null);
|
|
4143
|
+
const [selectedProject, setSelectedProject] = useState7(null);
|
|
4144
|
+
const [loading, setLoading] = useState7(false);
|
|
4145
|
+
const [error, setError] = useState7(null);
|
|
3958
4146
|
const modalContainerRef = useRef5(null);
|
|
3959
|
-
|
|
4147
|
+
useEffect7(() => {
|
|
3960
4148
|
if (open && !_hasHydrated) {
|
|
3961
4149
|
hydrate();
|
|
3962
4150
|
}
|
|
3963
4151
|
}, [open, _hasHydrated, hydrate]);
|
|
3964
|
-
|
|
4152
|
+
useEffect7(() => {
|
|
3965
4153
|
if (!open) {
|
|
3966
4154
|
setMenuAnchor(null);
|
|
3967
4155
|
setSelectedProject(null);
|
|
@@ -4058,13 +4246,13 @@ var ProjectManagementModal = ({
|
|
|
4058
4246
|
const chatPalette = theme.palette.chat ?? {};
|
|
4059
4247
|
const overlayZIndex = (theme.zIndex?.modal ?? 1300) + 20;
|
|
4060
4248
|
const surfaceColor = isMobile ? theme.palette.background.paper : chatPalette.shell ?? theme.palette.background.paper;
|
|
4061
|
-
const borderColor = chatPalette.appBar?.border ??
|
|
4062
|
-
const subtleSurface = theme.palette.mode === "dark" ?
|
|
4063
|
-
const hoverSurface =
|
|
4249
|
+
const borderColor = chatPalette.appBar?.border ?? alpha3(theme.palette.divider, 0.12);
|
|
4250
|
+
const subtleSurface = theme.palette.mode === "dark" ? alpha3(theme.palette.common.white, 0.04) : alpha3(theme.palette.common.black, 0.03);
|
|
4251
|
+
const hoverSurface = alpha3(theme.palette.primary.main, theme.palette.mode === "dark" ? 0.22 : 0.08);
|
|
4064
4252
|
const headerTitle = showCreateForm ? editingProject ? "Edit Project" : "Create Project" : "Manage Projects";
|
|
4065
4253
|
const headerSubtitle = showCreateForm ? "Name, describe, and color-code your project." : "Organize conversations into cohesive projects.";
|
|
4066
|
-
const content = /* @__PURE__ */
|
|
4067
|
-
|
|
4254
|
+
const content = /* @__PURE__ */ jsxs5(
|
|
4255
|
+
Box5,
|
|
4068
4256
|
{
|
|
4069
4257
|
ref: modalContainerRef,
|
|
4070
4258
|
sx: {
|
|
@@ -4075,29 +4263,29 @@ var ProjectManagementModal = ({
|
|
|
4075
4263
|
bgcolor: surfaceColor,
|
|
4076
4264
|
borderRadius: isMobile ? "22px 22px 0 0" : 3,
|
|
4077
4265
|
overflow: "hidden",
|
|
4078
|
-
boxShadow: isMobile ? "none" : `0 20px 60px ${
|
|
4079
|
-
border: isMobile ? "none" : `1px solid ${
|
|
4266
|
+
boxShadow: isMobile ? "none" : `0 20px 60px ${alpha3(theme.palette.common.black, 0.32)}`,
|
|
4267
|
+
border: isMobile ? "none" : `1px solid ${alpha3(theme.palette.divider, 0.18)}`,
|
|
4080
4268
|
display: "flex",
|
|
4081
4269
|
flexDirection: "column",
|
|
4082
4270
|
position: "relative"
|
|
4083
4271
|
},
|
|
4084
4272
|
children: [
|
|
4085
|
-
isMobile && /* @__PURE__ */
|
|
4086
|
-
|
|
4273
|
+
isMobile && /* @__PURE__ */ jsx8(
|
|
4274
|
+
Box5,
|
|
4087
4275
|
{
|
|
4088
4276
|
sx: {
|
|
4089
4277
|
width: 56,
|
|
4090
4278
|
height: 6,
|
|
4091
4279
|
borderRadius: 999,
|
|
4092
|
-
bgcolor:
|
|
4280
|
+
bgcolor: alpha3(theme.palette.text.primary, 0.18),
|
|
4093
4281
|
alignSelf: "center",
|
|
4094
4282
|
mt: 1.25,
|
|
4095
4283
|
mb: 0.75
|
|
4096
4284
|
}
|
|
4097
4285
|
}
|
|
4098
4286
|
),
|
|
4099
|
-
/* @__PURE__ */
|
|
4100
|
-
|
|
4287
|
+
/* @__PURE__ */ jsxs5(
|
|
4288
|
+
Box5,
|
|
4101
4289
|
{
|
|
4102
4290
|
sx: {
|
|
4103
4291
|
px: isMobile ? 1.5 : 2.75,
|
|
@@ -4109,8 +4297,8 @@ var ProjectManagementModal = ({
|
|
|
4109
4297
|
gap: 1
|
|
4110
4298
|
},
|
|
4111
4299
|
children: [
|
|
4112
|
-
/* @__PURE__ */
|
|
4113
|
-
|
|
4300
|
+
/* @__PURE__ */ jsxs5(
|
|
4301
|
+
Box5,
|
|
4114
4302
|
{
|
|
4115
4303
|
sx: {
|
|
4116
4304
|
display: "flex",
|
|
@@ -4119,8 +4307,8 @@ var ProjectManagementModal = ({
|
|
|
4119
4307
|
gap: 1
|
|
4120
4308
|
},
|
|
4121
4309
|
children: [
|
|
4122
|
-
/* @__PURE__ */
|
|
4123
|
-
|
|
4310
|
+
/* @__PURE__ */ jsxs5(
|
|
4311
|
+
Box5,
|
|
4124
4312
|
{
|
|
4125
4313
|
sx: {
|
|
4126
4314
|
display: "flex",
|
|
@@ -4130,9 +4318,9 @@ var ProjectManagementModal = ({
|
|
|
4130
4318
|
flex: 1
|
|
4131
4319
|
},
|
|
4132
4320
|
children: [
|
|
4133
|
-
showCreateForm && /* @__PURE__ */
|
|
4134
|
-
/* @__PURE__ */
|
|
4135
|
-
|
|
4321
|
+
showCreateForm && /* @__PURE__ */ jsx8(IconButton4, { onClick: resetForm, size: "small", sx: { mr: 0.5 }, children: /* @__PURE__ */ jsx8(ArrowBackIcon, { size: 16 }) }),
|
|
4322
|
+
/* @__PURE__ */ jsx8(
|
|
4323
|
+
Typography3,
|
|
4136
4324
|
{
|
|
4137
4325
|
variant: "h6",
|
|
4138
4326
|
sx: {
|
|
@@ -4148,16 +4336,16 @@ var ProjectManagementModal = ({
|
|
|
4148
4336
|
]
|
|
4149
4337
|
}
|
|
4150
4338
|
),
|
|
4151
|
-
/* @__PURE__ */
|
|
4339
|
+
/* @__PURE__ */ jsx8(IconButton4, { onClick: handleClose, size: "small", children: /* @__PURE__ */ jsx8(CloseIcon2, {}) })
|
|
4152
4340
|
]
|
|
4153
4341
|
}
|
|
4154
4342
|
),
|
|
4155
|
-
/* @__PURE__ */
|
|
4343
|
+
/* @__PURE__ */ jsx8(Typography3, { variant: "body2", color: "text.secondary", children: headerSubtitle })
|
|
4156
4344
|
]
|
|
4157
4345
|
}
|
|
4158
4346
|
),
|
|
4159
|
-
/* @__PURE__ */
|
|
4160
|
-
|
|
4347
|
+
/* @__PURE__ */ jsxs5(
|
|
4348
|
+
Box5,
|
|
4161
4349
|
{
|
|
4162
4350
|
sx: {
|
|
4163
4351
|
flex: 1,
|
|
@@ -4169,10 +4357,10 @@ var ProjectManagementModal = ({
|
|
|
4169
4357
|
gap: 2.5
|
|
4170
4358
|
},
|
|
4171
4359
|
children: [
|
|
4172
|
-
error && /* @__PURE__ */
|
|
4173
|
-
showCreateForm ? /* @__PURE__ */
|
|
4174
|
-
/* @__PURE__ */
|
|
4175
|
-
|
|
4360
|
+
error && /* @__PURE__ */ jsx8(Alert, { severity: "error", onClose: () => setError(null), children: error }),
|
|
4361
|
+
showCreateForm ? /* @__PURE__ */ jsxs5(Box5, { sx: { display: "flex", flexDirection: "column", gap: 2 }, children: [
|
|
4362
|
+
/* @__PURE__ */ jsx8(
|
|
4363
|
+
TextField3,
|
|
4176
4364
|
{
|
|
4177
4365
|
label: "Project name",
|
|
4178
4366
|
value: formData.name,
|
|
@@ -4183,8 +4371,8 @@ var ProjectManagementModal = ({
|
|
|
4183
4371
|
autoFocus: true
|
|
4184
4372
|
}
|
|
4185
4373
|
),
|
|
4186
|
-
/* @__PURE__ */
|
|
4187
|
-
|
|
4374
|
+
/* @__PURE__ */ jsx8(
|
|
4375
|
+
TextField3,
|
|
4188
4376
|
{
|
|
4189
4377
|
label: "Description (optional)",
|
|
4190
4378
|
value: formData.description,
|
|
@@ -4195,10 +4383,10 @@ var ProjectManagementModal = ({
|
|
|
4195
4383
|
disabled: loading
|
|
4196
4384
|
}
|
|
4197
4385
|
),
|
|
4198
|
-
/* @__PURE__ */
|
|
4199
|
-
/* @__PURE__ */
|
|
4200
|
-
/* @__PURE__ */
|
|
4201
|
-
|
|
4386
|
+
/* @__PURE__ */ jsxs5(Box5, { children: [
|
|
4387
|
+
/* @__PURE__ */ jsx8(Typography3, { variant: "subtitle2", sx: { mb: 1 }, children: "Color" }),
|
|
4388
|
+
/* @__PURE__ */ jsx8(Box5, { sx: { display: "flex", flexWrap: "wrap", gap: 1 }, children: DEFAULT_COLORS.map((color) => /* @__PURE__ */ jsx8(
|
|
4389
|
+
Box5,
|
|
4202
4390
|
{
|
|
4203
4391
|
sx: {
|
|
4204
4392
|
width: 32,
|
|
@@ -4218,11 +4406,11 @@ var ProjectManagementModal = ({
|
|
|
4218
4406
|
color
|
|
4219
4407
|
)) })
|
|
4220
4408
|
] })
|
|
4221
|
-
] }) : /* @__PURE__ */
|
|
4222
|
-
/* @__PURE__ */
|
|
4223
|
-
|
|
4409
|
+
] }) : /* @__PURE__ */ jsxs5(Box5, { sx: { display: "flex", flexDirection: "column", gap: 2 }, children: [
|
|
4410
|
+
/* @__PURE__ */ jsx8(
|
|
4411
|
+
Button2,
|
|
4224
4412
|
{
|
|
4225
|
-
startIcon: /* @__PURE__ */
|
|
4413
|
+
startIcon: /* @__PURE__ */ jsx8(AddIcon2, {}),
|
|
4226
4414
|
onClick: () => setShowCreateForm(true),
|
|
4227
4415
|
variant: "contained",
|
|
4228
4416
|
sx: {
|
|
@@ -4234,8 +4422,8 @@ var ProjectManagementModal = ({
|
|
|
4234
4422
|
children: "Create project"
|
|
4235
4423
|
}
|
|
4236
4424
|
),
|
|
4237
|
-
projects.length === 0 ? /* @__PURE__ */
|
|
4238
|
-
|
|
4425
|
+
projects.length === 0 ? /* @__PURE__ */ jsxs5(
|
|
4426
|
+
Box5,
|
|
4239
4427
|
{
|
|
4240
4428
|
sx: {
|
|
4241
4429
|
textAlign: "center",
|
|
@@ -4243,19 +4431,19 @@ var ProjectManagementModal = ({
|
|
|
4243
4431
|
px: 2,
|
|
4244
4432
|
color: theme.palette.text.secondary,
|
|
4245
4433
|
borderRadius: 2,
|
|
4246
|
-
border: `1px dashed ${
|
|
4434
|
+
border: `1px dashed ${alpha3(theme.palette.divider, 0.4)}`,
|
|
4247
4435
|
backgroundColor: subtleSurface
|
|
4248
4436
|
},
|
|
4249
4437
|
children: [
|
|
4250
|
-
/* @__PURE__ */
|
|
4251
|
-
/* @__PURE__ */
|
|
4252
|
-
/* @__PURE__ */
|
|
4438
|
+
/* @__PURE__ */ jsx8(FolderIcon, { size: 48, style: { marginBottom: 8, opacity: 0.5 } }),
|
|
4439
|
+
/* @__PURE__ */ jsx8(Typography3, { variant: "body1", sx: { fontWeight: 600 }, children: "No projects yet" }),
|
|
4440
|
+
/* @__PURE__ */ jsx8(Typography3, { variant: "body2", children: "Create your first project to organize conversations." })
|
|
4253
4441
|
]
|
|
4254
4442
|
}
|
|
4255
|
-
) : /* @__PURE__ */
|
|
4443
|
+
) : /* @__PURE__ */ jsx8(List, { sx: { display: "flex", flexDirection: "column", gap: 1.25, py: 0 }, children: projects.map((project) => {
|
|
4256
4444
|
const conversationCount = getConversationsByProject(project.id).length;
|
|
4257
|
-
return /* @__PURE__ */
|
|
4258
|
-
|
|
4445
|
+
return /* @__PURE__ */ jsx8(ListItem, { disablePadding: true, children: /* @__PURE__ */ jsxs5(
|
|
4446
|
+
Box5,
|
|
4259
4447
|
{
|
|
4260
4448
|
sx: {
|
|
4261
4449
|
display: "flex",
|
|
@@ -4273,7 +4461,7 @@ var ProjectManagementModal = ({
|
|
|
4273
4461
|
}
|
|
4274
4462
|
},
|
|
4275
4463
|
children: [
|
|
4276
|
-
/* @__PURE__ */
|
|
4464
|
+
/* @__PURE__ */ jsx8(
|
|
4277
4465
|
Avatar3,
|
|
4278
4466
|
{
|
|
4279
4467
|
sx: {
|
|
@@ -4282,21 +4470,21 @@ var ProjectManagementModal = ({
|
|
|
4282
4470
|
height: 36,
|
|
4283
4471
|
fontSize: "1rem"
|
|
4284
4472
|
},
|
|
4285
|
-
children: /* @__PURE__ */
|
|
4473
|
+
children: /* @__PURE__ */ jsx8(FolderIcon, { size: 16 })
|
|
4286
4474
|
}
|
|
4287
4475
|
),
|
|
4288
|
-
/* @__PURE__ */
|
|
4289
|
-
/* @__PURE__ */
|
|
4290
|
-
/* @__PURE__ */
|
|
4291
|
-
|
|
4476
|
+
/* @__PURE__ */ jsxs5(Box5, { sx: { flex: 1, minWidth: 0 }, children: [
|
|
4477
|
+
/* @__PURE__ */ jsxs5(Box5, { sx: { display: "flex", alignItems: "center", gap: 1, flexWrap: "wrap" }, children: [
|
|
4478
|
+
/* @__PURE__ */ jsx8(
|
|
4479
|
+
Typography3,
|
|
4292
4480
|
{
|
|
4293
4481
|
variant: "subtitle1",
|
|
4294
4482
|
sx: { fontWeight: 600, overflow: "hidden", textOverflow: "ellipsis" },
|
|
4295
4483
|
children: project.name
|
|
4296
4484
|
}
|
|
4297
4485
|
),
|
|
4298
|
-
/* @__PURE__ */
|
|
4299
|
-
|
|
4486
|
+
/* @__PURE__ */ jsx8(
|
|
4487
|
+
Chip2,
|
|
4300
4488
|
{
|
|
4301
4489
|
label: `${conversationCount}`,
|
|
4302
4490
|
size: "small",
|
|
@@ -4304,14 +4492,14 @@ var ProjectManagementModal = ({
|
|
|
4304
4492
|
height: 22,
|
|
4305
4493
|
borderRadius: 999,
|
|
4306
4494
|
fontWeight: 600,
|
|
4307
|
-
bgcolor:
|
|
4495
|
+
bgcolor: alpha3(theme.palette.text.primary, 0.08),
|
|
4308
4496
|
color: theme.palette.text.primary
|
|
4309
4497
|
}
|
|
4310
4498
|
}
|
|
4311
4499
|
)
|
|
4312
4500
|
] }),
|
|
4313
|
-
project.description && /* @__PURE__ */
|
|
4314
|
-
|
|
4501
|
+
project.description && /* @__PURE__ */ jsx8(
|
|
4502
|
+
Typography3,
|
|
4315
4503
|
{
|
|
4316
4504
|
variant: "body2",
|
|
4317
4505
|
color: "text.secondary",
|
|
@@ -4320,7 +4508,7 @@ var ProjectManagementModal = ({
|
|
|
4320
4508
|
}
|
|
4321
4509
|
)
|
|
4322
4510
|
] }),
|
|
4323
|
-
/* @__PURE__ */
|
|
4511
|
+
/* @__PURE__ */ jsx8(
|
|
4324
4512
|
IconButton4,
|
|
4325
4513
|
{
|
|
4326
4514
|
onClick: (e) => {
|
|
@@ -4333,7 +4521,7 @@ var ProjectManagementModal = ({
|
|
|
4333
4521
|
mt: 0.25,
|
|
4334
4522
|
zIndex: 1
|
|
4335
4523
|
},
|
|
4336
|
-
children: /* @__PURE__ */
|
|
4524
|
+
children: /* @__PURE__ */ jsx8(MoreVertIcon, { size: 16 })
|
|
4337
4525
|
}
|
|
4338
4526
|
)
|
|
4339
4527
|
]
|
|
@@ -4344,8 +4532,8 @@ var ProjectManagementModal = ({
|
|
|
4344
4532
|
]
|
|
4345
4533
|
}
|
|
4346
4534
|
),
|
|
4347
|
-
/* @__PURE__ */
|
|
4348
|
-
|
|
4535
|
+
/* @__PURE__ */ jsx8(
|
|
4536
|
+
Box5,
|
|
4349
4537
|
{
|
|
4350
4538
|
sx: {
|
|
4351
4539
|
px: isMobile ? 1.5 : 2.75,
|
|
@@ -4355,9 +4543,9 @@ var ProjectManagementModal = ({
|
|
|
4355
4543
|
justifyContent: "flex-end",
|
|
4356
4544
|
gap: 1
|
|
4357
4545
|
},
|
|
4358
|
-
children: showCreateForm ? /* @__PURE__ */
|
|
4359
|
-
/* @__PURE__ */
|
|
4360
|
-
|
|
4546
|
+
children: showCreateForm ? /* @__PURE__ */ jsxs5(Fragment4, { children: [
|
|
4547
|
+
/* @__PURE__ */ jsx8(
|
|
4548
|
+
Button2,
|
|
4361
4549
|
{
|
|
4362
4550
|
onClick: resetForm,
|
|
4363
4551
|
disabled: loading,
|
|
@@ -4365,21 +4553,21 @@ var ProjectManagementModal = ({
|
|
|
4365
4553
|
children: "Cancel"
|
|
4366
4554
|
}
|
|
4367
4555
|
),
|
|
4368
|
-
/* @__PURE__ */
|
|
4369
|
-
|
|
4556
|
+
/* @__PURE__ */ jsx8(
|
|
4557
|
+
Button2,
|
|
4370
4558
|
{
|
|
4371
4559
|
onClick: editingProject ? handleEditProject : handleCreateProject,
|
|
4372
4560
|
variant: "contained",
|
|
4373
4561
|
disabled: loading,
|
|
4374
|
-
startIcon: loading ? /* @__PURE__ */
|
|
4562
|
+
startIcon: loading ? /* @__PURE__ */ jsx8(CircularProgress3, { size: 16 }) : void 0,
|
|
4375
4563
|
sx: { textTransform: "none", borderRadius: 2 },
|
|
4376
4564
|
children: editingProject ? "Update project" : "Create project"
|
|
4377
4565
|
}
|
|
4378
4566
|
)
|
|
4379
|
-
] }) : /* @__PURE__ */
|
|
4567
|
+
] }) : /* @__PURE__ */ jsx8(Button2, { onClick: handleClose, sx: { textTransform: "none", borderRadius: 2 }, children: "Close" })
|
|
4380
4568
|
}
|
|
4381
4569
|
),
|
|
4382
|
-
/* @__PURE__ */
|
|
4570
|
+
/* @__PURE__ */ jsxs5(
|
|
4383
4571
|
Menu,
|
|
4384
4572
|
{
|
|
4385
4573
|
anchorEl: menuAnchor,
|
|
@@ -4401,20 +4589,20 @@ var ProjectManagementModal = ({
|
|
|
4401
4589
|
}
|
|
4402
4590
|
},
|
|
4403
4591
|
children: [
|
|
4404
|
-
/* @__PURE__ */
|
|
4592
|
+
/* @__PURE__ */ jsx8(
|
|
4405
4593
|
MenuItem,
|
|
4406
4594
|
{
|
|
4407
4595
|
onClick: () => {
|
|
4408
4596
|
if (!selectedProject) return;
|
|
4409
4597
|
startEdit(selectedProject);
|
|
4410
4598
|
},
|
|
4411
|
-
children: /* @__PURE__ */
|
|
4412
|
-
/* @__PURE__ */
|
|
4413
|
-
/* @__PURE__ */
|
|
4599
|
+
children: /* @__PURE__ */ jsxs5(Box5, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
4600
|
+
/* @__PURE__ */ jsx8(EditIcon, { size: 16 }),
|
|
4601
|
+
/* @__PURE__ */ jsx8(Typography3, { variant: "body2", color: "inherit", children: "Edit" })
|
|
4414
4602
|
] })
|
|
4415
4603
|
}
|
|
4416
4604
|
),
|
|
4417
|
-
/* @__PURE__ */
|
|
4605
|
+
/* @__PURE__ */ jsx8(
|
|
4418
4606
|
MenuItem,
|
|
4419
4607
|
{
|
|
4420
4608
|
onClick: () => {
|
|
@@ -4422,9 +4610,9 @@ var ProjectManagementModal = ({
|
|
|
4422
4610
|
handleDeleteProject(selectedProject);
|
|
4423
4611
|
},
|
|
4424
4612
|
sx: { color: theme.palette.error.main },
|
|
4425
|
-
children: /* @__PURE__ */
|
|
4426
|
-
/* @__PURE__ */
|
|
4427
|
-
/* @__PURE__ */
|
|
4613
|
+
children: /* @__PURE__ */ jsxs5(Box5, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
4614
|
+
/* @__PURE__ */ jsx8(DeleteIcon, { size: 16 }),
|
|
4615
|
+
/* @__PURE__ */ jsx8(Typography3, { variant: "body2", color: "inherit", children: "Delete" })
|
|
4428
4616
|
] })
|
|
4429
4617
|
}
|
|
4430
4618
|
)
|
|
@@ -4434,7 +4622,7 @@ var ProjectManagementModal = ({
|
|
|
4434
4622
|
]
|
|
4435
4623
|
}
|
|
4436
4624
|
);
|
|
4437
|
-
return /* @__PURE__ */
|
|
4625
|
+
return /* @__PURE__ */ jsx8(Fragment4, { children: isMobile ? /* @__PURE__ */ jsx8(
|
|
4438
4626
|
SwipeableDrawer,
|
|
4439
4627
|
{
|
|
4440
4628
|
anchor: "bottom",
|
|
@@ -4454,7 +4642,7 @@ var ProjectManagementModal = ({
|
|
|
4454
4642
|
},
|
|
4455
4643
|
children: content
|
|
4456
4644
|
}
|
|
4457
|
-
) : /* @__PURE__ */
|
|
4645
|
+
) : /* @__PURE__ */ jsx8(
|
|
4458
4646
|
Modal,
|
|
4459
4647
|
{
|
|
4460
4648
|
open,
|
|
@@ -4473,45 +4661,45 @@ var ProjectManagementModal = ({
|
|
|
4473
4661
|
var project_management_modal_default = ProjectManagementModal;
|
|
4474
4662
|
|
|
4475
4663
|
// src/chat/move-conversation-modal.tsx
|
|
4476
|
-
import { useState as
|
|
4664
|
+
import { useState as useState8, useEffect as useEffect8 } from "react";
|
|
4477
4665
|
import {
|
|
4478
4666
|
Dialog,
|
|
4479
4667
|
DialogTitle,
|
|
4480
4668
|
DialogContent,
|
|
4481
4669
|
DialogActions,
|
|
4482
|
-
Button as
|
|
4670
|
+
Button as Button3,
|
|
4483
4671
|
List as List2,
|
|
4484
4672
|
ListItem as ListItem2,
|
|
4485
4673
|
ListItemButton,
|
|
4486
4674
|
ListItemText,
|
|
4487
4675
|
ListItemIcon,
|
|
4488
|
-
Typography as
|
|
4676
|
+
Typography as Typography4,
|
|
4489
4677
|
Avatar as Avatar4,
|
|
4490
4678
|
Radio,
|
|
4491
|
-
Box as
|
|
4679
|
+
Box as Box6,
|
|
4492
4680
|
Divider
|
|
4493
4681
|
} from "@mui/material";
|
|
4494
4682
|
import { Folder as FolderIcon2, Inbox as InboxIcon } from "lucide-react";
|
|
4495
|
-
import { useTheme as
|
|
4496
|
-
import { jsx as
|
|
4683
|
+
import { useTheme as useTheme7 } from "@mui/material/styles";
|
|
4684
|
+
import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
4497
4685
|
var MoveConversationModal = ({
|
|
4498
4686
|
open,
|
|
4499
4687
|
onClose,
|
|
4500
4688
|
conversations,
|
|
4501
4689
|
currentProjectId = null
|
|
4502
4690
|
}) => {
|
|
4503
|
-
const theme =
|
|
4691
|
+
const theme = useTheme7();
|
|
4504
4692
|
const { projects, _hasHydrated, hydrate } = useProjectStore();
|
|
4505
4693
|
const { moveConversationToProject } = useConversationStore();
|
|
4506
|
-
const [selectedProjectId, setSelectedProjectId] =
|
|
4694
|
+
const [selectedProjectId, setSelectedProjectId] = useState8(
|
|
4507
4695
|
currentProjectId
|
|
4508
4696
|
);
|
|
4509
|
-
|
|
4697
|
+
useEffect8(() => {
|
|
4510
4698
|
if (open && !_hasHydrated) {
|
|
4511
4699
|
hydrate();
|
|
4512
4700
|
}
|
|
4513
4701
|
}, [open, _hasHydrated, hydrate]);
|
|
4514
|
-
|
|
4702
|
+
useEffect8(() => {
|
|
4515
4703
|
setSelectedProjectId(currentProjectId);
|
|
4516
4704
|
}, [currentProjectId, open]);
|
|
4517
4705
|
const handleMove = async () => {
|
|
@@ -4530,7 +4718,7 @@ var MoveConversationModal = ({
|
|
|
4530
4718
|
};
|
|
4531
4719
|
const conversationCount = conversations.length;
|
|
4532
4720
|
const isMultiple = conversationCount > 1;
|
|
4533
|
-
return /* @__PURE__ */
|
|
4721
|
+
return /* @__PURE__ */ jsxs6(
|
|
4534
4722
|
Dialog,
|
|
4535
4723
|
{
|
|
4536
4724
|
open,
|
|
@@ -4544,20 +4732,20 @@ var MoveConversationModal = ({
|
|
|
4544
4732
|
}
|
|
4545
4733
|
},
|
|
4546
4734
|
children: [
|
|
4547
|
-
/* @__PURE__ */
|
|
4735
|
+
/* @__PURE__ */ jsxs6(DialogTitle, { children: [
|
|
4548
4736
|
"Move ",
|
|
4549
4737
|
isMultiple ? `${conversationCount} Conversations` : "Conversation"
|
|
4550
4738
|
] }),
|
|
4551
|
-
/* @__PURE__ */
|
|
4552
|
-
/* @__PURE__ */
|
|
4553
|
-
/* @__PURE__ */
|
|
4554
|
-
/* @__PURE__ */
|
|
4739
|
+
/* @__PURE__ */ jsxs6(DialogContent, { sx: { px: 3 }, children: [
|
|
4740
|
+
/* @__PURE__ */ jsx9(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:` }),
|
|
4741
|
+
/* @__PURE__ */ jsxs6(List2, { children: [
|
|
4742
|
+
/* @__PURE__ */ jsx9(ListItem2, { disablePadding: true, children: /* @__PURE__ */ jsxs6(
|
|
4555
4743
|
ListItemButton,
|
|
4556
4744
|
{
|
|
4557
4745
|
onClick: () => setSelectedProjectId(null),
|
|
4558
4746
|
selected: selectedProjectId === null,
|
|
4559
4747
|
children: [
|
|
4560
|
-
/* @__PURE__ */
|
|
4748
|
+
/* @__PURE__ */ jsx9(ListItemIcon, { children: /* @__PURE__ */ jsx9(
|
|
4561
4749
|
Radio,
|
|
4562
4750
|
{
|
|
4563
4751
|
checked: selectedProjectId === null,
|
|
@@ -4565,7 +4753,7 @@ var MoveConversationModal = ({
|
|
|
4565
4753
|
size: "small"
|
|
4566
4754
|
}
|
|
4567
4755
|
) }),
|
|
4568
|
-
/* @__PURE__ */
|
|
4756
|
+
/* @__PURE__ */ jsx9(ListItemIcon, { children: /* @__PURE__ */ jsx9(
|
|
4569
4757
|
Avatar4,
|
|
4570
4758
|
{
|
|
4571
4759
|
sx: {
|
|
@@ -4573,10 +4761,10 @@ var MoveConversationModal = ({
|
|
|
4573
4761
|
width: 32,
|
|
4574
4762
|
height: 32
|
|
4575
4763
|
},
|
|
4576
|
-
children: /* @__PURE__ */
|
|
4764
|
+
children: /* @__PURE__ */ jsx9(InboxIcon, {})
|
|
4577
4765
|
}
|
|
4578
4766
|
) }),
|
|
4579
|
-
/* @__PURE__ */
|
|
4767
|
+
/* @__PURE__ */ jsx9(
|
|
4580
4768
|
ListItemText,
|
|
4581
4769
|
{
|
|
4582
4770
|
primary: "No Project",
|
|
@@ -4586,14 +4774,14 @@ var MoveConversationModal = ({
|
|
|
4586
4774
|
]
|
|
4587
4775
|
}
|
|
4588
4776
|
) }),
|
|
4589
|
-
/* @__PURE__ */
|
|
4590
|
-
projects.map((project) => /* @__PURE__ */
|
|
4777
|
+
/* @__PURE__ */ jsx9(Divider, { sx: { my: 1 } }),
|
|
4778
|
+
projects.map((project) => /* @__PURE__ */ jsx9(ListItem2, { disablePadding: true, children: /* @__PURE__ */ jsxs6(
|
|
4591
4779
|
ListItemButton,
|
|
4592
4780
|
{
|
|
4593
4781
|
onClick: () => setSelectedProjectId(project.id),
|
|
4594
4782
|
selected: selectedProjectId === project.id,
|
|
4595
4783
|
children: [
|
|
4596
|
-
/* @__PURE__ */
|
|
4784
|
+
/* @__PURE__ */ jsx9(ListItemIcon, { children: /* @__PURE__ */ jsx9(
|
|
4597
4785
|
Radio,
|
|
4598
4786
|
{
|
|
4599
4787
|
checked: selectedProjectId === project.id,
|
|
@@ -4601,7 +4789,7 @@ var MoveConversationModal = ({
|
|
|
4601
4789
|
size: "small"
|
|
4602
4790
|
}
|
|
4603
4791
|
) }),
|
|
4604
|
-
/* @__PURE__ */
|
|
4792
|
+
/* @__PURE__ */ jsx9(ListItemIcon, { children: /* @__PURE__ */ jsx9(
|
|
4605
4793
|
Avatar4,
|
|
4606
4794
|
{
|
|
4607
4795
|
sx: {
|
|
@@ -4609,10 +4797,10 @@ var MoveConversationModal = ({
|
|
|
4609
4797
|
width: 32,
|
|
4610
4798
|
height: 32
|
|
4611
4799
|
},
|
|
4612
|
-
children: /* @__PURE__ */
|
|
4800
|
+
children: /* @__PURE__ */ jsx9(FolderIcon2, {})
|
|
4613
4801
|
}
|
|
4614
4802
|
) }),
|
|
4615
|
-
/* @__PURE__ */
|
|
4803
|
+
/* @__PURE__ */ jsx9(
|
|
4616
4804
|
ListItemText,
|
|
4617
4805
|
{
|
|
4618
4806
|
primary: project.name,
|
|
@@ -4622,17 +4810,17 @@ var MoveConversationModal = ({
|
|
|
4622
4810
|
]
|
|
4623
4811
|
}
|
|
4624
4812
|
) }, project.id)),
|
|
4625
|
-
projects.length === 0 && /* @__PURE__ */
|
|
4813
|
+
projects.length === 0 && /* @__PURE__ */ jsx9(Box6, { sx: {
|
|
4626
4814
|
textAlign: "center",
|
|
4627
4815
|
py: 2,
|
|
4628
4816
|
color: theme.palette.text.secondary
|
|
4629
|
-
}, children: /* @__PURE__ */
|
|
4817
|
+
}, children: /* @__PURE__ */ jsx9(Typography4, { variant: "body2", children: "No projects available. Create a project first to organize conversations." }) })
|
|
4630
4818
|
] })
|
|
4631
4819
|
] }),
|
|
4632
|
-
/* @__PURE__ */
|
|
4633
|
-
/* @__PURE__ */
|
|
4634
|
-
/* @__PURE__ */
|
|
4635
|
-
|
|
4820
|
+
/* @__PURE__ */ jsxs6(DialogActions, { sx: { px: 3, pb: 2 }, children: [
|
|
4821
|
+
/* @__PURE__ */ jsx9(Button3, { onClick: onClose, children: "Cancel" }),
|
|
4822
|
+
/* @__PURE__ */ jsxs6(
|
|
4823
|
+
Button3,
|
|
4636
4824
|
{
|
|
4637
4825
|
onClick: handleMove,
|
|
4638
4826
|
variant: "contained",
|
|
@@ -4651,26 +4839,26 @@ var MoveConversationModal = ({
|
|
|
4651
4839
|
var move_conversation_modal_default = MoveConversationModal;
|
|
4652
4840
|
|
|
4653
4841
|
// src/chat/simple-conversation-item.tsx
|
|
4654
|
-
import { useState as
|
|
4842
|
+
import { useState as useState9, useRef as useRef6, useEffect as useEffect9 } from "react";
|
|
4655
4843
|
import {
|
|
4656
|
-
Box as
|
|
4657
|
-
Typography as
|
|
4844
|
+
Box as Box7,
|
|
4845
|
+
Typography as Typography5,
|
|
4658
4846
|
IconButton as IconButton5,
|
|
4659
4847
|
Menu as Menu2,
|
|
4660
4848
|
MenuItem as MenuItem2,
|
|
4661
4849
|
ListItemIcon as ListItemIcon2,
|
|
4662
4850
|
ListItemText as ListItemText2,
|
|
4663
4851
|
useMediaQuery as useMediaQuery3,
|
|
4664
|
-
TextField as
|
|
4852
|
+
TextField as TextField4,
|
|
4665
4853
|
Dialog as Dialog2,
|
|
4666
4854
|
DialogTitle as DialogTitle2,
|
|
4667
4855
|
DialogContent as DialogContent2,
|
|
4668
4856
|
DialogActions as DialogActions2,
|
|
4669
|
-
Button as
|
|
4857
|
+
Button as Button4
|
|
4670
4858
|
} from "@mui/material";
|
|
4671
4859
|
import { MoreVertical as MoreVertIcon2, Pencil as EditIcon2, Trash2 as DeleteIcon2, GripVertical as DragIcon, MailOpen as MoveIcon } from "lucide-react";
|
|
4672
|
-
import { useTheme as
|
|
4673
|
-
import { Fragment as Fragment5, jsx as
|
|
4860
|
+
import { useTheme as useTheme8, alpha as alpha4 } from "@mui/material/styles";
|
|
4861
|
+
import { Fragment as Fragment5, jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
4674
4862
|
var SimpleConversationItem = ({
|
|
4675
4863
|
conversation,
|
|
4676
4864
|
isSelected,
|
|
@@ -4686,14 +4874,14 @@ var SimpleConversationItem = ({
|
|
|
4686
4874
|
onTouchDragEnd,
|
|
4687
4875
|
isTouchDragActive
|
|
4688
4876
|
}) => {
|
|
4689
|
-
const theme =
|
|
4877
|
+
const theme = useTheme8();
|
|
4690
4878
|
const isMobile = useMediaQuery3(theme.breakpoints.down("sm"));
|
|
4691
|
-
const [anchorEl, setAnchorEl] =
|
|
4692
|
-
const [isEditing, setIsEditing] =
|
|
4693
|
-
const [editName, setEditName] =
|
|
4694
|
-
const [isDragging, setIsDragging] =
|
|
4695
|
-
const [isTouchDragging, setIsTouchDragging] =
|
|
4696
|
-
const [showRenameDialog, setShowRenameDialog] =
|
|
4879
|
+
const [anchorEl, setAnchorEl] = useState9(null);
|
|
4880
|
+
const [isEditing, setIsEditing] = useState9(false);
|
|
4881
|
+
const [editName, setEditName] = useState9(conversation.name);
|
|
4882
|
+
const [isDragging, setIsDragging] = useState9(false);
|
|
4883
|
+
const [isTouchDragging, setIsTouchDragging] = useState9(false);
|
|
4884
|
+
const [showRenameDialog, setShowRenameDialog] = useState9(false);
|
|
4697
4885
|
const longPressTimeoutRef = useRef6(null);
|
|
4698
4886
|
const touchStartPointRef = useRef6(null);
|
|
4699
4887
|
const activeTouchIdRef = useRef6(null);
|
|
@@ -4705,12 +4893,12 @@ var SimpleConversationItem = ({
|
|
|
4705
4893
|
const regex = new RegExp(`(${query.trim()})`, "gi");
|
|
4706
4894
|
const parts = text.split(regex);
|
|
4707
4895
|
return parts.map(
|
|
4708
|
-
(part, index) => regex.test(part) ? /* @__PURE__ */
|
|
4709
|
-
|
|
4896
|
+
(part, index) => regex.test(part) ? /* @__PURE__ */ jsx10(
|
|
4897
|
+
Box7,
|
|
4710
4898
|
{
|
|
4711
4899
|
component: "span",
|
|
4712
4900
|
sx: {
|
|
4713
|
-
bgcolor:
|
|
4901
|
+
bgcolor: alpha4(theme.palette.warning.main, 0.3),
|
|
4714
4902
|
color: theme.palette.text.primary,
|
|
4715
4903
|
fontWeight: 600,
|
|
4716
4904
|
borderRadius: 0.5,
|
|
@@ -4836,14 +5024,14 @@ var SimpleConversationItem = ({
|
|
|
4836
5024
|
if (!isMobile) return;
|
|
4837
5025
|
finalizeTouchDrag();
|
|
4838
5026
|
};
|
|
4839
|
-
|
|
5027
|
+
useEffect9(() => {
|
|
4840
5028
|
if (!isTouchDragActive && isTouchDragging) {
|
|
4841
5029
|
setIsTouchDragging(false);
|
|
4842
5030
|
}
|
|
4843
5031
|
}, [isTouchDragActive, isTouchDragging]);
|
|
4844
|
-
return /* @__PURE__ */
|
|
4845
|
-
/* @__PURE__ */
|
|
4846
|
-
|
|
5032
|
+
return /* @__PURE__ */ jsxs7(Fragment5, { children: [
|
|
5033
|
+
/* @__PURE__ */ jsxs7(
|
|
5034
|
+
Box7,
|
|
4847
5035
|
{
|
|
4848
5036
|
"data-project-id": conversation.projectId ?? "__ungrouped",
|
|
4849
5037
|
draggable: !isMobile && !isEditing,
|
|
@@ -4870,17 +5058,17 @@ var SimpleConversationItem = ({
|
|
|
4870
5058
|
mx: 1,
|
|
4871
5059
|
borderRadius: 1,
|
|
4872
5060
|
cursor: isEditing || isTouchDragging ? "default" : "pointer",
|
|
4873
|
-
bgcolor: isSelected ?
|
|
4874
|
-
border: isSelected ? `1px solid ${
|
|
5061
|
+
bgcolor: isSelected ? alpha4(projectColor || theme.palette.primary.main, 0.15) : "transparent",
|
|
5062
|
+
border: isSelected ? `1px solid ${alpha4(projectColor || theme.palette.primary.main, 0.3)}` : "1px solid transparent",
|
|
4875
5063
|
opacity: isDragging || isTouchDragActive ? 0.55 : 1,
|
|
4876
5064
|
transition: "all 0.2s ease",
|
|
4877
5065
|
transform: isTouchDragActive ? "scale(0.98)" : "none",
|
|
4878
|
-
boxShadow: isTouchDragActive ? `0 12px 24px ${
|
|
5066
|
+
boxShadow: isTouchDragActive ? `0 12px 24px ${alpha4(theme.palette.common.black, 0.25)}` : void 0,
|
|
4879
5067
|
touchAction: isTouchDragActive ? "none" : void 0,
|
|
4880
5068
|
userSelect: isTouchDragging || isTouchDragActive ? "none" : void 0,
|
|
4881
5069
|
WebkitUserSelect: isTouchDragging || isTouchDragActive ? "none" : void 0,
|
|
4882
5070
|
"&:hover": !isEditing && !isTouchDragging ? {
|
|
4883
|
-
bgcolor:
|
|
5071
|
+
bgcolor: alpha4(theme.palette.text.primary, 0.04)
|
|
4884
5072
|
} : {},
|
|
4885
5073
|
// Better touch handling on mobile
|
|
4886
5074
|
...isMobile && {
|
|
@@ -4890,12 +5078,12 @@ var SimpleConversationItem = ({
|
|
|
4890
5078
|
WebkitUserSelect: "none",
|
|
4891
5079
|
WebkitTouchCallout: "none",
|
|
4892
5080
|
"&:active": {
|
|
4893
|
-
bgcolor:
|
|
5081
|
+
bgcolor: alpha4(theme.palette.text.primary, 0.08)
|
|
4894
5082
|
}
|
|
4895
5083
|
}
|
|
4896
5084
|
},
|
|
4897
5085
|
children: [
|
|
4898
|
-
!isMobile && !isEditing && /* @__PURE__ */
|
|
5086
|
+
!isMobile && !isEditing && /* @__PURE__ */ jsx10(
|
|
4899
5087
|
DragIcon,
|
|
4900
5088
|
{
|
|
4901
5089
|
size: 16,
|
|
@@ -4903,9 +5091,9 @@ var SimpleConversationItem = ({
|
|
|
4903
5091
|
style: { marginRight: 4, cursor: "grab" }
|
|
4904
5092
|
}
|
|
4905
5093
|
),
|
|
4906
|
-
/* @__PURE__ */
|
|
4907
|
-
isEditing ? /* @__PURE__ */
|
|
4908
|
-
|
|
5094
|
+
/* @__PURE__ */ jsxs7(Box7, { sx: { flex: 1, minWidth: 0 }, children: [
|
|
5095
|
+
isEditing ? /* @__PURE__ */ jsx10(
|
|
5096
|
+
TextField4,
|
|
4909
5097
|
{
|
|
4910
5098
|
value: editName,
|
|
4911
5099
|
onChange: (e) => setEditName(e.target.value),
|
|
@@ -4927,8 +5115,8 @@ var SimpleConversationItem = ({
|
|
|
4927
5115
|
}
|
|
4928
5116
|
}
|
|
4929
5117
|
}
|
|
4930
|
-
) : /* @__PURE__ */
|
|
4931
|
-
|
|
5118
|
+
) : /* @__PURE__ */ jsx10(
|
|
5119
|
+
Typography5,
|
|
4932
5120
|
{
|
|
4933
5121
|
variant: "body2",
|
|
4934
5122
|
sx: {
|
|
@@ -4942,8 +5130,8 @@ var SimpleConversationItem = ({
|
|
|
4942
5130
|
children: highlightText(conversation.name, searchQuery)
|
|
4943
5131
|
}
|
|
4944
5132
|
),
|
|
4945
|
-
!isEditing && snippet && /* @__PURE__ */
|
|
4946
|
-
|
|
5133
|
+
!isEditing && snippet && /* @__PURE__ */ jsx10(
|
|
5134
|
+
Typography5,
|
|
4947
5135
|
{
|
|
4948
5136
|
variant: "caption",
|
|
4949
5137
|
sx: {
|
|
@@ -4951,7 +5139,7 @@ var SimpleConversationItem = ({
|
|
|
4951
5139
|
WebkitLineClamp: 2,
|
|
4952
5140
|
WebkitBoxOrient: "vertical",
|
|
4953
5141
|
overflow: "hidden",
|
|
4954
|
-
color:
|
|
5142
|
+
color: alpha4(theme.palette.text.secondary, 0.9),
|
|
4955
5143
|
mt: 0.25,
|
|
4956
5144
|
lineHeight: 1.3,
|
|
4957
5145
|
fontSize: "0.72rem"
|
|
@@ -4961,7 +5149,7 @@ var SimpleConversationItem = ({
|
|
|
4961
5149
|
}
|
|
4962
5150
|
)
|
|
4963
5151
|
] }),
|
|
4964
|
-
!isEditing && /* @__PURE__ */
|
|
5152
|
+
!isEditing && /* @__PURE__ */ jsx10(
|
|
4965
5153
|
IconButton5,
|
|
4966
5154
|
{
|
|
4967
5155
|
onClick: handleMenuOpen,
|
|
@@ -4990,10 +5178,10 @@ var SimpleConversationItem = ({
|
|
|
4990
5178
|
}
|
|
4991
5179
|
}
|
|
4992
5180
|
},
|
|
4993
|
-
children: /* @__PURE__ */
|
|
5181
|
+
children: /* @__PURE__ */ jsx10(MoreVertIcon2, { size: 16 })
|
|
4994
5182
|
}
|
|
4995
5183
|
),
|
|
4996
|
-
/* @__PURE__ */
|
|
5184
|
+
/* @__PURE__ */ jsxs7(
|
|
4997
5185
|
Menu2,
|
|
4998
5186
|
{
|
|
4999
5187
|
anchorEl,
|
|
@@ -5020,17 +5208,17 @@ var SimpleConversationItem = ({
|
|
|
5020
5208
|
}
|
|
5021
5209
|
},
|
|
5022
5210
|
children: [
|
|
5023
|
-
onRename && /* @__PURE__ */
|
|
5024
|
-
/* @__PURE__ */
|
|
5025
|
-
/* @__PURE__ */
|
|
5211
|
+
onRename && /* @__PURE__ */ jsxs7(MenuItem2, { onClick: handleEdit, children: [
|
|
5212
|
+
/* @__PURE__ */ jsx10(ListItemIcon2, { children: /* @__PURE__ */ jsx10(EditIcon2, { size: 16 }) }),
|
|
5213
|
+
/* @__PURE__ */ jsx10(ListItemText2, { children: "Rename" })
|
|
5026
5214
|
] }),
|
|
5027
|
-
onMove && /* @__PURE__ */
|
|
5028
|
-
/* @__PURE__ */
|
|
5029
|
-
/* @__PURE__ */
|
|
5215
|
+
onMove && /* @__PURE__ */ jsxs7(MenuItem2, { onClick: handleMove, children: [
|
|
5216
|
+
/* @__PURE__ */ jsx10(ListItemIcon2, { children: /* @__PURE__ */ jsx10(MoveIcon, { size: 16 }) }),
|
|
5217
|
+
/* @__PURE__ */ jsx10(ListItemText2, { children: "Move to Project" })
|
|
5030
5218
|
] }),
|
|
5031
|
-
/* @__PURE__ */
|
|
5032
|
-
/* @__PURE__ */
|
|
5033
|
-
/* @__PURE__ */
|
|
5219
|
+
/* @__PURE__ */ jsxs7(MenuItem2, { onClick: handleDelete, children: [
|
|
5220
|
+
/* @__PURE__ */ jsx10(ListItemIcon2, { children: /* @__PURE__ */ jsx10(DeleteIcon2, { size: 16 }) }),
|
|
5221
|
+
/* @__PURE__ */ jsx10(ListItemText2, { children: "Delete" })
|
|
5034
5222
|
] })
|
|
5035
5223
|
]
|
|
5036
5224
|
}
|
|
@@ -5038,7 +5226,7 @@ var SimpleConversationItem = ({
|
|
|
5038
5226
|
]
|
|
5039
5227
|
}
|
|
5040
5228
|
),
|
|
5041
|
-
isMobile && /* @__PURE__ */
|
|
5229
|
+
isMobile && /* @__PURE__ */ jsxs7(
|
|
5042
5230
|
Dialog2,
|
|
5043
5231
|
{
|
|
5044
5232
|
open: showRenameDialog,
|
|
@@ -5054,9 +5242,9 @@ var SimpleConversationItem = ({
|
|
|
5054
5242
|
}
|
|
5055
5243
|
},
|
|
5056
5244
|
children: [
|
|
5057
|
-
/* @__PURE__ */
|
|
5058
|
-
/* @__PURE__ */
|
|
5059
|
-
|
|
5245
|
+
/* @__PURE__ */ jsx10(DialogTitle2, { sx: { pb: 1 }, children: "Rename Conversation" }),
|
|
5246
|
+
/* @__PURE__ */ jsx10(DialogContent2, { children: /* @__PURE__ */ jsx10(
|
|
5247
|
+
TextField4,
|
|
5060
5248
|
{
|
|
5061
5249
|
value: editName,
|
|
5062
5250
|
onChange: (e) => setEditName(e.target.value),
|
|
@@ -5068,9 +5256,9 @@ var SimpleConversationItem = ({
|
|
|
5068
5256
|
}
|
|
5069
5257
|
}
|
|
5070
5258
|
) }),
|
|
5071
|
-
/* @__PURE__ */
|
|
5072
|
-
/* @__PURE__ */
|
|
5073
|
-
|
|
5259
|
+
/* @__PURE__ */ jsxs7(DialogActions2, { sx: { px: 3, pb: 2 }, children: [
|
|
5260
|
+
/* @__PURE__ */ jsx10(
|
|
5261
|
+
Button4,
|
|
5074
5262
|
{
|
|
5075
5263
|
onClick: () => {
|
|
5076
5264
|
setShowRenameDialog(false);
|
|
@@ -5079,8 +5267,8 @@ var SimpleConversationItem = ({
|
|
|
5079
5267
|
children: "Cancel"
|
|
5080
5268
|
}
|
|
5081
5269
|
),
|
|
5082
|
-
/* @__PURE__ */
|
|
5083
|
-
|
|
5270
|
+
/* @__PURE__ */ jsx10(
|
|
5271
|
+
Button4,
|
|
5084
5272
|
{
|
|
5085
5273
|
onClick: () => {
|
|
5086
5274
|
commitRename();
|
|
@@ -5100,20 +5288,20 @@ var SimpleConversationItem = ({
|
|
|
5100
5288
|
var simple_conversation_item_default = SimpleConversationItem;
|
|
5101
5289
|
|
|
5102
5290
|
// src/chat/project-header.tsx
|
|
5103
|
-
import { useRef as useRef7, useState as
|
|
5291
|
+
import { useRef as useRef7, useState as useState10 } from "react";
|
|
5104
5292
|
import {
|
|
5105
|
-
Box as
|
|
5106
|
-
Typography as
|
|
5293
|
+
Box as Box8,
|
|
5294
|
+
Typography as Typography6,
|
|
5107
5295
|
IconButton as IconButton6,
|
|
5108
5296
|
Avatar as Avatar5,
|
|
5109
|
-
Chip as
|
|
5297
|
+
Chip as Chip3,
|
|
5110
5298
|
Tooltip as Tooltip2,
|
|
5111
|
-
TextField as
|
|
5112
|
-
alpha as
|
|
5299
|
+
TextField as TextField5,
|
|
5300
|
+
alpha as alpha5
|
|
5113
5301
|
} from "@mui/material";
|
|
5114
5302
|
import { ChevronDown as ExpandMoreIcon2, ChevronUp as ExpandLessIcon, Plus as AddIcon3, Folder as FolderIcon3, FolderOpen as FolderOpenIcon, Inbox as InboxIcon2, X as CloseIcon3, Check as CheckIcon2 } from "lucide-react";
|
|
5115
|
-
import { useTheme as
|
|
5116
|
-
import { jsx as
|
|
5303
|
+
import { useTheme as useTheme9 } from "@mui/material/styles";
|
|
5304
|
+
import { jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
5117
5305
|
var ProjectHeader = ({
|
|
5118
5306
|
projectId,
|
|
5119
5307
|
projectName,
|
|
@@ -5127,12 +5315,12 @@ var ProjectHeader = ({
|
|
|
5127
5315
|
onRenameCancelDelete,
|
|
5128
5316
|
isTouchTarget
|
|
5129
5317
|
}) => {
|
|
5130
|
-
const theme =
|
|
5318
|
+
const theme = useTheme9();
|
|
5131
5319
|
const { createNewConversation } = useConversationStore();
|
|
5132
5320
|
const { renameProject } = useProjectStore();
|
|
5133
|
-
const [isHovered, setIsHovered] =
|
|
5134
|
-
const [isDragOver, setIsDragOver] =
|
|
5135
|
-
const [renameDraft, setRenameDraft] =
|
|
5321
|
+
const [isHovered, setIsHovered] = useState10(false);
|
|
5322
|
+
const [isDragOver, setIsDragOver] = useState10(false);
|
|
5323
|
+
const [renameDraft, setRenameDraft] = useState10(projectName);
|
|
5136
5324
|
const renameActionRef = useRef7("none");
|
|
5137
5325
|
const isUngrouped = projectId === null;
|
|
5138
5326
|
const Icon = isCollapsed ? FolderIcon3 : FolderOpenIcon;
|
|
@@ -5179,8 +5367,8 @@ var ProjectHeader = ({
|
|
|
5179
5367
|
setRenameDraft(projectName);
|
|
5180
5368
|
onRenameComplete?.();
|
|
5181
5369
|
};
|
|
5182
|
-
return /* @__PURE__ */
|
|
5183
|
-
|
|
5370
|
+
return /* @__PURE__ */ jsxs8(
|
|
5371
|
+
Box8,
|
|
5184
5372
|
{
|
|
5185
5373
|
"data-project-id": projectId ?? "__ungrouped",
|
|
5186
5374
|
onMouseEnter: () => setIsHovered(true),
|
|
@@ -5196,37 +5384,37 @@ var ProjectHeader = ({
|
|
|
5196
5384
|
py: 1.5,
|
|
5197
5385
|
cursor: isUngrouped ? "default" : "pointer",
|
|
5198
5386
|
// No pointer cursor for ungrouped
|
|
5199
|
-
bgcolor: isDragOver || isTouchTarget ?
|
|
5387
|
+
bgcolor: isDragOver || isTouchTarget ? alpha5(projectColor || theme.palette.primary.main, 0.1) : void 0,
|
|
5200
5388
|
border: isDragOver || isTouchTarget ? `2px dashed ${projectColor || theme.palette.primary.main}` : "2px solid transparent",
|
|
5201
5389
|
borderRadius: isDragOver || isTouchTarget ? 1 : 0,
|
|
5202
5390
|
transition: "all 0.2s ease",
|
|
5203
5391
|
"&:hover": !isUngrouped ? {
|
|
5204
5392
|
// Only show hover for projects, not ungrouped
|
|
5205
|
-
bgcolor:
|
|
5393
|
+
bgcolor: alpha5(theme.palette.text.primary, 0.04)
|
|
5206
5394
|
} : {}
|
|
5207
5395
|
},
|
|
5208
5396
|
children: [
|
|
5209
|
-
/* @__PURE__ */
|
|
5397
|
+
/* @__PURE__ */ jsx11(
|
|
5210
5398
|
Avatar5,
|
|
5211
5399
|
{
|
|
5212
5400
|
sx: {
|
|
5213
|
-
bgcolor: isUngrouped ?
|
|
5401
|
+
bgcolor: isUngrouped ? alpha5(theme.palette.text.disabled, 0.1) : projectColor || theme.palette.grey[400],
|
|
5214
5402
|
width: 28,
|
|
5215
5403
|
height: 28,
|
|
5216
5404
|
mr: 1.5
|
|
5217
5405
|
},
|
|
5218
|
-
children: isUngrouped ? /* @__PURE__ */
|
|
5406
|
+
children: isUngrouped ? /* @__PURE__ */ jsx11(
|
|
5219
5407
|
InboxIcon2,
|
|
5220
5408
|
{
|
|
5221
5409
|
size: 16,
|
|
5222
5410
|
color: theme.palette.text.disabled,
|
|
5223
5411
|
style: { opacity: 0.7 }
|
|
5224
5412
|
}
|
|
5225
|
-
) : /* @__PURE__ */
|
|
5413
|
+
) : /* @__PURE__ */ jsx11(Icon, { size: 16 })
|
|
5226
5414
|
}
|
|
5227
5415
|
),
|
|
5228
|
-
isRenaming && !isUngrouped ? /* @__PURE__ */
|
|
5229
|
-
|
|
5416
|
+
isRenaming && !isUngrouped ? /* @__PURE__ */ jsx11(
|
|
5417
|
+
TextField5,
|
|
5230
5418
|
{
|
|
5231
5419
|
value: renameDraft,
|
|
5232
5420
|
onChange: (e) => setRenameDraft(e.target.value),
|
|
@@ -5272,8 +5460,8 @@ var ProjectHeader = ({
|
|
|
5272
5460
|
}
|
|
5273
5461
|
}
|
|
5274
5462
|
}
|
|
5275
|
-
) : /* @__PURE__ */
|
|
5276
|
-
|
|
5463
|
+
) : /* @__PURE__ */ jsxs8(
|
|
5464
|
+
Typography6,
|
|
5277
5465
|
{
|
|
5278
5466
|
variant: "subtitle2",
|
|
5279
5467
|
sx: {
|
|
@@ -5285,8 +5473,8 @@ var ProjectHeader = ({
|
|
|
5285
5473
|
},
|
|
5286
5474
|
children: [
|
|
5287
5475
|
projectName,
|
|
5288
|
-
isDragOver && /* @__PURE__ */
|
|
5289
|
-
|
|
5476
|
+
isDragOver && /* @__PURE__ */ jsx11(
|
|
5477
|
+
Typography6,
|
|
5290
5478
|
{
|
|
5291
5479
|
component: "span",
|
|
5292
5480
|
variant: "caption",
|
|
@@ -5301,13 +5489,13 @@ var ProjectHeader = ({
|
|
|
5301
5489
|
]
|
|
5302
5490
|
}
|
|
5303
5491
|
),
|
|
5304
|
-
/* @__PURE__ */
|
|
5305
|
-
|
|
5492
|
+
/* @__PURE__ */ jsx11(
|
|
5493
|
+
Chip3,
|
|
5306
5494
|
{
|
|
5307
5495
|
label: conversationCount,
|
|
5308
5496
|
size: "small",
|
|
5309
5497
|
sx: {
|
|
5310
|
-
bgcolor: isUngrouped ?
|
|
5498
|
+
bgcolor: isUngrouped ? alpha5(theme.palette.text.disabled, 0.1) : alpha5(projectColor || theme.palette.primary.main, 0.15),
|
|
5311
5499
|
color: isUngrouped ? theme.palette.text.disabled : projectColor || theme.palette.primary.main,
|
|
5312
5500
|
minWidth: 28,
|
|
5313
5501
|
height: 22,
|
|
@@ -5321,8 +5509,8 @@ var ProjectHeader = ({
|
|
|
5321
5509
|
}
|
|
5322
5510
|
}
|
|
5323
5511
|
),
|
|
5324
|
-
isRenaming && !isUngrouped && /* @__PURE__ */
|
|
5325
|
-
/* @__PURE__ */
|
|
5512
|
+
isRenaming && !isUngrouped && /* @__PURE__ */ jsxs8(Box8, { sx: { display: "flex", alignItems: "center", gap: 0.5, ml: 1 }, children: [
|
|
5513
|
+
/* @__PURE__ */ jsx11(Tooltip2, { title: "Cancel and remove", children: /* @__PURE__ */ jsx11(
|
|
5326
5514
|
IconButton6,
|
|
5327
5515
|
{
|
|
5328
5516
|
size: "small",
|
|
@@ -5331,11 +5519,11 @@ var ProjectHeader = ({
|
|
|
5331
5519
|
renameActionRef.current = "delete";
|
|
5332
5520
|
onRenameCancelDelete ? onRenameCancelDelete() : cancelRename();
|
|
5333
5521
|
},
|
|
5334
|
-
sx: { color:
|
|
5335
|
-
children: /* @__PURE__ */
|
|
5522
|
+
sx: { color: alpha5(theme.palette.error.main, 0.9) },
|
|
5523
|
+
children: /* @__PURE__ */ jsx11(CloseIcon3, { size: 16 })
|
|
5336
5524
|
}
|
|
5337
5525
|
) }),
|
|
5338
|
-
/* @__PURE__ */
|
|
5526
|
+
/* @__PURE__ */ jsx11(Tooltip2, { title: "Save", children: /* @__PURE__ */ jsx11(
|
|
5339
5527
|
IconButton6,
|
|
5340
5528
|
{
|
|
5341
5529
|
size: "small",
|
|
@@ -5345,31 +5533,31 @@ var ProjectHeader = ({
|
|
|
5345
5533
|
commitRename();
|
|
5346
5534
|
},
|
|
5347
5535
|
sx: { color: theme.palette.success.main },
|
|
5348
|
-
children: /* @__PURE__ */
|
|
5536
|
+
children: /* @__PURE__ */ jsx11(CheckIcon2, { size: 16 })
|
|
5349
5537
|
}
|
|
5350
5538
|
) })
|
|
5351
5539
|
] }),
|
|
5352
|
-
isHovered && !isDragOver && !isUngrouped && !isRenaming && /* @__PURE__ */
|
|
5540
|
+
isHovered && !isDragOver && !isUngrouped && !isRenaming && /* @__PURE__ */ jsx11(Tooltip2, { title: `Add conversation to ${projectName.toLowerCase()}`, arrow: true, children: /* @__PURE__ */ jsx11(
|
|
5353
5541
|
IconButton6,
|
|
5354
5542
|
{
|
|
5355
5543
|
onClick: handleAddConversation,
|
|
5356
5544
|
size: "small",
|
|
5357
5545
|
sx: {
|
|
5358
5546
|
color: projectColor || theme.palette.primary.main,
|
|
5359
|
-
bgcolor:
|
|
5547
|
+
bgcolor: alpha5(projectColor || theme.palette.primary.main, 0.1),
|
|
5360
5548
|
width: 24,
|
|
5361
5549
|
height: 24,
|
|
5362
5550
|
mr: 0.5,
|
|
5363
5551
|
"&:hover": {
|
|
5364
|
-
bgcolor:
|
|
5552
|
+
bgcolor: alpha5(projectColor || theme.palette.primary.main, 0.2),
|
|
5365
5553
|
transform: "scale(1.1)"
|
|
5366
5554
|
},
|
|
5367
5555
|
transition: "all 0.2s ease"
|
|
5368
5556
|
},
|
|
5369
|
-
children: /* @__PURE__ */
|
|
5557
|
+
children: /* @__PURE__ */ jsx11(AddIcon3, { size: 16 })
|
|
5370
5558
|
}
|
|
5371
5559
|
) }),
|
|
5372
|
-
!isUngrouped && !isRenaming && /* @__PURE__ */
|
|
5560
|
+
!isUngrouped && !isRenaming && /* @__PURE__ */ jsx11(
|
|
5373
5561
|
IconButton6,
|
|
5374
5562
|
{
|
|
5375
5563
|
size: "small",
|
|
@@ -5377,7 +5565,7 @@ var ProjectHeader = ({
|
|
|
5377
5565
|
color: theme.palette.text.secondary,
|
|
5378
5566
|
transition: "transform 0.2s ease"
|
|
5379
5567
|
},
|
|
5380
|
-
children: isCollapsed ? /* @__PURE__ */
|
|
5568
|
+
children: isCollapsed ? /* @__PURE__ */ jsx11(ExpandMoreIcon2, { size: 16 }) : /* @__PURE__ */ jsx11(ExpandLessIcon, { size: 16 })
|
|
5381
5569
|
}
|
|
5382
5570
|
)
|
|
5383
5571
|
]
|
|
@@ -5399,7 +5587,7 @@ var TOOLTIP_COPY = {
|
|
|
5399
5587
|
var tooltip = (key) => TOOLTIP_COPY[key];
|
|
5400
5588
|
|
|
5401
5589
|
// src/chat/conversation-drawer.tsx
|
|
5402
|
-
import { Fragment as Fragment6, jsx as
|
|
5590
|
+
import { Fragment as Fragment6, jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
5403
5591
|
var BANDIT_AVATAR = "https://cdn.burtson.ai/images/bandit-head.png";
|
|
5404
5592
|
var coerceOptionalString = (value) => {
|
|
5405
5593
|
if (typeof value !== "string") return void 0;
|
|
@@ -5427,7 +5615,7 @@ var deriveInitials = (value) => {
|
|
|
5427
5615
|
return sanitized.slice(0, 2).toUpperCase();
|
|
5428
5616
|
};
|
|
5429
5617
|
var ConversationDrawer = ({ open, onClose }) => {
|
|
5430
|
-
const theme =
|
|
5618
|
+
const theme = useTheme10();
|
|
5431
5619
|
const isMobile = useMediaQuery4(theme.breakpoints.down("sm"));
|
|
5432
5620
|
const { user } = useAuthenticationStore();
|
|
5433
5621
|
const baseRadius = typeof theme.shape.borderRadius === "number" ? theme.shape.borderRadius : parseFloat(theme.shape.borderRadius) || 0;
|
|
@@ -5450,15 +5638,15 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
5450
5638
|
createProject,
|
|
5451
5639
|
deleteProject
|
|
5452
5640
|
} = useProjectStore();
|
|
5453
|
-
const [projectManagementOpen, setProjectManagementOpen] =
|
|
5454
|
-
const [collapsedProjects, setCollapsedProjects] =
|
|
5641
|
+
const [projectManagementOpen, setProjectManagementOpen] = useState11(false);
|
|
5642
|
+
const [collapsedProjects, setCollapsedProjects] = useState11(/* @__PURE__ */ new Set());
|
|
5455
5643
|
const didInitCollapseRef = useRef8(false);
|
|
5456
|
-
const [searchQuery, setSearchQuery] =
|
|
5457
|
-
const [menuAnchorEl, setMenuAnchorEl] =
|
|
5458
|
-
const [clearConfirmOpen, setClearConfirmOpen] =
|
|
5459
|
-
const [moveModalOpen, setMoveModalOpen] =
|
|
5460
|
-
const [conversationToMove, setConversationToMove] =
|
|
5461
|
-
const [renameProjectId, setRenameProjectId] =
|
|
5644
|
+
const [searchQuery, setSearchQuery] = useState11("");
|
|
5645
|
+
const [menuAnchorEl, setMenuAnchorEl] = useState11(null);
|
|
5646
|
+
const [clearConfirmOpen, setClearConfirmOpen] = useState11(false);
|
|
5647
|
+
const [moveModalOpen, setMoveModalOpen] = useState11(false);
|
|
5648
|
+
const [conversationToMove, setConversationToMove] = useState11(null);
|
|
5649
|
+
const [renameProjectId, setRenameProjectId] = useState11(null);
|
|
5462
5650
|
const getCustomClaim = useCallback4((key) => {
|
|
5463
5651
|
if (!user) return void 0;
|
|
5464
5652
|
const record = user;
|
|
@@ -5491,8 +5679,8 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
5491
5679
|
}
|
|
5492
5680
|
return void 0;
|
|
5493
5681
|
}, [user, userDisplayName]);
|
|
5494
|
-
const [avatarImage, setAvatarImage] =
|
|
5495
|
-
|
|
5682
|
+
const [avatarImage, setAvatarImage] = useState11(BANDIT_AVATAR);
|
|
5683
|
+
useEffect10(() => {
|
|
5496
5684
|
const fetchBranding = async () => {
|
|
5497
5685
|
try {
|
|
5498
5686
|
const branding = await brandingService_default.getBranding();
|
|
@@ -5508,12 +5696,12 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
5508
5696
|
}, []);
|
|
5509
5697
|
const avatarLabel = userDisplayName || user?.email || "Bandit";
|
|
5510
5698
|
const avatarInitials = useMemo(() => deriveInitials(avatarLabel), [avatarLabel]);
|
|
5511
|
-
|
|
5699
|
+
useEffect10(() => {
|
|
5512
5700
|
if (!projectsHydrated) {
|
|
5513
5701
|
hydrateProjects();
|
|
5514
5702
|
}
|
|
5515
5703
|
}, [projectsHydrated, hydrateProjects]);
|
|
5516
|
-
|
|
5704
|
+
useEffect10(() => {
|
|
5517
5705
|
if (projectsHydrated && !didInitCollapseRef.current) {
|
|
5518
5706
|
didInitCollapseRef.current = true;
|
|
5519
5707
|
if (projects && projects.length > 0) {
|
|
@@ -5620,8 +5808,8 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
5620
5808
|
setMoveModalOpen(false);
|
|
5621
5809
|
setConversationToMove(null);
|
|
5622
5810
|
};
|
|
5623
|
-
return /* @__PURE__ */
|
|
5624
|
-
/* @__PURE__ */
|
|
5811
|
+
return /* @__PURE__ */ jsxs9(Fragment6, { children: [
|
|
5812
|
+
/* @__PURE__ */ jsxs9(
|
|
5625
5813
|
Drawer,
|
|
5626
5814
|
{
|
|
5627
5815
|
anchor: "left",
|
|
@@ -5635,7 +5823,7 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
5635
5823
|
width: isMobile ? `min(94vw, 360px)` : 340,
|
|
5636
5824
|
maxWidth: 360,
|
|
5637
5825
|
bgcolor: theme.palette.background.paper,
|
|
5638
|
-
borderRight: `1px solid ${isMobile ?
|
|
5826
|
+
borderRight: `1px solid ${isMobile ? alpha6(theme.palette.divider, 0.4) : theme.palette.divider}`,
|
|
5639
5827
|
display: "flex",
|
|
5640
5828
|
flexDirection: "column",
|
|
5641
5829
|
height: isMobile ? `calc(100dvh - ${theme.spacing(4)})` : "100dvh",
|
|
@@ -5643,7 +5831,7 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
5643
5831
|
bottom: isMobile ? theme.spacing(2) : 0,
|
|
5644
5832
|
left: 0,
|
|
5645
5833
|
borderRadius: isMobile ? `0 ${drawerCornerRadius}px ${drawerCornerRadius}px 0` : 0,
|
|
5646
|
-
boxShadow: isMobile ? `0 18px 36px ${
|
|
5834
|
+
boxShadow: isMobile ? `0 18px 36px ${alpha6(theme.palette.common.black, 0.28)}` : "none",
|
|
5647
5835
|
overflow: "hidden"
|
|
5648
5836
|
}
|
|
5649
5837
|
},
|
|
@@ -5663,8 +5851,8 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
5663
5851
|
}
|
|
5664
5852
|
},
|
|
5665
5853
|
children: [
|
|
5666
|
-
/* @__PURE__ */
|
|
5667
|
-
|
|
5854
|
+
/* @__PURE__ */ jsxs9(
|
|
5855
|
+
Box9,
|
|
5668
5856
|
{
|
|
5669
5857
|
sx: {
|
|
5670
5858
|
p: 2,
|
|
@@ -5675,7 +5863,7 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
5675
5863
|
gap: 1
|
|
5676
5864
|
},
|
|
5677
5865
|
children: [
|
|
5678
|
-
/* @__PURE__ */
|
|
5866
|
+
/* @__PURE__ */ jsx12(Tooltip3, { title: tooltip("manageProjects"), arrow: true, children: /* @__PURE__ */ jsx12(
|
|
5679
5867
|
IconButton7,
|
|
5680
5868
|
{
|
|
5681
5869
|
onClick: () => setProjectManagementOpen(true),
|
|
@@ -5685,13 +5873,13 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
5685
5873
|
color: theme.palette.text.secondary,
|
|
5686
5874
|
"&:hover": {
|
|
5687
5875
|
color: theme.palette.primary.main,
|
|
5688
|
-
bgcolor:
|
|
5876
|
+
bgcolor: alpha6(theme.palette.primary.main, 0.1)
|
|
5689
5877
|
}
|
|
5690
5878
|
},
|
|
5691
|
-
children: /* @__PURE__ */
|
|
5879
|
+
children: /* @__PURE__ */ jsx12(FolderIcon4, {})
|
|
5692
5880
|
}
|
|
5693
5881
|
) }),
|
|
5694
|
-
/* @__PURE__ */
|
|
5882
|
+
/* @__PURE__ */ jsx12(Tooltip3, { title: tooltip("conversationOptions"), arrow: true, children: /* @__PURE__ */ jsx12(
|
|
5695
5883
|
IconButton7,
|
|
5696
5884
|
{
|
|
5697
5885
|
onClick: handleMenuOpen,
|
|
@@ -5701,13 +5889,13 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
5701
5889
|
color: theme.palette.text.secondary,
|
|
5702
5890
|
"&:hover": {
|
|
5703
5891
|
color: theme.palette.text.primary,
|
|
5704
|
-
bgcolor:
|
|
5892
|
+
bgcolor: alpha6(theme.palette.text.primary, 0.1)
|
|
5705
5893
|
}
|
|
5706
5894
|
},
|
|
5707
|
-
children: /* @__PURE__ */
|
|
5895
|
+
children: /* @__PURE__ */ jsx12(MoreVertIcon3, {})
|
|
5708
5896
|
}
|
|
5709
5897
|
) }),
|
|
5710
|
-
isMobile && /* @__PURE__ */
|
|
5898
|
+
isMobile && /* @__PURE__ */ jsx12(Tooltip3, { title: tooltip("closeConversationsPanel"), children: /* @__PURE__ */ jsx12(
|
|
5711
5899
|
IconButton7,
|
|
5712
5900
|
{
|
|
5713
5901
|
onClick: (e) => {
|
|
@@ -5721,17 +5909,17 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
5721
5909
|
color: theme.palette.text.secondary,
|
|
5722
5910
|
"&:hover": {
|
|
5723
5911
|
color: theme.palette.error.main,
|
|
5724
|
-
bgcolor:
|
|
5912
|
+
bgcolor: alpha6(theme.palette.error.main, 0.1)
|
|
5725
5913
|
}
|
|
5726
5914
|
},
|
|
5727
|
-
children: /* @__PURE__ */
|
|
5915
|
+
children: /* @__PURE__ */ jsx12(CloseIcon4, {})
|
|
5728
5916
|
}
|
|
5729
5917
|
) })
|
|
5730
5918
|
]
|
|
5731
5919
|
}
|
|
5732
5920
|
),
|
|
5733
|
-
/* @__PURE__ */
|
|
5734
|
-
|
|
5921
|
+
/* @__PURE__ */ jsx12(Box9, { sx: { p: 2, pb: 1 }, children: /* @__PURE__ */ jsx12(
|
|
5922
|
+
TextField6,
|
|
5735
5923
|
{
|
|
5736
5924
|
fullWidth: true,
|
|
5737
5925
|
size: "small",
|
|
@@ -5740,8 +5928,8 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
5740
5928
|
onChange: (e) => setSearchQuery(e.target.value),
|
|
5741
5929
|
variant: "outlined",
|
|
5742
5930
|
InputProps: {
|
|
5743
|
-
startAdornment: /* @__PURE__ */
|
|
5744
|
-
endAdornment: searchQuery && /* @__PURE__ */
|
|
5931
|
+
startAdornment: /* @__PURE__ */ jsx12(InputAdornment, { position: "start", children: /* @__PURE__ */ jsx12(SearchIcon, { size: 16, color: theme.palette.text.secondary }) }),
|
|
5932
|
+
endAdornment: searchQuery && /* @__PURE__ */ jsx12(InputAdornment, { position: "end", children: /* @__PURE__ */ jsx12(Tooltip3, { title: tooltip("clearSearch"), children: /* @__PURE__ */ jsx12(
|
|
5745
5933
|
IconButton7,
|
|
5746
5934
|
{
|
|
5747
5935
|
onClick: handleSearchClear,
|
|
@@ -5749,15 +5937,15 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
5749
5937
|
edge: "end",
|
|
5750
5938
|
"aria-label": tooltip("clearSearch"),
|
|
5751
5939
|
sx: { color: theme.palette.text.secondary },
|
|
5752
|
-
children: /* @__PURE__ */
|
|
5940
|
+
children: /* @__PURE__ */ jsx12(ClearIcon, { size: 16 })
|
|
5753
5941
|
}
|
|
5754
5942
|
) }) })
|
|
5755
5943
|
},
|
|
5756
5944
|
sx: {
|
|
5757
5945
|
"& .MuiOutlinedInput-root": {
|
|
5758
|
-
bgcolor:
|
|
5946
|
+
bgcolor: alpha6(theme.palette.background.default, 0.5),
|
|
5759
5947
|
"&:hover": {
|
|
5760
|
-
bgcolor:
|
|
5948
|
+
bgcolor: alpha6(theme.palette.background.default, 0.8)
|
|
5761
5949
|
},
|
|
5762
5950
|
"&.Mui-focused": {
|
|
5763
5951
|
bgcolor: theme.palette.background.default
|
|
@@ -5766,9 +5954,9 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
5766
5954
|
}
|
|
5767
5955
|
}
|
|
5768
5956
|
) }),
|
|
5769
|
-
/* @__PURE__ */
|
|
5770
|
-
/* @__PURE__ */
|
|
5771
|
-
|
|
5957
|
+
/* @__PURE__ */ jsxs9(Box9, { sx: { flex: 1, overflow: "auto", display: "flex", flexDirection: "column" }, children: [
|
|
5958
|
+
/* @__PURE__ */ jsxs9(
|
|
5959
|
+
Box9,
|
|
5772
5960
|
{
|
|
5773
5961
|
onClick: async () => {
|
|
5774
5962
|
const names = new Set(projects.map((p) => p.name));
|
|
@@ -5799,49 +5987,49 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
5799
5987
|
alignItems: "center",
|
|
5800
5988
|
gap: 1.5,
|
|
5801
5989
|
cursor: "pointer",
|
|
5802
|
-
"&:hover": { bgcolor:
|
|
5990
|
+
"&:hover": { bgcolor: alpha6(theme.palette.text.primary, 0.04) }
|
|
5803
5991
|
},
|
|
5804
5992
|
children: [
|
|
5805
|
-
/* @__PURE__ */
|
|
5806
|
-
|
|
5993
|
+
/* @__PURE__ */ jsx12(
|
|
5994
|
+
Box9,
|
|
5807
5995
|
{
|
|
5808
5996
|
sx: {
|
|
5809
5997
|
width: 28,
|
|
5810
5998
|
height: 28,
|
|
5811
5999
|
borderRadius: "50%",
|
|
5812
|
-
bgcolor:
|
|
6000
|
+
bgcolor: alpha6(theme.palette.success.main, 0.15),
|
|
5813
6001
|
display: "flex",
|
|
5814
6002
|
alignItems: "center",
|
|
5815
6003
|
justifyContent: "center",
|
|
5816
6004
|
flexShrink: 0
|
|
5817
6005
|
},
|
|
5818
|
-
children: /* @__PURE__ */
|
|
6006
|
+
children: /* @__PURE__ */ jsx12(FolderIcon4, { size: 16, color: theme.palette.success.main })
|
|
5819
6007
|
}
|
|
5820
6008
|
),
|
|
5821
|
-
/* @__PURE__ */
|
|
5822
|
-
|
|
6009
|
+
/* @__PURE__ */ jsx12(
|
|
6010
|
+
Typography7,
|
|
5823
6011
|
{
|
|
5824
6012
|
variant: "subtitle2",
|
|
5825
6013
|
sx: { flex: 1, fontWeight: 600, fontSize: "0.875rem" },
|
|
5826
6014
|
children: "New Project"
|
|
5827
6015
|
}
|
|
5828
6016
|
),
|
|
5829
|
-
/* @__PURE__ */
|
|
6017
|
+
/* @__PURE__ */ jsx12(Tooltip3, { title: tooltip("addProject"), arrow: true, children: /* @__PURE__ */ jsx12(
|
|
5830
6018
|
IconButton7,
|
|
5831
6019
|
{
|
|
5832
6020
|
size: "small",
|
|
5833
6021
|
"aria-label": tooltip("addProject"),
|
|
5834
6022
|
sx: { color: theme.palette.success.main },
|
|
5835
|
-
children: /* @__PURE__ */
|
|
6023
|
+
children: /* @__PURE__ */ jsx12(AddIcon4, { size: 16 })
|
|
5836
6024
|
}
|
|
5837
6025
|
) })
|
|
5838
6026
|
]
|
|
5839
6027
|
}
|
|
5840
6028
|
),
|
|
5841
|
-
/* @__PURE__ */
|
|
5842
|
-
filteredProjectGroups.map((group, index) => /* @__PURE__ */
|
|
5843
|
-
group.id === null && filteredProjectGroups.length > 1 && /* @__PURE__ */
|
|
5844
|
-
|
|
6029
|
+
/* @__PURE__ */ jsx12(Divider2, { sx: { opacity: 0.3 } }),
|
|
6030
|
+
filteredProjectGroups.map((group, index) => /* @__PURE__ */ jsxs9(Box9, { children: [
|
|
6031
|
+
group.id === null && filteredProjectGroups.length > 1 && /* @__PURE__ */ jsxs9(
|
|
6032
|
+
Box9,
|
|
5845
6033
|
{
|
|
5846
6034
|
sx: {
|
|
5847
6035
|
py: 2,
|
|
@@ -5851,9 +6039,9 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
5851
6039
|
gap: 2
|
|
5852
6040
|
},
|
|
5853
6041
|
children: [
|
|
5854
|
-
/* @__PURE__ */
|
|
5855
|
-
/* @__PURE__ */
|
|
5856
|
-
/* @__PURE__ */
|
|
6042
|
+
/* @__PURE__ */ jsx12(Divider2, { sx: { flex: 1, opacity: 0.6 } }),
|
|
6043
|
+
/* @__PURE__ */ jsxs9(Box9, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
6044
|
+
/* @__PURE__ */ jsx12(
|
|
5857
6045
|
InboxIcon3,
|
|
5858
6046
|
{
|
|
5859
6047
|
size: 14,
|
|
@@ -5861,8 +6049,8 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
5861
6049
|
style: { opacity: 0.7 }
|
|
5862
6050
|
}
|
|
5863
6051
|
),
|
|
5864
|
-
/* @__PURE__ */
|
|
5865
|
-
|
|
6052
|
+
/* @__PURE__ */ jsx12(
|
|
6053
|
+
Typography7,
|
|
5866
6054
|
{
|
|
5867
6055
|
variant: "caption",
|
|
5868
6056
|
sx: {
|
|
@@ -5876,12 +6064,12 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
5876
6064
|
}
|
|
5877
6065
|
)
|
|
5878
6066
|
] }),
|
|
5879
|
-
/* @__PURE__ */
|
|
6067
|
+
/* @__PURE__ */ jsx12(Divider2, { sx: { flex: 1, opacity: 0.6 } })
|
|
5880
6068
|
]
|
|
5881
6069
|
}
|
|
5882
6070
|
),
|
|
5883
|
-
group.id !== null ? /* @__PURE__ */
|
|
5884
|
-
/* @__PURE__ */
|
|
6071
|
+
group.id !== null ? /* @__PURE__ */ jsxs9(Fragment6, { children: [
|
|
6072
|
+
/* @__PURE__ */ jsx12(
|
|
5885
6073
|
project_header_default,
|
|
5886
6074
|
{
|
|
5887
6075
|
projectId: group.id,
|
|
@@ -5910,8 +6098,8 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
5910
6098
|
}
|
|
5911
6099
|
}
|
|
5912
6100
|
),
|
|
5913
|
-
/* @__PURE__ */
|
|
5914
|
-
group.conversations.map((conversation) => /* @__PURE__ */
|
|
6101
|
+
/* @__PURE__ */ jsx12(Collapse2, { in: !group.collapsed, children: /* @__PURE__ */ jsxs9(Box9, { sx: { pb: 1 }, children: [
|
|
6102
|
+
group.conversations.map((conversation) => /* @__PURE__ */ jsx12(
|
|
5915
6103
|
simple_conversation_item_default,
|
|
5916
6104
|
{
|
|
5917
6105
|
conversation,
|
|
@@ -5931,8 +6119,8 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
5931
6119
|
},
|
|
5932
6120
|
conversation.id
|
|
5933
6121
|
)),
|
|
5934
|
-
group.conversations.length === 0 && !group.collapsed && group.id !== null && /* @__PURE__ */
|
|
5935
|
-
|
|
6122
|
+
group.conversations.length === 0 && !group.collapsed && group.id !== null && /* @__PURE__ */ jsxs9(
|
|
6123
|
+
Box9,
|
|
5936
6124
|
{
|
|
5937
6125
|
sx: {
|
|
5938
6126
|
p: 3,
|
|
@@ -5940,17 +6128,17 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
5940
6128
|
color: theme.palette.text.secondary
|
|
5941
6129
|
},
|
|
5942
6130
|
children: [
|
|
5943
|
-
/* @__PURE__ */
|
|
5944
|
-
/* @__PURE__ */
|
|
6131
|
+
/* @__PURE__ */ jsx12(Typography7, { variant: "body2", children: "No conversations in this project yet" }),
|
|
6132
|
+
/* @__PURE__ */ jsx12(Typography7, { variant: "caption", sx: { mt: 1, display: "block" }, children: "Drag conversations here or use the + button above" })
|
|
5945
6133
|
]
|
|
5946
6134
|
}
|
|
5947
6135
|
)
|
|
5948
6136
|
] }) }),
|
|
5949
|
-
/* @__PURE__ */
|
|
6137
|
+
/* @__PURE__ */ jsx12(Divider2, { sx: { opacity: 0.3 } })
|
|
5950
6138
|
] }) : (
|
|
5951
6139
|
// Special handling for ungrouped - no header, just conversations in scrollable area
|
|
5952
|
-
/* @__PURE__ */
|
|
5953
|
-
|
|
6140
|
+
/* @__PURE__ */ jsx12(
|
|
6141
|
+
Box9,
|
|
5954
6142
|
{
|
|
5955
6143
|
sx: {
|
|
5956
6144
|
minHeight: 0,
|
|
@@ -5958,12 +6146,12 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
5958
6146
|
overflow: "auto",
|
|
5959
6147
|
px: 1,
|
|
5960
6148
|
py: 1,
|
|
5961
|
-
bgcolor:
|
|
6149
|
+
bgcolor: alpha6(theme.palette.background.default, 0.3),
|
|
5962
6150
|
borderRadius: "8px 8px 0 0",
|
|
5963
6151
|
mx: 1,
|
|
5964
6152
|
mb: 1
|
|
5965
6153
|
},
|
|
5966
|
-
children: group.conversations.map((conversation) => /* @__PURE__ */
|
|
6154
|
+
children: group.conversations.map((conversation) => /* @__PURE__ */ jsx12(
|
|
5967
6155
|
simple_conversation_item_default,
|
|
5968
6156
|
{
|
|
5969
6157
|
conversation,
|
|
@@ -5987,8 +6175,8 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
5987
6175
|
)
|
|
5988
6176
|
)
|
|
5989
6177
|
] }, group.id || "ungrouped")),
|
|
5990
|
-
filteredProjectGroups.length === 0 && /* @__PURE__ */
|
|
5991
|
-
|
|
6178
|
+
filteredProjectGroups.length === 0 && /* @__PURE__ */ jsxs9(
|
|
6179
|
+
Box9,
|
|
5992
6180
|
{
|
|
5993
6181
|
sx: {
|
|
5994
6182
|
flex: 1,
|
|
@@ -6001,28 +6189,28 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6001
6189
|
color: theme.palette.text.secondary
|
|
6002
6190
|
},
|
|
6003
6191
|
children: [
|
|
6004
|
-
/* @__PURE__ */
|
|
6005
|
-
/* @__PURE__ */
|
|
6192
|
+
/* @__PURE__ */ jsx12(Typography7, { variant: "h6", sx: { mb: 1 }, children: searchQuery ? "No conversations found" : "No conversations yet" }),
|
|
6193
|
+
/* @__PURE__ */ jsx12(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" })
|
|
6006
6194
|
]
|
|
6007
6195
|
}
|
|
6008
6196
|
)
|
|
6009
6197
|
] }),
|
|
6010
|
-
/* @__PURE__ */
|
|
6011
|
-
|
|
6198
|
+
/* @__PURE__ */ jsxs9(
|
|
6199
|
+
Box9,
|
|
6012
6200
|
{
|
|
6013
6201
|
sx: {
|
|
6014
6202
|
mt: "auto",
|
|
6015
6203
|
px: 2,
|
|
6016
6204
|
py: 1.75,
|
|
6017
|
-
borderTop: `1px solid ${
|
|
6205
|
+
borderTop: `1px solid ${alpha6(theme.palette.divider, 0.6)}`,
|
|
6018
6206
|
display: "flex",
|
|
6019
6207
|
alignItems: "center",
|
|
6020
6208
|
gap: 1.5,
|
|
6021
6209
|
justifyContent: "center",
|
|
6022
|
-
bgcolor:
|
|
6210
|
+
bgcolor: alpha6(theme.palette.background.default, isMobile ? 0.9 : 0.6)
|
|
6023
6211
|
},
|
|
6024
6212
|
children: [
|
|
6025
|
-
/* @__PURE__ */
|
|
6213
|
+
/* @__PURE__ */ jsx12(
|
|
6026
6214
|
Avatar6,
|
|
6027
6215
|
{
|
|
6028
6216
|
src: avatarImage,
|
|
@@ -6031,14 +6219,14 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6031
6219
|
width: 36,
|
|
6032
6220
|
height: 36,
|
|
6033
6221
|
fontSize: "0.95rem",
|
|
6034
|
-
bgcolor:
|
|
6222
|
+
bgcolor: alpha6(theme.palette.primary.main, 0.12),
|
|
6035
6223
|
color: theme.palette.primary.main
|
|
6036
6224
|
},
|
|
6037
6225
|
children: avatarInitials
|
|
6038
6226
|
}
|
|
6039
6227
|
),
|
|
6040
|
-
/* @__PURE__ */
|
|
6041
|
-
|
|
6228
|
+
/* @__PURE__ */ jsxs9(
|
|
6229
|
+
Box9,
|
|
6042
6230
|
{
|
|
6043
6231
|
sx: {
|
|
6044
6232
|
minWidth: 0,
|
|
@@ -6050,8 +6238,8 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6050
6238
|
gap: 0.25
|
|
6051
6239
|
},
|
|
6052
6240
|
children: [
|
|
6053
|
-
/* @__PURE__ */
|
|
6054
|
-
|
|
6241
|
+
/* @__PURE__ */ jsx12(
|
|
6242
|
+
Typography7,
|
|
6055
6243
|
{
|
|
6056
6244
|
variant: "subtitle2",
|
|
6057
6245
|
noWrap: true,
|
|
@@ -6059,8 +6247,8 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6059
6247
|
children: user ? userDisplayName : "Not signed in"
|
|
6060
6248
|
}
|
|
6061
6249
|
),
|
|
6062
|
-
!user && /* @__PURE__ */
|
|
6063
|
-
|
|
6250
|
+
!user && /* @__PURE__ */ jsx12(
|
|
6251
|
+
Typography7,
|
|
6064
6252
|
{
|
|
6065
6253
|
variant: "caption",
|
|
6066
6254
|
sx: { color: theme.palette.text.secondary },
|
|
@@ -6076,14 +6264,14 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6076
6264
|
]
|
|
6077
6265
|
}
|
|
6078
6266
|
),
|
|
6079
|
-
/* @__PURE__ */
|
|
6267
|
+
/* @__PURE__ */ jsx12(
|
|
6080
6268
|
project_management_modal_default,
|
|
6081
6269
|
{
|
|
6082
6270
|
open: projectManagementOpen,
|
|
6083
6271
|
onClose: () => setProjectManagementOpen(false)
|
|
6084
6272
|
}
|
|
6085
6273
|
),
|
|
6086
|
-
conversationToMove && /* @__PURE__ */
|
|
6274
|
+
conversationToMove && /* @__PURE__ */ jsx12(
|
|
6087
6275
|
move_conversation_modal_default,
|
|
6088
6276
|
{
|
|
6089
6277
|
open: moveModalOpen,
|
|
@@ -6092,7 +6280,7 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6092
6280
|
currentProjectId: conversationToMove.projectId
|
|
6093
6281
|
}
|
|
6094
6282
|
),
|
|
6095
|
-
/* @__PURE__ */
|
|
6283
|
+
/* @__PURE__ */ jsx12(
|
|
6096
6284
|
Menu3,
|
|
6097
6285
|
{
|
|
6098
6286
|
anchorEl: menuAnchorEl,
|
|
@@ -6106,7 +6294,7 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6106
6294
|
vertical: "bottom",
|
|
6107
6295
|
horizontal: "right"
|
|
6108
6296
|
},
|
|
6109
|
-
children: /* @__PURE__ */
|
|
6297
|
+
children: /* @__PURE__ */ jsxs9(
|
|
6110
6298
|
MenuItem3,
|
|
6111
6299
|
{
|
|
6112
6300
|
onClick: () => {
|
|
@@ -6115,14 +6303,14 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6115
6303
|
},
|
|
6116
6304
|
sx: { color: theme.palette.error.main },
|
|
6117
6305
|
children: [
|
|
6118
|
-
/* @__PURE__ */
|
|
6119
|
-
/* @__PURE__ */
|
|
6306
|
+
/* @__PURE__ */ jsx12(ListItemIcon3, { children: /* @__PURE__ */ jsx12(DeleteSweepIcon, { size: 16, color: theme.palette.error.main }) }),
|
|
6307
|
+
/* @__PURE__ */ jsx12(ListItemText3, { children: "Clear All Conversations" })
|
|
6120
6308
|
]
|
|
6121
6309
|
}
|
|
6122
6310
|
)
|
|
6123
6311
|
}
|
|
6124
6312
|
),
|
|
6125
|
-
/* @__PURE__ */
|
|
6313
|
+
/* @__PURE__ */ jsxs9(
|
|
6126
6314
|
Dialog3,
|
|
6127
6315
|
{
|
|
6128
6316
|
open: clearConfirmOpen,
|
|
@@ -6130,12 +6318,12 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6130
6318
|
maxWidth: "sm",
|
|
6131
6319
|
fullWidth: true,
|
|
6132
6320
|
children: [
|
|
6133
|
-
/* @__PURE__ */
|
|
6134
|
-
/* @__PURE__ */
|
|
6135
|
-
/* @__PURE__ */
|
|
6136
|
-
/* @__PURE__ */
|
|
6137
|
-
/* @__PURE__ */
|
|
6138
|
-
|
|
6321
|
+
/* @__PURE__ */ jsx12(DialogTitle3, { children: "Clear All Conversations?" }),
|
|
6322
|
+
/* @__PURE__ */ jsx12(DialogContent3, { children: /* @__PURE__ */ jsx12(Typography7, { children: "This will permanently delete all conversations and cannot be undone. Are you sure you want to continue?" }) }),
|
|
6323
|
+
/* @__PURE__ */ jsxs9(DialogActions3, { children: [
|
|
6324
|
+
/* @__PURE__ */ jsx12(Button5, { onClick: () => setClearConfirmOpen(false), children: "Cancel" }),
|
|
6325
|
+
/* @__PURE__ */ jsx12(
|
|
6326
|
+
Button5,
|
|
6139
6327
|
{
|
|
6140
6328
|
onClick: handleClearAllConfirm,
|
|
6141
6329
|
color: "error",
|
|
@@ -6152,13 +6340,13 @@ var ConversationDrawer = ({ open, onClose }) => {
|
|
|
6152
6340
|
var conversation_drawer_default = ConversationDrawer;
|
|
6153
6341
|
|
|
6154
6342
|
// src/chat/enhanced-mobile-conversations-modal.tsx
|
|
6155
|
-
import { useState as
|
|
6343
|
+
import { useState as useState12, useMemo as useMemo2, useEffect as useEffect11, useRef as useRef9, useCallback as useCallback5 } from "react";
|
|
6156
6344
|
import {
|
|
6157
|
-
Box as
|
|
6345
|
+
Box as Box10,
|
|
6158
6346
|
IconButton as IconButton8,
|
|
6159
6347
|
Modal as Modal2,
|
|
6160
|
-
Typography as
|
|
6161
|
-
TextField as
|
|
6348
|
+
Typography as Typography8,
|
|
6349
|
+
TextField as TextField7,
|
|
6162
6350
|
InputAdornment as InputAdornment2,
|
|
6163
6351
|
Slide,
|
|
6164
6352
|
Collapse as Collapse3,
|
|
@@ -6171,15 +6359,15 @@ import {
|
|
|
6171
6359
|
DialogTitle as DialogTitle4,
|
|
6172
6360
|
DialogContent as DialogContent4,
|
|
6173
6361
|
DialogActions as DialogActions4,
|
|
6174
|
-
Button as
|
|
6362
|
+
Button as Button6,
|
|
6175
6363
|
AppBar,
|
|
6176
6364
|
Toolbar,
|
|
6177
6365
|
Avatar as Avatar7,
|
|
6178
|
-
Chip as
|
|
6366
|
+
Chip as Chip4
|
|
6179
6367
|
} from "@mui/material";
|
|
6180
6368
|
import { X as CloseIcon5, X as ClearIcon2, Search as SearchIcon2, Folder as FolderIcon5, MoreVertical as MoreVertIcon4, Trash2 as DeleteSweepIcon2, Inbox as InboxIcon4, Plus as AddIcon5 } from "lucide-react";
|
|
6181
|
-
import { useTheme as
|
|
6182
|
-
import { Fragment as Fragment7, jsx as
|
|
6369
|
+
import { useTheme as useTheme11, alpha as alpha7 } from "@mui/material/styles";
|
|
6370
|
+
import { Fragment as Fragment7, jsx as jsx13, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
6183
6371
|
var BANDIT_AVATAR2 = "https://cdn.burtson.ai/images/bandit-head.png";
|
|
6184
6372
|
var coerceOptionalString2 = (value) => {
|
|
6185
6373
|
if (typeof value !== "string") return void 0;
|
|
@@ -6210,7 +6398,7 @@ var EnhancedMobileConversationsModal = ({
|
|
|
6210
6398
|
open,
|
|
6211
6399
|
onClose
|
|
6212
6400
|
}) => {
|
|
6213
|
-
const theme =
|
|
6401
|
+
const theme = useTheme11();
|
|
6214
6402
|
const { user } = useAuthenticationStore();
|
|
6215
6403
|
const {
|
|
6216
6404
|
conversations,
|
|
@@ -6230,18 +6418,18 @@ var EnhancedMobileConversationsModal = ({
|
|
|
6230
6418
|
createProject,
|
|
6231
6419
|
deleteProject
|
|
6232
6420
|
} = useProjectStore();
|
|
6233
|
-
const [projectManagementOpen, setProjectManagementOpen] =
|
|
6234
|
-
const [collapsedProjects, setCollapsedProjects] =
|
|
6421
|
+
const [projectManagementOpen, setProjectManagementOpen] = useState12(false);
|
|
6422
|
+
const [collapsedProjects, setCollapsedProjects] = useState12(/* @__PURE__ */ new Set());
|
|
6235
6423
|
const didInitCollapseRef = useRef9(false);
|
|
6236
|
-
const [searchQuery, setSearchQuery] =
|
|
6237
|
-
const [menuAnchorEl, setMenuAnchorEl] =
|
|
6238
|
-
const [clearConfirmOpen, setClearConfirmOpen] =
|
|
6239
|
-
const [moveModalOpen, setMoveModalOpen] =
|
|
6240
|
-
const [conversationToMove, setConversationToMove] =
|
|
6241
|
-
const [renameProjectId, setRenameProjectId] =
|
|
6242
|
-
const [deletedConversationIds, setDeletedConversationIds] =
|
|
6243
|
-
const [touchDragState, setTouchDragState] =
|
|
6244
|
-
const [avatarImage, setAvatarImage] =
|
|
6424
|
+
const [searchQuery, setSearchQuery] = useState12("");
|
|
6425
|
+
const [menuAnchorEl, setMenuAnchorEl] = useState12(null);
|
|
6426
|
+
const [clearConfirmOpen, setClearConfirmOpen] = useState12(false);
|
|
6427
|
+
const [moveModalOpen, setMoveModalOpen] = useState12(false);
|
|
6428
|
+
const [conversationToMove, setConversationToMove] = useState12(null);
|
|
6429
|
+
const [renameProjectId, setRenameProjectId] = useState12(null);
|
|
6430
|
+
const [deletedConversationIds, setDeletedConversationIds] = useState12(/* @__PURE__ */ new Set());
|
|
6431
|
+
const [touchDragState, setTouchDragState] = useState12({ conversationId: null, originProjectId: null, hoverProjectId: null });
|
|
6432
|
+
const [avatarImage, setAvatarImage] = useState12(BANDIT_AVATAR2);
|
|
6245
6433
|
const getCustomClaim = useCallback5((key) => {
|
|
6246
6434
|
if (!user) return void 0;
|
|
6247
6435
|
const record = user;
|
|
@@ -6274,7 +6462,7 @@ var EnhancedMobileConversationsModal = ({
|
|
|
6274
6462
|
}
|
|
6275
6463
|
return void 0;
|
|
6276
6464
|
}, [user, userDisplayName]);
|
|
6277
|
-
|
|
6465
|
+
useEffect11(() => {
|
|
6278
6466
|
const fetchBranding = async () => {
|
|
6279
6467
|
try {
|
|
6280
6468
|
const branding = await brandingService_default.getBranding();
|
|
@@ -6297,12 +6485,12 @@ var EnhancedMobileConversationsModal = ({
|
|
|
6297
6485
|
const end = Math.min(text.length, idx + query.length + 60);
|
|
6298
6486
|
return text.slice(start, end).replace(/\s+/g, " ").trim();
|
|
6299
6487
|
};
|
|
6300
|
-
|
|
6488
|
+
useEffect11(() => {
|
|
6301
6489
|
if (open && !projectsHydrated) {
|
|
6302
6490
|
hydrateProjects();
|
|
6303
6491
|
}
|
|
6304
6492
|
}, [open, projectsHydrated, hydrateProjects]);
|
|
6305
|
-
|
|
6493
|
+
useEffect11(() => {
|
|
6306
6494
|
if (projectsHydrated && !didInitCollapseRef.current) {
|
|
6307
6495
|
didInitCollapseRef.current = true;
|
|
6308
6496
|
if (projects && projects.length > 0) {
|
|
@@ -6469,7 +6657,7 @@ var EnhancedMobileConversationsModal = ({
|
|
|
6469
6657
|
setMoveModalOpen(false);
|
|
6470
6658
|
setConversationToMove(null);
|
|
6471
6659
|
};
|
|
6472
|
-
|
|
6660
|
+
useEffect11(() => {
|
|
6473
6661
|
setDeletedConversationIds((prev) => {
|
|
6474
6662
|
let changed = false;
|
|
6475
6663
|
const active2 = new Set(conversations.map((conv) => conv.id));
|
|
@@ -6484,8 +6672,8 @@ var EnhancedMobileConversationsModal = ({
|
|
|
6484
6672
|
return changed ? next : prev;
|
|
6485
6673
|
});
|
|
6486
6674
|
}, [conversations]);
|
|
6487
|
-
return /* @__PURE__ */
|
|
6488
|
-
/* @__PURE__ */
|
|
6675
|
+
return /* @__PURE__ */ jsxs10(Fragment7, { children: [
|
|
6676
|
+
/* @__PURE__ */ jsx13(
|
|
6489
6677
|
Modal2,
|
|
6490
6678
|
{
|
|
6491
6679
|
open,
|
|
@@ -6494,8 +6682,8 @@ var EnhancedMobileConversationsModal = ({
|
|
|
6494
6682
|
display: "flex",
|
|
6495
6683
|
alignItems: "flex-end"
|
|
6496
6684
|
},
|
|
6497
|
-
children: /* @__PURE__ */
|
|
6498
|
-
|
|
6685
|
+
children: /* @__PURE__ */ jsx13(Slide, { direction: "up", in: open, children: /* @__PURE__ */ jsxs10(
|
|
6686
|
+
Box10,
|
|
6499
6687
|
{
|
|
6500
6688
|
sx: {
|
|
6501
6689
|
width: "100%",
|
|
@@ -6508,7 +6696,7 @@ var EnhancedMobileConversationsModal = ({
|
|
|
6508
6696
|
overflow: "hidden"
|
|
6509
6697
|
},
|
|
6510
6698
|
children: [
|
|
6511
|
-
/* @__PURE__ */
|
|
6699
|
+
/* @__PURE__ */ jsx13(
|
|
6512
6700
|
AppBar,
|
|
6513
6701
|
{
|
|
6514
6702
|
position: "static",
|
|
@@ -6518,10 +6706,10 @@ var EnhancedMobileConversationsModal = ({
|
|
|
6518
6706
|
color: theme.palette.text.primary,
|
|
6519
6707
|
borderBottom: `1px solid ${theme.palette.divider}`
|
|
6520
6708
|
},
|
|
6521
|
-
children: /* @__PURE__ */
|
|
6522
|
-
/* @__PURE__ */
|
|
6523
|
-
visibleConversationCount > 0 && /* @__PURE__ */
|
|
6524
|
-
|
|
6709
|
+
children: /* @__PURE__ */ jsxs10(Toolbar, { children: [
|
|
6710
|
+
/* @__PURE__ */ jsx13(Typography8, { variant: "h6", sx: { flex: 1, fontWeight: 600 }, children: "Conversations" }),
|
|
6711
|
+
visibleConversationCount > 0 && /* @__PURE__ */ jsx13(
|
|
6712
|
+
Chip4,
|
|
6525
6713
|
{
|
|
6526
6714
|
label: visibleConversationCount,
|
|
6527
6715
|
size: "small",
|
|
@@ -6533,35 +6721,35 @@ var EnhancedMobileConversationsModal = ({
|
|
|
6533
6721
|
}
|
|
6534
6722
|
}
|
|
6535
6723
|
),
|
|
6536
|
-
/* @__PURE__ */
|
|
6724
|
+
/* @__PURE__ */ jsx13(
|
|
6537
6725
|
IconButton8,
|
|
6538
6726
|
{
|
|
6539
6727
|
onClick: () => setProjectManagementOpen(true),
|
|
6540
6728
|
sx: { color: theme.palette.text.secondary },
|
|
6541
|
-
children: /* @__PURE__ */
|
|
6729
|
+
children: /* @__PURE__ */ jsx13(FolderIcon5, {})
|
|
6542
6730
|
}
|
|
6543
6731
|
),
|
|
6544
|
-
/* @__PURE__ */
|
|
6732
|
+
/* @__PURE__ */ jsx13(
|
|
6545
6733
|
IconButton8,
|
|
6546
6734
|
{
|
|
6547
6735
|
onClick: handleMenuOpen,
|
|
6548
6736
|
sx: { color: theme.palette.text.secondary },
|
|
6549
|
-
children: /* @__PURE__ */
|
|
6737
|
+
children: /* @__PURE__ */ jsx13(MoreVertIcon4, {})
|
|
6550
6738
|
}
|
|
6551
6739
|
),
|
|
6552
|
-
/* @__PURE__ */
|
|
6740
|
+
/* @__PURE__ */ jsx13(
|
|
6553
6741
|
IconButton8,
|
|
6554
6742
|
{
|
|
6555
6743
|
onClick: onClose,
|
|
6556
6744
|
sx: { color: theme.palette.text.secondary },
|
|
6557
|
-
children: /* @__PURE__ */
|
|
6745
|
+
children: /* @__PURE__ */ jsx13(CloseIcon5, {})
|
|
6558
6746
|
}
|
|
6559
6747
|
)
|
|
6560
6748
|
] })
|
|
6561
6749
|
}
|
|
6562
6750
|
),
|
|
6563
|
-
/* @__PURE__ */
|
|
6564
|
-
|
|
6751
|
+
/* @__PURE__ */ jsx13(Box10, { sx: { p: 2, pb: 1 }, children: /* @__PURE__ */ jsx13(
|
|
6752
|
+
TextField7,
|
|
6565
6753
|
{
|
|
6566
6754
|
fullWidth: true,
|
|
6567
6755
|
size: "small",
|
|
@@ -6570,22 +6758,22 @@ var EnhancedMobileConversationsModal = ({
|
|
|
6570
6758
|
onChange: (e) => setSearchQuery(e.target.value),
|
|
6571
6759
|
variant: "outlined",
|
|
6572
6760
|
InputProps: {
|
|
6573
|
-
startAdornment: /* @__PURE__ */
|
|
6574
|
-
endAdornment: searchQuery && /* @__PURE__ */
|
|
6761
|
+
startAdornment: /* @__PURE__ */ jsx13(InputAdornment2, { position: "start", children: /* @__PURE__ */ jsx13(SearchIcon2, { size: 16, color: theme.palette.text.secondary }) }),
|
|
6762
|
+
endAdornment: searchQuery && /* @__PURE__ */ jsx13(InputAdornment2, { position: "end", children: /* @__PURE__ */ jsx13(
|
|
6575
6763
|
IconButton8,
|
|
6576
6764
|
{
|
|
6577
6765
|
onClick: handleSearchClear,
|
|
6578
6766
|
size: "small",
|
|
6579
6767
|
edge: "end",
|
|
6580
6768
|
sx: { color: theme.palette.text.secondary },
|
|
6581
|
-
children: /* @__PURE__ */
|
|
6769
|
+
children: /* @__PURE__ */ jsx13(ClearIcon2, { size: 16 })
|
|
6582
6770
|
}
|
|
6583
6771
|
) })
|
|
6584
6772
|
}
|
|
6585
6773
|
}
|
|
6586
6774
|
) }),
|
|
6587
|
-
/* @__PURE__ */
|
|
6588
|
-
|
|
6775
|
+
/* @__PURE__ */ jsxs10(
|
|
6776
|
+
Box10,
|
|
6589
6777
|
{
|
|
6590
6778
|
sx: {
|
|
6591
6779
|
flex: 1,
|
|
@@ -6596,8 +6784,8 @@ var EnhancedMobileConversationsModal = ({
|
|
|
6596
6784
|
pb: 2
|
|
6597
6785
|
},
|
|
6598
6786
|
children: [
|
|
6599
|
-
touchDragActive && activeDragConversation && /* @__PURE__ */
|
|
6600
|
-
|
|
6787
|
+
touchDragActive && activeDragConversation && /* @__PURE__ */ jsxs10(
|
|
6788
|
+
Box10,
|
|
6601
6789
|
{
|
|
6602
6790
|
sx: {
|
|
6603
6791
|
position: "absolute",
|
|
@@ -6606,13 +6794,13 @@ var EnhancedMobileConversationsModal = ({
|
|
|
6606
6794
|
transform: "translate(-50%, -100%)",
|
|
6607
6795
|
zIndex: theme.zIndex.modal + 10,
|
|
6608
6796
|
pointerEvents: "none",
|
|
6609
|
-
bgcolor: theme.palette.mode === "dark" ?
|
|
6797
|
+
bgcolor: theme.palette.mode === "dark" ? alpha7(theme.palette.common.black, 0.82) : alpha7(theme.palette.common.white, 0.95),
|
|
6610
6798
|
color: theme.palette.mode === "dark" ? theme.palette.common.white : theme.palette.text.primary,
|
|
6611
|
-
border: `1px solid ${theme.palette.mode === "dark" ?
|
|
6799
|
+
border: `1px solid ${theme.palette.mode === "dark" ? alpha7(theme.palette.common.white, 0.25) : alpha7(theme.palette.common.black, 0.2)}`,
|
|
6612
6800
|
borderRadius: 999,
|
|
6613
6801
|
px: 2,
|
|
6614
6802
|
py: 0.75,
|
|
6615
|
-
boxShadow: `0 16px 32px ${
|
|
6803
|
+
boxShadow: `0 16px 32px ${alpha7(theme.palette.common.black, 0.3)}`,
|
|
6616
6804
|
display: "flex",
|
|
6617
6805
|
alignItems: "center",
|
|
6618
6806
|
gap: 1,
|
|
@@ -6622,8 +6810,8 @@ var EnhancedMobileConversationsModal = ({
|
|
|
6622
6810
|
overflow: "hidden"
|
|
6623
6811
|
},
|
|
6624
6812
|
children: [
|
|
6625
|
-
/* @__PURE__ */
|
|
6626
|
-
|
|
6813
|
+
/* @__PURE__ */ jsxs10(
|
|
6814
|
+
Typography8,
|
|
6627
6815
|
{
|
|
6628
6816
|
variant: "caption",
|
|
6629
6817
|
sx: {
|
|
@@ -6635,8 +6823,8 @@ var EnhancedMobileConversationsModal = ({
|
|
|
6635
6823
|
},
|
|
6636
6824
|
children: [
|
|
6637
6825
|
"Move",
|
|
6638
|
-
/* @__PURE__ */
|
|
6639
|
-
|
|
6826
|
+
/* @__PURE__ */ jsxs10(
|
|
6827
|
+
Box10,
|
|
6640
6828
|
{
|
|
6641
6829
|
component: "span",
|
|
6642
6830
|
sx: {
|
|
@@ -6656,8 +6844,8 @@ var EnhancedMobileConversationsModal = ({
|
|
|
6656
6844
|
]
|
|
6657
6845
|
}
|
|
6658
6846
|
),
|
|
6659
|
-
/* @__PURE__ */
|
|
6660
|
-
|
|
6847
|
+
/* @__PURE__ */ jsx13(
|
|
6848
|
+
Typography8,
|
|
6661
6849
|
{
|
|
6662
6850
|
variant: "caption",
|
|
6663
6851
|
color: "inherit",
|
|
@@ -6665,11 +6853,11 @@ var EnhancedMobileConversationsModal = ({
|
|
|
6665
6853
|
fontWeight: 500,
|
|
6666
6854
|
whiteSpace: "nowrap"
|
|
6667
6855
|
},
|
|
6668
|
-
children: activeHoverLabel ? /* @__PURE__ */
|
|
6856
|
+
children: activeHoverLabel ? /* @__PURE__ */ jsxs10(Fragment7, { children: [
|
|
6669
6857
|
"to",
|
|
6670
6858
|
" ",
|
|
6671
|
-
/* @__PURE__ */
|
|
6672
|
-
|
|
6859
|
+
/* @__PURE__ */ jsx13(
|
|
6860
|
+
Box10,
|
|
6673
6861
|
{
|
|
6674
6862
|
component: "span",
|
|
6675
6863
|
sx: {
|
|
@@ -6685,8 +6873,8 @@ var EnhancedMobileConversationsModal = ({
|
|
|
6685
6873
|
]
|
|
6686
6874
|
}
|
|
6687
6875
|
),
|
|
6688
|
-
/* @__PURE__ */
|
|
6689
|
-
|
|
6876
|
+
/* @__PURE__ */ jsxs10(
|
|
6877
|
+
Box10,
|
|
6690
6878
|
{
|
|
6691
6879
|
onClick: async () => {
|
|
6692
6880
|
const names = new Set(projects.map((p) => p.name));
|
|
@@ -6717,41 +6905,41 @@ var EnhancedMobileConversationsModal = ({
|
|
|
6717
6905
|
alignItems: "center",
|
|
6718
6906
|
gap: 1.5,
|
|
6719
6907
|
cursor: "pointer",
|
|
6720
|
-
"&:hover": { bgcolor:
|
|
6908
|
+
"&:hover": { bgcolor: alpha7(theme.palette.text.primary, 0.04) }
|
|
6721
6909
|
},
|
|
6722
6910
|
children: [
|
|
6723
|
-
/* @__PURE__ */
|
|
6724
|
-
|
|
6911
|
+
/* @__PURE__ */ jsx13(
|
|
6912
|
+
Box10,
|
|
6725
6913
|
{
|
|
6726
6914
|
sx: {
|
|
6727
6915
|
width: 28,
|
|
6728
6916
|
height: 28,
|
|
6729
6917
|
borderRadius: "50%",
|
|
6730
|
-
bgcolor:
|
|
6918
|
+
bgcolor: alpha7(theme.palette.success.main, 0.15),
|
|
6731
6919
|
display: "flex",
|
|
6732
6920
|
alignItems: "center",
|
|
6733
6921
|
justifyContent: "center",
|
|
6734
6922
|
flexShrink: 0
|
|
6735
6923
|
},
|
|
6736
|
-
children: /* @__PURE__ */
|
|
6924
|
+
children: /* @__PURE__ */ jsx13(FolderIcon5, { size: 16, color: theme.palette.success.main })
|
|
6737
6925
|
}
|
|
6738
6926
|
),
|
|
6739
|
-
/* @__PURE__ */
|
|
6740
|
-
|
|
6927
|
+
/* @__PURE__ */ jsx13(
|
|
6928
|
+
Typography8,
|
|
6741
6929
|
{
|
|
6742
6930
|
variant: "subtitle2",
|
|
6743
6931
|
sx: { flex: 1, fontWeight: 600, fontSize: "0.875rem" },
|
|
6744
6932
|
children: "New Project"
|
|
6745
6933
|
}
|
|
6746
6934
|
),
|
|
6747
|
-
/* @__PURE__ */
|
|
6935
|
+
/* @__PURE__ */ jsx13(IconButton8, { size: "small", sx: { color: theme.palette.success.main }, children: /* @__PURE__ */ jsx13(AddIcon5, { size: 16 }) })
|
|
6748
6936
|
]
|
|
6749
6937
|
}
|
|
6750
6938
|
),
|
|
6751
|
-
/* @__PURE__ */
|
|
6752
|
-
filteredProjectGroups.map((group, index) => /* @__PURE__ */
|
|
6753
|
-
group.id === null && filteredProjectGroups.length > 1 && /* @__PURE__ */
|
|
6754
|
-
|
|
6939
|
+
/* @__PURE__ */ jsx13(Divider3, { sx: { opacity: 0.3 } }),
|
|
6940
|
+
filteredProjectGroups.map((group, index) => /* @__PURE__ */ jsxs10(Box10, { children: [
|
|
6941
|
+
group.id === null && filteredProjectGroups.length > 1 && /* @__PURE__ */ jsxs10(
|
|
6942
|
+
Box10,
|
|
6755
6943
|
{
|
|
6756
6944
|
sx: {
|
|
6757
6945
|
py: 2,
|
|
@@ -6761,9 +6949,9 @@ var EnhancedMobileConversationsModal = ({
|
|
|
6761
6949
|
gap: 2
|
|
6762
6950
|
},
|
|
6763
6951
|
children: [
|
|
6764
|
-
/* @__PURE__ */
|
|
6765
|
-
/* @__PURE__ */
|
|
6766
|
-
/* @__PURE__ */
|
|
6952
|
+
/* @__PURE__ */ jsx13(Divider3, { sx: { flex: 1, opacity: 0.6 } }),
|
|
6953
|
+
/* @__PURE__ */ jsxs10(Box10, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
6954
|
+
/* @__PURE__ */ jsx13(
|
|
6767
6955
|
InboxIcon4,
|
|
6768
6956
|
{
|
|
6769
6957
|
size: 14,
|
|
@@ -6771,8 +6959,8 @@ var EnhancedMobileConversationsModal = ({
|
|
|
6771
6959
|
style: { opacity: 0.7 }
|
|
6772
6960
|
}
|
|
6773
6961
|
),
|
|
6774
|
-
/* @__PURE__ */
|
|
6775
|
-
|
|
6962
|
+
/* @__PURE__ */ jsx13(
|
|
6963
|
+
Typography8,
|
|
6776
6964
|
{
|
|
6777
6965
|
variant: "caption",
|
|
6778
6966
|
sx: {
|
|
@@ -6786,12 +6974,12 @@ var EnhancedMobileConversationsModal = ({
|
|
|
6786
6974
|
}
|
|
6787
6975
|
)
|
|
6788
6976
|
] }),
|
|
6789
|
-
/* @__PURE__ */
|
|
6977
|
+
/* @__PURE__ */ jsx13(Divider3, { sx: { flex: 1, opacity: 0.6 } })
|
|
6790
6978
|
]
|
|
6791
6979
|
}
|
|
6792
6980
|
),
|
|
6793
|
-
group.id !== null ? /* @__PURE__ */
|
|
6794
|
-
/* @__PURE__ */
|
|
6981
|
+
group.id !== null ? /* @__PURE__ */ jsxs10(Fragment7, { children: [
|
|
6982
|
+
/* @__PURE__ */ jsx13(
|
|
6795
6983
|
project_header_default,
|
|
6796
6984
|
{
|
|
6797
6985
|
projectId: group.id,
|
|
@@ -6821,8 +7009,8 @@ var EnhancedMobileConversationsModal = ({
|
|
|
6821
7009
|
isTouchTarget: touchDragActive && touchDragState.hoverProjectId === group.id
|
|
6822
7010
|
}
|
|
6823
7011
|
),
|
|
6824
|
-
/* @__PURE__ */
|
|
6825
|
-
|
|
7012
|
+
/* @__PURE__ */ jsx13(Collapse3, { in: !group.collapsed, children: /* @__PURE__ */ jsx13(
|
|
7013
|
+
Box10,
|
|
6826
7014
|
{
|
|
6827
7015
|
"data-project-id": group.id ?? "__ungrouped",
|
|
6828
7016
|
sx: {
|
|
@@ -6830,9 +7018,9 @@ var EnhancedMobileConversationsModal = ({
|
|
|
6830
7018
|
border: touchDragActive && touchDragState.hoverProjectId === group.id ? `2px dashed ${theme.palette.primary.main}` : "1px solid transparent",
|
|
6831
7019
|
borderRadius: touchDragActive && touchDragState.hoverProjectId === group.id ? 2 : 0,
|
|
6832
7020
|
transition: "border 0.2s ease, background-color 0.2s ease",
|
|
6833
|
-
backgroundColor: touchDragActive && touchDragState.hoverProjectId === group.id ?
|
|
7021
|
+
backgroundColor: touchDragActive && touchDragState.hoverProjectId === group.id ? alpha7(theme.palette.primary.main, 0.08) : "transparent"
|
|
6834
7022
|
},
|
|
6835
|
-
children: group.conversations.map((conversation) => /* @__PURE__ */
|
|
7023
|
+
children: group.conversations.map((conversation) => /* @__PURE__ */ jsx13(
|
|
6836
7024
|
simple_conversation_item_default,
|
|
6837
7025
|
{
|
|
6838
7026
|
conversation,
|
|
@@ -6866,24 +7054,24 @@ var EnhancedMobileConversationsModal = ({
|
|
|
6866
7054
|
) })
|
|
6867
7055
|
] }) : (
|
|
6868
7056
|
// Special handling for ungrouped - no header, just conversations in scrollable area
|
|
6869
|
-
/* @__PURE__ */
|
|
6870
|
-
|
|
7057
|
+
/* @__PURE__ */ jsx13(
|
|
7058
|
+
Box10,
|
|
6871
7059
|
{
|
|
6872
7060
|
sx: {
|
|
6873
7061
|
minHeight: 0,
|
|
6874
7062
|
overflow: "auto",
|
|
6875
7063
|
px: 1,
|
|
6876
7064
|
py: 1,
|
|
6877
|
-
bgcolor:
|
|
7065
|
+
bgcolor: alpha7(theme.palette.background.default, 0.3),
|
|
6878
7066
|
borderRadius: "8px 8px 0 0",
|
|
6879
7067
|
mx: 1,
|
|
6880
7068
|
mb: 1,
|
|
6881
7069
|
border: touchDragActive && touchDragState.hoverProjectId === "__ungrouped" ? `2px dashed ${theme.palette.primary.main}` : "1px solid transparent",
|
|
6882
7070
|
transition: "border 0.2s ease, background-color 0.2s ease",
|
|
6883
|
-
backgroundColor: touchDragActive && touchDragState.hoverProjectId === "__ungrouped" ?
|
|
7071
|
+
backgroundColor: touchDragActive && touchDragState.hoverProjectId === "__ungrouped" ? alpha7(theme.palette.primary.main, 0.08) : alpha7(theme.palette.background.default, 0.3)
|
|
6884
7072
|
},
|
|
6885
7073
|
"data-project-id": "__ungrouped",
|
|
6886
|
-
children: group.conversations.map((conversation) => /* @__PURE__ */
|
|
7074
|
+
children: group.conversations.map((conversation) => /* @__PURE__ */ jsx13(
|
|
6887
7075
|
simple_conversation_item_default,
|
|
6888
7076
|
{
|
|
6889
7077
|
conversation,
|
|
@@ -6917,8 +7105,8 @@ var EnhancedMobileConversationsModal = ({
|
|
|
6917
7105
|
)
|
|
6918
7106
|
)
|
|
6919
7107
|
] }, group.id || "ungrouped")),
|
|
6920
|
-
filteredProjectGroups.length === 0 && /* @__PURE__ */
|
|
6921
|
-
|
|
7108
|
+
filteredProjectGroups.length === 0 && /* @__PURE__ */ jsxs10(
|
|
7109
|
+
Box10,
|
|
6922
7110
|
{
|
|
6923
7111
|
sx: {
|
|
6924
7112
|
flex: 1,
|
|
@@ -6931,31 +7119,31 @@ var EnhancedMobileConversationsModal = ({
|
|
|
6931
7119
|
color: theme.palette.text.secondary
|
|
6932
7120
|
},
|
|
6933
7121
|
children: [
|
|
6934
|
-
/* @__PURE__ */
|
|
6935
|
-
/* @__PURE__ */
|
|
7122
|
+
/* @__PURE__ */ jsx13(Typography8, { variant: "h6", sx: { mb: 1 }, children: searchQuery ? "No conversations found" : "No conversations yet" }),
|
|
7123
|
+
/* @__PURE__ */ jsx13(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" })
|
|
6936
7124
|
]
|
|
6937
7125
|
}
|
|
6938
7126
|
)
|
|
6939
7127
|
]
|
|
6940
7128
|
}
|
|
6941
7129
|
),
|
|
6942
|
-
/* @__PURE__ */
|
|
6943
|
-
|
|
7130
|
+
/* @__PURE__ */ jsxs10(
|
|
7131
|
+
Box10,
|
|
6944
7132
|
{
|
|
6945
7133
|
sx: {
|
|
6946
7134
|
mt: "auto",
|
|
6947
7135
|
px: 2,
|
|
6948
7136
|
py: 1.75,
|
|
6949
|
-
borderTop: `1px solid ${
|
|
7137
|
+
borderTop: `1px solid ${alpha7(theme.palette.divider, 0.6)}`,
|
|
6950
7138
|
display: "flex",
|
|
6951
7139
|
alignItems: "center",
|
|
6952
7140
|
justifyContent: "center",
|
|
6953
7141
|
gap: 1.25,
|
|
6954
|
-
bgcolor:
|
|
7142
|
+
bgcolor: alpha7(theme.palette.background.default, 0.88),
|
|
6955
7143
|
flexWrap: "wrap"
|
|
6956
7144
|
},
|
|
6957
7145
|
children: [
|
|
6958
|
-
/* @__PURE__ */
|
|
7146
|
+
/* @__PURE__ */ jsx13(
|
|
6959
7147
|
Avatar7,
|
|
6960
7148
|
{
|
|
6961
7149
|
src: avatarImage,
|
|
@@ -6964,15 +7152,15 @@ var EnhancedMobileConversationsModal = ({
|
|
|
6964
7152
|
width: 40,
|
|
6965
7153
|
height: 40,
|
|
6966
7154
|
fontSize: "1rem",
|
|
6967
|
-
bgcolor:
|
|
7155
|
+
bgcolor: alpha7(theme.palette.primary.main, 0.12),
|
|
6968
7156
|
color: theme.palette.primary.main
|
|
6969
7157
|
},
|
|
6970
7158
|
children: avatarInitials
|
|
6971
7159
|
}
|
|
6972
7160
|
),
|
|
6973
|
-
/* @__PURE__ */
|
|
6974
|
-
/* @__PURE__ */
|
|
6975
|
-
|
|
7161
|
+
/* @__PURE__ */ jsxs10(Box10, { sx: { display: "flex", flexDirection: "column", alignItems: "center", gap: 0.5, minWidth: 0 }, children: [
|
|
7162
|
+
/* @__PURE__ */ jsx13(
|
|
7163
|
+
Typography8,
|
|
6976
7164
|
{
|
|
6977
7165
|
variant: "subtitle2",
|
|
6978
7166
|
noWrap: true,
|
|
@@ -6980,8 +7168,8 @@ var EnhancedMobileConversationsModal = ({
|
|
|
6980
7168
|
children: user ? userDisplayName : "Not signed in"
|
|
6981
7169
|
}
|
|
6982
7170
|
),
|
|
6983
|
-
!user && /* @__PURE__ */
|
|
6984
|
-
|
|
7171
|
+
!user && /* @__PURE__ */ jsx13(
|
|
7172
|
+
Typography8,
|
|
6985
7173
|
{
|
|
6986
7174
|
variant: "caption",
|
|
6987
7175
|
sx: { color: theme.palette.text.secondary },
|
|
@@ -6998,14 +7186,14 @@ var EnhancedMobileConversationsModal = ({
|
|
|
6998
7186
|
) })
|
|
6999
7187
|
}
|
|
7000
7188
|
),
|
|
7001
|
-
/* @__PURE__ */
|
|
7189
|
+
/* @__PURE__ */ jsx13(
|
|
7002
7190
|
project_management_modal_default,
|
|
7003
7191
|
{
|
|
7004
7192
|
open: projectManagementOpen,
|
|
7005
7193
|
onClose: () => setProjectManagementOpen(false)
|
|
7006
7194
|
}
|
|
7007
7195
|
),
|
|
7008
|
-
conversationToMove && /* @__PURE__ */
|
|
7196
|
+
conversationToMove && /* @__PURE__ */ jsx13(
|
|
7009
7197
|
move_conversation_modal_default,
|
|
7010
7198
|
{
|
|
7011
7199
|
open: moveModalOpen,
|
|
@@ -7014,7 +7202,7 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7014
7202
|
currentProjectId: conversationToMove.projectId
|
|
7015
7203
|
}
|
|
7016
7204
|
),
|
|
7017
|
-
/* @__PURE__ */
|
|
7205
|
+
/* @__PURE__ */ jsx13(
|
|
7018
7206
|
Menu4,
|
|
7019
7207
|
{
|
|
7020
7208
|
anchorEl: menuAnchorEl,
|
|
@@ -7028,7 +7216,7 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7028
7216
|
vertical: "bottom",
|
|
7029
7217
|
horizontal: "right"
|
|
7030
7218
|
},
|
|
7031
|
-
children: /* @__PURE__ */
|
|
7219
|
+
children: /* @__PURE__ */ jsxs10(
|
|
7032
7220
|
MenuItem4,
|
|
7033
7221
|
{
|
|
7034
7222
|
onClick: () => {
|
|
@@ -7038,14 +7226,14 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7038
7226
|
disabled: visibleConversationCount === 0,
|
|
7039
7227
|
sx: { color: theme.palette.error.main },
|
|
7040
7228
|
children: [
|
|
7041
|
-
/* @__PURE__ */
|
|
7042
|
-
/* @__PURE__ */
|
|
7229
|
+
/* @__PURE__ */ jsx13(ListItemIcon4, { children: /* @__PURE__ */ jsx13(DeleteSweepIcon2, { size: 16, color: theme.palette.error.main }) }),
|
|
7230
|
+
/* @__PURE__ */ jsx13(ListItemText4, { children: "Clear All Conversations" })
|
|
7043
7231
|
]
|
|
7044
7232
|
}
|
|
7045
7233
|
)
|
|
7046
7234
|
}
|
|
7047
7235
|
),
|
|
7048
|
-
/* @__PURE__ */
|
|
7236
|
+
/* @__PURE__ */ jsxs10(
|
|
7049
7237
|
Dialog4,
|
|
7050
7238
|
{
|
|
7051
7239
|
open: clearConfirmOpen,
|
|
@@ -7053,12 +7241,12 @@ var EnhancedMobileConversationsModal = ({
|
|
|
7053
7241
|
maxWidth: "sm",
|
|
7054
7242
|
fullWidth: true,
|
|
7055
7243
|
children: [
|
|
7056
|
-
/* @__PURE__ */
|
|
7057
|
-
/* @__PURE__ */
|
|
7058
|
-
/* @__PURE__ */
|
|
7059
|
-
/* @__PURE__ */
|
|
7060
|
-
/* @__PURE__ */
|
|
7061
|
-
|
|
7244
|
+
/* @__PURE__ */ jsx13(DialogTitle4, { children: "Clear All Conversations?" }),
|
|
7245
|
+
/* @__PURE__ */ jsx13(DialogContent4, { children: /* @__PURE__ */ jsx13(Typography8, { children: visibleConversationCount === 0 ? "No conversations available to clear." : `This will permanently delete ${visibleConversationCount} conversation${visibleConversationCount === 1 ? "" : "s"} and cannot be undone.` }) }),
|
|
7246
|
+
/* @__PURE__ */ jsxs10(DialogActions4, { children: [
|
|
7247
|
+
/* @__PURE__ */ jsx13(Button6, { onClick: () => setClearConfirmOpen(false), children: "Cancel" }),
|
|
7248
|
+
/* @__PURE__ */ jsx13(
|
|
7249
|
+
Button6,
|
|
7062
7250
|
{
|
|
7063
7251
|
onClick: handleClearAllConfirm,
|
|
7064
7252
|
color: "error",
|
|
@@ -7076,7 +7264,7 @@ var enhanced_mobile_conversations_modal_default = EnhancedMobileConversationsMod
|
|
|
7076
7264
|
|
|
7077
7265
|
// src/chat/chat-app-bar.tsx
|
|
7078
7266
|
import { shallow as shallow2 } from "zustand/shallow";
|
|
7079
|
-
import { Fragment as Fragment8, jsx as
|
|
7267
|
+
import { Fragment as Fragment8, jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
7080
7268
|
var CDN_BASE = "https://cdn.burtson.ai/";
|
|
7081
7269
|
var banditHead = `${CDN_BASE}/images/bandit-head.png`;
|
|
7082
7270
|
var modelAvatars = {
|
|
@@ -7095,7 +7283,7 @@ var ChatAppBar = ({
|
|
|
7095
7283
|
drawerOpen,
|
|
7096
7284
|
setDrawerOpen
|
|
7097
7285
|
}) => {
|
|
7098
|
-
const theme =
|
|
7286
|
+
const theme = useTheme12();
|
|
7099
7287
|
const isMobile = useMediaQuery5(theme.breakpoints.down("sm"));
|
|
7100
7288
|
const hasLoggedRouterWarningRef = useRef10(false);
|
|
7101
7289
|
let navigate = null;
|
|
@@ -7123,12 +7311,12 @@ var ChatAppBar = ({
|
|
|
7123
7311
|
menuBackground,
|
|
7124
7312
|
menuText
|
|
7125
7313
|
} = theme.palette.chat.appBar;
|
|
7126
|
-
const [modelAnchorEl, setModelAnchorEl] =
|
|
7127
|
-
const [engineAnchorEl, setEngineAnchorEl] =
|
|
7128
|
-
const [voiceAnchorEl, setVoiceAnchorEl] =
|
|
7129
|
-
const [modalOpen, setModalOpen] =
|
|
7130
|
-
const [confirmModelChangeOpen, setConfirmModelChangeOpen] =
|
|
7131
|
-
const [pendingModel, setPendingModel] =
|
|
7314
|
+
const [modelAnchorEl, setModelAnchorEl] = useState13(null);
|
|
7315
|
+
const [engineAnchorEl, setEngineAnchorEl] = useState13(null);
|
|
7316
|
+
const [voiceAnchorEl, setVoiceAnchorEl] = useState13(null);
|
|
7317
|
+
const [modalOpen, setModalOpen] = useState13(false);
|
|
7318
|
+
const [confirmModelChangeOpen, setConfirmModelChangeOpen] = useState13(false);
|
|
7319
|
+
const [pendingModel, setPendingModel] = useState13(null);
|
|
7132
7320
|
const { conversations, currentId, createNewConversation, _hasHydrated } = useConversationStore();
|
|
7133
7321
|
const { preferences } = usePreferencesStore();
|
|
7134
7322
|
const { settings: packageSettings } = usePackageSettingsStore();
|
|
@@ -7154,7 +7342,7 @@ var ChatAppBar = ({
|
|
|
7154
7342
|
triggerSync: state.runSync,
|
|
7155
7343
|
setSyncEnabled: state.setSyncEnabled
|
|
7156
7344
|
}), shallow2);
|
|
7157
|
-
|
|
7345
|
+
useEffect12(() => {
|
|
7158
7346
|
if (isPlaygroundMode2 && syncEnabled) {
|
|
7159
7347
|
void setSyncEnabled(false).catch((error) => {
|
|
7160
7348
|
debugLogger.warn("ChatAppBar: Failed to disable sync in playground", {
|
|
@@ -7172,16 +7360,16 @@ var ChatAppBar = ({
|
|
|
7172
7360
|
};
|
|
7173
7361
|
const syncIndicatorIcon = (() => {
|
|
7174
7362
|
if (isPlaygroundMode2 || !syncEnabled) {
|
|
7175
|
-
return /* @__PURE__ */
|
|
7363
|
+
return /* @__PURE__ */ jsx14(CloudOffIcon, { fontSize: "small", color: "disabled" });
|
|
7176
7364
|
}
|
|
7177
7365
|
switch (syncStatus) {
|
|
7178
7366
|
case "syncing":
|
|
7179
|
-
return /* @__PURE__ */
|
|
7367
|
+
return /* @__PURE__ */ jsx14(SyncIcon, { fontSize: "small", sx: syncSpinSx, color: "primary" });
|
|
7180
7368
|
case "error":
|
|
7181
|
-
return /* @__PURE__ */
|
|
7369
|
+
return /* @__PURE__ */ jsx14(ErrorOutlineIcon, { fontSize: "small", color: "error" });
|
|
7182
7370
|
case "idle":
|
|
7183
7371
|
default:
|
|
7184
|
-
return /* @__PURE__ */
|
|
7372
|
+
return /* @__PURE__ */ jsx14(CloudDoneIcon, { fontSize: "small", color: "success" });
|
|
7185
7373
|
}
|
|
7186
7374
|
})();
|
|
7187
7375
|
const syncTooltip = (() => {
|
|
@@ -7252,7 +7440,7 @@ var ChatAppBar = ({
|
|
|
7252
7440
|
const resolvedEngineId = currentEngine?.id ?? effectiveEngineId;
|
|
7253
7441
|
const cleanEngineName = (name) => (name || "").replace(/\s*\([^)]*\)\s*$/, "").trim();
|
|
7254
7442
|
const engineDisplay = cleanEngineName(currentEngine?.displayName) || "Engine";
|
|
7255
|
-
|
|
7443
|
+
useEffect12(() => {
|
|
7256
7444
|
useEngineStore.getState().fetchEngines();
|
|
7257
7445
|
}, []);
|
|
7258
7446
|
const pendingModelAvatar = useModelStore.getState().availableModels.find((m) => m.name === pendingModel)?.avatarBase64 || modelAvatars[pendingModel || ""] || banditHead;
|
|
@@ -7287,9 +7475,9 @@ var ChatAppBar = ({
|
|
|
7287
7475
|
}
|
|
7288
7476
|
safeNavigate("/");
|
|
7289
7477
|
}
|
|
7290
|
-
return /* @__PURE__ */
|
|
7291
|
-
/* @__PURE__ */
|
|
7292
|
-
|
|
7478
|
+
return /* @__PURE__ */ jsxs11(Fragment8, { children: [
|
|
7479
|
+
/* @__PURE__ */ jsxs11(
|
|
7480
|
+
Box11,
|
|
7293
7481
|
{
|
|
7294
7482
|
sx: {
|
|
7295
7483
|
position: "fixed",
|
|
@@ -7309,8 +7497,8 @@ var ChatAppBar = ({
|
|
|
7309
7497
|
}
|
|
7310
7498
|
},
|
|
7311
7499
|
children: [
|
|
7312
|
-
/* @__PURE__ */
|
|
7313
|
-
|
|
7500
|
+
/* @__PURE__ */ jsxs11(
|
|
7501
|
+
Box11,
|
|
7314
7502
|
{
|
|
7315
7503
|
sx: {
|
|
7316
7504
|
display: "flex",
|
|
@@ -7330,16 +7518,16 @@ var ChatAppBar = ({
|
|
|
7330
7518
|
}
|
|
7331
7519
|
},
|
|
7332
7520
|
children: [
|
|
7333
|
-
/* @__PURE__ */
|
|
7521
|
+
/* @__PURE__ */ jsx14(Tooltip4, { title: homeTooltip, arrow: true, children: /* @__PURE__ */ jsx14(
|
|
7334
7522
|
IconButton9,
|
|
7335
7523
|
{
|
|
7336
7524
|
onClick: goToHome,
|
|
7337
7525
|
sx: pillButtonStyles,
|
|
7338
7526
|
"aria-label": "Go to home page",
|
|
7339
|
-
children: /* @__PURE__ */
|
|
7527
|
+
children: /* @__PURE__ */ jsx14(HomeIcon, {})
|
|
7340
7528
|
}
|
|
7341
7529
|
) }),
|
|
7342
|
-
showLimitedAdminPanel() && /* @__PURE__ */
|
|
7530
|
+
showLimitedAdminPanel() && /* @__PURE__ */ jsx14(Tooltip4, { title: "Management & Settings", arrow: true, children: /* @__PURE__ */ jsx14(
|
|
7343
7531
|
IconButton9,
|
|
7344
7532
|
{
|
|
7345
7533
|
onClick: () => safeNavigate(managementPath),
|
|
@@ -7351,10 +7539,10 @@ var ChatAppBar = ({
|
|
|
7351
7539
|
}
|
|
7352
7540
|
},
|
|
7353
7541
|
"aria-label": "Open management settings",
|
|
7354
|
-
children: /* @__PURE__ */
|
|
7542
|
+
children: /* @__PURE__ */ jsx14(SettingsIcon, {})
|
|
7355
7543
|
}
|
|
7356
7544
|
) }),
|
|
7357
|
-
/* @__PURE__ */
|
|
7545
|
+
/* @__PURE__ */ jsx14(Tooltip4, { title: syncTooltip, arrow: true, children: /* @__PURE__ */ jsxs11(
|
|
7358
7546
|
IconButton9,
|
|
7359
7547
|
{
|
|
7360
7548
|
onClick: handleSyncBadgeClick,
|
|
@@ -7370,8 +7558,8 @@ var ChatAppBar = ({
|
|
|
7370
7558
|
"aria-label": "Conversation sync status",
|
|
7371
7559
|
children: [
|
|
7372
7560
|
syncIndicatorIcon,
|
|
7373
|
-
pendingCount > 0 && !syncButtonDisabled && syncStatus !== "syncing" && /* @__PURE__ */
|
|
7374
|
-
|
|
7561
|
+
pendingCount > 0 && !syncButtonDisabled && syncStatus !== "syncing" && /* @__PURE__ */ jsx14(
|
|
7562
|
+
Box11,
|
|
7375
7563
|
{
|
|
7376
7564
|
sx: {
|
|
7377
7565
|
position: "absolute",
|
|
@@ -7396,7 +7584,7 @@ var ChatAppBar = ({
|
|
|
7396
7584
|
]
|
|
7397
7585
|
}
|
|
7398
7586
|
) }),
|
|
7399
|
-
!isMobile && /* @__PURE__ */
|
|
7587
|
+
!isMobile && /* @__PURE__ */ jsx14(Tooltip4, { title: `${drawerOpen ? "Close" : "Open"} Conversations`, arrow: true, children: /* @__PURE__ */ jsxs11(
|
|
7400
7588
|
IconButton9,
|
|
7401
7589
|
{
|
|
7402
7590
|
onClick: () => setDrawerOpen(!drawerOpen),
|
|
@@ -7410,9 +7598,9 @@ var ChatAppBar = ({
|
|
|
7410
7598
|
"aria-label": `${drawerOpen ? "Close" : "Open"} conversations drawer`,
|
|
7411
7599
|
"aria-pressed": drawerOpen,
|
|
7412
7600
|
children: [
|
|
7413
|
-
drawerOpen ? /* @__PURE__ */
|
|
7414
|
-
conversations.length > 0 && /* @__PURE__ */
|
|
7415
|
-
|
|
7601
|
+
drawerOpen ? /* @__PURE__ */ jsx14(NotesIcon, {}) : /* @__PURE__ */ jsx14(NotesIconOutlined, {}),
|
|
7602
|
+
conversations.length > 0 && /* @__PURE__ */ jsx14(
|
|
7603
|
+
Box11,
|
|
7416
7604
|
{
|
|
7417
7605
|
sx: {
|
|
7418
7606
|
position: "absolute",
|
|
@@ -7437,7 +7625,7 @@ var ChatAppBar = ({
|
|
|
7437
7625
|
]
|
|
7438
7626
|
}
|
|
7439
7627
|
) }),
|
|
7440
|
-
!isMobile && canShowNewConversationButton && /* @__PURE__ */
|
|
7628
|
+
!isMobile && canShowNewConversationButton && /* @__PURE__ */ jsx14(Tooltip4, { title: "Start New Conversation", arrow: true, children: /* @__PURE__ */ jsx14(
|
|
7441
7629
|
IconButton9,
|
|
7442
7630
|
{
|
|
7443
7631
|
onClick: () => createNewConversation(),
|
|
@@ -7451,14 +7639,14 @@ var ChatAppBar = ({
|
|
|
7451
7639
|
}
|
|
7452
7640
|
},
|
|
7453
7641
|
"aria-label": "Create new conversation",
|
|
7454
|
-
children: /* @__PURE__ */
|
|
7642
|
+
children: /* @__PURE__ */ jsx14(AddIcon, {})
|
|
7455
7643
|
}
|
|
7456
7644
|
) })
|
|
7457
7645
|
]
|
|
7458
7646
|
}
|
|
7459
7647
|
),
|
|
7460
|
-
/* @__PURE__ */
|
|
7461
|
-
|
|
7648
|
+
/* @__PURE__ */ jsxs11(
|
|
7649
|
+
Box11,
|
|
7462
7650
|
{
|
|
7463
7651
|
sx: {
|
|
7464
7652
|
display: "flex",
|
|
@@ -7478,7 +7666,7 @@ var ChatAppBar = ({
|
|
|
7478
7666
|
}
|
|
7479
7667
|
},
|
|
7480
7668
|
children: [
|
|
7481
|
-
isMobile && /* @__PURE__ */
|
|
7669
|
+
isMobile && /* @__PURE__ */ jsx14(Tooltip4, { title: `Conversations (${conversations.length})`, arrow: true, children: /* @__PURE__ */ jsxs11(
|
|
7482
7670
|
IconButton9,
|
|
7483
7671
|
{
|
|
7484
7672
|
onClick: () => setModalOpen(true),
|
|
@@ -7488,9 +7676,9 @@ var ChatAppBar = ({
|
|
|
7488
7676
|
},
|
|
7489
7677
|
"aria-label": `Open conversations modal with ${conversations.length} conversations`,
|
|
7490
7678
|
children: [
|
|
7491
|
-
/* @__PURE__ */
|
|
7492
|
-
conversations.length > 0 && /* @__PURE__ */
|
|
7493
|
-
|
|
7679
|
+
/* @__PURE__ */ jsx14(NotesIcon, { fontSize: "small" }),
|
|
7680
|
+
conversations.length > 0 && /* @__PURE__ */ jsx14(
|
|
7681
|
+
Box11,
|
|
7494
7682
|
{
|
|
7495
7683
|
sx: {
|
|
7496
7684
|
position: "absolute",
|
|
@@ -7515,7 +7703,7 @@ var ChatAppBar = ({
|
|
|
7515
7703
|
]
|
|
7516
7704
|
}
|
|
7517
7705
|
) }),
|
|
7518
|
-
isMobile && canShowNewConversationButton && /* @__PURE__ */
|
|
7706
|
+
isMobile && canShowNewConversationButton && /* @__PURE__ */ jsx14(Tooltip4, { title: "Start New Conversation", arrow: true, children: /* @__PURE__ */ jsx14(
|
|
7519
7707
|
IconButton9,
|
|
7520
7708
|
{
|
|
7521
7709
|
onClick: () => {
|
|
@@ -7532,10 +7720,10 @@ var ChatAppBar = ({
|
|
|
7532
7720
|
}
|
|
7533
7721
|
},
|
|
7534
7722
|
"aria-label": "Create new conversation",
|
|
7535
|
-
children: /* @__PURE__ */
|
|
7723
|
+
children: /* @__PURE__ */ jsx14(AddIcon, { fontSize: "small" })
|
|
7536
7724
|
}
|
|
7537
7725
|
) }),
|
|
7538
|
-
/* @__PURE__ */
|
|
7726
|
+
/* @__PURE__ */ jsx14(Tooltip4, { title: `Current AI: ${selectedModel.replace("Bandit-", "")}`, arrow: true, children: /* @__PURE__ */ jsx14(
|
|
7539
7727
|
IconButton9,
|
|
7540
7728
|
{
|
|
7541
7729
|
onClick: (e) => setModelAnchorEl(e.currentTarget),
|
|
@@ -7550,7 +7738,7 @@ var ChatAppBar = ({
|
|
|
7550
7738
|
}
|
|
7551
7739
|
},
|
|
7552
7740
|
"aria-label": `Change AI personality. Currently using ${selectedModel}`,
|
|
7553
|
-
children: /* @__PURE__ */
|
|
7741
|
+
children: /* @__PURE__ */ jsx14(
|
|
7554
7742
|
Avatar8,
|
|
7555
7743
|
{
|
|
7556
7744
|
src: currentAvatar,
|
|
@@ -7567,16 +7755,16 @@ var ChatAppBar = ({
|
|
|
7567
7755
|
)
|
|
7568
7756
|
}
|
|
7569
7757
|
) }),
|
|
7570
|
-
/* @__PURE__ */
|
|
7758
|
+
/* @__PURE__ */ jsx14(Tooltip4, { title: `Engine \xB7 ${engineDisplay}`, arrow: true, children: /* @__PURE__ */ jsx14(
|
|
7571
7759
|
IconButton9,
|
|
7572
7760
|
{
|
|
7573
7761
|
onClick: (e) => setEngineAnchorEl(e.currentTarget),
|
|
7574
7762
|
sx: pillButtonStyles,
|
|
7575
7763
|
"aria-label": `Change base model (engine). Currently ${engineDisplay}`,
|
|
7576
|
-
children: /* @__PURE__ */
|
|
7764
|
+
children: /* @__PURE__ */ jsx14(AutoAwesomeIcon, { fontSize: "small" })
|
|
7577
7765
|
}
|
|
7578
7766
|
) }),
|
|
7579
|
-
/* @__PURE__ */
|
|
7767
|
+
/* @__PURE__ */ jsxs11(
|
|
7580
7768
|
Menu5,
|
|
7581
7769
|
{
|
|
7582
7770
|
anchorEl: engineAnchorEl,
|
|
@@ -7585,8 +7773,8 @@ var ChatAppBar = ({
|
|
|
7585
7773
|
transformOrigin: { horizontal: "right", vertical: "top" },
|
|
7586
7774
|
anchorOrigin: { horizontal: "right", vertical: "bottom" },
|
|
7587
7775
|
children: [
|
|
7588
|
-
/* @__PURE__ */
|
|
7589
|
-
engines.length === 0 && /* @__PURE__ */
|
|
7776
|
+
/* @__PURE__ */ jsx14(Typography9, { variant: "overline", sx: { px: 2, color: theme.palette.text.secondary }, children: "Engine \xB7 base model" }),
|
|
7777
|
+
engines.length === 0 && /* @__PURE__ */ jsx14(MenuItem5, { disabled: true, children: /* @__PURE__ */ jsx14(Typography9, { variant: "body2", children: "No engines available" }) }),
|
|
7590
7778
|
engines.map((engine) => {
|
|
7591
7779
|
const badges = [
|
|
7592
7780
|
engine.vision && "vision",
|
|
@@ -7594,7 +7782,7 @@ var ChatAppBar = ({
|
|
|
7594
7782
|
engine.thinking && "thinking",
|
|
7595
7783
|
engine.cloud && "cloud"
|
|
7596
7784
|
].filter(Boolean);
|
|
7597
|
-
return /* @__PURE__ */
|
|
7785
|
+
return /* @__PURE__ */ jsxs11(
|
|
7598
7786
|
MenuItem5,
|
|
7599
7787
|
{
|
|
7600
7788
|
selected: engine.id === resolvedEngineId,
|
|
@@ -7614,13 +7802,13 @@ var ChatAppBar = ({
|
|
|
7614
7802
|
whiteSpace: "normal"
|
|
7615
7803
|
},
|
|
7616
7804
|
children: [
|
|
7617
|
-
/* @__PURE__ */
|
|
7618
|
-
/* @__PURE__ */
|
|
7619
|
-
engine.id === resolvedEngineId && /* @__PURE__ */
|
|
7805
|
+
/* @__PURE__ */ jsxs11(Box11, { sx: { display: "flex", alignItems: "center", gap: 1, width: "100%" }, children: [
|
|
7806
|
+
/* @__PURE__ */ jsx14(Typography9, { variant: "body2", sx: { fontWeight: 600, flex: 1 }, children: cleanEngineName(engine.displayName) }),
|
|
7807
|
+
engine.id === resolvedEngineId && /* @__PURE__ */ jsx14(Box11, { sx: { width: 8, height: 8, borderRadius: "50%", bgcolor: theme.palette.primary.main } })
|
|
7620
7808
|
] }),
|
|
7621
|
-
/* @__PURE__ */
|
|
7622
|
-
badges.length > 0 && /* @__PURE__ */
|
|
7623
|
-
|
|
7809
|
+
/* @__PURE__ */ jsx14(Typography9, { variant: "caption", sx: { color: theme.palette.text.secondary }, children: engine.available ? engine.description : engine.unavailableReason || "Unavailable" }),
|
|
7810
|
+
badges.length > 0 && /* @__PURE__ */ jsx14(Box11, { sx: { display: "flex", gap: 0.5, flexWrap: "wrap", mt: 0.25 }, children: badges.map((b) => /* @__PURE__ */ jsx14(
|
|
7811
|
+
Box11,
|
|
7624
7812
|
{
|
|
7625
7813
|
sx: {
|
|
7626
7814
|
fontSize: "0.65rem",
|
|
@@ -7642,7 +7830,7 @@ var ChatAppBar = ({
|
|
|
7642
7830
|
]
|
|
7643
7831
|
}
|
|
7644
7832
|
),
|
|
7645
|
-
/* @__PURE__ */
|
|
7833
|
+
/* @__PURE__ */ jsx14(
|
|
7646
7834
|
Menu5,
|
|
7647
7835
|
{
|
|
7648
7836
|
anchorEl: modelAnchorEl,
|
|
@@ -7678,7 +7866,7 @@ var ChatAppBar = ({
|
|
|
7678
7866
|
}
|
|
7679
7867
|
}
|
|
7680
7868
|
},
|
|
7681
|
-
children: availableModels.map((model) => /* @__PURE__ */
|
|
7869
|
+
children: availableModels.map((model) => /* @__PURE__ */ jsxs11(
|
|
7682
7870
|
MenuItem5,
|
|
7683
7871
|
{
|
|
7684
7872
|
selected: model.name === selectedModel,
|
|
@@ -7725,7 +7913,7 @@ var ChatAppBar = ({
|
|
|
7725
7913
|
px: 2
|
|
7726
7914
|
},
|
|
7727
7915
|
children: [
|
|
7728
|
-
/* @__PURE__ */
|
|
7916
|
+
/* @__PURE__ */ jsx14(
|
|
7729
7917
|
Avatar8,
|
|
7730
7918
|
{
|
|
7731
7919
|
src: model.avatarBase64 || modelAvatars[model.name] || banditHead,
|
|
@@ -7738,12 +7926,12 @@ var ChatAppBar = ({
|
|
|
7738
7926
|
}
|
|
7739
7927
|
}
|
|
7740
7928
|
),
|
|
7741
|
-
/* @__PURE__ */
|
|
7742
|
-
/* @__PURE__ */
|
|
7743
|
-
/* @__PURE__ */
|
|
7929
|
+
/* @__PURE__ */ jsxs11(Box11, { sx: { flex: 1 }, children: [
|
|
7930
|
+
/* @__PURE__ */ jsx14(Typography9, { variant: "body2", sx: { fontWeight: 500 }, children: model.name.replace("Bandit-", "") }),
|
|
7931
|
+
/* @__PURE__ */ jsx14(Typography9, { variant: "caption", sx: { color: theme.palette.text.secondary, display: "block" }, children: model.name === selectedModel ? "Currently active" : "Switch to this AI" })
|
|
7744
7932
|
] }),
|
|
7745
|
-
model.name === selectedModel && /* @__PURE__ */
|
|
7746
|
-
|
|
7933
|
+
model.name === selectedModel && /* @__PURE__ */ jsx14(
|
|
7934
|
+
Box11,
|
|
7747
7935
|
{
|
|
7748
7936
|
sx: {
|
|
7749
7937
|
width: 8,
|
|
@@ -7759,8 +7947,8 @@ var ChatAppBar = ({
|
|
|
7759
7947
|
))
|
|
7760
7948
|
}
|
|
7761
7949
|
),
|
|
7762
|
-
isTTSAvailable && /* @__PURE__ */
|
|
7763
|
-
/* @__PURE__ */
|
|
7950
|
+
isTTSAvailable && /* @__PURE__ */ jsxs11(Fragment8, { children: [
|
|
7951
|
+
/* @__PURE__ */ jsx14(Tooltip4, { title: `Voice: ${selectedVoice ? toTitleCase(selectedVoice.split("-")[1]) : "Default"}`, arrow: true, children: /* @__PURE__ */ jsx14(
|
|
7764
7952
|
IconButton9,
|
|
7765
7953
|
{
|
|
7766
7954
|
onClick: (e) => setVoiceAnchorEl(e.currentTarget),
|
|
@@ -7774,10 +7962,10 @@ var ChatAppBar = ({
|
|
|
7774
7962
|
}
|
|
7775
7963
|
},
|
|
7776
7964
|
"aria-label": `Change voice. Currently using ${selectedVoice ? toTitleCase(selectedVoice.split("-")[1]) : "default"}`,
|
|
7777
|
-
children: /* @__PURE__ */
|
|
7965
|
+
children: /* @__PURE__ */ jsx14(RecordVoiceOverIcon, { fontSize: "small" })
|
|
7778
7966
|
}
|
|
7779
7967
|
) }),
|
|
7780
|
-
/* @__PURE__ */
|
|
7968
|
+
/* @__PURE__ */ jsx14(
|
|
7781
7969
|
Menu5,
|
|
7782
7970
|
{
|
|
7783
7971
|
anchorEl: voiceAnchorEl,
|
|
@@ -7814,7 +8002,7 @@ var ChatAppBar = ({
|
|
|
7814
8002
|
}
|
|
7815
8003
|
}
|
|
7816
8004
|
},
|
|
7817
|
-
children: availableVoices.length > 0 ? availableVoices.map((voice) => /* @__PURE__ */
|
|
8005
|
+
children: availableVoices.length > 0 ? availableVoices.map((voice) => /* @__PURE__ */ jsx14(
|
|
7818
8006
|
MenuItem5,
|
|
7819
8007
|
{
|
|
7820
8008
|
selected: voice === selectedVoice,
|
|
@@ -7822,14 +8010,14 @@ var ChatAppBar = ({
|
|
|
7822
8010
|
handleVoiceChange(voice);
|
|
7823
8011
|
setVoiceAnchorEl(null);
|
|
7824
8012
|
},
|
|
7825
|
-
children: /* @__PURE__ */
|
|
7826
|
-
/* @__PURE__ */
|
|
7827
|
-
/* @__PURE__ */
|
|
7828
|
-
/* @__PURE__ */
|
|
7829
|
-
/* @__PURE__ */
|
|
8013
|
+
children: /* @__PURE__ */ jsxs11(Box11, { sx: { display: "flex", alignItems: "center", gap: 1, width: "100%" }, children: [
|
|
8014
|
+
/* @__PURE__ */ jsx14(RecordVoiceOverIcon, { fontSize: "small", sx: { color: theme.palette.text.secondary } }),
|
|
8015
|
+
/* @__PURE__ */ jsxs11(Box11, { sx: { flex: 1 }, children: [
|
|
8016
|
+
/* @__PURE__ */ jsx14(Typography9, { variant: "body2", children: toTitleCase(voice.split("-")[1]) }),
|
|
8017
|
+
/* @__PURE__ */ jsx14(Typography9, { variant: "caption", sx: { color: theme.palette.text.secondary }, children: voice === selectedVoice ? "Currently active" : "Switch to this voice" })
|
|
7830
8018
|
] }),
|
|
7831
|
-
voice === selectedVoice && /* @__PURE__ */
|
|
7832
|
-
|
|
8019
|
+
voice === selectedVoice && /* @__PURE__ */ jsx14(
|
|
8020
|
+
Box11,
|
|
7833
8021
|
{
|
|
7834
8022
|
sx: {
|
|
7835
8023
|
width: 8,
|
|
@@ -7842,7 +8030,7 @@ var ChatAppBar = ({
|
|
|
7842
8030
|
] })
|
|
7843
8031
|
},
|
|
7844
8032
|
voice
|
|
7845
|
-
)) : /* @__PURE__ */
|
|
8033
|
+
)) : /* @__PURE__ */ jsx14(MenuItem5, { disabled: true, children: /* @__PURE__ */ jsx14(Typography9, { variant: "body2", color: "text.secondary", children: "No voices available" }) })
|
|
7846
8034
|
}
|
|
7847
8035
|
)
|
|
7848
8036
|
] })
|
|
@@ -7852,17 +8040,17 @@ var ChatAppBar = ({
|
|
|
7852
8040
|
]
|
|
7853
8041
|
}
|
|
7854
8042
|
),
|
|
7855
|
-
/* @__PURE__ */
|
|
7856
|
-
/* @__PURE__ */
|
|
7857
|
-
/* @__PURE__ */
|
|
8043
|
+
/* @__PURE__ */ jsx14(conversation_drawer_default, { open: drawerOpen, onClose: () => setDrawerOpen(false) }),
|
|
8044
|
+
/* @__PURE__ */ jsx14(enhanced_mobile_conversations_modal_default, { open: modalOpen, onClose: () => setModalOpen(false) }),
|
|
8045
|
+
/* @__PURE__ */ jsxs11(
|
|
7858
8046
|
Dialog5,
|
|
7859
8047
|
{
|
|
7860
8048
|
open: confirmModelChangeOpen,
|
|
7861
8049
|
onClose: () => setConfirmModelChangeOpen(false),
|
|
7862
8050
|
children: [
|
|
7863
|
-
/* @__PURE__ */
|
|
7864
|
-
/* @__PURE__ */
|
|
7865
|
-
/* @__PURE__ */
|
|
8051
|
+
/* @__PURE__ */ jsx14(DialogTitle5, { children: "Change personality and start new conversation?" }),
|
|
8052
|
+
/* @__PURE__ */ jsx14(DialogContent5, { children: /* @__PURE__ */ jsxs11(Box11, { display: "flex", alignItems: "center", gap: 2, mt: 1, justifyContent: "center", children: [
|
|
8053
|
+
/* @__PURE__ */ jsx14(
|
|
7866
8054
|
Avatar8,
|
|
7867
8055
|
{
|
|
7868
8056
|
src: pendingModelAvatar,
|
|
@@ -7870,16 +8058,16 @@ var ChatAppBar = ({
|
|
|
7870
8058
|
sx: { width: 40, height: 40, filter: "brightness(1.7)" }
|
|
7871
8059
|
}
|
|
7872
8060
|
),
|
|
7873
|
-
/* @__PURE__ */
|
|
8061
|
+
/* @__PURE__ */ jsxs11(Typography9, { variant: "body2", children: [
|
|
7874
8062
|
"Your current conversation will be saved, and a new one will begin with ",
|
|
7875
|
-
/* @__PURE__ */
|
|
8063
|
+
/* @__PURE__ */ jsx14("strong", { children: pendingModel }),
|
|
7876
8064
|
"."
|
|
7877
8065
|
] })
|
|
7878
8066
|
] }) }),
|
|
7879
|
-
/* @__PURE__ */
|
|
7880
|
-
/* @__PURE__ */
|
|
7881
|
-
/* @__PURE__ */
|
|
7882
|
-
|
|
8067
|
+
/* @__PURE__ */ jsxs11(DialogActions5, { children: [
|
|
8068
|
+
/* @__PURE__ */ jsx14(Button7, { onClick: () => setConfirmModelChangeOpen(false), children: "Cancel" }),
|
|
8069
|
+
/* @__PURE__ */ jsx14(
|
|
8070
|
+
Button7,
|
|
7883
8071
|
{
|
|
7884
8072
|
onClick: () => {
|
|
7885
8073
|
if (pendingModel) {
|
|
@@ -7981,19 +8169,19 @@ Respond with just the title and nothing else.
|
|
|
7981
8169
|
};
|
|
7982
8170
|
|
|
7983
8171
|
// src/chat/query-suggestion-picker.tsx
|
|
7984
|
-
import { useEffect as
|
|
7985
|
-
import { Box as
|
|
7986
|
-
import { useTheme as
|
|
8172
|
+
import { useEffect as useEffect13, useRef as useRef11, useState as useState14 } from "react";
|
|
8173
|
+
import { Box as Box12, useMediaQuery as useMediaQuery6 } from "@mui/material";
|
|
8174
|
+
import { useTheme as useTheme13, alpha as alpha8 } from "@mui/material/styles";
|
|
7987
8175
|
import ReactMarkdown from "react-markdown";
|
|
7988
8176
|
import remarkGfm from "remark-gfm";
|
|
7989
8177
|
import rehypeRaw from "rehype-raw";
|
|
7990
|
-
import { Fragment as Fragment9, jsx as
|
|
8178
|
+
import { Fragment as Fragment9, jsx as jsx15 } from "react/jsx-runtime";
|
|
7991
8179
|
var markdownComponents = {
|
|
7992
|
-
p: ({ node, ...props }) => /* @__PURE__ */
|
|
7993
|
-
mark: ({ node, children, ...props }) => /* @__PURE__ */
|
|
8180
|
+
p: ({ node, ...props }) => /* @__PURE__ */ jsx15("span", { ...props }),
|
|
8181
|
+
mark: ({ node, children, ...props }) => /* @__PURE__ */ jsx15("mark", { ...props, children }),
|
|
7994
8182
|
code: ({ node, children, ...props }) => {
|
|
7995
8183
|
const { inline, ...rest } = props;
|
|
7996
|
-
return inline ? /* @__PURE__ */
|
|
8184
|
+
return inline ? /* @__PURE__ */ jsx15("code", { ...rest, children }) : /* @__PURE__ */ jsx15("code", { ...rest, children });
|
|
7997
8185
|
}
|
|
7998
8186
|
};
|
|
7999
8187
|
var QuerySuggestionPicker = ({
|
|
@@ -8001,15 +8189,15 @@ var QuerySuggestionPicker = ({
|
|
|
8001
8189
|
inputHeight
|
|
8002
8190
|
}) => {
|
|
8003
8191
|
const hasGenerated = useRef11(false);
|
|
8004
|
-
const [hasSentPrompt, setHasSentPrompt] =
|
|
8005
|
-
const [examplePrompts, setExamplePrompts] =
|
|
8006
|
-
const [visiblePrompts, setVisiblePrompts] =
|
|
8192
|
+
const [hasSentPrompt, setHasSentPrompt] = useState14(false);
|
|
8193
|
+
const [examplePrompts, setExamplePrompts] = useState14([]);
|
|
8194
|
+
const [visiblePrompts, setVisiblePrompts] = useState14([]);
|
|
8007
8195
|
const scrollRef = useRef11(null);
|
|
8008
|
-
const theme =
|
|
8196
|
+
const theme = useTheme13();
|
|
8009
8197
|
const isMobile = useMediaQuery6((theme2) => theme2.breakpoints.down("sm"));
|
|
8010
8198
|
const { background, text, border, hoverBackground, hoverBorder } = theme.palette.chat.suggestion;
|
|
8011
8199
|
const { getCurrentModel, isLoading } = useModelStore();
|
|
8012
|
-
|
|
8200
|
+
useEffect13(() => {
|
|
8013
8201
|
if (hasGenerated.current || isLoading) return;
|
|
8014
8202
|
hasGenerated.current = true;
|
|
8015
8203
|
const currentModel = getCurrentModel();
|
|
@@ -8042,12 +8230,12 @@ var QuerySuggestionPicker = ({
|
|
|
8042
8230
|
hasGenerated.current = false;
|
|
8043
8231
|
});
|
|
8044
8232
|
}, [getCurrentModel, isLoading]);
|
|
8045
|
-
|
|
8233
|
+
useEffect13(() => {
|
|
8046
8234
|
if (!isLoading) {
|
|
8047
8235
|
hasGenerated.current = false;
|
|
8048
8236
|
}
|
|
8049
8237
|
}, [isLoading]);
|
|
8050
|
-
|
|
8238
|
+
useEffect13(() => {
|
|
8051
8239
|
if (hasSentPrompt || examplePrompts.length === 0) return;
|
|
8052
8240
|
const interval = setInterval(() => {
|
|
8053
8241
|
setExamplePrompts((prev) => {
|
|
@@ -8066,8 +8254,8 @@ var QuerySuggestionPicker = ({
|
|
|
8066
8254
|
return () => clearInterval(interval);
|
|
8067
8255
|
}, [hasSentPrompt, examplePrompts.length]);
|
|
8068
8256
|
const displayPrompts = isMobile ? visiblePrompts.slice(0, Math.min(visiblePrompts.length, 6)) : visiblePrompts;
|
|
8069
|
-
return displayPrompts.length > 0 && /* @__PURE__ */
|
|
8070
|
-
|
|
8257
|
+
return displayPrompts.length > 0 && /* @__PURE__ */ jsx15(Fragment9, { children: /* @__PURE__ */ jsx15(
|
|
8258
|
+
Box12,
|
|
8071
8259
|
{
|
|
8072
8260
|
ref: scrollRef,
|
|
8073
8261
|
sx: {
|
|
@@ -8083,8 +8271,8 @@ var QuerySuggestionPicker = ({
|
|
|
8083
8271
|
pb: isMobile ? 0.4 : 0,
|
|
8084
8272
|
"&::-webkit-scrollbar": { display: "none" }
|
|
8085
8273
|
},
|
|
8086
|
-
children: displayPrompts.map((prompt, i) => /* @__PURE__ */
|
|
8087
|
-
|
|
8274
|
+
children: displayPrompts.map((prompt, i) => /* @__PURE__ */ jsx15(
|
|
8275
|
+
Box12,
|
|
8088
8276
|
{
|
|
8089
8277
|
sx: {
|
|
8090
8278
|
px: isMobile ? 1.4 : 2,
|
|
@@ -8100,7 +8288,7 @@ var QuerySuggestionPicker = ({
|
|
|
8100
8288
|
color: text,
|
|
8101
8289
|
userSelect: "none",
|
|
8102
8290
|
cursor: "pointer",
|
|
8103
|
-
border: `1px solid ${border ||
|
|
8291
|
+
border: `1px solid ${border || alpha8(text, 0.12)}`,
|
|
8104
8292
|
boxShadow: theme.palette.mode === "dark" ? "0 4px 18px rgba(0,0,0,0.25)" : "0 6px 20px rgba(15,23,42,0.12)",
|
|
8105
8293
|
scrollSnapAlign: isMobile ? "start" : "none",
|
|
8106
8294
|
transition: "transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease",
|
|
@@ -8118,8 +8306,8 @@ var QuerySuggestionPicker = ({
|
|
|
8118
8306
|
onSend(prompt, []);
|
|
8119
8307
|
setHasSentPrompt(true);
|
|
8120
8308
|
},
|
|
8121
|
-
children: /* @__PURE__ */
|
|
8122
|
-
|
|
8309
|
+
children: /* @__PURE__ */ jsx15(
|
|
8310
|
+
Box12,
|
|
8123
8311
|
{
|
|
8124
8312
|
sx: {
|
|
8125
8313
|
flex: 1,
|
|
@@ -8131,19 +8319,19 @@ var QuerySuggestionPicker = ({
|
|
|
8131
8319
|
borderRadius: 4,
|
|
8132
8320
|
fontSize: "0.92em",
|
|
8133
8321
|
fontFamily: "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace",
|
|
8134
|
-
backgroundColor: theme.palette.mode === "dark" ?
|
|
8135
|
-
border: `1px solid ${
|
|
8322
|
+
backgroundColor: theme.palette.mode === "dark" ? alpha8(theme.palette.common.white, 0.06) : alpha8(theme.palette.text.primary, 0.06),
|
|
8323
|
+
border: `1px solid ${alpha8(theme.palette.text.primary, 0.15)}`,
|
|
8136
8324
|
padding: "0.15em 0.35em"
|
|
8137
8325
|
},
|
|
8138
8326
|
"& mark": {
|
|
8139
8327
|
display: "inline-block",
|
|
8140
|
-
backgroundColor: theme.palette.mode === "dark" ?
|
|
8328
|
+
backgroundColor: theme.palette.mode === "dark" ? alpha8(theme.palette.common.white, 0.06) : alpha8(theme.palette.text.primary, 0.12),
|
|
8141
8329
|
color: theme.palette.mode === "dark" ? theme.palette.common.white : theme.palette.text.primary,
|
|
8142
8330
|
borderRadius: 4,
|
|
8143
8331
|
padding: "0.1em 0.25em"
|
|
8144
8332
|
}
|
|
8145
8333
|
},
|
|
8146
|
-
children: /* @__PURE__ */
|
|
8334
|
+
children: /* @__PURE__ */ jsx15(
|
|
8147
8335
|
ReactMarkdown,
|
|
8148
8336
|
{
|
|
8149
8337
|
remarkPlugins: [remarkGfm],
|
|
@@ -8162,18 +8350,18 @@ var QuerySuggestionPicker = ({
|
|
|
8162
8350
|
};
|
|
8163
8351
|
|
|
8164
8352
|
// ../../src/pages/under-review.tsx
|
|
8165
|
-
import { Box as
|
|
8353
|
+
import { Box as Box13, Typography as Typography10, useTheme as useTheme14 } from "@mui/material";
|
|
8166
8354
|
import { useNavigate as useNavigate2 } from "react-router-dom";
|
|
8167
|
-
import { jsx as
|
|
8355
|
+
import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
8168
8356
|
var UnderReview = () => {
|
|
8169
|
-
const theme =
|
|
8357
|
+
const theme = useTheme14();
|
|
8170
8358
|
const navigate = useNavigate2();
|
|
8171
8359
|
const handleSneakyLogout = () => {
|
|
8172
8360
|
localStorage.removeItem("authToken");
|
|
8173
8361
|
navigate("/login");
|
|
8174
8362
|
};
|
|
8175
|
-
return /* @__PURE__ */
|
|
8176
|
-
|
|
8363
|
+
return /* @__PURE__ */ jsxs12(
|
|
8364
|
+
Box13,
|
|
8177
8365
|
{
|
|
8178
8366
|
sx: {
|
|
8179
8367
|
minHeight: "100vh",
|
|
@@ -8188,8 +8376,8 @@ var UnderReview = () => {
|
|
|
8188
8376
|
position: "relative"
|
|
8189
8377
|
},
|
|
8190
8378
|
children: [
|
|
8191
|
-
/* @__PURE__ */
|
|
8192
|
-
|
|
8379
|
+
/* @__PURE__ */ jsx16(
|
|
8380
|
+
Box13,
|
|
8193
8381
|
{
|
|
8194
8382
|
onClick: handleSneakyLogout,
|
|
8195
8383
|
sx: {
|
|
@@ -8214,13 +8402,13 @@ var UnderReview = () => {
|
|
|
8214
8402
|
title: "Reset session"
|
|
8215
8403
|
}
|
|
8216
8404
|
),
|
|
8217
|
-
/* @__PURE__ */
|
|
8218
|
-
/* @__PURE__ */
|
|
8405
|
+
/* @__PURE__ */ jsx16(Typography10, { variant: "h4", sx: { mb: 2, fontWeight: 700, color: theme.palette.error.main }, children: "Under Review" }),
|
|
8406
|
+
/* @__PURE__ */ jsxs12(Typography10, { variant: "body1", sx: { mb: 2, color: theme.palette.text.secondary }, children: [
|
|
8219
8407
|
"Your request to use our services is currently being reviewed.",
|
|
8220
|
-
/* @__PURE__ */
|
|
8408
|
+
/* @__PURE__ */ jsx16("br", {}),
|
|
8221
8409
|
"For more info, please contact ",
|
|
8222
8410
|
" ",
|
|
8223
|
-
/* @__PURE__ */
|
|
8411
|
+
/* @__PURE__ */ jsx16("a", { href: "mailto:team@banditai.ai", style: { color: theme.palette.primary.main, fontWeight: 600 }, children: "team@banditai.ai" })
|
|
8224
8412
|
] })
|
|
8225
8413
|
]
|
|
8226
8414
|
}
|
|
@@ -8229,13 +8417,13 @@ var UnderReview = () => {
|
|
|
8229
8417
|
var under_review_default = UnderReview;
|
|
8230
8418
|
|
|
8231
8419
|
// src/components/ConnectionStatus.tsx
|
|
8232
|
-
import { Box as
|
|
8233
|
-
import { jsx as
|
|
8420
|
+
import { Box as Box14, Chip as Chip5, useTheme as useTheme15 } from "@mui/material";
|
|
8421
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
8234
8422
|
var ConnectionStatus = ({
|
|
8235
8423
|
showWhenGood = false,
|
|
8236
8424
|
position = "top"
|
|
8237
8425
|
}) => {
|
|
8238
|
-
const theme =
|
|
8426
|
+
const theme = useTheme15();
|
|
8239
8427
|
const { isOnline, connectionQuality, isSlowConnection } = useNetworkStatus();
|
|
8240
8428
|
if (connectionQuality === "fast" && !showWhenGood) {
|
|
8241
8429
|
return null;
|
|
@@ -8244,28 +8432,28 @@ var ConnectionStatus = ({
|
|
|
8244
8432
|
switch (connectionQuality) {
|
|
8245
8433
|
case "offline":
|
|
8246
8434
|
return {
|
|
8247
|
-
icon: /* @__PURE__ */
|
|
8435
|
+
icon: /* @__PURE__ */ jsx17(WifiOffIcon, { sx: { fontSize: 16 } }),
|
|
8248
8436
|
label: "Offline",
|
|
8249
8437
|
color: "error",
|
|
8250
8438
|
severity: "high"
|
|
8251
8439
|
};
|
|
8252
8440
|
case "slow":
|
|
8253
8441
|
return {
|
|
8254
|
-
icon: /* @__PURE__ */
|
|
8442
|
+
icon: /* @__PURE__ */ jsx17(SignalWifi2BarIcon, { sx: { fontSize: 16 } }),
|
|
8255
8443
|
label: "Slow connection",
|
|
8256
8444
|
color: "warning",
|
|
8257
8445
|
severity: "medium"
|
|
8258
8446
|
};
|
|
8259
8447
|
case "fast":
|
|
8260
8448
|
return {
|
|
8261
|
-
icon: /* @__PURE__ */
|
|
8449
|
+
icon: /* @__PURE__ */ jsx17(WifiIcon, { sx: { fontSize: 16 } }),
|
|
8262
8450
|
label: "Connected",
|
|
8263
8451
|
color: "success",
|
|
8264
8452
|
severity: "low"
|
|
8265
8453
|
};
|
|
8266
8454
|
default:
|
|
8267
8455
|
return {
|
|
8268
|
-
icon: /* @__PURE__ */
|
|
8456
|
+
icon: /* @__PURE__ */ jsx17(WifiIcon, { sx: { fontSize: 16 } }),
|
|
8269
8457
|
label: "Unknown",
|
|
8270
8458
|
color: "default",
|
|
8271
8459
|
severity: "low"
|
|
@@ -8273,8 +8461,8 @@ var ConnectionStatus = ({
|
|
|
8273
8461
|
}
|
|
8274
8462
|
};
|
|
8275
8463
|
const config = getStatusConfig();
|
|
8276
|
-
return /* @__PURE__ */
|
|
8277
|
-
|
|
8464
|
+
return /* @__PURE__ */ jsx17(
|
|
8465
|
+
Box14,
|
|
8278
8466
|
{
|
|
8279
8467
|
sx: {
|
|
8280
8468
|
position: "fixed",
|
|
@@ -8289,8 +8477,8 @@ var ConnectionStatus = ({
|
|
|
8289
8477
|
"100%": { opacity: 1 }
|
|
8290
8478
|
}
|
|
8291
8479
|
},
|
|
8292
|
-
children: /* @__PURE__ */
|
|
8293
|
-
|
|
8480
|
+
children: /* @__PURE__ */ jsx17(
|
|
8481
|
+
Chip5,
|
|
8294
8482
|
{
|
|
8295
8483
|
icon: config.icon,
|
|
8296
8484
|
label: config.label,
|
|
@@ -8313,7 +8501,7 @@ var ConnectionStatus = ({
|
|
|
8313
8501
|
};
|
|
8314
8502
|
|
|
8315
8503
|
// src/hooks/useVoiceMode.ts
|
|
8316
|
-
import { useEffect as
|
|
8504
|
+
import { useEffect as useEffect14, useRef as useRef12 } from "react";
|
|
8317
8505
|
var RMS_BASELINE = 128;
|
|
8318
8506
|
var RMS_NORMALIZER = 128;
|
|
8319
8507
|
var computeRms = (data) => {
|
|
@@ -8344,10 +8532,10 @@ var useVoiceMode = (config) => {
|
|
|
8344
8532
|
const resetTransientState = useVoiceModeStore((state) => state.resetTransientState);
|
|
8345
8533
|
const setLastTranscript = useVoiceModeStore((state) => state.setLastTranscript);
|
|
8346
8534
|
const configRef = useRef12(config);
|
|
8347
|
-
|
|
8535
|
+
useEffect14(() => {
|
|
8348
8536
|
configRef.current = config;
|
|
8349
8537
|
}, [config]);
|
|
8350
|
-
|
|
8538
|
+
useEffect14(() => {
|
|
8351
8539
|
if (!enabled) {
|
|
8352
8540
|
return () => void 0;
|
|
8353
8541
|
}
|
|
@@ -8602,7 +8790,7 @@ var useVoiceMode = (config) => {
|
|
|
8602
8790
|
};
|
|
8603
8791
|
|
|
8604
8792
|
// src/chat/chat.tsx
|
|
8605
|
-
import { jsx as
|
|
8793
|
+
import { jsx as jsx18, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
8606
8794
|
var ChatContent = () => {
|
|
8607
8795
|
const packageSettings = usePackageSettingsStore((state) => state.settings);
|
|
8608
8796
|
const featureFlag = useFeatureFlag();
|
|
@@ -8610,8 +8798,8 @@ var ChatContent = () => {
|
|
|
8610
8798
|
const ossMode = isOSSMode() || !packageSettings?.featureFlags?.subscriptionType;
|
|
8611
8799
|
const playgroundBypassAccess = packageSettings?.playgroundBypassAuth || typeof window !== "undefined" && window.location.pathname.includes("/playground");
|
|
8612
8800
|
const notificationService = useNotificationService();
|
|
8613
|
-
const [selectedTheme, setSelectedTheme] =
|
|
8614
|
-
const [themeLoading, setThemeLoading] =
|
|
8801
|
+
const [selectedTheme, setSelectedTheme] = useState15(null);
|
|
8802
|
+
const [themeLoading, setThemeLoading] = useState15(true);
|
|
8615
8803
|
const token = authenticationService.getToken();
|
|
8616
8804
|
const claims = token ? authenticationService.parseJwtClaims(token) : null;
|
|
8617
8805
|
const baseTheme = themeMap_default[selectedTheme ?? "bandit-dark"] || banditDarkTheme;
|
|
@@ -8664,7 +8852,7 @@ var ChatContent = () => {
|
|
|
8664
8852
|
const isVoiceModeEnabled = useVoiceModeStore((state) => state.enabled);
|
|
8665
8853
|
const previousVoiceModeEnabledRef = useRef13(isVoiceModeEnabled);
|
|
8666
8854
|
const historyRef = useRef13(history);
|
|
8667
|
-
|
|
8855
|
+
useEffect15(() => {
|
|
8668
8856
|
historyRef.current = history;
|
|
8669
8857
|
}, [history]);
|
|
8670
8858
|
const {
|
|
@@ -8672,7 +8860,7 @@ var ChatContent = () => {
|
|
|
8672
8860
|
stop: ttsStop,
|
|
8673
8861
|
isAvailable: isTTSAvailable
|
|
8674
8862
|
} = useTTS();
|
|
8675
|
-
|
|
8863
|
+
useEffect15(() => {
|
|
8676
8864
|
const timer = setTimeout(() => {
|
|
8677
8865
|
const isAuthenticated = authenticationService.isAuthenticated();
|
|
8678
8866
|
if (!initialized || availableVoices.length === 0) {
|
|
@@ -8686,7 +8874,7 @@ var ChatContent = () => {
|
|
|
8686
8874
|
}, 500);
|
|
8687
8875
|
return () => clearTimeout(timer);
|
|
8688
8876
|
}, [initialized, availableVoices.length, loadVoicesFromAPI, token]);
|
|
8689
|
-
|
|
8877
|
+
useEffect15(() => {
|
|
8690
8878
|
const isAuthenticated = authenticationService.isAuthenticated();
|
|
8691
8879
|
if (packageSettings?.gatewayApiUrl && availableVoices.length === 0 && !initialized) {
|
|
8692
8880
|
if (token && isAuthenticated) {
|
|
@@ -8699,14 +8887,14 @@ var ChatContent = () => {
|
|
|
8699
8887
|
}, [packageSettings?.gatewayApiUrl, availableVoices.length, initialized, loadVoicesFromAPI, token]);
|
|
8700
8888
|
const provider = useAIProviderStore((state) => state.provider);
|
|
8701
8889
|
const inputRef = useRef13(null);
|
|
8702
|
-
const [pastedImages, setPastedImages] =
|
|
8890
|
+
const [pastedImages, setPastedImages] = useState15([]);
|
|
8703
8891
|
const inputContainerRef = useRef13(null);
|
|
8704
|
-
const [inputHeight, setInputHeight] =
|
|
8705
|
-
const [isSubmitting, setIsSubmitting] =
|
|
8706
|
-
const [pendingMessage, setPendingMessage] =
|
|
8892
|
+
const [inputHeight, setInputHeight] = useState15(80);
|
|
8893
|
+
const [isSubmitting, setIsSubmitting] = useState15(false);
|
|
8894
|
+
const [pendingMessage, setPendingMessage] = useState15(null);
|
|
8707
8895
|
const { conversations, currentId, _hasHydrated, hydrate } = useConversationStore();
|
|
8708
|
-
const [isMobile, setIsMobile] =
|
|
8709
|
-
const [drawerOpen, setDrawerOpen] =
|
|
8896
|
+
const [isMobile, setIsMobile] = useState15(false);
|
|
8897
|
+
const [drawerOpen, setDrawerOpen] = useState15(false);
|
|
8710
8898
|
const { generateName } = useConversationNameGenerator();
|
|
8711
8899
|
const { preferences } = usePreferencesStore();
|
|
8712
8900
|
const { containerRef: chatContainerRef, targetRef: scrollTargetRef, scrollToBottom, getScrollState } = useAutoScroll({
|
|
@@ -8718,14 +8906,14 @@ var ChatContent = () => {
|
|
|
8718
8906
|
const chatContainerEl = chatContainerRef.current;
|
|
8719
8907
|
const scrollTargetEl = scrollTargetRef.current;
|
|
8720
8908
|
const { isSlowConnection, connectionQuality, trackRequestStart, trackRequestEnd } = useNetworkStatus();
|
|
8721
|
-
const [showScrollToBottom, setShowScrollToBottom] =
|
|
8722
|
-
const [streamBuffer, setStreamBuffer] =
|
|
8723
|
-
const [responseStarted, setResponseStarted] =
|
|
8724
|
-
const [isStreaming, setIsStreaming] =
|
|
8725
|
-
const [isThinking, setIsThinking] =
|
|
8909
|
+
const [showScrollToBottom, setShowScrollToBottom] = useState15(false);
|
|
8910
|
+
const [streamBuffer, setStreamBuffer] = useState15("");
|
|
8911
|
+
const [responseStarted, setResponseStarted] = useState15(false);
|
|
8912
|
+
const [isStreaming, setIsStreaming] = useState15(false);
|
|
8913
|
+
const [isThinking, setIsThinking] = useState15(false);
|
|
8726
8914
|
const initialLogoState = history.length === 0;
|
|
8727
|
-
const [logoVisible, setLogoVisible] =
|
|
8728
|
-
const [logoShouldRender, setLogoShouldRender] =
|
|
8915
|
+
const [logoVisible, setLogoVisible] = useState15(initialLogoState);
|
|
8916
|
+
const [logoShouldRender, setLogoShouldRender] = useState15(initialLogoState);
|
|
8729
8917
|
const streamingGraceUntilRef = useRef13(0);
|
|
8730
8918
|
const GRACE_MS = 450;
|
|
8731
8919
|
const GRACE_OFFSET_DESKTOP = 28;
|
|
@@ -8734,11 +8922,11 @@ var ChatContent = () => {
|
|
|
8734
8922
|
const lastSpokenResponseRef = useRef13(null);
|
|
8735
8923
|
const previousConversationIdRef = useRef13(null);
|
|
8736
8924
|
const logoFadeTimeoutRef = useRef13(null);
|
|
8737
|
-
const [branding, setBranding] =
|
|
8738
|
-
const [brandingLoading, setBrandingLoading] =
|
|
8925
|
+
const [branding, setBranding] = useState15(null);
|
|
8926
|
+
const [brandingLoading, setBrandingLoading] = useState15(true);
|
|
8739
8927
|
const isBrandingLoadInProgressRef = useRef13(false);
|
|
8740
8928
|
const logoOnly = history.length === 0 && !brandingLoading;
|
|
8741
|
-
|
|
8929
|
+
useEffect15(() => {
|
|
8742
8930
|
const isEmptyConversation = (history?.length ?? 0) === 0;
|
|
8743
8931
|
const isSending = Boolean(pendingMessage);
|
|
8744
8932
|
const shouldShowLogo = isEmptyConversation && !isSending;
|
|
@@ -8768,7 +8956,7 @@ var ChatContent = () => {
|
|
|
8768
8956
|
}, 500);
|
|
8769
8957
|
}
|
|
8770
8958
|
}, [history, pendingMessage]);
|
|
8771
|
-
|
|
8959
|
+
useEffect15(() => {
|
|
8772
8960
|
if (!brandingLoading && !themeLoading) {
|
|
8773
8961
|
return;
|
|
8774
8962
|
}
|
|
@@ -8784,18 +8972,18 @@ var ChatContent = () => {
|
|
|
8784
8972
|
}, 2500);
|
|
8785
8973
|
return () => window.clearTimeout(timeoutId);
|
|
8786
8974
|
}, [brandingLoading, themeLoading, selectedTheme]);
|
|
8787
|
-
|
|
8975
|
+
useEffect15(() => () => {
|
|
8788
8976
|
if (logoFadeTimeoutRef.current) {
|
|
8789
8977
|
window.clearTimeout(logoFadeTimeoutRef.current);
|
|
8790
8978
|
logoFadeTimeoutRef.current = null;
|
|
8791
8979
|
}
|
|
8792
8980
|
}, []);
|
|
8793
|
-
|
|
8981
|
+
useEffect15(() => {
|
|
8794
8982
|
if (isStreaming && streamBuffer.trim() === "") {
|
|
8795
8983
|
streamingGraceUntilRef.current = Date.now() + GRACE_MS;
|
|
8796
8984
|
}
|
|
8797
8985
|
}, [isStreaming, streamBuffer]);
|
|
8798
|
-
|
|
8986
|
+
useEffect15(() => {
|
|
8799
8987
|
if (!isStreaming) return;
|
|
8800
8988
|
const container = chatContainerRef.current;
|
|
8801
8989
|
if (!container) return;
|
|
@@ -8806,13 +8994,13 @@ var ChatContent = () => {
|
|
|
8806
8994
|
container.scrollTo({ top: targetTop, behavior: "smooth" });
|
|
8807
8995
|
}
|
|
8808
8996
|
}, [streamBuffer, isStreaming, isMobile, chatContainerRef]);
|
|
8809
|
-
|
|
8997
|
+
useEffect15(() => {
|
|
8810
8998
|
if (!_hasHydrated) {
|
|
8811
8999
|
debugLogger.info("Chat component triggering conversation store hydration");
|
|
8812
9000
|
hydrate();
|
|
8813
9001
|
}
|
|
8814
9002
|
}, [_hasHydrated, hydrate]);
|
|
8815
|
-
|
|
9003
|
+
useEffect15(() => {
|
|
8816
9004
|
const loadBrandingAndTheme = async () => {
|
|
8817
9005
|
if (isBrandingLoadInProgressRef.current) {
|
|
8818
9006
|
debugLogger.warn("Branding loading already in progress, skipping");
|
|
@@ -8999,19 +9187,19 @@ var ChatContent = () => {
|
|
|
8999
9187
|
window.removeEventListener("bandit-theme-changed", handleThemeChange);
|
|
9000
9188
|
};
|
|
9001
9189
|
}, []);
|
|
9002
|
-
|
|
9190
|
+
useEffect15(() => {
|
|
9003
9191
|
if (!chatContainerEl) return;
|
|
9004
9192
|
const blurInputOnScroll = () => inputRef.current?.blur();
|
|
9005
9193
|
chatContainerEl.addEventListener("scroll", blurInputOnScroll);
|
|
9006
9194
|
return () => chatContainerEl.removeEventListener("scroll", blurInputOnScroll);
|
|
9007
9195
|
}, [chatContainerEl]);
|
|
9008
|
-
|
|
9196
|
+
useEffect15(() => {
|
|
9009
9197
|
const handleResize = () => setIsMobile(window.innerWidth <= 768);
|
|
9010
9198
|
handleResize();
|
|
9011
9199
|
window.addEventListener("resize", handleResize);
|
|
9012
9200
|
return () => window.removeEventListener("resize", handleResize);
|
|
9013
9201
|
}, []);
|
|
9014
|
-
|
|
9202
|
+
useEffect15(() => {
|
|
9015
9203
|
const setViewportHeight = () => {
|
|
9016
9204
|
document.documentElement.style.setProperty(
|
|
9017
9205
|
"--vh",
|
|
@@ -9022,7 +9210,7 @@ var ChatContent = () => {
|
|
|
9022
9210
|
window.addEventListener("resize", setViewportHeight);
|
|
9023
9211
|
return () => window.removeEventListener("resize", setViewportHeight);
|
|
9024
9212
|
}, []);
|
|
9025
|
-
|
|
9213
|
+
useEffect15(() => {
|
|
9026
9214
|
if (!chatContainerEl) return;
|
|
9027
9215
|
let rafId = null;
|
|
9028
9216
|
const update = () => {
|
|
@@ -9041,7 +9229,7 @@ var ChatContent = () => {
|
|
|
9041
9229
|
chatContainerEl.removeEventListener(SCROLL_STATE_CHANGED_EVENT, update);
|
|
9042
9230
|
};
|
|
9043
9231
|
}, [chatContainerEl, getScrollState]);
|
|
9044
|
-
|
|
9232
|
+
useEffect15(() => {
|
|
9045
9233
|
if (!chatContainerEl) return;
|
|
9046
9234
|
let observer = null;
|
|
9047
9235
|
let rafId = null;
|
|
@@ -9076,7 +9264,7 @@ var ChatContent = () => {
|
|
|
9076
9264
|
if (observer) observer.disconnect();
|
|
9077
9265
|
};
|
|
9078
9266
|
}, [chatContainerEl, scrollTargetEl, scrollTargetRef, getScrollState, inputHeight, history.length]);
|
|
9079
|
-
|
|
9267
|
+
useEffect15(() => {
|
|
9080
9268
|
const isTransitioning = isStreaming || streamBuffer.trim() === "";
|
|
9081
9269
|
const delay = isTransitioning ? 400 : 100;
|
|
9082
9270
|
const timer = setTimeout(() => {
|
|
@@ -9119,7 +9307,7 @@ var ChatContent = () => {
|
|
|
9119
9307
|
return () => clearTimeout(scrollTimer);
|
|
9120
9308
|
}
|
|
9121
9309
|
}, [history, isStreaming, scrollToBottom, getScrollState, isMobile, chatContainerRef]);
|
|
9122
|
-
|
|
9310
|
+
useEffect15(() => {
|
|
9123
9311
|
const observer = new ResizeObserver(() => {
|
|
9124
9312
|
if (inputContainerRef.current)
|
|
9125
9313
|
setInputHeight(inputContainerRef.current.offsetHeight);
|
|
@@ -9130,7 +9318,7 @@ var ChatContent = () => {
|
|
|
9130
9318
|
}
|
|
9131
9319
|
return () => observer.disconnect();
|
|
9132
9320
|
}, []);
|
|
9133
|
-
|
|
9321
|
+
useEffect15(() => {
|
|
9134
9322
|
if (!hydrated || !_hasHydrated) return;
|
|
9135
9323
|
if (currentId === null) {
|
|
9136
9324
|
useAIQueryStore.setState({ history: [] });
|
|
@@ -9179,7 +9367,7 @@ var ChatContent = () => {
|
|
|
9179
9367
|
setResponse,
|
|
9180
9368
|
setComponentStatus
|
|
9181
9369
|
]);
|
|
9182
|
-
|
|
9370
|
+
useEffect15(() => {
|
|
9183
9371
|
debugLogger.info("Chat component conversation state", {
|
|
9184
9372
|
hasHydrated: _hasHydrated,
|
|
9185
9373
|
conversationCount: conversations.length,
|
|
@@ -9188,7 +9376,7 @@ var ChatContent = () => {
|
|
|
9188
9376
|
storeState: "main-chat"
|
|
9189
9377
|
});
|
|
9190
9378
|
}, [_hasHydrated, conversations, currentId]);
|
|
9191
|
-
|
|
9379
|
+
useEffect15(() => {
|
|
9192
9380
|
if (!_hasHydrated || !chatContainerEl) return;
|
|
9193
9381
|
let rafId = null;
|
|
9194
9382
|
const sync = () => {
|
|
@@ -9378,7 +9566,7 @@ var ChatContent = () => {
|
|
|
9378
9566
|
onInterrupt: handleVoiceInterrupt,
|
|
9379
9567
|
onError: (message) => notificationService?.showError?.(message)
|
|
9380
9568
|
});
|
|
9381
|
-
|
|
9569
|
+
useEffect15(() => {
|
|
9382
9570
|
const previouslyEnabled = previousVoiceModeEnabledRef.current;
|
|
9383
9571
|
previousVoiceModeEnabledRef.current = isVoiceModeEnabled;
|
|
9384
9572
|
if (!previouslyEnabled && isVoiceModeEnabled) {
|
|
@@ -9403,7 +9591,7 @@ var ChatContent = () => {
|
|
|
9403
9591
|
}
|
|
9404
9592
|
}
|
|
9405
9593
|
}, [isVoiceModeEnabled, ttsStop]);
|
|
9406
|
-
|
|
9594
|
+
useEffect15(() => {
|
|
9407
9595
|
if (!isVoiceModeEnabled || !isStreaming) {
|
|
9408
9596
|
return;
|
|
9409
9597
|
}
|
|
@@ -9423,7 +9611,7 @@ var ChatContent = () => {
|
|
|
9423
9611
|
}
|
|
9424
9612
|
lastSpokenResponseRef.current = null;
|
|
9425
9613
|
}, [isStreaming, isVoiceModeEnabled, ttsStop]);
|
|
9426
|
-
|
|
9614
|
+
useEffect15(() => {
|
|
9427
9615
|
if (!isVoiceModeEnabled) {
|
|
9428
9616
|
lastSpokenResponseRef.current = null;
|
|
9429
9617
|
return;
|
|
@@ -9503,10 +9691,10 @@ var ChatContent = () => {
|
|
|
9503
9691
|
}
|
|
9504
9692
|
};
|
|
9505
9693
|
if (!hydrated || brandingLoading || themeLoading) {
|
|
9506
|
-
return /* @__PURE__ */
|
|
9507
|
-
/* @__PURE__ */
|
|
9508
|
-
/* @__PURE__ */
|
|
9509
|
-
|
|
9694
|
+
return /* @__PURE__ */ jsxs13(ThemeProvider, { theme: banditTheme, children: [
|
|
9695
|
+
/* @__PURE__ */ jsx18(CssBaseline, {}),
|
|
9696
|
+
/* @__PURE__ */ jsxs13(
|
|
9697
|
+
Box15,
|
|
9510
9698
|
{
|
|
9511
9699
|
sx: (theme) => ({
|
|
9512
9700
|
minHeight: "100dvh",
|
|
@@ -9519,8 +9707,8 @@ var ChatContent = () => {
|
|
|
9519
9707
|
color: theme.palette.text.primary
|
|
9520
9708
|
}),
|
|
9521
9709
|
children: [
|
|
9522
|
-
/* @__PURE__ */
|
|
9523
|
-
/* @__PURE__ */
|
|
9710
|
+
/* @__PURE__ */ jsx18(CircularProgress4, { size: 32, thickness: 4 }),
|
|
9711
|
+
/* @__PURE__ */ jsx18(Typography11, { variant: "body2", color: "text.secondary", children: "Preparing your workspace..." })
|
|
9524
9712
|
]
|
|
9525
9713
|
}
|
|
9526
9714
|
)
|
|
@@ -9528,15 +9716,15 @@ var ChatContent = () => {
|
|
|
9528
9716
|
}
|
|
9529
9717
|
const userHasAccess = playgroundBypassAccess || ossMode || claims?.roles?.includes("super-user") || claims?.roles?.includes("admin");
|
|
9530
9718
|
if (!userHasAccess) {
|
|
9531
|
-
return /* @__PURE__ */
|
|
9532
|
-
/* @__PURE__ */
|
|
9533
|
-
/* @__PURE__ */
|
|
9719
|
+
return /* @__PURE__ */ jsxs13(ThemeProvider, { theme: banditTheme, children: [
|
|
9720
|
+
/* @__PURE__ */ jsx18(CssBaseline, {}),
|
|
9721
|
+
/* @__PURE__ */ jsx18(under_review_default, {})
|
|
9534
9722
|
] });
|
|
9535
9723
|
}
|
|
9536
|
-
return /* @__PURE__ */
|
|
9537
|
-
/* @__PURE__ */
|
|
9538
|
-
/* @__PURE__ */
|
|
9539
|
-
|
|
9724
|
+
return /* @__PURE__ */ jsxs13(ThemeProvider, { theme: banditTheme, children: [
|
|
9725
|
+
/* @__PURE__ */ jsx18(CssBaseline, {}),
|
|
9726
|
+
/* @__PURE__ */ jsxs13(
|
|
9727
|
+
Box15,
|
|
9540
9728
|
{
|
|
9541
9729
|
sx: (theme) => ({
|
|
9542
9730
|
display: "flex",
|
|
@@ -9554,7 +9742,7 @@ var ChatContent = () => {
|
|
|
9554
9742
|
transition: "left 0.3s ease-in-out, width 0.3s ease-in-out"
|
|
9555
9743
|
}),
|
|
9556
9744
|
children: [
|
|
9557
|
-
/* @__PURE__ */
|
|
9745
|
+
/* @__PURE__ */ jsx18(
|
|
9558
9746
|
chat_app_bar_default,
|
|
9559
9747
|
{
|
|
9560
9748
|
availableModels,
|
|
@@ -9566,8 +9754,8 @@ var ChatContent = () => {
|
|
|
9566
9754
|
setDrawerOpen
|
|
9567
9755
|
}
|
|
9568
9756
|
),
|
|
9569
|
-
/* @__PURE__ */
|
|
9570
|
-
|
|
9757
|
+
/* @__PURE__ */ jsx18(
|
|
9758
|
+
Box15,
|
|
9571
9759
|
{
|
|
9572
9760
|
ref: chatContainerRef,
|
|
9573
9761
|
sx: {
|
|
@@ -9587,8 +9775,8 @@ var ChatContent = () => {
|
|
|
9587
9775
|
msOverflowStyle: "none",
|
|
9588
9776
|
"&::-webkit-scrollbar": { display: "none" }
|
|
9589
9777
|
},
|
|
9590
|
-
children: /* @__PURE__ */
|
|
9591
|
-
|
|
9778
|
+
children: /* @__PURE__ */ jsxs13(
|
|
9779
|
+
Box15,
|
|
9592
9780
|
{
|
|
9593
9781
|
sx: {
|
|
9594
9782
|
width: "100%",
|
|
@@ -9598,9 +9786,9 @@ var ChatContent = () => {
|
|
|
9598
9786
|
pt: 2
|
|
9599
9787
|
},
|
|
9600
9788
|
children: [
|
|
9601
|
-
logoShouldRender && !brandingLoading && (branding?.logoBase64 ? /* @__PURE__ */
|
|
9602
|
-
/* @__PURE__ */
|
|
9603
|
-
|
|
9789
|
+
logoShouldRender && !brandingLoading && (branding?.logoBase64 ? /* @__PURE__ */ jsx18(custom_logo_default, { visible: logoVisible, atTop: true }) : /* @__PURE__ */ jsx18(bandit_chat_logo_default, { visible: logoVisible, atTop: true })),
|
|
9790
|
+
/* @__PURE__ */ jsx18(
|
|
9791
|
+
Box15,
|
|
9604
9792
|
{
|
|
9605
9793
|
sx: {
|
|
9606
9794
|
margin: "0 auto",
|
|
@@ -9609,7 +9797,7 @@ var ChatContent = () => {
|
|
|
9609
9797
|
flexShrink: 0,
|
|
9610
9798
|
px: isMobile ? 0 : 0
|
|
9611
9799
|
},
|
|
9612
|
-
children: /* @__PURE__ */
|
|
9800
|
+
children: /* @__PURE__ */ jsx18(
|
|
9613
9801
|
chat_messages_default,
|
|
9614
9802
|
{
|
|
9615
9803
|
isStreaming,
|
|
@@ -9633,7 +9821,7 @@ var ChatContent = () => {
|
|
|
9633
9821
|
)
|
|
9634
9822
|
}
|
|
9635
9823
|
),
|
|
9636
|
-
showScrollToBottom && /* @__PURE__ */
|
|
9824
|
+
showScrollToBottom && /* @__PURE__ */ jsx18(
|
|
9637
9825
|
chat_scroll_to_bottom_button_default,
|
|
9638
9826
|
{
|
|
9639
9827
|
inputHeight,
|
|
@@ -9642,8 +9830,8 @@ var ChatContent = () => {
|
|
|
9642
9830
|
onClick: handleScrollToBottomClick
|
|
9643
9831
|
}
|
|
9644
9832
|
),
|
|
9645
|
-
history.length === 0 && componentStatus !== "Loading" && !isMobile && /* @__PURE__ */
|
|
9646
|
-
|
|
9833
|
+
history.length === 0 && componentStatus !== "Loading" && !isMobile && /* @__PURE__ */ jsx18(
|
|
9834
|
+
Box15,
|
|
9647
9835
|
{
|
|
9648
9836
|
sx: (theme) => ({
|
|
9649
9837
|
position: "absolute",
|
|
@@ -9661,8 +9849,8 @@ var ChatContent = () => {
|
|
|
9661
9849
|
})
|
|
9662
9850
|
}
|
|
9663
9851
|
),
|
|
9664
|
-
/* @__PURE__ */
|
|
9665
|
-
|
|
9852
|
+
/* @__PURE__ */ jsxs13(
|
|
9853
|
+
Box15,
|
|
9666
9854
|
{
|
|
9667
9855
|
sx: {
|
|
9668
9856
|
display: "flex",
|
|
@@ -9673,9 +9861,10 @@ var ChatContent = () => {
|
|
|
9673
9861
|
maxWidth: "768px"
|
|
9674
9862
|
},
|
|
9675
9863
|
children: [
|
|
9676
|
-
/* @__PURE__ */
|
|
9677
|
-
history.length === 0 && componentStatus !== "Loading" && !pendingMessage && preferences.chatSuggestionsEnabled && /* @__PURE__ */
|
|
9678
|
-
/* @__PURE__ */
|
|
9864
|
+
/* @__PURE__ */ jsx18(Box15, { sx: { flex: "1 1 auto" } }),
|
|
9865
|
+
history.length === 0 && componentStatus !== "Loading" && !pendingMessage && preferences.chatSuggestionsEnabled && /* @__PURE__ */ jsx18(Box15, { sx: { marginBottom: "20px" }, children: /* @__PURE__ */ jsx18(QuerySuggestionPicker, { onSend: handleSend, inputHeight }) }),
|
|
9866
|
+
/* @__PURE__ */ jsx18(ask_user_card_default, {}),
|
|
9867
|
+
/* @__PURE__ */ jsx18(
|
|
9679
9868
|
chat_input_default,
|
|
9680
9869
|
{
|
|
9681
9870
|
inputValue,
|
|
@@ -9702,7 +9891,7 @@ var ChatContent = () => {
|
|
|
9702
9891
|
]
|
|
9703
9892
|
}
|
|
9704
9893
|
),
|
|
9705
|
-
preferences.feedbackEnabled && !isMobile && /* @__PURE__ */
|
|
9894
|
+
preferences.feedbackEnabled && !isMobile && /* @__PURE__ */ jsx18(
|
|
9706
9895
|
FeedbackButton,
|
|
9707
9896
|
{
|
|
9708
9897
|
fullScreen: false,
|
|
@@ -9715,7 +9904,7 @@ var ChatContent = () => {
|
|
|
9715
9904
|
}
|
|
9716
9905
|
}
|
|
9717
9906
|
),
|
|
9718
|
-
/* @__PURE__ */
|
|
9907
|
+
/* @__PURE__ */ jsx18(ConnectionStatus, { position: "top", showWhenGood: false })
|
|
9719
9908
|
]
|
|
9720
9909
|
}
|
|
9721
9910
|
)
|
|
@@ -9744,13 +9933,13 @@ var Chat = () => {
|
|
|
9744
9933
|
});
|
|
9745
9934
|
if (!allowUnauthenticated && !bypassAuth && !authenticationService.isAuthenticated()) {
|
|
9746
9935
|
debugLogger.debug("User is not authenticated, redirecting to login");
|
|
9747
|
-
return /* @__PURE__ */
|
|
9936
|
+
return /* @__PURE__ */ jsx18(Navigate, { to: "/login", replace: true });
|
|
9748
9937
|
}
|
|
9749
|
-
return /* @__PURE__ */
|
|
9938
|
+
return /* @__PURE__ */ jsx18(ChatContent, {});
|
|
9750
9939
|
};
|
|
9751
9940
|
var chat_default = Chat;
|
|
9752
9941
|
|
|
9753
9942
|
export {
|
|
9754
9943
|
chat_default
|
|
9755
9944
|
};
|
|
9756
|
-
//# sourceMappingURL=chunk-
|
|
9945
|
+
//# sourceMappingURL=chunk-PUUL2R3T.mjs.map
|