Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(edit): use toSorted instead of sort for candidate ranking
Fixes lint violation: unicorn(no-array-sort)
  • Loading branch information
ZOOWH authored and vincentkoc committed Jul 6, 2026
commit 4ff02abb971d8daaa0a0d4eb8e9308da0c254a23
2 changes: 1 addition & 1 deletion src/agents/sessions/tools/edit-diff.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ function getNotFoundError(
return { lineNum: idx + 1, line: trimmed, score: maxLen > 0 ? 1 - dist / maxLen : 0 };
})
.filter((s) => s.score > 0.3)
.sort((a, b) => b.score - a.score)
.toSorted((a, b) => b.score - a.score)
.slice(0, 3);
if (scored.length > 0) {
hint =
Expand Down