fix(mcp): properly save and display description field
- Initialize formDescription from initialData.description when editing - Save formDescription to server object before submitting - Display only description in list items, hide technical details - Show empty space when description is not available
This commit is contained in:
@@ -251,9 +251,6 @@ const McpPanel: React.FC<McpPanelProps> = ({ onClose, onNotify }) => {
|
||||
...(p.server as McpServer),
|
||||
enabled: false,
|
||||
} as McpServer;
|
||||
const details = [s.type, s.command, ...(s.args || [])].join(
|
||||
" · ",
|
||||
);
|
||||
return (
|
||||
<div
|
||||
key={`preset-${p.id}`}
|
||||
@@ -273,9 +270,11 @@ const McpPanel: React.FC<McpPanelProps> = ({ onClose, onNotify }) => {
|
||||
<h3 className="font-medium text-gray-900 dark:text-gray-100 mb-1">
|
||||
{p.id}
|
||||
</h3>
|
||||
<p className="text-sm text-gray-500 dark:text-gray-400 truncate">
|
||||
{details}
|
||||
</p>
|
||||
{p.description && (
|
||||
<p className="text-sm text-gray-500 dark:text-gray-400 truncate">
|
||||
{p.description}
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user