11
Some checks failed
CI / verify (push) Has been cancelled

This commit is contained in:
2026-04-16 21:47:20 +08:00
parent 2456c10c63
commit 09d4c0c31b
79 changed files with 11873 additions and 2341 deletions

View File

@@ -710,6 +710,48 @@ function buildAnchorLine(label: string, content: string) {
return content ? `${label}${content}` : '';
}
export function buildCustomWorldCreatorIntentFoundationText(
intent: CustomWorldCreatorIntent | null | undefined,
) {
if (!hasMeaningfulCustomWorldCreatorIntent(intent)) {
return '';
}
const relationshipSeed = intent?.keyCharacters[0];
const relationshipText = relationshipSeed
? [
relationshipSeed.name,
relationshipSeed.role,
relationshipSeed.relationToPlayer
? `与玩家 ${relationshipSeed.relationToPlayer}`
: '',
relationshipSeed.hiddenHook ? `暗线 ${relationshipSeed.hiddenHook}` : '',
]
.filter(Boolean)
.join(' · ')
: '';
const playerOpeningText = [intent?.playerPremise || '', intent?.openingSituation || '']
.filter(Boolean)
.join('');
const themeToneText = [
intent?.themeKeywords.join('、') || '',
intent?.toneDirectives.join('、') || '',
]
.filter(Boolean)
.join(' / ');
return [
buildAnchorLine('世界一句话', intent?.worldHook || ''),
buildAnchorLine('玩家开局', playerOpeningText),
buildAnchorLine('主题气质', themeToneText),
buildAnchorLine('核心冲突', intent?.coreConflicts.join('') || ''),
buildAnchorLine('关键关系', relationshipText),
buildAnchorLine('标志元素', intent?.iconicElements.join('、') || ''),
]
.filter(Boolean)
.join('\n');
}
export function buildCustomWorldCreatorIntentDisplayText(
intent: CustomWorldCreatorIntent | null | undefined,
) {