test: cover subagent helpers

This commit is contained in:
Peter Steinberger
2026-01-18 05:19:51 +00:00
parent 97cef49046
commit 7e2d91f3b7
2 changed files with 65 additions and 1 deletions

View File

@@ -61,7 +61,7 @@ function resolveSubagentTarget(
const sorted = sortSubagentRuns(runs);
return { entry: sorted[0] };
}
const sorted = sortRuns(runs);
const sorted = sortSubagentRuns(runs);
if (/^\d+$/.test(trimmed)) {
const idx = Number.parseInt(trimmed, 10);
if (!Number.isFinite(idx) || idx <= 0 || idx > sorted.length) {