@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.mjs
CHANGED
|
@@ -25,20 +25,39 @@ import React5 from "react";
|
|
|
25
25
|
// ShuffleMcpThemeProvider.tsx
|
|
26
26
|
import React from "react";
|
|
27
27
|
import { ThemeProvider, createTheme, useTheme as useMuiTheme } from "@mui/material";
|
|
28
|
-
import { jsx } from "react/jsx-runtime";
|
|
28
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
29
29
|
var readHtmlDarkClass = () => {
|
|
30
30
|
if (typeof document === "undefined") return false;
|
|
31
31
|
return document.documentElement.classList.contains("dark");
|
|
32
32
|
};
|
|
33
|
-
var
|
|
33
|
+
var readAncestorDark = (anchor) => {
|
|
34
|
+
if (!anchor || typeof document === "undefined") return null;
|
|
35
|
+
const start = anchor.parentElement;
|
|
36
|
+
if (!start) return null;
|
|
37
|
+
const scoped = start.closest('[data-shuffle-mode="dark"], [data-shuffle-mode="light"]');
|
|
38
|
+
if (scoped) return scoped.getAttribute("data-shuffle-mode") === "dark";
|
|
39
|
+
const darkAncestor = start.closest(".dark");
|
|
40
|
+
if (darkAncestor) return true;
|
|
41
|
+
return null;
|
|
42
|
+
};
|
|
43
|
+
var useAutoDarkClass = (enabled, anchorRef) => {
|
|
34
44
|
const [isDark, setIsDark] = React.useState(() => enabled ? readHtmlDarkClass() : false);
|
|
35
|
-
React.
|
|
45
|
+
React.useLayoutEffect(() => {
|
|
36
46
|
if (!enabled || typeof document === "undefined") return;
|
|
37
|
-
|
|
38
|
-
|
|
47
|
+
const recompute = () => {
|
|
48
|
+
const ancestor = readAncestorDark(anchorRef.current);
|
|
49
|
+
setIsDark(ancestor !== null ? ancestor : readHtmlDarkClass());
|
|
50
|
+
};
|
|
51
|
+
recompute();
|
|
52
|
+
const observer = new MutationObserver(recompute);
|
|
39
53
|
observer.observe(document.documentElement, { attributes: true, attributeFilter: ["class"] });
|
|
54
|
+
let node = anchorRef.current?.parentElement ?? null;
|
|
55
|
+
while (node) {
|
|
56
|
+
observer.observe(node, { attributes: true, attributeFilter: ["class", "data-shuffle-mode"] });
|
|
57
|
+
node = node.parentElement;
|
|
58
|
+
}
|
|
40
59
|
return () => observer.disconnect();
|
|
41
|
-
}, [enabled]);
|
|
60
|
+
}, [enabled, anchorRef]);
|
|
42
61
|
return isDark;
|
|
43
62
|
};
|
|
44
63
|
var ShuffleMcpThemeContext = React.createContext(null);
|
|
@@ -125,10 +144,12 @@ var ShuffleMcpThemeProvider = ({
|
|
|
125
144
|
}) => {
|
|
126
145
|
const parent = useMuiTheme();
|
|
127
146
|
const parentCtx = useShuffleMcpTheme();
|
|
128
|
-
const
|
|
129
|
-
const
|
|
147
|
+
const anchorRef = React.useRef(null);
|
|
148
|
+
const autoIsDark = useAutoDarkClass(mode === "auto", anchorRef);
|
|
149
|
+
const effectiveDark = mode === "auto" ? autoIsDark : mode === "dark";
|
|
130
150
|
const sameAsParent = parentCtx !== null && parentCtx.isDark === effectiveDark;
|
|
131
151
|
const scopeClassName = effectiveDark ? "shuffle-mcp-scope dark" : "shuffle-mcp-scope";
|
|
152
|
+
const resolvedModeAttr = effectiveDark ? "dark" : "light";
|
|
132
153
|
const merged = React.useMemo(
|
|
133
154
|
() => createTheme({
|
|
134
155
|
...parent,
|
|
@@ -148,9 +169,15 @@ var ShuffleMcpThemeProvider = ({
|
|
|
148
169
|
[mode, effectiveDark, scopeClassName]
|
|
149
170
|
);
|
|
150
171
|
if (sameAsParent) {
|
|
151
|
-
return /* @__PURE__ */
|
|
172
|
+
return /* @__PURE__ */ jsxs(ShuffleMcpThemeContext.Provider, { value: ctxValue, children: [
|
|
173
|
+
/* @__PURE__ */ jsx("span", { ref: anchorRef, style: { display: "none" }, "aria-hidden": true }),
|
|
174
|
+
children
|
|
175
|
+
] });
|
|
152
176
|
}
|
|
153
|
-
return /* @__PURE__ */ jsx(ShuffleMcpThemeContext.Provider, { value: ctxValue, children: /* @__PURE__ */ jsx(ThemeProvider, { theme: merged, children: /* @__PURE__ */
|
|
177
|
+
return /* @__PURE__ */ jsx(ShuffleMcpThemeContext.Provider, { value: ctxValue, children: /* @__PURE__ */ jsx(ThemeProvider, { theme: merged, children: /* @__PURE__ */ jsxs("div", { className: scopeClassName, "data-shuffle-mode": resolvedModeAttr, "data-shuffle-mcp-root": true, children: [
|
|
178
|
+
/* @__PURE__ */ jsx("span", { ref: anchorRef, style: { display: "none" }, "aria-hidden": true }),
|
|
179
|
+
children
|
|
180
|
+
] }) }) });
|
|
154
181
|
};
|
|
155
182
|
|
|
156
183
|
// views/ShuffleMCP.tsx
|
|
@@ -159,7 +186,7 @@ import { algoliasearch } from "algoliasearch";
|
|
|
159
186
|
import { Tooltip as Tooltip4 } from "@mui/material";
|
|
160
187
|
|
|
161
188
|
// views/AppDetailDrawer.tsx
|
|
162
|
-
import { useState as useState8, useEffect as
|
|
189
|
+
import { useState as useState8, useEffect as useEffect7, useMemo as useMemo3, useRef as useRef5 } from "react";
|
|
163
190
|
|
|
164
191
|
// toast.ts
|
|
165
192
|
var defaultImpl = (arg, opts) => {
|
|
@@ -923,7 +950,7 @@ function extractValidatedIngestionApps(authApiResponse, workflowAppNames) {
|
|
|
923
950
|
}
|
|
924
951
|
|
|
925
952
|
// components/IntegrationStatus.tsx
|
|
926
|
-
import { Fragment, jsx as jsx3, jsxs } from "react/jsx-runtime";
|
|
953
|
+
import { Fragment, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
927
954
|
var ONBOARDING_CONFIG_CATEGORY = "shuffle-security_onboarding";
|
|
928
955
|
var SELECTED_TOOLS_KEY = "selected_tools";
|
|
929
956
|
var PRIORITY_CATEGORY_PATTERNS = {
|
|
@@ -1084,7 +1111,7 @@ var IntegrationStatus = ({ collapsed, filterApps, onAddClick, iconSize = 26, onD
|
|
|
1084
1111
|
return integration.hasValidAuth ? "hsl(var(--severity-low))" : "hsl(var(--severity-medium))";
|
|
1085
1112
|
};
|
|
1086
1113
|
const sz = iconSize;
|
|
1087
|
-
return /* @__PURE__ */
|
|
1114
|
+
return /* @__PURE__ */ jsxs2(Box, { sx: { px: collapsed ? 0 : 1, py: 1 }, children: [
|
|
1088
1115
|
!collapsed && !hideHeader && /* @__PURE__ */ jsx3(
|
|
1089
1116
|
Typography,
|
|
1090
1117
|
{
|
|
@@ -1108,20 +1135,20 @@ var IntegrationStatus = ({ collapsed, filterApps, onAddClick, iconSize = 26, onD
|
|
|
1108
1135
|
px: collapsed ? 0 : 1,
|
|
1109
1136
|
maxHeight: expanded ? "none" : 80,
|
|
1110
1137
|
overflow: "hidden"
|
|
1111
|
-
}, children: loading ? /* @__PURE__ */ jsx3(CircularProgress, { size: 20, sx: { color: "hsl(var(--muted-foreground))" } }) : /* @__PURE__ */
|
|
1138
|
+
}, children: loading ? /* @__PURE__ */ jsx3(CircularProgress, { size: 20, sx: { color: "hsl(var(--muted-foreground))" } }) : /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
1112
1139
|
integrations.slice(0, displayLimit).map((integration) => {
|
|
1113
1140
|
const isDisabled = disabledApps?.has(integration.name) ?? false;
|
|
1114
1141
|
const isHovered = hoveredId === integration.id;
|
|
1115
1142
|
return /* @__PURE__ */ jsx3(
|
|
1116
1143
|
Tooltip,
|
|
1117
1144
|
{
|
|
1118
|
-
title: onDisable && isHovered ? "" : /* @__PURE__ */
|
|
1119
|
-
/* @__PURE__ */
|
|
1145
|
+
title: onDisable && isHovered ? "" : /* @__PURE__ */ jsxs2(Box, { sx: { textAlign: "left", minWidth: 160, maxWidth: 320, p: 0.5 }, children: [
|
|
1146
|
+
/* @__PURE__ */ jsxs2(Typography, { sx: { fontWeight: 600, fontSize: "0.85rem", color: "hsl(var(--foreground))", textTransform: "capitalize" }, children: [
|
|
1120
1147
|
integration.name.replace(/_/g, " "),
|
|
1121
1148
|
isDisabled && /* @__PURE__ */ jsx3(Typography, { component: "span", sx: { ml: 1, fontSize: "0.7rem", color: "hsl(var(--muted-foreground))" }, children: "(disabled)" })
|
|
1122
1149
|
] }),
|
|
1123
1150
|
/* @__PURE__ */ jsx3(Typography, { sx: { fontSize: "0.7rem", color: "hsl(var(--muted-foreground))", mb: 1, textTransform: "capitalize" }, children: integration.category }),
|
|
1124
|
-
/* @__PURE__ */ jsx3(Box, { sx: { display: "flex", flexDirection: "column", gap: 0.5 }, children: integration.authInstances.map((instance, idx) => /* @__PURE__ */
|
|
1151
|
+
/* @__PURE__ */ jsx3(Box, { sx: { display: "flex", flexDirection: "column", gap: 0.5 }, children: integration.authInstances.map((instance, idx) => /* @__PURE__ */ jsxs2(Box, { sx: { display: "flex", alignItems: "center", gap: 0.75, minWidth: 0 }, children: [
|
|
1125
1152
|
/* @__PURE__ */ jsx3(
|
|
1126
1153
|
Box,
|
|
1127
1154
|
{
|
|
@@ -1140,7 +1167,7 @@ var IntegrationStatus = ({ collapsed, filterApps, onAddClick, iconSize = 26, onD
|
|
|
1140
1167
|
] }),
|
|
1141
1168
|
placement: "bottom",
|
|
1142
1169
|
arrow: true,
|
|
1143
|
-
children: /* @__PURE__ */
|
|
1170
|
+
children: /* @__PURE__ */ jsxs2(
|
|
1144
1171
|
Box,
|
|
1145
1172
|
{
|
|
1146
1173
|
onMouseEnter: () => onDisable && setHoveredId(integration.id),
|
|
@@ -1248,7 +1275,7 @@ var IntegrationStatus = ({ collapsed, filterApps, onAddClick, iconSize = 26, onD
|
|
|
1248
1275
|
integration.id
|
|
1249
1276
|
);
|
|
1250
1277
|
}),
|
|
1251
|
-
hasMore && !expanded && /* @__PURE__ */ jsx3(Tooltip, { title: `Show all ${integrations.length} integrations`, placement: "bottom", children: /* @__PURE__ */
|
|
1278
|
+
hasMore && !expanded && /* @__PURE__ */ jsx3(Tooltip, { title: `Show all ${integrations.length} integrations`, placement: "bottom", children: /* @__PURE__ */ jsxs2(
|
|
1252
1279
|
Avatar,
|
|
1253
1280
|
{
|
|
1254
1281
|
onClick: () => setExpanded(true),
|
|
@@ -1579,7 +1606,7 @@ import {
|
|
|
1579
1606
|
AlertCircle as ErrorOutlineIcon
|
|
1580
1607
|
} from "lucide-react";
|
|
1581
1608
|
import { motion } from "framer-motion";
|
|
1582
|
-
import { jsx as jsx4, jsxs as
|
|
1609
|
+
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1583
1610
|
function AppTitleHeader({
|
|
1584
1611
|
name,
|
|
1585
1612
|
image,
|
|
@@ -1592,7 +1619,7 @@ function AppTitleHeader({
|
|
|
1592
1619
|
onActivateToggle,
|
|
1593
1620
|
onAdd
|
|
1594
1621
|
}) {
|
|
1595
|
-
return /* @__PURE__ */ jsx4(motion.div, { initial: { opacity: 0, y: 12 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.3 }, children: /* @__PURE__ */
|
|
1622
|
+
return /* @__PURE__ */ jsx4(motion.div, { initial: { opacity: 0, y: 12 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.3 }, children: /* @__PURE__ */ jsxs3(
|
|
1596
1623
|
Box2,
|
|
1597
1624
|
{
|
|
1598
1625
|
sx: {
|
|
@@ -1624,8 +1651,8 @@ function AppTitleHeader({
|
|
|
1624
1651
|
children: /* @__PURE__ */ jsx4(Typography2, { sx: { fontSize: "1.2rem", fontWeight: 700 }, children: name.charAt(0).toUpperCase() })
|
|
1625
1652
|
}
|
|
1626
1653
|
),
|
|
1627
|
-
/* @__PURE__ */
|
|
1628
|
-
/* @__PURE__ */
|
|
1654
|
+
/* @__PURE__ */ jsxs3(Box2, { sx: { flex: 1, minWidth: 0 }, children: [
|
|
1655
|
+
/* @__PURE__ */ jsxs3(Box2, { sx: { display: "flex", alignItems: "center", gap: 1, mb: 0.5 }, children: [
|
|
1629
1656
|
/* @__PURE__ */ jsx4(Typography2, { sx: { color: "hsl(var(--foreground))", fontWeight: 700, fontSize: "1rem", textTransform: "capitalize" }, children: name }),
|
|
1630
1657
|
isAuthenticated && hasValidAuth && /* @__PURE__ */ jsx4(
|
|
1631
1658
|
Chip,
|
|
@@ -1708,7 +1735,7 @@ import { Box as Box4, Typography as Typography4 } from "@mui/material";
|
|
|
1708
1735
|
import { motion as motion3 } from "framer-motion";
|
|
1709
1736
|
|
|
1710
1737
|
// components/AppAuthConfig.tsx
|
|
1711
|
-
import { useState as useState5, useEffect as
|
|
1738
|
+
import { useState as useState5, useEffect as useEffect5, useRef as useRef2 } from "react";
|
|
1712
1739
|
import {
|
|
1713
1740
|
CheckCircle2 as CheckCircleIcon2,
|
|
1714
1741
|
X as CloseIcon,
|
|
@@ -1891,10 +1918,19 @@ var AppFallbackIcon = ({
|
|
|
1891
1918
|
);
|
|
1892
1919
|
};
|
|
1893
1920
|
|
|
1921
|
+
// useSyncHostBaseUrl.ts
|
|
1922
|
+
import { useEffect as useEffect4 } from "react";
|
|
1923
|
+
var useSyncHostBaseUrl = (globalUrl) => {
|
|
1924
|
+
useEffect4(() => {
|
|
1925
|
+
if (!globalUrl) return;
|
|
1926
|
+
setHostBaseUrl(globalUrl);
|
|
1927
|
+
}, [globalUrl]);
|
|
1928
|
+
};
|
|
1929
|
+
|
|
1894
1930
|
// components/AppAuthConfig.tsx
|
|
1895
1931
|
import ReactMarkdown from "react-markdown";
|
|
1896
1932
|
import remarkGfm from "remark-gfm";
|
|
1897
|
-
import { Fragment as Fragment2, jsx as jsx6, jsxs as
|
|
1933
|
+
import { Fragment as Fragment2, jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1898
1934
|
var isOAuth2Type = (type) => {
|
|
1899
1935
|
if (!type) return false;
|
|
1900
1936
|
const lowerType = type.toLowerCase();
|
|
@@ -1947,8 +1983,14 @@ var AppAuthCard = ({
|
|
|
1947
1983
|
hideStatusChips,
|
|
1948
1984
|
hideDocsLink,
|
|
1949
1985
|
hideUrlFields,
|
|
1950
|
-
borderless
|
|
1986
|
+
borderless,
|
|
1987
|
+
globalUrl,
|
|
1988
|
+
userdata,
|
|
1989
|
+
isLoaded,
|
|
1990
|
+
isLoggedIn,
|
|
1991
|
+
serverside
|
|
1951
1992
|
}) => {
|
|
1993
|
+
useSyncHostBaseUrl(globalUrl);
|
|
1952
1994
|
const getBestDefaultAuth = (entries) => {
|
|
1953
1995
|
if (entries.length === 0) return ADD_NEW_AUTH;
|
|
1954
1996
|
const validatedEntry = entries.find((e) => e.validation?.valid === true);
|
|
@@ -1993,7 +2035,7 @@ var AppAuthCard = ({
|
|
|
1993
2035
|
const [wasPreValidatedPerAuth, setWasPreValidatedPerAuth] = useState5({});
|
|
1994
2036
|
const prevEntryCountRef = useRef2(apiAuthEntries.length);
|
|
1995
2037
|
const autoTestFiredRef = useRef2(null);
|
|
1996
|
-
|
|
2038
|
+
useEffect5(() => {
|
|
1997
2039
|
if (apiAuthEntries.length > 0) {
|
|
1998
2040
|
if (apiAuthEntries.length > prevEntryCountRef.current) {
|
|
1999
2041
|
const sorted = [...apiAuthEntries].sort((a, b) => {
|
|
@@ -2022,7 +2064,7 @@ var AppAuthCard = ({
|
|
|
2022
2064
|
}
|
|
2023
2065
|
prevEntryCountRef.current = apiAuthEntries.length;
|
|
2024
2066
|
}, [apiAuthEntries, userHasSelected]);
|
|
2025
|
-
|
|
2067
|
+
useEffect5(() => {
|
|
2026
2068
|
if (wasPreValidatedPerAuth[selectedAuthId] === void 0) {
|
|
2027
2069
|
const currentAuth = apiAuthEntries.find(
|
|
2028
2070
|
(auth2) => (auth2.id || auth2.label || "") === selectedAuthId
|
|
@@ -2044,7 +2086,7 @@ var AppAuthCard = ({
|
|
|
2044
2086
|
};
|
|
2045
2087
|
const localTestMessages = testMessagesPerAuth[selectedAuthId] || {};
|
|
2046
2088
|
const wasPreValidated = wasPreValidatedPerAuth[selectedAuthId] || false;
|
|
2047
|
-
|
|
2089
|
+
useEffect5(() => {
|
|
2048
2090
|
if (!testingAuthId) return;
|
|
2049
2091
|
if (authState.status === "testing") {
|
|
2050
2092
|
setTestStatusForAuth(testingAuthId, "testing");
|
|
@@ -2105,12 +2147,12 @@ var AppAuthCard = ({
|
|
|
2105
2147
|
const [saveSuccess, setSaveSuccess] = useState5(null);
|
|
2106
2148
|
const [error, setError] = useState5(null);
|
|
2107
2149
|
const [appConfig, setAppConfig] = useState5(null);
|
|
2108
|
-
|
|
2150
|
+
useEffect5(() => {
|
|
2109
2151
|
if (isExpanded && onRefreshAuth) {
|
|
2110
2152
|
onRefreshAuth();
|
|
2111
2153
|
}
|
|
2112
2154
|
}, [isExpanded]);
|
|
2113
|
-
|
|
2155
|
+
useEffect5(() => {
|
|
2114
2156
|
const fetchAppConfig = async () => {
|
|
2115
2157
|
if (!isExpanded || appConfig) return;
|
|
2116
2158
|
setLoading(true);
|
|
@@ -2144,12 +2186,12 @@ var AppAuthCard = ({
|
|
|
2144
2186
|
const auth = appConfig?.authentication;
|
|
2145
2187
|
const isOAuth2 = isOAuth2Type(auth?.type);
|
|
2146
2188
|
const [selectedScopes, setSelectedScopes] = useState5([]);
|
|
2147
|
-
|
|
2189
|
+
useEffect5(() => {
|
|
2148
2190
|
if (auth?.scope) {
|
|
2149
2191
|
setSelectedScopes(auth.scope);
|
|
2150
2192
|
}
|
|
2151
2193
|
}, [auth?.scope]);
|
|
2152
|
-
|
|
2194
|
+
useEffect5(() => {
|
|
2153
2195
|
if (disableUrlPrefill) return;
|
|
2154
2196
|
if (!auth?.parameters || auth.parameters.length === 0) return;
|
|
2155
2197
|
const urlDefaults = {};
|
|
@@ -2166,7 +2208,7 @@ var AppAuthCard = ({
|
|
|
2166
2208
|
setLocalCredentials((prev) => ({ ...urlDefaults, ...prev }));
|
|
2167
2209
|
}
|
|
2168
2210
|
}, [auth?.parameters, disableUrlPrefill]);
|
|
2169
|
-
|
|
2211
|
+
useEffect5(() => {
|
|
2170
2212
|
const incoming = authState.credentials || {};
|
|
2171
2213
|
setLocalCredentials((prev) => {
|
|
2172
2214
|
let changed = false;
|
|
@@ -2256,10 +2298,10 @@ var AppAuthCard = ({
|
|
|
2256
2298
|
if (!auth || !isOAuth2) return null;
|
|
2257
2299
|
const availableScopes = auth.scope || [];
|
|
2258
2300
|
const hasManualCredentials = !!localCredentials["client_id"]?.trim() && !!localCredentials["client_secret"]?.trim();
|
|
2259
|
-
return /* @__PURE__ */
|
|
2260
|
-
/* @__PURE__ */
|
|
2261
|
-
/* @__PURE__ */ jsx6(Collapse, { in: !hasManualCredentials, children: /* @__PURE__ */
|
|
2262
|
-
/* @__PURE__ */
|
|
2301
|
+
return /* @__PURE__ */ jsxs4(Box3, { sx: { display: "flex", flexDirection: "column", gap: 3 }, children: [
|
|
2302
|
+
/* @__PURE__ */ jsxs4(Fragment2, { children: [
|
|
2303
|
+
/* @__PURE__ */ jsx6(Collapse, { in: !hasManualCredentials, children: /* @__PURE__ */ jsxs4(Box3, { sx: { display: "flex", flexDirection: "column", gap: 3 }, children: [
|
|
2304
|
+
/* @__PURE__ */ jsxs4(
|
|
2263
2305
|
Button2,
|
|
2264
2306
|
{
|
|
2265
2307
|
variant: "outlined",
|
|
@@ -2325,7 +2367,7 @@ var AppAuthCard = ({
|
|
|
2325
2367
|
]
|
|
2326
2368
|
}
|
|
2327
2369
|
),
|
|
2328
|
-
/* @__PURE__ */
|
|
2370
|
+
/* @__PURE__ */ jsxs4(Box3, { sx: { display: "flex", alignItems: "center", gap: 2 }, children: [
|
|
2329
2371
|
/* @__PURE__ */ jsx6(Divider, { sx: { flex: 1, borderColor: "hsl(var(--border))" } }),
|
|
2330
2372
|
/* @__PURE__ */ jsx6(Typography3, { sx: { color: "hsl(var(--muted-foreground))", fontSize: "0.875rem" }, children: "OR configure manually" }),
|
|
2331
2373
|
/* @__PURE__ */ jsx6(Divider, { sx: { flex: 1, borderColor: "hsl(var(--border))" } })
|
|
@@ -2353,8 +2395,8 @@ var AppAuthCard = ({
|
|
|
2353
2395
|
}
|
|
2354
2396
|
)
|
|
2355
2397
|
] }),
|
|
2356
|
-
/* @__PURE__ */
|
|
2357
|
-
/* @__PURE__ */
|
|
2398
|
+
/* @__PURE__ */ jsxs4(Box3, { sx: { display: "flex", flexDirection: "column", gap: 2 }, children: [
|
|
2399
|
+
/* @__PURE__ */ jsxs4(Typography3, { variant: "body2", sx: { color: "hsl(var(--muted-foreground))" }, children: [
|
|
2358
2400
|
"Redirect URL: ",
|
|
2359
2401
|
/* @__PURE__ */ jsx6(Typography3, { component: "span", sx: { color: "hsl(var(--primary))", fontWeight: 600 }, children: auth.redirect_uri || "https://shuffler.io/set_authentication" })
|
|
2360
2402
|
] }),
|
|
@@ -2437,7 +2479,7 @@ var AppAuthCard = ({
|
|
|
2437
2479
|
}
|
|
2438
2480
|
}
|
|
2439
2481
|
},
|
|
2440
|
-
children: availableScopes.map((scope) => /* @__PURE__ */
|
|
2482
|
+
children: availableScopes.map((scope) => /* @__PURE__ */ jsxs4(MenuItem, { value: scope, sx: { color: "hsl(var(--foreground))" }, children: [
|
|
2441
2483
|
/* @__PURE__ */ jsx6(
|
|
2442
2484
|
Checkbox,
|
|
2443
2485
|
{
|
|
@@ -2466,7 +2508,7 @@ var AppAuthCard = ({
|
|
|
2466
2508
|
return /* @__PURE__ */ jsx6(
|
|
2467
2509
|
TextField,
|
|
2468
2510
|
{
|
|
2469
|
-
label: /* @__PURE__ */
|
|
2511
|
+
label: /* @__PURE__ */ jsxs4(Box3, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
2470
2512
|
param.name,
|
|
2471
2513
|
param.required && /* @__PURE__ */ jsx6(Typography3, { component: "span", sx: { color: "hsl(var(--destructive))", fontSize: "0.8rem" }, children: "*" })
|
|
2472
2514
|
] }),
|
|
@@ -2577,14 +2619,14 @@ var AppAuthCard = ({
|
|
|
2577
2619
|
[key]: error2 || ""
|
|
2578
2620
|
}));
|
|
2579
2621
|
};
|
|
2580
|
-
return /* @__PURE__ */
|
|
2581
|
-
/* @__PURE__ */
|
|
2622
|
+
return /* @__PURE__ */ jsxs4(motion2.div, { variants: itemVariants, style: { width: "100%", maxWidth: "100%" }, children: [
|
|
2623
|
+
/* @__PURE__ */ jsxs4(
|
|
2582
2624
|
Card,
|
|
2583
2625
|
{
|
|
2584
2626
|
sx: {
|
|
2585
2627
|
background: "transparent",
|
|
2586
|
-
border: borderless ? "none" : "
|
|
2587
|
-
borderColor: borderless ? "transparent" : isTested ? "hsl(var(--severity-low) / 0.
|
|
2628
|
+
border: borderless ? "none" : "2px solid",
|
|
2629
|
+
borderColor: borderless ? "transparent" : isTested ? "hsl(var(--severity-low) / 0.9)" : authState.status === "error" ? "hsl(var(--destructive) / 0.7)" : "hsl(var(--border))",
|
|
2588
2630
|
borderRadius: borderless ? 0 : 3,
|
|
2589
2631
|
boxShadow: "none",
|
|
2590
2632
|
overflow: "hidden",
|
|
@@ -2593,7 +2635,7 @@ var AppAuthCard = ({
|
|
|
2593
2635
|
maxWidth: "100%"
|
|
2594
2636
|
},
|
|
2595
2637
|
children: [
|
|
2596
|
-
!hideHeader && /* @__PURE__ */
|
|
2638
|
+
!hideHeader && /* @__PURE__ */ jsxs4(
|
|
2597
2639
|
CardContent,
|
|
2598
2640
|
{
|
|
2599
2641
|
onClick: onToggle,
|
|
@@ -2608,7 +2650,7 @@ var AppAuthCard = ({
|
|
|
2608
2650
|
"&:hover": { backgroundColor: "hsl(var(--muted) / 0.35)" }
|
|
2609
2651
|
},
|
|
2610
2652
|
children: [
|
|
2611
|
-
/* @__PURE__ */
|
|
2653
|
+
/* @__PURE__ */ jsxs4(Box3, { sx: { display: "flex", alignItems: "center", gap: 2, flex: 1, minWidth: 0 }, children: [
|
|
2612
2654
|
/* @__PURE__ */ jsx6(
|
|
2613
2655
|
Box3,
|
|
2614
2656
|
{
|
|
@@ -2634,7 +2676,7 @@ var AppAuthCard = ({
|
|
|
2634
2676
|
)
|
|
2635
2677
|
}
|
|
2636
2678
|
),
|
|
2637
|
-
/* @__PURE__ */
|
|
2679
|
+
/* @__PURE__ */ jsxs4(Box3, { sx: { minWidth: 0, flex: 1 }, children: [
|
|
2638
2680
|
/* @__PURE__ */ jsx6(
|
|
2639
2681
|
Typography3,
|
|
2640
2682
|
{
|
|
@@ -2666,7 +2708,7 @@ var AppAuthCard = ({
|
|
|
2666
2708
|
)
|
|
2667
2709
|
] })
|
|
2668
2710
|
] }),
|
|
2669
|
-
/* @__PURE__ */
|
|
2711
|
+
/* @__PURE__ */ jsxs4(Box3, { sx: {
|
|
2670
2712
|
display: "flex",
|
|
2671
2713
|
alignItems: "center",
|
|
2672
2714
|
gap: { xs: 1, sm: 1.5 },
|
|
@@ -2687,7 +2729,7 @@ var AppAuthCard = ({
|
|
|
2687
2729
|
height: { xs: 22, sm: 24 }
|
|
2688
2730
|
}
|
|
2689
2731
|
}
|
|
2690
|
-
) : /* @__PURE__ */
|
|
2732
|
+
) : /* @__PURE__ */ jsxs4(Fragment2, { children: [
|
|
2691
2733
|
/* @__PURE__ */ jsx6(
|
|
2692
2734
|
Chip2,
|
|
2693
2735
|
{
|
|
@@ -2760,7 +2802,7 @@ var AppAuthCard = ({
|
|
|
2760
2802
|
]
|
|
2761
2803
|
}
|
|
2762
2804
|
),
|
|
2763
|
-
/* @__PURE__ */ jsx6(Collapse, { in: isExpanded, children: /* @__PURE__ */
|
|
2805
|
+
/* @__PURE__ */ jsx6(Collapse, { in: isExpanded, children: /* @__PURE__ */ jsxs4(
|
|
2764
2806
|
Box3,
|
|
2765
2807
|
{
|
|
2766
2808
|
sx: {
|
|
@@ -2770,9 +2812,9 @@ var AppAuthCard = ({
|
|
|
2770
2812
|
borderTop: borderless ? "none" : "1px solid hsl(var(--border))"
|
|
2771
2813
|
},
|
|
2772
2814
|
children: [
|
|
2773
|
-
apiAuthEntries.length > 0 && /* @__PURE__ */
|
|
2815
|
+
apiAuthEntries.length > 0 && /* @__PURE__ */ jsxs4(Box3, { sx: { mb: 3 }, children: [
|
|
2774
2816
|
/* @__PURE__ */ jsx6(Typography3, { variant: "body2", sx: { color: "hsl(var(--muted-foreground))", mb: 1 }, children: "Select authentication" }),
|
|
2775
|
-
/* @__PURE__ */ jsx6(FormControl, { fullWidth: true, size: "small", children: /* @__PURE__ */
|
|
2817
|
+
/* @__PURE__ */ jsx6(FormControl, { fullWidth: true, size: "small", children: /* @__PURE__ */ jsxs4(
|
|
2776
2818
|
Select,
|
|
2777
2819
|
{
|
|
2778
2820
|
value: selectedAuthId,
|
|
@@ -2824,8 +2866,8 @@ var AppAuthCard = ({
|
|
|
2824
2866
|
};
|
|
2825
2867
|
const configuredDate = authEntry.created || authEntry.edited;
|
|
2826
2868
|
const lastValidDate = authEntry.validation?.last_valid;
|
|
2827
|
-
return /* @__PURE__ */ jsx6(MenuItem, { value: entryId, sx: { color: "hsl(var(--foreground))", py: 1 }, children: /* @__PURE__ */
|
|
2828
|
-
/* @__PURE__ */
|
|
2869
|
+
return /* @__PURE__ */ jsx6(MenuItem, { value: entryId, sx: { color: "hsl(var(--foreground))", py: 1 }, children: /* @__PURE__ */ jsxs4(Box3, { sx: { display: "flex", alignItems: "center", gap: 1, width: "100%", minWidth: 0 }, children: [
|
|
2870
|
+
/* @__PURE__ */ jsxs4(Box3, { sx: { display: "flex", gap: 0.5, flexShrink: 0 }, children: [
|
|
2829
2871
|
/* @__PURE__ */ jsx6(
|
|
2830
2872
|
Tooltip2,
|
|
2831
2873
|
{
|
|
@@ -2919,7 +2961,7 @@ var AppAuthCard = ({
|
|
|
2919
2961
|
]
|
|
2920
2962
|
}
|
|
2921
2963
|
) }),
|
|
2922
|
-
/* @__PURE__ */
|
|
2964
|
+
/* @__PURE__ */ jsxs4(
|
|
2923
2965
|
Dialog,
|
|
2924
2966
|
{
|
|
2925
2967
|
open: !!deleteConfirmAuthId,
|
|
@@ -2937,9 +2979,9 @@ var AppAuthCard = ({
|
|
|
2937
2979
|
},
|
|
2938
2980
|
children: [
|
|
2939
2981
|
/* @__PURE__ */ jsx6(DialogTitle, { sx: { color: "hsl(var(--foreground))", fontWeight: 600, pb: 1 }, children: "Delete Authentication" }),
|
|
2940
|
-
/* @__PURE__ */
|
|
2982
|
+
/* @__PURE__ */ jsxs4(DialogContent, { children: [
|
|
2941
2983
|
/* @__PURE__ */ jsx6(Typography3, { sx: { color: "hsl(var(--muted-foreground))", mb: 3 }, children: "Are you sure you want to delete this authentication? This action cannot be undone." }),
|
|
2942
|
-
/* @__PURE__ */
|
|
2984
|
+
/* @__PURE__ */ jsxs4(Box3, { sx: { display: "flex", justifyContent: "flex-end", gap: 1.5 }, children: [
|
|
2943
2985
|
/* @__PURE__ */ jsx6(
|
|
2944
2986
|
Button2,
|
|
2945
2987
|
{
|
|
@@ -2987,7 +3029,7 @@ var AppAuthCard = ({
|
|
|
2987
3029
|
]
|
|
2988
3030
|
}
|
|
2989
3031
|
),
|
|
2990
|
-
!showAddNewForm && selectedAuth && /* @__PURE__ */
|
|
3032
|
+
!showAddNewForm && selectedAuth && /* @__PURE__ */ jsxs4(Box3, { sx: {
|
|
2991
3033
|
mt: 2,
|
|
2992
3034
|
p: 0,
|
|
2993
3035
|
backgroundColor: "hsl(var(--muted))",
|
|
@@ -2995,7 +3037,7 @@ var AppAuthCard = ({
|
|
|
2995
3037
|
border: "1px solid hsl(var(--border))",
|
|
2996
3038
|
overflow: "hidden"
|
|
2997
3039
|
}, children: [
|
|
2998
|
-
/* @__PURE__ */
|
|
3040
|
+
/* @__PURE__ */ jsxs4(Box3, { sx: {
|
|
2999
3041
|
display: "flex",
|
|
3000
3042
|
alignItems: "center",
|
|
3001
3043
|
gap: 1.5,
|
|
@@ -3019,14 +3061,14 @@ var AppAuthCard = ({
|
|
|
3019
3061
|
letterSpacing: "0.05em"
|
|
3020
3062
|
}, children: localTestStatus === "success" ? "Verified Authentication" : localTestStatus === "pending_validation" ? "Awaiting Backend Validation" : localTestStatus === "error" ? "Test Failed" : "Pending Verification" })
|
|
3021
3063
|
] }),
|
|
3022
|
-
/* @__PURE__ */
|
|
3064
|
+
/* @__PURE__ */ jsxs4(Box3, { sx: {
|
|
3023
3065
|
display: "flex",
|
|
3024
3066
|
flexDirection: "column",
|
|
3025
3067
|
alignItems: "stretch",
|
|
3026
3068
|
gap: 2,
|
|
3027
3069
|
p: { xs: 2, sm: 2.5 }
|
|
3028
3070
|
}, children: [
|
|
3029
|
-
/* @__PURE__ */
|
|
3071
|
+
/* @__PURE__ */ jsxs4(Box3, { sx: {
|
|
3030
3072
|
display: "flex",
|
|
3031
3073
|
alignItems: "center",
|
|
3032
3074
|
gap: 1.5,
|
|
@@ -3044,8 +3086,8 @@ var AppAuthCard = ({
|
|
|
3044
3086
|
border: `1px solid ${localTestStatus === "success" ? "hsl(var(--severity-low) / 0.2)" : localTestStatus === "pending_validation" ? "hsl(var(--severity-medium) / 0.2)" : localTestStatus === "error" ? "hsl(var(--destructive) / 0.2)" : isTested ? "hsl(var(--severity-low) / 0.2)" : isConfigured ? "hsl(var(--severity-medium) / 0.2)" : "hsl(var(--muted-foreground) / 0.2)"}`,
|
|
3045
3087
|
flexShrink: 0
|
|
3046
3088
|
}, children: /* @__PURE__ */ jsx6(CheckCircleIcon2, { size: 20 }) }),
|
|
3047
|
-
/* @__PURE__ */
|
|
3048
|
-
/* @__PURE__ */ jsx6(Box3, { sx: { display: "flex", alignItems: "center", gap: 0.5 }, children: editingLabel ? /* @__PURE__ */
|
|
3089
|
+
/* @__PURE__ */ jsxs4(Box3, { sx: { minWidth: 0, flex: 1 }, children: [
|
|
3090
|
+
/* @__PURE__ */ jsx6(Box3, { sx: { display: "flex", alignItems: "center", gap: 0.5 }, children: editingLabel ? /* @__PURE__ */ jsxs4(Box3, { sx: { display: "flex", alignItems: "center", gap: 0.5 }, onClick: (e) => e.stopPropagation(), children: [
|
|
3049
3091
|
/* @__PURE__ */ jsx6(
|
|
3050
3092
|
TextField,
|
|
3051
3093
|
{
|
|
@@ -3106,7 +3148,7 @@ var AppAuthCard = ({
|
|
|
3106
3148
|
children: "Cancel"
|
|
3107
3149
|
}
|
|
3108
3150
|
)
|
|
3109
|
-
] }) : /* @__PURE__ */
|
|
3151
|
+
] }) : /* @__PURE__ */ jsxs4(Fragment2, { children: [
|
|
3110
3152
|
/* @__PURE__ */ jsx6(Typography3, { sx: {
|
|
3111
3153
|
color: "hsl(var(--foreground))",
|
|
3112
3154
|
fontWeight: 600,
|
|
@@ -3200,7 +3242,7 @@ var AppAuthCard = ({
|
|
|
3200
3242
|
borderRadius: 2,
|
|
3201
3243
|
"& .MuiAlert-icon": { color: "hsl(var(--destructive))" }
|
|
3202
3244
|
},
|
|
3203
|
-
children: /* @__PURE__ */
|
|
3245
|
+
children: /* @__PURE__ */ jsxs4(Box3, { sx: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: 2, width: "100%" }, children: [
|
|
3204
3246
|
/* @__PURE__ */ jsx6(Typography3, { sx: { fontSize: "0.875rem", flex: 1 }, children: localTestMessages.errorMessage }),
|
|
3205
3247
|
localTestMessages.workflowId && localTestMessages.executionId && /* @__PURE__ */ jsx6(
|
|
3206
3248
|
Button2,
|
|
@@ -3245,7 +3287,7 @@ var AppAuthCard = ({
|
|
|
3245
3287
|
color: localTestMessages.warningMessage ? "hsl(var(--severity-medium))" : "hsl(var(--severity-low))"
|
|
3246
3288
|
}
|
|
3247
3289
|
},
|
|
3248
|
-
children: localTestMessages.warningMessage ? /* @__PURE__ */
|
|
3290
|
+
children: localTestMessages.warningMessage ? /* @__PURE__ */ jsxs4(Box3, { children: [
|
|
3249
3291
|
/* @__PURE__ */ jsx6(Typography3, { sx: { fontWeight: 600, mb: 0.5 }, children: localTestMessages.successMessage || "Connection probably working" }),
|
|
3250
3292
|
/* @__PURE__ */ jsx6(Typography3, { sx: { fontSize: "0.85rem", opacity: 0.9 }, children: localTestMessages.warningMessage })
|
|
3251
3293
|
] }) : localTestMessages.successMessage || "Connection verified successfully"
|
|
@@ -3265,7 +3307,7 @@ var AppAuthCard = ({
|
|
|
3265
3307
|
borderRadius: 2,
|
|
3266
3308
|
"& .MuiAlert-icon": { color: "hsl(var(--severity-medium))" }
|
|
3267
3309
|
},
|
|
3268
|
-
children: /* @__PURE__ */
|
|
3310
|
+
children: /* @__PURE__ */ jsxs4(Box3, { children: [
|
|
3269
3311
|
/* @__PURE__ */ jsx6(Typography3, { sx: { fontWeight: 600, mb: 0.5 }, children: "Test passed (Status 200), but not marked as validated" }),
|
|
3270
3312
|
/* @__PURE__ */ jsx6(Typography3, { sx: { fontSize: "0.85rem", opacity: 0.9, mb: 1 }, children: "The API returned success, but Shuffle hasn't confirmed the validation yet. This could mean credentials are correct but the app needs additional setup." }),
|
|
3271
3313
|
/* @__PURE__ */ jsx6(
|
|
@@ -3288,7 +3330,7 @@ var AppAuthCard = ({
|
|
|
3288
3330
|
) })
|
|
3289
3331
|
] })
|
|
3290
3332
|
] }),
|
|
3291
|
-
(apiAuthEntries.length === 0 || showAddNewForm) && /* @__PURE__ */
|
|
3333
|
+
(apiAuthEntries.length === 0 || showAddNewForm) && /* @__PURE__ */ jsxs4(Box3, { sx: {
|
|
3292
3334
|
p: 3,
|
|
3293
3335
|
backgroundColor: "hsl(var(--background) / 0.4)",
|
|
3294
3336
|
borderRadius: 2,
|
|
@@ -3310,10 +3352,10 @@ var AppAuthCard = ({
|
|
|
3310
3352
|
}
|
|
3311
3353
|
),
|
|
3312
3354
|
/* @__PURE__ */ jsx6(Typography3, { variant: "subtitle2", sx: { color: "hsl(var(--foreground))", fontWeight: 600, mb: 2 }, children: apiAuthEntries.length === 0 ? "Configure Authentication" : "Add New Authentication" }),
|
|
3313
|
-
loading ? /* @__PURE__ */
|
|
3355
|
+
loading ? /* @__PURE__ */ jsxs4(Box3, { sx: { display: "flex", alignItems: "center", justifyContent: "center", py: 4 }, children: [
|
|
3314
3356
|
/* @__PURE__ */ jsx6(CircularProgress2, { size: 32, sx: { color: "hsl(var(--primary))" } }),
|
|
3315
3357
|
/* @__PURE__ */ jsx6(Typography3, { sx: { ml: 2, color: "hsl(var(--muted-foreground))" }, children: "Loading configuration..." })
|
|
3316
|
-
] }) : saving || authState.status === "testing" ? /* @__PURE__ */
|
|
3358
|
+
] }) : saving || authState.status === "testing" ? /* @__PURE__ */ jsxs4(Box3, { sx: { display: "flex", alignItems: "center", justifyContent: "center", py: 4 }, children: [
|
|
3317
3359
|
/* @__PURE__ */ jsx6(CircularProgress2, { size: 32, sx: { color: "hsl(var(--primary))" } }),
|
|
3318
3360
|
/* @__PURE__ */ jsx6(Typography3, { sx: { ml: 2, color: "hsl(var(--muted-foreground))" }, children: saving ? "Saving authentication..." : "Testing connection..." })
|
|
3319
3361
|
] }) : error ? /* @__PURE__ */ jsx6(
|
|
@@ -3339,12 +3381,12 @@ var AppAuthCard = ({
|
|
|
3339
3381
|
borderRadius: 2,
|
|
3340
3382
|
"& .MuiAlert-icon": { color: "hsl(var(--severity-info))" }
|
|
3341
3383
|
},
|
|
3342
|
-
children: /* @__PURE__ */
|
|
3384
|
+
children: /* @__PURE__ */ jsxs4(Box3, { children: [
|
|
3343
3385
|
/* @__PURE__ */ jsx6(Typography3, { sx: { fontWeight: 600, mb: 0.5 }, children: "No authentication required" }),
|
|
3344
3386
|
/* @__PURE__ */ jsx6(Typography3, { sx: { fontSize: "0.85rem", opacity: 0.9 }, children: "This app works without credentials. You can use it directly." })
|
|
3345
3387
|
] })
|
|
3346
3388
|
}
|
|
3347
|
-
) : /* @__PURE__ */
|
|
3389
|
+
) : /* @__PURE__ */ jsxs4(Box3, { sx: { display: "flex", flexDirection: "column", gap: 3 }, children: [
|
|
3348
3390
|
renderOAuth2Fields(),
|
|
3349
3391
|
renderParameterFields(),
|
|
3350
3392
|
authState.status === "error" && authState.errorMessage && /* @__PURE__ */ jsx6(
|
|
@@ -3357,7 +3399,7 @@ var AppAuthCard = ({
|
|
|
3357
3399
|
border: "1px solid hsl(var(--destructive) / 0.3)",
|
|
3358
3400
|
borderRadius: 2
|
|
3359
3401
|
},
|
|
3360
|
-
children: /* @__PURE__ */
|
|
3402
|
+
children: /* @__PURE__ */ jsxs4(Box3, { sx: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: 2, width: "100%" }, children: [
|
|
3361
3403
|
/* @__PURE__ */ jsx6(Typography3, { sx: { fontSize: "0.875rem", flex: 1 }, children: authState.errorMessage }),
|
|
3362
3404
|
authState.workflowId && authState.executionId && /* @__PURE__ */ jsx6(
|
|
3363
3405
|
Button2,
|
|
@@ -3534,7 +3576,7 @@ var AppAuthCard = ({
|
|
|
3534
3576
|
]
|
|
3535
3577
|
}
|
|
3536
3578
|
),
|
|
3537
|
-
/* @__PURE__ */
|
|
3579
|
+
/* @__PURE__ */ jsxs4(
|
|
3538
3580
|
Dialog,
|
|
3539
3581
|
{
|
|
3540
3582
|
open: docsOpen,
|
|
@@ -3553,7 +3595,7 @@ var AppAuthCard = ({
|
|
|
3553
3595
|
}
|
|
3554
3596
|
},
|
|
3555
3597
|
children: [
|
|
3556
|
-
/* @__PURE__ */
|
|
3598
|
+
/* @__PURE__ */ jsxs4(
|
|
3557
3599
|
DialogTitle,
|
|
3558
3600
|
{
|
|
3559
3601
|
sx: {
|
|
@@ -3564,7 +3606,7 @@ var AppAuthCard = ({
|
|
|
3564
3606
|
color: "hsl(var(--foreground))"
|
|
3565
3607
|
},
|
|
3566
3608
|
children: [
|
|
3567
|
-
/* @__PURE__ */
|
|
3609
|
+
/* @__PURE__ */ jsxs4(Box3, { sx: { display: "flex", alignItems: "center", gap: 2 }, children: [
|
|
3568
3610
|
app.image_url && /* @__PURE__ */ jsx6(
|
|
3569
3611
|
Box3,
|
|
3570
3612
|
{
|
|
@@ -3574,7 +3616,7 @@ var AppAuthCard = ({
|
|
|
3574
3616
|
sx: { width: 32, height: 32, borderRadius: 1, objectFit: "contain" }
|
|
3575
3617
|
}
|
|
3576
3618
|
),
|
|
3577
|
-
/* @__PURE__ */
|
|
3619
|
+
/* @__PURE__ */ jsxs4(Typography3, { variant: "h6", sx: { fontWeight: 600 }, children: [
|
|
3578
3620
|
app.name.replace(/_/g, " "),
|
|
3579
3621
|
" Documentation"
|
|
3580
3622
|
] })
|
|
@@ -3583,7 +3625,7 @@ var AppAuthCard = ({
|
|
|
3583
3625
|
]
|
|
3584
3626
|
}
|
|
3585
3627
|
),
|
|
3586
|
-
/* @__PURE__ */ jsx6(DialogContent, { sx: { pt: 3 }, children: docsLoading ? /* @__PURE__ */
|
|
3628
|
+
/* @__PURE__ */ jsx6(DialogContent, { sx: { pt: 3 }, children: docsLoading ? /* @__PURE__ */ jsxs4(Box3, { sx: { display: "flex", alignItems: "center", justifyContent: "center", py: 6 }, children: [
|
|
3587
3629
|
/* @__PURE__ */ jsx6(CircularProgress2, { size: 32, sx: { color: "hsl(var(--primary))" } }),
|
|
3588
3630
|
/* @__PURE__ */ jsx6(Typography3, { sx: { ml: 2, color: "hsl(var(--muted-foreground))" }, children: "Loading documentation..." })
|
|
3589
3631
|
] }) : /* @__PURE__ */ jsx6(
|
|
@@ -3626,8 +3668,14 @@ var AppAuthConfig = ({
|
|
|
3626
3668
|
onTestConnection,
|
|
3627
3669
|
onSaveAuth,
|
|
3628
3670
|
onSelectAuth,
|
|
3629
|
-
onRefreshAuth
|
|
3671
|
+
onRefreshAuth,
|
|
3672
|
+
globalUrl,
|
|
3673
|
+
userdata,
|
|
3674
|
+
isLoaded,
|
|
3675
|
+
isLoggedIn,
|
|
3676
|
+
serverside
|
|
3630
3677
|
}) => {
|
|
3678
|
+
useSyncHostBaseUrl(globalUrl);
|
|
3631
3679
|
const getApiAuthEntries = (app) => {
|
|
3632
3680
|
const normalize = (n) => n.toLowerCase().replace(/[\s_\-]+/g, "_");
|
|
3633
3681
|
return authenticatedApps.filter((auth) => normalize(auth.app?.name || "") === normalize(app.name)).map((auth) => ({
|
|
@@ -3688,7 +3736,7 @@ var AppAuthConfig = ({
|
|
|
3688
3736
|
}
|
|
3689
3737
|
const validatedCount = sortedApps.filter((app) => isAppValidated(app)).length;
|
|
3690
3738
|
const totalCount = sortedApps.length;
|
|
3691
|
-
return /* @__PURE__ */
|
|
3739
|
+
return /* @__PURE__ */ jsxs4(Box3, { sx: { width: "100%", maxWidth: "100%", overflow: "hidden" }, children: [
|
|
3692
3740
|
/* @__PURE__ */ jsx6(
|
|
3693
3741
|
Typography3,
|
|
3694
3742
|
{
|
|
@@ -3730,6 +3778,11 @@ var AppAuthConfig = ({
|
|
|
3730
3778
|
return /* @__PURE__ */ jsx6(
|
|
3731
3779
|
AppAuthCard,
|
|
3732
3780
|
{
|
|
3781
|
+
globalUrl,
|
|
3782
|
+
userdata,
|
|
3783
|
+
isLoaded,
|
|
3784
|
+
isLoggedIn,
|
|
3785
|
+
serverside,
|
|
3733
3786
|
app,
|
|
3734
3787
|
authState,
|
|
3735
3788
|
isExpanded,
|
|
@@ -3748,7 +3801,7 @@ var AppAuthConfig = ({
|
|
|
3748
3801
|
};
|
|
3749
3802
|
|
|
3750
3803
|
// components/AppAuthSection.tsx
|
|
3751
|
-
import { jsx as jsx7, jsxs as
|
|
3804
|
+
import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
3752
3805
|
function AppAuthSection({
|
|
3753
3806
|
displayName,
|
|
3754
3807
|
algoliaApp,
|
|
@@ -3764,7 +3817,7 @@ function AppAuthSection({
|
|
|
3764
3817
|
onSaveAuth,
|
|
3765
3818
|
onRefreshAuth
|
|
3766
3819
|
}) {
|
|
3767
|
-
return /* @__PURE__ */ jsx7(motion3.div, { initial: { opacity: 0, y: 12 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.3, delay: 0.1 }, children: /* @__PURE__ */
|
|
3820
|
+
return /* @__PURE__ */ jsx7(motion3.div, { initial: { opacity: 0, y: 12 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.3, delay: 0.1 }, children: /* @__PURE__ */ jsxs5(Box4, { sx: { mb: 3 }, children: [
|
|
3768
3821
|
/* @__PURE__ */ jsx7(Typography4, { sx: { color: "hsl(var(--foreground))", fontWeight: 600, fontSize: "0.95rem", mb: 0.5 }, children: "Authentication" }),
|
|
3769
3822
|
/* @__PURE__ */ jsx7(Typography4, { variant: "body2", sx: { color: "hsl(var(--muted-foreground))", mb: 1.5 }, children: isAuthenticated ? authCount > 0 ? `${authCount} configuration${authCount > 1 ? "s" : ""} found` : "No authentication configured yet" : `Connect your ${displayName} account` }),
|
|
3770
3823
|
isAuthenticated && algoliaApp && resolvedAlgoliaId && /* @__PURE__ */ jsx7(
|
|
@@ -3827,7 +3880,7 @@ var AgentIcon_default = AgentIcon;
|
|
|
3827
3880
|
import { motion as motion4, AnimatePresence } from "framer-motion";
|
|
3828
3881
|
import ReactMarkdown2 from "react-markdown";
|
|
3829
3882
|
import remarkGfm2 from "remark-gfm";
|
|
3830
|
-
import { jsx as jsx9, jsxs as
|
|
3883
|
+
import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
3831
3884
|
var CATEGORY_SUGGESTIONS = {
|
|
3832
3885
|
"threat": [
|
|
3833
3886
|
"Is 1.2.3.4 a known bad actor?",
|
|
@@ -4078,7 +4131,7 @@ ${JSON.stringify(data, null, 2)}
|
|
|
4078
4131
|
backgroundColor: "hsl(var(--background))",
|
|
4079
4132
|
overflow: "hidden"
|
|
4080
4133
|
},
|
|
4081
|
-
children: /* @__PURE__ */
|
|
4134
|
+
children: /* @__PURE__ */ jsxs6(AnimatePresence, { mode: "wait", children: [
|
|
4082
4135
|
runState === "idle" && /* @__PURE__ */ jsx9(
|
|
4083
4136
|
motion4.div,
|
|
4084
4137
|
{
|
|
@@ -4086,8 +4139,8 @@ ${JSON.stringify(data, null, 2)}
|
|
|
4086
4139
|
animate: { opacity: 1 },
|
|
4087
4140
|
exit: { opacity: 0 },
|
|
4088
4141
|
transition: { duration: 0.15 },
|
|
4089
|
-
children: /* @__PURE__ */
|
|
4090
|
-
/* @__PURE__ */
|
|
4142
|
+
children: /* @__PURE__ */ jsxs6(Box5, { sx: { p: 3, display: "flex", flexDirection: "column", gap: 2.5 }, children: [
|
|
4143
|
+
/* @__PURE__ */ jsxs6(Box5, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
4091
4144
|
/* @__PURE__ */ jsx9(
|
|
4092
4145
|
Box5,
|
|
4093
4146
|
{
|
|
@@ -4144,7 +4197,7 @@ ${JSON.stringify(data, null, 2)}
|
|
|
4144
4197
|
}
|
|
4145
4198
|
)
|
|
4146
4199
|
] }),
|
|
4147
|
-
/* @__PURE__ */
|
|
4200
|
+
/* @__PURE__ */ jsxs6(
|
|
4148
4201
|
Box5,
|
|
4149
4202
|
{
|
|
4150
4203
|
sx: {
|
|
@@ -4252,11 +4305,11 @@ ${JSON.stringify(data, null, 2)}
|
|
|
4252
4305
|
animate: { opacity: 1 },
|
|
4253
4306
|
exit: { opacity: 0 },
|
|
4254
4307
|
transition: { duration: 0.15 },
|
|
4255
|
-
children: /* @__PURE__ */
|
|
4308
|
+
children: /* @__PURE__ */ jsxs6(Box5, { sx: { p: 3, display: "flex", alignItems: "center", gap: 2 }, children: [
|
|
4256
4309
|
/* @__PURE__ */ jsx9(CircularProgress3, { size: 20, thickness: 5, sx: { color: "hsl(var(--primary))" } }),
|
|
4257
|
-
/* @__PURE__ */
|
|
4310
|
+
/* @__PURE__ */ jsxs6(Box5, { sx: { flex: 1, minWidth: 0 }, children: [
|
|
4258
4311
|
/* @__PURE__ */ jsx9(Typography5, { sx: { fontSize: "0.78rem", fontWeight: 600, color: "hsl(var(--foreground))" }, children: "Executing\u2026" }),
|
|
4259
|
-
/* @__PURE__ */
|
|
4312
|
+
/* @__PURE__ */ jsxs6(
|
|
4260
4313
|
Typography5,
|
|
4261
4314
|
{
|
|
4262
4315
|
sx: {
|
|
@@ -4285,9 +4338,9 @@ ${JSON.stringify(data, null, 2)}
|
|
|
4285
4338
|
animate: { opacity: 1, y: 0 },
|
|
4286
4339
|
exit: { opacity: 0 },
|
|
4287
4340
|
transition: { duration: 0.2 },
|
|
4288
|
-
children: /* @__PURE__ */
|
|
4289
|
-
/* @__PURE__ */
|
|
4290
|
-
/* @__PURE__ */
|
|
4341
|
+
children: /* @__PURE__ */ jsxs6(Box5, { sx: { p: 3, display: "flex", flexDirection: "column", gap: 2 }, children: [
|
|
4342
|
+
/* @__PURE__ */ jsxs6(Box5, { sx: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
|
|
4343
|
+
/* @__PURE__ */ jsxs6(Box5, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
4291
4344
|
isError ? /* @__PURE__ */ jsx9(ErrorOutlineIcon2, { size: 18, color: "hsl(0 70% 55%)" }) : /* @__PURE__ */ jsx9(CheckCircleOutlineIcon, { size: 18, color: "hsl(145 60% 45%)" }),
|
|
4292
4345
|
/* @__PURE__ */ jsx9(Typography5, { sx: { fontSize: "0.78rem", fontWeight: 600, color: "hsl(var(--foreground))" }, children: isError ? "Failed" : "Completed" })
|
|
4293
4346
|
] }),
|
|
@@ -4315,7 +4368,7 @@ ${JSON.stringify(data, null, 2)}
|
|
|
4315
4368
|
}
|
|
4316
4369
|
)
|
|
4317
4370
|
] }),
|
|
4318
|
-
/* @__PURE__ */
|
|
4371
|
+
/* @__PURE__ */ jsxs6(
|
|
4319
4372
|
Typography5,
|
|
4320
4373
|
{
|
|
4321
4374
|
sx: {
|
|
@@ -4398,9 +4451,9 @@ ${JSON.stringify(data, null, 2)}
|
|
|
4398
4451
|
var AppMcpChat_default = AppMcpChat;
|
|
4399
4452
|
|
|
4400
4453
|
// views/TryMcpSection.tsx
|
|
4401
|
-
import { jsx as jsx10, jsxs as
|
|
4454
|
+
import { jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
4402
4455
|
function TryMcpSection({ appName, appIcon, appId, categories }) {
|
|
4403
|
-
return /* @__PURE__ */ jsx10(motion5.div, { initial: { opacity: 0, y: 12 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.3, delay: 0.15 }, children: /* @__PURE__ */
|
|
4456
|
+
return /* @__PURE__ */ jsx10(motion5.div, { initial: { opacity: 0, y: 12 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.3, delay: 0.15 }, children: /* @__PURE__ */ jsxs7(Box6, { sx: { mt: 5, mb: 3 }, children: [
|
|
4404
4457
|
/* @__PURE__ */ jsx10(Typography6, { sx: { color: "hsl(var(--foreground))", fontWeight: 600, fontSize: "0.95rem", mb: 1.5 }, children: "Try MCP" }),
|
|
4405
4458
|
/* @__PURE__ */ jsx10(
|
|
4406
4459
|
AppMcpChat_default,
|
|
@@ -4415,7 +4468,7 @@ function TryMcpSection({ appName, appIcon, appId, categories }) {
|
|
|
4415
4468
|
}
|
|
4416
4469
|
|
|
4417
4470
|
// components/SingulActionsPreview.tsx
|
|
4418
|
-
import { useState as useState7, useEffect as
|
|
4471
|
+
import { useState as useState7, useEffect as useEffect6, useMemo as useMemo2, useCallback as useCallback5, useRef as useRef4 } from "react";
|
|
4419
4472
|
import {
|
|
4420
4473
|
Box as Box7,
|
|
4421
4474
|
Typography as Typography7,
|
|
@@ -4438,7 +4491,7 @@ import {
|
|
|
4438
4491
|
import JsonView from "react18-json-view";
|
|
4439
4492
|
import "react18-json-view/src/style.css";
|
|
4440
4493
|
import "react18-json-view/src/dark.css";
|
|
4441
|
-
import { Fragment as Fragment3, jsx as jsx11, jsxs as
|
|
4494
|
+
import { Fragment as Fragment3, jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
4442
4495
|
import { createElement } from "react";
|
|
4443
4496
|
var deepParseJsonStrings = (obj, depth = 0) => {
|
|
4444
4497
|
if (depth > 5) return obj;
|
|
@@ -4718,7 +4771,7 @@ var SingulActionsPreview = ({
|
|
|
4718
4771
|
(action, l) => l === "python" ? buildSingulPython(appName, action, curlOpts) : buildSingulCurl(appName, action, curlOpts),
|
|
4719
4772
|
[appName, curlOpts]
|
|
4720
4773
|
);
|
|
4721
|
-
|
|
4774
|
+
useEffect6(() => {
|
|
4722
4775
|
const initial = sortedActions[0] || null;
|
|
4723
4776
|
setSelected(initial);
|
|
4724
4777
|
setSnippet(buildSnippet(initial, lang));
|
|
@@ -4808,8 +4861,8 @@ var SingulActionsPreview = ({
|
|
|
4808
4861
|
}
|
|
4809
4862
|
};
|
|
4810
4863
|
const lineCount = useMemo2(() => Math.max(snippet.split("\n").length, 1), [snippet]);
|
|
4811
|
-
return /* @__PURE__ */
|
|
4812
|
-
/* @__PURE__ */
|
|
4864
|
+
return /* @__PURE__ */ jsxs8(Box7, { sx: { mt: 5, mb: 3, opacity: isDisabled ? 0.55 : 1 }, children: [
|
|
4865
|
+
/* @__PURE__ */ jsxs8(Box7, { sx: { display: "flex", alignItems: "center", gap: 1, mb: 1.5 }, children: [
|
|
4813
4866
|
/* @__PURE__ */ jsx11(Typography7, { sx: { color: "hsl(var(--foreground))", fontWeight: 600, fontSize: "0.95rem" }, children: "Try individual actions" }),
|
|
4814
4867
|
/* @__PURE__ */ jsx11(
|
|
4815
4868
|
Chip4,
|
|
@@ -4820,7 +4873,7 @@ var SingulActionsPreview = ({
|
|
|
4820
4873
|
}
|
|
4821
4874
|
)
|
|
4822
4875
|
] }),
|
|
4823
|
-
/* @__PURE__ */
|
|
4876
|
+
/* @__PURE__ */ jsxs8(
|
|
4824
4877
|
Box7,
|
|
4825
4878
|
{
|
|
4826
4879
|
sx: {
|
|
@@ -4845,7 +4898,7 @@ var SingulActionsPreview = ({
|
|
|
4845
4898
|
}
|
|
4846
4899
|
},
|
|
4847
4900
|
children: [
|
|
4848
|
-
isDisabled ? /* @__PURE__ */ jsx11(Typography7, { sx: { fontSize: "0.75rem", color: "hsl(var(--muted-foreground))", fontStyle: "italic", textAlign: "center", py: 1 }, children: "No category detected for this app" }) : /* @__PURE__ */
|
|
4901
|
+
isDisabled ? /* @__PURE__ */ jsx11(Typography7, { sx: { fontSize: "0.75rem", color: "hsl(var(--muted-foreground))", fontStyle: "italic", textAlign: "center", py: 1 }, children: "No category detected for this app" }) : /* @__PURE__ */ jsxs8(Fragment3, { children: [
|
|
4849
4902
|
/* @__PURE__ */ jsx11(Box7, { sx: { display: "flex", gap: 1, mb: 1.5, alignItems: "center" }, children: /* @__PURE__ */ jsx11(
|
|
4850
4903
|
Autocomplete,
|
|
4851
4904
|
{
|
|
@@ -4857,7 +4910,7 @@ var SingulActionsPreview = ({
|
|
|
4857
4910
|
groupBy: (o) => o.category,
|
|
4858
4911
|
getOptionLabel: (o) => o?.label ?? "",
|
|
4859
4912
|
isOptionEqualToValue: (a, b) => a?.name === b?.name && a?.category === b?.category,
|
|
4860
|
-
renderOption: (props, option) => /* @__PURE__ */ createElement("li", { ...props, key: `${option.category}-${option.name}` }, /* @__PURE__ */
|
|
4913
|
+
renderOption: (props, option) => /* @__PURE__ */ createElement("li", { ...props, key: `${option.category}-${option.name}` }, /* @__PURE__ */ jsxs8(Box7, { sx: { display: "flex", flexDirection: "column" }, children: [
|
|
4861
4914
|
/* @__PURE__ */ jsx11(Typography7, { sx: { fontSize: "0.78rem", color: "hsl(var(--foreground))" }, children: option.label }),
|
|
4862
4915
|
/* @__PURE__ */ jsx11(Typography7, { sx: { fontFamily: "'JetBrains Mono', monospace", fontSize: "0.65rem", color: "hsl(var(--muted-foreground))" }, children: option.name })
|
|
4863
4916
|
] })),
|
|
@@ -4894,7 +4947,7 @@ var SingulActionsPreview = ({
|
|
|
4894
4947
|
renderInput: (params) => /* @__PURE__ */ jsx11(TextField2, { ...params, placeholder: "Select action" })
|
|
4895
4948
|
}
|
|
4896
4949
|
) }),
|
|
4897
|
-
/* @__PURE__ */
|
|
4950
|
+
/* @__PURE__ */ jsxs8(
|
|
4898
4951
|
Box7,
|
|
4899
4952
|
{
|
|
4900
4953
|
sx: {
|
|
@@ -4906,7 +4959,7 @@ var SingulActionsPreview = ({
|
|
|
4906
4959
|
boxShadow: "0 8px 24px -12px hsl(var(--primary) / 0.25)"
|
|
4907
4960
|
},
|
|
4908
4961
|
children: [
|
|
4909
|
-
/* @__PURE__ */
|
|
4962
|
+
/* @__PURE__ */ jsxs8(
|
|
4910
4963
|
Box7,
|
|
4911
4964
|
{
|
|
4912
4965
|
sx: {
|
|
@@ -5004,7 +5057,7 @@ var SingulActionsPreview = ({
|
|
|
5004
5057
|
]
|
|
5005
5058
|
}
|
|
5006
5059
|
),
|
|
5007
|
-
/* @__PURE__ */
|
|
5060
|
+
/* @__PURE__ */ jsxs8(Box7, { sx: { display: "flex", minHeight: 270 }, children: [
|
|
5008
5061
|
/* @__PURE__ */ jsx11(
|
|
5009
5062
|
Box7,
|
|
5010
5063
|
{
|
|
@@ -5026,7 +5079,7 @@ var SingulActionsPreview = ({
|
|
|
5026
5079
|
children: Array.from({ length: lineCount }, (_, i) => /* @__PURE__ */ jsx11("div", { children: i + 1 }, i))
|
|
5027
5080
|
}
|
|
5028
5081
|
),
|
|
5029
|
-
/* @__PURE__ */
|
|
5082
|
+
/* @__PURE__ */ jsxs8(Box7, { sx: { flex: 1, position: "relative", minHeight: 270 }, children: [
|
|
5030
5083
|
/* @__PURE__ */ jsx11(
|
|
5031
5084
|
Box7,
|
|
5032
5085
|
{
|
|
@@ -5107,8 +5160,8 @@ var SingulActionsPreview = ({
|
|
|
5107
5160
|
target.scrollIntoView({ behavior: "smooth", block: "start" });
|
|
5108
5161
|
}
|
|
5109
5162
|
};
|
|
5110
|
-
return /* @__PURE__ */
|
|
5111
|
-
needsAuth && /* @__PURE__ */
|
|
5163
|
+
return /* @__PURE__ */ jsxs8(Box7, { ref: responseRef, sx: { mt: 1.5 }, children: [
|
|
5164
|
+
needsAuth && /* @__PURE__ */ jsxs8(
|
|
5112
5165
|
Box7,
|
|
5113
5166
|
{
|
|
5114
5167
|
sx: {
|
|
@@ -5123,14 +5176,14 @@ var SingulActionsPreview = ({
|
|
|
5123
5176
|
},
|
|
5124
5177
|
children: [
|
|
5125
5178
|
/* @__PURE__ */ jsx11(LockIcon2, { size: 22, color: "hsl(var(--severity-medium))" }),
|
|
5126
|
-
/* @__PURE__ */
|
|
5127
|
-
/* @__PURE__ */
|
|
5179
|
+
/* @__PURE__ */ jsxs8(Box7, { sx: { flex: 1, minWidth: 0 }, children: [
|
|
5180
|
+
/* @__PURE__ */ jsxs8(Typography7, { sx: { fontSize: "0.85rem", fontWeight: 600, color: "hsl(var(--foreground))" }, children: [
|
|
5128
5181
|
pretty,
|
|
5129
5182
|
" requires authentication"
|
|
5130
5183
|
] }),
|
|
5131
5184
|
/* @__PURE__ */ jsx11(Typography7, { sx: { fontSize: "0.75rem", color: "hsl(var(--muted-foreground))" }, children: typeof parsedResult?.reason === "string" && parsedResult.reason ? parsedResult.reason : `Connect your ${pretty} account so this action can run, then try again.` })
|
|
5132
5185
|
] }),
|
|
5133
|
-
/* @__PURE__ */
|
|
5186
|
+
/* @__PURE__ */ jsxs8(
|
|
5134
5187
|
Button3,
|
|
5135
5188
|
{
|
|
5136
5189
|
variant: "outlined",
|
|
@@ -5165,7 +5218,7 @@ var SingulActionsPreview = ({
|
|
|
5165
5218
|
]
|
|
5166
5219
|
}
|
|
5167
5220
|
),
|
|
5168
|
-
/* @__PURE__ */
|
|
5221
|
+
/* @__PURE__ */ jsxs8(Box7, { sx: { display: "flex", alignItems: "center", gap: 0.75, mb: 0.5 }, children: [
|
|
5169
5222
|
/* @__PURE__ */ jsx11(Box7, { sx: { width: 6, height: 6, borderRadius: "50%", backgroundColor: needsAuth ? "hsl(var(--severity-medium))" : "hsl(140 60% 55%)" } }),
|
|
5170
5223
|
/* @__PURE__ */ jsx11(Typography7, { sx: { fontFamily: "'JetBrains Mono', monospace", fontSize: "0.65rem", color: "hsl(var(--muted-foreground))", letterSpacing: 0.4 }, children: "response" })
|
|
5171
5224
|
] }),
|
|
@@ -5231,7 +5284,7 @@ var SingulActionsPreview = ({
|
|
|
5231
5284
|
var SingulActionsPreview_default = SingulActionsPreview;
|
|
5232
5285
|
|
|
5233
5286
|
// views/AppDetailDrawer.tsx
|
|
5234
|
-
import { Fragment as Fragment4, jsx as jsx12, jsxs as
|
|
5287
|
+
import { Fragment as Fragment4, jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
5235
5288
|
function AppDetailDrawer({
|
|
5236
5289
|
open,
|
|
5237
5290
|
onClose,
|
|
@@ -5262,7 +5315,7 @@ function AppDetailDrawer({
|
|
|
5262
5315
|
handleSaveAuth,
|
|
5263
5316
|
refreshAuth
|
|
5264
5317
|
} = useAppAuth();
|
|
5265
|
-
|
|
5318
|
+
useEffect7(() => {
|
|
5266
5319
|
if (!open || !appName) return;
|
|
5267
5320
|
setAppLoading(true);
|
|
5268
5321
|
setAppInfo(null);
|
|
@@ -5354,7 +5407,7 @@ function AppDetailDrawer({
|
|
|
5354
5407
|
setAppLoading(false);
|
|
5355
5408
|
})();
|
|
5356
5409
|
}, [open, appName, appId]);
|
|
5357
|
-
|
|
5410
|
+
useEffect7(() => {
|
|
5358
5411
|
if (!open || !appName || !isAuthenticated) {
|
|
5359
5412
|
setIncidentStats(null);
|
|
5360
5413
|
return;
|
|
@@ -5423,12 +5476,12 @@ function AppDetailDrawer({
|
|
|
5423
5476
|
const effectiveActivated = isActivated === null ? hasAnyAuth ? true : null : isActivated || hasAnyAuth;
|
|
5424
5477
|
const authCount = matchingEntries.length;
|
|
5425
5478
|
const displayName = (appInfo?.name || appName || "").replace(/_/g, " ");
|
|
5426
|
-
|
|
5479
|
+
useEffect7(() => {
|
|
5427
5480
|
if (lastValidAuthRef.current === hasValidAuth) return;
|
|
5428
5481
|
lastValidAuthRef.current = hasValidAuth;
|
|
5429
5482
|
setAuthExpanded(!hasValidAuth);
|
|
5430
5483
|
}, [hasValidAuth]);
|
|
5431
|
-
|
|
5484
|
+
useEffect7(() => {
|
|
5432
5485
|
lastValidAuthRef.current = null;
|
|
5433
5486
|
}, [appName]);
|
|
5434
5487
|
const handleActivateToggle = async () => {
|
|
@@ -5469,7 +5522,7 @@ function AppDetailDrawer({
|
|
|
5469
5522
|
}
|
|
5470
5523
|
};
|
|
5471
5524
|
const isLoadingAll = appLoading || isAuthenticated && appAuthLoading;
|
|
5472
|
-
return /* @__PURE__ */
|
|
5525
|
+
return /* @__PURE__ */ jsxs9(
|
|
5473
5526
|
Drawer,
|
|
5474
5527
|
{
|
|
5475
5528
|
anchor,
|
|
@@ -5485,7 +5538,7 @@ function AppDetailDrawer({
|
|
|
5485
5538
|
}
|
|
5486
5539
|
},
|
|
5487
5540
|
children: [
|
|
5488
|
-
/* @__PURE__ */
|
|
5541
|
+
/* @__PURE__ */ jsxs9(
|
|
5489
5542
|
Box8,
|
|
5490
5543
|
{
|
|
5491
5544
|
sx: {
|
|
@@ -5498,7 +5551,7 @@ function AppDetailDrawer({
|
|
|
5498
5551
|
flexShrink: 0
|
|
5499
5552
|
},
|
|
5500
5553
|
children: [
|
|
5501
|
-
/* @__PURE__ */
|
|
5554
|
+
/* @__PURE__ */ jsxs9(Box8, { sx: { flex: 1 }, children: [
|
|
5502
5555
|
/* @__PURE__ */ jsx12(Typography8, { sx: { color: "hsl(var(--foreground))", fontWeight: 700, fontSize: "1rem", lineHeight: 1.2, textTransform: "capitalize" }, children: isLoadingAll ? /* @__PURE__ */ jsx12(Skeleton, { width: 140 }) : displayName }),
|
|
5503
5556
|
/* @__PURE__ */ jsx12(Typography8, { sx: { color: "hsl(var(--muted-foreground))", fontSize: "0.75rem" }, children: "App configuration" })
|
|
5504
5557
|
] }),
|
|
@@ -5514,16 +5567,16 @@ function AppDetailDrawer({
|
|
|
5514
5567
|
]
|
|
5515
5568
|
}
|
|
5516
5569
|
),
|
|
5517
|
-
/* @__PURE__ */ jsx12(Box8, { sx: { flex: 1, overflowY: "auto", p: 3 }, children: isLoadingAll ? /* @__PURE__ */
|
|
5518
|
-
/* @__PURE__ */
|
|
5570
|
+
/* @__PURE__ */ jsx12(Box8, { sx: { flex: 1, overflowY: "auto", p: 3 }, children: isLoadingAll ? /* @__PURE__ */ jsxs9(Box8, { children: [
|
|
5571
|
+
/* @__PURE__ */ jsxs9(Box8, { sx: { display: "flex", gap: 2, mb: 3 }, children: [
|
|
5519
5572
|
/* @__PURE__ */ jsx12(Skeleton, { variant: "circular", width: 56, height: 56 }),
|
|
5520
|
-
/* @__PURE__ */
|
|
5573
|
+
/* @__PURE__ */ jsxs9(Box8, { sx: { flex: 1 }, children: [
|
|
5521
5574
|
/* @__PURE__ */ jsx12(Skeleton, { width: 180, height: 28 }),
|
|
5522
5575
|
/* @__PURE__ */ jsx12(Skeleton, { width: 260, height: 18, sx: { mt: 0.5 } })
|
|
5523
5576
|
] })
|
|
5524
5577
|
] }),
|
|
5525
5578
|
/* @__PURE__ */ jsx12(Skeleton, { variant: "rectangular", height: 160, sx: { borderRadius: 2 } })
|
|
5526
|
-
] }) : /* @__PURE__ */
|
|
5579
|
+
] }) : /* @__PURE__ */ jsxs9(Fragment4, { children: [
|
|
5527
5580
|
/* @__PURE__ */ jsx12(
|
|
5528
5581
|
AppTitleHeader,
|
|
5529
5582
|
{
|
|
@@ -5542,7 +5595,7 @@ function AppDetailDrawer({
|
|
|
5542
5595
|
} : void 0
|
|
5543
5596
|
}
|
|
5544
5597
|
),
|
|
5545
|
-
isAuthenticated && incidentStats && incidentStats.ingested > 0 && /* @__PURE__ */ jsx12(motion6.div, { initial: { opacity: 0, y: 12 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.3, delay: 0.08 }, children: /* @__PURE__ */
|
|
5598
|
+
isAuthenticated && incidentStats && incidentStats.ingested > 0 && /* @__PURE__ */ jsx12(motion6.div, { initial: { opacity: 0, y: 12 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.3, delay: 0.08 }, children: /* @__PURE__ */ jsxs9(Box8, { sx: {
|
|
5546
5599
|
display: "flex",
|
|
5547
5600
|
gap: 2,
|
|
5548
5601
|
mb: 3,
|
|
@@ -5551,16 +5604,16 @@ function AppDetailDrawer({
|
|
|
5551
5604
|
border: "1px solid hsl(var(--border))",
|
|
5552
5605
|
bgcolor: "hsl(var(--muted) / 0.3)"
|
|
5553
5606
|
}, children: [
|
|
5554
|
-
/* @__PURE__ */
|
|
5607
|
+
/* @__PURE__ */ jsxs9(Box8, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
5555
5608
|
/* @__PURE__ */ jsx12(Download, { size: 14, style: { color: "hsl(var(--primary))" } }),
|
|
5556
|
-
/* @__PURE__ */
|
|
5609
|
+
/* @__PURE__ */ jsxs9(Box8, { children: [
|
|
5557
5610
|
/* @__PURE__ */ jsx12(Typography8, { sx: { fontSize: "1.1rem", fontWeight: 700, color: "hsl(var(--foreground))", lineHeight: 1 }, children: incidentStats.ingested }),
|
|
5558
5611
|
/* @__PURE__ */ jsx12(Typography8, { sx: { fontSize: "0.65rem", color: "hsl(var(--muted-foreground))", fontWeight: 500 }, children: "Incidents ingested" })
|
|
5559
5612
|
] })
|
|
5560
5613
|
] }),
|
|
5561
|
-
incidentStats.forwarded > 0 && /* @__PURE__ */
|
|
5614
|
+
incidentStats.forwarded > 0 && /* @__PURE__ */ jsxs9(Box8, { sx: { display: "flex", alignItems: "center", gap: 1, ml: 2, pl: 2, borderLeft: "1px solid hsl(var(--border))" }, children: [
|
|
5562
5615
|
/* @__PURE__ */ jsx12(Forward, { size: 14, style: { color: "hsl(var(--severity-low))" } }),
|
|
5563
|
-
/* @__PURE__ */
|
|
5616
|
+
/* @__PURE__ */ jsxs9(Box8, { children: [
|
|
5564
5617
|
/* @__PURE__ */ jsx12(Typography8, { sx: { fontSize: "1.1rem", fontWeight: 700, color: "hsl(var(--foreground))", lineHeight: 1 }, children: incidentStats.forwarded }),
|
|
5565
5618
|
/* @__PURE__ */ jsx12(Typography8, { sx: { fontSize: "0.65rem", color: "hsl(var(--muted-foreground))", fontWeight: 500 }, children: "Forwarded" })
|
|
5566
5619
|
] })
|
|
@@ -5584,7 +5637,7 @@ function AppDetailDrawer({
|
|
|
5584
5637
|
onRefreshAuth: refreshAuth
|
|
5585
5638
|
}
|
|
5586
5639
|
) }),
|
|
5587
|
-
isAuthenticated && /* @__PURE__ */
|
|
5640
|
+
isAuthenticated && /* @__PURE__ */ jsxs9(Fragment4, { children: [
|
|
5588
5641
|
/* @__PURE__ */ jsx12(
|
|
5589
5642
|
TryMcpSection,
|
|
5590
5643
|
{
|
|
@@ -5608,7 +5661,7 @@ import "./shuffle-mcp-ER33P3W2.css";
|
|
|
5608
5661
|
// components/SegmentedControl.tsx
|
|
5609
5662
|
import * as React2 from "react";
|
|
5610
5663
|
import { motion as motion7, LayoutGroup } from "framer-motion";
|
|
5611
|
-
import { jsx as jsx13, jsxs as
|
|
5664
|
+
import { jsx as jsx13, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
5612
5665
|
var SIZE = {
|
|
5613
5666
|
sm: {
|
|
5614
5667
|
containerPadding: "2px",
|
|
@@ -5695,7 +5748,7 @@ function SegmentedControl({
|
|
|
5695
5748
|
const isAction = opt.type === "action";
|
|
5696
5749
|
const active = !isAction && opt.value === value;
|
|
5697
5750
|
const key = isAction ? opt.key : opt.value;
|
|
5698
|
-
return /* @__PURE__ */
|
|
5751
|
+
return /* @__PURE__ */ jsxs10(
|
|
5699
5752
|
"button",
|
|
5700
5753
|
{
|
|
5701
5754
|
type: "button",
|
|
@@ -5802,17 +5855,8 @@ function SegmentedControl({
|
|
|
5802
5855
|
) });
|
|
5803
5856
|
}
|
|
5804
5857
|
|
|
5805
|
-
// useSyncHostBaseUrl.ts
|
|
5806
|
-
import { useEffect as useEffect7 } from "react";
|
|
5807
|
-
var useSyncHostBaseUrl = (globalUrl) => {
|
|
5808
|
-
useEffect7(() => {
|
|
5809
|
-
if (!globalUrl) return;
|
|
5810
|
-
setHostBaseUrl(globalUrl);
|
|
5811
|
-
}, [globalUrl]);
|
|
5812
|
-
};
|
|
5813
|
-
|
|
5814
5858
|
// views/ShuffleMCP.tsx
|
|
5815
|
-
import { Fragment as Fragment5, jsx as jsx14, jsxs as
|
|
5859
|
+
import { Fragment as Fragment5, jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
5816
5860
|
var DEFAULT_ALGOLIA_APP_ID = "JNSS5CFDZZ";
|
|
5817
5861
|
var DEFAULT_ALGOLIA_API_KEY = "33e4e3564f4f060e96e0531957bed552";
|
|
5818
5862
|
var DEFAULT_ALGOLIA_INDEX = "appsearch";
|
|
@@ -5828,6 +5872,7 @@ var ShuffleMCP = React3.forwardRef(({
|
|
|
5828
5872
|
showCheckbox = false,
|
|
5829
5873
|
multiSelect = false,
|
|
5830
5874
|
selectedApps = EMPTY_SELECTED_APPS,
|
|
5875
|
+
disableAutoSelectValidatedApps = false,
|
|
5831
5876
|
preventDefault = false,
|
|
5832
5877
|
inline = false,
|
|
5833
5878
|
initialQuery = "",
|
|
@@ -5938,6 +5983,7 @@ var ShuffleMCP = React3.forwardRef(({
|
|
|
5938
5983
|
fetchPrivateApps();
|
|
5939
5984
|
}, [apiKey, apiBaseUrl, privateAppsPath, disablePrivateApps, orgId]);
|
|
5940
5985
|
useEffect8(() => {
|
|
5986
|
+
if (disableAutoSelectValidatedApps) return;
|
|
5941
5987
|
if (authenticatedApps.length > 0 && results.length > 0) {
|
|
5942
5988
|
const validatedApps = authenticatedApps.filter((auth) => auth.validation?.valid);
|
|
5943
5989
|
const appsToAutoSelect = results.filter(
|
|
@@ -5956,7 +6002,7 @@ var ShuffleMCP = React3.forwardRef(({
|
|
|
5956
6002
|
}
|
|
5957
6003
|
}
|
|
5958
6004
|
}
|
|
5959
|
-
}, [authenticatedApps, results]);
|
|
6005
|
+
}, [authenticatedApps, results, disableAutoSelectValidatedApps]);
|
|
5960
6006
|
useEffect8(() => {
|
|
5961
6007
|
if (externalAuthenticatedApps) {
|
|
5962
6008
|
setAuthenticatedApps(externalAuthenticatedApps);
|
|
@@ -6173,8 +6219,8 @@ var ShuffleMCP = React3.forwardRef(({
|
|
|
6173
6219
|
...selected ? customStyles.selectedItem : {}
|
|
6174
6220
|
},
|
|
6175
6221
|
onClick: () => selectApp(app),
|
|
6176
|
-
children: /* @__PURE__ */
|
|
6177
|
-
/* @__PURE__ */
|
|
6222
|
+
children: /* @__PURE__ */ jsxs11("div", { className: "singul-app-info", style: customStyles.appInfo, children: [
|
|
6223
|
+
/* @__PURE__ */ jsxs11("div", { style: { position: "relative", flexShrink: 0 }, children: [
|
|
6178
6224
|
/* @__PURE__ */ jsx14(
|
|
6179
6225
|
AppFallbackIcon,
|
|
6180
6226
|
{
|
|
@@ -6192,8 +6238,8 @@ var ShuffleMCP = React3.forwardRef(({
|
|
|
6192
6238
|
}
|
|
6193
6239
|
)
|
|
6194
6240
|
] }),
|
|
6195
|
-
/* @__PURE__ */
|
|
6196
|
-
/* @__PURE__ */
|
|
6241
|
+
/* @__PURE__ */ jsxs11("div", { className: "singul-app-details", style: customStyles.appDetails, children: [
|
|
6242
|
+
/* @__PURE__ */ jsxs11(
|
|
6197
6243
|
"span",
|
|
6198
6244
|
{
|
|
6199
6245
|
className: "singul-app-name",
|
|
@@ -6234,15 +6280,15 @@ var ShuffleMCP = React3.forwardRef(({
|
|
|
6234
6280
|
app.objectID
|
|
6235
6281
|
);
|
|
6236
6282
|
};
|
|
6237
|
-
return /* @__PURE__ */
|
|
6283
|
+
return /* @__PURE__ */ jsxs11(
|
|
6238
6284
|
"div",
|
|
6239
6285
|
{
|
|
6240
6286
|
ref: containerRef,
|
|
6241
6287
|
className: `singul-container ${inline ? "singul-inline" : ""} ${className}`,
|
|
6242
6288
|
style: customStyles.container,
|
|
6243
6289
|
children: [
|
|
6244
|
-
/* @__PURE__ */
|
|
6245
|
-
/* @__PURE__ */
|
|
6290
|
+
/* @__PURE__ */ jsxs11("div", { className: "singul-search-bar-container", children: [
|
|
6291
|
+
/* @__PURE__ */ jsxs11("div", { className: "singul-search-input-wrapper", style: customStyles.inputWrapper, children: [
|
|
6246
6292
|
/* @__PURE__ */ jsx14(
|
|
6247
6293
|
"input",
|
|
6248
6294
|
{
|
|
@@ -6262,7 +6308,7 @@ var ShuffleMCP = React3.forwardRef(({
|
|
|
6262
6308
|
autoComplete: "off"
|
|
6263
6309
|
}
|
|
6264
6310
|
),
|
|
6265
|
-
/* @__PURE__ */ jsx14("div", { className: "singul-search-icon", style: customStyles.searchIcon, children: /* @__PURE__ */
|
|
6311
|
+
/* @__PURE__ */ jsx14("div", { className: "singul-search-icon", style: customStyles.searchIcon, children: /* @__PURE__ */ jsxs11("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
|
|
6266
6312
|
/* @__PURE__ */ jsx14("circle", { cx: "11", cy: "11", r: "8" }),
|
|
6267
6313
|
/* @__PURE__ */ jsx14("path", { d: "m21 21-4.35-4.35" })
|
|
6268
6314
|
] }) }),
|
|
@@ -6291,7 +6337,7 @@ var ShuffleMCP = React3.forwardRef(({
|
|
|
6291
6337
|
...getGridColumnsStyle,
|
|
6292
6338
|
...layout === "grid" ? { display: "grid" } : {}
|
|
6293
6339
|
},
|
|
6294
|
-
children: displayResults.length > 0 ? /* @__PURE__ */
|
|
6340
|
+
children: displayResults.length > 0 ? /* @__PURE__ */ jsxs11(Fragment5, { children: [
|
|
6295
6341
|
displayResults.map((app, index) => renderAppItem(app, index)),
|
|
6296
6342
|
/* @__PURE__ */ jsx14("div", { className: "singul-end-of-results", style: {
|
|
6297
6343
|
padding: "10px 16px",
|
|
@@ -6300,14 +6346,14 @@ var ShuffleMCP = React3.forwardRef(({
|
|
|
6300
6346
|
fontSize: "11px",
|
|
6301
6347
|
gridColumn: "1 / -1"
|
|
6302
6348
|
}, children: "Can't find what you're looking for? Try a different search term." })
|
|
6303
|
-
] }) : query.trim() ? /* @__PURE__ */ jsx14("div", { className: "singul-empty-state", style: customStyles.emptyState, children: searchError ? /* @__PURE__ */
|
|
6349
|
+
] }) : query.trim() ? /* @__PURE__ */ jsx14("div", { className: "singul-empty-state", style: customStyles.emptyState, children: searchError ? /* @__PURE__ */ jsxs11("div", { style: { display: "flex", flexDirection: "column", gap: 4, alignItems: "center", color: searchError.rateLimited ? "hsl(var(--severity-medium))" : "hsl(var(--destructive))" }, children: [
|
|
6304
6350
|
/* @__PURE__ */ jsx14("strong", { style: { fontSize: 13 }, children: searchError.rateLimited ? "Algolia rate limit reached (429)" : "Search unavailable" }),
|
|
6305
6351
|
/* @__PURE__ */ jsx14("span", { style: { fontSize: 12, color: "hsl(var(--muted-foreground))" }, children: searchError.message })
|
|
6306
|
-
] }) : renderEmptyState ? renderEmptyState() : /* @__PURE__ */
|
|
6352
|
+
] }) : renderEmptyState ? renderEmptyState() : /* @__PURE__ */ jsxs11(Fragment5, { children: [
|
|
6307
6353
|
'No integrations match "',
|
|
6308
6354
|
query,
|
|
6309
6355
|
'". Try searching for a different app or category.'
|
|
6310
|
-
] }) }) : /* @__PURE__ */ jsx14("div", { className: "singul-empty-state", style: customStyles.emptyState, children: searchError ? /* @__PURE__ */
|
|
6356
|
+
] }) }) : /* @__PURE__ */ jsx14("div", { className: "singul-empty-state", style: customStyles.emptyState, children: searchError ? /* @__PURE__ */ jsxs11("div", { style: { display: "flex", flexDirection: "column", gap: 4, alignItems: "center", color: searchError.rateLimited ? "hsl(var(--severity-medium))" : "hsl(var(--destructive))" }, children: [
|
|
6311
6357
|
/* @__PURE__ */ jsx14("strong", { style: { fontSize: 13 }, children: searchError.rateLimited ? "Algolia rate limit reached (429)" : "Search unavailable" }),
|
|
6312
6358
|
/* @__PURE__ */ jsx14("span", { style: { fontSize: 12, color: "hsl(var(--muted-foreground))" }, children: searchError.message })
|
|
6313
6359
|
] }) : /* @__PURE__ */ jsx14(Fragment5, { children: "Start typing to search integrations..." }) })
|
|
@@ -6322,10 +6368,10 @@ var ShuffleMCP = React3.forwardRef(({
|
|
|
6322
6368
|
...getGridColumnsStyle,
|
|
6323
6369
|
...layout === "grid" ? { display: "grid" } : {}
|
|
6324
6370
|
},
|
|
6325
|
-
children: displayResults.length > 0 ? displayResults.map((app, index) => renderAppItem(app, index)) : /* @__PURE__ */ jsx14("div", { className: "singul-empty-state", style: customStyles.emptyState, children: searchError ? /* @__PURE__ */
|
|
6371
|
+
children: displayResults.length > 0 ? displayResults.map((app, index) => renderAppItem(app, index)) : /* @__PURE__ */ jsx14("div", { className: "singul-empty-state", style: customStyles.emptyState, children: searchError ? /* @__PURE__ */ jsxs11("div", { style: { display: "flex", flexDirection: "column", gap: 4, alignItems: "center", color: searchError.rateLimited ? "hsl(var(--severity-medium))" : "hsl(var(--destructive))" }, children: [
|
|
6326
6372
|
/* @__PURE__ */ jsx14("strong", { style: { fontSize: 13 }, children: searchError.rateLimited ? "Algolia rate limit reached (429)" : "Search unavailable" }),
|
|
6327
6373
|
/* @__PURE__ */ jsx14("span", { style: { fontSize: 12, color: "hsl(var(--muted-foreground))" }, children: searchError.message })
|
|
6328
|
-
] }) : renderEmptyState ? renderEmptyState() : /* @__PURE__ */
|
|
6374
|
+
] }) : renderEmptyState ? renderEmptyState() : /* @__PURE__ */ jsxs11(Fragment5, { children: [
|
|
6329
6375
|
'No apps found for "',
|
|
6330
6376
|
query,
|
|
6331
6377
|
'"'
|
|
@@ -6357,7 +6403,7 @@ import {
|
|
|
6357
6403
|
} from "lucide-react";
|
|
6358
6404
|
import { Box as Box9, Typography as Typography9, IconButton as IconButton5, Drawer as Drawer2, Avatar as Avatar6, Tooltip as Tooltip5 } from "@mui/material";
|
|
6359
6405
|
import { motion as motion8, AnimatePresence as AnimatePresence2 } from "framer-motion";
|
|
6360
|
-
import { Fragment as Fragment6, jsx as jsx15, jsxs as
|
|
6406
|
+
import { Fragment as Fragment6, jsx as jsx15, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
6361
6407
|
var singulStyles = {
|
|
6362
6408
|
container: { width: "100%" },
|
|
6363
6409
|
inputWrapper: {
|
|
@@ -6455,8 +6501,12 @@ function AppSearchDrawer({
|
|
|
6455
6501
|
highlightDelayMs = 5e3,
|
|
6456
6502
|
multiSelect = false,
|
|
6457
6503
|
selectedApps,
|
|
6458
|
-
onSelectionChange
|
|
6504
|
+
onSelectionChange,
|
|
6505
|
+
globalUrl,
|
|
6506
|
+
theme,
|
|
6507
|
+
colorMode
|
|
6459
6508
|
}) {
|
|
6509
|
+
const themeScope = useShuffleMcpTheme();
|
|
6460
6510
|
const [detailAppName, setDetailAppName] = useState10(null);
|
|
6461
6511
|
const [detailAppId, setDetailAppId] = useState10(null);
|
|
6462
6512
|
const [highlightActive, setHighlightActive] = useState10(false);
|
|
@@ -6535,13 +6585,14 @@ function AppSearchDrawer({
|
|
|
6535
6585
|
setDetailAppName(detail.app.name);
|
|
6536
6586
|
setDetailAppId(algoliaId);
|
|
6537
6587
|
};
|
|
6538
|
-
return /* @__PURE__ */
|
|
6539
|
-
/* @__PURE__ */
|
|
6588
|
+
return /* @__PURE__ */ jsxs12(Fragment6, { children: [
|
|
6589
|
+
/* @__PURE__ */ jsxs12(
|
|
6540
6590
|
Drawer2,
|
|
6541
6591
|
{
|
|
6542
6592
|
anchor,
|
|
6543
6593
|
open: open && detailAppName === null,
|
|
6544
6594
|
onClose: handleClose,
|
|
6595
|
+
slotProps: { paper: { className: themeScope?.scopeClassName } },
|
|
6545
6596
|
sx: {
|
|
6546
6597
|
zIndex: 9999,
|
|
6547
6598
|
"& .MuiDrawer-paper": {
|
|
@@ -6557,7 +6608,7 @@ function AppSearchDrawer({
|
|
|
6557
6608
|
}
|
|
6558
6609
|
},
|
|
6559
6610
|
children: [
|
|
6560
|
-
/* @__PURE__ */
|
|
6611
|
+
/* @__PURE__ */ jsxs12(
|
|
6561
6612
|
Box9,
|
|
6562
6613
|
{
|
|
6563
6614
|
sx: {
|
|
@@ -6570,7 +6621,7 @@ function AppSearchDrawer({
|
|
|
6570
6621
|
flexShrink: 0
|
|
6571
6622
|
},
|
|
6572
6623
|
children: [
|
|
6573
|
-
/* @__PURE__ */
|
|
6624
|
+
/* @__PURE__ */ jsxs12(Box9, { sx: { flex: 1 }, children: [
|
|
6574
6625
|
/* @__PURE__ */ jsx15(Typography9, { sx: { color: "hsl(var(--foreground))", fontWeight: 700, fontSize: "1rem", lineHeight: 1.2 }, children: title }),
|
|
6575
6626
|
/* @__PURE__ */ jsx15(Typography9, { sx: { color: "hsl(var(--muted-foreground))", fontSize: "0.75rem" }, children: subtitle })
|
|
6576
6627
|
] }),
|
|
@@ -6586,10 +6637,10 @@ function AppSearchDrawer({
|
|
|
6586
6637
|
]
|
|
6587
6638
|
}
|
|
6588
6639
|
),
|
|
6589
|
-
/* @__PURE__ */
|
|
6590
|
-
connectionPathApps && connectionPathApps.length > 0 && /* @__PURE__ */
|
|
6640
|
+
/* @__PURE__ */ jsxs12(Box9, { sx: { flex: 1, boxSizing: "border-box", overflow: "hidden", p: 3, minHeight: 0, display: "flex", flexDirection: "column" }, children: [
|
|
6641
|
+
connectionPathApps && connectionPathApps.length > 0 && /* @__PURE__ */ jsxs12(Box9, { sx: { mb: 2.5 }, children: [
|
|
6591
6642
|
/* @__PURE__ */ jsx15(Typography9, { sx: { color: "hsl(var(--muted-foreground))", fontSize: "0.7rem", fontWeight: 600, textTransform: "uppercase", letterSpacing: "0.05em", mb: 1 }, children: "In this usecase" }),
|
|
6592
|
-
/* @__PURE__ */ jsx15(Box9, { sx: { display: "flex", gap: 1.5, flexWrap: "wrap" }, children: connectionPathApps.map((app) => /* @__PURE__ */ jsx15(Tooltip5, { title: app.name.replace(/_/g, " "), arrow: true, placement: "bottom", children: /* @__PURE__ */
|
|
6643
|
+
/* @__PURE__ */ jsx15(Box9, { sx: { display: "flex", gap: 1.5, flexWrap: "wrap" }, children: connectionPathApps.map((app) => /* @__PURE__ */ jsx15(Tooltip5, { title: app.name.replace(/_/g, " "), arrow: true, placement: "bottom", children: /* @__PURE__ */ jsxs12(
|
|
6593
6644
|
Box9,
|
|
6594
6645
|
{
|
|
6595
6646
|
onClick: () => handleAppSelected({ app: { name: app.name, image_url: app.icon, categories: [] } }),
|
|
@@ -6695,7 +6746,10 @@ function AppSearchDrawer({
|
|
|
6695
6746
|
ShuffleMCP2,
|
|
6696
6747
|
{
|
|
6697
6748
|
apiKey: API_CONFIG.apiKey || void 0,
|
|
6698
|
-
apiBaseUrl: API_CONFIG.baseUrl,
|
|
6749
|
+
apiBaseUrl: globalUrl || API_CONFIG.baseUrl,
|
|
6750
|
+
globalUrl,
|
|
6751
|
+
theme,
|
|
6752
|
+
colorMode,
|
|
6699
6753
|
placeholder: initialQuery ? `Search ${initialQuery} integrations...` : "Search integrations...",
|
|
6700
6754
|
layout: "grid",
|
|
6701
6755
|
gridColumns: 2,
|
|
@@ -6707,8 +6761,17 @@ function AppSearchDrawer({
|
|
|
6707
6761
|
showCheckbox: multiSelect,
|
|
6708
6762
|
multiSelect,
|
|
6709
6763
|
selectedApps: multiSelect ? projectedSelectedApps : void 0,
|
|
6764
|
+
disableAutoSelectValidatedApps: multiSelect,
|
|
6710
6765
|
preventDefault: true,
|
|
6711
6766
|
onAppSelected: handleAppSelected,
|
|
6767
|
+
onSelectionChange: multiSelect ? (next) => {
|
|
6768
|
+
onSelectionChange?.(next.map((app) => ({
|
|
6769
|
+
name: app.name,
|
|
6770
|
+
id: app.objectID || null,
|
|
6771
|
+
icon: app.image_url || "",
|
|
6772
|
+
categories: app.categories || []
|
|
6773
|
+
})));
|
|
6774
|
+
} : void 0,
|
|
6712
6775
|
pinnedApps: pinnedApps?.map((p) => ({
|
|
6713
6776
|
name: p.name,
|
|
6714
6777
|
image_url: p.image_url,
|
|
@@ -6754,6 +6817,9 @@ function AppSearchDrawer({
|
|
|
6754
6817
|
appId: detailAppId,
|
|
6755
6818
|
anchor,
|
|
6756
6819
|
width,
|
|
6820
|
+
globalUrl,
|
|
6821
|
+
theme,
|
|
6822
|
+
colorMode,
|
|
6757
6823
|
onRefresh: onClose,
|
|
6758
6824
|
onAddToCanvas
|
|
6759
6825
|
}
|
|
@@ -6764,7 +6830,7 @@ function AppSearchDrawer({
|
|
|
6764
6830
|
// components/AiAgentPromptsEditor.tsx
|
|
6765
6831
|
import { Box as Box10, Typography as Typography10, IconButton as IconButton6, Tooltip as Tooltip6, Button as Button5, TextField as TextField4 } from "@mui/material";
|
|
6766
6832
|
import { X as CloseIcon4, Plus as AddIcon2 } from "lucide-react";
|
|
6767
|
-
import { jsx as jsx16, jsxs as
|
|
6833
|
+
import { jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
6768
6834
|
var AiAgentPromptsEditor = ({
|
|
6769
6835
|
prompts,
|
|
6770
6836
|
apps,
|
|
@@ -6777,10 +6843,10 @@ var AiAgentPromptsEditor = ({
|
|
|
6777
6843
|
resolveAppMeta,
|
|
6778
6844
|
renderPromptInput
|
|
6779
6845
|
}) => {
|
|
6780
|
-
return /* @__PURE__ */
|
|
6846
|
+
return /* @__PURE__ */ jsxs13(Box10, { sx: { display: "flex", flexDirection: "column", gap: 1.25 }, children: [
|
|
6781
6847
|
prompts.map((prompt, idx) => {
|
|
6782
6848
|
const promptApps = apps[idx] || [];
|
|
6783
|
-
return /* @__PURE__ */
|
|
6849
|
+
return /* @__PURE__ */ jsxs13(
|
|
6784
6850
|
Box10,
|
|
6785
6851
|
{
|
|
6786
6852
|
sx: {
|
|
@@ -6793,9 +6859,9 @@ var AiAgentPromptsEditor = ({
|
|
|
6793
6859
|
bgcolor: "hsl(var(--muted) / 0.2)"
|
|
6794
6860
|
},
|
|
6795
6861
|
children: [
|
|
6796
|
-
/* @__PURE__ */
|
|
6797
|
-
/* @__PURE__ */
|
|
6798
|
-
/* @__PURE__ */
|
|
6862
|
+
/* @__PURE__ */ jsxs13(Box10, { sx: { display: "flex", gap: 1, alignItems: "flex-start" }, children: [
|
|
6863
|
+
/* @__PURE__ */ jsxs13(Box10, { sx: { flex: 1, minWidth: 0 }, children: [
|
|
6864
|
+
/* @__PURE__ */ jsxs13(
|
|
6799
6865
|
Typography10,
|
|
6800
6866
|
{
|
|
6801
6867
|
sx: {
|
|
@@ -6854,7 +6920,7 @@ var AiAgentPromptsEditor = ({
|
|
|
6854
6920
|
}
|
|
6855
6921
|
)
|
|
6856
6922
|
] }),
|
|
6857
|
-
/* @__PURE__ */
|
|
6923
|
+
/* @__PURE__ */ jsxs13(Box10, { sx: { display: "flex", alignItems: "center", gap: 1, flexWrap: "wrap" }, children: [
|
|
6858
6924
|
/* @__PURE__ */ jsx16(
|
|
6859
6925
|
Typography10,
|
|
6860
6926
|
{
|
|
@@ -6868,7 +6934,7 @@ var AiAgentPromptsEditor = ({
|
|
|
6868
6934
|
children: "Allowed apps"
|
|
6869
6935
|
}
|
|
6870
6936
|
),
|
|
6871
|
-
/* @__PURE__ */
|
|
6937
|
+
/* @__PURE__ */ jsxs13(Box10, { sx: { display: "flex", alignItems: "center", gap: 0.5, flexWrap: "wrap", flex: 1 }, children: [
|
|
6872
6938
|
promptApps.length === 0 && /* @__PURE__ */ jsx16(Typography10, { sx: { fontSize: "0.7rem", color: "hsl(var(--muted-foreground))", opacity: 0.7 }, children: "All authenticated apps" }),
|
|
6873
6939
|
promptApps.map((appKey) => {
|
|
6874
6940
|
const meta = resolveAppMeta(appKey);
|
|
@@ -6961,9 +7027,9 @@ import { Box as Box11, Typography as Typography11, Chip as Chip6 } from "@mui/ma
|
|
|
6961
7027
|
var shuffle_icon_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJAAAACQCAYAAADnRuK4AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAkKADAAQAAAABAAAAkAAAAAA/PwqIAAAk1klEQVR4Ae1da6xcV3XeM/fhZ+xrO7YDIck1cUIwEJuKpCqExEhQSFTaQFpVVUuAP61SKkEQ/IPG7o9WKggVtajtD9oUSquSEviBqKhayIPQKmmIA42DaIgf5OHYTmzH9rVzHzP9vrX23mefM+c9Z2bude62zz17r71ee63vrrPnzNwzLdNA63a7U1Bzq+mYnaZtptHfhYM0Htmti6lW9vQwZ2q5UkaoDE/KQmuKpWjypIPo8diH43Ec97VaLY77arXTZ0HzcVjfbQ/rSJ2ll5cpz2nduRBPzQWBYPoijtpgqgygADifgOH8ClMxealxSSUWKa4lVKS09rz3xndqqxqk4N1QvrdqVaoEIIDnLhhpHDiDjMqFoHvIuNsDEO0tG7dSAAJwpqHwmzh2lVVcmW/IUUr6V998fc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BQkIpwbAN49ob0gfUZo6EBdWCr6F+xxCGpJusXGMyp/En53DGrzl7k+q3MeS6nnczyJlPWVqM9YPhwJtOgJhgg+RKvym5rcGuI9b0U8dlqCft9K25UAYHDt7L+AsBhv3SrHVILpN2w9HEcu0pbrMHYVNyb0lNjCYtV5D44dj+OysBxC6oNIKeA5wBMBBIfVjhtD5wuvLYEgYiqgm/2Na19yMYhHDx/q2q1Scvk/wN41g4g84VXcwAAAABJRU5ErkJggg==";
|
|
6962
7028
|
|
|
6963
7029
|
// components/ShufflePipelinesBanner.tsx
|
|
6964
|
-
import { jsx as jsx17, jsxs as
|
|
7030
|
+
import { jsx as jsx17, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
6965
7031
|
function ShufflePipelinesBanner() {
|
|
6966
|
-
return /* @__PURE__ */
|
|
7032
|
+
return /* @__PURE__ */ jsxs14(
|
|
6967
7033
|
Box11,
|
|
6968
7034
|
{
|
|
6969
7035
|
component: "a",
|
|
@@ -6995,7 +7061,7 @@ function ShufflePipelinesBanner() {
|
|
|
6995
7061
|
sx: { width: 36, height: 36, borderRadius: "10px", flexShrink: 0 }
|
|
6996
7062
|
}
|
|
6997
7063
|
),
|
|
6998
|
-
/* @__PURE__ */
|
|
7064
|
+
/* @__PURE__ */ jsxs14(Box11, { sx: { flex: 1, minWidth: 0 }, children: [
|
|
6999
7065
|
/* @__PURE__ */ jsx17(Typography11, { sx: { fontWeight: 700, fontSize: "0.85rem", color: "hsl(var(--foreground))", lineHeight: 1.3 }, children: "Shuffle Pipelines" }),
|
|
7000
7066
|
/* @__PURE__ */ jsx17(Typography11, { sx: { fontSize: "0.72rem", color: "hsl(var(--muted-foreground))", lineHeight: 1.4 }, children: "Do not have a SIEM? Shuffle can ingest, parse, and correlate your logs and events directly \u2014 no external SIEM required." })
|
|
7001
7067
|
] }),
|
|
@@ -7626,7 +7692,7 @@ import { AlertTriangle, ArrowUpRight, HelpCircle, X } from "lucide-react";
|
|
|
7626
7692
|
// components/AgentDiagnosisCtas.tsx
|
|
7627
7693
|
import { Box as Box12, Button as Button6, Tooltip as Tooltip7 } from "@mui/material";
|
|
7628
7694
|
import { ExternalLink, Settings2 } from "lucide-react";
|
|
7629
|
-
import { jsx as jsx18, jsxs as
|
|
7695
|
+
import { jsx as jsx18, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
7630
7696
|
var openLocalLlmTab = (e) => {
|
|
7631
7697
|
e.stopPropagation();
|
|
7632
7698
|
window.dispatchEvent(
|
|
@@ -7648,7 +7714,7 @@ var AgentDiagnosisCtas = ({ diagnosis, compact = false, tone = "medium" }) => {
|
|
|
7648
7714
|
const fontSize = compact ? "0.7rem" : "0.78rem";
|
|
7649
7715
|
const iconSize = compact ? 12 : 14;
|
|
7650
7716
|
const px = compact ? 1 : 1.5;
|
|
7651
|
-
return /* @__PURE__ */
|
|
7717
|
+
return /* @__PURE__ */ jsxs15(Box12, { sx: { display: "flex", flexWrap: "wrap", gap: compact ? 0.5 : 1 }, children: [
|
|
7652
7718
|
/* @__PURE__ */ jsx18(Tooltip7, { title: "Configure your own LLM vendor (OpenAI-compatible endpoint)", placement: "top", arrow: true, children: /* @__PURE__ */ jsx18(
|
|
7653
7719
|
Button6,
|
|
7654
7720
|
{
|
|
@@ -8057,7 +8123,7 @@ var diagnoseOutputWarning = (run) => {
|
|
|
8057
8123
|
};
|
|
8058
8124
|
|
|
8059
8125
|
// components/AgentRunDiagnosisBanner.tsx
|
|
8060
|
-
import { jsx as jsx19, jsxs as
|
|
8126
|
+
import { jsx as jsx19, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
8061
8127
|
var DISMISS_PREFIX = "agent-diagnosis-dismissed::";
|
|
8062
8128
|
var readDismissed = (key) => {
|
|
8063
8129
|
if (!key || typeof window === "undefined") return false;
|
|
@@ -8107,7 +8173,7 @@ var AgentRunDiagnosisBanner = ({ run, sx, onJumpToEvidence, executionId }) => {
|
|
|
8107
8173
|
if (canJump) onJumpToEvidence(jumpDecisionIndex);
|
|
8108
8174
|
};
|
|
8109
8175
|
const showTokenCtas = diagnosis?.kind === "token_limit";
|
|
8110
|
-
return /* @__PURE__ */ jsx19(Box13, { sx: { px: 2.5, pb: 0.5, ...sx || {} }, children: /* @__PURE__ */
|
|
8176
|
+
return /* @__PURE__ */ jsx19(Box13, { sx: { px: 2.5, pb: 0.5, ...sx || {} }, children: /* @__PURE__ */ jsxs16(
|
|
8111
8177
|
Box13,
|
|
8112
8178
|
{
|
|
8113
8179
|
sx: {
|
|
@@ -8121,7 +8187,7 @@ var AgentRunDiagnosisBanner = ({ run, sx, onJumpToEvidence, executionId }) => {
|
|
|
8121
8187
|
border: `1px solid hsla(var(--severity-${tone}) / 0.18)`
|
|
8122
8188
|
},
|
|
8123
8189
|
children: [
|
|
8124
|
-
/* @__PURE__ */
|
|
8190
|
+
/* @__PURE__ */ jsxs16(
|
|
8125
8191
|
Box13,
|
|
8126
8192
|
{
|
|
8127
8193
|
...canJump ? {
|
|
@@ -8213,7 +8279,7 @@ var AgentRunDiagnosisBanner = ({ run, sx, onJumpToEvidence, executionId }) => {
|
|
|
8213
8279
|
var AgentRunDiagnosisBanner_default = AgentRunDiagnosisBanner;
|
|
8214
8280
|
|
|
8215
8281
|
// components/AgentUI.tsx
|
|
8216
|
-
import { Fragment as Fragment7, jsx as jsx20, jsxs as
|
|
8282
|
+
import { Fragment as Fragment7, jsx as jsx20, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
8217
8283
|
var normalizeMarkdown = (raw) => {
|
|
8218
8284
|
if (raw == null) return "";
|
|
8219
8285
|
let s = typeof raw === "string" ? raw : (() => {
|
|
@@ -8422,7 +8488,7 @@ var TimelineRow = ({
|
|
|
8422
8488
|
);
|
|
8423
8489
|
const effectiveStatus = runFinished && (item.status === "RUNNING" || item.status === "WAITING") ? "IGNORED" : item.status;
|
|
8424
8490
|
const barColor = isProcessing ? "hsl(var(--muted-foreground) / 0.45)" : effectiveStatus === "IGNORED" ? STATUS_COLORS.warning : effectiveStatus === "FINISHED" ? STATUS_COLORS.finished : effectiveStatus === "FAILURE" || effectiveStatus === "ABORTED" ? STATUS_COLORS.error : STATUS_COLORS.running;
|
|
8425
|
-
return /* @__PURE__ */
|
|
8491
|
+
return /* @__PURE__ */ jsxs17(
|
|
8426
8492
|
Box14,
|
|
8427
8493
|
{
|
|
8428
8494
|
"data-timeline-index": index,
|
|
@@ -8435,7 +8501,7 @@ var TimelineRow = ({
|
|
|
8435
8501
|
boxShadow: highlight ? "inset 0 0 0 2px hsla(var(--severity-medium) / 0.55)" : "none"
|
|
8436
8502
|
},
|
|
8437
8503
|
children: [
|
|
8438
|
-
/* @__PURE__ */
|
|
8504
|
+
/* @__PURE__ */ jsxs17(
|
|
8439
8505
|
Box14,
|
|
8440
8506
|
{
|
|
8441
8507
|
onClick: isProcessing ? void 0 : onToggle,
|
|
@@ -8492,7 +8558,7 @@ var TimelineRow = ({
|
|
|
8492
8558
|
transition: "all 0.2s ease"
|
|
8493
8559
|
} }) }) }),
|
|
8494
8560
|
/* @__PURE__ */ jsx20(Box14, { sx: { width: 60, fontSize: "0.7rem", color: "hsl(var(--muted-foreground))", textAlign: "right" }, children: dur > 0 ? `${dur.toFixed(2)}s` : "" }),
|
|
8495
|
-
/* @__PURE__ */
|
|
8561
|
+
/* @__PURE__ */ jsxs17(
|
|
8496
8562
|
Box14,
|
|
8497
8563
|
{
|
|
8498
8564
|
sx: { display: "flex", alignItems: "center", gap: 0.25, ml: 1, minWidth: 96, justifyContent: "flex-end" },
|
|
@@ -8500,7 +8566,7 @@ var TimelineRow = ({
|
|
|
8500
8566
|
if (e.target.closest("button, a")) e.stopPropagation();
|
|
8501
8567
|
},
|
|
8502
8568
|
children: [
|
|
8503
|
-
item.type === "decision" && details?.run_details?.status === "WAITING" && (item.category === "ask" || details?.action === "ask") && questions.length === 0 && /* @__PURE__ */
|
|
8569
|
+
item.type === "decision" && details?.run_details?.status === "WAITING" && (item.category === "ask" || details?.action === "ask") && questions.length === 0 && /* @__PURE__ */ jsxs17(Fragment7, { children: [
|
|
8504
8570
|
/* @__PURE__ */ jsx20(Tooltip9, { title: "Approve this step", children: /* @__PURE__ */ jsx20("span", { children: /* @__PURE__ */ jsx20(
|
|
8505
8571
|
IconButton8,
|
|
8506
8572
|
{
|
|
@@ -8569,11 +8635,11 @@ var TimelineRow = ({
|
|
|
8569
8635
|
onSubmitQuestions(details.run_details.id, questionAnswers);
|
|
8570
8636
|
}
|
|
8571
8637
|
};
|
|
8572
|
-
return /* @__PURE__ */
|
|
8638
|
+
return /* @__PURE__ */ jsxs17(Fragment7, { children: [
|
|
8573
8639
|
questions.map((q, qi) => {
|
|
8574
8640
|
const value = questionAnswers[q.question]?.value || "";
|
|
8575
8641
|
const isMissing = submitAttempted && !value;
|
|
8576
|
-
return /* @__PURE__ */
|
|
8642
|
+
return /* @__PURE__ */ jsxs17(Box14, { sx: { mt: 2 }, children: [
|
|
8577
8643
|
/* @__PURE__ */ jsx20(Box14, { sx: { fontSize: "0.85rem", color: "hsl(var(--foreground))", mb: 1 }, children: /* @__PURE__ */ jsx20(Markdown, { remarkPlugins: [remarkGfm4, remarkBreaks], children: normalizeMarkdown(q.question) }) }),
|
|
8578
8644
|
/* @__PURE__ */ jsx20(
|
|
8579
8645
|
TextField5,
|
|
@@ -8606,7 +8672,7 @@ var TimelineRow = ({
|
|
|
8606
8672
|
)
|
|
8607
8673
|
] }, qi);
|
|
8608
8674
|
}),
|
|
8609
|
-
/* @__PURE__ */
|
|
8675
|
+
/* @__PURE__ */ jsxs17(Box14, { sx: { display: "flex", alignItems: "center", gap: 1, mt: 2 }, children: [
|
|
8610
8676
|
/* @__PURE__ */ jsx20(Tooltip9, { title: !questionsAnswered ? "Please answer all questions first" : "", placement: "top", arrow: true, children: /* @__PURE__ */ jsx20("span", { children: /* @__PURE__ */ jsx20(
|
|
8611
8677
|
Button8,
|
|
8612
8678
|
{
|
|
@@ -8633,7 +8699,7 @@ var TimelineRow = ({
|
|
|
8633
8699
|
] })
|
|
8634
8700
|
] });
|
|
8635
8701
|
})() }),
|
|
8636
|
-
open && runFinished && unansweredQuestions.length > 0 && /* @__PURE__ */
|
|
8702
|
+
open && runFinished && unansweredQuestions.length > 0 && /* @__PURE__ */ jsxs17(Box14, { sx: { px: 4, pb: 2 }, children: [
|
|
8637
8703
|
/* @__PURE__ */ jsx20(Typography13, { sx: { fontSize: "0.7rem", textTransform: "uppercase", letterSpacing: 0.5, color: "hsl(var(--muted-foreground))", mb: 1 }, children: unansweredQuestions.length === 1 ? "Question (unanswered)" : "Questions (unanswered)" }),
|
|
8638
8704
|
/* @__PURE__ */ jsx20(Box14, { sx: {
|
|
8639
8705
|
p: 2,
|
|
@@ -8653,7 +8719,7 @@ var TimelineRow = ({
|
|
|
8653
8719
|
const slug = req.appName.toLowerCase().replace(/[\s-]+/g, "_");
|
|
8654
8720
|
const appId = req.appId || appsById[req.appName]?.id || appsById[slug]?.id || null;
|
|
8655
8721
|
const icon = appsById[req.appName]?.icon || appsById[slug]?.icon || (appId ? appsById[appId]?.icon : "") || "";
|
|
8656
|
-
return /* @__PURE__ */ jsx20(Box14, { sx: { px: 4, pb: 2 }, children: /* @__PURE__ */
|
|
8722
|
+
return /* @__PURE__ */ jsx20(Box14, { sx: { px: 4, pb: 2 }, children: /* @__PURE__ */ jsxs17(Box14, { sx: {
|
|
8657
8723
|
display: "flex",
|
|
8658
8724
|
alignItems: "center",
|
|
8659
8725
|
gap: 1.5,
|
|
@@ -8663,18 +8729,18 @@ var TimelineRow = ({
|
|
|
8663
8729
|
bgcolor: "hsla(var(--severity-medium) / 0.08)"
|
|
8664
8730
|
}, children: [
|
|
8665
8731
|
/* @__PURE__ */ jsx20(LockIcon3, { size: 22, color: "hsl(var(--severity-medium))" }),
|
|
8666
|
-
/* @__PURE__ */
|
|
8667
|
-
/* @__PURE__ */
|
|
8732
|
+
/* @__PURE__ */ jsxs17(Box14, { sx: { flex: 1, minWidth: 0 }, children: [
|
|
8733
|
+
/* @__PURE__ */ jsxs17(Typography13, { sx: { fontSize: "0.85rem", fontWeight: 600, color: "hsl(var(--foreground))" }, children: [
|
|
8668
8734
|
pretty,
|
|
8669
8735
|
" requires authentication"
|
|
8670
8736
|
] }),
|
|
8671
|
-
/* @__PURE__ */
|
|
8737
|
+
/* @__PURE__ */ jsxs17(Typography13, { sx: { fontSize: "0.75rem", color: "hsl(var(--muted-foreground))" }, children: [
|
|
8672
8738
|
"Connect your ",
|
|
8673
8739
|
pretty,
|
|
8674
8740
|
" account so the agent can complete this step, then rerun the decision."
|
|
8675
8741
|
] })
|
|
8676
8742
|
] }),
|
|
8677
|
-
/* @__PURE__ */
|
|
8743
|
+
/* @__PURE__ */ jsxs17(
|
|
8678
8744
|
Button8,
|
|
8679
8745
|
{
|
|
8680
8746
|
variant: "outlined",
|
|
@@ -8792,6 +8858,8 @@ var AgentUI = ({
|
|
|
8792
8858
|
apiKey,
|
|
8793
8859
|
apiBaseUrl,
|
|
8794
8860
|
orgId,
|
|
8861
|
+
theme,
|
|
8862
|
+
colorMode,
|
|
8795
8863
|
className,
|
|
8796
8864
|
sx,
|
|
8797
8865
|
contentSx
|
|
@@ -9906,14 +9974,14 @@ var AgentUI = ({
|
|
|
9906
9974
|
if (cron) setScheduleCron(cron);
|
|
9907
9975
|
}, [schedFreq, schedInterval, schedHour, schedMinute, schedWeekdays, schedDayOfMonth]);
|
|
9908
9976
|
const scheduleDisabledReason = scheduleDisabledReasons[0] || "";
|
|
9909
|
-
const scheduleDisabledTooltip = scheduleDisabledReasons.length > 1 ? /* @__PURE__ */
|
|
9910
|
-
/* @__PURE__ */
|
|
9977
|
+
const scheduleDisabledTooltip = scheduleDisabledReasons.length > 1 ? /* @__PURE__ */ jsxs17(Box14, { children: [
|
|
9978
|
+
/* @__PURE__ */ jsxs17(Box14, { sx: { fontWeight: 600, mb: 0.5 }, children: [
|
|
9911
9979
|
"Cannot schedule for ",
|
|
9912
9980
|
scheduleDisabledReasons.length,
|
|
9913
9981
|
" reasons:"
|
|
9914
9982
|
] }),
|
|
9915
|
-
/* @__PURE__ */ jsx20(Box14, { sx: { m: 0 }, children: scheduleDisabledReasons.map((r, i) => /* @__PURE__ */
|
|
9916
|
-
/* @__PURE__ */
|
|
9983
|
+
/* @__PURE__ */ jsx20(Box14, { sx: { m: 0 }, children: scheduleDisabledReasons.map((r, i) => /* @__PURE__ */ jsxs17(Box14, { sx: { mb: 0.5, display: "flex", gap: 0.75 }, children: [
|
|
9984
|
+
/* @__PURE__ */ jsxs17(Box14, { component: "span", sx: { fontWeight: 700, flexShrink: 0 }, children: [
|
|
9917
9985
|
i + 1,
|
|
9918
9986
|
"."
|
|
9919
9987
|
] }),
|
|
@@ -9975,7 +10043,7 @@ var AgentUI = ({
|
|
|
9975
10043
|
)
|
|
9976
10044
|
}
|
|
9977
10045
|
);
|
|
9978
|
-
const schedulePopover = /* @__PURE__ */
|
|
10046
|
+
const schedulePopover = /* @__PURE__ */ jsxs17(
|
|
9979
10047
|
Popover,
|
|
9980
10048
|
{
|
|
9981
10049
|
open: Boolean(scheduleAnchor),
|
|
@@ -10000,7 +10068,7 @@ var AgentUI = ({
|
|
|
10000
10068
|
children: [
|
|
10001
10069
|
/* @__PURE__ */ jsx20(Typography13, { sx: { fontSize: "0.85rem", fontWeight: 600, mb: 0.5 }, children: "Schedule recurring run" }),
|
|
10002
10070
|
/* @__PURE__ */ jsx20(Typography13, { sx: { fontSize: "0.75rem", color: "hsl(var(--muted-foreground))", mb: 1.5 }, children: "Choose how often this prompt should run. The schedule keeps running until you remove it." }),
|
|
10003
|
-
scheduleHint && /* @__PURE__ */
|
|
10071
|
+
scheduleHint && /* @__PURE__ */ jsxs17(
|
|
10004
10072
|
Box14,
|
|
10005
10073
|
{
|
|
10006
10074
|
sx: {
|
|
@@ -10015,7 +10083,7 @@ var AgentUI = ({
|
|
|
10015
10083
|
},
|
|
10016
10084
|
children: [
|
|
10017
10085
|
/* @__PURE__ */ jsx20(ScheduleIcon, { size: 16, color: "hsl(var(--primary))" }),
|
|
10018
|
-
/* @__PURE__ */
|
|
10086
|
+
/* @__PURE__ */ jsxs17(Box14, { sx: { flex: 1, minWidth: 0 }, children: [
|
|
10019
10087
|
/* @__PURE__ */ jsx20(Box14, { sx: { fontSize: "0.7rem", color: "hsl(var(--muted-foreground))", mb: 0.25 }, children: "Detected from your prompt" }),
|
|
10020
10088
|
/* @__PURE__ */ jsx20(Box14, { sx: { fontSize: "0.78rem", fontWeight: 600, color: "hsl(var(--foreground))" }, children: scheduleHint.label }),
|
|
10021
10089
|
/* @__PURE__ */ jsx20(Box14, { sx: { fontSize: "0.68rem", fontFamily: "monospace", color: "hsl(var(--muted-foreground))" }, children: scheduleHint.cron })
|
|
@@ -10041,7 +10109,7 @@ var AgentUI = ({
|
|
|
10041
10109
|
]
|
|
10042
10110
|
}
|
|
10043
10111
|
),
|
|
10044
|
-
/* @__PURE__ */
|
|
10112
|
+
/* @__PURE__ */ jsxs17(Box14, { sx: { display: "flex", alignItems: "center", gap: 1, mb: 1.25 }, children: [
|
|
10045
10113
|
/* @__PURE__ */ jsx20(Typography13, { sx: { fontSize: "0.78rem", color: "hsl(var(--muted-foreground))", flexShrink: 0 }, children: "Repeat every" }),
|
|
10046
10114
|
/* @__PURE__ */ jsx20(
|
|
10047
10115
|
TextField5,
|
|
@@ -10065,7 +10133,7 @@ var AgentUI = ({
|
|
|
10065
10133
|
}
|
|
10066
10134
|
}
|
|
10067
10135
|
),
|
|
10068
|
-
/* @__PURE__ */
|
|
10136
|
+
/* @__PURE__ */ jsxs17(
|
|
10069
10137
|
Select2,
|
|
10070
10138
|
{
|
|
10071
10139
|
size: "small",
|
|
@@ -10096,7 +10164,7 @@ var AgentUI = ({
|
|
|
10096
10164
|
}
|
|
10097
10165
|
)
|
|
10098
10166
|
] }),
|
|
10099
|
-
(schedFreq === "days" || schedFreq === "weeks" || schedFreq === "months") && /* @__PURE__ */
|
|
10167
|
+
(schedFreq === "days" || schedFreq === "weeks" || schedFreq === "months") && /* @__PURE__ */ jsxs17(Box14, { sx: { display: "flex", alignItems: "center", gap: 1, mb: 1.25 }, children: [
|
|
10100
10168
|
/* @__PURE__ */ jsx20(Typography13, { sx: { fontSize: "0.78rem", color: "hsl(var(--muted-foreground))", flexShrink: 0 }, children: "At" }),
|
|
10101
10169
|
/* @__PURE__ */ jsx20(
|
|
10102
10170
|
TextField5,
|
|
@@ -10123,7 +10191,7 @@ var AgentUI = ({
|
|
|
10123
10191
|
}
|
|
10124
10192
|
)
|
|
10125
10193
|
] }),
|
|
10126
|
-
schedFreq === "weeks" && /* @__PURE__ */
|
|
10194
|
+
schedFreq === "weeks" && /* @__PURE__ */ jsxs17(Box14, { sx: { mb: 1.25 }, children: [
|
|
10127
10195
|
/* @__PURE__ */ jsx20(Typography13, { sx: { fontSize: "0.78rem", color: "hsl(var(--muted-foreground))", mb: 0.75 }, children: "Repeat on" }),
|
|
10128
10196
|
/* @__PURE__ */ jsx20(Box14, { sx: { display: "flex", gap: 0.5 }, children: ["S", "M", "T", "W", "T", "F", "S"].map((label, i) => {
|
|
10129
10197
|
const active = schedWeekdays.has(i);
|
|
@@ -10164,13 +10232,13 @@ var AgentUI = ({
|
|
|
10164
10232
|
i
|
|
10165
10233
|
);
|
|
10166
10234
|
}) }),
|
|
10167
|
-
schedInterval > 1 && /* @__PURE__ */
|
|
10235
|
+
schedInterval > 1 && /* @__PURE__ */ jsxs17(Typography13, { sx: { fontSize: "0.68rem", color: "hsl(var(--muted-foreground))", mt: 0.75 }, children: [
|
|
10168
10236
|
"Cron does not support every ",
|
|
10169
10237
|
schedInterval,
|
|
10170
10238
|
" weeks natively \u2014 this will run weekly on the selected days."
|
|
10171
10239
|
] })
|
|
10172
10240
|
] }),
|
|
10173
|
-
schedFreq === "months" && /* @__PURE__ */
|
|
10241
|
+
schedFreq === "months" && /* @__PURE__ */ jsxs17(Box14, { sx: { display: "flex", alignItems: "center", gap: 1, mb: 1.25 }, children: [
|
|
10174
10242
|
/* @__PURE__ */ jsx20(Typography13, { sx: { fontSize: "0.78rem", color: "hsl(var(--muted-foreground))", flexShrink: 0 }, children: "On day" }),
|
|
10175
10243
|
/* @__PURE__ */ jsx20(
|
|
10176
10244
|
TextField5,
|
|
@@ -10223,8 +10291,8 @@ var AgentUI = ({
|
|
|
10223
10291
|
},
|
|
10224
10292
|
expr
|
|
10225
10293
|
)) }),
|
|
10226
|
-
/* @__PURE__ */
|
|
10227
|
-
/* @__PURE__ */
|
|
10294
|
+
/* @__PURE__ */ jsxs17(Box14, { sx: { mt: 1.25 }, children: [
|
|
10295
|
+
/* @__PURE__ */ jsxs17(
|
|
10228
10296
|
Box14,
|
|
10229
10297
|
{
|
|
10230
10298
|
role: "button",
|
|
@@ -10267,7 +10335,7 @@ var AgentUI = ({
|
|
|
10267
10335
|
}
|
|
10268
10336
|
}
|
|
10269
10337
|
),
|
|
10270
|
-
/* @__PURE__ */
|
|
10338
|
+
/* @__PURE__ */ jsxs17(Typography13, { sx: { fontSize: "0.68rem", fontFamily: "monospace", color: "hsl(var(--muted-foreground))", mt: 0.75 }, children: [
|
|
10271
10339
|
"cron: ",
|
|
10272
10340
|
scheduleCron || "\u2014"
|
|
10273
10341
|
] })
|
|
@@ -10275,23 +10343,23 @@ var AgentUI = ({
|
|
|
10275
10343
|
scheduleSaving && /* @__PURE__ */ jsx20(Box14, { sx: { mt: 2, display: "flex", flexDirection: "column", gap: 0.75, p: 1.25, borderRadius: 1, bgcolor: "hsl(var(--muted))", border: "1px solid hsl(var(--border))" }, children: scheduleSteps.map((s) => {
|
|
10276
10344
|
const label = s.id === "name" ? "Generating name & description" : s.id === "workflow" ? "Creating workflow" : "Enabling schedule";
|
|
10277
10345
|
const color = s.state === "done" ? "hsl(var(--primary))" : s.state === "error" ? "hsl(var(--destructive))" : s.state === "active" ? "hsl(var(--foreground))" : "hsl(var(--muted-foreground))";
|
|
10278
|
-
return /* @__PURE__ */
|
|
10279
|
-
/* @__PURE__ */
|
|
10346
|
+
return /* @__PURE__ */ jsxs17(Box14, { sx: { display: "flex", alignItems: "center", gap: 1, fontSize: "0.78rem", color }, children: [
|
|
10347
|
+
/* @__PURE__ */ jsxs17(Box14, { sx: { width: 16, display: "flex", alignItems: "center", justifyContent: "center" }, children: [
|
|
10280
10348
|
s.state === "active" && /* @__PURE__ */ jsx20(CircularProgress4, { size: 12, sx: { color: "hsl(var(--primary))" } }),
|
|
10281
10349
|
s.state === "done" && /* @__PURE__ */ jsx20(Box14, { sx: { fontSize: "0.85rem", lineHeight: 1, color: "hsl(var(--primary))" }, children: "\u2713" }),
|
|
10282
10350
|
s.state === "error" && /* @__PURE__ */ jsx20(Box14, { sx: { fontSize: "0.85rem", lineHeight: 1, color: "hsl(var(--destructive))" }, children: "!" }),
|
|
10283
10351
|
s.state === "pending" && /* @__PURE__ */ jsx20(Box14, { sx: { width: 6, height: 6, borderRadius: "50%", bgcolor: "hsl(var(--muted-foreground))", opacity: 0.4 } })
|
|
10284
10352
|
] }),
|
|
10285
|
-
/* @__PURE__ */
|
|
10353
|
+
/* @__PURE__ */ jsxs17(Box14, { component: "span", sx: { fontFamily: "inherit" }, children: [
|
|
10286
10354
|
label,
|
|
10287
|
-
s.detail && s.state !== "pending" && /* @__PURE__ */
|
|
10355
|
+
s.detail && s.state !== "pending" && /* @__PURE__ */ jsxs17(Box14, { component: "span", sx: { ml: 0.75, color: "hsl(var(--muted-foreground))", fontFamily: "monospace", fontSize: "0.72rem" }, children: [
|
|
10288
10356
|
"\u2014 ",
|
|
10289
10357
|
s.detail
|
|
10290
10358
|
] })
|
|
10291
10359
|
] })
|
|
10292
10360
|
] }, s.id);
|
|
10293
10361
|
}) }),
|
|
10294
|
-
/* @__PURE__ */
|
|
10362
|
+
/* @__PURE__ */ jsxs17(Box14, { sx: { display: "flex", justifyContent: "flex-end", gap: 1, mt: 2 }, children: [
|
|
10295
10363
|
/* @__PURE__ */ jsx20(
|
|
10296
10364
|
Button8,
|
|
10297
10365
|
{
|
|
@@ -10363,7 +10431,7 @@ var AgentUI = ({
|
|
|
10363
10431
|
{ width: "100%", display: "flex", justifyContent: "center", pb: 4 },
|
|
10364
10432
|
...Array.isArray(sx) ? sx : sx ? [sx] : []
|
|
10365
10433
|
],
|
|
10366
|
-
children: /* @__PURE__ */
|
|
10434
|
+
children: /* @__PURE__ */ jsxs17(
|
|
10367
10435
|
Box14,
|
|
10368
10436
|
{
|
|
10369
10437
|
sx: [
|
|
@@ -10373,7 +10441,7 @@ var AgentUI = ({
|
|
|
10373
10441
|
children: [
|
|
10374
10442
|
showRunSwitcher && tabBar,
|
|
10375
10443
|
schedulePopover,
|
|
10376
|
-
showStarter ? /* @__PURE__ */
|
|
10444
|
+
showStarter ? /* @__PURE__ */ jsxs17(
|
|
10377
10445
|
Box14,
|
|
10378
10446
|
{
|
|
10379
10447
|
component: "form",
|
|
@@ -10408,7 +10476,7 @@ var AgentUI = ({
|
|
|
10408
10476
|
mt: -1,
|
|
10409
10477
|
maxWidth: 600
|
|
10410
10478
|
}, children: subtitle }),
|
|
10411
|
-
/* @__PURE__ */
|
|
10479
|
+
/* @__PURE__ */ jsxs17(Box14, { sx: {
|
|
10412
10480
|
width: "100%",
|
|
10413
10481
|
display: "flex",
|
|
10414
10482
|
flexDirection: "column",
|
|
@@ -10424,7 +10492,7 @@ var AgentUI = ({
|
|
|
10424
10492
|
boxShadow: "0 0 0 3px hsla(var(--primary) / 0.12)"
|
|
10425
10493
|
}
|
|
10426
10494
|
}, children: [
|
|
10427
|
-
attachedImages.length > 0 && /* @__PURE__ */ jsx20(Box14, { sx: { display: "flex", flexWrap: "wrap", gap: 0.75 }, children: attachedImages.map((img, idx) => /* @__PURE__ */
|
|
10495
|
+
attachedImages.length > 0 && /* @__PURE__ */ jsx20(Box14, { sx: { display: "flex", flexWrap: "wrap", gap: 0.75 }, children: attachedImages.map((img, idx) => /* @__PURE__ */ jsxs17(Box14, { sx: {
|
|
10428
10496
|
display: "inline-flex",
|
|
10429
10497
|
alignItems: "center",
|
|
10430
10498
|
gap: 1,
|
|
@@ -10439,7 +10507,7 @@ var AgentUI = ({
|
|
|
10439
10507
|
/* @__PURE__ */ jsx20(Typography13, { sx: { fontSize: "0.72rem", color: "hsl(var(--foreground))", maxWidth: 190, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: img.name }),
|
|
10440
10508
|
/* @__PURE__ */ jsx20(IconButton8, { size: "small", onClick: () => setAttachedImages((prev) => prev.filter((_, i) => i !== idx)), sx: { p: 0.25, color: "hsl(var(--muted-foreground))", "&:hover": { color: "hsl(var(--destructive))" } }, "aria-label": "Remove attached image", children: /* @__PURE__ */ jsx20(CloseIcon5, { size: 12 }) })
|
|
10441
10509
|
] }, `${img.name}-${idx}`)) }),
|
|
10442
|
-
/* @__PURE__ */
|
|
10510
|
+
/* @__PURE__ */ jsxs17(Box14, { sx: { display: "flex", alignItems: "flex-end", gap: 1, width: "100%" }, children: [
|
|
10443
10511
|
/* @__PURE__ */ jsx20(
|
|
10444
10512
|
InputBase2,
|
|
10445
10513
|
{
|
|
@@ -10496,7 +10564,7 @@ var AgentUI = ({
|
|
|
10496
10564
|
const canSchedule = (hasExecution || allowWithoutExecution) && !scheduleDisabledReason && !promptTooShort && !disableSchedule;
|
|
10497
10565
|
const hintActive = Boolean(scheduleHint) && canSchedule;
|
|
10498
10566
|
const tip = disableSchedule ? disableScheduleTooltip || "Scheduling is disabled while editing" : scheduleDisabledReason ? scheduleDisabledTooltip : promptTooShort ? "Type a prompt before scheduling." : hintActive ? `Detected schedule: ${scheduleHint.label}. Click to review and save.` : "Schedule this prompt to run repeatedly on a cron schedule";
|
|
10499
|
-
return /* @__PURE__ */ jsx20(Tooltip9, { title: tip, placement: "top", arrow: true, children: /* @__PURE__ */ jsx20(Box14, { sx: { display: "inline-flex", alignItems: "center", gap: 0.5 }, children: /* @__PURE__ */
|
|
10567
|
+
return /* @__PURE__ */ jsx20(Tooltip9, { title: tip, placement: "top", arrow: true, children: /* @__PURE__ */ jsx20(Box14, { sx: { display: "inline-flex", alignItems: "center", gap: 0.5 }, children: /* @__PURE__ */ jsxs17(
|
|
10500
10568
|
IconButton8,
|
|
10501
10569
|
{
|
|
10502
10570
|
type: "button",
|
|
@@ -10557,7 +10625,7 @@ var AgentUI = ({
|
|
|
10557
10625
|
children: /* @__PURE__ */ jsx20(AttachFileIcon, { size: 18 })
|
|
10558
10626
|
}
|
|
10559
10627
|
),
|
|
10560
|
-
/* @__PURE__ */ jsx20(Tooltip9, { title: submitTooltip, placement: "top", arrow: true, children: /* @__PURE__ */ jsx20("span", { children: submitLabel ? /* @__PURE__ */
|
|
10628
|
+
/* @__PURE__ */ jsx20(Tooltip9, { title: submitTooltip, placement: "top", arrow: true, children: /* @__PURE__ */ jsx20("span", { children: submitLabel ? /* @__PURE__ */ jsxs17(Box14, { sx: { display: "inline-flex", alignItems: "center", gap: 1 }, children: [
|
|
10561
10629
|
/* @__PURE__ */ jsx20(Tooltip9, { title: "Try this prompt without saving", placement: "top", arrow: true, children: /* @__PURE__ */ jsx20(
|
|
10562
10630
|
IconButton8,
|
|
10563
10631
|
{
|
|
@@ -10616,7 +10684,7 @@ var AgentUI = ({
|
|
|
10616
10684
|
) }) })
|
|
10617
10685
|
] })
|
|
10618
10686
|
] }),
|
|
10619
|
-
!hideAppPicker && /* @__PURE__ */ jsx20(Box14, { sx: { display: "flex", justifyContent: "center" }, children: /* @__PURE__ */
|
|
10687
|
+
!hideAppPicker && /* @__PURE__ */ jsx20(Box14, { sx: { display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ jsxs17(Box14, { sx: {
|
|
10620
10688
|
display: "inline-flex",
|
|
10621
10689
|
flexWrap: "wrap",
|
|
10622
10690
|
alignItems: "center",
|
|
@@ -10627,7 +10695,7 @@ var AgentUI = ({
|
|
|
10627
10695
|
bgcolor: "hsl(var(--card))",
|
|
10628
10696
|
maxWidth: "100%"
|
|
10629
10697
|
}, children: [
|
|
10630
|
-
!hideChooseLLM && /* @__PURE__ */ jsx20(Tooltip9, { title: "Configure the local LLM used for this agent", children: /* @__PURE__ */
|
|
10698
|
+
!hideChooseLLM && /* @__PURE__ */ jsx20(Tooltip9, { title: "Configure the local LLM used for this agent", children: /* @__PURE__ */ jsxs17(
|
|
10631
10699
|
Box14,
|
|
10632
10700
|
{
|
|
10633
10701
|
component: "button",
|
|
@@ -10671,7 +10739,7 @@ var AgentUI = ({
|
|
|
10671
10739
|
]
|
|
10672
10740
|
}
|
|
10673
10741
|
) }),
|
|
10674
|
-
/* @__PURE__ */ jsx20(Tooltip9, { title: agentRequestLoading ? "Locked while the agent is running" : "", children: /* @__PURE__ */
|
|
10742
|
+
/* @__PURE__ */ jsx20(Tooltip9, { title: agentRequestLoading ? "Locked while the agent is running" : "", children: /* @__PURE__ */ jsxs17(
|
|
10675
10743
|
Box14,
|
|
10676
10744
|
{
|
|
10677
10745
|
component: "button",
|
|
@@ -10712,7 +10780,7 @@ var AgentUI = ({
|
|
|
10712
10780
|
{
|
|
10713
10781
|
title: needsAuth ? `${(app.name || "").replace(/_/g, " ")} is not authenticated yet \u2014 click to set it up` : "",
|
|
10714
10782
|
arrow: true,
|
|
10715
|
-
children: /* @__PURE__ */
|
|
10783
|
+
children: /* @__PURE__ */ jsxs17(
|
|
10716
10784
|
Box14,
|
|
10717
10785
|
{
|
|
10718
10786
|
onClick: needsAuth && !agentRequestLoading ? () => setAuthDrawerApp({ name: app.name, id: app.id || null }) : void 0,
|
|
@@ -10772,7 +10840,7 @@ var AgentUI = ({
|
|
|
10772
10840
|
return !NO_AUTH.has(slug) && !isAppAuthenticated(a.name || "");
|
|
10773
10841
|
});
|
|
10774
10842
|
if (unauthed.length === 0) return null;
|
|
10775
|
-
return /* @__PURE__ */ jsx20(Box14, { sx: { display: "flex", justifyContent: "center", mt: -0.5 }, children: /* @__PURE__ */
|
|
10843
|
+
return /* @__PURE__ */ jsx20(Box14, { sx: { display: "flex", justifyContent: "center", mt: -0.5 }, children: /* @__PURE__ */ jsxs17(Box14, { sx: {
|
|
10776
10844
|
display: "inline-flex",
|
|
10777
10845
|
alignItems: "center",
|
|
10778
10846
|
gap: 1,
|
|
@@ -10787,7 +10855,7 @@ var AgentUI = ({
|
|
|
10787
10855
|
}, children: [
|
|
10788
10856
|
/* @__PURE__ */ jsx20(WarningIcon, { size: 14, color: "hsl(var(--severity-medium))" }),
|
|
10789
10857
|
/* @__PURE__ */ jsx20(Typography13, { sx: { fontSize: "0.75rem", color: "hsl(var(--muted-foreground))" }, children: unauthed.length === 1 ? `${unauthed[0].name.replace(/_/g, " ")} is not authenticated.` : `${unauthed.length} apps are not authenticated.` }),
|
|
10790
|
-
/* @__PURE__ */
|
|
10858
|
+
/* @__PURE__ */ jsxs17(
|
|
10791
10859
|
Box14,
|
|
10792
10860
|
{
|
|
10793
10861
|
component: "button",
|
|
@@ -10822,8 +10890,8 @@ var AgentUI = ({
|
|
|
10822
10890
|
}, children: error })
|
|
10823
10891
|
]
|
|
10824
10892
|
}
|
|
10825
|
-
) : /* @__PURE__ */
|
|
10826
|
-
/* @__PURE__ */
|
|
10893
|
+
) : /* @__PURE__ */ jsxs17(Box14, { children: [
|
|
10894
|
+
/* @__PURE__ */ jsxs17(Box14, { sx: {
|
|
10827
10895
|
display: "flex",
|
|
10828
10896
|
alignItems: "center",
|
|
10829
10897
|
gap: 2,
|
|
@@ -10848,9 +10916,9 @@ var AgentUI = ({
|
|
|
10848
10916
|
}
|
|
10849
10917
|
}
|
|
10850
10918
|
) }, i)) }),
|
|
10851
|
-
/* @__PURE__ */
|
|
10919
|
+
/* @__PURE__ */ jsxs17(Box14, { sx: { flex: 1, minWidth: 0 }, children: [
|
|
10852
10920
|
/* @__PURE__ */ jsx20(Typography13, { sx: { fontSize: "0.85rem", color: "hsl(var(--foreground))", fontWeight: 600, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: agentData?.original_input || actionInput || "Agent run" }),
|
|
10853
|
-
/* @__PURE__ */
|
|
10921
|
+
/* @__PURE__ */ jsxs17(Typography13, { sx: { fontSize: "0.7rem", color: "hsl(var(--muted-foreground))" }, children: [
|
|
10854
10922
|
"Status: ",
|
|
10855
10923
|
execution?.status || agentData?.status || "\u2014",
|
|
10856
10924
|
" \xB7 ",
|
|
@@ -10970,11 +11038,11 @@ var AgentUI = ({
|
|
|
10970
11038
|
}
|
|
10971
11039
|
}
|
|
10972
11040
|
const pendingAnswered = pendingQuestions.every((q) => questionAnswers[q.question]?.value);
|
|
10973
|
-
return /* @__PURE__ */
|
|
10974
|
-
/* @__PURE__ */
|
|
11041
|
+
return /* @__PURE__ */ jsxs17(Fragment7, { children: [
|
|
11042
|
+
/* @__PURE__ */ jsxs17(Box14, { sx: { display: "flex", alignItems: "center", gap: 1, flexWrap: "wrap" }, children: [
|
|
10975
11043
|
isRunning ? /* @__PURE__ */ jsx20(CircularProgress4, { size: 16, sx: { color: "hsl(var(--primary))" } }) : status === "FINISHED" ? /* @__PURE__ */ jsx20(CheckCircleIcon4, { size: 18, color: "hsl(142 70% 45%)" }) : /* @__PURE__ */ jsx20(ErrorIcon, { size: 18, color: "hsl(var(--destructive))" }),
|
|
10976
11044
|
/* @__PURE__ */ jsx20(Typography13, { sx: { fontSize: "0.9rem", fontWeight: 600, color: "hsl(var(--foreground))" }, children: isRunning ? "Agent is working\u2026" : status === "FINISHED" ? "Run finished" : `Run ${status.toLowerCase()}` }),
|
|
10977
|
-
/* @__PURE__ */
|
|
11045
|
+
/* @__PURE__ */ jsxs17(Typography13, { sx: { fontSize: "0.75rem", color: "hsl(var(--muted-foreground))" }, children: [
|
|
10978
11046
|
decisionCount,
|
|
10979
11047
|
" step",
|
|
10980
11048
|
decisionCount === 1 ? "" : "s",
|
|
@@ -10984,7 +11052,7 @@ var AgentUI = ({
|
|
|
10984
11052
|
] }),
|
|
10985
11053
|
pendingAuthApps.map(({ appName, appId, icon }) => {
|
|
10986
11054
|
const pretty = appName.replace(/_/g, " ").replace(/\b\w/g, (c) => c.toUpperCase());
|
|
10987
|
-
return /* @__PURE__ */
|
|
11055
|
+
return /* @__PURE__ */ jsxs17(
|
|
10988
11056
|
Box14,
|
|
10989
11057
|
{
|
|
10990
11058
|
sx: {
|
|
@@ -10998,18 +11066,18 @@ var AgentUI = ({
|
|
|
10998
11066
|
},
|
|
10999
11067
|
children: [
|
|
11000
11068
|
/* @__PURE__ */ jsx20(LockIcon3, { size: 22, color: "hsl(var(--severity-medium))" }),
|
|
11001
|
-
/* @__PURE__ */
|
|
11002
|
-
/* @__PURE__ */
|
|
11069
|
+
/* @__PURE__ */ jsxs17(Box14, { sx: { flex: 1, minWidth: 0 }, children: [
|
|
11070
|
+
/* @__PURE__ */ jsxs17(Typography13, { sx: { fontSize: "0.85rem", fontWeight: 600, color: "hsl(var(--foreground))" }, children: [
|
|
11003
11071
|
pretty,
|
|
11004
11072
|
" requires authentication"
|
|
11005
11073
|
] }),
|
|
11006
|
-
/* @__PURE__ */
|
|
11074
|
+
/* @__PURE__ */ jsxs17(Typography13, { sx: { fontSize: "0.75rem", color: "hsl(var(--muted-foreground))" }, children: [
|
|
11007
11075
|
"Connect your ",
|
|
11008
11076
|
pretty,
|
|
11009
11077
|
" account so the agent can complete this step, then rerun."
|
|
11010
11078
|
] })
|
|
11011
11079
|
] }),
|
|
11012
|
-
/* @__PURE__ */
|
|
11080
|
+
/* @__PURE__ */ jsxs17(
|
|
11013
11081
|
Button8,
|
|
11014
11082
|
{
|
|
11015
11083
|
variant: "outlined",
|
|
@@ -11108,11 +11176,11 @@ var AgentUI = ({
|
|
|
11108
11176
|
submitQuestions(pendingAsk.run_details.id, questionAnswers);
|
|
11109
11177
|
}
|
|
11110
11178
|
};
|
|
11111
|
-
return /* @__PURE__ */
|
|
11179
|
+
return /* @__PURE__ */ jsxs17(Box14, { sx: { display: "flex", flexDirection: "column", gap: 1.5 }, children: [
|
|
11112
11180
|
pendingQuestions.map((q, qi) => {
|
|
11113
11181
|
const value = questionAnswers[q.question]?.value || "";
|
|
11114
11182
|
const isMissing = simpleSubmitAttempted && !value;
|
|
11115
|
-
return /* @__PURE__ */
|
|
11183
|
+
return /* @__PURE__ */ jsxs17(Box14, { children: [
|
|
11116
11184
|
/* @__PURE__ */ jsx20(Box14, { sx: { fontSize: "0.9rem", color: "hsl(var(--foreground))", mb: 1, "& p": { my: 0.5 } }, children: /* @__PURE__ */ jsx20(Markdown, { remarkPlugins: [remarkGfm4, remarkBreaks], children: normalizeMarkdown(q.question) }) }),
|
|
11117
11185
|
/* @__PURE__ */ jsx20(
|
|
11118
11186
|
TextField5,
|
|
@@ -11143,7 +11211,7 @@ var AgentUI = ({
|
|
|
11143
11211
|
)
|
|
11144
11212
|
] }, qi);
|
|
11145
11213
|
}),
|
|
11146
|
-
/* @__PURE__ */
|
|
11214
|
+
/* @__PURE__ */ jsxs17(Box14, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
11147
11215
|
/* @__PURE__ */ jsx20(Tooltip9, { title: !pendingAnswered ? "Please answer all questions first" : "", placement: "top", arrow: true, children: /* @__PURE__ */ jsx20("span", { children: /* @__PURE__ */ jsx20(
|
|
11148
11216
|
Button8,
|
|
11149
11217
|
{
|
|
@@ -11191,10 +11259,10 @@ var AgentUI = ({
|
|
|
11191
11259
|
border: "1px solid hsl(var(--border))",
|
|
11192
11260
|
bgcolor: "hsl(var(--card))",
|
|
11193
11261
|
overflow: "hidden"
|
|
11194
|
-
}, children: timeline.length === 0 || timeline.length === 1 && agentRequestLoading ? /* @__PURE__ */
|
|
11262
|
+
}, children: timeline.length === 0 || timeline.length === 1 && agentRequestLoading ? /* @__PURE__ */ jsxs17(Box14, { sx: { p: 4, textAlign: "center", color: "hsl(var(--muted-foreground))", fontSize: "0.85rem" }, children: [
|
|
11195
11263
|
/* @__PURE__ */ jsx20(CircularProgress4, { size: 20, sx: { mb: 1 } }),
|
|
11196
11264
|
/* @__PURE__ */ jsx20(Typography13, { sx: { fontSize: "0.85rem" }, children: "Waiting for agent response\u2026" })
|
|
11197
|
-
] }) : /* @__PURE__ */
|
|
11265
|
+
] }) : /* @__PURE__ */ jsxs17(Fragment7, { children: [
|
|
11198
11266
|
timeline.map((item, i) => /* @__PURE__ */ jsx20(
|
|
11199
11267
|
TimelineRow,
|
|
11200
11268
|
{
|
|
@@ -11220,7 +11288,7 @@ var AgentUI = ({
|
|
|
11220
11288
|
},
|
|
11221
11289
|
i
|
|
11222
11290
|
)),
|
|
11223
|
-
detailedRunFinished && /* @__PURE__ */
|
|
11291
|
+
detailedRunFinished && /* @__PURE__ */ jsxs17(Box14, { sx: {
|
|
11224
11292
|
borderTop: "1px solid hsl(var(--border))",
|
|
11225
11293
|
p: 2.5,
|
|
11226
11294
|
display: "flex",
|
|
@@ -11228,7 +11296,7 @@ var AgentUI = ({
|
|
|
11228
11296
|
gap: 1.5,
|
|
11229
11297
|
bgcolor: "hsl(var(--muted) / 0.2)"
|
|
11230
11298
|
}, children: [
|
|
11231
|
-
/* @__PURE__ */
|
|
11299
|
+
/* @__PURE__ */ jsxs17(Box14, { sx: { display: "flex", alignItems: "center", gap: 1, flexWrap: "wrap" }, children: [
|
|
11232
11300
|
detailedStatus === "FINISHED" ? /* @__PURE__ */ jsx20(CheckCircleIcon4, { size: 18, color: "hsl(142 70% 45%)" }) : /* @__PURE__ */ jsx20(ErrorIcon, { size: 18, color: "hsl(var(--destructive))" }),
|
|
11233
11301
|
/* @__PURE__ */ jsx20(Typography13, { sx: { fontSize: "0.9rem", fontWeight: 600, color: "hsl(var(--foreground))" }, children: detailedStatus === "FINISHED" ? "Run finished" : `Run ${detailedStatus.toLowerCase()}` })
|
|
11234
11302
|
] }),
|
|
@@ -11264,9 +11332,9 @@ var AgentUI = ({
|
|
|
11264
11332
|
] })
|
|
11265
11333
|
] }) });
|
|
11266
11334
|
})(),
|
|
11267
|
-
finishDecisionId && /* @__PURE__ */ jsx20(Box14, { sx: { mt: 3, display: "flex", justifyContent: "center" }, children: /* @__PURE__ */
|
|
11335
|
+
finishDecisionId && /* @__PURE__ */ jsx20(Box14, { sx: { mt: 3, display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ jsxs17(Box14, { sx: { width: "100%", maxWidth: 640 }, children: [
|
|
11268
11336
|
/* @__PURE__ */ jsx20(Typography13, { sx: { fontSize: "0.75rem", color: "hsl(var(--muted-foreground))", mb: 0.75, textAlign: "center" }, children: "Continue this agent run with more details" }),
|
|
11269
|
-
/* @__PURE__ */
|
|
11337
|
+
/* @__PURE__ */ jsxs17(
|
|
11270
11338
|
Box14,
|
|
11271
11339
|
{
|
|
11272
11340
|
component: "form",
|
|
@@ -11341,6 +11409,9 @@ var AgentUI = ({
|
|
|
11341
11409
|
subtitle: appPickerSubtitle,
|
|
11342
11410
|
multiSelect: true,
|
|
11343
11411
|
selectedApps: chosenApps.map((a) => ({ name: a.name, id: a.id || null, icon: a.icon })),
|
|
11412
|
+
globalUrl: apiBaseUrl,
|
|
11413
|
+
theme,
|
|
11414
|
+
colorMode,
|
|
11344
11415
|
onSelectionChange: (next) => {
|
|
11345
11416
|
setChosenApps(
|
|
11346
11417
|
next.map((app) => {
|
|
@@ -11364,7 +11435,10 @@ var AgentUI = ({
|
|
|
11364
11435
|
onClose: () => setAuthDrawerApp(null),
|
|
11365
11436
|
appName: authDrawerApp?.name || null,
|
|
11366
11437
|
appId: authDrawerApp?.id || null,
|
|
11367
|
-
activeOrgId: orgId || null
|
|
11438
|
+
activeOrgId: orgId || null,
|
|
11439
|
+
globalUrl: apiBaseUrl,
|
|
11440
|
+
theme,
|
|
11441
|
+
colorMode
|
|
11368
11442
|
}
|
|
11369
11443
|
)
|
|
11370
11444
|
]
|
|
@@ -11392,7 +11466,7 @@ import {
|
|
|
11392
11466
|
ShieldCheck,
|
|
11393
11467
|
X as CloseIcon6
|
|
11394
11468
|
} from "lucide-react";
|
|
11395
|
-
import { jsx as jsx21, jsxs as
|
|
11469
|
+
import { jsx as jsx21, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
11396
11470
|
var TAB_ORDER = ["run", "permissions", "localLLM"];
|
|
11397
11471
|
var AgentRunDrawer = ({
|
|
11398
11472
|
open,
|
|
@@ -11415,6 +11489,7 @@ var AgentRunDrawer = ({
|
|
|
11415
11489
|
globalUrl
|
|
11416
11490
|
}) => {
|
|
11417
11491
|
useSyncHostBaseUrl(globalUrl);
|
|
11492
|
+
const themeScope = useShuffleMcpTheme();
|
|
11418
11493
|
const [activeTab, setActiveTab] = useState13(initialTab);
|
|
11419
11494
|
const prevOpenRef = useRef9(open);
|
|
11420
11495
|
useEffect12(() => {
|
|
@@ -11436,7 +11511,7 @@ var AgentRunDrawer = ({
|
|
|
11436
11511
|
});
|
|
11437
11512
|
const showTabs = visibleTabs.length > 1;
|
|
11438
11513
|
const safeActiveTab = visibleTabs.includes(activeTab) ? activeTab : "run";
|
|
11439
|
-
return /* @__PURE__ */
|
|
11514
|
+
return /* @__PURE__ */ jsxs18(
|
|
11440
11515
|
Drawer3,
|
|
11441
11516
|
{
|
|
11442
11517
|
anchor: "right",
|
|
@@ -11444,7 +11519,7 @@ var AgentRunDrawer = ({
|
|
|
11444
11519
|
onClose,
|
|
11445
11520
|
slotProps: {
|
|
11446
11521
|
paper: {
|
|
11447
|
-
className,
|
|
11522
|
+
className: [themeScope?.scopeClassName, className].filter(Boolean).join(" ") || void 0,
|
|
11448
11523
|
sx: [
|
|
11449
11524
|
{
|
|
11450
11525
|
width: { xs: "100%", sm: width },
|
|
@@ -11459,7 +11534,7 @@ var AgentRunDrawer = ({
|
|
|
11459
11534
|
}
|
|
11460
11535
|
},
|
|
11461
11536
|
children: [
|
|
11462
|
-
/* @__PURE__ */
|
|
11537
|
+
/* @__PURE__ */ jsxs18(
|
|
11463
11538
|
Box15,
|
|
11464
11539
|
{
|
|
11465
11540
|
sx: [
|
|
@@ -11492,7 +11567,7 @@ var AgentRunDrawer = ({
|
|
|
11492
11567
|
children: /* @__PURE__ */ jsx21(AgentIcon_default, { size: 22 })
|
|
11493
11568
|
}
|
|
11494
11569
|
),
|
|
11495
|
-
/* @__PURE__ */
|
|
11570
|
+
/* @__PURE__ */ jsxs18(Box15, { sx: { flex: 1, minWidth: 0 }, children: [
|
|
11496
11571
|
/* @__PURE__ */ jsx21(Typography14, { sx: { fontWeight: 600, fontSize: "1.1rem", color: "hsl(var(--foreground))" }, children: title }),
|
|
11497
11572
|
/* @__PURE__ */ jsx21(Typography14, { sx: { fontSize: "0.8rem", color: "hsl(var(--muted-foreground))" }, children: subtitle })
|
|
11498
11573
|
] }),
|
|
@@ -11500,7 +11575,7 @@ var AgentRunDrawer = ({
|
|
|
11500
11575
|
]
|
|
11501
11576
|
}
|
|
11502
11577
|
),
|
|
11503
|
-
showTabs && /* @__PURE__ */ jsx21(Box15, { sx: { borderBottom: "1px solid hsl(var(--border))", flexShrink: 0 }, children: /* @__PURE__ */
|
|
11578
|
+
showTabs && /* @__PURE__ */ jsx21(Box15, { sx: { borderBottom: "1px solid hsl(var(--border))", flexShrink: 0 }, children: /* @__PURE__ */ jsxs18(
|
|
11504
11579
|
Tabs,
|
|
11505
11580
|
{
|
|
11506
11581
|
value: safeActiveTab,
|
|
@@ -11547,7 +11622,7 @@ var AgentRunDrawer = ({
|
|
|
11547
11622
|
Tab,
|
|
11548
11623
|
{
|
|
11549
11624
|
value: "localLLM",
|
|
11550
|
-
label: /* @__PURE__ */
|
|
11625
|
+
label: /* @__PURE__ */ jsxs18(Box15, { sx: { display: "flex", alignItems: "center", gap: 0.5 }, children: [
|
|
11551
11626
|
"Local LLM",
|
|
11552
11627
|
localLLMTabBadge
|
|
11553
11628
|
] }),
|
|
@@ -11559,7 +11634,7 @@ var AgentRunDrawer = ({
|
|
|
11559
11634
|
]
|
|
11560
11635
|
}
|
|
11561
11636
|
) }),
|
|
11562
|
-
/* @__PURE__ */
|
|
11637
|
+
/* @__PURE__ */ jsxs18(Box15, { sx: [{ flex: 1, overflowY: "auto" }, ...Array.isArray(bodySx) ? bodySx : bodySx ? [bodySx] : []], children: [
|
|
11563
11638
|
safeActiveTab === "run" && /* @__PURE__ */ jsx21(Box15, { sx: { px: 2, py: 2 }, children: /* @__PURE__ */ jsx21(
|
|
11564
11639
|
AgentUI_default,
|
|
11565
11640
|
{
|
|
@@ -11763,7 +11838,7 @@ var stopAgentSchedule = async (workflowId, params = {}) => {
|
|
|
11763
11838
|
|
|
11764
11839
|
// components/AgentActivityList.tsx
|
|
11765
11840
|
import { Pencil, StopCircle, AlertTriangle as AlertTriangle2 } from "lucide-react";
|
|
11766
|
-
import { Fragment as Fragment8, jsx as jsx22, jsxs as
|
|
11841
|
+
import { Fragment as Fragment8, jsx as jsx22, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
11767
11842
|
var STATUS_CONFIG = {
|
|
11768
11843
|
FINISHED: { icon: /* @__PURE__ */ jsx22(CheckCircle, { size: 16 }), color: "hsl(var(--severity-low, 142 71% 45%))", label: "Completed" },
|
|
11769
11844
|
SUCCESS: { icon: /* @__PURE__ */ jsx22(CheckCircle, { size: 16 }), color: "hsl(var(--severity-low, 142 71% 45%))", label: "Completed" },
|
|
@@ -11887,7 +11962,7 @@ var AgentRunRow = ({ run, onClick, sx }) => {
|
|
|
11887
11962
|
const iconColor = getRunIconColor(run);
|
|
11888
11963
|
const duration = formatDuration(run);
|
|
11889
11964
|
const tools = getRunTools(run);
|
|
11890
|
-
return /* @__PURE__ */
|
|
11965
|
+
return /* @__PURE__ */ jsxs19(
|
|
11891
11966
|
Box16,
|
|
11892
11967
|
{
|
|
11893
11968
|
onClick,
|
|
@@ -11928,8 +12003,8 @@ var AgentRunRow = ({ run, onClick, sx }) => {
|
|
|
11928
12003
|
children: getRunIcon(run)
|
|
11929
12004
|
}
|
|
11930
12005
|
),
|
|
11931
|
-
/* @__PURE__ */
|
|
11932
|
-
/* @__PURE__ */
|
|
12006
|
+
/* @__PURE__ */ jsxs19(Box16, { sx: { flex: 1, minWidth: 0 }, children: [
|
|
12007
|
+
/* @__PURE__ */ jsxs19(Box16, { sx: { display: "flex", alignItems: "center", gap: 1, mb: 0.25 }, children: [
|
|
11933
12008
|
/* @__PURE__ */ jsx22(
|
|
11934
12009
|
Typography15,
|
|
11935
12010
|
{
|
|
@@ -11959,9 +12034,9 @@ var AgentRunRow = ({ run, onClick, sx }) => {
|
|
|
11959
12034
|
children: getRunSubtitle(run)
|
|
11960
12035
|
}
|
|
11961
12036
|
),
|
|
11962
|
-
/* @__PURE__ */
|
|
12037
|
+
/* @__PURE__ */ jsxs19(Box16, { sx: { display: "flex", alignItems: "center", gap: 1, mt: 0.5 }, children: [
|
|
11963
12038
|
/* @__PURE__ */ jsx22(Typography15, { sx: { fontSize: "0.72rem", color: "hsl(var(--muted-foreground))", opacity: 0.7 }, children: run.started_at ? getTimeAgo(run.started_at) : "\u2014" }),
|
|
11964
|
-
duration && /* @__PURE__ */
|
|
12039
|
+
duration && /* @__PURE__ */ jsxs19(Fragment8, { children: [
|
|
11965
12040
|
/* @__PURE__ */ jsx22(Typography15, { sx: { fontSize: "0.72rem", color: "hsl(var(--muted-foreground))", opacity: 0.4 }, children: "\xB7" }),
|
|
11966
12041
|
/* @__PURE__ */ jsx22(Typography15, { sx: { fontSize: "0.72rem", color: "hsl(var(--muted-foreground))", opacity: 0.7 }, children: duration })
|
|
11967
12042
|
] })
|
|
@@ -12134,14 +12209,14 @@ var AgentActivityList = ({
|
|
|
12134
12209
|
].filter(Boolean).join(" ").toLowerCase();
|
|
12135
12210
|
return hay.includes(debouncedQuery.toLowerCase());
|
|
12136
12211
|
}) : runs;
|
|
12137
|
-
return /* @__PURE__ */
|
|
12212
|
+
return /* @__PURE__ */ jsxs19(
|
|
12138
12213
|
Box16,
|
|
12139
12214
|
{
|
|
12140
12215
|
className,
|
|
12141
12216
|
sx: [{ display: "flex", flexDirection: "column", gap: 2 }, ...Array.isArray(sx) ? sx : sx ? [sx] : []],
|
|
12142
12217
|
children: [
|
|
12143
|
-
(showSearchBar || showStatusChips) && /* @__PURE__ */
|
|
12144
|
-
/* @__PURE__ */
|
|
12218
|
+
(showSearchBar || showStatusChips) && /* @__PURE__ */ jsxs19(Box16, { sx: [{ display: "flex", alignItems: "center", justifyContent: "center", gap: 1.5, flexWrap: "wrap" }, ...Array.isArray(toolbarSx) ? toolbarSx : toolbarSx ? [toolbarSx] : []], children: [
|
|
12219
|
+
/* @__PURE__ */ jsxs19(
|
|
12145
12220
|
Select3,
|
|
12146
12221
|
{
|
|
12147
12222
|
size: "small",
|
|
@@ -12224,7 +12299,7 @@ var AgentActivityList = ({
|
|
|
12224
12299
|
),
|
|
12225
12300
|
isLoading && runs.length > 0 && /* @__PURE__ */ jsx22(CircularProgress5, { size: 16, sx: { color: "hsl(var(--primary))", ml: 0.5 } })
|
|
12226
12301
|
] }),
|
|
12227
|
-
selectedAgentWorkflow && /* @__PURE__ */
|
|
12302
|
+
selectedAgentWorkflow && /* @__PURE__ */ jsxs19(
|
|
12228
12303
|
Box16,
|
|
12229
12304
|
{
|
|
12230
12305
|
sx: {
|
|
@@ -12237,7 +12312,7 @@ var AgentActivityList = ({
|
|
|
12237
12312
|
bgcolor: "hsl(var(--card))"
|
|
12238
12313
|
},
|
|
12239
12314
|
children: [
|
|
12240
|
-
/* @__PURE__ */
|
|
12315
|
+
/* @__PURE__ */ jsxs19(Box16, { sx: { flex: 1, minWidth: 0 }, children: [
|
|
12241
12316
|
/* @__PURE__ */ jsx22(Typography15, { sx: { fontSize: "0.85rem", fontWeight: 600, color: "hsl(var(--foreground))", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: selectedAgentWorkflow.name }),
|
|
12242
12317
|
selectedAgentWorkflow.description && /* @__PURE__ */ jsx22(Typography15, { sx: { fontSize: "0.75rem", color: "hsl(var(--muted-foreground))", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: selectedAgentWorkflow.description })
|
|
12243
12318
|
] }),
|
|
@@ -12282,7 +12357,7 @@ var AgentActivityList = ({
|
|
|
12282
12357
|
]
|
|
12283
12358
|
}
|
|
12284
12359
|
),
|
|
12285
|
-
isLoading && runs.length === 0 ? /* @__PURE__ */ jsx22(Box16, { sx: { display: "flex", justifyContent: "center", py: 8 }, children: /* @__PURE__ */ jsx22(CircularProgress5, { size: 28, sx: { color: "hsl(var(--primary))" } }) }) : error ? /* @__PURE__ */
|
|
12360
|
+
isLoading && runs.length === 0 ? /* @__PURE__ */ jsx22(Box16, { sx: { display: "flex", justifyContent: "center", py: 8 }, children: /* @__PURE__ */ jsx22(CircularProgress5, { size: 28, sx: { color: "hsl(var(--primary))" } }) }) : error ? /* @__PURE__ */ jsxs19(Box16, { sx: { display: "flex", flexDirection: "column", alignItems: "center", textAlign: "center", py: 6 }, children: [
|
|
12286
12361
|
/* @__PURE__ */ jsx22(AlertCircle, { size: 28, style: { color: "hsl(var(--severity-critical, 0 72% 55%))", marginBottom: 8 } }),
|
|
12287
12362
|
/* @__PURE__ */ jsx22(
|
|
12288
12363
|
Typography15,
|
|
@@ -12300,7 +12375,7 @@ var AgentActivityList = ({
|
|
|
12300
12375
|
children: "Try again"
|
|
12301
12376
|
}
|
|
12302
12377
|
)
|
|
12303
|
-
] }) : filteredRuns.length === 0 ? /* @__PURE__ */
|
|
12378
|
+
] }) : filteredRuns.length === 0 ? /* @__PURE__ */ jsxs19(Box16, { sx: { display: "flex", flexDirection: "column", alignItems: "center", textAlign: "center", py: 8 }, children: [
|
|
12304
12379
|
/* @__PURE__ */ jsx22(
|
|
12305
12380
|
Activity,
|
|
12306
12381
|
{
|
|
@@ -12316,7 +12391,7 @@ var AgentActivityList = ({
|
|
|
12316
12391
|
children: emptySubtitle
|
|
12317
12392
|
}
|
|
12318
12393
|
)
|
|
12319
|
-
] }) : /* @__PURE__ */
|
|
12394
|
+
] }) : /* @__PURE__ */ jsxs19(Box16, { sx: { display: "flex", flexDirection: "column", gap: 1.5 }, children: [
|
|
12320
12395
|
filteredRuns.map((run, idx) => /* @__PURE__ */ jsx22(
|
|
12321
12396
|
AgentRunRow,
|
|
12322
12397
|
{
|
|
@@ -12326,7 +12401,7 @@ var AgentActivityList = ({
|
|
|
12326
12401
|
},
|
|
12327
12402
|
run.execution_id || idx
|
|
12328
12403
|
)),
|
|
12329
|
-
hasMore && /* @__PURE__ */ jsx22(Box16, { sx: { display: "flex", justifyContent: "center", mt: 1 }, children: /* @__PURE__ */
|
|
12404
|
+
hasMore && /* @__PURE__ */ jsx22(Box16, { sx: { display: "flex", justifyContent: "center", mt: 1 }, children: /* @__PURE__ */ jsxs19(
|
|
12330
12405
|
Button9,
|
|
12331
12406
|
{
|
|
12332
12407
|
size: "small",
|
|
@@ -12340,7 +12415,7 @@ var AgentActivityList = ({
|
|
|
12340
12415
|
}
|
|
12341
12416
|
) })
|
|
12342
12417
|
] }),
|
|
12343
|
-
/* @__PURE__ */
|
|
12418
|
+
/* @__PURE__ */ jsxs19(
|
|
12344
12419
|
Dialog2,
|
|
12345
12420
|
{
|
|
12346
12421
|
open: stopOpen,
|
|
@@ -12348,14 +12423,14 @@ var AgentActivityList = ({
|
|
|
12348
12423
|
slotProps: { paper: { sx: { bgcolor: "hsl(var(--card))", color: "hsl(var(--foreground))", border: "1px solid hsl(var(--border))" } } },
|
|
12349
12424
|
children: [
|
|
12350
12425
|
/* @__PURE__ */ jsx22(DialogTitle2, { sx: { fontSize: "1rem", fontWeight: 600 }, children: "Stop schedule?" }),
|
|
12351
|
-
/* @__PURE__ */ jsx22(DialogContent2, { children: /* @__PURE__ */
|
|
12426
|
+
/* @__PURE__ */ jsx22(DialogContent2, { children: /* @__PURE__ */ jsxs19(Typography15, { sx: { fontSize: "0.85rem", color: "hsl(var(--muted-foreground))" }, children: [
|
|
12352
12427
|
'This will stop "',
|
|
12353
12428
|
selectedAgentWorkflow?.name,
|
|
12354
12429
|
'" and delete the scheduled workflow. Past executions remain visible. This cannot be undone.'
|
|
12355
12430
|
] }) }),
|
|
12356
|
-
/* @__PURE__ */
|
|
12431
|
+
/* @__PURE__ */ jsxs19(DialogActions, { sx: { px: 3, pb: 2 }, children: [
|
|
12357
12432
|
/* @__PURE__ */ jsx22(Button9, { onClick: () => setStopOpen(false), disabled: stopLoading, sx: { textTransform: "none", color: "hsl(var(--muted-foreground))" }, children: "Cancel" }),
|
|
12358
|
-
/* @__PURE__ */
|
|
12433
|
+
/* @__PURE__ */ jsxs19(
|
|
12359
12434
|
Button9,
|
|
12360
12435
|
{
|
|
12361
12436
|
onClick: confirmStop,
|
|
@@ -12383,7 +12458,7 @@ import {
|
|
|
12383
12458
|
X as CloseIcon7,
|
|
12384
12459
|
ExternalLink as OpenInNewIcon3
|
|
12385
12460
|
} from "lucide-react";
|
|
12386
|
-
import { Fragment as Fragment9, jsx as jsx23, jsxs as
|
|
12461
|
+
import { Fragment as Fragment9, jsx as jsx23, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
12387
12462
|
var AgentExecutionDrawer = ({
|
|
12388
12463
|
open,
|
|
12389
12464
|
onClose,
|
|
@@ -12397,12 +12472,15 @@ var AgentExecutionDrawer = ({
|
|
|
12397
12472
|
headerSx,
|
|
12398
12473
|
bodySx,
|
|
12399
12474
|
topBanner,
|
|
12400
|
-
onSchedule
|
|
12475
|
+
onSchedule,
|
|
12476
|
+
theme,
|
|
12477
|
+
colorMode
|
|
12401
12478
|
}) => {
|
|
12479
|
+
const themeScope = useShuffleMcpTheme();
|
|
12402
12480
|
const statusKey = (run?.status || "").toUpperCase();
|
|
12403
12481
|
const cfg = STATUS_CONFIG[statusKey] || STATUS_CONFIG.WAITING;
|
|
12404
12482
|
const duration = run ? formatDuration(run) : "";
|
|
12405
|
-
return /* @__PURE__ */
|
|
12483
|
+
return /* @__PURE__ */ jsxs20(
|
|
12406
12484
|
Drawer4,
|
|
12407
12485
|
{
|
|
12408
12486
|
anchor: "right",
|
|
@@ -12410,7 +12488,7 @@ var AgentExecutionDrawer = ({
|
|
|
12410
12488
|
onClose,
|
|
12411
12489
|
slotProps: {
|
|
12412
12490
|
paper: {
|
|
12413
|
-
className,
|
|
12491
|
+
className: [themeScope?.scopeClassName, className].filter(Boolean).join(" ") || void 0,
|
|
12414
12492
|
sx: [
|
|
12415
12493
|
{
|
|
12416
12494
|
width: { xs: "100%", sm: width },
|
|
@@ -12425,7 +12503,7 @@ var AgentExecutionDrawer = ({
|
|
|
12425
12503
|
}
|
|
12426
12504
|
},
|
|
12427
12505
|
children: [
|
|
12428
|
-
/* @__PURE__ */
|
|
12506
|
+
/* @__PURE__ */ jsxs20(
|
|
12429
12507
|
Box17,
|
|
12430
12508
|
{
|
|
12431
12509
|
sx: [
|
|
@@ -12461,8 +12539,8 @@ var AgentExecutionDrawer = ({
|
|
|
12461
12539
|
children: /* @__PURE__ */ jsx23(AgentIcon_default, { size: 20 })
|
|
12462
12540
|
}
|
|
12463
12541
|
),
|
|
12464
|
-
/* @__PURE__ */
|
|
12465
|
-
/* @__PURE__ */
|
|
12542
|
+
/* @__PURE__ */ jsxs20(Box17, { sx: { flex: 1, minWidth: 0 }, children: [
|
|
12543
|
+
/* @__PURE__ */ jsxs20(Box17, { sx: { display: "flex", alignItems: "center", gap: 1, minWidth: 0 }, children: [
|
|
12466
12544
|
/* @__PURE__ */ jsx23(
|
|
12467
12545
|
Typography16,
|
|
12468
12546
|
{
|
|
@@ -12479,13 +12557,13 @@ var AgentExecutionDrawer = ({
|
|
|
12479
12557
|
),
|
|
12480
12558
|
run && /* @__PURE__ */ jsx23(Box17, { sx: { display: "flex", alignItems: "center", color: cfg.color, flexShrink: 0 }, children: cfg.icon })
|
|
12481
12559
|
] }),
|
|
12482
|
-
run && /* @__PURE__ */
|
|
12560
|
+
run && /* @__PURE__ */ jsxs20(Box17, { sx: { display: "flex", alignItems: "center", gap: 1, mt: 0.25 }, children: [
|
|
12483
12561
|
/* @__PURE__ */ jsx23(Typography16, { sx: { fontSize: "0.72rem", color: "hsl(var(--muted-foreground))" }, children: cfg.label }),
|
|
12484
|
-
run.started_at && /* @__PURE__ */
|
|
12562
|
+
run.started_at && /* @__PURE__ */ jsxs20(Fragment9, { children: [
|
|
12485
12563
|
/* @__PURE__ */ jsx23(Typography16, { sx: { fontSize: "0.72rem", color: "hsl(var(--muted-foreground))", opacity: 0.4 }, children: "\xB7" }),
|
|
12486
12564
|
/* @__PURE__ */ jsx23(Typography16, { sx: { fontSize: "0.72rem", color: "hsl(var(--muted-foreground))" }, children: getTimeAgo(run.started_at) })
|
|
12487
12565
|
] }),
|
|
12488
|
-
duration && /* @__PURE__ */
|
|
12566
|
+
duration && /* @__PURE__ */ jsxs20(Fragment9, { children: [
|
|
12489
12567
|
/* @__PURE__ */ jsx23(Typography16, { sx: { fontSize: "0.72rem", color: "hsl(var(--muted-foreground))", opacity: 0.4 }, children: "\xB7" }),
|
|
12490
12568
|
/* @__PURE__ */ jsx23(Typography16, { sx: { fontSize: "0.72rem", color: "hsl(var(--muted-foreground))" }, children: duration })
|
|
12491
12569
|
] })
|
|
@@ -12521,7 +12599,7 @@ var AgentExecutionDrawer = ({
|
|
|
12521
12599
|
]
|
|
12522
12600
|
}
|
|
12523
12601
|
),
|
|
12524
|
-
/* @__PURE__ */
|
|
12602
|
+
/* @__PURE__ */ jsxs20(Box17, { sx: [{ flex: 1, overflowY: "auto", pt: 3 }, ...Array.isArray(bodySx) ? bodySx : bodySx ? [bodySx] : []], children: [
|
|
12525
12603
|
topBanner,
|
|
12526
12604
|
run ? /* @__PURE__ */ jsx23(
|
|
12527
12605
|
AgentUI_default,
|
|
@@ -12546,7 +12624,9 @@ var AgentExecutionDrawer = ({
|
|
|
12546
12624
|
apiKey,
|
|
12547
12625
|
apiBaseUrl,
|
|
12548
12626
|
orgId,
|
|
12549
|
-
onSchedule
|
|
12627
|
+
onSchedule,
|
|
12628
|
+
theme,
|
|
12629
|
+
colorMode
|
|
12550
12630
|
},
|
|
12551
12631
|
run.execution_id
|
|
12552
12632
|
) : null
|
|
@@ -12560,7 +12640,7 @@ var AgentExecutionDrawer_default = AgentExecutionDrawer;
|
|
|
12560
12640
|
// views/AgentsView.tsx
|
|
12561
12641
|
import { useCallback as useCallback10, useMemo as useMemo7, useState as useState15 } from "react";
|
|
12562
12642
|
import { Box as Box18, Stack, Typography as Typography17 } from "@mui/material";
|
|
12563
|
-
import { jsx as jsx24, jsxs as
|
|
12643
|
+
import { jsx as jsx24, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
12564
12644
|
var AgentsView = ({
|
|
12565
12645
|
onSchedule,
|
|
12566
12646
|
maxWidth = 820,
|
|
@@ -12572,7 +12652,9 @@ var AgentsView = ({
|
|
|
12572
12652
|
isLoaded,
|
|
12573
12653
|
isLoggedIn,
|
|
12574
12654
|
userdata,
|
|
12575
|
-
serverside
|
|
12655
|
+
serverside,
|
|
12656
|
+
theme,
|
|
12657
|
+
colorMode
|
|
12576
12658
|
}) => {
|
|
12577
12659
|
useSyncHostBaseUrl(globalUrl);
|
|
12578
12660
|
const [selectedRun, setSelectedRun] = useState15(null);
|
|
@@ -12588,7 +12670,7 @@ var AgentsView = ({
|
|
|
12588
12670
|
tab: "localLLM"
|
|
12589
12671
|
});
|
|
12590
12672
|
const effectiveLocalLLMSlot = useMemo7(
|
|
12591
|
-
() => localLLMSlot ?? /* @__PURE__ */
|
|
12673
|
+
() => localLLMSlot ?? /* @__PURE__ */ jsxs21(Box18, { sx: { p: 3, color: "hsl(var(--muted-foreground))", fontSize: "0.85rem", lineHeight: 1.6 }, children: [
|
|
12592
12674
|
/* @__PURE__ */ jsx24(Typography17, { sx: { fontSize: "0.95rem", fontWeight: 600, color: "hsl(var(--foreground))", mb: 1 }, children: "Local LLM not configured" }),
|
|
12593
12675
|
"This host hasn't wired a Local LLM picker yet. Pass an",
|
|
12594
12676
|
" ",
|
|
@@ -12642,9 +12724,9 @@ var AgentsView = ({
|
|
|
12642
12724
|
},
|
|
12643
12725
|
[editing]
|
|
12644
12726
|
);
|
|
12645
|
-
return /* @__PURE__ */
|
|
12646
|
-
/* @__PURE__ */
|
|
12647
|
-
editing && /* @__PURE__ */
|
|
12727
|
+
return /* @__PURE__ */ jsxs21(Box18, { sx: { minHeight: "100%", width: "100%", px: { xs: 2, md: 4 }, pt: { xs: 3, md: "5vh" }, pb: 6, boxSizing: "border-box" }, children: [
|
|
12728
|
+
/* @__PURE__ */ jsxs21(Stack, { spacing: 6, sx: { maxWidth, mx: "auto", width: "100%" }, children: [
|
|
12729
|
+
editing && /* @__PURE__ */ jsxs21(
|
|
12648
12730
|
Box18,
|
|
12649
12731
|
{
|
|
12650
12732
|
sx: {
|
|
@@ -12658,7 +12740,7 @@ var AgentsView = ({
|
|
|
12658
12740
|
bgcolor: "hsl(var(--primary) / 0.08)"
|
|
12659
12741
|
},
|
|
12660
12742
|
children: [
|
|
12661
|
-
/* @__PURE__ */
|
|
12743
|
+
/* @__PURE__ */ jsxs21(Typography17, { sx: { fontSize: "0.85rem", color: "hsl(var(--foreground))" }, children: [
|
|
12662
12744
|
"Editing schedule: ",
|
|
12663
12745
|
/* @__PURE__ */ jsx24("strong", { children: editing.name })
|
|
12664
12746
|
] }),
|
|
@@ -12698,7 +12780,9 @@ var AgentsView = ({
|
|
|
12698
12780
|
submitLabel: editing ? "Save" : void 0,
|
|
12699
12781
|
submitTooltip: editing ? "\u2318+Enter to save" : void 0,
|
|
12700
12782
|
disableSchedule: Boolean(editing),
|
|
12701
|
-
disableScheduleTooltip: editing ? "Scheduling is disabled while editing an existing schedule" : void 0
|
|
12783
|
+
disableScheduleTooltip: editing ? "Scheduling is disabled while editing an existing schedule" : void 0,
|
|
12784
|
+
theme,
|
|
12785
|
+
colorMode
|
|
12702
12786
|
},
|
|
12703
12787
|
prefill.key
|
|
12704
12788
|
),
|
|
@@ -12718,7 +12802,9 @@ var AgentsView = ({
|
|
|
12718
12802
|
onClose: () => setSelectedRun(null),
|
|
12719
12803
|
run: selectedRun,
|
|
12720
12804
|
apiBaseUrl: globalUrl,
|
|
12721
|
-
onSchedule
|
|
12805
|
+
onSchedule,
|
|
12806
|
+
theme,
|
|
12807
|
+
colorMode
|
|
12722
12808
|
}
|
|
12723
12809
|
),
|
|
12724
12810
|
/* @__PURE__ */ jsx24(
|
|
@@ -12730,7 +12816,9 @@ var AgentsView = ({
|
|
|
12730
12816
|
globalUrl,
|
|
12731
12817
|
localLLMSlot: effectiveLocalLLMSlot,
|
|
12732
12818
|
permissionsSlot,
|
|
12733
|
-
|
|
12819
|
+
theme,
|
|
12820
|
+
colorMode,
|
|
12821
|
+
agentUIProps: { onSchedule, apiBaseUrl: globalUrl, theme, colorMode }
|
|
12734
12822
|
}
|
|
12735
12823
|
)
|
|
12736
12824
|
] });
|
|
@@ -12878,7 +12966,7 @@ function useAppLookup(appName) {
|
|
|
12878
12966
|
|
|
12879
12967
|
// components/UsageBar.tsx
|
|
12880
12968
|
import { Box as Box19, Typography as Typography18, Tooltip as Tooltip13 } from "@mui/material";
|
|
12881
|
-
import { jsx as jsx25, jsxs as
|
|
12969
|
+
import { jsx as jsx25, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
12882
12970
|
var fmt = (n) => n.toLocaleString();
|
|
12883
12971
|
var UsageBar = ({
|
|
12884
12972
|
label,
|
|
@@ -12895,8 +12983,8 @@ var UsageBar = ({
|
|
|
12895
12983
|
const isWarn = pct >= 65 && !isOver;
|
|
12896
12984
|
const accent = isOver ? "hsl(var(--destructive))" : isWarn ? "hsl(var(--severity-medium))" : "hsl(var(--muted-foreground))";
|
|
12897
12985
|
const tooltipText = safeLimit > 0 ? `${pct.toFixed(0)}% used \xB7 ${fmt(usage)} / ${fmt(safeLimit)}${unit ? " " + unit : ""}${hint ? " \xB7 " + hint : ""}` : `${fmt(usage)}${unit ? " " + unit : ""}${hint ? " \xB7 " + hint : ""}`;
|
|
12898
|
-
return /* @__PURE__ */ jsx25(Tooltip13, { title: tooltipText, placement: "top", arrow: true, children: /* @__PURE__ */
|
|
12899
|
-
/* @__PURE__ */
|
|
12986
|
+
return /* @__PURE__ */ jsx25(Tooltip13, { title: tooltipText, placement: "top", arrow: true, children: /* @__PURE__ */ jsxs22(Box19, { sx: { display: "flex", flexDirection: "column", gap: 0.5, py: 0.25 }, children: [
|
|
12987
|
+
/* @__PURE__ */ jsxs22(Box19, { sx: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: 1 }, children: [
|
|
12900
12988
|
/* @__PURE__ */ jsx25(
|
|
12901
12989
|
Typography18,
|
|
12902
12990
|
{
|
|
@@ -12909,7 +12997,7 @@ var UsageBar = ({
|
|
|
12909
12997
|
children: label
|
|
12910
12998
|
}
|
|
12911
12999
|
),
|
|
12912
|
-
/* @__PURE__ */
|
|
13000
|
+
/* @__PURE__ */ jsxs22(Box19, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
12913
13001
|
actionLabel && actionHref && (isWarn || isOver) && /* @__PURE__ */ jsx25(
|
|
12914
13002
|
Box19,
|
|
12915
13003
|
{
|
|
@@ -12966,7 +13054,7 @@ var withMcpTheme = (Inner, displayName) => {
|
|
|
12966
13054
|
const Wrapped = ({ theme, colorMode, ...rest }) => React5.createElement(
|
|
12967
13055
|
ShuffleMcpThemeProvider,
|
|
12968
13056
|
{ mode: resolveMode(theme, colorMode) },
|
|
12969
|
-
React5.createElement(Inner, { ...rest })
|
|
13057
|
+
React5.createElement(Inner, { ...rest, theme, colorMode })
|
|
12970
13058
|
);
|
|
12971
13059
|
Wrapped.displayName = `ShuffleMCPs(${displayName})`;
|
|
12972
13060
|
return Wrapped;
|
|
@@ -12976,7 +13064,7 @@ var withMcpThemeRef = (Inner, displayName) => {
|
|
|
12976
13064
|
({ theme, colorMode, ...rest }, ref) => React5.createElement(
|
|
12977
13065
|
ShuffleMcpThemeProvider,
|
|
12978
13066
|
{ mode: resolveMode(theme, colorMode) },
|
|
12979
|
-
React5.createElement(Inner, { ...rest, ref })
|
|
13067
|
+
React5.createElement(Inner, { ...rest, theme, colorMode, ref })
|
|
12980
13068
|
)
|
|
12981
13069
|
);
|
|
12982
13070
|
Wrapped.displayName = `ShuffleMCPs(${displayName})`;
|