@modelcontextprotocol/inspector-client 0.16.7 → 0.16.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.
@@ -7731,7 +7731,7 @@ function handleAndDispatchCustomEvent$1(name, handler, detail, { discrete }) {
7731
7731
  target.dispatchEvent(event);
7732
7732
  }
7733
7733
  }
7734
- var Root$5 = DismissableLayer;
7734
+ var Root$6 = DismissableLayer;
7735
7735
  var Branch = DismissableLayerBranch;
7736
7736
  var useLayoutEffect2 = (globalThis == null ? void 0 : globalThis.document) ? reactExports.useLayoutEffect : () => {
7737
7737
  };
@@ -7961,10 +7961,10 @@ var VisuallyHidden = reactExports.forwardRef(
7961
7961
  }
7962
7962
  );
7963
7963
  VisuallyHidden.displayName = NAME$2;
7964
- var Root$4 = VisuallyHidden;
7964
+ var Root$5 = VisuallyHidden;
7965
7965
  var PROVIDER_NAME$1 = "ToastProvider";
7966
7966
  var [Collection$2, useCollection$2, createCollectionScope$2] = createCollection("Toast");
7967
- var [createToastContext, createToastScope] = createContextScope("Toast", [createCollectionScope$2]);
7967
+ var [createToastContext] = createContextScope("Toast", [createCollectionScope$2]);
7968
7968
  var [ToastProviderProvider, useToastProviderContext] = createToastContext(PROVIDER_NAME$1);
7969
7969
  var ToastProvider$1 = (props) => {
7970
7970
  const {
@@ -8323,7 +8323,7 @@ var ToastImpl = reactExports.forwardRef(
8323
8323
  ),
8324
8324
  /* @__PURE__ */ jsxRuntimeExports.jsx(ToastInteractiveProvider, { scope: __scopeToast, onClose: handleClose, children: reactDomExports.createPortal(
8325
8325
  /* @__PURE__ */ jsxRuntimeExports.jsx(Collection$2.ItemSlot, { scope: __scopeToast, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
8326
- Root$5,
8326
+ Root$6,
8327
8327
  {
8328
8328
  asChild: true,
8329
8329
  onEscapeKeyDown: composeEventHandlers(onEscapeKeyDown, () => {
@@ -17013,9 +17013,12 @@ class InspectorOAuthClientProvider {
17013
17013
  get redirectUrl() {
17014
17014
  return window.location.origin + "/oauth/callback";
17015
17015
  }
17016
+ get debugRedirectUrl() {
17017
+ return window.location.origin + "/oauth/callback/debug";
17018
+ }
17016
17019
  get clientMetadata() {
17017
17020
  return {
17018
- redirect_uris: [this.redirectUrl],
17021
+ redirect_uris: [this.redirectUrl, this.debugRedirectUrl],
17019
17022
  token_endpoint_auth_method: "none",
17020
17023
  grant_types: ["authorization_code", "refresh_token"],
17021
17024
  response_types: ["code"],
@@ -17098,7 +17101,7 @@ class InspectorOAuthClientProvider {
17098
17101
  }
17099
17102
  class DebugInspectorOAuthClientProvider extends InspectorOAuthClientProvider {
17100
17103
  get redirectUrl() {
17101
- return `${window.location.origin}/oauth/callback/debug`;
17104
+ return this.debugRedirectUrl;
17102
17105
  }
17103
17106
  saveServerMetadata(metadata) {
17104
17107
  const key = getServerSpecificKey(
@@ -24905,7 +24908,7 @@ class StreamableHTTPClientTransport {
24905
24908
  return this._protocolVersion;
24906
24909
  }
24907
24910
  }
24908
- const version$1 = "0.16.7";
24911
+ const version$1 = "0.16.8";
24909
24912
  const packageJson = {
24910
24913
  version: version$1
24911
24914
  };
@@ -25031,8 +25034,7 @@ function useConnection({
25031
25034
  args,
25032
25035
  sseUrl,
25033
25036
  env,
25034
- bearerToken,
25035
- headerName,
25037
+ customHeaders,
25036
25038
  oauthClientId,
25037
25039
  oauthScope,
25038
25040
  config,
@@ -25257,15 +25259,32 @@ function useConnection({
25257
25259
  try {
25258
25260
  const headers = {};
25259
25261
  const serverAuthProvider = new InspectorOAuthClientProvider(sseUrl);
25260
- const token = bearerToken || ((_a = await serverAuthProvider.tokens()) == null ? void 0 : _a.access_token);
25261
- if (token) {
25262
- const authHeaderName = headerName || "Authorization";
25263
- if (authHeaderName.toLowerCase() !== "authorization") {
25264
- headers[authHeaderName] = token;
25265
- headers["x-custom-auth-header"] = authHeaderName;
25266
- } else {
25267
- headers[authHeaderName] = `Bearer ${token}`;
25262
+ let finalHeaders = customHeaders || [];
25263
+ if (finalHeaders.length === 0) {
25264
+ const oauthToken = (_a = await serverAuthProvider.tokens()) == null ? void 0 : _a.access_token;
25265
+ if (oauthToken) {
25266
+ finalHeaders = [
25267
+ {
25268
+ name: "Authorization",
25269
+ value: `Bearer ${oauthToken}`,
25270
+ enabled: true
25271
+ }
25272
+ ];
25273
+ }
25274
+ }
25275
+ const customHeaderNames = [];
25276
+ finalHeaders.forEach((header) => {
25277
+ if (header.enabled && header.name.trim() && header.value.trim()) {
25278
+ const headerName = header.name.trim();
25279
+ const headerValue = header.value.trim();
25280
+ headers[headerName] = headerValue;
25281
+ if (headerName.toLowerCase() !== "authorization") {
25282
+ customHeaderNames.push(headerName);
25283
+ }
25268
25284
  }
25285
+ });
25286
+ if (customHeaderNames.length > 0) {
25287
+ headers["x-custom-auth-headers"] = JSON.stringify(customHeaderNames);
25269
25288
  }
25270
25289
  const { token: proxyAuthToken, header: proxyAuthTokenHeader } = getMCPProxyAuthToken(config);
25271
25290
  const proxyHeaders = {};
@@ -25801,10 +25820,10 @@ function focusFirst$1(candidates, preventScroll = false) {
25801
25820
  function wrapArray$1(array, startIndex) {
25802
25821
  return array.map((_, index2) => array[(startIndex + index2) % array.length]);
25803
25822
  }
25804
- var Root$3 = RovingFocusGroup;
25823
+ var Root$4 = RovingFocusGroup;
25805
25824
  var Item$1 = RovingFocusGroupItem;
25806
25825
  var TABS_NAME = "Tabs";
25807
- var [createTabsContext, createTabsScope] = createContextScope(TABS_NAME, [
25826
+ var [createTabsContext] = createContextScope(TABS_NAME, [
25808
25827
  createRovingFocusGroupScope
25809
25828
  ]);
25810
25829
  var useRovingFocusGroupScope = createRovingFocusGroupScope();
@@ -25859,7 +25878,7 @@ var TabsList$1 = reactExports.forwardRef(
25859
25878
  const context = useTabsContext(TAB_LIST_NAME, __scopeTabs);
25860
25879
  const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeTabs);
25861
25880
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
25862
- Root$3,
25881
+ Root$4,
25863
25882
  {
25864
25883
  asChild: true,
25865
25884
  ...rovingFocusGroupScope,
@@ -26158,7 +26177,7 @@ const createLucideIcon = (iconName, iconNode) => {
26158
26177
  * This source code is licensed under the ISC license.
26159
26178
  * See the LICENSE file in the root directory of this source tree.
26160
26179
  */
26161
- const __iconNode$x = [
26180
+ const __iconNode$y = [
26162
26181
  ["path", { d: "M10.268 21a2 2 0 0 0 3.464 0", key: "vwvbt9" }],
26163
26182
  [
26164
26183
  "path",
@@ -26168,14 +26187,14 @@ const __iconNode$x = [
26168
26187
  }
26169
26188
  ]
26170
26189
  ];
26171
- const Bell = createLucideIcon("bell", __iconNode$x);
26190
+ const Bell = createLucideIcon("bell", __iconNode$y);
26172
26191
  /**
26173
26192
  * @license lucide-react v0.523.0 - ISC
26174
26193
  *
26175
26194
  * This source code is licensed under the ISC license.
26176
26195
  * See the LICENSE file in the root directory of this source tree.
26177
26196
  */
26178
- const __iconNode$w = [
26197
+ const __iconNode$x = [
26179
26198
  ["path", { d: "m8 2 1.88 1.88", key: "fmnt4t" }],
26180
26199
  ["path", { d: "M14.12 3.88 16 2", key: "qol33r" }],
26181
26200
  ["path", { d: "M9 7.13v-1a3.003 3.003 0 1 1 6 0v1", key: "d7y7pr" }],
@@ -26194,134 +26213,134 @@ const __iconNode$w = [
26194
26213
  ["path", { d: "M22 13h-4", key: "1jl80f" }],
26195
26214
  ["path", { d: "M17.2 17c2.1.1 3.8 1.9 3.8 4", key: "k3fwyw" }]
26196
26215
  ];
26197
- const Bug = createLucideIcon("bug", __iconNode$w);
26216
+ const Bug = createLucideIcon("bug", __iconNode$x);
26198
26217
  /**
26199
26218
  * @license lucide-react v0.523.0 - ISC
26200
26219
  *
26201
26220
  * This source code is licensed under the ISC license.
26202
26221
  * See the LICENSE file in the root directory of this source tree.
26203
26222
  */
26204
- const __iconNode$v = [
26223
+ const __iconNode$w = [
26205
26224
  ["path", { d: "M18 6 7 17l-5-5", key: "116fxf" }],
26206
26225
  ["path", { d: "m22 10-7.5 7.5L13 16", key: "ke71qq" }]
26207
26226
  ];
26208
- const CheckCheck = createLucideIcon("check-check", __iconNode$v);
26227
+ const CheckCheck = createLucideIcon("check-check", __iconNode$w);
26209
26228
  /**
26210
26229
  * @license lucide-react v0.523.0 - ISC
26211
26230
  *
26212
26231
  * This source code is licensed under the ISC license.
26213
26232
  * See the LICENSE file in the root directory of this source tree.
26214
26233
  */
26215
- const __iconNode$u = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
26216
- const Check = createLucideIcon("check", __iconNode$u);
26234
+ const __iconNode$v = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
26235
+ const Check = createLucideIcon("check", __iconNode$v);
26217
26236
  /**
26218
26237
  * @license lucide-react v0.523.0 - ISC
26219
26238
  *
26220
26239
  * This source code is licensed under the ISC license.
26221
26240
  * See the LICENSE file in the root directory of this source tree.
26222
26241
  */
26223
- const __iconNode$t = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
26224
- const ChevronDown = createLucideIcon("chevron-down", __iconNode$t);
26242
+ const __iconNode$u = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
26243
+ const ChevronDown = createLucideIcon("chevron-down", __iconNode$u);
26225
26244
  /**
26226
26245
  * @license lucide-react v0.523.0 - ISC
26227
26246
  *
26228
26247
  * This source code is licensed under the ISC license.
26229
26248
  * See the LICENSE file in the root directory of this source tree.
26230
26249
  */
26231
- const __iconNode$s = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
26232
- const ChevronRight = createLucideIcon("chevron-right", __iconNode$s);
26250
+ const __iconNode$t = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
26251
+ const ChevronRight = createLucideIcon("chevron-right", __iconNode$t);
26233
26252
  /**
26234
26253
  * @license lucide-react v0.523.0 - ISC
26235
26254
  *
26236
26255
  * This source code is licensed under the ISC license.
26237
26256
  * See the LICENSE file in the root directory of this source tree.
26238
26257
  */
26239
- const __iconNode$r = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]];
26240
- const ChevronUp = createLucideIcon("chevron-up", __iconNode$r);
26258
+ const __iconNode$s = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]];
26259
+ const ChevronUp = createLucideIcon("chevron-up", __iconNode$s);
26241
26260
  /**
26242
26261
  * @license lucide-react v0.523.0 - ISC
26243
26262
  *
26244
26263
  * This source code is licensed under the ISC license.
26245
26264
  * See the LICENSE file in the root directory of this source tree.
26246
26265
  */
26247
- const __iconNode$q = [
26266
+ const __iconNode$r = [
26248
26267
  ["path", { d: "m7 15 5 5 5-5", key: "1hf1tw" }],
26249
26268
  ["path", { d: "m7 9 5-5 5 5", key: "sgt6xg" }]
26250
26269
  ];
26251
- const ChevronsUpDown = createLucideIcon("chevrons-up-down", __iconNode$q);
26270
+ const ChevronsUpDown = createLucideIcon("chevrons-up-down", __iconNode$r);
26252
26271
  /**
26253
26272
  * @license lucide-react v0.523.0 - ISC
26254
26273
  *
26255
26274
  * This source code is licensed under the ISC license.
26256
26275
  * See the LICENSE file in the root directory of this source tree.
26257
26276
  */
26258
- const __iconNode$p = [
26277
+ const __iconNode$q = [
26259
26278
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
26260
26279
  ["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
26261
26280
  ["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
26262
26281
  ];
26263
- const CircleAlert = createLucideIcon("circle-alert", __iconNode$p);
26282
+ const CircleAlert = createLucideIcon("circle-alert", __iconNode$q);
26264
26283
  /**
26265
26284
  * @license lucide-react v0.523.0 - ISC
26266
26285
  *
26267
26286
  * This source code is licensed under the ISC license.
26268
26287
  * See the LICENSE file in the root directory of this source tree.
26269
26288
  */
26270
- const __iconNode$o = [
26289
+ const __iconNode$p = [
26271
26290
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
26272
26291
  ["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
26273
26292
  ];
26274
- const CircleCheck = createLucideIcon("circle-check", __iconNode$o);
26293
+ const CircleCheck = createLucideIcon("circle-check", __iconNode$p);
26275
26294
  /**
26276
26295
  * @license lucide-react v0.523.0 - ISC
26277
26296
  *
26278
26297
  * This source code is licensed under the ISC license.
26279
26298
  * See the LICENSE file in the root directory of this source tree.
26280
26299
  */
26281
- const __iconNode$n = [
26300
+ const __iconNode$o = [
26282
26301
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
26283
26302
  ["path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3", key: "1u773s" }],
26284
26303
  ["path", { d: "M12 17h.01", key: "p32p05" }]
26285
26304
  ];
26286
- const CircleQuestionMark = createLucideIcon("circle-question-mark", __iconNode$n);
26305
+ const CircleQuestionMark = createLucideIcon("circle-question-mark", __iconNode$o);
26287
26306
  /**
26288
26307
  * @license lucide-react v0.523.0 - ISC
26289
26308
  *
26290
26309
  * This source code is licensed under the ISC license.
26291
26310
  * See the LICENSE file in the root directory of this source tree.
26292
26311
  */
26293
- const __iconNode$m = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]];
26294
- const Circle = createLucideIcon("circle", __iconNode$m);
26312
+ const __iconNode$n = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]];
26313
+ const Circle = createLucideIcon("circle", __iconNode$n);
26295
26314
  /**
26296
26315
  * @license lucide-react v0.523.0 - ISC
26297
26316
  *
26298
26317
  * This source code is licensed under the ISC license.
26299
26318
  * See the LICENSE file in the root directory of this source tree.
26300
26319
  */
26301
- const __iconNode$l = [
26320
+ const __iconNode$m = [
26302
26321
  ["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
26303
26322
  ["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2", key: "zix9uf" }]
26304
26323
  ];
26305
- const Copy = createLucideIcon("copy", __iconNode$l);
26324
+ const Copy = createLucideIcon("copy", __iconNode$m);
26306
26325
  /**
26307
26326
  * @license lucide-react v0.523.0 - ISC
26308
26327
  *
26309
26328
  * This source code is licensed under the ISC license.
26310
26329
  * See the LICENSE file in the root directory of this source tree.
26311
26330
  */
26312
- const __iconNode$k = [
26331
+ const __iconNode$l = [
26313
26332
  ["path", { d: "M15 3h6v6", key: "1q9fwt" }],
26314
26333
  ["path", { d: "M10 14 21 3", key: "gplh6r" }],
26315
26334
  ["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
26316
26335
  ];
26317
- const ExternalLink = createLucideIcon("external-link", __iconNode$k);
26336
+ const ExternalLink = createLucideIcon("external-link", __iconNode$l);
26318
26337
  /**
26319
26338
  * @license lucide-react v0.523.0 - ISC
26320
26339
  *
26321
26340
  * This source code is licensed under the ISC license.
26322
26341
  * See the LICENSE file in the root directory of this source tree.
26323
26342
  */
26324
- const __iconNode$j = [
26343
+ const __iconNode$k = [
26325
26344
  [
26326
26345
  "path",
26327
26346
  {
@@ -26339,14 +26358,14 @@ const __iconNode$j = [
26339
26358
  ],
26340
26359
  ["path", { d: "m2 2 20 20", key: "1ooewy" }]
26341
26360
  ];
26342
- const EyeOff = createLucideIcon("eye-off", __iconNode$j);
26361
+ const EyeOff = createLucideIcon("eye-off", __iconNode$k);
26343
26362
  /**
26344
26363
  * @license lucide-react v0.523.0 - ISC
26345
26364
  *
26346
26365
  * This source code is licensed under the ISC license.
26347
26366
  * See the LICENSE file in the root directory of this source tree.
26348
26367
  */
26349
- const __iconNode$i = [
26368
+ const __iconNode$j = [
26350
26369
  [
26351
26370
  "path",
26352
26371
  {
@@ -26356,40 +26375,40 @@ const __iconNode$i = [
26356
26375
  ],
26357
26376
  ["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
26358
26377
  ];
26359
- const Eye = createLucideIcon("eye", __iconNode$i);
26378
+ const Eye = createLucideIcon("eye", __iconNode$j);
26360
26379
  /**
26361
26380
  * @license lucide-react v0.523.0 - ISC
26362
26381
  *
26363
26382
  * This source code is licensed under the ISC license.
26364
26383
  * See the LICENSE file in the root directory of this source tree.
26365
26384
  */
26366
- const __iconNode$h = [
26385
+ const __iconNode$i = [
26367
26386
  ["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
26368
26387
  ["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
26369
26388
  ["path", { d: "M10 9H8", key: "b1mrlr" }],
26370
26389
  ["path", { d: "M16 13H8", key: "t4e002" }],
26371
26390
  ["path", { d: "M16 17H8", key: "z1uh3a" }]
26372
26391
  ];
26373
- const FileText = createLucideIcon("file-text", __iconNode$h);
26392
+ const FileText = createLucideIcon("file-text", __iconNode$i);
26374
26393
  /**
26375
26394
  * @license lucide-react v0.523.0 - ISC
26376
26395
  *
26377
26396
  * This source code is licensed under the ISC license.
26378
26397
  * See the LICENSE file in the root directory of this source tree.
26379
26398
  */
26380
- const __iconNode$g = [
26399
+ const __iconNode$h = [
26381
26400
  ["path", { d: "M20 7h-3a2 2 0 0 1-2-2V2", key: "x099mo" }],
26382
26401
  ["path", { d: "M9 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h7l4 4v10a2 2 0 0 1-2 2Z", key: "18t6ie" }],
26383
26402
  ["path", { d: "M3 7.6v12.8A1.6 1.6 0 0 0 4.6 22h9.8", key: "1nja0z" }]
26384
26403
  ];
26385
- const Files = createLucideIcon("files", __iconNode$g);
26404
+ const Files = createLucideIcon("files", __iconNode$h);
26386
26405
  /**
26387
26406
  * @license lucide-react v0.523.0 - ISC
26388
26407
  *
26389
26408
  * This source code is licensed under the ISC license.
26390
26409
  * See the LICENSE file in the root directory of this source tree.
26391
26410
  */
26392
- const __iconNode$f = [
26411
+ const __iconNode$g = [
26393
26412
  [
26394
26413
  "path",
26395
26414
  {
@@ -26407,14 +26426,14 @@ const __iconNode$f = [
26407
26426
  ["path", { d: "M3 5a2 2 0 0 0 2 2h3", key: "f2jnh7" }],
26408
26427
  ["path", { d: "M3 3v13a2 2 0 0 0 2 2h3", key: "k8epm1" }]
26409
26428
  ];
26410
- const FolderTree = createLucideIcon("folder-tree", __iconNode$f);
26429
+ const FolderTree = createLucideIcon("folder-tree", __iconNode$g);
26411
26430
  /**
26412
26431
  * @license lucide-react v0.523.0 - ISC
26413
26432
  *
26414
26433
  * This source code is licensed under the ISC license.
26415
26434
  * See the LICENSE file in the root directory of this source tree.
26416
26435
  */
26417
- const __iconNode$e = [
26436
+ const __iconNode$f = [
26418
26437
  [
26419
26438
  "path",
26420
26439
  {
@@ -26424,14 +26443,14 @@ const __iconNode$e = [
26424
26443
  ],
26425
26444
  ["path", { d: "M9 18c-4.51 2-5-2-7-2", key: "9comsn" }]
26426
26445
  ];
26427
- const Github = createLucideIcon("github", __iconNode$e);
26446
+ const Github = createLucideIcon("github", __iconNode$f);
26428
26447
  /**
26429
26448
  * @license lucide-react v0.523.0 - ISC
26430
26449
  *
26431
26450
  * This source code is licensed under the ISC license.
26432
26451
  * See the LICENSE file in the root directory of this source tree.
26433
26452
  */
26434
- const __iconNode$d = [
26453
+ const __iconNode$e = [
26435
26454
  ["path", { d: "m15 12-8.373 8.373a1 1 0 1 1-3-3L12 9", key: "eefl8a" }],
26436
26455
  ["path", { d: "m18 15 4-4", key: "16gjal" }],
26437
26456
  [
@@ -26442,84 +26461,84 @@ const __iconNode$d = [
26442
26461
  }
26443
26462
  ]
26444
26463
  ];
26445
- const Hammer = createLucideIcon("hammer", __iconNode$d);
26464
+ const Hammer = createLucideIcon("hammer", __iconNode$e);
26446
26465
  /**
26447
26466
  * @license lucide-react v0.523.0 - ISC
26448
26467
  *
26449
26468
  * This source code is licensed under the ISC license.
26450
26469
  * See the LICENSE file in the root directory of this source tree.
26451
26470
  */
26452
- const __iconNode$c = [
26471
+ const __iconNode$d = [
26453
26472
  ["line", { x1: "4", x2: "20", y1: "9", y2: "9", key: "4lhtct" }],
26454
26473
  ["line", { x1: "4", x2: "20", y1: "15", y2: "15", key: "vyu0kd" }],
26455
26474
  ["line", { x1: "10", x2: "8", y1: "3", y2: "21", key: "1ggp8o" }],
26456
26475
  ["line", { x1: "16", x2: "14", y1: "3", y2: "21", key: "weycgp" }]
26457
26476
  ];
26458
- const Hash = createLucideIcon("hash", __iconNode$c);
26477
+ const Hash = createLucideIcon("hash", __iconNode$d);
26459
26478
  /**
26460
26479
  * @license lucide-react v0.523.0 - ISC
26461
26480
  *
26462
26481
  * This source code is licensed under the ISC license.
26463
26482
  * See the LICENSE file in the root directory of this source tree.
26464
26483
  */
26465
- const __iconNode$b = [
26484
+ const __iconNode$c = [
26466
26485
  ["path", { d: "m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4", key: "g0fldk" }],
26467
26486
  ["path", { d: "m21 2-9.6 9.6", key: "1j0ho8" }],
26468
26487
  ["circle", { cx: "7.5", cy: "15.5", r: "5.5", key: "yqb3hr" }]
26469
26488
  ];
26470
- const Key = createLucideIcon("key", __iconNode$b);
26489
+ const Key = createLucideIcon("key", __iconNode$c);
26471
26490
  /**
26472
26491
  * @license lucide-react v0.523.0 - ISC
26473
26492
  *
26474
26493
  * This source code is licensed under the ISC license.
26475
26494
  * See the LICENSE file in the root directory of this source tree.
26476
26495
  */
26477
- const __iconNode$a = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]];
26478
- const LoaderCircle = createLucideIcon("loader-circle", __iconNode$a);
26496
+ const __iconNode$b = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]];
26497
+ const LoaderCircle = createLucideIcon("loader-circle", __iconNode$b);
26479
26498
  /**
26480
26499
  * @license lucide-react v0.523.0 - ISC
26481
26500
  *
26482
26501
  * This source code is licensed under the ISC license.
26483
26502
  * See the LICENSE file in the root directory of this source tree.
26484
26503
  */
26485
- const __iconNode$9 = [
26504
+ const __iconNode$a = [
26486
26505
  ["path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z", key: "1lielz" }]
26487
26506
  ];
26488
- const MessageSquare = createLucideIcon("message-square", __iconNode$9);
26507
+ const MessageSquare = createLucideIcon("message-square", __iconNode$a);
26489
26508
  /**
26490
26509
  * @license lucide-react v0.523.0 - ISC
26491
26510
  *
26492
26511
  * This source code is licensed under the ISC license.
26493
26512
  * See the LICENSE file in the root directory of this source tree.
26494
26513
  */
26495
- const __iconNode$8 = [["path", { d: "M5 12h14", key: "1ays0h" }]];
26496
- const Minus = createLucideIcon("minus", __iconNode$8);
26514
+ const __iconNode$9 = [["path", { d: "M5 12h14", key: "1ays0h" }]];
26515
+ const Minus = createLucideIcon("minus", __iconNode$9);
26497
26516
  /**
26498
26517
  * @license lucide-react v0.523.0 - ISC
26499
26518
  *
26500
26519
  * This source code is licensed under the ISC license.
26501
26520
  * See the LICENSE file in the root directory of this source tree.
26502
26521
  */
26503
- const __iconNode$7 = [["polygon", { points: "6 3 20 12 6 21 6 3", key: "1oa8hb" }]];
26504
- const Play = createLucideIcon("play", __iconNode$7);
26522
+ const __iconNode$8 = [["polygon", { points: "6 3 20 12 6 21 6 3", key: "1oa8hb" }]];
26523
+ const Play = createLucideIcon("play", __iconNode$8);
26505
26524
  /**
26506
26525
  * @license lucide-react v0.523.0 - ISC
26507
26526
  *
26508
26527
  * This source code is licensed under the ISC license.
26509
26528
  * See the LICENSE file in the root directory of this source tree.
26510
26529
  */
26511
- const __iconNode$6 = [
26530
+ const __iconNode$7 = [
26512
26531
  ["path", { d: "M5 12h14", key: "1ays0h" }],
26513
26532
  ["path", { d: "M12 5v14", key: "s699le" }]
26514
26533
  ];
26515
- const Plus = createLucideIcon("plus", __iconNode$6);
26534
+ const Plus = createLucideIcon("plus", __iconNode$7);
26516
26535
  /**
26517
26536
  * @license lucide-react v0.523.0 - ISC
26518
26537
  *
26519
26538
  * This source code is licensed under the ISC license.
26520
26539
  * See the LICENSE file in the root directory of this source tree.
26521
26540
  */
26522
- const __iconNode$5 = [
26541
+ const __iconNode$6 = [
26523
26542
  ["path", { d: "M21 8L18.74 5.74A9.75 9.75 0 0 0 12 3C11 3 10.03 3.16 9.13 3.47", key: "1krf6h" }],
26524
26543
  ["path", { d: "M8 16H3v5", key: "1cv678" }],
26525
26544
  ["path", { d: "M3 12C3 9.51 4 7.26 5.64 5.64", key: "ruvoct" }],
@@ -26528,38 +26547,38 @@ const __iconNode$5 = [
26528
26547
  ["path", { d: "M21 3v5h-5", key: "1q7to0" }],
26529
26548
  ["path", { d: "M22 22 2 2", key: "1r8tn9" }]
26530
26549
  ];
26531
- const RefreshCwOff = createLucideIcon("refresh-cw-off", __iconNode$5);
26550
+ const RefreshCwOff = createLucideIcon("refresh-cw-off", __iconNode$6);
26532
26551
  /**
26533
26552
  * @license lucide-react v0.523.0 - ISC
26534
26553
  *
26535
26554
  * This source code is licensed under the ISC license.
26536
26555
  * See the LICENSE file in the root directory of this source tree.
26537
26556
  */
26538
- const __iconNode$4 = [
26557
+ const __iconNode$5 = [
26539
26558
  ["path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8", key: "v9h5vc" }],
26540
26559
  ["path", { d: "M21 3v5h-5", key: "1q7to0" }],
26541
26560
  ["path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16", key: "3uifl3" }],
26542
26561
  ["path", { d: "M8 16H3v5", key: "1cv678" }]
26543
26562
  ];
26544
- const RefreshCw = createLucideIcon("refresh-cw", __iconNode$4);
26563
+ const RefreshCw = createLucideIcon("refresh-cw", __iconNode$5);
26545
26564
  /**
26546
26565
  * @license lucide-react v0.523.0 - ISC
26547
26566
  *
26548
26567
  * This source code is licensed under the ISC license.
26549
26568
  * See the LICENSE file in the root directory of this source tree.
26550
26569
  */
26551
- const __iconNode$3 = [
26570
+ const __iconNode$4 = [
26552
26571
  ["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "1357e3" }],
26553
26572
  ["path", { d: "M3 3v5h5", key: "1xhq8a" }]
26554
26573
  ];
26555
- const RotateCcw = createLucideIcon("rotate-ccw", __iconNode$3);
26574
+ const RotateCcw = createLucideIcon("rotate-ccw", __iconNode$4);
26556
26575
  /**
26557
26576
  * @license lucide-react v0.523.0 - ISC
26558
26577
  *
26559
26578
  * This source code is licensed under the ISC license.
26560
26579
  * See the LICENSE file in the root directory of this source tree.
26561
26580
  */
26562
- const __iconNode$2 = [
26581
+ const __iconNode$3 = [
26563
26582
  [
26564
26583
  "path",
26565
26584
  {
@@ -26570,14 +26589,14 @@ const __iconNode$2 = [
26570
26589
  ["path", { d: "M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7", key: "1ydtos" }],
26571
26590
  ["path", { d: "M7 3v4a1 1 0 0 0 1 1h7", key: "t51u73" }]
26572
26591
  ];
26573
- const Save = createLucideIcon("save", __iconNode$2);
26592
+ const Save = createLucideIcon("save", __iconNode$3);
26574
26593
  /**
26575
26594
  * @license lucide-react v0.523.0 - ISC
26576
26595
  *
26577
26596
  * This source code is licensed under the ISC license.
26578
26597
  * See the LICENSE file in the root directory of this source tree.
26579
26598
  */
26580
- const __iconNode$1 = [
26599
+ const __iconNode$2 = [
26581
26600
  [
26582
26601
  "path",
26583
26602
  {
@@ -26587,14 +26606,14 @@ const __iconNode$1 = [
26587
26606
  ],
26588
26607
  ["path", { d: "m21.854 2.147-10.94 10.939", key: "12cjpa" }]
26589
26608
  ];
26590
- const Send = createLucideIcon("send", __iconNode$1);
26609
+ const Send = createLucideIcon("send", __iconNode$2);
26591
26610
  /**
26592
26611
  * @license lucide-react v0.523.0 - ISC
26593
26612
  *
26594
26613
  * This source code is licensed under the ISC license.
26595
26614
  * See the LICENSE file in the root directory of this source tree.
26596
26615
  */
26597
- const __iconNode = [
26616
+ const __iconNode$1 = [
26598
26617
  [
26599
26618
  "path",
26600
26619
  {
@@ -26604,7 +26623,21 @@ const __iconNode = [
26604
26623
  ],
26605
26624
  ["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
26606
26625
  ];
26607
- const Settings = createLucideIcon("settings", __iconNode);
26626
+ const Settings = createLucideIcon("settings", __iconNode$1);
26627
+ /**
26628
+ * @license lucide-react v0.523.0 - ISC
26629
+ *
26630
+ * This source code is licensed under the ISC license.
26631
+ * See the LICENSE file in the root directory of this source tree.
26632
+ */
26633
+ const __iconNode = [
26634
+ ["path", { d: "M3 6h18", key: "d0wm0j" }],
26635
+ ["path", { d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6", key: "4alrt4" }],
26636
+ ["path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2", key: "v07s0e" }],
26637
+ ["line", { x1: "10", x2: "10", y1: "11", y2: "17", key: "1uufr5" }],
26638
+ ["line", { x1: "14", x2: "14", y1: "11", y2: "17", key: "xtxkd" }]
26639
+ ];
26640
+ const Trash2 = createLucideIcon("trash-2", __iconNode);
26608
26641
  const OAuthStepDetails = ({
26609
26642
  label,
26610
26643
  isComplete,
@@ -27214,6 +27247,23 @@ function updateObject(obj, path, value) {
27214
27247
  }
27215
27248
  return newObj;
27216
27249
  }
27250
+ function useCopy({ timeout = 500 } = {}) {
27251
+ const [copied, setCopied] = reactExports.useState(false);
27252
+ reactExports.useEffect(() => {
27253
+ let timeoutId;
27254
+ if (copied) {
27255
+ timeoutId = setTimeout(() => {
27256
+ setCopied(false);
27257
+ }, timeout);
27258
+ }
27259
+ return () => {
27260
+ if (timeoutId) {
27261
+ clearTimeout(timeoutId);
27262
+ }
27263
+ };
27264
+ }, [copied]);
27265
+ return { copied, setCopied };
27266
+ }
27217
27267
  const JsonView = reactExports.memo(
27218
27268
  ({
27219
27269
  data: data2,
@@ -27224,20 +27274,7 @@ const JsonView = reactExports.memo(
27224
27274
  isError = false
27225
27275
  }) => {
27226
27276
  const { toast: toast2 } = useToast();
27227
- const [copied, setCopied] = reactExports.useState(false);
27228
- reactExports.useEffect(() => {
27229
- let timeoutId;
27230
- if (copied) {
27231
- timeoutId = setTimeout(() => {
27232
- setCopied(false);
27233
- }, 500);
27234
- }
27235
- return () => {
27236
- if (timeoutId) {
27237
- clearTimeout(timeoutId);
27238
- }
27239
- };
27240
- }, [copied]);
27277
+ const { copied, setCopied } = useCopy();
27241
27278
  const normalizedData = reactExports.useMemo(() => {
27242
27279
  return typeof data2 === "string" ? tryParseJson(data2).success ? tryParseJson(data2).data : data2 : data2;
27243
27280
  }, [data2]);
@@ -28621,7 +28658,7 @@ var hideOthers = function(originalTarget, parentNode, markerName) {
28621
28658
  return applyAttributeToOthers(targets, activeParentNode, markerName, "aria-hidden");
28622
28659
  };
28623
28660
  var DIALOG_NAME = "Dialog";
28624
- var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
28661
+ var [createDialogContext] = createContextScope(DIALOG_NAME);
28625
28662
  var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
28626
28663
  var Dialog = (props) => {
28627
28664
  const {
@@ -28671,7 +28708,7 @@ var DialogTrigger = reactExports.forwardRef(
28671
28708
  "aria-haspopup": "dialog",
28672
28709
  "aria-expanded": context.open,
28673
28710
  "aria-controls": context.contentId,
28674
- "data-state": getState$2(context.open),
28711
+ "data-state": getState$3(context.open),
28675
28712
  ...triggerProps,
28676
28713
  ref: composedTriggerRef,
28677
28714
  onClick: composeEventHandlers(props.onClick, context.onOpenToggle)
@@ -28711,7 +28748,7 @@ var DialogOverlayImpl = reactExports.forwardRef(
28711
28748
  /* @__PURE__ */ jsxRuntimeExports.jsx(ReactRemoveScroll, { as: Slot$2, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsxRuntimeExports.jsx(
28712
28749
  Primitive.div,
28713
28750
  {
28714
- "data-state": getState$2(context.open),
28751
+ "data-state": getState$3(context.open),
28715
28752
  ...overlayProps,
28716
28753
  ref: forwardedRef,
28717
28754
  style: { pointerEvents: "auto", ...overlayProps.style }
@@ -28830,7 +28867,7 @@ var DialogContentImpl = reactExports.forwardRef(
28830
28867
  id: context.contentId,
28831
28868
  "aria-describedby": context.descriptionId,
28832
28869
  "aria-labelledby": context.titleId,
28833
- "data-state": getState$2(context.open),
28870
+ "data-state": getState$3(context.open),
28834
28871
  ...contentProps,
28835
28872
  ref: composedRefs,
28836
28873
  onDismiss: () => context.onOpenChange(false)
@@ -28880,7 +28917,7 @@ var DialogClose = reactExports.forwardRef(
28880
28917
  }
28881
28918
  );
28882
28919
  DialogClose.displayName = CLOSE_NAME$1;
28883
- function getState$2(open) {
28920
+ function getState$3(open) {
28884
28921
  return open ? "open" : "closed";
28885
28922
  }
28886
28923
  var TITLE_WARNING_NAME = "DialogTitleWarning";
@@ -28918,7 +28955,7 @@ var DescriptionWarning = ({ contentRef, descriptionId }) => {
28918
28955
  }, [MESSAGE, contentRef, descriptionId]);
28919
28956
  return null;
28920
28957
  };
28921
- var Root$2 = Dialog;
28958
+ var Root$3 = Dialog;
28922
28959
  var Portal$2 = DialogPortal$1;
28923
28960
  var Overlay = DialogOverlay$1;
28924
28961
  var Content$1 = DialogContent$1;
@@ -29153,7 +29190,7 @@ var N = '[cmdk-group=""]', Y = '[cmdk-group-items=""]', be = '[cmdk-group-headin
29153
29190
  }, []), reactExports.createElement(Primitive.div, { ref: composeRefs(d, o), ...c, "cmdk-list": "", role: "listbox", tabIndex: -1, "aria-activedescendant": p2, "aria-label": u2, id: b.listId }, B(r2, (m2) => reactExports.createElement("div", { ref: composeRefs(f, b.listInnerRef), "cmdk-list-sizer": "" }, m2)));
29154
29191
  }), xe = reactExports.forwardRef((r2, o) => {
29155
29192
  let { open: n, onOpenChange: u2, overlayClassName: c, contentClassName: d, container: f, ...p2 } = r2;
29156
- return reactExports.createElement(Root$2, { open: n, onOpenChange: u2 }, reactExports.createElement(Portal$2, { container: f }, reactExports.createElement(Overlay, { "cmdk-overlay": "", className: c }), reactExports.createElement(Content$1, { "aria-label": r2.label, "cmdk-dialog": "", className: d }, reactExports.createElement(me, { ref: o, ...p2 }))));
29193
+ return reactExports.createElement(Root$3, { open: n, onOpenChange: u2 }, reactExports.createElement(Portal$2, { container: f }, reactExports.createElement(Overlay, { "cmdk-overlay": "", className: c }), reactExports.createElement(Content$1, { "aria-label": r2.label, "cmdk-dialog": "", className: d }, reactExports.createElement(me, { ref: o, ...p2 }))));
29157
29194
  }), Ie = reactExports.forwardRef((r2, o) => P((u2) => u2.filtered.count === 0) ? reactExports.createElement(Primitive.div, { ref: o, ...r2, "cmdk-empty": "", role: "presentation" }) : null), Pe = reactExports.forwardRef((r2, o) => {
29158
29195
  let { progress: n, children: u2, label: c = "Loading...", ...d } = r2;
29159
29196
  return reactExports.createElement(Primitive.div, { ref: o, ...d, "cmdk-loading": "", role: "progressbar", "aria-valuenow": n, "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": c }, B(r2, (f) => reactExports.createElement("div", { "aria-hidden": true }, f)));
@@ -31245,7 +31282,7 @@ var Arrow$1 = reactExports.forwardRef((props, forwardedRef) => {
31245
31282
  );
31246
31283
  });
31247
31284
  Arrow$1.displayName = NAME$1;
31248
- var Root$1 = Arrow$1;
31285
+ var Root$2 = Arrow$1;
31249
31286
  function useSize(element) {
31250
31287
  const [size2, setSize] = reactExports.useState(void 0);
31251
31288
  useLayoutEffect2(() => {
@@ -31492,7 +31529,7 @@ var PopperArrow = reactExports.forwardRef(function PopperArrow2(props, forwarded
31492
31529
  visibility: contentContext.shouldHideArrow ? "hidden" : void 0
31493
31530
  },
31494
31531
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(
31495
- Root$1,
31532
+ Root$2,
31496
31533
  {
31497
31534
  ...arrowProps,
31498
31535
  ref: forwardedRef,
@@ -31552,7 +31589,7 @@ var Anchor = PopperAnchor;
31552
31589
  var Content = PopperContent;
31553
31590
  var Arrow = PopperArrow;
31554
31591
  var POPOVER_NAME = "Popover";
31555
- var [createPopoverContext, createPopoverScope] = createContextScope(POPOVER_NAME, [
31592
+ var [createPopoverContext] = createContextScope(POPOVER_NAME, [
31556
31593
  createPopperScope
31557
31594
  ]);
31558
31595
  var usePopperScope$2 = createPopperScope();
@@ -31622,7 +31659,7 @@ var PopoverTrigger$1 = reactExports.forwardRef(
31622
31659
  "aria-haspopup": "dialog",
31623
31660
  "aria-expanded": context.open,
31624
31661
  "aria-controls": context.contentId,
31625
- "data-state": getState$1(context.open),
31662
+ "data-state": getState$2(context.open),
31626
31663
  ...triggerProps,
31627
31664
  ref: composedTriggerRef,
31628
31665
  onClick: composeEventHandlers(props.onClick, context.onOpenToggle)
@@ -31774,7 +31811,7 @@ var PopoverContentImpl = reactExports.forwardRef(
31774
31811
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(
31775
31812
  Content,
31776
31813
  {
31777
- "data-state": getState$1(context.open),
31814
+ "data-state": getState$2(context.open),
31778
31815
  role: "dialog",
31779
31816
  id: context.contentId,
31780
31817
  ...popperScope,
@@ -31825,7 +31862,7 @@ var PopoverArrow = reactExports.forwardRef(
31825
31862
  }
31826
31863
  );
31827
31864
  PopoverArrow.displayName = ARROW_NAME$2;
31828
- function getState$1(open) {
31865
+ function getState$2(open) {
31829
31866
  return open ? "open" : "closed";
31830
31867
  }
31831
31868
  var Root2$1 = Popover$1;
@@ -31937,19 +31974,19 @@ var Label$2 = reactExports.forwardRef((props, forwardedRef) => {
31937
31974
  );
31938
31975
  });
31939
31976
  Label$2.displayName = NAME;
31940
- var Root = Label$2;
31977
+ var Root$1 = Label$2;
31941
31978
  const labelVariants = cva(
31942
31979
  "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
31943
31980
  );
31944
31981
  const Label$1 = reactExports.forwardRef(({ className, ...props }, ref2) => /* @__PURE__ */ jsxRuntimeExports.jsx(
31945
- Root,
31982
+ Root$1,
31946
31983
  {
31947
31984
  ref: ref2,
31948
31985
  className: cn(labelVariants(), className),
31949
31986
  ...props
31950
31987
  }
31951
31988
  ));
31952
- Label$1.displayName = Root.displayName;
31989
+ Label$1.displayName = Root$1.displayName;
31953
31990
  const ListPane = ({
31954
31991
  items: items2,
31955
31992
  listItems,
@@ -35259,7 +35296,7 @@ var OPEN_KEYS = [" ", "Enter", "ArrowUp", "ArrowDown"];
35259
35296
  var SELECTION_KEYS = [" ", "Enter"];
35260
35297
  var SELECT_NAME = "Select";
35261
35298
  var [Collection, useCollection, createCollectionScope] = createCollection(SELECT_NAME);
35262
- var [createSelectContext, createSelectScope] = createContextScope(SELECT_NAME, [
35299
+ var [createSelectContext] = createContextScope(SELECT_NAME, [
35263
35300
  createCollectionScope,
35264
35301
  createPopperScope
35265
35302
  ]);
@@ -36306,7 +36343,7 @@ var SelectArrow = reactExports.forwardRef(
36306
36343
  }
36307
36344
  );
36308
36345
  SelectArrow.displayName = ARROW_NAME$1;
36309
- var BUBBLE_INPUT_NAME$1 = "SelectBubbleInput";
36346
+ var BUBBLE_INPUT_NAME$2 = "SelectBubbleInput";
36310
36347
  var SelectBubbleInput = reactExports.forwardRef(
36311
36348
  ({ __scopeSelect, value, ...props }, forwardedRef) => {
36312
36349
  const ref2 = reactExports.useRef(null);
@@ -36338,7 +36375,7 @@ var SelectBubbleInput = reactExports.forwardRef(
36338
36375
  );
36339
36376
  }
36340
36377
  );
36341
- SelectBubbleInput.displayName = BUBBLE_INPUT_NAME$1;
36378
+ SelectBubbleInput.displayName = BUBBLE_INPUT_NAME$2;
36342
36379
  function shouldShowPlaceholder(value) {
36343
36380
  return value === "" || value === void 0;
36344
36381
  }
@@ -36541,8 +36578,8 @@ const useTheme = () => {
36541
36578
  [theme, setThemeWithSideEffect]
36542
36579
  );
36543
36580
  };
36544
- const version = "0.16.7";
36545
- var [createTooltipContext, createTooltipScope] = createContextScope("Tooltip", [
36581
+ const version = "0.16.8";
36582
+ var [createTooltipContext] = createContextScope("Tooltip", [
36546
36583
  createPopperScope
36547
36584
  ]);
36548
36585
  var usePopperScope = createPopperScope();
@@ -36867,7 +36904,7 @@ var TooltipContentImpl = reactExports.forwardRef(
36867
36904
  },
36868
36905
  children: [
36869
36906
  /* @__PURE__ */ jsxRuntimeExports.jsx(Slottable, { children }),
36870
- /* @__PURE__ */ jsxRuntimeExports.jsx(VisuallyHiddenContentContextProvider, { scope: __scopeTooltip, isInside: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Root$4, { id: context.contentId, role: "tooltip", children: ariaLabel || children }) })
36907
+ /* @__PURE__ */ jsxRuntimeExports.jsx(VisuallyHiddenContentContextProvider, { scope: __scopeTooltip, isInside: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Root$5, { id: context.contentId, role: "tooltip", children: ariaLabel || children }) })
36871
36908
  ]
36872
36909
  }
36873
36910
  )
@@ -37024,6 +37061,394 @@ const TooltipContent = reactExports.forwardRef(({ className, sideOffset = 4, ...
37024
37061
  }
37025
37062
  ));
37026
37063
  TooltipContent.displayName = Content2.displayName;
37064
+ const Textarea = reactExports.forwardRef(
37065
+ ({ className, ...props }, ref2) => {
37066
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
37067
+ "textarea",
37068
+ {
37069
+ className: cn(
37070
+ "flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
37071
+ className
37072
+ ),
37073
+ ref: ref2,
37074
+ ...props
37075
+ }
37076
+ );
37077
+ }
37078
+ );
37079
+ Textarea.displayName = "Textarea";
37080
+ var SWITCH_NAME = "Switch";
37081
+ var [createSwitchContext] = createContextScope(SWITCH_NAME);
37082
+ var [SwitchProvider, useSwitchContext] = createSwitchContext(SWITCH_NAME);
37083
+ var Switch$1 = reactExports.forwardRef(
37084
+ (props, forwardedRef) => {
37085
+ const {
37086
+ __scopeSwitch,
37087
+ name,
37088
+ checked: checkedProp,
37089
+ defaultChecked,
37090
+ required: required2,
37091
+ disabled,
37092
+ value = "on",
37093
+ onCheckedChange,
37094
+ form,
37095
+ ...switchProps
37096
+ } = props;
37097
+ const [button, setButton] = reactExports.useState(null);
37098
+ const composedRefs = useComposedRefs(forwardedRef, (node) => setButton(node));
37099
+ const hasConsumerStoppedPropagationRef = reactExports.useRef(false);
37100
+ const isFormControl = button ? form || !!button.closest("form") : true;
37101
+ const [checked, setChecked] = useControllableState({
37102
+ prop: checkedProp,
37103
+ defaultProp: defaultChecked ?? false,
37104
+ onChange: onCheckedChange,
37105
+ caller: SWITCH_NAME
37106
+ });
37107
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(SwitchProvider, { scope: __scopeSwitch, checked, disabled, children: [
37108
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
37109
+ Primitive.button,
37110
+ {
37111
+ type: "button",
37112
+ role: "switch",
37113
+ "aria-checked": checked,
37114
+ "aria-required": required2,
37115
+ "data-state": getState$1(checked),
37116
+ "data-disabled": disabled ? "" : void 0,
37117
+ disabled,
37118
+ value,
37119
+ ...switchProps,
37120
+ ref: composedRefs,
37121
+ onClick: composeEventHandlers(props.onClick, (event) => {
37122
+ setChecked((prevChecked) => !prevChecked);
37123
+ if (isFormControl) {
37124
+ hasConsumerStoppedPropagationRef.current = event.isPropagationStopped();
37125
+ if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation();
37126
+ }
37127
+ })
37128
+ }
37129
+ ),
37130
+ isFormControl && /* @__PURE__ */ jsxRuntimeExports.jsx(
37131
+ SwitchBubbleInput,
37132
+ {
37133
+ control: button,
37134
+ bubbles: !hasConsumerStoppedPropagationRef.current,
37135
+ name,
37136
+ value,
37137
+ checked,
37138
+ required: required2,
37139
+ disabled,
37140
+ form,
37141
+ style: { transform: "translateX(-100%)" }
37142
+ }
37143
+ )
37144
+ ] });
37145
+ }
37146
+ );
37147
+ Switch$1.displayName = SWITCH_NAME;
37148
+ var THUMB_NAME = "SwitchThumb";
37149
+ var SwitchThumb = reactExports.forwardRef(
37150
+ (props, forwardedRef) => {
37151
+ const { __scopeSwitch, ...thumbProps } = props;
37152
+ const context = useSwitchContext(THUMB_NAME, __scopeSwitch);
37153
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
37154
+ Primitive.span,
37155
+ {
37156
+ "data-state": getState$1(context.checked),
37157
+ "data-disabled": context.disabled ? "" : void 0,
37158
+ ...thumbProps,
37159
+ ref: forwardedRef
37160
+ }
37161
+ );
37162
+ }
37163
+ );
37164
+ SwitchThumb.displayName = THUMB_NAME;
37165
+ var BUBBLE_INPUT_NAME$1 = "SwitchBubbleInput";
37166
+ var SwitchBubbleInput = reactExports.forwardRef(
37167
+ ({
37168
+ __scopeSwitch,
37169
+ control,
37170
+ checked,
37171
+ bubbles = true,
37172
+ ...props
37173
+ }, forwardedRef) => {
37174
+ const ref2 = reactExports.useRef(null);
37175
+ const composedRefs = useComposedRefs(ref2, forwardedRef);
37176
+ const prevChecked = usePrevious(checked);
37177
+ const controlSize = useSize(control);
37178
+ reactExports.useEffect(() => {
37179
+ const input = ref2.current;
37180
+ if (!input) return;
37181
+ const inputProto = window.HTMLInputElement.prototype;
37182
+ const descriptor = Object.getOwnPropertyDescriptor(
37183
+ inputProto,
37184
+ "checked"
37185
+ );
37186
+ const setChecked = descriptor.set;
37187
+ if (prevChecked !== checked && setChecked) {
37188
+ const event = new Event("click", { bubbles });
37189
+ setChecked.call(input, checked);
37190
+ input.dispatchEvent(event);
37191
+ }
37192
+ }, [prevChecked, checked, bubbles]);
37193
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
37194
+ "input",
37195
+ {
37196
+ type: "checkbox",
37197
+ "aria-hidden": true,
37198
+ defaultChecked: checked,
37199
+ ...props,
37200
+ tabIndex: -1,
37201
+ ref: composedRefs,
37202
+ style: {
37203
+ ...props.style,
37204
+ ...controlSize,
37205
+ position: "absolute",
37206
+ pointerEvents: "none",
37207
+ opacity: 0,
37208
+ margin: 0
37209
+ }
37210
+ }
37211
+ );
37212
+ }
37213
+ );
37214
+ SwitchBubbleInput.displayName = BUBBLE_INPUT_NAME$1;
37215
+ function getState$1(checked) {
37216
+ return checked ? "checked" : "unchecked";
37217
+ }
37218
+ var Root = Switch$1;
37219
+ var Thumb = SwitchThumb;
37220
+ const Switch = reactExports.forwardRef(({ className, ...props }, ref2) => /* @__PURE__ */ jsxRuntimeExports.jsx(
37221
+ Root,
37222
+ {
37223
+ className: cn(
37224
+ "peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
37225
+ className
37226
+ ),
37227
+ ...props,
37228
+ ref: ref2,
37229
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
37230
+ Thumb,
37231
+ {
37232
+ className: cn(
37233
+ "pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0"
37234
+ )
37235
+ }
37236
+ )
37237
+ }
37238
+ ));
37239
+ Switch.displayName = Root.displayName;
37240
+ const createEmptyHeader = () => ({
37241
+ name: "",
37242
+ value: "",
37243
+ enabled: true
37244
+ });
37245
+ const createHeaderFromBearerToken = (bearerToken, headerName) => ({
37246
+ name: headerName || "Authorization",
37247
+ value: (headerName == null ? void 0 : headerName.toLowerCase()) === "authorization" || !headerName ? `Bearer ${bearerToken}` : bearerToken,
37248
+ enabled: true
37249
+ });
37250
+ const migrateFromLegacyAuth = (bearerToken, headerName) => {
37251
+ return bearerToken ? [createHeaderFromBearerToken(bearerToken, headerName)] : [];
37252
+ };
37253
+ const CustomHeaders = ({
37254
+ headers,
37255
+ onChange,
37256
+ className
37257
+ }) => {
37258
+ const [isJsonMode, setIsJsonMode] = reactExports.useState(false);
37259
+ const [jsonValue, setJsonValue] = reactExports.useState("");
37260
+ const [jsonError, setJsonError] = reactExports.useState(null);
37261
+ const [visibleValues, setVisibleValues] = reactExports.useState(/* @__PURE__ */ new Set());
37262
+ const updateHeader = (index2, field, value) => {
37263
+ const newHeaders = [...headers];
37264
+ newHeaders[index2] = { ...newHeaders[index2], [field]: value };
37265
+ onChange(newHeaders);
37266
+ };
37267
+ const addHeader = () => {
37268
+ onChange([...headers, createEmptyHeader()]);
37269
+ };
37270
+ const removeHeader = (index2) => {
37271
+ const newHeaders = headers.filter((_, i) => i !== index2);
37272
+ onChange(newHeaders);
37273
+ };
37274
+ const toggleValueVisibility = (index2) => {
37275
+ const newVisible = new Set(visibleValues);
37276
+ if (newVisible.has(index2)) {
37277
+ newVisible.delete(index2);
37278
+ } else {
37279
+ newVisible.add(index2);
37280
+ }
37281
+ setVisibleValues(newVisible);
37282
+ };
37283
+ const switchToJsonMode = () => {
37284
+ const jsonObject = {};
37285
+ headers.forEach((header) => {
37286
+ if (header.enabled && header.name.trim() && header.value.trim()) {
37287
+ jsonObject[header.name.trim()] = header.value.trim();
37288
+ }
37289
+ });
37290
+ setJsonValue(JSON.stringify(jsonObject, null, 2));
37291
+ setJsonError(null);
37292
+ setIsJsonMode(true);
37293
+ };
37294
+ const switchToFormMode = () => {
37295
+ try {
37296
+ const parsed = JSON.parse(jsonValue);
37297
+ if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
37298
+ setJsonError("JSON must be an object with string key-value pairs");
37299
+ return;
37300
+ }
37301
+ const newHeaders = Object.entries(parsed).map(
37302
+ ([name, value]) => ({
37303
+ name,
37304
+ value: String(value),
37305
+ enabled: true
37306
+ })
37307
+ );
37308
+ onChange(newHeaders);
37309
+ setJsonError(null);
37310
+ setIsJsonMode(false);
37311
+ } catch {
37312
+ setJsonError("Invalid JSON format");
37313
+ }
37314
+ };
37315
+ const handleJsonChange = (value) => {
37316
+ setJsonValue(value);
37317
+ setJsonError(null);
37318
+ };
37319
+ if (isJsonMode) {
37320
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `space-y-3 ${className}`, children: [
37321
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-between items-center gap-2", children: [
37322
+ /* @__PURE__ */ jsxRuntimeExports.jsx("h4", { className: "text-sm font-semibold flex-shrink-0", children: "Custom Headers (JSON)" }),
37323
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
37324
+ Button,
37325
+ {
37326
+ type: "button",
37327
+ variant: "outline",
37328
+ size: "sm",
37329
+ onClick: switchToFormMode,
37330
+ className: "flex-shrink-0",
37331
+ children: "Switch to Form"
37332
+ }
37333
+ )
37334
+ ] }),
37335
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-2", children: [
37336
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
37337
+ Textarea,
37338
+ {
37339
+ value: jsonValue,
37340
+ onChange: (e) => handleJsonChange(e.target.value),
37341
+ placeholder: '{\\n "Authorization": "Bearer token123",\\n "X-Tenant-ID": "acme-inc",\\n "X-Environment": "staging"\\n}',
37342
+ className: "font-mono text-sm min-h-[100px] resize-none"
37343
+ }
37344
+ ),
37345
+ jsonError && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-red-600", children: jsonError }),
37346
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-muted-foreground", children: "Enter headers as a JSON object with string key-value pairs." })
37347
+ ] })
37348
+ ] });
37349
+ }
37350
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `space-y-3 ${className}`, children: [
37351
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-between items-center gap-2", children: [
37352
+ /* @__PURE__ */ jsxRuntimeExports.jsx("h4", { className: "text-sm font-semibold flex-shrink-0", children: "Custom Headers" }),
37353
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex gap-1 flex-shrink-0", children: [
37354
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
37355
+ Button,
37356
+ {
37357
+ type: "button",
37358
+ variant: "outline",
37359
+ size: "sm",
37360
+ onClick: switchToJsonMode,
37361
+ className: "text-xs px-2",
37362
+ children: "JSON"
37363
+ }
37364
+ ),
37365
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
37366
+ Button,
37367
+ {
37368
+ type: "button",
37369
+ variant: "outline",
37370
+ size: "sm",
37371
+ onClick: addHeader,
37372
+ className: "text-xs px-2",
37373
+ "data-testid": "add-header-button",
37374
+ children: [
37375
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Plus, { className: "w-3 h-3 mr-1" }),
37376
+ "Add"
37377
+ ]
37378
+ }
37379
+ )
37380
+ ] })
37381
+ ] }),
37382
+ headers.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-center py-4 text-muted-foreground", children: [
37383
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm", children: "No custom headers configured" }),
37384
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs mt-1", children: 'Click "Add" to get started' })
37385
+ ] }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "space-y-2 max-h-[300px] overflow-y-auto", children: headers.map((header, index2) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
37386
+ "div",
37387
+ {
37388
+ className: "flex items-start gap-2 p-2 border rounded-md",
37389
+ children: [
37390
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
37391
+ Switch,
37392
+ {
37393
+ checked: header.enabled,
37394
+ onCheckedChange: (enabled) => updateHeader(index2, "enabled", enabled),
37395
+ className: "shrink-0 mt-2"
37396
+ }
37397
+ ),
37398
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 min-w-0 space-y-2", children: [
37399
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
37400
+ Input,
37401
+ {
37402
+ placeholder: "Header Name",
37403
+ value: header.name,
37404
+ onChange: (e) => updateHeader(index2, "name", e.target.value),
37405
+ className: "font-mono text-xs",
37406
+ "data-testid": `header-name-input-${index2}`
37407
+ }
37408
+ ),
37409
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative", children: [
37410
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
37411
+ Input,
37412
+ {
37413
+ placeholder: "Header Value",
37414
+ value: header.value,
37415
+ onChange: (e) => updateHeader(index2, "value", e.target.value),
37416
+ type: visibleValues.has(index2) ? "text" : "password",
37417
+ className: "font-mono text-xs pr-8",
37418
+ "data-testid": `header-value-input-${index2}`
37419
+ }
37420
+ ),
37421
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
37422
+ Button,
37423
+ {
37424
+ type: "button",
37425
+ variant: "ghost",
37426
+ size: "sm",
37427
+ onClick: () => toggleValueVisibility(index2),
37428
+ className: "absolute right-1 top-1/2 -translate-y-1/2 h-6 w-6 p-0",
37429
+ children: visibleValues.has(index2) ? /* @__PURE__ */ jsxRuntimeExports.jsx(EyeOff, { className: "w-3 h-3" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Eye, { className: "w-3 h-3" })
37430
+ }
37431
+ )
37432
+ ] })
37433
+ ] }),
37434
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
37435
+ Button,
37436
+ {
37437
+ type: "button",
37438
+ variant: "ghost",
37439
+ size: "sm",
37440
+ onClick: () => removeHeader(index2),
37441
+ className: "shrink-0 text-red-600 hover:text-red-700 hover:bg-red-50 h-6 w-6 p-0 mt-2",
37442
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(Trash2, { className: "w-3 h-3" })
37443
+ }
37444
+ )
37445
+ ]
37446
+ },
37447
+ index2
37448
+ )) }),
37449
+ headers.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-muted-foreground", children: "Use the toggle to enable/disable headers. Only enabled headers with both name and value will be sent." })
37450
+ ] });
37451
+ };
37027
37452
  const Sidebar = ({
37028
37453
  connectionStatus,
37029
37454
  transportType,
@@ -37036,10 +37461,8 @@ const Sidebar = ({
37036
37461
  setSseUrl,
37037
37462
  env,
37038
37463
  setEnv,
37039
- bearerToken,
37040
- setBearerToken,
37041
- headerName,
37042
- setHeaderName,
37464
+ customHeaders,
37465
+ setCustomHeaders,
37043
37466
  oauthClientId,
37044
37467
  setOauthClientId,
37045
37468
  oauthScope,
@@ -37408,42 +37831,13 @@ const Sidebar = ({
37408
37831
  }
37409
37832
  ),
37410
37833
  showAuthConfig && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
37411
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-2 p-3 rounded border", children: [
37412
- /* @__PURE__ */ jsxRuntimeExports.jsx("h4", { className: "text-sm font-semibold flex items-center", children: "API Token Authentication" }),
37413
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-2", children: [
37414
- /* @__PURE__ */ jsxRuntimeExports.jsx("label", { className: "text-sm font-medium", children: "Header Name" }),
37415
- /* @__PURE__ */ jsxRuntimeExports.jsx(
37416
- Input,
37417
- {
37418
- placeholder: "Authorization",
37419
- onChange: (e) => setHeaderName && setHeaderName(e.target.value),
37420
- "data-testid": "header-input",
37421
- className: "font-mono",
37422
- value: headerName
37423
- }
37424
- ),
37425
- /* @__PURE__ */ jsxRuntimeExports.jsx(
37426
- "label",
37427
- {
37428
- className: "text-sm font-medium",
37429
- htmlFor: "bearer-token-input",
37430
- children: "Bearer Token"
37431
- }
37432
- ),
37433
- /* @__PURE__ */ jsxRuntimeExports.jsx(
37434
- Input,
37435
- {
37436
- id: "bearer-token-input",
37437
- placeholder: "Bearer Token",
37438
- value: bearerToken,
37439
- onChange: (e) => setBearerToken(e.target.value),
37440
- "data-testid": "bearer-token-input",
37441
- className: "font-mono",
37442
- type: "password"
37443
- }
37444
- )
37445
- ] })
37446
- ] }),
37834
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "p-3 rounded border overflow-hidden", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
37835
+ CustomHeaders,
37836
+ {
37837
+ headers: customHeaders,
37838
+ onChange: setCustomHeaders
37839
+ }
37840
+ ) }),
37447
37841
  transportType !== "stdio" && // OAuth Configuration
37448
37842
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-2 p-3 rounded border", children: [
37449
37843
  /* @__PURE__ */ jsxRuntimeExports.jsx("h4", { className: "text-sm font-semibold flex items-center", children: "OAuth 2.0 Flow" }),
@@ -37717,7 +38111,7 @@ const Sidebar = ({
37717
38111
  ] });
37718
38112
  };
37719
38113
  var CHECKBOX_NAME = "Checkbox";
37720
- var [createCheckboxContext, createCheckboxScope] = createContextScope(CHECKBOX_NAME);
38114
+ var [createCheckboxContext] = createContextScope(CHECKBOX_NAME);
37721
38115
  var [CheckboxProviderImpl, useCheckboxContext] = createCheckboxContext(CHECKBOX_NAME);
37722
38116
  function CheckboxProvider(props) {
37723
38117
  const {
@@ -37992,22 +38386,6 @@ const Checkbox = reactExports.forwardRef(({ className, ...props }, ref2) => /* @
37992
38386
  }
37993
38387
  ));
37994
38388
  Checkbox.displayName = Checkbox$1.displayName;
37995
- const Textarea = reactExports.forwardRef(
37996
- ({ className, ...props }, ref2) => {
37997
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
37998
- "textarea",
37999
- {
38000
- className: cn(
38001
- "flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
38002
- className
38003
- ),
38004
- ref: ref2,
38005
- ...props
38006
- }
38007
- );
38008
- }
38009
- );
38010
- Textarea.displayName = "Textarea";
38011
38389
  const ResourceLinkView = reactExports.memo(
38012
38390
  ({
38013
38391
  uri,
@@ -38255,6 +38633,8 @@ const ToolsTab = ({
38255
38633
  const [isToolRunning, setIsToolRunning] = reactExports.useState(false);
38256
38634
  const [isOutputSchemaExpanded, setIsOutputSchemaExpanded] = reactExports.useState(false);
38257
38635
  const [isMetaExpanded, setIsMetaExpanded] = reactExports.useState(false);
38636
+ const { toast: toast2 } = useToast();
38637
+ const { copied, setCopied } = useCopy();
38258
38638
  reactExports.useEffect(() => {
38259
38639
  const params2 = Object.entries(
38260
38640
  (selectedTool == null ? void 0 : selectedTool.inputSchema.properties) ?? []
@@ -38454,27 +38834,52 @@ const ToolsTab = ({
38454
38834
  }
38455
38835
  )
38456
38836
  ] }),
38457
- /* @__PURE__ */ jsxRuntimeExports.jsx(
38458
- Button,
38459
- {
38460
- onClick: async () => {
38461
- try {
38462
- setIsToolRunning(true);
38463
- await callTool(selectedTool.name, params);
38464
- } finally {
38465
- setIsToolRunning(false);
38466
- }
38467
- },
38468
- disabled: isToolRunning,
38469
- children: isToolRunning ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
38470
- /* @__PURE__ */ jsxRuntimeExports.jsx(LoaderCircle, { className: "w-4 h-4 mr-2 animate-spin" }),
38471
- "Running..."
38472
- ] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
38473
- /* @__PURE__ */ jsxRuntimeExports.jsx(Send, { className: "w-4 h-4 mr-2" }),
38474
- "Run Tool"
38475
- ] })
38476
- }
38477
- ),
38837
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex gap-2", children: [
38838
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
38839
+ Button,
38840
+ {
38841
+ onClick: async () => {
38842
+ try {
38843
+ setIsToolRunning(true);
38844
+ await callTool(selectedTool.name, params);
38845
+ } finally {
38846
+ setIsToolRunning(false);
38847
+ }
38848
+ },
38849
+ disabled: isToolRunning,
38850
+ children: isToolRunning ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
38851
+ /* @__PURE__ */ jsxRuntimeExports.jsx(LoaderCircle, { className: "w-4 h-4 mr-2 animate-spin" }),
38852
+ "Running..."
38853
+ ] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
38854
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Send, { className: "w-4 h-4 mr-2" }),
38855
+ "Run Tool"
38856
+ ] })
38857
+ }
38858
+ ),
38859
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
38860
+ Button,
38861
+ {
38862
+ onClick: async () => {
38863
+ try {
38864
+ navigator.clipboard.writeText(
38865
+ JSON.stringify(params, null, 2)
38866
+ );
38867
+ setCopied(true);
38868
+ } catch (error) {
38869
+ toast2({
38870
+ title: "Error",
38871
+ description: `There was an error copying input to the clipboard: ${error instanceof Error ? error.message : String(error)}`,
38872
+ variant: "destructive"
38873
+ });
38874
+ }
38875
+ },
38876
+ children: [
38877
+ copied ? /* @__PURE__ */ jsxRuntimeExports.jsx(CheckCheck, { className: "h-4 w-4 mr-2 dark:text-green-700 text-green-600" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Copy, { className: "h-4 w-4 mr-2" }),
38878
+ "Copy Input"
38879
+ ]
38880
+ }
38881
+ )
38882
+ ] }),
38478
38883
  /* @__PURE__ */ jsxRuntimeExports.jsx(
38479
38884
  ToolResults,
38480
38885
  {
@@ -38664,6 +39069,31 @@ const App = () => {
38664
39069
  const [oauthScope, setOauthScope] = reactExports.useState(() => {
38665
39070
  return localStorage.getItem("lastOauthScope") || "";
38666
39071
  });
39072
+ const [customHeaders, setCustomHeaders] = reactExports.useState(() => {
39073
+ const savedHeaders = localStorage.getItem("lastCustomHeaders");
39074
+ if (savedHeaders) {
39075
+ try {
39076
+ return JSON.parse(savedHeaders);
39077
+ } catch (error) {
39078
+ console.warn(
39079
+ `Failed to parse custom headers: "${savedHeaders}", will try legacy migration`,
39080
+ error
39081
+ );
39082
+ }
39083
+ }
39084
+ const legacyToken = localStorage.getItem("lastBearerToken") || "";
39085
+ const legacyHeaderName = localStorage.getItem("lastHeaderName") || "";
39086
+ if (legacyToken) {
39087
+ return migrateFromLegacyAuth(legacyToken, legacyHeaderName);
39088
+ }
39089
+ return [
39090
+ {
39091
+ name: "Authorization",
39092
+ value: "Bearer ",
39093
+ enabled: true
39094
+ }
39095
+ ];
39096
+ });
38667
39097
  const [pendingSampleRequests, setPendingSampleRequests] = reactExports.useState([]);
38668
39098
  const [pendingElicitationRequests, setPendingElicitationRequests] = reactExports.useState([]);
38669
39099
  const [isAuthDebuggerVisible, setIsAuthDebuggerVisible] = reactExports.useState(false);
@@ -38718,8 +39148,7 @@ const App = () => {
38718
39148
  args,
38719
39149
  sseUrl,
38720
39150
  env,
38721
- bearerToken,
38722
- headerName,
39151
+ customHeaders,
38723
39152
  oauthClientId,
38724
39153
  oauthScope,
38725
39154
  config,
@@ -38790,11 +39219,32 @@ const App = () => {
38790
39219
  localStorage.setItem("lastTransportType", transportType);
38791
39220
  }, [transportType]);
38792
39221
  reactExports.useEffect(() => {
38793
- localStorage.setItem("lastBearerToken", bearerToken);
39222
+ if (bearerToken) {
39223
+ localStorage.setItem("lastBearerToken", bearerToken);
39224
+ } else {
39225
+ localStorage.removeItem("lastBearerToken");
39226
+ }
38794
39227
  }, [bearerToken]);
38795
39228
  reactExports.useEffect(() => {
38796
- localStorage.setItem("lastHeaderName", headerName);
39229
+ if (headerName) {
39230
+ localStorage.setItem("lastHeaderName", headerName);
39231
+ } else {
39232
+ localStorage.removeItem("lastHeaderName");
39233
+ }
38797
39234
  }, [headerName]);
39235
+ reactExports.useEffect(() => {
39236
+ localStorage.setItem("lastCustomHeaders", JSON.stringify(customHeaders));
39237
+ }, [customHeaders]);
39238
+ reactExports.useEffect(() => {
39239
+ if (customHeaders.length === 0 && (bearerToken || headerName)) {
39240
+ const migratedHeaders = migrateFromLegacyAuth(bearerToken, headerName);
39241
+ if (migratedHeaders.length > 0) {
39242
+ setCustomHeaders(migratedHeaders);
39243
+ setBearerToken("");
39244
+ setHeaderName("");
39245
+ }
39246
+ }
39247
+ }, [bearerToken, headerName, customHeaders, setCustomHeaders]);
38798
39248
  reactExports.useEffect(() => {
38799
39249
  localStorage.setItem("lastOauthClientId", oauthClientId);
38800
39250
  }, [oauthClientId]);
@@ -39177,13 +39627,13 @@ const App = () => {
39177
39627
  ) });
39178
39628
  if (window.location.pathname === "/oauth/callback") {
39179
39629
  const OAuthCallback = React.lazy(
39180
- () => __vitePreload(() => import("./OAuthCallback-aXDAN43J.js"), true ? [] : void 0)
39630
+ () => __vitePreload(() => import("./OAuthCallback-7gQlGWPl.js"), true ? [] : void 0)
39181
39631
  );
39182
39632
  return /* @__PURE__ */ jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading..." }), children: /* @__PURE__ */ jsxRuntimeExports.jsx(OAuthCallback, { onConnect: onOAuthConnect }) });
39183
39633
  }
39184
39634
  if (window.location.pathname === "/oauth/callback/debug") {
39185
39635
  const OAuthDebugCallback = React.lazy(
39186
- () => __vitePreload(() => import("./OAuthDebugCallback-BanjyQ_V.js"), true ? [] : void 0)
39636
+ () => __vitePreload(() => import("./OAuthDebugCallback-67pOP7RZ.js"), true ? [] : void 0)
39187
39637
  );
39188
39638
  return /* @__PURE__ */ jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading..." }), children: /* @__PURE__ */ jsxRuntimeExports.jsx(OAuthDebugCallback, { onConnect: onOAuthDebugConnect }) });
39189
39639
  }
@@ -39215,10 +39665,8 @@ const App = () => {
39215
39665
  setEnv,
39216
39666
  config,
39217
39667
  setConfig,
39218
- bearerToken,
39219
- setBearerToken,
39220
- headerName,
39221
- setHeaderName,
39668
+ customHeaders,
39669
+ setCustomHeaders,
39222
39670
  oauthClientId,
39223
39671
  setOauthClientId,
39224
39672
  oauthScope,