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 19436a2af8
commit 4dea1ca506
3 changed files with 71 additions and 50 deletions
+1 -1
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();