@builder.io/dev-tools
Version:
Builder.io Visual CMS Devtools
18 lines (17 loc) • 722 B
TypeScript
/**
* Custom instruction/rules parsing utilities
* Handles parsing of custom instruction files (.mdc, .cursorrules, etc.)
*/
import type { CustomInstruction } from "$/ai-utils";
/**
* Parse a custom instruction file
* Supports both:
* - .mdc files with YAML frontmatter
* - Plain text files (.cursorrules, .builderrules, etc.)
*
* @param fileContent - Raw file content
* @param filePath - File path (for generating name and id)
* @param hashFunction - Optional hash function for generating unique IDs
* @returns Parsed CustomInstruction or null
*/
export declare function parseCustomInstructionFile(fileContent: string, filePath: string, hashFunction?: (content: string) => string): CustomInstruction | null;