fix type errors
This commit is contained in:
parent
75f7facd10
commit
192d0bee39
3 changed files with 6 additions and 3 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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({
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
} {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue