snow-ai 0.5.23 → 0.5.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/cli.mjs +22 -10
- package/bundle/package.json +1 -1
- package/package.json +1 -1
package/bundle/cli.mjs
CHANGED
|
@@ -87966,6 +87966,7 @@ function ConfigScreen({ onBack, onSave, inlineMode = false }) {
|
|
|
87966
87966
|
const [searchTerm, setSearchTerm] = (0, import_react62.useState)("");
|
|
87967
87967
|
const [manualInputMode, setManualInputMode] = (0, import_react62.useState)(false);
|
|
87968
87968
|
const [manualInputValue, setManualInputValue] = (0, import_react62.useState)("");
|
|
87969
|
+
const [editingThresholdValue, setEditingThresholdValue] = (0, import_react62.useState)("");
|
|
87969
87970
|
const [, forceUpdate] = (0, import_react62.useState)(0);
|
|
87970
87971
|
const MAX_VISIBLE_FIELDS = 8;
|
|
87971
87972
|
const supportsXHigh = requestMethod === "responses";
|
|
@@ -88827,7 +88828,7 @@ function ConfigScreen({ onBack, onSave, inlineMode = false }) {
|
|
|
88827
88828
|
{ color: theme14.colors.menuInfo },
|
|
88828
88829
|
t.configScreen.enterValue,
|
|
88829
88830
|
" ",
|
|
88830
|
-
editSimilarityThreshold
|
|
88831
|
+
editingThresholdValue || editSimilarityThreshold
|
|
88831
88832
|
)
|
|
88832
88833
|
),
|
|
88833
88834
|
!isCurrentlyEditing && import_react62.default.createElement(
|
|
@@ -88929,20 +88930,28 @@ function ConfigScreen({ onBack, onSave, inlineMode = false }) {
|
|
|
88929
88930
|
if (currentField === "maxContextTokens" || currentField === "maxTokens" || currentField === "thinkingBudgetTokens" || currentField === "geminiThinkingBudget" || currentField === "editSimilarityThreshold") {
|
|
88930
88931
|
if (currentField === "editSimilarityThreshold") {
|
|
88931
88932
|
if (input2 && input2.match(/[0-9.]/)) {
|
|
88932
|
-
const currentStr = editSimilarityThreshold.toString();
|
|
88933
|
+
const currentStr = editingThresholdValue || editSimilarityThreshold.toString();
|
|
88934
|
+
if (input2 === "." && currentStr.includes(".")) {
|
|
88935
|
+
return;
|
|
88936
|
+
}
|
|
88933
88937
|
const newStr = currentStr + input2;
|
|
88934
|
-
|
|
88935
|
-
|
|
88936
|
-
setEditSimilarityThreshold(newValue);
|
|
88938
|
+
if (newStr === "." || newStr === "0." || /^[0-9]*\.?[0-9]*$/.test(newStr)) {
|
|
88939
|
+
setEditingThresholdValue(newStr);
|
|
88937
88940
|
}
|
|
88938
88941
|
} else if (key.backspace || key.delete) {
|
|
88939
|
-
const currentStr = editSimilarityThreshold.toString();
|
|
88942
|
+
const currentStr = editingThresholdValue || editSimilarityThreshold.toString();
|
|
88940
88943
|
const newStr = currentStr.slice(0, -1);
|
|
88941
|
-
|
|
88942
|
-
setEditSimilarityThreshold(!isNaN(newValue) ? newValue : 0);
|
|
88944
|
+
setEditingThresholdValue(newStr);
|
|
88943
88945
|
} else if (key.return) {
|
|
88944
|
-
const
|
|
88945
|
-
|
|
88946
|
+
const valueToSave = editingThresholdValue || editSimilarityThreshold.toString();
|
|
88947
|
+
const finalValue = parseFloat(valueToSave);
|
|
88948
|
+
if (!isNaN(finalValue) && finalValue >= 0.1 && finalValue <= 1) {
|
|
88949
|
+
setEditSimilarityThreshold(finalValue);
|
|
88950
|
+
} else if (finalValue < 0.1) {
|
|
88951
|
+
setEditSimilarityThreshold(0.1);
|
|
88952
|
+
} else {
|
|
88953
|
+
}
|
|
88954
|
+
setEditingThresholdValue("");
|
|
88946
88955
|
setIsEditing(false);
|
|
88947
88956
|
}
|
|
88948
88957
|
return;
|
|
@@ -89027,6 +89036,9 @@ function ConfigScreen({ onBack, onSave, inlineMode = false }) {
|
|
|
89027
89036
|
setResponsesReasoningEnabled(!responsesReasoningEnabled);
|
|
89028
89037
|
} else if (currentField === "maxContextTokens" || currentField === "maxTokens" || currentField === "thinkingBudgetTokens" || currentField === "geminiThinkingBudget") {
|
|
89029
89038
|
setIsEditing(true);
|
|
89039
|
+
} else if (currentField === "editSimilarityThreshold") {
|
|
89040
|
+
setEditingThresholdValue("");
|
|
89041
|
+
setIsEditing(true);
|
|
89030
89042
|
} else if (currentField === "responsesReasoningEffort") {
|
|
89031
89043
|
setIsEditing(true);
|
|
89032
89044
|
} else if (currentField === "advancedModel" || currentField === "basicModel") {
|
package/bundle/package.json
CHANGED