Rework story engine flow and reorganize project docs
Some checks failed
CI / verify (push) Has been cancelled

This commit is contained in:
2026-04-06 23:19:00 +08:00
parent d678929064
commit ddcb5d5c8c
241 changed files with 19805 additions and 2478 deletions

View File

@@ -0,0 +1,30 @@
import { describe, expect, it } from 'vitest';
import { buildEpilogueSummary } from './epilogueComposer';
describe('epilogueComposer', () => {
it('composes an epilogue from ending and companion resolutions', () => {
const summary = buildEpilogueSummary({
endingState: {
id: 'ending-1',
title: '守住火种',
endingType: 'heroic',
summary: '你把局势拖回了可继续前行的方向。',
contributingThreadIds: ['thread-1'],
companionResolutions: [],
worldOutcomeSummary: '边城暂时稳了下来。',
},
companionResolutions: [
{
characterId: 'archer-hero',
resolutionType: 'bonded',
summary: '她最终选择与你并肩到底。',
relatedThreadIds: ['thread-1'],
},
],
});
expect(summary).toContain('守住火种');
expect(summary).toContain('并肩到底');
});
});