mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-05 16:23:36 +00:00
TextEditorViewTool: don't use default gitignore list
This commit is contained in:
1 file changed
+1
-11
@@ -166,22 +166,12 @@ export class TextEditorViewTool implements Tool<TextEditorViewParams> {
|
||||
// Always ignore .git directory
|
||||
ig.add(".git");
|
||||
|
||||
// Default ignore patterns if no .gitignore is found
|
||||
const defaultIgnorePatterns = [
|
||||
"node_modules",
|
||||
"dist",
|
||||
"build",
|
||||
".next",
|
||||
".tmp",
|
||||
];
|
||||
|
||||
try {
|
||||
// Try to read .gitignore file
|
||||
const gitignoreContent = await this.fs.readFile(".gitignore", "utf8");
|
||||
ig.add(gitignoreContent);
|
||||
} catch {
|
||||
// If there's an error reading .gitignore, fall back to defaults
|
||||
ig.add(defaultIgnorePatterns);
|
||||
// If there's an error reading .gitignore, just proceed without it
|
||||
}
|
||||
|
||||
return (path: string) => !ig.ignores(path);
|
||||
|
||||
Reference in new issue
Block a user