fix: 更新 thinkingBudget 的最大值限制至32767 , 最小值为 -1

This commit is contained in:
stevessr
2025-06-30 20:43:27 +08:00
parent 00f423a622
commit a41447a96d
2 changed files with 33 additions and 33 deletions
+5 -5
View File
@@ -1535,14 +1535,14 @@ function createAndAppendBudgetMapItem(mapKey, mapValue, modelId) {
valueInput.value = isNaN(intValue) ? 0 : 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 = 0;
valueInput.max = 24576;
valueInput.min = -1;
valueInput.max = 32767;
valueInput.addEventListener("input", function () {
let val = this.value.replace(/[^0-9]/g, "");
let val = this.value.replace(/[^0-9-]/g, "");
if (val !== "") {
val = parseInt(val, 10);
if (val < 0) val = 0;
if (val > 24576) val = 24576;
if (val < -1) val = -1;
if (val > 32767) val = 32767;
}
this.value = val; // Corrected variable name
});
+2 -2
View File
@@ -1299,7 +1299,7 @@ endblock %} {% block head_extra_styles %}
</div> -->
<small class="text-gray-500 mt-1 block"
>为每个思考模型设置预算(整数,最大值
24576),此项与上方模型列表自动关联。</small
32767),此项与上方模型列表自动关联。</small
>
</div>
<!-- 安全设置 -->
@@ -2355,7 +2355,7 @@ endblock %} {% block head_extra_styles %}
let val = this.value.replace(/[^0-9]/g, "");
if (val !== "") {
val = parseInt(val, 10);
if (val > 24576) val = 24576;
if (val > 32767) val = 32767;
}
this.value = val;