feat(product-suite): add global generation history

This commit is contained in:
chengma
2026-07-17 09:59:55 +08:00
parent f1dc7f28dc
commit e232097ba5
13 changed files with 1409 additions and 52 deletions
+28
View File
@@ -418,6 +418,34 @@ class ProductSuiteGenerateWorker(BaseWorker):
return summary
class ProductSuiteHistoryExportWorker(BaseWorker):
"""Copy one product-suite generation round outside the GUI thread."""
def __init__(self, project_id, generation_round_key, parent_dir, *, db_path=None):
super().__init__()
self.project_id = int(project_id)
self.generation_round_key = generation_round_key
self.parent_dir = str(parent_dir or "")
self.db_path = db_path
def execute(self):
self.log.emit("[商品套图] 导出历史套图:开始")
result = image_studio_export.export_generation_round(
self.project_id,
self.generation_round_key,
self.parent_dir,
path=self.db_path,
should_stop=self.should_cancel,
)
self.log.emit("[商品套图] 导出历史套图:完成")
return {
"target_dir": result.target_dir,
"file_count": len(result.files),
"skipped_count": int(result.skipped_count),
"cancelled": bool(result.cancelled),
}
class ProductSuiteAiWriteWorker(BaseWorker):
"""Analyze local product images without blocking the suite workspace."""