This commit is contained in:
@@ -68,6 +68,9 @@ export interface EcommerceHistoryTurn {
|
||||
status: EcommerceHistoryStatus;
|
||||
errorMessage?: string;
|
||||
output: CloneOutputKey;
|
||||
modeLabel?: string;
|
||||
settingLabel?: string;
|
||||
generationKind?: "singleImage" | "imageEdit" | "imageSet" | "video";
|
||||
platform: string;
|
||||
market: string;
|
||||
language: string;
|
||||
@@ -90,6 +93,9 @@ export interface EcommerceHistoryRecord {
|
||||
status?: EcommerceHistoryStatus;
|
||||
errorMessage?: string;
|
||||
output: CloneOutputKey;
|
||||
modeLabel?: string;
|
||||
settingLabel?: string;
|
||||
generationKind?: "singleImage" | "imageEdit" | "imageSet" | "video";
|
||||
platform: string;
|
||||
market: string;
|
||||
language: string;
|
||||
@@ -189,6 +195,9 @@ export function buildHistoryTurnFromRecord(record: EcommerceHistoryRecord): Ecom
|
||||
status: record.status ?? "done",
|
||||
errorMessage: record.status === "failed" ? record.errorMessage : undefined,
|
||||
output: record.output,
|
||||
modeLabel: record.modeLabel,
|
||||
settingLabel: record.settingLabel,
|
||||
generationKind: record.generationKind,
|
||||
platform: record.platform,
|
||||
market: record.market,
|
||||
language: record.language,
|
||||
@@ -213,6 +222,9 @@ export function normalizeEcommerceHistoryTurn(turn: EcommerceHistoryTurn, fallba
|
||||
status,
|
||||
errorMessage: status === "failed" ? turn.errorMessage ?? fallback.errorMessage : undefined,
|
||||
output: turn.output ?? fallback.output,
|
||||
modeLabel: turn.modeLabel ?? fallback.modeLabel,
|
||||
settingLabel: turn.settingLabel ?? fallback.settingLabel,
|
||||
generationKind: turn.generationKind ?? fallback.generationKind,
|
||||
platform: turn.platform ?? fallback.platform,
|
||||
market: turn.market ?? fallback.market,
|
||||
language: turn.language ?? fallback.language,
|
||||
@@ -235,6 +247,9 @@ export function normalizeEcommerceHistoryRecord(record: EcommerceHistoryRecord):
|
||||
...record,
|
||||
status,
|
||||
errorMessage: status === "failed" ? record.errorMessage : undefined,
|
||||
modeLabel: record.modeLabel,
|
||||
settingLabel: record.settingLabel,
|
||||
generationKind: record.generationKind,
|
||||
productImages: removeFilePayloadFromImages(record.productImages),
|
||||
referenceImages: removeFilePayloadFromImages(record.referenceImages ?? []),
|
||||
results: record.results ?? [],
|
||||
|
||||
Reference in New Issue
Block a user