fix: Properly ignore ignored folders when generating /onboard context

Signed-off-by: Fred Bricon <fbricon@gmail.com>
This commit is contained in:
Fred Bricon 2024-12-11 11:23:33 +01:00
parent d7ef0a3b1b
commit f7bca6a61d

View file

@ -73,7 +73,10 @@ async function getEntriesFilteredByIgnore(dir: string, ide: IDE) {
ig = ig.add(igPatterns);
}
const filteredEntries = entries.filter((entry) => !ig.ignores(entry.name));
const filteredEntries = entries.filter((entry) => {
const name = entry.isDirectory() ? `${entry.name}/` : entry.name;
return !ig.ignores(name);
});
return filteredEntries;
}
@ -117,7 +120,7 @@ async function gatherProjectContext(
function createOnboardingPrompt(context: string): string {
return `
As a helpful AI assistant, your task is to onboard a new developer to this project.
As a helpful AI assistant, your task is to onboard a new developer to this project.
Use the following context about the project structure, READMEs, and dependency files to create a comprehensive overview:
${context}