@mcp-use/inspector 20.0.0-beta.13 → 20.0.0-beta.15
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/README.md +4 -4
- package/dist/cdn/inspector.js +76858 -9272
- package/dist/cli.js +69 -24
- package/dist/server/asset-urls.d.ts +1 -4
- package/dist/server/asset-urls.d.ts.map +1 -1
- package/dist/server/asset-urls.js +3 -7
- package/dist/server/cdn-shell.d.ts.map +1 -1
- package/dist/server/cdn-shell.js +3 -3
- package/dist/server/{chunk-H6ZCIKBS.js → chunk-JZT7N2BJ.js} +10 -15
- package/dist/server/{chunk-YAYRN4DW.js → chunk-WNQGHIZ3.js} +61 -15
- package/dist/server/{chunk-QQP554HG.js → chunk-XKCUJ6ZJ.js} +1 -1
- package/dist/server/{chunk-2XQWLYOZ.js → chunk-ZPGABKXL.js} +1 -1
- package/dist/server/cli.js +3 -3
- package/dist/server/index.js +4 -4
- package/dist/server/middleware.js +4 -4
- package/dist/server/version.js +1 -1
- package/dist/web/assets/index-Bqfsh_Rp.js +643 -0
- package/dist/web/index.html +2 -10
- package/package.json +2 -2
- package/dist/cdn/AnimatePresence-D1bZ5_-l.js +0 -394
- package/dist/cdn/ChatTab-CokP5UlL.js +0 -6811
- package/dist/cdn/CheckboxIndicator-BjF73mGX.js +0 -252
- package/dist/cdn/ConnectionSettingsForm-CXCKdMZh.js +0 -929
- package/dist/cdn/ConnectionSettingsTab-Ag4WD55h.js +0 -151
- package/dist/cdn/ElicitationTab-PEmEDvC5.js +0 -655
- package/dist/cdn/FormContext-NtUiZclE.js +0 -135
- package/dist/cdn/InspectorContext-BBKCdfmK.js +0 -123
- package/dist/cdn/JSONDisplay-BJqMz7Ny.js +0 -324
- package/dist/cdn/ListTabHeader-DzmTtN1e.js +0 -89
- package/dist/cdn/MCPAppsDebugControls-C01DPDJv.js +0 -2174
- package/dist/cdn/ManufactOAuthCallback-ChbbjFIT.js +0 -31
- package/dist/cdn/MarkdownRenderer-CrG5JHAZ.js +0 -3610
- package/dist/cdn/McpAppsViewPanel-07_iHrne.js +0 -56
- package/dist/cdn/NotificationsTab-B7uebqMV.js +0 -290
- package/dist/cdn/OAuthCallback-Cku-R2uM.js +0 -58
- package/dist/cdn/PromptsTab-98ugje_q.js +0 -902
- package/dist/cdn/ResourcesTab-CxHilZjd.js +0 -566
- package/dist/cdn/SamplingTab-gOUjg7bt.js +0 -659
- package/dist/cdn/ServerMetadataTab-BM3VhSLf.js +0 -244
- package/dist/cdn/StatusIcon-Q3n3YRtE.js +0 -65
- package/dist/cdn/ToolsTab-Dm6n5OxE.js +0 -2045
- package/dist/cdn/ViewPreview-CCKWd8Qt.js +0 -238
- package/dist/cdn/WidgetDebugContext-B6yoOVVV.js +0 -314
- package/dist/cdn/WidgetWrapper-BlbQAh_X.js +0 -12
- package/dist/cdn/basePath-B8HuhIMu.js +0 -25
- package/dist/cdn/bell-GrTZcnD2.js +0 -10
- package/dist/cdn/browser-DG2Z8392.js +0 -42
- package/dist/cdn/brush-CelVvMGp.js +0 -17
- package/dist/cdn/button-CB4uOoUV.js +0 -2509
- package/dist/cdn/card-BA-DQk-G.js +0 -41
- package/dist/cdn/cfWorker-Bxcs9rNe.js +0 -10799
- package/dist/cdn/checkbox-kwVa4gRX.js +0 -20
- package/dist/cdn/chunk-QUQL4437-XnDcYQEx.js +0 -1508
- package/dist/cdn/clock-YMF8Gtw5.js +0 -12
- package/dist/cdn/code-C8sN2OGR.js +0 -10
- package/dist/cdn/createLucideIcon-BONxC1L5.js +0 -213
- package/dist/cdn/dialog-CJGnC5Ag.js +0 -1028
- package/dist/cdn/dist-C-AJLM5q.js +0 -2307
- package/dist/cdn/dist-CTJnCYmk.js +0 -616
- package/dist/cdn/external-link-Bo4lQxr1.js +0 -17
- package/dist/cdn/eye-pSGG7nvf.js +0 -29
- package/dist/cdn/folder-open-aM8CPtBO.js +0 -7
- package/dist/cdn/hash-DDs2vE1k.js +0 -33
- package/dist/cdn/history-BfUFpL1d.js +0 -17
- package/dist/cdn/index-browser-CCygKh3z.js +0 -1853
- package/dist/cdn/info-BMkB68mB.js +0 -19
- package/dist/cdn/input-BCpgLXU1.js +0 -9654
- package/dist/cdn/inspector-settings-layout-0VDsjeqb.js +0 -4
- package/dist/cdn/label-A0UGV8FE.js +0 -60
- package/dist/cdn/loader-circle-BKRHJEB7.js +0 -7
- package/dist/cdn/manufact-auth-BQMHhbLV.js +0 -423
- package/dist/cdn/maximize-2-DdrB_spi.js +0 -21
- package/dist/cdn/maximize-hSOCz133.js +0 -21
- package/dist/cdn/message-square-D3tKB3uJ.js +0 -7
- package/dist/cdn/not-found-BajFyZpp.js +0 -32
- package/dist/cdn/play-B1leulYf.js +0 -7
- package/dist/cdn/providerMeta-CjGU4rID.js +0 -436
- package/dist/cdn/react-BIs9pQ3H.js +0 -926
- package/dist/cdn/react-BiVEwoxA.js +0 -5421
- package/dist/cdn/refresh-cw-CyvXrS91.js +0 -21
- package/dist/cdn/save-CmdEPUAm.js +0 -34
- package/dist/cdn/schemaHelpers-DTV38jGq.js +0 -16
- package/dist/cdn/select-CCFHjOGk.js +0 -2595
- package/dist/cdn/servers-Dd0Vcp81.js +0 -30
- package/dist/cdn/shared-CJVHJhag.js +0 -1700
- package/dist/cdn/sheet-oyq1mIyg.js +0 -2078
- package/dist/cdn/sparkles-CxeZpVtX.js +0 -23
- package/dist/cdn/spinner-Be1GlSGX.js +0 -15
- package/dist/cdn/square-check-big-C_4wbfwF.js +0 -10
- package/dist/cdn/switch-DHXEA_N5.js +0 -665
- package/dist/cdn/tabs-subtle-Dubd6Kj8.js +0 -788
- package/dist/cdn/telemetry-DyrOzsAR.js +0 -208
- package/dist/cdn/textarea-CwmI8_uI.js +0 -14
- package/dist/cdn/trash-2-BhumJAFE.js +0 -25
- package/dist/cdn/useAriaLabelledBy-Cra6w3YY.js +0 -30
- package/dist/cdn/useCompositeItem-Dhnm-7el.js +0 -26
- package/dist/cdn/useConfig-BTDwEhra.js +0 -235
- package/dist/cdn/useSavedRequests-mSIsDd4c.js +0 -51
- package/dist/cdn/useViewHostProps-C5NRGTzJ.js +0 -364
- package/dist/cdn/wrench-DvK20LUT.js +0 -7
- package/dist/cdn/x-EilKPiCX.js +0 -10
- package/dist/cdn/zap-0Wr9QO7N.js +0 -10
- package/dist/web/assets/AnimatePresence-FfDQQNFJ.js +0 -9
- package/dist/web/assets/ChatTab-BEfFVccY.js +0 -18
- package/dist/web/assets/ConnectionSettingsTab-Bb_6a0Iv.js +0 -1
- package/dist/web/assets/ElicitationTab-BP4GKiyX.js +0 -1
- package/dist/web/assets/FormContext-sV-yByKz.js +0 -1
- package/dist/web/assets/ListTabHeader-CrGae306.js +0 -1
- package/dist/web/assets/MCPAppsDebugControls-BIyFdqol.js +0 -34
- package/dist/web/assets/ManufactOAuthCallback-C7FmBqhm.js +0 -1
- package/dist/web/assets/MarkdownRenderer-Dh79xxF3.js +0 -47
- package/dist/web/assets/McpAppsViewPanel-eC3j1-Vq.js +0 -1
- package/dist/web/assets/NotificationsTab-BiZcGnsE.js +0 -1
- package/dist/web/assets/OAuthCallback-0QMKMr_h.js +0 -1
- package/dist/web/assets/PromptsTab-DP25ApgP.js +0 -15
- package/dist/web/assets/ResourcesTab-CptaN3NT.js +0 -2
- package/dist/web/assets/SamplingTab-BcdnfiwQ.js +0 -1
- package/dist/web/assets/ServerMetadataTab-DfM-a-Kp.js +0 -1
- package/dist/web/assets/ToolsTab-hSGwy5-P.js +0 -8
- package/dist/web/assets/ViewPreview-r5Me72Dm.js +0 -1
- package/dist/web/assets/WidgetWrapper-cv_BM1bY.js +0 -1
- package/dist/web/assets/brush-DX0UZ_pI.js +0 -1
- package/dist/web/assets/button-C8Xa2k4x.js +0 -1
- package/dist/web/assets/checkbox-CiCqaf9B.js +0 -1
- package/dist/web/assets/code-B14rVdNt.js +0 -1
- package/dist/web/assets/createLucideIcon-BEHeJH0M.js +0 -1
- package/dist/web/assets/dist-igO5zKmw.js +0 -21
- package/dist/web/assets/index-lCF-0iyi.js +0 -499
- package/dist/web/assets/input-C0OQCUZy.js +0 -1
- package/dist/web/assets/inspector-settings-layout-yjKRJDai.js +0 -1
- package/dist/web/assets/label-CI7JWQOo.js +0 -1
- package/dist/web/assets/maximize-2-Br1WQzT2.js +0 -1
- package/dist/web/assets/maximize-CJNgRe6S.js +0 -1
- package/dist/web/assets/react-CU_d2d5K.js +0 -1
- package/dist/web/assets/refresh-cw-B5iaAZKn.js +0 -1
- package/dist/web/assets/save-TM6fvNrt.js +0 -1
- package/dist/web/assets/schemaHelpers-DLNTQr_6.js +0 -1
- package/dist/web/assets/select-D6jzbLJn.js +0 -1
- package/dist/web/assets/shared-ChslWC1c.js +0 -1
- package/dist/web/assets/sparkles-BGYTDThM.js +0 -1
- package/dist/web/assets/tabs-subtle-BqKfSXAk.js +0 -1
- package/dist/web/assets/textarea-CRTXuRmE.js +0 -1
- package/dist/web/assets/useConfig-BoaEj10z.js +0 -1
- package/dist/web/assets/useViewHostProps-BUcH84Z-.js +0 -1
- package/dist/web/assets/zap-BDWHCVHU.js +0 -1
|
@@ -1,208 +0,0 @@
|
|
|
1
|
-
import { i as e, t } from "./index-browser-CCygKh3z.js";
|
|
2
|
-
//#region src/client/telemetry/events.ts
|
|
3
|
-
var n = class {
|
|
4
|
-
name = "mcp_inspector_open";
|
|
5
|
-
properties;
|
|
6
|
-
constructor(e) {
|
|
7
|
-
this.properties = {
|
|
8
|
-
server_url: e.serverUrl,
|
|
9
|
-
connection_count: e.connectionCount
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
}, r = class {
|
|
13
|
-
name = "mcp_tool_execution";
|
|
14
|
-
properties;
|
|
15
|
-
constructor(e) {
|
|
16
|
-
this.properties = {
|
|
17
|
-
tool_name: e.toolName,
|
|
18
|
-
server_id: e.serverId,
|
|
19
|
-
success: e.success,
|
|
20
|
-
duration: e.duration,
|
|
21
|
-
error: e.error
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
}, i = class {
|
|
25
|
-
name = "mcp_resource_read";
|
|
26
|
-
properties;
|
|
27
|
-
constructor(e) {
|
|
28
|
-
this.properties = {
|
|
29
|
-
resource_uri: e.resourceUri,
|
|
30
|
-
server_id: e.serverId,
|
|
31
|
-
success: e.success,
|
|
32
|
-
error: e.error
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
}, a = class {
|
|
36
|
-
name = "mcp_prompt_call";
|
|
37
|
-
properties;
|
|
38
|
-
constructor(e) {
|
|
39
|
-
this.properties = {
|
|
40
|
-
prompt_name: e.promptName,
|
|
41
|
-
server_id: e.serverId,
|
|
42
|
-
success: e.success,
|
|
43
|
-
error: e.error
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
}, o = class {
|
|
47
|
-
name = "mcp_server_connection";
|
|
48
|
-
properties;
|
|
49
|
-
constructor(e) {
|
|
50
|
-
this.properties = {
|
|
51
|
-
server_id: e.serverId,
|
|
52
|
-
server_url: e.serverUrl,
|
|
53
|
-
success: e.success,
|
|
54
|
-
connection_type: e.connectionType,
|
|
55
|
-
error: e.error
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
}, s = class {
|
|
59
|
-
name = "mcp_chat_message";
|
|
60
|
-
properties;
|
|
61
|
-
constructor(e) {
|
|
62
|
-
this.properties = {
|
|
63
|
-
server_id: e.serverId,
|
|
64
|
-
provider: e.provider,
|
|
65
|
-
model: e.model,
|
|
66
|
-
message_count: e.messageCount,
|
|
67
|
-
tool_calls_count: e.toolCallsCount,
|
|
68
|
-
success: e.success,
|
|
69
|
-
execution_mode: e.executionMode,
|
|
70
|
-
duration: e.duration,
|
|
71
|
-
error: e.error
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
}, c = class {
|
|
75
|
-
name = "mcp_server_added";
|
|
76
|
-
properties;
|
|
77
|
-
constructor(e) {
|
|
78
|
-
this.properties = {
|
|
79
|
-
server_id: e.serverId,
|
|
80
|
-
server_url: e.serverUrl,
|
|
81
|
-
connection_type: e.connectionType,
|
|
82
|
-
via_proxy: e.viaProxy
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
}, l = class {
|
|
86
|
-
name = "mcp_server_removed";
|
|
87
|
-
properties;
|
|
88
|
-
constructor(e) {
|
|
89
|
-
this.properties = { server_id: e.serverId };
|
|
90
|
-
}
|
|
91
|
-
}, u = class {
|
|
92
|
-
name = "mcp_command_palette_open";
|
|
93
|
-
properties;
|
|
94
|
-
constructor(e) {
|
|
95
|
-
this.properties = { trigger: e.trigger };
|
|
96
|
-
}
|
|
97
|
-
}, d = class {
|
|
98
|
-
name = "mcp_tool_saved";
|
|
99
|
-
properties;
|
|
100
|
-
constructor(e) {
|
|
101
|
-
this.properties = {
|
|
102
|
-
tool_name: e.toolName,
|
|
103
|
-
server_id: e.serverId
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
}, f = class {
|
|
107
|
-
name = "mcp_tunnel_action";
|
|
108
|
-
properties;
|
|
109
|
-
constructor(e) {
|
|
110
|
-
this.properties = {
|
|
111
|
-
action: e.action,
|
|
112
|
-
success: e.success,
|
|
113
|
-
tunnel_url: e.tunnelUrl
|
|
114
|
-
};
|
|
115
|
-
}
|
|
116
|
-
}, p = class {
|
|
117
|
-
name = "mcp_deploy_click";
|
|
118
|
-
properties;
|
|
119
|
-
constructor(e) {
|
|
120
|
-
this.properties = { referrer: e.referrer };
|
|
121
|
-
}
|
|
122
|
-
}, m = class {
|
|
123
|
-
name = "mcp_chat_configured";
|
|
124
|
-
properties;
|
|
125
|
-
constructor(e) {
|
|
126
|
-
this.properties = {
|
|
127
|
-
provider: e.provider,
|
|
128
|
-
model: e.model
|
|
129
|
-
};
|
|
130
|
-
}
|
|
131
|
-
}, h = class {
|
|
132
|
-
name = "mcp_tab_navigation";
|
|
133
|
-
properties;
|
|
134
|
-
constructor(e) {
|
|
135
|
-
this.properties = {
|
|
136
|
-
tab: e.tab,
|
|
137
|
-
previous_tab: e.previousTab
|
|
138
|
-
};
|
|
139
|
-
}
|
|
140
|
-
}, g = class {
|
|
141
|
-
name = "mcp_add_to_client";
|
|
142
|
-
properties;
|
|
143
|
-
constructor(e) {
|
|
144
|
-
this.properties = { client: e.client };
|
|
145
|
-
}
|
|
146
|
-
}, _ = class {
|
|
147
|
-
name = "mcp_session_duration";
|
|
148
|
-
properties;
|
|
149
|
-
constructor(e) {
|
|
150
|
-
this.properties = {
|
|
151
|
-
duration_seconds: e.durationSeconds,
|
|
152
|
-
tabs_visited: e.tabsVisited,
|
|
153
|
-
tools_executed: e.toolsExecuted
|
|
154
|
-
};
|
|
155
|
-
}
|
|
156
|
-
};
|
|
157
|
-
//#endregion
|
|
158
|
-
//#region src/client/telemetry/utils.ts
|
|
159
|
-
function v() {
|
|
160
|
-
try {
|
|
161
|
-
if (typeof window < "u") {
|
|
162
|
-
let e = window.__INSPECTOR_VERSION__;
|
|
163
|
-
if (e !== void 0 && e !== "") return e;
|
|
164
|
-
}
|
|
165
|
-
return "20.0.0-beta.12";
|
|
166
|
-
} catch {
|
|
167
|
-
return "0.0.0";
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
//#endregion
|
|
171
|
-
//#region src/client/telemetry/init.ts
|
|
172
|
-
var y = "mcp_inspector_telemetry_disabled", b = "mcp_inspector_telemetry_user_id", x = "MCP_USE_ANONYMIZED_TELEMETRY", S = "mcp_use_user_id";
|
|
173
|
-
function C() {
|
|
174
|
-
return typeof localStorage < "u" && typeof localStorage.getItem == "function" && typeof localStorage.setItem == "function";
|
|
175
|
-
}
|
|
176
|
-
function w() {
|
|
177
|
-
if (C()) try {
|
|
178
|
-
if (localStorage.getItem(y) === "true" && localStorage.getItem(x) !== "false" && localStorage.setItem(x, "false"), !localStorage.getItem(S)) {
|
|
179
|
-
let e = localStorage.getItem(b);
|
|
180
|
-
e && localStorage.setItem(S, e);
|
|
181
|
-
}
|
|
182
|
-
} catch {}
|
|
183
|
-
}
|
|
184
|
-
function T() {
|
|
185
|
-
w(), e("inspector"), t.getInstance().setProductVersion(v());
|
|
186
|
-
}
|
|
187
|
-
//#endregion
|
|
188
|
-
//#region src/client/telemetry/capture.ts
|
|
189
|
-
function E() {
|
|
190
|
-
if (typeof window > "u") return "standalone";
|
|
191
|
-
let e = window.__MCP_INSPECTOR_MODE__;
|
|
192
|
-
return e === "standalone" || e === "embedded" || e === "cloud" ? e : "standalone";
|
|
193
|
-
}
|
|
194
|
-
async function D(e) {
|
|
195
|
-
await t.getInstance().capture({
|
|
196
|
-
name: e.name,
|
|
197
|
-
properties: {
|
|
198
|
-
...e.properties,
|
|
199
|
-
package: "inspector",
|
|
200
|
-
mode: E()
|
|
201
|
-
}
|
|
202
|
-
});
|
|
203
|
-
}
|
|
204
|
-
async function O(e) {
|
|
205
|
-
await D(new n(e));
|
|
206
|
-
}
|
|
207
|
-
//#endregion
|
|
208
|
-
export { r as _, g as a, u as c, i as d, c as f, h as g, _ as h, v as i, p as l, l as m, O as n, m as o, o as p, T as r, s, D as t, a as u, d as v, f as y };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./react-BIs9pQ3H.js";
|
|
2
|
-
import { n as t } from "./createLucideIcon-BONxC1L5.js";
|
|
3
|
-
import { U as n } from "./button-CB4uOoUV.js";
|
|
4
|
-
e();
|
|
5
|
-
var r = t();
|
|
6
|
-
function i({ className: e, ...t }) {
|
|
7
|
-
return /* @__PURE__ */ (0, r.jsx)("textarea", {
|
|
8
|
-
"data-slot": "textarea",
|
|
9
|
-
className: n("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", e),
|
|
10
|
-
...t
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
//#endregion
|
|
14
|
-
export { i as t };
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./createLucideIcon-BONxC1L5.js";
|
|
2
|
-
var t = e("trash-2", [
|
|
3
|
-
["path", {
|
|
4
|
-
d: "M10 11v6",
|
|
5
|
-
key: "nco0om"
|
|
6
|
-
}],
|
|
7
|
-
["path", {
|
|
8
|
-
d: "M14 11v6",
|
|
9
|
-
key: "outv1u"
|
|
10
|
-
}],
|
|
11
|
-
["path", {
|
|
12
|
-
d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",
|
|
13
|
-
key: "miytrc"
|
|
14
|
-
}],
|
|
15
|
-
["path", {
|
|
16
|
-
d: "M3 6h18",
|
|
17
|
-
key: "d0wm0j"
|
|
18
|
-
}],
|
|
19
|
-
["path", {
|
|
20
|
-
d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",
|
|
21
|
-
key: "e791ji"
|
|
22
|
-
}]
|
|
23
|
-
]);
|
|
24
|
-
//#endregion
|
|
25
|
-
export { t };
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { s as e, t } from "./react-BIs9pQ3H.js";
|
|
2
|
-
import { Nn as n } from "./input-BCpgLXU1.js";
|
|
3
|
-
import { g as r } from "./button-CB4uOoUV.js";
|
|
4
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/internals/labelable-provider/useAriaLabelledBy.mjs
|
|
5
|
-
var i = /* @__PURE__ */ e(t(), 1);
|
|
6
|
-
function a(e, t, a, s = !0, c) {
|
|
7
|
-
let [l, u] = i.useState(), d = n(c ? `${c}-label` : void 0), f = e ?? t ?? l;
|
|
8
|
-
return r(() => {
|
|
9
|
-
let n = e || t || !s ? void 0 : o(a.current, d);
|
|
10
|
-
l !== n && u(n);
|
|
11
|
-
}), f;
|
|
12
|
-
}
|
|
13
|
-
function o(e, t) {
|
|
14
|
-
let n = s(e);
|
|
15
|
-
if (n) return !n.id && t && (n.id = t), n.id || void 0;
|
|
16
|
-
}
|
|
17
|
-
function s(e) {
|
|
18
|
-
if (!e) return;
|
|
19
|
-
let t = e.parentElement;
|
|
20
|
-
if (t && t.tagName === "LABEL") return t;
|
|
21
|
-
let n = e.id;
|
|
22
|
-
if (n) {
|
|
23
|
-
let t = e.nextElementSibling;
|
|
24
|
-
if (t && t.htmlFor === n) return t;
|
|
25
|
-
}
|
|
26
|
-
let r = e.labels;
|
|
27
|
-
return r && r[0];
|
|
28
|
-
}
|
|
29
|
-
//#endregion
|
|
30
|
-
export { a as t };
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { s as e, t } from "./react-BIs9pQ3H.js";
|
|
2
|
-
import { p as n, u as r } from "./button-CB4uOoUV.js";
|
|
3
|
-
import { b as i } from "./AnimatePresence-D1bZ5_-l.js";
|
|
4
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/internals/composite/item/useCompositeItem.mjs
|
|
5
|
-
var a = /* @__PURE__ */ e(t(), 1);
|
|
6
|
-
function o(e = {}) {
|
|
7
|
-
let { highlightItemOnHover: t, highlightedIndex: o, onHighlightedIndexChange: s } = n(), { ref: c, index: l } = i(e), u = o === l, d = a.useRef(null), f = r(c, d);
|
|
8
|
-
return {
|
|
9
|
-
compositeProps: {
|
|
10
|
-
tabIndex: u ? 0 : -1,
|
|
11
|
-
onFocus() {
|
|
12
|
-
s(l);
|
|
13
|
-
},
|
|
14
|
-
onMouseMove() {
|
|
15
|
-
let e = d.current;
|
|
16
|
-
if (!t || !e) return;
|
|
17
|
-
let n = e.hasAttribute("disabled") || e.ariaDisabled === "true";
|
|
18
|
-
!u && !n && e.focus();
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
compositeRef: f,
|
|
22
|
-
index: l
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
//#endregion
|
|
26
|
-
export { o as t };
|
|
@@ -1,235 +0,0 @@
|
|
|
1
|
-
import { s as e, t } from "./react-BIs9pQ3H.js";
|
|
2
|
-
import { o as n, t as r } from "./telemetry-DyrOzsAR.js";
|
|
3
|
-
import { t as i } from "./dist-C-AJLM5q.js";
|
|
4
|
-
//#region src/client/components/chat/types.ts
|
|
5
|
-
var a = /* @__PURE__ */ e(t(), 1), o = {
|
|
6
|
-
openai: "gpt-5.6-terra",
|
|
7
|
-
"openai-compatible": "",
|
|
8
|
-
anthropic: "claude-haiku-4-5-20251001",
|
|
9
|
-
google: "gemini-2.5-flash",
|
|
10
|
-
openrouter: "meta-llama/llama-3.1-8b-instruct:free",
|
|
11
|
-
ollama: "qwen3"
|
|
12
|
-
}, s = { ollama: i };
|
|
13
|
-
function c(e) {
|
|
14
|
-
return e !== "ollama" && e !== "openai-compatible";
|
|
15
|
-
}
|
|
16
|
-
function l(e) {
|
|
17
|
-
return e === "ollama" || e === "openai-compatible";
|
|
18
|
-
}
|
|
19
|
-
function u(e) {
|
|
20
|
-
return s[e] ?? "";
|
|
21
|
-
}
|
|
22
|
-
//#endregion
|
|
23
|
-
//#region src/client/components/chat/utils.ts
|
|
24
|
-
function d(e) {
|
|
25
|
-
let t = 0;
|
|
26
|
-
for (let n = 0; n < e.length; n++) {
|
|
27
|
-
let r = e.charCodeAt(n);
|
|
28
|
-
t = (t << 5) - t + r, t &= t;
|
|
29
|
-
}
|
|
30
|
-
return Math.abs(t).toString(16);
|
|
31
|
-
}
|
|
32
|
-
var f = 10 * 1024 * 1024, p = 20 * 1024 * 1024, m = [
|
|
33
|
-
"image/png",
|
|
34
|
-
"image/jpeg",
|
|
35
|
-
"image/jpg",
|
|
36
|
-
"image/gif",
|
|
37
|
-
"image/webp",
|
|
38
|
-
"image/svg+xml"
|
|
39
|
-
];
|
|
40
|
-
function h(e) {
|
|
41
|
-
return m.includes(e.type);
|
|
42
|
-
}
|
|
43
|
-
function g(e) {
|
|
44
|
-
return e.size <= f;
|
|
45
|
-
}
|
|
46
|
-
function _(e) {
|
|
47
|
-
return e.reduce((e, t) => e + (t.size || 0), 0) <= p;
|
|
48
|
-
}
|
|
49
|
-
function v(e) {
|
|
50
|
-
return new Promise((t, n) => {
|
|
51
|
-
let r = new FileReader();
|
|
52
|
-
r.onload = () => {
|
|
53
|
-
let e = r.result;
|
|
54
|
-
t(e.includes(",") ? e.split(",")[1] : e);
|
|
55
|
-
}, r.onerror = () => {
|
|
56
|
-
n(/* @__PURE__ */ Error(`Failed to read file: ${e.name}`));
|
|
57
|
-
}, r.readAsDataURL(e);
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
async function y(e) {
|
|
61
|
-
if (!h(e)) throw Error(`Unsupported file type: ${e.type}. Only images are supported.`);
|
|
62
|
-
if (!g(e)) throw Error(`File too large: ${e.name}. Maximum size is 10MB.`);
|
|
63
|
-
return {
|
|
64
|
-
type: "image",
|
|
65
|
-
data: await v(e),
|
|
66
|
-
mimeType: e.type,
|
|
67
|
-
name: e.name,
|
|
68
|
-
size: e.size
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
//#endregion
|
|
72
|
-
//#region src/client/components/chat/chatModeStorage.ts
|
|
73
|
-
var b = "mcp-inspector:chat-mode";
|
|
74
|
-
function x() {
|
|
75
|
-
try {
|
|
76
|
-
let e = localStorage.getItem(b);
|
|
77
|
-
if (e === "byok" || e === "managed") return e;
|
|
78
|
-
} catch {}
|
|
79
|
-
return null;
|
|
80
|
-
}
|
|
81
|
-
function S(e) {
|
|
82
|
-
try {
|
|
83
|
-
localStorage.setItem(b, e);
|
|
84
|
-
} catch {}
|
|
85
|
-
}
|
|
86
|
-
function C(e, t) {
|
|
87
|
-
let n = x();
|
|
88
|
-
if (n === "byok") return !0;
|
|
89
|
-
if (n === "managed" || e) return !1;
|
|
90
|
-
try {
|
|
91
|
-
if (localStorage.getItem("mcp-inspector-llm-config")) return !0;
|
|
92
|
-
} catch {}
|
|
93
|
-
return !!t;
|
|
94
|
-
}
|
|
95
|
-
//#endregion
|
|
96
|
-
//#region src/client/components/chat/useConfig.ts
|
|
97
|
-
function w({ mcpServerUrl: e }) {
|
|
98
|
-
let [t, i] = (0, a.useState)(null), [s, f] = (0, a.useState)(null), [p, m] = (0, a.useState)(!1), [h, g] = (0, a.useState)("openai"), [_, v] = (0, a.useState)(""), [y, b] = (0, a.useState)(o.openai), [x, C] = (0, a.useState)(u("openai")), w = (0, a.useCallback)(() => {
|
|
99
|
-
let e = localStorage.getItem("mcp-inspector-api-keys");
|
|
100
|
-
if (e) try {
|
|
101
|
-
return JSON.parse(e);
|
|
102
|
-
} catch (e) {
|
|
103
|
-
return console.error("Failed to load API keys:", e), {};
|
|
104
|
-
}
|
|
105
|
-
return {};
|
|
106
|
-
}, []), T = (0, a.useCallback)((e) => {
|
|
107
|
-
localStorage.setItem("mcp-inspector-api-keys", JSON.stringify(e));
|
|
108
|
-
}, []), E = (0, a.useCallback)(() => {
|
|
109
|
-
let e = localStorage.getItem("mcp-inspector-base-urls");
|
|
110
|
-
if (e) try {
|
|
111
|
-
return JSON.parse(e);
|
|
112
|
-
} catch (e) {
|
|
113
|
-
return console.error("Failed to load base URLs:", e), {};
|
|
114
|
-
}
|
|
115
|
-
return {};
|
|
116
|
-
}, []), D = (0, a.useCallback)((e) => {
|
|
117
|
-
localStorage.setItem("mcp-inspector-base-urls", JSON.stringify(e));
|
|
118
|
-
}, []), [O, k] = (0, a.useState)("none"), [A, j] = (0, a.useState)(""), [M, N] = (0, a.useState)(""), [P, F] = (0, a.useState)("");
|
|
119
|
-
(0, a.useEffect)(() => {
|
|
120
|
-
let e = () => {
|
|
121
|
-
let e = localStorage.getItem("mcp-inspector-llm-config"), t = w(), n = E();
|
|
122
|
-
if (e) try {
|
|
123
|
-
let r = JSON.parse(e);
|
|
124
|
-
i(r), g(r.provider), v(t[r.provider] || r.apiKey || ""), b(r.model), C(n[r.provider] || r.baseUrl || u(r.provider));
|
|
125
|
-
} catch (e) {
|
|
126
|
-
console.error("Failed to load LLM config:", e);
|
|
127
|
-
}
|
|
128
|
-
};
|
|
129
|
-
e();
|
|
130
|
-
let t = () => {
|
|
131
|
-
e();
|
|
132
|
-
}, n = (t) => {
|
|
133
|
-
(t.key === "mcp-inspector-llm-config" || t.key === "mcp-inspector-api-keys" || t.key === "mcp-inspector-base-urls") && e();
|
|
134
|
-
};
|
|
135
|
-
return window.addEventListener("llm-config-updated", t), window.addEventListener("storage", n), () => {
|
|
136
|
-
window.removeEventListener("llm-config-updated", t), window.removeEventListener("storage", n);
|
|
137
|
-
};
|
|
138
|
-
}, [w, E]), (0, a.useEffect)(() => {
|
|
139
|
-
let t = localStorage.getItem("mcp-inspector-auth-config");
|
|
140
|
-
if (t) try {
|
|
141
|
-
let e = JSON.parse(t);
|
|
142
|
-
f(e), k(e.type), e.username && j(e.username), e.password && N(e.password), e.token && F(e.token);
|
|
143
|
-
} catch (e) {
|
|
144
|
-
console.error("Failed to load auth config:", e);
|
|
145
|
-
}
|
|
146
|
-
else try {
|
|
147
|
-
let t = `mcp:auth_${d(e)}_tokens`;
|
|
148
|
-
localStorage.getItem(t) && (f({ type: "oauth" }), k("oauth"));
|
|
149
|
-
} catch (e) {
|
|
150
|
-
console.error("Failed to check for OAuth tokens:", e);
|
|
151
|
-
}
|
|
152
|
-
}, [e]);
|
|
153
|
-
let I = (0, a.useRef)(h);
|
|
154
|
-
return (0, a.useEffect)(() => {
|
|
155
|
-
let e = I.current !== h;
|
|
156
|
-
I.current = h, e && !l(h) && b(o[h]);
|
|
157
|
-
let t = w(), n = E();
|
|
158
|
-
v(t[h] || ""), C(n[h] || u(h));
|
|
159
|
-
}, [
|
|
160
|
-
h,
|
|
161
|
-
w,
|
|
162
|
-
E
|
|
163
|
-
]), {
|
|
164
|
-
llmConfig: t,
|
|
165
|
-
authConfig: s,
|
|
166
|
-
configDialogOpen: p,
|
|
167
|
-
setConfigDialogOpen: m,
|
|
168
|
-
tempProvider: h,
|
|
169
|
-
setTempProvider: g,
|
|
170
|
-
tempApiKey: _,
|
|
171
|
-
setTempApiKey: v,
|
|
172
|
-
tempModel: y,
|
|
173
|
-
setTempModel: b,
|
|
174
|
-
tempBaseUrl: x,
|
|
175
|
-
setTempBaseUrl: C,
|
|
176
|
-
tempAuthType: O,
|
|
177
|
-
saveLLMConfig: (0, a.useCallback)(() => {
|
|
178
|
-
if (c(h) && !_.trim() || l(h) && !x.trim()) return !1;
|
|
179
|
-
let e = w();
|
|
180
|
-
if (e[h] = _, T(e), l(h) && x.trim()) {
|
|
181
|
-
let e = E();
|
|
182
|
-
e[h] = x.trim(), D(e);
|
|
183
|
-
}
|
|
184
|
-
let t = {
|
|
185
|
-
provider: h,
|
|
186
|
-
apiKey: _,
|
|
187
|
-
model: y,
|
|
188
|
-
...l(h) ? { baseUrl: x.trim() || u(h) } : {}
|
|
189
|
-
}, a = {
|
|
190
|
-
type: O,
|
|
191
|
-
...O === "basic" && {
|
|
192
|
-
username: A.trim(),
|
|
193
|
-
password: M.trim()
|
|
194
|
-
},
|
|
195
|
-
...O === "bearer" && { token: P.trim() }
|
|
196
|
-
};
|
|
197
|
-
i(t), f(a), localStorage.setItem("mcp-inspector-llm-config", JSON.stringify(t)), localStorage.setItem("mcp-inspector-auth-config", JSON.stringify(a)), window.dispatchEvent(new CustomEvent("llm-config-updated"));
|
|
198
|
-
try {
|
|
199
|
-
r(new n({
|
|
200
|
-
provider: h,
|
|
201
|
-
model: y
|
|
202
|
-
})).catch(() => {});
|
|
203
|
-
} catch {}
|
|
204
|
-
return m(!1), !0;
|
|
205
|
-
}, [
|
|
206
|
-
h,
|
|
207
|
-
_,
|
|
208
|
-
y,
|
|
209
|
-
x,
|
|
210
|
-
O,
|
|
211
|
-
A,
|
|
212
|
-
M,
|
|
213
|
-
P,
|
|
214
|
-
w,
|
|
215
|
-
T,
|
|
216
|
-
E,
|
|
217
|
-
D
|
|
218
|
-
]),
|
|
219
|
-
clearConfig: (0, a.useCallback)(() => {
|
|
220
|
-
i(null), f(null);
|
|
221
|
-
let e = w();
|
|
222
|
-
delete e[h], T(e);
|
|
223
|
-
let t = E();
|
|
224
|
-
delete t[h], D(t), v(""), C(u(h)), j(""), N(""), F(""), k("none"), localStorage.removeItem("mcp-inspector-llm-config"), localStorage.removeItem("mcp-inspector-auth-config"), S("managed");
|
|
225
|
-
}, [
|
|
226
|
-
h,
|
|
227
|
-
w,
|
|
228
|
-
T,
|
|
229
|
-
E,
|
|
230
|
-
D
|
|
231
|
-
])
|
|
232
|
-
};
|
|
233
|
-
}
|
|
234
|
-
//#endregion
|
|
235
|
-
export { d as a, c, y as i, l, C as n, _ as o, S as r, u as s, w as t };
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { s as e, t } from "./react-BIs9pQ3H.js";
|
|
2
|
-
import { t as n } from "./createLucideIcon-BONxC1L5.js";
|
|
3
|
-
var r = n("panels-top-left", [
|
|
4
|
-
["rect", {
|
|
5
|
-
width: "18",
|
|
6
|
-
height: "18",
|
|
7
|
-
x: "3",
|
|
8
|
-
y: "3",
|
|
9
|
-
rx: "2",
|
|
10
|
-
key: "afitv7"
|
|
11
|
-
}],
|
|
12
|
-
["path", {
|
|
13
|
-
d: "M3 9h18",
|
|
14
|
-
key: "1pudct"
|
|
15
|
-
}],
|
|
16
|
-
["path", {
|
|
17
|
-
d: "M9 21V9",
|
|
18
|
-
key: "1oto5p"
|
|
19
|
-
}]
|
|
20
|
-
]), i = /* @__PURE__ */ e(t(), 1), a = "mcp-inspector-saved-requests";
|
|
21
|
-
function o() {
|
|
22
|
-
let [e, t] = (0, i.useState)([]);
|
|
23
|
-
return (0, i.useEffect)(() => {
|
|
24
|
-
try {
|
|
25
|
-
let e = localStorage.getItem(a);
|
|
26
|
-
e && t(JSON.parse(e));
|
|
27
|
-
} catch (e) {
|
|
28
|
-
console.error("[useSavedRequests] Failed to load saved requests:", e);
|
|
29
|
-
}
|
|
30
|
-
}, []), (0, i.useEffect)(() => {
|
|
31
|
-
let e = (e) => {
|
|
32
|
-
if (e.key === a && e.newValue) try {
|
|
33
|
-
t(JSON.parse(e.newValue));
|
|
34
|
-
} catch (e) {
|
|
35
|
-
console.error("[useSavedRequests] Failed to parse saved requests:", e);
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
return window.addEventListener("storage", e), () => window.removeEventListener("storage", e);
|
|
39
|
-
}, []), {
|
|
40
|
-
savedRequests: e,
|
|
41
|
-
saveSavedRequests: (0, i.useCallback)((e) => {
|
|
42
|
-
try {
|
|
43
|
-
localStorage.setItem(a, JSON.stringify(e)), t(e);
|
|
44
|
-
} catch (e) {
|
|
45
|
-
console.error("[useSavedRequests] Failed to save requests:", e);
|
|
46
|
-
}
|
|
47
|
-
}, [])
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
//#endregion
|
|
51
|
-
export { r as n, o as t };
|