找出这个生成式上下文收集器的选择缺陷。
JavaScript
const files = [
{ path: ".env", text: "TOKEN=demo-secret" },
{ path: "dist/app.js", text: "generated bundle" },
{ path: "src/cart.js", text: "export function total() {}" },
];
function buildContext(entries) {
return entries
.map((file) => `## ${file.path}\n${file.text}`)
.join("\n\n");
}
console.log(buildContext(files));