chore: section-prefix remaining tool paths in docs, examples, benchmarks, and multi-input test

This commit is contained in:
SnapOtter
2026-06-21 00:30:10 +08:00
parent 84247fd077
commit c1c66efd3f
56 changed files with 69 additions and 60 deletions
@@ -73,6 +73,15 @@ describe("rewriteToolPaths", () => {
);
});
it("treats ) and , as segment boundaries (prose/comments)", () => {
expect(rewriteToolPaths("see (/api/v1/tools/crop) for details", MAP)).toBe(
"see (/api/v1/tools/image/crop) for details",
);
expect(rewriteToolPaths("endpoints /api/v1/tools/crop, /api/v1/tools/resize", MAP)).toBe(
"endpoints /api/v1/tools/image/crop, /api/v1/tools/image/resize",
);
});
it("throws if an id is also a section slug (idempotency invariant)", () => {
expect(() => rewriteToolPaths("x", { image: "image" })).toThrow(/idempotency/);
});