mirror of
https://github.com/siteboon/claudecodeui.git
synced 2026-01-24 02:17:32 +00:00
fix: filter VCS directories from file autocomplete
Excludes .git, .svn, and .hg directories from the file tree returned by getFileTree(). This prevents VCS internal files from appearing in the @ file autocomplete dropdown. The fix is applied server-side which: - Reduces data transferred to the client - Benefits all features using getFileTree() - Provides consistent filtering across the application Fixes #290 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1637,10 +1637,13 @@ async function getFileTree(dirPath, maxDepth = 3, currentDepth = 0, showHidden =
|
||||
// Debug: log all entries including hidden files
|
||||
|
||||
|
||||
// Skip only heavy build directories
|
||||
// Skip heavy build directories and VCS directories
|
||||
if (entry.name === 'node_modules' ||
|
||||
entry.name === 'dist' ||
|
||||
entry.name === 'build') continue;
|
||||
entry.name === 'build' ||
|
||||
entry.name === '.git' ||
|
||||
entry.name === '.svn' ||
|
||||
entry.name === '.hg') continue;
|
||||
|
||||
const itemPath = path.join(dirPath, entry.name);
|
||||
const item = {
|
||||
|
||||
Reference in New Issue
Block a user