feat: enhance SortableSkillRow to display tool whitelist and examples count
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user