feat: Extend file search to include filenames
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
@@ -1264,8 +1264,12 @@ async def api_files_dirs(request: Request):
|
|||||||
if rel_path == '.':
|
if rel_path == '.':
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if q and q not in rel_path.lower():
|
if q:
|
||||||
continue
|
# Search in directory path and filenames
|
||||||
|
path_match = q in rel_path.lower()
|
||||||
|
file_match = any(q in fn.lower() for fn in filenames)
|
||||||
|
if not path_match and not file_match:
|
||||||
|
continue
|
||||||
|
|
||||||
try:
|
try:
|
||||||
total_size = sum(os.path.getsize(os.path.join(dir_path, f)) for f in filenames)
|
total_size = sum(os.path.getsize(os.path.join(dir_path, f)) for f in filenames)
|
||||||
|
|||||||
Reference in New Issue
Block a user