fix(mcp): update MCP wizard to support http type and improve args input
- Replace deprecated 'sse' type with 'http' (as per Claude Code official docs) - Add HTTP-specific fields: url (required) and headers (optional) - Implement dynamic UI: show different fields based on selected type - Improve args input: support multi-line input (one argument per line) - Add headers parsing supporting both 'KEY: VALUE' and 'KEY=VALUE' formats - Update backend validation to enforce type-specific required fields - Update i18n translations (zh/en) with new HTTP-related labels
This commit is contained in:
@@ -55,11 +55,16 @@ export interface Settings {
|
||||
|
||||
// MCP 服务器定义(宽松:允许扩展字段)
|
||||
export interface McpServer {
|
||||
type: "stdio" | "sse";
|
||||
command: string;
|
||||
type: "stdio" | "http";
|
||||
// stdio 字段
|
||||
command?: string;
|
||||
args?: string[];
|
||||
env?: Record<string, string>;
|
||||
cwd?: string;
|
||||
// http 字段
|
||||
url?: string;
|
||||
headers?: Record<string, string>;
|
||||
// 通用字段
|
||||
enabled?: boolean; // 是否启用该 MCP 服务器,默认 true
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user