auto-save 2026-05-19 00:56 (~5)
This commit is contained in:
@@ -266,6 +266,19 @@
|
|||||||
"message": "auto-save 2026-05-19 00:45 (~5)",
|
"message": "auto-save 2026-05-19 00:45 (~5)",
|
||||||
"hash": "54f47e3",
|
"hash": "54f47e3",
|
||||||
"files_changed": 5
|
"files_changed": 5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ts": "2026-05-19T00:51:15+08:00",
|
||||||
|
"type": "commit",
|
||||||
|
"message": "auto-save 2026-05-19 00:51 (~6)",
|
||||||
|
"hash": "79b519e",
|
||||||
|
"files_changed": 6
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ts": "2026-05-18T16:51:36Z",
|
||||||
|
"type": "session-end",
|
||||||
|
"message": "Codex 会话结束 · 持续 0 秒 · 最近命令:codex · 分支 master · 2 项未提交变更 · 最近提交:auto-save 2026-05-19 00:51 (~6)",
|
||||||
|
"files_changed": 2
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import type { GeneratePackRequest, GeneratePackResponse, PackKind } from '@/lib/
|
|||||||
export const runtime = 'nodejs';
|
export const runtime = 'nodejs';
|
||||||
export const dynamic = 'force-dynamic';
|
export const dynamic = 'force-dynamic';
|
||||||
|
|
||||||
const PACK_KINDS: PackKind[] = ['patent', 'production', 'marketing'];
|
const PACK_KINDS: PackKind[] = ['patent', 'accessories', 'production', 'marketing'];
|
||||||
|
|
||||||
export async function POST(req: Request) {
|
export async function POST(req: Request) {
|
||||||
const { sessionId, imageId, kind } = (await req.json()) as GeneratePackRequest;
|
const { sessionId, imageId, kind } = (await req.json()) as GeneratePackRequest;
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import { PACK_LABELS, PACK_ORDER, PACK_TEMPLATES, TEMPLATE_SLOT_SUMMARY, TEXT_TE
|
|||||||
|
|
||||||
const PACK_DESCRIPTIONS: Record<PackKind, string> = {
|
const PACK_DESCRIPTIONS: Record<PackKind, string> = {
|
||||||
patent: '六面视图、45° 立体图、局部放大——外观专利素材',
|
patent: '六面视图、45° 立体图、局部放大——外观专利素材',
|
||||||
|
accessories: '配件六视图、连接结构、尺寸和组合关系——独立配件保护 / 打样',
|
||||||
production: '尺寸、材料、颜色、拆件、包装——工厂报价 / 打样',
|
production: '尺寸、材料、颜色、拆件、包装——工厂报价 / 打样',
|
||||||
marketing: '白底商品图、场景图、细节图、社媒图——新品宣发',
|
marketing: '白底商品图、场景图、细节图、社媒图——新品宣发',
|
||||||
};
|
};
|
||||||
@@ -25,6 +26,13 @@ const PACK_ACCENT: Record<PackKind, { ring: string; chip: string; dot: string; b
|
|||||||
bar: 'from-amber-400 to-orange-400',
|
bar: 'from-amber-400 to-orange-400',
|
||||||
soft: 'from-amber-500/10 to-transparent',
|
soft: 'from-amber-500/10 to-transparent',
|
||||||
},
|
},
|
||||||
|
accessories: {
|
||||||
|
ring: 'ring-sky-400/30',
|
||||||
|
chip: 'bg-sky-500/15 text-sky-200 border-sky-400/30',
|
||||||
|
dot: 'bg-sky-400',
|
||||||
|
bar: 'from-sky-400 to-cyan-400',
|
||||||
|
soft: 'from-sky-500/10 to-transparent',
|
||||||
|
},
|
||||||
marketing: {
|
marketing: {
|
||||||
ring: 'ring-emerald-400/30',
|
ring: 'ring-emerald-400/30',
|
||||||
chip: 'bg-emerald-500/15 text-emerald-200 border-emerald-400/30',
|
chip: 'bg-emerald-500/15 text-emerald-200 border-emerald-400/30',
|
||||||
@@ -137,7 +145,7 @@ function PackSection({
|
|||||||
<div className="flex items-start justify-between gap-4">
|
<div className="flex items-start justify-between gap-4">
|
||||||
<div className="flex items-start gap-3 min-w-0">
|
<div className="flex items-start gap-3 min-w-0">
|
||||||
<div className={`w-9 h-9 rounded-xl bg-gradient-to-br ${accent.bar} flex items-center justify-center text-white text-xs font-bold shrink-0`}>
|
<div className={`w-9 h-9 rounded-xl bg-gradient-to-br ${accent.bar} flex items-center justify-center text-white text-xs font-bold shrink-0`}>
|
||||||
{kind === 'patent' ? 'P' : kind === 'production' ? 'F' : 'M'}
|
{kind === 'patent' ? 'P' : kind === 'accessories' ? 'A' : kind === 'production' ? 'F' : 'M'}
|
||||||
</div>
|
</div>
|
||||||
<div className="min-w-0">
|
<div className="min-w-0">
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
|
|||||||
@@ -236,6 +236,28 @@ export const TEXT_TEMPLATES: TextTemplate[] = [
|
|||||||
promptTemplate: '根据角色设定生成工厂打样验收标准:{character}. 按尺寸、外观一致性、颜色、材料、刺绣印花、缝线、配件固定、包装和安全风险列出检查项。',
|
promptTemplate: '根据角色设定生成工厂打样验收标准:{character}. 按尺寸、外观一致性、颜色、材料、刺绣印花、缝线、配件固定、包装和安全风险列出检查项。',
|
||||||
checklist: textChecklist,
|
checklist: textChecklist,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: 'text_accessory_brief',
|
||||||
|
kind: 'accessories',
|
||||||
|
title: '配件设计说明',
|
||||||
|
description: '说明独立配件清单、外观特点、组合关系和保护/打样重点。',
|
||||||
|
required: true,
|
||||||
|
outputFormat: 'bullets',
|
||||||
|
filenamePart: 'accessory-brief',
|
||||||
|
promptTemplate: '根据角色设定生成配件设计说明:{character}. 列出所有独立配件、每个配件的外观特点、与主娃娃的组合关系、是否可拆、专利保护重点和打样注意事项。',
|
||||||
|
checklist: textChecklist,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'text_accessory_bom',
|
||||||
|
kind: 'accessories',
|
||||||
|
title: '配件 BOM 与工艺清单',
|
||||||
|
description: '独立配件的材料、数量、尺寸、连接方式和工艺。',
|
||||||
|
required: true,
|
||||||
|
outputFormat: 'table',
|
||||||
|
filenamePart: 'accessory-bom',
|
||||||
|
promptTemplate: '根据角色设定生成配件 BOM 与工艺清单:{character}. 表格列出配件名称、数量、材料、颜色、尺寸占位、连接方式、工艺、安全风险和待确认项。',
|
||||||
|
checklist: textChecklist,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
id: 'text_marketing_core_copy',
|
id: 'text_marketing_core_copy',
|
||||||
kind: 'marketing',
|
kind: 'marketing',
|
||||||
@@ -648,6 +670,165 @@ export const PRODUCTION_TEMPLATES: AssetTemplate[] = [
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
export const ACCESSORY_TEMPLATES: AssetTemplate[] = [
|
||||||
|
{
|
||||||
|
id: 'acc_inventory_sheet',
|
||||||
|
kind: 'accessories',
|
||||||
|
view: 'inventory_sheet',
|
||||||
|
title: '配件总览清单',
|
||||||
|
description: '识别并汇总所有独立配件、可拆件、包装随附物。',
|
||||||
|
required: true,
|
||||||
|
aspectRatio: '4:5',
|
||||||
|
filenamePart: 'inventory-sheet',
|
||||||
|
promptTemplate: '生成玩具配件总览清单图:{character}. 白底技术版式,识别并摆放所有独立配件、可拆件、服饰、背包、吊牌、包装随附物,标注名称、数量、是否可拆和用途。',
|
||||||
|
checklist: productionChecklist,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'acc_front',
|
||||||
|
kind: 'accessories',
|
||||||
|
view: 'front',
|
||||||
|
title: '配件主视图',
|
||||||
|
description: '独立配件正面视图。',
|
||||||
|
required: true,
|
||||||
|
aspectRatio: '1:1',
|
||||||
|
filenamePart: 'front',
|
||||||
|
promptTemplate: '生成独立配件外观主视图:{character}. 仅展示最核心独立配件或配件组,正面正交视角,白底,产品居中,无营销文案,比例统一。',
|
||||||
|
checklist: patentChecklist,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'acc_back',
|
||||||
|
kind: 'accessories',
|
||||||
|
view: 'back',
|
||||||
|
title: '配件后视图',
|
||||||
|
description: '独立配件背面视图。',
|
||||||
|
required: true,
|
||||||
|
aspectRatio: '1:1',
|
||||||
|
filenamePart: 'back',
|
||||||
|
promptTemplate: '生成独立配件外观后视图:{character}. 仅展示最核心独立配件或配件组,背面正交视角,白底,产品居中,无营销文案,展示背部结构、连接点和标签位。',
|
||||||
|
checklist: patentChecklist,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'acc_left',
|
||||||
|
kind: 'accessories',
|
||||||
|
view: 'left',
|
||||||
|
title: '配件左视图',
|
||||||
|
description: '独立配件左侧厚度和连接关系。',
|
||||||
|
required: true,
|
||||||
|
aspectRatio: '1:1',
|
||||||
|
filenamePart: 'left',
|
||||||
|
promptTemplate: '生成独立配件外观左视图:{character}. 左侧正交视角,白底,产品居中,无营销文案,展示配件厚度、扣件、绑带、卡扣或缝合连接结构。',
|
||||||
|
checklist: patentChecklist,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'acc_right',
|
||||||
|
kind: 'accessories',
|
||||||
|
view: 'right',
|
||||||
|
title: '配件右视图',
|
||||||
|
description: '独立配件右侧厚度和非对称细节。',
|
||||||
|
required: true,
|
||||||
|
aspectRatio: '1:1',
|
||||||
|
filenamePart: 'right',
|
||||||
|
promptTemplate: '生成独立配件外观右视图:{character}. 右侧正交视角,白底,产品居中,无营销文案,确认配件侧面轮廓、厚度、扣件和非对称细节。',
|
||||||
|
checklist: patentChecklist,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'acc_top',
|
||||||
|
kind: 'accessories',
|
||||||
|
view: 'top',
|
||||||
|
title: '配件俯视图',
|
||||||
|
description: '独立配件顶部轮廓。',
|
||||||
|
required: true,
|
||||||
|
aspectRatio: '1:1',
|
||||||
|
filenamePart: 'top',
|
||||||
|
promptTemplate: '生成独立配件外观俯视图:{character}. 从正上方观察配件,白底,产品居中,无营销文案,展示顶部轮廓、开口、扣件或装饰。',
|
||||||
|
checklist: patentChecklist,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'acc_bottom',
|
||||||
|
kind: 'accessories',
|
||||||
|
view: 'bottom',
|
||||||
|
title: '配件仰视图',
|
||||||
|
description: '独立配件底部和固定结构。',
|
||||||
|
required: true,
|
||||||
|
aspectRatio: '1:1',
|
||||||
|
filenamePart: 'bottom',
|
||||||
|
promptTemplate: '生成独立配件外观仰视图:{character}. 从正下方观察配件,白底,产品居中,无营销文案,展示底部结构、固定点、标签或接触面。',
|
||||||
|
checklist: patentChecklist,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'acc_perspective_front',
|
||||||
|
kind: 'accessories',
|
||||||
|
view: 'perspective_front',
|
||||||
|
title: '配件前侧立体图',
|
||||||
|
description: '45 度展示配件整体体积。',
|
||||||
|
required: true,
|
||||||
|
aspectRatio: '1:1',
|
||||||
|
filenamePart: 'perspective-front',
|
||||||
|
promptTemplate: '生成独立配件前 45 度立体图:{character}. 白底,产品居中,无营销文案,展示配件整体体积、正面细节、厚度和连接结构。',
|
||||||
|
checklist: patentChecklist,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'acc_perspective_back',
|
||||||
|
kind: 'accessories',
|
||||||
|
view: 'perspective_back',
|
||||||
|
title: '配件后侧立体图',
|
||||||
|
description: '45 度展示配件背部和连接点。',
|
||||||
|
required: false,
|
||||||
|
aspectRatio: '1:1',
|
||||||
|
filenamePart: 'perspective-back',
|
||||||
|
promptTemplate: '生成独立配件后 45 度立体图:{character}. 白底,产品居中,无营销文案,展示配件背部轮廓、固定点、扣件、绑带或缝合连接结构。',
|
||||||
|
checklist: patentChecklist,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'acc_detail_connection',
|
||||||
|
kind: 'accessories',
|
||||||
|
view: 'detail_connection',
|
||||||
|
title: '配件连接结构放大',
|
||||||
|
description: '放大卡扣、绑带、魔术贴、缝线或磁吸等连接方式。',
|
||||||
|
required: true,
|
||||||
|
aspectRatio: '1:1',
|
||||||
|
filenamePart: 'detail-connection',
|
||||||
|
promptTemplate: '生成配件连接结构局部放大图:{character}. 白底技术说明风格,放大卡扣、绑带、魔术贴、缝线、磁吸或插扣连接位置,中文标注连接方式和打样注意事项。',
|
||||||
|
checklist: productionChecklist,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'acc_dimension_spec',
|
||||||
|
kind: 'accessories',
|
||||||
|
view: 'dimension_spec',
|
||||||
|
title: '配件尺寸标注图',
|
||||||
|
description: '标注配件长宽厚、连接点和安全尺寸。',
|
||||||
|
required: true,
|
||||||
|
aspectRatio: '4:5',
|
||||||
|
filenamePart: 'dimension-spec',
|
||||||
|
promptTemplate: '生成配件尺寸标注图:{character}. 技术图版式,标注每个独立配件的长、宽、厚、连接点距离、卡扣/绑带尺寸和安全圆角要求,单位 cm/mm。',
|
||||||
|
checklist: productionChecklist,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'acc_material_process',
|
||||||
|
kind: 'accessories',
|
||||||
|
view: 'material_process',
|
||||||
|
title: '配件材料工艺说明图',
|
||||||
|
description: '说明配件材料、颜色、工艺和安全风险。',
|
||||||
|
required: true,
|
||||||
|
aspectRatio: '4:5',
|
||||||
|
filenamePart: 'material-process',
|
||||||
|
promptTemplate: '生成配件材料工艺说明图:{character}. 列出独立配件的材料、颜色、表面工艺、固定方式、边缘处理、安全风险和待确认项,中文标注。',
|
||||||
|
checklist: productionChecklist,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'acc_with_doll_assembly',
|
||||||
|
kind: 'accessories',
|
||||||
|
view: 'with_doll_assembly',
|
||||||
|
title: '配件与主娃娃组合图',
|
||||||
|
description: '展示配件安装到主娃娃后的组合状态。',
|
||||||
|
required: true,
|
||||||
|
aspectRatio: '4:5',
|
||||||
|
filenamePart: 'with-doll-assembly',
|
||||||
|
promptTemplate: '生成配件与主娃娃组合说明图:{character}. 展示配件安装到主娃娃前后对比、安装位置、连接方向、组合状态和拆卸状态,白底,中文标注。',
|
||||||
|
checklist: productionChecklist,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
export const MARKETING_TEMPLATES: AssetTemplate[] = [
|
export const MARKETING_TEMPLATES: AssetTemplate[] = [
|
||||||
{
|
{
|
||||||
id: 'mkt_hero_kv',
|
id: 'mkt_hero_kv',
|
||||||
@@ -905,6 +1086,7 @@ export const MARKETING_TEMPLATES: AssetTemplate[] = [
|
|||||||
|
|
||||||
export const PACK_TEMPLATES: Record<PackKind, AssetTemplate[]> = {
|
export const PACK_TEMPLATES: Record<PackKind, AssetTemplate[]> = {
|
||||||
patent: PATENT_TEMPLATES,
|
patent: PATENT_TEMPLATES,
|
||||||
|
accessories: ACCESSORY_TEMPLATES,
|
||||||
production: PRODUCTION_TEMPLATES,
|
production: PRODUCTION_TEMPLATES,
|
||||||
marketing: MARKETING_TEMPLATES,
|
marketing: MARKETING_TEMPLATES,
|
||||||
};
|
};
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user