Refactor: Centralize prompt builders

This commit is contained in:
2026-03-20 22:57:34 -07:00
parent 3e1dc021e8
commit bf8661190a

15
src/core/messages.js Normal file
View File

@@ -0,0 +1,15 @@
export const MASTER_PROMPT =
'minimal black and white line doodle, single stroke, white background, kawaii style';
export function buildFirstMessage(userPrompt) {
return { role: 'user', content: `${MASTER_PROMPT}, ${userPrompt}` };
}
export function buildNextMessage(frameIndex, frameCount) {
return {
role: 'user',
content:
`imagine we are trying to create a ${frameCount} frame gif. ` +
`generate the next meaningful frame (frame ${frameIndex} of ${frameCount})`
};
}