From 3d108dd08edf57bfbee2a4c7be3f35d40df7a751 Mon Sep 17 00:00:00 2001 From: chiguyong Date: Tue, 23 Jun 2026 19:41:54 +0800 Subject: [PATCH] fix(skills): P3 frontend polish for skill/agent category split MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - skills.ts: make category/agent_type/execution_mode/task_mode optional in ISkillInfo and ISkillDetail for backward compat during rollout - SkillCard.vue: remove dead size="small" on a-tag, add title attr for a11y, add isEngine computed, CSS fallback cleanup, category fallback in class binding - SkillsView.vue: fix a-empty condition to use grouped counts so orphan skills (category mismatch) don't render a blank page - SkillsTab.vue: add type tag (引擎/技能) and category-based icon (thunderbolt for engine, appstore for business), remove size="small", add engine icon color variant --- .../server/frontend/src/api/skills.ts | 18 +++++------ .../src/components/layout/tabs/SkillsTab.vue | 31 +++++++++++++++++-- .../src/components/skills/SkillCard.vue | 30 ++++++++---------- .../server/frontend/src/views/SkillsView.vue | 2 +- 4 files changed, 51 insertions(+), 30 deletions(-) diff --git a/src/agentkit/server/frontend/src/api/skills.ts b/src/agentkit/server/frontend/src/api/skills.ts index 6586b42..9451000 100644 --- a/src/agentkit/server/frontend/src/api/skills.ts +++ b/src/agentkit/server/frontend/src/api/skills.ts @@ -13,11 +13,11 @@ export interface ISkillInfo { capabilities: string[] dependencies: string[] status: string - /** "agent_template" = 通用执行引擎 (react/direct/rewoo/...); "business_skill" = 业务领域技能 */ - category: SkillCategory - agent_type: string - execution_mode: string - task_mode: string + /** "agent_template" = 通用执行引擎 (react/direct/rewoo/...); "business_skill" = 业务领域技能. Optional for backward compat during rollout. */ + category?: SkillCategory + agent_type?: string + execution_mode?: string + task_mode?: string } export interface ISkillDetail { @@ -28,10 +28,10 @@ export interface ISkillDetail { dependencies: string[] config: Record health_status: string - category: SkillCategory - agent_type: string - execution_mode: string - task_mode: string + category?: SkillCategory + agent_type?: string + execution_mode?: string + task_mode?: string } export interface ICapabilityInfo { diff --git a/src/agentkit/server/frontend/src/components/layout/tabs/SkillsTab.vue b/src/agentkit/server/frontend/src/components/layout/tabs/SkillsTab.vue index 7f41deb..a0ca3e4 100644 --- a/src/agentkit/server/frontend/src/components/layout/tabs/SkillsTab.vue +++ b/src/agentkit/server/frontend/src/components/layout/tabs/SkillsTab.vue @@ -20,11 +20,19 @@ v-for="skill in skillsStore.skills" :key="skill.name" class="skills-tab__item" + :class="`skills-tab__item--${skill.category || 'business_skill'}`" @click="openSkill(skill.name)" >
- + {{ skill.name }} + + {{ isEngine(skill) ? '引擎' : '技能' }} +

{{ skill.description || '暂无描述' }}

- + {{ cap }} @@ -53,13 +61,22 @@