fix type errors

This commit is contained in:
Nate 2025-06-16 16:27:00 -07:00
parent 75f7facd10
commit 192d0bee39
3 changed files with 6 additions and 3 deletions

View file

@ -31,7 +31,7 @@ export async function loadCodebaseRules(ide: IDE): Promise<{
for (const filePath of rulesMdFiles) {
try {
const content = await ide.readFile(filePath);
const rule = markdownToRule(content);
const rule = markdownToRule(content, { uriType: "file", filePath });
rules.push({ ...rule, source: "rules-block" });
} catch (e) {

View file

@ -29,7 +29,10 @@ export async function loadMarkdownRules(ide: IDE): Promise<{
// Process each markdown file
for (const file of mdFiles) {
try {
const rule = markdownToRule(file.content);
const rule = markdownToRule(file.content, {
uriType: "file",
filePath: file.path,
});
rules.push({ ...rule, source: "rules-block" });
} catch (e) {
errors.push({

View file

@ -15,7 +15,7 @@ export interface RuleFrontmatter {
/**
* Parses markdown content with YAML frontmatter
*/
function parseMarkdownRule(content: string): {
export function parseMarkdownRule(content: string): {
frontmatter: RuleFrontmatter;
markdown: string;
} {