feat: add Skill Hub feature for managing community skills

- Implemented Skill Hub page with tabs for remote, local, and installed skills.
- Added localization support for Chinese in skill-hub.json.
- Created API routes for fetching remote skills, listing local skills, and managing installed skills.
- Developed functionality for installing and uninstalling skills from both remote and local sources.
- Introduced caching mechanism for remote skills and handling updates for installed skills.
This commit is contained in:
catlog22
2026-02-22 19:02:57 +08:00
parent 87634740a3
commit 367fb94718
23 changed files with 2952 additions and 171 deletions

View File

@@ -40,6 +40,7 @@ import help from './help.json';
import cliViewer from './cli-viewer.json';
import team from './team.json';
import terminalDashboard from './terminal-dashboard.json';
import skillHub from './skill-hub.json';
/**
* Flattens nested JSON object to dot-separated keys
@@ -103,4 +104,5 @@ export default {
...flattenMessages(cliViewer, 'cliViewer'),
...flattenMessages(team, 'team'),
...flattenMessages(terminalDashboard, 'terminalDashboard'),
...flattenMessages(skillHub, 'skillHub'),
} as Record<string, string>;

View File

@@ -36,7 +36,8 @@
"explorer": "File Explorer",
"graph": "Graph Explorer",
"teams": "Team Execution",
"terminalDashboard": "Terminal Dashboard"
"terminalDashboard": "Terminal Dashboard",
"skillHub": "Skill Hub"
},
"sidebar": {
"collapse": "Collapse",

View File

@@ -0,0 +1,42 @@
{
"skillHub.title": "Skill Hub",
"skillHub.description": "Discover and install shared skills from the community",
"skillHub.source.remote": "Remote",
"skillHub.source.local": "Local",
"skillHub.status.installed": "Installed",
"skillHub.status.updateAvailable": "Update Available",
"skillHub.tabs.remote": "Remote",
"skillHub.tabs.local": "Local",
"skillHub.tabs.installed": "Installed",
"skillHub.stats.remote": "Remote Skills",
"skillHub.stats.remoteDesc": "Available from community",
"skillHub.stats.local": "Local Skills",
"skillHub.stats.localDesc": "Shared locally",
"skillHub.stats.installed": "Installed",
"skillHub.stats.installedDesc": "Skills in use",
"skillHub.stats.updates": "Updates",
"skillHub.stats.updatesDesc": "New versions available",
"skillHub.search.placeholder": "Search skills...",
"skillHub.filter.allCategories": "All Categories",
"skillHub.actions.refresh": "Refresh",
"skillHub.actions.install": "Install",
"skillHub.actions.installing": "Installing...",
"skillHub.actions.update": "Update",
"skillHub.actions.uninstall": "Uninstall",
"skillHub.actions.viewDetails": "View Details",
"skillHub.card.tags": "Tags",
"skillHub.card.updated": "Updated: {date}",
"skillHub.install.success": "Skill '{name}' installed successfully",
"skillHub.install.error": "Failed to install skill: {error}",
"skillHub.uninstall.success": "Skill '{name}' uninstalled",
"skillHub.uninstall.error": "Failed to uninstall skill: {error}",
"skillHub.refresh.success": "Skill list refreshed",
"skillHub.details.comingSoon": "Details view coming soon",
"skillHub.error.loadFailed": "Failed to load skills. Check network connection.",
"skillHub.empty.remote.title": "No Remote Skills",
"skillHub.empty.remote.description": "Remote skill repository is empty or unreachable.",
"skillHub.empty.local.title": "No Local Skills",
"skillHub.empty.local.description": "Add skills to ~/.ccw/skill-hub/local/ to share them.",
"skillHub.empty.installed.title": "No Installed Skills",
"skillHub.empty.installed.description": "Install skills from Remote or Local tabs to use them."
}

View File

@@ -10,7 +10,8 @@
},
"location": {
"project": "Project",
"user": "Global"
"user": "Global",
"hub": "Hub"
},
"source": {
"builtin": "Built-in",

View File

@@ -40,6 +40,7 @@ import help from './help.json';
import cliViewer from './cli-viewer.json';
import team from './team.json';
import terminalDashboard from './terminal-dashboard.json';
import skillHub from './skill-hub.json';
/**
* Flattens nested JSON object to dot-separated keys
@@ -103,4 +104,5 @@ export default {
...flattenMessages(cliViewer, 'cliViewer'),
...flattenMessages(team, 'team'),
...flattenMessages(terminalDashboard, 'terminalDashboard'),
...flattenMessages(skillHub, 'skillHub'),
} as Record<string, string>;

View File

@@ -36,7 +36,8 @@
"explorer": "文件浏览器",
"graph": "图浏览器",
"teams": "团队执行",
"terminalDashboard": "终端仪表板"
"terminalDashboard": "终端仪表板",
"skillHub": "技能中心"
},
"sidebar": {
"collapse": "收起",

View File

@@ -0,0 +1,42 @@
{
"skillHub.title": "技能中心",
"skillHub.description": "发现并安装社区共享的技能",
"skillHub.source.remote": "远程",
"skillHub.source.local": "本地",
"skillHub.status.installed": "已安装",
"skillHub.status.updateAvailable": "有更新",
"skillHub.tabs.remote": "远程",
"skillHub.tabs.local": "本地",
"skillHub.tabs.installed": "已安装",
"skillHub.stats.remote": "远程技能",
"skillHub.stats.remoteDesc": "来自社区",
"skillHub.stats.local": "本地技能",
"skillHub.stats.localDesc": "本地共享",
"skillHub.stats.installed": "已安装",
"skillHub.stats.installedDesc": "使用中的技能",
"skillHub.stats.updates": "更新",
"skillHub.stats.updatesDesc": "有新版本可用",
"skillHub.search.placeholder": "搜索技能...",
"skillHub.filter.allCategories": "全部分类",
"skillHub.actions.refresh": "刷新",
"skillHub.actions.install": "安装",
"skillHub.actions.installing": "安装中...",
"skillHub.actions.update": "更新",
"skillHub.actions.uninstall": "卸载",
"skillHub.actions.viewDetails": "查看详情",
"skillHub.card.tags": "标签",
"skillHub.card.updated": "更新于: {date}",
"skillHub.install.success": "技能 '{name}' 安装成功",
"skillHub.install.error": "安装技能失败: {error}",
"skillHub.uninstall.success": "技能 '{name}' 已卸载",
"skillHub.uninstall.error": "卸载技能失败: {error}",
"skillHub.refresh.success": "技能列表已刷新",
"skillHub.details.comingSoon": "详情视图即将推出",
"skillHub.error.loadFailed": "加载技能失败。请检查网络连接。",
"skillHub.empty.remote.title": "暂无远程技能",
"skillHub.empty.remote.description": "远程技能仓库为空或无法访问。",
"skillHub.empty.local.title": "暂无本地技能",
"skillHub.empty.local.description": "将技能添加到 ~/.ccw/skill-hub/local/ 即可共享。",
"skillHub.empty.installed.title": "暂无已安装技能",
"skillHub.empty.installed.description": "从远程或本地标签页安装技能以使用它们。"
}

View File

@@ -10,7 +10,8 @@
},
"location": {
"project": "项目",
"user": "全局"
"user": "全局",
"hub": "仓库"
},
"source": {
"builtin": "内置",