diff --git a/modules/playground/hooks/useAI.ts b/modules/playground/hooks/useAI.ts index 8bbea5b1..7c6ace2d 100644 --- a/modules/playground/hooks/useAI.ts +++ b/modules/playground/hooks/useAI.ts @@ -151,7 +151,9 @@ export function collectFilePaths(items: FileSystemItem[], prefix = ""): string[] paths.push(...collectFilePaths(item.items, fp)); } else { const ext = item.fileExtension ? `.${item.fileExtension}` : ""; - paths.push(prefix ? `${prefix}/${item.filename}${ext}` : `${item.filename}${ext}`); + const fileName = `${item.filename}${ext}`; + if (fileName.includes(".test.") || fileName.includes(".spec.")) continue; + paths.push(prefix ? `${prefix}/${fileName}` : fileName); } } return paths;