File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
src/app/[ownerSlug]/[repoSlug] Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change
1
+ import { FileData } from '@/db/models/file'
1
2
import { FullFolder , FullRepository } from '@/service/get-db'
2
3
3
4
export function formatToMarkdown ( fullRepo : FullRepository ) : string {
@@ -23,7 +24,7 @@ function recursiveFolderToMarkdown(
23
24
? `- Reference: [\`${ folder . path } \`](${ url } /${ folder . path } ) \n`
24
25
: ''
25
26
markdown += `\n${ folder . ai_summary } \n`
26
- folder . files . forEach ( ( file ) => {
27
+ folder . files . filter ( isNotMarkdownFile ) . forEach ( ( file ) => {
27
28
markdown += `###### ${ file . usage } \n`
28
29
markdown += `---\n`
29
30
markdown += file . name
@@ -42,3 +43,7 @@ function recursiveFolderToMarkdown(
42
43
} )
43
44
return markdown
44
45
}
46
+
47
+ function isNotMarkdownFile ( file : FileData ) : boolean {
48
+ return ! file . name . includes ( '.md' )
49
+ }
You can’t perform that action at this time.
0 commit comments