feat(*): 生图与视频工作台 - 新增独立生成流程并整合平台配置
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user