@file don't respect config respectGitIgnore=false (#3382) (#3387)

Co-authored-by: Ryan Fang <ryan.fang@gllue.com>
This commit is contained in:
zfflxx
2025-07-07 13:48:39 +08:00
committed by GitHub
parent bb8f6b376d
commit 97d9386e3f
5 changed files with 109 additions and 33 deletions

View File

@@ -181,12 +181,10 @@ export async function handleAtCommand({
return { processedQuery: null, shouldProceed: false };
}
// Check if path should be ignored by git
if (fileDiscovery.shouldGitIgnoreFile(pathName)) {
const reason = respectGitIgnore
? 'git-ignored and will be skipped'
: 'ignored by custom patterns';
onDebugMessage(`Path ${pathName} is ${reason}.`);
// Check if path should be ignored based on filtering options
if (fileDiscovery.shouldIgnoreFile(pathName, { respectGitIgnore })) {
const reason = respectGitIgnore ? 'git-ignored' : 'custom-ignored';
onDebugMessage(`Path ${pathName} is ${reason} and will be skipped.`);
ignoredPaths.push(pathName);
continue;
}
@@ -349,7 +347,7 @@ export async function handleAtCommand({
const toolArgs = {
paths: pathSpecsToRead,
respectGitIgnore, // Use configuration setting
respect_git_ignore: respectGitIgnore, // Use configuration setting
};
let toolCallDisplay: IndividualToolCallDisplay;