mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
Ignore dot files on @-completion. (#978)
This commit is contained in:
@@ -210,6 +210,11 @@ export function useCompletion(
|
||||
path.join(startDir, entry.name),
|
||||
);
|
||||
|
||||
// Conditionally ignore dotfiles
|
||||
if (!searchPrefix.startsWith('.') && entry.name.startsWith('.')) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Check if this entry should be ignored by git-aware filtering
|
||||
if (
|
||||
fileDiscovery &&
|
||||
@@ -260,7 +265,7 @@ export function useCompletion(
|
||||
const globPattern = `**/${searchPrefix}*`;
|
||||
const files = await fileDiscoveryService.glob(globPattern, {
|
||||
cwd,
|
||||
dot: true,
|
||||
dot: searchPrefix.startsWith('.'),
|
||||
});
|
||||
|
||||
const suggestions: Suggestion[] = files
|
||||
@@ -309,6 +314,10 @@ export function useCompletion(
|
||||
// Filter entries using git-aware filtering
|
||||
const filteredEntries = [];
|
||||
for (const entry of entries) {
|
||||
// Conditionally ignore dotfiles
|
||||
if (!prefix.startsWith('.') && entry.name.startsWith('.')) {
|
||||
continue;
|
||||
}
|
||||
if (!entry.name.toLowerCase().startsWith(lowerPrefix)) continue;
|
||||
|
||||
const relativePath = path.relative(
|
||||
|
||||
Reference in New Issue
Block a user