@mcp-use/inspector 20.0.0-beta.5 → 20.0.0-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/{AnimatePresence-Dcw-FOy8.js → AnimatePresence-D1bZ5_-l.js} +79 -78
- package/dist/cdn/{ChatTab-B255lH5i.js → ChatTab-DtUGK07C.js} +1628 -1561
- package/dist/cdn/CheckboxIndicator-BjF73mGX.js +252 -0
- package/dist/cdn/{ConnectionSettingsForm-DF-NS58d.js → ConnectionSettingsForm-CNuMa6jp.js} +202 -202
- package/dist/cdn/{ConnectionSettingsTab-dI-Cqe79.js → ConnectionSettingsTab-qSVQ1aIF.js} +36 -35
- package/dist/cdn/{ElicitationTab-CL1KJ0bz.js → ElicitationTab-PEmEDvC5.js} +47 -46
- package/dist/cdn/{FormContext-tmgN_Vdr.js → FormContext-NtUiZclE.js} +26 -26
- package/dist/cdn/{InspectorContext-UjtEbNod.js → InspectorContext-BBKCdfmK.js} +1 -1
- package/dist/cdn/{JSONDisplay-BFxf5oEu.js → JSONDisplay-BJqMz7Ny.js} +22 -22
- package/dist/cdn/{ListTabHeader-Cv-GmtGF.js → ListTabHeader-DzmTtN1e.js} +20 -19
- package/dist/cdn/{WidgetWrapper-B4H3Fek7.js → MCPAppsDebugControls-BpP-Ifap.js} +514 -550
- package/dist/cdn/{ManufactOAuthCallback-B98kSYCj.js → ManufactOAuthCallback-ChbbjFIT.js} +2 -2
- package/dist/cdn/{MarkdownRenderer-Ba7nA4Ie.js → MarkdownRenderer-bX1BrKgI.js} +23 -23
- package/dist/cdn/McpAppsViewPanel-jlsYQ7uS.js +56 -0
- package/dist/cdn/{NotificationsTab-CeImSrhx.js → NotificationsTab-B7uebqMV.js} +21 -21
- package/dist/cdn/{OAuthCallback-Blc2Asxc.js → OAuthCallback--NZdLoWx.js} +3 -3
- package/dist/cdn/PromptsTab-BlXDcau3.js +902 -0
- package/dist/cdn/{ResourcesTab-BGualKW-.js → ResourcesTab-D45_JojP.js} +116 -114
- package/dist/cdn/{SamplingTab-BeZBUeni.js → SamplingTab-r7tImM6L.js} +34 -33
- package/dist/cdn/{ServerMetadataTab-CvrKX8fz.js → ServerMetadataTab-BM3VhSLf.js} +9 -9
- package/dist/cdn/{StatusIcon-D0-ARyOh.js → StatusIcon-Q3n3YRtE.js} +10 -11
- package/dist/cdn/{ToolsTab-j6n4O_3s.js → ToolsTab-DOAO8HnS.js} +664 -652
- package/dist/cdn/{ViewPreview-DihyG6Qd.js → ViewPreview-CBhrVdwx.js} +3 -3
- package/dist/cdn/{WidgetDebugContext-D4usL_MA.js → WidgetDebugContext-B6yoOVVV.js} +1 -11
- package/dist/cdn/WidgetWrapper-BlbQAh_X.js +12 -0
- package/dist/cdn/{bell-CGjAO_0s.js → bell-GrTZcnD2.js} +1 -1
- package/dist/cdn/{browser-CbQIH4w2.js → browser-DG2Z8392.js} +1 -1
- package/dist/cdn/{brush-B_mKhyxG.js → brush-CelVvMGp.js} +1 -1
- package/dist/cdn/button-CB4uOoUV.js +2509 -0
- package/dist/cdn/card-BA-DQk-G.js +41 -0
- package/dist/cdn/{checkbox-By0FklhG.js → checkbox-kwVa4gRX.js} +7 -7
- package/dist/cdn/{clock-CmUbSx_B.js → clock-YMF8Gtw5.js} +1 -1
- package/dist/cdn/{code-V_0nf5rg.js → code-C8sN2OGR.js} +1 -1
- package/dist/cdn/{jsx-runtime-CIxvMpEo.js → createLucideIcon-BONxC1L5.js} +57 -24
- package/dist/cdn/{dialog-BsDpuJd3.js → dialog-CJGnC5Ag.js} +171 -171
- package/dist/cdn/{dist-DaMB0Su9.js → dist-CTJnCYmk.js} +1 -1
- package/dist/cdn/{dist-DbX5yidW.js → dist-SxRsB1iS.js} +5 -4
- package/dist/cdn/{external-link-CjmfT6rW.js → external-link-Bo4lQxr1.js} +1 -1
- package/dist/cdn/{eye-B7H96av8.js → eye-pSGG7nvf.js} +1 -1
- package/dist/cdn/{folder-open-B3lu2rG_.js → folder-open-aM8CPtBO.js} +1 -1
- package/dist/cdn/{hash-BVQnWi7q.js → hash-DDs2vE1k.js} +1 -1
- package/dist/cdn/{history-Csw4rb44.js → history-BfUFpL1d.js} +1 -1
- package/dist/cdn/{index-browser-DkQOzkvX.js → index-browser-Dm3R1Mfe.js} +1 -1
- package/dist/cdn/{info-CNiOwqkf.js → info-BMkB68mB.js} +1 -1
- package/dist/cdn/{input-C2OBd4PJ.js → input-BCpgLXU1.js} +2993 -5499
- package/dist/cdn/inspector.css +1 -1
- package/dist/cdn/inspector.js +7106 -7140
- package/dist/cdn/{label-B9Jmm9be.js → label-A0UGV8FE.js} +9 -9
- package/dist/cdn/{loader-circle-BLy9A_pp.js → loader-circle-BKRHJEB7.js} +1 -1
- package/dist/cdn/{maximize-2-CH5Lq90B.js → maximize-2-DdrB_spi.js} +1 -1
- package/dist/cdn/{maximize-BALCV_ep.js → maximize-hSOCz133.js} +1 -1
- package/dist/cdn/{message-square-BnxdpJxZ.js → message-square-D3tKB3uJ.js} +1 -1
- package/dist/cdn/{not-found-DEtSM_Wd.js → not-found-BajFyZpp.js} +9 -11
- package/dist/cdn/{play-vuZ5PLnI.js → play-B1leulYf.js} +1 -1
- package/dist/cdn/providerMeta-CjGU4rID.js +436 -0
- package/dist/cdn/{react-BajV-X4P.js → react-Bl-hSkvn.js} +628 -571
- package/dist/cdn/{refresh-cw-BXY-Pa0U.js → refresh-cw-CyvXrS91.js} +1 -1
- package/dist/cdn/{save-Tgil_AJZ.js → save-CmdEPUAm.js} +1 -1
- package/dist/cdn/{select-DDdiIPR2.js → select-CCFHjOGk.js} +808 -807
- package/dist/cdn/{servers-Dm72iTpY.js → servers-Dd0Vcp81.js} +5 -1
- package/dist/cdn/{shared-DaILIQPP.js → shared-CJVHJhag.js} +36 -36
- package/dist/cdn/{sheet-Br_l2kry.js → sheet-oyq1mIyg.js} +620 -619
- package/dist/cdn/{sparkles-BntO2rDR.js → sparkles-CxeZpVtX.js} +1 -1
- package/dist/cdn/spinner-Be1GlSGX.js +15 -0
- package/dist/cdn/{square-check-big-BvwQ17Bl.js → square-check-big-C_4wbfwF.js} +1 -1
- package/dist/cdn/{switch-C3IyQuid.js → switch-DHXEA_N5.js} +190 -189
- package/dist/cdn/{tabs-subtle-CkdI6Mac.js → tabs-subtle-Dubd6Kj8.js} +269 -268
- package/dist/cdn/{telemetry-DabTAQ8x.js → telemetry-TwPKZlFf.js} +2 -2
- package/dist/cdn/{textarea-DSbwcFVt.js → textarea-CwmI8_uI.js} +6 -6
- package/dist/cdn/{trash-2-RwpJY5SL.js → trash-2-BhumJAFE.js} +1 -1
- package/dist/cdn/{useAriaLabelledBy-DqAdnppm.js → useAriaLabelledBy-Cra6w3YY.js} +2 -1
- package/dist/cdn/{useCompositeItem-BRqEzYh-.js → useCompositeItem-Dhnm-7el.js} +3 -3
- package/dist/cdn/{useConfig-Btmh8wjJ.js → useConfig-leHVjdjl.js} +2 -2
- package/dist/cdn/{useSavedRequests-Ci2I919u.js → useSavedRequests-mSIsDd4c.js} +1 -1
- package/dist/cdn/{useViewHostProps-B6SKeeH9.js → useViewHostProps-CDOm2w6u.js} +124 -109
- package/dist/cdn/{wrench-DzGmCfnb.js → wrench-DvK20LUT.js} +1 -1
- package/dist/cdn/{x-C3vRQIYu.js → x-EilKPiCX.js} +1 -1
- package/dist/cdn/{zap-Mb-pbw2X.js → zap-0Wr9QO7N.js} +1 -1
- package/dist/cli.js +1 -1
- package/dist/client/components/ChatTab.d.ts.map +1 -1
- package/dist/client/components/MCPAppsDebugControls.d.ts.map +1 -1
- package/dist/client/components/ToolsTab.d.ts.map +1 -1
- package/dist/client/components/chat/ConfigurationDialog.d.ts.map +1 -1
- package/dist/client/components/chat/MessageList.d.ts +1 -0
- package/dist/client/components/chat/MessageList.d.ts.map +1 -1
- package/dist/client/components/chat/ToolResultRenderer.d.ts.map +1 -1
- package/dist/client/components/chat/partialToolArgs.d.ts +10 -0
- package/dist/client/components/chat/partialToolArgs.d.ts.map +1 -0
- package/dist/client/components/chat/types.d.ts +1 -0
- package/dist/client/components/chat/types.d.ts.map +1 -1
- package/dist/client/components/chat/useChatMessages.d.ts.map +1 -1
- package/dist/client/components/chat/useChatMessagesClientSide.d.ts.map +1 -1
- package/dist/client/components/mcp-apps/McpAppsViewPanel.d.ts +29 -0
- package/dist/client/components/mcp-apps/McpAppsViewPanel.d.ts.map +1 -0
- package/dist/client/components/tools/ToolExecutionPanel.d.ts.map +1 -1
- package/dist/client/components/tools/ToolResultDisplay.d.ts +2 -1
- package/dist/client/components/tools/ToolResultDisplay.d.ts.map +1 -1
- package/dist/client/components/tools/useToolsTabNavigation.d.ts.map +1 -1
- package/dist/client/components/ui/MeshGradientCanvas.d.ts.map +1 -1
- package/dist/client/components/ui/mesh-animation-pause.d.ts +14 -0
- package/dist/client/components/ui/mesh-animation-pause.d.ts.map +1 -0
- package/dist/client/components/ui/mesh-gradient-colors.d.ts +6 -0
- package/dist/client/components/ui/mesh-gradient-colors.d.ts.map +1 -0
- package/dist/client/components/ui/mesh-tab-background.d.ts +1 -1
- package/dist/client/components/ui/mesh-tab-background.d.ts.map +1 -1
- package/dist/client/components/ui/not-found.d.ts.map +1 -1
- package/dist/client/context/WidgetDebugContext.d.ts +1 -11
- package/dist/client/context/WidgetDebugContext.d.ts.map +1 -1
- package/dist/client/hooks/useDeviceViewport.d.ts +1 -5
- package/dist/client/hooks/useDeviceViewport.d.ts.map +1 -1
- package/dist/client/hooks/useViewHostProps.d.ts +1 -1
- package/dist/client/hooks/useViewHostProps.d.ts.map +1 -1
- package/dist/client/index.js +2238 -1935
- package/dist/client/utils/servers.d.ts +5 -0
- package/dist/client/utils/servers.d.ts.map +1 -1
- package/dist/server/cdn-shell.js +2 -2
- package/dist/server/{chunk-ZCGLU5T7.js → chunk-5GVQGIAX.js} +1 -1
- package/dist/server/{chunk-DSTNUYWX.js → chunk-UZZDBVKF.js} +1 -1
- package/dist/server/{chunk-SQ4XNMLT.js → chunk-VFVFLXKP.js} +1 -1
- package/dist/server/cli.js +2 -2
- package/dist/server/index.js +3 -3
- package/dist/server/middleware.js +3 -3
- package/dist/server/version.js +1 -1
- package/dist/web/assets/AnimatePresence-FfDQQNFJ.js +9 -0
- package/dist/web/assets/ChatTab-B6ubLbeA.js +18 -0
- package/dist/web/assets/ConnectionSettingsTab-Cb2eDgEu.js +1 -0
- package/dist/web/assets/ElicitationTab-CbnCrmu9.js +1 -0
- package/dist/web/assets/FormContext-sV-yByKz.js +1 -0
- package/dist/web/assets/ListTabHeader-CrGae306.js +1 -0
- package/dist/web/assets/MCPAppsDebugControls-sRglMhat.js +34 -0
- package/dist/web/assets/{ManufactOAuthCallback-CS3ydSZg.js → ManufactOAuthCallback-D4uYGigW.js} +1 -1
- package/dist/web/assets/{MarkdownRenderer-BeeBfQhv.js → MarkdownRenderer-Cwxp9fLj.js} +2 -2
- package/dist/web/assets/McpAppsViewPanel-jQYFoZNX.js +1 -0
- package/dist/web/assets/{NotificationsTab-Uj0_DrmK.js → NotificationsTab-DuSm762_.js} +1 -1
- package/dist/web/assets/{OAuthCallback-C0ljgCiw.js → OAuthCallback-VLHlUe2c.js} +1 -1
- package/dist/web/assets/PromptsTab-DK6XZxR8.js +15 -0
- package/dist/web/assets/ResourcesTab-CUE4MAtJ.js +2 -0
- package/dist/web/assets/SamplingTab-BYNkVCTu.js +1 -0
- package/dist/web/assets/ServerMetadataTab-DWjNFMbq.js +1 -0
- package/dist/web/assets/ToolsTab-BisWWY2p.js +8 -0
- package/dist/web/assets/{ViewPreview-Ba1Ec5uA.js → ViewPreview-COrmPpRr.js} +1 -1
- package/dist/web/assets/WidgetWrapper-cv_BM1bY.js +1 -0
- package/dist/web/assets/{brush--0LobUi4.js → brush-DX0UZ_pI.js} +1 -1
- package/dist/web/assets/button-C8Xa2k4x.js +1 -0
- package/dist/web/assets/checkbox-B6dtF73d.js +1 -0
- package/dist/web/assets/code-B14rVdNt.js +1 -0
- package/dist/web/assets/createLucideIcon-BEHeJH0M.js +1 -0
- package/dist/web/assets/{dist-C5JjLJN9.js → dist-9Oy7e0v8.js} +5 -5
- package/dist/web/assets/index-BMaSsizY.js +499 -0
- package/dist/web/assets/index-D7TVTIt9.css +1 -0
- package/dist/web/assets/input-C0OQCUZy.js +1 -0
- package/dist/web/assets/{label-Cdim77Jw.js → label-CI7JWQOo.js} +1 -1
- package/dist/web/assets/{maximize-2-BTT9QQU9.js → maximize-2-Br1WQzT2.js} +1 -1
- package/dist/web/assets/{maximize-_O55kFcr.js → maximize-CJNgRe6S.js} +1 -1
- package/dist/web/assets/{refresh-cw-C9wQl8_d.js → refresh-cw-B5iaAZKn.js} +1 -1
- package/dist/web/assets/{save-B-MsgxX9.js → save-TM6fvNrt.js} +1 -1
- package/dist/web/assets/select-D6jzbLJn.js +1 -0
- package/dist/web/assets/shared-CFs9CZfB.js +1 -0
- package/dist/web/assets/{sparkles-2OAsc1aP.js → sparkles-BGYTDThM.js} +1 -1
- package/dist/web/assets/tabs-subtle-D2XkWhLL.js +1 -0
- package/dist/web/assets/textarea-CRTXuRmE.js +1 -0
- package/dist/web/assets/{useConfig-BAgALiZg.js → useConfig-B6tXvJOb.js} +1 -1
- package/dist/web/assets/useViewHostProps-DZqOwiAm.js +1 -0
- package/dist/web/assets/{zap-Du2Uc5pa.js → zap-BDWHCVHU.js} +1 -1
- package/dist/web/index.html +10 -10
- package/package.json +4 -4
- package/dist/cdn/CheckboxIndicator-Bt4IICtv.js +0 -251
- package/dist/cdn/PromptsTab-BYKnY7Rp.js +0 -901
- package/dist/cdn/card-DgiYnSg-.js +0 -41
- package/dist/cdn/createLucideIcon-C5fZZ6oB.js +0 -38
- package/dist/cdn/providerMeta-BQIfHuNL.js +0 -379
- package/dist/cdn/spinner-jQtC7EBj.js +0 -15
- package/dist/web/assets/AnimatePresence-C5p0yiY1.js +0 -9
- package/dist/web/assets/ChatTab-BCobuZDc.js +0 -18
- package/dist/web/assets/ConnectionSettingsTab-BjGkLwVu.js +0 -1
- package/dist/web/assets/ElicitationTab-D3ZUKHND.js +0 -1
- package/dist/web/assets/FormContext-DH2caWKO.js +0 -1
- package/dist/web/assets/ListTabHeader-R17w_JsB.js +0 -1
- package/dist/web/assets/PromptsTab-Bns2u0G-.js +0 -15
- package/dist/web/assets/ResourcesTab-CO24312V.js +0 -2
- package/dist/web/assets/SamplingTab-7gtN7FwU.js +0 -1
- package/dist/web/assets/ServerMetadataTab-CQwqYSjL.js +0 -1
- package/dist/web/assets/ToolsTab-bDdRxI1b.js +0 -8
- package/dist/web/assets/WidgetWrapper-CYHfzrtb.js +0 -34
- package/dist/web/assets/checkbox-CzBkaNKa.js +0 -1
- package/dist/web/assets/code-tME-5H6D.js +0 -1
- package/dist/web/assets/createLucideIcon-B3b8EU0b.js +0 -1
- package/dist/web/assets/index-TQ5V7cM9.js +0 -492
- package/dist/web/assets/index-fBX3akc8.css +0 -1
- package/dist/web/assets/input-CLYhA7PK.js +0 -1
- package/dist/web/assets/jsx-runtime-Cjj9sGSy.js +0 -1
- package/dist/web/assets/select-CJ57-Bor.js +0 -1
- package/dist/web/assets/shared-BF0rJNdE.js +0 -1
- package/dist/web/assets/tabs-subtle-6D79T1xd.js +0 -1
- package/dist/web/assets/textarea-DLAmNVf_.js +0 -1
- package/dist/web/assets/useViewHostProps-BYitt_6K.js +0 -1
|
@@ -1,25 +1,27 @@
|
|
|
1
1
|
import { s as e, t } from "./react-BIs9pQ3H.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { t as
|
|
5
|
-
import {
|
|
6
|
-
import { t as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { t as
|
|
10
|
-
import { t as
|
|
11
|
-
import {
|
|
12
|
-
import { t as
|
|
13
|
-
import {
|
|
14
|
-
import { t as
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import { t as
|
|
2
|
+
import { f as n, sr as r } from "./input-BCpgLXU1.js";
|
|
3
|
+
import { n as i } from "./createLucideIcon-BONxC1L5.js";
|
|
4
|
+
import { t as a } from "./button-CB4uOoUV.js";
|
|
5
|
+
import { t as o } from "./AnimatePresence-D1bZ5_-l.js";
|
|
6
|
+
import { n as s, t as c } from "./MCPAppsDebugControls-BpP-Ifap.js";
|
|
7
|
+
import { t as l } from "./brush-CelVvMGp.js";
|
|
8
|
+
import { a as u, i as d, t as f } from "./browser-DG2Z8392.js";
|
|
9
|
+
import { n as p, t as m } from "./zap-0Wr9QO7N.js";
|
|
10
|
+
import { t as h } from "./clock-YMF8Gtw5.js";
|
|
11
|
+
import { t as g } from "./code-C8sN2OGR.js";
|
|
12
|
+
import { a as _, t as v } from "./JSONDisplay-BJqMz7Ny.js";
|
|
13
|
+
import { t as y } from "./folder-open-aM8CPtBO.js";
|
|
14
|
+
import { a as b, i as x, n as S, o as C, r as w, t as T } from "./shared-CJVHJhag.js";
|
|
15
|
+
import { t as E } from "./maximize-hSOCz133.js";
|
|
16
|
+
import { d as D, t as O } from "./telemetry-TwPKZlFf.js";
|
|
17
|
+
import { c as k, r as A, s as j } from "./react-Bl-hSkvn.js";
|
|
18
|
+
import { t as M } from "./spinner-Be1GlSGX.js";
|
|
19
|
+
import { n as N } from "./InspectorContext-BBKCdfmK.js";
|
|
20
|
+
import { t as P } from "./useConfig-leHVjdjl.js";
|
|
21
|
+
import { t as F } from "./useViewHostProps-CDOm2w6u.js";
|
|
22
|
+
import { t as I } from "./WidgetWrapper-BlbQAh_X.js";
|
|
21
23
|
//#region src/client/components/resources/ResourceResultDisplay.tsx
|
|
22
|
-
var L = /* @__PURE__ */ e(t(), 1), R =
|
|
24
|
+
var L = /* @__PURE__ */ e(t(), 1), R = i();
|
|
23
25
|
function z(e) {
|
|
24
26
|
if ("error" in e && e.error && typeof e.error == "string") return e.error;
|
|
25
27
|
if (!("isError" in e && e.isError)) return null;
|
|
@@ -30,54 +32,54 @@ function z(e) {
|
|
|
30
32
|
return "An error occurred";
|
|
31
33
|
}
|
|
32
34
|
function B({ serverId: e, viewId: t, resourceUri: n, toolOutput: r, toolMetadata: i, readResource: a, customProps: o, displayMode: s, onDisplayModeChange: c }) {
|
|
33
|
-
let
|
|
35
|
+
let l = (0, L.useMemo)(() => ({}), []), u = F({
|
|
34
36
|
serverId: e,
|
|
35
37
|
viewId: t,
|
|
36
38
|
resourceUri: n,
|
|
37
39
|
toolName: n,
|
|
38
|
-
toolInput:
|
|
40
|
+
toolInput: l,
|
|
39
41
|
toolOutput: r,
|
|
40
42
|
toolMetadata: i,
|
|
41
43
|
readResource: a,
|
|
42
44
|
displayMode: s,
|
|
43
45
|
onDisplayModeChange: c
|
|
44
46
|
});
|
|
45
|
-
if (!
|
|
47
|
+
if (!u) return /* @__PURE__ */ (0, R.jsx)(I, {
|
|
46
48
|
className: "w-full h-full min-h-[240px]",
|
|
47
|
-
children: /* @__PURE__ */ (0, R.jsx)(
|
|
49
|
+
children: /* @__PURE__ */ (0, R.jsx)(M, { className: "size-5" })
|
|
48
50
|
});
|
|
49
|
-
let
|
|
50
|
-
return /* @__PURE__ */ (0, R.jsx)(
|
|
51
|
+
let d = s === "inline" ? "w-full h-full flex items-center justify-center relative p-4 min-h-0" : "w-full h-full relative p-4", f = o ? JSON.stringify(o) : "no-custom-props";
|
|
52
|
+
return /* @__PURE__ */ (0, R.jsx)(I, {
|
|
51
53
|
className: "w-full h-full min-h-[240px]",
|
|
52
|
-
children: /* @__PURE__ */ (0, R.jsx)(
|
|
54
|
+
children: /* @__PURE__ */ (0, R.jsx)(A, {
|
|
53
55
|
viewId: t,
|
|
54
56
|
toolName: n,
|
|
55
|
-
toolInput:
|
|
57
|
+
toolInput: l,
|
|
56
58
|
toolOutput: r,
|
|
57
59
|
customProps: o,
|
|
58
|
-
className:
|
|
59
|
-
...
|
|
60
|
-
},
|
|
60
|
+
className: d,
|
|
61
|
+
...u
|
|
62
|
+
}, f)
|
|
61
63
|
});
|
|
62
64
|
}
|
|
63
|
-
function V({ result: e, isLoading: t, previewMode:
|
|
65
|
+
function V({ result: e, isLoading: t, previewMode: n, serverId: i, readResource: o, onTogglePreview: s, onCopy: f, onDownload: p, onFullscreen: y, isCopied: b = !1, selectedResource: x, llmConfig: S }) {
|
|
64
66
|
let [C, w] = (0, L.useState)(null), T = (0, L.useCallback)((e) => {
|
|
65
67
|
w(e);
|
|
66
|
-
}, []), [
|
|
68
|
+
}, []), [D, O] = (0, L.useState)("inline"), A = e?.result && "contents" in e.result && Array.isArray(e.result.contents) && e.result.contents[0]?._meta || {}, N = {
|
|
67
69
|
...e?.resourceAnnotations,
|
|
68
|
-
...
|
|
70
|
+
...A
|
|
69
71
|
}, P = (0, L.useMemo)(() => {
|
|
70
|
-
let e =
|
|
72
|
+
let e = N?.["mcp-use/propsSchema"];
|
|
71
73
|
if (!e) return [];
|
|
72
74
|
let t = e.def?.shape;
|
|
73
75
|
return t ? Object.entries(t).filter(([, e]) => {
|
|
74
76
|
let t = e?.def?.type ?? e?.type;
|
|
75
77
|
return t !== "optional" && t !== "default";
|
|
76
78
|
}).map(([e]) => e) : e.required ?? [];
|
|
77
|
-
}, [
|
|
79
|
+
}, [N]), F = k(N) ? "mcp-apps" : null, I = e?.result && "contents" in e.result && Array.isArray(e.result.contents) && e.result.contents.some((e) => j(e.mimeType)), V = N?.ui?.resourceUri || A?.ui?.resourceUri || (I ? e.uri : void 0), H = (F === "mcp-apps" || I) && !!V, U = P.length > 0 && !C;
|
|
78
80
|
if (t) return /* @__PURE__ */ (0, R.jsx)("div", {
|
|
79
81
|
className: "flex absolute left-0 top-0 items-center justify-center w-full h-full",
|
|
80
|
-
children: /* @__PURE__ */ (0, R.jsx)(
|
|
82
|
+
children: /* @__PURE__ */ (0, R.jsx)(M, { className: "size-5" })
|
|
81
83
|
});
|
|
82
84
|
if (!e) return /* @__PURE__ */ (0, R.jsxs)("div", {
|
|
83
85
|
className: "flex flex-col items-center justify-center h-full p-4 text-center",
|
|
@@ -111,7 +113,7 @@ function V({ result: e, isLoading: t, previewMode: r, serverId: a, readResource:
|
|
|
111
113
|
children: [
|
|
112
114
|
/* @__PURE__ */ (0, R.jsxs)("div", {
|
|
113
115
|
className: "flex items-center gap-1",
|
|
114
|
-
children: [/* @__PURE__ */ (0, R.jsx)(
|
|
116
|
+
children: [/* @__PURE__ */ (0, R.jsx)(h, { className: "h-3 w-3 text-gray-400" }), /* @__PURE__ */ (0, R.jsx)("span", {
|
|
115
117
|
className: "text-xs text-gray-500 dark:text-gray-400",
|
|
116
118
|
children: new Date(e.timestamp).toLocaleTimeString()
|
|
117
119
|
})]
|
|
@@ -120,13 +122,13 @@ function V({ result: e, isLoading: t, previewMode: r, serverId: a, readResource:
|
|
|
120
122
|
let t = e?.duration ?? e.result?.duration ?? e.result?.metrics?.durationMs;
|
|
121
123
|
return t === void 0 ? null : /* @__PURE__ */ (0, R.jsxs)("div", {
|
|
122
124
|
className: "flex items-center gap-1",
|
|
123
|
-
children: [/* @__PURE__ */ (0, R.jsx)(
|
|
125
|
+
children: [/* @__PURE__ */ (0, R.jsx)(m, { className: "h-3 w-3 text-gray-400" }), /* @__PURE__ */ (0, R.jsxs)("span", {
|
|
124
126
|
className: "text-xs text-gray-500 dark:text-gray-400",
|
|
125
127
|
children: [t, "ms"]
|
|
126
128
|
})]
|
|
127
129
|
});
|
|
128
130
|
})(),
|
|
129
|
-
H && /* @__PURE__ */ (0, R.jsx)(
|
|
131
|
+
H && /* @__PURE__ */ (0, R.jsx)(r, {
|
|
130
132
|
variant: "outline",
|
|
131
133
|
className: "text-xs bg-green-50 dark:bg-green-900/20 border-none border-green-200 dark:border-green-800/50 text-green-600 dark:text-green-400",
|
|
132
134
|
children: "MCP Apps"
|
|
@@ -135,47 +137,47 @@ function V({ result: e, isLoading: t, previewMode: r, serverId: a, readResource:
|
|
|
135
137
|
}), /* @__PURE__ */ (0, R.jsxs)("div", {
|
|
136
138
|
className: "flex items-center gap-1",
|
|
137
139
|
children: [
|
|
138
|
-
H && /* @__PURE__ */ (0, R.jsxs)(
|
|
140
|
+
H && /* @__PURE__ */ (0, R.jsxs)(a, {
|
|
139
141
|
variant: "ghost",
|
|
140
142
|
size: "sm",
|
|
141
|
-
onClick:
|
|
142
|
-
className:
|
|
143
|
-
children: [
|
|
143
|
+
onClick: s,
|
|
144
|
+
className: n ? "" : "text-purple-600 dark:text-purple-400",
|
|
145
|
+
children: [n ? /* @__PURE__ */ (0, R.jsx)(g, { className: "h-4 w-4 mr-1" }) : /* @__PURE__ */ (0, R.jsx)(l, { className: "h-4 w-4 mr-1" }), n ? "JSON" : "Preview"]
|
|
144
146
|
}),
|
|
145
|
-
/* @__PURE__ */ (0, R.jsx)(
|
|
147
|
+
/* @__PURE__ */ (0, R.jsx)(a, {
|
|
146
148
|
variant: "ghost",
|
|
147
149
|
size: "sm",
|
|
148
|
-
onClick:
|
|
149
|
-
children: b ? /* @__PURE__ */ (0, R.jsx)(
|
|
150
|
+
onClick: f,
|
|
151
|
+
children: b ? /* @__PURE__ */ (0, R.jsx)(u, { className: "h-4 w-4" }) : /* @__PURE__ */ (0, R.jsx)(d, { className: "h-4 w-4" })
|
|
150
152
|
}),
|
|
151
|
-
/* @__PURE__ */ (0, R.jsx)(
|
|
153
|
+
/* @__PURE__ */ (0, R.jsx)(a, {
|
|
152
154
|
variant: "ghost",
|
|
153
155
|
size: "sm",
|
|
154
156
|
onClick: p,
|
|
155
|
-
children: /* @__PURE__ */ (0, R.jsx)(
|
|
157
|
+
children: /* @__PURE__ */ (0, R.jsx)(_, { className: "h-4 w-4" })
|
|
156
158
|
}),
|
|
157
|
-
/* @__PURE__ */ (0, R.jsx)(
|
|
159
|
+
/* @__PURE__ */ (0, R.jsx)(a, {
|
|
158
160
|
variant: "ghost",
|
|
159
161
|
size: "sm",
|
|
160
|
-
onClick:
|
|
161
|
-
children: /* @__PURE__ */ (0, R.jsx)(
|
|
162
|
+
onClick: y,
|
|
163
|
+
children: /* @__PURE__ */ (0, R.jsx)(E, { className: "h-4 w-4" })
|
|
162
164
|
})
|
|
163
165
|
]
|
|
164
166
|
})]
|
|
165
167
|
}), /* @__PURE__ */ (0, R.jsx)("div", {
|
|
166
168
|
className: "flex-1 overflow-y-auto relative",
|
|
167
|
-
children: H &&
|
|
169
|
+
children: H && i && o && V ? n ? /* @__PURE__ */ (0, R.jsxs)("div", {
|
|
168
170
|
className: "flex flex-1 h-full relative flex-col min-h-0",
|
|
169
171
|
"data-testid": "resource-widget-preview",
|
|
170
172
|
children: [/* @__PURE__ */ (0, R.jsx)("div", {
|
|
171
173
|
className: "absolute top-2 right-2 z-10 flex items-center gap-2",
|
|
172
|
-
children: /* @__PURE__ */ (0, R.jsx)(
|
|
174
|
+
children: /* @__PURE__ */ (0, R.jsx)(c, {
|
|
173
175
|
toolCallId: `resource-${e.timestamp}`,
|
|
174
|
-
displayMode:
|
|
176
|
+
displayMode: D,
|
|
175
177
|
onDisplayModeChange: O,
|
|
176
178
|
propsContext: "resource",
|
|
177
179
|
resourceUri: e.uri,
|
|
178
|
-
resourceAnnotations:
|
|
180
|
+
resourceAnnotations: N,
|
|
179
181
|
llmConfig: S || null,
|
|
180
182
|
resource: x || null,
|
|
181
183
|
onPropsChange: T,
|
|
@@ -188,27 +190,27 @@ function V({ result: e, isLoading: t, previewMode: r, serverId: a, readResource:
|
|
|
188
190
|
children: "This widget requires props, set or generate them in the props debugger"
|
|
189
191
|
})
|
|
190
192
|
}) : /* @__PURE__ */ (0, R.jsx)(B, {
|
|
191
|
-
serverId:
|
|
193
|
+
serverId: i,
|
|
192
194
|
viewId: `resource-${e.timestamp}`,
|
|
193
195
|
resourceUri: V,
|
|
194
196
|
toolOutput: e.result,
|
|
195
|
-
toolMetadata:
|
|
197
|
+
toolMetadata: N,
|
|
196
198
|
readResource: o,
|
|
197
199
|
customProps: C || void 0,
|
|
198
|
-
displayMode:
|
|
200
|
+
displayMode: D,
|
|
199
201
|
onDisplayModeChange: O
|
|
200
202
|
})]
|
|
201
203
|
}) : /* @__PURE__ */ (0, R.jsx)("div", {
|
|
202
204
|
className: "px-4 pt-4",
|
|
203
205
|
"data-testid": "resource-result-json",
|
|
204
|
-
children: /* @__PURE__ */ (0, R.jsx)(
|
|
206
|
+
children: /* @__PURE__ */ (0, R.jsx)(v, {
|
|
205
207
|
data: e.result,
|
|
206
208
|
filename: `resource-${e.uri.replace(/[^a-zA-Z0-9]/g, "-")}-mcp-apps-${Date.now()}.json`
|
|
207
209
|
})
|
|
208
210
|
}) : /* @__PURE__ */ (0, R.jsx)("div", {
|
|
209
211
|
className: "px-4 pt-4",
|
|
210
212
|
"data-testid": "resource-result-json",
|
|
211
|
-
children: /* @__PURE__ */ (0, R.jsx)(
|
|
213
|
+
children: /* @__PURE__ */ (0, R.jsx)(v, {
|
|
212
214
|
data: e.result,
|
|
213
215
|
filename: `resource-${e.uri.replace(/[^a-zA-Z0-9]/g, "-")}-${Date.now()}.json`
|
|
214
216
|
})
|
|
@@ -221,7 +223,7 @@ function V({ result: e, isLoading: t, previewMode: r, serverId: a, readResource:
|
|
|
221
223
|
function H({ resources: e, selectedResource: t, onResourceSelect: n, focusedIndex: r }) {
|
|
222
224
|
return e.length === 0 ? /* @__PURE__ */ (0, R.jsxs)("div", {
|
|
223
225
|
className: "flex flex-1 flex-col items-center justify-center p-4 text-center",
|
|
224
|
-
children: [/* @__PURE__ */ (0, R.jsx)(
|
|
226
|
+
children: [/* @__PURE__ */ (0, R.jsx)(s, { className: "h-12 w-12 text-gray-400 dark:text-gray-600 mb-3" }), /* @__PURE__ */ (0, R.jsx)("p", {
|
|
225
227
|
className: "text-gray-500 dark:text-gray-400",
|
|
226
228
|
children: "No resources available"
|
|
227
229
|
})]
|
|
@@ -230,7 +232,7 @@ function H({ resources: e, selectedResource: t, onResourceSelect: n, focusedInde
|
|
|
230
232
|
className: "font-mono",
|
|
231
233
|
children: e.mimeType
|
|
232
234
|
}, "mime")].filter(Boolean);
|
|
233
|
-
return /* @__PURE__ */ (0, R.jsx)(
|
|
235
|
+
return /* @__PURE__ */ (0, R.jsx)(w, {
|
|
234
236
|
id: `resource-${e.uri}`,
|
|
235
237
|
"data-testid": `resource-item-${e.name}`,
|
|
236
238
|
isSelected: t?.uri === e.uri,
|
|
@@ -249,16 +251,16 @@ function H({ resources: e, selectedResource: t, onResourceSelect: n, focusedInde
|
|
|
249
251
|
}
|
|
250
252
|
//#endregion
|
|
251
253
|
//#region src/client/components/ResourcesTab.tsx
|
|
252
|
-
function U({ ref: e, resources: t, readResource:
|
|
253
|
-
let [u, d] = (0, L.useState)(!1), [
|
|
254
|
+
function U({ ref: e, resources: t, readResource: r, serverId: i, isConnected: s, mcpServerUrl: c, refreshResources: l }) {
|
|
255
|
+
let [u, d] = (0, L.useState)(!1), [m, h] = (0, L.useState)(null), { selectedResourceUri: g, setSelectedResourceUri: _ } = N(), { llmConfig: v } = P({ mcpServerUrl: c }), [w, E] = (0, L.useState)(null), [k, A] = (0, L.useState)(!1), [j, M] = (0, L.useState)(""), [F] = (0, L.useState)("resources"), [I, z] = (0, L.useState)(!0), [B, U] = (0, L.useState)(!1), [W, G] = (0, L.useState)(-1), [K, q] = (0, L.useState)(!1), J = (0, L.useRef)(null), Y = (0, L.useRef)(null), [ee, te] = (0, L.useState)(!1), [X, Z] = (0, L.useState)("list");
|
|
254
256
|
(0, L.useEffect)(() => {
|
|
255
257
|
let e = () => {
|
|
256
258
|
te(window.innerWidth < 1024);
|
|
257
259
|
};
|
|
258
260
|
return e(), window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
|
|
259
261
|
}, []), (0, L.useEffect)(() => {
|
|
260
|
-
Z(
|
|
261
|
-
}, [
|
|
262
|
+
Z(m ? "detail" : "list");
|
|
263
|
+
}, [m]), (0, L.useImperativeHandle)(e, () => ({
|
|
262
264
|
focusSearch: () => {
|
|
263
265
|
U(!0), setTimeout(() => {
|
|
264
266
|
J.current && J.current.focus();
|
|
@@ -290,14 +292,14 @@ function U({ ref: e, resources: t, readResource: n, serverId: a, isConnected: s,
|
|
|
290
292
|
A(!0);
|
|
291
293
|
let t = Date.now();
|
|
292
294
|
try {
|
|
293
|
-
let
|
|
294
|
-
|
|
295
|
+
let n = await r(e.uri);
|
|
296
|
+
O(new D({
|
|
295
297
|
resourceUri: e.uri,
|
|
296
|
-
serverId:
|
|
298
|
+
serverId: i,
|
|
297
299
|
success: !0
|
|
298
|
-
})).catch(() => {}),
|
|
300
|
+
})).catch(() => {}), E({
|
|
299
301
|
uri: e.uri,
|
|
300
|
-
result:
|
|
302
|
+
result: n,
|
|
301
303
|
timestamp: t,
|
|
302
304
|
resourceAnnotations: {
|
|
303
305
|
...e.annotations,
|
|
@@ -305,12 +307,12 @@ function U({ ref: e, resources: t, readResource: n, serverId: a, isConnected: s,
|
|
|
305
307
|
}
|
|
306
308
|
});
|
|
307
309
|
} catch (n) {
|
|
308
|
-
|
|
310
|
+
O(new D({
|
|
309
311
|
resourceUri: e.uri,
|
|
310
|
-
serverId:
|
|
312
|
+
serverId: i,
|
|
311
313
|
success: !1,
|
|
312
314
|
error: n instanceof Error ? n.message : "Unknown error"
|
|
313
|
-
})).catch(() => {}),
|
|
315
|
+
})).catch(() => {}), E({
|
|
314
316
|
uri: e.uri,
|
|
315
317
|
result: {
|
|
316
318
|
contents: [],
|
|
@@ -328,13 +330,13 @@ function U({ ref: e, resources: t, readResource: n, serverId: a, isConnected: s,
|
|
|
328
330
|
}
|
|
329
331
|
}
|
|
330
332
|
}, [
|
|
331
|
-
|
|
332
|
-
|
|
333
|
+
r,
|
|
334
|
+
i,
|
|
333
335
|
s
|
|
334
336
|
]);
|
|
335
337
|
(0, L.useEffect)(() => {
|
|
336
338
|
G(-1);
|
|
337
|
-
}, [j,
|
|
339
|
+
}, [j, F]), (0, L.useEffect)(() => {
|
|
338
340
|
let e = (e) => {
|
|
339
341
|
let t = e.target;
|
|
340
342
|
if (t.tagName === "INPUT" || t.tagName === "TEXTAREA" || t.contentEditable === "true" || e.metaKey || e.ctrlKey || e.altKey) return;
|
|
@@ -369,7 +371,7 @@ function U({ ref: e, resources: t, readResource: n, serverId: a, isConnected: s,
|
|
|
369
371
|
}, [W, Q]), (0, L.useEffect)(() => {
|
|
370
372
|
if (g && t.length > 0) {
|
|
371
373
|
let e = t.find((e) => e.uri === g);
|
|
372
|
-
e &&
|
|
374
|
+
e && m?.uri !== e.uri && (_(null), setTimeout(() => {
|
|
373
375
|
$(e);
|
|
374
376
|
let t = document.getElementById(`resource-${e.uri}`);
|
|
375
377
|
t && t.scrollIntoView({
|
|
@@ -381,29 +383,29 @@ function U({ ref: e, resources: t, readResource: n, serverId: a, isConnected: s,
|
|
|
381
383
|
}, [
|
|
382
384
|
g,
|
|
383
385
|
t,
|
|
384
|
-
|
|
386
|
+
m,
|
|
385
387
|
$,
|
|
386
388
|
_
|
|
387
389
|
]), (0, L.useEffect)(() => {
|
|
388
|
-
if (
|
|
389
|
-
let e = t.find((e) => e.uri ===
|
|
390
|
-
e && e !==
|
|
390
|
+
if (m) {
|
|
391
|
+
let e = t.find((e) => e.uri === m.uri);
|
|
392
|
+
e && e !== m && (e.description !== m.description || e.mimeType !== m.mimeType || e.name !== m.name) && h(e);
|
|
391
393
|
}
|
|
392
|
-
}, [t,
|
|
394
|
+
}, [t, m]);
|
|
393
395
|
let ie = (0, L.useCallback)(async () => {
|
|
394
|
-
if (
|
|
395
|
-
await
|
|
396
|
+
if (w) try {
|
|
397
|
+
await f(JSON.stringify(w.result, null, 2)), q(!0), setTimeout(() => q(!1), 2e3);
|
|
396
398
|
} catch (e) {
|
|
397
399
|
console.error("[ResourcesTab] Failed to copy result:", e);
|
|
398
400
|
}
|
|
399
|
-
}, [
|
|
400
|
-
if (
|
|
401
|
-
let e = new globalThis.Blob([JSON.stringify(
|
|
401
|
+
}, [w]), ae = (0, L.useCallback)(() => {
|
|
402
|
+
if (w) try {
|
|
403
|
+
let e = new globalThis.Blob([JSON.stringify(w.result, null, 2)], { type: "application/json" }), t = URL.createObjectURL(e), n = document.createElement("a");
|
|
402
404
|
n.href = t, n.download = `resource-${Date.now()}.json`, document.body.appendChild(n), n.click(), document.body.removeChild(n), URL.revokeObjectURL(t);
|
|
403
405
|
} catch (e) {
|
|
404
406
|
console.error("[ResourcesTab] Failed to download result:", e);
|
|
405
407
|
}
|
|
406
|
-
}, [
|
|
408
|
+
}, [w]), oe = (0, L.useCallback)(async () => {
|
|
407
409
|
if (Y.current) try {
|
|
408
410
|
document.fullscreenElement ? await document.exitFullscreen() : await Y.current.requestFullscreen();
|
|
409
411
|
} catch (e) {
|
|
@@ -414,14 +416,14 @@ function U({ ref: e, resources: t, readResource: n, serverId: a, isConnected: s,
|
|
|
414
416
|
className: "h-full flex flex-col overflow-hidden relative bg-background",
|
|
415
417
|
children: [X !== "list" && /* @__PURE__ */ (0, R.jsxs)("div", {
|
|
416
418
|
className: "flex items-center gap-2 p-2 border-b shrink-0 bg-background z-10",
|
|
417
|
-
children: [/* @__PURE__ */ (0, R.jsx)(
|
|
419
|
+
children: [/* @__PURE__ */ (0, R.jsx)(a, {
|
|
418
420
|
variant: "ghost",
|
|
419
421
|
size: "sm",
|
|
420
422
|
onClick: () => {
|
|
421
423
|
h(null), Z("list");
|
|
422
424
|
},
|
|
423
425
|
className: "p-0 h-8 w-8",
|
|
424
|
-
children: /* @__PURE__ */ (0, R.jsx)(
|
|
426
|
+
children: /* @__PURE__ */ (0, R.jsx)(p, { className: "h-4 w-4" })
|
|
425
427
|
}), /* @__PURE__ */ (0, R.jsxs)("div", {
|
|
426
428
|
className: "flex items-center text-sm font-medium",
|
|
427
429
|
children: [/* @__PURE__ */ (0, R.jsx)("button", {
|
|
@@ -443,7 +445,7 @@ function U({ ref: e, resources: t, readResource: n, serverId: a, isConnected: s,
|
|
|
443
445
|
children: /* @__PURE__ */ (0, R.jsxs)(o, {
|
|
444
446
|
initial: !1,
|
|
445
447
|
mode: "popLayout",
|
|
446
|
-
children: [X === "list" && /* @__PURE__ */ (0, R.jsx)(
|
|
448
|
+
children: [X === "list" && /* @__PURE__ */ (0, R.jsx)(n.div, {
|
|
447
449
|
initial: { x: "-100%" },
|
|
448
450
|
animate: { x: 0 },
|
|
449
451
|
exit: { x: "-100%" },
|
|
@@ -453,10 +455,10 @@ function U({ ref: e, resources: t, readResource: n, serverId: a, isConnected: s,
|
|
|
453
455
|
damping: 30
|
|
454
456
|
},
|
|
455
457
|
className: "absolute inset-0 flex flex-col bg-background z-0",
|
|
456
|
-
children: /* @__PURE__ */ (0, R.jsx)(
|
|
458
|
+
children: /* @__PURE__ */ (0, R.jsx)(S, { children: (e) => /* @__PURE__ */ (0, R.jsxs)(R.Fragment, { children: [/* @__PURE__ */ (0, R.jsx)(T, {
|
|
457
459
|
isScrolled: e,
|
|
458
460
|
title: "Resources",
|
|
459
|
-
icon:
|
|
461
|
+
icon: y,
|
|
460
462
|
count: Q.length,
|
|
461
463
|
isSearchExpanded: B,
|
|
462
464
|
searchQuery: j,
|
|
@@ -469,11 +471,11 @@ function U({ ref: e, resources: t, readResource: n, serverId: a, isConnected: s,
|
|
|
469
471
|
isRefreshing: u
|
|
470
472
|
}), /* @__PURE__ */ (0, R.jsx)(H, {
|
|
471
473
|
resources: Q,
|
|
472
|
-
selectedResource:
|
|
474
|
+
selectedResource: m,
|
|
473
475
|
onResourceSelect: $,
|
|
474
476
|
focusedIndex: W
|
|
475
477
|
})] }) })
|
|
476
|
-
}, "list"), X === "detail" && /* @__PURE__ */ (0, R.jsx)(
|
|
478
|
+
}, "list"), X === "detail" && /* @__PURE__ */ (0, R.jsx)(n.div, {
|
|
477
479
|
initial: { x: "100%" },
|
|
478
480
|
animate: { x: 0 },
|
|
479
481
|
exit: { x: "100%" },
|
|
@@ -487,35 +489,35 @@ function U({ ref: e, resources: t, readResource: n, serverId: a, isConnected: s,
|
|
|
487
489
|
ref: Y,
|
|
488
490
|
className: "h-full",
|
|
489
491
|
children: /* @__PURE__ */ (0, R.jsx)(V, {
|
|
490
|
-
result:
|
|
491
|
-
isLoading:
|
|
492
|
+
result: w,
|
|
493
|
+
isLoading: k,
|
|
492
494
|
previewMode: I,
|
|
493
|
-
serverId:
|
|
494
|
-
readResource:
|
|
495
|
+
serverId: i,
|
|
496
|
+
readResource: r,
|
|
495
497
|
onTogglePreview: () => z(!I),
|
|
496
498
|
onCopy: ie,
|
|
497
499
|
onDownload: ae,
|
|
498
500
|
onFullscreen: oe,
|
|
499
501
|
isCopied: K,
|
|
500
|
-
selectedResource:
|
|
502
|
+
selectedResource: m,
|
|
501
503
|
llmConfig: v
|
|
502
504
|
})
|
|
503
505
|
})
|
|
504
506
|
}, "detail")]
|
|
505
507
|
})
|
|
506
508
|
})]
|
|
507
|
-
}) : /* @__PURE__ */ (0, R.jsxs)(
|
|
509
|
+
}) : /* @__PURE__ */ (0, R.jsxs)(C, {
|
|
508
510
|
orientation: "horizontal",
|
|
509
511
|
className: "h-full",
|
|
510
512
|
children: [
|
|
511
|
-
/* @__PURE__ */ (0, R.jsx)(
|
|
513
|
+
/* @__PURE__ */ (0, R.jsx)(b, {
|
|
512
514
|
defaultSize: "33%",
|
|
513
515
|
children: /* @__PURE__ */ (0, R.jsx)("div", {
|
|
514
516
|
className: "flex h-full flex-col overflow-hidden border-r dark:border-zinc-700",
|
|
515
|
-
children: /* @__PURE__ */ (0, R.jsx)(
|
|
517
|
+
children: /* @__PURE__ */ (0, R.jsx)(S, { children: (e) => /* @__PURE__ */ (0, R.jsxs)(R.Fragment, { children: [/* @__PURE__ */ (0, R.jsx)(T, {
|
|
516
518
|
isScrolled: e,
|
|
517
519
|
title: "Resources",
|
|
518
|
-
icon:
|
|
520
|
+
icon: y,
|
|
519
521
|
count: Q.length,
|
|
520
522
|
isSearchExpanded: B,
|
|
521
523
|
searchQuery: j,
|
|
@@ -528,30 +530,30 @@ function U({ ref: e, resources: t, readResource: n, serverId: a, isConnected: s,
|
|
|
528
530
|
isRefreshing: u
|
|
529
531
|
}), /* @__PURE__ */ (0, R.jsx)(H, {
|
|
530
532
|
resources: Q,
|
|
531
|
-
selectedResource:
|
|
533
|
+
selectedResource: m,
|
|
532
534
|
onResourceSelect: $,
|
|
533
535
|
focusedIndex: W
|
|
534
536
|
})] }) })
|
|
535
537
|
})
|
|
536
538
|
}),
|
|
537
|
-
/* @__PURE__ */ (0, R.jsx)(
|
|
538
|
-
/* @__PURE__ */ (0, R.jsx)(
|
|
539
|
+
/* @__PURE__ */ (0, R.jsx)(x, {}),
|
|
540
|
+
/* @__PURE__ */ (0, R.jsx)(b, {
|
|
539
541
|
defaultSize: "67%",
|
|
540
542
|
children: /* @__PURE__ */ (0, R.jsx)("div", {
|
|
541
543
|
ref: Y,
|
|
542
544
|
className: "h-full bg-white dark:bg-zinc-900",
|
|
543
545
|
children: /* @__PURE__ */ (0, R.jsx)(V, {
|
|
544
|
-
result:
|
|
545
|
-
isLoading:
|
|
546
|
+
result: w,
|
|
547
|
+
isLoading: k,
|
|
546
548
|
previewMode: I,
|
|
547
|
-
serverId:
|
|
548
|
-
readResource:
|
|
549
|
+
serverId: i,
|
|
550
|
+
readResource: r,
|
|
549
551
|
onTogglePreview: () => z(!I),
|
|
550
552
|
onCopy: ie,
|
|
551
553
|
onDownload: ae,
|
|
552
554
|
onFullscreen: oe,
|
|
553
555
|
isCopied: K,
|
|
554
|
-
selectedResource:
|
|
556
|
+
selectedResource: m,
|
|
555
557
|
llmConfig: v
|
|
556
558
|
})
|
|
557
559
|
})
|