From 78e7ed7f33ee8015ec56a200dd839c82db3efe5d Mon Sep 17 00:00:00 2001 From: Youzini-afk <13153778771cx@gmail.com> Date: Fri, 27 Mar 2026 16:09:18 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20prompt=E5=9D=97=E4=B8=8A=E7=A7=BB/?= =?UTF-8?q?=E4=B8=8B=E7=A7=BB=E5=A4=B1=E6=95=88-mergeDefaultTaskProfileBlo?= =?UTF-8?q?cks=E4=B8=8D=E5=86=8D=E5=BC=BA=E5=88=B6=E9=87=8D=E7=BD=AEorder?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prompt-profiles.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/prompt-profiles.js b/prompt-profiles.js index da14b73..296bca0 100644 --- a/prompt-profiles.js +++ b/prompt-profiles.js @@ -755,7 +755,7 @@ function mergeDefaultTaskProfileBlocks(taskType, existingBlocks = []) { if (!existing) { return { ...canonicalBlock, - order: index, + order: Number.isFinite(Number(canonicalBlock.order)) ? Number(canonicalBlock.order) : index, }; } @@ -782,7 +782,7 @@ function mergeDefaultTaskProfileBlocks(taskType, existingBlocks = []) { typeof existing.injectionMode === "string" && existing.injectionMode ? existing.injectionMode : canonicalBlock.injectionMode, - order: index, + order: Number.isFinite(Number(existing.order)) ? Number(existing.order) : index, }; }); @@ -792,7 +792,7 @@ function mergeDefaultTaskProfileBlocks(taskType, existingBlocks = []) { .filter((block) => !canonicalIds.has(String(block.id || ""))) .map((block, index) => ({ ...block, - order: canonicalBlocks.length + index, + order: Number.isFinite(Number(block.order)) ? Number(block.order) : canonicalBlocks.length + index, })); return [...merged, ...extraBlocks];