File size: 875 Bytes
f56a29b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | /**
* PBL Generation System Prompt
*
* Migrated from PBL-Nano's anything2pbl_nano.ts systemPrompt.
* Uses languageDirective for multi-language support.
*/
import { buildPrompt, PROMPT_IDS } from '@/lib/prompts';
export interface PBLSystemPromptConfig {
projectTopic: string;
projectDescription: string;
targetSkills: string[];
issueCount?: number;
languageDirective: string;
}
export function buildPBLSystemPrompt(config: PBLSystemPromptConfig): string {
const prompt = buildPrompt(PROMPT_IDS.PBL_DESIGN, {
projectTopic: config.projectTopic,
projectDescription: config.projectDescription,
targetSkills: config.targetSkills.join(', '),
issueCount: config.issueCount ?? 3,
languageDirective: config.languageDirective,
});
if (!prompt) {
throw new Error('pbl-design prompt template failed to load');
}
return prompt.system;
}
|