@mcp-use/inspector 20.0.0-beta.1 → 20.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/dist/cdn/{AnimatePresence-B4HhIdgq.js → AnimatePresence-Dcw-FOy8.js} +50 -50
- package/dist/cdn/ChatTab-BS5Tlm2y.js +6744 -0
- package/dist/cdn/{CheckboxIndicator-BF2cKfbA.js → CheckboxIndicator-Bt4IICtv.js} +77 -77
- package/dist/cdn/{ConnectionSettingsForm-BNS6bOMD.js → ConnectionSettingsForm-BFsZpwK4.js} +348 -292
- package/dist/cdn/ConnectionSettingsTab-DDk06dhT.js +150 -0
- package/dist/cdn/{ElicitationTab-upPXq2q7.js → ElicitationTab-CL1KJ0bz.js} +39 -39
- package/dist/cdn/{FormContext-Cl51-7O7.js → FormContext-tmgN_Vdr.js} +1 -1
- package/dist/cdn/{InspectorContext-DzXtgyTx.js → InspectorContext-UjtEbNod.js} +1 -21
- package/dist/cdn/{JSONDisplay-D3RcyO9z.js → JSONDisplay-BFxf5oEu.js} +18 -18
- package/dist/cdn/{ListTabHeader-8lULn-90.js → ListTabHeader-Cv-GmtGF.js} +19 -19
- package/dist/cdn/{ManufactOAuthCallback-DEM8mhWD.js → ManufactOAuthCallback-B98kSYCj.js} +1 -1
- package/dist/cdn/MarkdownRenderer-_aYcof42.js +3610 -0
- package/dist/cdn/{NotificationsTab-CWopTIzT.js → NotificationsTab-CeImSrhx.js} +13 -13
- package/dist/cdn/{OAuthCallback-k3oeLtIC.js → OAuthCallback-C4n2hqKU.js} +1 -1
- package/dist/cdn/PromptsTab-BajHFLa3.js +901 -0
- package/dist/cdn/{ResourcesTab-KfamsM6-.js → ResourcesTab-BgeMlTdR.js} +35 -55
- package/dist/cdn/{SamplingTab-vcufuK24.js → SamplingTab-CnJB229N.js} +35 -35
- package/dist/cdn/{ServerMetadataTab-DS0eiyyD.js → ServerMetadataTab-CvrKX8fz.js} +12 -12
- package/dist/cdn/{StatusIcon-BGXOEU2u.js → StatusIcon-D0-ARyOh.js} +6 -6
- package/dist/cdn/{ToolsTab-DRjcZnpu.js → ToolsTab-ACLxPxR6.js} +103 -137
- package/dist/cdn/{ViewPreview-B_onhcUB.js → ViewPreview-DsPwZAwO.js} +2 -2
- package/dist/cdn/{WidgetWrapper-D29YDxIu.js → WidgetWrapper-CwlpDv17.js} +529 -530
- package/dist/cdn/card-DgiYnSg-.js +41 -0
- package/dist/cdn/{checkbox-B4oUG6Rr.js → checkbox-By0FklhG.js} +6 -6
- package/dist/cdn/{dialog-Dnl-pZsY.js → dialog-BsDpuJd3.js} +151 -151
- package/dist/cdn/{dist-mRDqCgKU.js → dist-B0eL32Gb.js} +114 -113
- package/dist/cdn/{dist-DjXr_YO3.js → dist-DaMB0Su9.js} +1 -1
- package/dist/cdn/{index-browser-CVUwR-Bu.js → index-browser-QDjRGsPo.js} +1 -1
- package/dist/cdn/{input-BLxOA7V-.js → input-C2OBd4PJ.js} +4787 -2842
- package/dist/cdn/inspector.css +1 -1
- package/dist/cdn/inspector.js +7419 -7445
- package/dist/cdn/{label-CBvG613A.js → label-B9Jmm9be.js} +10 -10
- package/dist/cdn/{manufact-auth-0TVxpeTA.js → manufact-auth-BQMHhbLV.js} +142 -106
- package/dist/cdn/{not-found-BcNNsTjS.js → not-found-DEtSM_Wd.js} +7 -7
- package/dist/cdn/providerMeta-BQIfHuNL.js +379 -0
- package/dist/cdn/{react-BxO-uEDZ.js → react-Dn8PWXwP.js} +1 -1
- package/dist/cdn/{select-BZ_IoKxg.js → select-DDdiIPR2.js} +726 -726
- package/dist/cdn/{shared-uMiV6Fx1.js → shared-DaILIQPP.js} +29 -29
- package/dist/cdn/{popover-C_SSrXT0.js → sheet-Br_l2kry.js} +694 -622
- package/dist/cdn/{spinner-CWcJhIY_.js → spinner-jQtC7EBj.js} +5 -5
- package/dist/cdn/{switch-DtQOLb9R.js → switch-C3IyQuid.js} +104 -104
- package/dist/cdn/{tabs-subtle-C5cy35sY.js → tabs-subtle-CkdI6Mac.js} +147 -147
- package/dist/cdn/{telemetry-Ct6pVkM1.js → telemetry-gHF-tMli.js} +3 -3
- package/dist/cdn/{textarea-Bj-CT7hC.js → textarea-DSbwcFVt.js} +6 -6
- package/dist/cdn/{useAriaLabelledBy-Bm9qHGK6.js → useAriaLabelledBy-DqAdnppm.js} +1 -1
- package/dist/cdn/{useCompositeItem-CNJ6MXdi.js → useCompositeItem-BRqEzYh-.js} +2 -2
- package/dist/cdn/{useConfig-CwxZ6Quj.js → useConfig-BWcNCqwi.js} +73 -46
- package/dist/cdn/{useViewHostProps-Dr6W2ooF.js → useViewHostProps-DIIlz3tJ.js} +1 -1
- package/dist/cli.js +27 -13
- package/dist/client/auth/manufact-auth.d.ts +3 -1
- package/dist/client/auth/manufact-auth.d.ts.map +1 -1
- package/dist/client/components/ChatTab.d.ts +1 -8
- package/dist/client/components/ChatTab.d.ts.map +1 -1
- package/dist/client/components/ResourcesTab.d.ts.map +1 -1
- package/dist/client/components/chat/ChatHeader.d.ts +7 -2
- package/dist/client/components/chat/ChatHeader.d.ts.map +1 -1
- package/dist/client/components/chat/ChatLandingForm.d.ts +4 -2
- package/dist/client/components/chat/ChatLandingForm.d.ts.map +1 -1
- package/dist/client/components/chat/ChatManagedNotice.d.ts +10 -0
- package/dist/client/components/chat/ChatManagedNotice.d.ts.map +1 -0
- package/dist/client/components/chat/ChatScrollTopFade.d.ts +7 -0
- package/dist/client/components/chat/ChatScrollTopFade.d.ts.map +1 -0
- package/dist/client/components/chat/ConfigurationDialog.d.ts +11 -9
- package/dist/client/components/chat/ConfigurationDialog.d.ts.map +1 -1
- package/dist/client/components/chat/ConfigureEmptyState.d.ts +1 -6
- package/dist/client/components/chat/ConfigureEmptyState.d.ts.map +1 -1
- package/dist/client/components/chat/StreamingAssistantContent.d.ts.map +1 -1
- package/dist/client/components/chat/chatModeStorage.d.ts +11 -0
- package/dist/client/components/chat/chatModeStorage.d.ts.map +1 -0
- package/dist/client/components/chat/managedChatNotice.d.ts +16 -0
- package/dist/client/components/chat/managedChatNotice.d.ts.map +1 -0
- package/dist/client/components/chat/providerMeta.d.ts +11 -0
- package/dist/client/components/chat/providerMeta.d.ts.map +1 -1
- package/dist/client/components/chat/useChatMessages.d.ts +7 -5
- package/dist/client/components/chat/useChatMessages.d.ts.map +1 -1
- package/dist/client/components/chat/useChatMessagesClientSide.d.ts +4 -6
- package/dist/client/components/chat/useChatMessagesClientSide.d.ts.map +1 -1
- package/dist/client/components/chat/useChatScrollToBottom.d.ts +1 -0
- package/dist/client/components/chat/useChatScrollToBottom.d.ts.map +1 -1
- package/dist/client/components/chat/useConfig.d.ts +1 -1
- package/dist/client/components/chat/useConfig.d.ts.map +1 -1
- package/dist/client/components/chat/useHostedChatMode.d.ts +1 -1
- package/dist/client/components/chat/useHostedChatMode.d.ts.map +1 -1
- package/dist/client/components/shared/MarkdownRenderer.d.ts +2 -1
- package/dist/client/components/shared/MarkdownRenderer.d.ts.map +1 -1
- package/dist/client/components/tools/useToolsTabNavigation.d.ts.map +1 -1
- package/dist/client/components/ui/MeshGradientCanvas.d.ts +13 -0
- package/dist/client/components/ui/MeshGradientCanvas.d.ts.map +1 -0
- package/dist/client/components/ui/chat-message.d.ts +1 -1
- package/dist/client/components/ui/chat-message.d.ts.map +1 -1
- package/dist/client/components/ui/file-thumbnail.d.ts.map +1 -1
- package/dist/client/components/ui/mesh-tab-background.d.ts +3 -1
- package/dist/client/components/ui/mesh-tab-background.d.ts.map +1 -1
- package/dist/client/context/InspectorContext.d.ts.map +1 -1
- package/dist/client/index.js +2577 -2165
- package/dist/client/telemetry/utils.d.ts.map +1 -1
- package/dist/server/asset-urls.d.ts +4 -0
- package/dist/server/asset-urls.d.ts.map +1 -1
- package/dist/server/asset-urls.js +7 -3
- package/dist/server/cdn-shell.d.ts.map +1 -1
- package/dist/server/cdn-shell.js +3 -3
- package/dist/server/{chunk-KBVKS4J5.js → chunk-H6ZCIKBS.js} +10 -0
- package/dist/server/{chunk-Y2GBQOQW.js → chunk-H7UBATRR.js} +2 -9
- package/dist/server/{chunk-VDUV6LR6.js → chunk-HGPQON3P.js} +15 -4
- package/dist/server/{chunk-K2V2SDQD.js → chunk-OWR2BIBW.js} +1 -1
- package/dist/server/{chunk-5B3SXGZP.js → chunk-UJLXHNQP.js} +1 -1
- package/dist/server/{chunk-IXYK6ZOY.js → chunk-W3PVQLOP.js} +2 -2
- package/dist/server/{chunk-6XWDZEFF.js → chunk-XCNS5CIW.js} +8 -3
- package/dist/server/cli.js +5 -5
- package/dist/server/create-dev-api-app.js +3 -3
- package/dist/server/dev-callback-redirect.d.ts +3 -0
- package/dist/server/dev-callback-redirect.d.ts.map +1 -0
- package/dist/server/dev-callback-redirect.js +18 -0
- package/dist/server/index.js +6 -6
- package/dist/server/middleware.js +6 -6
- package/dist/server/proxy/index.js +1 -1
- package/dist/server/proxy/mcp-proxy.d.ts +2 -0
- package/dist/server/proxy/mcp-proxy.d.ts.map +1 -1
- package/dist/server/proxy/mcp-proxy.js +3 -1
- package/dist/server/proxy-routes.js +2 -2
- package/dist/server/server.js +3 -3
- package/dist/server/version.js +1 -1
- package/dist/server/vite-dev-api-plugin.js +3 -3
- package/dist/web/assets/{AnimatePresence-CthXziG2.js → AnimatePresence-C5p0yiY1.js} +2 -2
- package/dist/web/assets/ChatTab-C2FtENBM.js +18 -0
- package/dist/web/assets/ConnectionSettingsTab-B2sUjytG.js +1 -0
- package/dist/web/assets/ElicitationTab-DwH08kDC.js +1 -0
- package/dist/web/assets/{FormContext-Cqc_A12u.js → FormContext-DH2caWKO.js} +1 -1
- package/dist/web/assets/ListTabHeader-R17w_JsB.js +1 -0
- package/dist/web/assets/{ManufactOAuthCallback-DCLbW-mz.js → ManufactOAuthCallback-Btu4B6u6.js} +1 -1
- package/dist/web/assets/MarkdownRenderer-DpIEt9wb.js +47 -0
- package/dist/web/assets/{NotificationsTab-JevzvJTg.js → NotificationsTab-CHB8mtSz.js} +1 -1
- package/dist/web/assets/{OAuthCallback-BjcRxLh5.js → OAuthCallback-DV4MgX4Z.js} +1 -1
- package/dist/web/assets/PromptsTab-0GIapoSs.js +15 -0
- package/dist/web/assets/ResourcesTab-N9xjsI_b.js +2 -0
- package/dist/web/assets/SamplingTab-Dw0vpi4t.js +1 -0
- package/dist/web/assets/ServerMetadataTab-D-eQpLBF.js +1 -0
- package/dist/web/assets/ToolsTab-BMrMJ5JV.js +8 -0
- package/dist/web/assets/ViewPreview-N_cpEO0W.js +1 -0
- package/dist/web/assets/WidgetWrapper-pDgNVq9y.js +34 -0
- package/dist/web/assets/checkbox-CrnXSMh2.js +1 -0
- package/dist/web/assets/dist-CeWSydFI.js +21 -0
- package/dist/web/assets/index-Cfuv_gb3.js +475 -0
- package/dist/web/assets/index-fBX3akc8.css +1 -0
- package/dist/web/assets/input-CLYhA7PK.js +1 -0
- package/dist/web/assets/{label-B5Q_Zr8M.js → label-Cdim77Jw.js} +1 -1
- package/dist/web/assets/select-CJ57-Bor.js +1 -0
- package/dist/web/assets/shared-B1GD9FMm.js +1 -0
- package/dist/web/assets/{tabs-subtle-AkJZvdxS.js → tabs-subtle-CG5cjC_N.js} +1 -1
- package/dist/web/assets/textarea-DLAmNVf_.js +1 -0
- package/dist/web/assets/useConfig-BTp15Lle.js +1 -0
- package/dist/web/assets/{useViewHostProps-DXAD1g7g.js → useViewHostProps-BQlaFC2Q.js} +1 -1
- package/dist/web/index.html +8 -9
- package/package.json +5 -12
- package/dist/cdn/ChatTab-D8uwCHAf.js +0 -13218
- package/dist/cdn/ConnectionSettingsTab-B97gPPJW.js +0 -145
- package/dist/cdn/PromptsTab-Cspfnl6n.js +0 -4400
- package/dist/cdn/bundle-mjs-B0nmHDtp.js +0 -1953
- package/dist/cdn/card-DqjqAq0o.js +0 -41
- package/dist/cdn/chunk-BO2N2NFS-Cy167e0X.js +0 -17500
- package/dist/cdn/highlighted-body-OFNGDK62-CoReNbTX.js +0 -36
- package/dist/cdn/mermaid-GHXKKRXX-DgVIbk-D.js +0 -2
- package/dist/cdn/pdf-CxFT9FER.js +0 -16291
- package/dist/cdn/sheet-CerCdhxz.js +0 -78
- package/dist/cdn/useHostedSession-BA39Aegc.js +0 -153
- package/dist/cdn/useMCPPrompts-D3_Hla_z.js +0 -104
- package/dist/client/components/chat/streamdown-code-slim.d.ts +0 -4
- package/dist/client/components/chat/streamdown-code-slim.d.ts.map +0 -1
- package/dist/web/assets/ChatTab-Cy8eyFYI.js +0 -460
- package/dist/web/assets/ConnectionSettingsTab-sDZGaUJn.js +0 -1
- package/dist/web/assets/ElicitationTab-wDKgU1qL.js +0 -1
- package/dist/web/assets/ListTabHeader-G-nQX18m.js +0 -1
- package/dist/web/assets/PromptsTab-DsQVOjKH.js +0 -61
- package/dist/web/assets/ResourcesTab-Bw8_p6M1.js +0 -2
- package/dist/web/assets/SamplingTab-BrcF1zJF.js +0 -1
- package/dist/web/assets/ServerMetadataTab-Bydeh1Po.js +0 -1
- package/dist/web/assets/ToolsTab-DJWF7Q_x.js +0 -8
- package/dist/web/assets/ViewPreview-jgeU7bY9.js +0 -1
- package/dist/web/assets/WidgetWrapper-B_vJU9uF.js +0 -34
- package/dist/web/assets/bundle-mjs-8puS6ou7.js +0 -1
- package/dist/web/assets/checkbox-BA-XURSj.js +0 -1
- package/dist/web/assets/chunk-BO2N2NFS-CGbd3eLY.js +0 -131
- package/dist/web/assets/dist-BcAQZluc.js +0 -21
- package/dist/web/assets/highlighted-body-OFNGDK62-BBJFbIMp.js +0 -1
- package/dist/web/assets/index-BjH-Qp85.css +0 -1
- package/dist/web/assets/index-D2UxaT9v.js +0 -475
- package/dist/web/assets/input-CjmxOFr6.js +0 -1
- package/dist/web/assets/mermaid-GHXKKRXX-B4MKVODA.js +0 -1
- package/dist/web/assets/pdf-CuwKm9zO.js +0 -54
- package/dist/web/assets/select-C0xlfLAa.js +0 -1
- package/dist/web/assets/shared-DQE60Op-.js +0 -1
- package/dist/web/assets/sheet-7TIkLdpr.js +0 -1
- package/dist/web/assets/textarea-Ci09-en6.js +0 -1
- package/dist/web/assets/useConfig-Qglo4xs1.js +0 -1
- package/dist/web/assets/useMCPPrompts-USLYc1I4.js +0 -1
|
@@ -0,0 +1,901 @@
|
|
|
1
|
+
import { s as e, t } from "./react-BIs9pQ3H.js";
|
|
2
|
+
import { Pr as n, Rr as r, cr as i, f as a, lr as o, sr as s, t as c, ur as l } from "./input-C2OBd4PJ.js";
|
|
3
|
+
import { t as u } from "./jsx-runtime-CIxvMpEo.js";
|
|
4
|
+
import { t as d } from "./label-B9Jmm9be.js";
|
|
5
|
+
import { t as ee } from "./AnimatePresence-Dcw-FOy8.js";
|
|
6
|
+
import { a as f, i as p, n as m, r as h, t as g } from "./select-DDdiIPR2.js";
|
|
7
|
+
import { a as _, i as v, t as y } from "./browser-CbQIH4w2.js";
|
|
8
|
+
import { n as b, t as te } from "./zap-Mb-pbw2X.js";
|
|
9
|
+
import { t as x } from "./clock-CmUbSx_B.js";
|
|
10
|
+
import { t as ne } from "./JSONDisplay-BFxf5oEu.js";
|
|
11
|
+
import { a as S, i as C, n as w, o as T, r as E, s as D } from "./shared-DaILIQPP.js";
|
|
12
|
+
import { t as re } from "./history-Csw4rb44.js";
|
|
13
|
+
import { t as O } from "./maximize-BALCV_ep.js";
|
|
14
|
+
import { t as k } from "./message-square-BnxdpJxZ.js";
|
|
15
|
+
import { n as A, t as j } from "./save-Tgil_AJZ.js";
|
|
16
|
+
import { t as M } from "./play-vuZ5PLnI.js";
|
|
17
|
+
import { t as N } from "./trash-2-RwpJY5SL.js";
|
|
18
|
+
import { t as P } from "./not-found-DEtSM_Wd.js";
|
|
19
|
+
import { t as F } from "./spinner-jQtC7EBj.js";
|
|
20
|
+
import { n as ie } from "./InspectorContext-UjtEbNod.js";
|
|
21
|
+
import { n as ae, t as I } from "./MarkdownRenderer-_aYcof42.js";
|
|
22
|
+
import { t as L } from "./textarea-DSbwcFVt.js";
|
|
23
|
+
import { t as oe } from "./ListTabHeader-Cv-GmtGF.js";
|
|
24
|
+
//#region src/client/components/prompts/PromptInputForm.tsx
|
|
25
|
+
var R = /* @__PURE__ */ e(t(), 1), z = u();
|
|
26
|
+
function B({ selectedPrompt: e, promptArgs: t, onArgChange: n }) {
|
|
27
|
+
let r = e?.arguments || [];
|
|
28
|
+
if (!(r.length > 0)) return /* @__PURE__ */ (0, z.jsx)("div", {
|
|
29
|
+
className: "flex items-center justify-center h-32 text-gray-500 dark:text-gray-400 text-sm",
|
|
30
|
+
children: "No arguments required"
|
|
31
|
+
});
|
|
32
|
+
let i = (e) => {
|
|
33
|
+
let r = e.name, i = t[r], a = typeof i == "string" ? i : JSON.stringify(i);
|
|
34
|
+
return e.type === "boolean" ? /* @__PURE__ */ (0, z.jsxs)("div", {
|
|
35
|
+
className: "space-y-2",
|
|
36
|
+
children: [/* @__PURE__ */ (0, z.jsxs)("div", { children: [/* @__PURE__ */ (0, z.jsxs)(d, {
|
|
37
|
+
htmlFor: r,
|
|
38
|
+
className: "text-sm font-medium",
|
|
39
|
+
children: [r, e.required && /* @__PURE__ */ (0, z.jsx)("span", {
|
|
40
|
+
className: "text-red-500 ml-1",
|
|
41
|
+
children: "*"
|
|
42
|
+
})]
|
|
43
|
+
}), e.description && /* @__PURE__ */ (0, z.jsx)("p", {
|
|
44
|
+
className: "mt-0.5 text-xs text-gray-500 dark:text-gray-400",
|
|
45
|
+
children: e.description
|
|
46
|
+
})] }), /* @__PURE__ */ (0, z.jsx)("input", {
|
|
47
|
+
id: r,
|
|
48
|
+
type: "checkbox",
|
|
49
|
+
checked: !!i,
|
|
50
|
+
onChange: (e) => n(r, e.target.checked),
|
|
51
|
+
className: "rounded",
|
|
52
|
+
"aria-label": `Toggle ${r}`
|
|
53
|
+
})]
|
|
54
|
+
}, r) : e.type === "number" ? /* @__PURE__ */ (0, z.jsxs)("div", {
|
|
55
|
+
className: "space-y-2",
|
|
56
|
+
children: [/* @__PURE__ */ (0, z.jsxs)("div", { children: [/* @__PURE__ */ (0, z.jsxs)(d, {
|
|
57
|
+
htmlFor: r,
|
|
58
|
+
className: "text-sm font-medium",
|
|
59
|
+
children: [r, e.required && /* @__PURE__ */ (0, z.jsx)("span", {
|
|
60
|
+
className: "text-red-500 ml-1",
|
|
61
|
+
children: "*"
|
|
62
|
+
})]
|
|
63
|
+
}), e.description && /* @__PURE__ */ (0, z.jsx)("p", {
|
|
64
|
+
className: "mt-0.5 text-xs text-gray-500 dark:text-gray-400",
|
|
65
|
+
children: e.description
|
|
66
|
+
})] }), /* @__PURE__ */ (0, z.jsx)(c, {
|
|
67
|
+
id: r,
|
|
68
|
+
type: "number",
|
|
69
|
+
value: Number(i) || 0,
|
|
70
|
+
onChange: (e) => n(r, Number(e.target.value)),
|
|
71
|
+
placeholder: `Enter ${r}`
|
|
72
|
+
})]
|
|
73
|
+
}, r) : e.type === "array" || e.type === "object" ? /* @__PURE__ */ (0, z.jsxs)("div", {
|
|
74
|
+
className: "space-y-2",
|
|
75
|
+
children: [/* @__PURE__ */ (0, z.jsxs)("div", { children: [/* @__PURE__ */ (0, z.jsxs)(d, {
|
|
76
|
+
htmlFor: r,
|
|
77
|
+
className: "text-sm font-medium",
|
|
78
|
+
children: [r, e.required && /* @__PURE__ */ (0, z.jsx)("span", {
|
|
79
|
+
className: "text-red-500 ml-1",
|
|
80
|
+
children: "*"
|
|
81
|
+
})]
|
|
82
|
+
}), e.description && /* @__PURE__ */ (0, z.jsx)("p", {
|
|
83
|
+
className: "mt-0.5 text-xs text-gray-500 dark:text-gray-400",
|
|
84
|
+
children: e.description
|
|
85
|
+
})] }), /* @__PURE__ */ (0, z.jsx)(L, {
|
|
86
|
+
id: r,
|
|
87
|
+
value: a,
|
|
88
|
+
onChange: (e) => {
|
|
89
|
+
try {
|
|
90
|
+
n(r, JSON.parse(e.target.value));
|
|
91
|
+
} catch {
|
|
92
|
+
n(r, e.target.value);
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
placeholder: `Enter ${r} as JSON`,
|
|
96
|
+
className: "font-mono text-sm min-h-[100px]"
|
|
97
|
+
})]
|
|
98
|
+
}, r) : /* @__PURE__ */ (0, z.jsxs)("div", {
|
|
99
|
+
className: "space-y-2",
|
|
100
|
+
children: [/* @__PURE__ */ (0, z.jsxs)("div", { children: [/* @__PURE__ */ (0, z.jsxs)(d, {
|
|
101
|
+
htmlFor: r,
|
|
102
|
+
className: "text-sm font-medium",
|
|
103
|
+
children: [r, e.required && /* @__PURE__ */ (0, z.jsx)("span", {
|
|
104
|
+
className: "text-red-500 ml-1",
|
|
105
|
+
children: "*"
|
|
106
|
+
})]
|
|
107
|
+
}), e.description && /* @__PURE__ */ (0, z.jsx)("p", {
|
|
108
|
+
className: "mt-0.5 text-xs text-gray-500 dark:text-gray-400",
|
|
109
|
+
children: e.description
|
|
110
|
+
})] }), /* @__PURE__ */ (0, z.jsx)(c, {
|
|
111
|
+
id: r,
|
|
112
|
+
"data-testid": `prompt-param-${r}`,
|
|
113
|
+
value: a,
|
|
114
|
+
onChange: (e) => n(r, e.target.value),
|
|
115
|
+
placeholder: `Enter ${r}`
|
|
116
|
+
})]
|
|
117
|
+
}, r);
|
|
118
|
+
};
|
|
119
|
+
return /* @__PURE__ */ (0, z.jsx)("div", {
|
|
120
|
+
className: "space-y-4",
|
|
121
|
+
children: r.map((e) => i(e))
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
//#endregion
|
|
125
|
+
//#region src/client/components/prompts/PromptExecutionPanel.tsx
|
|
126
|
+
function se({ selectedPrompt: e, promptArgs: t, isExecuting: n, isConnected: a, onArgChange: c, onExecute: u, onSave: d }) {
|
|
127
|
+
return (0, R.useEffect)(() => {
|
|
128
|
+
let t = (t) => {
|
|
129
|
+
(t.metaKey || t.ctrlKey) && t.key === "Enter" && e && !n && a && (t.preventDefault(), u());
|
|
130
|
+
};
|
|
131
|
+
return document.addEventListener("keydown", t), () => document.removeEventListener("keydown", t);
|
|
132
|
+
}, [
|
|
133
|
+
e,
|
|
134
|
+
n,
|
|
135
|
+
a,
|
|
136
|
+
u
|
|
137
|
+
]), e ? /* @__PURE__ */ (0, z.jsxs)("div", {
|
|
138
|
+
className: "flex flex-col h-full",
|
|
139
|
+
children: [/* @__PURE__ */ (0, z.jsx)("div", {
|
|
140
|
+
className: "flex-shrink-0 p-3 sm:p-6 pt-3 pb-4 pr-3",
|
|
141
|
+
children: /* @__PURE__ */ (0, z.jsxs)("div", { children: [/* @__PURE__ */ (0, z.jsxs)("div", {
|
|
142
|
+
className: "flex flex-row items-center justify-between mb-0 gap-2",
|
|
143
|
+
children: [/* @__PURE__ */ (0, z.jsx)("h3", {
|
|
144
|
+
className: "text-base sm:text-lg font-semibold",
|
|
145
|
+
children: e.name
|
|
146
|
+
}), /* @__PURE__ */ (0, z.jsxs)("div", {
|
|
147
|
+
className: "flex gap-2 flex-shrink-0",
|
|
148
|
+
children: [/* @__PURE__ */ (0, z.jsx)(s, {
|
|
149
|
+
onClick: u,
|
|
150
|
+
disabled: n || !a,
|
|
151
|
+
size: "sm",
|
|
152
|
+
className: i,
|
|
153
|
+
"data-testid": "prompt-execute-button",
|
|
154
|
+
children: n ? /* @__PURE__ */ (0, z.jsxs)(z.Fragment, { children: [/* @__PURE__ */ (0, z.jsx)(F, {}), /* @__PURE__ */ (0, z.jsx)("span", {
|
|
155
|
+
className: "hidden sm:inline",
|
|
156
|
+
children: "Executing..."
|
|
157
|
+
})] }) : /* @__PURE__ */ (0, z.jsxs)(z.Fragment, { children: [
|
|
158
|
+
/* @__PURE__ */ (0, z.jsx)(M, {}),
|
|
159
|
+
/* @__PURE__ */ (0, z.jsx)("span", {
|
|
160
|
+
className: "hidden sm:inline",
|
|
161
|
+
children: "Execute"
|
|
162
|
+
}),
|
|
163
|
+
/* @__PURE__ */ (0, z.jsx)("span", {
|
|
164
|
+
className: o,
|
|
165
|
+
children: "⌘↵"
|
|
166
|
+
})
|
|
167
|
+
] })
|
|
168
|
+
}), /* @__PURE__ */ (0, z.jsxs)(s, {
|
|
169
|
+
variant: "outline",
|
|
170
|
+
onClick: d,
|
|
171
|
+
disabled: n,
|
|
172
|
+
size: "sm",
|
|
173
|
+
className: r(l, "gap-2"),
|
|
174
|
+
children: [/* @__PURE__ */ (0, z.jsx)(j, {}), /* @__PURE__ */ (0, z.jsx)("span", {
|
|
175
|
+
className: "hidden sm:inline",
|
|
176
|
+
children: "Save"
|
|
177
|
+
})]
|
|
178
|
+
})]
|
|
179
|
+
})]
|
|
180
|
+
}), e.description && /* @__PURE__ */ (0, z.jsx)("p", {
|
|
181
|
+
className: "text-sm text-gray-600 dark:text-gray-400 leading-relaxed mt-2",
|
|
182
|
+
children: e.description
|
|
183
|
+
})] })
|
|
184
|
+
}), /* @__PURE__ */ (0, z.jsx)("div", {
|
|
185
|
+
className: "flex-1 overflow-y-auto px-3 sm:px-6 pb-4 pr-3",
|
|
186
|
+
children: /* @__PURE__ */ (0, z.jsx)(B, {
|
|
187
|
+
selectedPrompt: e,
|
|
188
|
+
promptArgs: t,
|
|
189
|
+
onArgChange: c
|
|
190
|
+
})
|
|
191
|
+
})]
|
|
192
|
+
}) : /* @__PURE__ */ (0, z.jsxs)("div", {
|
|
193
|
+
className: "flex flex-col items-center justify-center h-full p-4 text-center",
|
|
194
|
+
children: [/* @__PURE__ */ (0, z.jsx)("p", {
|
|
195
|
+
className: "text-gray-500 dark:text-gray-400 mb-2",
|
|
196
|
+
children: "Select a prompt to get started"
|
|
197
|
+
}), /* @__PURE__ */ (0, z.jsx)("p", {
|
|
198
|
+
className: "text-xs text-gray-400 dark:text-gray-500",
|
|
199
|
+
children: "Choose a prompt from the list to view its details and execute it"
|
|
200
|
+
})]
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
//#endregion
|
|
204
|
+
//#region src/client/components/prompts/PromptMessageCard.tsx
|
|
205
|
+
function V(e) {
|
|
206
|
+
switch (e) {
|
|
207
|
+
case "system": return "default";
|
|
208
|
+
case "user": return "outline";
|
|
209
|
+
case "assistant": return "secondary";
|
|
210
|
+
default: return "outline";
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
function H(e) {
|
|
214
|
+
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
215
|
+
}
|
|
216
|
+
function U(e) {
|
|
217
|
+
return typeof e == "string" ? e : e.text ? e.text : e.type === "resource" && e.resource?.text ? e.resource.text : e.type === "image" ? `[Image: ${e.mimeType || "unknown type"}]` : JSON.stringify(e, null, 2);
|
|
218
|
+
}
|
|
219
|
+
function W({ message: e, index: t }) {
|
|
220
|
+
let [r, i] = (0, R.useState)(!1);
|
|
221
|
+
return /* @__PURE__ */ (0, z.jsxs)("div", {
|
|
222
|
+
className: "border border-border rounded-lg overflow-hidden bg-white dark:bg-zinc-900",
|
|
223
|
+
children: [/* @__PURE__ */ (0, z.jsxs)("div", {
|
|
224
|
+
className: "flex items-center justify-between px-4 py-2 bg-muted/30 border-b border-border",
|
|
225
|
+
children: [/* @__PURE__ */ (0, z.jsx)(n, {
|
|
226
|
+
variant: V(e.role),
|
|
227
|
+
children: H(e.role)
|
|
228
|
+
}), /* @__PURE__ */ (0, z.jsx)(s, {
|
|
229
|
+
variant: "ghost",
|
|
230
|
+
size: "sm",
|
|
231
|
+
onClick: async () => {
|
|
232
|
+
await y(U(e.content)), i(!0), setTimeout(() => i(!1), 2e3);
|
|
233
|
+
},
|
|
234
|
+
className: "h-6 px-2",
|
|
235
|
+
title: "Copy message content",
|
|
236
|
+
children: r ? /* @__PURE__ */ (0, z.jsx)(_, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ (0, z.jsx)(v, { className: "h-3.5 w-3.5" })
|
|
237
|
+
})]
|
|
238
|
+
}), /* @__PURE__ */ (0, z.jsx)("div", {
|
|
239
|
+
className: "px-4 py-3",
|
|
240
|
+
"data-testid": `prompt-message-content-${t}`,
|
|
241
|
+
children: (() => {
|
|
242
|
+
let t = e.content;
|
|
243
|
+
return typeof t == "string" ? /* @__PURE__ */ (0, z.jsx)(I, { content: t }) : t.type === "text" && t.text ? /* @__PURE__ */ (0, z.jsx)(I, { content: t.text }) : t.type === "image" ? /* @__PURE__ */ (0, z.jsxs)("div", {
|
|
244
|
+
className: "flex items-center gap-2 text-sm text-muted-foreground",
|
|
245
|
+
children: [/* @__PURE__ */ (0, z.jsxs)("span", {
|
|
246
|
+
className: "font-mono bg-muted px-2 py-1 rounded",
|
|
247
|
+
children: ["Image: ", t.mimeType || "unknown type"]
|
|
248
|
+
}), t.data && /* @__PURE__ */ (0, z.jsx)("img", {
|
|
249
|
+
src: `data:${t.mimeType};base64,${t.data}`,
|
|
250
|
+
alt: "Prompt image",
|
|
251
|
+
className: "max-w-full max-h-[300px] object-contain rounded-lg border border-border mt-2"
|
|
252
|
+
})]
|
|
253
|
+
}) : t.type === "resource" && t.resource ? /* @__PURE__ */ (0, z.jsxs)("div", {
|
|
254
|
+
className: "space-y-2",
|
|
255
|
+
children: [/* @__PURE__ */ (0, z.jsxs)("div", {
|
|
256
|
+
className: "flex items-center gap-2 text-sm",
|
|
257
|
+
children: [/* @__PURE__ */ (0, z.jsx)("span", {
|
|
258
|
+
className: "text-muted-foreground font-medium",
|
|
259
|
+
children: "Resource:"
|
|
260
|
+
}), /* @__PURE__ */ (0, z.jsx)("code", {
|
|
261
|
+
className: "bg-muted px-2 py-0.5 rounded text-xs font-mono",
|
|
262
|
+
children: t.resource.uri
|
|
263
|
+
})]
|
|
264
|
+
}), t.resource.text && /* @__PURE__ */ (0, z.jsx)("div", {
|
|
265
|
+
className: "mt-2",
|
|
266
|
+
children: /* @__PURE__ */ (0, z.jsx)(I, { content: t.resource.text })
|
|
267
|
+
})]
|
|
268
|
+
}) : /* @__PURE__ */ (0, z.jsx)("pre", {
|
|
269
|
+
className: "bg-muted p-3 rounded-lg text-sm overflow-x-auto",
|
|
270
|
+
children: /* @__PURE__ */ (0, z.jsx)("code", { children: JSON.stringify(t, null, 2) })
|
|
271
|
+
});
|
|
272
|
+
})()
|
|
273
|
+
})]
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
//#endregion
|
|
277
|
+
//#region src/client/components/prompts/PromptResultDisplay.tsx
|
|
278
|
+
function G(e) {
|
|
279
|
+
let t = Date.now() - e, n = Math.floor(t / 1e3), r = Math.floor(n / 60), i = Math.floor(r / 60), a = Math.floor(i / 24);
|
|
280
|
+
return n < 10 ? "now" : n < 60 ? `${n}s ago` : r < 60 ? `${r}m ago` : i < 24 ? `${i}h ago` : `${a}d ago`;
|
|
281
|
+
}
|
|
282
|
+
function K(e) {
|
|
283
|
+
return "isError" in e && !e.isError ? null : "error" in e && e.error ? String(e.error) : "isError" in e && e.isError ? "An error occurred" : null;
|
|
284
|
+
}
|
|
285
|
+
function ce({ results: e, copiedResult: t, previewMode: n = !0, onCopy: r, onDelete: i, onFullscreen: a, onTogglePreview: o, onMaximize: c, isMaximized: l = !1 }) {
|
|
286
|
+
let [u, d] = (0, R.useState)(0), [ee, y] = (0, R.useState)(""), [b, x] = (0, R.useState)(!0), S = e[0], C = S ? e.filter((e) => e.promptName === S.promptName) : [], w = C[u] || C[0], T = e.findIndex((e) => e === w);
|
|
287
|
+
if ((0, R.useEffect)(() => {
|
|
288
|
+
C.length > 0 && u >= C.length && d(0);
|
|
289
|
+
}, [C.length, u]), (0, R.useEffect)(() => {
|
|
290
|
+
let e = () => {
|
|
291
|
+
w && y(G(w.timestamp));
|
|
292
|
+
};
|
|
293
|
+
e();
|
|
294
|
+
let t = setInterval(e, 1e3);
|
|
295
|
+
return () => clearInterval(t);
|
|
296
|
+
}, [w]), e.length === 0) return /* @__PURE__ */ (0, z.jsx)("div", {
|
|
297
|
+
className: "flex flex-col h-full bg-white dark:bg-black border-t dark:border-zinc-700",
|
|
298
|
+
children: /* @__PURE__ */ (0, z.jsx)("div", {
|
|
299
|
+
className: "flex-1 overflow-y-auto h-full",
|
|
300
|
+
children: /* @__PURE__ */ (0, z.jsx)("div", {
|
|
301
|
+
className: "flex items-center justify-center h-full",
|
|
302
|
+
children: /* @__PURE__ */ (0, z.jsx)("div", {
|
|
303
|
+
className: "text-center",
|
|
304
|
+
children: /* @__PURE__ */ (0, z.jsx)(P, {
|
|
305
|
+
vertical: !0,
|
|
306
|
+
noBorder: !0,
|
|
307
|
+
message: "No Results yet"
|
|
308
|
+
})
|
|
309
|
+
})
|
|
310
|
+
})
|
|
311
|
+
})
|
|
312
|
+
});
|
|
313
|
+
let E = w.error || K(w.result), D = "messages" in w.result && Array.isArray(w.result.messages);
|
|
314
|
+
return /* @__PURE__ */ (0, z.jsx)("div", {
|
|
315
|
+
className: "flex flex-col h-full bg-white dark:bg-black border-t dark:border-zinc-700",
|
|
316
|
+
children: /* @__PURE__ */ (0, z.jsx)("div", {
|
|
317
|
+
className: "flex-1 overflow-y-auto h-full",
|
|
318
|
+
children: /* @__PURE__ */ (0, z.jsxs)("div", {
|
|
319
|
+
className: "space-y-0 flex-1 h-full flex flex-col",
|
|
320
|
+
children: [/* @__PURE__ */ (0, z.jsxs)("div", {
|
|
321
|
+
className: "flex items-center gap-2 px-4 pt-2 border-b border-gray-200 dark:border-zinc-600 pb-2",
|
|
322
|
+
children: [
|
|
323
|
+
/* @__PURE__ */ (0, z.jsx)("h3", {
|
|
324
|
+
className: "text-sm font-medium hidden sm:block",
|
|
325
|
+
children: "Response"
|
|
326
|
+
}),
|
|
327
|
+
w.duration !== void 0 && /* @__PURE__ */ (0, z.jsxs)("div", {
|
|
328
|
+
className: "hidden sm:flex items-center gap-1",
|
|
329
|
+
children: [/* @__PURE__ */ (0, z.jsx)(te, { className: "h-3 w-3 text-gray-400" }), /* @__PURE__ */ (0, z.jsxs)("span", {
|
|
330
|
+
className: "text-xs text-gray-500 dark:text-gray-400",
|
|
331
|
+
children: [w.duration, "ms"]
|
|
332
|
+
})]
|
|
333
|
+
}),
|
|
334
|
+
D && /* @__PURE__ */ (0, z.jsx)("div", {
|
|
335
|
+
className: "flex items-center gap-4 sm:ml-4",
|
|
336
|
+
children: /* @__PURE__ */ (0, z.jsxs)("div", {
|
|
337
|
+
className: "flex items-center gap-2",
|
|
338
|
+
children: [
|
|
339
|
+
/* @__PURE__ */ (0, z.jsx)("button", {
|
|
340
|
+
onClick: () => x(!0),
|
|
341
|
+
className: `text-xs font-medium ${b ? "text-black dark:text-white" : "text-zinc-500 dark:text-zinc-400"}`,
|
|
342
|
+
children: "Formatted"
|
|
343
|
+
}),
|
|
344
|
+
/* @__PURE__ */ (0, z.jsx)("span", {
|
|
345
|
+
className: "text-xs text-zinc-400",
|
|
346
|
+
children: "|"
|
|
347
|
+
}),
|
|
348
|
+
/* @__PURE__ */ (0, z.jsx)("button", {
|
|
349
|
+
onClick: () => x(!1),
|
|
350
|
+
className: `text-xs font-medium ${b ? "text-zinc-500 dark:text-zinc-400" : "text-black dark:text-white"}`,
|
|
351
|
+
children: "Raw"
|
|
352
|
+
})
|
|
353
|
+
]
|
|
354
|
+
})
|
|
355
|
+
}),
|
|
356
|
+
/* @__PURE__ */ (0, z.jsxs)("div", {
|
|
357
|
+
className: "ml-auto flex items-center gap-1",
|
|
358
|
+
children: [
|
|
359
|
+
C.length > 1 && /* @__PURE__ */ (0, z.jsxs)("div", {
|
|
360
|
+
className: "flex items-center gap-2 mr-2",
|
|
361
|
+
children: [/* @__PURE__ */ (0, z.jsx)(re, { className: "h-3 w-3 text-gray-400" }), /* @__PURE__ */ (0, z.jsxs)(g, {
|
|
362
|
+
value: u.toString(),
|
|
363
|
+
onValueChange: (e) => d(parseInt(e)),
|
|
364
|
+
children: [/* @__PURE__ */ (0, z.jsx)(p, {
|
|
365
|
+
className: "h-7 w-[120px] text-xs",
|
|
366
|
+
children: /* @__PURE__ */ (0, z.jsx)(f, {})
|
|
367
|
+
}), /* @__PURE__ */ (0, z.jsx)(m, { children: C.map((e, t) => /* @__PURE__ */ (0, z.jsx)(h, {
|
|
368
|
+
value: t.toString(),
|
|
369
|
+
children: t === 0 ? "Latest" : `${t + 1} call ago`
|
|
370
|
+
}, t)) })]
|
|
371
|
+
})]
|
|
372
|
+
}),
|
|
373
|
+
/* @__PURE__ */ (0, z.jsx)("span", {
|
|
374
|
+
className: "text-xs text-gray-500 dark:text-gray-400 mr-2",
|
|
375
|
+
children: ee
|
|
376
|
+
}),
|
|
377
|
+
/* @__PURE__ */ (0, z.jsx)(s, {
|
|
378
|
+
variant: "ghost",
|
|
379
|
+
size: "sm",
|
|
380
|
+
onClick: () => r(T, w.result),
|
|
381
|
+
className: "h-7 w-7 p-0",
|
|
382
|
+
title: "Copy result",
|
|
383
|
+
children: t === T ? /* @__PURE__ */ (0, z.jsx)(_, { className: "h-4 w-4" }) : /* @__PURE__ */ (0, z.jsx)(v, { className: "h-4 w-4" })
|
|
384
|
+
}),
|
|
385
|
+
i && /* @__PURE__ */ (0, z.jsx)(s, {
|
|
386
|
+
variant: "ghost",
|
|
387
|
+
size: "sm",
|
|
388
|
+
onClick: () => i(T),
|
|
389
|
+
className: "h-7 w-7 p-0",
|
|
390
|
+
title: "Delete result",
|
|
391
|
+
children: /* @__PURE__ */ (0, z.jsx)(N, { className: "h-4 w-4" })
|
|
392
|
+
}),
|
|
393
|
+
a && /* @__PURE__ */ (0, z.jsx)(s, {
|
|
394
|
+
variant: "ghost",
|
|
395
|
+
size: "sm",
|
|
396
|
+
onClick: () => a(T),
|
|
397
|
+
className: "h-7 w-7 p-0 sm:hidden",
|
|
398
|
+
title: "Fullscreen",
|
|
399
|
+
children: /* @__PURE__ */ (0, z.jsx)(O, { className: "h-4 w-4" })
|
|
400
|
+
}),
|
|
401
|
+
c && /* @__PURE__ */ (0, z.jsx)(s, {
|
|
402
|
+
variant: "ghost",
|
|
403
|
+
size: "sm",
|
|
404
|
+
onClick: c,
|
|
405
|
+
className: "h-7 w-7 p-0 hidden sm:flex",
|
|
406
|
+
title: l ? "Restore" : "Maximize",
|
|
407
|
+
children: l ? /* @__PURE__ */ (0, z.jsx)(A, { className: "h-4 w-4" }) : /* @__PURE__ */ (0, z.jsx)(O, { className: "h-4 w-4" })
|
|
408
|
+
})
|
|
409
|
+
]
|
|
410
|
+
})
|
|
411
|
+
]
|
|
412
|
+
}), /* @__PURE__ */ (0, z.jsx)("div", {
|
|
413
|
+
className: "flex-1 overflow-y-auto p-4",
|
|
414
|
+
children: E ? /* @__PURE__ */ (0, z.jsxs)("div", {
|
|
415
|
+
className: "bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded p-3",
|
|
416
|
+
children: [/* @__PURE__ */ (0, z.jsx)("p", {
|
|
417
|
+
className: "text-red-800 dark:text-red-300 font-medium",
|
|
418
|
+
children: "Error:"
|
|
419
|
+
}), /* @__PURE__ */ (0, z.jsx)("p", {
|
|
420
|
+
className: "text-red-700 dark:text-red-400 text-sm",
|
|
421
|
+
children: E
|
|
422
|
+
})]
|
|
423
|
+
}) : b && D ? /* @__PURE__ */ (0, z.jsx)("div", {
|
|
424
|
+
className: "space-y-3",
|
|
425
|
+
children: ("messages" in w.result ? w.result.messages : []).map((e, t) => /* @__PURE__ */ (0, z.jsx)(W, {
|
|
426
|
+
message: e,
|
|
427
|
+
index: t
|
|
428
|
+
}, t))
|
|
429
|
+
}) : /* @__PURE__ */ (0, z.jsx)(ne, {
|
|
430
|
+
data: w.result,
|
|
431
|
+
filename: `prompt-result-${w.promptName}-${Date.now()}.json`
|
|
432
|
+
})
|
|
433
|
+
})]
|
|
434
|
+
})
|
|
435
|
+
})
|
|
436
|
+
});
|
|
437
|
+
}
|
|
438
|
+
//#endregion
|
|
439
|
+
//#region src/client/components/prompts/PromptsList.tsx
|
|
440
|
+
function le({ prompts: e, selectedPrompt: t, onPromptSelect: r, focusedIndex: i }) {
|
|
441
|
+
return e.length === 0 ? /* @__PURE__ */ (0, z.jsxs)("div", {
|
|
442
|
+
className: "flex flex-1 flex-col items-center justify-center p-4 text-center",
|
|
443
|
+
children: [/* @__PURE__ */ (0, z.jsx)(k, { className: "h-12 w-12 text-gray-400 dark:text-gray-600 mb-3" }), /* @__PURE__ */ (0, z.jsx)("p", {
|
|
444
|
+
className: "text-gray-500 dark:text-gray-400",
|
|
445
|
+
children: "No prompts available"
|
|
446
|
+
})]
|
|
447
|
+
}) : /* @__PURE__ */ (0, z.jsx)("div", { children: e.map((e, a) => /* @__PURE__ */ (0, z.jsx)(E, {
|
|
448
|
+
id: `prompt-${e.name}`,
|
|
449
|
+
"data-testid": `prompt-item-${e.name}`,
|
|
450
|
+
isSelected: t?.name === e.name,
|
|
451
|
+
isFocused: i === a,
|
|
452
|
+
title: e.name,
|
|
453
|
+
description: e.description,
|
|
454
|
+
metadata: e.arguments && e.arguments.length > 0 && /* @__PURE__ */ (0, z.jsxs)(n, {
|
|
455
|
+
variant: "outline",
|
|
456
|
+
className: "text-xs border-gray-300 dark:border-zinc-600 text-gray-600 dark:text-gray-400",
|
|
457
|
+
children: [e.arguments.length, " args"]
|
|
458
|
+
}),
|
|
459
|
+
onClick: () => r(e)
|
|
460
|
+
}, e.name)) });
|
|
461
|
+
}
|
|
462
|
+
//#endregion
|
|
463
|
+
//#region src/client/components/prompts/SavedPromptsList.tsx
|
|
464
|
+
function ue({ savedPrompts: e, selectedPrompt: t, onLoadPrompt: n, onDeletePrompt: r, focusedIndex: i }) {
|
|
465
|
+
return e.length === 0 ? /* @__PURE__ */ (0, z.jsxs)("div", {
|
|
466
|
+
className: "flex flex-1 flex-col items-center justify-center p-4 text-center",
|
|
467
|
+
children: [
|
|
468
|
+
/* @__PURE__ */ (0, z.jsx)(x, { className: "h-12 w-12 text-gray-400 dark:text-gray-600 mb-3" }),
|
|
469
|
+
/* @__PURE__ */ (0, z.jsx)("p", {
|
|
470
|
+
className: "text-gray-500 dark:text-gray-400",
|
|
471
|
+
children: "No history"
|
|
472
|
+
}),
|
|
473
|
+
/* @__PURE__ */ (0, z.jsx)("p", {
|
|
474
|
+
className: "text-sm text-gray-400 dark:text-gray-500 mt-1",
|
|
475
|
+
children: "Prompts you execute will appear here"
|
|
476
|
+
})
|
|
477
|
+
]
|
|
478
|
+
}) : /* @__PURE__ */ (0, z.jsx)("div", { children: e.map((e, r) => /* @__PURE__ */ (0, z.jsx)(E, {
|
|
479
|
+
id: `saved-prompt-${e.id}`,
|
|
480
|
+
isSelected: t?.id === e.id,
|
|
481
|
+
isFocused: i === r,
|
|
482
|
+
title: e.name,
|
|
483
|
+
description: `${e.promptName} - ${new Date(e.savedAt).toLocaleString()}`,
|
|
484
|
+
onClick: () => n(e)
|
|
485
|
+
}, e.id)) });
|
|
486
|
+
}
|
|
487
|
+
//#endregion
|
|
488
|
+
//#region src/client/components/PromptsTab.tsx
|
|
489
|
+
var de = "mcp-inspector-saved-prompts";
|
|
490
|
+
function q({ ref: e, prompts: t, callPrompt: n, serverId: r, isConnected: i, refreshPrompts: o }) {
|
|
491
|
+
let [c, l] = (0, R.useState)(!1), [u, d] = (0, R.useState)(null), { selectedPromptName: f, setSelectedPromptName: p } = ie(), [m, h] = (0, R.useState)(null), [g, _] = (0, R.useState)("prompts"), [v, te] = (0, R.useState)([]), [ne, E] = (0, R.useState)(!1), [re, O] = (0, R.useState)(""), [A, j] = (0, R.useState)(!1), [M, N] = (0, R.useState)(-1), P = (0, R.useRef)(null), [F, I] = (0, R.useState)(!1), [L, B] = (0, R.useState)("list"), [V, H] = (0, R.useState)(!1), { filteredPrompts: U, selectedPrompt: W, setSelectedPrompt: G, results: K, handleDeleteResult: q, promptArgs: fe, setPromptArgs: pe, isExecuting: J, handlePromptSelect: Y, handleArgChange: me, executeSelectedPrompt: he, searchQuery: X, setSearchQuery: ge } = ae({
|
|
492
|
+
prompts: t,
|
|
493
|
+
callPrompt: n,
|
|
494
|
+
serverId: r
|
|
495
|
+
}), Z = D(), Q = D();
|
|
496
|
+
(0, R.useEffect)(() => {
|
|
497
|
+
let e = () => {
|
|
498
|
+
I(window.innerWidth < 1024);
|
|
499
|
+
};
|
|
500
|
+
return e(), window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
|
|
501
|
+
}, []), (0, R.useEffect)(() => {
|
|
502
|
+
B(W ? "detail" : "list");
|
|
503
|
+
}, [W]), (0, R.useEffect)(() => {
|
|
504
|
+
F && K.length > 0 && !J && B("response");
|
|
505
|
+
}, [
|
|
506
|
+
K,
|
|
507
|
+
J,
|
|
508
|
+
F
|
|
509
|
+
]), (0, R.useImperativeHandle)(e, () => ({
|
|
510
|
+
focusSearch: () => {
|
|
511
|
+
j(!0), setTimeout(() => {
|
|
512
|
+
P.current && P.current.focus();
|
|
513
|
+
}, 0);
|
|
514
|
+
},
|
|
515
|
+
blurSearch: () => {
|
|
516
|
+
ge(""), j(!1), P.current && P.current.blur();
|
|
517
|
+
}
|
|
518
|
+
})), (0, R.useEffect)(() => {
|
|
519
|
+
try {
|
|
520
|
+
let e = localStorage.getItem(de);
|
|
521
|
+
e && te(JSON.parse(e));
|
|
522
|
+
} catch (e) {
|
|
523
|
+
console.error("[PromptsTab] Failed to load saved prompts:", e);
|
|
524
|
+
}
|
|
525
|
+
}, []);
|
|
526
|
+
let _e = (0, R.useCallback)((e) => {
|
|
527
|
+
try {
|
|
528
|
+
localStorage.setItem(de, JSON.stringify(e));
|
|
529
|
+
} catch (e) {
|
|
530
|
+
console.error("[PromptsTab] Failed to save prompts:", e);
|
|
531
|
+
}
|
|
532
|
+
}, []);
|
|
533
|
+
(0, R.useEffect)(() => {
|
|
534
|
+
A && P.current && P.current.focus();
|
|
535
|
+
}, [A]);
|
|
536
|
+
let ve = (0, R.useCallback)(() => {
|
|
537
|
+
X.trim() || j(!1);
|
|
538
|
+
}, [X]), ye = (0, R.useCallback)(async () => {
|
|
539
|
+
if (o) {
|
|
540
|
+
l(!0);
|
|
541
|
+
try {
|
|
542
|
+
await o();
|
|
543
|
+
} finally {
|
|
544
|
+
l(!1);
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
}, [o]), $ = (0, R.useCallback)((e) => {
|
|
548
|
+
let n = t.find((t) => t.name === e.promptName);
|
|
549
|
+
n && (G(n), pe(e.args), d(e));
|
|
550
|
+
}, [
|
|
551
|
+
t,
|
|
552
|
+
G,
|
|
553
|
+
pe
|
|
554
|
+
]);
|
|
555
|
+
(0, R.useEffect)(() => {
|
|
556
|
+
N(-1);
|
|
557
|
+
}, [X, g]), (0, R.useEffect)(() => {
|
|
558
|
+
let e = (e) => {
|
|
559
|
+
let t = e.target;
|
|
560
|
+
if (t.tagName === "INPUT" || t.tagName === "TEXTAREA" || t.contentEditable === "true" || e.metaKey || e.ctrlKey || e.altKey) return;
|
|
561
|
+
let n = g === "prompts" ? U : v;
|
|
562
|
+
if (e.key === "ArrowDown") e.preventDefault(), N((e) => {
|
|
563
|
+
let t = e + 1;
|
|
564
|
+
return t >= n.length ? 0 : t;
|
|
565
|
+
});
|
|
566
|
+
else if (e.key === "ArrowUp") e.preventDefault(), N((e) => {
|
|
567
|
+
let t = e - 1;
|
|
568
|
+
return t < 0 ? n.length - 1 : t;
|
|
569
|
+
});
|
|
570
|
+
else if (e.key === "Enter" && M >= 0) if (e.preventDefault(), g === "prompts") {
|
|
571
|
+
let e = U[M];
|
|
572
|
+
e && Y(e);
|
|
573
|
+
} else {
|
|
574
|
+
let e = v[M];
|
|
575
|
+
e && $(e);
|
|
576
|
+
}
|
|
577
|
+
};
|
|
578
|
+
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
579
|
+
}, [
|
|
580
|
+
M,
|
|
581
|
+
U,
|
|
582
|
+
v,
|
|
583
|
+
g,
|
|
584
|
+
Y,
|
|
585
|
+
$
|
|
586
|
+
]), (0, R.useEffect)(() => {
|
|
587
|
+
if (M >= 0) {
|
|
588
|
+
let e = g === "prompts" ? `prompt-${U[M]?.name}` : `saved-prompt-${v[M]?.id}`, t = document.getElementById(e);
|
|
589
|
+
t && t.scrollIntoView({
|
|
590
|
+
behavior: "smooth",
|
|
591
|
+
block: "nearest"
|
|
592
|
+
});
|
|
593
|
+
}
|
|
594
|
+
}, [
|
|
595
|
+
M,
|
|
596
|
+
U,
|
|
597
|
+
v,
|
|
598
|
+
g
|
|
599
|
+
]), (0, R.useEffect)(() => {
|
|
600
|
+
if (console.warn("[PromptsTab] Auto-selection effect triggered:", {
|
|
601
|
+
selectedPromptName: f,
|
|
602
|
+
promptsCount: t.length,
|
|
603
|
+
currentSelectedPrompt: W?.name
|
|
604
|
+
}), f && t.length > 0) {
|
|
605
|
+
let e = t.find((e) => e.name === f);
|
|
606
|
+
if (console.warn("[PromptsTab] Prompt lookup result:", {
|
|
607
|
+
selectedPromptName: f,
|
|
608
|
+
promptFound: !!e,
|
|
609
|
+
promptName: e?.name,
|
|
610
|
+
shouldSelect: e && W?.name !== e.name
|
|
611
|
+
}), e && W?.name !== e.name) {
|
|
612
|
+
console.warn("[PromptsTab] Selecting prompt:", e.name), p(null);
|
|
613
|
+
let t = setTimeout(() => {
|
|
614
|
+
Y(e);
|
|
615
|
+
let t = document.getElementById(`prompt-${e.name}`);
|
|
616
|
+
t && (console.warn("[PromptsTab] Scrolling to prompt element"), t.scrollIntoView({
|
|
617
|
+
behavior: "smooth",
|
|
618
|
+
block: "nearest"
|
|
619
|
+
}));
|
|
620
|
+
}, 100);
|
|
621
|
+
return () => clearTimeout(t);
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
}, [
|
|
625
|
+
f,
|
|
626
|
+
t,
|
|
627
|
+
W,
|
|
628
|
+
Y,
|
|
629
|
+
p
|
|
630
|
+
]);
|
|
631
|
+
let be = (0, R.useCallback)(async (e, t) => {
|
|
632
|
+
try {
|
|
633
|
+
await y(JSON.stringify(t, null, 2)), h(e), setTimeout(() => h(null), 2e3);
|
|
634
|
+
} catch (e) {
|
|
635
|
+
console.error("[PromptsTab] Failed to copy result:", e);
|
|
636
|
+
}
|
|
637
|
+
}, []), xe = (0, R.useCallback)((e) => {
|
|
638
|
+
if (F) B("response");
|
|
639
|
+
else {
|
|
640
|
+
let t = K[e];
|
|
641
|
+
if (t) {
|
|
642
|
+
let e = window.open("", "_blank", "width=800,height=600");
|
|
643
|
+
if (e) {
|
|
644
|
+
let n = t.result;
|
|
645
|
+
e.document.write(`
|
|
646
|
+
<html>
|
|
647
|
+
<head>
|
|
648
|
+
<title>${t.promptName} Result</title>
|
|
649
|
+
<style>
|
|
650
|
+
body { font-family: monospace; padding: 20px; background: #1e1e1e; color: #d4d4d4; }
|
|
651
|
+
pre { white-space: pre-wrap; word-wrap: break-word; }
|
|
652
|
+
</style>
|
|
653
|
+
</head>
|
|
654
|
+
<body>
|
|
655
|
+
<h2>${t.promptName}</h2>
|
|
656
|
+
<pre>${JSON.stringify(n, null, 2)}</pre>
|
|
657
|
+
</body>
|
|
658
|
+
</html>
|
|
659
|
+
`), e.document.close();
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
}, [F, K]), Se = (0, R.useCallback)(() => {
|
|
664
|
+
V ? (Z.current && Z.current.expand(), Q.current && Q.current.expand(), H(!1)) : (Z.current && Z.current.collapse(), Q.current && Q.current.collapse(), H(!0));
|
|
665
|
+
}, [
|
|
666
|
+
V,
|
|
667
|
+
Z,
|
|
668
|
+
Q
|
|
669
|
+
]), Ce = (0, R.useCallback)(() => {
|
|
670
|
+
W && (O(""), E(!0));
|
|
671
|
+
}, [W]), we = (0, R.useCallback)((e) => {
|
|
672
|
+
_e(v.filter((t) => t.id !== e)), u?.id === e && d(null);
|
|
673
|
+
}, [
|
|
674
|
+
v,
|
|
675
|
+
_e,
|
|
676
|
+
u
|
|
677
|
+
]);
|
|
678
|
+
return F ? /* @__PURE__ */ (0, z.jsxs)("div", {
|
|
679
|
+
className: "h-full flex flex-col overflow-hidden relative bg-background",
|
|
680
|
+
children: [L !== "list" && /* @__PURE__ */ (0, z.jsxs)("div", {
|
|
681
|
+
className: "flex items-center gap-2 p-2 border-b shrink-0 bg-background z-10",
|
|
682
|
+
children: [/* @__PURE__ */ (0, z.jsx)(s, {
|
|
683
|
+
variant: "ghost",
|
|
684
|
+
size: "sm",
|
|
685
|
+
onClick: () => {
|
|
686
|
+
L === "response" ? B("detail") : (G(null), B("list"));
|
|
687
|
+
},
|
|
688
|
+
className: "p-0 h-8 w-8",
|
|
689
|
+
children: /* @__PURE__ */ (0, z.jsx)(b, { className: "h-4 w-4" })
|
|
690
|
+
}), /* @__PURE__ */ (0, z.jsxs)("div", {
|
|
691
|
+
className: "flex items-center text-sm font-medium",
|
|
692
|
+
children: [
|
|
693
|
+
/* @__PURE__ */ (0, z.jsx)("button", {
|
|
694
|
+
onClick: () => {
|
|
695
|
+
G(null), B("list");
|
|
696
|
+
},
|
|
697
|
+
className: "text-muted-foreground hover:text-foreground hover:underline cursor-pointer",
|
|
698
|
+
children: "Prompts"
|
|
699
|
+
}),
|
|
700
|
+
L === "detail" && /* @__PURE__ */ (0, z.jsxs)(z.Fragment, { children: [/* @__PURE__ */ (0, z.jsx)("span", {
|
|
701
|
+
className: "mx-2 text-muted-foreground",
|
|
702
|
+
children: "/"
|
|
703
|
+
}), /* @__PURE__ */ (0, z.jsx)("button", {
|
|
704
|
+
onClick: () => {
|
|
705
|
+
B("response");
|
|
706
|
+
},
|
|
707
|
+
className: L === "detail" ? "text-foreground hover:underline" : L === "response" ? "text-muted-foreground hover:text-foreground hover:underline cursor-pointer" : "text-muted-foreground",
|
|
708
|
+
children: "Execute"
|
|
709
|
+
})] }),
|
|
710
|
+
L === "response" && /* @__PURE__ */ (0, z.jsxs)(z.Fragment, { children: [/* @__PURE__ */ (0, z.jsx)("span", {
|
|
711
|
+
className: "mx-2 text-muted-foreground",
|
|
712
|
+
children: "/"
|
|
713
|
+
}), /* @__PURE__ */ (0, z.jsx)("span", {
|
|
714
|
+
className: "text-foreground",
|
|
715
|
+
children: "Response"
|
|
716
|
+
})] })
|
|
717
|
+
]
|
|
718
|
+
})]
|
|
719
|
+
}), /* @__PURE__ */ (0, z.jsx)("div", {
|
|
720
|
+
className: "flex-1 relative overflow-hidden",
|
|
721
|
+
children: /* @__PURE__ */ (0, z.jsxs)(ee, {
|
|
722
|
+
initial: !1,
|
|
723
|
+
mode: "popLayout",
|
|
724
|
+
children: [
|
|
725
|
+
L === "list" && /* @__PURE__ */ (0, z.jsx)(a.div, {
|
|
726
|
+
initial: { x: "-100%" },
|
|
727
|
+
animate: { x: 0 },
|
|
728
|
+
exit: { x: "-100%" },
|
|
729
|
+
transition: {
|
|
730
|
+
type: "spring",
|
|
731
|
+
stiffness: 300,
|
|
732
|
+
damping: 30
|
|
733
|
+
},
|
|
734
|
+
className: "absolute inset-0 flex flex-col bg-background z-0",
|
|
735
|
+
children: /* @__PURE__ */ (0, z.jsx)(w, { children: (e) => /* @__PURE__ */ (0, z.jsxs)(z.Fragment, { children: [/* @__PURE__ */ (0, z.jsx)(oe, {
|
|
736
|
+
isScrolled: e,
|
|
737
|
+
activeTab: g,
|
|
738
|
+
isSearchExpanded: A,
|
|
739
|
+
searchQuery: X,
|
|
740
|
+
primaryTabName: "prompts",
|
|
741
|
+
secondaryTabName: "saved",
|
|
742
|
+
primaryTabTitle: "Prompts",
|
|
743
|
+
secondaryTabTitle: "History",
|
|
744
|
+
primaryCount: U.length,
|
|
745
|
+
secondaryCount: v.length,
|
|
746
|
+
primaryIcon: k,
|
|
747
|
+
secondaryIcon: x,
|
|
748
|
+
searchPlaceholder: "Search prompts...",
|
|
749
|
+
onSearchExpand: () => j(!0),
|
|
750
|
+
onSearchChange: ge,
|
|
751
|
+
onSearchBlur: ve,
|
|
752
|
+
onTabSwitch: () => _(g === "prompts" ? "saved" : "prompts"),
|
|
753
|
+
searchInputRef: P,
|
|
754
|
+
onRefresh: o ? ye : void 0,
|
|
755
|
+
isRefreshing: c
|
|
756
|
+
}), g === "prompts" ? /* @__PURE__ */ (0, z.jsx)(le, {
|
|
757
|
+
prompts: U,
|
|
758
|
+
selectedPrompt: W,
|
|
759
|
+
onPromptSelect: Y,
|
|
760
|
+
focusedIndex: M
|
|
761
|
+
}) : /* @__PURE__ */ (0, z.jsx)(ue, {
|
|
762
|
+
savedPrompts: v,
|
|
763
|
+
selectedPrompt: u,
|
|
764
|
+
onLoadPrompt: $,
|
|
765
|
+
onDeletePrompt: we,
|
|
766
|
+
focusedIndex: M
|
|
767
|
+
})] }) })
|
|
768
|
+
}, "list"),
|
|
769
|
+
L === "detail" && /* @__PURE__ */ (0, z.jsx)(a.div, {
|
|
770
|
+
initial: { x: "100%" },
|
|
771
|
+
animate: { x: 0 },
|
|
772
|
+
exit: { x: "-100%" },
|
|
773
|
+
transition: {
|
|
774
|
+
type: "spring",
|
|
775
|
+
stiffness: 300,
|
|
776
|
+
damping: 30
|
|
777
|
+
},
|
|
778
|
+
className: "absolute inset-0 bg-background z-10",
|
|
779
|
+
children: /* @__PURE__ */ (0, z.jsx)(se, {
|
|
780
|
+
selectedPrompt: W,
|
|
781
|
+
promptArgs: fe,
|
|
782
|
+
isExecuting: J,
|
|
783
|
+
isConnected: i,
|
|
784
|
+
onArgChange: me,
|
|
785
|
+
onExecute: he,
|
|
786
|
+
onSave: Ce
|
|
787
|
+
})
|
|
788
|
+
}, "detail"),
|
|
789
|
+
L === "response" && /* @__PURE__ */ (0, z.jsx)(a.div, {
|
|
790
|
+
initial: { x: "100%" },
|
|
791
|
+
animate: { x: 0 },
|
|
792
|
+
exit: { x: "100%" },
|
|
793
|
+
transition: {
|
|
794
|
+
type: "spring",
|
|
795
|
+
stiffness: 300,
|
|
796
|
+
damping: 30
|
|
797
|
+
},
|
|
798
|
+
className: "absolute inset-0 bg-background z-20",
|
|
799
|
+
children: /* @__PURE__ */ (0, z.jsx)(ce, {
|
|
800
|
+
results: K,
|
|
801
|
+
copiedResult: m,
|
|
802
|
+
onCopy: be,
|
|
803
|
+
onDelete: q,
|
|
804
|
+
onFullscreen: xe
|
|
805
|
+
})
|
|
806
|
+
}, "response")
|
|
807
|
+
]
|
|
808
|
+
})
|
|
809
|
+
})]
|
|
810
|
+
}) : /* @__PURE__ */ (0, z.jsxs)(T, {
|
|
811
|
+
orientation: "horizontal",
|
|
812
|
+
className: "h-full",
|
|
813
|
+
children: [
|
|
814
|
+
/* @__PURE__ */ (0, z.jsx)(S, {
|
|
815
|
+
id: "left-panel",
|
|
816
|
+
panelRef: Z,
|
|
817
|
+
defaultSize: "33%",
|
|
818
|
+
collapsible: !0,
|
|
819
|
+
className: "flex flex-col h-full relative",
|
|
820
|
+
children: /* @__PURE__ */ (0, z.jsx)("div", {
|
|
821
|
+
className: "flex h-full flex-col overflow-hidden border-r dark:border-zinc-700",
|
|
822
|
+
children: /* @__PURE__ */ (0, z.jsx)(w, { children: (e) => /* @__PURE__ */ (0, z.jsxs)(z.Fragment, { children: [/* @__PURE__ */ (0, z.jsx)(oe, {
|
|
823
|
+
isScrolled: e,
|
|
824
|
+
activeTab: g,
|
|
825
|
+
isSearchExpanded: A,
|
|
826
|
+
searchQuery: X,
|
|
827
|
+
primaryTabName: "prompts",
|
|
828
|
+
secondaryTabName: "saved",
|
|
829
|
+
primaryTabTitle: "Prompts",
|
|
830
|
+
secondaryTabTitle: "History",
|
|
831
|
+
primaryCount: U.length,
|
|
832
|
+
secondaryCount: v.length,
|
|
833
|
+
primaryIcon: k,
|
|
834
|
+
secondaryIcon: x,
|
|
835
|
+
searchPlaceholder: "Search prompts...",
|
|
836
|
+
onSearchExpand: () => j(!0),
|
|
837
|
+
onSearchChange: ge,
|
|
838
|
+
onSearchBlur: ve,
|
|
839
|
+
onTabSwitch: () => _(g === "prompts" ? "saved" : "prompts"),
|
|
840
|
+
searchInputRef: P,
|
|
841
|
+
onRefresh: o ? ye : void 0,
|
|
842
|
+
isRefreshing: c
|
|
843
|
+
}), g === "prompts" ? /* @__PURE__ */ (0, z.jsx)(le, {
|
|
844
|
+
prompts: U,
|
|
845
|
+
selectedPrompt: W,
|
|
846
|
+
onPromptSelect: Y,
|
|
847
|
+
focusedIndex: M
|
|
848
|
+
}) : /* @__PURE__ */ (0, z.jsx)(ue, {
|
|
849
|
+
savedPrompts: v,
|
|
850
|
+
selectedPrompt: u,
|
|
851
|
+
onLoadPrompt: $,
|
|
852
|
+
onDeletePrompt: we,
|
|
853
|
+
focusedIndex: M
|
|
854
|
+
})] }) })
|
|
855
|
+
})
|
|
856
|
+
}),
|
|
857
|
+
/* @__PURE__ */ (0, z.jsx)(C, { withHandle: !0 }),
|
|
858
|
+
/* @__PURE__ */ (0, z.jsx)(S, {
|
|
859
|
+
defaultSize: "67%",
|
|
860
|
+
children: /* @__PURE__ */ (0, z.jsxs)(T, {
|
|
861
|
+
orientation: "vertical",
|
|
862
|
+
children: [
|
|
863
|
+
/* @__PURE__ */ (0, z.jsx)(S, {
|
|
864
|
+
panelRef: Q,
|
|
865
|
+
defaultSize: "40%",
|
|
866
|
+
collapsible: !0,
|
|
867
|
+
children: /* @__PURE__ */ (0, z.jsx)(se, {
|
|
868
|
+
selectedPrompt: W,
|
|
869
|
+
promptArgs: fe,
|
|
870
|
+
isExecuting: J,
|
|
871
|
+
isConnected: i,
|
|
872
|
+
onArgChange: me,
|
|
873
|
+
onExecute: he,
|
|
874
|
+
onSave: Ce
|
|
875
|
+
})
|
|
876
|
+
}),
|
|
877
|
+
/* @__PURE__ */ (0, z.jsx)(C, { withHandle: !0 }),
|
|
878
|
+
/* @__PURE__ */ (0, z.jsx)(S, {
|
|
879
|
+
defaultSize: "60%",
|
|
880
|
+
children: /* @__PURE__ */ (0, z.jsx)("div", {
|
|
881
|
+
className: "flex flex-col h-full",
|
|
882
|
+
children: /* @__PURE__ */ (0, z.jsx)(ce, {
|
|
883
|
+
results: K,
|
|
884
|
+
copiedResult: m,
|
|
885
|
+
onCopy: be,
|
|
886
|
+
onDelete: q,
|
|
887
|
+
onFullscreen: xe,
|
|
888
|
+
onMaximize: Se,
|
|
889
|
+
isMaximized: V
|
|
890
|
+
})
|
|
891
|
+
})
|
|
892
|
+
})
|
|
893
|
+
]
|
|
894
|
+
})
|
|
895
|
+
})
|
|
896
|
+
]
|
|
897
|
+
});
|
|
898
|
+
}
|
|
899
|
+
q.displayName = "PromptsTab";
|
|
900
|
+
//#endregion
|
|
901
|
+
export { q as PromptsTab };
|