diff --git a/core/commands/slash/onboard.ts b/core/commands/slash/onboard.ts index 7895101f8..d6fedcafb 100644 --- a/core/commands/slash/onboard.ts +++ b/core/commands/slash/onboard.ts @@ -78,7 +78,9 @@ async function getEntriesFilteredByIgnore(dir: string, ide: IDE) { const withRelativePaths = entries .filter( - (entry) => entry[1] === FileType.File || entry[1] === FileType.Directory, + (entry) => + entry[1] === (1 as FileType.File) || + entry[1] === (2 as FileType.Directory), ) .map((entry) => { const { relativePathOrBasename } = findUriInDirs(entry[0], workspaceDirs); @@ -87,7 +89,8 @@ async function getEntriesFilteredByIgnore(dir: string, ide: IDE) { type: entry[1], basename: getUriPathBasename(entry[0]), relativePath: - relativePathOrBasename + (entry[1] === FileType.Directory ? "/" : ""), + relativePathOrBasename + + (entry[1] === (2 as FileType.Directory) ? "/" : ""), }; }); @@ -107,7 +110,7 @@ async function gatherProjectContext( const entries = await getEntriesFilteredByIgnore(dir, ide); for (const entry of entries) { - if (entry.type === FileType.Directory) { + if (entry.type === (2 as FileType.Directory)) { context += `\nFolder: ${entry.relativePath}\n`; await exploreDirectory(entry.uri, currentDepth + 1); } else { diff --git a/core/indexing/walkDir.ts b/core/indexing/walkDir.ts index 1d8aa485a..d50e3b635 100644 --- a/core/indexing/walkDir.ts +++ b/core/indexing/walkDir.ts @@ -189,7 +189,10 @@ class DFSWalker { } private entryIsIgnoreFile(e: Entry): boolean { - if (e[1] === FileType.Directory || e[1] === FileType.SymbolicLink) { + if ( + e[1] === (2 as FileType.Directory) || + e[1] === (64 as FileType.SymbolicLink) + ) { return false; } return this.ignoreFileNames.has(e[0]);