@mcp-use/inspector 7.0.0-canary.7 → 7.0.0-canary.8
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/cdn/inspector.js +352 -340
- package/dist/client/components/shared/TabCountBadge.d.ts +9 -0
- package/dist/client/components/shared/TabCountBadge.d.ts.map +1 -0
- package/dist/client/components/shared/index.d.ts +1 -0
- package/dist/client/components/shared/index.d.ts.map +1 -1
- package/dist/client/index.js +690 -687
- package/dist/web/assets/{index-D96sMYS2.js → index-B5Pi8EF8.js} +10 -10
- package/dist/web/index.html +2 -2
- package/package.json +2 -2
package/dist/cdn/inspector.js
CHANGED
|
@@ -26903,7 +26903,7 @@ var Ud = class {
|
|
|
26903
26903
|
//#region src/client/telemetry/utils.ts
|
|
26904
26904
|
function of() {
|
|
26905
26905
|
try {
|
|
26906
|
-
return "7.0.0-canary.
|
|
26906
|
+
return "7.0.0-canary.8";
|
|
26907
26907
|
} catch {
|
|
26908
26908
|
return "0.0.0";
|
|
26909
26909
|
}
|
|
@@ -48440,9 +48440,9 @@ var qA, JA, YA, XA, ZA, QA, $A, ej, tj, nj, rj, ij, aj, oj, Kce, qce, sj, cj, lj
|
|
|
48440
48440
|
}(), wue);
|
|
48441
48441
|
}));
|
|
48442
48442
|
//#endregion
|
|
48443
|
-
//#region ../mcp-use/dist/chunk-
|
|
48443
|
+
//#region ../mcp-use/dist/chunk-ZWQMXQQQ.js
|
|
48444
48444
|
Yp();
|
|
48445
|
-
var kue = "1.29.0-canary.
|
|
48445
|
+
var kue = "1.29.0-canary.8";
|
|
48446
48446
|
function nI() {
|
|
48447
48447
|
return kue;
|
|
48448
48448
|
}
|
|
@@ -137628,8 +137628,16 @@ function i$e({ notifications: e, unreadCount: t, markNotificationRead: n, markAl
|
|
|
137628
137628
|
});
|
|
137629
137629
|
}
|
|
137630
137630
|
//#endregion
|
|
137631
|
+
//#region src/client/components/shared/TabCountBadge.tsx
|
|
137632
|
+
function a$e({ count: e, isActive: t, size: n = "md" }) {
|
|
137633
|
+
return e <= 0 ? null : /* @__PURE__ */ (0, O.jsx)("span", {
|
|
137634
|
+
className: V(t ? "dark:bg-black" : "dark:bg-zinc-700", "shrink-0 ml-1 bg-zinc-200 text-zinc-700 dark:text-zinc-300 rounded-full font-medium", n === "sm" && "text-[10px] px-1.5 py-0.5", n === "md" && "text-xs px-2 py-0.5"),
|
|
137635
|
+
children: e
|
|
137636
|
+
});
|
|
137637
|
+
}
|
|
137638
|
+
//#endregion
|
|
137631
137639
|
//#region src/client/components/shared/ListTabHeader.tsx
|
|
137632
|
-
function
|
|
137640
|
+
function o$e({ activeTab: e, isSearchExpanded: t, searchQuery: n, primaryTabTitle: r, secondaryTabTitle: i, primaryCount: a, secondaryCount: o, secondaryIcon: s, primaryIcon: c, searchPlaceholder: l = "Search...", onSearchExpand: u, onSearchChange: d, onSearchBlur: f, onTabSwitch: p, searchInputRef: m, primaryTabName: h, onRefresh: g, isRefreshing: _ = !1 }) {
|
|
137633
137641
|
let v = e === h;
|
|
137634
137642
|
return /* @__PURE__ */ (0, O.jsxs)("div", {
|
|
137635
137643
|
className: "flex flex-row items-center justify-between p-4 sm:p-4 py-3 gap-2",
|
|
@@ -137703,7 +137711,7 @@ function a$e({ activeTab: e, isSearchExpanded: t, searchQuery: n, primaryTabTitl
|
|
|
137703
137711
|
}
|
|
137704
137712
|
//#endregion
|
|
137705
137713
|
//#region src/client/components/logging/JsonRpcLoggerView.tsx
|
|
137706
|
-
function
|
|
137714
|
+
function s$e({ serverIds: e, onCountChange: t, onClearRef: n, onExportRef: r } = {}) {
|
|
137707
137715
|
let [i, a] = (0, A.useState)([]), o = (0, A.useRef)(null), [s, c] = (0, A.useState)(/* @__PURE__ */ new Set()), [l] = (0, A.useState)(""), u = (e) => {
|
|
137708
137716
|
c((t) => {
|
|
137709
137717
|
let n = new Set(t);
|
|
@@ -137923,7 +137931,7 @@ function R9({ serverId: e, className: t }) {
|
|
|
137923
137931
|
}), /* @__PURE__ */ (0, O.jsx)(jf, { className: `h-4 w-4 text-muted-foreground transition-transform ${i ? "" : "rotate-180"}` })]
|
|
137924
137932
|
}), /* @__PURE__ */ (0, O.jsx)("div", {
|
|
137925
137933
|
className: `flex-1 overflow-hidden min-h-0 ${i ? "hidden" : ""}`,
|
|
137926
|
-
children: /* @__PURE__ */ (0, O.jsx)(
|
|
137934
|
+
children: /* @__PURE__ */ (0, O.jsx)(s$e, {
|
|
137927
137935
|
serverIds: [e],
|
|
137928
137936
|
onCountChange: r,
|
|
137929
137937
|
onClearRef: s,
|
|
@@ -137935,7 +137943,7 @@ function R9({ serverId: e, className: t }) {
|
|
|
137935
137943
|
R9.displayName = "RpcPanel";
|
|
137936
137944
|
//#endregion
|
|
137937
137945
|
//#region src/client/components/prompts/PromptsList.tsx
|
|
137938
|
-
function
|
|
137946
|
+
function c$e({ prompts: e, selectedPrompt: t, onPromptSelect: n, focusedIndex: r }) {
|
|
137939
137947
|
return e.length === 0 ? /* @__PURE__ */ (0, O.jsxs)("div", {
|
|
137940
137948
|
className: "flex flex-col items-center justify-center h-full p-4 text-center",
|
|
137941
137949
|
children: [/* @__PURE__ */ (0, O.jsx)(fp, { className: "h-12 w-12 text-gray-400 dark:text-gray-600 mb-3" }), /* @__PURE__ */ (0, O.jsx)("p", {
|
|
@@ -137963,8 +137971,8 @@ function s$e({ prompts: e, selectedPrompt: t, onPromptSelect: n, focusedIndex: r
|
|
|
137963
137971
|
}
|
|
137964
137972
|
//#endregion
|
|
137965
137973
|
//#region src/client/components/prompts/PromptsTabHeader.tsx
|
|
137966
|
-
function
|
|
137967
|
-
return /* @__PURE__ */ (0, O.jsx)(
|
|
137974
|
+
function l$e({ activeTab: e, isSearchExpanded: t, searchQuery: n, filteredPromptsCount: r, savedPromptsCount: i, onSearchExpand: a, onSearchChange: o, onSearchBlur: s, onTabSwitch: c, searchInputRef: l, onRefresh: u, isRefreshing: d }) {
|
|
137975
|
+
return /* @__PURE__ */ (0, O.jsx)(o$e, {
|
|
137968
137976
|
activeTab: e,
|
|
137969
137977
|
isSearchExpanded: t,
|
|
137970
137978
|
searchQuery: n,
|
|
@@ -137988,7 +137996,7 @@ function c$e({ activeTab: e, isSearchExpanded: t, searchQuery: n, filteredPrompt
|
|
|
137988
137996
|
}
|
|
137989
137997
|
//#endregion
|
|
137990
137998
|
//#region src/client/components/prompts/SavedPromptsList.tsx
|
|
137991
|
-
function
|
|
137999
|
+
function u$e({ savedPrompts: e, selectedPrompt: t, onLoadPrompt: n, onDeletePrompt: r, focusedIndex: i }) {
|
|
137992
138000
|
return e.length === 0 ? /* @__PURE__ */ (0, O.jsxs)("div", {
|
|
137993
138001
|
className: "flex flex-col items-center justify-center h-full p-4 text-center",
|
|
137994
138002
|
children: [
|
|
@@ -138017,7 +138025,7 @@ function l$e({ savedPrompts: e, selectedPrompt: t, onLoadPrompt: n, onDeleteProm
|
|
|
138017
138025
|
}
|
|
138018
138026
|
//#endregion
|
|
138019
138027
|
//#region src/client/components/prompts/PromptInputForm.tsx
|
|
138020
|
-
function
|
|
138028
|
+
function d$e({ selectedPrompt: e, promptArgs: t, onArgChange: n }) {
|
|
138021
138029
|
let r = e?.arguments || [];
|
|
138022
138030
|
if (!(r.length > 0)) return /* @__PURE__ */ (0, O.jsx)("div", {
|
|
138023
138031
|
className: "flex items-center justify-center h-32 text-gray-500 dark:text-gray-400 text-sm",
|
|
@@ -138132,7 +138140,7 @@ function u$e({ selectedPrompt: e, promptArgs: t, onArgChange: n }) {
|
|
|
138132
138140
|
}
|
|
138133
138141
|
//#endregion
|
|
138134
138142
|
//#region src/client/components/prompts/PromptExecutionPanel.tsx
|
|
138135
|
-
function
|
|
138143
|
+
function f$e({ selectedPrompt: e, promptArgs: t, isExecuting: n, isConnected: r, onArgChange: i, onExecute: a, onSave: o }) {
|
|
138136
138144
|
return (0, A.useEffect)(() => {
|
|
138137
138145
|
let t = (t) => {
|
|
138138
138146
|
(t.metaKey || t.ctrlKey) && t.key === "Enter" && e && !n && r && (t.preventDefault(), a());
|
|
@@ -138192,7 +138200,7 @@ function d$e({ selectedPrompt: e, promptArgs: t, isExecuting: n, isConnected: r,
|
|
|
138192
138200
|
})] })
|
|
138193
138201
|
}), /* @__PURE__ */ (0, O.jsx)("div", {
|
|
138194
138202
|
className: "flex-1 overflow-y-auto px-3 sm:px-6 pb-4 pr-3",
|
|
138195
|
-
children: /* @__PURE__ */ (0, O.jsx)(
|
|
138203
|
+
children: /* @__PURE__ */ (0, O.jsx)(d$e, {
|
|
138196
138204
|
selectedPrompt: e,
|
|
138197
138205
|
promptArgs: t,
|
|
138198
138206
|
onArgChange: i
|
|
@@ -138211,7 +138219,7 @@ function d$e({ selectedPrompt: e, promptArgs: t, isExecuting: n, isConnected: r,
|
|
|
138211
138219
|
}
|
|
138212
138220
|
//#endregion
|
|
138213
138221
|
//#region src/client/components/prompts/PromptMessageCard.tsx
|
|
138214
|
-
function
|
|
138222
|
+
function p$e(e) {
|
|
138215
138223
|
switch (e) {
|
|
138216
138224
|
case "system": return "default";
|
|
138217
138225
|
case "user": return "outline";
|
|
@@ -138219,26 +138227,26 @@ function f$e(e) {
|
|
|
138219
138227
|
default: return "outline";
|
|
138220
138228
|
}
|
|
138221
138229
|
}
|
|
138222
|
-
function
|
|
138230
|
+
function m$e(e) {
|
|
138223
138231
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
138224
138232
|
}
|
|
138225
|
-
function
|
|
138233
|
+
function h$e(e) {
|
|
138226
138234
|
return typeof e == "string" ? e : e.text ? e.text : e.type === "resource" && e.resource?.text ? e.resource.text : e.type === "image" ? `[Image: ${e.mimeType || "unknown type"}]` : JSON.stringify(e, null, 2);
|
|
138227
138235
|
}
|
|
138228
|
-
function
|
|
138236
|
+
function g$e({ message: e, index: t }) {
|
|
138229
138237
|
let [n, r] = (0, A.useState)(!1);
|
|
138230
138238
|
return /* @__PURE__ */ (0, O.jsxs)("div", {
|
|
138231
138239
|
className: "border border-border rounded-lg overflow-hidden bg-white dark:bg-zinc-900",
|
|
138232
138240
|
children: [/* @__PURE__ */ (0, O.jsxs)("div", {
|
|
138233
138241
|
className: "flex items-center justify-between px-4 py-2 bg-muted/30 border-b border-border",
|
|
138234
138242
|
children: [/* @__PURE__ */ (0, O.jsx)(It, {
|
|
138235
|
-
variant:
|
|
138236
|
-
children:
|
|
138243
|
+
variant: p$e(e.role),
|
|
138244
|
+
children: m$e(e.role)
|
|
138237
138245
|
}), /* @__PURE__ */ (0, O.jsx)(H, {
|
|
138238
138246
|
variant: "ghost",
|
|
138239
138247
|
size: "sm",
|
|
138240
138248
|
onClick: async () => {
|
|
138241
|
-
await pR(
|
|
138249
|
+
await pR(h$e(e.content)), r(!0), setTimeout(() => r(!1), 2e3);
|
|
138242
138250
|
},
|
|
138243
138251
|
className: "h-6 px-2",
|
|
138244
138252
|
title: "Copy message content",
|
|
@@ -138284,20 +138292,20 @@ function h$e({ message: e, index: t }) {
|
|
|
138284
138292
|
}
|
|
138285
138293
|
//#endregion
|
|
138286
138294
|
//#region src/client/components/prompts/PromptResultDisplay.tsx
|
|
138287
|
-
function
|
|
138295
|
+
function _$e(e) {
|
|
138288
138296
|
let t = Date.now() - e, n = Math.floor(t / 1e3), r = Math.floor(n / 60), i = Math.floor(r / 60), a = Math.floor(i / 24);
|
|
138289
138297
|
return n < 10 ? "now" : n < 60 ? `${n}s ago` : r < 60 ? `${r}m ago` : i < 24 ? `${i}h ago` : `${a}d ago`;
|
|
138290
138298
|
}
|
|
138291
|
-
function
|
|
138299
|
+
function v$e(e) {
|
|
138292
138300
|
return "isError" in e && !e.isError ? null : "error" in e && e.error ? String(e.error) : "isError" in e && e.isError ? "An error occurred" : null;
|
|
138293
138301
|
}
|
|
138294
|
-
function
|
|
138302
|
+
function y$e({ results: e, copiedResult: t, previewMode: n = !0, onCopy: r, onDelete: i, onFullscreen: a, onTogglePreview: o, onMaximize: s, isMaximized: c = !1 }) {
|
|
138295
138303
|
let [l, u] = (0, A.useState)(0), [d, f] = (0, A.useState)(""), [p, m] = (0, A.useState)(!0), h = e[0], g = h ? e.filter((e) => e.promptName === h.promptName) : [], _ = g[l] || g[0], v = e.findIndex((e) => e === _);
|
|
138296
138304
|
if ((0, A.useEffect)(() => {
|
|
138297
138305
|
g.length > 0 && l >= g.length && u(0);
|
|
138298
138306
|
}, [g.length, l]), (0, A.useEffect)(() => {
|
|
138299
138307
|
let e = () => {
|
|
138300
|
-
_ && f(
|
|
138308
|
+
_ && f(_$e(_.timestamp));
|
|
138301
138309
|
};
|
|
138302
138310
|
e();
|
|
138303
138311
|
let t = setInterval(e, 1e3);
|
|
@@ -138319,7 +138327,7 @@ function v$e({ results: e, copiedResult: t, previewMode: n = !0, onCopy: r, onDe
|
|
|
138319
138327
|
})
|
|
138320
138328
|
})
|
|
138321
138329
|
});
|
|
138322
|
-
let y = _.error ||
|
|
138330
|
+
let y = _.error || v$e(_.result), b = "messages" in _.result && Array.isArray(_.result.messages);
|
|
138323
138331
|
return /* @__PURE__ */ (0, O.jsx)("div", {
|
|
138324
138332
|
className: "flex flex-col h-full bg-white dark:bg-black border-t dark:border-zinc-700",
|
|
138325
138333
|
children: /* @__PURE__ */ (0, O.jsx)("div", {
|
|
@@ -138431,7 +138439,7 @@ function v$e({ results: e, copiedResult: t, previewMode: n = !0, onCopy: r, onDe
|
|
|
138431
138439
|
})]
|
|
138432
138440
|
}) : p && b ? /* @__PURE__ */ (0, O.jsx)("div", {
|
|
138433
138441
|
className: "space-y-3",
|
|
138434
|
-
children: ("messages" in _.result ? _.result.messages : []).map((e, t) => /* @__PURE__ */ (0, O.jsx)(
|
|
138442
|
+
children: ("messages" in _.result ? _.result.messages : []).map((e, t) => /* @__PURE__ */ (0, O.jsx)(g$e, {
|
|
138435
138443
|
message: e,
|
|
138436
138444
|
index: t
|
|
138437
138445
|
}, t))
|
|
@@ -138446,8 +138454,8 @@ function v$e({ results: e, copiedResult: t, previewMode: n = !0, onCopy: r, onDe
|
|
|
138446
138454
|
}
|
|
138447
138455
|
//#endregion
|
|
138448
138456
|
//#region src/client/components/PromptsTab.tsx
|
|
138449
|
-
var
|
|
138450
|
-
function
|
|
138457
|
+
var b$e = "mcp-inspector-saved-prompts";
|
|
138458
|
+
function x$e({ ref: e, prompts: t, callPrompt: n, serverId: r, isConnected: i, refreshPrompts: a }) {
|
|
138451
138459
|
let [o, s] = (0, A.useState)(!1), [c, l] = (0, A.useState)(null), { selectedPromptName: u, setSelectedPromptName: d } = i0(), [f, p] = (0, A.useState)(null), [m, h] = (0, A.useState)("prompts"), [g, _] = (0, A.useState)([]), [v, y] = (0, A.useState)(!1), [b, x] = (0, A.useState)(""), [S, C] = (0, A.useState)(!1), [w, T] = (0, A.useState)(-1), E = (0, A.useRef)(null), [D, k] = (0, A.useState)(!1), [j, M] = (0, A.useState)("list"), [N, P] = (0, A.useState)(!1), { filteredPrompts: F, selectedPrompt: I, setSelectedPrompt: L, results: ee, handleDeleteResult: te, promptArgs: ne, setPromptArgs: re, isExecuting: ie, handlePromptSelect: R, handleArgChange: z, executeSelectedPrompt: ae, searchQuery: oe, setSearchQuery: se } = gIe({
|
|
138452
138460
|
prompts: t,
|
|
138453
138461
|
callPrompt: n,
|
|
@@ -138477,7 +138485,7 @@ function b$e({ ref: e, prompts: t, callPrompt: n, serverId: r, isConnected: i, r
|
|
|
138477
138485
|
}
|
|
138478
138486
|
})), (0, A.useEffect)(() => {
|
|
138479
138487
|
try {
|
|
138480
|
-
let e = localStorage.getItem(
|
|
138488
|
+
let e = localStorage.getItem(b$e);
|
|
138481
138489
|
e && _(JSON.parse(e));
|
|
138482
138490
|
} catch (e) {
|
|
138483
138491
|
console.error("[PromptsTab] Failed to load saved prompts:", e);
|
|
@@ -138485,7 +138493,7 @@ function b$e({ ref: e, prompts: t, callPrompt: n, serverId: r, isConnected: i, r
|
|
|
138485
138493
|
}, []);
|
|
138486
138494
|
let ue = (0, A.useCallback)((e) => {
|
|
138487
138495
|
try {
|
|
138488
|
-
localStorage.setItem(
|
|
138496
|
+
localStorage.setItem(b$e, JSON.stringify(e));
|
|
138489
138497
|
} catch (e) {
|
|
138490
138498
|
console.error("[PromptsTab] Failed to save prompts:", e);
|
|
138491
138499
|
}
|
|
@@ -138692,7 +138700,7 @@ function b$e({ ref: e, prompts: t, callPrompt: n, serverId: r, isConnected: i, r
|
|
|
138692
138700
|
damping: 30
|
|
138693
138701
|
},
|
|
138694
138702
|
className: "absolute inset-0 flex flex-col bg-background z-0",
|
|
138695
|
-
children: [/* @__PURE__ */ (0, O.jsx)(
|
|
138703
|
+
children: [/* @__PURE__ */ (0, O.jsx)(l$e, {
|
|
138696
138704
|
activeTab: m,
|
|
138697
138705
|
isSearchExpanded: S,
|
|
138698
138706
|
searchQuery: oe,
|
|
@@ -138705,12 +138713,12 @@ function b$e({ ref: e, prompts: t, callPrompt: n, serverId: r, isConnected: i, r
|
|
|
138705
138713
|
searchInputRef: E,
|
|
138706
138714
|
onRefresh: a ? fe : void 0,
|
|
138707
138715
|
isRefreshing: o
|
|
138708
|
-
}), m === "prompts" ? /* @__PURE__ */ (0, O.jsx)(
|
|
138716
|
+
}), m === "prompts" ? /* @__PURE__ */ (0, O.jsx)(c$e, {
|
|
138709
138717
|
prompts: F,
|
|
138710
138718
|
selectedPrompt: I,
|
|
138711
138719
|
onPromptSelect: R,
|
|
138712
138720
|
focusedIndex: w
|
|
138713
|
-
}) : /* @__PURE__ */ (0, O.jsx)(
|
|
138721
|
+
}) : /* @__PURE__ */ (0, O.jsx)(u$e, {
|
|
138714
138722
|
savedPrompts: g,
|
|
138715
138723
|
selectedPrompt: c,
|
|
138716
138724
|
onLoadPrompt: pe,
|
|
@@ -138728,7 +138736,7 @@ function b$e({ ref: e, prompts: t, callPrompt: n, serverId: r, isConnected: i, r
|
|
|
138728
138736
|
damping: 30
|
|
138729
138737
|
},
|
|
138730
138738
|
className: "absolute inset-0 bg-background z-10",
|
|
138731
|
-
children: /* @__PURE__ */ (0, O.jsx)(
|
|
138739
|
+
children: /* @__PURE__ */ (0, O.jsx)(f$e, {
|
|
138732
138740
|
selectedPrompt: I,
|
|
138733
138741
|
promptArgs: ne,
|
|
138734
138742
|
isExecuting: ie,
|
|
@@ -138748,7 +138756,7 @@ function b$e({ ref: e, prompts: t, callPrompt: n, serverId: r, isConnected: i, r
|
|
|
138748
138756
|
damping: 30
|
|
138749
138757
|
},
|
|
138750
138758
|
className: "absolute inset-0 bg-background z-20",
|
|
138751
|
-
children: /* @__PURE__ */ (0, O.jsx)(
|
|
138759
|
+
children: /* @__PURE__ */ (0, O.jsx)(y$e, {
|
|
138752
138760
|
results: ee,
|
|
138753
138761
|
copiedResult: f,
|
|
138754
138762
|
onCopy: me,
|
|
@@ -138778,7 +138786,7 @@ function b$e({ ref: e, prompts: t, callPrompt: n, serverId: r, isConnected: i, r
|
|
|
138778
138786
|
minSize: "30%",
|
|
138779
138787
|
children: /* @__PURE__ */ (0, O.jsxs)("div", {
|
|
138780
138788
|
className: "flex flex-col h-full overflow-hidden",
|
|
138781
|
-
children: [/* @__PURE__ */ (0, O.jsx)(
|
|
138789
|
+
children: [/* @__PURE__ */ (0, O.jsx)(l$e, {
|
|
138782
138790
|
activeTab: m,
|
|
138783
138791
|
isSearchExpanded: S,
|
|
138784
138792
|
searchQuery: oe,
|
|
@@ -138791,12 +138799,12 @@ function b$e({ ref: e, prompts: t, callPrompt: n, serverId: r, isConnected: i, r
|
|
|
138791
138799
|
searchInputRef: E,
|
|
138792
138800
|
onRefresh: a ? fe : void 0,
|
|
138793
138801
|
isRefreshing: o
|
|
138794
|
-
}), m === "prompts" ? /* @__PURE__ */ (0, O.jsx)(
|
|
138802
|
+
}), m === "prompts" ? /* @__PURE__ */ (0, O.jsx)(c$e, {
|
|
138795
138803
|
prompts: F,
|
|
138796
138804
|
selectedPrompt: I,
|
|
138797
138805
|
onPromptSelect: R,
|
|
138798
138806
|
focusedIndex: w
|
|
138799
|
-
}) : /* @__PURE__ */ (0, O.jsx)(
|
|
138807
|
+
}) : /* @__PURE__ */ (0, O.jsx)(u$e, {
|
|
138800
138808
|
savedPrompts: g,
|
|
138801
138809
|
selectedPrompt: c,
|
|
138802
138810
|
onLoadPrompt: pe,
|
|
@@ -138820,7 +138828,7 @@ function b$e({ ref: e, prompts: t, callPrompt: n, serverId: r, isConnected: i, r
|
|
|
138820
138828
|
panelRef: le,
|
|
138821
138829
|
defaultSize: "40%",
|
|
138822
138830
|
collapsible: !0,
|
|
138823
|
-
children: /* @__PURE__ */ (0, O.jsx)(
|
|
138831
|
+
children: /* @__PURE__ */ (0, O.jsx)(f$e, {
|
|
138824
138832
|
selectedPrompt: I,
|
|
138825
138833
|
promptArgs: ne,
|
|
138826
138834
|
isExecuting: ie,
|
|
@@ -138835,7 +138843,7 @@ function b$e({ ref: e, prompts: t, callPrompt: n, serverId: r, isConnected: i, r
|
|
|
138835
138843
|
defaultSize: "60%",
|
|
138836
138844
|
children: /* @__PURE__ */ (0, O.jsx)("div", {
|
|
138837
138845
|
className: "flex flex-col h-full",
|
|
138838
|
-
children: /* @__PURE__ */ (0, O.jsx)(
|
|
138846
|
+
children: /* @__PURE__ */ (0, O.jsx)(y$e, {
|
|
138839
138847
|
results: ee,
|
|
138840
138848
|
copiedResult: f,
|
|
138841
138849
|
onCopy: me,
|
|
@@ -138852,7 +138860,7 @@ function b$e({ ref: e, prompts: t, callPrompt: n, serverId: r, isConnected: i, r
|
|
|
138852
138860
|
]
|
|
138853
138861
|
});
|
|
138854
138862
|
}
|
|
138855
|
-
|
|
138863
|
+
x$e.displayName = "PromptsTab";
|
|
138856
138864
|
//#endregion
|
|
138857
138865
|
//#region src/client/components/McpUIRenderer.tsx
|
|
138858
138866
|
function z9(e) {
|
|
@@ -138860,7 +138868,7 @@ function z9(e) {
|
|
|
138860
138868
|
let t = e.mimeType.toLowerCase();
|
|
138861
138869
|
return t === "text/html" || t === "text/html;profile=mcp-app" || t === "text/html+skybridge" || t === "text/uri-list" || t.startsWith("application/vnd.mcp-ui.remote-dom");
|
|
138862
138870
|
}
|
|
138863
|
-
function
|
|
138871
|
+
function S$e({ resource: e, className: t }) {
|
|
138864
138872
|
let n = e, r = (0, A.useMemo)(() => {
|
|
138865
138873
|
if (n.text) return n.text;
|
|
138866
138874
|
if (n.blob) try {
|
|
@@ -138886,7 +138894,7 @@ function x$e({ resource: e, className: t }) {
|
|
|
138886
138894
|
}
|
|
138887
138895
|
//#endregion
|
|
138888
138896
|
//#region src/client/components/resources/ResourceResultDisplay.tsx
|
|
138889
|
-
function
|
|
138897
|
+
function C$e(e) {
|
|
138890
138898
|
if ("error" in e && e.error && typeof e.error == "string") return e.error;
|
|
138891
138899
|
if (!("isError" in e && e.isError)) return null;
|
|
138892
138900
|
if ("contents" in e && Array.isArray(e.contents)) {
|
|
@@ -138895,7 +138903,7 @@ function S$e(e) {
|
|
|
138895
138903
|
}
|
|
138896
138904
|
return "An error occurred";
|
|
138897
138905
|
}
|
|
138898
|
-
function
|
|
138906
|
+
function w$e({ result: e, isLoading: t, previewMode: n, serverId: r, readResource: i, onTogglePreview: a, onCopy: o, onDownload: s, onFullscreen: c, isCopied: l = !1, selectedResource: u, llmConfig: d }) {
|
|
138899
138907
|
let f = (0, A.useMemo)(() => ({}), []), [p, m] = (0, A.useState)(null), h = (0, A.useCallback)((e) => {
|
|
138900
138908
|
m(e);
|
|
138901
138909
|
}, []), [g, _] = (0, A.useState)("inline"), v = [], y;
|
|
@@ -138929,7 +138937,7 @@ function C$e({ result: e, isLoading: t, previewMode: n, serverId: r, readResourc
|
|
|
138929
138937
|
children: "Choose a resource from the list to see its data"
|
|
138930
138938
|
})]
|
|
138931
138939
|
});
|
|
138932
|
-
let j = e.error || (e.result ?
|
|
138940
|
+
let j = e.error || (e.result ? C$e(e.result) : null);
|
|
138933
138941
|
if (j) return /* @__PURE__ */ (0, O.jsx)("div", {
|
|
138934
138942
|
className: "p-4",
|
|
138935
138943
|
children: /* @__PURE__ */ (0, O.jsxs)("div", {
|
|
@@ -139091,7 +139099,7 @@ function C$e({ result: e, isLoading: t, previewMode: n, serverId: r, readResourc
|
|
|
139091
139099
|
className: "mx-0 size-full",
|
|
139092
139100
|
children: /* @__PURE__ */ (0, O.jsx)("div", {
|
|
139093
139101
|
className: "w-full h-full",
|
|
139094
|
-
children: /* @__PURE__ */ (0, O.jsx)(
|
|
139102
|
+
children: /* @__PURE__ */ (0, O.jsx)(S$e, {
|
|
139095
139103
|
resource: e,
|
|
139096
139104
|
className: "w-full h-full",
|
|
139097
139105
|
customProps: p || void 0
|
|
@@ -139130,12 +139138,12 @@ function C$e({ result: e, isLoading: t, previewMode: n, serverId: r, readResourc
|
|
|
139130
139138
|
}
|
|
139131
139139
|
//#endregion
|
|
139132
139140
|
//#region src/client/components/resources/ResourcesList.tsx
|
|
139133
|
-
function
|
|
139141
|
+
function T$e(e, t) {
|
|
139134
139142
|
if (!e && !t) return /* @__PURE__ */ (0, O.jsx)(Qf, { className: "h-5 w-5" });
|
|
139135
139143
|
let n = (e || t || "").toLowerCase();
|
|
139136
139144
|
return n.includes("image") ? /* @__PURE__ */ (0, O.jsx)(Xf, { className: "h-5 w-5" }) : n.includes("json") || n.includes("javascript") || n.includes("typescript") ? /* @__PURE__ */ (0, O.jsx)(Yf, { className: "h-5 w-5" }) : n.includes("html") || n.includes("xml") ? /* @__PURE__ */ (0, O.jsx)(ep, { className: "h-5 w-5" }) : n.includes("database") || n.includes("sql") ? /* @__PURE__ */ (0, O.jsx)(Wf, { className: "h-5 w-5" }) : /* @__PURE__ */ (0, O.jsx)(Zf, { className: "h-5 w-5" });
|
|
139137
139145
|
}
|
|
139138
|
-
function
|
|
139146
|
+
function E$e({ resources: e, selectedResource: t, onResourceSelect: n, focusedIndex: r }) {
|
|
139139
139147
|
return e.length === 0 ? /* @__PURE__ */ (0, O.jsxs)("div", {
|
|
139140
139148
|
className: "flex flex-col items-center justify-center h-full p-4 text-center",
|
|
139141
139149
|
children: [/* @__PURE__ */ (0, O.jsx)(Wf, { className: "h-12 w-12 text-gray-400 dark:text-gray-600 mb-3" }), /* @__PURE__ */ (0, O.jsx)("p", {
|
|
@@ -139145,7 +139153,7 @@ function T$e({ resources: e, selectedResource: t, onResourceSelect: n, focusedIn
|
|
|
139145
139153
|
}) : /* @__PURE__ */ (0, O.jsx)("div", {
|
|
139146
139154
|
className: "overflow-y-auto flex-1 overscroll-contain",
|
|
139147
139155
|
children: e.map((e, i) => {
|
|
139148
|
-
let a =
|
|
139156
|
+
let a = T$e(e.mimeType, e.uri), o = [e.description, e.mimeType && /* @__PURE__ */ (0, O.jsx)("span", {
|
|
139149
139157
|
className: "font-mono",
|
|
139150
139158
|
children: e.mimeType
|
|
139151
139159
|
}, "mime")].filter(Boolean);
|
|
@@ -139170,7 +139178,7 @@ function T$e({ resources: e, selectedResource: t, onResourceSelect: n, focusedIn
|
|
|
139170
139178
|
}
|
|
139171
139179
|
//#endregion
|
|
139172
139180
|
//#region src/client/components/resources/ResourcesTabHeader.tsx
|
|
139173
|
-
function
|
|
139181
|
+
function D$e({ isSearchExpanded: e, searchQuery: t, filteredResourcesCount: n, onSearchExpand: r, onSearchChange: i, onSearchBlur: a, searchInputRef: o, onRefresh: s, isRefreshing: c = !1 }) {
|
|
139174
139182
|
return /* @__PURE__ */ (0, O.jsx)("div", {
|
|
139175
139183
|
className: "flex flex-row items-center justify-between p-4 sm:p-4 py-3 gap-2",
|
|
139176
139184
|
children: /* @__PURE__ */ (0, O.jsx)("div", {
|
|
@@ -139227,7 +139235,7 @@ function E$e({ isSearchExpanded: e, searchQuery: t, filteredResourcesCount: n, o
|
|
|
139227
139235
|
}
|
|
139228
139236
|
//#endregion
|
|
139229
139237
|
//#region src/client/components/ResourcesTab.tsx
|
|
139230
|
-
function
|
|
139238
|
+
function O$e({ ref: e, resources: t, readResource: n, serverId: r, isConnected: i, mcpServerUrl: a, refreshResources: o }) {
|
|
139231
139239
|
let [s, c] = (0, A.useState)(!1), [l, u] = (0, A.useState)(null), { selectedResourceUri: d, setSelectedResourceUri: f } = i0(), { llmConfig: p } = X7({ mcpServerUrl: a }), [m, h] = (0, A.useState)(null), [g, _] = (0, A.useState)(!1), [v, y] = (0, A.useState)(""), [b] = (0, A.useState)("resources"), [x, S] = (0, A.useState)(!0), [C, w] = (0, A.useState)(!1), [T, E] = (0, A.useState)(-1), [D, k] = (0, A.useState)(!1), j = (0, A.useRef)(null), M = (0, A.useRef)(null), [N, P] = (0, A.useState)(!1), [F, I] = (0, A.useState)("list");
|
|
139232
139240
|
(0, A.useEffect)(() => {
|
|
139233
139241
|
let e = () => {
|
|
@@ -139431,7 +139439,7 @@ function D$e({ ref: e, resources: t, readResource: n, serverId: r, isConnected:
|
|
|
139431
139439
|
damping: 30
|
|
139432
139440
|
},
|
|
139433
139441
|
className: "absolute inset-0 flex flex-col bg-background z-0",
|
|
139434
|
-
children: [/* @__PURE__ */ (0, O.jsx)(
|
|
139442
|
+
children: [/* @__PURE__ */ (0, O.jsx)(D$e, {
|
|
139435
139443
|
activeTab: b,
|
|
139436
139444
|
isSearchExpanded: C,
|
|
139437
139445
|
searchQuery: v,
|
|
@@ -139445,7 +139453,7 @@ function D$e({ ref: e, resources: t, readResource: n, serverId: r, isConnected:
|
|
|
139445
139453
|
isRefreshing: s
|
|
139446
139454
|
}), /* @__PURE__ */ (0, O.jsx)("div", {
|
|
139447
139455
|
className: "flex flex-col h-full",
|
|
139448
|
-
children: /* @__PURE__ */ (0, O.jsx)(
|
|
139456
|
+
children: /* @__PURE__ */ (0, O.jsx)(E$e, {
|
|
139449
139457
|
resources: te,
|
|
139450
139458
|
selectedResource: l,
|
|
139451
139459
|
onResourceSelect: ne,
|
|
@@ -139465,7 +139473,7 @@ function D$e({ ref: e, resources: t, readResource: n, serverId: r, isConnected:
|
|
|
139465
139473
|
children: /* @__PURE__ */ (0, O.jsx)("div", {
|
|
139466
139474
|
ref: M,
|
|
139467
139475
|
className: "h-full",
|
|
139468
|
-
children: /* @__PURE__ */ (0, O.jsx)(
|
|
139476
|
+
children: /* @__PURE__ */ (0, O.jsx)(w$e, {
|
|
139469
139477
|
result: m,
|
|
139470
139478
|
isLoading: g,
|
|
139471
139479
|
previewMode: x,
|
|
@@ -139497,7 +139505,7 @@ function D$e({ ref: e, resources: t, readResource: n, serverId: r, isConnected:
|
|
|
139497
139505
|
minSize: "30%",
|
|
139498
139506
|
children: /* @__PURE__ */ (0, O.jsxs)("div", {
|
|
139499
139507
|
className: "flex flex-col h-full overflow-hidden",
|
|
139500
|
-
children: [/* @__PURE__ */ (0, O.jsx)(
|
|
139508
|
+
children: [/* @__PURE__ */ (0, O.jsx)(D$e, {
|
|
139501
139509
|
activeTab: b,
|
|
139502
139510
|
isSearchExpanded: C,
|
|
139503
139511
|
searchQuery: v,
|
|
@@ -139509,7 +139517,7 @@ function D$e({ ref: e, resources: t, readResource: n, serverId: r, isConnected:
|
|
|
139509
139517
|
searchInputRef: j,
|
|
139510
139518
|
onRefresh: o ? ee : void 0,
|
|
139511
139519
|
isRefreshing: s
|
|
139512
|
-
}), /* @__PURE__ */ (0, O.jsx)(
|
|
139520
|
+
}), /* @__PURE__ */ (0, O.jsx)(E$e, {
|
|
139513
139521
|
resources: te,
|
|
139514
139522
|
selectedResource: l,
|
|
139515
139523
|
onResourceSelect: ne,
|
|
@@ -139528,7 +139536,7 @@ function D$e({ ref: e, resources: t, readResource: n, serverId: r, isConnected:
|
|
|
139528
139536
|
children: /* @__PURE__ */ (0, O.jsx)("div", {
|
|
139529
139537
|
ref: M,
|
|
139530
139538
|
className: "h-full bg-white dark:bg-zinc-900",
|
|
139531
|
-
children: /* @__PURE__ */ (0, O.jsx)(
|
|
139539
|
+
children: /* @__PURE__ */ (0, O.jsx)(w$e, {
|
|
139532
139540
|
result: m,
|
|
139533
139541
|
isLoading: g,
|
|
139534
139542
|
previewMode: x,
|
|
@@ -139547,10 +139555,10 @@ function D$e({ ref: e, resources: t, readResource: n, serverId: r, isConnected:
|
|
|
139547
139555
|
]
|
|
139548
139556
|
});
|
|
139549
139557
|
}
|
|
139550
|
-
|
|
139558
|
+
O$e.displayName = "ResourcesTab";
|
|
139551
139559
|
//#endregion
|
|
139552
139560
|
//#region src/client/components/sampling/SamplingTabHeader.tsx
|
|
139553
|
-
function
|
|
139561
|
+
function k$e({ isSearchExpanded: e, searchQuery: t, filteredRequestsCount: n, requestsCount: r, onSearchExpand: i, onSearchChange: a, onSearchBlur: o, onRejectAll: s, searchInputRef: c }) {
|
|
139554
139562
|
return /* @__PURE__ */ (0, O.jsxs)("div", {
|
|
139555
139563
|
className: "flex flex-row items-center justify-between p-4 sm:p-4 py-3 gap-2",
|
|
139556
139564
|
children: [/* @__PURE__ */ (0, O.jsx)("div", {
|
|
@@ -139608,7 +139616,7 @@ function O$e({ isSearchExpanded: e, searchQuery: t, filteredRequestsCount: n, re
|
|
|
139608
139616
|
}
|
|
139609
139617
|
//#endregion
|
|
139610
139618
|
//#region src/client/components/sampling/SamplingRequestsList.tsx
|
|
139611
|
-
function
|
|
139619
|
+
function A$e({ requests: e, selectedRequest: t, onRequestSelect: n, focusedIndex: r, formatRelativeTime: i, listRef: a }) {
|
|
139612
139620
|
return e.length === 0 ? /* @__PURE__ */ (0, O.jsx)("div", {
|
|
139613
139621
|
className: "flex flex-col items-center justify-center h-full p-4 text-center",
|
|
139614
139622
|
children: /* @__PURE__ */ (0, O.jsx)(pu, {
|
|
@@ -139640,7 +139648,7 @@ function k$e({ requests: e, selectedRequest: t, onRequestSelect: n, focusedIndex
|
|
|
139640
139648
|
}
|
|
139641
139649
|
//#endregion
|
|
139642
139650
|
//#region src/client/components/sampling/useSamplingLLM.ts
|
|
139643
|
-
function
|
|
139651
|
+
function j$e({ llmConfig: e }) {
|
|
139644
139652
|
return {
|
|
139645
139653
|
generateResponse: (0, A.useCallback)(async ({ request: t }) => {
|
|
139646
139654
|
if (!e) throw Error("LLM config is not available");
|
|
@@ -139682,8 +139690,8 @@ function A$e({ llmConfig: e }) {
|
|
|
139682
139690
|
}
|
|
139683
139691
|
//#endregion
|
|
139684
139692
|
//#region src/client/components/sampling/SamplingRequestDisplay.tsx
|
|
139685
|
-
function
|
|
139686
|
-
let [f, p] = (0, A.useState)("manual"), [m, h] = (0, A.useState)("stub-model"), [g, v] = (0, A.useState)("endTurn"), [y, b] = (0, A.useState)("assistant"), [x, S] = (0, A.useState)("text"), [C, w] = (0, A.useState)("positive"), [T, E] = (0, A.useState)(""), [D, k] = (0, A.useState)("image/png"), [j, M] = (0, A.useState)(!1), [N, P] = (0, A.useState)(null), { generateResponse: F, isAvailable: I } =
|
|
139693
|
+
function M$e({ request: e, onApprove: t, onReject: n, onClose: r, previewMode: i, onTogglePreview: a, isCopied: o, onCopy: s, onDownload: c, onFullscreen: l, llmConfig: d }) {
|
|
139694
|
+
let [f, p] = (0, A.useState)("manual"), [m, h] = (0, A.useState)("stub-model"), [g, v] = (0, A.useState)("endTurn"), [y, b] = (0, A.useState)("assistant"), [x, S] = (0, A.useState)("text"), [C, w] = (0, A.useState)("positive"), [T, E] = (0, A.useState)(""), [D, k] = (0, A.useState)("image/png"), [j, M] = (0, A.useState)(!1), [N, P] = (0, A.useState)(null), { generateResponse: F, isAvailable: I } = j$e({ llmConfig: d });
|
|
139687
139695
|
(0, A.useEffect)(() => {
|
|
139688
139696
|
e && (h(f === "llm" && d?.model ? d.model : "stub-model"), v("endTurn"), b("assistant"), S("text"), w("positive"), E(""), k("image/png"), P(null));
|
|
139689
139697
|
}, [e?.id]), (0, A.useEffect)(() => {
|
|
@@ -140046,7 +140054,7 @@ function j$e({ request: e, onApprove: t, onReject: n, onClose: r, previewMode: i
|
|
|
140046
140054
|
}
|
|
140047
140055
|
//#endregion
|
|
140048
140056
|
//#region src/client/components/SamplingTab.tsx
|
|
140049
|
-
function
|
|
140057
|
+
function N$e({ pendingRequests: e, onApprove: t, onReject: n, serverId: r, isConnected: i, mcpServerUrl: a }) {
|
|
140050
140058
|
let { selectedSamplingRequestId: o, setSelectedSamplingRequestId: s } = i0(), { llmConfig: c } = X7({ mcpServerUrl: a }), [l, u] = (0, A.useState)(null), [d, f] = (0, A.useState)(""), [p, m] = (0, A.useState)(-1), [h, g] = (0, A.useState)(!0), [_, v] = (0, A.useState)(!1), [y, b] = (0, A.useState)(!0), [x, S] = (0, A.useState)(!1), C = (0, A.useRef)(null), w = (0, A.useRef)(null), T = (0, A.useRef)(null), E = (0, A.useRef)(!1);
|
|
140051
140059
|
(0, A.useEffect)(() => {
|
|
140052
140060
|
if (console.log("[SamplingTab] Auto-selection check:", {
|
|
@@ -140182,7 +140190,7 @@ function M$e({ pendingRequests: e, onApprove: t, onReject: n, serverId: r, isCon
|
|
|
140182
140190
|
children: /* @__PURE__ */ (0, O.jsxs)(N9, {
|
|
140183
140191
|
defaultSize: 75,
|
|
140184
140192
|
minSize: 30,
|
|
140185
|
-
children: [/* @__PURE__ */ (0, O.jsx)(
|
|
140193
|
+
children: [/* @__PURE__ */ (0, O.jsx)(k$e, {
|
|
140186
140194
|
isSearchExpanded: _,
|
|
140187
140195
|
searchQuery: d,
|
|
140188
140196
|
filteredRequestsCount: k.length,
|
|
@@ -140194,7 +140202,7 @@ function M$e({ pendingRequests: e, onApprove: t, onReject: n, serverId: r, isCon
|
|
|
140194
140202
|
searchInputRef: T
|
|
140195
140203
|
}), /* @__PURE__ */ (0, O.jsx)("div", {
|
|
140196
140204
|
className: "flex flex-col h-full",
|
|
140197
|
-
children: /* @__PURE__ */ (0, O.jsx)(
|
|
140205
|
+
children: /* @__PURE__ */ (0, O.jsx)(A$e, {
|
|
140198
140206
|
requests: k,
|
|
140199
140207
|
selectedRequest: l,
|
|
140200
140208
|
onRequestSelect: j,
|
|
@@ -140213,7 +140221,7 @@ function M$e({ pendingRequests: e, onApprove: t, onReject: n, serverId: r, isCon
|
|
|
140213
140221
|
children: /* @__PURE__ */ (0, O.jsx)("div", {
|
|
140214
140222
|
ref: w,
|
|
140215
140223
|
className: "h-full bg-white dark:bg-zinc-900",
|
|
140216
|
-
children: /* @__PURE__ */ (0, O.jsx)(
|
|
140224
|
+
children: /* @__PURE__ */ (0, O.jsx)(M$e, {
|
|
140217
140225
|
request: l,
|
|
140218
140226
|
onApprove: t,
|
|
140219
140227
|
onReject: n,
|
|
@@ -140239,7 +140247,7 @@ function M$e({ pendingRequests: e, onApprove: t, onReject: n, serverId: r, isCon
|
|
|
140239
140247
|
}
|
|
140240
140248
|
//#endregion
|
|
140241
140249
|
//#region src/client/components/tools/SavedRequestsList.tsx
|
|
140242
|
-
function
|
|
140250
|
+
function P$e({ savedRequests: e, selectedRequest: t, onLoadRequest: n, onDeleteRequest: r, focusedIndex: i }) {
|
|
140243
140251
|
if (e.length === 0) return /* @__PURE__ */ (0, O.jsxs)("div", {
|
|
140244
140252
|
className: "flex flex-col items-center justify-center h-full p-4 text-center",
|
|
140245
140253
|
children: [
|
|
@@ -140294,7 +140302,7 @@ function N$e({ savedRequests: e, selectedRequest: t, onLoadRequest: n, onDeleteR
|
|
|
140294
140302
|
}
|
|
140295
140303
|
//#endregion
|
|
140296
140304
|
//#region src/client/components/tools/SaveRequestDialog.tsx
|
|
140297
|
-
function
|
|
140305
|
+
function F$e({ isOpen: e, requestName: t, defaultPlaceholder: n, onRequestNameChange: r, onSave: i, onCancel: a }) {
|
|
140298
140306
|
return e ? /* @__PURE__ */ (0, O.jsx)("div", {
|
|
140299
140307
|
className: "fixed inset-0 bg-black/50 flex items-center justify-center z-50",
|
|
140300
140308
|
onClick: a,
|
|
@@ -140345,7 +140353,7 @@ function B9(e, t) {
|
|
|
140345
140353
|
else return e;
|
|
140346
140354
|
return i;
|
|
140347
140355
|
}
|
|
140348
|
-
function
|
|
140356
|
+
function I$e(e, t) {
|
|
140349
140357
|
if (e?.anyOf && Array.isArray(e.anyOf)) {
|
|
140350
140358
|
let n = e.anyOf.find((e) => B9(e, t)?.type !== "null");
|
|
140351
140359
|
if (n) return {
|
|
@@ -140355,23 +140363,23 @@ function F$e(e, t) {
|
|
|
140355
140363
|
}
|
|
140356
140364
|
return e;
|
|
140357
140365
|
}
|
|
140358
|
-
function
|
|
140359
|
-
let n =
|
|
140366
|
+
function L$e(e, t) {
|
|
140367
|
+
let n = I$e(e || {}, t);
|
|
140360
140368
|
return n = B9(n, t), n;
|
|
140361
140369
|
}
|
|
140362
140370
|
function V9(e, t) {
|
|
140363
|
-
let n =
|
|
140371
|
+
let n = L$e(e, t);
|
|
140364
140372
|
if (typeof n.type == "string") return n.type;
|
|
140365
140373
|
if (Array.isArray(n.type)) {
|
|
140366
140374
|
let e = n.type.find((e) => e !== "null");
|
|
140367
140375
|
return typeof e == "string" ? e : void 0;
|
|
140368
140376
|
}
|
|
140369
140377
|
}
|
|
140370
|
-
function
|
|
140378
|
+
function R$e(e) {
|
|
140371
140379
|
let t = e?.enum;
|
|
140372
140380
|
return Array.isArray(t) && t.every((e) => typeof e == "string") ? t : null;
|
|
140373
140381
|
}
|
|
140374
|
-
function
|
|
140382
|
+
function z$e(e) {
|
|
140375
140383
|
let t = e.trim().toLowerCase();
|
|
140376
140384
|
return [
|
|
140377
140385
|
"true",
|
|
@@ -140385,16 +140393,16 @@ function R$e(e) {
|
|
|
140385
140393
|
"off"
|
|
140386
140394
|
].includes(t) ? !1 : e;
|
|
140387
140395
|
}
|
|
140388
|
-
function
|
|
140396
|
+
function B$e(e, t) {
|
|
140389
140397
|
if (t === "number" || t === "integer") {
|
|
140390
140398
|
let t = e.trim();
|
|
140391
140399
|
if (!t) return e;
|
|
140392
140400
|
let n = Number(t);
|
|
140393
140401
|
return Number.isFinite(n) ? n : e;
|
|
140394
140402
|
}
|
|
140395
|
-
return t === "boolean" ?
|
|
140403
|
+
return t === "boolean" ? z$e(e) : e;
|
|
140396
140404
|
}
|
|
140397
|
-
function
|
|
140405
|
+
function V$e(e, t) {
|
|
140398
140406
|
if (e === void 0) return e;
|
|
140399
140407
|
if (t === "object" || t === "array") {
|
|
140400
140408
|
if (typeof e == "string") try {
|
|
@@ -140414,9 +140422,9 @@ function B$e(e, t) {
|
|
|
140414
140422
|
}
|
|
140415
140423
|
return e;
|
|
140416
140424
|
}
|
|
140417
|
-
return t === "boolean" ? typeof e == "boolean" ? e : typeof e == "string" ?
|
|
140425
|
+
return t === "boolean" ? typeof e == "boolean" ? e : typeof e == "string" ? z$e(e) : e : e;
|
|
140418
140426
|
}
|
|
140419
|
-
function
|
|
140427
|
+
function H$e(e) {
|
|
140420
140428
|
let t = "", n = 0, r = !1, i = !1;
|
|
140421
140429
|
for (; n < e.length;) {
|
|
140422
140430
|
let a = e[n];
|
|
@@ -140440,7 +140448,7 @@ function V$e(e) {
|
|
|
140440
140448
|
}
|
|
140441
140449
|
return t;
|
|
140442
140450
|
}
|
|
140443
|
-
function
|
|
140451
|
+
function U$e(e) {
|
|
140444
140452
|
if (!e || typeof e != "string") return null;
|
|
140445
140453
|
let t = e.trim();
|
|
140446
140454
|
if (!t.startsWith("{")) return null;
|
|
@@ -140449,7 +140457,7 @@ function H$e(e) {
|
|
|
140449
140457
|
if (e && typeof e == "object" && !Array.isArray(e)) return e;
|
|
140450
140458
|
} catch {
|
|
140451
140459
|
try {
|
|
140452
|
-
let e =
|
|
140460
|
+
let e = H$e(t), n = JSON.parse(e);
|
|
140453
140461
|
if (n && typeof n == "object" && !Array.isArray(n)) return n;
|
|
140454
140462
|
} catch {
|
|
140455
140463
|
return null;
|
|
@@ -140459,14 +140467,14 @@ function H$e(e) {
|
|
|
140459
140467
|
}
|
|
140460
140468
|
//#endregion
|
|
140461
140469
|
//#region src/client/components/tools/ToolInputForm.tsx
|
|
140462
|
-
function
|
|
140470
|
+
function W$e({ selectedTool: e, toolArgs: t, onArgChange: n, onBulkPaste: r, autoFilledFields: i, setFields: a, sendEmptyFields: o, onToggleEmpty: s }) {
|
|
140463
140471
|
let c = e?.inputSchema?.properties || {}, l = e?.inputSchema?.required || [], u = Object.keys(c).length > 0, d = async (e, t) => {
|
|
140464
140472
|
r && await r(e.clipboardData.getData("text"), t) && e.preventDefault();
|
|
140465
140473
|
};
|
|
140466
140474
|
return u ? /* @__PURE__ */ (0, O.jsx)("div", {
|
|
140467
140475
|
className: "space-y-4",
|
|
140468
140476
|
children: Object.entries(c).map(([r, c]) => {
|
|
140469
|
-
let u =
|
|
140477
|
+
let u = L$e(c, e?.inputSchema || {}), f = R$e(u), p = u.type === "string" && f !== null, m = u;
|
|
140470
140478
|
m.required = l.includes(r);
|
|
140471
140479
|
let h = t[r], g = "";
|
|
140472
140480
|
h != null && (g = typeof h == "string" ? h : typeof h == "object" && h ? JSON.stringify(h, null, 2) : String(h));
|
|
@@ -140589,7 +140597,7 @@ function U$e({ selectedTool: e, toolArgs: t, onArgChange: n, onBulkPaste: r, aut
|
|
|
140589
140597
|
}
|
|
140590
140598
|
//#endregion
|
|
140591
140599
|
//#region src/client/components/tools/ToolExecutionPanel.tsx
|
|
140592
|
-
function
|
|
140600
|
+
function G$e({ selectedTool: e, toolArgs: t, payloadToSend: n, isExecuting: r, isConnected: i, onArgChange: a, onExecute: o, onSave: s, onCancel: c, onBulkPaste: l, autoFilledFields: u, setFields: d, sendEmptyFields: f, onToggleEmpty: p }) {
|
|
140593
140601
|
let [m, h] = (0, A.useState)(!1), [g, _] = (0, A.useState)(!1), [v, y] = (0, A.useState)(!1), [b, x] = (0, A.useState)(!1), [S, C] = (0, A.useState)(!1), [w, T] = (0, A.useState)(!1), E = (0, A.useRef)(null);
|
|
140594
140602
|
return (0, A.useEffect)(() => {
|
|
140595
140603
|
if (E.current && e?.description) {
|
|
@@ -140745,7 +140753,7 @@ function W$e({ selectedTool: e, toolArgs: t, payloadToSend: n, isExecuting: r, i
|
|
|
140745
140753
|
children: S ? /* @__PURE__ */ (0, O.jsxs)(O.Fragment, { children: ["Show less", /* @__PURE__ */ (0, O.jsx)(Pf, { className: "h-3 w-3" })] }) : /* @__PURE__ */ (0, O.jsxs)(O.Fragment, { children: ["Show more", /* @__PURE__ */ (0, O.jsx)(jf, { className: "h-3 w-3" })] })
|
|
140746
140754
|
})
|
|
140747
140755
|
})]
|
|
140748
|
-
}), /* @__PURE__ */ (0, O.jsx)(
|
|
140756
|
+
}), /* @__PURE__ */ (0, O.jsx)(W$e, {
|
|
140749
140757
|
selectedTool: e,
|
|
140750
140758
|
toolArgs: t,
|
|
140751
140759
|
onArgChange: a,
|
|
@@ -140795,7 +140803,7 @@ function W$e({ selectedTool: e, toolArgs: t, payloadToSend: n, isExecuting: r, i
|
|
|
140795
140803
|
}
|
|
140796
140804
|
//#endregion
|
|
140797
140805
|
//#region src/client/components/tools/ToolResultDisplay.tsx
|
|
140798
|
-
function
|
|
140806
|
+
function K$e({ timestamp: e }) {
|
|
140799
140807
|
let [t, n] = (0, A.useState)(() => H9(e));
|
|
140800
140808
|
return (0, A.useEffect)(() => {
|
|
140801
140809
|
let t = () => n(H9(e));
|
|
@@ -140808,7 +140816,7 @@ function H9(e) {
|
|
|
140808
140816
|
let t = Date.now() - e, n = Math.floor(t / 1e3), r = Math.floor(n / 60), i = Math.floor(r / 60), a = Math.floor(i / 24);
|
|
140809
140817
|
return n < 10 ? "now" : n < 60 ? `${n}s ago` : r < 60 ? `${r}m ago` : i < 24 ? `${i}h ago` : `${a}d ago`;
|
|
140810
140818
|
}
|
|
140811
|
-
function
|
|
140819
|
+
function q$e(e) {
|
|
140812
140820
|
if (!e?.isError) return null;
|
|
140813
140821
|
let t = e.content;
|
|
140814
140822
|
if (Array.isArray(t)) {
|
|
@@ -140817,14 +140825,14 @@ function K$e(e) {
|
|
|
140817
140825
|
}
|
|
140818
140826
|
return "An error occurred";
|
|
140819
140827
|
}
|
|
140820
|
-
function
|
|
140828
|
+
function J$e(e) {
|
|
140821
140829
|
try {
|
|
140822
140830
|
return JSON.parse(e), !0;
|
|
140823
140831
|
} catch {
|
|
140824
140832
|
return !1;
|
|
140825
140833
|
}
|
|
140826
140834
|
}
|
|
140827
|
-
function
|
|
140835
|
+
function Y$e({ content: e }) {
|
|
140828
140836
|
let [t, n] = (0, A.useState)(/* @__PURE__ */ new Set()), r = (0, A.useCallback)((e) => {
|
|
140829
140837
|
n((t) => {
|
|
140830
140838
|
let n = new Set(t);
|
|
@@ -140838,7 +140846,7 @@ function J$e({ content: e }) {
|
|
|
140838
140846
|
className: "space-y-4",
|
|
140839
140847
|
children: e.map((e, n) => {
|
|
140840
140848
|
if (e.type === "text") {
|
|
140841
|
-
let i = e.text || "", a = t.has(n), o =
|
|
140849
|
+
let i = e.text || "", a = t.has(n), o = J$e(i), s = o ? (() => {
|
|
140842
140850
|
try {
|
|
140843
140851
|
return JSON.parse(i);
|
|
140844
140852
|
} catch {
|
|
@@ -141060,8 +141068,8 @@ function J$e({ content: e }) {
|
|
|
141060
141068
|
})
|
|
141061
141069
|
});
|
|
141062
141070
|
}
|
|
141063
|
-
function
|
|
141064
|
-
let [c, l] = (0, A.useState)(0), [u, d] = (0, A.useState)(!0), [f, p] = (0, A.useState)(null), [m, h] = (0, A.useState)("inline"), [g, _] = (0, A.useState)(null), v = (0, A.useRef)(!1), y = e[0], b = y ? e.filter((e) => e.toolName === y.toolName) : [], x = b[c] || b[0], S = e.findIndex((e) => e === x), C = (x ? x.error ||
|
|
141071
|
+
function X$e({ results: e, copiedResult: t, serverId: n, readResource: r, onCopy: i, onMaximize: a, isMaximized: o = !1, onRerunTool: s }) {
|
|
141072
|
+
let [c, l] = (0, A.useState)(0), [u, d] = (0, A.useState)(!0), [f, p] = (0, A.useState)(null), [m, h] = (0, A.useState)("inline"), [g, _] = (0, A.useState)(null), v = (0, A.useRef)(!1), y = e[0], b = y ? e.filter((e) => e.toolName === y.toolName) : [], x = b[c] || b[0], S = e.findIndex((e) => e === x), C = (x ? x.error || q$e(x.result) : null) ?? (x == null ? "" : JSON.stringify(x.result, null, 2));
|
|
141065
141073
|
(0, A.useEffect)(() => {
|
|
141066
141074
|
b.length > 0 && c >= b.length && l(0);
|
|
141067
141075
|
}, [b.length, c]), (0, A.useEffect)(() => {
|
|
@@ -141228,7 +141236,7 @@ function Y$e({ results: e, copiedResult: t, serverId: n, readResource: r, onCopy
|
|
|
141228
141236
|
className: "w-[140px] h-8 text-xs",
|
|
141229
141237
|
children: /* @__PURE__ */ (0, O.jsx)(aV, { children: /* @__PURE__ */ (0, O.jsxs)("div", {
|
|
141230
141238
|
className: "flex items-center gap-1",
|
|
141231
|
-
children: [/* @__PURE__ */ (0, O.jsx)(rp, { className: "h-3 w-3" }), /* @__PURE__ */ (0, O.jsx)(
|
|
141239
|
+
children: [/* @__PURE__ */ (0, O.jsx)(rp, { className: "h-3 w-3" }), /* @__PURE__ */ (0, O.jsx)(K$e, { timestamp: x.timestamp })]
|
|
141232
141240
|
}) })
|
|
141233
141241
|
}), /* @__PURE__ */ (0, O.jsx)(sV, { children: b.map((e, t) => /* @__PURE__ */ (0, O.jsx)(cV, {
|
|
141234
141242
|
value: t.toString(),
|
|
@@ -141260,7 +141268,7 @@ function Y$e({ results: e, copiedResult: t, serverId: n, readResource: r, onCopy
|
|
|
141260
141268
|
})
|
|
141261
141269
|
]
|
|
141262
141270
|
}), (() => {
|
|
141263
|
-
let e = x.error ||
|
|
141271
|
+
let e = x.error || q$e(x.result);
|
|
141264
141272
|
return e ? /* @__PURE__ */ (0, O.jsxs)("div", {
|
|
141265
141273
|
className: "bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded p-3 mx-4",
|
|
141266
141274
|
children: [/* @__PURE__ */ (0, O.jsx)("p", {
|
|
@@ -141363,7 +141371,7 @@ function Y$e({ results: e, copiedResult: t, serverId: n, readResource: r, onCopy
|
|
|
141363
141371
|
className: "space-y-0 h-full",
|
|
141364
141372
|
children: [ne.map((e, t) => /* @__PURE__ */ (0, O.jsx)("div", {
|
|
141365
141373
|
className: "mx-0 size-full",
|
|
141366
|
-
children: /* @__PURE__ */ (0, O.jsx)(
|
|
141374
|
+
children: /* @__PURE__ */ (0, O.jsx)(S$e, {
|
|
141367
141375
|
resource: e.resource,
|
|
141368
141376
|
onUIAction: (e) => {},
|
|
141369
141377
|
className: "w-full h-full relative"
|
|
@@ -141403,7 +141411,7 @@ function Y$e({ results: e, copiedResult: t, serverId: n, readResource: r, onCopy
|
|
|
141403
141411
|
filename: `structured-content-${x.toolName}-${Date.now()}.json`
|
|
141404
141412
|
})]
|
|
141405
141413
|
}),
|
|
141406
|
-
te && te.length > 0 && /* @__PURE__ */ (0, O.jsx)(
|
|
141414
|
+
te && te.length > 0 && /* @__PURE__ */ (0, O.jsx)(Y$e, { content: te }),
|
|
141407
141415
|
!e && (!te || te.length === 0) && /* @__PURE__ */ (0, O.jsx)("div", {
|
|
141408
141416
|
className: "text-sm text-gray-500 dark:text-gray-400",
|
|
141409
141417
|
"data-testid": "tool-execution-results-no-content",
|
|
@@ -141435,7 +141443,7 @@ function Y$e({ results: e, copiedResult: t, serverId: n, readResource: r, onCopy
|
|
|
141435
141443
|
}
|
|
141436
141444
|
//#endregion
|
|
141437
141445
|
//#region src/client/components/tools/ToolsList.tsx
|
|
141438
|
-
function
|
|
141446
|
+
function Z$e({ tools: e, selectedTool: t, onToolSelect: n, focusedIndex: r }) {
|
|
141439
141447
|
if (e.length === 0) return /* @__PURE__ */ (0, O.jsxs)("div", {
|
|
141440
141448
|
className: "flex flex-col items-center justify-center h-full p-4 text-center",
|
|
141441
141449
|
children: [/* @__PURE__ */ (0, O.jsx)(Gp, { className: "h-12 w-12 text-gray-400 dark:text-gray-600 mb-3" }), /* @__PURE__ */ (0, O.jsx)("p", {
|
|
@@ -141487,8 +141495,8 @@ function X$e({ tools: e, selectedTool: t, onToolSelect: n, focusedIndex: r }) {
|
|
|
141487
141495
|
}
|
|
141488
141496
|
//#endregion
|
|
141489
141497
|
//#region src/client/components/tools/ToolsTabHeader.tsx
|
|
141490
|
-
function
|
|
141491
|
-
return /* @__PURE__ */ (0, O.jsx)(
|
|
141498
|
+
function Q$e({ activeTab: e, isSearchExpanded: t, searchQuery: n, filteredToolsCount: r, savedRequestsCount: i, onSearchExpand: a, onSearchChange: o, onSearchBlur: s, onTabSwitch: c, searchInputRef: l, onRefresh: u, isRefreshing: d }) {
|
|
141499
|
+
return /* @__PURE__ */ (0, O.jsx)(o$e, {
|
|
141492
141500
|
activeTab: e,
|
|
141493
141501
|
isSearchExpanded: t,
|
|
141494
141502
|
searchQuery: n,
|
|
@@ -141512,7 +141520,7 @@ function Z$e({ activeTab: e, isSearchExpanded: t, searchQuery: n, filteredToolsC
|
|
|
141512
141520
|
}
|
|
141513
141521
|
//#endregion
|
|
141514
141522
|
//#region ../../node_modules/.pnpm/@radix-ui+react-alert-dialog@1.1.15_@types+react-dom@19.2.3_@types+react@19.2.14__@type_d492cfbed6c88f7a3980b921a627d48d/node_modules/@radix-ui/react-alert-dialog/dist/index.mjs
|
|
141515
|
-
var
|
|
141523
|
+
var $$e = "AlertDialog", [e1e, t1e] = Bt($$e, [Dz]), U9 = Dz(), n1e = (e) => {
|
|
141516
141524
|
let { __scopeAlertDialog: t, ...n } = e, r = U9(t);
|
|
141517
141525
|
return /* @__PURE__ */ (0, O.jsx)(Yz, {
|
|
141518
141526
|
...r,
|
|
@@ -141520,8 +141528,8 @@ var Q$e = "AlertDialog", [$$e, e1e] = Bt(Q$e, [Dz]), U9 = Dz(), t1e = (e) => {
|
|
|
141520
141528
|
modal: !0
|
|
141521
141529
|
});
|
|
141522
141530
|
};
|
|
141523
|
-
|
|
141524
|
-
var
|
|
141531
|
+
n1e.displayName = $$e;
|
|
141532
|
+
var r1e = "AlertDialogTrigger", i1e = A.forwardRef((e, t) => {
|
|
141525
141533
|
let { __scopeAlertDialog: n, ...r } = e, i = U9(n);
|
|
141526
141534
|
return /* @__PURE__ */ (0, O.jsx)(Xz, {
|
|
141527
141535
|
...i,
|
|
@@ -141529,16 +141537,16 @@ var n1e = "AlertDialogTrigger", r1e = A.forwardRef((e, t) => {
|
|
|
141529
141537
|
ref: t
|
|
141530
141538
|
});
|
|
141531
141539
|
});
|
|
141532
|
-
|
|
141533
|
-
var
|
|
141540
|
+
i1e.displayName = r1e;
|
|
141541
|
+
var a1e = "AlertDialogPortal", o1e = (e) => {
|
|
141534
141542
|
let { __scopeAlertDialog: t, ...n } = e, r = U9(t);
|
|
141535
141543
|
return /* @__PURE__ */ (0, O.jsx)(Zz, {
|
|
141536
141544
|
...r,
|
|
141537
141545
|
...n
|
|
141538
141546
|
});
|
|
141539
141547
|
};
|
|
141540
|
-
|
|
141541
|
-
var
|
|
141548
|
+
o1e.displayName = a1e;
|
|
141549
|
+
var s1e = "AlertDialogOverlay", c1e = A.forwardRef((e, t) => {
|
|
141542
141550
|
let { __scopeAlertDialog: n, ...r } = e, i = U9(n);
|
|
141543
141551
|
return /* @__PURE__ */ (0, O.jsx)(Qz, {
|
|
141544
141552
|
...i,
|
|
@@ -141546,14 +141554,14 @@ var o1e = "AlertDialogOverlay", s1e = A.forwardRef((e, t) => {
|
|
|
141546
141554
|
ref: t
|
|
141547
141555
|
});
|
|
141548
141556
|
});
|
|
141549
|
-
|
|
141550
|
-
var W9 = "AlertDialogContent", [
|
|
141557
|
+
c1e.displayName = s1e;
|
|
141558
|
+
var W9 = "AlertDialogContent", [l1e, u1e] = e1e(W9), d1e = /* @__PURE__ */ Zt("AlertDialogContent"), f1e = A.forwardRef((e, t) => {
|
|
141551
141559
|
let { __scopeAlertDialog: n, children: r, ...i } = e, a = U9(n), o = A.useRef(null), s = N(t, o), c = A.useRef(null);
|
|
141552
141560
|
return /* @__PURE__ */ (0, O.jsx)(a_e, {
|
|
141553
141561
|
contentName: W9,
|
|
141554
|
-
titleName:
|
|
141562
|
+
titleName: p1e,
|
|
141555
141563
|
docsSlug: "alert-dialog",
|
|
141556
|
-
children: /* @__PURE__ */ (0, O.jsx)(
|
|
141564
|
+
children: /* @__PURE__ */ (0, O.jsx)(l1e, {
|
|
141557
141565
|
scope: n,
|
|
141558
141566
|
cancelRef: c,
|
|
141559
141567
|
children: /* @__PURE__ */ (0, O.jsxs)($z, {
|
|
@@ -141566,13 +141574,13 @@ var W9 = "AlertDialogContent", [c1e, l1e] = $$e(W9), u1e = /* @__PURE__ */ Zt("A
|
|
|
141566
141574
|
}),
|
|
141567
141575
|
onPointerDownOutside: (e) => e.preventDefault(),
|
|
141568
141576
|
onInteractOutside: (e) => e.preventDefault(),
|
|
141569
|
-
children: [/* @__PURE__ */ (0, O.jsx)(
|
|
141577
|
+
children: [/* @__PURE__ */ (0, O.jsx)(d1e, { children: r }), /* @__PURE__ */ (0, O.jsx)(x1e, { contentRef: o })]
|
|
141570
141578
|
})
|
|
141571
141579
|
})
|
|
141572
141580
|
});
|
|
141573
141581
|
});
|
|
141574
|
-
|
|
141575
|
-
var
|
|
141582
|
+
f1e.displayName = W9;
|
|
141583
|
+
var p1e = "AlertDialogTitle", m1e = A.forwardRef((e, t) => {
|
|
141576
141584
|
let { __scopeAlertDialog: n, ...r } = e, i = U9(n);
|
|
141577
141585
|
return /* @__PURE__ */ (0, O.jsx)(eB, {
|
|
141578
141586
|
...i,
|
|
@@ -141580,8 +141588,8 @@ var f1e = "AlertDialogTitle", p1e = A.forwardRef((e, t) => {
|
|
|
141580
141588
|
ref: t
|
|
141581
141589
|
});
|
|
141582
141590
|
});
|
|
141583
|
-
|
|
141584
|
-
var
|
|
141591
|
+
m1e.displayName = p1e;
|
|
141592
|
+
var h1e = "AlertDialogDescription", g1e = A.forwardRef((e, t) => {
|
|
141585
141593
|
let { __scopeAlertDialog: n, ...r } = e, i = U9(n);
|
|
141586
141594
|
return /* @__PURE__ */ (0, O.jsx)(tB, {
|
|
141587
141595
|
...i,
|
|
@@ -141589,8 +141597,8 @@ var m1e = "AlertDialogDescription", h1e = A.forwardRef((e, t) => {
|
|
|
141589
141597
|
ref: t
|
|
141590
141598
|
});
|
|
141591
141599
|
});
|
|
141592
|
-
|
|
141593
|
-
var
|
|
141600
|
+
g1e.displayName = h1e;
|
|
141601
|
+
var _1e = "AlertDialogAction", v1e = A.forwardRef((e, t) => {
|
|
141594
141602
|
let { __scopeAlertDialog: n, ...r } = e, i = U9(n);
|
|
141595
141603
|
return /* @__PURE__ */ (0, O.jsx)(nB, {
|
|
141596
141604
|
...i,
|
|
@@ -141598,20 +141606,20 @@ var g1e = "AlertDialogAction", _1e = A.forwardRef((e, t) => {
|
|
|
141598
141606
|
ref: t
|
|
141599
141607
|
});
|
|
141600
141608
|
});
|
|
141601
|
-
|
|
141602
|
-
var
|
|
141603
|
-
let { __scopeAlertDialog: n, ...r } = e, { cancelRef: i } =
|
|
141609
|
+
v1e.displayName = _1e;
|
|
141610
|
+
var y1e = "AlertDialogCancel", b1e = A.forwardRef((e, t) => {
|
|
141611
|
+
let { __scopeAlertDialog: n, ...r } = e, { cancelRef: i } = u1e(y1e, n), a = U9(n), o = N(t, i);
|
|
141604
141612
|
return /* @__PURE__ */ (0, O.jsx)(nB, {
|
|
141605
141613
|
...a,
|
|
141606
141614
|
...r,
|
|
141607
141615
|
ref: o
|
|
141608
141616
|
});
|
|
141609
141617
|
});
|
|
141610
|
-
|
|
141611
|
-
var
|
|
141618
|
+
b1e.displayName = y1e;
|
|
141619
|
+
var x1e = ({ contentRef: e }) => {
|
|
141612
141620
|
let t = `\`${W9}\` requires a description for the component to be accessible for screen reader users.
|
|
141613
141621
|
|
|
141614
|
-
You can add a description to the \`${W9}\` by passing a \`${
|
|
141622
|
+
You can add a description to the \`${W9}\` by passing a \`${h1e}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
141615
141623
|
|
|
141616
141624
|
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${W9}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
141617
141625
|
|
|
@@ -141619,79 +141627,79 @@ For more information, see https://radix-ui.com/primitives/docs/components/alert-
|
|
|
141619
141627
|
return A.useEffect(() => {
|
|
141620
141628
|
document.getElementById(e.current?.getAttribute("aria-describedby")) || console.warn(t);
|
|
141621
141629
|
}, [t, e]), null;
|
|
141622
|
-
},
|
|
141630
|
+
}, S1e = n1e, C1e = o1e, w1e = c1e, T1e = f1e, E1e = v1e, D1e = b1e, O1e = m1e, k1e = g1e;
|
|
141623
141631
|
//#endregion
|
|
141624
141632
|
//#region src/client/components/ui/alert-dialog.tsx
|
|
141625
|
-
function
|
|
141626
|
-
return /* @__PURE__ */ (0, O.jsx)(
|
|
141633
|
+
function A1e({ ...e }) {
|
|
141634
|
+
return /* @__PURE__ */ (0, O.jsx)(S1e, {
|
|
141627
141635
|
"data-slot": "alert-dialog",
|
|
141628
141636
|
...e
|
|
141629
141637
|
});
|
|
141630
141638
|
}
|
|
141631
|
-
function
|
|
141632
|
-
return /* @__PURE__ */ (0, O.jsx)(
|
|
141639
|
+
function j1e({ ...e }) {
|
|
141640
|
+
return /* @__PURE__ */ (0, O.jsx)(C1e, {
|
|
141633
141641
|
"data-slot": "alert-dialog-portal",
|
|
141634
141642
|
...e
|
|
141635
141643
|
});
|
|
141636
141644
|
}
|
|
141637
|
-
function
|
|
141638
|
-
return /* @__PURE__ */ (0, O.jsx)(
|
|
141645
|
+
function M1e({ className: e, ...t }) {
|
|
141646
|
+
return /* @__PURE__ */ (0, O.jsx)(w1e, {
|
|
141639
141647
|
"data-slot": "alert-dialog-overlay",
|
|
141640
141648
|
className: V("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50", e),
|
|
141641
141649
|
...t
|
|
141642
141650
|
});
|
|
141643
141651
|
}
|
|
141644
|
-
function
|
|
141645
|
-
return /* @__PURE__ */ (0, O.jsxs)(
|
|
141652
|
+
function N1e({ className: e, ...t }) {
|
|
141653
|
+
return /* @__PURE__ */ (0, O.jsxs)(j1e, { children: [/* @__PURE__ */ (0, O.jsx)(M1e, {}), /* @__PURE__ */ (0, O.jsx)(T1e, {
|
|
141646
141654
|
"data-slot": "alert-dialog-content",
|
|
141647
141655
|
className: V("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg", e),
|
|
141648
141656
|
...t
|
|
141649
141657
|
})] });
|
|
141650
141658
|
}
|
|
141651
|
-
function
|
|
141659
|
+
function P1e({ className: e, ...t }) {
|
|
141652
141660
|
return /* @__PURE__ */ (0, O.jsx)("div", {
|
|
141653
141661
|
"data-slot": "alert-dialog-header",
|
|
141654
141662
|
className: V("flex flex-col gap-2 text-center sm:text-left", e),
|
|
141655
141663
|
...t
|
|
141656
141664
|
});
|
|
141657
141665
|
}
|
|
141658
|
-
function
|
|
141666
|
+
function F1e({ className: e, ...t }) {
|
|
141659
141667
|
return /* @__PURE__ */ (0, O.jsx)("div", {
|
|
141660
141668
|
"data-slot": "alert-dialog-footer",
|
|
141661
141669
|
className: V("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", e),
|
|
141662
141670
|
...t
|
|
141663
141671
|
});
|
|
141664
141672
|
}
|
|
141665
|
-
function
|
|
141666
|
-
return /* @__PURE__ */ (0, O.jsx)(
|
|
141673
|
+
function I1e({ className: e, ...t }) {
|
|
141674
|
+
return /* @__PURE__ */ (0, O.jsx)(O1e, {
|
|
141667
141675
|
"data-slot": "alert-dialog-title",
|
|
141668
141676
|
className: V("text-lg font-semibold", e),
|
|
141669
141677
|
...t
|
|
141670
141678
|
});
|
|
141671
141679
|
}
|
|
141672
|
-
function
|
|
141673
|
-
return /* @__PURE__ */ (0, O.jsx)(
|
|
141680
|
+
function L1e({ className: e, ...t }) {
|
|
141681
|
+
return /* @__PURE__ */ (0, O.jsx)(k1e, {
|
|
141674
141682
|
"data-slot": "alert-dialog-description",
|
|
141675
141683
|
className: V("text-muted-foreground text-sm", e),
|
|
141676
141684
|
...t
|
|
141677
141685
|
});
|
|
141678
141686
|
}
|
|
141679
|
-
function
|
|
141680
|
-
return /* @__PURE__ */ (0, O.jsx)(
|
|
141687
|
+
function R1e({ className: e, ...t }) {
|
|
141688
|
+
return /* @__PURE__ */ (0, O.jsx)(E1e, {
|
|
141681
141689
|
className: V(Lt(), e),
|
|
141682
141690
|
...t
|
|
141683
141691
|
});
|
|
141684
141692
|
}
|
|
141685
|
-
function
|
|
141686
|
-
return /* @__PURE__ */ (0, O.jsx)(
|
|
141693
|
+
function z1e({ className: e, ...t }) {
|
|
141694
|
+
return /* @__PURE__ */ (0, O.jsx)(D1e, {
|
|
141687
141695
|
className: V(Lt({ variant: "outline" }), e),
|
|
141688
141696
|
...t
|
|
141689
141697
|
});
|
|
141690
141698
|
}
|
|
141691
141699
|
//#endregion
|
|
141692
141700
|
//#region src/client/components/ToolsTab.tsx
|
|
141693
|
-
var
|
|
141694
|
-
function
|
|
141701
|
+
var B1e = "mcp-inspector-saved-requests";
|
|
141702
|
+
function V1e({ ref: e, tools: t, callTool: n, readResource: r, serverId: i, isConnected: a, refreshTools: o }) {
|
|
141695
141703
|
let [s, c] = (0, A.useState)(!1), [l, u] = (0, A.useState)(null), [d, f] = (0, A.useState)(null), { selectedToolName: p, setSelectedToolName: m } = i0(), [h, g] = (0, A.useState)({}), [_, v] = (0, A.useState)(/* @__PURE__ */ new Set()), [y, b] = (0, A.useState)(/* @__PURE__ */ new Set()), [x, S] = (0, A.useState)([]), [C, w] = (0, A.useState)(!1), [T, E] = (0, A.useState)(null), [D, k] = (0, A.useState)(null), [j, M] = (0, A.useState)(""), [N, P] = (0, A.useState)("tools"), [F, I] = (0, A.useState)([]), [L, ee] = (0, A.useState)(!1), [te, ne] = (0, A.useState)(""), [re, ie] = (0, A.useState)(!1), [R, z] = (0, A.useState)(-1), ae = (0, A.useRef)(null), [oe, se] = (0, A.useState)(!1), [ce, le] = (0, A.useState)("list"), [ue, de] = (0, A.useState)(!1), [fe, pe] = (0, A.useState)({
|
|
141696
141704
|
open: !1,
|
|
141697
141705
|
parsedObject: {},
|
|
@@ -141723,7 +141731,7 @@ function B1e({ ref: e, tools: t, callTool: n, readResource: r, serverId: i, isCo
|
|
|
141723
141731
|
}
|
|
141724
141732
|
})), (0, A.useEffect)(() => {
|
|
141725
141733
|
try {
|
|
141726
|
-
let e = localStorage.getItem(
|
|
141734
|
+
let e = localStorage.getItem(B1e);
|
|
141727
141735
|
e && I(JSON.parse(e));
|
|
141728
141736
|
} catch (e) {
|
|
141729
141737
|
console.error("[ToolsTab] Failed to load saved requests:", e);
|
|
@@ -141737,7 +141745,7 @@ function B1e({ ref: e, tools: t, callTool: n, readResource: r, serverId: i, isCo
|
|
|
141737
141745
|
_e
|
|
141738
141746
|
]), ye = (0, A.useCallback)((e) => {
|
|
141739
141747
|
try {
|
|
141740
|
-
localStorage.setItem(
|
|
141748
|
+
localStorage.setItem(B1e, JSON.stringify(e)), I(e);
|
|
141741
141749
|
} catch (e) {
|
|
141742
141750
|
console.error("[ToolsTab] Failed to save requests:", e);
|
|
141743
141751
|
}
|
|
@@ -141851,7 +141859,7 @@ function B1e({ ref: e, tools: t, callTool: n, readResource: r, serverId: i, isCo
|
|
|
141851
141859
|
]);
|
|
141852
141860
|
let Te = (0, A.useCallback)((e, t) => {
|
|
141853
141861
|
let n = l?.inputSchema || {}, r = l?.inputSchema?.properties?.[e], i = r ? V9(r, n) : "string", a;
|
|
141854
|
-
a = i === "object" || i === "array" || i === "string" ? t :
|
|
141862
|
+
a = i === "object" || i === "array" || i === "string" ? t : B$e(t, i), g((t) => ({
|
|
141855
141863
|
...t,
|
|
141856
141864
|
[e]: a
|
|
141857
141865
|
}));
|
|
@@ -141879,7 +141887,7 @@ function B1e({ ref: e, tools: t, callTool: n, readResource: r, serverId: i, isCo
|
|
|
141879
141887
|
});
|
|
141880
141888
|
}, []), De = (0, A.useCallback)(async (e, t) => {
|
|
141881
141889
|
if (!l) return !1;
|
|
141882
|
-
let n =
|
|
141890
|
+
let n = U$e(e);
|
|
141883
141891
|
if (!n) return !1;
|
|
141884
141892
|
let r = l.inputSchema?.properties || {}, i = Object.keys(r), a = l.inputSchema || {}, o = [], s = [];
|
|
141885
141893
|
return Object.entries(n).forEach(([e, t]) => {
|
|
@@ -141934,7 +141942,7 @@ function B1e({ ref: e, tools: t, callTool: n, readResource: r, serverId: i, isCo
|
|
|
141934
141942
|
let r = l.inputSchema.properties[n];
|
|
141935
141943
|
if (!r) continue;
|
|
141936
141944
|
let i = V9(r, e);
|
|
141937
|
-
t[n] =
|
|
141945
|
+
t[n] = V$e(y.has(n) ? i === "array" ? "[]" : i === "object" ? "{}" : "" : h[n], i);
|
|
141938
141946
|
}
|
|
141939
141947
|
return t;
|
|
141940
141948
|
}, [
|
|
@@ -142167,7 +142175,7 @@ function B1e({ ref: e, tools: t, callTool: n, readResource: r, serverId: i, isCo
|
|
|
142167
142175
|
damping: 30
|
|
142168
142176
|
},
|
|
142169
142177
|
className: "absolute inset-0 flex flex-col bg-background z-0",
|
|
142170
|
-
children: [/* @__PURE__ */ (0, O.jsx)(
|
|
142178
|
+
children: [/* @__PURE__ */ (0, O.jsx)(Q$e, {
|
|
142171
142179
|
activeTab: N,
|
|
142172
142180
|
isSearchExpanded: re,
|
|
142173
142181
|
searchQuery: j,
|
|
@@ -142180,12 +142188,12 @@ function B1e({ ref: e, tools: t, callTool: n, readResource: r, serverId: i, isCo
|
|
|
142180
142188
|
searchInputRef: ae,
|
|
142181
142189
|
onRefresh: o ? we : void 0,
|
|
142182
142190
|
isRefreshing: s
|
|
142183
|
-
}), N === "tools" ? /* @__PURE__ */ (0, O.jsx)(
|
|
142191
|
+
}), N === "tools" ? /* @__PURE__ */ (0, O.jsx)(Z$e, {
|
|
142184
142192
|
tools: be,
|
|
142185
142193
|
selectedTool: l,
|
|
142186
142194
|
onToolSelect: xe,
|
|
142187
142195
|
focusedIndex: R
|
|
142188
|
-
}) : /* @__PURE__ */ (0, O.jsx)(
|
|
142196
|
+
}) : /* @__PURE__ */ (0, O.jsx)(P$e, {
|
|
142189
142197
|
savedRequests: F,
|
|
142190
142198
|
selectedRequest: d,
|
|
142191
142199
|
onLoadRequest: Se,
|
|
@@ -142203,7 +142211,7 @@ function B1e({ ref: e, tools: t, callTool: n, readResource: r, serverId: i, isCo
|
|
|
142203
142211
|
damping: 30
|
|
142204
142212
|
},
|
|
142205
142213
|
className: "absolute inset-0 bg-background z-10",
|
|
142206
|
-
children: /* @__PURE__ */ (0, O.jsx)(
|
|
142214
|
+
children: /* @__PURE__ */ (0, O.jsx)(G$e, {
|
|
142207
142215
|
selectedTool: l,
|
|
142208
142216
|
toolArgs: h,
|
|
142209
142217
|
payloadToSend: Ae,
|
|
@@ -142229,7 +142237,7 @@ function B1e({ ref: e, tools: t, callTool: n, readResource: r, serverId: i, isCo
|
|
|
142229
142237
|
damping: 30
|
|
142230
142238
|
},
|
|
142231
142239
|
className: "absolute inset-0 bg-background z-20",
|
|
142232
|
-
children: /* @__PURE__ */ (0, O.jsx)(
|
|
142240
|
+
children: /* @__PURE__ */ (0, O.jsx)(X$e, {
|
|
142233
142241
|
results: Pe,
|
|
142234
142242
|
copiedResult: T,
|
|
142235
142243
|
serverId: i,
|
|
@@ -142243,7 +142251,7 @@ function B1e({ ref: e, tools: t, callTool: n, readResource: r, serverId: i, isCo
|
|
|
142243
142251
|
]
|
|
142244
142252
|
})
|
|
142245
142253
|
}),
|
|
142246
|
-
/* @__PURE__ */ (0, O.jsx)(
|
|
142254
|
+
/* @__PURE__ */ (0, O.jsx)(F$e, {
|
|
142247
142255
|
isOpen: L,
|
|
142248
142256
|
requestName: te,
|
|
142249
142257
|
defaultPlaceholder: `${l?.name} - ${(/* @__PURE__ */ new Date()).toLocaleString()}`,
|
|
@@ -142251,12 +142259,12 @@ function B1e({ ref: e, tools: t, callTool: n, readResource: r, serverId: i, isCo
|
|
|
142251
142259
|
onSave: Le,
|
|
142252
142260
|
onCancel: () => ee(!1)
|
|
142253
142261
|
}),
|
|
142254
|
-
/* @__PURE__ */ (0, O.jsx)(
|
|
142262
|
+
/* @__PURE__ */ (0, O.jsx)(A1e, {
|
|
142255
142263
|
open: fe.open,
|
|
142256
142264
|
onOpenChange: (e) => {
|
|
142257
142265
|
e || ke();
|
|
142258
142266
|
},
|
|
142259
|
-
children: /* @__PURE__ */ (0, O.jsxs)(
|
|
142267
|
+
children: /* @__PURE__ */ (0, O.jsxs)(N1e, { children: [/* @__PURE__ */ (0, O.jsxs)(P1e, { children: [/* @__PURE__ */ (0, O.jsx)(I1e, { children: "Auto-fill fields from pasted object?" }), /* @__PURE__ */ (0, O.jsxs)(L1e, { children: [fe.fieldsToUpdate.length > 0 && /* @__PURE__ */ (0, O.jsxs)("div", {
|
|
142260
142268
|
className: "mb-3",
|
|
142261
142269
|
children: [/* @__PURE__ */ (0, O.jsx)("p", {
|
|
142262
142270
|
className: "font-medium mb-2",
|
|
@@ -142291,10 +142299,10 @@ function B1e({ ref: e, tools: t, callTool: n, readResource: r, serverId: i, isCo
|
|
|
142291
142299
|
}), /* @__PURE__ */ (0, O.jsx)("p", {
|
|
142292
142300
|
className: "text-sm font-mono",
|
|
142293
142301
|
children: fe.newFields.join(", ")
|
|
142294
|
-
})] })] })] }), /* @__PURE__ */ (0, O.jsxs)(
|
|
142302
|
+
})] })] })] }), /* @__PURE__ */ (0, O.jsxs)(F1e, { children: [/* @__PURE__ */ (0, O.jsx)(z1e, {
|
|
142295
142303
|
onClick: ke,
|
|
142296
142304
|
children: "Cancel"
|
|
142297
|
-
}), /* @__PURE__ */ (0, O.jsx)(
|
|
142305
|
+
}), /* @__PURE__ */ (0, O.jsx)(R1e, {
|
|
142298
142306
|
onClick: Oe,
|
|
142299
142307
|
children: "Auto-fill"
|
|
142300
142308
|
})] })] })
|
|
@@ -142319,7 +142327,7 @@ function B1e({ ref: e, tools: t, callTool: n, readResource: r, serverId: i, isCo
|
|
|
142319
142327
|
minSize: "30%",
|
|
142320
142328
|
children: /* @__PURE__ */ (0, O.jsxs)("div", {
|
|
142321
142329
|
className: "flex flex-col h-full overflow-hidden",
|
|
142322
|
-
children: [/* @__PURE__ */ (0, O.jsx)(
|
|
142330
|
+
children: [/* @__PURE__ */ (0, O.jsx)(Q$e, {
|
|
142323
142331
|
activeTab: N,
|
|
142324
142332
|
isSearchExpanded: re,
|
|
142325
142333
|
searchQuery: j,
|
|
@@ -142332,12 +142340,12 @@ function B1e({ ref: e, tools: t, callTool: n, readResource: r, serverId: i, isCo
|
|
|
142332
142340
|
searchInputRef: ae,
|
|
142333
142341
|
onRefresh: o ? we : void 0,
|
|
142334
142342
|
isRefreshing: s
|
|
142335
|
-
}), N === "tools" ? /* @__PURE__ */ (0, O.jsx)(
|
|
142343
|
+
}), N === "tools" ? /* @__PURE__ */ (0, O.jsx)(Z$e, {
|
|
142336
142344
|
tools: be,
|
|
142337
142345
|
selectedTool: l,
|
|
142338
142346
|
onToolSelect: xe,
|
|
142339
142347
|
focusedIndex: R
|
|
142340
|
-
}) : /* @__PURE__ */ (0, O.jsx)(
|
|
142348
|
+
}) : /* @__PURE__ */ (0, O.jsx)(P$e, {
|
|
142341
142349
|
savedRequests: F,
|
|
142342
142350
|
selectedRequest: d,
|
|
142343
142351
|
onLoadRequest: Se,
|
|
@@ -142361,7 +142369,7 @@ function B1e({ ref: e, tools: t, callTool: n, readResource: r, serverId: i, isCo
|
|
|
142361
142369
|
defaultSize: "40%",
|
|
142362
142370
|
collapsible: !0,
|
|
142363
142371
|
panelRef: _e,
|
|
142364
|
-
children: /* @__PURE__ */ (0, O.jsx)(
|
|
142372
|
+
children: /* @__PURE__ */ (0, O.jsx)(G$e, {
|
|
142365
142373
|
selectedTool: l,
|
|
142366
142374
|
toolArgs: h,
|
|
142367
142375
|
payloadToSend: Ae,
|
|
@@ -142385,7 +142393,7 @@ function B1e({ ref: e, tools: t, callTool: n, readResource: r, serverId: i, isCo
|
|
|
142385
142393
|
defaultSize: "60%",
|
|
142386
142394
|
children: /* @__PURE__ */ (0, O.jsx)("div", {
|
|
142387
142395
|
className: "flex flex-col h-full",
|
|
142388
|
-
children: /* @__PURE__ */ (0, O.jsx)(
|
|
142396
|
+
children: /* @__PURE__ */ (0, O.jsx)(X$e, {
|
|
142389
142397
|
results: Pe,
|
|
142390
142398
|
copiedResult: T,
|
|
142391
142399
|
serverId: i,
|
|
@@ -142402,7 +142410,7 @@ function B1e({ ref: e, tools: t, callTool: n, readResource: r, serverId: i, isCo
|
|
|
142402
142410
|
]
|
|
142403
142411
|
})
|
|
142404
142412
|
}),
|
|
142405
|
-
/* @__PURE__ */ (0, O.jsx)(
|
|
142413
|
+
/* @__PURE__ */ (0, O.jsx)(F$e, {
|
|
142406
142414
|
isOpen: L,
|
|
142407
142415
|
requestName: te,
|
|
142408
142416
|
defaultPlaceholder: `${l?.name} - ${(/* @__PURE__ */ new Date()).toLocaleString()}`,
|
|
@@ -142410,12 +142418,12 @@ function B1e({ ref: e, tools: t, callTool: n, readResource: r, serverId: i, isCo
|
|
|
142410
142418
|
onSave: Le,
|
|
142411
142419
|
onCancel: () => ee(!1)
|
|
142412
142420
|
}),
|
|
142413
|
-
/* @__PURE__ */ (0, O.jsx)(
|
|
142421
|
+
/* @__PURE__ */ (0, O.jsx)(A1e, {
|
|
142414
142422
|
open: fe.open,
|
|
142415
142423
|
onOpenChange: (e) => {
|
|
142416
142424
|
e || ke();
|
|
142417
142425
|
},
|
|
142418
|
-
children: /* @__PURE__ */ (0, O.jsxs)(
|
|
142426
|
+
children: /* @__PURE__ */ (0, O.jsxs)(N1e, { children: [/* @__PURE__ */ (0, O.jsxs)(P1e, { children: [/* @__PURE__ */ (0, O.jsx)(I1e, { children: "Auto-fill fields from pasted object?" }), /* @__PURE__ */ (0, O.jsxs)(L1e, { children: [fe.fieldsToUpdate.length > 0 && /* @__PURE__ */ (0, O.jsxs)("div", {
|
|
142419
142427
|
className: "mb-3",
|
|
142420
142428
|
children: [/* @__PURE__ */ (0, O.jsx)("p", {
|
|
142421
142429
|
className: "font-medium mb-2",
|
|
@@ -142450,10 +142458,10 @@ function B1e({ ref: e, tools: t, callTool: n, readResource: r, serverId: i, isCo
|
|
|
142450
142458
|
}), /* @__PURE__ */ (0, O.jsx)("p", {
|
|
142451
142459
|
className: "text-sm font-mono",
|
|
142452
142460
|
children: fe.newFields.join(", ")
|
|
142453
|
-
})] })] })] }), /* @__PURE__ */ (0, O.jsxs)(
|
|
142461
|
+
})] })] })] }), /* @__PURE__ */ (0, O.jsxs)(F1e, { children: [/* @__PURE__ */ (0, O.jsx)(z1e, {
|
|
142454
142462
|
onClick: ke,
|
|
142455
142463
|
children: "Cancel"
|
|
142456
|
-
}), /* @__PURE__ */ (0, O.jsx)(
|
|
142464
|
+
}), /* @__PURE__ */ (0, O.jsx)(R1e, {
|
|
142457
142465
|
onClick: Oe,
|
|
142458
142466
|
children: "Auto-fill"
|
|
142459
142467
|
})] })] })
|
|
@@ -142461,10 +142469,10 @@ function B1e({ ref: e, tools: t, callTool: n, readResource: r, serverId: i, isCo
|
|
|
142461
142469
|
]
|
|
142462
142470
|
});
|
|
142463
142471
|
}
|
|
142464
|
-
|
|
142472
|
+
V1e.displayName = "ToolsTab";
|
|
142465
142473
|
//#endregion
|
|
142466
142474
|
//#region src/client/components/LayoutContent.tsx
|
|
142467
|
-
function
|
|
142475
|
+
function H1e({ selectedServer: e, activeTab: t, toolsSearchRef: n, promptsSearchRef: r, resourcesSearchRef: i, children: a }) {
|
|
142468
142476
|
let { embeddedConfig: o } = i0();
|
|
142469
142477
|
if (!e && o.forceConnected) return o.chatApiUrl ? /* @__PURE__ */ (0, O.jsx)(zZe, {
|
|
142470
142478
|
connection: {
|
|
@@ -142508,7 +142516,7 @@ function V1e({ selectedServer: e, activeTab: t, toolsSearchRef: n, promptsSearch
|
|
|
142508
142516
|
s("tools") && /* @__PURE__ */ (0, O.jsx)("div", {
|
|
142509
142517
|
style: { display: t === "tools" ? "block" : "none" },
|
|
142510
142518
|
className: "h-full",
|
|
142511
|
-
children: /* @__PURE__ */ (0, O.jsx)(
|
|
142519
|
+
children: /* @__PURE__ */ (0, O.jsx)(V1e, {
|
|
142512
142520
|
ref: n,
|
|
142513
142521
|
tools: e.tools,
|
|
142514
142522
|
callTool: e.callTool,
|
|
@@ -142521,7 +142529,7 @@ function V1e({ selectedServer: e, activeTab: t, toolsSearchRef: n, promptsSearch
|
|
|
142521
142529
|
s("prompts") && /* @__PURE__ */ (0, O.jsx)("div", {
|
|
142522
142530
|
style: { display: t === "prompts" ? "block" : "none" },
|
|
142523
142531
|
className: "h-full",
|
|
142524
|
-
children: /* @__PURE__ */ (0, O.jsx)(
|
|
142532
|
+
children: /* @__PURE__ */ (0, O.jsx)(x$e, {
|
|
142525
142533
|
ref: r,
|
|
142526
142534
|
prompts: e.prompts,
|
|
142527
142535
|
callPrompt: (t, n) => e.getPrompt(t, n ? Object.fromEntries(Object.entries(n).map(([e, t]) => [e, typeof t == "string" ? t : String(t ?? "")])) : void 0),
|
|
@@ -142533,7 +142541,7 @@ function V1e({ selectedServer: e, activeTab: t, toolsSearchRef: n, promptsSearch
|
|
|
142533
142541
|
s("resources") && /* @__PURE__ */ (0, O.jsx)("div", {
|
|
142534
142542
|
style: { display: t === "resources" ? "block" : "none" },
|
|
142535
142543
|
className: "h-full",
|
|
142536
|
-
children: /* @__PURE__ */ (0, O.jsx)(
|
|
142544
|
+
children: /* @__PURE__ */ (0, O.jsx)(O$e, {
|
|
142537
142545
|
ref: i,
|
|
142538
142546
|
resources: e.resources,
|
|
142539
142547
|
readResource: e.readResource,
|
|
@@ -142579,7 +142587,7 @@ function V1e({ selectedServer: e, activeTab: t, toolsSearchRef: n, promptsSearch
|
|
|
142579
142587
|
s("sampling") && /* @__PURE__ */ (0, O.jsx)("div", {
|
|
142580
142588
|
style: { display: t === "sampling" ? "block" : "none" },
|
|
142581
142589
|
className: "h-full",
|
|
142582
|
-
children: /* @__PURE__ */ (0, O.jsx)(
|
|
142590
|
+
children: /* @__PURE__ */ (0, O.jsx)(N$e, {
|
|
142583
142591
|
pendingRequests: e.pendingSamplingRequests,
|
|
142584
142592
|
onApprove: e.approveSampling,
|
|
142585
142593
|
onReject: e.rejectSampling,
|
|
@@ -142625,7 +142633,7 @@ function V1e({ selectedServer: e, activeTab: t, toolsSearchRef: n, promptsSearch
|
|
|
142625
142633
|
}
|
|
142626
142634
|
//#endregion
|
|
142627
142635
|
//#region src/client/components/ui/github-icon.tsx
|
|
142628
|
-
function
|
|
142636
|
+
function U1e({ className: e }) {
|
|
142629
142637
|
return /* @__PURE__ */ (0, O.jsxs)("svg", {
|
|
142630
142638
|
xmlns: "http://www.w3.org/2000/svg",
|
|
142631
142639
|
width: "24",
|
|
@@ -142642,21 +142650,21 @@ function H1e({ className: e }) {
|
|
|
142642
142650
|
}
|
|
142643
142651
|
//#endregion
|
|
142644
142652
|
//#region src/client/components/ui/tabs.tsx
|
|
142645
|
-
var
|
|
142646
|
-
function
|
|
142647
|
-
let e = A.use(
|
|
142653
|
+
var W1e = A.createContext(void 0);
|
|
142654
|
+
function G1e() {
|
|
142655
|
+
let e = A.use(W1e);
|
|
142648
142656
|
if (!e) throw Error("useTabs must be used within a TabsProvider");
|
|
142649
142657
|
return e;
|
|
142650
142658
|
}
|
|
142651
|
-
var
|
|
142652
|
-
function
|
|
142653
|
-
return A.use(
|
|
142659
|
+
var K1e = A.createContext(void 0);
|
|
142660
|
+
function q1e() {
|
|
142661
|
+
return A.use(K1e);
|
|
142654
142662
|
}
|
|
142655
142663
|
function G9({ ref: e, children: t, defaultValue: n, value: r, onValueChange: i, className: a, collapsed: o, onCollapsedChange: s, ...c }) {
|
|
142656
142664
|
let [l, u] = A.useState(n || ""), d = r !== void 0, f = o !== void 0, [p, m] = A.useState(!1), h = A.useCallback((e) => {
|
|
142657
142665
|
d || u(e), i?.(e);
|
|
142658
142666
|
}, [d, i]);
|
|
142659
|
-
return /* @__PURE__ */ (0, O.jsx)(
|
|
142667
|
+
return /* @__PURE__ */ (0, O.jsx)(W1e, {
|
|
142660
142668
|
value: {
|
|
142661
142669
|
activeValue: d ? r : l,
|
|
142662
142670
|
handleValueChange: h,
|
|
@@ -142675,7 +142683,7 @@ function G9({ ref: e, children: t, defaultValue: n, value: r, onValueChange: i,
|
|
|
142675
142683
|
}
|
|
142676
142684
|
G9.displayName = "Tabs";
|
|
142677
142685
|
function K9({ ref: e, children: t, className: n, variant: r = "default", collapsible: i = !1, ...a }) {
|
|
142678
|
-
let { activeValue: o, collapsed: s, handleCollapsedChange: c } =
|
|
142686
|
+
let { activeValue: o, collapsed: s, handleCollapsedChange: c } = G1e(), [l, u] = A.useState({
|
|
142679
142687
|
width: 0,
|
|
142680
142688
|
left: 0
|
|
142681
142689
|
}), d = A.useRef(null), f = A.useRef(null), p = A.useRef(null), m = A.useCallback(() => {
|
|
@@ -142721,7 +142729,7 @@ function K9({ ref: e, children: t, className: n, variant: r = "default", collaps
|
|
|
142721
142729
|
let g = A.useRef(null);
|
|
142722
142730
|
return A.useEffect(() => {
|
|
142723
142731
|
g.current && (g.current.style.width = `${l.width}px`, g.current.style.left = `${l.left}px`);
|
|
142724
|
-
}, [l]), /* @__PURE__ */ (0, O.jsx)(
|
|
142732
|
+
}, [l]), /* @__PURE__ */ (0, O.jsx)(K1e, {
|
|
142725
142733
|
value: {
|
|
142726
142734
|
variant: r,
|
|
142727
142735
|
collapsed: s,
|
|
@@ -142743,29 +142751,30 @@ function K9({ ref: e, children: t, className: n, variant: r = "default", collaps
|
|
|
142743
142751
|
});
|
|
142744
142752
|
}
|
|
142745
142753
|
K9.displayName = "TabsList";
|
|
142746
|
-
var
|
|
142747
|
-
let { activeValue:
|
|
142748
|
-
return /* @__PURE__ */ (0, O.jsx)(
|
|
142754
|
+
var J1e = ({ children: e, title: t, collapsed: n }) => !t || !n ? e : /* @__PURE__ */ (0, O.jsx)(zd, { children: /* @__PURE__ */ (0, O.jsxs)(Bd, { children: [/* @__PURE__ */ (0, O.jsx)(Vd, { children: e }), /* @__PURE__ */ (0, O.jsx)(Hd, { children: t })] }) }), q9 = A.forwardRef(({ children: e, value: t, className: n, disabled: r, icon: i, title: a, showDot: o = !1, alwaysExpanded: s = !1, badge: c, ...l }, u) => {
|
|
142755
|
+
let { activeValue: d, handleValueChange: f, collapsed: p } = G1e(), m = q1e()?.variant || "default", h = d === t, g = !p || h || s;
|
|
142756
|
+
return /* @__PURE__ */ (0, O.jsx)(J1e, {
|
|
142749
142757
|
title: a,
|
|
142750
|
-
collapsed:
|
|
142758
|
+
collapsed: p && !g,
|
|
142751
142759
|
children: /* @__PURE__ */ (0, O.jsxs)("button", {
|
|
142752
|
-
ref:
|
|
142760
|
+
ref: u,
|
|
142753
142761
|
disabled: r,
|
|
142754
|
-
onClick: () =>
|
|
142762
|
+
onClick: () => f(t),
|
|
142755
142763
|
"data-tab-value": t,
|
|
142756
|
-
"data-tab-active":
|
|
142764
|
+
"data-tab-active": h,
|
|
142757
142765
|
role: "tab",
|
|
142758
|
-
"aria-selected":
|
|
142759
|
-
title:
|
|
142760
|
-
className: V("relative z-10 flex-1 inline-flex items-center justify-center whitespace-nowrap text-sm font-medium ring-offset-background transition-all duration-500 ease-in-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 cursor-pointer",
|
|
142761
|
-
...
|
|
142766
|
+
"aria-selected": h ? "true" : "false",
|
|
142767
|
+
title: p && !g && a ? a : void 0,
|
|
142768
|
+
className: V("relative z-10 flex-1 inline-flex items-center justify-center whitespace-nowrap text-sm font-medium ring-offset-background transition-all duration-500 ease-in-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 cursor-pointer", m === "default" && "py-2.5", m === "default" && "rounded-md px-4", m === "underline" && "px-6 py-3 border-b-2 border-transparent", h && "text-foreground", !h && "text-muted-foreground hover:text-foreground", n),
|
|
142769
|
+
...l,
|
|
142762
142770
|
children: [
|
|
142763
|
-
i && /* @__PURE__ */ (0, O.jsx)(i, { className: V("h-4 w-4 transition-all duration-500 ease-in-out",
|
|
142771
|
+
i && /* @__PURE__ */ (0, O.jsx)(i, { className: V("h-4 w-4 shrink-0 transition-all duration-500 ease-in-out", g && "mr-2", !g && "mr-0!") }),
|
|
142764
142772
|
o && /* @__PURE__ */ (0, O.jsx)("span", { className: "absolute top-1.5 right-1.5 w-2 h-2 bg-orange-500 dark:bg-orange-400 border-2 border-white dark:border-zinc-900 rounded-full transition-opacity duration-300 z-10 animate-status-pulse-orange" }),
|
|
142765
142773
|
/* @__PURE__ */ (0, O.jsx)("span", {
|
|
142766
|
-
className: V("transition-all duration-500 ease-in-out overflow-hidden",
|
|
142774
|
+
className: V("min-w-0 transition-all duration-500 ease-in-out overflow-hidden", g ? "w-auto opacity-100" : "w-0 opacity-0"),
|
|
142767
142775
|
children: e
|
|
142768
|
-
})
|
|
142776
|
+
}),
|
|
142777
|
+
c
|
|
142769
142778
|
]
|
|
142770
142779
|
})
|
|
142771
142780
|
});
|
|
@@ -142773,7 +142782,7 @@ var q1e = ({ children: e, title: t, collapsed: n }) => !t || !n ? e : /* @__PURE
|
|
|
142773
142782
|
q9.displayName = "TabsTrigger";
|
|
142774
142783
|
//#endregion
|
|
142775
142784
|
//#region ../../node_modules/.pnpm/@radix-ui+react-context@1.1.3_@types+react@19.2.14_react@19.2.4/node_modules/@radix-ui/react-context/dist/index.mjs
|
|
142776
|
-
function
|
|
142785
|
+
function Y1e(e, t = []) {
|
|
142777
142786
|
let n = [];
|
|
142778
142787
|
function r(t, r) {
|
|
142779
142788
|
let i = A.createContext(r);
|
|
@@ -142806,9 +142815,9 @@ function J1e(e, t = []) {
|
|
|
142806
142815
|
} }), [n, r]);
|
|
142807
142816
|
};
|
|
142808
142817
|
};
|
|
142809
|
-
return i.scopeName = e, [r,
|
|
142818
|
+
return i.scopeName = e, [r, X1e(i, ...t)];
|
|
142810
142819
|
}
|
|
142811
|
-
function
|
|
142820
|
+
function X1e(...e) {
|
|
142812
142821
|
let t = e[0];
|
|
142813
142822
|
if (e.length === 1) return t;
|
|
142814
142823
|
let n = () => {
|
|
@@ -142831,7 +142840,7 @@ function Y1e(...e) {
|
|
|
142831
142840
|
}
|
|
142832
142841
|
//#endregion
|
|
142833
142842
|
//#region ../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.4/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js
|
|
142834
|
-
var
|
|
142843
|
+
var Z1e = /* @__PURE__ */ s(((e) => {
|
|
142835
142844
|
var t = _();
|
|
142836
142845
|
function n(e, t) {
|
|
142837
142846
|
return e === t && (e !== 0 || 1 / e == 1 / t) || e !== e && t !== t;
|
|
@@ -142869,7 +142878,7 @@ var X1e = /* @__PURE__ */ s(((e) => {
|
|
|
142869
142878
|
}
|
|
142870
142879
|
var d = typeof window > "u" || window.document === void 0 || window.document.createElement === void 0 ? u : c;
|
|
142871
142880
|
e.useSyncExternalStore = t.useSyncExternalStore === void 0 ? d : t.useSyncExternalStore;
|
|
142872
|
-
})),
|
|
142881
|
+
})), Q1e = /* @__PURE__ */ s(((e) => {
|
|
142873
142882
|
process.env.NODE_ENV !== "production" && (function() {
|
|
142874
142883
|
function t(e, t) {
|
|
142875
142884
|
return e === t && (e !== 0 || 1 / e == 1 / t) || e !== e && t !== t;
|
|
@@ -142915,20 +142924,20 @@ var X1e = /* @__PURE__ */ s(((e) => {
|
|
|
142915
142924
|
var a = _(), o = typeof Object.is == "function" ? Object.is : t, s = a.useState, c = a.useEffect, l = a.useLayoutEffect, u = a.useDebugValue, d = !1, f = !1, p = typeof window > "u" || window.document === void 0 || window.document.createElement === void 0 ? i : n;
|
|
142916
142925
|
e.useSyncExternalStore = a.useSyncExternalStore === void 0 ? p : a.useSyncExternalStore, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
142917
142926
|
})();
|
|
142918
|
-
})),
|
|
142919
|
-
process.env.NODE_ENV === "production" ? t.exports =
|
|
142927
|
+
})), $1e = (/* @__PURE__ */ s(((e, t) => {
|
|
142928
|
+
process.env.NODE_ENV === "production" ? t.exports = Z1e() : t.exports = Q1e();
|
|
142920
142929
|
})))();
|
|
142921
|
-
function $1e() {
|
|
142922
|
-
return (0, Q1e.useSyncExternalStore)(e0e, () => !0, () => !1);
|
|
142923
|
-
}
|
|
142924
142930
|
function e0e() {
|
|
142931
|
+
return (0, $1e.useSyncExternalStore)(t0e, () => !0, () => !1);
|
|
142932
|
+
}
|
|
142933
|
+
function t0e() {
|
|
142925
142934
|
return () => {};
|
|
142926
142935
|
}
|
|
142927
142936
|
//#endregion
|
|
142928
142937
|
//#region ../../node_modules/.pnpm/@radix-ui+react-avatar@1.1.11_@types+react-dom@19.2.3_@types+react@19.2.14__@types+reac_5e99ccf265cbb36ef8e7150da8f5489e/node_modules/@radix-ui/react-avatar/dist/index.mjs
|
|
142929
|
-
var J9 = "Avatar", [
|
|
142938
|
+
var J9 = "Avatar", [n0e, r0e] = Y1e(J9), [i0e, a0e] = n0e(J9), o0e = A.forwardRef((e, t) => {
|
|
142930
142939
|
let { __scopeAvatar: n, ...r } = e, [i, a] = A.useState("idle");
|
|
142931
|
-
return /* @__PURE__ */ (0, O.jsx)(
|
|
142940
|
+
return /* @__PURE__ */ (0, O.jsx)(i0e, {
|
|
142932
142941
|
scope: n,
|
|
142933
142942
|
imageLoadingStatus: i,
|
|
142934
142943
|
onImageLoadingStatusChange: a,
|
|
@@ -142938,9 +142947,9 @@ var J9 = "Avatar", [t0e, n0e] = J1e(J9), [r0e, i0e] = t0e(J9), a0e = A.forwardRe
|
|
|
142938
142947
|
})
|
|
142939
142948
|
});
|
|
142940
142949
|
});
|
|
142941
|
-
|
|
142942
|
-
var
|
|
142943
|
-
let { __scopeAvatar: n, src: r, onLoadingStatusChange: i = () => {}, ...a } = e, o =
|
|
142950
|
+
o0e.displayName = J9;
|
|
142951
|
+
var s0e = "AvatarImage", c0e = A.forwardRef((e, t) => {
|
|
142952
|
+
let { __scopeAvatar: n, src: r, onLoadingStatusChange: i = () => {}, ...a } = e, o = a0e(s0e, n), s = f0e(r, a), c = sn((e) => {
|
|
142944
142953
|
i(e), o.onImageLoadingStatusChange(e);
|
|
142945
142954
|
});
|
|
142946
142955
|
return Ht(() => {
|
|
@@ -142951,9 +142960,9 @@ var o0e = "AvatarImage", s0e = A.forwardRef((e, t) => {
|
|
|
142951
142960
|
src: r
|
|
142952
142961
|
}) : null;
|
|
142953
142962
|
});
|
|
142954
|
-
|
|
142955
|
-
var
|
|
142956
|
-
let { __scopeAvatar: n, delayMs: r, ...i } = e, a =
|
|
142963
|
+
c0e.displayName = s0e;
|
|
142964
|
+
var l0e = "AvatarFallback", u0e = A.forwardRef((e, t) => {
|
|
142965
|
+
let { __scopeAvatar: n, delayMs: r, ...i } = e, a = a0e(l0e, n), [o, s] = A.useState(r === void 0);
|
|
142957
142966
|
return A.useEffect(() => {
|
|
142958
142967
|
if (r !== void 0) {
|
|
142959
142968
|
let e = window.setTimeout(() => s(!0), r);
|
|
@@ -142964,14 +142973,14 @@ var c0e = "AvatarFallback", l0e = A.forwardRef((e, t) => {
|
|
|
142964
142973
|
ref: t
|
|
142965
142974
|
}) : null;
|
|
142966
142975
|
});
|
|
142967
|
-
|
|
142968
|
-
function
|
|
142976
|
+
u0e.displayName = l0e;
|
|
142977
|
+
function d0e(e, t) {
|
|
142969
142978
|
return e ? t ? (e.src !== t && (e.src = t), e.complete && e.naturalWidth > 0 ? "loaded" : "loading") : "error" : "idle";
|
|
142970
142979
|
}
|
|
142971
|
-
function
|
|
142972
|
-
let r =
|
|
142980
|
+
function f0e(e, { referrerPolicy: t, crossOrigin: n }) {
|
|
142981
|
+
let r = e0e(), i = A.useRef(null), a = r ? (i.current ||= new window.Image(), i.current) : null, [o, s] = A.useState(() => d0e(a, e));
|
|
142973
142982
|
return Ht(() => {
|
|
142974
|
-
s(
|
|
142983
|
+
s(d0e(a, e));
|
|
142975
142984
|
}, [a, e]), Ht(() => {
|
|
142976
142985
|
let e = (e) => () => {
|
|
142977
142986
|
s(e);
|
|
@@ -142987,25 +142996,25 @@ function d0e(e, { referrerPolicy: t, crossOrigin: n }) {
|
|
|
142987
142996
|
t
|
|
142988
142997
|
]), o;
|
|
142989
142998
|
}
|
|
142990
|
-
var
|
|
142999
|
+
var p0e = o0e, m0e = c0e, h0e = u0e;
|
|
142991
143000
|
//#endregion
|
|
142992
143001
|
//#region src/client/components/ui/avatar.tsx
|
|
142993
|
-
function
|
|
142994
|
-
return /* @__PURE__ */ (0, O.jsx)(
|
|
143002
|
+
function g0e({ className: e, ...t }) {
|
|
143003
|
+
return /* @__PURE__ */ (0, O.jsx)(p0e, {
|
|
142995
143004
|
"data-slot": "avatar",
|
|
142996
143005
|
className: V("relative flex size-8 shrink-0 overflow-hidden rounded-full", e),
|
|
142997
143006
|
...t
|
|
142998
143007
|
});
|
|
142999
143008
|
}
|
|
143000
|
-
function
|
|
143001
|
-
return /* @__PURE__ */ (0, O.jsx)(
|
|
143009
|
+
function _0e({ className: e, ...t }) {
|
|
143010
|
+
return /* @__PURE__ */ (0, O.jsx)(m0e, {
|
|
143002
143011
|
"data-slot": "avatar-image",
|
|
143003
143012
|
className: V("aspect-square size-full", e),
|
|
143004
143013
|
...t
|
|
143005
143014
|
});
|
|
143006
143015
|
}
|
|
143007
|
-
function
|
|
143008
|
-
return /* @__PURE__ */ (0, O.jsx)(
|
|
143016
|
+
function v0e({ className: e, ...t }) {
|
|
143017
|
+
return /* @__PURE__ */ (0, O.jsx)(h0e, {
|
|
143009
143018
|
"data-slot": "avatar-fallback",
|
|
143010
143019
|
className: V("flex size-full items-center justify-center rounded-full bg-zinc-200 dark:bg-zinc-700 text-muted-foreground font-medium", e),
|
|
143011
143020
|
...t
|
|
@@ -143013,10 +143022,10 @@ function _0e({ className: e, ...t }) {
|
|
|
143013
143022
|
}
|
|
143014
143023
|
//#endregion
|
|
143015
143024
|
//#region src/client/components/HostedUserMenu.tsx
|
|
143016
|
-
function
|
|
143025
|
+
function y0e(e, t) {
|
|
143017
143026
|
return e?.[0] ? e[0].toUpperCase() : t?.[0] ? t[0].toUpperCase() : "U";
|
|
143018
143027
|
}
|
|
143019
|
-
function
|
|
143028
|
+
function b0e({ chatApiUrl: e, dashboardUrl: t = "https://manufact.com/cloud", fallback: n = null, onUserResolved: r }) {
|
|
143020
143029
|
let [i, a] = (0, A.useState)(null), [o, s] = (0, A.useState)(!1), c = (0, A.useCallback)(() => {
|
|
143021
143030
|
let t = !1, n = `${new URL(e).origin}/api/auth/get-session`;
|
|
143022
143031
|
return fetch(n, { credentials: "include" }).then((e) => e.ok ? e.json() : null).then((e) => {
|
|
@@ -143037,19 +143046,19 @@ function y0e({ chatApiUrl: e, dashboardUrl: t = "https://manufact.com/cloud", fa
|
|
|
143037
143046
|
return window.addEventListener("manufact:session-changed", e), () => window.removeEventListener("manufact:session-changed", e);
|
|
143038
143047
|
}, [c]), !o) return null;
|
|
143039
143048
|
if (!i) return /* @__PURE__ */ (0, O.jsx)(O.Fragment, { children: n });
|
|
143040
|
-
let l =
|
|
143049
|
+
let l = y0e(i.name, i.email), u = i.name ?? i.email ?? "User";
|
|
143041
143050
|
return /* @__PURE__ */ (0, O.jsxs)(nu, { children: [/* @__PURE__ */ (0, O.jsx)(ru, {
|
|
143042
143051
|
asChild: !0,
|
|
143043
143052
|
children: /* @__PURE__ */ (0, O.jsx)(H, {
|
|
143044
143053
|
variant: "ghost",
|
|
143045
143054
|
className: "relative h-8 w-8 shrink-0 rounded-full p-0 mr-2",
|
|
143046
143055
|
"aria-label": "User menu",
|
|
143047
|
-
children: /* @__PURE__ */ (0, O.jsxs)(
|
|
143056
|
+
children: /* @__PURE__ */ (0, O.jsxs)(g0e, {
|
|
143048
143057
|
className: "h-8 w-8 border border-zinc-300 dark:border-zinc-600",
|
|
143049
|
-
children: [/* @__PURE__ */ (0, O.jsx)(
|
|
143058
|
+
children: [/* @__PURE__ */ (0, O.jsx)(_0e, {
|
|
143050
143059
|
src: i.image ?? "",
|
|
143051
143060
|
alt: u
|
|
143052
|
-
}), /* @__PURE__ */ (0, O.jsx)(
|
|
143061
|
+
}), /* @__PURE__ */ (0, O.jsx)(v0e, {
|
|
143053
143062
|
className: "text-sm",
|
|
143054
143063
|
children: l
|
|
143055
143064
|
})]
|
|
@@ -143088,7 +143097,7 @@ function y0e({ chatApiUrl: e, dashboardUrl: t = "https://manufact.com/cloud", fa
|
|
|
143088
143097
|
}
|
|
143089
143098
|
//#endregion
|
|
143090
143099
|
//#region src/client/components/AddToClientDropdown.tsx
|
|
143091
|
-
function
|
|
143100
|
+
function x0e({ serverConfig: e, additionalItems: t = [], showClients: n = {
|
|
143092
143101
|
cursor: !0,
|
|
143093
143102
|
vsCode: !0,
|
|
143094
143103
|
vsCodeInsiders: !0,
|
|
@@ -143533,7 +143542,7 @@ function Y9({ className: e, state: t = "collapsed", href: n = "https://mcp-use.c
|
|
|
143533
143542
|
strokeLinecap: "round",
|
|
143534
143543
|
strokeLinejoin: "round",
|
|
143535
143544
|
children: [
|
|
143536
|
-
/* @__PURE__ */ (0, O.jsx)(
|
|
143545
|
+
/* @__PURE__ */ (0, O.jsx)(S0e, {
|
|
143537
143546
|
d: "m105.5 34.8.6.6c9.5 9.5 14.4 21.9 14.6 34.4a112.6 112.6 0 0 0 112.2 112.1h.6c12 .4 24 5.1 33.2 14.1l.6.6a50 50 0 0 1-70.1 71.3l-.6-.6A49.9 49.9 0 0 1 182 230 112.6 112.6 0 0 0 73.4 120.7h-.8a49.9 49.9 0 0 1-36.7-14l-.5-.6a50 50 0 0 1-.6-70.2l.6-.5a50 50 0 0 1 69.5-1.2l.6.6Z",
|
|
143538
143547
|
times: {
|
|
143539
143548
|
T0: 0,
|
|
@@ -143543,7 +143552,7 @@ function Y9({ className: e, state: t = "collapsed", href: n = "https://mcp-use.c
|
|
|
143543
143552
|
},
|
|
143544
143553
|
total: s
|
|
143545
143554
|
}),
|
|
143546
|
-
/* @__PURE__ */ (0, O.jsx)(
|
|
143555
|
+
/* @__PURE__ */ (0, O.jsx)(C0e, {
|
|
143547
143556
|
cx: 70.3,
|
|
143548
143557
|
cy: 232.3,
|
|
143549
143558
|
r: 50,
|
|
@@ -143555,7 +143564,7 @@ function Y9({ className: e, state: t = "collapsed", href: n = "https://mcp-use.c
|
|
|
143555
143564
|
},
|
|
143556
143565
|
total: s
|
|
143557
143566
|
}),
|
|
143558
|
-
/* @__PURE__ */ (0, O.jsx)(
|
|
143567
|
+
/* @__PURE__ */ (0, O.jsx)(C0e, {
|
|
143559
143568
|
cx: 232.3,
|
|
143560
143569
|
cy: 70.3,
|
|
143561
143570
|
r: 50,
|
|
@@ -143582,7 +143591,7 @@ function Y9({ className: e, state: t = "collapsed", href: n = "https://mcp-use.c
|
|
|
143582
143591
|
})]
|
|
143583
143592
|
});
|
|
143584
143593
|
}
|
|
143585
|
-
function
|
|
143594
|
+
function S0e({ d: e, times: t, total: n }) {
|
|
143586
143595
|
let { T0: r, T1: i, T2: a, T3: o } = t;
|
|
143587
143596
|
return /* @__PURE__ */ (0, O.jsx)(Q1.path, {
|
|
143588
143597
|
d: e,
|
|
@@ -143618,7 +143627,7 @@ function x0e({ d: e, times: t, total: n }) {
|
|
|
143618
143627
|
}
|
|
143619
143628
|
});
|
|
143620
143629
|
}
|
|
143621
|
-
function
|
|
143630
|
+
function C0e({ cx: e, cy: t, r: n, times: r, total: i }) {
|
|
143622
143631
|
let { T0: a, T1: o, T2: s, T3: c } = r;
|
|
143623
143632
|
return /* @__PURE__ */ (0, O.jsx)(Q1.circle, {
|
|
143624
143633
|
cx: e,
|
|
@@ -143744,7 +143753,7 @@ function X9({ open: e, onOpenChange: t, serverUrl: n, serverName: r, serverId: i
|
|
|
143744
143753
|
}
|
|
143745
143754
|
//#endregion
|
|
143746
143755
|
//#region src/client/components/ui/shimmer-button.tsx
|
|
143747
|
-
function
|
|
143756
|
+
function w0e({ ref: e, shimmerColor: t, shimmerSize: n = "0.05em", shimmerDuration: r = "3s", borderRadius: i = "100px", background: a, className: o, children: s, ...c }) {
|
|
143748
143757
|
let { theme: l } = yV();
|
|
143749
143758
|
return /* @__PURE__ */ (0, O.jsxs)("button", {
|
|
143750
143759
|
style: {
|
|
@@ -143772,10 +143781,10 @@ function C0e({ ref: e, shimmerColor: t, shimmerSize: n = "0.05em", shimmerDurati
|
|
|
143772
143781
|
]
|
|
143773
143782
|
});
|
|
143774
143783
|
}
|
|
143775
|
-
|
|
143784
|
+
w0e.displayName = "ShimmerButton";
|
|
143776
143785
|
//#endregion
|
|
143777
143786
|
//#region src/client/components/ui/status-dot.tsx
|
|
143778
|
-
function
|
|
143787
|
+
function T0e({ status: e }) {
|
|
143779
143788
|
let { color: t, ringColor: n, tooltip: r } = ((e) => {
|
|
143780
143789
|
switch (e) {
|
|
143781
143790
|
case "ready": return {
|
|
@@ -143805,7 +143814,7 @@ function w0e({ status: e }) {
|
|
|
143805
143814
|
}
|
|
143806
143815
|
//#endregion
|
|
143807
143816
|
//#region src/client/components/ServerDropdown.tsx
|
|
143808
|
-
function
|
|
143817
|
+
function E0e({ connections: e, selectedServer: t, onServerSelect: n, onOpenConnectionOptions: r, mobileMode: i = !1 }) {
|
|
143809
143818
|
let a = IR(), [o, s] = (0, A.useState)(!1), [c, l] = (0, A.useState)(null), u = (t) => {
|
|
143810
143819
|
let r = e.find((e) => e.id === t);
|
|
143811
143820
|
if (!r || r.state !== "ready") {
|
|
@@ -143854,7 +143863,7 @@ function T0e({ connections: e, selectedServer: t, onServerSelect: n, onOpenConne
|
|
|
143854
143863
|
children: [/* @__PURE__ */ (0, O.jsx)("div", {
|
|
143855
143864
|
className: "font-medium",
|
|
143856
143865
|
children: hR(e)
|
|
143857
|
-
}), /* @__PURE__ */ (0, O.jsx)(
|
|
143866
|
+
}), /* @__PURE__ */ (0, O.jsx)(T0e, { status: e.state })]
|
|
143858
143867
|
}),
|
|
143859
143868
|
/* @__PURE__ */ (0, O.jsxs)("div", {
|
|
143860
143869
|
className: "flex items-center gap-1",
|
|
@@ -143900,7 +143909,7 @@ function T0e({ connections: e, selectedServer: t, onServerSelect: n, onOpenConne
|
|
|
143900
143909
|
children: [/* @__PURE__ */ (0, O.jsxs)(nu, { children: [
|
|
143901
143910
|
/* @__PURE__ */ (0, O.jsx)(ru, {
|
|
143902
143911
|
asChild: !0,
|
|
143903
|
-
children: /* @__PURE__ */ (0, O.jsxs)(
|
|
143912
|
+
children: /* @__PURE__ */ (0, O.jsxs)(w0e, {
|
|
143904
143913
|
className: V("min-w-0 sm:min-w-[200px] p-0 px-1 text-sm h-11 justify-start text-white dark:text-black border-black dark:border-white hover:bg-gray-800 dark:hover:bg-zinc-100 hover:border-gray-800 dark:hover:border-zinc-200", !t && "pl-4", t && "pr-20"),
|
|
143905
143914
|
children: [t && /* @__PURE__ */ (0, O.jsx)(t0, {
|
|
143906
143915
|
server: t,
|
|
@@ -143983,7 +143992,7 @@ function T0e({ connections: e, selectedServer: t, onServerSelect: n, onOpenConne
|
|
|
143983
143992
|
children: [/* @__PURE__ */ (0, O.jsx)("div", {
|
|
143984
143993
|
className: "font-medium",
|
|
143985
143994
|
children: hR(e)
|
|
143986
|
-
}), /* @__PURE__ */ (0, O.jsx)(
|
|
143995
|
+
}), /* @__PURE__ */ (0, O.jsx)(T0e, { status: e.state })]
|
|
143987
143996
|
}),
|
|
143988
143997
|
/* @__PURE__ */ (0, O.jsxs)("div", {
|
|
143989
143998
|
className: "flex items-center gap-1",
|
|
@@ -144027,7 +144036,7 @@ function T0e({ connections: e, selectedServer: t, onServerSelect: n, onOpenConne
|
|
|
144027
144036
|
}
|
|
144028
144037
|
//#endregion
|
|
144029
144038
|
//#region src/client/components/LayoutHeader.tsx
|
|
144030
|
-
var
|
|
144039
|
+
var D0e = [
|
|
144031
144040
|
{
|
|
144032
144041
|
id: "chat",
|
|
144033
144042
|
label: "Chat",
|
|
@@ -144066,17 +144075,17 @@ var E0e = [
|
|
|
144066
144075
|
icon: Tf
|
|
144067
144076
|
}
|
|
144068
144077
|
];
|
|
144069
|
-
function
|
|
144078
|
+
function O0e(e, t) {
|
|
144070
144079
|
return e === "tools" ? t.tools.length : e === "prompts" ? t.prompts.length : e === "resources" ? t.resources.length : e === "sampling" ? t.pendingSamplingRequests?.length || 0 : e === "elicitation" ? t.pendingElicitationRequests?.length || 0 : e === "notifications" ? t.unreadNotificationCount : 0;
|
|
144071
144080
|
}
|
|
144072
|
-
function
|
|
144081
|
+
function k0e(e, t, n) {
|
|
144073
144082
|
return n && t > 0 && [
|
|
144074
144083
|
"sampling",
|
|
144075
144084
|
"elicitation",
|
|
144076
144085
|
"notifications"
|
|
144077
144086
|
].includes(e);
|
|
144078
144087
|
}
|
|
144079
|
-
function
|
|
144088
|
+
function A0e({ collapsed: e, onToggle: t }) {
|
|
144080
144089
|
return /* @__PURE__ */ (0, O.jsxs)(Bd, { children: [/* @__PURE__ */ (0, O.jsx)(Vd, {
|
|
144081
144090
|
asChild: !0,
|
|
144082
144091
|
children: /* @__PURE__ */ (0, O.jsx)("button", {
|
|
@@ -144088,7 +144097,7 @@ function k0e({ collapsed: e, onToggle: t }) {
|
|
|
144088
144097
|
})
|
|
144089
144098
|
}), /* @__PURE__ */ (0, O.jsx)(Hd, { children: /* @__PURE__ */ (0, O.jsx)("p", { children: e ? "Expand tabs" : "Collapse tabs" }) })] });
|
|
144090
144099
|
}
|
|
144091
|
-
function
|
|
144100
|
+
function j0e(e) {
|
|
144092
144101
|
try {
|
|
144093
144102
|
let t = new URL(e).hostname.toLowerCase();
|
|
144094
144103
|
return t === "localhost" || t === "127.0.0.1" || t === "::1" || t === "0.0.0.0";
|
|
@@ -144096,14 +144105,14 @@ function A0e(e) {
|
|
|
144096
144105
|
return !1;
|
|
144097
144106
|
}
|
|
144098
144107
|
}
|
|
144099
|
-
function
|
|
144108
|
+
function M0e(e) {
|
|
144100
144109
|
try {
|
|
144101
144110
|
return new URL(e).hostname.endsWith(".mcp-use.run");
|
|
144102
144111
|
} catch {
|
|
144103
144112
|
return !1;
|
|
144104
144113
|
}
|
|
144105
144114
|
}
|
|
144106
|
-
function
|
|
144115
|
+
function N0e(e) {
|
|
144107
144116
|
if (!e) return null;
|
|
144108
144117
|
try {
|
|
144109
144118
|
let t = new URL(e);
|
|
@@ -144116,7 +144125,7 @@ var Z9 = {
|
|
|
144116
144125
|
stopping: "Stopping tunnel…",
|
|
144117
144126
|
reconnecting: "Reconnecting…"
|
|
144118
144127
|
};
|
|
144119
|
-
function
|
|
144128
|
+
function P0e({ tunnelUrl: e, isTunnelStarting: t, setTunnelUrl: n, setIsTunnelStarting: r, copied: i, setCopied: a, handleCopy: o }) {
|
|
144120
144129
|
let [s, c] = (0, A.useState)(!1), [l, u] = (0, A.useState)(null), [d, f] = (0, A.useState)(0), [p, m] = (0, A.useState)(Z9.starting);
|
|
144121
144130
|
(0, A.useEffect)(() => {
|
|
144122
144131
|
if (!t) {
|
|
@@ -144145,7 +144154,7 @@ function N0e({ tunnelUrl: e, isTunnelStarting: t, setTunnelUrl: n, setIsTunnelSt
|
|
|
144145
144154
|
if (e) return;
|
|
144146
144155
|
if (u(!!r.fromCli), r.tunnelUrl) n(new URL(r.tunnelUrl).origin);
|
|
144147
144156
|
else {
|
|
144148
|
-
let e =
|
|
144157
|
+
let e = N0e(r.mcpUrl ?? null);
|
|
144149
144158
|
e && n(e);
|
|
144150
144159
|
}
|
|
144151
144160
|
} catch {
|
|
@@ -144350,10 +144359,10 @@ function N0e({ tunnelUrl: e, isTunnelStarting: t, setTunnelUrl: n, setIsTunnelSt
|
|
|
144350
144359
|
})]
|
|
144351
144360
|
});
|
|
144352
144361
|
}
|
|
144353
|
-
function
|
|
144354
|
-
let { tunnelUrl: c, isTunnelStarting: l, setTunnelUrl: u, setIsTunnelStarting: d, embeddedConfig: f } = i0(), { theme: p, setTheme: m } = yV(), h = !!t && (
|
|
144362
|
+
function F0e({ connections: e, selectedServer: t, activeTab: n, onServerSelect: r, onTabChange: i, onCommandPaletteOpen: a, onOpenConnectionOptions: o, embedded: s = !1 }) {
|
|
144363
|
+
let { tunnelUrl: c, isTunnelStarting: l, setTunnelUrl: u, setIsTunnelStarting: d, embeddedConfig: f } = i0(), { theme: p, setTheme: m } = yV(), h = !!t && (j0e(t.url) || M0e(t.url) || !!c), [g, _] = (0, A.useState)(!1), [v, y] = (0, A.useState)(!1), [b, x] = (0, A.useState)(!1), [S, C] = (0, A.useState)(!0), [w, T] = (0, A.useState)(!1);
|
|
144355
144364
|
if (f.singleTab) return null;
|
|
144356
|
-
let E = f.visibleTabs ?
|
|
144365
|
+
let E = f.visibleTabs ? D0e.filter((e) => e.id === "separator" || f.visibleTabs.includes(e.id)) : D0e, D = async () => {
|
|
144357
144366
|
if (c) try {
|
|
144358
144367
|
await pR(`${c}/mcp`), _(!0), vz.success("Tunnel URL copied to clipboard"), setTimeout(() => _(!1), 2e3);
|
|
144359
144368
|
} catch {
|
|
@@ -144369,7 +144378,7 @@ function P0e({ connections: e, selectedServer: t, activeTab: n, onServerSelect:
|
|
|
144369
144378
|
children: [
|
|
144370
144379
|
!s && /* @__PURE__ */ (0, O.jsx)("div", {
|
|
144371
144380
|
className: "flex-1 flex justify-start",
|
|
144372
|
-
children: /* @__PURE__ */ (0, O.jsx)(
|
|
144381
|
+
children: /* @__PURE__ */ (0, O.jsx)(E0e, {
|
|
144373
144382
|
connections: e,
|
|
144374
144383
|
selectedServer: t,
|
|
144375
144384
|
onServerSelect: r,
|
|
@@ -144390,7 +144399,7 @@ function P0e({ connections: e, selectedServer: t, activeTab: n, onServerSelect:
|
|
|
144390
144399
|
t && (() => {
|
|
144391
144400
|
let e = hR(t);
|
|
144392
144401
|
return /* @__PURE__ */ (0, O.jsxs)(O.Fragment, { children: [
|
|
144393
|
-
/* @__PURE__ */ (0, O.jsx)(
|
|
144402
|
+
/* @__PURE__ */ (0, O.jsx)(x0e, {
|
|
144394
144403
|
serverConfig: {
|
|
144395
144404
|
url: c ? `${c}/mcp` : t.url,
|
|
144396
144405
|
name: e,
|
|
@@ -144451,7 +144460,7 @@ function P0e({ connections: e, selectedServer: t, activeTab: n, onServerSelect:
|
|
|
144451
144460
|
})
|
|
144452
144461
|
] });
|
|
144453
144462
|
})(),
|
|
144454
|
-
h && /* @__PURE__ */ (0, O.jsx)(
|
|
144463
|
+
h && /* @__PURE__ */ (0, O.jsx)(P0e, {
|
|
144455
144464
|
tunnelUrl: c,
|
|
144456
144465
|
isTunnelStarting: l,
|
|
144457
144466
|
setTunnelUrl: u,
|
|
@@ -144514,7 +144523,7 @@ function P0e({ connections: e, selectedServer: t, activeTab: n, onServerSelect:
|
|
|
144514
144523
|
href: "https://github.com/mcp-use/mcp-use",
|
|
144515
144524
|
target: "_blank",
|
|
144516
144525
|
rel: "noopener noreferrer",
|
|
144517
|
-
children: [/* @__PURE__ */ (0, O.jsx)(
|
|
144526
|
+
children: [/* @__PURE__ */ (0, O.jsx)(U1e, { className: "h-4 w-4 mr-2" }), "GitHub"]
|
|
144518
144527
|
})
|
|
144519
144528
|
}),
|
|
144520
144529
|
/* @__PURE__ */ (0, O.jsx)(lu, {
|
|
@@ -144542,21 +144551,23 @@ function P0e({ connections: e, selectedServer: t, activeTab: n, onServerSelect:
|
|
|
144542
144551
|
className: "w-full justify-center",
|
|
144543
144552
|
children: E.map((e) => {
|
|
144544
144553
|
if (e.id === "separator") return /* @__PURE__ */ (0, O.jsx)("div", { className: "h-5 w-px bg-zinc-300 dark:bg-zinc-600 mx-1 shrink-0" }, "separator");
|
|
144545
|
-
let r =
|
|
144546
|
-
return /* @__PURE__ */ (0, O.
|
|
144554
|
+
let r = O0e(e.id, t), i = k0e(e.id, r, S);
|
|
144555
|
+
return /* @__PURE__ */ (0, O.jsx)(q9, {
|
|
144547
144556
|
value: e.id,
|
|
144548
144557
|
"data-testid": `tab-${e.id}`,
|
|
144549
144558
|
icon: e.icon,
|
|
144550
144559
|
showDot: i,
|
|
144560
|
+
badge: /* @__PURE__ */ (0, O.jsx)(a$e, {
|
|
144561
|
+
count: r,
|
|
144562
|
+
isActive: n === e.id,
|
|
144563
|
+
size: "sm"
|
|
144564
|
+
}),
|
|
144551
144565
|
alwaysExpanded: "alwaysExpanded" in e && e.alwaysExpanded,
|
|
144552
144566
|
className: V("[&>svg]:mr-0 flex-1 flex-row gap-2 relative", S && "pl-2"),
|
|
144553
|
-
children:
|
|
144554
|
-
className: V(n === e.id ? "dark:bg-black" : "dark:bg-zinc-700", "bg-zinc-200 text-zinc-700 dark:text-zinc-300 text-[10px] px-1.5 py-0.5 rounded-full font-medium"),
|
|
144555
|
-
children: r
|
|
144556
|
-
}), /* @__PURE__ */ (0, O.jsx)("span", {
|
|
144567
|
+
children: /* @__PURE__ */ (0, O.jsx)("span", {
|
|
144557
144568
|
className: "sr-only",
|
|
144558
144569
|
children: e.label
|
|
144559
|
-
})
|
|
144570
|
+
})
|
|
144560
144571
|
}, e.id);
|
|
144561
144572
|
})
|
|
144562
144573
|
})
|
|
@@ -144566,7 +144577,7 @@ function P0e({ connections: e, selectedServer: t, activeTab: n, onServerSelect:
|
|
|
144566
144577
|
className: "hidden lg:flex items-center justify-between gap-3",
|
|
144567
144578
|
children: [/* @__PURE__ */ (0, O.jsxs)("div", {
|
|
144568
144579
|
className: "flex items-center flex-wrap gap-2 md:space-x-6 space-x-2",
|
|
144569
|
-
children: [!s && /* @__PURE__ */ (0, O.jsx)(
|
|
144580
|
+
children: [!s && /* @__PURE__ */ (0, O.jsx)(E0e, {
|
|
144570
144581
|
connections: e,
|
|
144571
144582
|
selectedServer: t,
|
|
144572
144583
|
onServerSelect: r,
|
|
@@ -144583,26 +144594,27 @@ function P0e({ connections: e, selectedServer: t, activeTab: n, onServerSelect:
|
|
|
144583
144594
|
collapsible: !0,
|
|
144584
144595
|
children: E.map((e) => {
|
|
144585
144596
|
if (e.id === "separator") return /* @__PURE__ */ (0, O.jsx)("div", { className: "h-5 w-px bg-zinc-300 dark:bg-zinc-600 mx-1 shrink-0" }, "separator");
|
|
144586
|
-
let r =
|
|
144597
|
+
let r = O0e(e.id, t), i = r > 0 ? `${e.label} (${r})` : e.label, a = k0e(e.id, r, S);
|
|
144587
144598
|
return /* @__PURE__ */ (0, O.jsx)(q9, {
|
|
144588
144599
|
value: e.id,
|
|
144589
144600
|
"data-testid": `tab-${e.id}`,
|
|
144590
144601
|
icon: e.icon,
|
|
144591
144602
|
showDot: a,
|
|
144603
|
+
badge: /* @__PURE__ */ (0, O.jsx)(a$e, {
|
|
144604
|
+
count: r,
|
|
144605
|
+
isActive: n === e.id
|
|
144606
|
+
}),
|
|
144592
144607
|
alwaysExpanded: "alwaysExpanded" in e && e.alwaysExpanded,
|
|
144593
144608
|
className: V("[&>svg]:mr-0 lg:[&>svg]:mr-2 relative", S && "pl-4"),
|
|
144594
144609
|
title: i,
|
|
144595
|
-
children: /* @__PURE__ */ (0, O.
|
|
144610
|
+
children: /* @__PURE__ */ (0, O.jsx)("span", {
|
|
144596
144611
|
className: "items-center gap-2 hidden lg:flex",
|
|
144597
|
-
children:
|
|
144598
|
-
className: V(n === e.id ? " dark:bg-black " : "dark:bg-zinc-700", "bg-zinc-200 text-zinc-700 dark:text-zinc-300 text-xs px-2 py-0.5 rounded-full font-medium"),
|
|
144599
|
-
children: r
|
|
144600
|
-
})]
|
|
144612
|
+
children: e.label
|
|
144601
144613
|
})
|
|
144602
144614
|
}, e.id);
|
|
144603
144615
|
})
|
|
144604
144616
|
})
|
|
144605
|
-
}), /* @__PURE__ */ (0, O.jsx)(
|
|
144617
|
+
}), /* @__PURE__ */ (0, O.jsx)(A0e, {
|
|
144606
144618
|
collapsed: S,
|
|
144607
144619
|
onToggle: () => C(!S)
|
|
144608
144620
|
})]
|
|
@@ -144613,7 +144625,7 @@ function P0e({ connections: e, selectedServer: t, activeTab: n, onServerSelect:
|
|
|
144613
144625
|
t && (() => {
|
|
144614
144626
|
let e = hR(t);
|
|
144615
144627
|
return /* @__PURE__ */ (0, O.jsxs)(O.Fragment, { children: [
|
|
144616
|
-
/* @__PURE__ */ (0, O.jsx)(
|
|
144628
|
+
/* @__PURE__ */ (0, O.jsx)(x0e, {
|
|
144617
144629
|
serverConfig: {
|
|
144618
144630
|
url: c ? `${c}/mcp` : t.url,
|
|
144619
144631
|
name: e,
|
|
@@ -144674,7 +144686,7 @@ function P0e({ connections: e, selectedServer: t, activeTab: n, onServerSelect:
|
|
|
144674
144686
|
})
|
|
144675
144687
|
] });
|
|
144676
144688
|
})(),
|
|
144677
|
-
h && /* @__PURE__ */ (0, O.jsx)(
|
|
144689
|
+
h && /* @__PURE__ */ (0, O.jsx)(P0e, {
|
|
144678
144690
|
tunnelUrl: c,
|
|
144679
144691
|
isTunnelStarting: l,
|
|
144680
144692
|
setTunnelUrl: u,
|
|
@@ -144751,7 +144763,7 @@ function P0e({ connections: e, selectedServer: t, activeTab: n, onServerSelect:
|
|
|
144751
144763
|
href: "https://github.com/mcp-use/mcp-use",
|
|
144752
144764
|
target: "_blank",
|
|
144753
144765
|
rel: "noopener noreferrer",
|
|
144754
|
-
children: [/* @__PURE__ */ (0, O.jsx)(
|
|
144766
|
+
children: [/* @__PURE__ */ (0, O.jsx)(U1e, { className: "h-4 w-4 mr-2" }), "GitHub"]
|
|
144755
144767
|
})
|
|
144756
144768
|
}),
|
|
144757
144769
|
/* @__PURE__ */ (0, O.jsx)(lu, {
|
|
@@ -144767,7 +144779,7 @@ function P0e({ connections: e, selectedServer: t, activeTab: n, onServerSelect:
|
|
|
144767
144779
|
})] }),
|
|
144768
144780
|
f.chatApiUrl ? /* @__PURE__ */ (0, O.jsxs)("div", {
|
|
144769
144781
|
className: "flex items-center gap-2",
|
|
144770
|
-
children: [/* @__PURE__ */ (0, O.jsx)(
|
|
144782
|
+
children: [/* @__PURE__ */ (0, O.jsx)(b0e, {
|
|
144771
144783
|
chatApiUrl: f.chatApiUrl,
|
|
144772
144784
|
onUserResolved: (e) => T(!!e),
|
|
144773
144785
|
fallback: /* @__PURE__ */ (0, O.jsx)("span", {
|
|
@@ -144786,7 +144798,7 @@ function P0e({ connections: e, selectedServer: t, activeTab: n, onServerSelect:
|
|
|
144786
144798
|
}
|
|
144787
144799
|
//#endregion
|
|
144788
144800
|
//#region src/client/components/Layout.tsx
|
|
144789
|
-
function
|
|
144801
|
+
function I0e({ children: e }) {
|
|
144790
144802
|
let t = IR(), n = NR(), { servers: r, addServer: i, removeServer: a, updateServerMetadata: o, updateServer: s, storageLoaded: c } = fR(), l = (0, A.useCallback)((e, t, n, r, a) => {
|
|
144791
144803
|
i(e, {
|
|
144792
144804
|
url: e,
|
|
@@ -145089,7 +145101,7 @@ function F0e({ children: e }) {
|
|
|
145089
145101
|
className: y ? ce ? "h-screen flex flex-col" : "h-screen flex flex-col gap-2 sm:gap-4" : "h-screen bg-[#f3f3f3] dark:bg-black flex flex-col px-2 py-2 sm:px-4 sm:py-4 gap-2 sm:gap-4",
|
|
145090
145102
|
style: le,
|
|
145091
145103
|
children: [
|
|
145092
|
-
!ce && /* @__PURE__ */ (0, O.jsx)(
|
|
145104
|
+
!ce && /* @__PURE__ */ (0, O.jsx)(F0e, {
|
|
145093
145105
|
connections: r,
|
|
145094
145106
|
selectedServer: R,
|
|
145095
145107
|
activeTab: m,
|
|
@@ -145101,7 +145113,7 @@ function F0e({ children: e }) {
|
|
|
145101
145113
|
}),
|
|
145102
145114
|
/* @__PURE__ */ (0, O.jsx)("main", {
|
|
145103
145115
|
className: ce ? "flex-1 w-full bg-white dark:bg-black p-0 overflow-auto" : "flex-1 w-full mx-auto bg-white dark:bg-black rounded-2xl border border-zinc-200 dark:border-zinc-700 p-0 overflow-auto",
|
|
145104
|
-
children: /* @__PURE__ */ (0, O.jsx)(
|
|
145116
|
+
children: /* @__PURE__ */ (0, O.jsx)(H1e, {
|
|
145105
145117
|
selectedServer: R,
|
|
145106
145118
|
activeTab: m,
|
|
145107
145119
|
toolsSearchRef: P,
|
|
@@ -145146,14 +145158,14 @@ function Q9(e) {
|
|
|
145146
145158
|
} catch {
|
|
145147
145159
|
t();
|
|
145148
145160
|
}
|
|
145149
|
-
return n.protocol !== "https:" && n.protocol !== "http:" && t(), n.hostname !== encodeURIComponent(n.hostname) && t(), n.username &&= encodeURIComponent(n.username), n.password &&= encodeURIComponent(n.password), n.pathname = n.pathname.slice(0, 1) + encodeURIComponent(n.pathname.slice(1)).replace(/%2f/gi, "/"), n.search = n.search.slice(0, 1) + Array.from(n.searchParams.entries()).map(
|
|
145161
|
+
return n.protocol !== "https:" && n.protocol !== "http:" && t(), n.hostname !== encodeURIComponent(n.hostname) && t(), n.username &&= encodeURIComponent(n.username), n.password &&= encodeURIComponent(n.password), n.pathname = n.pathname.slice(0, 1) + encodeURIComponent(n.pathname.slice(1)).replace(/%2f/gi, "/"), n.search = n.search.slice(0, 1) + Array.from(n.searchParams.entries()).map(L0e).join("&"), n.hash = n.hash.slice(0, 1) + encodeURIComponent(n.hash.slice(1)), n.href;
|
|
145150
145162
|
}
|
|
145151
145163
|
W(Q9, "sanitizeUrl");
|
|
145152
|
-
function
|
|
145164
|
+
function L0e([e, t]) {
|
|
145153
145165
|
return `${encodeURIComponent(e)}${t.length > 0 ? `=${encodeURIComponent(t)}` : ""}`;
|
|
145154
145166
|
}
|
|
145155
|
-
W(
|
|
145156
|
-
var
|
|
145167
|
+
W(L0e, "sanitizeParam");
|
|
145168
|
+
var R0e = class e {
|
|
145157
145169
|
static {
|
|
145158
145170
|
W(this, "OAuthSessionStore");
|
|
145159
145171
|
}
|
|
@@ -145327,7 +145339,7 @@ var L0e = class e {
|
|
|
145327
145339
|
//#endregion
|
|
145328
145340
|
//#region ../mcp-use/dist/chunk-ZXGVZARC.js
|
|
145329
145341
|
Yp();
|
|
145330
|
-
var
|
|
145342
|
+
var z0e = class {
|
|
145331
145343
|
static {
|
|
145332
145344
|
W(this, "LocalStorageKVStore");
|
|
145333
145345
|
}
|
|
@@ -145349,11 +145361,11 @@ var R0e = class {
|
|
|
145349
145361
|
return e;
|
|
145350
145362
|
}
|
|
145351
145363
|
};
|
|
145352
|
-
async function
|
|
145364
|
+
async function B0e(e) {
|
|
145353
145365
|
return typeof e == "string" ? e : e instanceof URLSearchParams || e instanceof FormData ? Object.fromEntries(e.entries()) : e instanceof Blob ? await e.text() : e;
|
|
145354
145366
|
}
|
|
145355
|
-
W(
|
|
145356
|
-
var
|
|
145367
|
+
W(B0e, "serializeBody");
|
|
145368
|
+
var V0e = class {
|
|
145357
145369
|
static {
|
|
145358
145370
|
W(this, "BrowserOAuthClientProvider");
|
|
145359
145371
|
}
|
|
@@ -145368,7 +145380,7 @@ var B0e = class {
|
|
|
145368
145380
|
_lastOriginalResource = null;
|
|
145369
145381
|
onPopupWindow;
|
|
145370
145382
|
constructor(e, t = {}) {
|
|
145371
|
-
this.serverUrl = e, this.session = new
|
|
145383
|
+
this.serverUrl = e, this.session = new R0e(e, t, new z0e()), this.preventAutoAuth = t.preventAutoAuth, this.useRedirectFlow = t.useRedirectFlow, this.oauthProxyUrl = t.oauthProxyUrl, this.connectionUrl = t.connectionUrl, this.staticClientInfo = t.staticClientInfo, this.onPopupWindow = t.onPopupWindow;
|
|
145372
145384
|
}
|
|
145373
145385
|
get storageKeyPrefix() {
|
|
145374
145386
|
return this.session.storageKeyPrefix;
|
|
@@ -145432,7 +145444,7 @@ var B0e = class {
|
|
|
145432
145444
|
} catch {}
|
|
145433
145445
|
return o;
|
|
145434
145446
|
}
|
|
145435
|
-
let c = a?.body ? await
|
|
145447
|
+
let c = a?.body ? await B0e(a.body) : void 0, l = await (await r(s, {
|
|
145436
145448
|
method: "POST",
|
|
145437
145449
|
headers: { "Content-Type": "application/json" },
|
|
145438
145450
|
body: JSON.stringify({
|
|
@@ -145539,7 +145551,7 @@ var B0e = class {
|
|
|
145539
145551
|
}), r;
|
|
145540
145552
|
}
|
|
145541
145553
|
};
|
|
145542
|
-
async function
|
|
145554
|
+
async function H0e() {
|
|
145543
145555
|
let e = new URLSearchParams(window.location.search), t = e.get("code"), n = e.get("state"), r = e.get("error"), i = e.get("error_description"), a = "[mcp-callback]";
|
|
145544
145556
|
console.log(`${a} Handling callback...`, {
|
|
145545
145557
|
code: t,
|
|
@@ -145608,7 +145620,7 @@ async function V0e() {
|
|
|
145608
145620
|
} catch (e) {
|
|
145609
145621
|
console.warn(`${a} Could not infer OAuth proxy URL:`, e);
|
|
145610
145622
|
}
|
|
145611
|
-
console.log(`${a} Re-instantiating provider for server: ${u}`), o = new
|
|
145623
|
+
console.log(`${a} Re-instantiating provider for server: ${u}`), o = new V0e(u, {
|
|
145612
145624
|
...d,
|
|
145613
145625
|
oauthProxyUrl: h,
|
|
145614
145626
|
connectionUrl: g
|
|
@@ -145665,8 +145677,8 @@ async function V0e() {
|
|
|
145665
145677
|
c && localStorage.removeItem(c), o && localStorage.removeItem(o.getKey("last_auth_url"));
|
|
145666
145678
|
}
|
|
145667
145679
|
}
|
|
145668
|
-
W(
|
|
145669
|
-
async function
|
|
145680
|
+
W(H0e, "onMcpAuthorization");
|
|
145681
|
+
async function U0e(e, t = fetch) {
|
|
145670
145682
|
let n = e.replace(/\/$/, ""), r = await t(n.endsWith("/mcp") ? n : `${n}/mcp`, {
|
|
145671
145683
|
method: "POST",
|
|
145672
145684
|
headers: { "Content-Type": "application/json" },
|
|
@@ -145684,13 +145696,13 @@ async function H0e(e, t = fetch) {
|
|
|
145684
145696
|
scope: a
|
|
145685
145697
|
};
|
|
145686
145698
|
}
|
|
145687
|
-
W(
|
|
145699
|
+
W(U0e, "probeAuthParams");
|
|
145688
145700
|
//#endregion
|
|
145689
145701
|
//#region src/client/components/OAuthCallback.tsx
|
|
145690
|
-
function
|
|
145702
|
+
function W0e() {
|
|
145691
145703
|
let [e, t] = (0, A.useState)("processing"), [n, r] = (0, A.useState)("");
|
|
145692
145704
|
return (0, A.useEffect)(() => {
|
|
145693
|
-
console.log("[OAuthCallback] Component mounted, handling authorization..."), console.log("[OAuthCallback] Current URL:", window.location.href),
|
|
145705
|
+
console.log("[OAuthCallback] Component mounted, handling authorization..."), console.log("[OAuthCallback] Current URL:", window.location.href), H0e().then(() => {
|
|
145694
145706
|
console.log("[OAuthCallback] Authorization successful"), t("success");
|
|
145695
145707
|
}).catch((e) => {
|
|
145696
145708
|
console.error("[OAuthCallback] Authorization failed:", e), t("error"), r(e instanceof Error ? e.message : String(e));
|
|
@@ -145739,7 +145751,7 @@ function U0e() {
|
|
|
145739
145751
|
}
|
|
145740
145752
|
//#endregion
|
|
145741
145753
|
//#region src/client/types/sampling.ts
|
|
145742
|
-
var
|
|
145754
|
+
var G0e = {
|
|
145743
145755
|
model: "stub-model",
|
|
145744
145756
|
stopReason: "endTurn",
|
|
145745
145757
|
role: "assistant",
|
|
@@ -145750,7 +145762,7 @@ var W0e = {
|
|
|
145750
145762
|
};
|
|
145751
145763
|
//#endregion
|
|
145752
145764
|
//#region src/client/components/sampling/SamplingRequestToast.tsx
|
|
145753
|
-
function
|
|
145765
|
+
function K0e({ requestId: e, serverName: t, onViewDetails: n, onApprove: r, onDeny: i }) {
|
|
145754
145766
|
return /* @__PURE__ */ (0, O.jsxs)("div", {
|
|
145755
145767
|
className: "space-y-3",
|
|
145756
145768
|
children: [/* @__PURE__ */ (0, O.jsxs)("div", { children: [/* @__PURE__ */ (0, O.jsx)("strong", { children: "Sampling Request Received" }), /* @__PURE__ */ (0, O.jsxs)("p", {
|
|
@@ -145771,7 +145783,7 @@ function G0e({ requestId: e, serverName: t, onViewDetails: n, onApprove: r, onDe
|
|
|
145771
145783
|
"data-testid": "sampling-toast-approve",
|
|
145772
145784
|
className: "px-3 py-1.5 text-xs font-medium rounded-md hover:bg-accent hover:text-accent-foreground",
|
|
145773
145785
|
onClick: (e) => {
|
|
145774
|
-
e.stopPropagation(), r(
|
|
145786
|
+
e.stopPropagation(), r(G0e);
|
|
145775
145787
|
},
|
|
145776
145788
|
children: "Approve"
|
|
145777
145789
|
}),
|
|
@@ -145789,8 +145801,8 @@ function G0e({ requestId: e, serverName: t, onViewDetails: n, onApprove: r, onDe
|
|
|
145789
145801
|
}
|
|
145790
145802
|
//#endregion
|
|
145791
145803
|
//#region src/client/components/ViewPreview.tsx
|
|
145792
|
-
var $9 = "preview-default",
|
|
145793
|
-
function
|
|
145804
|
+
var $9 = "preview-default", q0e = "preview-bundle";
|
|
145805
|
+
function J0e(e) {
|
|
145794
145806
|
if (!e) return {};
|
|
145795
145807
|
try {
|
|
145796
145808
|
let t = atob(e), n = JSON.parse(t);
|
|
@@ -145798,17 +145810,17 @@ function q0e(e) {
|
|
|
145798
145810
|
} catch {}
|
|
145799
145811
|
return {};
|
|
145800
145812
|
}
|
|
145801
|
-
function
|
|
145813
|
+
function Y0e(e, t) {
|
|
145802
145814
|
let n = `ui://widget/${t}`, r = e.find((e) => e.uri.startsWith(`${n}.`) && e.uri.endsWith(".html"));
|
|
145803
145815
|
return r ? r.uri : e.find((e) => e.name === t)?.uri;
|
|
145804
145816
|
}
|
|
145805
|
-
function
|
|
145817
|
+
function X0e() {
|
|
145806
145818
|
let e = globalThis.__mcpUsePreviewBundle;
|
|
145807
145819
|
if (!e || typeof e != "object") return;
|
|
145808
145820
|
let t = e;
|
|
145809
145821
|
if (typeof t.resourceUri == "string") return t;
|
|
145810
145822
|
}
|
|
145811
|
-
function
|
|
145823
|
+
function Z0e() {
|
|
145812
145824
|
(0, A.useEffect)(() => {
|
|
145813
145825
|
let e = document.documentElement, t = document.body, n = e.style.margin, r = t.style.margin, i = t.style.overflow;
|
|
145814
145826
|
return e.style.margin = "0", t.style.margin = "0", t.style.overflow = "hidden", () => {
|
|
@@ -145816,7 +145828,7 @@ function X0e() {
|
|
|
145816
145828
|
};
|
|
145817
145829
|
}, []);
|
|
145818
145830
|
}
|
|
145819
|
-
function
|
|
145831
|
+
function Q0e(e) {
|
|
145820
145832
|
(0, A.useEffect)(() => {
|
|
145821
145833
|
if (!e) return;
|
|
145822
145834
|
let t = !1;
|
|
@@ -145830,9 +145842,9 @@ function Z0e(e) {
|
|
|
145830
145842
|
};
|
|
145831
145843
|
}, [e]);
|
|
145832
145844
|
}
|
|
145833
|
-
function
|
|
145845
|
+
function $0e({ view: e, bundle: t }) {
|
|
145834
145846
|
let [n, r] = (0, A.useState)(!1);
|
|
145835
|
-
|
|
145847
|
+
Z0e(), Q0e(n);
|
|
145836
145848
|
let i = (0, A.useMemo)(() => async (e) => {
|
|
145837
145849
|
if (e === t.resourceUri) return t.resourceContents;
|
|
145838
145850
|
throw Error(`Resource ${e} not in screenshot bundle`);
|
|
@@ -145843,7 +145855,7 @@ function Q0e({ view: e, bundle: t }) {
|
|
|
145843
145855
|
height: "100vh"
|
|
145844
145856
|
},
|
|
145845
145857
|
children: /* @__PURE__ */ (0, O.jsx)(z7, {
|
|
145846
|
-
serverId:
|
|
145858
|
+
serverId: q0e,
|
|
145847
145859
|
toolCallId: (0, A.useMemo)(() => `preview-bundle-${e}-${Date.now().toString(36)}`, [e]),
|
|
145848
145860
|
toolName: e,
|
|
145849
145861
|
toolInput: t.toolInput,
|
|
@@ -145857,8 +145869,8 @@ function Q0e({ view: e, bundle: t }) {
|
|
|
145857
145869
|
})
|
|
145858
145870
|
});
|
|
145859
145871
|
}
|
|
145860
|
-
function
|
|
145861
|
-
let [t] = xge(), n = (0, A.useMemo)(() =>
|
|
145872
|
+
function e2e({ view: e }) {
|
|
145873
|
+
let [t] = xge(), n = (0, A.useMemo)(() => J0e(t.get("props")), [t]), r = (0, A.useMemo)(() => t.get("server") || `${window.location.origin}/mcp`, [t]), i = (0, A.useMemo)(() => {
|
|
145862
145874
|
let e = t.get("headers");
|
|
145863
145875
|
if (e) try {
|
|
145864
145876
|
let t = JSON.parse(atob(e));
|
|
@@ -145878,7 +145890,7 @@ function $0e({ view: e }) {
|
|
|
145878
145890
|
o
|
|
145879
145891
|
]);
|
|
145880
145892
|
let l = c?.state === "ready", u = c?.state === "failed", d = (0, A.useMemo)(() => {
|
|
145881
|
-
if (l) return
|
|
145893
|
+
if (l) return Y0e(c.resources, e);
|
|
145882
145894
|
}, [
|
|
145883
145895
|
l,
|
|
145884
145896
|
c?.resources,
|
|
@@ -145887,7 +145899,7 @@ function $0e({ view: e }) {
|
|
|
145887
145899
|
if (!c?.readResource) throw Error("Server not ready");
|
|
145888
145900
|
return c.readResource(e);
|
|
145889
145901
|
}, [c]), [m, h] = (0, A.useState)(!1);
|
|
145890
|
-
return
|
|
145902
|
+
return Q0e(m), Z0e(), u ? /* @__PURE__ */ (0, O.jsxs)("div", {
|
|
145891
145903
|
style: {
|
|
145892
145904
|
padding: 16,
|
|
145893
145905
|
fontFamily: "monospace",
|
|
@@ -145942,16 +145954,16 @@ function $0e({ view: e }) {
|
|
|
145942
145954
|
})
|
|
145943
145955
|
});
|
|
145944
145956
|
}
|
|
145945
|
-
function
|
|
145946
|
-
let e = Ehe().view ?? "", t = (0, A.useMemo)(() =>
|
|
145947
|
-
return t ? /* @__PURE__ */ (0, O.jsx)(
|
|
145957
|
+
function t2e() {
|
|
145958
|
+
let e = Ehe().view ?? "", t = (0, A.useMemo)(() => X0e(), []);
|
|
145959
|
+
return t ? /* @__PURE__ */ (0, O.jsx)($0e, {
|
|
145948
145960
|
view: e,
|
|
145949
145961
|
bundle: t
|
|
145950
|
-
}) : /* @__PURE__ */ (0, O.jsx)(
|
|
145962
|
+
}) : /* @__PURE__ */ (0, O.jsx)(e2e, { view: e });
|
|
145951
145963
|
}
|
|
145952
145964
|
//#endregion
|
|
145953
145965
|
//#region ../../node_modules/.pnpm/next-themes@0.4.6_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next-themes/dist/index.mjs
|
|
145954
|
-
var
|
|
145966
|
+
var n2e = (e, t, n, r, i, a, o, s) => {
|
|
145955
145967
|
let c = document.documentElement, l = ["light", "dark"];
|
|
145956
145968
|
function u(t) {
|
|
145957
145969
|
(Array.isArray(e) ? e : [e]).forEach((e) => {
|
|
@@ -145970,10 +145982,10 @@ var t2e = (e, t, n, r, i, a, o, s) => {
|
|
|
145970
145982
|
let e = localStorage.getItem(t) || n;
|
|
145971
145983
|
u(o && e === "system" ? f() : e);
|
|
145972
145984
|
} catch {}
|
|
145973
|
-
},
|
|
145985
|
+
}, r2e = A.createContext(void 0), i2e = {
|
|
145974
145986
|
setTheme: (e) => {},
|
|
145975
145987
|
themes: []
|
|
145976
|
-
},
|
|
145988
|
+
}, a2e = () => A.useContext(r2e) ?? i2e;
|
|
145977
145989
|
A.memo(({ forcedTheme: e, storageKey: t, attribute: n, enableSystem: r, enableColorScheme: i, defaultTheme: a, value: o, themes: s, nonce: c, scriptProps: l }) => {
|
|
145978
145990
|
let u = JSON.stringify([
|
|
145979
145991
|
n,
|
|
@@ -145989,13 +146001,13 @@ A.memo(({ forcedTheme: e, storageKey: t, attribute: n, enableSystem: r, enableCo
|
|
|
145989
146001
|
...l,
|
|
145990
146002
|
suppressHydrationWarning: !0,
|
|
145991
146003
|
nonce: typeof window > "u" ? c : "",
|
|
145992
|
-
dangerouslySetInnerHTML: { __html: `(${
|
|
146004
|
+
dangerouslySetInnerHTML: { __html: `(${n2e.toString()})(${u})` }
|
|
145993
146005
|
});
|
|
145994
146006
|
});
|
|
145995
146007
|
//#endregion
|
|
145996
146008
|
//#region src/client/components/ui/sonner.tsx
|
|
145997
|
-
function
|
|
145998
|
-
let { theme: t = "system" } =
|
|
146009
|
+
function o2e({ ...e }) {
|
|
146010
|
+
let { theme: t = "system" } = a2e();
|
|
145999
146011
|
return /* @__PURE__ */ (0, O.jsx)(Zge, {
|
|
146000
146012
|
theme: t,
|
|
146001
146013
|
className: "toaster group",
|
|
@@ -146009,13 +146021,13 @@ function a2e({ ...e }) {
|
|
|
146009
146021
|
}
|
|
146010
146022
|
//#endregion
|
|
146011
146023
|
//#region src/client/App.tsx
|
|
146012
|
-
function
|
|
146024
|
+
function s2e({ activeTabRef: e }) {
|
|
146013
146025
|
let { activeTab: t } = i0();
|
|
146014
146026
|
return (0, A.useEffect)(() => {
|
|
146015
146027
|
e.current = t;
|
|
146016
146028
|
}, [t, e]), null;
|
|
146017
146029
|
}
|
|
146018
|
-
function
|
|
146030
|
+
function c2e() {
|
|
146019
146031
|
let e = (0, A.useRef)("tools"), t = new URLSearchParams(window.location.search), n = t.get("embedded") === "true", r = t.get("theme"), i = (0, A.useMemo)(() => n ? void 0 : new wme("mcp-inspector-connections"), [n]), a = window.__MCP_PROXY_URL__, o = a ? `${window.location.origin}${a}` : void 0;
|
|
146020
146032
|
return (0, A.useEffect)(() => {
|
|
146021
146033
|
let e = t.get("auth_error");
|
|
@@ -146056,7 +146068,7 @@ function s2e() {
|
|
|
146056
146068
|
console.log("[Inspector] Server state changed:", e, t);
|
|
146057
146069
|
},
|
|
146058
146070
|
onSamplingRequest: (e, t, n, r, i) => {
|
|
146059
|
-
let a = vz(/* @__PURE__ */ (0, O.jsx)(
|
|
146071
|
+
let a = vz(/* @__PURE__ */ (0, O.jsx)(K0e, {
|
|
146060
146072
|
requestId: e.id,
|
|
146061
146073
|
serverName: n,
|
|
146062
146074
|
onViewDetails: () => {
|
|
@@ -146092,31 +146104,31 @@ function s2e() {
|
|
|
146092
146104
|
}), { duration: Infinity });
|
|
146093
146105
|
},
|
|
146094
146106
|
children: /* @__PURE__ */ (0, O.jsxs)(OFe, { children: [
|
|
146095
|
-
/* @__PURE__ */ (0, O.jsx)(
|
|
146107
|
+
/* @__PURE__ */ (0, O.jsx)(s2e, { activeTabRef: e }),
|
|
146096
146108
|
/* @__PURE__ */ (0, O.jsx)(mge, {
|
|
146097
146109
|
basename: "/inspector",
|
|
146098
146110
|
children: /* @__PURE__ */ (0, O.jsxs)(Bhe, { children: [
|
|
146099
146111
|
/* @__PURE__ */ (0, O.jsx)(qR, {
|
|
146100
146112
|
path: "/oauth/callback",
|
|
146101
|
-
element: /* @__PURE__ */ (0, O.jsx)(
|
|
146113
|
+
element: /* @__PURE__ */ (0, O.jsx)(W0e, {})
|
|
146102
146114
|
}),
|
|
146103
146115
|
/* @__PURE__ */ (0, O.jsx)(qR, {
|
|
146104
146116
|
path: "/preview/:view",
|
|
146105
|
-
element: /* @__PURE__ */ (0, O.jsx)(
|
|
146117
|
+
element: /* @__PURE__ */ (0, O.jsx)(t2e, {})
|
|
146106
146118
|
}),
|
|
146107
146119
|
/* @__PURE__ */ (0, O.jsx)(qR, {
|
|
146108
146120
|
path: "/",
|
|
146109
|
-
element: /* @__PURE__ */ (0, O.jsx)(
|
|
146121
|
+
element: /* @__PURE__ */ (0, O.jsx)(I0e, { children: /* @__PURE__ */ (0, O.jsx)(DFe, {}) })
|
|
146110
146122
|
})
|
|
146111
146123
|
] })
|
|
146112
146124
|
}),
|
|
146113
|
-
/* @__PURE__ */ (0, O.jsx)(
|
|
146125
|
+
/* @__PURE__ */ (0, O.jsx)(o2e, { position: "top-center" })
|
|
146114
146126
|
] })
|
|
146115
146127
|
}) })
|
|
146116
146128
|
});
|
|
146117
146129
|
}
|
|
146118
146130
|
//#endregion
|
|
146119
146131
|
//#region src/client/main.tsx
|
|
146120
|
-
var
|
|
146121
|
-
|
|
146132
|
+
var l2e = document.getElementById("root");
|
|
146133
|
+
l2e ? D.createRoot(l2e).render(/* @__PURE__ */ (0, O.jsx)(c2e, {})) : console.error("[inspector] Root element not found");
|
|
146122
146134
|
//#endregion
|