init with react+axum+spacetimedb
Some checks failed
CI / verify (push) Has been cancelled

This commit is contained in:
2026-04-26 18:06:23 +08:00
commit cbc27bad4a
20199 changed files with 883714 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
import type {
CustomWorldNpc,
CustomWorldPlayableNpc,
CustomWorldRoleSkill,
} from '../types';
export function buildSkillActionPrompt(params: {
role: Pick<
CustomWorldPlayableNpc | CustomWorldNpc,
| 'name'
| 'title'
| 'role'
| 'description'
| 'backstory'
| 'personality'
| 'motivation'
>;
skill: Pick<CustomWorldRoleSkill, 'name' | 'summary'>;
}) {
const { role, skill } = params;
return [
`${role.name}${role.title || role.role}`,
`技能名称:${skill.name}`,
skill.summary ? `技能表现:${skill.summary}` : '',
role.description ? `角色气质:${role.description}` : '',
role.personality ? `性格补充:${role.personality}` : '',
role.motivation ? `动作目标:${role.motivation}` : '',
'横版 RPG 角色技能动作,角色轮廓稳定,动作起手明确,过程连贯,收招干净,镜头稳定。',
]
.filter(Boolean)
.join(' ');
}