File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,13 @@ export async function loadMarkdownRules(ide: IDE): Promise<{
7979 uriType : "file" ,
8080 fileUri : file . path ,
8181 } ) ;
82- rules . push ( { ...rule , source : "rules-block" , sourceFile : file . path } ) ;
82+ if ( ! rule . invokable ) {
83+ rules . push ( {
84+ ...rule ,
85+ source : "rules-block" ,
86+ sourceFile : file . path ,
87+ } ) ;
88+ }
8389 } catch ( e ) {
8490 errors . push ( {
8591 fatal : false ,
Original file line number Diff line number Diff line change @@ -24,7 +24,9 @@ export async function getPromptFilesFromDir(
2424 const uris = await walkDir ( dir , ide , {
2525 source : "get dir prompt files" ,
2626 } ) ;
27- const promptFilePaths = uris . filter ( ( p ) => p . endsWith ( ".prompt" ) ) ;
27+ const promptFilePaths = uris . filter (
28+ ( p ) => p . endsWith ( ".prompt" ) || p . endsWith ( ".md" ) ,
29+ ) ;
2830 const results = promptFilePaths . map ( async ( uri ) => {
2931 const content = await ide . readFile ( uri ) ; // make a try catch
3032 return { path : uri , content } ;
@@ -68,10 +70,11 @@ export async function getAllPromptFiles(
6870 ) ;
6971 promptFiles . push ( ...promptFilesFromRulesDirectory ) ;
7072
71- return await Promise . all (
73+ const result = await Promise . all (
7274 promptFiles . map ( async ( file ) => {
7375 const content = await ide . readFile ( file . path ) ;
7476 return { path : file . path , content } ;
7577 } ) ,
7678 ) ;
79+ return result ;
7780}
You can’t perform that action at this time.
0 commit comments