AI media harness for planning, generating, and editing locally
TypeScript
Group character sheets with source images
Bittief76e53332f8
diff --git a/src/lib/characterSheet.test.ts b/src/lib/characterSheet.test.tsindex f853616..a4b1d7d 100644--- a/src/lib/characterSheet.test.ts+++ b/src/lib/characterSheet.test.ts@@ -85,7 +85,7 @@ it.each([false, true])("uses a shared front-view outfit with square portrait andexpect(reopened.assets).toHaveLength(2);expect(reopened.assets[0]).toEqual(original.assets[0]);expect(reopened.assets[1]).toMatchObject({ id, name: "Character sheet - Hero", mimeType: "image/png", ...result, imageGeneration: { usedSeed: seed } });- expect(reopened.assets[1].parentAssetId).toBeUndefined();+ expect(reopened.assets[1].parentAssetId).toBe("source");expect(reopened.imageScene!.outputAssetId).toBe(changed ? "source" : id);expect(reopened.generationJobs).toEqual(original.generationJobs);expect(reopened.timeline).toEqual(original.timeline);diff --git a/src/lib/workQueue.ts b/src/lib/workQueue.tsindex 05e0bc9..609a4a9 100644--- a/src/lib/workQueue.ts+++ b/src/lib/workQueue.ts@@ -535,7 +535,7 @@ export class WorkQueue {...(current.imageScene?.outputAssetId === sheet.sourceId && JSON.stringify(current.imageScene) === work.snapshot? { thumbnail: saved.relativePath, imageScene: { ...scene, outputAssetId: work.id } } : {}),assets: [...current.assets, { id: work.id, kind: "image", name: sheet.name, ...saved, mimeType: "image/png",- imageGeneration: generation, createdAt: new Date().toISOString() }],+ parentAssetId: imageFamilyRoot(current.assets, sheet.sourceId), imageGeneration: generation, createdAt: new Date().toISOString() }],}));try { await work.session.save(); this.patch(work.id, { status: "completed", progress: 1, detail: "Character sheet saved" }); }catch (reason) { this.patch(work.id, { status: "failed", progress: 1, needsSave: true, detail: "Character sheet created; project save failed", error: describeDiagnosticError(reason) }); }