Modifications du init
This commit is contained in:
parent
3f64ef88c8
commit
d0853db245
2 changed files with 2 additions and 1 deletions
|
|
@ -102,6 +102,7 @@ describe("permissions au démarrage", () => {
|
|||
expect(d("Read", { path: "./.deny.md" })).toBe("deny");
|
||||
expect(logs.join("\n")).toContain("Permissions chargées");
|
||||
expect(logs.join("\n")).toContain("2 deny, 1 ask, 1 allow");
|
||||
expect(logs.some((l) => l.startsWith("Permissions chargées :\n"))).toBe(true); // un fichier par ligne
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ export async function initializeAgent(ctx: InitContext): Promise<ModeInitResult>
|
|||
const files = settings.files
|
||||
.filter((f) => f.allow + f.ask + f.deny > 0)
|
||||
.map((f) => `${f.path} (${f.deny} deny, ${f.ask} ask, ${f.allow} allow)`);
|
||||
ctx.log(`Permissions chargées : ${files.join(" ; ")}`);
|
||||
ctx.log(["Permissions chargées :", ...files].join("\n"));
|
||||
} else {
|
||||
ctx.log("Aucune règle de permission définie : chaque utilisation d'un outil demande une confirmation.");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue