feat(*): 生图与视频工作台 - 新增独立生成流程并整合平台配置

This commit is contained in:
ddcat666
2026-10-13 08:54:53 +08:00
parent 4c1d2b4012
commit 1f3f2c6020
69 changed files with 7108 additions and 87 deletions

View File

@@ -8,3 +8,17 @@ export const modelTagColors = [
] as const;
export type ModelTag = { text: string; color: typeof modelTagColors[number]["value"] };
export function videoReferenceCapabilityTag(references?: { maxImages?: number; maxVideos?: number; maxAudios?: number }): ModelTag | undefined {
if (!references) return undefined;
const counts = [
["图", references.maxImages],
["视", references.maxVideos],
["音", references.maxAudios],
] as const;
const text = counts
.filter(([, count]) => typeof count === "number" && Number.isFinite(count) && count > 0)
.map(([label, count]) => `${label}×${count}`)
.join(" · ");
return text ? { text, color: "green" } : undefined;
}