feat: Make file type detection and binary checks asynchronous (#3286) (#3288)

This commit is contained in:
sangwook
2025-07-21 08:16:42 +09:00
committed by GitHub
parent f4d077cc1f
commit 45b764943a
3 changed files with 71 additions and 50 deletions

View File

@@ -405,7 +405,7 @@ Use this tool when the user's query implies needing the content of several files
.relative(this.config.getTargetDir(), filePath)
.replace(/\\/g, '/');
const fileType = detectFileType(filePath);
const fileType = await detectFileType(filePath);
if (fileType === 'image' || fileType === 'pdf') {
const fileExtension = path.extname(filePath).toLowerCase();