feat: add model frontmatter to workflow prompts
This commit is contained in:
parent
015c74c46f
commit
bdb5e79bb2
|
|
@ -45,9 +45,13 @@ class WorkflowPromptGenerator {
|
|||
const recommendations = {};
|
||||
|
||||
for (const prompt of prompts) {
|
||||
const promptContent = ['---', `agent: ${prompt.agent}`, `description: "${prompt.description}"`, '---', '', prompt.prompt, ''].join(
|
||||
'\n',
|
||||
);
|
||||
const frontmatter = ['---', `agent: ${prompt.agent}`, `description: "${prompt.description}"`];
|
||||
|
||||
if (prompt.model) {
|
||||
frontmatter.push(`model: ${prompt.model}`);
|
||||
}
|
||||
|
||||
const promptContent = [...frontmatter, '---', '', prompt.prompt, ''].join('\n');
|
||||
|
||||
const promptFilePath = path.join(promptsDir, `bmd-${prompt.name}.prompt.md`);
|
||||
await fs.writeFile(promptFilePath, promptContent);
|
||||
|
|
|
|||
Loading…
Reference in New Issue