From 0ed0e39c350c21829b5a18e50e9b4b9061ec0d6c Mon Sep 17 00:00:00 2001 From: hzhang Date: Fri, 16 May 2025 15:56:36 +0100 Subject: [PATCH] improve: only show custom headers when transportType is sse --- client/src/components/Sidebar.tsx | 113 +++++++++++++++--------------- 1 file changed, 58 insertions(+), 55 deletions(-) diff --git a/client/src/components/Sidebar.tsx b/client/src/components/Sidebar.tsx index c5fad18..02d30a5 100644 --- a/client/src/components/Sidebar.tsx +++ b/client/src/components/Sidebar.tsx @@ -362,7 +362,64 @@ const Sidebar = ({ )} + {transportType === "sse" && ( +
+ + {showCustomHeaders && ( +
+ {customHeaders.map((header, index) => ( +
+ + updateCustomHeader(index, 'key', e.target.value)} + className="font-mono" + /> + + updateCustomHeader(index, 'value', e.target.value)} + className="font-mono" + /> + +
+ ))} + +
+ )} +
+ )} {transportType === "stdio" && (
- {showCustomHeaders && ( -
- {customHeaders.map((header, index) => ( -
- - updateCustomHeader(index, 'key', e.target.value)} - className="font-mono" - /> - - updateCustomHeader(index, 'value', e.target.value)} - className="font-mono" - /> - -
- ))} - -
- )} -
+