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