@shuffleio/shuffle-mcps 0.0.21 → 0.0.23
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/index.d.mts +12 -2
- package/dist/index.d.ts +12 -2
- package/dist/index.js +205 -115
- package/dist/index.mjs +401 -313
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -459,15 +459,34 @@ var readHtmlDarkClass = () => {
|
|
|
459
459
|
if (typeof document === "undefined") return false;
|
|
460
460
|
return document.documentElement.classList.contains("dark");
|
|
461
461
|
};
|
|
462
|
-
var
|
|
462
|
+
var readAncestorDark = (anchor) => {
|
|
463
|
+
if (!anchor || typeof document === "undefined") return null;
|
|
464
|
+
const start = anchor.parentElement;
|
|
465
|
+
if (!start) return null;
|
|
466
|
+
const scoped = start.closest('[data-shuffle-mode="dark"], [data-shuffle-mode="light"]');
|
|
467
|
+
if (scoped) return scoped.getAttribute("data-shuffle-mode") === "dark";
|
|
468
|
+
const darkAncestor = start.closest(".dark");
|
|
469
|
+
if (darkAncestor) return true;
|
|
470
|
+
return null;
|
|
471
|
+
};
|
|
472
|
+
var useAutoDarkClass = (enabled, anchorRef) => {
|
|
463
473
|
const [isDark, setIsDark] = import_react.default.useState(() => enabled ? readHtmlDarkClass() : false);
|
|
464
|
-
import_react.default.
|
|
474
|
+
import_react.default.useLayoutEffect(() => {
|
|
465
475
|
if (!enabled || typeof document === "undefined") return;
|
|
466
|
-
|
|
467
|
-
|
|
476
|
+
const recompute = () => {
|
|
477
|
+
const ancestor = readAncestorDark(anchorRef.current);
|
|
478
|
+
setIsDark(ancestor !== null ? ancestor : readHtmlDarkClass());
|
|
479
|
+
};
|
|
480
|
+
recompute();
|
|
481
|
+
const observer = new MutationObserver(recompute);
|
|
468
482
|
observer.observe(document.documentElement, { attributes: true, attributeFilter: ["class"] });
|
|
483
|
+
let node = anchorRef.current?.parentElement ?? null;
|
|
484
|
+
while (node) {
|
|
485
|
+
observer.observe(node, { attributes: true, attributeFilter: ["class", "data-shuffle-mode"] });
|
|
486
|
+
node = node.parentElement;
|
|
487
|
+
}
|
|
469
488
|
return () => observer.disconnect();
|
|
470
|
-
}, [enabled]);
|
|
489
|
+
}, [enabled, anchorRef]);
|
|
471
490
|
return isDark;
|
|
472
491
|
};
|
|
473
492
|
var ShuffleMcpThemeContext = import_react.default.createContext(null);
|
|
@@ -554,10 +573,12 @@ var ShuffleMcpThemeProvider = ({
|
|
|
554
573
|
}) => {
|
|
555
574
|
const parent = (0, import_material.useTheme)();
|
|
556
575
|
const parentCtx = useShuffleMcpTheme();
|
|
557
|
-
const
|
|
558
|
-
const
|
|
576
|
+
const anchorRef = import_react.default.useRef(null);
|
|
577
|
+
const autoIsDark = useAutoDarkClass(mode === "auto", anchorRef);
|
|
578
|
+
const effectiveDark = mode === "auto" ? autoIsDark : mode === "dark";
|
|
559
579
|
const sameAsParent = parentCtx !== null && parentCtx.isDark === effectiveDark;
|
|
560
580
|
const scopeClassName = effectiveDark ? "shuffle-mcp-scope dark" : "shuffle-mcp-scope";
|
|
581
|
+
const resolvedModeAttr = effectiveDark ? "dark" : "light";
|
|
561
582
|
const merged = import_react.default.useMemo(
|
|
562
583
|
() => (0, import_material.createTheme)({
|
|
563
584
|
...parent,
|
|
@@ -577,9 +598,15 @@ var ShuffleMcpThemeProvider = ({
|
|
|
577
598
|
[mode, effectiveDark, scopeClassName]
|
|
578
599
|
);
|
|
579
600
|
if (sameAsParent) {
|
|
580
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.
|
|
601
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(ShuffleMcpThemeContext.Provider, { value: ctxValue, children: [
|
|
602
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { ref: anchorRef, style: { display: "none" }, "aria-hidden": true }),
|
|
603
|
+
children
|
|
604
|
+
] });
|
|
581
605
|
}
|
|
582
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ShuffleMcpThemeContext.Provider, { value: ctxValue, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.ThemeProvider, { theme: merged, children: /* @__PURE__ */ (0, import_jsx_runtime.
|
|
606
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ShuffleMcpThemeContext.Provider, { value: ctxValue, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.ThemeProvider, { theme: merged, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: scopeClassName, "data-shuffle-mode": resolvedModeAttr, "data-shuffle-mcp-root": true, children: [
|
|
607
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { ref: anchorRef, style: { display: "none" }, "aria-hidden": true }),
|
|
608
|
+
children
|
|
609
|
+
] }) }) });
|
|
583
610
|
};
|
|
584
611
|
|
|
585
612
|
// views/ShuffleMCP.tsx
|
|
@@ -588,7 +615,7 @@ var import_algoliasearch = require("algoliasearch");
|
|
|
588
615
|
var import_material10 = require("@mui/material");
|
|
589
616
|
|
|
590
617
|
// views/AppDetailDrawer.tsx
|
|
591
|
-
var
|
|
618
|
+
var import_react11 = require("react");
|
|
592
619
|
|
|
593
620
|
// toast.ts
|
|
594
621
|
var defaultImpl = (arg, opts) => {
|
|
@@ -2125,7 +2152,7 @@ var import_material5 = require("@mui/material");
|
|
|
2125
2152
|
var import_framer_motion3 = require("framer-motion");
|
|
2126
2153
|
|
|
2127
2154
|
// components/AppAuthConfig.tsx
|
|
2128
|
-
var
|
|
2155
|
+
var import_react7 = require("react");
|
|
2129
2156
|
var import_lucide_react3 = require("lucide-react");
|
|
2130
2157
|
var import_material4 = require("@mui/material");
|
|
2131
2158
|
var import_framer_motion2 = require("framer-motion");
|
|
@@ -2278,6 +2305,18 @@ var AppFallbackIcon = ({
|
|
|
2278
2305
|
|
|
2279
2306
|
// components/AppAuthConfig.tsx
|
|
2280
2307
|
init_api();
|
|
2308
|
+
|
|
2309
|
+
// useSyncHostBaseUrl.ts
|
|
2310
|
+
var import_react6 = require("react");
|
|
2311
|
+
init_api();
|
|
2312
|
+
var useSyncHostBaseUrl = (globalUrl) => {
|
|
2313
|
+
(0, import_react6.useEffect)(() => {
|
|
2314
|
+
if (!globalUrl) return;
|
|
2315
|
+
setHostBaseUrl(globalUrl);
|
|
2316
|
+
}, [globalUrl]);
|
|
2317
|
+
};
|
|
2318
|
+
|
|
2319
|
+
// components/AppAuthConfig.tsx
|
|
2281
2320
|
var import_react_markdown = __toESM(require("react-markdown"));
|
|
2282
2321
|
var import_remark_gfm = __toESM(require("remark-gfm"));
|
|
2283
2322
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
@@ -2333,8 +2372,14 @@ var AppAuthCard = ({
|
|
|
2333
2372
|
hideStatusChips,
|
|
2334
2373
|
hideDocsLink,
|
|
2335
2374
|
hideUrlFields,
|
|
2336
|
-
borderless
|
|
2375
|
+
borderless,
|
|
2376
|
+
globalUrl,
|
|
2377
|
+
userdata,
|
|
2378
|
+
isLoaded,
|
|
2379
|
+
isLoggedIn,
|
|
2380
|
+
serverside
|
|
2337
2381
|
}) => {
|
|
2382
|
+
useSyncHostBaseUrl(globalUrl);
|
|
2338
2383
|
const getBestDefaultAuth = (entries) => {
|
|
2339
2384
|
if (entries.length === 0) return ADD_NEW_AUTH;
|
|
2340
2385
|
const validatedEntry = entries.find((e) => e.validation?.valid === true);
|
|
@@ -2344,15 +2389,15 @@ var AppAuthCard = ({
|
|
|
2344
2389
|
const lastEntry = entries[entries.length - 1];
|
|
2345
2390
|
return lastEntry.id || lastEntry.label || "0";
|
|
2346
2391
|
};
|
|
2347
|
-
const [selectedAuthId, setSelectedAuthId] = (0,
|
|
2392
|
+
const [selectedAuthId, setSelectedAuthId] = (0, import_react7.useState)(() => {
|
|
2348
2393
|
return getBestDefaultAuth(apiAuthEntries);
|
|
2349
2394
|
});
|
|
2350
|
-
const [userHasSelected, setUserHasSelected] = (0,
|
|
2351
|
-
const [testStatusPerAuth, setTestStatusPerAuth] = (0,
|
|
2352
|
-
const [testMessagesPerAuth, setTestMessagesPerAuth] = (0,
|
|
2353
|
-
const [testingAuthId, setTestingAuthId] = (0,
|
|
2354
|
-
const [deleteConfirmAuthId, setDeleteConfirmAuthId] = (0,
|
|
2355
|
-
const [deleting, setDeleting] = (0,
|
|
2395
|
+
const [userHasSelected, setUserHasSelected] = (0, import_react7.useState)(false);
|
|
2396
|
+
const [testStatusPerAuth, setTestStatusPerAuth] = (0, import_react7.useState)({});
|
|
2397
|
+
const [testMessagesPerAuth, setTestMessagesPerAuth] = (0, import_react7.useState)({});
|
|
2398
|
+
const [testingAuthId, setTestingAuthId] = (0, import_react7.useState)(null);
|
|
2399
|
+
const [deleteConfirmAuthId, setDeleteConfirmAuthId] = (0, import_react7.useState)(null);
|
|
2400
|
+
const [deleting, setDeleting] = (0, import_react7.useState)(false);
|
|
2356
2401
|
const handleDeleteAuth = async (authId) => {
|
|
2357
2402
|
setDeleting(true);
|
|
2358
2403
|
try {
|
|
@@ -2376,10 +2421,10 @@ var AppAuthCard = ({
|
|
|
2376
2421
|
}
|
|
2377
2422
|
};
|
|
2378
2423
|
const localTestStatus = testStatusPerAuth[selectedAuthId] || "untested";
|
|
2379
|
-
const [wasPreValidatedPerAuth, setWasPreValidatedPerAuth] = (0,
|
|
2380
|
-
const prevEntryCountRef = (0,
|
|
2381
|
-
const autoTestFiredRef = (0,
|
|
2382
|
-
(0,
|
|
2424
|
+
const [wasPreValidatedPerAuth, setWasPreValidatedPerAuth] = (0, import_react7.useState)({});
|
|
2425
|
+
const prevEntryCountRef = (0, import_react7.useRef)(apiAuthEntries.length);
|
|
2426
|
+
const autoTestFiredRef = (0, import_react7.useRef)(null);
|
|
2427
|
+
(0, import_react7.useEffect)(() => {
|
|
2383
2428
|
if (apiAuthEntries.length > 0) {
|
|
2384
2429
|
if (apiAuthEntries.length > prevEntryCountRef.current) {
|
|
2385
2430
|
const sorted = [...apiAuthEntries].sort((a, b) => {
|
|
@@ -2408,7 +2453,7 @@ var AppAuthCard = ({
|
|
|
2408
2453
|
}
|
|
2409
2454
|
prevEntryCountRef.current = apiAuthEntries.length;
|
|
2410
2455
|
}, [apiAuthEntries, userHasSelected]);
|
|
2411
|
-
(0,
|
|
2456
|
+
(0, import_react7.useEffect)(() => {
|
|
2412
2457
|
if (wasPreValidatedPerAuth[selectedAuthId] === void 0) {
|
|
2413
2458
|
const currentAuth = apiAuthEntries.find(
|
|
2414
2459
|
(auth2) => (auth2.id || auth2.label || "") === selectedAuthId
|
|
@@ -2430,7 +2475,7 @@ var AppAuthCard = ({
|
|
|
2430
2475
|
};
|
|
2431
2476
|
const localTestMessages = testMessagesPerAuth[selectedAuthId] || {};
|
|
2432
2477
|
const wasPreValidated = wasPreValidatedPerAuth[selectedAuthId] || false;
|
|
2433
|
-
(0,
|
|
2478
|
+
(0, import_react7.useEffect)(() => {
|
|
2434
2479
|
if (!testingAuthId) return;
|
|
2435
2480
|
if (authState.status === "testing") {
|
|
2436
2481
|
setTestStatusForAuth(testingAuthId, "testing");
|
|
@@ -2484,19 +2529,19 @@ var AppAuthCard = ({
|
|
|
2484
2529
|
minute: "2-digit"
|
|
2485
2530
|
});
|
|
2486
2531
|
};
|
|
2487
|
-
const [localCredentials, setLocalCredentials] = (0,
|
|
2488
|
-
const [fieldErrors, setFieldErrors] = (0,
|
|
2489
|
-
const [loading, setLoading] = (0,
|
|
2490
|
-
const [saving, setSaving] = (0,
|
|
2491
|
-
const [saveSuccess, setSaveSuccess] = (0,
|
|
2492
|
-
const [error, setError] = (0,
|
|
2493
|
-
const [appConfig, setAppConfig] = (0,
|
|
2494
|
-
(0,
|
|
2532
|
+
const [localCredentials, setLocalCredentials] = (0, import_react7.useState)(authState.credentials || {});
|
|
2533
|
+
const [fieldErrors, setFieldErrors] = (0, import_react7.useState)({});
|
|
2534
|
+
const [loading, setLoading] = (0, import_react7.useState)(false);
|
|
2535
|
+
const [saving, setSaving] = (0, import_react7.useState)(false);
|
|
2536
|
+
const [saveSuccess, setSaveSuccess] = (0, import_react7.useState)(null);
|
|
2537
|
+
const [error, setError] = (0, import_react7.useState)(null);
|
|
2538
|
+
const [appConfig, setAppConfig] = (0, import_react7.useState)(null);
|
|
2539
|
+
(0, import_react7.useEffect)(() => {
|
|
2495
2540
|
if (isExpanded && onRefreshAuth) {
|
|
2496
2541
|
onRefreshAuth();
|
|
2497
2542
|
}
|
|
2498
2543
|
}, [isExpanded]);
|
|
2499
|
-
(0,
|
|
2544
|
+
(0, import_react7.useEffect)(() => {
|
|
2500
2545
|
const fetchAppConfig = async () => {
|
|
2501
2546
|
if (!isExpanded || appConfig) return;
|
|
2502
2547
|
setLoading(true);
|
|
@@ -2529,13 +2574,13 @@ var AppAuthCard = ({
|
|
|
2529
2574
|
}, [isExpanded, app.objectID, appConfig]);
|
|
2530
2575
|
const auth = appConfig?.authentication;
|
|
2531
2576
|
const isOAuth2 = isOAuth2Type(auth?.type);
|
|
2532
|
-
const [selectedScopes, setSelectedScopes] = (0,
|
|
2533
|
-
(0,
|
|
2577
|
+
const [selectedScopes, setSelectedScopes] = (0, import_react7.useState)([]);
|
|
2578
|
+
(0, import_react7.useEffect)(() => {
|
|
2534
2579
|
if (auth?.scope) {
|
|
2535
2580
|
setSelectedScopes(auth.scope);
|
|
2536
2581
|
}
|
|
2537
2582
|
}, [auth?.scope]);
|
|
2538
|
-
(0,
|
|
2583
|
+
(0, import_react7.useEffect)(() => {
|
|
2539
2584
|
if (disableUrlPrefill) return;
|
|
2540
2585
|
if (!auth?.parameters || auth.parameters.length === 0) return;
|
|
2541
2586
|
const urlDefaults = {};
|
|
@@ -2552,7 +2597,7 @@ var AppAuthCard = ({
|
|
|
2552
2597
|
setLocalCredentials((prev) => ({ ...urlDefaults, ...prev }));
|
|
2553
2598
|
}
|
|
2554
2599
|
}, [auth?.parameters, disableUrlPrefill]);
|
|
2555
|
-
(0,
|
|
2600
|
+
(0, import_react7.useEffect)(() => {
|
|
2556
2601
|
const incoming = authState.credentials || {};
|
|
2557
2602
|
setLocalCredentials((prev) => {
|
|
2558
2603
|
let changed = false;
|
|
@@ -2568,12 +2613,12 @@ var AppAuthCard = ({
|
|
|
2568
2613
|
return changed ? next : prev;
|
|
2569
2614
|
});
|
|
2570
2615
|
}, [authState.credentials]);
|
|
2571
|
-
const [docsOpen, setDocsOpen] = (0,
|
|
2572
|
-
const [docsContent, setDocsContent] = (0,
|
|
2573
|
-
const [docsLoading, setDocsLoading] = (0,
|
|
2574
|
-
const [editingLabel, setEditingLabel] = (0,
|
|
2575
|
-
const [editLabelValue, setEditLabelValue] = (0,
|
|
2576
|
-
const [savingLabel, setSavingLabel] = (0,
|
|
2616
|
+
const [docsOpen, setDocsOpen] = (0, import_react7.useState)(false);
|
|
2617
|
+
const [docsContent, setDocsContent] = (0, import_react7.useState)("");
|
|
2618
|
+
const [docsLoading, setDocsLoading] = (0, import_react7.useState)(false);
|
|
2619
|
+
const [editingLabel, setEditingLabel] = (0, import_react7.useState)(false);
|
|
2620
|
+
const [editLabelValue, setEditLabelValue] = (0, import_react7.useState)("");
|
|
2621
|
+
const [savingLabel, setSavingLabel] = (0, import_react7.useState)(false);
|
|
2577
2622
|
const handleRenameAuth = async () => {
|
|
2578
2623
|
if (!selectedAuth || !editLabelValue.trim()) return;
|
|
2579
2624
|
setSavingLabel(true);
|
|
@@ -2969,8 +3014,8 @@ var AppAuthCard = ({
|
|
|
2969
3014
|
{
|
|
2970
3015
|
sx: {
|
|
2971
3016
|
background: "transparent",
|
|
2972
|
-
border: borderless ? "none" : "
|
|
2973
|
-
borderColor: borderless ? "transparent" : isTested ? "hsl(var(--severity-low) / 0.
|
|
3017
|
+
border: borderless ? "none" : "2px solid",
|
|
3018
|
+
borderColor: borderless ? "transparent" : isTested ? "hsl(var(--severity-low) / 0.9)" : authState.status === "error" ? "hsl(var(--destructive) / 0.7)" : "hsl(var(--border))",
|
|
2974
3019
|
borderRadius: borderless ? 0 : 3,
|
|
2975
3020
|
boxShadow: "none",
|
|
2976
3021
|
overflow: "hidden",
|
|
@@ -4012,8 +4057,14 @@ var AppAuthConfig = ({
|
|
|
4012
4057
|
onTestConnection,
|
|
4013
4058
|
onSaveAuth,
|
|
4014
4059
|
onSelectAuth,
|
|
4015
|
-
onRefreshAuth
|
|
4060
|
+
onRefreshAuth,
|
|
4061
|
+
globalUrl,
|
|
4062
|
+
userdata,
|
|
4063
|
+
isLoaded,
|
|
4064
|
+
isLoggedIn,
|
|
4065
|
+
serverside
|
|
4016
4066
|
}) => {
|
|
4067
|
+
useSyncHostBaseUrl(globalUrl);
|
|
4017
4068
|
const getApiAuthEntries = (app) => {
|
|
4018
4069
|
const normalize = (n) => n.toLowerCase().replace(/[\s_\-]+/g, "_");
|
|
4019
4070
|
return authenticatedApps.filter((auth) => normalize(auth.app?.name || "") === normalize(app.name)).map((auth) => ({
|
|
@@ -4032,8 +4083,8 @@ var AppAuthConfig = ({
|
|
|
4032
4083
|
const entries = getApiAuthEntries(app);
|
|
4033
4084
|
return entries.some((e) => e.validation?.valid === true);
|
|
4034
4085
|
};
|
|
4035
|
-
const initialSortRef = (0,
|
|
4036
|
-
const authAppsLoadedRef = (0,
|
|
4086
|
+
const initialSortRef = (0, import_react7.useRef)(null);
|
|
4087
|
+
const authAppsLoadedRef = (0, import_react7.useRef)(false);
|
|
4037
4088
|
if (!authAppsLoadedRef.current && authenticatedApps.length > 0) {
|
|
4038
4089
|
authAppsLoadedRef.current = true;
|
|
4039
4090
|
initialSortRef.current = null;
|
|
@@ -4056,7 +4107,7 @@ var AppAuthConfig = ({
|
|
|
4056
4107
|
const firstNotConfigured = sortedApps.find((app) => !isAppConfigured(app));
|
|
4057
4108
|
const firstNotValidated = sortedApps.find((app) => !isAppValidated(app));
|
|
4058
4109
|
const defaultExpanded = firstNotConfigured?.objectID || firstNotValidated?.objectID || false;
|
|
4059
|
-
const [expanded, setExpanded] = (0,
|
|
4110
|
+
const [expanded, setExpanded] = (0, import_react7.useState)(defaultExpanded);
|
|
4060
4111
|
if (apps.length === 0) {
|
|
4061
4112
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
4062
4113
|
import_material4.Alert,
|
|
@@ -4116,6 +4167,11 @@ var AppAuthConfig = ({
|
|
|
4116
4167
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
4117
4168
|
AppAuthCard,
|
|
4118
4169
|
{
|
|
4170
|
+
globalUrl,
|
|
4171
|
+
userdata,
|
|
4172
|
+
isLoaded,
|
|
4173
|
+
isLoggedIn,
|
|
4174
|
+
serverside,
|
|
4119
4175
|
app,
|
|
4120
4176
|
authState,
|
|
4121
4177
|
isExpanded,
|
|
@@ -4175,7 +4231,7 @@ var import_material7 = require("@mui/material");
|
|
|
4175
4231
|
var import_framer_motion5 = require("framer-motion");
|
|
4176
4232
|
|
|
4177
4233
|
// views/AppMcpChat.tsx
|
|
4178
|
-
var
|
|
4234
|
+
var import_react8 = require("react");
|
|
4179
4235
|
var import_lucide_react4 = require("lucide-react");
|
|
4180
4236
|
var import_material6 = require("@mui/material");
|
|
4181
4237
|
|
|
@@ -4331,14 +4387,14 @@ function getPrimaryCategory(appName, categories) {
|
|
|
4331
4387
|
return null;
|
|
4332
4388
|
}
|
|
4333
4389
|
var AppMcpChat = ({ appName, appIcon, appId, categories }) => {
|
|
4334
|
-
const [input, setInput] = (0,
|
|
4335
|
-
const [runState, setRunState] = (0,
|
|
4336
|
-
const [query, setQuery] = (0,
|
|
4337
|
-
const [result, setResult] = (0,
|
|
4338
|
-
const [isError, setIsError] = (0,
|
|
4339
|
-
const inputRef = (0,
|
|
4340
|
-
const suggestions = (0,
|
|
4341
|
-
const primaryCategory = (0,
|
|
4390
|
+
const [input, setInput] = (0, import_react8.useState)("");
|
|
4391
|
+
const [runState, setRunState] = (0, import_react8.useState)("idle");
|
|
4392
|
+
const [query, setQuery] = (0, import_react8.useState)("");
|
|
4393
|
+
const [result, setResult] = (0, import_react8.useState)("");
|
|
4394
|
+
const [isError, setIsError] = (0, import_react8.useState)(false);
|
|
4395
|
+
const inputRef = (0, import_react8.useRef)(null);
|
|
4396
|
+
const suggestions = (0, import_react8.useMemo)(() => getSuggestions(appName, categories), [appName, categories]);
|
|
4397
|
+
const primaryCategory = (0, import_react8.useMemo)(() => getPrimaryCategory(appName, categories), [appName, categories]);
|
|
4342
4398
|
const MIN_INPUT_LENGTH = 6;
|
|
4343
4399
|
const runAction = async () => {
|
|
4344
4400
|
const trimmed = input.trim();
|
|
@@ -4790,7 +4846,7 @@ function TryMcpSection({ appName, appIcon, appId, categories }) {
|
|
|
4790
4846
|
}
|
|
4791
4847
|
|
|
4792
4848
|
// components/SingulActionsPreview.tsx
|
|
4793
|
-
var
|
|
4849
|
+
var import_react9 = require("react");
|
|
4794
4850
|
var import_material8 = require("@mui/material");
|
|
4795
4851
|
var import_lucide_react5 = require("lucide-react");
|
|
4796
4852
|
init_api();
|
|
@@ -4798,7 +4854,7 @@ var import_react18_json_view = __toESM(require("react18-json-view"));
|
|
|
4798
4854
|
var import_style = require("react18-json-view/src/style.css");
|
|
4799
4855
|
var import_dark = require("react18-json-view/src/dark.css");
|
|
4800
4856
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
4801
|
-
var
|
|
4857
|
+
var import_react10 = require("react");
|
|
4802
4858
|
var deepParseJsonStrings = (obj, depth = 0) => {
|
|
4803
4859
|
if (depth > 5) return obj;
|
|
4804
4860
|
if (typeof obj === "string") {
|
|
@@ -5055,29 +5111,29 @@ var SingulActionsPreview = ({
|
|
|
5055
5111
|
activeOrgId,
|
|
5056
5112
|
onAuthenticate
|
|
5057
5113
|
}) => {
|
|
5058
|
-
const defaultCategory = (0,
|
|
5114
|
+
const defaultCategory = (0, import_react9.useMemo)(() => pickDefaultCategory(categories), [categories]);
|
|
5059
5115
|
const actions = ALL_ACTIONS;
|
|
5060
|
-
const sortedActions = (0,
|
|
5116
|
+
const sortedActions = (0, import_react9.useMemo)(() => {
|
|
5061
5117
|
const inCat = actions.filter((a) => a.category === defaultCategory);
|
|
5062
5118
|
const rest = actions.filter((a) => a.category !== defaultCategory);
|
|
5063
5119
|
return [...inCat, ...rest];
|
|
5064
5120
|
}, [actions, defaultCategory]);
|
|
5065
5121
|
const isDisabled = false;
|
|
5066
|
-
const [selected, setSelected] = (0,
|
|
5067
|
-
const [lang, setLang] = (0,
|
|
5068
|
-
const [snippet, setSnippet] = (0,
|
|
5069
|
-
const curlOpts = (0,
|
|
5122
|
+
const [selected, setSelected] = (0, import_react9.useState)(null);
|
|
5123
|
+
const [lang, setLang] = (0, import_react9.useState)("curl");
|
|
5124
|
+
const [snippet, setSnippet] = (0, import_react9.useState)("");
|
|
5125
|
+
const curlOpts = (0, import_react9.useMemo)(() => {
|
|
5070
5126
|
const apiKey = API_CONFIG.apiKey;
|
|
5071
5127
|
const trackedOrg = getTrackedOrgId();
|
|
5072
5128
|
const orgId = trackedOrg && activeOrgId && trackedOrg !== activeOrgId ? trackedOrg : null;
|
|
5073
5129
|
const baseUrl = API_CONFIG.baseUrl;
|
|
5074
5130
|
return { apiKey, orgId, baseUrl };
|
|
5075
5131
|
}, [activeOrgId]);
|
|
5076
|
-
const buildSnippet = (0,
|
|
5132
|
+
const buildSnippet = (0, import_react9.useCallback)(
|
|
5077
5133
|
(action, l) => l === "python" ? buildSingulPython(appName, action, curlOpts) : buildSingulCurl(appName, action, curlOpts),
|
|
5078
5134
|
[appName, curlOpts]
|
|
5079
5135
|
);
|
|
5080
|
-
(0,
|
|
5136
|
+
(0, import_react9.useEffect)(() => {
|
|
5081
5137
|
const initial = sortedActions[0] || null;
|
|
5082
5138
|
setSelected(initial);
|
|
5083
5139
|
setSnippet(buildSnippet(initial, lang));
|
|
@@ -5095,10 +5151,10 @@ var SingulActionsPreview = ({
|
|
|
5095
5151
|
toast.error("Copy failed");
|
|
5096
5152
|
}
|
|
5097
5153
|
};
|
|
5098
|
-
const [playLoading, setPlayLoading] = (0,
|
|
5099
|
-
const [playResult, setPlayResult] = (0,
|
|
5100
|
-
const responseRef = (0,
|
|
5101
|
-
const [copied, setCopied] = (0,
|
|
5154
|
+
const [playLoading, setPlayLoading] = (0, import_react9.useState)(false);
|
|
5155
|
+
const [playResult, setPlayResult] = (0, import_react9.useState)(null);
|
|
5156
|
+
const responseRef = (0, import_react9.useRef)(null);
|
|
5157
|
+
const [copied, setCopied] = (0, import_react9.useState)(false);
|
|
5102
5158
|
const scrollToResponse = () => {
|
|
5103
5159
|
requestAnimationFrame(() => {
|
|
5104
5160
|
responseRef.current?.scrollIntoView({ behavior: "smooth", block: "nearest" });
|
|
@@ -5166,7 +5222,7 @@ var SingulActionsPreview = ({
|
|
|
5166
5222
|
scrollToResponse();
|
|
5167
5223
|
}
|
|
5168
5224
|
};
|
|
5169
|
-
const lineCount = (0,
|
|
5225
|
+
const lineCount = (0, import_react9.useMemo)(() => Math.max(snippet.split("\n").length, 1), [snippet]);
|
|
5170
5226
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_material8.Box, { sx: { mt: 5, mb: 3, opacity: isDisabled ? 0.55 : 1 }, children: [
|
|
5171
5227
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_material8.Box, { sx: { display: "flex", alignItems: "center", gap: 1, mb: 1.5 }, children: [
|
|
5172
5228
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material8.Typography, { sx: { color: "hsl(var(--foreground))", fontWeight: 600, fontSize: "0.95rem" }, children: "Try individual actions" }),
|
|
@@ -5216,7 +5272,7 @@ var SingulActionsPreview = ({
|
|
|
5216
5272
|
groupBy: (o) => o.category,
|
|
5217
5273
|
getOptionLabel: (o) => o?.label ?? "",
|
|
5218
5274
|
isOptionEqualToValue: (a, b) => a?.name === b?.name && a?.category === b?.category,
|
|
5219
|
-
renderOption: (props, option) => /* @__PURE__ */ (0,
|
|
5275
|
+
renderOption: (props, option) => /* @__PURE__ */ (0, import_react10.createElement)("li", { ...props, key: `${option.category}-${option.name}` }, /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_material8.Box, { sx: { display: "flex", flexDirection: "column" }, children: [
|
|
5220
5276
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material8.Typography, { sx: { fontSize: "0.78rem", color: "hsl(var(--foreground))" }, children: option.label }),
|
|
5221
5277
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material8.Typography, { sx: { fontFamily: "'JetBrains Mono', monospace", fontSize: "0.65rem", color: "hsl(var(--muted-foreground))" }, children: option.name })
|
|
5222
5278
|
] })),
|
|
@@ -5603,15 +5659,15 @@ function AppDetailDrawer({
|
|
|
5603
5659
|
isAuthenticated = true,
|
|
5604
5660
|
activeOrgId
|
|
5605
5661
|
}) {
|
|
5606
|
-
const [appInfo, setAppInfo] = (0,
|
|
5607
|
-
const [appLoading, setAppLoading] = (0,
|
|
5608
|
-
const [isActivated, setIsActivated] = (0,
|
|
5609
|
-
const [activatedAppId, setActivatedAppId] = (0,
|
|
5610
|
-
const [activateLoading, setActivateLoading] = (0,
|
|
5611
|
-
const [resolvedAlgoliaId, setResolvedAlgoliaId] = (0,
|
|
5612
|
-
const [authExpanded, setAuthExpanded] = (0,
|
|
5613
|
-
const lastValidAuthRef = (0,
|
|
5614
|
-
const [incidentStats, setIncidentStats] = (0,
|
|
5662
|
+
const [appInfo, setAppInfo] = (0, import_react11.useState)(null);
|
|
5663
|
+
const [appLoading, setAppLoading] = (0, import_react11.useState)(true);
|
|
5664
|
+
const [isActivated, setIsActivated] = (0, import_react11.useState)(null);
|
|
5665
|
+
const [activatedAppId, setActivatedAppId] = (0, import_react11.useState)(null);
|
|
5666
|
+
const [activateLoading, setActivateLoading] = (0, import_react11.useState)(false);
|
|
5667
|
+
const [resolvedAlgoliaId, setResolvedAlgoliaId] = (0, import_react11.useState)(null);
|
|
5668
|
+
const [authExpanded, setAuthExpanded] = (0, import_react11.useState)(true);
|
|
5669
|
+
const lastValidAuthRef = (0, import_react11.useRef)(null);
|
|
5670
|
+
const [incidentStats, setIncidentStats] = (0, import_react11.useState)(null);
|
|
5615
5671
|
const {
|
|
5616
5672
|
authStates,
|
|
5617
5673
|
authenticatedApps,
|
|
@@ -5621,7 +5677,7 @@ function AppDetailDrawer({
|
|
|
5621
5677
|
handleSaveAuth,
|
|
5622
5678
|
refreshAuth
|
|
5623
5679
|
} = useAppAuth();
|
|
5624
|
-
(0,
|
|
5680
|
+
(0, import_react11.useEffect)(() => {
|
|
5625
5681
|
if (!open || !appName) return;
|
|
5626
5682
|
setAppLoading(true);
|
|
5627
5683
|
setAppInfo(null);
|
|
@@ -5713,7 +5769,7 @@ function AppDetailDrawer({
|
|
|
5713
5769
|
setAppLoading(false);
|
|
5714
5770
|
})();
|
|
5715
5771
|
}, [open, appName, appId]);
|
|
5716
|
-
(0,
|
|
5772
|
+
(0, import_react11.useEffect)(() => {
|
|
5717
5773
|
if (!open || !appName || !isAuthenticated) {
|
|
5718
5774
|
setIncidentStats(null);
|
|
5719
5775
|
return;
|
|
@@ -5752,13 +5808,13 @@ function AppDetailDrawer({
|
|
|
5752
5808
|
onRefresh?.();
|
|
5753
5809
|
onClose();
|
|
5754
5810
|
};
|
|
5755
|
-
const matchingEntries = (0,
|
|
5811
|
+
const matchingEntries = (0, import_react11.useMemo)(() => {
|
|
5756
5812
|
if (!appName || !isAuthenticated) return [];
|
|
5757
5813
|
return authenticatedApps.filter(
|
|
5758
5814
|
(auth) => auth.app?.name?.toLowerCase().replace(/[\s_\-]+/g, "_") === appName.toLowerCase().replace(/[\s_\-]+/g, "_")
|
|
5759
5815
|
);
|
|
5760
5816
|
}, [appName, authenticatedApps, isAuthenticated]);
|
|
5761
|
-
const resolvedImage = (0,
|
|
5817
|
+
const resolvedImage = (0, import_react11.useMemo)(() => {
|
|
5762
5818
|
if (appInfo?.large_image) return appInfo.large_image;
|
|
5763
5819
|
for (const entry of matchingEntries) {
|
|
5764
5820
|
const img = entry.app?.large_image || entry.large_image;
|
|
@@ -5766,7 +5822,7 @@ function AppDetailDrawer({
|
|
|
5766
5822
|
}
|
|
5767
5823
|
return "";
|
|
5768
5824
|
}, [appInfo, matchingEntries]);
|
|
5769
|
-
const algoliaApp = (0,
|
|
5825
|
+
const algoliaApp = (0, import_react11.useMemo)(() => {
|
|
5770
5826
|
if (!appName) return null;
|
|
5771
5827
|
return {
|
|
5772
5828
|
objectID: resolvedAlgoliaId || appName,
|
|
@@ -5782,12 +5838,12 @@ function AppDetailDrawer({
|
|
|
5782
5838
|
const effectiveActivated = isActivated === null ? hasAnyAuth ? true : null : isActivated || hasAnyAuth;
|
|
5783
5839
|
const authCount = matchingEntries.length;
|
|
5784
5840
|
const displayName = (appInfo?.name || appName || "").replace(/_/g, " ");
|
|
5785
|
-
(0,
|
|
5841
|
+
(0, import_react11.useEffect)(() => {
|
|
5786
5842
|
if (lastValidAuthRef.current === hasValidAuth) return;
|
|
5787
5843
|
lastValidAuthRef.current = hasValidAuth;
|
|
5788
5844
|
setAuthExpanded(!hasValidAuth);
|
|
5789
5845
|
}, [hasValidAuth]);
|
|
5790
|
-
(0,
|
|
5846
|
+
(0, import_react11.useEffect)(() => {
|
|
5791
5847
|
lastValidAuthRef.current = null;
|
|
5792
5848
|
}, [appName]);
|
|
5793
5849
|
const handleActivateToggle = async () => {
|
|
@@ -6162,16 +6218,6 @@ function SegmentedControl({
|
|
|
6162
6218
|
) });
|
|
6163
6219
|
}
|
|
6164
6220
|
|
|
6165
|
-
// useSyncHostBaseUrl.ts
|
|
6166
|
-
var import_react11 = require("react");
|
|
6167
|
-
init_api();
|
|
6168
|
-
var useSyncHostBaseUrl = (globalUrl) => {
|
|
6169
|
-
(0, import_react11.useEffect)(() => {
|
|
6170
|
-
if (!globalUrl) return;
|
|
6171
|
-
setHostBaseUrl(globalUrl);
|
|
6172
|
-
}, [globalUrl]);
|
|
6173
|
-
};
|
|
6174
|
-
|
|
6175
6221
|
// views/ShuffleMCP.tsx
|
|
6176
6222
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
6177
6223
|
var DEFAULT_ALGOLIA_APP_ID = "JNSS5CFDZZ";
|
|
@@ -6189,6 +6235,7 @@ var ShuffleMCP = import_react12.default.forwardRef(({
|
|
|
6189
6235
|
showCheckbox = false,
|
|
6190
6236
|
multiSelect = false,
|
|
6191
6237
|
selectedApps = EMPTY_SELECTED_APPS,
|
|
6238
|
+
disableAutoSelectValidatedApps = false,
|
|
6192
6239
|
preventDefault = false,
|
|
6193
6240
|
inline = false,
|
|
6194
6241
|
initialQuery = "",
|
|
@@ -6299,6 +6346,7 @@ var ShuffleMCP = import_react12.default.forwardRef(({
|
|
|
6299
6346
|
fetchPrivateApps();
|
|
6300
6347
|
}, [apiKey, apiBaseUrl, privateAppsPath, disablePrivateApps, orgId]);
|
|
6301
6348
|
(0, import_react12.useEffect)(() => {
|
|
6349
|
+
if (disableAutoSelectValidatedApps) return;
|
|
6302
6350
|
if (authenticatedApps.length > 0 && results.length > 0) {
|
|
6303
6351
|
const validatedApps = authenticatedApps.filter((auth) => auth.validation?.valid);
|
|
6304
6352
|
const appsToAutoSelect = results.filter(
|
|
@@ -6317,7 +6365,7 @@ var ShuffleMCP = import_react12.default.forwardRef(({
|
|
|
6317
6365
|
}
|
|
6318
6366
|
}
|
|
6319
6367
|
}
|
|
6320
|
-
}, [authenticatedApps, results]);
|
|
6368
|
+
}, [authenticatedApps, results, disableAutoSelectValidatedApps]);
|
|
6321
6369
|
(0, import_react12.useEffect)(() => {
|
|
6322
6370
|
if (externalAuthenticatedApps) {
|
|
6323
6371
|
setAuthenticatedApps(externalAuthenticatedApps);
|
|
@@ -6815,8 +6863,12 @@ function AppSearchDrawer({
|
|
|
6815
6863
|
highlightDelayMs = 5e3,
|
|
6816
6864
|
multiSelect = false,
|
|
6817
6865
|
selectedApps,
|
|
6818
|
-
onSelectionChange
|
|
6866
|
+
onSelectionChange,
|
|
6867
|
+
globalUrl,
|
|
6868
|
+
theme,
|
|
6869
|
+
colorMode
|
|
6819
6870
|
}) {
|
|
6871
|
+
const themeScope = useShuffleMcpTheme();
|
|
6820
6872
|
const [detailAppName, setDetailAppName] = (0, import_react13.useState)(null);
|
|
6821
6873
|
const [detailAppId, setDetailAppId] = (0, import_react13.useState)(null);
|
|
6822
6874
|
const [highlightActive, setHighlightActive] = (0, import_react13.useState)(false);
|
|
@@ -6902,6 +6954,7 @@ function AppSearchDrawer({
|
|
|
6902
6954
|
anchor,
|
|
6903
6955
|
open: open && detailAppName === null,
|
|
6904
6956
|
onClose: handleClose,
|
|
6957
|
+
slotProps: { paper: { className: themeScope?.scopeClassName } },
|
|
6905
6958
|
sx: {
|
|
6906
6959
|
zIndex: 9999,
|
|
6907
6960
|
"& .MuiDrawer-paper": {
|
|
@@ -7055,7 +7108,10 @@ function AppSearchDrawer({
|
|
|
7055
7108
|
ShuffleMCP2,
|
|
7056
7109
|
{
|
|
7057
7110
|
apiKey: API_CONFIG.apiKey || void 0,
|
|
7058
|
-
apiBaseUrl: API_CONFIG.baseUrl,
|
|
7111
|
+
apiBaseUrl: globalUrl || API_CONFIG.baseUrl,
|
|
7112
|
+
globalUrl,
|
|
7113
|
+
theme,
|
|
7114
|
+
colorMode,
|
|
7059
7115
|
placeholder: initialQuery ? `Search ${initialQuery} integrations...` : "Search integrations...",
|
|
7060
7116
|
layout: "grid",
|
|
7061
7117
|
gridColumns: 2,
|
|
@@ -7067,8 +7123,17 @@ function AppSearchDrawer({
|
|
|
7067
7123
|
showCheckbox: multiSelect,
|
|
7068
7124
|
multiSelect,
|
|
7069
7125
|
selectedApps: multiSelect ? projectedSelectedApps : void 0,
|
|
7126
|
+
disableAutoSelectValidatedApps: multiSelect,
|
|
7070
7127
|
preventDefault: true,
|
|
7071
7128
|
onAppSelected: handleAppSelected,
|
|
7129
|
+
onSelectionChange: multiSelect ? (next) => {
|
|
7130
|
+
onSelectionChange?.(next.map((app) => ({
|
|
7131
|
+
name: app.name,
|
|
7132
|
+
id: app.objectID || null,
|
|
7133
|
+
icon: app.image_url || "",
|
|
7134
|
+
categories: app.categories || []
|
|
7135
|
+
})));
|
|
7136
|
+
} : void 0,
|
|
7072
7137
|
pinnedApps: pinnedApps?.map((p) => ({
|
|
7073
7138
|
name: p.name,
|
|
7074
7139
|
image_url: p.image_url,
|
|
@@ -7114,6 +7179,9 @@ function AppSearchDrawer({
|
|
|
7114
7179
|
appId: detailAppId,
|
|
7115
7180
|
anchor,
|
|
7116
7181
|
width,
|
|
7182
|
+
globalUrl,
|
|
7183
|
+
theme,
|
|
7184
|
+
colorMode,
|
|
7117
7185
|
onRefresh: onClose,
|
|
7118
7186
|
onAddToCanvas
|
|
7119
7187
|
}
|
|
@@ -9120,6 +9188,8 @@ var AgentUI = ({
|
|
|
9120
9188
|
apiKey,
|
|
9121
9189
|
apiBaseUrl,
|
|
9122
9190
|
orgId,
|
|
9191
|
+
theme,
|
|
9192
|
+
colorMode,
|
|
9123
9193
|
className,
|
|
9124
9194
|
sx,
|
|
9125
9195
|
contentSx
|
|
@@ -11669,6 +11739,9 @@ var AgentUI = ({
|
|
|
11669
11739
|
subtitle: appPickerSubtitle,
|
|
11670
11740
|
multiSelect: true,
|
|
11671
11741
|
selectedApps: chosenApps.map((a) => ({ name: a.name, id: a.id || null, icon: a.icon })),
|
|
11742
|
+
globalUrl: apiBaseUrl,
|
|
11743
|
+
theme,
|
|
11744
|
+
colorMode,
|
|
11672
11745
|
onSelectionChange: (next) => {
|
|
11673
11746
|
setChosenApps(
|
|
11674
11747
|
next.map((app) => {
|
|
@@ -11692,7 +11765,10 @@ var AgentUI = ({
|
|
|
11692
11765
|
onClose: () => setAuthDrawerApp(null),
|
|
11693
11766
|
appName: authDrawerApp?.name || null,
|
|
11694
11767
|
appId: authDrawerApp?.id || null,
|
|
11695
|
-
activeOrgId: orgId || null
|
|
11768
|
+
activeOrgId: orgId || null,
|
|
11769
|
+
globalUrl: apiBaseUrl,
|
|
11770
|
+
theme,
|
|
11771
|
+
colorMode
|
|
11696
11772
|
}
|
|
11697
11773
|
)
|
|
11698
11774
|
]
|
|
@@ -11730,6 +11806,7 @@ var AgentRunDrawer = ({
|
|
|
11730
11806
|
globalUrl
|
|
11731
11807
|
}) => {
|
|
11732
11808
|
useSyncHostBaseUrl(globalUrl);
|
|
11809
|
+
const themeScope = useShuffleMcpTheme();
|
|
11733
11810
|
const [activeTab, setActiveTab] = (0, import_react16.useState)(initialTab);
|
|
11734
11811
|
const prevOpenRef = (0, import_react16.useRef)(open);
|
|
11735
11812
|
(0, import_react16.useEffect)(() => {
|
|
@@ -11759,7 +11836,7 @@ var AgentRunDrawer = ({
|
|
|
11759
11836
|
onClose,
|
|
11760
11837
|
slotProps: {
|
|
11761
11838
|
paper: {
|
|
11762
|
-
className,
|
|
11839
|
+
className: [themeScope?.scopeClassName, className].filter(Boolean).join(" ") || void 0,
|
|
11763
11840
|
sx: [
|
|
11764
11841
|
{
|
|
11765
11842
|
width: { xs: "100%", sm: width },
|
|
@@ -12683,8 +12760,11 @@ var AgentExecutionDrawer = ({
|
|
|
12683
12760
|
headerSx,
|
|
12684
12761
|
bodySx,
|
|
12685
12762
|
topBanner,
|
|
12686
|
-
onSchedule
|
|
12763
|
+
onSchedule,
|
|
12764
|
+
theme,
|
|
12765
|
+
colorMode
|
|
12687
12766
|
}) => {
|
|
12767
|
+
const themeScope = useShuffleMcpTheme();
|
|
12688
12768
|
const statusKey = (run?.status || "").toUpperCase();
|
|
12689
12769
|
const cfg = STATUS_CONFIG[statusKey] || STATUS_CONFIG.WAITING;
|
|
12690
12770
|
const duration = run ? formatDuration(run) : "";
|
|
@@ -12696,7 +12776,7 @@ var AgentExecutionDrawer = ({
|
|
|
12696
12776
|
onClose,
|
|
12697
12777
|
slotProps: {
|
|
12698
12778
|
paper: {
|
|
12699
|
-
className,
|
|
12779
|
+
className: [themeScope?.scopeClassName, className].filter(Boolean).join(" ") || void 0,
|
|
12700
12780
|
sx: [
|
|
12701
12781
|
{
|
|
12702
12782
|
width: { xs: "100%", sm: width },
|
|
@@ -12832,7 +12912,9 @@ var AgentExecutionDrawer = ({
|
|
|
12832
12912
|
apiKey,
|
|
12833
12913
|
apiBaseUrl,
|
|
12834
12914
|
orgId,
|
|
12835
|
-
onSchedule
|
|
12915
|
+
onSchedule,
|
|
12916
|
+
theme,
|
|
12917
|
+
colorMode
|
|
12836
12918
|
},
|
|
12837
12919
|
run.execution_id
|
|
12838
12920
|
) : null
|
|
@@ -12858,7 +12940,9 @@ var AgentsView = ({
|
|
|
12858
12940
|
isLoaded,
|
|
12859
12941
|
isLoggedIn,
|
|
12860
12942
|
userdata,
|
|
12861
|
-
serverside
|
|
12943
|
+
serverside,
|
|
12944
|
+
theme,
|
|
12945
|
+
colorMode
|
|
12862
12946
|
}) => {
|
|
12863
12947
|
useSyncHostBaseUrl(globalUrl);
|
|
12864
12948
|
const [selectedRun, setSelectedRun] = (0, import_react18.useState)(null);
|
|
@@ -12984,7 +13068,9 @@ var AgentsView = ({
|
|
|
12984
13068
|
submitLabel: editing ? "Save" : void 0,
|
|
12985
13069
|
submitTooltip: editing ? "\u2318+Enter to save" : void 0,
|
|
12986
13070
|
disableSchedule: Boolean(editing),
|
|
12987
|
-
disableScheduleTooltip: editing ? "Scheduling is disabled while editing an existing schedule" : void 0
|
|
13071
|
+
disableScheduleTooltip: editing ? "Scheduling is disabled while editing an existing schedule" : void 0,
|
|
13072
|
+
theme,
|
|
13073
|
+
colorMode
|
|
12988
13074
|
},
|
|
12989
13075
|
prefill.key
|
|
12990
13076
|
),
|
|
@@ -13004,7 +13090,9 @@ var AgentsView = ({
|
|
|
13004
13090
|
onClose: () => setSelectedRun(null),
|
|
13005
13091
|
run: selectedRun,
|
|
13006
13092
|
apiBaseUrl: globalUrl,
|
|
13007
|
-
onSchedule
|
|
13093
|
+
onSchedule,
|
|
13094
|
+
theme,
|
|
13095
|
+
colorMode
|
|
13008
13096
|
}
|
|
13009
13097
|
),
|
|
13010
13098
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
@@ -13016,7 +13104,9 @@ var AgentsView = ({
|
|
|
13016
13104
|
globalUrl,
|
|
13017
13105
|
localLLMSlot: effectiveLocalLLMSlot,
|
|
13018
13106
|
permissionsSlot,
|
|
13019
|
-
|
|
13107
|
+
theme,
|
|
13108
|
+
colorMode,
|
|
13109
|
+
agentUIProps: { onSchedule, apiBaseUrl: globalUrl, theme, colorMode }
|
|
13020
13110
|
}
|
|
13021
13111
|
)
|
|
13022
13112
|
] });
|
|
@@ -13259,7 +13349,7 @@ var withMcpTheme = (Inner, displayName) => {
|
|
|
13259
13349
|
const Wrapped = ({ theme, colorMode, ...rest }) => import_react20.default.createElement(
|
|
13260
13350
|
ShuffleMcpThemeProvider,
|
|
13261
13351
|
{ mode: resolveMode(theme, colorMode) },
|
|
13262
|
-
import_react20.default.createElement(Inner, { ...rest })
|
|
13352
|
+
import_react20.default.createElement(Inner, { ...rest, theme, colorMode })
|
|
13263
13353
|
);
|
|
13264
13354
|
Wrapped.displayName = `ShuffleMCPs(${displayName})`;
|
|
13265
13355
|
return Wrapped;
|
|
@@ -13269,7 +13359,7 @@ var withMcpThemeRef = (Inner, displayName) => {
|
|
|
13269
13359
|
({ theme, colorMode, ...rest }, ref) => import_react20.default.createElement(
|
|
13270
13360
|
ShuffleMcpThemeProvider,
|
|
13271
13361
|
{ mode: resolveMode(theme, colorMode) },
|
|
13272
|
-
import_react20.default.createElement(Inner, { ...rest, ref })
|
|
13362
|
+
import_react20.default.createElement(Inner, { ...rest, theme, colorMode, ref })
|
|
13273
13363
|
)
|
|
13274
13364
|
);
|
|
13275
13365
|
Wrapped.displayName = `ShuffleMCPs(${displayName})`;
|