592
const refsToCheck: { resource: URI }[] = [];
593
for (const ref of result.body.fileReferences) {
595
>
if (url && !seen.has(url) && (isPromptOrInstructionsFile(url) || this._workspaceService.getWorkspaceFolder(url) !== undefined)) {
596
>
// only add references that are either prompt or instruction files or are part of the workspace
597
>
refsToCheck.push({ resource: url });
598
>
seen.add(url);
599
>
}
600
>
}
601
if (refsToCheck.length > 0) {
603
>
for (let i = 0; i < stats.length; i++) {
604
>
const stat = stats[i];
605
>
const uri = refsToCheck[i].resource;
606
>
if (stat.success && stat.stat?.isFile) {
607
if (isPromptOrInstructionsFile(uri)) {
608
// only recursively parse instruction files