feat (file_selector) Add directory selection support to file selector (#954)

Co-authored-by: yetone <yetoneful@gmail.com>
This commit is contained in:
Michael Gendy
2025-01-30 12:24:46 +02:00
committed by GitHub
parent 499b7a854b
commit 4502e3e1f1
3 changed files with 141 additions and 78 deletions

View File

@@ -52,7 +52,11 @@ function RepoMap._build_repo_map(project_root, file_ext)
local ignore_patterns = vim.list_extend(gitignore_patterns, Config.repo_map.ignore_patterns)
local negate_patterns = vim.list_extend(gitignore_negate_patterns, Config.repo_map.negate_patterns)
local filepaths = Utils.scan_directory(project_root, ignore_patterns, negate_patterns)
local filepaths = Utils.scan_directory({
directory = project_root,
gitignore_patterns = ignore_patterns,
gitignore_negate_patterns = negate_patterns,
})
if filepaths and not RepoMap._init_repo_map_lib() then
-- or just throw an error if we don't want to execute request without codebase
Utils.error("Failed to load avante_repo_map")