diff --git a/core/config/markdown/loadMarkdownRules.ts b/core/config/markdown/loadMarkdownRules.ts index 91ed72164..d77313b92 100644 --- a/core/config/markdown/loadMarkdownRules.ts +++ b/core/config/markdown/loadMarkdownRules.ts @@ -79,7 +79,13 @@ export async function loadMarkdownRules(ide: IDE): Promise<{ uriType: "file", fileUri: file.path, }); - rules.push({ ...rule, source: "rules-block", sourceFile: file.path }); + if (!rule.invokable) { + rules.push({ + ...rule, + source: "rules-block", + sourceFile: file.path, + }); + } } catch (e) { errors.push({ fatal: false, diff --git a/core/promptFiles/getPromptFiles.ts b/core/promptFiles/getPromptFiles.ts index 6a3837e3a..da6628d2f 100644 --- a/core/promptFiles/getPromptFiles.ts +++ b/core/promptFiles/getPromptFiles.ts @@ -24,7 +24,9 @@ export async function getPromptFilesFromDir( const uris = await walkDir(dir, ide, { source: "get dir prompt files", }); - const promptFilePaths = uris.filter((p) => p.endsWith(".prompt")); + const promptFilePaths = uris.filter( + (p) => p.endsWith(".prompt") || p.endsWith(".md"), + ); const results = promptFilePaths.map(async (uri) => { const content = await ide.readFile(uri); // make a try catch return { path: uri, content }; @@ -68,10 +70,11 @@ export async function getAllPromptFiles( ); promptFiles.push(...promptFilesFromRulesDirectory); - return await Promise.all( + const result = await Promise.all( promptFiles.map(async (file) => { const content = await ide.readFile(file.path); return { path: file.path, content }; }), ); + return result; }