fix(mcp): remove SSE support; keep stdio default when type is omitted

- Backend: reject "sse" in validators; accept missing type as stdio; require url only for http (mcp.rs, claude_mcp.rs)
- Frontend: McpServer.type narrowed to "stdio" | "http" (optional) (src/types.ts)
- UI: avoid undefined in list item details (McpListItem)
- Claude-only sync after delete to update ~/.claude.json (commands.rs)

Notes:
- Ran typecheck and cargo check: both pass
- Clippy shows advisory warnings unrelated to this change
- Prettier check warns on a few files; limited scope changes kept minimal
This commit is contained in:
Jason
2025-10-09 22:02:56 +08:00
parent f6bf8611cd
commit 511980e3ea
9 changed files with 152 additions and 71 deletions

View File

@@ -55,7 +55,8 @@ export interface Settings {
// MCP 服务器定义(宽松:允许扩展字段)
export interface McpServer {
type: "stdio" | "http";
// 可选:社区常见 .mcp.json 中 stdio 配置可不写 type
type?: "stdio" | "http";
// stdio 字段
command?: string;
args?: string[];