File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
core/autocomplete/context/static-context Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 11import path from "path" ;
22import { pathToFileURL } from "url" ;
33import Parser from "web-tree-sitter" ;
4- import { FileType , IDE , Position } from "../../.." ;
4+ import { FileType , IDE , Position } from "../../../ " ;
55import { localPathOrUriToPath } from "../../../util/pathToUri" ;
66import { getFullLanguageName , getQueryForFile } from "../../../util/treeSitter" ;
77import {
@@ -854,15 +854,14 @@ export class StaticContextService {
854854 try {
855855 const currentUri = pathToFileURL ( currentPath ) . toString ( ) ;
856856 const entries = await this . ide . listDir ( currentUri ) ;
857-
858857 for ( const [ name , fileType ] of entries ) {
859858 const fullPath = localPathOrUriToPath ( path . join ( currentPath , name ) ) ;
860859
861- if ( fileType === FileType . Directory ) {
860+ if ( fileType === ( 2 as FileType . Directory ) ) {
862861 if ( ! shouldSkipDirectory ( name ) ) {
863862 await scanRecursively ( fullPath ) ;
864863 }
865- } else if ( fileType === FileType . File ) {
864+ } else if ( fileType === ( 1 as FileType . File ) ) {
866865 const extension = path . extname ( name ) . toLowerCase ( ) ;
867866 if ( tsExtensions . includes ( extension ) ) {
868867 tsFiles . push ( fullPath ) ;
You can’t perform that action at this time.
0 commit comments