From a6fe5a70228eceabec3d4c8eae1f75705de6b55c Mon Sep 17 00:00:00 2001 From: snaily Date: Sat, 19 Jul 2025 22:11:36 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9B=B4=E6=96=B0=E6=80=9D=E8=80=83?= =?UTF-8?q?=E6=A8=A1=E5=9E=8B=E9=A2=84=E7=AE=97=E8=AF=B4=E6=98=8E=EF=BC=8C?= =?UTF-8?q?=E4=BD=BF=E7=94=A8-1=E8=A1=A8=E7=A4=BA=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E9=A2=84=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/static/js/config_editor.js | 8 ++++---- app/templates/config_editor.html | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/static/js/config_editor.js b/app/static/js/config_editor.js index 8182510..858078d 100644 --- a/app/static/js/config_editor.js +++ b/app/static/js/config_editor.js @@ -1462,7 +1462,7 @@ function addArrayItem(key) { const modelId = addArrayItemWithValue(key, newItemValue); // This adds the DOM element if (key === "THINKING_MODELS" && modelId) { - createAndAppendBudgetMapItem(newItemValue, 0, modelId); // Default budget 0 + createAndAppendBudgetMapItem(newItemValue, -1, modelId); // Default budget -1 } } @@ -1572,7 +1572,7 @@ function createAndAppendBudgetMapItem(mapKey, mapValue, modelId) { const valueInput = document.createElement("input"); valueInput.type = "number"; const intValue = parseInt(mapValue, 10); - valueInput.value = isNaN(intValue) ? 0 : intValue; + valueInput.value = isNaN(intValue) ? -1 : intValue; valueInput.placeholder = "预算 (整数)"; valueInput.className = `${MAP_VALUE_INPUT_CLASS} w-24 px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:border-primary-500 focus:ring focus:ring-primary-200 focus:ring-opacity-50`; valueInput.min = -1; @@ -1733,7 +1733,7 @@ function collectFormData() { formData["THINKING_BUDGET_MAP"][keyInput.value.trim()] = isNaN( budgetValue ) - ? 0 + ? -1 : budgetValue; } }); @@ -2284,7 +2284,7 @@ function handleModelSelection(selectedModelId) { ); if (currentModelHelperTarget.targetKey === "THINKING_MODELS" && modelId) { // Automatically add corresponding budget map item with default budget 0 - createAndAppendBudgetMapItem(selectedModelId, 0, modelId); + createAndAppendBudgetMapItem(selectedModelId, -1, modelId); } } diff --git a/app/templates/config_editor.html b/app/templates/config_editor.html index a8a4ff1..c142fb2 100644 --- a/app/templates/config_editor.html +++ b/app/templates/config_editor.html @@ -1523,7 +1523,7 @@ endblock %} {% block head_extra_styles %} --> 为每个思考模型设置预算(整数,最大值 + >为每个思考模型设置预算(-1为auto,最大值 32767),此项与上方模型列表自动关联。