fix(openclaw): remove MCP/Skills/Prompts support from OpenClaw

OpenClaw only needs provider management functionality, not MCP, Skills,
or Prompts features. This commit removes the incorrectly added support:

- Revert SCHEMA_VERSION from 6 to 5 (remove v5->v6 migration)
- Remove enabled_openclaw field from mcp_servers and skills tables
- Remove openclaw field from McpApps and SkillApps structs
- Update DAO queries to exclude enabled_openclaw column
- Fix frontend components and types to exclude openclaw from MCP/Prompts
- Update all related test files
This commit is contained in:
Jason
2026-02-01 22:27:22 +08:00
parent d56e0b0344
commit 28b125b34f
15 changed files with 31 additions and 86 deletions
+6 -16
View File
@@ -15,8 +15,6 @@ pub struct McpApps {
pub gemini: bool,
#[serde(default)]
pub opencode: bool,
#[serde(default)]
pub openclaw: bool,
}
impl McpApps {
@@ -27,7 +25,7 @@ impl McpApps {
AppType::Codex => self.codex,
AppType::Gemini => self.gemini,
AppType::OpenCode => self.opencode,
AppType::OpenClaw => self.openclaw,
AppType::OpenClaw => false, // OpenClaw doesn't support MCP
}
}
@@ -38,7 +36,7 @@ impl McpApps {
AppType::Codex => self.codex = enabled,
AppType::Gemini => self.gemini = enabled,
AppType::OpenCode => self.opencode = enabled,
AppType::OpenClaw => self.openclaw = enabled,
AppType::OpenClaw => {} // OpenClaw doesn't support MCP, ignore
}
}
@@ -57,15 +55,12 @@ impl McpApps {
if self.opencode {
apps.push(AppType::OpenCode);
}
if self.openclaw {
apps.push(AppType::OpenClaw);
}
apps
}
/// 检查是否所有应用都未启用
pub fn is_empty(&self) -> bool {
!self.claude && !self.codex && !self.gemini && !self.opencode && !self.openclaw
!self.claude && !self.codex && !self.gemini && !self.opencode
}
}
@@ -80,8 +75,6 @@ pub struct SkillApps {
pub gemini: bool,
#[serde(default)]
pub opencode: bool,
#[serde(default)]
pub openclaw: bool,
}
impl SkillApps {
@@ -92,7 +85,7 @@ impl SkillApps {
AppType::Codex => self.codex,
AppType::Gemini => self.gemini,
AppType::OpenCode => self.opencode,
AppType::OpenClaw => self.openclaw,
AppType::OpenClaw => false, // OpenClaw doesn't support Skills
}
}
@@ -103,7 +96,7 @@ impl SkillApps {
AppType::Codex => self.codex = enabled,
AppType::Gemini => self.gemini = enabled,
AppType::OpenCode => self.opencode = enabled,
AppType::OpenClaw => self.openclaw = enabled,
AppType::OpenClaw => {} // OpenClaw doesn't support Skills, ignore
}
}
@@ -122,15 +115,12 @@ impl SkillApps {
if self.opencode {
apps.push(AppType::OpenCode);
}
if self.openclaw {
apps.push(AppType::OpenClaw);
}
apps
}
/// 检查是否所有应用都未启用
pub fn is_empty(&self) -> bool {
!self.claude && !self.codex && !self.gemini && !self.opencode && !self.openclaw
!self.claude && !self.codex && !self.gemini && !self.opencode
}
/// 仅启用指定应用(其他应用设为禁用)