Sync upstream Gemini-CLI v0.8.2 (#838)

This commit is contained in:
tanzhenxin 2025-10-23 09:27:04 +08:00 committed by GitHub
parent 096fabb5d6
commit eb95c131be
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
644 changed files with 70389 additions and 23709 deletions

View file

@ -146,7 +146,7 @@ export async function handleAtCommand({
const contentLabelsForDisplay: string[] = [];
const ignoredByReason: Record<string, string[]> = {
git: [],
gemini: [],
qwen: [],
both: [],
};
@ -202,25 +202,25 @@ export async function handleAtCommand({
respectFileIgnore.respectGitIgnore &&
fileDiscovery.shouldIgnoreFile(pathName, {
respectGitIgnore: true,
respectGeminiIgnore: false,
respectQwenIgnore: false,
});
const geminiIgnored =
respectFileIgnore.respectGeminiIgnore &&
const qwenIgnored =
respectFileIgnore.respectQwenIgnore &&
fileDiscovery.shouldIgnoreFile(pathName, {
respectGitIgnore: false,
respectGeminiIgnore: true,
respectQwenIgnore: true,
});
if (gitIgnored || geminiIgnored) {
if (gitIgnored || qwenIgnored) {
const reason =
gitIgnored && geminiIgnored ? 'both' : gitIgnored ? 'git' : 'gemini';
gitIgnored && qwenIgnored ? 'both' : gitIgnored ? 'git' : 'qwen';
ignoredByReason[reason].push(pathName);
const reasonText =
reason === 'both'
? 'ignored by both git and gemini'
? 'ignored by both git and qwen'
: reason === 'git'
? 'git-ignored'
: 'gemini-ignored';
: 'qwen-ignored';
onDebugMessage(`Path ${pathName} is ${reasonText} and will be skipped.`);
continue;
}
@ -356,7 +356,7 @@ export async function handleAtCommand({
// Inform user about ignored paths
const totalIgnored =
ignoredByReason['git'].length +
ignoredByReason['gemini'].length +
ignoredByReason['qwen'].length +
ignoredByReason['both'].length;
if (totalIgnored > 0) {
@ -364,8 +364,8 @@ export async function handleAtCommand({
if (ignoredByReason['git'].length) {
messages.push(`Git-ignored: ${ignoredByReason['git'].join(', ')}`);
}
if (ignoredByReason['gemini'].length) {
messages.push(`Gemini-ignored: ${ignoredByReason['gemini'].join(', ')}`);
if (ignoredByReason['qwen'].length) {
messages.push(`Qwen-ignored: ${ignoredByReason['qwen'].join(', ')}`);
}
if (ignoredByReason['both'].length) {
messages.push(`Ignored by both: ${ignoredByReason['both'].join(', ')}`);
@ -399,7 +399,7 @@ export async function handleAtCommand({
paths: pathSpecsToRead,
file_filtering_options: {
respect_git_ignore: respectFileIgnore.respectGitIgnore,
respect_gemini_ignore: respectFileIgnore.respectGeminiIgnore,
respect_qwen_ignore: respectFileIgnore.respectQwenIgnore,
},
// Use configuration setting
};