diff --git a/frontend-web/src/components/workspace/agents/skill-transfer-selector.tsx b/frontend-web/src/components/workspace/agents/skill-transfer-selector.tsx index c9ba7372..f1ec5e02 100644 --- a/frontend-web/src/components/workspace/agents/skill-transfer-selector.tsx +++ b/frontend-web/src/components/workspace/agents/skill-transfer-selector.tsx @@ -45,11 +45,32 @@ function skillLabel(skill: Skill) { function matchesQuery(skill: Skill, q: string) { if (!q) return true; - return ( - skill.name.toLowerCase().includes(q) || - (skill.name_zh ?? "").toLowerCase().includes(q) || - (skill.description ?? "").toLowerCase().includes(q) - ); + const haystack = [ + skill.name, + skill.name_zh, + skill.description, + skill.detail, + skill.category, + skill.license, + skill.source, + skill.state, + skill.owner_username, + skill.created_at, + skill.last_activity_at, + skill.use_count != null ? `使用 ${skill.use_count}` : null, + skill.view_count != null ? `查看 ${skill.view_count}` : null, + skill.patch_count != null ? `变迁 ${skill.patch_count}` : null, + ...(skill.tags ?? []).flatMap((tag) => [ + tag.name, + tag.description, + tag.color, + tag.usage_count != null ? `标签使用 ${tag.usage_count}` : null, + ]), + ] + .filter((value): value is string => typeof value === "string" && value.length > 0) + .join(" ") + .toLowerCase(); + return haystack.includes(q); } export function SkillTransferSelector({ @@ -159,7 +180,7 @@ export function SkillTransferSelector({
{ setSearch(e.currentTarget.value); @@ -239,7 +260,7 @@ export function SkillTransferSelector({ {/* Two-column transfer panes */}
diff --git a/frontend-web/src/components/workspace/settings/skill-settings-page.tsx b/frontend-web/src/components/workspace/settings/skill-settings-page.tsx index 67db57a4..4f6a3e7d 100644 --- a/frontend-web/src/components/workspace/settings/skill-settings-page.tsx +++ b/frontend-web/src/components/workspace/settings/skill-settings-page.tsx @@ -470,11 +470,11 @@ function SkillSettingsList({ onClose }: { onClose?: () => void }) { - @@ -497,11 +497,16 @@ function SkillSettingsList({ onClose }: { onClose?: () => void }) { 名称 Z-A - - } - /> - {publisher && ( -
+
+ } + /> + {!isLoading && !error && ( +
+ 共 {orderedSkills.length} 个技能 +
+ )} + {publisher && ( +
筛选发布者:
- {enabledSkills.length > 0 && ( -
- - setSkillSearch(e.currentTarget.value)} - className="h-8 pl-7 text-xs" - /> -
- )} -
- {isSkillsLoading ? ( -

技能加载中...

- ) : enabledSkills.length === 0 ? ( -

- 当前没有可用技能。 -

- ) : filteredSkills.length === 0 ? ( -

- 没有匹配的技能。 -

- ) : ( -
- {filteredSkills.map((skill) => { - const checked = selectedSkills.includes(skill.name); - return ( -
- - -
- ); - })} -
- )} -
+