UNPKG

scai

Version:

> **A local-first AI CLI for understanding, querying, and iterating on large codebases.** > **100% local • No token costs • No cloud • No prompt injection • Private by design**

15 lines (14 loc) 620 B
import path from 'path'; import { IGNORED_EXTENSIONS } from './ignoredExtensions.js'; import { specificFileExceptions } from './fileExceptions.js'; export function shouldIgnoreFile(filePath) { // Get file extension const ext = path.extname(filePath).toLowerCase(); // Check if the file is explicitly listed in the exceptions const fileName = path.basename(filePath); if (specificFileExceptions.includes(fileName)) { return false; // Don't ignore if it's in the exceptions list } // If not in exceptions, check against ignored extensions return IGNORED_EXTENSIONS.includes(ext); }