feat(mcp): enhance wizard with title field and optimize placeholders

- Add MCP title field to wizard (required)
- Remove working directory (cwd) field and related logic
- Update wizard callback to return both title and JSON
- Optimize placeholder text for better user guidance:
  - Command: "npx or uvx"
  - Args: "arg1\narg2"
  - Env: "KEY1=value1\nKEY2=value2"
  - Headers: "Authorization: Bearer your_token_here\n..."
- Simplify args label by removing "(one per line)" hint
- Update parent component to handle title from wizard
This commit is contained in:
Jason
2025-10-11 11:43:32 +08:00
parent 2a60d20841
commit a6ee3ba35f
4 changed files with 35 additions and 41 deletions

View File

@@ -152,7 +152,8 @@ const McpFormModal: React.FC<McpFormModalProps> = ({
setJsonError("");
};
const handleWizardApply = (json: string) => {
const handleWizardApply = (title: string, json: string) => {
setFormId(title);
setFormJson(json);
setJsonError(validateJson(json));
};