@burtson-labs/bandit-engine 2.0.153 → 2.0.155
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-4UZ5QT7B.mjs → chat-W5E6FD2Z.mjs} +5 -5
- package/dist/chat-provider.js +23 -1
- package/dist/chat-provider.js.map +1 -1
- package/dist/chat-provider.mjs +2 -2
- package/dist/{chunk-DADHPWB7.mjs → chunk-6JTXYVOW.mjs} +6 -6
- package/dist/{chunk-GQ3X6VPR.mjs → chunk-HQZXTOOK.mjs} +2 -2
- package/dist/{chunk-6KOEXQJN.mjs → chunk-IS2LWSBZ.mjs} +24 -2
- package/dist/chunk-IS2LWSBZ.mjs.map +1 -0
- package/dist/{chunk-RN7FRSMX.mjs → chunk-NTG4V34T.mjs} +426 -378
- package/dist/chunk-NTG4V34T.mjs.map +1 -0
- package/dist/{chunk-AJL3JOD6.mjs → chunk-TVPYBRWF.mjs} +2 -2
- package/dist/{chunk-2HGBMNX4.mjs → chunk-XONVE5DJ.mjs} +4 -2
- package/dist/chunk-XONVE5DJ.mjs.map +1 -0
- package/dist/{chunk-6NYYYKYZ.mjs → chunk-YWCROXF2.mjs} +5 -4
- package/dist/chunk-YWCROXF2.mjs.map +1 -0
- package/dist/index.js +3350 -3279
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -7
- package/dist/management/management.js +3216 -3145
- package/dist/management/management.js.map +1 -1
- package/dist/management/management.mjs +5 -5
- package/dist/modals/chat-modal/chat-modal.js +822 -775
- package/dist/modals/chat-modal/chat-modal.js.map +1 -1
- package/dist/modals/chat-modal/chat-modal.mjs +2 -2
- package/package.json +1 -1
- package/dist/chunk-2HGBMNX4.mjs.map +0 -1
- package/dist/chunk-6KOEXQJN.mjs.map +0 -1
- package/dist/chunk-6NYYYKYZ.mjs.map +0 -1
- package/dist/chunk-RN7FRSMX.mjs.map +0 -1
- /package/dist/{chat-4UZ5QT7B.mjs.map → chat-W5E6FD2Z.mjs.map} +0 -0
- /package/dist/{chunk-DADHPWB7.mjs.map → chunk-6JTXYVOW.mjs.map} +0 -0
- /package/dist/{chunk-GQ3X6VPR.mjs.map → chunk-HQZXTOOK.mjs.map} +0 -0
- /package/dist/{chunk-AJL3JOD6.mjs.map → chunk-TVPYBRWF.mjs.map} +0 -0
|
@@ -4538,7 +4538,7 @@ __export(chat_modal_exports, {
|
|
|
4538
4538
|
});
|
|
4539
4539
|
module.exports = __toCommonJS(chat_modal_exports);
|
|
4540
4540
|
var import_react23 = require("react");
|
|
4541
|
-
var
|
|
4541
|
+
var import_material18 = require("@mui/material");
|
|
4542
4542
|
var import_react_router_dom = require("react-router-dom");
|
|
4543
4543
|
|
|
4544
4544
|
// src/modals/chat-modal/draggable-box.tsx
|
|
@@ -10743,7 +10743,7 @@ var DocumentCard_default = DocumentCard;
|
|
|
10743
10743
|
|
|
10744
10744
|
// src/modals/knowlege/knowledge-file-modal.tsx
|
|
10745
10745
|
var import_react11 = require("react");
|
|
10746
|
-
var
|
|
10746
|
+
var import_material7 = require("@mui/material");
|
|
10747
10747
|
init_packageSettingsStore();
|
|
10748
10748
|
var pdfjsLib2 = __toESM(require("pdfjs-dist/legacy/build/pdf"));
|
|
10749
10749
|
|
|
@@ -10828,7 +10828,9 @@ function getHighlightTree(code, language) {
|
|
|
10828
10828
|
|
|
10829
10829
|
// src/utils/markdownRendering.tsx
|
|
10830
10830
|
var import_react10 = __toESM(require("react"));
|
|
10831
|
+
var import_material6 = require("@mui/material");
|
|
10831
10832
|
var import_rehype_sanitize = require("rehype-sanitize");
|
|
10833
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
10832
10834
|
var markdownSanitizeSchema = (() => {
|
|
10833
10835
|
const schema = JSON.parse(JSON.stringify(import_rehype_sanitize.defaultSchema));
|
|
10834
10836
|
schema.tagNames = Array.from(
|
|
@@ -10872,6 +10874,50 @@ var markdownSanitizeSchema = (() => {
|
|
|
10872
10874
|
schema.strip = ["script", "style"];
|
|
10873
10875
|
return schema;
|
|
10874
10876
|
})();
|
|
10877
|
+
var MarkdownImage = ({ src, alt }) => {
|
|
10878
|
+
if (!src) return null;
|
|
10879
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_material6.Box, { component: "span", sx: { display: "block", my: 1 }, children: [
|
|
10880
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
10881
|
+
import_material6.Box,
|
|
10882
|
+
{
|
|
10883
|
+
component: "img",
|
|
10884
|
+
src,
|
|
10885
|
+
alt: alt || "Image",
|
|
10886
|
+
loading: "lazy",
|
|
10887
|
+
sx: {
|
|
10888
|
+
display: "block",
|
|
10889
|
+
maxWidth: "min(480px, 100%)",
|
|
10890
|
+
maxHeight: 420,
|
|
10891
|
+
width: "auto",
|
|
10892
|
+
height: "auto",
|
|
10893
|
+
borderRadius: 2,
|
|
10894
|
+
border: "1px solid",
|
|
10895
|
+
borderColor: "divider"
|
|
10896
|
+
}
|
|
10897
|
+
}
|
|
10898
|
+
),
|
|
10899
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
10900
|
+
import_material6.Box,
|
|
10901
|
+
{
|
|
10902
|
+
component: "a",
|
|
10903
|
+
href: src,
|
|
10904
|
+
download: true,
|
|
10905
|
+
target: "_blank",
|
|
10906
|
+
rel: "noreferrer noopener",
|
|
10907
|
+
sx: {
|
|
10908
|
+
display: "inline-block",
|
|
10909
|
+
mt: 0.5,
|
|
10910
|
+
fontSize: 13,
|
|
10911
|
+
fontWeight: 600,
|
|
10912
|
+
color: "primary.main",
|
|
10913
|
+
textDecoration: "none",
|
|
10914
|
+
"&:hover": { textDecoration: "underline" }
|
|
10915
|
+
},
|
|
10916
|
+
children: "Save image"
|
|
10917
|
+
}
|
|
10918
|
+
)
|
|
10919
|
+
] });
|
|
10920
|
+
};
|
|
10875
10921
|
var renderLowlightChildren = (nodes, keyPrefix) => nodes.map((node, index) => {
|
|
10876
10922
|
if (node.type === "text") {
|
|
10877
10923
|
return node.value;
|
|
@@ -10898,7 +10944,7 @@ var renderLowlightChildren = (nodes, keyPrefix) => nodes.map((node, index) => {
|
|
|
10898
10944
|
|
|
10899
10945
|
// src/modals/knowlege/knowledge-file-modal.tsx
|
|
10900
10946
|
init_debugLogger();
|
|
10901
|
-
var
|
|
10947
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
10902
10948
|
var getFileTypeInfo2 = (filename) => {
|
|
10903
10949
|
const ext = filename.split(".").pop()?.toLowerCase() || "";
|
|
10904
10950
|
const languageMap = {
|
|
@@ -11044,8 +11090,8 @@ var KnowledgeFileModal = ({ open, onClose, doc, isVectorDocument = false }) => {
|
|
|
11044
11090
|
const zoomTimeoutRef = (0, import_react11.useRef)(null);
|
|
11045
11091
|
const { downloadVectorFile, getFileBlob } = useVectorStore();
|
|
11046
11092
|
const packageSettings = usePackageSettingsStore();
|
|
11047
|
-
const theme = (0,
|
|
11048
|
-
const isMobile = (0,
|
|
11093
|
+
const theme = (0, import_material7.useTheme)();
|
|
11094
|
+
const isMobile = (0, import_material7.useMediaQuery)(theme.breakpoints.down("md"));
|
|
11049
11095
|
const isDarkTheme = theme.palette.mode === "dark";
|
|
11050
11096
|
(0, import_react11.useEffect)(() => {
|
|
11051
11097
|
if (typeof window !== "undefined") {
|
|
@@ -11278,14 +11324,14 @@ var KnowledgeFileModal = ({ open, onClose, doc, isVectorDocument = false }) => {
|
|
|
11278
11324
|
debugLogger.error("Vector document download failed", { error: err, docId: doc.id });
|
|
11279
11325
|
}
|
|
11280
11326
|
};
|
|
11281
|
-
return /* @__PURE__ */ (0,
|
|
11282
|
-
/* @__PURE__ */ (0,
|
|
11283
|
-
/* @__PURE__ */ (0,
|
|
11284
|
-
doc && /* @__PURE__ */ (0,
|
|
11327
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_material7.Dialog, { fullScreen: true, open, onClose, children: [
|
|
11328
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_material7.AppBar, { sx: { position: "relative" }, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_material7.Toolbar, { children: [
|
|
11329
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_material7.Box, { sx: { display: "flex", alignItems: "center", flex: 1, minWidth: 0 }, children: [
|
|
11330
|
+
doc && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_material7.Box, { sx: { mr: 1, flexShrink: 0 }, children: (() => {
|
|
11285
11331
|
const fileInfo = getFileTypeInfo2(doc.name);
|
|
11286
11332
|
const IconComponent = fileInfo.icon;
|
|
11287
|
-
return /* @__PURE__ */ (0,
|
|
11288
|
-
|
|
11333
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_material7.Tooltip, { title: `${fileInfo.category} file`, placement: "bottom", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
11334
|
+
import_material7.Box,
|
|
11289
11335
|
{
|
|
11290
11336
|
sx: {
|
|
11291
11337
|
display: "flex",
|
|
@@ -11299,14 +11345,14 @@ var KnowledgeFileModal = ({ open, onClose, doc, isVectorDocument = false }) => {
|
|
|
11299
11345
|
fontWeight: "bold"
|
|
11300
11346
|
},
|
|
11301
11347
|
children: [
|
|
11302
|
-
/* @__PURE__ */ (0,
|
|
11348
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(IconComponent, { sx: { fontSize: "1rem", mr: 0.5 } }),
|
|
11303
11349
|
fileInfo.language || fileInfo.category
|
|
11304
11350
|
]
|
|
11305
11351
|
}
|
|
11306
11352
|
) });
|
|
11307
11353
|
})() }),
|
|
11308
|
-
/* @__PURE__ */ (0,
|
|
11309
|
-
|
|
11354
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_material7.Tooltip, { title: doc?.name || "", placement: "bottom-start", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
11355
|
+
import_material7.Typography,
|
|
11310
11356
|
{
|
|
11311
11357
|
sx: {
|
|
11312
11358
|
flex: 1,
|
|
@@ -11333,7 +11379,7 @@ var KnowledgeFileModal = ({ open, onClose, doc, isVectorDocument = false }) => {
|
|
|
11333
11379
|
children: doc?.name
|
|
11334
11380
|
}
|
|
11335
11381
|
) }),
|
|
11336
|
-
/* @__PURE__ */ (0,
|
|
11382
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_material7.Box, { sx: { display: "flex", alignItems: "center", flexShrink: 0, ml: 1 }, children: isPDF(doc?.name || "") && totalPages > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_material7.Typography, { component: "span", variant: "body2", sx: { opacity: 0.8 }, children: [
|
|
11337
11383
|
"(",
|
|
11338
11384
|
totalPages,
|
|
11339
11385
|
" page",
|
|
@@ -11341,47 +11387,47 @@ var KnowledgeFileModal = ({ open, onClose, doc, isVectorDocument = false }) => {
|
|
|
11341
11387
|
")"
|
|
11342
11388
|
] }) })
|
|
11343
11389
|
] }),
|
|
11344
|
-
/* @__PURE__ */ (0,
|
|
11345
|
-
!isPDF(doc?.name || "") && isCodeFile(doc?.name || "") && /* @__PURE__ */ (0,
|
|
11346
|
-
|
|
11390
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_material7.Box, { sx: { display: "flex", alignItems: "center", flexShrink: 0, gap: 1 }, children: [
|
|
11391
|
+
!isPDF(doc?.name || "") && isCodeFile(doc?.name || "") && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
11392
|
+
import_material7.ToggleButtonGroup,
|
|
11347
11393
|
{
|
|
11348
11394
|
value: viewMode,
|
|
11349
11395
|
exclusive: true,
|
|
11350
11396
|
onChange: (e, newMode) => newMode && setViewMode(newMode),
|
|
11351
11397
|
size: "small",
|
|
11352
11398
|
children: [
|
|
11353
|
-
/* @__PURE__ */ (0,
|
|
11354
|
-
/* @__PURE__ */ (0,
|
|
11399
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_material7.ToggleButton, { value: "formatted", sx: { color: "inherit" }, children: [
|
|
11400
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(CodeIcon, { sx: { mr: 1, fontSize: "1rem" } }),
|
|
11355
11401
|
"Formatted"
|
|
11356
11402
|
] }),
|
|
11357
|
-
/* @__PURE__ */ (0,
|
|
11358
|
-
/* @__PURE__ */ (0,
|
|
11403
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_material7.ToggleButton, { value: "raw", sx: { color: "inherit" }, children: [
|
|
11404
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(TextFieldsIcon, { sx: { mr: 1, fontSize: "1rem" } }),
|
|
11359
11405
|
"Raw"
|
|
11360
11406
|
] })
|
|
11361
11407
|
]
|
|
11362
11408
|
}
|
|
11363
11409
|
),
|
|
11364
|
-
isPDF(doc?.name || "") && pdfDocument && !isMobile && /* @__PURE__ */ (0,
|
|
11365
|
-
/* @__PURE__ */ (0,
|
|
11366
|
-
|
|
11410
|
+
isPDF(doc?.name || "") && pdfDocument && !isMobile && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
|
|
11411
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
11412
|
+
import_material7.Button,
|
|
11367
11413
|
{
|
|
11368
11414
|
color: "inherit",
|
|
11369
|
-
startIcon: /* @__PURE__ */ (0,
|
|
11415
|
+
startIcon: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ZoomOutIcon, {}),
|
|
11370
11416
|
onClick: handleZoomOut,
|
|
11371
11417
|
disabled: pdfScale <= 0.5,
|
|
11372
11418
|
size: "small",
|
|
11373
11419
|
children: "Zoom Out"
|
|
11374
11420
|
}
|
|
11375
11421
|
),
|
|
11376
|
-
/* @__PURE__ */ (0,
|
|
11422
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_material7.Typography, { variant: "body2", sx: { color: "inherit", mx: 1 }, children: [
|
|
11377
11423
|
Math.round(pdfScale * 100),
|
|
11378
11424
|
"%"
|
|
11379
11425
|
] }),
|
|
11380
|
-
/* @__PURE__ */ (0,
|
|
11381
|
-
|
|
11426
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
11427
|
+
import_material7.Button,
|
|
11382
11428
|
{
|
|
11383
11429
|
color: "inherit",
|
|
11384
|
-
startIcon: /* @__PURE__ */ (0,
|
|
11430
|
+
startIcon: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ZoomInIcon, {}),
|
|
11385
11431
|
onClick: handleZoomIn,
|
|
11386
11432
|
disabled: pdfScale >= 3,
|
|
11387
11433
|
size: "small",
|
|
@@ -11389,18 +11435,18 @@ var KnowledgeFileModal = ({ open, onClose, doc, isVectorDocument = false }) => {
|
|
|
11389
11435
|
}
|
|
11390
11436
|
)
|
|
11391
11437
|
] }),
|
|
11392
|
-
isVectorDocument && /* @__PURE__ */ (0,
|
|
11393
|
-
/* @__PURE__ */ (0,
|
|
11438
|
+
isVectorDocument && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_material7.IconButton, { edge: "end", color: "inherit", onClick: handleDownload, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(DownloadIcon, {}) }),
|
|
11439
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_material7.IconButton, { edge: "end", color: "inherit", onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(CloseIcon, {}) })
|
|
11394
11440
|
] })
|
|
11395
11441
|
] }) }),
|
|
11396
|
-
/* @__PURE__ */ (0,
|
|
11397
|
-
loading && /* @__PURE__ */ (0,
|
|
11398
|
-
/* @__PURE__ */ (0,
|
|
11399
|
-
/* @__PURE__ */ (0,
|
|
11442
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_material7.Box, { sx: { p: 3, bgcolor: "background.default", height: "100%", overflowY: "auto" }, children: [
|
|
11443
|
+
loading && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_material7.Box, { sx: { display: "flex", justifyContent: "center", alignItems: "center", height: "50vh" }, children: [
|
|
11444
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_material7.CircularProgress, {}),
|
|
11445
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_material7.Typography, { sx: { ml: 2 }, children: isPDF(doc?.name || "") ? "Loading PDF document..." : "Loading full file content..." })
|
|
11400
11446
|
] }),
|
|
11401
|
-
error && /* @__PURE__ */ (0,
|
|
11402
|
-
!loading && isPDF(doc?.name || "") && pdfCanvases.length > 0 && /* @__PURE__ */ (0,
|
|
11403
|
-
|
|
11447
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_material7.Alert, { severity: "warning", sx: { mb: 2 }, children: error }),
|
|
11448
|
+
!loading && isPDF(doc?.name || "") && pdfCanvases.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_material7.Box, { sx: { display: "flex", flexDirection: "column", alignItems: "center", gap: 2 }, children: pdfCanvases.map((canvas, index) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
11449
|
+
import_material7.Paper,
|
|
11404
11450
|
{
|
|
11405
11451
|
elevation: 3,
|
|
11406
11452
|
sx: {
|
|
@@ -11432,14 +11478,14 @@ var KnowledgeFileModal = ({ open, onClose, doc, isVectorDocument = false }) => {
|
|
|
11432
11478
|
scrollbarColor: isDarkTheme ? "#555 #2d2d2d" : "#c1c1c1 #f5f5f5"
|
|
11433
11479
|
},
|
|
11434
11480
|
children: [
|
|
11435
|
-
/* @__PURE__ */ (0,
|
|
11481
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_material7.Typography, { variant: "caption", color: "text.secondary", sx: { mb: 1, display: "block" }, children: [
|
|
11436
11482
|
"Page ",
|
|
11437
11483
|
index + 1,
|
|
11438
11484
|
" of ",
|
|
11439
11485
|
totalPages
|
|
11440
11486
|
] }),
|
|
11441
|
-
/* @__PURE__ */ (0,
|
|
11442
|
-
|
|
11487
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
11488
|
+
import_material7.Box,
|
|
11443
11489
|
{
|
|
11444
11490
|
ref: (el) => {
|
|
11445
11491
|
if (el && canvas) {
|
|
@@ -11462,19 +11508,19 @@ var KnowledgeFileModal = ({ open, onClose, doc, isVectorDocument = false }) => {
|
|
|
11462
11508
|
},
|
|
11463
11509
|
index
|
|
11464
11510
|
)) }),
|
|
11465
|
-
!loading && !isPDF(doc?.name || "") && /* @__PURE__ */ (0,
|
|
11466
|
-
/* @__PURE__ */ (0,
|
|
11467
|
-
/* @__PURE__ */ (0,
|
|
11511
|
+
!loading && !isPDF(doc?.name || "") && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_material7.Box, { children: isCodeFile(doc?.name || "") && viewMode === "formatted" ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_material7.Box, { children: [
|
|
11512
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_material7.Box, { sx: { mb: 2, display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
|
|
11513
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_material7.Typography, { variant: "body2", color: "text.secondary", children: [
|
|
11468
11514
|
"Syntax highlighted as ",
|
|
11469
|
-
/* @__PURE__ */ (0,
|
|
11515
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("strong", { children: getLanguageFromFilename(doc?.name || "").toUpperCase() })
|
|
11470
11516
|
] }),
|
|
11471
|
-
/* @__PURE__ */ (0,
|
|
11517
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_material7.Typography, { variant: "caption", color: "text.secondary", children: [
|
|
11472
11518
|
(fullContent || doc?.content || "").split("\n").length,
|
|
11473
11519
|
" lines"
|
|
11474
11520
|
] })
|
|
11475
11521
|
] }),
|
|
11476
|
-
/* @__PURE__ */ (0,
|
|
11477
|
-
|
|
11522
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
11523
|
+
import_material7.Paper,
|
|
11478
11524
|
{
|
|
11479
11525
|
elevation: 1,
|
|
11480
11526
|
sx: {
|
|
@@ -11516,8 +11562,8 @@ var KnowledgeFileModal = ({ open, onClose, doc, isVectorDocument = false }) => {
|
|
|
11516
11562
|
overflowWrap: "anywhere"
|
|
11517
11563
|
}
|
|
11518
11564
|
},
|
|
11519
|
-
children: /* @__PURE__ */ (0,
|
|
11520
|
-
|
|
11565
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
11566
|
+
import_material7.Box,
|
|
11521
11567
|
{
|
|
11522
11568
|
sx: {
|
|
11523
11569
|
"& .hljs": {
|
|
@@ -11552,13 +11598,13 @@ var KnowledgeFileModal = ({ open, onClose, doc, isVectorDocument = false }) => {
|
|
|
11552
11598
|
color: isDarkTheme ? "#f07178" : "#d97706"
|
|
11553
11599
|
}
|
|
11554
11600
|
},
|
|
11555
|
-
children: /* @__PURE__ */ (0,
|
|
11601
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("pre", { className: `hljs language-${resolvedHighlightLanguage || "text"}`, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { className: "hljs", children: highlightedNodes.length > 0 ? highlightedNodes : formattedContent }) })
|
|
11556
11602
|
}
|
|
11557
11603
|
)
|
|
11558
11604
|
}
|
|
11559
11605
|
)
|
|
11560
|
-
] }) : /* @__PURE__ */ (0,
|
|
11561
|
-
|
|
11606
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
11607
|
+
import_material7.Typography,
|
|
11562
11608
|
{
|
|
11563
11609
|
component: "pre",
|
|
11564
11610
|
variant: "body2",
|
|
@@ -11578,14 +11624,14 @@ var KnowledgeFileModal = ({ open, onClose, doc, isVectorDocument = false }) => {
|
|
|
11578
11624
|
children: fullContent || doc?.content
|
|
11579
11625
|
}
|
|
11580
11626
|
) }),
|
|
11581
|
-
!loading && isPDF(doc?.name || "") && pdfCanvases.length === 0 && !error && /* @__PURE__ */ (0,
|
|
11582
|
-
/* @__PURE__ */ (0,
|
|
11583
|
-
/* @__PURE__ */ (0,
|
|
11584
|
-
isVectorDocument && /* @__PURE__ */ (0,
|
|
11585
|
-
|
|
11627
|
+
!loading && isPDF(doc?.name || "") && pdfCanvases.length === 0 && !error && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_material7.Box, { sx: { textAlign: "center", py: 4 }, children: [
|
|
11628
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_material7.Typography, { variant: "h6", color: "text.secondary", gutterBottom: true, children: "PDF Preview Not Available" }),
|
|
11629
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_material7.Typography, { variant: "body2", color: "text.secondary", children: "This PDF file cannot be previewed. You can download it to view the full content." }),
|
|
11630
|
+
isVectorDocument && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
11631
|
+
import_material7.Button,
|
|
11586
11632
|
{
|
|
11587
11633
|
variant: "contained",
|
|
11588
|
-
startIcon: /* @__PURE__ */ (0,
|
|
11634
|
+
startIcon: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(DownloadIcon, {}),
|
|
11589
11635
|
onClick: handleDownload,
|
|
11590
11636
|
sx: { mt: 2 },
|
|
11591
11637
|
children: "Download PDF"
|
|
@@ -11604,7 +11650,7 @@ var import_remark_gfm = __toESM(require("remark-gfm"));
|
|
|
11604
11650
|
var import_rehype_raw = __toESM(require("rehype-raw"));
|
|
11605
11651
|
var import_rehype_sanitize2 = __toESM(require("rehype-sanitize"));
|
|
11606
11652
|
init_debugLogger();
|
|
11607
|
-
var
|
|
11653
|
+
var import_material9 = require("@mui/material");
|
|
11608
11654
|
|
|
11609
11655
|
// src/utils/openFileLink.ts
|
|
11610
11656
|
init_debugLogger();
|
|
@@ -12376,11 +12422,11 @@ var useTTS = () => {
|
|
|
12376
12422
|
};
|
|
12377
12423
|
|
|
12378
12424
|
// src/modals/chat-modal/ai-response-action-bar.tsx
|
|
12379
|
-
var
|
|
12425
|
+
var import_material8 = require("@mui/material");
|
|
12380
12426
|
var import_lucide_react2 = require("lucide-react");
|
|
12381
12427
|
init_debugLogger();
|
|
12382
12428
|
init_authenticationService();
|
|
12383
|
-
var
|
|
12429
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
12384
12430
|
var AiResponseActionsBar = ({ text }) => {
|
|
12385
12431
|
const [copied, setCopied] = (0, import_react13.useState)(false);
|
|
12386
12432
|
const openCanvas = useCanvasStore((s) => s.openCanvas);
|
|
@@ -12463,9 +12509,9 @@ var AiResponseActionsBar = ({ text }) => {
|
|
|
12463
12509
|
const handleFeedback = (type) => {
|
|
12464
12510
|
setFeedback(type);
|
|
12465
12511
|
};
|
|
12466
|
-
return /* @__PURE__ */ (0,
|
|
12467
|
-
/* @__PURE__ */ (0,
|
|
12468
|
-
|
|
12512
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_material8.Box, { sx: { mt: 2, display: "flex", gap: 2, alignItems: "center", flexWrap: "wrap" }, children: [
|
|
12513
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_material8.Tooltip, { title: copied ? "Copied!" : "Copy entire response", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
12514
|
+
import_material8.IconButton,
|
|
12469
12515
|
{
|
|
12470
12516
|
onClick: handleCopy,
|
|
12471
12517
|
size: "small",
|
|
@@ -12475,11 +12521,11 @@ var AiResponseActionsBar = ({ text }) => {
|
|
|
12475
12521
|
color: (theme) => theme.palette.mode === "dark" ? "#fff" : "#000"
|
|
12476
12522
|
}
|
|
12477
12523
|
},
|
|
12478
|
-
children: copied ? /* @__PURE__ */ (0,
|
|
12524
|
+
children: copied ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react2.Check, { size: 18 }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react2.Copy, { size: 18 })
|
|
12479
12525
|
}
|
|
12480
12526
|
) }),
|
|
12481
|
-
/* @__PURE__ */ (0,
|
|
12482
|
-
|
|
12527
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_material8.Tooltip, { title: "Open in canvas \u2014 edit & export", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
12528
|
+
import_material8.IconButton,
|
|
12483
12529
|
{
|
|
12484
12530
|
onClick: openInCanvas,
|
|
12485
12531
|
size: "small",
|
|
@@ -12489,16 +12535,16 @@ var AiResponseActionsBar = ({ text }) => {
|
|
|
12489
12535
|
color: (theme) => theme.palette.mode === "dark" ? "#fff" : "#000"
|
|
12490
12536
|
}
|
|
12491
12537
|
},
|
|
12492
|
-
children: /* @__PURE__ */ (0,
|
|
12538
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react2.PanelRight, { size: 18 })
|
|
12493
12539
|
}
|
|
12494
12540
|
) }),
|
|
12495
|
-
isTTSAvailable && /* @__PURE__ */ (0,
|
|
12496
|
-
/* @__PURE__ */ (0,
|
|
12497
|
-
|
|
12541
|
+
isTTSAvailable && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
|
|
12542
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
12543
|
+
import_material8.Tooltip,
|
|
12498
12544
|
{
|
|
12499
12545
|
title: !isTTSAvailable ? "TTS not available - check configuration" : isLoading ? "Loading audio..." : isPaused ? "Resume playback" : isPlaying ? "Playing audio..." : "Play response with voice",
|
|
12500
|
-
children: /* @__PURE__ */ (0,
|
|
12501
|
-
|
|
12546
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
12547
|
+
import_material8.IconButton,
|
|
12502
12548
|
{
|
|
12503
12549
|
onClick: handleTTSClick,
|
|
12504
12550
|
size: "small",
|
|
@@ -12512,13 +12558,13 @@ var AiResponseActionsBar = ({ text }) => {
|
|
|
12512
12558
|
color: (theme) => theme.palette.mode === "dark" ? "#666" : "#aaa"
|
|
12513
12559
|
}
|
|
12514
12560
|
},
|
|
12515
|
-
children: isLoading ? /* @__PURE__ */ (0,
|
|
12561
|
+
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_material8.CircularProgress, { size: 18 }) : isPaused ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react2.Play, { size: 18 }) : !isPlaying ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react2.Megaphone, { size: 18 }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react2.Megaphone, { size: 18, color: "#4caf50" })
|
|
12516
12562
|
}
|
|
12517
12563
|
)
|
|
12518
12564
|
}
|
|
12519
12565
|
),
|
|
12520
|
-
isPlaying && /* @__PURE__ */ (0,
|
|
12521
|
-
|
|
12566
|
+
isPlaying && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_material8.Tooltip, { title: "Pause playback", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
12567
|
+
import_material8.IconButton,
|
|
12522
12568
|
{
|
|
12523
12569
|
onClick: () => ttsPause(),
|
|
12524
12570
|
size: "small",
|
|
@@ -12528,11 +12574,11 @@ var AiResponseActionsBar = ({ text }) => {
|
|
|
12528
12574
|
color: (theme) => theme.palette.mode === "dark" ? "#fff" : "#000"
|
|
12529
12575
|
}
|
|
12530
12576
|
},
|
|
12531
|
-
children: /* @__PURE__ */ (0,
|
|
12577
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react2.Pause, { size: 18 })
|
|
12532
12578
|
}
|
|
12533
12579
|
) }),
|
|
12534
|
-
(isPlaying || isPaused) && /* @__PURE__ */ (0,
|
|
12535
|
-
|
|
12580
|
+
(isPlaying || isPaused) && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_material8.Tooltip, { title: "Stop playback", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
12581
|
+
import_material8.IconButton,
|
|
12536
12582
|
{
|
|
12537
12583
|
onClick: () => ttsStop(),
|
|
12538
12584
|
size: "small",
|
|
@@ -12542,12 +12588,12 @@ var AiResponseActionsBar = ({ text }) => {
|
|
|
12542
12588
|
color: (theme) => theme.palette.mode === "dark" ? "#fff" : "#000"
|
|
12543
12589
|
}
|
|
12544
12590
|
},
|
|
12545
|
-
children: /* @__PURE__ */ (0,
|
|
12591
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react2.Square, { size: 18 })
|
|
12546
12592
|
}
|
|
12547
12593
|
) })
|
|
12548
12594
|
] }),
|
|
12549
|
-
/* @__PURE__ */ (0,
|
|
12550
|
-
|
|
12595
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_material8.Tooltip, { title: "Like this response", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
12596
|
+
import_material8.IconButton,
|
|
12551
12597
|
{
|
|
12552
12598
|
onClick: () => handleFeedback("like"),
|
|
12553
12599
|
size: "small",
|
|
@@ -12557,11 +12603,11 @@ var AiResponseActionsBar = ({ text }) => {
|
|
|
12557
12603
|
color: feedback === "like" ? "#00e676" : (theme) => theme.palette.mode === "dark" ? "#fff" : "#000"
|
|
12558
12604
|
}
|
|
12559
12605
|
},
|
|
12560
|
-
children: /* @__PURE__ */ (0,
|
|
12606
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react2.ThumbsUp, { size: 18 })
|
|
12561
12607
|
}
|
|
12562
12608
|
) }),
|
|
12563
|
-
/* @__PURE__ */ (0,
|
|
12564
|
-
|
|
12609
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_material8.Tooltip, { title: "Dislike this response", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
12610
|
+
import_material8.IconButton,
|
|
12565
12611
|
{
|
|
12566
12612
|
onClick: () => handleFeedback("dislike"),
|
|
12567
12613
|
sx: {
|
|
@@ -12570,7 +12616,7 @@ var AiResponseActionsBar = ({ text }) => {
|
|
|
12570
12616
|
color: feedback === "dislike" ? "#ff1744" : (theme) => theme.palette.mode === "dark" ? "#fff" : "#000"
|
|
12571
12617
|
}
|
|
12572
12618
|
},
|
|
12573
|
-
children: /* @__PURE__ */ (0,
|
|
12619
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react2.ThumbsDown, { size: 18 })
|
|
12574
12620
|
}
|
|
12575
12621
|
) })
|
|
12576
12622
|
] });
|
|
@@ -12578,7 +12624,7 @@ var AiResponseActionsBar = ({ text }) => {
|
|
|
12578
12624
|
var ai_response_action_bar_default = AiResponseActionsBar;
|
|
12579
12625
|
|
|
12580
12626
|
// src/modals/chat-modal/ai-response-text-field.tsx
|
|
12581
|
-
var
|
|
12627
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
12582
12628
|
var brainIcon = "https://cdn.burtson.ai/images/brain-icon.png";
|
|
12583
12629
|
var normalizeTables = (markdown2) => {
|
|
12584
12630
|
const lines = markdown2.split("\n");
|
|
@@ -12693,7 +12739,7 @@ var MarkdownCodeBlock = ({
|
|
|
12693
12739
|
variable: "#d97706"
|
|
12694
12740
|
};
|
|
12695
12741
|
if (!isProbablyBlock) {
|
|
12696
|
-
return /* @__PURE__ */ (0,
|
|
12742
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
12697
12743
|
"code",
|
|
12698
12744
|
{
|
|
12699
12745
|
style: {
|
|
@@ -12706,8 +12752,8 @@ var MarkdownCodeBlock = ({
|
|
|
12706
12752
|
}
|
|
12707
12753
|
);
|
|
12708
12754
|
}
|
|
12709
|
-
return /* @__PURE__ */ (0,
|
|
12710
|
-
|
|
12755
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
12756
|
+
import_material9.Box,
|
|
12711
12757
|
{
|
|
12712
12758
|
sx: {
|
|
12713
12759
|
borderRadius: "4px",
|
|
@@ -12724,8 +12770,8 @@ var MarkdownCodeBlock = ({
|
|
|
12724
12770
|
maxWidth: "100%"
|
|
12725
12771
|
},
|
|
12726
12772
|
children: [
|
|
12727
|
-
/* @__PURE__ */ (0,
|
|
12728
|
-
|
|
12773
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
12774
|
+
import_material9.Box,
|
|
12729
12775
|
{
|
|
12730
12776
|
sx: {
|
|
12731
12777
|
px: 2,
|
|
@@ -12740,9 +12786,9 @@ var MarkdownCodeBlock = ({
|
|
|
12740
12786
|
fontFamily: "inherit"
|
|
12741
12787
|
},
|
|
12742
12788
|
children: [
|
|
12743
|
-
/* @__PURE__ */ (0,
|
|
12744
|
-
/* @__PURE__ */ (0,
|
|
12745
|
-
|
|
12789
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { children: languageLabel }),
|
|
12790
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_material9.Tooltip, { title: copied ? "Copied!" : "Copy", arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
12791
|
+
import_material9.IconButton,
|
|
12746
12792
|
{
|
|
12747
12793
|
size: "small",
|
|
12748
12794
|
onClick: handleCopy,
|
|
@@ -12751,14 +12797,14 @@ var MarkdownCodeBlock = ({
|
|
|
12751
12797
|
"&:hover": { color: theme.palette.text.primary },
|
|
12752
12798
|
padding: "4px"
|
|
12753
12799
|
},
|
|
12754
|
-
children: copied ? /* @__PURE__ */ (0,
|
|
12800
|
+
children: copied ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(CheckIcon, { fontSize: "small" }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ContentCopyIcon, { fontSize: "small" })
|
|
12755
12801
|
}
|
|
12756
12802
|
) })
|
|
12757
12803
|
]
|
|
12758
12804
|
}
|
|
12759
12805
|
),
|
|
12760
|
-
/* @__PURE__ */ (0,
|
|
12761
|
-
|
|
12806
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
12807
|
+
import_material9.Box,
|
|
12762
12808
|
{
|
|
12763
12809
|
sx: {
|
|
12764
12810
|
overflowX: "auto",
|
|
@@ -12792,7 +12838,7 @@ var MarkdownCodeBlock = ({
|
|
|
12792
12838
|
color: highlightColors.variable
|
|
12793
12839
|
}
|
|
12794
12840
|
},
|
|
12795
|
-
children: /* @__PURE__ */ (0,
|
|
12841
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("pre", { className: `hljs language-${languageClass}`, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("code", { className: "hljs", children: highlightedNodes }) })
|
|
12796
12842
|
}
|
|
12797
12843
|
)
|
|
12798
12844
|
]
|
|
@@ -12956,10 +13002,11 @@ var AIResponseTextField = ({
|
|
|
12956
13002
|
${sourcesMarkdownList.join("\n")}`;
|
|
12957
13003
|
}, [response, sourcesMarkdownList]);
|
|
12958
13004
|
const components = {
|
|
13005
|
+
img: MarkdownImage,
|
|
12959
13006
|
mark({ children, node: _node, className, style, ...markProps }) {
|
|
12960
13007
|
const contentText = import_react14.default.Children.toArray(children).map((child) => typeof child === "string" ? child : "").join("").trim();
|
|
12961
|
-
return /* @__PURE__ */ (0,
|
|
12962
|
-
|
|
13008
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
13009
|
+
import_material9.Box,
|
|
12963
13010
|
{
|
|
12964
13011
|
component: "span",
|
|
12965
13012
|
className,
|
|
@@ -12984,7 +13031,7 @@ ${sourcesMarkdownList.join("\n")}`;
|
|
|
12984
13031
|
);
|
|
12985
13032
|
},
|
|
12986
13033
|
code({ inline, className, children, node: _node, ...codeProps }) {
|
|
12987
|
-
return /* @__PURE__ */ (0,
|
|
13034
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
12988
13035
|
MarkdownCodeBlock,
|
|
12989
13036
|
{
|
|
12990
13037
|
inline,
|
|
@@ -12997,7 +13044,7 @@ ${sourcesMarkdownList.join("\n")}`;
|
|
|
12997
13044
|
);
|
|
12998
13045
|
},
|
|
12999
13046
|
a({ href, children, node: _node, style, ...anchorProps }) {
|
|
13000
|
-
return /* @__PURE__ */ (0,
|
|
13047
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
13001
13048
|
"a",
|
|
13002
13049
|
{
|
|
13003
13050
|
href,
|
|
@@ -13021,8 +13068,8 @@ ${sourcesMarkdownList.join("\n")}`;
|
|
|
13021
13068
|
if (typeof inner === "string" && inner.trim().toUpperCase() === "CODE") {
|
|
13022
13069
|
return null;
|
|
13023
13070
|
}
|
|
13024
|
-
return /* @__PURE__ */ (0,
|
|
13025
|
-
|
|
13071
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
13072
|
+
import_material9.Box,
|
|
13026
13073
|
{
|
|
13027
13074
|
sx: {
|
|
13028
13075
|
fontFamily: "monospace",
|
|
@@ -13039,7 +13086,7 @@ ${sourcesMarkdownList.join("\n")}`;
|
|
|
13039
13086
|
}
|
|
13040
13087
|
);
|
|
13041
13088
|
}
|
|
13042
|
-
return /* @__PURE__ */ (0,
|
|
13089
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("em", { className, style, ...emProps, children });
|
|
13043
13090
|
},
|
|
13044
13091
|
ol({ children, node: _node, style, ...orderedListProps }) {
|
|
13045
13092
|
const childArray = import_react14.default.Children.toArray(children);
|
|
@@ -13051,8 +13098,8 @@ ${sourcesMarkdownList.join("\n")}`;
|
|
|
13051
13098
|
}
|
|
13052
13099
|
if (typeof item === "string" && item.trim().startsWith(":")) {
|
|
13053
13100
|
cleanedChildren.push(
|
|
13054
|
-
/* @__PURE__ */ (0,
|
|
13055
|
-
|
|
13101
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
13102
|
+
import_material9.Typography,
|
|
13056
13103
|
{
|
|
13057
13104
|
sx: {
|
|
13058
13105
|
fontSize: "0.875rem",
|
|
@@ -13070,7 +13117,7 @@ ${sourcesMarkdownList.join("\n")}`;
|
|
|
13070
13117
|
cleanedChildren.push(item);
|
|
13071
13118
|
}
|
|
13072
13119
|
}
|
|
13073
|
-
return /* @__PURE__ */ (0,
|
|
13120
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
13074
13121
|
"ol",
|
|
13075
13122
|
{
|
|
13076
13123
|
...orderedListProps,
|
|
@@ -13085,7 +13132,7 @@ ${sourcesMarkdownList.join("\n")}`;
|
|
|
13085
13132
|
);
|
|
13086
13133
|
},
|
|
13087
13134
|
ul({ children, node: _node, style, ...unorderedListProps }) {
|
|
13088
|
-
return /* @__PURE__ */ (0,
|
|
13135
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
13089
13136
|
"ul",
|
|
13090
13137
|
{
|
|
13091
13138
|
...unorderedListProps,
|
|
@@ -13120,11 +13167,11 @@ ${sourcesMarkdownList.join("\n")}`;
|
|
|
13120
13167
|
const rest = childArray.slice(1);
|
|
13121
13168
|
const isAllInline = rest.every(
|
|
13122
13169
|
(el) => typeof el === "string" || import_react14.default.isValidElement(el) && // allow inline tags, but not <Box>
|
|
13123
|
-
el.type !==
|
|
13170
|
+
el.type !== import_material9.Box
|
|
13124
13171
|
);
|
|
13125
13172
|
if (isAllInline) {
|
|
13126
13173
|
const displayLabel = labelText.replace(/:\s*$/, "");
|
|
13127
|
-
return /* @__PURE__ */ (0,
|
|
13174
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
13128
13175
|
"li",
|
|
13129
13176
|
{
|
|
13130
13177
|
style: {
|
|
@@ -13135,11 +13182,11 @@ ${sourcesMarkdownList.join("\n")}`;
|
|
|
13135
13182
|
},
|
|
13136
13183
|
...listItemProps,
|
|
13137
13184
|
children: [
|
|
13138
|
-
/* @__PURE__ */ (0,
|
|
13185
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("strong", { children: [
|
|
13139
13186
|
displayLabel,
|
|
13140
13187
|
":"
|
|
13141
13188
|
] }),
|
|
13142
|
-
rest.length > 0 && /* @__PURE__ */ (0,
|
|
13189
|
+
rest.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
|
|
13143
13190
|
" ",
|
|
13144
13191
|
rest
|
|
13145
13192
|
] })
|
|
@@ -13149,16 +13196,16 @@ ${sourcesMarkdownList.join("\n")}`;
|
|
|
13149
13196
|
}
|
|
13150
13197
|
}
|
|
13151
13198
|
}
|
|
13152
|
-
if (childArray.length === 2 && import_react14.default.isValidElement(childArray[0]) && childArray[0].type === "strong" && import_react14.default.isValidElement(childArray[1]) && childArray[1].type ===
|
|
13199
|
+
if (childArray.length === 2 && import_react14.default.isValidElement(childArray[0]) && childArray[0].type === "strong" && import_react14.default.isValidElement(childArray[1]) && childArray[1].type === import_material9.Box) {
|
|
13153
13200
|
const label = childArray[0].props.children;
|
|
13154
13201
|
const desc = childArray[1].props.children;
|
|
13155
|
-
return /* @__PURE__ */ (0,
|
|
13202
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
13156
13203
|
"li",
|
|
13157
13204
|
{
|
|
13158
13205
|
style: { marginBottom: "0.5rem", lineHeight: 1.4, whiteSpace: "pre-wrap" },
|
|
13159
13206
|
...listItemProps,
|
|
13160
|
-
children: /* @__PURE__ */ (0,
|
|
13161
|
-
/* @__PURE__ */ (0,
|
|
13207
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("span", { children: [
|
|
13208
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("strong", { children: label }),
|
|
13162
13209
|
" ",
|
|
13163
13210
|
desc
|
|
13164
13211
|
] })
|
|
@@ -13177,7 +13224,7 @@ ${sourcesMarkdownList.join("\n")}`;
|
|
|
13177
13224
|
const prevKey = import_react14.default.isValidElement(prev) && prev.key != null ? prev.key : `li-strong-${i}`;
|
|
13178
13225
|
filtered.pop();
|
|
13179
13226
|
filtered.push(
|
|
13180
|
-
/* @__PURE__ */ (0,
|
|
13227
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("span", { children: [
|
|
13181
13228
|
prev,
|
|
13182
13229
|
": ",
|
|
13183
13230
|
desc
|
|
@@ -13188,7 +13235,7 @@ ${sourcesMarkdownList.join("\n")}`;
|
|
|
13188
13235
|
}
|
|
13189
13236
|
filtered.push(item);
|
|
13190
13237
|
}
|
|
13191
|
-
return /* @__PURE__ */ (0,
|
|
13238
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
13192
13239
|
"li",
|
|
13193
13240
|
{
|
|
13194
13241
|
...listItemProps,
|
|
@@ -13203,19 +13250,19 @@ ${sourcesMarkdownList.join("\n")}`;
|
|
|
13203
13250
|
);
|
|
13204
13251
|
},
|
|
13205
13252
|
table({ children, node: _node, className, style, ...tableProps }) {
|
|
13206
|
-
return /* @__PURE__ */ (0,
|
|
13207
|
-
|
|
13253
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
13254
|
+
import_material9.TableContainer,
|
|
13208
13255
|
{
|
|
13209
|
-
component:
|
|
13256
|
+
component: import_material9.Paper,
|
|
13210
13257
|
className,
|
|
13211
13258
|
style,
|
|
13212
13259
|
sx: { my: 2, bgcolor: theme.palette.background.paper },
|
|
13213
|
-
children: /* @__PURE__ */ (0,
|
|
13260
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_material9.Table, { size: "small", ...tableProps, children })
|
|
13214
13261
|
}
|
|
13215
13262
|
);
|
|
13216
13263
|
},
|
|
13217
13264
|
thead({ children, node: _node, ...tableHeadProps }) {
|
|
13218
|
-
return /* @__PURE__ */ (0,
|
|
13265
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_material9.TableHead, { ...tableHeadProps, children });
|
|
13219
13266
|
},
|
|
13220
13267
|
tbody({ children, node: _node, ...tableBodyProps }) {
|
|
13221
13268
|
const rows = import_react14.default.Children.toArray(children).filter((row) => {
|
|
@@ -13225,14 +13272,14 @@ ${sourcesMarkdownList.join("\n")}`;
|
|
|
13225
13272
|
(cell) => import_react14.default.isValidElement(cell) && typeof cell.props.children === "string" && /^-+$/.test(cell.props.children.trim())
|
|
13226
13273
|
);
|
|
13227
13274
|
});
|
|
13228
|
-
return /* @__PURE__ */ (0,
|
|
13275
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_material9.TableBody, { ...tableBodyProps, children: rows });
|
|
13229
13276
|
},
|
|
13230
13277
|
tr({ children, node: _node, ...tableRowProps }) {
|
|
13231
|
-
return /* @__PURE__ */ (0,
|
|
13278
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_material9.TableRow, { ...tableRowProps, children });
|
|
13232
13279
|
},
|
|
13233
13280
|
th({ children, node: _node, ...tableCellProps }) {
|
|
13234
|
-
return /* @__PURE__ */ (0,
|
|
13235
|
-
|
|
13281
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
13282
|
+
import_material9.TableCell,
|
|
13236
13283
|
{
|
|
13237
13284
|
...tableCellProps,
|
|
13238
13285
|
sx: {
|
|
@@ -13248,8 +13295,8 @@ ${sourcesMarkdownList.join("\n")}`;
|
|
|
13248
13295
|
);
|
|
13249
13296
|
},
|
|
13250
13297
|
td({ children, node: _node, ...tableCellProps }) {
|
|
13251
|
-
return /* @__PURE__ */ (0,
|
|
13252
|
-
|
|
13298
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
13299
|
+
import_material9.TableCell,
|
|
13253
13300
|
{
|
|
13254
13301
|
...tableCellProps,
|
|
13255
13302
|
sx: {
|
|
@@ -13268,10 +13315,10 @@ ${sourcesMarkdownList.join("\n")}`;
|
|
|
13268
13315
|
(child) => typeof child === "object" && child !== null && "type" in child && typeof child.type === "string" && ["div", "Box", "section", "ul", "ol", "table"].includes(child.type)
|
|
13269
13316
|
);
|
|
13270
13317
|
if (hasBlock) {
|
|
13271
|
-
return /* @__PURE__ */ (0,
|
|
13318
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_jsx_runtime10.Fragment, { children: flattened });
|
|
13272
13319
|
}
|
|
13273
|
-
return /* @__PURE__ */ (0,
|
|
13274
|
-
|
|
13320
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_material9.Box, { component: "div", sx: { margin: "0.25rem 0" }, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
13321
|
+
import_material9.Typography,
|
|
13275
13322
|
{
|
|
13276
13323
|
component: "div",
|
|
13277
13324
|
variant: "body2",
|
|
@@ -13284,9 +13331,9 @@ ${sourcesMarkdownList.join("\n")}`;
|
|
|
13284
13331
|
) });
|
|
13285
13332
|
}
|
|
13286
13333
|
};
|
|
13287
|
-
return /* @__PURE__ */ (0,
|
|
13288
|
-
/* @__PURE__ */ (0,
|
|
13289
|
-
|
|
13334
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
|
|
13335
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
13336
|
+
import_material9.Box,
|
|
13290
13337
|
{
|
|
13291
13338
|
sx: {
|
|
13292
13339
|
width: "100%",
|
|
@@ -13302,9 +13349,9 @@ ${sourcesMarkdownList.join("\n")}`;
|
|
|
13302
13349
|
"&:hover .ai-response-actions": { opacity: 1 }
|
|
13303
13350
|
},
|
|
13304
13351
|
children: [
|
|
13305
|
-
/* @__PURE__ */ (0,
|
|
13306
|
-
/* @__PURE__ */ (0,
|
|
13307
|
-
|
|
13352
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_material9.Box, { sx: { display: "flex", justifyContent: "flex-end", mb: 2.5 }, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_material9.Box, { sx: { maxWidth: { xs: "100%", sm: "85%" }, minWidth: 0 }, children: [
|
|
13353
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
13354
|
+
import_material9.Box,
|
|
13308
13355
|
{
|
|
13309
13356
|
sx: {
|
|
13310
13357
|
bgcolor: chatResponse.userBubble || (0, import_styles2.alpha)(theme.palette.common.white, 0.07),
|
|
@@ -13315,8 +13362,8 @@ ${sourcesMarkdownList.join("\n")}`;
|
|
|
13315
13362
|
whiteSpace: "pre-wrap",
|
|
13316
13363
|
overflowWrap: "break-word"
|
|
13317
13364
|
},
|
|
13318
|
-
children: /* @__PURE__ */ (0,
|
|
13319
|
-
|
|
13365
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
13366
|
+
import_material9.Typography,
|
|
13320
13367
|
{
|
|
13321
13368
|
sx: {
|
|
13322
13369
|
color: theme.palette.text.primary,
|
|
@@ -13329,8 +13376,8 @@ ${sourcesMarkdownList.join("\n")}`;
|
|
|
13329
13376
|
)
|
|
13330
13377
|
}
|
|
13331
13378
|
),
|
|
13332
|
-
images && images.length > 0 && /* @__PURE__ */ (0,
|
|
13333
|
-
|
|
13379
|
+
images && images.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_material9.Box, { sx: { display: "flex", gap: 1, mt: 1, flexWrap: "wrap", justifyContent: "flex-end" }, children: images.map((img, i) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
13380
|
+
import_material9.Avatar,
|
|
13334
13381
|
{
|
|
13335
13382
|
src: img,
|
|
13336
13383
|
variant: "rounded",
|
|
@@ -13347,9 +13394,9 @@ ${sourcesMarkdownList.join("\n")}`;
|
|
|
13347
13394
|
i
|
|
13348
13395
|
)) })
|
|
13349
13396
|
] }) }),
|
|
13350
|
-
/* @__PURE__ */ (0,
|
|
13351
|
-
cancelled && /* @__PURE__ */ (0,
|
|
13352
|
-
|
|
13397
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_material9.Box, { sx: { position: "relative", width: "100%", maxWidth: { xs: "100%", sm: "768px" } }, children: [
|
|
13398
|
+
cancelled && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
13399
|
+
import_material9.Box,
|
|
13353
13400
|
{
|
|
13354
13401
|
sx: {
|
|
13355
13402
|
position: "absolute",
|
|
@@ -13360,11 +13407,11 @@ ${sourcesMarkdownList.join("\n")}`;
|
|
|
13360
13407
|
gap: 1,
|
|
13361
13408
|
zIndex: 1
|
|
13362
13409
|
},
|
|
13363
|
-
children: /* @__PURE__ */ (0,
|
|
13410
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_material9.Typography, { variant: "caption", sx: { fontStyle: "italic", opacity: 0.85 }, children: "Cancelled by you" })
|
|
13364
13411
|
}
|
|
13365
13412
|
),
|
|
13366
|
-
showMemoryUpdated && /* @__PURE__ */ (0,
|
|
13367
|
-
|
|
13413
|
+
showMemoryUpdated && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
13414
|
+
import_material9.Box,
|
|
13368
13415
|
{
|
|
13369
13416
|
sx: {
|
|
13370
13417
|
position: "absolute",
|
|
@@ -13377,9 +13424,9 @@ ${sourcesMarkdownList.join("\n")}`;
|
|
|
13377
13424
|
zIndex: 1
|
|
13378
13425
|
},
|
|
13379
13426
|
children: [
|
|
13380
|
-
/* @__PURE__ */ (0,
|
|
13381
|
-
/* @__PURE__ */ (0,
|
|
13382
|
-
|
|
13427
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("img", { src: brainIcon, alt: "Memory", style: { width: 16, height: 16 } }),
|
|
13428
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
13429
|
+
import_material9.Typography,
|
|
13383
13430
|
{
|
|
13384
13431
|
variant: "caption",
|
|
13385
13432
|
sx: { color: chatResponse.memoryText || "#2e7d32", fontStyle: "italic" },
|
|
@@ -13389,7 +13436,7 @@ ${sourcesMarkdownList.join("\n")}`;
|
|
|
13389
13436
|
]
|
|
13390
13437
|
}
|
|
13391
13438
|
),
|
|
13392
|
-
/* @__PURE__ */ (0,
|
|
13439
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_material9.Box, { sx: { width: "100%", maxWidth: "100%" }, children: typeof response === "string" ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
13393
13440
|
import_react_markdown.default,
|
|
13394
13441
|
{
|
|
13395
13442
|
remarkPlugins: [import_remark_gfm.default],
|
|
@@ -13397,10 +13444,10 @@ ${sourcesMarkdownList.join("\n")}`;
|
|
|
13397
13444
|
components,
|
|
13398
13445
|
children: enrichedMarkdown ?? sanitizeMarkdown(response)
|
|
13399
13446
|
}
|
|
13400
|
-
) : import_react14.default.isValidElement(response) ? response : /* @__PURE__ */ (0,
|
|
13447
|
+
) : import_react14.default.isValidElement(response) ? response : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_material9.Typography, { color: "error", children: "\u26A0\uFE0F Invalid AI response" }) })
|
|
13401
13448
|
] }),
|
|
13402
|
-
!!(responseText || typeof response === "string" && response) && /* @__PURE__ */ (0,
|
|
13403
|
-
|
|
13449
|
+
!!(responseText || typeof response === "string" && response) && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
13450
|
+
import_material9.Box,
|
|
13404
13451
|
{
|
|
13405
13452
|
className: "ai-response-actions",
|
|
13406
13453
|
sx: revealActionsOnHover ? {
|
|
@@ -13408,16 +13455,16 @@ ${sourcesMarkdownList.join("\n")}`;
|
|
|
13408
13455
|
transition: "opacity 0.15s ease",
|
|
13409
13456
|
"&:focus-within": { opacity: 1 }
|
|
13410
13457
|
} : void 0,
|
|
13411
|
-
children: /* @__PURE__ */ (0,
|
|
13458
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ai_response_action_bar_default, { text: responseText || response })
|
|
13412
13459
|
}
|
|
13413
13460
|
),
|
|
13414
|
-
displaySourceFiles && displaySourceFiles.length > 0 && /* @__PURE__ */ (0,
|
|
13461
|
+
displaySourceFiles && displaySourceFiles.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_material9.Box, { sx: { mt: 1.5, display: "flex", gap: 2, flexWrap: "wrap", justifyContent: "flex-start" }, children: displaySourceFiles.map((doc, idx) => {
|
|
13415
13462
|
debugLogger.debug("Rendering DocumentCard in AI response", {
|
|
13416
13463
|
index: idx,
|
|
13417
13464
|
id: doc.id,
|
|
13418
13465
|
name: doc.name
|
|
13419
13466
|
});
|
|
13420
|
-
return /* @__PURE__ */ (0,
|
|
13467
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
13421
13468
|
DocumentCard_default,
|
|
13422
13469
|
{
|
|
13423
13470
|
doc,
|
|
@@ -13432,8 +13479,8 @@ ${sourcesMarkdownList.join("\n")}`;
|
|
|
13432
13479
|
]
|
|
13433
13480
|
}
|
|
13434
13481
|
),
|
|
13435
|
-
/* @__PURE__ */ (0,
|
|
13436
|
-
|
|
13482
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_material9.Modal, { open: !!openImage, onClose: () => setOpenImage(null), children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
13483
|
+
import_material9.Box,
|
|
13437
13484
|
{
|
|
13438
13485
|
sx: {
|
|
13439
13486
|
display: "flex",
|
|
@@ -13445,8 +13492,8 @@ ${sourcesMarkdownList.join("\n")}`;
|
|
|
13445
13492
|
position: "relative"
|
|
13446
13493
|
},
|
|
13447
13494
|
children: [
|
|
13448
|
-
/* @__PURE__ */ (0,
|
|
13449
|
-
|
|
13495
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
13496
|
+
import_material9.IconButton,
|
|
13450
13497
|
{
|
|
13451
13498
|
onClick: () => setOpenImage(null),
|
|
13452
13499
|
sx: {
|
|
@@ -13459,11 +13506,11 @@ ${sourcesMarkdownList.join("\n")}`;
|
|
|
13459
13506
|
bgcolor: "rgba(255,255,255,0.2)"
|
|
13460
13507
|
}
|
|
13461
13508
|
},
|
|
13462
|
-
children: /* @__PURE__ */ (0,
|
|
13509
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(CloseIcon, {})
|
|
13463
13510
|
}
|
|
13464
13511
|
),
|
|
13465
|
-
/* @__PURE__ */ (0,
|
|
13466
|
-
|
|
13512
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
13513
|
+
import_material9.Box,
|
|
13467
13514
|
{
|
|
13468
13515
|
component: "img",
|
|
13469
13516
|
src: openImage || "",
|
|
@@ -13481,7 +13528,7 @@ ${sourcesMarkdownList.join("\n")}`;
|
|
|
13481
13528
|
]
|
|
13482
13529
|
}
|
|
13483
13530
|
) }),
|
|
13484
|
-
/* @__PURE__ */ (0,
|
|
13531
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
13485
13532
|
knowledge_file_modal_default,
|
|
13486
13533
|
{
|
|
13487
13534
|
open: !!openDoc,
|
|
@@ -13507,7 +13554,7 @@ init_indexedDBService();
|
|
|
13507
13554
|
|
|
13508
13555
|
// src/modals/chat-modal/chat-drawer.tsx
|
|
13509
13556
|
var import_react16 = __toESM(require("react"));
|
|
13510
|
-
var
|
|
13557
|
+
var import_material11 = require("@mui/material");
|
|
13511
13558
|
init_preferencesStore();
|
|
13512
13559
|
init_packageSettingsStore();
|
|
13513
13560
|
init_aiProviderStore();
|
|
@@ -13516,9 +13563,9 @@ init_modelStore();
|
|
|
13516
13563
|
// src/chat/memory-modal.tsx
|
|
13517
13564
|
var import_react15 = __toESM(require("react"));
|
|
13518
13565
|
var import_styles3 = require("@mui/material/styles");
|
|
13519
|
-
var
|
|
13566
|
+
var import_material10 = require("@mui/material");
|
|
13520
13567
|
init_debugLogger();
|
|
13521
|
-
var
|
|
13568
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
13522
13569
|
var MemoryModal = ({ open, onClose }) => {
|
|
13523
13570
|
const { entries, addMemory, togglePinMemory, removeMemory, clearMemories, hydrate, _hasHydrated } = useMemoryStore();
|
|
13524
13571
|
const isAdvancedVectorFeaturesEnabled = useConversationSyncStore(
|
|
@@ -13560,7 +13607,7 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
13560
13607
|
progress: ""
|
|
13561
13608
|
});
|
|
13562
13609
|
const theme = (0, import_styles3.useTheme)();
|
|
13563
|
-
const isMobileView = (0,
|
|
13610
|
+
const isMobileView = (0, import_material10.useMediaQuery)(theme.breakpoints.down("sm"));
|
|
13564
13611
|
const pulse = import_styles3.keyframes`
|
|
13565
13612
|
0% {
|
|
13566
13613
|
opacity: 1;
|
|
@@ -13911,8 +13958,8 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
13911
13958
|
setClearAllOpen(false);
|
|
13912
13959
|
};
|
|
13913
13960
|
const filteredMemories = getMemoriesForDisplay();
|
|
13914
|
-
const sheet = /* @__PURE__ */ (0,
|
|
13915
|
-
|
|
13961
|
+
const sheet = /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
13962
|
+
import_material10.Box,
|
|
13916
13963
|
{
|
|
13917
13964
|
sx: {
|
|
13918
13965
|
width: "100%",
|
|
@@ -13931,8 +13978,8 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
13931
13978
|
// Ensure it's on top
|
|
13932
13979
|
},
|
|
13933
13980
|
children: [
|
|
13934
|
-
isMobileView && /* @__PURE__ */ (0,
|
|
13935
|
-
|
|
13981
|
+
isMobileView && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
13982
|
+
import_material10.Box,
|
|
13936
13983
|
{
|
|
13937
13984
|
sx: {
|
|
13938
13985
|
height: 6,
|
|
@@ -13945,8 +13992,8 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
13945
13992
|
}
|
|
13946
13993
|
}
|
|
13947
13994
|
),
|
|
13948
|
-
/* @__PURE__ */ (0,
|
|
13949
|
-
|
|
13995
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
13996
|
+
import_material10.Box,
|
|
13950
13997
|
{
|
|
13951
13998
|
sx: {
|
|
13952
13999
|
flexShrink: 0,
|
|
@@ -13958,8 +14005,8 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
13958
14005
|
gap: isMobileView ? 0.9 : 1.25
|
|
13959
14006
|
},
|
|
13960
14007
|
children: [
|
|
13961
|
-
/* @__PURE__ */ (0,
|
|
13962
|
-
|
|
14008
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
14009
|
+
import_material10.Box,
|
|
13963
14010
|
{
|
|
13964
14011
|
sx: {
|
|
13965
14012
|
width: "100%",
|
|
@@ -13970,10 +14017,10 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
13970
14017
|
flexWrap: "wrap"
|
|
13971
14018
|
},
|
|
13972
14019
|
children: [
|
|
13973
|
-
/* @__PURE__ */ (0,
|
|
13974
|
-
/* @__PURE__ */ (0,
|
|
13975
|
-
shouldUseVectorForMemories && /* @__PURE__ */ (0,
|
|
13976
|
-
|
|
14020
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_material10.Box, { sx: { display: "flex", alignItems: "center", gap: 0.75 }, children: [
|
|
14021
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material10.Typography, { variant: "h6", sx: { fontWeight: 600 }, children: "Memory" }),
|
|
14022
|
+
shouldUseVectorForMemories && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material10.Tooltip, { title: "Memories stay in your private knowledge space for faster, more accurate answers.", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
14023
|
+
import_material10.Typography,
|
|
13977
14024
|
{
|
|
13978
14025
|
variant: "caption",
|
|
13979
14026
|
sx: {
|
|
@@ -13991,8 +14038,8 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
13991
14038
|
}
|
|
13992
14039
|
) })
|
|
13993
14040
|
] }),
|
|
13994
|
-
/* @__PURE__ */ (0,
|
|
13995
|
-
|
|
14041
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
14042
|
+
import_material10.Box,
|
|
13996
14043
|
{
|
|
13997
14044
|
sx: {
|
|
13998
14045
|
display: "flex",
|
|
@@ -14002,13 +14049,13 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
14002
14049
|
flexWrap: "wrap"
|
|
14003
14050
|
},
|
|
14004
14051
|
children: [
|
|
14005
|
-
multiSelectMode ? /* @__PURE__ */ (0,
|
|
14006
|
-
/* @__PURE__ */ (0,
|
|
14052
|
+
multiSelectMode ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
|
|
14053
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_material10.Typography, { variant: "caption", sx: { color: theme.palette.text.secondary, mr: 0.5 }, children: [
|
|
14007
14054
|
selectedIds.length,
|
|
14008
14055
|
" selected"
|
|
14009
14056
|
] }),
|
|
14010
|
-
/* @__PURE__ */ (0,
|
|
14011
|
-
|
|
14057
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
14058
|
+
import_material10.Button,
|
|
14012
14059
|
{
|
|
14013
14060
|
variant: "outlined",
|
|
14014
14061
|
size: "small",
|
|
@@ -14020,9 +14067,9 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
14020
14067
|
children: "Cancel"
|
|
14021
14068
|
}
|
|
14022
14069
|
),
|
|
14023
|
-
selectedIds.length > 0 && /* @__PURE__ */ (0,
|
|
14024
|
-
/* @__PURE__ */ (0,
|
|
14025
|
-
|
|
14070
|
+
selectedIds.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
|
|
14071
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
14072
|
+
import_material10.Button,
|
|
14026
14073
|
{
|
|
14027
14074
|
variant: "outlined",
|
|
14028
14075
|
size: "small",
|
|
@@ -14036,8 +14083,8 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
14036
14083
|
]
|
|
14037
14084
|
}
|
|
14038
14085
|
),
|
|
14039
|
-
/* @__PURE__ */ (0,
|
|
14040
|
-
|
|
14086
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
14087
|
+
import_material10.Button,
|
|
14041
14088
|
{
|
|
14042
14089
|
variant: "outlined",
|
|
14043
14090
|
size: "small",
|
|
@@ -14050,8 +14097,8 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
14050
14097
|
]
|
|
14051
14098
|
}
|
|
14052
14099
|
),
|
|
14053
|
-
/* @__PURE__ */ (0,
|
|
14054
|
-
|
|
14100
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
14101
|
+
import_material10.Button,
|
|
14055
14102
|
{
|
|
14056
14103
|
variant: "contained",
|
|
14057
14104
|
size: "small",
|
|
@@ -14066,9 +14113,9 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
14066
14113
|
}
|
|
14067
14114
|
)
|
|
14068
14115
|
] })
|
|
14069
|
-
] }) : filteredMemories.length > 0 && /* @__PURE__ */ (0,
|
|
14070
|
-
/* @__PURE__ */ (0,
|
|
14071
|
-
|
|
14116
|
+
] }) : filteredMemories.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
|
|
14117
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
14118
|
+
import_material10.Button,
|
|
14072
14119
|
{
|
|
14073
14120
|
variant: "outlined",
|
|
14074
14121
|
size: "small",
|
|
@@ -14077,20 +14124,20 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
14077
14124
|
children: "Clear All"
|
|
14078
14125
|
}
|
|
14079
14126
|
),
|
|
14080
|
-
isVectorEnabled && entries.length > 0 && /* @__PURE__ */ (0,
|
|
14081
|
-
|
|
14127
|
+
isVectorEnabled && entries.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
14128
|
+
import_material10.Button,
|
|
14082
14129
|
{
|
|
14083
14130
|
variant: "outlined",
|
|
14084
14131
|
size: "small",
|
|
14085
14132
|
color: "primary",
|
|
14086
14133
|
onClick: () => setBulkImportOpen(true),
|
|
14087
|
-
startIcon: /* @__PURE__ */ (0,
|
|
14134
|
+
startIcon: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(CloudSyncIcon, {}),
|
|
14088
14135
|
sx: { textTransform: "none", borderRadius: 2, fontSize: "0.75rem" },
|
|
14089
14136
|
children: "Import to workspace"
|
|
14090
14137
|
}
|
|
14091
14138
|
),
|
|
14092
|
-
/* @__PURE__ */ (0,
|
|
14093
|
-
|
|
14139
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
14140
|
+
import_material10.Button,
|
|
14094
14141
|
{
|
|
14095
14142
|
variant: "outlined",
|
|
14096
14143
|
size: "small",
|
|
@@ -14104,8 +14151,8 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
14104
14151
|
}
|
|
14105
14152
|
)
|
|
14106
14153
|
] }),
|
|
14107
|
-
!multiSelectMode && isMobileView && /* @__PURE__ */ (0,
|
|
14108
|
-
|
|
14154
|
+
!multiSelectMode && isMobileView && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
14155
|
+
import_material10.Button,
|
|
14109
14156
|
{
|
|
14110
14157
|
variant: "contained",
|
|
14111
14158
|
size: "small",
|
|
@@ -14120,8 +14167,8 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
14120
14167
|
children: "Save"
|
|
14121
14168
|
}
|
|
14122
14169
|
),
|
|
14123
|
-
/* @__PURE__ */ (0,
|
|
14124
|
-
|
|
14170
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
14171
|
+
import_material10.IconButton,
|
|
14125
14172
|
{
|
|
14126
14173
|
onClick: onClose,
|
|
14127
14174
|
sx: {
|
|
@@ -14130,7 +14177,7 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
14130
14177
|
borderRadius: 2
|
|
14131
14178
|
},
|
|
14132
14179
|
size: "small",
|
|
14133
|
-
children: /* @__PURE__ */ (0,
|
|
14180
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(CloseIcon, { fontSize: "small" })
|
|
14134
14181
|
}
|
|
14135
14182
|
)
|
|
14136
14183
|
]
|
|
@@ -14139,8 +14186,8 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
14139
14186
|
]
|
|
14140
14187
|
}
|
|
14141
14188
|
),
|
|
14142
|
-
/* @__PURE__ */ (0,
|
|
14143
|
-
|
|
14189
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
14190
|
+
import_material10.Box,
|
|
14144
14191
|
{
|
|
14145
14192
|
sx: {
|
|
14146
14193
|
display: "flex",
|
|
@@ -14149,8 +14196,8 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
14149
14196
|
color: theme.palette.text.secondary
|
|
14150
14197
|
},
|
|
14151
14198
|
children: [
|
|
14152
|
-
/* @__PURE__ */ (0,
|
|
14153
|
-
|
|
14199
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
14200
|
+
import_material10.Typography,
|
|
14154
14201
|
{
|
|
14155
14202
|
variant: "caption",
|
|
14156
14203
|
sx: {
|
|
@@ -14165,8 +14212,8 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
14165
14212
|
children: shouldUseVectorForMemories ? "Cloud memory" : "Local memory"
|
|
14166
14213
|
}
|
|
14167
14214
|
),
|
|
14168
|
-
filteredMemories.length > 0 && /* @__PURE__ */ (0,
|
|
14169
|
-
|
|
14215
|
+
filteredMemories.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
14216
|
+
import_material10.Typography,
|
|
14170
14217
|
{
|
|
14171
14218
|
variant: "caption",
|
|
14172
14219
|
sx: {
|
|
@@ -14191,7 +14238,7 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
14191
14238
|
]
|
|
14192
14239
|
}
|
|
14193
14240
|
),
|
|
14194
|
-
shouldUseVectorForMemories && /* @__PURE__ */ (0,
|
|
14241
|
+
shouldUseVectorForMemories && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_material10.Box, { sx: {
|
|
14195
14242
|
flexShrink: 0,
|
|
14196
14243
|
mx: isMobileView ? 1.5 : 2,
|
|
14197
14244
|
mt: 1,
|
|
@@ -14205,7 +14252,7 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
14205
14252
|
position: "relative",
|
|
14206
14253
|
overflow: "hidden"
|
|
14207
14254
|
}, children: [
|
|
14208
|
-
/* @__PURE__ */ (0,
|
|
14255
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material10.Box, { sx: {
|
|
14209
14256
|
position: "absolute",
|
|
14210
14257
|
top: 0,
|
|
14211
14258
|
left: "-100%",
|
|
@@ -14214,7 +14261,7 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
14214
14261
|
background: `linear-gradient(90deg, transparent, ${(0, import_styles3.alpha)(theme.palette.primary.main, 0.1)}, transparent)`,
|
|
14215
14262
|
animation: `${shimmer} 3s infinite`
|
|
14216
14263
|
} }),
|
|
14217
|
-
/* @__PURE__ */ (0,
|
|
14264
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material10.Box, { sx: {
|
|
14218
14265
|
width: 8,
|
|
14219
14266
|
height: 8,
|
|
14220
14267
|
borderRadius: "50%",
|
|
@@ -14222,24 +14269,24 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
14222
14269
|
animation: `${pulse} 2s infinite`,
|
|
14223
14270
|
zIndex: 1
|
|
14224
14271
|
} }),
|
|
14225
|
-
/* @__PURE__ */ (0,
|
|
14272
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material10.Typography, { variant: "body2", sx: {
|
|
14226
14273
|
color: theme.palette.primary.main,
|
|
14227
14274
|
fontSize: "0.8rem",
|
|
14228
14275
|
fontWeight: 500,
|
|
14229
14276
|
zIndex: 1
|
|
14230
14277
|
}, children: "Cloud memory \xB7 synced to your account" })
|
|
14231
14278
|
] }),
|
|
14232
|
-
/* @__PURE__ */ (0,
|
|
14233
|
-
/* @__PURE__ */ (0,
|
|
14234
|
-
|
|
14279
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_material10.Box, { sx: { flexShrink: 0 }, children: [
|
|
14280
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material10.Box, { sx: { px: isMobileView ? 1.5 : 2, py: isMobileView ? 1.25 : 1.5 }, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
14281
|
+
import_material10.Typography,
|
|
14235
14282
|
{
|
|
14236
14283
|
variant: "body2",
|
|
14237
14284
|
sx: { color: theme.palette.text.secondary, fontSize: "0.85rem", textAlign: isMobileView ? "left" : "center" },
|
|
14238
14285
|
children: shouldUseVectorForMemories ? "Synced to your account for quick recall." : "Private and local. You decide what's remembered."
|
|
14239
14286
|
}
|
|
14240
14287
|
) }),
|
|
14241
|
-
/* @__PURE__ */ (0,
|
|
14242
|
-
|
|
14288
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
14289
|
+
import_material10.Tabs,
|
|
14243
14290
|
{
|
|
14244
14291
|
value: selectedTab,
|
|
14245
14292
|
onChange: (_, val) => setSelectedTab(val),
|
|
@@ -14259,12 +14306,12 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
14259
14306
|
}
|
|
14260
14307
|
},
|
|
14261
14308
|
children: [
|
|
14262
|
-
/* @__PURE__ */ (0,
|
|
14263
|
-
|
|
14309
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
14310
|
+
import_material10.Tab,
|
|
14264
14311
|
{
|
|
14265
|
-
label: /* @__PURE__ */ (0,
|
|
14312
|
+
label: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_material10.Box, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
14266
14313
|
"User",
|
|
14267
|
-
getUserMemoryCount() > 0 && /* @__PURE__ */ (0,
|
|
14314
|
+
getUserMemoryCount() > 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material10.Typography, { variant: "caption", sx: {
|
|
14268
14315
|
bgcolor: (0, import_styles3.alpha)(theme.palette.primary.main, 0.2),
|
|
14269
14316
|
color: theme.palette.primary.main,
|
|
14270
14317
|
px: 0.75,
|
|
@@ -14277,12 +14324,12 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
14277
14324
|
value: "user"
|
|
14278
14325
|
}
|
|
14279
14326
|
),
|
|
14280
|
-
/* @__PURE__ */ (0,
|
|
14281
|
-
|
|
14327
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
14328
|
+
import_material10.Tab,
|
|
14282
14329
|
{
|
|
14283
|
-
label: /* @__PURE__ */ (0,
|
|
14330
|
+
label: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_material10.Box, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
14284
14331
|
"Auto",
|
|
14285
|
-
getAutoMemoryCount() > 0 && /* @__PURE__ */ (0,
|
|
14332
|
+
getAutoMemoryCount() > 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material10.Typography, { variant: "caption", sx: {
|
|
14286
14333
|
bgcolor: (0, import_styles3.alpha)(theme.palette.secondary.main, 0.2),
|
|
14287
14334
|
color: theme.palette.secondary.main,
|
|
14288
14335
|
px: 0.75,
|
|
@@ -14299,8 +14346,8 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
14299
14346
|
}
|
|
14300
14347
|
)
|
|
14301
14348
|
] }),
|
|
14302
|
-
/* @__PURE__ */ (0,
|
|
14303
|
-
|
|
14349
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
14350
|
+
import_material10.Box,
|
|
14304
14351
|
{
|
|
14305
14352
|
sx: {
|
|
14306
14353
|
flexGrow: 1,
|
|
@@ -14308,7 +14355,7 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
14308
14355
|
px: isMobileView ? 1.5 : 2,
|
|
14309
14356
|
py: isMobileView ? 1 : 1
|
|
14310
14357
|
},
|
|
14311
|
-
children: filteredMemories.length === 0 ? /* @__PURE__ */ (0,
|
|
14358
|
+
children: filteredMemories.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_material10.Box, { sx: {
|
|
14312
14359
|
display: "flex",
|
|
14313
14360
|
flexDirection: "column",
|
|
14314
14361
|
alignItems: "center",
|
|
@@ -14316,7 +14363,7 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
14316
14363
|
height: "200px",
|
|
14317
14364
|
textAlign: "center"
|
|
14318
14365
|
}, children: [
|
|
14319
|
-
/* @__PURE__ */ (0,
|
|
14366
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_material10.Typography, { variant: "h6", sx: {
|
|
14320
14367
|
color: theme.palette.text.secondary,
|
|
14321
14368
|
mb: 1,
|
|
14322
14369
|
fontSize: "1.1rem"
|
|
@@ -14325,15 +14372,15 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
14325
14372
|
selectedTab,
|
|
14326
14373
|
" memories yet"
|
|
14327
14374
|
] }),
|
|
14328
|
-
/* @__PURE__ */ (0,
|
|
14375
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material10.Typography, { variant: "body2", sx: {
|
|
14329
14376
|
color: (0, import_styles3.alpha)(theme.palette.text.secondary, 0.7),
|
|
14330
14377
|
maxWidth: 280
|
|
14331
14378
|
}, children: selectedTab === "user" ? shouldUseVectorForMemories ? "Start by adding something you'd like me to remember. Your memories will be kept in a private workspace for quick recall." : "Start by adding something you'd like me to remember about you or your preferences." : shouldUseVectorForMemories ? "Auto memories are created automatically based on our conversations and kept in your private workspace for better answers." : "Auto memories are created automatically based on our conversations." })
|
|
14332
14379
|
] }) : filteredMemories.map((memory) => {
|
|
14333
14380
|
const isSelected = selectedIds.includes(memory.id);
|
|
14334
|
-
return /* @__PURE__ */ (0,
|
|
14335
|
-
/* @__PURE__ */ (0,
|
|
14336
|
-
|
|
14381
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react15.default.Fragment, { children: [
|
|
14382
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material10.List, { sx: { listStyle: "none", pl: 0, m: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
14383
|
+
import_material10.ListItem,
|
|
14337
14384
|
{
|
|
14338
14385
|
onClick: () => multiSelectMode && toggleSelection(memory.id),
|
|
14339
14386
|
sx: {
|
|
@@ -14353,8 +14400,8 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
14353
14400
|
}
|
|
14354
14401
|
},
|
|
14355
14402
|
children: [
|
|
14356
|
-
/* @__PURE__ */ (0,
|
|
14357
|
-
|
|
14403
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
14404
|
+
import_material10.Box,
|
|
14358
14405
|
{
|
|
14359
14406
|
sx: {
|
|
14360
14407
|
display: "flex",
|
|
@@ -14363,8 +14410,8 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
14363
14410
|
gap: 1.5
|
|
14364
14411
|
},
|
|
14365
14412
|
children: [
|
|
14366
|
-
/* @__PURE__ */ (0,
|
|
14367
|
-
|
|
14413
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
14414
|
+
import_material10.Avatar,
|
|
14368
14415
|
{
|
|
14369
14416
|
src: "https://cdn.burtson.ai/images/brain-icon.png",
|
|
14370
14417
|
alt: "Memory",
|
|
@@ -14376,7 +14423,7 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
14376
14423
|
border: isVectorEnabled ? `2px solid ${(0, import_styles3.alpha)(theme.palette.primary.main, 0.4)}` : `1px solid ${theme.palette.divider}`,
|
|
14377
14424
|
position: "relative"
|
|
14378
14425
|
},
|
|
14379
|
-
children: isVectorEnabled && /* @__PURE__ */ (0,
|
|
14426
|
+
children: isVectorEnabled && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material10.Box, { sx: {
|
|
14380
14427
|
position: "absolute",
|
|
14381
14428
|
top: -2,
|
|
14382
14429
|
right: -2,
|
|
@@ -14393,8 +14440,8 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
14393
14440
|
}, children: "\u26A1" })
|
|
14394
14441
|
}
|
|
14395
14442
|
),
|
|
14396
|
-
editingId === memory.id ? /* @__PURE__ */ (0,
|
|
14397
|
-
|
|
14443
|
+
editingId === memory.id ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
14444
|
+
import_material10.TextField,
|
|
14398
14445
|
{
|
|
14399
14446
|
fullWidth: true,
|
|
14400
14447
|
multiline: true,
|
|
@@ -14440,9 +14487,9 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
14440
14487
|
},
|
|
14441
14488
|
helperText: "Press Cmd/Ctrl+Enter to save, Escape to cancel"
|
|
14442
14489
|
}
|
|
14443
|
-
) : /* @__PURE__ */ (0,
|
|
14444
|
-
/* @__PURE__ */ (0,
|
|
14445
|
-
|
|
14490
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_material10.Box, { sx: { flex: 1 }, children: [
|
|
14491
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
14492
|
+
import_material10.Typography,
|
|
14446
14493
|
{
|
|
14447
14494
|
sx: {
|
|
14448
14495
|
cursor: !multiSelectMode && !shouldUseVectorForMemories ? "pointer" : "default",
|
|
@@ -14463,7 +14510,7 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
14463
14510
|
children: memory.content
|
|
14464
14511
|
}
|
|
14465
14512
|
),
|
|
14466
|
-
memory.pinned && /* @__PURE__ */ (0,
|
|
14513
|
+
memory.pinned && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material10.Typography, { variant: "caption", sx: {
|
|
14467
14514
|
color: (0, import_styles3.alpha)(theme.palette.secondary.main, 0.7),
|
|
14468
14515
|
fontStyle: "italic",
|
|
14469
14516
|
mt: 0.5,
|
|
@@ -14473,9 +14520,9 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
14473
14520
|
]
|
|
14474
14521
|
}
|
|
14475
14522
|
),
|
|
14476
|
-
!multiSelectMode && /* @__PURE__ */ (0,
|
|
14477
|
-
/* @__PURE__ */ (0,
|
|
14478
|
-
|
|
14523
|
+
!multiSelectMode && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_material10.Box, { sx: { display: "flex", gap: 0.5, mt: 0.5 }, children: [
|
|
14524
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material10.Tooltip, { title: memory.pinned ? "Unpin memory" : "Pin memory", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
14525
|
+
import_material10.IconButton,
|
|
14479
14526
|
{
|
|
14480
14527
|
onClick: async () => {
|
|
14481
14528
|
if (shouldUseVectorForMemories) {
|
|
@@ -14507,11 +14554,11 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
14507
14554
|
}
|
|
14508
14555
|
},
|
|
14509
14556
|
size: "small",
|
|
14510
|
-
children: memory.pinned ? /* @__PURE__ */ (0,
|
|
14557
|
+
children: memory.pinned ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(PushPinIcon, { fontSize: "small" }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(PushPinOutlinedIcon, { fontSize: "small" })
|
|
14511
14558
|
}
|
|
14512
14559
|
) }),
|
|
14513
|
-
/* @__PURE__ */ (0,
|
|
14514
|
-
|
|
14560
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material10.Tooltip, { title: "Delete memory", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
14561
|
+
import_material10.IconButton,
|
|
14515
14562
|
{
|
|
14516
14563
|
onClick: async () => await handleDeleteMemory(memory.id),
|
|
14517
14564
|
sx: {
|
|
@@ -14522,20 +14569,20 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
14522
14569
|
}
|
|
14523
14570
|
},
|
|
14524
14571
|
size: "small",
|
|
14525
|
-
children: /* @__PURE__ */ (0,
|
|
14572
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(DeleteIcon, { fontSize: "small" })
|
|
14526
14573
|
}
|
|
14527
14574
|
) })
|
|
14528
14575
|
] })
|
|
14529
14576
|
]
|
|
14530
14577
|
}
|
|
14531
14578
|
) }),
|
|
14532
|
-
filteredMemories.indexOf(memory) < filteredMemories.length - 1 && /* @__PURE__ */ (0,
|
|
14579
|
+
filteredMemories.indexOf(memory) < filteredMemories.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material10.Divider, { sx: { bgcolor: (0, import_styles3.alpha)(appBar.border, 0.5), my: 0.5 } })
|
|
14533
14580
|
] }, memory.id);
|
|
14534
14581
|
})
|
|
14535
14582
|
}
|
|
14536
14583
|
),
|
|
14537
|
-
multiSelectMode && /* @__PURE__ */ (0,
|
|
14538
|
-
|
|
14584
|
+
multiSelectMode && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
14585
|
+
import_material10.Box,
|
|
14539
14586
|
{
|
|
14540
14587
|
sx: {
|
|
14541
14588
|
p: isMobileView ? 1.5 : 2,
|
|
@@ -14543,13 +14590,13 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
14543
14590
|
bgcolor: (0, import_styles3.alpha)(theme.palette.error.main, 0.05),
|
|
14544
14591
|
borderBottom: selectedIds.length > 0 ? `2px solid ${(0, import_styles3.alpha)(theme.palette.error.main, 0.2)}` : void 0
|
|
14545
14592
|
},
|
|
14546
|
-
children: selectedIds.length === 0 ? /* @__PURE__ */ (0,
|
|
14593
|
+
children: selectedIds.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material10.Typography, { variant: "body2", sx: {
|
|
14547
14594
|
textAlign: "center",
|
|
14548
14595
|
color: theme.palette.text.secondary,
|
|
14549
14596
|
fontStyle: "italic"
|
|
14550
|
-
}, children: "Tap memories to select them for deletion" }) : /* @__PURE__ */ (0,
|
|
14551
|
-
/* @__PURE__ */ (0,
|
|
14552
|
-
|
|
14597
|
+
}, children: "Tap memories to select them for deletion" }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_material10.Box, { sx: { display: "flex", gap: 1, alignItems: "center" }, children: [
|
|
14598
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
14599
|
+
import_material10.Button,
|
|
14553
14600
|
{
|
|
14554
14601
|
variant: "outlined",
|
|
14555
14602
|
onClick: () => {
|
|
@@ -14564,8 +14611,8 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
14564
14611
|
children: "Select All"
|
|
14565
14612
|
}
|
|
14566
14613
|
),
|
|
14567
|
-
/* @__PURE__ */ (0,
|
|
14568
|
-
|
|
14614
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
14615
|
+
import_material10.Button,
|
|
14569
14616
|
{
|
|
14570
14617
|
fullWidth: true,
|
|
14571
14618
|
variant: "contained",
|
|
@@ -14582,8 +14629,8 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
14582
14629
|
] })
|
|
14583
14630
|
}
|
|
14584
14631
|
),
|
|
14585
|
-
/* @__PURE__ */ (0,
|
|
14586
|
-
|
|
14632
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
14633
|
+
import_material10.Box,
|
|
14587
14634
|
{
|
|
14588
14635
|
sx: {
|
|
14589
14636
|
flexShrink: 0,
|
|
@@ -14593,8 +14640,8 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
14593
14640
|
pb: `calc(env(safe-area-inset-bottom, 0px) + 8px)`
|
|
14594
14641
|
},
|
|
14595
14642
|
children: [
|
|
14596
|
-
/* @__PURE__ */ (0,
|
|
14597
|
-
|
|
14643
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
14644
|
+
import_material10.TextField,
|
|
14598
14645
|
{
|
|
14599
14646
|
fullWidth: true,
|
|
14600
14647
|
size: "small",
|
|
@@ -14639,7 +14686,7 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
14639
14686
|
mb: 1.5
|
|
14640
14687
|
},
|
|
14641
14688
|
InputProps: {
|
|
14642
|
-
endAdornment: newMemory.trim() && /* @__PURE__ */ (0,
|
|
14689
|
+
endAdornment: newMemory.trim() && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material10.Typography, { variant: "caption", sx: {
|
|
14643
14690
|
color: (0, import_styles3.alpha)(theme.palette.text.secondary, 0.7),
|
|
14644
14691
|
fontSize: "0.7rem",
|
|
14645
14692
|
whiteSpace: "nowrap"
|
|
@@ -14647,8 +14694,8 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
14647
14694
|
}
|
|
14648
14695
|
}
|
|
14649
14696
|
),
|
|
14650
|
-
!isMobileView && /* @__PURE__ */ (0,
|
|
14651
|
-
|
|
14697
|
+
!isMobileView && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
14698
|
+
import_material10.Button,
|
|
14652
14699
|
{
|
|
14653
14700
|
fullWidth: true,
|
|
14654
14701
|
variant: "contained",
|
|
@@ -14666,8 +14713,8 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
14666
14713
|
]
|
|
14667
14714
|
}
|
|
14668
14715
|
),
|
|
14669
|
-
/* @__PURE__ */ (0,
|
|
14670
|
-
|
|
14716
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
14717
|
+
import_material10.Dialog,
|
|
14671
14718
|
{
|
|
14672
14719
|
open: confirmOpen,
|
|
14673
14720
|
onClose: () => setConfirmOpen(false),
|
|
@@ -14679,25 +14726,25 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
14679
14726
|
sx: { borderRadius: 3, minWidth: 320 }
|
|
14680
14727
|
},
|
|
14681
14728
|
children: [
|
|
14682
|
-
/* @__PURE__ */ (0,
|
|
14729
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_material10.DialogTitle, { sx: { pb: 1 }, children: [
|
|
14683
14730
|
"Delete ",
|
|
14684
14731
|
selectedIds.length,
|
|
14685
14732
|
" ",
|
|
14686
14733
|
selectedIds.length === 1 ? "Memory" : "Memories",
|
|
14687
14734
|
"?"
|
|
14688
14735
|
] }),
|
|
14689
|
-
/* @__PURE__ */ (0,
|
|
14690
|
-
/* @__PURE__ */ (0,
|
|
14691
|
-
/* @__PURE__ */ (0,
|
|
14692
|
-
|
|
14736
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material10.DialogContent, { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material10.Typography, { variant: "body2", sx: { color: theme.palette.text.secondary }, children: "This will permanently remove the selected memory entries. This action cannot be undone." }) }),
|
|
14737
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_material10.DialogActions, { sx: { p: 3, pt: 1 }, children: [
|
|
14738
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
14739
|
+
import_material10.Button,
|
|
14693
14740
|
{
|
|
14694
14741
|
onClick: () => setConfirmOpen(false),
|
|
14695
14742
|
sx: { textTransform: "none", borderRadius: 3 },
|
|
14696
14743
|
children: "Cancel"
|
|
14697
14744
|
}
|
|
14698
14745
|
),
|
|
14699
|
-
/* @__PURE__ */ (0,
|
|
14700
|
-
|
|
14746
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
14747
|
+
import_material10.Button,
|
|
14701
14748
|
{
|
|
14702
14749
|
onClick: handleMultiDelete,
|
|
14703
14750
|
color: "error",
|
|
@@ -14714,8 +14761,8 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
14714
14761
|
]
|
|
14715
14762
|
}
|
|
14716
14763
|
),
|
|
14717
|
-
/* @__PURE__ */ (0,
|
|
14718
|
-
|
|
14764
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
14765
|
+
import_material10.Dialog,
|
|
14719
14766
|
{
|
|
14720
14767
|
open: clearAllOpen,
|
|
14721
14768
|
onClose: () => setClearAllOpen(false),
|
|
@@ -14727,23 +14774,23 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
14727
14774
|
sx: { borderRadius: 3, minWidth: 320 }
|
|
14728
14775
|
},
|
|
14729
14776
|
children: [
|
|
14730
|
-
/* @__PURE__ */ (0,
|
|
14731
|
-
/* @__PURE__ */ (0,
|
|
14732
|
-
/* @__PURE__ */ (0,
|
|
14733
|
-
/* @__PURE__ */ (0,
|
|
14734
|
-
|
|
14777
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material10.DialogTitle, { sx: { pb: 1, fontWeight: 600 }, children: "Clear Memories" }),
|
|
14778
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_material10.DialogContent, { sx: { pb: 2 }, children: [
|
|
14779
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material10.Typography, { variant: "body2", sx: { mb: 3, color: theme.palette.text.secondary }, children: "This will permanently remove selected memory types. Choose which ones to clear:" }),
|
|
14780
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material10.FormControl, { component: "fieldset", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
14781
|
+
import_material10.RadioGroup,
|
|
14735
14782
|
{
|
|
14736
14783
|
value: clearOption,
|
|
14737
14784
|
onChange: (e) => setClearOption(e.target.value),
|
|
14738
14785
|
children: [
|
|
14739
|
-
/* @__PURE__ */ (0,
|
|
14740
|
-
|
|
14786
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
14787
|
+
import_material10.FormControlLabel,
|
|
14741
14788
|
{
|
|
14742
14789
|
value: "user",
|
|
14743
|
-
control: /* @__PURE__ */ (0,
|
|
14744
|
-
label: /* @__PURE__ */ (0,
|
|
14745
|
-
/* @__PURE__ */ (0,
|
|
14746
|
-
/* @__PURE__ */ (0,
|
|
14790
|
+
control: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material10.Radio, {}),
|
|
14791
|
+
label: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_material10.Box, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
14792
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material10.Typography, { children: "User Memories" }),
|
|
14793
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material10.Typography, { variant: "caption", sx: {
|
|
14747
14794
|
bgcolor: (0, import_styles3.alpha)(theme.palette.primary.main, 0.1),
|
|
14748
14795
|
color: theme.palette.primary.main,
|
|
14749
14796
|
px: 1,
|
|
@@ -14754,14 +14801,14 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
14754
14801
|
] })
|
|
14755
14802
|
}
|
|
14756
14803
|
),
|
|
14757
|
-
/* @__PURE__ */ (0,
|
|
14758
|
-
|
|
14804
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
14805
|
+
import_material10.FormControlLabel,
|
|
14759
14806
|
{
|
|
14760
14807
|
value: "auto",
|
|
14761
|
-
control: /* @__PURE__ */ (0,
|
|
14762
|
-
label: /* @__PURE__ */ (0,
|
|
14763
|
-
/* @__PURE__ */ (0,
|
|
14764
|
-
/* @__PURE__ */ (0,
|
|
14808
|
+
control: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material10.Radio, {}),
|
|
14809
|
+
label: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_material10.Box, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
14810
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material10.Typography, { children: "Auto Memories" }),
|
|
14811
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material10.Typography, { variant: "caption", sx: {
|
|
14765
14812
|
bgcolor: (0, import_styles3.alpha)(theme.palette.secondary.main, 0.1),
|
|
14766
14813
|
color: theme.palette.secondary.main,
|
|
14767
14814
|
px: 1,
|
|
@@ -14772,14 +14819,14 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
14772
14819
|
] })
|
|
14773
14820
|
}
|
|
14774
14821
|
),
|
|
14775
|
-
/* @__PURE__ */ (0,
|
|
14776
|
-
|
|
14822
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
14823
|
+
import_material10.FormControlLabel,
|
|
14777
14824
|
{
|
|
14778
14825
|
value: "both",
|
|
14779
|
-
control: /* @__PURE__ */ (0,
|
|
14780
|
-
label: /* @__PURE__ */ (0,
|
|
14781
|
-
/* @__PURE__ */ (0,
|
|
14782
|
-
/* @__PURE__ */ (0,
|
|
14826
|
+
control: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material10.Radio, {}),
|
|
14827
|
+
label: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_material10.Box, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
14828
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material10.Typography, { children: "Both Types" }),
|
|
14829
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material10.Typography, { variant: "caption", sx: {
|
|
14783
14830
|
bgcolor: (0, import_styles3.alpha)(theme.palette.error.main, 0.1),
|
|
14784
14831
|
color: theme.palette.error.main,
|
|
14785
14832
|
px: 1,
|
|
@@ -14794,17 +14841,17 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
14794
14841
|
}
|
|
14795
14842
|
) })
|
|
14796
14843
|
] }),
|
|
14797
|
-
/* @__PURE__ */ (0,
|
|
14798
|
-
/* @__PURE__ */ (0,
|
|
14799
|
-
|
|
14844
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_material10.DialogActions, { sx: { p: 3, pt: 1 }, children: [
|
|
14845
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
14846
|
+
import_material10.Button,
|
|
14800
14847
|
{
|
|
14801
14848
|
onClick: () => setClearAllOpen(false),
|
|
14802
14849
|
sx: { textTransform: "none", borderRadius: 3 },
|
|
14803
14850
|
children: "Cancel"
|
|
14804
14851
|
}
|
|
14805
14852
|
),
|
|
14806
|
-
/* @__PURE__ */ (0,
|
|
14807
|
-
|
|
14853
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
14854
|
+
import_material10.Button,
|
|
14808
14855
|
{
|
|
14809
14856
|
color: "error",
|
|
14810
14857
|
variant: "contained",
|
|
@@ -14821,8 +14868,8 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
14821
14868
|
]
|
|
14822
14869
|
}
|
|
14823
14870
|
),
|
|
14824
|
-
/* @__PURE__ */ (0,
|
|
14825
|
-
|
|
14871
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
14872
|
+
import_material10.Dialog,
|
|
14826
14873
|
{
|
|
14827
14874
|
open: bulkImportOpen,
|
|
14828
14875
|
onClose: () => setBulkImportOpen(false),
|
|
@@ -14832,30 +14879,30 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
14832
14879
|
sx: { borderRadius: 3 }
|
|
14833
14880
|
},
|
|
14834
14881
|
children: [
|
|
14835
|
-
/* @__PURE__ */ (0,
|
|
14882
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_material10.DialogTitle, { sx: {
|
|
14836
14883
|
fontWeight: 600,
|
|
14837
14884
|
pb: 1,
|
|
14838
14885
|
display: "flex",
|
|
14839
14886
|
alignItems: "center",
|
|
14840
14887
|
gap: 1
|
|
14841
14888
|
}, children: [
|
|
14842
|
-
/* @__PURE__ */ (0,
|
|
14889
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(CloudSyncIcon, { color: "primary" }),
|
|
14843
14890
|
"Import Memories to Secure Workspace"
|
|
14844
14891
|
] }),
|
|
14845
|
-
/* @__PURE__ */ (0,
|
|
14846
|
-
/* @__PURE__ */ (0,
|
|
14892
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material10.DialogContent, { sx: { py: 2 }, children: !importProgress.isImporting ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_material10.Box, { children: [
|
|
14893
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_material10.Typography, { variant: "body2", color: "text.secondary", sx: { mb: 2 }, children: [
|
|
14847
14894
|
"This will import all your local memories (",
|
|
14848
14895
|
entries.length,
|
|
14849
14896
|
" memories) to your secure workspace for faster, more reliable answers."
|
|
14850
14897
|
] }),
|
|
14851
|
-
/* @__PURE__ */ (0,
|
|
14852
|
-
/* @__PURE__ */ (0,
|
|
14898
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material10.Typography, { variant: "body2", color: "text.secondary", sx: { mb: 2 }, children: "\u2022 Memories will be added to your synced workspace \u2022 Local memories will remain unchanged \u2022 You can switch between synced and local storage anytime" }),
|
|
14899
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_material10.Typography, { variant: "body2", color: "primary", sx: { fontWeight: 500 }, children: [
|
|
14853
14900
|
"Ready to import ",
|
|
14854
14901
|
entries.length,
|
|
14855
14902
|
" memories?"
|
|
14856
14903
|
] })
|
|
14857
|
-
] }) : /* @__PURE__ */ (0,
|
|
14858
|
-
/* @__PURE__ */ (0,
|
|
14904
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_material10.Box, { sx: { textAlign: "center", py: 2 }, children: [
|
|
14905
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
14859
14906
|
CloudSyncIcon,
|
|
14860
14907
|
{
|
|
14861
14908
|
sx: {
|
|
@@ -14866,10 +14913,10 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
14866
14913
|
}
|
|
14867
14914
|
}
|
|
14868
14915
|
),
|
|
14869
|
-
/* @__PURE__ */ (0,
|
|
14870
|
-
importProgress.result && /* @__PURE__ */ (0,
|
|
14871
|
-
/* @__PURE__ */ (0,
|
|
14872
|
-
|
|
14916
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material10.Typography, { variant: "body1", sx: { mb: 1 }, children: importProgress.progress }),
|
|
14917
|
+
importProgress.result && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
|
|
14918
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
14919
|
+
import_material10.Typography,
|
|
14873
14920
|
{
|
|
14874
14921
|
variant: "body2",
|
|
14875
14922
|
color: importProgress.result.success ? "success.main" : "error.main",
|
|
@@ -14877,7 +14924,7 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
14877
14924
|
children: importProgress.result.message
|
|
14878
14925
|
}
|
|
14879
14926
|
),
|
|
14880
|
-
importProgress.result.details && /* @__PURE__ */ (0,
|
|
14927
|
+
importProgress.result.details && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_material10.Box, { sx: {
|
|
14881
14928
|
textAlign: "left",
|
|
14882
14929
|
backgroundColor: "background.paper",
|
|
14883
14930
|
border: 1,
|
|
@@ -14886,34 +14933,34 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
14886
14933
|
p: 2,
|
|
14887
14934
|
mt: 2
|
|
14888
14935
|
}, children: [
|
|
14889
|
-
/* @__PURE__ */ (0,
|
|
14890
|
-
/* @__PURE__ */ (0,
|
|
14936
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material10.Typography, { variant: "caption", color: "text.secondary", sx: { display: "block", mb: 1 }, children: "Import Details:" }),
|
|
14937
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_material10.Typography, { variant: "body2", sx: { mb: 0.5 }, children: [
|
|
14891
14938
|
"\u2022 Total: ",
|
|
14892
14939
|
importProgress.result.details.totalMemories,
|
|
14893
14940
|
" memories"
|
|
14894
14941
|
] }),
|
|
14895
|
-
/* @__PURE__ */ (0,
|
|
14942
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_material10.Typography, { variant: "body2", sx: { mb: 0.5 }, children: [
|
|
14896
14943
|
"\u2022 Success: ",
|
|
14897
14944
|
importProgress.result.details.successCount
|
|
14898
14945
|
] }),
|
|
14899
|
-
/* @__PURE__ */ (0,
|
|
14946
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_material10.Typography, { variant: "body2", sx: { mb: 0.5 }, children: [
|
|
14900
14947
|
"\u2022 Failed: ",
|
|
14901
14948
|
importProgress.result.details.failureCount
|
|
14902
14949
|
] }),
|
|
14903
|
-
/* @__PURE__ */ (0,
|
|
14950
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_material10.Typography, { variant: "body2", sx: { mb: 0.5 }, children: [
|
|
14904
14951
|
"\u2022 Duration: ",
|
|
14905
14952
|
importProgress.result.details.duration
|
|
14906
14953
|
] }),
|
|
14907
|
-
importProgress.result.details.warnings && importProgress.result.details.warnings.length > 0 && /* @__PURE__ */ (0,
|
|
14954
|
+
importProgress.result.details.warnings && importProgress.result.details.warnings.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_material10.Typography, { variant: "body2", color: "warning.main", sx: { mt: 1 }, children: [
|
|
14908
14955
|
"\u26A0\uFE0F ",
|
|
14909
14956
|
importProgress.result.details.warnings.join(", ")
|
|
14910
14957
|
] })
|
|
14911
14958
|
] })
|
|
14912
14959
|
] })
|
|
14913
14960
|
] }) }),
|
|
14914
|
-
/* @__PURE__ */ (0,
|
|
14915
|
-
/* @__PURE__ */ (0,
|
|
14916
|
-
|
|
14961
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_material10.DialogActions, { sx: { p: 3, pt: 1 }, children: [
|
|
14962
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
14963
|
+
import_material10.Button,
|
|
14917
14964
|
{
|
|
14918
14965
|
onClick: () => {
|
|
14919
14966
|
setBulkImportOpen(false);
|
|
@@ -14924,13 +14971,13 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
14924
14971
|
children: importProgress.isImporting ? "Importing..." : "Cancel"
|
|
14925
14972
|
}
|
|
14926
14973
|
),
|
|
14927
|
-
!importProgress.isImporting && !importProgress.result && /* @__PURE__ */ (0,
|
|
14928
|
-
|
|
14974
|
+
!importProgress.isImporting && !importProgress.result && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
14975
|
+
import_material10.Button,
|
|
14929
14976
|
{
|
|
14930
14977
|
color: "primary",
|
|
14931
14978
|
variant: "contained",
|
|
14932
14979
|
onClick: handleBulkImport,
|
|
14933
|
-
startIcon: /* @__PURE__ */ (0,
|
|
14980
|
+
startIcon: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(CloudSyncIcon, {}),
|
|
14934
14981
|
sx: { textTransform: "none", borderRadius: 3 },
|
|
14935
14982
|
children: [
|
|
14936
14983
|
"Import ",
|
|
@@ -14947,8 +14994,8 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
14947
14994
|
}
|
|
14948
14995
|
);
|
|
14949
14996
|
if (isMobileView) {
|
|
14950
|
-
return /* @__PURE__ */ (0,
|
|
14951
|
-
|
|
14997
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
14998
|
+
import_material10.SwipeableDrawer,
|
|
14952
14999
|
{
|
|
14953
15000
|
anchor: "bottom",
|
|
14954
15001
|
open,
|
|
@@ -14972,8 +15019,8 @@ var MemoryModal = ({ open, onClose }) => {
|
|
|
14972
15019
|
}
|
|
14973
15020
|
);
|
|
14974
15021
|
}
|
|
14975
|
-
return /* @__PURE__ */ (0,
|
|
14976
|
-
|
|
15022
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
15023
|
+
import_material10.Modal,
|
|
14977
15024
|
{
|
|
14978
15025
|
open,
|
|
14979
15026
|
onClose,
|
|
@@ -14994,10 +15041,10 @@ var memory_modal_default = MemoryModal;
|
|
|
14994
15041
|
// src/modals/chat-modal/chat-drawer.tsx
|
|
14995
15042
|
var import_rxjs18 = require("rxjs");
|
|
14996
15043
|
init_debugLogger();
|
|
14997
|
-
var
|
|
15044
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
14998
15045
|
var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain }) => {
|
|
14999
|
-
const theme = (0,
|
|
15000
|
-
const isMobile = (0,
|
|
15046
|
+
const theme = (0, import_material11.useTheme)();
|
|
15047
|
+
const isMobile = (0, import_material11.useMediaQuery)(
|
|
15001
15048
|
(theme2) => theme2.breakpoints.down("sm")
|
|
15002
15049
|
);
|
|
15003
15050
|
const history = useAIQueryStore((state) => state.history);
|
|
@@ -15216,8 +15263,8 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
15216
15263
|
const handleCancelClear = () => {
|
|
15217
15264
|
setConfirmClearOpen(false);
|
|
15218
15265
|
};
|
|
15219
|
-
return /* @__PURE__ */ (0,
|
|
15220
|
-
|
|
15266
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
15267
|
+
import_material11.Drawer,
|
|
15221
15268
|
{
|
|
15222
15269
|
anchor: "right",
|
|
15223
15270
|
open: drawerOpen,
|
|
@@ -15243,8 +15290,8 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
15243
15290
|
// Consistent timing
|
|
15244
15291
|
},
|
|
15245
15292
|
children: [
|
|
15246
|
-
/* @__PURE__ */ (0,
|
|
15247
|
-
|
|
15293
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
15294
|
+
import_material11.Box,
|
|
15248
15295
|
{
|
|
15249
15296
|
sx: {
|
|
15250
15297
|
height: "100%",
|
|
@@ -15256,8 +15303,8 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
15256
15303
|
},
|
|
15257
15304
|
role: "presentation",
|
|
15258
15305
|
children: [
|
|
15259
|
-
/* @__PURE__ */ (0,
|
|
15260
|
-
|
|
15306
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
15307
|
+
import_material11.Box,
|
|
15261
15308
|
{
|
|
15262
15309
|
sx: {
|
|
15263
15310
|
p: 3,
|
|
@@ -15266,12 +15313,12 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
15266
15313
|
backdropFilter: "blur(10px)"
|
|
15267
15314
|
},
|
|
15268
15315
|
children: [
|
|
15269
|
-
/* @__PURE__ */ (0,
|
|
15270
|
-
/* @__PURE__ */ (0,
|
|
15271
|
-
/* @__PURE__ */ (0,
|
|
15272
|
-
/* @__PURE__ */ (0,
|
|
15273
|
-
/* @__PURE__ */ (0,
|
|
15274
|
-
|
|
15316
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_material11.Box, { sx: { display: "flex", alignItems: "center", justifyContent: "space-between", mb: 2 }, children: [
|
|
15317
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_material11.Box, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
15318
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(HistoryIcon, { sx: { color: theme.palette.primary.main } }),
|
|
15319
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material11.Typography, { variant: "h6", sx: { fontWeight: 600, color: "text.primary" }, children: "Chat Control Center" }),
|
|
15320
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material11.Tooltip, { title: "About Chat History", arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
15321
|
+
import_material11.IconButton,
|
|
15275
15322
|
{
|
|
15276
15323
|
onClick: () => setInfoDialogOpen(true),
|
|
15277
15324
|
size: "small",
|
|
@@ -15281,11 +15328,11 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
15281
15328
|
bgcolor: theme.palette.info.main + "20"
|
|
15282
15329
|
}
|
|
15283
15330
|
},
|
|
15284
|
-
children: /* @__PURE__ */ (0,
|
|
15331
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(InfoOutlinedIcon, { fontSize: "small" })
|
|
15285
15332
|
}
|
|
15286
15333
|
) }),
|
|
15287
|
-
/* @__PURE__ */ (0,
|
|
15288
|
-
|
|
15334
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material11.Tooltip, { title: "Refresh Conversations", arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
15335
|
+
import_material11.IconButton,
|
|
15289
15336
|
{
|
|
15290
15337
|
onClick: () => {
|
|
15291
15338
|
debugLogger.info("Manual conversation refresh triggered", {
|
|
@@ -15305,12 +15352,12 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
15305
15352
|
bgcolor: theme.palette.primary.main + "20"
|
|
15306
15353
|
}
|
|
15307
15354
|
},
|
|
15308
|
-
children: /* @__PURE__ */ (0,
|
|
15355
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(RefreshIcon, { fontSize: "small" })
|
|
15309
15356
|
}
|
|
15310
15357
|
) })
|
|
15311
15358
|
] }),
|
|
15312
|
-
/* @__PURE__ */ (0,
|
|
15313
|
-
|
|
15359
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material11.Tooltip, { title: "Close", arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
15360
|
+
import_material11.IconButton,
|
|
15314
15361
|
{
|
|
15315
15362
|
onClick: onClose,
|
|
15316
15363
|
size: "small",
|
|
@@ -15321,12 +15368,12 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
15321
15368
|
color: theme.palette.text.primary
|
|
15322
15369
|
}
|
|
15323
15370
|
},
|
|
15324
|
-
children: /* @__PURE__ */ (0,
|
|
15371
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(CloseIcon, {})
|
|
15325
15372
|
}
|
|
15326
15373
|
) })
|
|
15327
15374
|
] }),
|
|
15328
|
-
/* @__PURE__ */ (0,
|
|
15329
|
-
|
|
15375
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material11.Box, { sx: { mb: 2 }, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
15376
|
+
import_material11.Box,
|
|
15330
15377
|
{
|
|
15331
15378
|
sx: {
|
|
15332
15379
|
display: "flex",
|
|
@@ -15336,8 +15383,8 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
15336
15383
|
border: `1px solid ${theme.palette.divider}`
|
|
15337
15384
|
},
|
|
15338
15385
|
children: [
|
|
15339
|
-
/* @__PURE__ */ (0,
|
|
15340
|
-
|
|
15386
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
15387
|
+
import_material11.Button,
|
|
15341
15388
|
{
|
|
15342
15389
|
onClick: () => handleContextSwitch("local"),
|
|
15343
15390
|
variant: contextMode === "local" ? "contained" : "text",
|
|
@@ -15357,13 +15404,13 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
15357
15404
|
}
|
|
15358
15405
|
}
|
|
15359
15406
|
},
|
|
15360
|
-
children: isContextSwitching && contextMode !== "local" ? /* @__PURE__ */ (0,
|
|
15407
|
+
children: isContextSwitching && contextMode !== "local" ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_material11.Box, { sx: {
|
|
15361
15408
|
display: "flex",
|
|
15362
15409
|
alignItems: "center",
|
|
15363
15410
|
gap: 1,
|
|
15364
15411
|
opacity: 0.7
|
|
15365
15412
|
}, children: [
|
|
15366
|
-
/* @__PURE__ */ (0,
|
|
15413
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material11.Box, { sx: {
|
|
15367
15414
|
width: 12,
|
|
15368
15415
|
height: 12,
|
|
15369
15416
|
border: "2px solid currentColor",
|
|
@@ -15376,10 +15423,10 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
15376
15423
|
}
|
|
15377
15424
|
} }),
|
|
15378
15425
|
"Loading..."
|
|
15379
|
-
] }) : /* @__PURE__ */ (0,
|
|
15426
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
|
|
15380
15427
|
"Session Context",
|
|
15381
|
-
/* @__PURE__ */ (0,
|
|
15382
|
-
|
|
15428
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
15429
|
+
import_material11.Chip,
|
|
15383
15430
|
{
|
|
15384
15431
|
label: history.length,
|
|
15385
15432
|
size: "small",
|
|
@@ -15395,8 +15442,8 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
15395
15442
|
] })
|
|
15396
15443
|
}
|
|
15397
15444
|
),
|
|
15398
|
-
/* @__PURE__ */ (0,
|
|
15399
|
-
|
|
15445
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material11.Tooltip, { title: "Switch to conversation history", arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
15446
|
+
import_material11.Button,
|
|
15400
15447
|
{
|
|
15401
15448
|
onClick: () => handleContextSwitch("main"),
|
|
15402
15449
|
variant: contextMode === "main" ? "contained" : "text",
|
|
@@ -15416,13 +15463,13 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
15416
15463
|
}
|
|
15417
15464
|
}
|
|
15418
15465
|
},
|
|
15419
|
-
children: isContextSwitching && contextMode !== "main" ? /* @__PURE__ */ (0,
|
|
15466
|
+
children: isContextSwitching && contextMode !== "main" ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_material11.Box, { sx: {
|
|
15420
15467
|
display: "flex",
|
|
15421
15468
|
alignItems: "center",
|
|
15422
15469
|
gap: 1,
|
|
15423
15470
|
opacity: 0.7
|
|
15424
15471
|
}, children: [
|
|
15425
|
-
/* @__PURE__ */ (0,
|
|
15472
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material11.Box, { sx: {
|
|
15426
15473
|
width: 12,
|
|
15427
15474
|
height: 12,
|
|
15428
15475
|
border: "2px solid currentColor",
|
|
@@ -15435,10 +15482,10 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
15435
15482
|
}
|
|
15436
15483
|
} }),
|
|
15437
15484
|
"Loading..."
|
|
15438
|
-
] }) : /* @__PURE__ */ (0,
|
|
15485
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
|
|
15439
15486
|
"Main Conversation",
|
|
15440
|
-
/* @__PURE__ */ (0,
|
|
15441
|
-
|
|
15487
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
15488
|
+
import_material11.Chip,
|
|
15442
15489
|
{
|
|
15443
15490
|
label: conversations.length,
|
|
15444
15491
|
size: "small",
|
|
@@ -15457,9 +15504,9 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
15457
15504
|
]
|
|
15458
15505
|
}
|
|
15459
15506
|
) }),
|
|
15460
|
-
isVoiceAvailable ? /* @__PURE__ */ (0,
|
|
15461
|
-
/* @__PURE__ */ (0,
|
|
15462
|
-
|
|
15507
|
+
isVoiceAvailable ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_material11.Box, { sx: { mb: 2 }, children: [
|
|
15508
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
15509
|
+
import_material11.Box,
|
|
15463
15510
|
{
|
|
15464
15511
|
onClick: () => toggleSection("voice"),
|
|
15465
15512
|
sx: {
|
|
@@ -15474,11 +15521,11 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
15474
15521
|
}
|
|
15475
15522
|
},
|
|
15476
15523
|
children: [
|
|
15477
|
-
/* @__PURE__ */ (0,
|
|
15478
|
-
/* @__PURE__ */ (0,
|
|
15479
|
-
/* @__PURE__ */ (0,
|
|
15480
|
-
/* @__PURE__ */ (0,
|
|
15481
|
-
|
|
15524
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_material11.Box, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
15525
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(RecordVoiceOverIcon, { sx: { color: theme.palette.success.main, fontSize: "1.2rem" } }),
|
|
15526
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material11.Typography, { variant: "subtitle2", sx: { fontWeight: 600, color: "text.primary" }, children: "Voice Model" }),
|
|
15527
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
15528
|
+
import_material11.Chip,
|
|
15482
15529
|
{
|
|
15483
15530
|
label: selectedVoice ? toTitleCase(selectedVoice.split("-")[1]) : "Default",
|
|
15484
15531
|
size: "small",
|
|
@@ -15490,8 +15537,8 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
15490
15537
|
}
|
|
15491
15538
|
}
|
|
15492
15539
|
),
|
|
15493
|
-
/* @__PURE__ */ (0,
|
|
15494
|
-
|
|
15540
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material11.Tooltip, { title: "Refresh Voices", arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
15541
|
+
import_material11.IconButton,
|
|
15495
15542
|
{
|
|
15496
15543
|
onClick: (e) => {
|
|
15497
15544
|
e.stopPropagation();
|
|
@@ -15506,16 +15553,16 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
15506
15553
|
color: theme.palette.success.main
|
|
15507
15554
|
}
|
|
15508
15555
|
},
|
|
15509
|
-
children: /* @__PURE__ */ (0,
|
|
15556
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(RefreshIcon, { fontSize: "small" })
|
|
15510
15557
|
}
|
|
15511
15558
|
) })
|
|
15512
15559
|
] }),
|
|
15513
|
-
expandedSections.has("voice") ? /* @__PURE__ */ (0,
|
|
15560
|
+
expandedSections.has("voice") ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ExpandLessIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ExpandMoreIcon, {})
|
|
15514
15561
|
]
|
|
15515
15562
|
}
|
|
15516
15563
|
),
|
|
15517
|
-
/* @__PURE__ */ (0,
|
|
15518
|
-
|
|
15564
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material11.Collapse, { in: expandedSections.has("voice"), children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material11.Box, { sx: { pl: 2, pt: 1 }, children: availableVoices.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
15565
|
+
import_material11.TextField,
|
|
15519
15566
|
{
|
|
15520
15567
|
select: true,
|
|
15521
15568
|
fullWidth: true,
|
|
@@ -15531,14 +15578,14 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
15531
15578
|
borderRadius: "8px"
|
|
15532
15579
|
}
|
|
15533
15580
|
},
|
|
15534
|
-
children: availableVoices.map((voice) => /* @__PURE__ */ (0,
|
|
15535
|
-
/* @__PURE__ */ (0,
|
|
15536
|
-
/* @__PURE__ */ (0,
|
|
15537
|
-
/* @__PURE__ */ (0,
|
|
15538
|
-
/* @__PURE__ */ (0,
|
|
15581
|
+
children: availableVoices.map((voice) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material11.MenuItem, { value: voice, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_material11.Box, { sx: { display: "flex", alignItems: "center", gap: 1, width: "100%" }, children: [
|
|
15582
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(RecordVoiceOverIcon, { fontSize: "small", sx: { color: theme.palette.text.secondary } }),
|
|
15583
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_material11.Box, { sx: { flex: 1 }, children: [
|
|
15584
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material11.Typography, { variant: "body2", children: toTitleCase(voice.split("-")[1]) }),
|
|
15585
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material11.Typography, { variant: "caption", sx: { color: theme.palette.text.secondary }, children: voice === selectedVoice ? "Currently active" : "Switch to this voice" })
|
|
15539
15586
|
] }),
|
|
15540
|
-
voice === selectedVoice && /* @__PURE__ */ (0,
|
|
15541
|
-
|
|
15587
|
+
voice === selectedVoice && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
15588
|
+
import_material11.Box,
|
|
15542
15589
|
{
|
|
15543
15590
|
sx: {
|
|
15544
15591
|
width: 8,
|
|
@@ -15550,9 +15597,9 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
15550
15597
|
)
|
|
15551
15598
|
] }) }, voice))
|
|
15552
15599
|
}
|
|
15553
|
-
) : /* @__PURE__ */ (0,
|
|
15554
|
-
/* @__PURE__ */ (0,
|
|
15555
|
-
/* @__PURE__ */ (0,
|
|
15600
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_material11.Box, { sx: { textAlign: "center", py: 2 }, children: [
|
|
15601
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material11.Typography, { variant: "body2", color: "text.secondary", children: "No voices available" }),
|
|
15602
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_material11.Typography, { variant: "caption", color: "text.secondary", sx: { display: "block", mt: 1 }, children: [
|
|
15556
15603
|
"Service: ",
|
|
15557
15604
|
isServiceAvailable ? "\u2713" : "\u2717",
|
|
15558
15605
|
" | TTS: ",
|
|
@@ -15561,12 +15608,12 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
15561
15608
|
!!packageSettings?.gatewayApiUrl ? "\u2713" : "\u2717"
|
|
15562
15609
|
] })
|
|
15563
15610
|
] }) }) })
|
|
15564
|
-
] }) : /* @__PURE__ */ (0,
|
|
15565
|
-
/* @__PURE__ */ (0,
|
|
15566
|
-
/* @__PURE__ */ (0,
|
|
15567
|
-
/* @__PURE__ */ (0,
|
|
15611
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material11.Box, { sx: { mb: 2 }, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_material11.Box, { sx: { p: 1, borderRadius: "8px", bgcolor: theme.palette.warning.main + "10" }, children: [
|
|
15612
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_material11.Box, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
15613
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(RecordVoiceOverIcon, { sx: { color: theme.palette.warning.main, fontSize: "1.2rem" } }),
|
|
15614
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material11.Typography, { variant: "subtitle2", sx: { fontWeight: 600, color: theme.palette.warning.main }, children: "Voice Not Available" })
|
|
15568
15615
|
] }),
|
|
15569
|
-
/* @__PURE__ */ (0,
|
|
15616
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_material11.Typography, { variant: "caption", color: "text.secondary", sx: { display: "block", mt: 1, pl: 4 }, children: [
|
|
15570
15617
|
"Service: ",
|
|
15571
15618
|
isServiceAvailable ? "\u2713" : "\u2717",
|
|
15572
15619
|
" | TTS: ",
|
|
@@ -15575,9 +15622,9 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
15575
15622
|
!!packageSettings?.gatewayApiUrl ? "\u2713" : "\u2717"
|
|
15576
15623
|
] })
|
|
15577
15624
|
] }) }),
|
|
15578
|
-
isMemoryAvailable && /* @__PURE__ */ (0,
|
|
15579
|
-
/* @__PURE__ */ (0,
|
|
15580
|
-
|
|
15625
|
+
isMemoryAvailable && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_material11.Box, { sx: { mb: 2 }, children: [
|
|
15626
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
15627
|
+
import_material11.Box,
|
|
15581
15628
|
{
|
|
15582
15629
|
onClick: () => toggleSection("memory"),
|
|
15583
15630
|
sx: {
|
|
@@ -15592,11 +15639,11 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
15592
15639
|
}
|
|
15593
15640
|
},
|
|
15594
15641
|
children: [
|
|
15595
|
-
/* @__PURE__ */ (0,
|
|
15596
|
-
/* @__PURE__ */ (0,
|
|
15597
|
-
/* @__PURE__ */ (0,
|
|
15598
|
-
/* @__PURE__ */ (0,
|
|
15599
|
-
|
|
15642
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_material11.Box, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
15643
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(MemoryIcon, { sx: { color: theme.palette.warning.main, fontSize: "1.2rem" } }),
|
|
15644
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material11.Typography, { variant: "subtitle2", sx: { fontWeight: 600, color: "text.primary" }, children: "Personal Memory" }),
|
|
15645
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
15646
|
+
import_material11.Chip,
|
|
15600
15647
|
{
|
|
15601
15648
|
label: memoryEntries.length,
|
|
15602
15649
|
size: "small",
|
|
@@ -15609,17 +15656,17 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
15609
15656
|
}
|
|
15610
15657
|
)
|
|
15611
15658
|
] }),
|
|
15612
|
-
expandedSections.has("memory") ? /* @__PURE__ */ (0,
|
|
15659
|
+
expandedSections.has("memory") ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ExpandLessIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ExpandMoreIcon, {})
|
|
15613
15660
|
]
|
|
15614
15661
|
}
|
|
15615
15662
|
),
|
|
15616
|
-
/* @__PURE__ */ (0,
|
|
15617
|
-
|
|
15663
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material11.Collapse, { in: expandedSections.has("memory"), children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material11.Box, { sx: { pl: 2, pt: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
15664
|
+
import_material11.Button,
|
|
15618
15665
|
{
|
|
15619
15666
|
fullWidth: true,
|
|
15620
15667
|
variant: "outlined",
|
|
15621
15668
|
onClick: () => setMemoryModalOpen(true),
|
|
15622
|
-
startIcon: /* @__PURE__ */ (0,
|
|
15669
|
+
startIcon: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(MemoryIcon, {}),
|
|
15623
15670
|
sx: {
|
|
15624
15671
|
textTransform: "none",
|
|
15625
15672
|
borderRadius: "8px",
|
|
@@ -15630,8 +15677,8 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
15630
15677
|
}
|
|
15631
15678
|
) }) })
|
|
15632
15679
|
] }),
|
|
15633
|
-
/* @__PURE__ */ (0,
|
|
15634
|
-
|
|
15680
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
15681
|
+
import_material11.Box,
|
|
15635
15682
|
{
|
|
15636
15683
|
onClick: () => toggleSection("history"),
|
|
15637
15684
|
sx: {
|
|
@@ -15647,11 +15694,11 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
15647
15694
|
}
|
|
15648
15695
|
},
|
|
15649
15696
|
children: [
|
|
15650
|
-
/* @__PURE__ */ (0,
|
|
15651
|
-
/* @__PURE__ */ (0,
|
|
15652
|
-
/* @__PURE__ */ (0,
|
|
15653
|
-
/* @__PURE__ */ (0,
|
|
15654
|
-
|
|
15697
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_material11.Box, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
15698
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(HistoryIcon, { sx: { color: theme.palette.primary.main, fontSize: "1.2rem" } }),
|
|
15699
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material11.Typography, { variant: "subtitle2", sx: { fontWeight: 600, color: "text.primary" }, children: contextMode === "local" ? "Session History" : "Conversation History" }),
|
|
15700
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
15701
|
+
import_material11.Chip,
|
|
15655
15702
|
{
|
|
15656
15703
|
label: activeHistory.length,
|
|
15657
15704
|
size: "small",
|
|
@@ -15663,8 +15710,8 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
15663
15710
|
}
|
|
15664
15711
|
}
|
|
15665
15712
|
),
|
|
15666
|
-
activeHistory.length > 0 && contextMode === "local" && /* @__PURE__ */ (0,
|
|
15667
|
-
|
|
15713
|
+
activeHistory.length > 0 && contextMode === "local" && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material11.Tooltip, { title: "Clear Session History", arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
15714
|
+
import_material11.IconButton,
|
|
15668
15715
|
{
|
|
15669
15716
|
onClick: (e) => {
|
|
15670
15717
|
e.stopPropagation();
|
|
@@ -15677,16 +15724,16 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
15677
15724
|
bgcolor: theme.palette.error.main + "20"
|
|
15678
15725
|
}
|
|
15679
15726
|
},
|
|
15680
|
-
children: /* @__PURE__ */ (0,
|
|
15727
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DeleteIcon, { fontSize: "small" })
|
|
15681
15728
|
}
|
|
15682
15729
|
) })
|
|
15683
15730
|
] }),
|
|
15684
|
-
expandedSections.has("history") ? /* @__PURE__ */ (0,
|
|
15731
|
+
expandedSections.has("history") ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ExpandLessIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ExpandMoreIcon, {})
|
|
15685
15732
|
]
|
|
15686
15733
|
}
|
|
15687
15734
|
),
|
|
15688
|
-
/* @__PURE__ */ (0,
|
|
15689
|
-
|
|
15735
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material11.Collapse, { in: expandedSections.has("history"), children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material11.Box, { sx: { mb: 1 }, children: activeHistory.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
15736
|
+
import_material11.TextField,
|
|
15690
15737
|
{
|
|
15691
15738
|
fullWidth: true,
|
|
15692
15739
|
size: "small",
|
|
@@ -15694,7 +15741,7 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
15694
15741
|
value: searchTerm,
|
|
15695
15742
|
onChange: (e) => setSearchTerm(e.target.value),
|
|
15696
15743
|
InputProps: {
|
|
15697
|
-
startAdornment: /* @__PURE__ */ (0,
|
|
15744
|
+
startAdornment: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material11.InputAdornment, { position: "start", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SearchIcon, { sx: { color: theme.palette.text.secondary } }) }),
|
|
15698
15745
|
sx: {
|
|
15699
15746
|
borderRadius: "12px",
|
|
15700
15747
|
bgcolor: theme.palette.mode === "dark" ? "rgba(255,255,255,0.05)" : "rgba(0,0,0,0.05)",
|
|
@@ -15714,8 +15761,8 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
15714
15761
|
]
|
|
15715
15762
|
}
|
|
15716
15763
|
),
|
|
15717
|
-
/* @__PURE__ */ (0,
|
|
15718
|
-
|
|
15764
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material11.Collapse, { in: expandedSections.has("history"), children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
15765
|
+
import_material11.Box,
|
|
15719
15766
|
{
|
|
15720
15767
|
sx: {
|
|
15721
15768
|
flex: 1,
|
|
@@ -15747,8 +15794,8 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
15747
15794
|
scrollbarColor: theme.palette.mode === "dark" ? "rgba(255,255,255,0.2) rgba(255,255,255,0.1)" : "rgba(0,0,0,0.2) rgba(0,0,0,0.1)"
|
|
15748
15795
|
},
|
|
15749
15796
|
children: [
|
|
15750
|
-
isContentLoading && /* @__PURE__ */ (0,
|
|
15751
|
-
|
|
15797
|
+
isContentLoading && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
15798
|
+
import_material11.Box,
|
|
15752
15799
|
{
|
|
15753
15800
|
sx: {
|
|
15754
15801
|
position: "absolute",
|
|
@@ -15766,7 +15813,7 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
15766
15813
|
gap: 2
|
|
15767
15814
|
},
|
|
15768
15815
|
children: [
|
|
15769
|
-
/* @__PURE__ */ (0,
|
|
15816
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material11.Box, { sx: {
|
|
15770
15817
|
width: 40,
|
|
15771
15818
|
height: 40,
|
|
15772
15819
|
border: "3px solid currentColor",
|
|
@@ -15779,8 +15826,8 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
15779
15826
|
"100%": { transform: "rotate(360deg)" }
|
|
15780
15827
|
}
|
|
15781
15828
|
} }),
|
|
15782
|
-
/* @__PURE__ */ (0,
|
|
15783
|
-
|
|
15829
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
15830
|
+
import_material11.Typography,
|
|
15784
15831
|
{
|
|
15785
15832
|
variant: "body2",
|
|
15786
15833
|
sx: {
|
|
@@ -15795,8 +15842,8 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
15795
15842
|
),
|
|
15796
15843
|
!isContentLoading && (contextMode === "main" ? (
|
|
15797
15844
|
// Show conversation list when in main context
|
|
15798
|
-
filteredConversations.length === 0 ? /* @__PURE__ */ (0,
|
|
15799
|
-
|
|
15845
|
+
filteredConversations.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
15846
|
+
import_material11.Box,
|
|
15800
15847
|
{
|
|
15801
15848
|
sx: {
|
|
15802
15849
|
display: "flex",
|
|
@@ -15808,25 +15855,25 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
15808
15855
|
color: theme.palette.text.secondary
|
|
15809
15856
|
},
|
|
15810
15857
|
children: [
|
|
15811
|
-
/* @__PURE__ */ (0,
|
|
15812
|
-
/* @__PURE__ */ (0,
|
|
15813
|
-
/* @__PURE__ */ (0,
|
|
15858
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(HistoryIcon, { sx: { fontSize: "3rem", mb: 2, opacity: 0.5 } }),
|
|
15859
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material11.Typography, { variant: "h6", sx: { mb: 1, fontWeight: 500, color: "text.primary" }, children: searchTerm ? "No Matching Conversations" : "No Conversations Yet" }),
|
|
15860
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material11.Typography, { variant: "body2", children: searchTerm ? "Try adjusting your search terms" : "Create your first conversation to get started" })
|
|
15814
15861
|
]
|
|
15815
15862
|
}
|
|
15816
|
-
) : /* @__PURE__ */ (0,
|
|
15863
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material11.List, { sx: { p: 0 }, children: filteredConversations.map((conversation, index) => {
|
|
15817
15864
|
const isCurrent = conversation.id === currentId;
|
|
15818
15865
|
const isExpanded = expandedConversations.has(conversation.id);
|
|
15819
15866
|
const conversationHistory = conversation.history || [];
|
|
15820
|
-
return /* @__PURE__ */ (0,
|
|
15821
|
-
|
|
15867
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
15868
|
+
import_material11.ListItem,
|
|
15822
15869
|
{
|
|
15823
15870
|
sx: {
|
|
15824
15871
|
display: "block",
|
|
15825
15872
|
p: 0,
|
|
15826
15873
|
mb: 1
|
|
15827
15874
|
},
|
|
15828
|
-
children: /* @__PURE__ */ (0,
|
|
15829
|
-
|
|
15875
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
15876
|
+
import_material11.Box,
|
|
15830
15877
|
{
|
|
15831
15878
|
sx: {
|
|
15832
15879
|
bgcolor: isCurrent ? theme.palette.primary.main + "20" : theme.palette.background.default,
|
|
@@ -15836,8 +15883,8 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
15836
15883
|
transition: "all 0.2s ease-in-out"
|
|
15837
15884
|
},
|
|
15838
15885
|
children: [
|
|
15839
|
-
/* @__PURE__ */ (0,
|
|
15840
|
-
|
|
15886
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
15887
|
+
import_material11.Box,
|
|
15841
15888
|
{
|
|
15842
15889
|
onClick: () => {
|
|
15843
15890
|
toggleConversationExpanded(conversation.id);
|
|
@@ -15851,9 +15898,9 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
15851
15898
|
}
|
|
15852
15899
|
},
|
|
15853
15900
|
children: [
|
|
15854
|
-
/* @__PURE__ */ (0,
|
|
15855
|
-
/* @__PURE__ */ (0,
|
|
15856
|
-
|
|
15901
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_material11.Box, { sx: { display: "flex", alignItems: "center", justifyContent: "space-between", mb: 1 }, children: [
|
|
15902
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
15903
|
+
import_material11.Typography,
|
|
15857
15904
|
{
|
|
15858
15905
|
variant: "subtitle2",
|
|
15859
15906
|
sx: {
|
|
@@ -15867,9 +15914,9 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
15867
15914
|
children: conversation.name
|
|
15868
15915
|
}
|
|
15869
15916
|
),
|
|
15870
|
-
/* @__PURE__ */ (0,
|
|
15871
|
-
isCurrent && /* @__PURE__ */ (0,
|
|
15872
|
-
|
|
15917
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_material11.Box, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
15918
|
+
isCurrent && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
15919
|
+
import_material11.Chip,
|
|
15873
15920
|
{
|
|
15874
15921
|
label: "Current",
|
|
15875
15922
|
size: "small",
|
|
@@ -15881,12 +15928,12 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
15881
15928
|
}
|
|
15882
15929
|
}
|
|
15883
15930
|
),
|
|
15884
|
-
isExpanded ? /* @__PURE__ */ (0,
|
|
15931
|
+
isExpanded ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ExpandLessIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ExpandMoreIcon, {})
|
|
15885
15932
|
] })
|
|
15886
15933
|
] }),
|
|
15887
|
-
/* @__PURE__ */ (0,
|
|
15888
|
-
/* @__PURE__ */ (0,
|
|
15889
|
-
|
|
15934
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_material11.Box, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
15935
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
15936
|
+
import_material11.Typography,
|
|
15890
15937
|
{
|
|
15891
15938
|
variant: "caption",
|
|
15892
15939
|
sx: {
|
|
@@ -15898,8 +15945,8 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
15898
15945
|
]
|
|
15899
15946
|
}
|
|
15900
15947
|
),
|
|
15901
|
-
/* @__PURE__ */ (0,
|
|
15902
|
-
|
|
15948
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
15949
|
+
import_material11.Typography,
|
|
15903
15950
|
{
|
|
15904
15951
|
variant: "caption",
|
|
15905
15952
|
sx: {
|
|
@@ -15915,13 +15962,13 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
15915
15962
|
]
|
|
15916
15963
|
}
|
|
15917
15964
|
),
|
|
15918
|
-
/* @__PURE__ */ (0,
|
|
15965
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material11.Collapse, { in: isExpanded, children: conversationHistory.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material11.Box, { sx: { borderTop: `1px solid ${theme.palette.divider}`, bgcolor: theme.palette.mode === "dark" ? "rgba(255,255,255,0.02)" : "rgba(0,0,0,0.02)" }, children: conversationHistory.filter(
|
|
15919
15966
|
(entry) => !searchTerm || entry.question.toLowerCase().includes(searchTerm.toLowerCase()) || entry.answer.toLowerCase().includes(searchTerm.toLowerCase())
|
|
15920
15967
|
).slice().reverse().map((entry, messageIndex) => {
|
|
15921
15968
|
const isMessageExpanded = expandedItems.has(messageIndex);
|
|
15922
|
-
return /* @__PURE__ */ (0,
|
|
15923
|
-
/* @__PURE__ */ (0,
|
|
15924
|
-
|
|
15969
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_material11.Box, { sx: { borderBottom: `1px solid ${theme.palette.divider}` }, children: [
|
|
15970
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
15971
|
+
import_material11.Box,
|
|
15925
15972
|
{
|
|
15926
15973
|
onClick: (e) => {
|
|
15927
15974
|
e.stopPropagation();
|
|
@@ -15935,8 +15982,8 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
15935
15982
|
}
|
|
15936
15983
|
},
|
|
15937
15984
|
children: [
|
|
15938
|
-
/* @__PURE__ */ (0,
|
|
15939
|
-
|
|
15985
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
15986
|
+
import_material11.Typography,
|
|
15940
15987
|
{
|
|
15941
15988
|
variant: "body2",
|
|
15942
15989
|
sx: {
|
|
@@ -15951,8 +15998,8 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
15951
15998
|
children: entry.question
|
|
15952
15999
|
}
|
|
15953
16000
|
),
|
|
15954
|
-
/* @__PURE__ */ (0,
|
|
15955
|
-
|
|
16001
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
16002
|
+
import_material11.Typography,
|
|
15956
16003
|
{
|
|
15957
16004
|
variant: "caption",
|
|
15958
16005
|
sx: {
|
|
@@ -15968,7 +16015,7 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
15968
16015
|
]
|
|
15969
16016
|
}
|
|
15970
16017
|
),
|
|
15971
|
-
/* @__PURE__ */ (0,
|
|
16018
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material11.Collapse, { in: isMessageExpanded, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material11.Box, { sx: { p: 2, pt: 0, bgcolor: theme.palette.mode === "dark" ? "rgba(255,255,255,0.02)" : "rgba(0,0,0,0.02)" }, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
15972
16019
|
ai_response_text_field_default,
|
|
15973
16020
|
{
|
|
15974
16021
|
question: entry.question,
|
|
@@ -15976,7 +16023,7 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
15976
16023
|
}
|
|
15977
16024
|
) }) })
|
|
15978
16025
|
] }, messageIndex);
|
|
15979
|
-
}) }) : /* @__PURE__ */ (0,
|
|
16026
|
+
}) }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material11.Box, { sx: { p: 2, textAlign: "center", color: theme.palette.text.secondary, borderTop: `1px solid ${theme.palette.divider}` }, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material11.Typography, { variant: "body2", children: "No messages in this conversation yet" }) }) })
|
|
15980
16027
|
]
|
|
15981
16028
|
}
|
|
15982
16029
|
)
|
|
@@ -15986,8 +16033,8 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
15986
16033
|
}) })
|
|
15987
16034
|
) : (
|
|
15988
16035
|
// Show message history when in local context
|
|
15989
|
-
activeHistory.length === 0 ? /* @__PURE__ */ (0,
|
|
15990
|
-
|
|
16036
|
+
activeHistory.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
16037
|
+
import_material11.Box,
|
|
15991
16038
|
{
|
|
15992
16039
|
sx: {
|
|
15993
16040
|
display: "flex",
|
|
@@ -15999,13 +16046,13 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
15999
16046
|
color: theme.palette.text.secondary
|
|
16000
16047
|
},
|
|
16001
16048
|
children: [
|
|
16002
|
-
/* @__PURE__ */ (0,
|
|
16003
|
-
/* @__PURE__ */ (0,
|
|
16004
|
-
/* @__PURE__ */ (0,
|
|
16049
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(HistoryIcon, { sx: { fontSize: "3rem", mb: 2, opacity: 0.5 } }),
|
|
16050
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material11.Typography, { variant: "h6", sx: { mb: 1, fontWeight: 500, color: "text.primary" }, children: "No Session History Yet" }),
|
|
16051
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material11.Typography, { variant: "body2", children: "Start a conversation to see your session history here" })
|
|
16005
16052
|
]
|
|
16006
16053
|
}
|
|
16007
|
-
) : filteredHistory.length === 0 ? /* @__PURE__ */ (0,
|
|
16008
|
-
|
|
16054
|
+
) : filteredHistory.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
16055
|
+
import_material11.Box,
|
|
16009
16056
|
{
|
|
16010
16057
|
sx: {
|
|
16011
16058
|
display: "flex",
|
|
@@ -16017,23 +16064,23 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
16017
16064
|
color: theme.palette.text.secondary
|
|
16018
16065
|
},
|
|
16019
16066
|
children: [
|
|
16020
|
-
/* @__PURE__ */ (0,
|
|
16021
|
-
/* @__PURE__ */ (0,
|
|
16022
|
-
/* @__PURE__ */ (0,
|
|
16067
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SearchIcon, { sx: { fontSize: "3rem", mb: 2, opacity: 0.5 } }),
|
|
16068
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material11.Typography, { variant: "h6", sx: { mb: 1, fontWeight: 500, color: "text.primary" }, children: "No Results Found" }),
|
|
16069
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material11.Typography, { variant: "body2", children: "Try adjusting your search terms" })
|
|
16023
16070
|
]
|
|
16024
16071
|
}
|
|
16025
|
-
) : /* @__PURE__ */ (0,
|
|
16072
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material11.List, { sx: { p: 0 }, children: [...filteredHistory].reverse().map((entry, index) => {
|
|
16026
16073
|
const isExpanded = expandedItems.has(index);
|
|
16027
|
-
return /* @__PURE__ */ (0,
|
|
16028
|
-
|
|
16074
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react16.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
16075
|
+
import_material11.ListItem,
|
|
16029
16076
|
{
|
|
16030
16077
|
sx: {
|
|
16031
16078
|
display: "block",
|
|
16032
16079
|
p: 0,
|
|
16033
16080
|
mb: 2
|
|
16034
16081
|
},
|
|
16035
|
-
children: /* @__PURE__ */ (0,
|
|
16036
|
-
|
|
16082
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
16083
|
+
import_material11.Box,
|
|
16037
16084
|
{
|
|
16038
16085
|
onClick: () => toggleExpanded(index),
|
|
16039
16086
|
sx: {
|
|
@@ -16050,9 +16097,9 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
16050
16097
|
}
|
|
16051
16098
|
},
|
|
16052
16099
|
children: [
|
|
16053
|
-
/* @__PURE__ */ (0,
|
|
16054
|
-
/* @__PURE__ */ (0,
|
|
16055
|
-
|
|
16100
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_material11.Box, { sx: { p: 2 }, children: [
|
|
16101
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
16102
|
+
import_material11.Typography,
|
|
16056
16103
|
{
|
|
16057
16104
|
variant: "body2",
|
|
16058
16105
|
sx: {
|
|
@@ -16067,8 +16114,8 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
16067
16114
|
children: entry.question
|
|
16068
16115
|
}
|
|
16069
16116
|
),
|
|
16070
|
-
/* @__PURE__ */ (0,
|
|
16071
|
-
|
|
16117
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
16118
|
+
import_material11.Typography,
|
|
16072
16119
|
{
|
|
16073
16120
|
variant: "caption",
|
|
16074
16121
|
sx: {
|
|
@@ -16082,9 +16129,9 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
16082
16129
|
}
|
|
16083
16130
|
)
|
|
16084
16131
|
] }),
|
|
16085
|
-
/* @__PURE__ */ (0,
|
|
16086
|
-
/* @__PURE__ */ (0,
|
|
16087
|
-
/* @__PURE__ */ (0,
|
|
16132
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_material11.Collapse, { in: isExpanded, children: [
|
|
16133
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material11.Divider, {}),
|
|
16134
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material11.Box, { sx: { p: 2 }, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
16088
16135
|
ai_response_text_field_default,
|
|
16089
16136
|
{
|
|
16090
16137
|
question: entry.question,
|
|
@@ -16105,8 +16152,8 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
16105
16152
|
]
|
|
16106
16153
|
}
|
|
16107
16154
|
),
|
|
16108
|
-
/* @__PURE__ */ (0,
|
|
16109
|
-
|
|
16155
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
16156
|
+
import_material11.Dialog,
|
|
16110
16157
|
{
|
|
16111
16158
|
open: confirmClearOpen,
|
|
16112
16159
|
onClose: handleCancelClear,
|
|
@@ -16132,8 +16179,8 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
16132
16179
|
}
|
|
16133
16180
|
},
|
|
16134
16181
|
children: [
|
|
16135
|
-
/* @__PURE__ */ (0,
|
|
16136
|
-
|
|
16182
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
16183
|
+
import_material11.DialogTitle,
|
|
16137
16184
|
{
|
|
16138
16185
|
sx: {
|
|
16139
16186
|
pb: 1,
|
|
@@ -16145,14 +16192,14 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
16145
16192
|
gap: 1
|
|
16146
16193
|
},
|
|
16147
16194
|
children: [
|
|
16148
|
-
/* @__PURE__ */ (0,
|
|
16195
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DeleteIcon, { sx: { fontSize: "1.75rem" } }),
|
|
16149
16196
|
"Clear Chat History"
|
|
16150
16197
|
]
|
|
16151
16198
|
}
|
|
16152
16199
|
),
|
|
16153
|
-
/* @__PURE__ */ (0,
|
|
16154
|
-
/* @__PURE__ */ (0,
|
|
16155
|
-
|
|
16200
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_material11.DialogContent, { sx: { pb: 2 }, children: [
|
|
16201
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
16202
|
+
import_material11.DialogContentText,
|
|
16156
16203
|
{
|
|
16157
16204
|
sx: {
|
|
16158
16205
|
fontSize: "1rem",
|
|
@@ -16162,8 +16209,8 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
16162
16209
|
children: "Are you sure you want to clear all chat history?"
|
|
16163
16210
|
}
|
|
16164
16211
|
),
|
|
16165
|
-
/* @__PURE__ */ (0,
|
|
16166
|
-
|
|
16212
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
16213
|
+
import_material11.DialogContentText,
|
|
16167
16214
|
{
|
|
16168
16215
|
sx: {
|
|
16169
16216
|
fontSize: "0.9rem",
|
|
@@ -16174,8 +16221,8 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
16174
16221
|
}
|
|
16175
16222
|
)
|
|
16176
16223
|
] }),
|
|
16177
|
-
/* @__PURE__ */ (0,
|
|
16178
|
-
|
|
16224
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
16225
|
+
import_material11.DialogActions,
|
|
16179
16226
|
{
|
|
16180
16227
|
sx: {
|
|
16181
16228
|
p: 3,
|
|
@@ -16183,8 +16230,8 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
16183
16230
|
gap: 1
|
|
16184
16231
|
},
|
|
16185
16232
|
children: [
|
|
16186
|
-
/* @__PURE__ */ (0,
|
|
16187
|
-
|
|
16233
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
16234
|
+
import_material11.Button,
|
|
16188
16235
|
{
|
|
16189
16236
|
onClick: handleCancelClear,
|
|
16190
16237
|
variant: "outlined",
|
|
@@ -16203,8 +16250,8 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
16203
16250
|
children: "Cancel"
|
|
16204
16251
|
}
|
|
16205
16252
|
),
|
|
16206
|
-
/* @__PURE__ */ (0,
|
|
16207
|
-
|
|
16253
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
16254
|
+
import_material11.Button,
|
|
16208
16255
|
{
|
|
16209
16256
|
onClick: handleConfirmClear,
|
|
16210
16257
|
variant: "contained",
|
|
@@ -16231,8 +16278,8 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
16231
16278
|
]
|
|
16232
16279
|
}
|
|
16233
16280
|
),
|
|
16234
|
-
/* @__PURE__ */ (0,
|
|
16235
|
-
|
|
16281
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
16282
|
+
import_material11.Dialog,
|
|
16236
16283
|
{
|
|
16237
16284
|
open: infoDialogOpen,
|
|
16238
16285
|
onClose: () => setInfoDialogOpen(false),
|
|
@@ -16258,8 +16305,8 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
16258
16305
|
}
|
|
16259
16306
|
},
|
|
16260
16307
|
children: [
|
|
16261
|
-
/* @__PURE__ */ (0,
|
|
16262
|
-
|
|
16308
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
16309
|
+
import_material11.DialogTitle,
|
|
16263
16310
|
{
|
|
16264
16311
|
sx: {
|
|
16265
16312
|
pb: 2,
|
|
@@ -16271,14 +16318,14 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
16271
16318
|
gap: 1
|
|
16272
16319
|
},
|
|
16273
16320
|
children: [
|
|
16274
|
-
/* @__PURE__ */ (0,
|
|
16321
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(InfoOutlinedIcon, { sx: { fontSize: "1.75rem" } }),
|
|
16275
16322
|
"About Chat Control Center"
|
|
16276
16323
|
]
|
|
16277
16324
|
}
|
|
16278
16325
|
),
|
|
16279
|
-
/* @__PURE__ */ (0,
|
|
16280
|
-
/* @__PURE__ */ (0,
|
|
16281
|
-
|
|
16326
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_material11.DialogContent, { sx: { pb: 2 }, children: [
|
|
16327
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
16328
|
+
import_material11.DialogContentText,
|
|
16282
16329
|
{
|
|
16283
16330
|
sx: {
|
|
16284
16331
|
fontSize: "1rem",
|
|
@@ -16289,8 +16336,8 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
16289
16336
|
children: "This control center gives you full access to your chat experience and AI capabilities."
|
|
16290
16337
|
}
|
|
16291
16338
|
),
|
|
16292
|
-
/* @__PURE__ */ (0,
|
|
16293
|
-
|
|
16339
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
16340
|
+
import_material11.DialogContentText,
|
|
16294
16341
|
{
|
|
16295
16342
|
sx: {
|
|
16296
16343
|
fontSize: "0.95rem",
|
|
@@ -16299,37 +16346,37 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
16299
16346
|
lineHeight: 1.6
|
|
16300
16347
|
},
|
|
16301
16348
|
children: [
|
|
16302
|
-
/* @__PURE__ */ (0,
|
|
16303
|
-
/* @__PURE__ */ (0,
|
|
16349
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("strong", { children: "Context Modes:" }),
|
|
16350
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("br", {}),
|
|
16304
16351
|
"\u2022 ",
|
|
16305
|
-
/* @__PURE__ */ (0,
|
|
16352
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("strong", { children: "Session Context" }),
|
|
16306
16353
|
": Local conversation for this modal session only",
|
|
16307
|
-
/* @__PURE__ */ (0,
|
|
16354
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("br", {}),
|
|
16308
16355
|
"\u2022 ",
|
|
16309
|
-
/* @__PURE__ */ (0,
|
|
16356
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("strong", { children: "Main Conversation" }),
|
|
16310
16357
|
": Your persistent account conversations",
|
|
16311
|
-
/* @__PURE__ */ (0,
|
|
16358
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("br", {}),
|
|
16312
16359
|
"\u2022 Switch between them to access different conversation histories",
|
|
16313
|
-
/* @__PURE__ */ (0,
|
|
16314
|
-
/* @__PURE__ */ (0,
|
|
16315
|
-
/* @__PURE__ */ (0,
|
|
16316
|
-
/* @__PURE__ */ (0,
|
|
16360
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("br", {}),
|
|
16361
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("br", {}),
|
|
16362
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("strong", { children: "Additional Features:" }),
|
|
16363
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("br", {}),
|
|
16317
16364
|
"\u2022 ",
|
|
16318
|
-
/* @__PURE__ */ (0,
|
|
16365
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("strong", { children: "Voice Models" }),
|
|
16319
16366
|
": Change AI voice when TTS is enabled",
|
|
16320
|
-
/* @__PURE__ */ (0,
|
|
16367
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("br", {}),
|
|
16321
16368
|
"\u2022 ",
|
|
16322
|
-
/* @__PURE__ */ (0,
|
|
16369
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("strong", { children: "Personal Memory" }),
|
|
16323
16370
|
": Manage what the AI remembers about you",
|
|
16324
|
-
/* @__PURE__ */ (0,
|
|
16371
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("br", {}),
|
|
16325
16372
|
"\u2022 ",
|
|
16326
|
-
/* @__PURE__ */ (0,
|
|
16373
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("strong", { children: "Search & Organization" }),
|
|
16327
16374
|
": Find specific conversations quickly"
|
|
16328
16375
|
]
|
|
16329
16376
|
}
|
|
16330
16377
|
),
|
|
16331
|
-
/* @__PURE__ */ (0,
|
|
16332
|
-
|
|
16378
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
16379
|
+
import_material11.DialogContentText,
|
|
16333
16380
|
{
|
|
16334
16381
|
sx: {
|
|
16335
16382
|
fontSize: "0.9rem",
|
|
@@ -16342,21 +16389,21 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
16342
16389
|
},
|
|
16343
16390
|
children: [
|
|
16344
16391
|
"\u{1F4A1} ",
|
|
16345
|
-
/* @__PURE__ */ (0,
|
|
16392
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("strong", { children: "Pro Tip:" }),
|
|
16346
16393
|
" Use Session Context for quick experiments and Main Conversation for important discussions you want to keep. All features respect your privacy settings!"
|
|
16347
16394
|
]
|
|
16348
16395
|
}
|
|
16349
16396
|
)
|
|
16350
16397
|
] }),
|
|
16351
|
-
/* @__PURE__ */ (0,
|
|
16352
|
-
|
|
16398
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
16399
|
+
import_material11.DialogActions,
|
|
16353
16400
|
{
|
|
16354
16401
|
sx: {
|
|
16355
16402
|
p: 3,
|
|
16356
16403
|
pt: 1
|
|
16357
16404
|
},
|
|
16358
|
-
children: /* @__PURE__ */ (0,
|
|
16359
|
-
|
|
16405
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
16406
|
+
import_material11.Button,
|
|
16360
16407
|
{
|
|
16361
16408
|
onClick: () => setInfoDialogOpen(false),
|
|
16362
16409
|
variant: "contained",
|
|
@@ -16381,7 +16428,7 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
16381
16428
|
]
|
|
16382
16429
|
}
|
|
16383
16430
|
),
|
|
16384
|
-
/* @__PURE__ */ (0,
|
|
16431
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
16385
16432
|
memory_modal_default,
|
|
16386
16433
|
{
|
|
16387
16434
|
open: memoryModalOpen,
|
|
@@ -16395,18 +16442,18 @@ var AIQueriesDrawer = ({ drawerOpen, onClose, onClearComplete, onNavigateToMain
|
|
|
16395
16442
|
var chat_drawer_default = AIQueriesDrawer;
|
|
16396
16443
|
|
|
16397
16444
|
// src/shared/generic-loader.tsx
|
|
16398
|
-
var
|
|
16399
|
-
var
|
|
16445
|
+
var import_material12 = require("@mui/material");
|
|
16446
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
16400
16447
|
var GenericLoader = ({
|
|
16401
16448
|
size = 40,
|
|
16402
16449
|
color,
|
|
16403
16450
|
variant = "spinner"
|
|
16404
16451
|
}) => {
|
|
16405
|
-
const theme = (0,
|
|
16452
|
+
const theme = (0, import_material12.useTheme)();
|
|
16406
16453
|
const loaderColor = color || theme.palette.primary.main;
|
|
16407
16454
|
if (variant === "dots") {
|
|
16408
|
-
return /* @__PURE__ */ (0,
|
|
16409
|
-
|
|
16455
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
16456
|
+
import_material12.Box,
|
|
16410
16457
|
{
|
|
16411
16458
|
sx: {
|
|
16412
16459
|
display: "flex",
|
|
@@ -16423,8 +16470,8 @@ var GenericLoader = ({
|
|
|
16423
16470
|
}
|
|
16424
16471
|
}
|
|
16425
16472
|
},
|
|
16426
|
-
children: [0, 0.15, 0.3].map((delay, index) => /* @__PURE__ */ (0,
|
|
16427
|
-
|
|
16473
|
+
children: [0, 0.15, 0.3].map((delay, index) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
16474
|
+
import_material12.Box,
|
|
16428
16475
|
{
|
|
16429
16476
|
sx: {
|
|
16430
16477
|
width: 8,
|
|
@@ -16441,8 +16488,8 @@ var GenericLoader = ({
|
|
|
16441
16488
|
);
|
|
16442
16489
|
}
|
|
16443
16490
|
if (variant === "pulse") {
|
|
16444
|
-
return /* @__PURE__ */ (0,
|
|
16445
|
-
|
|
16491
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
16492
|
+
import_material12.Box,
|
|
16446
16493
|
{
|
|
16447
16494
|
sx: {
|
|
16448
16495
|
display: "flex",
|
|
@@ -16464,8 +16511,8 @@ var GenericLoader = ({
|
|
|
16464
16511
|
}
|
|
16465
16512
|
}
|
|
16466
16513
|
},
|
|
16467
|
-
children: /* @__PURE__ */ (0,
|
|
16468
|
-
|
|
16514
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
16515
|
+
import_material12.Box,
|
|
16469
16516
|
{
|
|
16470
16517
|
sx: {
|
|
16471
16518
|
width: size,
|
|
@@ -16479,8 +16526,8 @@ var GenericLoader = ({
|
|
|
16479
16526
|
}
|
|
16480
16527
|
);
|
|
16481
16528
|
}
|
|
16482
|
-
return /* @__PURE__ */ (0,
|
|
16483
|
-
|
|
16529
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
16530
|
+
import_material12.Box,
|
|
16484
16531
|
{
|
|
16485
16532
|
sx: {
|
|
16486
16533
|
display: "flex",
|
|
@@ -16488,8 +16535,8 @@ var GenericLoader = ({
|
|
|
16488
16535
|
alignItems: "center",
|
|
16489
16536
|
py: 2
|
|
16490
16537
|
},
|
|
16491
|
-
children: /* @__PURE__ */ (0,
|
|
16492
|
-
|
|
16538
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
16539
|
+
import_material12.CircularProgress,
|
|
16493
16540
|
{
|
|
16494
16541
|
size,
|
|
16495
16542
|
sx: { color: loaderColor }
|
|
@@ -16502,20 +16549,20 @@ var generic_loader_default = GenericLoader;
|
|
|
16502
16549
|
|
|
16503
16550
|
// src/components/feedback/FeedbackButton.tsx
|
|
16504
16551
|
var import_react18 = require("react");
|
|
16505
|
-
var
|
|
16552
|
+
var import_material15 = require("@mui/material");
|
|
16506
16553
|
var import_lucide_react4 = require("lucide-react");
|
|
16507
16554
|
|
|
16508
16555
|
// src/components/feedback/FeedbackModal.tsx
|
|
16509
16556
|
var import_react17 = require("react");
|
|
16510
|
-
var import_material12 = require("@mui/material");
|
|
16511
16557
|
var import_material13 = require("@mui/material");
|
|
16558
|
+
var import_material14 = require("@mui/material");
|
|
16512
16559
|
var import_lucide_react3 = require("lucide-react");
|
|
16513
16560
|
init_modelStore();
|
|
16514
16561
|
init_packageSettingsStore();
|
|
16515
16562
|
init_gateway_service();
|
|
16516
16563
|
init_authenticationService();
|
|
16517
16564
|
var import_styles4 = require("@mui/material/styles");
|
|
16518
|
-
var
|
|
16565
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
16519
16566
|
var feedbackCategories = {
|
|
16520
16567
|
bug: {
|
|
16521
16568
|
label: "Bug Report",
|
|
@@ -16583,7 +16630,7 @@ var FeedbackModal = ({
|
|
|
16583
16630
|
feedbackEmail
|
|
16584
16631
|
}) => {
|
|
16585
16632
|
const theme = (0, import_styles4.useTheme)();
|
|
16586
|
-
const isMobile = (0,
|
|
16633
|
+
const isMobile = (0, import_material14.useMediaQuery)(theme.breakpoints.down("sm"));
|
|
16587
16634
|
const fileInputRef = (0, import_react17.useRef)(null);
|
|
16588
16635
|
const { selectedModel } = useModelStore();
|
|
16589
16636
|
const { conversations } = useConversationStore();
|
|
@@ -16816,8 +16863,8 @@ var FeedbackModal = ({
|
|
|
16816
16863
|
const selectedPriority = feedbackPriorities[formData.priority];
|
|
16817
16864
|
const IconComponent = iconMap[selectedCategory?.icon] || import_lucide_react3.MessageSquare;
|
|
16818
16865
|
const isValid = !!formData.title?.trim() && !!formData.description?.trim();
|
|
16819
|
-
return /* @__PURE__ */ (0,
|
|
16820
|
-
/* @__PURE__ */ (0,
|
|
16866
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
|
|
16867
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_material13.GlobalStyles, { styles: {
|
|
16821
16868
|
"::-webkit-scrollbar": {
|
|
16822
16869
|
width: "8px"
|
|
16823
16870
|
},
|
|
@@ -16830,15 +16877,15 @@ var FeedbackModal = ({
|
|
|
16830
16877
|
border: "1px solid #222"
|
|
16831
16878
|
}
|
|
16832
16879
|
} }),
|
|
16833
|
-
/* @__PURE__ */ (0,
|
|
16834
|
-
|
|
16880
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
16881
|
+
import_material14.Dialog,
|
|
16835
16882
|
{
|
|
16836
16883
|
open,
|
|
16837
16884
|
onClose: handleClose,
|
|
16838
16885
|
maxWidth: "md",
|
|
16839
16886
|
fullWidth: true,
|
|
16840
16887
|
fullScreen: isMobile,
|
|
16841
|
-
TransitionComponent:
|
|
16888
|
+
TransitionComponent: import_material14.Fade,
|
|
16842
16889
|
scroll: "paper",
|
|
16843
16890
|
PaperProps: {
|
|
16844
16891
|
sx: {
|
|
@@ -16872,8 +16919,8 @@ var FeedbackModal = ({
|
|
|
16872
16919
|
}
|
|
16873
16920
|
},
|
|
16874
16921
|
children: [
|
|
16875
|
-
/* @__PURE__ */ (0,
|
|
16876
|
-
|
|
16922
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
16923
|
+
import_material14.DialogTitle,
|
|
16877
16924
|
{
|
|
16878
16925
|
onTouchStart: handleHeaderTouchStart,
|
|
16879
16926
|
onTouchMove: handleHeaderTouchMove,
|
|
@@ -16889,8 +16936,8 @@ var FeedbackModal = ({
|
|
|
16889
16936
|
touchAction: "pan-y"
|
|
16890
16937
|
},
|
|
16891
16938
|
children: [
|
|
16892
|
-
isMobile && /* @__PURE__ */ (0,
|
|
16893
|
-
|
|
16939
|
+
isMobile && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
16940
|
+
import_material14.Box,
|
|
16894
16941
|
{
|
|
16895
16942
|
sx: {
|
|
16896
16943
|
width: 56,
|
|
@@ -16902,8 +16949,8 @@ var FeedbackModal = ({
|
|
|
16902
16949
|
}
|
|
16903
16950
|
}
|
|
16904
16951
|
),
|
|
16905
|
-
/* @__PURE__ */ (0,
|
|
16906
|
-
|
|
16952
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
16953
|
+
import_material14.Box,
|
|
16907
16954
|
{
|
|
16908
16955
|
sx: {
|
|
16909
16956
|
display: "flex",
|
|
@@ -16913,19 +16960,19 @@ var FeedbackModal = ({
|
|
|
16913
16960
|
width: "100%"
|
|
16914
16961
|
},
|
|
16915
16962
|
children: [
|
|
16916
|
-
/* @__PURE__ */ (0,
|
|
16917
|
-
/* @__PURE__ */ (0,
|
|
16918
|
-
/* @__PURE__ */ (0,
|
|
16963
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_material14.Stack, { spacing: 0.5, sx: { minWidth: 0 }, children: [
|
|
16964
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_material14.Typography, { variant: "h6", fontWeight: "bold", noWrap: true, children: "Send Feedback" }),
|
|
16965
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_material14.Typography, { variant: "body2", color: "text.secondary", noWrap: true, children: "Help us improve Bandit AI" })
|
|
16919
16966
|
] }),
|
|
16920
|
-
/* @__PURE__ */ (0,
|
|
16967
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_material14.IconButton, { onClick: handleClose, size: "small", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react3.X, {}) })
|
|
16921
16968
|
]
|
|
16922
16969
|
}
|
|
16923
16970
|
)
|
|
16924
16971
|
]
|
|
16925
16972
|
}
|
|
16926
16973
|
),
|
|
16927
|
-
/* @__PURE__ */ (0,
|
|
16928
|
-
|
|
16974
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
16975
|
+
import_material14.DialogContent,
|
|
16929
16976
|
{
|
|
16930
16977
|
sx: {
|
|
16931
16978
|
p: { xs: 1.5, sm: 3 },
|
|
@@ -16935,8 +16982,8 @@ var FeedbackModal = ({
|
|
|
16935
16982
|
scrollbarGutter: "stable"
|
|
16936
16983
|
},
|
|
16937
16984
|
children: [
|
|
16938
|
-
submitStatus === "success" && /* @__PURE__ */ (0,
|
|
16939
|
-
|
|
16985
|
+
submitStatus === "success" && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
16986
|
+
import_material14.Alert,
|
|
16940
16987
|
{
|
|
16941
16988
|
severity: "success",
|
|
16942
16989
|
sx: {
|
|
@@ -16949,13 +16996,13 @@ var FeedbackModal = ({
|
|
|
16949
16996
|
borderRadius: 2
|
|
16950
16997
|
},
|
|
16951
16998
|
children: [
|
|
16952
|
-
/* @__PURE__ */ (0,
|
|
16953
|
-
/* @__PURE__ */ (0,
|
|
16999
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_material14.Typography, { variant: "body2", sx: { fontWeight: 600 }, children: "Feedback submitted successfully!" }),
|
|
17000
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_material14.Typography, { variant: "caption", display: "block", sx: { mt: 0.5, opacity: 0.9 }, children: formData.images && formData.images.length > 0 ? "Your email client should open with the feedback details. The image has been copied to your clipboard - paste it in the email!" : formData.attachments && formData.attachments.length > 0 ? "Your email client should open with the feedback details. Please manually attach your files to the email." : "Your email client should open with the feedback details." })
|
|
16954
17001
|
]
|
|
16955
17002
|
}
|
|
16956
17003
|
),
|
|
16957
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
16958
|
-
|
|
17004
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
17005
|
+
import_material14.Alert,
|
|
16959
17006
|
{
|
|
16960
17007
|
severity: "error",
|
|
16961
17008
|
sx: {
|
|
@@ -16970,8 +17017,8 @@ var FeedbackModal = ({
|
|
|
16970
17017
|
children: errorMessage
|
|
16971
17018
|
}
|
|
16972
17019
|
),
|
|
16973
|
-
/* @__PURE__ */ (0,
|
|
16974
|
-
|
|
17020
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
17021
|
+
import_material14.Box,
|
|
16975
17022
|
{
|
|
16976
17023
|
sx: {
|
|
16977
17024
|
display: "grid",
|
|
@@ -16985,8 +17032,8 @@ var FeedbackModal = ({
|
|
|
16985
17032
|
pt: 1.5
|
|
16986
17033
|
},
|
|
16987
17034
|
children: [
|
|
16988
|
-
/* @__PURE__ */ (0,
|
|
16989
|
-
|
|
17035
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
17036
|
+
import_material14.Box,
|
|
16990
17037
|
{
|
|
16991
17038
|
sx: {
|
|
16992
17039
|
display: "grid",
|
|
@@ -16996,8 +17043,8 @@ var FeedbackModal = ({
|
|
|
16996
17043
|
mb: 0
|
|
16997
17044
|
},
|
|
16998
17045
|
children: [
|
|
16999
|
-
/* @__PURE__ */ (0,
|
|
17000
|
-
|
|
17046
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
17047
|
+
import_material14.TextField,
|
|
17001
17048
|
{
|
|
17002
17049
|
fullWidth: true,
|
|
17003
17050
|
label: "Title",
|
|
@@ -17028,8 +17075,8 @@ var FeedbackModal = ({
|
|
|
17028
17075
|
}
|
|
17029
17076
|
}
|
|
17030
17077
|
),
|
|
17031
|
-
/* @__PURE__ */ (0,
|
|
17032
|
-
|
|
17078
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
17079
|
+
import_material14.FormControl,
|
|
17033
17080
|
{
|
|
17034
17081
|
fullWidth: true,
|
|
17035
17082
|
size: "medium",
|
|
@@ -17052,9 +17099,9 @@ var FeedbackModal = ({
|
|
|
17052
17099
|
}
|
|
17053
17100
|
},
|
|
17054
17101
|
children: [
|
|
17055
|
-
/* @__PURE__ */ (0,
|
|
17056
|
-
/* @__PURE__ */ (0,
|
|
17057
|
-
|
|
17102
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_material14.InputLabel, { shrink: true, id: "category-label", children: "Category" }),
|
|
17103
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
17104
|
+
import_material14.Select,
|
|
17058
17105
|
{
|
|
17059
17106
|
labelId: "category-label",
|
|
17060
17107
|
id: "category",
|
|
@@ -17063,11 +17110,11 @@ var FeedbackModal = ({
|
|
|
17063
17110
|
onChange: handleInputChange("category"),
|
|
17064
17111
|
children: Object.entries(feedbackCategories).map(([key, category]) => {
|
|
17065
17112
|
const Icon = iconMap[category.icon];
|
|
17066
|
-
return /* @__PURE__ */ (0,
|
|
17067
|
-
/* @__PURE__ */ (0,
|
|
17068
|
-
/* @__PURE__ */ (0,
|
|
17069
|
-
/* @__PURE__ */ (0,
|
|
17070
|
-
/* @__PURE__ */ (0,
|
|
17113
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_material14.MenuItem, { value: key, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_material14.Box, { sx: { display: "flex", alignItems: "center", gap: 1.5 }, children: [
|
|
17114
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Icon, { size: 20, color: category.color }),
|
|
17115
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_material14.Box, { children: [
|
|
17116
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_material14.Typography, { variant: "body2", sx: { fontWeight: 500 }, children: category.label }),
|
|
17117
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_material14.Typography, { variant: "caption", color: "text.secondary", children: category.description })
|
|
17071
17118
|
] })
|
|
17072
17119
|
] }) }, key);
|
|
17073
17120
|
})
|
|
@@ -17076,8 +17123,8 @@ var FeedbackModal = ({
|
|
|
17076
17123
|
]
|
|
17077
17124
|
}
|
|
17078
17125
|
),
|
|
17079
|
-
/* @__PURE__ */ (0,
|
|
17080
|
-
|
|
17126
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
17127
|
+
import_material14.FormControl,
|
|
17081
17128
|
{
|
|
17082
17129
|
fullWidth: true,
|
|
17083
17130
|
size: "medium",
|
|
@@ -17100,18 +17147,18 @@ var FeedbackModal = ({
|
|
|
17100
17147
|
}
|
|
17101
17148
|
},
|
|
17102
17149
|
children: [
|
|
17103
|
-
/* @__PURE__ */ (0,
|
|
17104
|
-
/* @__PURE__ */ (0,
|
|
17105
|
-
|
|
17150
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_material14.InputLabel, { shrink: true, id: "priority-label", children: "Priority" }),
|
|
17151
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
17152
|
+
import_material14.Select,
|
|
17106
17153
|
{
|
|
17107
17154
|
labelId: "priority-label",
|
|
17108
17155
|
id: "priority",
|
|
17109
17156
|
value: formData.priority,
|
|
17110
17157
|
label: "Priority",
|
|
17111
17158
|
onChange: handleInputChange("priority"),
|
|
17112
|
-
children: Object.entries(feedbackPriorities).map(([key, priority]) => /* @__PURE__ */ (0,
|
|
17113
|
-
/* @__PURE__ */ (0,
|
|
17114
|
-
|
|
17159
|
+
children: Object.entries(feedbackPriorities).map(([key, priority]) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_material14.MenuItem, { value: key, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_material14.Box, { sx: { display: "flex", alignItems: "center", gap: 1.5 }, children: [
|
|
17160
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
17161
|
+
import_material14.Box,
|
|
17115
17162
|
{
|
|
17116
17163
|
sx: {
|
|
17117
17164
|
width: 12,
|
|
@@ -17122,9 +17169,9 @@ var FeedbackModal = ({
|
|
|
17122
17169
|
}
|
|
17123
17170
|
}
|
|
17124
17171
|
),
|
|
17125
|
-
/* @__PURE__ */ (0,
|
|
17126
|
-
/* @__PURE__ */ (0,
|
|
17127
|
-
/* @__PURE__ */ (0,
|
|
17172
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_material14.Box, { children: [
|
|
17173
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_material14.Typography, { variant: "body2", sx: { fontWeight: 500 }, children: priority.label }),
|
|
17174
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_material14.Typography, { variant: "caption", color: "text.secondary", children: priority.description })
|
|
17128
17175
|
] })
|
|
17129
17176
|
] }) }, key))
|
|
17130
17177
|
}
|
|
@@ -17132,8 +17179,8 @@ var FeedbackModal = ({
|
|
|
17132
17179
|
]
|
|
17133
17180
|
}
|
|
17134
17181
|
),
|
|
17135
|
-
/* @__PURE__ */ (0,
|
|
17136
|
-
|
|
17182
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
17183
|
+
import_material14.TextField,
|
|
17137
17184
|
{
|
|
17138
17185
|
fullWidth: true,
|
|
17139
17186
|
multiline: true,
|
|
@@ -17171,8 +17218,8 @@ var FeedbackModal = ({
|
|
|
17171
17218
|
]
|
|
17172
17219
|
}
|
|
17173
17220
|
),
|
|
17174
|
-
/* @__PURE__ */ (0,
|
|
17175
|
-
|
|
17221
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
17222
|
+
import_material14.Box,
|
|
17176
17223
|
{
|
|
17177
17224
|
className: "feedback-section-row",
|
|
17178
17225
|
sx: {
|
|
@@ -17185,13 +17232,13 @@ var FeedbackModal = ({
|
|
|
17185
17232
|
flexDirection: { xs: "column", md: "row" }
|
|
17186
17233
|
},
|
|
17187
17234
|
children: [
|
|
17188
|
-
/* @__PURE__ */ (0,
|
|
17189
|
-
|
|
17235
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
17236
|
+
import_material14.Box,
|
|
17190
17237
|
{
|
|
17191
17238
|
className: "impact-section",
|
|
17192
17239
|
sx: { flex: 1, minWidth: 260, display: "flex", flexDirection: "column" },
|
|
17193
17240
|
children: [
|
|
17194
|
-
/* @__PURE__ */ (0,
|
|
17241
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_material14.Typography, { variant: "body2", sx: { fontWeight: 600, mb: 0.5 }, children: [
|
|
17195
17242
|
"How annoying is this?",
|
|
17196
17243
|
" ",
|
|
17197
17244
|
["\u{1F60A}", "\u{1F610}", "\u{1F644}", "\u{1F620}", "\u{1F92C}"][(formData.annoyanceLevel ?? 3) - 1],
|
|
@@ -17200,8 +17247,8 @@ var FeedbackModal = ({
|
|
|
17200
17247
|
formData.annoyanceLevel ?? 3,
|
|
17201
17248
|
"/5)"
|
|
17202
17249
|
] }),
|
|
17203
|
-
/* @__PURE__ */ (0,
|
|
17204
|
-
|
|
17250
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_material14.Box, { sx: { px: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
17251
|
+
import_material14.Slider,
|
|
17205
17252
|
{
|
|
17206
17253
|
size: "small",
|
|
17207
17254
|
value: formData.annoyanceLevel,
|
|
@@ -17224,8 +17271,8 @@ var FeedbackModal = ({
|
|
|
17224
17271
|
]
|
|
17225
17272
|
}
|
|
17226
17273
|
),
|
|
17227
|
-
/* @__PURE__ */ (0,
|
|
17228
|
-
|
|
17274
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
17275
|
+
import_material14.Box,
|
|
17229
17276
|
{
|
|
17230
17277
|
className: "attachments-upload-card attachments-section",
|
|
17231
17278
|
sx: {
|
|
@@ -17237,8 +17284,8 @@ var FeedbackModal = ({
|
|
|
17237
17284
|
p: 0
|
|
17238
17285
|
},
|
|
17239
17286
|
children: [
|
|
17240
|
-
/* @__PURE__ */ (0,
|
|
17241
|
-
/* @__PURE__ */ (0,
|
|
17287
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { style: { display: "flex", flexDirection: "column" }, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_material14.Box, { onClick: () => fileInputRef.current?.click(), children: [
|
|
17288
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
17242
17289
|
"input",
|
|
17243
17290
|
{
|
|
17244
17291
|
ref: fileInputRef,
|
|
@@ -17248,8 +17295,8 @@ var FeedbackModal = ({
|
|
|
17248
17295
|
onChange: handleFileUpload
|
|
17249
17296
|
}
|
|
17250
17297
|
),
|
|
17251
|
-
/* @__PURE__ */ (0,
|
|
17252
|
-
|
|
17298
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
17299
|
+
import_material14.Box,
|
|
17253
17300
|
{
|
|
17254
17301
|
sx: {
|
|
17255
17302
|
display: "flex",
|
|
@@ -17265,14 +17312,14 @@ var FeedbackModal = ({
|
|
|
17265
17312
|
"&:hover": { borderColor: theme.palette.primary.main, color: theme.palette.primary.main }
|
|
17266
17313
|
},
|
|
17267
17314
|
children: [
|
|
17268
|
-
/* @__PURE__ */ (0,
|
|
17269
|
-
/* @__PURE__ */ (0,
|
|
17270
|
-
/* @__PURE__ */ (0,
|
|
17315
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react3.Paperclip, { size: 18 }),
|
|
17316
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_material14.Typography, { variant: "body2", sx: { fontWeight: 500 }, children: "Attach an image" }),
|
|
17317
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_material14.Typography, { variant: "caption", color: "text.secondary", sx: { ml: "auto" }, children: "JPG/PNG/GIF \xB7 10MB" })
|
|
17271
17318
|
]
|
|
17272
17319
|
}
|
|
17273
17320
|
),
|
|
17274
|
-
(formData.images && formData.images.length > 0 || formData.attachments && formData.attachments.length > 0) && /* @__PURE__ */ (0,
|
|
17275
|
-
|
|
17321
|
+
(formData.images && formData.images.length > 0 || formData.attachments && formData.attachments.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
17322
|
+
import_material14.Alert,
|
|
17276
17323
|
{
|
|
17277
17324
|
severity: "info",
|
|
17278
17325
|
sx: {
|
|
@@ -17290,18 +17337,18 @@ var FeedbackModal = ({
|
|
|
17290
17337
|
fontSize: "0.75rem"
|
|
17291
17338
|
}
|
|
17292
17339
|
},
|
|
17293
|
-
children: /* @__PURE__ */ (0,
|
|
17340
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_material14.Typography, { variant: "caption", sx: { fontWeight: 600, display: "block" }, children: formData.images && formData.images.length > 0 ? "\u{1F4CE} Image will be copied to clipboard - paste in email!" : "\u{1F4CE} Files ready for email attachment" })
|
|
17294
17341
|
}
|
|
17295
17342
|
)
|
|
17296
17343
|
] }) }),
|
|
17297
|
-
formData.images && formData.images.length > 0 && /* @__PURE__ */ (0,
|
|
17298
|
-
/* @__PURE__ */ (0,
|
|
17299
|
-
/* @__PURE__ */ (0,
|
|
17300
|
-
/* @__PURE__ */ (0,
|
|
17344
|
+
formData.images && formData.images.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_material14.Box, { sx: { mt: 2 }, children: [
|
|
17345
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_material14.Box, { sx: { display: "flex", alignItems: "center", gap: 1, mb: 1.5 }, children: [
|
|
17346
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react3.Camera, { size: 16 }),
|
|
17347
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_material14.Typography, { variant: "subtitle2", sx: { fontWeight: 600 }, children: "Attached Image" })
|
|
17301
17348
|
] }),
|
|
17302
|
-
/* @__PURE__ */ (0,
|
|
17303
|
-
/* @__PURE__ */ (0,
|
|
17304
|
-
|
|
17349
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_material14.Box, { sx: { display: "flex", gap: 1.5 }, children: [
|
|
17350
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
17351
|
+
import_material14.Box,
|
|
17305
17352
|
{
|
|
17306
17353
|
sx: {
|
|
17307
17354
|
position: "relative",
|
|
@@ -17315,7 +17362,7 @@ var FeedbackModal = ({
|
|
|
17315
17362
|
}
|
|
17316
17363
|
},
|
|
17317
17364
|
children: [
|
|
17318
|
-
/* @__PURE__ */ (0,
|
|
17365
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
17319
17366
|
"img",
|
|
17320
17367
|
{
|
|
17321
17368
|
src: formData.images[0],
|
|
@@ -17328,8 +17375,8 @@ var FeedbackModal = ({
|
|
|
17328
17375
|
}
|
|
17329
17376
|
}
|
|
17330
17377
|
),
|
|
17331
|
-
/* @__PURE__ */ (0,
|
|
17332
|
-
|
|
17378
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
17379
|
+
import_material14.IconButton,
|
|
17333
17380
|
{
|
|
17334
17381
|
size: "small",
|
|
17335
17382
|
onClick: removeImage,
|
|
@@ -17346,20 +17393,20 @@ var FeedbackModal = ({
|
|
|
17346
17393
|
transform: "scale(1.1)"
|
|
17347
17394
|
}
|
|
17348
17395
|
},
|
|
17349
|
-
children: /* @__PURE__ */ (0,
|
|
17396
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react3.Trash2, { size: 14 })
|
|
17350
17397
|
}
|
|
17351
17398
|
)
|
|
17352
17399
|
]
|
|
17353
17400
|
}
|
|
17354
17401
|
),
|
|
17355
|
-
/* @__PURE__ */ (0,
|
|
17356
|
-
/* @__PURE__ */ (0,
|
|
17357
|
-
|
|
17402
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_material14.Box, { sx: { flex: 1, display: "flex", flexDirection: "column", justifyContent: "center" }, children: [
|
|
17403
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
17404
|
+
import_material14.Button,
|
|
17358
17405
|
{
|
|
17359
17406
|
variant: "outlined",
|
|
17360
17407
|
size: "small",
|
|
17361
17408
|
onClick: copyImageToClipboard,
|
|
17362
|
-
startIcon: /* @__PURE__ */ (0,
|
|
17409
|
+
startIcon: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react3.Paperclip, {}),
|
|
17363
17410
|
sx: {
|
|
17364
17411
|
mb: 1,
|
|
17365
17412
|
borderColor: theme.palette.primary.main + "50",
|
|
@@ -17372,22 +17419,22 @@ var FeedbackModal = ({
|
|
|
17372
17419
|
children: "Copy to Clipboard"
|
|
17373
17420
|
}
|
|
17374
17421
|
),
|
|
17375
|
-
/* @__PURE__ */ (0,
|
|
17422
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_material14.Typography, { variant: "caption", color: "text.secondary", sx: { textAlign: "center" }, children: "Image will be copied when you submit" })
|
|
17376
17423
|
] })
|
|
17377
17424
|
] })
|
|
17378
17425
|
] }),
|
|
17379
|
-
formData.attachments && formData.attachments.length > 0 && /* @__PURE__ */ (0,
|
|
17380
|
-
/* @__PURE__ */ (0,
|
|
17426
|
+
formData.attachments && formData.attachments.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_material14.Box, { sx: { mt: 2 }, children: [
|
|
17427
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_material14.Typography, { variant: "subtitle2", gutterBottom: true, children: [
|
|
17381
17428
|
"Attached Files (",
|
|
17382
17429
|
formData.attachments.length,
|
|
17383
17430
|
")"
|
|
17384
17431
|
] }),
|
|
17385
|
-
/* @__PURE__ */ (0,
|
|
17386
|
-
|
|
17432
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_material14.Box, { sx: { display: "flex", flexWrap: "wrap", gap: 1 }, children: formData.attachments.map((attachment, index) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
17433
|
+
import_material14.Chip,
|
|
17387
17434
|
{
|
|
17388
17435
|
label: attachment.name,
|
|
17389
17436
|
onDelete: () => removeAttachment(index),
|
|
17390
|
-
deleteIcon: /* @__PURE__ */ (0,
|
|
17437
|
+
deleteIcon: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react3.Trash2, {}),
|
|
17391
17438
|
variant: "outlined",
|
|
17392
17439
|
sx: { maxWidth: 200 }
|
|
17393
17440
|
},
|
|
@@ -17406,8 +17453,8 @@ var FeedbackModal = ({
|
|
|
17406
17453
|
]
|
|
17407
17454
|
}
|
|
17408
17455
|
),
|
|
17409
|
-
/* @__PURE__ */ (0,
|
|
17410
|
-
|
|
17456
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
17457
|
+
import_material14.DialogActions,
|
|
17411
17458
|
{
|
|
17412
17459
|
sx: {
|
|
17413
17460
|
position: "sticky",
|
|
@@ -17420,11 +17467,11 @@ var FeedbackModal = ({
|
|
|
17420
17467
|
borderColor: "divider",
|
|
17421
17468
|
justifyContent: "center"
|
|
17422
17469
|
},
|
|
17423
|
-
children: /* @__PURE__ */ (0,
|
|
17424
|
-
|
|
17470
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
17471
|
+
import_material14.Button,
|
|
17425
17472
|
{
|
|
17426
17473
|
fullWidth: true,
|
|
17427
|
-
startIcon: /* @__PURE__ */ (0,
|
|
17474
|
+
startIcon: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react3.Mail, {}),
|
|
17428
17475
|
disabled: !isValid,
|
|
17429
17476
|
onClick: handleSubmit,
|
|
17430
17477
|
variant: "contained",
|
|
@@ -17436,8 +17483,8 @@ var FeedbackModal = ({
|
|
|
17436
17483
|
]
|
|
17437
17484
|
}
|
|
17438
17485
|
),
|
|
17439
|
-
/* @__PURE__ */ (0,
|
|
17440
|
-
|
|
17486
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
17487
|
+
import_material14.Snackbar,
|
|
17441
17488
|
{
|
|
17442
17489
|
open: snackbarOpen,
|
|
17443
17490
|
autoHideDuration: 4e3,
|
|
@@ -17457,8 +17504,8 @@ var FeedbackModal = ({
|
|
|
17457
17504
|
message: snackbarMessage
|
|
17458
17505
|
}
|
|
17459
17506
|
),
|
|
17460
|
-
/* @__PURE__ */ (0,
|
|
17461
|
-
|
|
17507
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
17508
|
+
import_material14.Dialog,
|
|
17462
17509
|
{
|
|
17463
17510
|
open: confirmDialogOpen,
|
|
17464
17511
|
onClose: () => setConfirmDialogOpen(false),
|
|
@@ -17475,14 +17522,14 @@ var FeedbackModal = ({
|
|
|
17475
17522
|
}
|
|
17476
17523
|
},
|
|
17477
17524
|
children: [
|
|
17478
|
-
/* @__PURE__ */ (0,
|
|
17525
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_material14.DialogTitle, { sx: {
|
|
17479
17526
|
pb: 1,
|
|
17480
17527
|
display: "flex",
|
|
17481
17528
|
alignItems: "center",
|
|
17482
17529
|
gap: 2
|
|
17483
17530
|
}, children: [
|
|
17484
|
-
/* @__PURE__ */ (0,
|
|
17485
|
-
|
|
17531
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
17532
|
+
import_material14.Avatar,
|
|
17486
17533
|
{
|
|
17487
17534
|
sx: {
|
|
17488
17535
|
bgcolor: theme.palette.info.main + "20",
|
|
@@ -17490,17 +17537,17 @@ var FeedbackModal = ({
|
|
|
17490
17537
|
width: 40,
|
|
17491
17538
|
height: 40
|
|
17492
17539
|
},
|
|
17493
|
-
children: /* @__PURE__ */ (0,
|
|
17540
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react3.Camera, {})
|
|
17494
17541
|
}
|
|
17495
17542
|
),
|
|
17496
|
-
/* @__PURE__ */ (0,
|
|
17497
|
-
/* @__PURE__ */ (0,
|
|
17498
|
-
/* @__PURE__ */ (0,
|
|
17543
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_material14.Box, { children: [
|
|
17544
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_material14.Typography, { variant: "h6", sx: { fontWeight: 600 }, children: "Ready to Submit with Image" }),
|
|
17545
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_material14.Typography, { variant: "caption", color: "text.secondary", children: "Here's what will happen when you submit" })
|
|
17499
17546
|
] })
|
|
17500
17547
|
] }),
|
|
17501
|
-
/* @__PURE__ */ (0,
|
|
17502
|
-
/* @__PURE__ */ (0,
|
|
17503
|
-
|
|
17548
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_material14.DialogContent, { sx: { pt: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_material14.Box, { sx: { display: "flex", flexDirection: "column", gap: 2 }, children: [
|
|
17549
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
17550
|
+
import_material14.Paper,
|
|
17504
17551
|
{
|
|
17505
17552
|
variant: "outlined",
|
|
17506
17553
|
sx: {
|
|
@@ -17510,8 +17557,8 @@ var FeedbackModal = ({
|
|
|
17510
17557
|
border: `1px solid ${theme.palette.info.main}20`
|
|
17511
17558
|
},
|
|
17512
17559
|
children: [
|
|
17513
|
-
/* @__PURE__ */ (0,
|
|
17514
|
-
/* @__PURE__ */ (0,
|
|
17560
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_material14.Typography, { variant: "subtitle1", sx: { fontWeight: 600, mb: 2, display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
17561
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_material14.Box, { sx: {
|
|
17515
17562
|
bgcolor: theme.palette.info.main + "20",
|
|
17516
17563
|
color: theme.palette.info.main,
|
|
17517
17564
|
borderRadius: "50%",
|
|
@@ -17525,8 +17572,8 @@ var FeedbackModal = ({
|
|
|
17525
17572
|
}, children: "1" }),
|
|
17526
17573
|
"Your image will be copied to clipboard"
|
|
17527
17574
|
] }),
|
|
17528
|
-
/* @__PURE__ */ (0,
|
|
17529
|
-
/* @__PURE__ */ (0,
|
|
17575
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_material14.Typography, { variant: "subtitle1", sx: { fontWeight: 600, mb: 2, display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
17576
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_material14.Box, { sx: {
|
|
17530
17577
|
bgcolor: theme.palette.info.main + "20",
|
|
17531
17578
|
color: theme.palette.info.main,
|
|
17532
17579
|
borderRadius: "50%",
|
|
@@ -17540,8 +17587,8 @@ var FeedbackModal = ({
|
|
|
17540
17587
|
}, children: "2" }),
|
|
17541
17588
|
"Your email client will open"
|
|
17542
17589
|
] }),
|
|
17543
|
-
/* @__PURE__ */ (0,
|
|
17544
|
-
/* @__PURE__ */ (0,
|
|
17590
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_material14.Typography, { variant: "subtitle1", sx: { fontWeight: 600, mb: 1, display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
17591
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_material14.Box, { sx: {
|
|
17545
17592
|
bgcolor: theme.palette.info.main + "20",
|
|
17546
17593
|
color: theme.palette.info.main,
|
|
17547
17594
|
borderRadius: "50%",
|
|
@@ -17555,34 +17602,34 @@ var FeedbackModal = ({
|
|
|
17555
17602
|
}, children: "3" }),
|
|
17556
17603
|
"Paste the image with Ctrl+V (or Cmd+V)"
|
|
17557
17604
|
] }),
|
|
17558
|
-
/* @__PURE__ */ (0,
|
|
17605
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_material14.Typography, { variant: "body2", color: "text.secondary", sx: { ml: 4, fontStyle: "italic" }, children: "The email will have a clear spot where you should paste" })
|
|
17559
17606
|
]
|
|
17560
17607
|
}
|
|
17561
17608
|
),
|
|
17562
|
-
/* @__PURE__ */ (0,
|
|
17609
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_material14.Alert, { severity: "info", sx: {
|
|
17563
17610
|
background: "transparent",
|
|
17564
17611
|
border: `1px solid ${theme.palette.info.main}30`
|
|
17565
|
-
}, children: /* @__PURE__ */ (0,
|
|
17566
|
-
/* @__PURE__ */ (0,
|
|
17612
|
+
}, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_material14.Typography, { variant: "body2", children: [
|
|
17613
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("strong", { children: "\u{1F4A1} Tip:" }),
|
|
17567
17614
|
" Make sure to paste the image before sending your email!"
|
|
17568
17615
|
] }) })
|
|
17569
17616
|
] }) }),
|
|
17570
|
-
/* @__PURE__ */ (0,
|
|
17571
|
-
/* @__PURE__ */ (0,
|
|
17572
|
-
|
|
17617
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_material14.DialogActions, { sx: { p: 2.5, pt: 1 }, children: [
|
|
17618
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
17619
|
+
import_material14.Button,
|
|
17573
17620
|
{
|
|
17574
17621
|
onClick: () => setConfirmDialogOpen(false),
|
|
17575
17622
|
sx: { color: theme.palette.text.secondary },
|
|
17576
17623
|
children: "Cancel"
|
|
17577
17624
|
}
|
|
17578
17625
|
),
|
|
17579
|
-
/* @__PURE__ */ (0,
|
|
17580
|
-
|
|
17626
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
17627
|
+
import_material14.Button,
|
|
17581
17628
|
{
|
|
17582
17629
|
variant: "contained",
|
|
17583
17630
|
onClick: performSubmit,
|
|
17584
17631
|
disabled: isSubmitting,
|
|
17585
|
-
startIcon: isSubmitting ? /* @__PURE__ */ (0,
|
|
17632
|
+
startIcon: isSubmitting ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_material14.CircularProgress, { size: 16 }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react3.Mail, {}),
|
|
17586
17633
|
sx: {
|
|
17587
17634
|
background: `linear-gradient(135deg, ${theme.palette.primary.main} 0%, ${theme.palette.primary.dark} 100%)`,
|
|
17588
17635
|
"&:hover": {
|
|
@@ -17600,7 +17647,7 @@ var FeedbackModal = ({
|
|
|
17600
17647
|
};
|
|
17601
17648
|
|
|
17602
17649
|
// src/components/feedback/FeedbackButton.tsx
|
|
17603
|
-
var
|
|
17650
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
17604
17651
|
var FeedbackButton = ({
|
|
17605
17652
|
fullScreen = false,
|
|
17606
17653
|
className,
|
|
@@ -17612,17 +17659,17 @@ var FeedbackButton = ({
|
|
|
17612
17659
|
position,
|
|
17613
17660
|
absolute = false
|
|
17614
17661
|
}) => {
|
|
17615
|
-
const theme = (0,
|
|
17662
|
+
const theme = (0, import_material15.useTheme)();
|
|
17616
17663
|
const [open, setOpen] = (0, import_react18.useState)(false);
|
|
17617
17664
|
const handleOpen = () => setOpen(true);
|
|
17618
17665
|
const handleClose = () => setOpen(false);
|
|
17619
17666
|
if (inline) {
|
|
17620
|
-
return /* @__PURE__ */ (0,
|
|
17621
|
-
buttonText ? /* @__PURE__ */ (0,
|
|
17622
|
-
|
|
17667
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
17668
|
+
buttonText ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
17669
|
+
import_material15.Button,
|
|
17623
17670
|
{
|
|
17624
17671
|
variant: "outlined",
|
|
17625
|
-
startIcon: /* @__PURE__ */ (0,
|
|
17672
|
+
startIcon: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.MessageCircle, {}),
|
|
17626
17673
|
onClick: handleOpen,
|
|
17627
17674
|
className,
|
|
17628
17675
|
size,
|
|
@@ -17636,8 +17683,8 @@ var FeedbackButton = ({
|
|
|
17636
17683
|
},
|
|
17637
17684
|
children: buttonText
|
|
17638
17685
|
}
|
|
17639
|
-
) : /* @__PURE__ */ (0,
|
|
17640
|
-
|
|
17686
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_material15.Tooltip, { title: "Send Feedback", arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
17687
|
+
import_material15.IconButton,
|
|
17641
17688
|
{
|
|
17642
17689
|
onClick: handleOpen,
|
|
17643
17690
|
className,
|
|
@@ -17651,10 +17698,10 @@ var FeedbackButton = ({
|
|
|
17651
17698
|
transform: "translateY(-1px)"
|
|
17652
17699
|
}
|
|
17653
17700
|
},
|
|
17654
|
-
children: /* @__PURE__ */ (0,
|
|
17701
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.MessageCircle, {})
|
|
17655
17702
|
}
|
|
17656
17703
|
) }),
|
|
17657
|
-
/* @__PURE__ */ (0,
|
|
17704
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
17658
17705
|
FeedbackModal,
|
|
17659
17706
|
{
|
|
17660
17707
|
open,
|
|
@@ -17664,15 +17711,15 @@ var FeedbackButton = ({
|
|
|
17664
17711
|
)
|
|
17665
17712
|
] });
|
|
17666
17713
|
}
|
|
17667
|
-
return /* @__PURE__ */ (0,
|
|
17668
|
-
/* @__PURE__ */ (0,
|
|
17669
|
-
|
|
17714
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
17715
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_material15.Zoom, { in: true, timeout: 300, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
17716
|
+
import_material15.Tooltip,
|
|
17670
17717
|
{
|
|
17671
17718
|
title: "Send Feedback",
|
|
17672
17719
|
placement: "left",
|
|
17673
17720
|
arrow: true,
|
|
17674
|
-
children: /* @__PURE__ */ (0,
|
|
17675
|
-
|
|
17721
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
17722
|
+
import_material15.Fab,
|
|
17676
17723
|
{
|
|
17677
17724
|
size,
|
|
17678
17725
|
onClick: handleOpen,
|
|
@@ -17710,12 +17757,12 @@ var FeedbackButton = ({
|
|
|
17710
17757
|
}
|
|
17711
17758
|
}
|
|
17712
17759
|
},
|
|
17713
|
-
children: /* @__PURE__ */ (0,
|
|
17760
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.MessageCircle, {})
|
|
17714
17761
|
}
|
|
17715
17762
|
)
|
|
17716
17763
|
}
|
|
17717
17764
|
) }),
|
|
17718
|
-
/* @__PURE__ */ (0,
|
|
17765
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
17719
17766
|
FeedbackModal,
|
|
17720
17767
|
{
|
|
17721
17768
|
open,
|
|
@@ -17728,13 +17775,13 @@ var FeedbackButton = ({
|
|
|
17728
17775
|
|
|
17729
17776
|
// src/hooks/useAiChat.ts
|
|
17730
17777
|
var import_react19 = require("react");
|
|
17731
|
-
var
|
|
17778
|
+
var import_material16 = require("@mui/material");
|
|
17732
17779
|
init_aiProviderStore();
|
|
17733
17780
|
init_modelStore();
|
|
17734
17781
|
init_packageSettingsStore();
|
|
17735
17782
|
init_debugLogger();
|
|
17736
17783
|
var useAIChat = () => {
|
|
17737
|
-
const isMobile = (0,
|
|
17784
|
+
const isMobile = (0, import_material16.useMediaQuery)((theme) => theme.breakpoints.down("sm"));
|
|
17738
17785
|
const provider = useAIProviderStore((state) => state.provider);
|
|
17739
17786
|
const SYSTEM_PROMPT = useModelStore((state) => state.systemPrompt);
|
|
17740
17787
|
const OLLAMA_MODEL = usePackageSettingsStore((state) => state.settings?.defaultModel || "");
|
|
@@ -17902,8 +17949,8 @@ var import_react22 = require("react");
|
|
|
17902
17949
|
|
|
17903
17950
|
// src/shared/components/NotificationProvider.tsx
|
|
17904
17951
|
var import_react21 = require("react");
|
|
17905
|
-
var
|
|
17906
|
-
var
|
|
17952
|
+
var import_material17 = require("@mui/material");
|
|
17953
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
17907
17954
|
var NotificationContext = (0, import_react21.createContext)(void 0);
|
|
17908
17955
|
var useNotification = () => {
|
|
17909
17956
|
const context = (0, import_react21.useContext)(NotificationContext);
|
|
@@ -20369,7 +20416,7 @@ var themeMap_default = themeMap;
|
|
|
20369
20416
|
|
|
20370
20417
|
// src/modals/chat-modal/chat-modal.tsx
|
|
20371
20418
|
var import_rxjs19 = require("rxjs");
|
|
20372
|
-
var
|
|
20419
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
20373
20420
|
var FULL_SCREEN_THRESHOLD = 100;
|
|
20374
20421
|
var MIN_WINDOWED_HEIGHT = 400;
|
|
20375
20422
|
var MAX_WINDOWED_HEIGHT = 600;
|
|
@@ -20619,7 +20666,7 @@ var ChatModal = ({
|
|
|
20619
20666
|
if (themeLoading) {
|
|
20620
20667
|
return null;
|
|
20621
20668
|
}
|
|
20622
|
-
return /* @__PURE__ */ (0,
|
|
20669
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_material18.ThemeProvider, { theme: activeTheme, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_material18.Modal, { open, onClose: handleClose, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
20623
20670
|
draggable_box_default,
|
|
20624
20671
|
{
|
|
20625
20672
|
ref: modalRef,
|
|
@@ -20628,7 +20675,7 @@ var ChatModal = ({
|
|
|
20628
20675
|
fullScreen,
|
|
20629
20676
|
onDrag: handleCustomDrag,
|
|
20630
20677
|
children: [
|
|
20631
|
-
/* @__PURE__ */ (0,
|
|
20678
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20632
20679
|
modal_header_default,
|
|
20633
20680
|
{
|
|
20634
20681
|
fullScreen,
|
|
@@ -20645,8 +20692,8 @@ var ChatModal = ({
|
|
|
20645
20692
|
onExitFullscreen: handleExitFullscreen
|
|
20646
20693
|
}
|
|
20647
20694
|
),
|
|
20648
|
-
/* @__PURE__ */ (0,
|
|
20649
|
-
|
|
20695
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20696
|
+
import_material18.Box,
|
|
20650
20697
|
{
|
|
20651
20698
|
sx: {
|
|
20652
20699
|
flex: 1,
|
|
@@ -20657,8 +20704,8 @@ var ChatModal = ({
|
|
|
20657
20704
|
minHeight: 0
|
|
20658
20705
|
// Important for flex scrolling
|
|
20659
20706
|
},
|
|
20660
|
-
children: /* @__PURE__ */ (0,
|
|
20661
|
-
|
|
20707
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
20708
|
+
import_material18.Box,
|
|
20662
20709
|
{
|
|
20663
20710
|
sx: {
|
|
20664
20711
|
flex: 1,
|
|
@@ -20687,7 +20734,7 @@ var ChatModal = ({
|
|
|
20687
20734
|
}
|
|
20688
20735
|
},
|
|
20689
20736
|
children: [
|
|
20690
|
-
/* @__PURE__ */ (0,
|
|
20737
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20691
20738
|
query_input_default,
|
|
20692
20739
|
{
|
|
20693
20740
|
inputValue,
|
|
@@ -20697,9 +20744,9 @@ var ChatModal = ({
|
|
|
20697
20744
|
showSettings,
|
|
20698
20745
|
setShowSettings,
|
|
20699
20746
|
setApiKey,
|
|
20700
|
-
startAdornment: /* @__PURE__ */ (0,
|
|
20701
|
-
/* @__PURE__ */ (0,
|
|
20702
|
-
|
|
20747
|
+
startAdornment: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_material18.InputAdornment, { position: "start", sx: { gap: 1 }, children: [
|
|
20748
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_material18.Tooltip, { title: `Current AI: ${selectedModel.replace("Bandit-", "")}`, arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20749
|
+
import_material18.IconButton,
|
|
20703
20750
|
{
|
|
20704
20751
|
onClick: (e) => setModelAnchorEl(e.currentTarget),
|
|
20705
20752
|
sx: {
|
|
@@ -20711,8 +20758,8 @@ var ChatModal = ({
|
|
|
20711
20758
|
transform: "scale(1.05)"
|
|
20712
20759
|
}
|
|
20713
20760
|
},
|
|
20714
|
-
children: /* @__PURE__ */ (0,
|
|
20715
|
-
|
|
20761
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20762
|
+
import_material18.Avatar,
|
|
20716
20763
|
{
|
|
20717
20764
|
src: currentAvatar,
|
|
20718
20765
|
alt: selectedModel,
|
|
@@ -20727,8 +20774,8 @@ var ChatModal = ({
|
|
|
20727
20774
|
)
|
|
20728
20775
|
}
|
|
20729
20776
|
) }),
|
|
20730
|
-
/* @__PURE__ */ (0,
|
|
20731
|
-
|
|
20777
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20778
|
+
import_material18.Menu,
|
|
20732
20779
|
{
|
|
20733
20780
|
anchorEl: modelAnchorEl,
|
|
20734
20781
|
open: Boolean(modelAnchorEl),
|
|
@@ -20764,8 +20811,8 @@ var ChatModal = ({
|
|
|
20764
20811
|
}
|
|
20765
20812
|
}
|
|
20766
20813
|
},
|
|
20767
|
-
children: availableModels.map((model) => /* @__PURE__ */ (0,
|
|
20768
|
-
|
|
20814
|
+
children: availableModels.map((model) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
20815
|
+
import_material18.MenuItem,
|
|
20769
20816
|
{
|
|
20770
20817
|
selected: model.name === selectedModel,
|
|
20771
20818
|
onClick: () => {
|
|
@@ -20781,8 +20828,8 @@ var ChatModal = ({
|
|
|
20781
20828
|
px: 2
|
|
20782
20829
|
},
|
|
20783
20830
|
children: [
|
|
20784
|
-
/* @__PURE__ */ (0,
|
|
20785
|
-
|
|
20831
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20832
|
+
import_material18.Avatar,
|
|
20786
20833
|
{
|
|
20787
20834
|
src: model.avatarBase64 || modelAvatars[model.name] || banditHead2,
|
|
20788
20835
|
alt: model.name,
|
|
@@ -20794,12 +20841,12 @@ var ChatModal = ({
|
|
|
20794
20841
|
}
|
|
20795
20842
|
}
|
|
20796
20843
|
),
|
|
20797
|
-
/* @__PURE__ */ (0,
|
|
20798
|
-
/* @__PURE__ */ (0,
|
|
20799
|
-
/* @__PURE__ */ (0,
|
|
20844
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_material18.Box, { sx: { flex: 1 }, children: [
|
|
20845
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_material18.Typography, { variant: "body2", sx: { fontWeight: 500 }, children: model.name.replace("Bandit-", "") }),
|
|
20846
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_material18.Typography, { variant: "caption", sx: { color: activeTheme.palette.text.secondary }, children: model.name === selectedModel ? "Currently active" : "Switch to this AI" })
|
|
20800
20847
|
] }),
|
|
20801
|
-
model.name === selectedModel && /* @__PURE__ */ (0,
|
|
20802
|
-
|
|
20848
|
+
model.name === selectedModel && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20849
|
+
import_material18.Box,
|
|
20803
20850
|
{
|
|
20804
20851
|
sx: {
|
|
20805
20852
|
width: 8,
|
|
@@ -20815,9 +20862,9 @@ var ChatModal = ({
|
|
|
20815
20862
|
))
|
|
20816
20863
|
}
|
|
20817
20864
|
),
|
|
20818
|
-
isTTSAvailable && /* @__PURE__ */ (0,
|
|
20819
|
-
/* @__PURE__ */ (0,
|
|
20820
|
-
|
|
20865
|
+
isTTSAvailable && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
|
|
20866
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_material18.Tooltip, { title: `Voice: ${selectedVoice ? toTitleCase2(selectedVoice.split("-")[1]) : "Default"}`, arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20867
|
+
import_material18.IconButton,
|
|
20821
20868
|
{
|
|
20822
20869
|
onClick: (e) => setVoiceAnchorEl(e.currentTarget),
|
|
20823
20870
|
sx: {
|
|
@@ -20832,11 +20879,11 @@ var ChatModal = ({
|
|
|
20832
20879
|
}
|
|
20833
20880
|
},
|
|
20834
20881
|
"aria-label": `Change voice. Currently using ${selectedVoice ? toTitleCase2(selectedVoice.split("-")[1]) : "default"}`,
|
|
20835
|
-
children: /* @__PURE__ */ (0,
|
|
20882
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(RecordVoiceOverIcon, { fontSize: "small" })
|
|
20836
20883
|
}
|
|
20837
20884
|
) }),
|
|
20838
|
-
/* @__PURE__ */ (0,
|
|
20839
|
-
|
|
20885
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20886
|
+
import_material18.Menu,
|
|
20840
20887
|
{
|
|
20841
20888
|
anchorEl: voiceAnchorEl,
|
|
20842
20889
|
open: Boolean(voiceAnchorEl),
|
|
@@ -20869,22 +20916,22 @@ var ChatModal = ({
|
|
|
20869
20916
|
}
|
|
20870
20917
|
}
|
|
20871
20918
|
},
|
|
20872
|
-
children: availableVoices.length > 0 ? availableVoices.map((voice) => /* @__PURE__ */ (0,
|
|
20873
|
-
|
|
20919
|
+
children: availableVoices.length > 0 ? availableVoices.map((voice) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20920
|
+
import_material18.MenuItem,
|
|
20874
20921
|
{
|
|
20875
20922
|
selected: voice === selectedVoice,
|
|
20876
20923
|
onClick: () => {
|
|
20877
20924
|
handleVoiceChange(voice);
|
|
20878
20925
|
setVoiceAnchorEl(null);
|
|
20879
20926
|
},
|
|
20880
|
-
children: /* @__PURE__ */ (0,
|
|
20881
|
-
/* @__PURE__ */ (0,
|
|
20882
|
-
/* @__PURE__ */ (0,
|
|
20883
|
-
/* @__PURE__ */ (0,
|
|
20884
|
-
/* @__PURE__ */ (0,
|
|
20927
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_material18.Box, { sx: { display: "flex", alignItems: "center", gap: 1, width: "100%" }, children: [
|
|
20928
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(RecordVoiceOverIcon, { fontSize: "small", sx: { color: activeTheme.palette.text.secondary } }),
|
|
20929
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_material18.Box, { sx: { flex: 1 }, children: [
|
|
20930
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_material18.Typography, { variant: "body2", children: toTitleCase2(voice.split("-")[1]) }),
|
|
20931
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_material18.Typography, { variant: "caption", sx: { color: activeTheme.palette.text.secondary }, children: voice === selectedVoice ? "Currently active" : "Switch to this voice" })
|
|
20885
20932
|
] }),
|
|
20886
|
-
voice === selectedVoice && /* @__PURE__ */ (0,
|
|
20887
|
-
|
|
20933
|
+
voice === selectedVoice && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20934
|
+
import_material18.Box,
|
|
20888
20935
|
{
|
|
20889
20936
|
sx: {
|
|
20890
20937
|
width: 8,
|
|
@@ -20897,12 +20944,12 @@ var ChatModal = ({
|
|
|
20897
20944
|
] })
|
|
20898
20945
|
},
|
|
20899
20946
|
voice
|
|
20900
|
-
)) : /* @__PURE__ */ (0,
|
|
20947
|
+
)) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_material18.MenuItem, { disabled: true, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_material18.Typography, { variant: "body2", color: "text.secondary", children: "No voices available" }) })
|
|
20901
20948
|
}
|
|
20902
20949
|
)
|
|
20903
20950
|
] }),
|
|
20904
|
-
pastedImages.map((img, idx) => /* @__PURE__ */ (0,
|
|
20905
|
-
|
|
20951
|
+
pastedImages.map((img, idx) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
20952
|
+
import_material18.Box,
|
|
20906
20953
|
{
|
|
20907
20954
|
sx: {
|
|
20908
20955
|
position: "relative",
|
|
@@ -20912,8 +20959,8 @@ var ChatModal = ({
|
|
|
20912
20959
|
}
|
|
20913
20960
|
},
|
|
20914
20961
|
children: [
|
|
20915
|
-
/* @__PURE__ */ (0,
|
|
20916
|
-
|
|
20962
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20963
|
+
import_material18.Avatar,
|
|
20917
20964
|
{
|
|
20918
20965
|
src: img,
|
|
20919
20966
|
variant: "rounded",
|
|
@@ -20926,8 +20973,8 @@ var ChatModal = ({
|
|
|
20926
20973
|
}
|
|
20927
20974
|
}
|
|
20928
20975
|
),
|
|
20929
|
-
/* @__PURE__ */ (0,
|
|
20930
|
-
|
|
20976
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_material18.Tooltip, { title: "Remove image", arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20977
|
+
import_material18.IconButton,
|
|
20931
20978
|
{
|
|
20932
20979
|
size: "small",
|
|
20933
20980
|
onClick: () => removeImage(idx),
|
|
@@ -20946,7 +20993,7 @@ var ChatModal = ({
|
|
|
20946
20993
|
// Removed transform to prevent jitter
|
|
20947
20994
|
}
|
|
20948
20995
|
},
|
|
20949
|
-
children: /* @__PURE__ */ (0,
|
|
20996
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(CloseIcon, { sx: { fontSize: 12 } })
|
|
20950
20997
|
}
|
|
20951
20998
|
) })
|
|
20952
20999
|
]
|
|
@@ -20954,8 +21001,8 @@ var ChatModal = ({
|
|
|
20954
21001
|
idx
|
|
20955
21002
|
))
|
|
20956
21003
|
] }),
|
|
20957
|
-
endAdornment: /* @__PURE__ */ (0,
|
|
20958
|
-
preferences.feedbackEnabled && /* @__PURE__ */ (0,
|
|
21004
|
+
endAdornment: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_material18.InputAdornment, { position: "end", sx: { gap: 1 }, children: [
|
|
21005
|
+
preferences.feedbackEnabled && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20959
21006
|
FeedbackButton,
|
|
20960
21007
|
{
|
|
20961
21008
|
inline: true,
|
|
@@ -20963,8 +21010,8 @@ var ChatModal = ({
|
|
|
20963
21010
|
buttonText: ""
|
|
20964
21011
|
}
|
|
20965
21012
|
),
|
|
20966
|
-
/* @__PURE__ */ (0,
|
|
20967
|
-
|
|
21013
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_material18.Tooltip, { title: inputValue.trim() === "" ? "Type a message first" : "Send Message", arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
21014
|
+
import_material18.IconButton,
|
|
20968
21015
|
{
|
|
20969
21016
|
onClick: handleSend,
|
|
20970
21017
|
disabled: inputValue.trim() === "",
|
|
@@ -20985,20 +21032,20 @@ var ChatModal = ({
|
|
|
20985
21032
|
color: activeTheme.palette.action.disabled
|
|
20986
21033
|
}
|
|
20987
21034
|
},
|
|
20988
|
-
children: /* @__PURE__ */ (0,
|
|
21035
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SendIcon, {})
|
|
20989
21036
|
}
|
|
20990
21037
|
) }) })
|
|
20991
21038
|
] })
|
|
20992
21039
|
}
|
|
20993
21040
|
),
|
|
20994
|
-
!responseStarted && componentStatus === "Loading" && /* @__PURE__ */ (0,
|
|
20995
|
-
responseStarted && response && !showSettings && /* @__PURE__ */ (0,
|
|
21041
|
+
!responseStarted && componentStatus === "Loading" && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(generic_loader_default, { variant: "dots" }),
|
|
21042
|
+
responseStarted && response && !showSettings && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ai_response_text_field_default, { question: previousQuestion, response })
|
|
20996
21043
|
]
|
|
20997
21044
|
}
|
|
20998
21045
|
)
|
|
20999
21046
|
}
|
|
21000
21047
|
),
|
|
21001
|
-
/* @__PURE__ */ (0,
|
|
21048
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
21002
21049
|
chat_drawer_default,
|
|
21003
21050
|
{
|
|
21004
21051
|
drawerOpen,
|