From 9b9d0c8006307eb688e1b298af5a6b89b2381870 Mon Sep 17 00:00:00 2001 From: matevip Date: Fri, 1 May 2026 09:51:52 +0800 Subject: [PATCH] =?UTF-8?q?refactor(skill):=20trim=20Skills=20page=20?= =?UTF-8?q?=E2=80=94=20slim=20card=20+=20single=20status=20pill=20+=20draw?= =?UTF-8?q?er-owned=20Security?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mateclaw-ui/src/i18n/locales/en-US.ts | 15 + mateclaw-ui/src/i18n/locales/zh-CN.ts | 15 + mateclaw-ui/src/views/SkillMarket.vue | 466 ++++++++++++++------------ 3 files changed, 288 insertions(+), 208 deletions(-) diff --git a/mateclaw-ui/src/i18n/locales/en-US.ts b/mateclaw-ui/src/i18n/locales/en-US.ts index f15cc732..39d7494e 100644 --- a/mateclaw-ui/src/i18n/locales/en-US.ts +++ b/mateclaw-ui/src/i18n/locales/en-US.ts @@ -1988,6 +1988,7 @@ export default { security: { scanned: 'Scanned', scanFailed: 'Scan failed', + notScanned: 'Not scanned', findingsTitle: 'Security scan failed', rescan: 'Rescan', rescanning: 'Scanning...', @@ -1997,6 +1998,14 @@ export default { noPersistedFindings: 'No persisted findings for this scan. Click "Rescan" to regenerate.', fix: 'Suggested fix', }, + status: { + ready: 'Ready', + setupNeeded: 'Setup needed', + blocked: 'Blocked', + unresolved: 'Unresolved', + disabled: 'Disabled', + checking: 'Checking…', + }, empty: 'No skills found', emptyDesc: 'Add skills to enhance your agents\' capabilities', noDescription: 'No description', @@ -2073,8 +2082,14 @@ export default { manifest: 'Manifest', tools: 'Tools', features: 'Features', + security: 'Security', lessons: 'Lessons', memory: 'Memory', + scanStatus: 'Scan status', + missingDeps: 'Missing dependencies', + runtimeError: 'Runtime error', + path: 'Resolved path', + synthesized: 'Source', noManifest: 'This skill does not declare a v3 manifest. Legacy fields apply.', noTools: 'No allowed-tools declared by this skill. The LLM will fall back to the global tool set when this skill is bound to an agent.', noFeatures: 'No features[] matrix declared. The skill is treated as a single default feature.', diff --git a/mateclaw-ui/src/i18n/locales/zh-CN.ts b/mateclaw-ui/src/i18n/locales/zh-CN.ts index f42955b1..1317f3ba 100644 --- a/mateclaw-ui/src/i18n/locales/zh-CN.ts +++ b/mateclaw-ui/src/i18n/locales/zh-CN.ts @@ -1990,6 +1990,7 @@ export default { security: { scanned: '已扫描', scanFailed: '扫描失败', + notScanned: '未扫描', findingsTitle: '安全扫描失败', rescan: '重新扫描', rescanning: '扫描中...', @@ -1999,6 +2000,14 @@ export default { noPersistedFindings: '本次尚无持久化的扫描详情,点击"重新扫描"以重新生成。', fix: '修复建议', }, + status: { + ready: '就绪', + setupNeeded: '需配置', + blocked: '已拦截', + unresolved: '未解析', + disabled: '已禁用', + checking: '检查中…', + }, empty: '暂无技能', emptyDesc: '添加技能以增强 Agent 的能力', noDescription: '暂无描述', @@ -2075,8 +2084,14 @@ export default { manifest: 'Manifest', tools: '工具', features: '特性', + security: '安全', lessons: '经验', memory: '记忆', + scanStatus: '扫描状态', + missingDeps: '缺失依赖', + runtimeError: '运行时错误', + path: '解析路径', + synthesized: '来源', noManifest: '该技能未声明 v3 manifest,使用旧字段。', noTools: '该 skill 未声明 allowed-tools。绑定到 agent 时 LLM 将回退到全局工具集。', noFeatures: '未声明 features[] 矩阵,技能被视为单一默认特性。', diff --git a/mateclaw-ui/src/views/SkillMarket.vue b/mateclaw-ui/src/views/SkillMarket.vue index 7d6d5b42..ab873254 100644 --- a/mateclaw-ui/src/views/SkillMarket.vue +++ b/mateclaw-ui/src/views/SkillMarket.vue @@ -64,170 +64,82 @@ - +
-
-
-
- {{ skill.icon || getSkillIcon(skill.skillType) }} -
-
-

{{ resolveSkillName(skill) }}

- -
{{ skill.name }}
-
- - {{ getSkillTypeLabel(skill.skillType) }} +
+
+
+ {{ skill.icon || getSkillIcon(skill.skillType) }} +
+
+

{{ resolveSkillName(skill) }}

+ +
{{ skill.name }}
+
+ +
+ +

{{ skill.description || t('skills.noDescription') }}

+ + +
+ + {{ getStatusPill(skill).label }} + {{ getSourceLabel(skill) }} v{{ skill.version }}
-
- -
-

{{ skill.description || t('skills.noDescription') }}

- -
- - {{ getRuntimeLabel(skill) }} - - - - 🤖 AI - - - - - ✓ {{ t('skills.security.scanned') }} - - - - {{ getSecurityBadge(skill)?.label }} - - - - {{ getDependencyBadge(skill)?.label }} - - - - {{ getFeaturesBadge(skill)?.label }} - - {{ getSourceBadge(skill) }} - - {{ getSourceLabel(skill) }} - - 👥 {{ getUsedByCount(skill) }} - - - 💡 {{ getLessonsCount(skill) }} - - {{ getRuntimePath(skill) }} -
- -
- Missing: {{ getMissingDeps(skill).join(', ') }} -
- -
- {{ getSecurityFindingsSummary(skill) }} -
-
{{ getRuntimeError(skill) }}
- - -
-
- - {{ t('skills.security.findingsTitle') }} - - · {{ formatScanTime(skill.securityScanTime) }} - - - -
-
    -
  • -
    - [{{ f.severity || 'INFO' }}] - {{ f.ruleId || f.category || '—' }} - - {{ f.filePath }}:{{ f.lineNumber }} - +
  • -
-
- {{ t('skills.security.noPersistedFindings') }} -
-
- -
- {{ tag }} -
- +
@@ -285,6 +197,9 @@ {{ t('skills.detail.features') }} {{ detailFeaturesCount }} + @@ -334,6 +249,72 @@
+ +
+
+ {{ t('skills.detail.scanStatus') }}: + + {{ getScanPillLabel(detailSkill) }} + + + · {{ formatScanTime(detailSkill.securityScanTime) }} + + +
+ + +
+ {{ t('skills.security.noPersistedFindings') }} +
+ +
+ {{ t('skills.detail.missingDeps') }}: + {{ getMissingDeps(detailSkill).join(', ') }} +
+ +
+ {{ t('skills.detail.runtimeError') }}: + {{ getRuntimeError(detailSkill) }} +
+ +
+ {{ t('skills.detail.path') }}: + {{ getRuntimePath(detailSkill) }} +
+ +
+ {{ t('skills.detail.synthesized') }}: + 🤖 {{ t('skills.source.synthesized') }} +
+
+