continue-custom/core/commands/slash/promptBlockSlashCommand.ts
2025-09-29 15:59:46 -07:00

14 lines
375 B
TypeScript

import { Prompt } from "@continuedev/config-yaml";
import { SlashCommandWithSource } from "../..";
export function convertPromptBlockToSlashCommand(
prompt: Prompt,
): SlashCommandWithSource {
return {
name: prompt.name,
description: prompt.description ?? "",
prompt: prompt.prompt,
source: "yaml-prompt-block",
sourceFile: prompt.sourceFile,
};
}