feat: enhance SortableSkillRow to display tool whitelist and examples count

This commit is contained in:
mlogclub
2026-04-12 10:19:07 +08:00
parent dce9c5eb25
commit 22b2a08e13
@@ -148,10 +148,33 @@ function SortableSkillRow({
<div className="flex flex-wrap items-center gap-2">
<div className="font-medium">{item.name}</div>
<Badge variant="outline">{item.code}</Badge>
<Badge variant="secondary">
{item.toolWhitelist.length}
</Badge>
<Badge variant="secondary">
{item.examples.length}
</Badge>
</div>
<div className="mt-1 line-clamp-2 text-sm text-muted-foreground">
{item.description || "暂无描述"}
</div>
<div className="mt-2 line-clamp-2 text-xs leading-5 text-muted-foreground">
{item.instruction || "暂无技能说明"}
</div>
{item.toolWhitelist.length > 0 ? (
<div className="mt-2 flex flex-wrap gap-2">
{item.toolWhitelist.slice(0, 3).map((toolCode) => (
<Badge key={toolCode} variant="outline">
{toolCode}
</Badge>
))}
{item.toolWhitelist.length > 3 ? (
<Badge variant="outline">
+{item.toolWhitelist.length - 3}
</Badge>
) : null}
</div>
) : null}
</div>
</div>
</TableCell>