Handle nested imported AGENTS edge case

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
dotta 2026-03-23 20:56:34 -05:00
parent e4e5b61596
commit 08bdc3d28e
2 changed files with 71 additions and 1 deletions

View file

@ -3870,7 +3870,7 @@ export function companyPortabilityService(db: Db, storage?: StorageService) {
if (typeof markdownRaw === "string") {
const importedInstructionsBody = parseFrontmatterMarkdown(markdownRaw).body;
bundleFiles[entryRelativePath] = importedInstructionsBody;
if (entryRelativePath !== "AGENTS.md" && !bundleFiles["AGENTS.md"]) {
if (entryRelativePath !== "AGENTS.md") {
bundleFiles["AGENTS.md"] = importedInstructionsBody;
}
}