Merge branch 'pr/stevessr/160'

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