fix(listen): normalize inbound user image payloads (#1374)

This commit is contained in:
Charles Packer
2026-03-12 20:37:50 -07:00
committed by GitHub
parent 94ff9f6796
commit e2e82866ad
3 changed files with 169 additions and 7 deletions

View File

@@ -165,8 +165,7 @@ function gatherDirListing(): string {
const lines: string[] = [];
const sorted = [...dirs, ...files];
for (let i = 0; i < sorted.length; i++) {
const entry = sorted[i]!;
for (const [i, entry] of sorted.entries()) {
const isLast = i === sorted.length - 1;
const prefix = isLast ? "└── " : "├── ";
@@ -189,8 +188,7 @@ function gatherDirListing(): string {
return a.name.localeCompare(b.name);
});
const childPrefix = isLast ? " " : "│ ";
for (let j = 0; j < children.length; j++) {
const child = children[j]!;
for (const [j, child] of children.entries()) {
const childIsLast = j === children.length - 1;
const connector = childIsLast ? "└── " : "├── ";
const suffix = child.isDirectory() ? "/" : "";