snow-ai 0.6.56 → 0.6.58
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 +199 -30
- package/bundle/package.json +1 -1
- package/package.json +1 -1
package/bundle/cli.mjs
CHANGED
|
@@ -90258,6 +90258,10 @@ function getResponsesReasoningConfig() {
|
|
|
90258
90258
|
summary: "auto"
|
|
90259
90259
|
};
|
|
90260
90260
|
}
|
|
90261
|
+
function getResponsesVerbosityConfig() {
|
|
90262
|
+
const config4 = getOpenAiConfig();
|
|
90263
|
+
return config4.responsesVerbosity || "medium";
|
|
90264
|
+
}
|
|
90261
90265
|
function resetOpenAIClient2() {
|
|
90262
90266
|
}
|
|
90263
90267
|
function toResponseImageUrl(image3) {
|
|
@@ -90505,6 +90509,7 @@ async function* createStreamingResponse(options3, abortSignal, onRetry) {
|
|
|
90505
90509
|
options3.planMode || false
|
|
90506
90510
|
);
|
|
90507
90511
|
const configuredReasoning = getResponsesReasoningConfig();
|
|
90512
|
+
const configuredVerbosity = getResponsesVerbosityConfig();
|
|
90508
90513
|
yield* withRetryGenerator(async function* () {
|
|
90509
90514
|
var _a21;
|
|
90510
90515
|
const requestPayload = {
|
|
@@ -90521,6 +90526,9 @@ async function* createStreamingResponse(options3, abortSignal, onRetry) {
|
|
|
90521
90526
|
...config4.responsesFastMode && {
|
|
90522
90527
|
service_tier: "priority"
|
|
90523
90528
|
},
|
|
90529
|
+
text: {
|
|
90530
|
+
verbosity: configuredVerbosity
|
|
90531
|
+
},
|
|
90524
90532
|
store: false,
|
|
90525
90533
|
stream: true,
|
|
90526
90534
|
include: ["reasoning.encrypted_content"],
|
|
@@ -94006,6 +94014,7 @@ var init_configManager = __esm({
|
|
|
94006
94014
|
// dist/utils/config/apiConfig.js
|
|
94007
94015
|
var apiConfig_exports = {};
|
|
94008
94016
|
__export(apiConfig_exports, {
|
|
94017
|
+
DEFAULT_AUTO_COMPRESS_THRESHOLD: () => DEFAULT_AUTO_COMPRESS_THRESHOLD,
|
|
94009
94018
|
DEFAULT_CONFIG: () => DEFAULT_CONFIG2,
|
|
94010
94019
|
DEFAULT_STREAM_IDLE_TIMEOUT_SEC: () => DEFAULT_STREAM_IDLE_TIMEOUT_SEC,
|
|
94011
94020
|
clearConfigCache: () => clearConfigCache,
|
|
@@ -94419,11 +94428,12 @@ function saveCustomHeadersConfig(config4) {
|
|
|
94419
94428
|
throw new Error(`Failed to save custom headers config: ${error40}`);
|
|
94420
94429
|
}
|
|
94421
94430
|
}
|
|
94422
|
-
var DEFAULT_STREAM_IDLE_TIMEOUT_SEC, DEFAULT_CONFIG2, DEFAULT_MCP_CONFIG, CONFIG_DIR3, PROXY_CONFIG_FILE2, SYSTEM_PROMPT_FILE, SYSTEM_PROMPT_JSON_FILE, CUSTOM_HEADERS_FILE, CONFIG_FILE, MCP_CONFIG_FILE, configCache;
|
|
94431
|
+
var DEFAULT_STREAM_IDLE_TIMEOUT_SEC, DEFAULT_AUTO_COMPRESS_THRESHOLD, DEFAULT_CONFIG2, DEFAULT_MCP_CONFIG, CONFIG_DIR3, PROXY_CONFIG_FILE2, SYSTEM_PROMPT_FILE, SYSTEM_PROMPT_JSON_FILE, CUSTOM_HEADERS_FILE, CONFIG_FILE, MCP_CONFIG_FILE, configCache;
|
|
94423
94432
|
var init_apiConfig = __esm({
|
|
94424
94433
|
"dist/utils/config/apiConfig.js"() {
|
|
94425
94434
|
"use strict";
|
|
94426
94435
|
DEFAULT_STREAM_IDLE_TIMEOUT_SEC = 180;
|
|
94436
|
+
DEFAULT_AUTO_COMPRESS_THRESHOLD = 80;
|
|
94427
94437
|
DEFAULT_CONFIG2 = {
|
|
94428
94438
|
snowcfg: {
|
|
94429
94439
|
baseUrl: "https://api.openai.com/v1",
|
|
@@ -452050,6 +452060,7 @@ var init_en2 = __esm({
|
|
|
452050
452060
|
anthropicCacheTTL1h: "1 hour",
|
|
452051
452061
|
enablePromptOptimization: "Enable Prompt Optimization:",
|
|
452052
452062
|
enableAutoCompress: "Enable Auto Compression:",
|
|
452063
|
+
autoCompressThreshold: "Auto Compress Threshold (%):",
|
|
452053
452064
|
showThinking: "Show Thinking Process:",
|
|
452054
452065
|
thinkingEnabled: "Thinking Enabled:",
|
|
452055
452066
|
thinkingMode: "Thinking Mode:",
|
|
@@ -452061,6 +452072,7 @@ var init_en2 = __esm({
|
|
|
452061
452072
|
geminiThinkingBudget: "Gemini Thinking Budget:",
|
|
452062
452073
|
responsesReasoningEnabled: "Responses Reasoning Enabled:",
|
|
452063
452074
|
responsesReasoningEffort: "Responses Reasoning Effort:",
|
|
452075
|
+
responsesVerbosity: "Responses Verbosity:",
|
|
452064
452076
|
responsesFastMode: "Responses Fast Mode (priority):",
|
|
452065
452077
|
advancedModel: "Advanced Model(Type to search):",
|
|
452066
452078
|
basicModel: "Basic Model(Type to search):",
|
|
@@ -453398,6 +453410,7 @@ var init_zh = __esm({
|
|
|
453398
453410
|
anthropicCacheTTL1h: "1\u5C0F\u65F6",
|
|
453399
453411
|
enablePromptOptimization: "\u542F\u7528\u63D0\u793A\u8BCD\u4F18\u5316:",
|
|
453400
453412
|
enableAutoCompress: "\u542F\u7528\u81EA\u52A8\u538B\u7F29:",
|
|
453413
|
+
autoCompressThreshold: "\u81EA\u52A8\u538B\u7F29\u9608\u503C (%):",
|
|
453401
453414
|
showThinking: "\u663E\u793A\u601D\u8003\u8FC7\u7A0B:",
|
|
453402
453415
|
thinkingEnabled: "\u542F\u7528\u601D\u8003\u6A21\u5F0F:",
|
|
453403
453416
|
thinkingMode: "\u601D\u8003\u6A21\u5F0F:",
|
|
@@ -453409,6 +453422,7 @@ var init_zh = __esm({
|
|
|
453409
453422
|
geminiThinkingBudget: "Gemini \u601D\u8003\u9884\u7B97:",
|
|
453410
453423
|
responsesReasoningEnabled: "\u542F\u7528 Responses \u63A8\u7406:",
|
|
453411
453424
|
responsesReasoningEffort: "Responses \u63A8\u7406\u5F3A\u5EA6:",
|
|
453425
|
+
responsesVerbosity: "Responses \u8F93\u51FA\u8BE6\u7EC6\u5EA6:",
|
|
453412
453426
|
responsesFastMode: "Responses Fast (priority):",
|
|
453413
453427
|
advancedModel: "\u9AD8\u7EA7\u6A21\u578B(\u952E\u5165\u53EF\u641C\u7D22):",
|
|
453414
453428
|
basicModel: "\u57FA\u7840\u6A21\u578B(\u952E\u5165\u53EF\u641C\u7D22):",
|
|
@@ -454745,6 +454759,7 @@ var init_zh_TW = __esm({
|
|
|
454745
454759
|
anthropicCacheTTL1h: "1\u5C0F\u6642",
|
|
454746
454760
|
enablePromptOptimization: "\u555F\u7528\u63D0\u793A\u8A5E\u512A\u5316:",
|
|
454747
454761
|
enableAutoCompress: "\u555F\u7528\u81EA\u52D5\u58D3\u7E2E:",
|
|
454762
|
+
autoCompressThreshold: "\u81EA\u52D5\u58D3\u7E2E\u95BE\u503C (%):",
|
|
454748
454763
|
showThinking: "\u986F\u793A\u601D\u8003\u904E\u7A0B:",
|
|
454749
454764
|
thinkingEnabled: "\u555F\u7528\u601D\u8003\u6A21\u5F0F:",
|
|
454750
454765
|
thinkingMode: "\u601D\u8003\u6A21\u5F0F:",
|
|
@@ -454756,6 +454771,7 @@ var init_zh_TW = __esm({
|
|
|
454756
454771
|
geminiThinkingBudget: "Gemini \u601D\u8003\u9810\u7B97:",
|
|
454757
454772
|
responsesReasoningEnabled: "\u555F\u7528 Responses \u63A8\u7406:",
|
|
454758
454773
|
responsesReasoningEffort: "Responses \u63A8\u7406\u5F37\u5EA6:",
|
|
454774
|
+
responsesVerbosity: "Responses \u8F38\u51FA\u8A73\u7D30\u5EA6:",
|
|
454759
454775
|
responsesFastMode: "Responses Fast (priority):",
|
|
454760
454776
|
advancedModel: "\u9032\u968E\u6A21\u578B(\u8F38\u5165\u5F8C\u53EF\u4EE5\u641C\u5C0B):",
|
|
454761
454777
|
basicModel: "\u57FA\u790E\u6A21\u578B(\u8F38\u5165\u5F8C\u53EF\u4EE5\u641C\u5C0B):",
|
|
@@ -460928,6 +460944,7 @@ function ConfigScreen({ onBack, onSave, inlineMode = false }) {
|
|
|
460928
460944
|
const [anthropicBeta, setAnthropicBeta] = (0, import_react66.useState)(false);
|
|
460929
460945
|
const [anthropicCacheTTL, setAnthropicCacheTTL] = (0, import_react66.useState)("5m");
|
|
460930
460946
|
const [enableAutoCompress, setEnableAutoCompress] = (0, import_react66.useState)(true);
|
|
460947
|
+
const [autoCompressThreshold, setAutoCompressThreshold] = (0, import_react66.useState)(80);
|
|
460931
460948
|
const [showThinking, setShowThinking] = (0, import_react66.useState)(true);
|
|
460932
460949
|
const [thinkingEnabled, setThinkingEnabled] = (0, import_react66.useState)(false);
|
|
460933
460950
|
const [thinkingMode, setThinkingMode] = (0, import_react66.useState)("tokens");
|
|
@@ -460937,6 +460954,7 @@ function ConfigScreen({ onBack, onSave, inlineMode = false }) {
|
|
|
460937
460954
|
const [geminiThinkingBudget, setGeminiThinkingBudget] = (0, import_react66.useState)(1024);
|
|
460938
460955
|
const [responsesReasoningEnabled, setResponsesReasoningEnabled] = (0, import_react66.useState)(false);
|
|
460939
460956
|
const [responsesReasoningEffort, setResponsesReasoningEffort] = (0, import_react66.useState)("high");
|
|
460957
|
+
const [responsesVerbosity, setResponsesVerbosity] = (0, import_react66.useState)("medium");
|
|
460940
460958
|
const [responsesFastMode, setResponsesFastMode] = (0, import_react66.useState)(false);
|
|
460941
460959
|
const [advancedModel, setAdvancedModel] = (0, import_react66.useState)("");
|
|
460942
460960
|
const [basicModel, setBasicModel] = (0, import_react66.useState)("");
|
|
@@ -460985,6 +461003,7 @@ function ConfigScreen({ onBack, onSave, inlineMode = false }) {
|
|
|
460985
461003
|
"systemPromptId",
|
|
460986
461004
|
"customHeadersSchemeId",
|
|
460987
461005
|
"enableAutoCompress",
|
|
461006
|
+
...enableAutoCompress ? ["autoCompressThreshold"] : [],
|
|
460988
461007
|
"showThinking",
|
|
460989
461008
|
...requestMethod === "anthropic" ? [
|
|
460990
461009
|
"anthropicBeta",
|
|
@@ -460999,6 +461018,7 @@ function ConfigScreen({ onBack, onSave, inlineMode = false }) {
|
|
|
460999
461018
|
] : requestMethod === "responses" ? [
|
|
461000
461019
|
"responsesReasoningEnabled",
|
|
461001
461020
|
"responsesReasoningEffort",
|
|
461021
|
+
"responsesVerbosity",
|
|
461002
461022
|
"responsesFastMode"
|
|
461003
461023
|
] : [],
|
|
461004
461024
|
"advancedModel",
|
|
@@ -461045,10 +461065,15 @@ function ConfigScreen({ onBack, onSave, inlineMode = false }) {
|
|
|
461045
461065
|
if (requestMethod !== "gemini" && (currentField === "geminiThinkingEnabled" || currentField === "geminiThinkingBudget")) {
|
|
461046
461066
|
setCurrentField("advancedModel");
|
|
461047
461067
|
}
|
|
461048
|
-
if (requestMethod !== "responses" && (currentField === "responsesReasoningEnabled" || currentField === "responsesReasoningEffort" || currentField === "responsesFastMode")) {
|
|
461068
|
+
if (requestMethod !== "responses" && (currentField === "responsesReasoningEnabled" || currentField === "responsesReasoningEffort" || currentField === "responsesVerbosity" || currentField === "responsesFastMode")) {
|
|
461049
461069
|
setCurrentField("advancedModel");
|
|
461050
461070
|
}
|
|
461051
461071
|
}, [requestMethod, currentField]);
|
|
461072
|
+
(0, import_react66.useEffect)(() => {
|
|
461073
|
+
if (!enableAutoCompress && currentField === "autoCompressThreshold") {
|
|
461074
|
+
setCurrentField("showThinking");
|
|
461075
|
+
}
|
|
461076
|
+
}, [enableAutoCompress, currentField]);
|
|
461052
461077
|
(0, import_react66.useEffect)(() => {
|
|
461053
461078
|
if (responsesReasoningEffort === "xhigh" && !supportsXHigh) {
|
|
461054
461079
|
setResponsesReasoningEffort("high");
|
|
@@ -461073,6 +461098,7 @@ function ConfigScreen({ onBack, onSave, inlineMode = false }) {
|
|
|
461073
461098
|
setAnthropicBeta(config4.anthropicBeta || false);
|
|
461074
461099
|
setAnthropicCacheTTL(config4.anthropicCacheTTL || "5m");
|
|
461075
461100
|
setEnableAutoCompress(config4.enableAutoCompress !== false);
|
|
461101
|
+
setAutoCompressThreshold(config4.autoCompressThreshold ?? 80);
|
|
461076
461102
|
setShowThinking(config4.showThinking !== false);
|
|
461077
461103
|
setThinkingEnabled(((_a21 = config4.thinking) == null ? void 0 : _a21.type) === "enabled" || ((_b14 = config4.thinking) == null ? void 0 : _b14.type) === "adaptive" || false);
|
|
461078
461104
|
setThinkingMode(((_c6 = config4.thinking) == null ? void 0 : _c6.type) === "adaptive" ? "adaptive" : "tokens");
|
|
@@ -461082,6 +461108,7 @@ function ConfigScreen({ onBack, onSave, inlineMode = false }) {
|
|
|
461082
461108
|
setGeminiThinkingBudget(((_g = config4.geminiThinking) == null ? void 0 : _g.budget) || 1024);
|
|
461083
461109
|
setResponsesReasoningEnabled(((_h = config4.responsesReasoning) == null ? void 0 : _h.enabled) || false);
|
|
461084
461110
|
setResponsesReasoningEffort(((_i = config4.responsesReasoning) == null ? void 0 : _i.effort) || "high");
|
|
461111
|
+
setResponsesVerbosity(config4.responsesVerbosity || "medium");
|
|
461085
461112
|
setResponsesFastMode(config4.responsesFastMode || false);
|
|
461086
461113
|
setAdvancedModel(config4.advancedModel || "");
|
|
461087
461114
|
setBasicModel(config4.basicModel || "");
|
|
@@ -461280,6 +461307,7 @@ function ConfigScreen({ onBack, onSave, inlineMode = false }) {
|
|
|
461280
461307
|
anthropicBeta,
|
|
461281
461308
|
anthropicCacheTTL,
|
|
461282
461309
|
enableAutoCompress,
|
|
461310
|
+
autoCompressThreshold,
|
|
461283
461311
|
showThinking,
|
|
461284
461312
|
thinking: thinkingEnabled ? thinkingMode === "adaptive" ? { type: "adaptive", effort: thinkingEffort } : { type: "enabled", budget_tokens: thinkingBudgetTokens } : void 0,
|
|
461285
461313
|
advancedModel,
|
|
@@ -461366,6 +461394,7 @@ function ConfigScreen({ onBack, onSave, inlineMode = false }) {
|
|
|
461366
461394
|
anthropicBeta,
|
|
461367
461395
|
anthropicCacheTTL,
|
|
461368
461396
|
enableAutoCompress,
|
|
461397
|
+
autoCompressThreshold,
|
|
461369
461398
|
showThinking,
|
|
461370
461399
|
advancedModel,
|
|
461371
461400
|
basicModel,
|
|
@@ -461399,6 +461428,7 @@ function ConfigScreen({ onBack, onSave, inlineMode = false }) {
|
|
|
461399
461428
|
effort: responsesReasoningEffort
|
|
461400
461429
|
};
|
|
461401
461430
|
config4.responsesFastMode = responsesFastMode;
|
|
461431
|
+
config4.responsesVerbosity = responsesVerbosity;
|
|
461402
461432
|
await updateOpenAiConfig(config4);
|
|
461403
461433
|
try {
|
|
461404
461434
|
const fullConfig = {
|
|
@@ -461411,6 +461441,7 @@ function ConfigScreen({ onBack, onSave, inlineMode = false }) {
|
|
|
461411
461441
|
anthropicBeta,
|
|
461412
461442
|
anthropicCacheTTL,
|
|
461413
461443
|
enableAutoCompress,
|
|
461444
|
+
autoCompressThreshold,
|
|
461414
461445
|
showThinking,
|
|
461415
461446
|
thinking: thinkingEnabled ? thinkingMode === "adaptive" ? { type: "adaptive", effort: thinkingEffort } : {
|
|
461416
461447
|
type: "enabled",
|
|
@@ -461421,6 +461452,7 @@ function ConfigScreen({ onBack, onSave, inlineMode = false }) {
|
|
|
461421
461452
|
enabled: responsesReasoningEnabled,
|
|
461422
461453
|
effort: responsesReasoningEffort
|
|
461423
461454
|
},
|
|
461455
|
+
responsesVerbosity,
|
|
461424
461456
|
responsesFastMode,
|
|
461425
461457
|
advancedModel,
|
|
461426
461458
|
basicModel,
|
|
@@ -461650,6 +461682,33 @@ function ConfigScreen({ onBack, onSave, inlineMode = false }) {
|
|
|
461650
461682
|
)
|
|
461651
461683
|
)
|
|
461652
461684
|
);
|
|
461685
|
+
case "autoCompressThreshold":
|
|
461686
|
+
return import_react66.default.createElement(
|
|
461687
|
+
Box_default,
|
|
461688
|
+
{ key: field, flexDirection: "column" },
|
|
461689
|
+
import_react66.default.createElement(
|
|
461690
|
+
Text,
|
|
461691
|
+
{ color: isActive ? theme14.colors.menuSelected : theme14.colors.menuNormal },
|
|
461692
|
+
isActive ? "\u276F " : " ",
|
|
461693
|
+
t.configScreen.autoCompressThreshold
|
|
461694
|
+
),
|
|
461695
|
+
isCurrentlyEditing && import_react66.default.createElement(
|
|
461696
|
+
Box_default,
|
|
461697
|
+
{ marginLeft: 3 },
|
|
461698
|
+
import_react66.default.createElement(
|
|
461699
|
+
Text,
|
|
461700
|
+
{ color: theme14.colors.menuInfo },
|
|
461701
|
+
t.configScreen.enterValue,
|
|
461702
|
+
" ",
|
|
461703
|
+
autoCompressThreshold
|
|
461704
|
+
)
|
|
461705
|
+
),
|
|
461706
|
+
!isCurrentlyEditing && import_react66.default.createElement(
|
|
461707
|
+
Box_default,
|
|
461708
|
+
{ marginLeft: 3 },
|
|
461709
|
+
import_react66.default.createElement(Text, { color: theme14.colors.menuSecondary }, autoCompressThreshold)
|
|
461710
|
+
)
|
|
461711
|
+
);
|
|
461653
461712
|
case "showThinking":
|
|
461654
461713
|
return import_react66.default.createElement(
|
|
461655
461714
|
Box_default,
|
|
@@ -461847,6 +461906,7 @@ function ConfigScreen({ onBack, onSave, inlineMode = false }) {
|
|
|
461847
461906
|
Box_default,
|
|
461848
461907
|
{ marginLeft: 3 },
|
|
461849
461908
|
import_react66.default.createElement(Select, { options: [
|
|
461909
|
+
{ label: "NONE", value: "none" },
|
|
461850
461910
|
{ label: "LOW", value: "low" },
|
|
461851
461911
|
{ label: "MEDIUM", value: "medium" },
|
|
461852
461912
|
{ label: "HIGH", value: "high" },
|
|
@@ -461857,6 +461917,34 @@ function ConfigScreen({ onBack, onSave, inlineMode = false }) {
|
|
|
461857
461917
|
} })
|
|
461858
461918
|
)
|
|
461859
461919
|
);
|
|
461920
|
+
case "responsesVerbosity":
|
|
461921
|
+
return import_react66.default.createElement(
|
|
461922
|
+
Box_default,
|
|
461923
|
+
{ key: field, flexDirection: "column" },
|
|
461924
|
+
import_react66.default.createElement(
|
|
461925
|
+
Text,
|
|
461926
|
+
{ color: isActive ? theme14.colors.menuSelected : theme14.colors.menuNormal },
|
|
461927
|
+
isActive ? "\u276F " : " ",
|
|
461928
|
+
t.configScreen.responsesVerbosity
|
|
461929
|
+
),
|
|
461930
|
+
!isCurrentlyEditing && import_react66.default.createElement(
|
|
461931
|
+
Box_default,
|
|
461932
|
+
{ marginLeft: 3 },
|
|
461933
|
+
import_react66.default.createElement(Text, { color: theme14.colors.menuSecondary }, responsesVerbosity.toUpperCase())
|
|
461934
|
+
),
|
|
461935
|
+
isCurrentlyEditing && import_react66.default.createElement(
|
|
461936
|
+
Box_default,
|
|
461937
|
+
{ marginLeft: 3 },
|
|
461938
|
+
import_react66.default.createElement(Select, { options: [
|
|
461939
|
+
{ label: "LOW", value: "low" },
|
|
461940
|
+
{ label: "MEDIUM", value: "medium" },
|
|
461941
|
+
{ label: "HIGH", value: "high" }
|
|
461942
|
+
], onChange: (value) => {
|
|
461943
|
+
setResponsesVerbosity(value);
|
|
461944
|
+
setIsEditing(false);
|
|
461945
|
+
} })
|
|
461946
|
+
)
|
|
461947
|
+
);
|
|
461860
461948
|
case "responsesFastMode":
|
|
461861
461949
|
return import_react66.default.createElement(
|
|
461862
461950
|
Box_default,
|
|
@@ -462128,7 +462216,7 @@ function ConfigScreen({ onBack, onSave, inlineMode = false }) {
|
|
|
462128
462216
|
}
|
|
462129
462217
|
return;
|
|
462130
462218
|
}
|
|
462131
|
-
if (isEditing && (currentField === "profile" || currentField === "requestMethod" || currentField === "systemPromptId" || currentField === "customHeadersSchemeId" || currentField === "anthropicCacheTTL" || currentField === "advancedModel" || currentField === "basicModel" || currentField === "thinkingMode" || currentField === "thinkingEffort" || currentField === "responsesReasoningEffort") && key.escape) {
|
|
462219
|
+
if (isEditing && (currentField === "profile" || currentField === "requestMethod" || currentField === "systemPromptId" || currentField === "customHeadersSchemeId" || currentField === "anthropicCacheTTL" || currentField === "advancedModel" || currentField === "basicModel" || currentField === "thinkingMode" || currentField === "thinkingEffort" || currentField === "responsesReasoningEffort" || currentField === "responsesVerbosity") && key.escape) {
|
|
462132
462220
|
setIsEditing(false);
|
|
462133
462221
|
setSearchTerm("");
|
|
462134
462222
|
if (currentField === "systemPromptId") {
|
|
@@ -462144,7 +462232,7 @@ function ConfigScreen({ onBack, onSave, inlineMode = false }) {
|
|
|
462144
462232
|
}
|
|
462145
462233
|
return;
|
|
462146
462234
|
}
|
|
462147
|
-
if (currentField === "maxContextTokens" || currentField === "maxTokens" || currentField === "streamIdleTimeoutSec" || currentField === "toolResultTokenLimit" || currentField === "thinkingBudgetTokens" || currentField === "geminiThinkingBudget" || currentField === "editSimilarityThreshold") {
|
|
462235
|
+
if (currentField === "maxContextTokens" || currentField === "maxTokens" || currentField === "streamIdleTimeoutSec" || currentField === "toolResultTokenLimit" || currentField === "thinkingBudgetTokens" || currentField === "geminiThinkingBudget" || currentField === "autoCompressThreshold" || currentField === "editSimilarityThreshold") {
|
|
462148
462236
|
if (currentField === "editSimilarityThreshold") {
|
|
462149
462237
|
if (input2 && input2.match(/[0-9.]/)) {
|
|
462150
462238
|
const currentStr = editingThresholdValue || editSimilarityThreshold.toString();
|
|
@@ -462174,7 +462262,7 @@ function ConfigScreen({ onBack, onSave, inlineMode = false }) {
|
|
|
462174
462262
|
return;
|
|
462175
462263
|
}
|
|
462176
462264
|
if (input2 && input2.match(/[0-9]/)) {
|
|
462177
|
-
const currentValue = currentField === "maxContextTokens" ? maxContextTokens : currentField === "maxTokens" ? maxTokens : currentField === "streamIdleTimeoutSec" ? streamIdleTimeoutSec : currentField === "toolResultTokenLimit" ? toolResultTokenLimit : currentField === "thinkingBudgetTokens" ? thinkingBudgetTokens : geminiThinkingBudget;
|
|
462265
|
+
const currentValue = currentField === "maxContextTokens" ? maxContextTokens : currentField === "maxTokens" ? maxTokens : currentField === "streamIdleTimeoutSec" ? streamIdleTimeoutSec : currentField === "toolResultTokenLimit" ? toolResultTokenLimit : currentField === "thinkingBudgetTokens" ? thinkingBudgetTokens : currentField === "autoCompressThreshold" ? autoCompressThreshold : geminiThinkingBudget;
|
|
462178
462266
|
const newValue = parseInt(currentValue.toString() + input2, 10);
|
|
462179
462267
|
if (!isNaN(newValue)) {
|
|
462180
462268
|
if (currentField === "maxContextTokens") {
|
|
@@ -462187,12 +462275,14 @@ function ConfigScreen({ onBack, onSave, inlineMode = false }) {
|
|
|
462187
462275
|
setToolResultTokenLimit(newValue);
|
|
462188
462276
|
} else if (currentField === "thinkingBudgetTokens") {
|
|
462189
462277
|
setThinkingBudgetTokens(newValue);
|
|
462278
|
+
} else if (currentField === "autoCompressThreshold") {
|
|
462279
|
+
setAutoCompressThreshold(newValue);
|
|
462190
462280
|
} else {
|
|
462191
462281
|
setGeminiThinkingBudget(newValue);
|
|
462192
462282
|
}
|
|
462193
462283
|
}
|
|
462194
462284
|
} else if (key.backspace || key.delete) {
|
|
462195
|
-
const currentValue = currentField === "maxContextTokens" ? maxContextTokens : currentField === "maxTokens" ? maxTokens : currentField === "streamIdleTimeoutSec" ? streamIdleTimeoutSec : currentField === "toolResultTokenLimit" ? toolResultTokenLimit : currentField === "thinkingBudgetTokens" ? thinkingBudgetTokens : geminiThinkingBudget;
|
|
462285
|
+
const currentValue = currentField === "maxContextTokens" ? maxContextTokens : currentField === "maxTokens" ? maxTokens : currentField === "streamIdleTimeoutSec" ? streamIdleTimeoutSec : currentField === "toolResultTokenLimit" ? toolResultTokenLimit : currentField === "thinkingBudgetTokens" ? thinkingBudgetTokens : currentField === "autoCompressThreshold" ? autoCompressThreshold : geminiThinkingBudget;
|
|
462196
462286
|
const currentStr = currentValue.toString();
|
|
462197
462287
|
const newStr = currentStr.slice(0, -1);
|
|
462198
462288
|
const newValue = parseInt(newStr, 10);
|
|
@@ -462206,25 +462296,30 @@ function ConfigScreen({ onBack, onSave, inlineMode = false }) {
|
|
|
462206
462296
|
setToolResultTokenLimit(!isNaN(newValue) ? newValue : 0);
|
|
462207
462297
|
} else if (currentField === "thinkingBudgetTokens") {
|
|
462208
462298
|
setThinkingBudgetTokens(!isNaN(newValue) ? newValue : 0);
|
|
462299
|
+
} else if (currentField === "autoCompressThreshold") {
|
|
462300
|
+
setAutoCompressThreshold(!isNaN(newValue) ? newValue : 0);
|
|
462209
462301
|
} else {
|
|
462210
462302
|
setGeminiThinkingBudget(!isNaN(newValue) ? newValue : 0);
|
|
462211
462303
|
}
|
|
462212
462304
|
} else if (key.return) {
|
|
462213
|
-
const minValue = currentField === "maxContextTokens" ? 4e3 : currentField === "maxTokens" ? 100 : currentField === "streamIdleTimeoutSec" ? 1 : currentField === "toolResultTokenLimit" ? 1e3 : currentField === "thinkingBudgetTokens" ? 1e3 : 1;
|
|
462214
|
-
const
|
|
462215
|
-
const
|
|
462305
|
+
const minValue = currentField === "maxContextTokens" ? 4e3 : currentField === "maxTokens" ? 100 : currentField === "streamIdleTimeoutSec" ? 1 : currentField === "toolResultTokenLimit" ? 1e3 : currentField === "thinkingBudgetTokens" ? 1e3 : currentField === "autoCompressThreshold" ? 50 : 1;
|
|
462306
|
+
const maxValue = currentField === "autoCompressThreshold" ? 95 : Infinity;
|
|
462307
|
+
const currentValue = currentField === "maxContextTokens" ? maxContextTokens : currentField === "maxTokens" ? maxTokens : currentField === "streamIdleTimeoutSec" ? streamIdleTimeoutSec : currentField === "toolResultTokenLimit" ? toolResultTokenLimit : currentField === "thinkingBudgetTokens" ? thinkingBudgetTokens : currentField === "autoCompressThreshold" ? autoCompressThreshold : geminiThinkingBudget;
|
|
462308
|
+
const clampedValue = Math.min(Math.max(currentValue, minValue), maxValue);
|
|
462216
462309
|
if (currentField === "maxContextTokens") {
|
|
462217
|
-
setMaxContextTokens(
|
|
462310
|
+
setMaxContextTokens(clampedValue);
|
|
462218
462311
|
} else if (currentField === "maxTokens") {
|
|
462219
|
-
setMaxTokens(
|
|
462312
|
+
setMaxTokens(clampedValue);
|
|
462220
462313
|
} else if (currentField === "streamIdleTimeoutSec") {
|
|
462221
|
-
setStreamIdleTimeoutSec(
|
|
462314
|
+
setStreamIdleTimeoutSec(clampedValue);
|
|
462222
462315
|
} else if (currentField === "toolResultTokenLimit") {
|
|
462223
|
-
setToolResultTokenLimit(
|
|
462316
|
+
setToolResultTokenLimit(clampedValue);
|
|
462224
462317
|
} else if (currentField === "thinkingBudgetTokens") {
|
|
462225
|
-
setThinkingBudgetTokens(
|
|
462318
|
+
setThinkingBudgetTokens(clampedValue);
|
|
462319
|
+
} else if (currentField === "autoCompressThreshold") {
|
|
462320
|
+
setAutoCompressThreshold(clampedValue);
|
|
462226
462321
|
} else {
|
|
462227
|
-
setGeminiThinkingBudget(
|
|
462322
|
+
setGeminiThinkingBudget(clampedValue);
|
|
462228
462323
|
}
|
|
462229
462324
|
setIsEditing(false);
|
|
462230
462325
|
}
|
|
@@ -462269,13 +462364,15 @@ function ConfigScreen({ onBack, onSave, inlineMode = false }) {
|
|
|
462269
462364
|
setResponsesReasoningEnabled(!responsesReasoningEnabled);
|
|
462270
462365
|
} else if (currentField === "responsesFastMode") {
|
|
462271
462366
|
setResponsesFastMode(!responsesFastMode);
|
|
462272
|
-
} else if (currentField === "maxContextTokens" || currentField === "maxTokens" || currentField === "streamIdleTimeoutSec" || currentField === "toolResultTokenLimit" || currentField === "thinkingBudgetTokens" || currentField === "geminiThinkingBudget") {
|
|
462367
|
+
} else if (currentField === "maxContextTokens" || currentField === "maxTokens" || currentField === "streamIdleTimeoutSec" || currentField === "toolResultTokenLimit" || currentField === "thinkingBudgetTokens" || currentField === "geminiThinkingBudget" || currentField === "autoCompressThreshold") {
|
|
462273
462368
|
setIsEditing(true);
|
|
462274
462369
|
} else if (currentField === "editSimilarityThreshold") {
|
|
462275
462370
|
setEditingThresholdValue("");
|
|
462276
462371
|
setIsEditing(true);
|
|
462277
462372
|
} else if (currentField === "responsesReasoningEffort") {
|
|
462278
462373
|
setIsEditing(true);
|
|
462374
|
+
} else if (currentField === "responsesVerbosity") {
|
|
462375
|
+
setIsEditing(true);
|
|
462279
462376
|
} else if (currentField === "advancedModel" || currentField === "basicModel") {
|
|
462280
462377
|
setLoadError("");
|
|
462281
462378
|
loadModels().then(() => {
|
|
@@ -462530,7 +462627,7 @@ function ConfigScreen({ onBack, onSave, inlineMode = false }) {
|
|
|
462530
462627
|
)
|
|
462531
462628
|
)
|
|
462532
462629
|
),
|
|
462533
|
-
isEditing && (currentField === "profile" || currentField === "requestMethod" || currentField === "systemPromptId" || currentField === "customHeadersSchemeId" || currentField === "advancedModel" || currentField === "basicModel" || currentField === "thinkingMode" || currentField === "thinkingEffort" || currentField === "responsesReasoningEffort") ? import_react66.default.createElement(
|
|
462630
|
+
isEditing && (currentField === "profile" || currentField === "requestMethod" || currentField === "systemPromptId" || currentField === "customHeadersSchemeId" || currentField === "advancedModel" || currentField === "basicModel" || currentField === "thinkingMode" || currentField === "thinkingEffort" || currentField === "responsesReasoningEffort" || currentField === "responsesVerbosity") ? import_react66.default.createElement(
|
|
462534
462631
|
Box_default,
|
|
462535
462632
|
{ flexDirection: "column" },
|
|
462536
462633
|
import_react66.default.createElement(
|
|
@@ -462545,6 +462642,7 @@ function ConfigScreen({ onBack, onSave, inlineMode = false }) {
|
|
|
462545
462642
|
currentField === "thinkingMode" && t.configScreen.thinkingMode.replace(":", ""),
|
|
462546
462643
|
currentField === "thinkingEffort" && t.configScreen.thinkingEffort.replace(":", ""),
|
|
462547
462644
|
currentField === "responsesReasoningEffort" && t.configScreen.responsesReasoningEffort.replace(":", ""),
|
|
462645
|
+
currentField === "responsesVerbosity" && t.configScreen.responsesVerbosity.replace(":", ""),
|
|
462548
462646
|
currentField === "systemPromptId" && t.configScreen.systemPrompt,
|
|
462549
462647
|
currentField === "customHeadersSchemeId" && t.configScreen.customHeadersField
|
|
462550
462648
|
),
|
|
@@ -462715,19 +462813,33 @@ function ConfigScreen({ onBack, onSave, inlineMode = false }) {
|
|
|
462715
462813
|
setIsEditing(false);
|
|
462716
462814
|
} }),
|
|
462717
462815
|
currentField === "responsesReasoningEffort" && import_react66.default.createElement(ScrollableSelectInput, { items: [
|
|
462816
|
+
{ label: "NONE", value: "none" },
|
|
462718
462817
|
{ label: "LOW", value: "low" },
|
|
462719
462818
|
{ label: "MEDIUM", value: "medium" },
|
|
462720
462819
|
{ label: "HIGH", value: "high" },
|
|
462721
462820
|
...supportsXHigh ? [{ label: "XHIGH", value: "xhigh" }] : []
|
|
462722
|
-
], initialIndex: [
|
|
462821
|
+
], initialIndex: Math.max(0, [
|
|
462822
|
+
{ label: "NONE", value: "none" },
|
|
462723
462823
|
{ label: "LOW", value: "low" },
|
|
462724
462824
|
{ label: "MEDIUM", value: "medium" },
|
|
462725
462825
|
{ label: "HIGH", value: "high" },
|
|
462726
462826
|
...supportsXHigh ? [{ label: "XHIGH", value: "xhigh" }] : []
|
|
462727
|
-
].findIndex((opt) => opt.value === responsesReasoningEffort), isFocused: true, onSelect: (item) => {
|
|
462827
|
+
].findIndex((opt) => opt.value === responsesReasoningEffort)), isFocused: true, onSelect: (item) => {
|
|
462728
462828
|
const nextEffort = item.value;
|
|
462729
462829
|
setResponsesReasoningEffort(nextEffort === "xhigh" && !supportsXHigh ? "high" : nextEffort);
|
|
462730
462830
|
setIsEditing(false);
|
|
462831
|
+
} }),
|
|
462832
|
+
currentField === "responsesVerbosity" && import_react66.default.createElement(ScrollableSelectInput, { items: [
|
|
462833
|
+
{ label: "LOW", value: "low" },
|
|
462834
|
+
{ label: "MEDIUM", value: "medium" },
|
|
462835
|
+
{ label: "HIGH", value: "high" }
|
|
462836
|
+
], initialIndex: Math.max(0, [
|
|
462837
|
+
{ label: "LOW", value: "low" },
|
|
462838
|
+
{ label: "MEDIUM", value: "medium" },
|
|
462839
|
+
{ label: "HIGH", value: "high" }
|
|
462840
|
+
].findIndex((opt) => opt.value === responsesVerbosity)), isFocused: true, onSelect: (item) => {
|
|
462841
|
+
setResponsesVerbosity(item.value);
|
|
462842
|
+
setIsEditing(false);
|
|
462731
462843
|
} })
|
|
462732
462844
|
)
|
|
462733
462845
|
) : import_react66.default.createElement(Box_default, { flexDirection: "column" }, fieldsDisplayWindow.items.map((field) => renderField(field))),
|
|
@@ -462742,7 +462854,7 @@ function ConfigScreen({ onBack, onSave, inlineMode = false }) {
|
|
|
462742
462854
|
error40
|
|
462743
462855
|
))
|
|
462744
462856
|
),
|
|
462745
|
-
!!!(isEditing && (currentField === "profile" || currentField === "requestMethod" || currentField === "systemPromptId" || currentField === "customHeadersSchemeId" || currentField === "advancedModel" || currentField === "basicModel" || currentField === "thinkingMode" || currentField === "thinkingEffort" || currentField === "responsesReasoningEffort")) && import_react66.default.createElement(
|
|
462857
|
+
!!!(isEditing && (currentField === "profile" || currentField === "requestMethod" || currentField === "systemPromptId" || currentField === "customHeadersSchemeId" || currentField === "advancedModel" || currentField === "basicModel" || currentField === "thinkingMode" || currentField === "thinkingEffort" || currentField === "responsesReasoningEffort" || currentField === "responsesVerbosity")) && import_react66.default.createElement(
|
|
462746
462858
|
Box_default,
|
|
462747
462859
|
{ flexDirection: "column", marginTop: 1 },
|
|
462748
462860
|
import_react66.default.createElement(Alert, { variant: "info" }, isEditing ? `${currentField === "maxContextTokens" || currentField === "maxTokens" ? t.configScreen.editingHintNumeric : t.configScreen.editingHintGeneral}
|
|
@@ -561763,7 +561875,8 @@ function useKeyboardInput(options3) {
|
|
|
561763
561875
|
const text3 = buffer.getFullText();
|
|
561764
561876
|
const cursorPos = buffer.getCursorPosition();
|
|
561765
561877
|
const isEmpty3 = text3.trim() === "";
|
|
561766
|
-
|
|
561878
|
+
const hasMultipleVisualLines = buffer.viewportVisualLines.length > 1;
|
|
561879
|
+
if (!hasMultipleVisualLines && (isEmpty3 || cursorPos === 0)) {
|
|
561767
561880
|
const navigated = navigateHistoryUp();
|
|
561768
561881
|
if (navigated) {
|
|
561769
561882
|
updateFilePickerState(buffer.getFullText(), buffer.getCursorPosition());
|
|
@@ -561777,6 +561890,7 @@ function useKeyboardInput(options3) {
|
|
|
561777
561890
|
updateFilePickerState(buffer.getFullText(), buffer.getCursorPosition());
|
|
561778
561891
|
updateAgentPickerState(buffer.getFullText(), buffer.getCursorPosition());
|
|
561779
561892
|
updateRunningAgentsPickerState(buffer.getFullText(), buffer.getCursorPosition());
|
|
561893
|
+
triggerUpdate();
|
|
561780
561894
|
return;
|
|
561781
561895
|
}
|
|
561782
561896
|
if (key.downArrow && !showCommands && !showFilePicker && !disableKeyboardNavigation) {
|
|
@@ -561784,7 +561898,8 @@ function useKeyboardInput(options3) {
|
|
|
561784
561898
|
const text3 = buffer.getFullText();
|
|
561785
561899
|
const cursorPos = buffer.getCursorPosition();
|
|
561786
561900
|
const isEmpty3 = text3.trim() === "";
|
|
561787
|
-
|
|
561901
|
+
const hasMultipleVisualLines = buffer.viewportVisualLines.length > 1;
|
|
561902
|
+
if (!hasMultipleVisualLines && (isEmpty3 || cursorPos === text3.length) && currentHistoryIndex !== -1) {
|
|
561788
561903
|
const navigated = navigateHistoryDown();
|
|
561789
561904
|
if (navigated) {
|
|
561790
561905
|
updateFilePickerState(buffer.getFullText(), buffer.getCursorPosition());
|
|
@@ -561798,6 +561913,7 @@ function useKeyboardInput(options3) {
|
|
|
561798
561913
|
updateFilePickerState(buffer.getFullText(), buffer.getCursorPosition());
|
|
561799
561914
|
updateAgentPickerState(buffer.getFullText(), buffer.getCursorPosition());
|
|
561800
561915
|
updateRunningAgentsPickerState(buffer.getFullText(), buffer.getCursorPosition());
|
|
561916
|
+
triggerUpdate();
|
|
561801
561917
|
return;
|
|
561802
561918
|
}
|
|
561803
561919
|
if (input2 && !key.ctrl && !key.meta && !key.escape) {
|
|
@@ -570034,11 +570150,13 @@ var init_ModelsPanel = __esm({
|
|
|
570034
570150
|
const [responsesReasoningEnabled, setResponsesReasoningEnabled] = (0, import_react127.useState)(false);
|
|
570035
570151
|
const [responsesReasoningEffort, setResponsesReasoningEffort] = (0, import_react127.useState)("high");
|
|
570036
570152
|
const [responsesFastMode, setResponsesFastMode] = (0, import_react127.useState)(false);
|
|
570153
|
+
const [responsesVerbosity, setResponsesVerbosity] = (0, import_react127.useState)("medium");
|
|
570037
570154
|
const [thinkingFocusIndex, setThinkingFocusIndex] = (0, import_react127.useState)(0);
|
|
570038
570155
|
const [thinkingInputMode, setThinkingInputMode] = (0, import_react127.useState)(null);
|
|
570039
570156
|
const [thinkingInputValue, setThinkingInputValue] = (0, import_react127.useState)("");
|
|
570040
570157
|
const [isThinkingModeSelecting, setIsThinkingModeSelecting] = (0, import_react127.useState)(false);
|
|
570041
570158
|
const [isThinkingEffortSelecting, setIsThinkingEffortSelecting] = (0, import_react127.useState)(false);
|
|
570159
|
+
const [isVerbositySelecting, setIsVerbositySelecting] = (0, import_react127.useState)(false);
|
|
570042
570160
|
(0, import_react127.useEffect)(() => {
|
|
570043
570161
|
var _a21, _b14, _c6, _d4, _e2, _f, _g, _h, _i;
|
|
570044
570162
|
if (!visible) {
|
|
@@ -570058,6 +570176,7 @@ var init_ModelsPanel = __esm({
|
|
|
570058
570176
|
setThinkingInputMode(null);
|
|
570059
570177
|
setThinkingInputValue("");
|
|
570060
570178
|
setIsThinkingEffortSelecting(false);
|
|
570179
|
+
setIsVerbositySelecting(false);
|
|
570061
570180
|
setErrorMessage("");
|
|
570062
570181
|
const cfg = getOpenAiConfig();
|
|
570063
570182
|
setRequestMethod(cfg.requestMethod || "chat");
|
|
@@ -570071,6 +570190,7 @@ var init_ModelsPanel = __esm({
|
|
|
570071
570190
|
setResponsesReasoningEnabled(((_h = cfg.responsesReasoning) == null ? void 0 : _h.enabled) || false);
|
|
570072
570191
|
setResponsesReasoningEffort(((_i = cfg.responsesReasoning) == null ? void 0 : _i.effort) || "high");
|
|
570073
570192
|
setResponsesFastMode(cfg.responsesFastMode || false);
|
|
570193
|
+
setResponsesVerbosity(cfg.responsesVerbosity || "medium");
|
|
570074
570194
|
}, [visible, advancedModel, basicModel]);
|
|
570075
570195
|
(0, import_react127.useEffect)(() => {
|
|
570076
570196
|
if (errorMessage) {
|
|
@@ -570309,6 +570429,18 @@ var init_ModelsPanel = __esm({
|
|
|
570309
570429
|
setErrorMessage(message);
|
|
570310
570430
|
}
|
|
570311
570431
|
}, [responsesReasoningEnabled]);
|
|
570432
|
+
const applyResponsesVerbosity = (0, import_react127.useCallback)(async (verbosity2) => {
|
|
570433
|
+
setErrorMessage("");
|
|
570434
|
+
try {
|
|
570435
|
+
setResponsesVerbosity(verbosity2);
|
|
570436
|
+
await updateOpenAiConfig({
|
|
570437
|
+
responsesVerbosity: verbosity2
|
|
570438
|
+
});
|
|
570439
|
+
} catch (err) {
|
|
570440
|
+
const message = err instanceof Error ? err.message : t.modelsPanel.saveFailed;
|
|
570441
|
+
setErrorMessage(message);
|
|
570442
|
+
}
|
|
570443
|
+
}, []);
|
|
570312
570444
|
const applyResponsesFastMode = (0, import_react127.useCallback)(async (next) => {
|
|
570313
570445
|
setErrorMessage("");
|
|
570314
570446
|
try {
|
|
@@ -570325,7 +570457,7 @@ var init_ModelsPanel = __esm({
|
|
|
570325
570457
|
if (requestMethod === "anthropic")
|
|
570326
570458
|
return 3;
|
|
570327
570459
|
if (requestMethod === "responses")
|
|
570328
|
-
return
|
|
570460
|
+
return 4;
|
|
570329
570461
|
if (requestMethod === "gemini")
|
|
570330
570462
|
return 2;
|
|
570331
570463
|
return 1;
|
|
@@ -570350,6 +570482,10 @@ var init_ModelsPanel = __esm({
|
|
|
570350
570482
|
setIsThinkingEffortSelecting(false);
|
|
570351
570483
|
return;
|
|
570352
570484
|
}
|
|
570485
|
+
if (isVerbositySelecting) {
|
|
570486
|
+
setIsVerbositySelecting(false);
|
|
570487
|
+
return;
|
|
570488
|
+
}
|
|
570353
570489
|
if (manualInputModeRef.current || manualInputMode) {
|
|
570354
570490
|
manualInputModeRef.current = false;
|
|
570355
570491
|
setManualInputMode(false);
|
|
@@ -570419,7 +570555,7 @@ var init_ModelsPanel = __esm({
|
|
|
570419
570555
|
}
|
|
570420
570556
|
return;
|
|
570421
570557
|
}
|
|
570422
|
-
if (isThinkingModeSelecting || isThinkingEffortSelecting) {
|
|
570558
|
+
if (isThinkingModeSelecting || isThinkingEffortSelecting || isVerbositySelecting) {
|
|
570423
570559
|
return;
|
|
570424
570560
|
}
|
|
570425
570561
|
if (key.tab) {
|
|
@@ -570458,6 +570594,10 @@ var init_ModelsPanel = __esm({
|
|
|
570458
570594
|
setIsThinkingEffortSelecting(true);
|
|
570459
570595
|
}
|
|
570460
570596
|
} else if (requestMethod === "responses") {
|
|
570597
|
+
setIsVerbositySelecting(true);
|
|
570598
|
+
}
|
|
570599
|
+
} else if (thinkingFocusIndex === 4) {
|
|
570600
|
+
if (requestMethod === "responses") {
|
|
570461
570601
|
void applyResponsesFastMode(!responsesFastMode);
|
|
570462
570602
|
}
|
|
570463
570603
|
}
|
|
@@ -570603,6 +570743,22 @@ var init_ModelsPanel = __esm({
|
|
|
570603
570743
|
Text,
|
|
570604
570744
|
{ color: thinkingFocusIndex === 3 ? theme14.colors.menuSelected : theme14.colors.menuNormal },
|
|
570605
570745
|
thinkingFocusIndex === 3 ? "\u276F " : " ",
|
|
570746
|
+
t.configScreen.responsesVerbosity
|
|
570747
|
+
),
|
|
570748
|
+
import_react127.default.createElement(
|
|
570749
|
+
Text,
|
|
570750
|
+
{ color: theme14.colors.menuSelected },
|
|
570751
|
+
" ",
|
|
570752
|
+
responsesVerbosity.toUpperCase()
|
|
570753
|
+
)
|
|
570754
|
+
),
|
|
570755
|
+
requestMethod === "responses" && import_react127.default.createElement(
|
|
570756
|
+
Box_default,
|
|
570757
|
+
null,
|
|
570758
|
+
import_react127.default.createElement(
|
|
570759
|
+
Text,
|
|
570760
|
+
{ color: thinkingFocusIndex === 4 ? theme14.colors.menuSelected : theme14.colors.menuNormal },
|
|
570761
|
+
thinkingFocusIndex === 4 ? "\u276F " : " ",
|
|
570606
570762
|
t.configScreen.responsesFastMode
|
|
570607
570763
|
),
|
|
570608
570764
|
import_react127.default.createElement(
|
|
@@ -570655,6 +570811,7 @@ var init_ModelsPanel = __esm({
|
|
|
570655
570811
|
{ label: "high", value: "high" },
|
|
570656
570812
|
{ label: "max", value: "max" }
|
|
570657
570813
|
] : [
|
|
570814
|
+
{ label: "none", value: "none" },
|
|
570658
570815
|
{ label: "low", value: "low" },
|
|
570659
570816
|
{ label: "medium", value: "medium" },
|
|
570660
570817
|
{ label: "high", value: "high" },
|
|
@@ -570662,7 +570819,7 @@ var init_ModelsPanel = __esm({
|
|
|
570662
570819
|
]).map((i) => ({
|
|
570663
570820
|
label: i.label,
|
|
570664
570821
|
value: i.value
|
|
570665
|
-
})), limit: 6, disableNumberShortcuts: true, initialIndex: Math.max(0, requestMethod === "anthropic" ? ["low", "medium", "high", "max"].indexOf(thinkingEffort) : ["low", "medium", "high", "xhigh"].indexOf(responsesReasoningEffort)), isFocused: true, onSelect: (item) => {
|
|
570822
|
+
})), limit: 6, disableNumberShortcuts: true, initialIndex: Math.max(0, requestMethod === "anthropic" ? ["low", "medium", "high", "max"].indexOf(thinkingEffort) : ["none", "low", "medium", "high", "xhigh"].indexOf(responsesReasoningEffort)), isFocused: true, onSelect: (item) => {
|
|
570666
570823
|
if (requestMethod === "anthropic") {
|
|
570667
570824
|
void applyThinkingEffort(item.value);
|
|
570668
570825
|
} else {
|
|
@@ -570671,7 +570828,19 @@ var init_ModelsPanel = __esm({
|
|
|
570671
570828
|
setIsThinkingEffortSelecting(false);
|
|
570672
570829
|
} })
|
|
570673
570830
|
),
|
|
570674
|
-
|
|
570831
|
+
isVerbositySelecting && import_react127.default.createElement(
|
|
570832
|
+
Box_default,
|
|
570833
|
+
{ marginTop: 1 },
|
|
570834
|
+
import_react127.default.createElement(ScrollableSelectInput, { items: [
|
|
570835
|
+
{ label: "low", value: "low" },
|
|
570836
|
+
{ label: "medium", value: "medium" },
|
|
570837
|
+
{ label: "high", value: "high" }
|
|
570838
|
+
], limit: 6, disableNumberShortcuts: true, initialIndex: Math.max(0, ["low", "medium", "high"].indexOf(responsesVerbosity)), isFocused: true, onSelect: (item) => {
|
|
570839
|
+
void applyResponsesVerbosity(item.value);
|
|
570840
|
+
setIsVerbositySelecting(false);
|
|
570841
|
+
} })
|
|
570842
|
+
),
|
|
570843
|
+
!thinkingInputMode && !isThinkingModeSelecting && !isThinkingEffortSelecting && !isVerbositySelecting && import_react127.default.createElement(
|
|
570675
570844
|
Box_default,
|
|
570676
570845
|
{ marginTop: 1 },
|
|
570677
570846
|
import_react127.default.createElement(Text, { dimColor: true, color: theme14.colors.menuSecondary }, t.modelsPanel.navigationHint)
|
|
@@ -577346,7 +577515,7 @@ async function handleConversationWithTools(options3) {
|
|
|
577346
577515
|
}
|
|
577347
577516
|
}
|
|
577348
577517
|
const config5 = getOpenAiConfig();
|
|
577349
|
-
if (config5.enableAutoCompress !== false && options3.getCurrentContextPercentage && shouldAutoCompress(options3.getCurrentContextPercentage())) {
|
|
577518
|
+
if (config5.enableAutoCompress !== false && options3.getCurrentContextPercentage && shouldAutoCompress(options3.getCurrentContextPercentage(), config5.autoCompressThreshold ?? DEFAULT_AUTO_COMPRESS_THRESHOLD)) {
|
|
577350
577519
|
try {
|
|
577351
577520
|
const compressingMessage = {
|
|
577352
577521
|
role: "assistant",
|
|
@@ -577516,7 +577685,7 @@ Result: ${resultSummary}`;
|
|
|
577516
577685
|
const pendingMessages = options3.getPendingMessages();
|
|
577517
577686
|
if (pendingMessages.length > 0) {
|
|
577518
577687
|
const config6 = getOpenAiConfig();
|
|
577519
|
-
if (config6.enableAutoCompress !== false && options3.getCurrentContextPercentage && shouldAutoCompress(options3.getCurrentContextPercentage())) {
|
|
577688
|
+
if (config6.enableAutoCompress !== false && options3.getCurrentContextPercentage && shouldAutoCompress(options3.getCurrentContextPercentage(), config6.autoCompressThreshold ?? DEFAULT_AUTO_COMPRESS_THRESHOLD)) {
|
|
577520
577689
|
try {
|
|
577521
577690
|
const compressingMessage = {
|
|
577522
577691
|
role: "assistant",
|
|
@@ -580974,7 +581143,7 @@ function useChatLogic(props) {
|
|
|
580974
581143
|
}, [yoloMode]);
|
|
580975
581144
|
const processMessage = async (message, images, useBasicModel, hideUserMessage) => {
|
|
580976
581145
|
const autoCompressConfig = getOpenAiConfig();
|
|
580977
|
-
if (autoCompressConfig.enableAutoCompress !== false && shouldAutoCompress(currentContextPercentageRef.current)) {
|
|
581146
|
+
if (autoCompressConfig.enableAutoCompress !== false && shouldAutoCompress(currentContextPercentageRef.current, autoCompressConfig.autoCompressThreshold ?? DEFAULT_AUTO_COMPRESS_THRESHOLD)) {
|
|
580978
581147
|
setIsCompressing(true);
|
|
580979
581148
|
setCompressionError(null);
|
|
580980
581149
|
try {
|
|
@@ -601453,7 +601622,7 @@ var require_package3 = __commonJS({
|
|
|
601453
601622
|
"package.json"(exports2, module2) {
|
|
601454
601623
|
module2.exports = {
|
|
601455
601624
|
name: "snow-ai",
|
|
601456
|
-
version: "0.6.
|
|
601625
|
+
version: "0.6.58",
|
|
601457
601626
|
description: "Agentic coding in your terminal",
|
|
601458
601627
|
license: "MIT",
|
|
601459
601628
|
bin: {
|
package/bundle/package.json
CHANGED