@mcp-use/inspector 20.0.0-beta.6 → 20.0.0-beta.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/{AnimatePresence-Dcw-FOy8.js → AnimatePresence-D1bZ5_-l.js} +79 -78
- package/dist/cdn/{ChatTab-D6J3Gyp7.js → ChatTab-C-Ysv6Zf.js} +1951 -1932
- package/dist/cdn/CheckboxIndicator-BjF73mGX.js +252 -0
- package/dist/cdn/{ConnectionSettingsForm-CWQueI8J.js → ConnectionSettingsForm-CNuMa6jp.js} +202 -202
- package/dist/cdn/{ConnectionSettingsTab-FGyt3QaI.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-CruwjBOd.js → MCPAppsDebugControls-BpP-Ifap.js} +514 -550
- package/dist/cdn/{ManufactOAuthCallback-B98kSYCj.js → ManufactOAuthCallback-ChbbjFIT.js} +2 -2
- package/dist/cdn/{MarkdownRenderer-gLqUICEd.js → MarkdownRenderer-CK_6n3T9.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-Bg2bP-o9.js → OAuthCallback--NZdLoWx.js} +3 -3
- package/dist/cdn/PromptsTab-DSGYL32k.js +902 -0
- package/dist/cdn/{ResourcesTab-CQkKni-P.js → ResourcesTab-d3wxN7xC.js} +116 -114
- package/dist/cdn/{SamplingTab-D8q-iCMc.js → SamplingTab-DETdWNJk.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-6xaVH43x.js → ToolsTab-BMcnfEWg.js} +665 -653
- package/dist/cdn/{ViewPreview-Ohh6JwOn.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-CXHFvGre.js → dist-SxRsB1iS.js} +3 -3
- 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-BLtCruam.js → react-Bl-hSkvn.js} +562 -512
- 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-C7Ytz2BG.js → telemetry-DjQn_Xm9.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-BW6uQf2m.js → useConfig-B_adtnP1.js} +2 -2
- package/dist/cdn/{useSavedRequests-Ci2I919u.js → useSavedRequests-mSIsDd4c.js} +1 -1
- package/dist/cdn/{useViewHostProps-CINeSkth.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 +61 -2
- 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/ToolResultRenderer.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 +2087 -1861
- package/dist/client/utils/servers.d.ts +5 -0
- package/dist/client/utils/servers.d.ts.map +1 -1
- package/dist/server/cdn-shell.d.ts.map +1 -1
- package/dist/server/cdn-shell.js +2 -2
- package/dist/server/{chunk-GBY4WAVP.js → chunk-BD3ROXCC.js} +1 -1
- package/dist/server/{chunk-NUHI6MJ6.js → chunk-BPXKTFQ5.js} +1 -1
- package/dist/server/{chunk-IFF5T5J4.js → chunk-XTVIGRTB.js} +61 -2
- 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-DxD-KLW_.js +18 -0
- package/dist/web/assets/ConnectionSettingsTab-pO6p0U0f.js +1 -0
- package/dist/web/assets/ElicitationTab-o5_z6gqe.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-CZW1uZdH.js +34 -0
- package/dist/web/assets/{ManufactOAuthCallback-BRO6TPkZ.js → ManufactOAuthCallback-BnWhf5bW.js} +1 -1
- package/dist/web/assets/{MarkdownRenderer-gaJFjbtr.js → MarkdownRenderer-gUUHRIm1.js} +2 -2
- package/dist/web/assets/McpAppsViewPanel-CDJDb4t-.js +1 -0
- package/dist/web/assets/{NotificationsTab-LYcfRjyd.js → NotificationsTab-CkJ5E_sR.js} +1 -1
- package/dist/web/assets/{OAuthCallback-D8UItgTB.js → OAuthCallback-Dv_mFcua.js} +1 -1
- package/dist/web/assets/PromptsTab-CLwWFf6d.js +15 -0
- package/dist/web/assets/ResourcesTab-B8cnuq-m.js +2 -0
- package/dist/web/assets/SamplingTab-BjYHYRHX.js +1 -0
- package/dist/web/assets/ServerMetadataTab-CPlclbb7.js +1 -0
- package/dist/web/assets/ToolsTab-BSSwvp4Q.js +8 -0
- package/dist/web/assets/{ViewPreview--z6jL0Zg.js → ViewPreview-C_LJdgt9.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-BuuDhnpk.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-B8sA8Zml.js → dist-C39gcmyH.js} +4 -4
- package/dist/web/assets/index-CyvvaDNR.js +499 -0
- package/dist/web/assets/index-bCIH1Sdx.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-Chk1rURG.js +1 -0
- package/dist/web/assets/{sparkles-2OAsc1aP.js → sparkles-BGYTDThM.js} +1 -1
- package/dist/web/assets/tabs-subtle-CK4nucyB.js +1 -0
- package/dist/web/assets/textarea-CRTXuRmE.js +1 -0
- package/dist/web/assets/{useConfig-BAsKhUxf.js → useConfig-CgQbKjVT.js} +1 -1
- package/dist/web/assets/useViewHostProps-DFI7Ywo7.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 +2 -2
- package/dist/cdn/CheckboxIndicator-Bt4IICtv.js +0 -251
- package/dist/cdn/PromptsTab-C4LuwyWN.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-CsBPVCSc.js +0 -18
- package/dist/web/assets/ConnectionSettingsTab-DQTXfnl1.js +0 -1
- package/dist/web/assets/ElicitationTab-_FKB7nNG.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-B2uVMRR2.js +0 -15
- package/dist/web/assets/ResourcesTab-DhOZYPjE.js +0 -2
- package/dist/web/assets/SamplingTab-C-oY2hoi.js +0 -1
- package/dist/web/assets/ServerMetadataTab-BkTxO5KS.js +0 -1
- package/dist/web/assets/ToolsTab-DupHgo7A.js +0 -8
- package/dist/web/assets/WidgetWrapper-CZaEVEw4.js +0 -34
- package/dist/web/assets/checkbox-BQ9mI_6k.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-C_fCIJ4C.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-CCC9rTz4.js +0 -1
- package/dist/web/assets/tabs-subtle-246ABJqx.js +0 -1
- package/dist/web/assets/textarea-DLAmNVf_.js +0 -1
- package/dist/web/assets/useViewHostProps-CV5zBxUb.js +0 -1
|
@@ -1,901 +0,0 @@
|
|
|
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-gLqUICEd.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 };
|