add label to configItem, use that in UI
This commit is contained in:
@@ -105,8 +105,7 @@ const App = () => {
|
|||||||
Object.entries(mergedConfig).forEach(([key, value]) => {
|
Object.entries(mergedConfig).forEach(([key, value]) => {
|
||||||
mergedConfig[key as keyof InspectorConfig] = {
|
mergedConfig[key as keyof InspectorConfig] = {
|
||||||
...value,
|
...value,
|
||||||
description:
|
label: DEFAULT_INSPECTOR_CONFIG[key as keyof InspectorConfig].label,
|
||||||
DEFAULT_INSPECTOR_CONFIG[key as keyof InspectorConfig].description,
|
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -326,7 +326,7 @@ const Sidebar = ({
|
|||||||
<div key={key} className="space-y-2">
|
<div key={key} className="space-y-2">
|
||||||
<div className="flex items-center gap-1">
|
<div className="flex items-center gap-1">
|
||||||
<label className="text-sm font-medium text-green-600 break-all">
|
<label className="text-sm font-medium text-green-600 break-all">
|
||||||
{configItem.description}
|
{configItem.label}
|
||||||
</label>
|
</label>
|
||||||
<Tooltip>
|
<Tooltip>
|
||||||
<TooltipTrigger asChild>
|
<TooltipTrigger asChild>
|
||||||
|
|||||||
@@ -343,7 +343,8 @@ describe("Sidebar Environment Variables", () => {
|
|||||||
expect(setConfig).toHaveBeenCalledWith(
|
expect(setConfig).toHaveBeenCalledWith(
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
MCP_SERVER_REQUEST_TIMEOUT: {
|
MCP_SERVER_REQUEST_TIMEOUT: {
|
||||||
description: "Request Timeout",
|
label: "Request Timeout",
|
||||||
|
description: "Timeout for requests to the MCP server (ms)",
|
||||||
value: 5000,
|
value: 5000,
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
@@ -366,7 +367,9 @@ describe("Sidebar Environment Variables", () => {
|
|||||||
expect(setConfig).toHaveBeenCalledWith(
|
expect(setConfig).toHaveBeenCalledWith(
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
MCP_PROXY_FULL_ADDRESS: {
|
MCP_PROXY_FULL_ADDRESS: {
|
||||||
description: "Inspector Proxy Address",
|
label: "Inspector Proxy Address",
|
||||||
|
description:
|
||||||
|
"Set this if you are running the MCP Inspector Proxy on a non-default address. Example: http://10.1.1.22:5577",
|
||||||
value: "http://localhost:8080",
|
value: "http://localhost:8080",
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
@@ -389,7 +392,9 @@ describe("Sidebar Environment Variables", () => {
|
|||||||
expect(setConfig).toHaveBeenCalledWith(
|
expect(setConfig).toHaveBeenCalledWith(
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
MCP_REQUEST_MAX_TOTAL_TIMEOUT: {
|
MCP_REQUEST_MAX_TOTAL_TIMEOUT: {
|
||||||
description: "Maximum Total Timeout",
|
label: "Maximum Total Timeout",
|
||||||
|
description:
|
||||||
|
"Maximum total timeout for requests sent to the MCP server (ms) (Use with progress notifications)",
|
||||||
value: 10000,
|
value: 10000,
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
@@ -410,7 +415,8 @@ describe("Sidebar Environment Variables", () => {
|
|||||||
expect(setConfig).toHaveBeenCalledWith(
|
expect(setConfig).toHaveBeenCalledWith(
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
MCP_SERVER_REQUEST_TIMEOUT: {
|
MCP_SERVER_REQUEST_TIMEOUT: {
|
||||||
description: "Request Timeout",
|
label: "Request Timeout",
|
||||||
|
description: "Timeout for requests to the MCP server (ms)",
|
||||||
value: 0,
|
value: 0,
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
@@ -455,7 +461,8 @@ describe("Sidebar Environment Variables", () => {
|
|||||||
expect(setConfig).toHaveBeenLastCalledWith(
|
expect(setConfig).toHaveBeenLastCalledWith(
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
MCP_SERVER_REQUEST_TIMEOUT: {
|
MCP_SERVER_REQUEST_TIMEOUT: {
|
||||||
description: "Request Timeout",
|
label: "Request Timeout",
|
||||||
|
description: "Timeout for requests to the MCP server (ms)",
|
||||||
value: 3000,
|
value: 3000,
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
export type ConfigItem = {
|
export type ConfigItem = {
|
||||||
|
label: string;
|
||||||
description: string;
|
description: string;
|
||||||
value: string | number | boolean;
|
value: string | number | boolean;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -22,19 +22,25 @@ export const DEFAULT_MCP_PROXY_LISTEN_PORT = "6277";
|
|||||||
**/
|
**/
|
||||||
export const DEFAULT_INSPECTOR_CONFIG: InspectorConfig = {
|
export const DEFAULT_INSPECTOR_CONFIG: InspectorConfig = {
|
||||||
MCP_SERVER_REQUEST_TIMEOUT: {
|
MCP_SERVER_REQUEST_TIMEOUT: {
|
||||||
description: "Request Timeout",
|
label: "Request Timeout",
|
||||||
|
description: "Timeout for requests to the MCP server (ms)",
|
||||||
value: 10000,
|
value: 10000,
|
||||||
},
|
},
|
||||||
MCP_REQUEST_TIMEOUT_RESET_ON_PROGRESS: {
|
MCP_REQUEST_TIMEOUT_RESET_ON_PROGRESS: {
|
||||||
description: "Reset Timeout on Progress",
|
label: "Reset Timeout on Progress",
|
||||||
|
description: "Reset timeout on progress notifications",
|
||||||
value: true,
|
value: true,
|
||||||
},
|
},
|
||||||
MCP_REQUEST_MAX_TOTAL_TIMEOUT: {
|
MCP_REQUEST_MAX_TOTAL_TIMEOUT: {
|
||||||
description: "Maximum Total Timeout",
|
label: "Maximum Total Timeout",
|
||||||
|
description:
|
||||||
|
"Maximum total timeout for requests sent to the MCP server (ms) (Use with progress notifications)",
|
||||||
value: 60000,
|
value: 60000,
|
||||||
},
|
},
|
||||||
MCP_PROXY_FULL_ADDRESS: {
|
MCP_PROXY_FULL_ADDRESS: {
|
||||||
description: "Inspector Proxy Address",
|
label: "Inspector Proxy Address",
|
||||||
|
description:
|
||||||
|
"Set this if you are running the MCP Inspector Proxy on a non-default address. Example: http://10.1.1.22:5577",
|
||||||
value: "",
|
value: "",
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|||||||
Reference in New Issue
Block a user