From a4a05b0c4ceda65b5868ccaeaa730d305bea2329 Mon Sep 17 00:00:00 2001 From: Caleb Owens Date: Wed, 15 May 2024 07:33:23 +0100 Subject: [PATCH] Fix sorting for commit messages --- app/src/lib/ai/service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/lib/ai/service.ts b/app/src/lib/ai/service.ts index 4a8e3db35..4bcdf2cbc 100644 --- a/app/src/lib/ai/service.ts +++ b/app/src/lib/ai/service.ts @@ -86,7 +86,7 @@ export function buildDiff(hunks: Hunk[], limit: number) { function shuffle(items: T[]): T[] { return items .map((item) => ({ item, value: Math.random() })) - .sort() + .sort(({ value: a }, { value: b }) => a - b) .map((item) => item.item); }