Changesets · Branches · Tags · Compare
| Changeset | 1e5b1ca67be8b91e43f04e794301146bbc1b80c66658073aaece8546ac157b19 |
|---|---|
| Author | uinstinct <61635505+uinstinct@users.noreply.github.com> · 2025-09-04 20:21 +05:30 |
| Committer | uinstinct <61635505+uinstinct@users.noreply.github.com> · 2025-09-04 20:21 +05:30 |
| Parents | 85f086de04b1 |
1 file changed
modified extensions/cli/src/services/FileIndexService.ts +10 −0
| @@ -3,6 +3,7 @@ | ||
| 3 | 3 | import { FILE_IGNORE_PATTERNS, FILE_PATTERNS } from "../util/filePatterns.js"; |
| 4 | 4 | import { getFileWatcher } from "../util/fileWatcher.js"; |
| 5 | 5 | import { isGitRepo } from "../util/git.js"; |
| 6 | +import { isInHomeDirectory } from "../util/isInHomeDirectory.js"; | |
| 6 | 7 | import { logger } from "../util/logger.js"; |
| 7 | 8 | |
| 8 | 9 | import { BaseService } from "./BaseService.js"; |
| @@ -69,6 +70,15 @@ | ||
| 69 | 70 | |
| 70 | 71 | try { |
| 71 | 72 | const inGitRepo = isGitRepo(); |
| 73 | + | |
| 74 | + if (isInHomeDirectory()) { | |
| 75 | + this.setState({ | |
| 76 | + isIndexing: false, | |
| 77 | + error: "Skipping full index as in home directory", | |
| 78 | + }); | |
| 79 | + return; | |
| 80 | + } | |
| 81 | + | |
| 72 | 82 | const allMatches = await this.throttledGlob(FILE_PATTERNS, { |
| 73 | 83 | maxDepth: inGitRepo ? 15 : 3, |
| 74 | 84 | ignore: FILE_IGNORE_PATTERNS, |