@burtson-labs/bandit-engine 2.0.74 → 2.0.75
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-W4HX45DE.mjs → chat-S35XO43Z.mjs} +3 -3
- package/dist/chat-provider.js +73 -1
- package/dist/chat-provider.js.map +1 -1
- package/dist/chat-provider.mjs +2 -2
- package/dist/{chunk-DHYP4K5O.mjs → chunk-3LT77723.mjs} +105 -3
- package/dist/chunk-3LT77723.mjs.map +1 -0
- package/dist/{chunk-YBQRVTZF.mjs → chunk-BEXIQYMG.mjs} +30 -2
- package/dist/chunk-BEXIQYMG.mjs.map +1 -0
- package/dist/{chunk-3JIZRRCI.mjs → chunk-LBV32D55.mjs} +354 -122
- package/dist/chunk-LBV32D55.mjs.map +1 -0
- package/dist/{chunk-SXLI47FV.mjs → chunk-OPN32F2X.mjs} +3 -2
- package/dist/chunk-OPN32F2X.mjs.map +1 -0
- package/dist/index.js +504 -162
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -4
- package/dist/management/management.js +1395 -1054
- package/dist/management/management.js.map +1 -1
- package/dist/management/management.mjs +2 -2
- package/package.json +1 -1
- package/dist/chunk-3JIZRRCI.mjs.map +0 -1
- package/dist/chunk-DHYP4K5O.mjs.map +0 -1
- package/dist/chunk-SXLI47FV.mjs.map +0 -1
- package/dist/chunk-YBQRVTZF.mjs.map +0 -1
- /package/dist/{chat-W4HX45DE.mjs.map → chat-S35XO43Z.mjs.map} +0 -0
|
@@ -5,8 +5,13 @@ import {
|
|
|
5
5
|
aiProviderInitService
|
|
6
6
|
} from "./chunk-6ITUH375.mjs";
|
|
7
7
|
import {
|
|
8
|
+
addMcpServer,
|
|
9
|
+
deleteMcpServer,
|
|
10
|
+
discoverMcpTools,
|
|
11
|
+
listMcpServers,
|
|
12
|
+
updateMcpServer,
|
|
8
13
|
useMCPToolsStore
|
|
9
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-3LT77723.mjs";
|
|
10
15
|
import {
|
|
11
16
|
chat_modal_default
|
|
12
17
|
} from "./chunk-JURUEF52.mjs";
|
|
@@ -112,13 +117,13 @@ import {
|
|
|
112
117
|
} from "./chunk-KCI46M23.mjs";
|
|
113
118
|
|
|
114
119
|
// src/management/management.tsx
|
|
115
|
-
import { useState as
|
|
120
|
+
import { useState as useState15, useEffect as useEffect12, useCallback as useCallback9, useMemo as useMemo6 } from "react";
|
|
116
121
|
import useMediaQuery7 from "@mui/material/useMediaQuery";
|
|
117
122
|
import { alpha as alpha2, createTheme } from "@mui/material/styles";
|
|
118
123
|
import {
|
|
119
|
-
Box as
|
|
120
|
-
Button as
|
|
121
|
-
Typography as
|
|
124
|
+
Box as Box14,
|
|
125
|
+
Button as Button11,
|
|
126
|
+
Typography as Typography13,
|
|
122
127
|
ThemeProvider,
|
|
123
128
|
CssBaseline,
|
|
124
129
|
Fab,
|
|
@@ -9265,8 +9270,8 @@ var ProviderTab = () => {
|
|
|
9265
9270
|
};
|
|
9266
9271
|
|
|
9267
9272
|
// src/management/components/MCPToolsTabV2.tsx
|
|
9268
|
-
import { useEffect as
|
|
9269
|
-
import { Box as
|
|
9273
|
+
import { useEffect as useEffect11, useMemo as useMemo5, useState as useState14 } from "react";
|
|
9274
|
+
import { Box as Box13, Typography as Typography12, Paper as Paper7, Chip as Chip10, Stack as Stack6, IconButton as IconButton7, Tooltip as Tooltip4, LinearProgress as LinearProgress6, Switch as Switch4, FormControlLabel as FormControlLabel3 } from "@mui/material";
|
|
9270
9275
|
|
|
9271
9276
|
// src/services/mcp/mcpControllerService.ts
|
|
9272
9277
|
var isPlaygroundMode = () => {
|
|
@@ -9338,15 +9343,241 @@ async function fetchMcpHealth() {
|
|
|
9338
9343
|
}
|
|
9339
9344
|
}
|
|
9340
9345
|
|
|
9341
|
-
// src/management/components/
|
|
9346
|
+
// src/management/components/McpServersSection.tsx
|
|
9347
|
+
import { useCallback as useCallback8, useEffect as useEffect10, useState as useState13 } from "react";
|
|
9348
|
+
import {
|
|
9349
|
+
Alert as Alert10,
|
|
9350
|
+
Box as Box12,
|
|
9351
|
+
Button as Button10,
|
|
9352
|
+
Chip as Chip9,
|
|
9353
|
+
CircularProgress as CircularProgress2,
|
|
9354
|
+
Collapse as Collapse2,
|
|
9355
|
+
FormControlLabel as FormControlLabel2,
|
|
9356
|
+
IconButton as IconButton6,
|
|
9357
|
+
LinearProgress as LinearProgress5,
|
|
9358
|
+
MenuItem as MenuItem4,
|
|
9359
|
+
Paper as Paper6,
|
|
9360
|
+
Stack as Stack5,
|
|
9361
|
+
Switch as Switch3,
|
|
9362
|
+
TextField as TextField7,
|
|
9363
|
+
Tooltip as Tooltip3,
|
|
9364
|
+
Typography as Typography11
|
|
9365
|
+
} from "@mui/material";
|
|
9342
9366
|
import { jsx as jsx12, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
9367
|
+
var emptyForm = { name: "", url: "", authType: "none", authValue: "", headerName: "" };
|
|
9368
|
+
var McpServersSection = () => {
|
|
9369
|
+
const [servers, setServers] = useState13([]);
|
|
9370
|
+
const [loading, setLoading] = useState13(false);
|
|
9371
|
+
const [error, setError] = useState13(null);
|
|
9372
|
+
const [form, setForm] = useState13(emptyForm);
|
|
9373
|
+
const [adding, setAdding] = useState13(false);
|
|
9374
|
+
const [showForm, setShowForm] = useState13(false);
|
|
9375
|
+
const [tools, setTools] = useState13({});
|
|
9376
|
+
const reloadChatTools = useMCPToolsStore((s) => s.loadMcpServerTools);
|
|
9377
|
+
const refresh = useCallback8(async () => {
|
|
9378
|
+
setLoading(true);
|
|
9379
|
+
setError(null);
|
|
9380
|
+
try {
|
|
9381
|
+
setServers(await listMcpServers());
|
|
9382
|
+
} catch (e) {
|
|
9383
|
+
setError(e instanceof Error ? e.message : "Could not load MCP servers.");
|
|
9384
|
+
} finally {
|
|
9385
|
+
setLoading(false);
|
|
9386
|
+
}
|
|
9387
|
+
}, []);
|
|
9388
|
+
useEffect10(() => {
|
|
9389
|
+
refresh();
|
|
9390
|
+
}, [refresh]);
|
|
9391
|
+
const handleAdd = async () => {
|
|
9392
|
+
if (!form.name.trim() || !form.url.trim()) {
|
|
9393
|
+
setError("Name and URL are required.");
|
|
9394
|
+
return;
|
|
9395
|
+
}
|
|
9396
|
+
setAdding(true);
|
|
9397
|
+
setError(null);
|
|
9398
|
+
try {
|
|
9399
|
+
await addMcpServer({
|
|
9400
|
+
name: form.name.trim(),
|
|
9401
|
+
url: form.url.trim(),
|
|
9402
|
+
authType: form.authType,
|
|
9403
|
+
authValue: form.authType === "none" ? void 0 : form.authValue,
|
|
9404
|
+
headerName: form.authType === "header" ? form.headerName : void 0
|
|
9405
|
+
});
|
|
9406
|
+
setForm(emptyForm);
|
|
9407
|
+
setShowForm(false);
|
|
9408
|
+
await refresh();
|
|
9409
|
+
void reloadChatTools();
|
|
9410
|
+
} catch (e) {
|
|
9411
|
+
setError(e instanceof Error ? e.message : "Could not add the server.");
|
|
9412
|
+
} finally {
|
|
9413
|
+
setAdding(false);
|
|
9414
|
+
}
|
|
9415
|
+
};
|
|
9416
|
+
const handleDelete = async (id) => {
|
|
9417
|
+
setError(null);
|
|
9418
|
+
try {
|
|
9419
|
+
await deleteMcpServer(id);
|
|
9420
|
+
await refresh();
|
|
9421
|
+
void reloadChatTools();
|
|
9422
|
+
} catch (e) {
|
|
9423
|
+
setError(e instanceof Error ? e.message : "Could not remove the server.");
|
|
9424
|
+
}
|
|
9425
|
+
};
|
|
9426
|
+
const handleToggle = async (server) => {
|
|
9427
|
+
setError(null);
|
|
9428
|
+
try {
|
|
9429
|
+
await updateMcpServer(server.id, { enabled: !server.enabled });
|
|
9430
|
+
await refresh();
|
|
9431
|
+
void reloadChatTools();
|
|
9432
|
+
} catch (e) {
|
|
9433
|
+
setError(e instanceof Error ? e.message : "Could not update the server.");
|
|
9434
|
+
}
|
|
9435
|
+
};
|
|
9436
|
+
const handleDiscover = async (id) => {
|
|
9437
|
+
setTools((prev) => ({ ...prev, [id]: "loading" }));
|
|
9438
|
+
try {
|
|
9439
|
+
const { tools: discovered } = await discoverMcpTools(id);
|
|
9440
|
+
setTools((prev) => ({ ...prev, [id]: discovered }));
|
|
9441
|
+
} catch (e) {
|
|
9442
|
+
setTools((prev) => ({ ...prev, [id]: { error: e instanceof Error ? e.message : "Could not connect." } }));
|
|
9443
|
+
}
|
|
9444
|
+
};
|
|
9445
|
+
return /* @__PURE__ */ jsxs12(Paper6, { sx: { p: 2, mb: 2 }, children: [
|
|
9446
|
+
/* @__PURE__ */ jsxs12(Box12, { sx: { display: "flex", alignItems: "center", justifyContent: "space-between", mb: 1, gap: 1, flexWrap: "wrap" }, children: [
|
|
9447
|
+
/* @__PURE__ */ jsxs12(Box12, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
9448
|
+
/* @__PURE__ */ jsx12(CloudIcon, {}),
|
|
9449
|
+
/* @__PURE__ */ jsx12(Typography11, { variant: "subtitle1", sx: { fontWeight: 700 }, children: "MCP Servers" }),
|
|
9450
|
+
/* @__PURE__ */ jsx12(Chip9, { size: "small", label: String(servers.length) })
|
|
9451
|
+
] }),
|
|
9452
|
+
/* @__PURE__ */ jsxs12(Box12, { sx: { display: "flex", alignItems: "center", gap: 0.5 }, children: [
|
|
9453
|
+
/* @__PURE__ */ jsx12(Tooltip3, { title: "Refresh", children: /* @__PURE__ */ jsx12(IconButton6, { onClick: refresh, size: "small", children: /* @__PURE__ */ jsx12(RefreshIcon, {}) }) }),
|
|
9454
|
+
/* @__PURE__ */ jsx12(Button10, { size: "small", variant: "contained", startIcon: /* @__PURE__ */ jsx12(AddIcon, {}), onClick: () => setShowForm((v) => !v), children: "Add server" })
|
|
9455
|
+
] })
|
|
9456
|
+
] }),
|
|
9457
|
+
/* @__PURE__ */ jsx12(Typography11, { variant: "body2", color: "text.secondary", sx: { mb: 2 }, children: "Connect a remote Model Context Protocol server to give the assistant its tools. The gateway holds the connection and proxies calls \u2014 your browser never talks to the server directly." }),
|
|
9458
|
+
error && /* @__PURE__ */ jsx12(Alert10, { severity: "error", sx: { mb: 2 }, onClose: () => setError(null), children: error }),
|
|
9459
|
+
/* @__PURE__ */ jsx12(Collapse2, { in: showForm, children: /* @__PURE__ */ jsx12(Paper6, { variant: "outlined", sx: { p: 2, mb: 2 }, children: /* @__PURE__ */ jsxs12(Stack5, { spacing: 2, children: [
|
|
9460
|
+
/* @__PURE__ */ jsx12(
|
|
9461
|
+
TextField7,
|
|
9462
|
+
{
|
|
9463
|
+
label: "Name",
|
|
9464
|
+
size: "small",
|
|
9465
|
+
value: form.name,
|
|
9466
|
+
onChange: (e) => setForm({ ...form, name: e.target.value }),
|
|
9467
|
+
placeholder: "e.g. github",
|
|
9468
|
+
fullWidth: true
|
|
9469
|
+
}
|
|
9470
|
+
),
|
|
9471
|
+
/* @__PURE__ */ jsx12(
|
|
9472
|
+
TextField7,
|
|
9473
|
+
{
|
|
9474
|
+
label: "Server URL",
|
|
9475
|
+
size: "small",
|
|
9476
|
+
value: form.url,
|
|
9477
|
+
onChange: (e) => setForm({ ...form, url: e.target.value }),
|
|
9478
|
+
placeholder: "https://mcp.example.com/mcp",
|
|
9479
|
+
fullWidth: true
|
|
9480
|
+
}
|
|
9481
|
+
),
|
|
9482
|
+
/* @__PURE__ */ jsxs12(
|
|
9483
|
+
TextField7,
|
|
9484
|
+
{
|
|
9485
|
+
select: true,
|
|
9486
|
+
label: "Auth",
|
|
9487
|
+
size: "small",
|
|
9488
|
+
value: form.authType,
|
|
9489
|
+
onChange: (e) => setForm({ ...form, authType: e.target.value }),
|
|
9490
|
+
sx: { maxWidth: 220 },
|
|
9491
|
+
children: [
|
|
9492
|
+
/* @__PURE__ */ jsx12(MenuItem4, { value: "none", children: "None" }),
|
|
9493
|
+
/* @__PURE__ */ jsx12(MenuItem4, { value: "bearer", children: "Bearer token" }),
|
|
9494
|
+
/* @__PURE__ */ jsx12(MenuItem4, { value: "header", children: "Custom header" })
|
|
9495
|
+
]
|
|
9496
|
+
}
|
|
9497
|
+
),
|
|
9498
|
+
form.authType === "header" && /* @__PURE__ */ jsx12(
|
|
9499
|
+
TextField7,
|
|
9500
|
+
{
|
|
9501
|
+
label: "Header name",
|
|
9502
|
+
size: "small",
|
|
9503
|
+
value: form.headerName,
|
|
9504
|
+
onChange: (e) => setForm({ ...form, headerName: e.target.value }),
|
|
9505
|
+
placeholder: "X-Api-Key",
|
|
9506
|
+
fullWidth: true
|
|
9507
|
+
}
|
|
9508
|
+
),
|
|
9509
|
+
form.authType !== "none" && /* @__PURE__ */ jsx12(
|
|
9510
|
+
TextField7,
|
|
9511
|
+
{
|
|
9512
|
+
label: form.authType === "bearer" ? "Token" : "Header value",
|
|
9513
|
+
size: "small",
|
|
9514
|
+
type: "password",
|
|
9515
|
+
value: form.authValue,
|
|
9516
|
+
onChange: (e) => setForm({ ...form, authValue: e.target.value }),
|
|
9517
|
+
fullWidth: true
|
|
9518
|
+
}
|
|
9519
|
+
),
|
|
9520
|
+
/* @__PURE__ */ jsxs12(Box12, { sx: { display: "flex", gap: 1 }, children: [
|
|
9521
|
+
/* @__PURE__ */ jsx12(Button10, { variant: "contained", onClick: handleAdd, disabled: adding, children: adding ? "Adding\u2026" : "Add server" }),
|
|
9522
|
+
/* @__PURE__ */ jsx12(
|
|
9523
|
+
Button10,
|
|
9524
|
+
{
|
|
9525
|
+
onClick: () => {
|
|
9526
|
+
setShowForm(false);
|
|
9527
|
+
setForm(emptyForm);
|
|
9528
|
+
},
|
|
9529
|
+
children: "Cancel"
|
|
9530
|
+
}
|
|
9531
|
+
)
|
|
9532
|
+
] })
|
|
9533
|
+
] }) }) }),
|
|
9534
|
+
loading && /* @__PURE__ */ jsx12(LinearProgress5, { sx: { mb: 2 } }),
|
|
9535
|
+
/* @__PURE__ */ jsxs12(Stack5, { spacing: 1.5, children: [
|
|
9536
|
+
servers.length === 0 && !loading && /* @__PURE__ */ jsx12(Typography11, { variant: "body2", color: "text.secondary", children: "No MCP servers connected yet." }),
|
|
9537
|
+
servers.map((server) => {
|
|
9538
|
+
const toolState = tools[server.id];
|
|
9539
|
+
return /* @__PURE__ */ jsxs12(Paper6, { variant: "outlined", sx: { p: 1.5 }, children: [
|
|
9540
|
+
/* @__PURE__ */ jsxs12(Box12, { sx: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: 1 }, children: [
|
|
9541
|
+
/* @__PURE__ */ jsxs12(Box12, { sx: { minWidth: 0 }, children: [
|
|
9542
|
+
/* @__PURE__ */ jsx12(Typography11, { variant: "subtitle2", sx: { fontWeight: 700 }, children: server.name }),
|
|
9543
|
+
/* @__PURE__ */ jsx12(Typography11, { variant: "caption", color: "text.secondary", sx: { wordBreak: "break-all" }, children: server.url })
|
|
9544
|
+
] }),
|
|
9545
|
+
/* @__PURE__ */ jsxs12(Box12, { sx: { display: "flex", alignItems: "center", gap: 0.5, flexShrink: 0 }, children: [
|
|
9546
|
+
server.hasAuth && /* @__PURE__ */ jsx12(Chip9, { size: "small", label: server.authType }),
|
|
9547
|
+
/* @__PURE__ */ jsx12(Tooltip3, { title: server.enabled ? "Enabled" : "Disabled", children: /* @__PURE__ */ jsx12(
|
|
9548
|
+
FormControlLabel2,
|
|
9549
|
+
{
|
|
9550
|
+
sx: { mr: 0 },
|
|
9551
|
+
control: /* @__PURE__ */ jsx12(Switch3, { size: "small", checked: server.enabled, onChange: () => handleToggle(server) }),
|
|
9552
|
+
label: ""
|
|
9553
|
+
}
|
|
9554
|
+
) }),
|
|
9555
|
+
/* @__PURE__ */ jsx12(Tooltip3, { title: "Test & list tools", children: /* @__PURE__ */ jsx12(IconButton6, { size: "small", onClick: () => handleDiscover(server.id), children: /* @__PURE__ */ jsx12(RefreshIcon, {}) }) }),
|
|
9556
|
+
/* @__PURE__ */ jsx12(Tooltip3, { title: "Remove", children: /* @__PURE__ */ jsx12(IconButton6, { size: "small", onClick: () => handleDelete(server.id), children: /* @__PURE__ */ jsx12(DeleteIcon, {}) }) })
|
|
9557
|
+
] })
|
|
9558
|
+
] }),
|
|
9559
|
+
toolState === "loading" && /* @__PURE__ */ jsxs12(Box12, { sx: { mt: 1, display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
9560
|
+
/* @__PURE__ */ jsx12(CircularProgress2, { size: 16 }),
|
|
9561
|
+
/* @__PURE__ */ jsx12(Typography11, { variant: "caption", color: "text.secondary", children: "Connecting\u2026" })
|
|
9562
|
+
] }),
|
|
9563
|
+
Array.isArray(toolState) && /* @__PURE__ */ jsx12(Box12, { sx: { mt: 1, display: "flex", flexWrap: "wrap", gap: 0.5 }, children: toolState.length === 0 ? /* @__PURE__ */ jsx12(Typography11, { variant: "caption", color: "text.secondary", children: "Connected \u2014 no tools reported." }) : toolState.map((t) => /* @__PURE__ */ jsx12(Tooltip3, { title: t.description || "", children: /* @__PURE__ */ jsx12(Chip9, { size: "small", label: t.name }) }, t.name)) }),
|
|
9564
|
+
toolState && !Array.isArray(toolState) && toolState !== "loading" && /* @__PURE__ */ jsx12(Alert10, { severity: "warning", sx: { mt: 1 }, children: toolState.error })
|
|
9565
|
+
] }, server.id);
|
|
9566
|
+
})
|
|
9567
|
+
] })
|
|
9568
|
+
] });
|
|
9569
|
+
};
|
|
9570
|
+
var McpServersSection_default = McpServersSection;
|
|
9571
|
+
|
|
9572
|
+
// src/management/components/MCPToolsTabV2.tsx
|
|
9573
|
+
import { jsx as jsx13, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
9343
9574
|
var MCPToolsTabV2 = () => {
|
|
9344
9575
|
const { settings } = usePackageSettingsStore();
|
|
9345
9576
|
const { tools: localTools, loadTools, toggleTool, addTool, updateTool, isLoaded } = useMCPToolsStore();
|
|
9346
|
-
const [loading, setLoading] =
|
|
9347
|
-
const [error, setError] =
|
|
9348
|
-
const [tools, setTools] =
|
|
9349
|
-
const [health, setHealth] =
|
|
9577
|
+
const [loading, setLoading] = useState14(true);
|
|
9578
|
+
const [error, setError] = useState14(null);
|
|
9579
|
+
const [tools, setTools] = useState14([]);
|
|
9580
|
+
const [health, setHealth] = useState14(null);
|
|
9350
9581
|
const gatewayConfigured = !!settings?.gatewayApiUrl;
|
|
9351
9582
|
const refresh = async () => {
|
|
9352
9583
|
setLoading(true);
|
|
@@ -9400,7 +9631,7 @@ var MCPToolsTabV2 = () => {
|
|
|
9400
9631
|
setLoading(false);
|
|
9401
9632
|
}
|
|
9402
9633
|
};
|
|
9403
|
-
|
|
9634
|
+
useEffect11(() => {
|
|
9404
9635
|
if (isLoaded) {
|
|
9405
9636
|
refresh();
|
|
9406
9637
|
} else {
|
|
@@ -9425,17 +9656,18 @@ var MCPToolsTabV2 = () => {
|
|
|
9425
9656
|
});
|
|
9426
9657
|
return map;
|
|
9427
9658
|
}, [localTools]);
|
|
9428
|
-
return /* @__PURE__ */
|
|
9429
|
-
/* @__PURE__ */
|
|
9430
|
-
/* @__PURE__ */
|
|
9431
|
-
/* @__PURE__ */
|
|
9659
|
+
return /* @__PURE__ */ jsxs13(Box13, { children: [
|
|
9660
|
+
/* @__PURE__ */ jsxs13(Box13, { sx: { display: "flex", alignItems: "center", justifyContent: "space-between", mb: 2 }, children: [
|
|
9661
|
+
/* @__PURE__ */ jsx13(Typography12, { variant: "h5", sx: { fontWeight: 600, color: "primary.main" }, children: "Available Tools" }),
|
|
9662
|
+
/* @__PURE__ */ jsx13(Box13, { children: /* @__PURE__ */ jsx13(Tooltip4, { title: "Refresh", children: /* @__PURE__ */ jsx13(IconButton7, { onClick: refresh, children: /* @__PURE__ */ jsx13(RefreshIcon, {}) }) }) })
|
|
9432
9663
|
] }),
|
|
9433
|
-
|
|
9434
|
-
/* @__PURE__ */
|
|
9435
|
-
|
|
9436
|
-
/* @__PURE__ */
|
|
9437
|
-
/* @__PURE__ */
|
|
9438
|
-
|
|
9664
|
+
/* @__PURE__ */ jsx13(McpServersSection_default, {}),
|
|
9665
|
+
!gatewayConfigured && /* @__PURE__ */ jsx13(Paper7, { sx: { p: 2, mb: 2 }, children: /* @__PURE__ */ jsx13(Typography12, { variant: "body2", color: "text.secondary", children: "Gateway API URL isn\u2019t configured. The controller endpoints will be fetched relative to this origin." }) }),
|
|
9666
|
+
/* @__PURE__ */ jsx13(Paper7, { sx: { p: 2, mb: 2 }, children: /* @__PURE__ */ jsxs13(Box13, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
9667
|
+
health?.status === "healthy" ? /* @__PURE__ */ jsx13(HealthAndSafetyIcon, { color: "success" }) : health?.status === "unhealthy" ? /* @__PURE__ */ jsx13(ErrorOutlineIcon, { color: "error" }) : /* @__PURE__ */ jsx13(ErrorOutlineIcon, { color: "disabled" }),
|
|
9668
|
+
/* @__PURE__ */ jsx13(Typography12, { variant: "subtitle1", sx: { fontWeight: 600 }, children: "Controller Health" }),
|
|
9669
|
+
/* @__PURE__ */ jsx13(
|
|
9670
|
+
Chip10,
|
|
9439
9671
|
{
|
|
9440
9672
|
size: "small",
|
|
9441
9673
|
label: (health?.status || "unknown").toString(),
|
|
@@ -9443,11 +9675,11 @@ var MCPToolsTabV2 = () => {
|
|
|
9443
9675
|
sx: { ml: 1 }
|
|
9444
9676
|
}
|
|
9445
9677
|
),
|
|
9446
|
-
health?.timestamp && /* @__PURE__ */
|
|
9678
|
+
health?.timestamp && /* @__PURE__ */ jsx13(Typography12, { variant: "caption", color: "text.secondary", sx: { ml: 1 }, children: new Date(health.timestamp).toLocaleString() })
|
|
9447
9679
|
] }) }),
|
|
9448
|
-
loading && /* @__PURE__ */
|
|
9449
|
-
error && /* @__PURE__ */
|
|
9450
|
-
/* @__PURE__ */
|
|
9680
|
+
loading && /* @__PURE__ */ jsx13(Box13, { sx: { mb: 2 }, children: /* @__PURE__ */ jsx13(LinearProgress6, {}) }),
|
|
9681
|
+
error && /* @__PURE__ */ jsx13(Paper7, { sx: { p: 2, mb: 2 }, children: /* @__PURE__ */ jsx13(Typography12, { color: "error", children: error }) }),
|
|
9682
|
+
/* @__PURE__ */ jsx13(Stack6, { spacing: 2, children: tools.map((tool) => {
|
|
9451
9683
|
let locallyEnabled = localEnabledMap.get(tool.id);
|
|
9452
9684
|
if (locallyEnabled === void 0) {
|
|
9453
9685
|
locallyEnabled = localEnabledMap.get(tool.name);
|
|
@@ -9458,17 +9690,17 @@ var MCPToolsTabV2 = () => {
|
|
|
9458
9690
|
);
|
|
9459
9691
|
locallyEnabled = directLookup?.enabled ?? tool.isEnabled;
|
|
9460
9692
|
}
|
|
9461
|
-
return /* @__PURE__ */
|
|
9462
|
-
/* @__PURE__ */
|
|
9463
|
-
/* @__PURE__ */
|
|
9464
|
-
/* @__PURE__ */
|
|
9465
|
-
/* @__PURE__ */
|
|
9693
|
+
return /* @__PURE__ */ jsxs13(Paper7, { sx: { p: 2 }, children: [
|
|
9694
|
+
/* @__PURE__ */ jsxs13(Box13, { sx: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
|
|
9695
|
+
/* @__PURE__ */ jsxs13(Box13, { children: [
|
|
9696
|
+
/* @__PURE__ */ jsx13(Typography12, { variant: "h6", sx: { fontWeight: 700 }, children: tool.name }),
|
|
9697
|
+
/* @__PURE__ */ jsx13(Typography12, { variant: "body2", color: "text.secondary", sx: { mt: 0.5 }, children: tool.description })
|
|
9466
9698
|
] }),
|
|
9467
|
-
/* @__PURE__ */
|
|
9468
|
-
/* @__PURE__ */
|
|
9469
|
-
|
|
9699
|
+
/* @__PURE__ */ jsxs13(Box13, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
9700
|
+
/* @__PURE__ */ jsx13(
|
|
9701
|
+
FormControlLabel3,
|
|
9470
9702
|
{
|
|
9471
|
-
control: /* @__PURE__ */
|
|
9703
|
+
control: /* @__PURE__ */ jsx13(Switch4, { checked: !!locallyEnabled, onChange: () => {
|
|
9472
9704
|
let local = localTools.find((t) => t.function.name === tool.id);
|
|
9473
9705
|
if (!local) {
|
|
9474
9706
|
local = localTools.find((t) => t.function.name === tool.name);
|
|
@@ -9488,12 +9720,12 @@ var MCPToolsTabV2 = () => {
|
|
|
9488
9720
|
label: locallyEnabled ? "Enabled" : "Disabled"
|
|
9489
9721
|
}
|
|
9490
9722
|
),
|
|
9491
|
-
/* @__PURE__ */
|
|
9723
|
+
/* @__PURE__ */ jsx13(Tooltip4, { title: "Controller-driven tools (read-only schema)", children: /* @__PURE__ */ jsx13(SettingsIcon, { color: "disabled" }) })
|
|
9492
9724
|
] })
|
|
9493
9725
|
] }),
|
|
9494
|
-
!!tool.supportedParameters?.length && /* @__PURE__ */
|
|
9495
|
-
/* @__PURE__ */
|
|
9496
|
-
/* @__PURE__ */
|
|
9726
|
+
!!tool.supportedParameters?.length && /* @__PURE__ */ jsxs13(Box13, { sx: { mt: 1.5 }, children: [
|
|
9727
|
+
/* @__PURE__ */ jsx13(Typography12, { variant: "caption", color: "text.secondary", children: "Supported parameters" }),
|
|
9728
|
+
/* @__PURE__ */ jsx13(Box13, { sx: { mt: 0.5, display: "flex", flexWrap: "wrap", gap: 1 }, children: tool.supportedParameters.map((p) => /* @__PURE__ */ jsx13(Chip10, { size: "small", label: p }, p)) })
|
|
9497
9729
|
] })
|
|
9498
9730
|
] }, tool.id);
|
|
9499
9731
|
}) })
|
|
@@ -9502,8 +9734,8 @@ var MCPToolsTabV2 = () => {
|
|
|
9502
9734
|
var MCPToolsTabV2_default = MCPToolsTabV2;
|
|
9503
9735
|
|
|
9504
9736
|
// src/management/management.tsx
|
|
9505
|
-
import { jsx as
|
|
9506
|
-
var preloadChatPage = () => import("./chat-
|
|
9737
|
+
import { jsx as jsx14, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
9738
|
+
var preloadChatPage = () => import("./chat-S35XO43Z.mjs");
|
|
9507
9739
|
var buildCapabilitiesUrl = (gatewayApiUrl) => {
|
|
9508
9740
|
const trimmed = gatewayApiUrl.replace(/\/$/, "");
|
|
9509
9741
|
if (trimmed.endsWith("/api")) {
|
|
@@ -9515,7 +9747,7 @@ var Management = () => {
|
|
|
9515
9747
|
const navigate = useNavigate();
|
|
9516
9748
|
const notificationService = useNotificationService();
|
|
9517
9749
|
const isMobile = useMediaQuery7("(max-width:900px)");
|
|
9518
|
-
const [sidebarOpen, setSidebarOpen] =
|
|
9750
|
+
const [sidebarOpen, setSidebarOpen] = useState15(false);
|
|
9519
9751
|
const getOptimalFabLogo = async () => {
|
|
9520
9752
|
const banditHead2 = "https://cdn.burtson.ai/images/bandit-head.png";
|
|
9521
9753
|
try {
|
|
@@ -9555,16 +9787,16 @@ var Management = () => {
|
|
|
9555
9787
|
hasTransparentLogo,
|
|
9556
9788
|
setHasTransparentLogo
|
|
9557
9789
|
} = useModelStore();
|
|
9558
|
-
const [modalOpen, setModalOpen] =
|
|
9790
|
+
const [modalOpen, setModalOpen] = useState15(false);
|
|
9559
9791
|
const banditHead = "https://cdn.burtson.ai/images/bandit-head.png";
|
|
9560
|
-
const [fabLogo, setFabLogo] =
|
|
9561
|
-
const [tabIndex, setTabIndex] =
|
|
9562
|
-
const [logoFile, setLogoFile] =
|
|
9563
|
-
const [logoBase64, setLogoBase64] =
|
|
9564
|
-
const [brandingText, setBrandingText] =
|
|
9565
|
-
const [theme, setTheme] =
|
|
9566
|
-
const [customAvatarBase64, setCustomAvatarBase64] =
|
|
9567
|
-
const [presetAvatar, setPresetAvatar] =
|
|
9792
|
+
const [fabLogo, setFabLogo] = useState15(banditHead);
|
|
9793
|
+
const [tabIndex, setTabIndex] = useState15(4);
|
|
9794
|
+
const [logoFile, setLogoFile] = useState15(null);
|
|
9795
|
+
const [logoBase64, setLogoBase64] = useState15(null);
|
|
9796
|
+
const [brandingText, setBrandingText] = useState15("");
|
|
9797
|
+
const [theme, setTheme] = useState15("bandit-dark");
|
|
9798
|
+
const [customAvatarBase64, setCustomAvatarBase64] = useState15(null);
|
|
9799
|
+
const [presetAvatar, setPresetAvatar] = useState15(null);
|
|
9568
9800
|
const showSnackbarMessage = (message, severity = "success") => {
|
|
9569
9801
|
if (severity === "success") {
|
|
9570
9802
|
notificationService?.showSuccess(message);
|
|
@@ -9572,9 +9804,9 @@ var Management = () => {
|
|
|
9572
9804
|
notificationService?.showError(message);
|
|
9573
9805
|
}
|
|
9574
9806
|
};
|
|
9575
|
-
const [restoreDialogOpen, setRestoreDialogOpen] =
|
|
9576
|
-
const [brandingLoaded, setBrandingLoaded] =
|
|
9577
|
-
const [isLoadingBranding, setIsLoadingBranding] =
|
|
9807
|
+
const [restoreDialogOpen, setRestoreDialogOpen] = useState15(false);
|
|
9808
|
+
const [brandingLoaded, setBrandingLoaded] = useState15(false);
|
|
9809
|
+
const [isLoadingBranding, setIsLoadingBranding] = useState15(false);
|
|
9578
9810
|
const { initModels } = useModelStore();
|
|
9579
9811
|
const { settings: packageSettings } = usePackageSettingsStore();
|
|
9580
9812
|
const authToken = useAuthenticationStore((state) => state.token);
|
|
@@ -9582,8 +9814,8 @@ var Management = () => {
|
|
|
9582
9814
|
const { hasAdminDashboard, hasLimitedAdminDashboard, getCurrentTier, hasAdvancedSearch } = useFeatures();
|
|
9583
9815
|
const { showAdminPanel, showLimitedAdminPanel } = useFeatureVisibility();
|
|
9584
9816
|
const { provider: currentProvider, config: currentProviderConfig } = useAIProviderStore();
|
|
9585
|
-
const [seedPacksEnabled, setSeedPacksEnabled] =
|
|
9586
|
-
const [localSelectedModel, setLocalSelectedModel] =
|
|
9817
|
+
const [seedPacksEnabled, setSeedPacksEnabled] = useState15(false);
|
|
9818
|
+
const [localSelectedModel, setLocalSelectedModel] = useState15({
|
|
9587
9819
|
name: "",
|
|
9588
9820
|
tagline: "",
|
|
9589
9821
|
systemPrompt: "",
|
|
@@ -9596,7 +9828,7 @@ var Management = () => {
|
|
|
9596
9828
|
loadDocuments,
|
|
9597
9829
|
clearAllDocuments
|
|
9598
9830
|
} = useKnowledgeStore();
|
|
9599
|
-
|
|
9831
|
+
useEffect12(() => {
|
|
9600
9832
|
if (selectedModel) {
|
|
9601
9833
|
const selected = availableModels.find((m) => m.name === selectedModel);
|
|
9602
9834
|
if (selected) {
|
|
@@ -9620,7 +9852,7 @@ var Management = () => {
|
|
|
9620
9852
|
}
|
|
9621
9853
|
}
|
|
9622
9854
|
}, [selectedModel, availableModels]);
|
|
9623
|
-
const loadBrandingConfig =
|
|
9855
|
+
const loadBrandingConfig = useCallback9(async () => {
|
|
9624
9856
|
if (isLoadingBranding || brandingLoaded) {
|
|
9625
9857
|
debugLogger.warn("Branding loading already in progress or completed, skipping");
|
|
9626
9858
|
return;
|
|
@@ -9735,15 +9967,15 @@ var Management = () => {
|
|
|
9735
9967
|
setTagline,
|
|
9736
9968
|
setTheme
|
|
9737
9969
|
]);
|
|
9738
|
-
|
|
9970
|
+
useEffect12(() => {
|
|
9739
9971
|
void loadBrandingConfig();
|
|
9740
9972
|
}, [loadBrandingConfig]);
|
|
9741
9973
|
const handleOpenModal = () => setModalOpen(true);
|
|
9742
9974
|
const handleCloseModal = () => setModalOpen(false);
|
|
9743
|
-
|
|
9975
|
+
useEffect12(() => {
|
|
9744
9976
|
getOptimalFabLogo().then(setFabLogo);
|
|
9745
9977
|
}, []);
|
|
9746
|
-
|
|
9978
|
+
useEffect12(() => {
|
|
9747
9979
|
if (logoBase64) {
|
|
9748
9980
|
setFabLogo(logoBase64);
|
|
9749
9981
|
} else {
|
|
@@ -10190,7 +10422,7 @@ var Management = () => {
|
|
|
10190
10422
|
reader.readAsText(file);
|
|
10191
10423
|
}
|
|
10192
10424
|
};
|
|
10193
|
-
|
|
10425
|
+
useEffect12(() => {
|
|
10194
10426
|
if (localSelectedModel.selectedModel && !availableModels.some((m) => m.name === localSelectedModel.selectedModel)) {
|
|
10195
10427
|
setLocalSelectedModel((prev) => ({
|
|
10196
10428
|
...prev,
|
|
@@ -10198,10 +10430,10 @@ var Management = () => {
|
|
|
10198
10430
|
}));
|
|
10199
10431
|
}
|
|
10200
10432
|
}, [availableModels, localSelectedModel.selectedModel]);
|
|
10201
|
-
|
|
10433
|
+
useEffect12(() => {
|
|
10202
10434
|
loadDocuments();
|
|
10203
10435
|
}, [loadDocuments]);
|
|
10204
|
-
|
|
10436
|
+
useEffect12(() => {
|
|
10205
10437
|
const gatewayApiUrl = packageSettings?.gatewayApiUrl;
|
|
10206
10438
|
if (!gatewayApiUrl || gatewayApiUrl.toLowerCase().startsWith("playground://")) {
|
|
10207
10439
|
setSeedPacksEnabled(false);
|
|
@@ -10274,43 +10506,43 @@ var Management = () => {
|
|
|
10274
10506
|
const allNavTabs = [
|
|
10275
10507
|
{
|
|
10276
10508
|
label: "Personalities",
|
|
10277
|
-
icon: /* @__PURE__ */
|
|
10509
|
+
icon: /* @__PURE__ */ jsx14(FaceRetouchingNaturalIcon, {}),
|
|
10278
10510
|
requiresFeature: "limitedAdminDashboard"
|
|
10279
10511
|
// Available to premium+
|
|
10280
10512
|
},
|
|
10281
10513
|
{
|
|
10282
10514
|
label: "Branding",
|
|
10283
|
-
icon: /* @__PURE__ */
|
|
10515
|
+
icon: /* @__PURE__ */ jsx14(BrushIcon, {}),
|
|
10284
10516
|
requiresFeature: "limitedAdminDashboard"
|
|
10285
10517
|
// Available to premium+
|
|
10286
10518
|
},
|
|
10287
10519
|
{
|
|
10288
10520
|
label: "Knowledge",
|
|
10289
|
-
icon: /* @__PURE__ */
|
|
10521
|
+
icon: /* @__PURE__ */ jsx14(MenuBookIcon, {}),
|
|
10290
10522
|
requiresFeature: "limitedAdminDashboard"
|
|
10291
10523
|
// Available to premium+
|
|
10292
10524
|
},
|
|
10293
10525
|
{
|
|
10294
10526
|
label: "Storage",
|
|
10295
|
-
icon: /* @__PURE__ */
|
|
10527
|
+
icon: /* @__PURE__ */ jsx14(StorageIcon, {}),
|
|
10296
10528
|
requiresFeature: "limitedAdminDashboard"
|
|
10297
10529
|
// Available to premium+ (changed from adminDashboardEnabled)
|
|
10298
10530
|
},
|
|
10299
10531
|
{
|
|
10300
10532
|
label: "Preferences",
|
|
10301
|
-
icon: /* @__PURE__ */
|
|
10533
|
+
icon: /* @__PURE__ */ jsx14(TuneIcon, {}),
|
|
10302
10534
|
requiresFeature: "limitedAdminDashboard"
|
|
10303
10535
|
// Available to premium+
|
|
10304
10536
|
},
|
|
10305
10537
|
{
|
|
10306
10538
|
label: "Provider",
|
|
10307
|
-
icon: /* @__PURE__ */
|
|
10539
|
+
icon: /* @__PURE__ */ jsx14(CloudIcon, {}),
|
|
10308
10540
|
requiresFeature: "advancedSearch"
|
|
10309
10541
|
// Pro/Team users with advanced features
|
|
10310
10542
|
},
|
|
10311
10543
|
{
|
|
10312
10544
|
label: "Tools",
|
|
10313
|
-
icon: /* @__PURE__ */
|
|
10545
|
+
icon: /* @__PURE__ */ jsx14(BuildIcon, {}),
|
|
10314
10546
|
requiresFeature: "advancedSearch"
|
|
10315
10547
|
// Pro/Team users with advanced features
|
|
10316
10548
|
}
|
|
@@ -10329,7 +10561,7 @@ var Management = () => {
|
|
|
10329
10561
|
});
|
|
10330
10562
|
const preferredDefaultTabIndex = navTabs.findIndex((tab) => tab.label === "Preferences");
|
|
10331
10563
|
const defaultTabIndex = preferredDefaultTabIndex >= 0 ? preferredDefaultTabIndex : 0;
|
|
10332
|
-
|
|
10564
|
+
useEffect12(() => {
|
|
10333
10565
|
setTabIndex((current) => {
|
|
10334
10566
|
if (current < 0 || current >= navTabs.length) {
|
|
10335
10567
|
return defaultTabIndex;
|
|
@@ -10339,8 +10571,8 @@ var Management = () => {
|
|
|
10339
10571
|
}, [navTabs.length, defaultTabIndex]);
|
|
10340
10572
|
const mobileQuickTabs = navTabs.slice(0, 5);
|
|
10341
10573
|
const hasMobileOverflowTabs = navTabs.length > mobileQuickTabs.length;
|
|
10342
|
-
const navigationContent = /* @__PURE__ */
|
|
10343
|
-
|
|
10574
|
+
const navigationContent = /* @__PURE__ */ jsxs14(
|
|
10575
|
+
Box14,
|
|
10344
10576
|
{
|
|
10345
10577
|
sx: {
|
|
10346
10578
|
display: "flex",
|
|
@@ -10350,8 +10582,8 @@ var Management = () => {
|
|
|
10350
10582
|
bgcolor: "inherit"
|
|
10351
10583
|
},
|
|
10352
10584
|
children: [
|
|
10353
|
-
isMobile && /* @__PURE__ */
|
|
10354
|
-
|
|
10585
|
+
isMobile && /* @__PURE__ */ jsx14(
|
|
10586
|
+
Box14,
|
|
10355
10587
|
{
|
|
10356
10588
|
sx: {
|
|
10357
10589
|
height: 6,
|
|
@@ -10364,15 +10596,15 @@ var Management = () => {
|
|
|
10364
10596
|
}
|
|
10365
10597
|
}
|
|
10366
10598
|
),
|
|
10367
|
-
/* @__PURE__ */
|
|
10368
|
-
|
|
10599
|
+
/* @__PURE__ */ jsx14(Box14, { sx: { p: isMobile ? 2.5 : 3, pb: isMobile ? 1.5 : 2 }, children: /* @__PURE__ */ jsx14(
|
|
10600
|
+
Button11,
|
|
10369
10601
|
{
|
|
10370
10602
|
onClick: () => {
|
|
10371
10603
|
if (isMobile) setSidebarOpen(false);
|
|
10372
10604
|
navigate("/chat");
|
|
10373
10605
|
},
|
|
10374
10606
|
onMouseEnter: preloadChatPage,
|
|
10375
|
-
startIcon: /* @__PURE__ */
|
|
10607
|
+
startIcon: /* @__PURE__ */ jsx14(ChevronLeftIcon, { sx: { fontSize: 20 } }),
|
|
10376
10608
|
fullWidth: true,
|
|
10377
10609
|
variant: "outlined",
|
|
10378
10610
|
sx: {
|
|
@@ -10399,8 +10631,8 @@ var Management = () => {
|
|
|
10399
10631
|
children: "Back to Chat"
|
|
10400
10632
|
}
|
|
10401
10633
|
) }),
|
|
10402
|
-
/* @__PURE__ */
|
|
10403
|
-
/* @__PURE__ */
|
|
10634
|
+
/* @__PURE__ */ jsx14(Divider2, { sx: { mx: isMobile ? 2 : 3, mb: 2, opacity: 0.6 } }),
|
|
10635
|
+
/* @__PURE__ */ jsx14(Box14, { sx: { flex: 1, px: isMobile ? 1.5 : 2, pb: 3, overflowY: "auto" }, children: /* @__PURE__ */ jsx14(List3, { sx: { px: 0, py: 0 }, children: navTabs.map((tab, idx) => /* @__PURE__ */ jsxs14(
|
|
10404
10636
|
ListItemButton2,
|
|
10405
10637
|
{
|
|
10406
10638
|
selected: tabIndex === idx,
|
|
@@ -10450,7 +10682,7 @@ var Management = () => {
|
|
|
10450
10682
|
}
|
|
10451
10683
|
},
|
|
10452
10684
|
children: [
|
|
10453
|
-
/* @__PURE__ */
|
|
10685
|
+
/* @__PURE__ */ jsx14(
|
|
10454
10686
|
ListItemIcon2,
|
|
10455
10687
|
{
|
|
10456
10688
|
sx: {
|
|
@@ -10461,7 +10693,7 @@ var Management = () => {
|
|
|
10461
10693
|
children: tab.icon
|
|
10462
10694
|
}
|
|
10463
10695
|
),
|
|
10464
|
-
/* @__PURE__ */
|
|
10696
|
+
/* @__PURE__ */ jsx14(
|
|
10465
10697
|
ListItemText2,
|
|
10466
10698
|
{
|
|
10467
10699
|
primary: tab.label,
|
|
@@ -10472,8 +10704,8 @@ var Management = () => {
|
|
|
10472
10704
|
}
|
|
10473
10705
|
}
|
|
10474
10706
|
),
|
|
10475
|
-
tabIndex === idx && /* @__PURE__ */
|
|
10476
|
-
|
|
10707
|
+
tabIndex === idx && /* @__PURE__ */ jsx14(
|
|
10708
|
+
Box14,
|
|
10477
10709
|
{
|
|
10478
10710
|
sx: {
|
|
10479
10711
|
position: "absolute",
|
|
@@ -10496,10 +10728,10 @@ var Management = () => {
|
|
|
10496
10728
|
}
|
|
10497
10729
|
);
|
|
10498
10730
|
if (!brandingLoaded) return null;
|
|
10499
|
-
return /* @__PURE__ */
|
|
10500
|
-
/* @__PURE__ */
|
|
10501
|
-
/* @__PURE__ */
|
|
10502
|
-
|
|
10731
|
+
return /* @__PURE__ */ jsxs14(ThemeProvider, { theme: currentTheme, children: [
|
|
10732
|
+
/* @__PURE__ */ jsx14(CssBaseline, {}),
|
|
10733
|
+
/* @__PURE__ */ jsxs14(
|
|
10734
|
+
Box14,
|
|
10503
10735
|
{
|
|
10504
10736
|
display: "flex",
|
|
10505
10737
|
height: "100vh",
|
|
@@ -10511,8 +10743,8 @@ var Management = () => {
|
|
|
10511
10743
|
position: "relative"
|
|
10512
10744
|
},
|
|
10513
10745
|
children: [
|
|
10514
|
-
isMobile && /* @__PURE__ */
|
|
10515
|
-
|
|
10746
|
+
isMobile && /* @__PURE__ */ jsxs14(
|
|
10747
|
+
Box14,
|
|
10516
10748
|
{
|
|
10517
10749
|
sx: {
|
|
10518
10750
|
width: "100%",
|
|
@@ -10531,8 +10763,8 @@ var Management = () => {
|
|
|
10531
10763
|
boxShadow: "0 2px 8px rgba(0,0,0,0.1)"
|
|
10532
10764
|
},
|
|
10533
10765
|
children: [
|
|
10534
|
-
/* @__PURE__ */
|
|
10535
|
-
|
|
10766
|
+
/* @__PURE__ */ jsx14(
|
|
10767
|
+
Button11,
|
|
10536
10768
|
{
|
|
10537
10769
|
onClick: () => setSidebarOpen((o) => !o),
|
|
10538
10770
|
sx: {
|
|
@@ -10553,7 +10785,7 @@ var Management = () => {
|
|
|
10553
10785
|
transform: sidebarOpen ? "rotate(90deg) scale(0.95)" : "scale(0.95)"
|
|
10554
10786
|
}
|
|
10555
10787
|
},
|
|
10556
|
-
children: /* @__PURE__ */
|
|
10788
|
+
children: /* @__PURE__ */ jsx14("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsx14(
|
|
10557
10789
|
"path",
|
|
10558
10790
|
{
|
|
10559
10791
|
d: sidebarOpen ? "M18 6L6 18M6 6L18 18" : "M3 12H21M3 6H21M3 18H21",
|
|
@@ -10565,8 +10797,8 @@ var Management = () => {
|
|
|
10565
10797
|
) })
|
|
10566
10798
|
}
|
|
10567
10799
|
),
|
|
10568
|
-
/* @__PURE__ */
|
|
10569
|
-
|
|
10800
|
+
/* @__PURE__ */ jsx14(
|
|
10801
|
+
Typography13,
|
|
10570
10802
|
{
|
|
10571
10803
|
variant: "h6",
|
|
10572
10804
|
sx: {
|
|
@@ -10578,14 +10810,14 @@ var Management = () => {
|
|
|
10578
10810
|
children: "Management"
|
|
10579
10811
|
}
|
|
10580
10812
|
),
|
|
10581
|
-
/* @__PURE__ */
|
|
10813
|
+
/* @__PURE__ */ jsx14(Box14, { sx: {
|
|
10582
10814
|
px: 2,
|
|
10583
10815
|
py: 0.5,
|
|
10584
10816
|
borderRadius: 2,
|
|
10585
10817
|
bgcolor: (theme2) => theme2.palette.mode === "dark" ? "rgba(25,118,210,0.12)" : "rgba(25,118,210,0.08)",
|
|
10586
10818
|
border: (theme2) => `1px solid ${theme2.palette.primary.main}20`
|
|
10587
|
-
}, children: /* @__PURE__ */
|
|
10588
|
-
|
|
10819
|
+
}, children: /* @__PURE__ */ jsx14(
|
|
10820
|
+
Typography13,
|
|
10589
10821
|
{
|
|
10590
10822
|
variant: "caption",
|
|
10591
10823
|
sx: {
|
|
@@ -10599,8 +10831,8 @@ var Management = () => {
|
|
|
10599
10831
|
]
|
|
10600
10832
|
}
|
|
10601
10833
|
),
|
|
10602
|
-
isMobile && /* @__PURE__ */
|
|
10603
|
-
|
|
10834
|
+
isMobile && /* @__PURE__ */ jsxs14(
|
|
10835
|
+
Box14,
|
|
10604
10836
|
{
|
|
10605
10837
|
sx: {
|
|
10606
10838
|
width: "100%",
|
|
@@ -10617,8 +10849,8 @@ var Management = () => {
|
|
|
10617
10849
|
mobileQuickTabs.map((tab) => {
|
|
10618
10850
|
const quickTabIndex = navTabs.findIndex((navTab) => navTab.label === tab.label);
|
|
10619
10851
|
const selected = tabIndex === quickTabIndex;
|
|
10620
|
-
return /* @__PURE__ */
|
|
10621
|
-
|
|
10852
|
+
return /* @__PURE__ */ jsx14(
|
|
10853
|
+
Button11,
|
|
10622
10854
|
{
|
|
10623
10855
|
size: "small",
|
|
10624
10856
|
onClick: () => setTabIndex(quickTabIndex),
|
|
@@ -10643,8 +10875,8 @@ var Management = () => {
|
|
|
10643
10875
|
tab.label
|
|
10644
10876
|
);
|
|
10645
10877
|
}),
|
|
10646
|
-
hasMobileOverflowTabs && /* @__PURE__ */
|
|
10647
|
-
|
|
10878
|
+
hasMobileOverflowTabs && /* @__PURE__ */ jsx14(
|
|
10879
|
+
Button11,
|
|
10648
10880
|
{
|
|
10649
10881
|
size: "small",
|
|
10650
10882
|
onClick: () => setSidebarOpen(true),
|
|
@@ -10666,7 +10898,7 @@ var Management = () => {
|
|
|
10666
10898
|
]
|
|
10667
10899
|
}
|
|
10668
10900
|
),
|
|
10669
|
-
isMobile ? /* @__PURE__ */
|
|
10901
|
+
isMobile ? /* @__PURE__ */ jsx14(
|
|
10670
10902
|
SwipeableDrawer,
|
|
10671
10903
|
{
|
|
10672
10904
|
anchor: "bottom",
|
|
@@ -10687,8 +10919,8 @@ var Management = () => {
|
|
|
10687
10919
|
},
|
|
10688
10920
|
children: navigationContent
|
|
10689
10921
|
}
|
|
10690
|
-
) : /* @__PURE__ */
|
|
10691
|
-
|
|
10922
|
+
) : /* @__PURE__ */ jsx14(
|
|
10923
|
+
Box14,
|
|
10692
10924
|
{
|
|
10693
10925
|
sx: {
|
|
10694
10926
|
width: 280,
|
|
@@ -10711,8 +10943,8 @@ var Management = () => {
|
|
|
10711
10943
|
children: navigationContent
|
|
10712
10944
|
}
|
|
10713
10945
|
),
|
|
10714
|
-
/* @__PURE__ */
|
|
10715
|
-
|
|
10946
|
+
/* @__PURE__ */ jsxs14(
|
|
10947
|
+
Box14,
|
|
10716
10948
|
{
|
|
10717
10949
|
sx: {
|
|
10718
10950
|
flex: 1,
|
|
@@ -10731,7 +10963,7 @@ var Management = () => {
|
|
|
10731
10963
|
transition: "margin-left 0.2s"
|
|
10732
10964
|
},
|
|
10733
10965
|
children: [
|
|
10734
|
-
navTabs[tabIndex]?.label === "Personalities" && /* @__PURE__ */
|
|
10966
|
+
navTabs[tabIndex]?.label === "Personalities" && /* @__PURE__ */ jsx14(
|
|
10735
10967
|
PersonalitiesTab_default,
|
|
10736
10968
|
{
|
|
10737
10969
|
availableModels,
|
|
@@ -10750,7 +10982,7 @@ var Management = () => {
|
|
|
10750
10982
|
showSnackbar: showSnackbarMessage
|
|
10751
10983
|
}
|
|
10752
10984
|
),
|
|
10753
|
-
navTabs[tabIndex]?.label === "Branding" && /* @__PURE__ */
|
|
10985
|
+
navTabs[tabIndex]?.label === "Branding" && /* @__PURE__ */ jsx14(
|
|
10754
10986
|
BrandingTab_default,
|
|
10755
10987
|
{
|
|
10756
10988
|
logoFile,
|
|
@@ -10769,7 +11001,7 @@ var Management = () => {
|
|
|
10769
11001
|
setLogoBase64
|
|
10770
11002
|
}
|
|
10771
11003
|
),
|
|
10772
|
-
navTabs[tabIndex]?.label === "Knowledge" && /* @__PURE__ */
|
|
11004
|
+
navTabs[tabIndex]?.label === "Knowledge" && /* @__PURE__ */ jsx14(
|
|
10773
11005
|
KnowledgeHubTab_default,
|
|
10774
11006
|
{
|
|
10775
11007
|
documents,
|
|
@@ -10782,8 +11014,8 @@ var Management = () => {
|
|
|
10782
11014
|
seedPacksEnabled
|
|
10783
11015
|
}
|
|
10784
11016
|
),
|
|
10785
|
-
navTabs[tabIndex]?.label === "Storage" && /* @__PURE__ */
|
|
10786
|
-
navTabs[tabIndex]?.label === "Preferences" && /* @__PURE__ */
|
|
11017
|
+
navTabs[tabIndex]?.label === "Storage" && /* @__PURE__ */ jsx14(StorageTab_default, { currentTheme }),
|
|
11018
|
+
navTabs[tabIndex]?.label === "Preferences" && /* @__PURE__ */ jsx14(
|
|
10787
11019
|
PreferencesTab_default,
|
|
10788
11020
|
{
|
|
10789
11021
|
preferences,
|
|
@@ -10793,12 +11025,12 @@ var Management = () => {
|
|
|
10793
11025
|
showSnackbar: showSnackbarMessage
|
|
10794
11026
|
}
|
|
10795
11027
|
),
|
|
10796
|
-
navTabs[tabIndex]?.label === "Provider" && /* @__PURE__ */
|
|
10797
|
-
navTabs[tabIndex]?.label === "Tools" && /* @__PURE__ */
|
|
11028
|
+
navTabs[tabIndex]?.label === "Provider" && /* @__PURE__ */ jsx14(ProviderTab, {}),
|
|
11029
|
+
navTabs[tabIndex]?.label === "Tools" && /* @__PURE__ */ jsx14(MCPToolsTabV2_default, {})
|
|
10798
11030
|
]
|
|
10799
11031
|
}
|
|
10800
11032
|
),
|
|
10801
|
-
/* @__PURE__ */
|
|
11033
|
+
/* @__PURE__ */ jsx14(
|
|
10802
11034
|
Fab,
|
|
10803
11035
|
{
|
|
10804
11036
|
"aria-label": "AI",
|
|
@@ -10820,7 +11052,7 @@ var Management = () => {
|
|
|
10820
11052
|
boxShadow: theme2.shadows[6],
|
|
10821
11053
|
zIndex: 2e3
|
|
10822
11054
|
}),
|
|
10823
|
-
children: /* @__PURE__ */
|
|
11055
|
+
children: /* @__PURE__ */ jsx14(
|
|
10824
11056
|
"img",
|
|
10825
11057
|
{
|
|
10826
11058
|
src: fabLogo,
|
|
@@ -10834,7 +11066,7 @@ var Management = () => {
|
|
|
10834
11066
|
)
|
|
10835
11067
|
}
|
|
10836
11068
|
),
|
|
10837
|
-
/* @__PURE__ */
|
|
11069
|
+
/* @__PURE__ */ jsx14(chat_modal_default, { open: modalOpen, onClose: handleCloseModal })
|
|
10838
11070
|
]
|
|
10839
11071
|
}
|
|
10840
11072
|
)
|
|
@@ -10848,4 +11080,4 @@ export {
|
|
|
10848
11080
|
useGatewayMemory,
|
|
10849
11081
|
management_default
|
|
10850
11082
|
};
|
|
10851
|
-
//# sourceMappingURL=chunk-
|
|
11083
|
+
//# sourceMappingURL=chunk-LBV32D55.mjs.map
|