⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Conversation

@ProhoDimka
Copy link

Fixing an issue #918
Added folder tag handling: implemented isExcludedDir, expandFolder, and flattenFiles methods for recursively collecting files with pycache exclusion, updated getReferencedFiles to support FolderTagDetails, and includeFiles to correctly count tokens in files from folders.

…nd flattenFiles methods for recursively collecting files with __pycache__ exclusion, updated getReferencedFiles to support FolderTagDetails, and includeFiles to correctly count tokens in files from folders.
* Returns true if the directory should be excluded from context (e.g. __pycache__).
*/
private boolean isExcludedDir(VirtualFile vf) {
return vf.isDirectory() && "__pycache__".equals(vf.getName());
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use a proper isExcluded and isFileIgnored functions for this:

private fun isExcludedDir(vf: VirtualFile): Boolean {
    return ProjectFileIndex.getInstance(project).isExcluded(vf) || 
           FileTypeManager.getInstance().isFileIgnored(vf)
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants