- 作品库卡片重设计:书脊封面字块 + 衬线书名 + 一句话故事(缺失给占位) + 元信息行(题材徽章/StatusDot 待审/mono 时间),Card tone=card 浮起消塌陷 - EmptyState 中性化 + inline/card/bare 变体 + eyebrow(向后兼容) - loading 骨架化(Skeleton 拼作品库结构,motion-safe) - 设置页拆分 ProvidersSettings 489→198 + 5 个子组件,凭据点用 StatusDot - 次级页(向导/模板/codex/大纲)排版字阶与圆角 token 收敛
25 lines
753 B
TypeScript
25 lines
753 B
TypeScript
import { Badge } from "@/components/ui/Badge";
|
|
import type { CapabilitiesView } from "@/lib/api/types";
|
|
|
|
// 探活结果的能力徽章:结构化输出 / 前缀缓存 / 思考,各显示开关态。
|
|
export function CapabilityBadges({ caps }: { caps: CapabilitiesView }) {
|
|
const badges: { on: boolean; label: string }[] = [
|
|
{ on: caps.structured_output, label: "结构化" },
|
|
{ on: caps.prefix_cache, label: "前缀缓存" },
|
|
{ on: caps.thinking, label: "思考" },
|
|
];
|
|
return (
|
|
<div className="flex gap-1.5">
|
|
{badges.map((b) => (
|
|
<Badge
|
|
key={b.label}
|
|
variant={b.on ? "accent" : "neutral"}
|
|
className="text-2xs"
|
|
>
|
|
{b.label}
|
|
</Badge>
|
|
))}
|
|
</div>
|
|
);
|
|
}
|