feat: enable public skills by default

This commit is contained in:
hetaoBackend
2026-01-20 20:37:44 +08:00
parent dc8c1f4ed6
commit 2d931105d5
4 changed files with 15 additions and 5 deletions

View File

@@ -146,19 +146,20 @@ class ExtensionsConfig(BaseModel):
"""
return {name: config for name, config in self.mcp_servers.items() if config.enabled}
def is_skill_enabled(self, skill_name: str) -> bool:
def is_skill_enabled(self, skill_name: str, skill_category: str) -> bool:
"""Check if a skill is enabled.
Args:
skill_name: Name of the skill
skill_category: Category of the skill
Returns:
True if enabled, False otherwise (default if not in config)
True if enabled, False otherwise
"""
skill_config = self.skills.get(skill_name)
if skill_config is None:
# Default to disable if not in config
return False
# Default to enable for public skill, disable for custom
return skill_category == "public"
return skill_config.enabled