@@ -224,18 +224,12 @@ export function getWorkspaceRelativePath(
224224 workspaceFolders ?: readonly vscode . WorkspaceFolder [ ]
225225 } = {
226226 workspaceFolders : vscode . workspace . workspaceFolders ,
227- } ,
228- useCase ?: FeatureUseCase
227+ }
229228) : { relativePath : string ; workspaceFolder : vscode . WorkspaceFolder } | undefined {
230229 if ( ! override . workspaceFolders ) {
231230 return
232231 }
233232 let folders = override . workspaceFolders
234- if ( useCase && useCase === FeatureUseCase . TEST_GENERATION ) {
235- // Sort workspace folders by path length (descending) to prioritize deeper paths
236- // TODO: Need to enable this for entire Q
237- folders = [ ...override . workspaceFolders ] . sort ( ( a , b ) => b . uri . fsPath . length - a . uri . fsPath . length )
238- }
239233
240234 for ( const folder of folders ) {
241235 if ( isInDirectory ( folder . uri . fsPath , childPath ) ) {
@@ -410,10 +404,10 @@ export async function collectFiles(
410404 excludePatternFilter
411405 )
412406
413- const files = excludeByGitIgnore ? await filterOutGitignoredFiles ( rootPath , allFiles , false ) : allFiles
407+ const files = excludeByGitIgnore ? await filterOutGitignoredFiles ( rootPath , allFiles , false , useCase ) : allFiles
414408
415409 for ( const file of files ) {
416- const relativePath = getWorkspaceRelativePath ( file . fsPath , { workspaceFolders } , useCase )
410+ const relativePath = getWorkspaceRelativePath ( file . fsPath , { workspaceFolders } )
417411 if ( ! relativePath ) {
418412 continue
419413 }
0 commit comments