fix(coding-agent): show item count instead of line count in config scroll indicator (#3820)

This commit is contained in:
Aliou Diallo
2026-04-27 23:21:32 +02:00
committed by GitHub
parent 084aa2b54d
commit 13610d3893

View File

@@ -348,7 +348,10 @@ class ResourceList implements Component, Focusable {
// Scroll indicator
if (startIndex > 0 || endIndex < this.filteredItems.length) {
lines.push(theme.fg("dim", ` (${this.selectedIndex + 1}/${this.filteredItems.length})`));
const itemCount = this.filteredItems.filter((e) => e.type === "item").length;
const currentItemIndex =
this.filteredItems.slice(0, this.selectedIndex).filter((e) => e.type === "item").length + 1;
lines.push(theme.fg("dim", ` (${currentItemIndex}/${itemCount})`));
}
return lines;