1039
// instructions are all .instructions.md files directly under the root or in a subdirectory
1040
const findInstructions = async (stat: IFileStatWithMetadata, recursionLevel: number): Promise<void> => {
1042
>
1043
>
for (const child of stat.children ?? []) {
1044
>
throwIfCancelled(token);
1045
>
1046
>
if (child.isFile) {
1047
>
const name = child.name.toLowerCase();
1048
>
if (name.endsWith(INSTRUCTION_FILE_SUFFIX) && !seen.has(child.resource)) {
1049
>
seen.add(child.resource);
1050
>
files.push({ uri: child.resource, etag: child.etag });
1051
>
}
1052
>
} else if (child.isDirectory && recursionLevel < MAX_INSTRUCTIONS_RECURSION_DEPTH) {
1053
let childStat: IFileStatWithMetadata | undefined = undefined;
1054
try {