mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-24 03:54:43 -07:00
refactor: simplify FilterReport and remove unused code (#11681)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: Jacob Richman <jacob314@gmail.com>
This commit is contained in:
@@ -169,7 +169,7 @@ class GlobToolInvocation extends BaseToolInvocation<
|
||||
path.relative(this.config.getTargetDir(), p.fullpath()),
|
||||
);
|
||||
|
||||
const { filteredPaths, gitIgnoredCount, geminiIgnoredCount } =
|
||||
const { filteredPaths, ignoredCount } =
|
||||
fileDiscovery.filterFilesWithReport(relativePaths, {
|
||||
respectGitIgnore:
|
||||
this.params?.respect_git_ignore ??
|
||||
@@ -196,11 +196,8 @@ class GlobToolInvocation extends BaseToolInvocation<
|
||||
} else {
|
||||
message += ` within ${searchDirectories.length} workspace directories`;
|
||||
}
|
||||
if (gitIgnoredCount > 0) {
|
||||
message += ` (${gitIgnoredCount} files were git-ignored)`;
|
||||
}
|
||||
if (geminiIgnoredCount > 0) {
|
||||
message += ` (${geminiIgnoredCount} files were gemini-ignored)`;
|
||||
if (ignoredCount > 0) {
|
||||
message += ` (${ignoredCount} files were ignored)`;
|
||||
}
|
||||
return {
|
||||
llmContent: message,
|
||||
@@ -231,11 +228,8 @@ class GlobToolInvocation extends BaseToolInvocation<
|
||||
} else {
|
||||
resultMessage += ` across ${searchDirectories.length} workspace directories`;
|
||||
}
|
||||
if (gitIgnoredCount > 0) {
|
||||
resultMessage += ` (${gitIgnoredCount} additional files were git-ignored)`;
|
||||
}
|
||||
if (geminiIgnoredCount > 0) {
|
||||
resultMessage += ` (${geminiIgnoredCount} additional files were gemini-ignored)`;
|
||||
if (ignoredCount > 0) {
|
||||
resultMessage += ` (${ignoredCount} additional files were ignored)`;
|
||||
}
|
||||
resultMessage += `, sorted by modification time (newest first):\n${fileListDescription}`;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user