| 1 | import { Prompt } from "@continuedev/config-yaml"; |
| 2 | import { SlashCommandWithSource } from "../.."; |
| 3 | |
| 4 | export function convertPromptBlockToSlashCommand( |
| 5 | prompt: Prompt, |
| 6 | ): SlashCommandWithSource { |
| 7 | return { |
| 8 | name: prompt.name, |
| 9 | description: prompt.description ?? "", |
| 10 | prompt: prompt.prompt, |
| 11 | source: "yaml-prompt-block", |
| 12 | promptFile: prompt.sourceFile, // Align with the sourceFile property |
| 13 | }; |
| 14 | } |