@mcp-use/inspector 20.0.0-beta.5 → 20.0.0-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/{AnimatePresence-Dcw-FOy8.js → AnimatePresence-D1bZ5_-l.js} +79 -78
- package/dist/cdn/{ChatTab-B255lH5i.js → ChatTab-DtUGK07C.js} +1628 -1561
- package/dist/cdn/CheckboxIndicator-BjF73mGX.js +252 -0
- package/dist/cdn/{ConnectionSettingsForm-DF-NS58d.js → ConnectionSettingsForm-CNuMa6jp.js} +202 -202
- package/dist/cdn/{ConnectionSettingsTab-dI-Cqe79.js → ConnectionSettingsTab-qSVQ1aIF.js} +36 -35
- package/dist/cdn/{ElicitationTab-CL1KJ0bz.js → ElicitationTab-PEmEDvC5.js} +47 -46
- package/dist/cdn/{FormContext-tmgN_Vdr.js → FormContext-NtUiZclE.js} +26 -26
- package/dist/cdn/{InspectorContext-UjtEbNod.js → InspectorContext-BBKCdfmK.js} +1 -1
- package/dist/cdn/{JSONDisplay-BFxf5oEu.js → JSONDisplay-BJqMz7Ny.js} +22 -22
- package/dist/cdn/{ListTabHeader-Cv-GmtGF.js → ListTabHeader-DzmTtN1e.js} +20 -19
- package/dist/cdn/{WidgetWrapper-B4H3Fek7.js → MCPAppsDebugControls-BpP-Ifap.js} +514 -550
- package/dist/cdn/{ManufactOAuthCallback-B98kSYCj.js → ManufactOAuthCallback-ChbbjFIT.js} +2 -2
- package/dist/cdn/{MarkdownRenderer-Ba7nA4Ie.js → MarkdownRenderer-bX1BrKgI.js} +23 -23
- package/dist/cdn/McpAppsViewPanel-jlsYQ7uS.js +56 -0
- package/dist/cdn/{NotificationsTab-CeImSrhx.js → NotificationsTab-B7uebqMV.js} +21 -21
- package/dist/cdn/{OAuthCallback-Blc2Asxc.js → OAuthCallback--NZdLoWx.js} +3 -3
- package/dist/cdn/PromptsTab-BlXDcau3.js +902 -0
- package/dist/cdn/{ResourcesTab-BGualKW-.js → ResourcesTab-D45_JojP.js} +116 -114
- package/dist/cdn/{SamplingTab-BeZBUeni.js → SamplingTab-r7tImM6L.js} +34 -33
- package/dist/cdn/{ServerMetadataTab-CvrKX8fz.js → ServerMetadataTab-BM3VhSLf.js} +9 -9
- package/dist/cdn/{StatusIcon-D0-ARyOh.js → StatusIcon-Q3n3YRtE.js} +10 -11
- package/dist/cdn/{ToolsTab-j6n4O_3s.js → ToolsTab-DOAO8HnS.js} +664 -652
- package/dist/cdn/{ViewPreview-DihyG6Qd.js → ViewPreview-CBhrVdwx.js} +3 -3
- package/dist/cdn/{WidgetDebugContext-D4usL_MA.js → WidgetDebugContext-B6yoOVVV.js} +1 -11
- package/dist/cdn/WidgetWrapper-BlbQAh_X.js +12 -0
- package/dist/cdn/{bell-CGjAO_0s.js → bell-GrTZcnD2.js} +1 -1
- package/dist/cdn/{browser-CbQIH4w2.js → browser-DG2Z8392.js} +1 -1
- package/dist/cdn/{brush-B_mKhyxG.js → brush-CelVvMGp.js} +1 -1
- package/dist/cdn/button-CB4uOoUV.js +2509 -0
- package/dist/cdn/card-BA-DQk-G.js +41 -0
- package/dist/cdn/{checkbox-By0FklhG.js → checkbox-kwVa4gRX.js} +7 -7
- package/dist/cdn/{clock-CmUbSx_B.js → clock-YMF8Gtw5.js} +1 -1
- package/dist/cdn/{code-V_0nf5rg.js → code-C8sN2OGR.js} +1 -1
- package/dist/cdn/{jsx-runtime-CIxvMpEo.js → createLucideIcon-BONxC1L5.js} +57 -24
- package/dist/cdn/{dialog-BsDpuJd3.js → dialog-CJGnC5Ag.js} +171 -171
- package/dist/cdn/{dist-DaMB0Su9.js → dist-CTJnCYmk.js} +1 -1
- package/dist/cdn/{dist-DbX5yidW.js → dist-SxRsB1iS.js} +5 -4
- package/dist/cdn/{external-link-CjmfT6rW.js → external-link-Bo4lQxr1.js} +1 -1
- package/dist/cdn/{eye-B7H96av8.js → eye-pSGG7nvf.js} +1 -1
- package/dist/cdn/{folder-open-B3lu2rG_.js → folder-open-aM8CPtBO.js} +1 -1
- package/dist/cdn/{hash-BVQnWi7q.js → hash-DDs2vE1k.js} +1 -1
- package/dist/cdn/{history-Csw4rb44.js → history-BfUFpL1d.js} +1 -1
- package/dist/cdn/{index-browser-DkQOzkvX.js → index-browser-Dm3R1Mfe.js} +1 -1
- package/dist/cdn/{info-CNiOwqkf.js → info-BMkB68mB.js} +1 -1
- package/dist/cdn/{input-C2OBd4PJ.js → input-BCpgLXU1.js} +2993 -5499
- package/dist/cdn/inspector.css +1 -1
- package/dist/cdn/inspector.js +7106 -7140
- package/dist/cdn/{label-B9Jmm9be.js → label-A0UGV8FE.js} +9 -9
- package/dist/cdn/{loader-circle-BLy9A_pp.js → loader-circle-BKRHJEB7.js} +1 -1
- package/dist/cdn/{maximize-2-CH5Lq90B.js → maximize-2-DdrB_spi.js} +1 -1
- package/dist/cdn/{maximize-BALCV_ep.js → maximize-hSOCz133.js} +1 -1
- package/dist/cdn/{message-square-BnxdpJxZ.js → message-square-D3tKB3uJ.js} +1 -1
- package/dist/cdn/{not-found-DEtSM_Wd.js → not-found-BajFyZpp.js} +9 -11
- package/dist/cdn/{play-vuZ5PLnI.js → play-B1leulYf.js} +1 -1
- package/dist/cdn/providerMeta-CjGU4rID.js +436 -0
- package/dist/cdn/{react-BajV-X4P.js → react-Bl-hSkvn.js} +628 -571
- package/dist/cdn/{refresh-cw-BXY-Pa0U.js → refresh-cw-CyvXrS91.js} +1 -1
- package/dist/cdn/{save-Tgil_AJZ.js → save-CmdEPUAm.js} +1 -1
- package/dist/cdn/{select-DDdiIPR2.js → select-CCFHjOGk.js} +808 -807
- package/dist/cdn/{servers-Dm72iTpY.js → servers-Dd0Vcp81.js} +5 -1
- package/dist/cdn/{shared-DaILIQPP.js → shared-CJVHJhag.js} +36 -36
- package/dist/cdn/{sheet-Br_l2kry.js → sheet-oyq1mIyg.js} +620 -619
- package/dist/cdn/{sparkles-BntO2rDR.js → sparkles-CxeZpVtX.js} +1 -1
- package/dist/cdn/spinner-Be1GlSGX.js +15 -0
- package/dist/cdn/{square-check-big-BvwQ17Bl.js → square-check-big-C_4wbfwF.js} +1 -1
- package/dist/cdn/{switch-C3IyQuid.js → switch-DHXEA_N5.js} +190 -189
- package/dist/cdn/{tabs-subtle-CkdI6Mac.js → tabs-subtle-Dubd6Kj8.js} +269 -268
- package/dist/cdn/{telemetry-DabTAQ8x.js → telemetry-TwPKZlFf.js} +2 -2
- package/dist/cdn/{textarea-DSbwcFVt.js → textarea-CwmI8_uI.js} +6 -6
- package/dist/cdn/{trash-2-RwpJY5SL.js → trash-2-BhumJAFE.js} +1 -1
- package/dist/cdn/{useAriaLabelledBy-DqAdnppm.js → useAriaLabelledBy-Cra6w3YY.js} +2 -1
- package/dist/cdn/{useCompositeItem-BRqEzYh-.js → useCompositeItem-Dhnm-7el.js} +3 -3
- package/dist/cdn/{useConfig-Btmh8wjJ.js → useConfig-leHVjdjl.js} +2 -2
- package/dist/cdn/{useSavedRequests-Ci2I919u.js → useSavedRequests-mSIsDd4c.js} +1 -1
- package/dist/cdn/{useViewHostProps-B6SKeeH9.js → useViewHostProps-CDOm2w6u.js} +124 -109
- package/dist/cdn/{wrench-DzGmCfnb.js → wrench-DvK20LUT.js} +1 -1
- package/dist/cdn/{x-C3vRQIYu.js → x-EilKPiCX.js} +1 -1
- package/dist/cdn/{zap-Mb-pbw2X.js → zap-0Wr9QO7N.js} +1 -1
- package/dist/cli.js +1 -1
- package/dist/client/components/ChatTab.d.ts.map +1 -1
- package/dist/client/components/MCPAppsDebugControls.d.ts.map +1 -1
- package/dist/client/components/ToolsTab.d.ts.map +1 -1
- package/dist/client/components/chat/ConfigurationDialog.d.ts.map +1 -1
- package/dist/client/components/chat/MessageList.d.ts +1 -0
- package/dist/client/components/chat/MessageList.d.ts.map +1 -1
- package/dist/client/components/chat/ToolResultRenderer.d.ts.map +1 -1
- package/dist/client/components/chat/partialToolArgs.d.ts +10 -0
- package/dist/client/components/chat/partialToolArgs.d.ts.map +1 -0
- package/dist/client/components/chat/types.d.ts +1 -0
- package/dist/client/components/chat/types.d.ts.map +1 -1
- package/dist/client/components/chat/useChatMessages.d.ts.map +1 -1
- package/dist/client/components/chat/useChatMessagesClientSide.d.ts.map +1 -1
- package/dist/client/components/mcp-apps/McpAppsViewPanel.d.ts +29 -0
- package/dist/client/components/mcp-apps/McpAppsViewPanel.d.ts.map +1 -0
- package/dist/client/components/tools/ToolExecutionPanel.d.ts.map +1 -1
- package/dist/client/components/tools/ToolResultDisplay.d.ts +2 -1
- package/dist/client/components/tools/ToolResultDisplay.d.ts.map +1 -1
- package/dist/client/components/tools/useToolsTabNavigation.d.ts.map +1 -1
- package/dist/client/components/ui/MeshGradientCanvas.d.ts.map +1 -1
- package/dist/client/components/ui/mesh-animation-pause.d.ts +14 -0
- package/dist/client/components/ui/mesh-animation-pause.d.ts.map +1 -0
- package/dist/client/components/ui/mesh-gradient-colors.d.ts +6 -0
- package/dist/client/components/ui/mesh-gradient-colors.d.ts.map +1 -0
- package/dist/client/components/ui/mesh-tab-background.d.ts +1 -1
- package/dist/client/components/ui/mesh-tab-background.d.ts.map +1 -1
- package/dist/client/components/ui/not-found.d.ts.map +1 -1
- package/dist/client/context/WidgetDebugContext.d.ts +1 -11
- package/dist/client/context/WidgetDebugContext.d.ts.map +1 -1
- package/dist/client/hooks/useDeviceViewport.d.ts +1 -5
- package/dist/client/hooks/useDeviceViewport.d.ts.map +1 -1
- package/dist/client/hooks/useViewHostProps.d.ts +1 -1
- package/dist/client/hooks/useViewHostProps.d.ts.map +1 -1
- package/dist/client/index.js +2238 -1935
- package/dist/client/utils/servers.d.ts +5 -0
- package/dist/client/utils/servers.d.ts.map +1 -1
- package/dist/server/cdn-shell.js +2 -2
- package/dist/server/{chunk-ZCGLU5T7.js → chunk-5GVQGIAX.js} +1 -1
- package/dist/server/{chunk-DSTNUYWX.js → chunk-UZZDBVKF.js} +1 -1
- package/dist/server/{chunk-SQ4XNMLT.js → chunk-VFVFLXKP.js} +1 -1
- package/dist/server/cli.js +2 -2
- package/dist/server/index.js +3 -3
- package/dist/server/middleware.js +3 -3
- package/dist/server/version.js +1 -1
- package/dist/web/assets/AnimatePresence-FfDQQNFJ.js +9 -0
- package/dist/web/assets/ChatTab-B6ubLbeA.js +18 -0
- package/dist/web/assets/ConnectionSettingsTab-Cb2eDgEu.js +1 -0
- package/dist/web/assets/ElicitationTab-CbnCrmu9.js +1 -0
- package/dist/web/assets/FormContext-sV-yByKz.js +1 -0
- package/dist/web/assets/ListTabHeader-CrGae306.js +1 -0
- package/dist/web/assets/MCPAppsDebugControls-sRglMhat.js +34 -0
- package/dist/web/assets/{ManufactOAuthCallback-CS3ydSZg.js → ManufactOAuthCallback-D4uYGigW.js} +1 -1
- package/dist/web/assets/{MarkdownRenderer-BeeBfQhv.js → MarkdownRenderer-Cwxp9fLj.js} +2 -2
- package/dist/web/assets/McpAppsViewPanel-jQYFoZNX.js +1 -0
- package/dist/web/assets/{NotificationsTab-Uj0_DrmK.js → NotificationsTab-DuSm762_.js} +1 -1
- package/dist/web/assets/{OAuthCallback-C0ljgCiw.js → OAuthCallback-VLHlUe2c.js} +1 -1
- package/dist/web/assets/PromptsTab-DK6XZxR8.js +15 -0
- package/dist/web/assets/ResourcesTab-CUE4MAtJ.js +2 -0
- package/dist/web/assets/SamplingTab-BYNkVCTu.js +1 -0
- package/dist/web/assets/ServerMetadataTab-DWjNFMbq.js +1 -0
- package/dist/web/assets/ToolsTab-BisWWY2p.js +8 -0
- package/dist/web/assets/{ViewPreview-Ba1Ec5uA.js → ViewPreview-COrmPpRr.js} +1 -1
- package/dist/web/assets/WidgetWrapper-cv_BM1bY.js +1 -0
- package/dist/web/assets/{brush--0LobUi4.js → brush-DX0UZ_pI.js} +1 -1
- package/dist/web/assets/button-C8Xa2k4x.js +1 -0
- package/dist/web/assets/checkbox-B6dtF73d.js +1 -0
- package/dist/web/assets/code-B14rVdNt.js +1 -0
- package/dist/web/assets/createLucideIcon-BEHeJH0M.js +1 -0
- package/dist/web/assets/{dist-C5JjLJN9.js → dist-9Oy7e0v8.js} +5 -5
- package/dist/web/assets/index-BMaSsizY.js +499 -0
- package/dist/web/assets/index-D7TVTIt9.css +1 -0
- package/dist/web/assets/input-C0OQCUZy.js +1 -0
- package/dist/web/assets/{label-Cdim77Jw.js → label-CI7JWQOo.js} +1 -1
- package/dist/web/assets/{maximize-2-BTT9QQU9.js → maximize-2-Br1WQzT2.js} +1 -1
- package/dist/web/assets/{maximize-_O55kFcr.js → maximize-CJNgRe6S.js} +1 -1
- package/dist/web/assets/{refresh-cw-C9wQl8_d.js → refresh-cw-B5iaAZKn.js} +1 -1
- package/dist/web/assets/{save-B-MsgxX9.js → save-TM6fvNrt.js} +1 -1
- package/dist/web/assets/select-D6jzbLJn.js +1 -0
- package/dist/web/assets/shared-CFs9CZfB.js +1 -0
- package/dist/web/assets/{sparkles-2OAsc1aP.js → sparkles-BGYTDThM.js} +1 -1
- package/dist/web/assets/tabs-subtle-D2XkWhLL.js +1 -0
- package/dist/web/assets/textarea-CRTXuRmE.js +1 -0
- package/dist/web/assets/{useConfig-BAgALiZg.js → useConfig-B6tXvJOb.js} +1 -1
- package/dist/web/assets/useViewHostProps-DZqOwiAm.js +1 -0
- package/dist/web/assets/{zap-Du2Uc5pa.js → zap-BDWHCVHU.js} +1 -1
- package/dist/web/index.html +10 -10
- package/package.json +4 -4
- package/dist/cdn/CheckboxIndicator-Bt4IICtv.js +0 -251
- package/dist/cdn/PromptsTab-BYKnY7Rp.js +0 -901
- package/dist/cdn/card-DgiYnSg-.js +0 -41
- package/dist/cdn/createLucideIcon-C5fZZ6oB.js +0 -38
- package/dist/cdn/providerMeta-BQIfHuNL.js +0 -379
- package/dist/cdn/spinner-jQtC7EBj.js +0 -15
- package/dist/web/assets/AnimatePresence-C5p0yiY1.js +0 -9
- package/dist/web/assets/ChatTab-BCobuZDc.js +0 -18
- package/dist/web/assets/ConnectionSettingsTab-BjGkLwVu.js +0 -1
- package/dist/web/assets/ElicitationTab-D3ZUKHND.js +0 -1
- package/dist/web/assets/FormContext-DH2caWKO.js +0 -1
- package/dist/web/assets/ListTabHeader-R17w_JsB.js +0 -1
- package/dist/web/assets/PromptsTab-Bns2u0G-.js +0 -15
- package/dist/web/assets/ResourcesTab-CO24312V.js +0 -2
- package/dist/web/assets/SamplingTab-7gtN7FwU.js +0 -1
- package/dist/web/assets/ServerMetadataTab-CQwqYSjL.js +0 -1
- package/dist/web/assets/ToolsTab-bDdRxI1b.js +0 -8
- package/dist/web/assets/WidgetWrapper-CYHfzrtb.js +0 -34
- package/dist/web/assets/checkbox-CzBkaNKa.js +0 -1
- package/dist/web/assets/code-tME-5H6D.js +0 -1
- package/dist/web/assets/createLucideIcon-B3b8EU0b.js +0 -1
- package/dist/web/assets/index-TQ5V7cM9.js +0 -492
- package/dist/web/assets/index-fBX3akc8.css +0 -1
- package/dist/web/assets/input-CLYhA7PK.js +0 -1
- package/dist/web/assets/jsx-runtime-Cjj9sGSy.js +0 -1
- package/dist/web/assets/select-CJ57-Bor.js +0 -1
- package/dist/web/assets/shared-BF0rJNdE.js +0 -1
- package/dist/web/assets/tabs-subtle-6D79T1xd.js +0 -1
- package/dist/web/assets/textarea-DLAmNVf_.js +0 -1
- package/dist/web/assets/useViewHostProps-BYitt_6K.js +0 -1
|
@@ -0,0 +1,902 @@
|
|
|
1
|
+
import { s as e, t } from "./react-BIs9pQ3H.js";
|
|
2
|
+
import { f as n, sr as r, t as i } from "./input-BCpgLXU1.js";
|
|
3
|
+
import { n as a } from "./createLucideIcon-BONxC1L5.js";
|
|
4
|
+
import { U as o, i as s, n as c, r as l, t as u } from "./button-CB4uOoUV.js";
|
|
5
|
+
import { t as d } from "./label-A0UGV8FE.js";
|
|
6
|
+
import { t as ee } from "./AnimatePresence-D1bZ5_-l.js";
|
|
7
|
+
import { a as f, i as p, n as m, r as te, t as h } from "./select-CCFHjOGk.js";
|
|
8
|
+
import { a as g, i as _, t as v } from "./browser-DG2Z8392.js";
|
|
9
|
+
import { n as y, t as ne } from "./zap-0Wr9QO7N.js";
|
|
10
|
+
import { t as b } from "./clock-YMF8Gtw5.js";
|
|
11
|
+
import { t as re } from "./JSONDisplay-BJqMz7Ny.js";
|
|
12
|
+
import { a as x, i as S, n as C, o as w, r as T, s as E } from "./shared-CJVHJhag.js";
|
|
13
|
+
import { t as ie } from "./history-BfUFpL1d.js";
|
|
14
|
+
import { t as D } from "./maximize-hSOCz133.js";
|
|
15
|
+
import { t as O } from "./message-square-D3tKB3uJ.js";
|
|
16
|
+
import { n as k, t as A } from "./save-CmdEPUAm.js";
|
|
17
|
+
import { t as j } from "./play-B1leulYf.js";
|
|
18
|
+
import { t as M } from "./trash-2-BhumJAFE.js";
|
|
19
|
+
import { t as N } from "./not-found-BajFyZpp.js";
|
|
20
|
+
import { t as P } from "./spinner-Be1GlSGX.js";
|
|
21
|
+
import { n as ae } from "./InspectorContext-BBKCdfmK.js";
|
|
22
|
+
import { n as oe, t as F } from "./MarkdownRenderer-bX1BrKgI.js";
|
|
23
|
+
import { t as I } from "./textarea-CwmI8_uI.js";
|
|
24
|
+
import { t as se } from "./ListTabHeader-DzmTtN1e.js";
|
|
25
|
+
//#region src/client/components/prompts/PromptInputForm.tsx
|
|
26
|
+
var L = /* @__PURE__ */ e(t(), 1), R = a();
|
|
27
|
+
function z({ selectedPrompt: e, promptArgs: t, onArgChange: n }) {
|
|
28
|
+
let r = e?.arguments || [];
|
|
29
|
+
if (!(r.length > 0)) return /* @__PURE__ */ (0, R.jsx)("div", {
|
|
30
|
+
className: "flex items-center justify-center h-32 text-gray-500 dark:text-gray-400 text-sm",
|
|
31
|
+
children: "No arguments required"
|
|
32
|
+
});
|
|
33
|
+
let a = (e) => {
|
|
34
|
+
let r = e.name, a = t[r], o = typeof a == "string" ? a : JSON.stringify(a);
|
|
35
|
+
return e.type === "boolean" ? /* @__PURE__ */ (0, R.jsxs)("div", {
|
|
36
|
+
className: "space-y-2",
|
|
37
|
+
children: [/* @__PURE__ */ (0, R.jsxs)("div", { children: [/* @__PURE__ */ (0, R.jsxs)(d, {
|
|
38
|
+
htmlFor: r,
|
|
39
|
+
className: "text-sm font-medium",
|
|
40
|
+
children: [r, e.required && /* @__PURE__ */ (0, R.jsx)("span", {
|
|
41
|
+
className: "text-red-500 ml-1",
|
|
42
|
+
children: "*"
|
|
43
|
+
})]
|
|
44
|
+
}), e.description && /* @__PURE__ */ (0, R.jsx)("p", {
|
|
45
|
+
className: "mt-0.5 text-xs text-gray-500 dark:text-gray-400",
|
|
46
|
+
children: e.description
|
|
47
|
+
})] }), /* @__PURE__ */ (0, R.jsx)("input", {
|
|
48
|
+
id: r,
|
|
49
|
+
type: "checkbox",
|
|
50
|
+
checked: !!a,
|
|
51
|
+
onChange: (e) => n(r, e.target.checked),
|
|
52
|
+
className: "rounded",
|
|
53
|
+
"aria-label": `Toggle ${r}`
|
|
54
|
+
})]
|
|
55
|
+
}, r) : e.type === "number" ? /* @__PURE__ */ (0, R.jsxs)("div", {
|
|
56
|
+
className: "space-y-2",
|
|
57
|
+
children: [/* @__PURE__ */ (0, R.jsxs)("div", { children: [/* @__PURE__ */ (0, R.jsxs)(d, {
|
|
58
|
+
htmlFor: r,
|
|
59
|
+
className: "text-sm font-medium",
|
|
60
|
+
children: [r, e.required && /* @__PURE__ */ (0, R.jsx)("span", {
|
|
61
|
+
className: "text-red-500 ml-1",
|
|
62
|
+
children: "*"
|
|
63
|
+
})]
|
|
64
|
+
}), e.description && /* @__PURE__ */ (0, R.jsx)("p", {
|
|
65
|
+
className: "mt-0.5 text-xs text-gray-500 dark:text-gray-400",
|
|
66
|
+
children: e.description
|
|
67
|
+
})] }), /* @__PURE__ */ (0, R.jsx)(i, {
|
|
68
|
+
id: r,
|
|
69
|
+
type: "number",
|
|
70
|
+
value: Number(a) || 0,
|
|
71
|
+
onChange: (e) => n(r, Number(e.target.value)),
|
|
72
|
+
placeholder: `Enter ${r}`
|
|
73
|
+
})]
|
|
74
|
+
}, r) : e.type === "array" || e.type === "object" ? /* @__PURE__ */ (0, R.jsxs)("div", {
|
|
75
|
+
className: "space-y-2",
|
|
76
|
+
children: [/* @__PURE__ */ (0, R.jsxs)("div", { children: [/* @__PURE__ */ (0, R.jsxs)(d, {
|
|
77
|
+
htmlFor: r,
|
|
78
|
+
className: "text-sm font-medium",
|
|
79
|
+
children: [r, e.required && /* @__PURE__ */ (0, R.jsx)("span", {
|
|
80
|
+
className: "text-red-500 ml-1",
|
|
81
|
+
children: "*"
|
|
82
|
+
})]
|
|
83
|
+
}), e.description && /* @__PURE__ */ (0, R.jsx)("p", {
|
|
84
|
+
className: "mt-0.5 text-xs text-gray-500 dark:text-gray-400",
|
|
85
|
+
children: e.description
|
|
86
|
+
})] }), /* @__PURE__ */ (0, R.jsx)(I, {
|
|
87
|
+
id: r,
|
|
88
|
+
value: o,
|
|
89
|
+
onChange: (e) => {
|
|
90
|
+
try {
|
|
91
|
+
n(r, JSON.parse(e.target.value));
|
|
92
|
+
} catch {
|
|
93
|
+
n(r, e.target.value);
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
placeholder: `Enter ${r} as JSON`,
|
|
97
|
+
className: "font-mono text-sm min-h-[100px]"
|
|
98
|
+
})]
|
|
99
|
+
}, r) : /* @__PURE__ */ (0, R.jsxs)("div", {
|
|
100
|
+
className: "space-y-2",
|
|
101
|
+
children: [/* @__PURE__ */ (0, R.jsxs)("div", { children: [/* @__PURE__ */ (0, R.jsxs)(d, {
|
|
102
|
+
htmlFor: r,
|
|
103
|
+
className: "text-sm font-medium",
|
|
104
|
+
children: [r, e.required && /* @__PURE__ */ (0, R.jsx)("span", {
|
|
105
|
+
className: "text-red-500 ml-1",
|
|
106
|
+
children: "*"
|
|
107
|
+
})]
|
|
108
|
+
}), e.description && /* @__PURE__ */ (0, R.jsx)("p", {
|
|
109
|
+
className: "mt-0.5 text-xs text-gray-500 dark:text-gray-400",
|
|
110
|
+
children: e.description
|
|
111
|
+
})] }), /* @__PURE__ */ (0, R.jsx)(i, {
|
|
112
|
+
id: r,
|
|
113
|
+
"data-testid": `prompt-param-${r}`,
|
|
114
|
+
value: o,
|
|
115
|
+
onChange: (e) => n(r, e.target.value),
|
|
116
|
+
placeholder: `Enter ${r}`
|
|
117
|
+
})]
|
|
118
|
+
}, r);
|
|
119
|
+
};
|
|
120
|
+
return /* @__PURE__ */ (0, R.jsx)("div", {
|
|
121
|
+
className: "space-y-4",
|
|
122
|
+
children: r.map((e) => a(e))
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
//#endregion
|
|
126
|
+
//#region src/client/components/prompts/PromptExecutionPanel.tsx
|
|
127
|
+
function ce({ selectedPrompt: e, promptArgs: t, isExecuting: n, isConnected: r, onArgChange: i, onExecute: a, onSave: d }) {
|
|
128
|
+
return (0, L.useEffect)(() => {
|
|
129
|
+
let t = (t) => {
|
|
130
|
+
(t.metaKey || t.ctrlKey) && t.key === "Enter" && e && !n && r && (t.preventDefault(), a());
|
|
131
|
+
};
|
|
132
|
+
return document.addEventListener("keydown", t), () => document.removeEventListener("keydown", t);
|
|
133
|
+
}, [
|
|
134
|
+
e,
|
|
135
|
+
n,
|
|
136
|
+
r,
|
|
137
|
+
a
|
|
138
|
+
]), e ? /* @__PURE__ */ (0, R.jsxs)("div", {
|
|
139
|
+
className: "flex flex-col h-full",
|
|
140
|
+
children: [/* @__PURE__ */ (0, R.jsx)("div", {
|
|
141
|
+
className: "flex-shrink-0 p-3 sm:p-6 pt-3 pb-4 pr-3",
|
|
142
|
+
children: /* @__PURE__ */ (0, R.jsxs)("div", { children: [/* @__PURE__ */ (0, R.jsxs)("div", {
|
|
143
|
+
className: "flex flex-row items-center justify-between mb-0 gap-2",
|
|
144
|
+
children: [/* @__PURE__ */ (0, R.jsx)("h3", {
|
|
145
|
+
className: "text-base sm:text-lg font-semibold",
|
|
146
|
+
children: e.name
|
|
147
|
+
}), /* @__PURE__ */ (0, R.jsxs)("div", {
|
|
148
|
+
className: "flex gap-2 flex-shrink-0",
|
|
149
|
+
children: [/* @__PURE__ */ (0, R.jsx)(u, {
|
|
150
|
+
onClick: a,
|
|
151
|
+
disabled: n || !r,
|
|
152
|
+
size: "sm",
|
|
153
|
+
className: c,
|
|
154
|
+
"data-testid": "prompt-execute-button",
|
|
155
|
+
children: n ? /* @__PURE__ */ (0, R.jsxs)(R.Fragment, { children: [/* @__PURE__ */ (0, R.jsx)(P, {}), /* @__PURE__ */ (0, R.jsx)("span", {
|
|
156
|
+
className: "hidden sm:inline",
|
|
157
|
+
children: "Executing..."
|
|
158
|
+
})] }) : /* @__PURE__ */ (0, R.jsxs)(R.Fragment, { children: [
|
|
159
|
+
/* @__PURE__ */ (0, R.jsx)(j, {}),
|
|
160
|
+
/* @__PURE__ */ (0, R.jsx)("span", {
|
|
161
|
+
className: "hidden sm:inline",
|
|
162
|
+
children: "Execute"
|
|
163
|
+
}),
|
|
164
|
+
/* @__PURE__ */ (0, R.jsx)("span", {
|
|
165
|
+
className: l,
|
|
166
|
+
children: "⌘↵"
|
|
167
|
+
})
|
|
168
|
+
] })
|
|
169
|
+
}), /* @__PURE__ */ (0, R.jsxs)(u, {
|
|
170
|
+
variant: "outline",
|
|
171
|
+
onClick: d,
|
|
172
|
+
disabled: n,
|
|
173
|
+
size: "sm",
|
|
174
|
+
className: o(s, "gap-2"),
|
|
175
|
+
children: [/* @__PURE__ */ (0, R.jsx)(A, {}), /* @__PURE__ */ (0, R.jsx)("span", {
|
|
176
|
+
className: "hidden sm:inline",
|
|
177
|
+
children: "Save"
|
|
178
|
+
})]
|
|
179
|
+
})]
|
|
180
|
+
})]
|
|
181
|
+
}), e.description && /* @__PURE__ */ (0, R.jsx)("p", {
|
|
182
|
+
className: "text-sm text-gray-600 dark:text-gray-400 leading-relaxed mt-2",
|
|
183
|
+
children: e.description
|
|
184
|
+
})] })
|
|
185
|
+
}), /* @__PURE__ */ (0, R.jsx)("div", {
|
|
186
|
+
className: "flex-1 overflow-y-auto px-3 sm:px-6 pb-4 pr-3",
|
|
187
|
+
children: /* @__PURE__ */ (0, R.jsx)(z, {
|
|
188
|
+
selectedPrompt: e,
|
|
189
|
+
promptArgs: t,
|
|
190
|
+
onArgChange: i
|
|
191
|
+
})
|
|
192
|
+
})]
|
|
193
|
+
}) : /* @__PURE__ */ (0, R.jsxs)("div", {
|
|
194
|
+
className: "flex flex-col items-center justify-center h-full p-4 text-center",
|
|
195
|
+
children: [/* @__PURE__ */ (0, R.jsx)("p", {
|
|
196
|
+
className: "text-gray-500 dark:text-gray-400 mb-2",
|
|
197
|
+
children: "Select a prompt to get started"
|
|
198
|
+
}), /* @__PURE__ */ (0, R.jsx)("p", {
|
|
199
|
+
className: "text-xs text-gray-400 dark:text-gray-500",
|
|
200
|
+
children: "Choose a prompt from the list to view its details and execute it"
|
|
201
|
+
})]
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
//#endregion
|
|
205
|
+
//#region src/client/components/prompts/PromptMessageCard.tsx
|
|
206
|
+
function B(e) {
|
|
207
|
+
switch (e) {
|
|
208
|
+
case "system": return "default";
|
|
209
|
+
case "user": return "outline";
|
|
210
|
+
case "assistant": return "secondary";
|
|
211
|
+
default: return "outline";
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
function V(e) {
|
|
215
|
+
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
216
|
+
}
|
|
217
|
+
function H(e) {
|
|
218
|
+
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);
|
|
219
|
+
}
|
|
220
|
+
function U({ message: e, index: t }) {
|
|
221
|
+
let [n, i] = (0, L.useState)(!1);
|
|
222
|
+
return /* @__PURE__ */ (0, R.jsxs)("div", {
|
|
223
|
+
className: "border border-border rounded-lg overflow-hidden bg-white dark:bg-zinc-900",
|
|
224
|
+
children: [/* @__PURE__ */ (0, R.jsxs)("div", {
|
|
225
|
+
className: "flex items-center justify-between px-4 py-2 bg-muted/30 border-b border-border",
|
|
226
|
+
children: [/* @__PURE__ */ (0, R.jsx)(r, {
|
|
227
|
+
variant: B(e.role),
|
|
228
|
+
children: V(e.role)
|
|
229
|
+
}), /* @__PURE__ */ (0, R.jsx)(u, {
|
|
230
|
+
variant: "ghost",
|
|
231
|
+
size: "sm",
|
|
232
|
+
onClick: async () => {
|
|
233
|
+
await v(H(e.content)), i(!0), setTimeout(() => i(!1), 2e3);
|
|
234
|
+
},
|
|
235
|
+
className: "h-6 px-2",
|
|
236
|
+
title: "Copy message content",
|
|
237
|
+
children: n ? /* @__PURE__ */ (0, R.jsx)(g, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ (0, R.jsx)(_, { className: "h-3.5 w-3.5" })
|
|
238
|
+
})]
|
|
239
|
+
}), /* @__PURE__ */ (0, R.jsx)("div", {
|
|
240
|
+
className: "px-4 py-3",
|
|
241
|
+
"data-testid": `prompt-message-content-${t}`,
|
|
242
|
+
children: (() => {
|
|
243
|
+
let t = e.content;
|
|
244
|
+
return typeof t == "string" ? /* @__PURE__ */ (0, R.jsx)(F, { content: t }) : t.type === "text" && t.text ? /* @__PURE__ */ (0, R.jsx)(F, { content: t.text }) : t.type === "image" ? /* @__PURE__ */ (0, R.jsxs)("div", {
|
|
245
|
+
className: "flex items-center gap-2 text-sm text-muted-foreground",
|
|
246
|
+
children: [/* @__PURE__ */ (0, R.jsxs)("span", {
|
|
247
|
+
className: "font-mono bg-muted px-2 py-1 rounded",
|
|
248
|
+
children: ["Image: ", t.mimeType || "unknown type"]
|
|
249
|
+
}), t.data && /* @__PURE__ */ (0, R.jsx)("img", {
|
|
250
|
+
src: `data:${t.mimeType};base64,${t.data}`,
|
|
251
|
+
alt: "Prompt image",
|
|
252
|
+
className: "max-w-full max-h-[300px] object-contain rounded-lg border border-border mt-2"
|
|
253
|
+
})]
|
|
254
|
+
}) : t.type === "resource" && t.resource ? /* @__PURE__ */ (0, R.jsxs)("div", {
|
|
255
|
+
className: "space-y-2",
|
|
256
|
+
children: [/* @__PURE__ */ (0, R.jsxs)("div", {
|
|
257
|
+
className: "flex items-center gap-2 text-sm",
|
|
258
|
+
children: [/* @__PURE__ */ (0, R.jsx)("span", {
|
|
259
|
+
className: "text-muted-foreground font-medium",
|
|
260
|
+
children: "Resource:"
|
|
261
|
+
}), /* @__PURE__ */ (0, R.jsx)("code", {
|
|
262
|
+
className: "bg-muted px-2 py-0.5 rounded text-xs font-mono",
|
|
263
|
+
children: t.resource.uri
|
|
264
|
+
})]
|
|
265
|
+
}), t.resource.text && /* @__PURE__ */ (0, R.jsx)("div", {
|
|
266
|
+
className: "mt-2",
|
|
267
|
+
children: /* @__PURE__ */ (0, R.jsx)(F, { content: t.resource.text })
|
|
268
|
+
})]
|
|
269
|
+
}) : /* @__PURE__ */ (0, R.jsx)("pre", {
|
|
270
|
+
className: "bg-muted p-3 rounded-lg text-sm overflow-x-auto",
|
|
271
|
+
children: /* @__PURE__ */ (0, R.jsx)("code", { children: JSON.stringify(t, null, 2) })
|
|
272
|
+
});
|
|
273
|
+
})()
|
|
274
|
+
})]
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
//#endregion
|
|
278
|
+
//#region src/client/components/prompts/PromptResultDisplay.tsx
|
|
279
|
+
function W(e) {
|
|
280
|
+
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);
|
|
281
|
+
return n < 10 ? "now" : n < 60 ? `${n}s ago` : r < 60 ? `${r}m ago` : i < 24 ? `${i}h ago` : `${a}d ago`;
|
|
282
|
+
}
|
|
283
|
+
function G(e) {
|
|
284
|
+
return "isError" in e && !e.isError ? null : "error" in e && e.error ? String(e.error) : "isError" in e && e.isError ? "An error occurred" : null;
|
|
285
|
+
}
|
|
286
|
+
function le({ results: e, copiedResult: t, previewMode: n = !0, onCopy: r, onDelete: i, onFullscreen: a, onTogglePreview: o, onMaximize: s, isMaximized: c = !1 }) {
|
|
287
|
+
let [l, d] = (0, L.useState)(0), [ee, v] = (0, L.useState)(""), [y, b] = (0, L.useState)(!0), x = e[0], S = x ? e.filter((e) => e.promptName === x.promptName) : [], C = S[l] || S[0], w = e.findIndex((e) => e === C);
|
|
288
|
+
if ((0, L.useEffect)(() => {
|
|
289
|
+
S.length > 0 && l >= S.length && d(0);
|
|
290
|
+
}, [S.length, l]), (0, L.useEffect)(() => {
|
|
291
|
+
let e = () => {
|
|
292
|
+
C && v(W(C.timestamp));
|
|
293
|
+
};
|
|
294
|
+
e();
|
|
295
|
+
let t = setInterval(e, 1e3);
|
|
296
|
+
return () => clearInterval(t);
|
|
297
|
+
}, [C]), e.length === 0) return /* @__PURE__ */ (0, R.jsx)("div", {
|
|
298
|
+
className: "flex flex-col h-full bg-white dark:bg-black border-t dark:border-zinc-700",
|
|
299
|
+
children: /* @__PURE__ */ (0, R.jsx)("div", {
|
|
300
|
+
className: "flex-1 overflow-y-auto h-full",
|
|
301
|
+
children: /* @__PURE__ */ (0, R.jsx)("div", {
|
|
302
|
+
className: "flex items-center justify-center h-full",
|
|
303
|
+
children: /* @__PURE__ */ (0, R.jsx)("div", {
|
|
304
|
+
className: "text-center",
|
|
305
|
+
children: /* @__PURE__ */ (0, R.jsx)(N, {
|
|
306
|
+
vertical: !0,
|
|
307
|
+
noBorder: !0,
|
|
308
|
+
message: "No Results yet"
|
|
309
|
+
})
|
|
310
|
+
})
|
|
311
|
+
})
|
|
312
|
+
})
|
|
313
|
+
});
|
|
314
|
+
let T = C.error || G(C.result), E = "messages" in C.result && Array.isArray(C.result.messages);
|
|
315
|
+
return /* @__PURE__ */ (0, R.jsx)("div", {
|
|
316
|
+
className: "flex flex-col h-full bg-white dark:bg-black border-t dark:border-zinc-700",
|
|
317
|
+
children: /* @__PURE__ */ (0, R.jsx)("div", {
|
|
318
|
+
className: "flex-1 overflow-y-auto h-full",
|
|
319
|
+
children: /* @__PURE__ */ (0, R.jsxs)("div", {
|
|
320
|
+
className: "space-y-0 flex-1 h-full flex flex-col",
|
|
321
|
+
children: [/* @__PURE__ */ (0, R.jsxs)("div", {
|
|
322
|
+
className: "flex items-center gap-2 px-4 pt-2 border-b border-gray-200 dark:border-zinc-600 pb-2",
|
|
323
|
+
children: [
|
|
324
|
+
/* @__PURE__ */ (0, R.jsx)("h3", {
|
|
325
|
+
className: "text-sm font-medium hidden sm:block",
|
|
326
|
+
children: "Response"
|
|
327
|
+
}),
|
|
328
|
+
C.duration !== void 0 && /* @__PURE__ */ (0, R.jsxs)("div", {
|
|
329
|
+
className: "hidden sm:flex items-center gap-1",
|
|
330
|
+
children: [/* @__PURE__ */ (0, R.jsx)(ne, { className: "h-3 w-3 text-gray-400" }), /* @__PURE__ */ (0, R.jsxs)("span", {
|
|
331
|
+
className: "text-xs text-gray-500 dark:text-gray-400",
|
|
332
|
+
children: [C.duration, "ms"]
|
|
333
|
+
})]
|
|
334
|
+
}),
|
|
335
|
+
E && /* @__PURE__ */ (0, R.jsx)("div", {
|
|
336
|
+
className: "flex items-center gap-4 sm:ml-4",
|
|
337
|
+
children: /* @__PURE__ */ (0, R.jsxs)("div", {
|
|
338
|
+
className: "flex items-center gap-2",
|
|
339
|
+
children: [
|
|
340
|
+
/* @__PURE__ */ (0, R.jsx)("button", {
|
|
341
|
+
onClick: () => b(!0),
|
|
342
|
+
className: `text-xs font-medium ${y ? "text-black dark:text-white" : "text-zinc-500 dark:text-zinc-400"}`,
|
|
343
|
+
children: "Formatted"
|
|
344
|
+
}),
|
|
345
|
+
/* @__PURE__ */ (0, R.jsx)("span", {
|
|
346
|
+
className: "text-xs text-zinc-400",
|
|
347
|
+
children: "|"
|
|
348
|
+
}),
|
|
349
|
+
/* @__PURE__ */ (0, R.jsx)("button", {
|
|
350
|
+
onClick: () => b(!1),
|
|
351
|
+
className: `text-xs font-medium ${y ? "text-zinc-500 dark:text-zinc-400" : "text-black dark:text-white"}`,
|
|
352
|
+
children: "Raw"
|
|
353
|
+
})
|
|
354
|
+
]
|
|
355
|
+
})
|
|
356
|
+
}),
|
|
357
|
+
/* @__PURE__ */ (0, R.jsxs)("div", {
|
|
358
|
+
className: "ml-auto flex items-center gap-1",
|
|
359
|
+
children: [
|
|
360
|
+
S.length > 1 && /* @__PURE__ */ (0, R.jsxs)("div", {
|
|
361
|
+
className: "flex items-center gap-2 mr-2",
|
|
362
|
+
children: [/* @__PURE__ */ (0, R.jsx)(ie, { className: "h-3 w-3 text-gray-400" }), /* @__PURE__ */ (0, R.jsxs)(h, {
|
|
363
|
+
value: l.toString(),
|
|
364
|
+
onValueChange: (e) => d(parseInt(e)),
|
|
365
|
+
children: [/* @__PURE__ */ (0, R.jsx)(p, {
|
|
366
|
+
className: "h-7 w-[120px] text-xs",
|
|
367
|
+
children: /* @__PURE__ */ (0, R.jsx)(f, {})
|
|
368
|
+
}), /* @__PURE__ */ (0, R.jsx)(m, { children: S.map((e, t) => /* @__PURE__ */ (0, R.jsx)(te, {
|
|
369
|
+
value: t.toString(),
|
|
370
|
+
children: t === 0 ? "Latest" : `${t + 1} call ago`
|
|
371
|
+
}, t)) })]
|
|
372
|
+
})]
|
|
373
|
+
}),
|
|
374
|
+
/* @__PURE__ */ (0, R.jsx)("span", {
|
|
375
|
+
className: "text-xs text-gray-500 dark:text-gray-400 mr-2",
|
|
376
|
+
children: ee
|
|
377
|
+
}),
|
|
378
|
+
/* @__PURE__ */ (0, R.jsx)(u, {
|
|
379
|
+
variant: "ghost",
|
|
380
|
+
size: "sm",
|
|
381
|
+
onClick: () => r(w, C.result),
|
|
382
|
+
className: "h-7 w-7 p-0",
|
|
383
|
+
title: "Copy result",
|
|
384
|
+
children: t === w ? /* @__PURE__ */ (0, R.jsx)(g, { className: "h-4 w-4" }) : /* @__PURE__ */ (0, R.jsx)(_, { className: "h-4 w-4" })
|
|
385
|
+
}),
|
|
386
|
+
i && /* @__PURE__ */ (0, R.jsx)(u, {
|
|
387
|
+
variant: "ghost",
|
|
388
|
+
size: "sm",
|
|
389
|
+
onClick: () => i(w),
|
|
390
|
+
className: "h-7 w-7 p-0",
|
|
391
|
+
title: "Delete result",
|
|
392
|
+
children: /* @__PURE__ */ (0, R.jsx)(M, { className: "h-4 w-4" })
|
|
393
|
+
}),
|
|
394
|
+
a && /* @__PURE__ */ (0, R.jsx)(u, {
|
|
395
|
+
variant: "ghost",
|
|
396
|
+
size: "sm",
|
|
397
|
+
onClick: () => a(w),
|
|
398
|
+
className: "h-7 w-7 p-0 sm:hidden",
|
|
399
|
+
title: "Fullscreen",
|
|
400
|
+
children: /* @__PURE__ */ (0, R.jsx)(D, { className: "h-4 w-4" })
|
|
401
|
+
}),
|
|
402
|
+
s && /* @__PURE__ */ (0, R.jsx)(u, {
|
|
403
|
+
variant: "ghost",
|
|
404
|
+
size: "sm",
|
|
405
|
+
onClick: s,
|
|
406
|
+
className: "h-7 w-7 p-0 hidden sm:flex",
|
|
407
|
+
title: c ? "Restore" : "Maximize",
|
|
408
|
+
children: c ? /* @__PURE__ */ (0, R.jsx)(k, { className: "h-4 w-4" }) : /* @__PURE__ */ (0, R.jsx)(D, { className: "h-4 w-4" })
|
|
409
|
+
})
|
|
410
|
+
]
|
|
411
|
+
})
|
|
412
|
+
]
|
|
413
|
+
}), /* @__PURE__ */ (0, R.jsx)("div", {
|
|
414
|
+
className: "flex-1 overflow-y-auto p-4",
|
|
415
|
+
children: T ? /* @__PURE__ */ (0, R.jsxs)("div", {
|
|
416
|
+
className: "bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded p-3",
|
|
417
|
+
children: [/* @__PURE__ */ (0, R.jsx)("p", {
|
|
418
|
+
className: "text-red-800 dark:text-red-300 font-medium",
|
|
419
|
+
children: "Error:"
|
|
420
|
+
}), /* @__PURE__ */ (0, R.jsx)("p", {
|
|
421
|
+
className: "text-red-700 dark:text-red-400 text-sm",
|
|
422
|
+
children: T
|
|
423
|
+
})]
|
|
424
|
+
}) : y && E ? /* @__PURE__ */ (0, R.jsx)("div", {
|
|
425
|
+
className: "space-y-3",
|
|
426
|
+
children: ("messages" in C.result ? C.result.messages : []).map((e, t) => /* @__PURE__ */ (0, R.jsx)(U, {
|
|
427
|
+
message: e,
|
|
428
|
+
index: t
|
|
429
|
+
}, t))
|
|
430
|
+
}) : /* @__PURE__ */ (0, R.jsx)(re, {
|
|
431
|
+
data: C.result,
|
|
432
|
+
filename: `prompt-result-${C.promptName}-${Date.now()}.json`
|
|
433
|
+
})
|
|
434
|
+
})]
|
|
435
|
+
})
|
|
436
|
+
})
|
|
437
|
+
});
|
|
438
|
+
}
|
|
439
|
+
//#endregion
|
|
440
|
+
//#region src/client/components/prompts/PromptsList.tsx
|
|
441
|
+
function ue({ prompts: e, selectedPrompt: t, onPromptSelect: n, focusedIndex: i }) {
|
|
442
|
+
return e.length === 0 ? /* @__PURE__ */ (0, R.jsxs)("div", {
|
|
443
|
+
className: "flex flex-1 flex-col items-center justify-center p-4 text-center",
|
|
444
|
+
children: [/* @__PURE__ */ (0, R.jsx)(O, { className: "h-12 w-12 text-gray-400 dark:text-gray-600 mb-3" }), /* @__PURE__ */ (0, R.jsx)("p", {
|
|
445
|
+
className: "text-gray-500 dark:text-gray-400",
|
|
446
|
+
children: "No prompts available"
|
|
447
|
+
})]
|
|
448
|
+
}) : /* @__PURE__ */ (0, R.jsx)("div", { children: e.map((e, a) => /* @__PURE__ */ (0, R.jsx)(T, {
|
|
449
|
+
id: `prompt-${e.name}`,
|
|
450
|
+
"data-testid": `prompt-item-${e.name}`,
|
|
451
|
+
isSelected: t?.name === e.name,
|
|
452
|
+
isFocused: i === a,
|
|
453
|
+
title: e.name,
|
|
454
|
+
description: e.description,
|
|
455
|
+
metadata: e.arguments && e.arguments.length > 0 && /* @__PURE__ */ (0, R.jsxs)(r, {
|
|
456
|
+
variant: "outline",
|
|
457
|
+
className: "text-xs border-gray-300 dark:border-zinc-600 text-gray-600 dark:text-gray-400",
|
|
458
|
+
children: [e.arguments.length, " args"]
|
|
459
|
+
}),
|
|
460
|
+
onClick: () => n(e)
|
|
461
|
+
}, e.name)) });
|
|
462
|
+
}
|
|
463
|
+
//#endregion
|
|
464
|
+
//#region src/client/components/prompts/SavedPromptsList.tsx
|
|
465
|
+
function de({ savedPrompts: e, selectedPrompt: t, onLoadPrompt: n, onDeletePrompt: r, focusedIndex: i }) {
|
|
466
|
+
return e.length === 0 ? /* @__PURE__ */ (0, R.jsxs)("div", {
|
|
467
|
+
className: "flex flex-1 flex-col items-center justify-center p-4 text-center",
|
|
468
|
+
children: [
|
|
469
|
+
/* @__PURE__ */ (0, R.jsx)(b, { className: "h-12 w-12 text-gray-400 dark:text-gray-600 mb-3" }),
|
|
470
|
+
/* @__PURE__ */ (0, R.jsx)("p", {
|
|
471
|
+
className: "text-gray-500 dark:text-gray-400",
|
|
472
|
+
children: "No history"
|
|
473
|
+
}),
|
|
474
|
+
/* @__PURE__ */ (0, R.jsx)("p", {
|
|
475
|
+
className: "text-sm text-gray-400 dark:text-gray-500 mt-1",
|
|
476
|
+
children: "Prompts you execute will appear here"
|
|
477
|
+
})
|
|
478
|
+
]
|
|
479
|
+
}) : /* @__PURE__ */ (0, R.jsx)("div", { children: e.map((e, r) => /* @__PURE__ */ (0, R.jsx)(T, {
|
|
480
|
+
id: `saved-prompt-${e.id}`,
|
|
481
|
+
isSelected: t?.id === e.id,
|
|
482
|
+
isFocused: i === r,
|
|
483
|
+
title: e.name,
|
|
484
|
+
description: `${e.promptName} - ${new Date(e.savedAt).toLocaleString()}`,
|
|
485
|
+
onClick: () => n(e)
|
|
486
|
+
}, e.id)) });
|
|
487
|
+
}
|
|
488
|
+
//#endregion
|
|
489
|
+
//#region src/client/components/PromptsTab.tsx
|
|
490
|
+
var fe = "mcp-inspector-saved-prompts";
|
|
491
|
+
function K({ ref: e, prompts: t, callPrompt: r, serverId: i, isConnected: a, refreshPrompts: o }) {
|
|
492
|
+
let [s, c] = (0, L.useState)(!1), [l, d] = (0, L.useState)(null), { selectedPromptName: f, setSelectedPromptName: p } = ae(), [m, te] = (0, L.useState)(null), [h, g] = (0, L.useState)("prompts"), [_, ne] = (0, L.useState)([]), [re, T] = (0, L.useState)(!1), [ie, D] = (0, L.useState)(""), [k, A] = (0, L.useState)(!1), [j, M] = (0, L.useState)(-1), N = (0, L.useRef)(null), [P, F] = (0, L.useState)(!1), [I, z] = (0, L.useState)("list"), [B, V] = (0, L.useState)(!1), { filteredPrompts: H, selectedPrompt: U, setSelectedPrompt: W, results: G, handleDeleteResult: K, promptArgs: pe, setPromptArgs: me, isExecuting: q, handlePromptSelect: J, handleArgChange: he, executeSelectedPrompt: ge, searchQuery: Y, setSearchQuery: X } = oe({
|
|
493
|
+
prompts: t,
|
|
494
|
+
callPrompt: r,
|
|
495
|
+
serverId: i
|
|
496
|
+
}), Z = E(), Q = E();
|
|
497
|
+
(0, L.useEffect)(() => {
|
|
498
|
+
let e = () => {
|
|
499
|
+
F(window.innerWidth < 1024);
|
|
500
|
+
};
|
|
501
|
+
return e(), window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
|
|
502
|
+
}, []), (0, L.useEffect)(() => {
|
|
503
|
+
z(U ? "detail" : "list");
|
|
504
|
+
}, [U]), (0, L.useEffect)(() => {
|
|
505
|
+
P && G.length > 0 && !q && z("response");
|
|
506
|
+
}, [
|
|
507
|
+
G,
|
|
508
|
+
q,
|
|
509
|
+
P
|
|
510
|
+
]), (0, L.useImperativeHandle)(e, () => ({
|
|
511
|
+
focusSearch: () => {
|
|
512
|
+
A(!0), setTimeout(() => {
|
|
513
|
+
N.current && N.current.focus();
|
|
514
|
+
}, 0);
|
|
515
|
+
},
|
|
516
|
+
blurSearch: () => {
|
|
517
|
+
X(""), A(!1), N.current && N.current.blur();
|
|
518
|
+
}
|
|
519
|
+
})), (0, L.useEffect)(() => {
|
|
520
|
+
try {
|
|
521
|
+
let e = localStorage.getItem(fe);
|
|
522
|
+
e && ne(JSON.parse(e));
|
|
523
|
+
} catch (e) {
|
|
524
|
+
console.error("[PromptsTab] Failed to load saved prompts:", e);
|
|
525
|
+
}
|
|
526
|
+
}, []);
|
|
527
|
+
let _e = (0, L.useCallback)((e) => {
|
|
528
|
+
try {
|
|
529
|
+
localStorage.setItem(fe, JSON.stringify(e));
|
|
530
|
+
} catch (e) {
|
|
531
|
+
console.error("[PromptsTab] Failed to save prompts:", e);
|
|
532
|
+
}
|
|
533
|
+
}, []);
|
|
534
|
+
(0, L.useEffect)(() => {
|
|
535
|
+
k && N.current && N.current.focus();
|
|
536
|
+
}, [k]);
|
|
537
|
+
let ve = (0, L.useCallback)(() => {
|
|
538
|
+
Y.trim() || A(!1);
|
|
539
|
+
}, [Y]), ye = (0, L.useCallback)(async () => {
|
|
540
|
+
if (o) {
|
|
541
|
+
c(!0);
|
|
542
|
+
try {
|
|
543
|
+
await o();
|
|
544
|
+
} finally {
|
|
545
|
+
c(!1);
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
}, [o]), $ = (0, L.useCallback)((e) => {
|
|
549
|
+
let n = t.find((t) => t.name === e.promptName);
|
|
550
|
+
n && (W(n), me(e.args), d(e));
|
|
551
|
+
}, [
|
|
552
|
+
t,
|
|
553
|
+
W,
|
|
554
|
+
me
|
|
555
|
+
]);
|
|
556
|
+
(0, L.useEffect)(() => {
|
|
557
|
+
M(-1);
|
|
558
|
+
}, [Y, h]), (0, L.useEffect)(() => {
|
|
559
|
+
let e = (e) => {
|
|
560
|
+
let t = e.target;
|
|
561
|
+
if (t.tagName === "INPUT" || t.tagName === "TEXTAREA" || t.contentEditable === "true" || e.metaKey || e.ctrlKey || e.altKey) return;
|
|
562
|
+
let n = h === "prompts" ? H : _;
|
|
563
|
+
if (e.key === "ArrowDown") e.preventDefault(), M((e) => {
|
|
564
|
+
let t = e + 1;
|
|
565
|
+
return t >= n.length ? 0 : t;
|
|
566
|
+
});
|
|
567
|
+
else if (e.key === "ArrowUp") e.preventDefault(), M((e) => {
|
|
568
|
+
let t = e - 1;
|
|
569
|
+
return t < 0 ? n.length - 1 : t;
|
|
570
|
+
});
|
|
571
|
+
else if (e.key === "Enter" && j >= 0) if (e.preventDefault(), h === "prompts") {
|
|
572
|
+
let e = H[j];
|
|
573
|
+
e && J(e);
|
|
574
|
+
} else {
|
|
575
|
+
let e = _[j];
|
|
576
|
+
e && $(e);
|
|
577
|
+
}
|
|
578
|
+
};
|
|
579
|
+
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
580
|
+
}, [
|
|
581
|
+
j,
|
|
582
|
+
H,
|
|
583
|
+
_,
|
|
584
|
+
h,
|
|
585
|
+
J,
|
|
586
|
+
$
|
|
587
|
+
]), (0, L.useEffect)(() => {
|
|
588
|
+
if (j >= 0) {
|
|
589
|
+
let e = h === "prompts" ? `prompt-${H[j]?.name}` : `saved-prompt-${_[j]?.id}`, t = document.getElementById(e);
|
|
590
|
+
t && t.scrollIntoView({
|
|
591
|
+
behavior: "smooth",
|
|
592
|
+
block: "nearest"
|
|
593
|
+
});
|
|
594
|
+
}
|
|
595
|
+
}, [
|
|
596
|
+
j,
|
|
597
|
+
H,
|
|
598
|
+
_,
|
|
599
|
+
h
|
|
600
|
+
]), (0, L.useEffect)(() => {
|
|
601
|
+
if (console.warn("[PromptsTab] Auto-selection effect triggered:", {
|
|
602
|
+
selectedPromptName: f,
|
|
603
|
+
promptsCount: t.length,
|
|
604
|
+
currentSelectedPrompt: U?.name
|
|
605
|
+
}), f && t.length > 0) {
|
|
606
|
+
let e = t.find((e) => e.name === f);
|
|
607
|
+
if (console.warn("[PromptsTab] Prompt lookup result:", {
|
|
608
|
+
selectedPromptName: f,
|
|
609
|
+
promptFound: !!e,
|
|
610
|
+
promptName: e?.name,
|
|
611
|
+
shouldSelect: e && U?.name !== e.name
|
|
612
|
+
}), e && U?.name !== e.name) {
|
|
613
|
+
console.warn("[PromptsTab] Selecting prompt:", e.name), p(null);
|
|
614
|
+
let t = setTimeout(() => {
|
|
615
|
+
J(e);
|
|
616
|
+
let t = document.getElementById(`prompt-${e.name}`);
|
|
617
|
+
t && (console.warn("[PromptsTab] Scrolling to prompt element"), t.scrollIntoView({
|
|
618
|
+
behavior: "smooth",
|
|
619
|
+
block: "nearest"
|
|
620
|
+
}));
|
|
621
|
+
}, 100);
|
|
622
|
+
return () => clearTimeout(t);
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
}, [
|
|
626
|
+
f,
|
|
627
|
+
t,
|
|
628
|
+
U,
|
|
629
|
+
J,
|
|
630
|
+
p
|
|
631
|
+
]);
|
|
632
|
+
let be = (0, L.useCallback)(async (e, t) => {
|
|
633
|
+
try {
|
|
634
|
+
await v(JSON.stringify(t, null, 2)), te(e), setTimeout(() => te(null), 2e3);
|
|
635
|
+
} catch (e) {
|
|
636
|
+
console.error("[PromptsTab] Failed to copy result:", e);
|
|
637
|
+
}
|
|
638
|
+
}, []), xe = (0, L.useCallback)((e) => {
|
|
639
|
+
if (P) z("response");
|
|
640
|
+
else {
|
|
641
|
+
let t = G[e];
|
|
642
|
+
if (t) {
|
|
643
|
+
let e = window.open("", "_blank", "width=800,height=600");
|
|
644
|
+
if (e) {
|
|
645
|
+
let n = t.result;
|
|
646
|
+
e.document.write(`
|
|
647
|
+
<html>
|
|
648
|
+
<head>
|
|
649
|
+
<title>${t.promptName} Result</title>
|
|
650
|
+
<style>
|
|
651
|
+
body { font-family: monospace; padding: 20px; background: #1e1e1e; color: #d4d4d4; }
|
|
652
|
+
pre { white-space: pre-wrap; word-wrap: break-word; }
|
|
653
|
+
</style>
|
|
654
|
+
</head>
|
|
655
|
+
<body>
|
|
656
|
+
<h2>${t.promptName}</h2>
|
|
657
|
+
<pre>${JSON.stringify(n, null, 2)}</pre>
|
|
658
|
+
</body>
|
|
659
|
+
</html>
|
|
660
|
+
`), e.document.close();
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
}, [P, G]), Se = (0, L.useCallback)(() => {
|
|
665
|
+
B ? (Z.current && Z.current.expand(), Q.current && Q.current.expand(), V(!1)) : (Z.current && Z.current.collapse(), Q.current && Q.current.collapse(), V(!0));
|
|
666
|
+
}, [
|
|
667
|
+
B,
|
|
668
|
+
Z,
|
|
669
|
+
Q
|
|
670
|
+
]), Ce = (0, L.useCallback)(() => {
|
|
671
|
+
U && (D(""), T(!0));
|
|
672
|
+
}, [U]), we = (0, L.useCallback)((e) => {
|
|
673
|
+
_e(_.filter((t) => t.id !== e)), l?.id === e && d(null);
|
|
674
|
+
}, [
|
|
675
|
+
_,
|
|
676
|
+
_e,
|
|
677
|
+
l
|
|
678
|
+
]);
|
|
679
|
+
return P ? /* @__PURE__ */ (0, R.jsxs)("div", {
|
|
680
|
+
className: "h-full flex flex-col overflow-hidden relative bg-background",
|
|
681
|
+
children: [I !== "list" && /* @__PURE__ */ (0, R.jsxs)("div", {
|
|
682
|
+
className: "flex items-center gap-2 p-2 border-b shrink-0 bg-background z-10",
|
|
683
|
+
children: [/* @__PURE__ */ (0, R.jsx)(u, {
|
|
684
|
+
variant: "ghost",
|
|
685
|
+
size: "sm",
|
|
686
|
+
onClick: () => {
|
|
687
|
+
I === "response" ? z("detail") : (W(null), z("list"));
|
|
688
|
+
},
|
|
689
|
+
className: "p-0 h-8 w-8",
|
|
690
|
+
children: /* @__PURE__ */ (0, R.jsx)(y, { className: "h-4 w-4" })
|
|
691
|
+
}), /* @__PURE__ */ (0, R.jsxs)("div", {
|
|
692
|
+
className: "flex items-center text-sm font-medium",
|
|
693
|
+
children: [
|
|
694
|
+
/* @__PURE__ */ (0, R.jsx)("button", {
|
|
695
|
+
onClick: () => {
|
|
696
|
+
W(null), z("list");
|
|
697
|
+
},
|
|
698
|
+
className: "text-muted-foreground hover:text-foreground hover:underline cursor-pointer",
|
|
699
|
+
children: "Prompts"
|
|
700
|
+
}),
|
|
701
|
+
I === "detail" && /* @__PURE__ */ (0, R.jsxs)(R.Fragment, { children: [/* @__PURE__ */ (0, R.jsx)("span", {
|
|
702
|
+
className: "mx-2 text-muted-foreground",
|
|
703
|
+
children: "/"
|
|
704
|
+
}), /* @__PURE__ */ (0, R.jsx)("button", {
|
|
705
|
+
onClick: () => {
|
|
706
|
+
z("response");
|
|
707
|
+
},
|
|
708
|
+
className: I === "detail" ? "text-foreground hover:underline" : I === "response" ? "text-muted-foreground hover:text-foreground hover:underline cursor-pointer" : "text-muted-foreground",
|
|
709
|
+
children: "Execute"
|
|
710
|
+
})] }),
|
|
711
|
+
I === "response" && /* @__PURE__ */ (0, R.jsxs)(R.Fragment, { children: [/* @__PURE__ */ (0, R.jsx)("span", {
|
|
712
|
+
className: "mx-2 text-muted-foreground",
|
|
713
|
+
children: "/"
|
|
714
|
+
}), /* @__PURE__ */ (0, R.jsx)("span", {
|
|
715
|
+
className: "text-foreground",
|
|
716
|
+
children: "Response"
|
|
717
|
+
})] })
|
|
718
|
+
]
|
|
719
|
+
})]
|
|
720
|
+
}), /* @__PURE__ */ (0, R.jsx)("div", {
|
|
721
|
+
className: "flex-1 relative overflow-hidden",
|
|
722
|
+
children: /* @__PURE__ */ (0, R.jsxs)(ee, {
|
|
723
|
+
initial: !1,
|
|
724
|
+
mode: "popLayout",
|
|
725
|
+
children: [
|
|
726
|
+
I === "list" && /* @__PURE__ */ (0, R.jsx)(n.div, {
|
|
727
|
+
initial: { x: "-100%" },
|
|
728
|
+
animate: { x: 0 },
|
|
729
|
+
exit: { x: "-100%" },
|
|
730
|
+
transition: {
|
|
731
|
+
type: "spring",
|
|
732
|
+
stiffness: 300,
|
|
733
|
+
damping: 30
|
|
734
|
+
},
|
|
735
|
+
className: "absolute inset-0 flex flex-col bg-background z-0",
|
|
736
|
+
children: /* @__PURE__ */ (0, R.jsx)(C, { children: (e) => /* @__PURE__ */ (0, R.jsxs)(R.Fragment, { children: [/* @__PURE__ */ (0, R.jsx)(se, {
|
|
737
|
+
isScrolled: e,
|
|
738
|
+
activeTab: h,
|
|
739
|
+
isSearchExpanded: k,
|
|
740
|
+
searchQuery: Y,
|
|
741
|
+
primaryTabName: "prompts",
|
|
742
|
+
secondaryTabName: "saved",
|
|
743
|
+
primaryTabTitle: "Prompts",
|
|
744
|
+
secondaryTabTitle: "History",
|
|
745
|
+
primaryCount: H.length,
|
|
746
|
+
secondaryCount: _.length,
|
|
747
|
+
primaryIcon: O,
|
|
748
|
+
secondaryIcon: b,
|
|
749
|
+
searchPlaceholder: "Search prompts...",
|
|
750
|
+
onSearchExpand: () => A(!0),
|
|
751
|
+
onSearchChange: X,
|
|
752
|
+
onSearchBlur: ve,
|
|
753
|
+
onTabSwitch: () => g(h === "prompts" ? "saved" : "prompts"),
|
|
754
|
+
searchInputRef: N,
|
|
755
|
+
onRefresh: o ? ye : void 0,
|
|
756
|
+
isRefreshing: s
|
|
757
|
+
}), h === "prompts" ? /* @__PURE__ */ (0, R.jsx)(ue, {
|
|
758
|
+
prompts: H,
|
|
759
|
+
selectedPrompt: U,
|
|
760
|
+
onPromptSelect: J,
|
|
761
|
+
focusedIndex: j
|
|
762
|
+
}) : /* @__PURE__ */ (0, R.jsx)(de, {
|
|
763
|
+
savedPrompts: _,
|
|
764
|
+
selectedPrompt: l,
|
|
765
|
+
onLoadPrompt: $,
|
|
766
|
+
onDeletePrompt: we,
|
|
767
|
+
focusedIndex: j
|
|
768
|
+
})] }) })
|
|
769
|
+
}, "list"),
|
|
770
|
+
I === "detail" && /* @__PURE__ */ (0, R.jsx)(n.div, {
|
|
771
|
+
initial: { x: "100%" },
|
|
772
|
+
animate: { x: 0 },
|
|
773
|
+
exit: { x: "-100%" },
|
|
774
|
+
transition: {
|
|
775
|
+
type: "spring",
|
|
776
|
+
stiffness: 300,
|
|
777
|
+
damping: 30
|
|
778
|
+
},
|
|
779
|
+
className: "absolute inset-0 bg-background z-10",
|
|
780
|
+
children: /* @__PURE__ */ (0, R.jsx)(ce, {
|
|
781
|
+
selectedPrompt: U,
|
|
782
|
+
promptArgs: pe,
|
|
783
|
+
isExecuting: q,
|
|
784
|
+
isConnected: a,
|
|
785
|
+
onArgChange: he,
|
|
786
|
+
onExecute: ge,
|
|
787
|
+
onSave: Ce
|
|
788
|
+
})
|
|
789
|
+
}, "detail"),
|
|
790
|
+
I === "response" && /* @__PURE__ */ (0, R.jsx)(n.div, {
|
|
791
|
+
initial: { x: "100%" },
|
|
792
|
+
animate: { x: 0 },
|
|
793
|
+
exit: { x: "100%" },
|
|
794
|
+
transition: {
|
|
795
|
+
type: "spring",
|
|
796
|
+
stiffness: 300,
|
|
797
|
+
damping: 30
|
|
798
|
+
},
|
|
799
|
+
className: "absolute inset-0 bg-background z-20",
|
|
800
|
+
children: /* @__PURE__ */ (0, R.jsx)(le, {
|
|
801
|
+
results: G,
|
|
802
|
+
copiedResult: m,
|
|
803
|
+
onCopy: be,
|
|
804
|
+
onDelete: K,
|
|
805
|
+
onFullscreen: xe
|
|
806
|
+
})
|
|
807
|
+
}, "response")
|
|
808
|
+
]
|
|
809
|
+
})
|
|
810
|
+
})]
|
|
811
|
+
}) : /* @__PURE__ */ (0, R.jsxs)(w, {
|
|
812
|
+
orientation: "horizontal",
|
|
813
|
+
className: "h-full",
|
|
814
|
+
children: [
|
|
815
|
+
/* @__PURE__ */ (0, R.jsx)(x, {
|
|
816
|
+
id: "left-panel",
|
|
817
|
+
panelRef: Z,
|
|
818
|
+
defaultSize: "33%",
|
|
819
|
+
collapsible: !0,
|
|
820
|
+
className: "flex flex-col h-full relative",
|
|
821
|
+
children: /* @__PURE__ */ (0, R.jsx)("div", {
|
|
822
|
+
className: "flex h-full flex-col overflow-hidden border-r dark:border-zinc-700",
|
|
823
|
+
children: /* @__PURE__ */ (0, R.jsx)(C, { children: (e) => /* @__PURE__ */ (0, R.jsxs)(R.Fragment, { children: [/* @__PURE__ */ (0, R.jsx)(se, {
|
|
824
|
+
isScrolled: e,
|
|
825
|
+
activeTab: h,
|
|
826
|
+
isSearchExpanded: k,
|
|
827
|
+
searchQuery: Y,
|
|
828
|
+
primaryTabName: "prompts",
|
|
829
|
+
secondaryTabName: "saved",
|
|
830
|
+
primaryTabTitle: "Prompts",
|
|
831
|
+
secondaryTabTitle: "History",
|
|
832
|
+
primaryCount: H.length,
|
|
833
|
+
secondaryCount: _.length,
|
|
834
|
+
primaryIcon: O,
|
|
835
|
+
secondaryIcon: b,
|
|
836
|
+
searchPlaceholder: "Search prompts...",
|
|
837
|
+
onSearchExpand: () => A(!0),
|
|
838
|
+
onSearchChange: X,
|
|
839
|
+
onSearchBlur: ve,
|
|
840
|
+
onTabSwitch: () => g(h === "prompts" ? "saved" : "prompts"),
|
|
841
|
+
searchInputRef: N,
|
|
842
|
+
onRefresh: o ? ye : void 0,
|
|
843
|
+
isRefreshing: s
|
|
844
|
+
}), h === "prompts" ? /* @__PURE__ */ (0, R.jsx)(ue, {
|
|
845
|
+
prompts: H,
|
|
846
|
+
selectedPrompt: U,
|
|
847
|
+
onPromptSelect: J,
|
|
848
|
+
focusedIndex: j
|
|
849
|
+
}) : /* @__PURE__ */ (0, R.jsx)(de, {
|
|
850
|
+
savedPrompts: _,
|
|
851
|
+
selectedPrompt: l,
|
|
852
|
+
onLoadPrompt: $,
|
|
853
|
+
onDeletePrompt: we,
|
|
854
|
+
focusedIndex: j
|
|
855
|
+
})] }) })
|
|
856
|
+
})
|
|
857
|
+
}),
|
|
858
|
+
/* @__PURE__ */ (0, R.jsx)(S, { withHandle: !0 }),
|
|
859
|
+
/* @__PURE__ */ (0, R.jsx)(x, {
|
|
860
|
+
defaultSize: "67%",
|
|
861
|
+
children: /* @__PURE__ */ (0, R.jsxs)(w, {
|
|
862
|
+
orientation: "vertical",
|
|
863
|
+
children: [
|
|
864
|
+
/* @__PURE__ */ (0, R.jsx)(x, {
|
|
865
|
+
panelRef: Q,
|
|
866
|
+
defaultSize: "40%",
|
|
867
|
+
collapsible: !0,
|
|
868
|
+
children: /* @__PURE__ */ (0, R.jsx)(ce, {
|
|
869
|
+
selectedPrompt: U,
|
|
870
|
+
promptArgs: pe,
|
|
871
|
+
isExecuting: q,
|
|
872
|
+
isConnected: a,
|
|
873
|
+
onArgChange: he,
|
|
874
|
+
onExecute: ge,
|
|
875
|
+
onSave: Ce
|
|
876
|
+
})
|
|
877
|
+
}),
|
|
878
|
+
/* @__PURE__ */ (0, R.jsx)(S, { withHandle: !0 }),
|
|
879
|
+
/* @__PURE__ */ (0, R.jsx)(x, {
|
|
880
|
+
defaultSize: "60%",
|
|
881
|
+
children: /* @__PURE__ */ (0, R.jsx)("div", {
|
|
882
|
+
className: "flex flex-col h-full",
|
|
883
|
+
children: /* @__PURE__ */ (0, R.jsx)(le, {
|
|
884
|
+
results: G,
|
|
885
|
+
copiedResult: m,
|
|
886
|
+
onCopy: be,
|
|
887
|
+
onDelete: K,
|
|
888
|
+
onFullscreen: xe,
|
|
889
|
+
onMaximize: Se,
|
|
890
|
+
isMaximized: B
|
|
891
|
+
})
|
|
892
|
+
})
|
|
893
|
+
})
|
|
894
|
+
]
|
|
895
|
+
})
|
|
896
|
+
})
|
|
897
|
+
]
|
|
898
|
+
});
|
|
899
|
+
}
|
|
900
|
+
K.displayName = "PromptsTab";
|
|
901
|
+
//#endregion
|
|
902
|
+
export { K as PromptsTab };
|