snow-ai 0.8.12 → 0.8.14
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 +1111 -749
- package/bundle/package.json +1 -1
- package/package.json +1 -1
package/bundle/cli.mjs
CHANGED
|
@@ -46007,6 +46007,8 @@ var init_en = __esm({
|
|
|
46007
46007
|
geminiThinkingLevel: "Gemini Thinking Level:",
|
|
46008
46008
|
responsesReasoningEnabled: "Responses Reasoning Enabled:",
|
|
46009
46009
|
responsesReasoningEffort: "Responses Reasoning Effort:",
|
|
46010
|
+
responsesReasoningMode: "Responses Reasoning Mode:",
|
|
46011
|
+
responsesReasoningModeNone: "None",
|
|
46010
46012
|
responsesVerbosity: "Responses Verbosity:",
|
|
46011
46013
|
responsesFastMode: "Responses Fast Mode (priority):",
|
|
46012
46014
|
chatThinkingEnabled: "Chat Thinking (DeepSeek):",
|
|
@@ -48236,6 +48238,8 @@ var init_zh = __esm({
|
|
|
48236
48238
|
geminiThinkingLevel: "Gemini \u601D\u8003\u7EA7\u522B:",
|
|
48237
48239
|
responsesReasoningEnabled: "\u542F\u7528 Responses \u63A8\u7406:",
|
|
48238
48240
|
responsesReasoningEffort: "Responses \u63A8\u7406\u5F3A\u5EA6:",
|
|
48241
|
+
responsesReasoningMode: "Responses \u63A8\u7406\u6A21\u5F0F:",
|
|
48242
|
+
responsesReasoningModeNone: "\u65E0",
|
|
48239
48243
|
responsesVerbosity: "Responses \u8F93\u51FA\u8BE6\u7EC6\u5EA6:",
|
|
48240
48244
|
responsesFastMode: "Responses Fast (priority):",
|
|
48241
48245
|
chatThinkingEnabled: "\u542F\u7528 Chat \u601D\u8003 (DeepSeek):",
|
|
@@ -50463,6 +50467,8 @@ var init_zh_TW = __esm({
|
|
|
50463
50467
|
geminiThinkingLevel: "Gemini \u601D\u8003\u7D1A\u5225:",
|
|
50464
50468
|
responsesReasoningEnabled: "\u555F\u7528 Responses \u63A8\u7406:",
|
|
50465
50469
|
responsesReasoningEffort: "Responses \u63A8\u7406\u5F37\u5EA6:",
|
|
50470
|
+
responsesReasoningMode: "Responses \u63A8\u7406\u6A21\u5F0F:",
|
|
50471
|
+
responsesReasoningModeNone: "\u7121",
|
|
50466
50472
|
responsesVerbosity: "Responses \u8F38\u51FA\u8A73\u7D30\u5EA6:",
|
|
50467
50473
|
responsesFastMode: "Responses Fast (priority):",
|
|
50468
50474
|
chatThinkingEnabled: "\u555F\u7528 Chat \u601D\u8003 (DeepSeek):",
|
|
@@ -156573,7 +156579,7 @@ __export(chat_exports, {
|
|
|
156573
156579
|
resetApiClient: () => resetApiClient,
|
|
156574
156580
|
validateChatOptions: () => validateChatOptions
|
|
156575
156581
|
});
|
|
156576
|
-
function convertToOpenAIMessages(messages, includeBuiltinSystemPrompt = true, customSystemPromptOverride, planMode = false, vulnerabilityHuntingMode = false, toolSearchDisabled = false, teamMode = false, thinkingEnabled = false) {
|
|
156582
|
+
function convertToOpenAIMessages(messages, includeBuiltinSystemPrompt = true, customSystemPromptOverride, planMode = false, vulnerabilityHuntingMode = false, toolSearchDisabled = false, teamMode = false, thinkingEnabled = false, isSubAgentRequest = false) {
|
|
156577
156583
|
var _a20;
|
|
156578
156584
|
const customSystemPrompts = customSystemPromptOverride;
|
|
156579
156585
|
let result2 = messages.map((msg) => {
|
|
@@ -156663,6 +156669,33 @@ function convertToOpenAIMessages(messages, includeBuiltinSystemPrompt = true, cu
|
|
|
156663
156669
|
}
|
|
156664
156670
|
return baseMessage;
|
|
156665
156671
|
});
|
|
156672
|
+
if (isSubAgentRequest && customSystemPrompts && customSystemPrompts.length > 0) {
|
|
156673
|
+
const builtinPrompt = includeBuiltinSystemPrompt ? getSystemPromptForMode(planMode, vulnerabilityHuntingMode, toolSearchDisabled, teamMode) : "";
|
|
156674
|
+
const explicitSystemMessages = messages.filter((msg) => msg.role === "system");
|
|
156675
|
+
const hasBuiltinInExplicitSystem = builtinPrompt.length > 0 && explicitSystemMessages.some((msg) => msg.content.includes(builtinPrompt));
|
|
156676
|
+
const downgradedSystemMessages = explicitSystemMessages.map((msg) => ({
|
|
156677
|
+
role: "user",
|
|
156678
|
+
content: msg.content
|
|
156679
|
+
}));
|
|
156680
|
+
const downgradedBuiltinMessage = builtinPrompt && !hasBuiltinInExplicitSystem ? [
|
|
156681
|
+
{
|
|
156682
|
+
role: "user",
|
|
156683
|
+
content: builtinPrompt
|
|
156684
|
+
}
|
|
156685
|
+
] : [];
|
|
156686
|
+
return [
|
|
156687
|
+
{
|
|
156688
|
+
role: "system",
|
|
156689
|
+
content: customSystemPrompts.map((text2) => ({
|
|
156690
|
+
type: "text",
|
|
156691
|
+
text: text2
|
|
156692
|
+
}))
|
|
156693
|
+
},
|
|
156694
|
+
...downgradedSystemMessages,
|
|
156695
|
+
...downgradedBuiltinMessage,
|
|
156696
|
+
...result2.filter((message) => message.role !== "system")
|
|
156697
|
+
];
|
|
156698
|
+
}
|
|
156666
156699
|
if (result2.length > 0 && ((_a20 = result2[0]) == null ? void 0 : _a20.role) === "system") {
|
|
156667
156700
|
if (customSystemPrompts && customSystemPrompts.length > 0) {
|
|
156668
156701
|
result2 = [
|
|
@@ -156868,7 +156901,8 @@ async function* createStreamingChatCompletion(options3, abortSignal, onRetry) {
|
|
|
156868
156901
|
options3.vulnerabilityHuntingMode || false,
|
|
156869
156902
|
options3.toolSearchDisabled || false,
|
|
156870
156903
|
options3.teamMode || false,
|
|
156871
|
-
thinkingEnabled
|
|
156904
|
+
thinkingEnabled,
|
|
156905
|
+
options3.isSubAgentRequest || false
|
|
156872
156906
|
),
|
|
156873
156907
|
stream: true,
|
|
156874
156908
|
stream_options: { include_usage: true },
|
|
@@ -157127,9 +157161,11 @@ function getResponsesReasoningConfig() {
|
|
|
157127
157161
|
if (!reasoningConfig || !reasoningConfig.enabled) {
|
|
157128
157162
|
return null;
|
|
157129
157163
|
}
|
|
157164
|
+
const mode = reasoningConfig.mode === "standard" || reasoningConfig.mode === "pro" ? reasoningConfig.mode : void 0;
|
|
157130
157165
|
return {
|
|
157131
157166
|
effort: reasoningConfig.effort || "high",
|
|
157132
|
-
summary: "auto"
|
|
157167
|
+
summary: "auto",
|
|
157168
|
+
...mode && { mode }
|
|
157133
157169
|
};
|
|
157134
157170
|
}
|
|
157135
157171
|
function getResponsesVerbosityConfig() {
|
|
@@ -157149,7 +157185,7 @@ function toResponseImageUrl(image2) {
|
|
|
157149
157185
|
const mimeType = ((_b14 = image2.mimeType) == null ? void 0 : _b14.trim()) || "image/png";
|
|
157150
157186
|
return `data:${mimeType};base64,${data}`;
|
|
157151
157187
|
}
|
|
157152
|
-
function convertToResponseInput(messages, includeBuiltinSystemPrompt = true, customSystemPromptOverride, planMode = false, vulnerabilityHuntingMode = false, toolSearchDisabled = false, teamMode = false) {
|
|
157188
|
+
function convertToResponseInput(messages, includeBuiltinSystemPrompt = true, customSystemPromptOverride, planMode = false, vulnerabilityHuntingMode = false, toolSearchDisabled = false, teamMode = false, isSubAgentRequest = false) {
|
|
157153
157189
|
const customSystemPrompts = customSystemPromptOverride;
|
|
157154
157190
|
const explicitSystemPrompts = [];
|
|
157155
157191
|
const result2 = [];
|
|
@@ -157251,6 +157287,29 @@ function convertToResponseInput(messages, includeBuiltinSystemPrompt = true, cus
|
|
|
157251
157287
|
}
|
|
157252
157288
|
let systemInstructions;
|
|
157253
157289
|
const builtinPrompt = includeBuiltinSystemPrompt ? getSystemPromptForMode(planMode, vulnerabilityHuntingMode, toolSearchDisabled, teamMode) : "";
|
|
157290
|
+
if (isSubAgentRequest && customSystemPrompts && customSystemPrompts.length > 0) {
|
|
157291
|
+
systemInstructions = customSystemPrompts.join("\n\n");
|
|
157292
|
+
const hasBuiltinInExplicitSystem = builtinPrompt.length > 0 && explicitSystemPrompts.some((prompt) => prompt.includes(builtinPrompt));
|
|
157293
|
+
const downgradedSystemMessages = explicitSystemPrompts.map((prompt) => ({
|
|
157294
|
+
type: "message",
|
|
157295
|
+
role: "user",
|
|
157296
|
+
content: [{ type: "input_text", text: prompt }]
|
|
157297
|
+
}));
|
|
157298
|
+
const downgradedBuiltinMessages = builtinPrompt && !hasBuiltinInExplicitSystem ? [
|
|
157299
|
+
{
|
|
157300
|
+
type: "message",
|
|
157301
|
+
role: "user",
|
|
157302
|
+
content: [
|
|
157303
|
+
{
|
|
157304
|
+
type: "input_text",
|
|
157305
|
+
text: `<environment_context>${builtinPrompt}</environment_context>`
|
|
157306
|
+
}
|
|
157307
|
+
]
|
|
157308
|
+
}
|
|
157309
|
+
] : [];
|
|
157310
|
+
result2.unshift(...downgradedSystemMessages, ...downgradedBuiltinMessages);
|
|
157311
|
+
return { input: result2, systemInstructions };
|
|
157312
|
+
}
|
|
157254
157313
|
if (explicitSystemPrompts.length > 0) {
|
|
157255
157314
|
systemInstructions = explicitSystemPrompts.join("\n\n");
|
|
157256
157315
|
if (customSystemPrompts && customSystemPrompts.length > 0) {
|
|
@@ -157400,7 +157459,7 @@ async function* createStreamingResponse(options3, abortSignal, onRetry) {
|
|
|
157400
157459
|
}
|
|
157401
157460
|
}
|
|
157402
157461
|
customSystemPromptContent || (customSystemPromptContent = getCustomSystemPromptForConfig(config3));
|
|
157403
|
-
const { input: requestInput, systemInstructions } = convertToResponseInput(options3.messages, options3.includeBuiltinSystemPrompt !== false, customSystemPromptContent, options3.planMode || false, options3.vulnerabilityHuntingMode || false, options3.toolSearchDisabled || false, options3.teamMode || false);
|
|
157462
|
+
const { input: requestInput, systemInstructions } = convertToResponseInput(options3.messages, options3.includeBuiltinSystemPrompt !== false, customSystemPromptContent, options3.planMode || false, options3.vulnerabilityHuntingMode || false, options3.toolSearchDisabled || false, options3.teamMode || false, options3.isSubAgentRequest || false);
|
|
157404
157463
|
const configuredReasoning = getResponsesReasoningConfig();
|
|
157405
157464
|
const configuredVerbosity = getResponsesVerbosityConfig();
|
|
157406
157465
|
const telemetry = startChatSpan({
|
|
@@ -157699,9 +157758,10 @@ function convertToolsToGemini(tools) {
|
|
|
157699
157758
|
});
|
|
157700
157759
|
return [{ functionDeclarations }];
|
|
157701
157760
|
}
|
|
157702
|
-
function convertToGeminiMessages(messages, includeBuiltinSystemPrompt = true, customSystemPromptOverride, planMode = false, vulnerabilityHuntingMode = false, toolSearchDisabled = false, teamMode = false) {
|
|
157761
|
+
function convertToGeminiMessages(messages, includeBuiltinSystemPrompt = true, customSystemPromptOverride, planMode = false, vulnerabilityHuntingMode = false, toolSearchDisabled = false, teamMode = false, isSubAgentRequest = false) {
|
|
157703
157762
|
var _a20;
|
|
157704
157763
|
const customSystemPrompts = customSystemPromptOverride;
|
|
157764
|
+
const explicitSystemPrompts = [];
|
|
157705
157765
|
let systemInstruction;
|
|
157706
157766
|
const contents = [];
|
|
157707
157767
|
const toolCallIdToFunctionName = /* @__PURE__ */ new Map();
|
|
@@ -157710,6 +157770,7 @@ function convertToGeminiMessages(messages, includeBuiltinSystemPrompt = true, cu
|
|
|
157710
157770
|
if (!msg)
|
|
157711
157771
|
continue;
|
|
157712
157772
|
if (msg.role === "system") {
|
|
157773
|
+
explicitSystemPrompts.push(msg.content);
|
|
157713
157774
|
systemInstruction = [msg.content];
|
|
157714
157775
|
continue;
|
|
157715
157776
|
}
|
|
@@ -157835,14 +157896,24 @@ function convertToGeminiMessages(messages, includeBuiltinSystemPrompt = true, cu
|
|
|
157835
157896
|
}
|
|
157836
157897
|
if (customSystemPrompts && customSystemPrompts.length > 0) {
|
|
157837
157898
|
systemInstruction = customSystemPrompts;
|
|
157838
|
-
|
|
157899
|
+
const builtinPrompt = includeBuiltinSystemPrompt ? getSystemPromptForMode(planMode, vulnerabilityHuntingMode, toolSearchDisabled, teamMode) : "";
|
|
157900
|
+
if (isSubAgentRequest) {
|
|
157901
|
+
const hasBuiltinInExplicitSystem = builtinPrompt.length > 0 && explicitSystemPrompts.some((prompt) => prompt.includes(builtinPrompt));
|
|
157902
|
+
const downgradedSystemContents = explicitSystemPrompts.map((prompt) => ({
|
|
157903
|
+
role: "user",
|
|
157904
|
+
parts: [{ text: prompt }]
|
|
157905
|
+
}));
|
|
157906
|
+
const downgradedBuiltinContents = builtinPrompt && !hasBuiltinInExplicitSystem ? [
|
|
157907
|
+
{
|
|
157908
|
+
role: "user",
|
|
157909
|
+
parts: [{ text: builtinPrompt }]
|
|
157910
|
+
}
|
|
157911
|
+
] : [];
|
|
157912
|
+
contents.unshift(...downgradedSystemContents, ...downgradedBuiltinContents);
|
|
157913
|
+
} else if (builtinPrompt) {
|
|
157839
157914
|
contents.unshift({
|
|
157840
157915
|
role: "user",
|
|
157841
|
-
parts: [
|
|
157842
|
-
{
|
|
157843
|
-
text: getSystemPromptForMode(planMode, vulnerabilityHuntingMode, toolSearchDisabled, teamMode)
|
|
157844
|
-
}
|
|
157845
|
-
]
|
|
157916
|
+
parts: [{ text: builtinPrompt }]
|
|
157846
157917
|
});
|
|
157847
157918
|
}
|
|
157848
157919
|
} else if (!systemInstruction && includeBuiltinSystemPrompt) {
|
|
@@ -157895,7 +157966,7 @@ async function* createStreamingGeminiCompletion(options3, abortSignal, onRetry)
|
|
|
157895
157966
|
try {
|
|
157896
157967
|
yield* withRetryGenerator(async function* () {
|
|
157897
157968
|
var _a20, _b14;
|
|
157898
|
-
const { systemInstruction, contents } = convertToGeminiMessages(options3.messages, options3.includeBuiltinSystemPrompt !== false, customSystemPromptContent, options3.planMode || false, options3.vulnerabilityHuntingMode || false, options3.toolSearchDisabled || false, options3.teamMode || false);
|
|
157969
|
+
const { systemInstruction, contents } = convertToGeminiMessages(options3.messages, options3.includeBuiltinSystemPrompt !== false, customSystemPromptContent, options3.planMode || false, options3.vulnerabilityHuntingMode || false, options3.toolSearchDisabled || false, options3.teamMode || false, options3.isSubAgentRequest || false);
|
|
157899
157970
|
const requestBody = {
|
|
157900
157971
|
contents,
|
|
157901
157972
|
systemInstruction: systemInstruction ? { parts: systemInstruction.map((text2) => ({ text: text2 })) } : void 0
|
|
@@ -158261,9 +158332,10 @@ function convertToolsToAnthropic(tools) {
|
|
|
158261
158332
|
});
|
|
158262
158333
|
return convertedTools;
|
|
158263
158334
|
}
|
|
158264
|
-
function convertToAnthropicMessages(messages, includeBuiltinSystemPrompt = true, customSystemPromptOverride, cacheTTL = "5m", disableThinking = false, planMode = false, vulnerabilityHuntingMode = false, toolSearchDisabled = false, teamMode = false) {
|
|
158335
|
+
function convertToAnthropicMessages(messages, includeBuiltinSystemPrompt = true, customSystemPromptOverride, cacheTTL = "5m", disableThinking = false, planMode = false, vulnerabilityHuntingMode = false, toolSearchDisabled = false, teamMode = false, isSubAgentRequest = false) {
|
|
158265
158336
|
var _a20;
|
|
158266
158337
|
const customSystemPrompts = customSystemPromptOverride;
|
|
158338
|
+
const explicitSystemPrompts = [];
|
|
158267
158339
|
let systemContents;
|
|
158268
158340
|
const anthropicMessages = [];
|
|
158269
158341
|
const toolResults = [];
|
|
@@ -158276,6 +158348,7 @@ function convertToAnthropicMessages(messages, includeBuiltinSystemPrompt = true,
|
|
|
158276
158348
|
toolResults.length = 0;
|
|
158277
158349
|
}
|
|
158278
158350
|
if (msg.role === "system") {
|
|
158351
|
+
explicitSystemPrompts.push(msg.content);
|
|
158279
158352
|
systemContents = [msg.content];
|
|
158280
158353
|
continue;
|
|
158281
158354
|
}
|
|
@@ -158414,13 +158487,33 @@ function convertToAnthropicMessages(messages, includeBuiltinSystemPrompt = true,
|
|
|
158414
158487
|
}
|
|
158415
158488
|
if (customSystemPrompts && customSystemPrompts.length > 0) {
|
|
158416
158489
|
systemContents = customSystemPrompts;
|
|
158417
|
-
|
|
158490
|
+
const builtinPrompt = includeBuiltinSystemPrompt ? getSystemPromptForMode(planMode, vulnerabilityHuntingMode, toolSearchDisabled, teamMode) : "";
|
|
158491
|
+
if (isSubAgentRequest) {
|
|
158492
|
+
const hasBuiltinInExplicitSystem = builtinPrompt.length > 0 && explicitSystemPrompts.some((prompt) => prompt.includes(builtinPrompt));
|
|
158493
|
+
const downgradedSystemMessages = explicitSystemPrompts.map((prompt) => ({
|
|
158494
|
+
role: "user",
|
|
158495
|
+
content: prompt
|
|
158496
|
+
}));
|
|
158497
|
+
const downgradedBuiltinMessages = builtinPrompt && !hasBuiltinInExplicitSystem ? [
|
|
158498
|
+
{
|
|
158499
|
+
role: "user",
|
|
158500
|
+
content: [
|
|
158501
|
+
{
|
|
158502
|
+
type: "text",
|
|
158503
|
+
text: builtinPrompt,
|
|
158504
|
+
cache_control: { type: "ephemeral", ttl: cacheTTL }
|
|
158505
|
+
}
|
|
158506
|
+
]
|
|
158507
|
+
}
|
|
158508
|
+
] : [];
|
|
158509
|
+
anthropicMessages.unshift(...downgradedSystemMessages, ...downgradedBuiltinMessages);
|
|
158510
|
+
} else if (builtinPrompt) {
|
|
158418
158511
|
anthropicMessages.unshift({
|
|
158419
158512
|
role: "user",
|
|
158420
158513
|
content: [
|
|
158421
158514
|
{
|
|
158422
158515
|
type: "text",
|
|
158423
|
-
text:
|
|
158516
|
+
text: builtinPrompt,
|
|
158424
158517
|
cache_control: { type: "ephemeral", ttl: cacheTTL }
|
|
158425
158518
|
}
|
|
158426
158519
|
]
|
|
@@ -158600,7 +158693,7 @@ async function* createStreamingAnthropicCompletion(options3, abortSignal, onRetr
|
|
|
158600
158693
|
}
|
|
158601
158694
|
}
|
|
158602
158695
|
customSystemPromptContent || (customSystemPromptContent = getCustomSystemPromptForConfig(config3));
|
|
158603
|
-
const { system, messages } = convertToAnthropicMessages(options3.messages, options3.includeBuiltinSystemPrompt !== false, customSystemPromptContent, config3.anthropicCacheTTL || "5m", options3.disableThinking || false, options3.planMode || false, options3.vulnerabilityHuntingMode || false, options3.toolSearchDisabled || false, options3.teamMode || false);
|
|
158696
|
+
const { system, messages } = convertToAnthropicMessages(options3.messages, options3.includeBuiltinSystemPrompt !== false, customSystemPromptContent, config3.anthropicCacheTTL || "5m", options3.disableThinking || false, options3.planMode || false, options3.vulnerabilityHuntingMode || false, options3.toolSearchDisabled || false, options3.teamMode || false, options3.isSubAgentRequest || false);
|
|
158604
158697
|
const userId = getPersistentUserId();
|
|
158605
158698
|
const requestBody = {
|
|
158606
158699
|
model: options3.model || config3.advancedModel,
|
|
@@ -509646,6 +509739,222 @@ var init_toolDisplayConfig = __esm({
|
|
|
509646
509739
|
}
|
|
509647
509740
|
});
|
|
509648
509741
|
|
|
509742
|
+
// dist/utils/ui/diffPreview.js
|
|
509743
|
+
import fs38 from "fs";
|
|
509744
|
+
function readOriginalFile(filePath) {
|
|
509745
|
+
try {
|
|
509746
|
+
if (!filePath || !fs38.existsSync(filePath))
|
|
509747
|
+
return null;
|
|
509748
|
+
return fs38.readFileSync(filePath, "utf-8");
|
|
509749
|
+
} catch {
|
|
509750
|
+
return null;
|
|
509751
|
+
}
|
|
509752
|
+
}
|
|
509753
|
+
function computeHashlinePreview(originalContent, operations) {
|
|
509754
|
+
if (!Array.isArray(operations) || operations.length === 0) {
|
|
509755
|
+
return originalContent;
|
|
509756
|
+
}
|
|
509757
|
+
const mutableLines = originalContent.split("\n");
|
|
509758
|
+
const parsed = operations.map((op2) => {
|
|
509759
|
+
const startMatch = String(op2.startAnchor ?? "").match(/^(\d+):/);
|
|
509760
|
+
const endMatch = String(op2.endAnchor ?? "").match(/^(\d+):/);
|
|
509761
|
+
return {
|
|
509762
|
+
type: op2.type,
|
|
509763
|
+
content: op2.content ?? "",
|
|
509764
|
+
startLine: startMatch ? parseInt(startMatch[1], 10) : 0,
|
|
509765
|
+
endLine: endMatch ? parseInt(endMatch[1], 10) : 0
|
|
509766
|
+
};
|
|
509767
|
+
}).filter((op2) => op2.startLine > 0 && op2.endLine > 0).sort((a, b) => b.startLine - a.startLine);
|
|
509768
|
+
for (const op2 of parsed) {
|
|
509769
|
+
const newLines = op2.content.split("\n");
|
|
509770
|
+
switch (op2.type) {
|
|
509771
|
+
case "replace":
|
|
509772
|
+
mutableLines.splice(op2.startLine - 1, op2.endLine - op2.startLine + 1, ...newLines);
|
|
509773
|
+
break;
|
|
509774
|
+
case "insert_after":
|
|
509775
|
+
mutableLines.splice(op2.startLine, 0, ...newLines);
|
|
509776
|
+
break;
|
|
509777
|
+
case "delete":
|
|
509778
|
+
mutableLines.splice(op2.startLine - 1, op2.endLine - op2.startLine + 1);
|
|
509779
|
+
break;
|
|
509780
|
+
}
|
|
509781
|
+
}
|
|
509782
|
+
return mutableLines.join("\n");
|
|
509783
|
+
}
|
|
509784
|
+
function computeReplaceEditPreview(originalContent, searchContent, replaceContent) {
|
|
509785
|
+
const idx = originalContent.indexOf(searchContent);
|
|
509786
|
+
if (idx !== -1) {
|
|
509787
|
+
return originalContent.substring(0, idx) + replaceContent + originalContent.substring(idx + searchContent.length);
|
|
509788
|
+
}
|
|
509789
|
+
return originalContent;
|
|
509790
|
+
}
|
|
509791
|
+
function collectDiffPreviewEntries(toolName, toolArgs) {
|
|
509792
|
+
const entries = [];
|
|
509793
|
+
try {
|
|
509794
|
+
const parsed = JSON.parse(toolArgs);
|
|
509795
|
+
if (typeof parsed.filePath === "string" && parsed.filePath.trimStart().startsWith("[")) {
|
|
509796
|
+
try {
|
|
509797
|
+
parsed.filePath = JSON.parse(parsed.filePath);
|
|
509798
|
+
} catch {
|
|
509799
|
+
}
|
|
509800
|
+
}
|
|
509801
|
+
if (toolName === "filesystem-edit" && parsed.filePath) {
|
|
509802
|
+
if (typeof parsed.filePath === "string") {
|
|
509803
|
+
const originalContent = readOriginalFile(parsed.filePath);
|
|
509804
|
+
if (originalContent !== null) {
|
|
509805
|
+
const newContent = computeHashlinePreview(originalContent, parsed.operations);
|
|
509806
|
+
entries.push({
|
|
509807
|
+
filePath: parsed.filePath,
|
|
509808
|
+
oldContent: originalContent,
|
|
509809
|
+
newContent
|
|
509810
|
+
});
|
|
509811
|
+
}
|
|
509812
|
+
} else if (Array.isArray(parsed.filePath)) {
|
|
509813
|
+
for (const item of parsed.filePath) {
|
|
509814
|
+
if (item && typeof item === "object" && typeof item.path === "string") {
|
|
509815
|
+
const originalContent = readOriginalFile(item.path);
|
|
509816
|
+
if (originalContent !== null) {
|
|
509817
|
+
const newContent = computeHashlinePreview(originalContent, item.operations);
|
|
509818
|
+
entries.push({
|
|
509819
|
+
filePath: item.path,
|
|
509820
|
+
oldContent: originalContent,
|
|
509821
|
+
newContent
|
|
509822
|
+
});
|
|
509823
|
+
}
|
|
509824
|
+
}
|
|
509825
|
+
}
|
|
509826
|
+
}
|
|
509827
|
+
}
|
|
509828
|
+
if (toolName === "filesystem-replaceedit" && parsed.filePath) {
|
|
509829
|
+
if (typeof parsed.filePath === "string") {
|
|
509830
|
+
const originalContent = readOriginalFile(parsed.filePath);
|
|
509831
|
+
if (originalContent !== null) {
|
|
509832
|
+
const newContent = parsed.searchContent && parsed.replaceContent !== void 0 ? computeReplaceEditPreview(originalContent, parsed.searchContent, parsed.replaceContent) : originalContent;
|
|
509833
|
+
entries.push({
|
|
509834
|
+
filePath: parsed.filePath,
|
|
509835
|
+
oldContent: originalContent,
|
|
509836
|
+
newContent
|
|
509837
|
+
});
|
|
509838
|
+
}
|
|
509839
|
+
} else if (Array.isArray(parsed.filePath)) {
|
|
509840
|
+
for (const item of parsed.filePath) {
|
|
509841
|
+
if (typeof item === "string") {
|
|
509842
|
+
const originalContent = readOriginalFile(item);
|
|
509843
|
+
if (originalContent !== null) {
|
|
509844
|
+
const newContent = parsed.searchContent && parsed.replaceContent !== void 0 ? computeReplaceEditPreview(originalContent, parsed.searchContent, parsed.replaceContent) : originalContent;
|
|
509845
|
+
entries.push({
|
|
509846
|
+
filePath: item,
|
|
509847
|
+
oldContent: originalContent,
|
|
509848
|
+
newContent
|
|
509849
|
+
});
|
|
509850
|
+
}
|
|
509851
|
+
} else if (item && typeof item === "object" && typeof item.path === "string") {
|
|
509852
|
+
const originalContent = readOriginalFile(item.path);
|
|
509853
|
+
if (originalContent !== null) {
|
|
509854
|
+
const search = item.searchContent ?? parsed.searchContent;
|
|
509855
|
+
const replace = item.replaceContent ?? parsed.replaceContent;
|
|
509856
|
+
const newContent = search && replace !== void 0 ? computeReplaceEditPreview(originalContent, search, replace) : originalContent;
|
|
509857
|
+
entries.push({
|
|
509858
|
+
filePath: item.path,
|
|
509859
|
+
oldContent: originalContent,
|
|
509860
|
+
newContent
|
|
509861
|
+
});
|
|
509862
|
+
}
|
|
509863
|
+
}
|
|
509864
|
+
}
|
|
509865
|
+
}
|
|
509866
|
+
}
|
|
509867
|
+
if (toolName === "filesystem-create" && parsed.filePath) {
|
|
509868
|
+
if (typeof parsed.filePath === "string" && parsed.content) {
|
|
509869
|
+
const originalContent = readOriginalFile(parsed.filePath) ?? "";
|
|
509870
|
+
entries.push({
|
|
509871
|
+
filePath: parsed.filePath,
|
|
509872
|
+
oldContent: originalContent,
|
|
509873
|
+
newContent: parsed.content
|
|
509874
|
+
});
|
|
509875
|
+
} else if (Array.isArray(parsed.filePath)) {
|
|
509876
|
+
for (const item of parsed.filePath) {
|
|
509877
|
+
if (item && typeof item === "object" && typeof item.path === "string" && typeof item.content === "string") {
|
|
509878
|
+
const originalContent = readOriginalFile(item.path) ?? "";
|
|
509879
|
+
entries.push({
|
|
509880
|
+
filePath: item.path,
|
|
509881
|
+
oldContent: originalContent,
|
|
509882
|
+
newContent: item.content
|
|
509883
|
+
});
|
|
509884
|
+
}
|
|
509885
|
+
}
|
|
509886
|
+
}
|
|
509887
|
+
}
|
|
509888
|
+
} catch {
|
|
509889
|
+
}
|
|
509890
|
+
return entries;
|
|
509891
|
+
}
|
|
509892
|
+
function enrichPendingEditArgs(toolName, toolArgs) {
|
|
509893
|
+
if (toolName !== "filesystem-edit" && toolName !== "filesystem-replaceedit" && toolName !== "filesystem-create") {
|
|
509894
|
+
return toolArgs;
|
|
509895
|
+
}
|
|
509896
|
+
const rawFilePath = toolArgs["filePath"];
|
|
509897
|
+
if (typeof rawFilePath === "string" && rawFilePath.trimStart().startsWith("[")) {
|
|
509898
|
+
try {
|
|
509899
|
+
toolArgs = { ...toolArgs, filePath: JSON.parse(rawFilePath) };
|
|
509900
|
+
} catch {
|
|
509901
|
+
}
|
|
509902
|
+
}
|
|
509903
|
+
const isBatch = toolArgs["isBatch"] || Array.isArray(toolArgs["filePath"]);
|
|
509904
|
+
if (!isBatch) {
|
|
509905
|
+
const entries2 = collectDiffPreviewEntries(toolName, JSON.stringify(toolArgs));
|
|
509906
|
+
if (entries2.length === 1) {
|
|
509907
|
+
const entry = entries2[0];
|
|
509908
|
+
if (toolName === "filesystem-create") {
|
|
509909
|
+
return {
|
|
509910
|
+
...toolArgs,
|
|
509911
|
+
content: entry.newContent,
|
|
509912
|
+
path: entry.filePath
|
|
509913
|
+
};
|
|
509914
|
+
}
|
|
509915
|
+
return {
|
|
509916
|
+
...toolArgs,
|
|
509917
|
+
oldContent: entry.oldContent,
|
|
509918
|
+
newContent: entry.newContent,
|
|
509919
|
+
filename: entry.filePath
|
|
509920
|
+
};
|
|
509921
|
+
}
|
|
509922
|
+
return toolArgs;
|
|
509923
|
+
}
|
|
509924
|
+
const entries = collectDiffPreviewEntries(toolName, JSON.stringify(toolArgs));
|
|
509925
|
+
if (entries.length === 0) {
|
|
509926
|
+
return toolArgs;
|
|
509927
|
+
}
|
|
509928
|
+
if (toolName === "filesystem-create") {
|
|
509929
|
+
const batchResults2 = entries.map((entry) => ({
|
|
509930
|
+
success: true,
|
|
509931
|
+
path: entry.filePath,
|
|
509932
|
+
content: entry.newContent
|
|
509933
|
+
}));
|
|
509934
|
+
return {
|
|
509935
|
+
...toolArgs,
|
|
509936
|
+
isBatch: true,
|
|
509937
|
+
batchResults: batchResults2
|
|
509938
|
+
};
|
|
509939
|
+
}
|
|
509940
|
+
const batchResults = entries.map((entry) => ({
|
|
509941
|
+
success: true,
|
|
509942
|
+
path: entry.filePath,
|
|
509943
|
+
oldContent: entry.oldContent,
|
|
509944
|
+
newContent: entry.newContent
|
|
509945
|
+
}));
|
|
509946
|
+
return {
|
|
509947
|
+
...toolArgs,
|
|
509948
|
+
isBatch: true,
|
|
509949
|
+
batchResults
|
|
509950
|
+
};
|
|
509951
|
+
}
|
|
509952
|
+
var init_diffPreview = __esm({
|
|
509953
|
+
"dist/utils/ui/diffPreview.js"() {
|
|
509954
|
+
"use strict";
|
|
509955
|
+
}
|
|
509956
|
+
});
|
|
509957
|
+
|
|
509649
509958
|
// dist/hooks/conversation/core/subAgentMessageHandler.js
|
|
509650
509959
|
var subAgentMessageHandler_exports = {};
|
|
509651
509960
|
__export(subAgentMessageHandler_exports, {
|
|
@@ -509781,6 +510090,7 @@ var init_subAgentMessageHandler = __esm({
|
|
|
509781
510090
|
"use strict";
|
|
509782
510091
|
init_messageFormatter();
|
|
509783
510092
|
init_toolDisplayConfig();
|
|
510093
|
+
init_diffPreview();
|
|
509784
510094
|
_teammateStreamMap = /* @__PURE__ */ new Map();
|
|
509785
510095
|
_teammateStreamListeners = /* @__PURE__ */ new Set();
|
|
509786
510096
|
_teammateStreamSnapshot = [];
|
|
@@ -510369,6 +510679,7 @@ var init_subAgentMessageHandler = __esm({
|
|
|
510369
510679
|
} catch {
|
|
510370
510680
|
toolArgs = {};
|
|
510371
510681
|
}
|
|
510682
|
+
const enrichedArgs = enrichPendingEditArgs(toolCall.function.name, toolArgs);
|
|
510372
510683
|
let paramDisplay = "";
|
|
510373
510684
|
if (toolCall.function.name === "terminal-execute" && toolArgs.command) {
|
|
510374
510685
|
paramDisplay = ` "${toolArgs.command}"`;
|
|
@@ -510380,7 +510691,7 @@ var init_subAgentMessageHandler = __esm({
|
|
|
510380
510691
|
role: "subagent",
|
|
510381
510692
|
content: `\x1B[38;2;184;122;206m\u2687\u26A1 ${toolDisplay.toolName}${paramDisplay}\x1B[0m`,
|
|
510382
510693
|
streaming: false,
|
|
510383
|
-
toolCall: { name: toolCall.function.name, arguments:
|
|
510694
|
+
toolCall: { name: toolCall.function.name, arguments: enrichedArgs },
|
|
510384
510695
|
toolCallId: toolCall.id,
|
|
510385
510696
|
toolPending: true,
|
|
510386
510697
|
messageStatus: "pending",
|
|
@@ -510621,7 +510932,7 @@ var init_subAgentMessageHandler = __esm({
|
|
|
510621
510932
|
});
|
|
510622
510933
|
|
|
510623
510934
|
// dist/utils/team/teamSnapshot.js
|
|
510624
|
-
import * as
|
|
510935
|
+
import * as fs39 from "fs";
|
|
510625
510936
|
import * as path44 from "path";
|
|
510626
510937
|
import * as os23 from "os";
|
|
510627
510938
|
function getTeamSnapshotDir() {
|
|
@@ -510633,16 +510944,16 @@ function getTeamSnapshotFilePath() {
|
|
|
510633
510944
|
}
|
|
510634
510945
|
function ensureDir5() {
|
|
510635
510946
|
const dir = getTeamSnapshotDir();
|
|
510636
|
-
if (!
|
|
510637
|
-
|
|
510947
|
+
if (!fs39.existsSync(dir)) {
|
|
510948
|
+
fs39.mkdirSync(dir, { recursive: true });
|
|
510638
510949
|
}
|
|
510639
510950
|
}
|
|
510640
510951
|
function readSnapshotData() {
|
|
510641
510952
|
const filePath = getTeamSnapshotFilePath();
|
|
510642
|
-
if (!
|
|
510953
|
+
if (!fs39.existsSync(filePath))
|
|
510643
510954
|
return {};
|
|
510644
510955
|
try {
|
|
510645
|
-
return JSON.parse(
|
|
510956
|
+
return JSON.parse(fs39.readFileSync(filePath, "utf-8"));
|
|
510646
510957
|
} catch {
|
|
510647
510958
|
return {};
|
|
510648
510959
|
}
|
|
@@ -510650,7 +510961,7 @@ function readSnapshotData() {
|
|
|
510650
510961
|
function saveSnapshotData(data) {
|
|
510651
510962
|
ensureDir5();
|
|
510652
510963
|
try {
|
|
510653
|
-
|
|
510964
|
+
fs39.writeFileSync(getTeamSnapshotFilePath(), JSON.stringify(data, null, 2), "utf-8");
|
|
510654
510965
|
} catch (error42) {
|
|
510655
510966
|
console.error("Failed to save team snapshot data:", error42);
|
|
510656
510967
|
}
|
|
@@ -519217,7 +519528,7 @@ var require_node17 = __commonJS({
|
|
|
519217
519528
|
|
|
519218
519529
|
// dist/mcp/lsp/LSPClient.js
|
|
519219
519530
|
import { spawn as spawn9 } from "child_process";
|
|
519220
|
-
import { promises as
|
|
519531
|
+
import { promises as fs40 } from "fs";
|
|
519221
519532
|
import * as path45 from "path";
|
|
519222
519533
|
var import_node, LSPClient;
|
|
519223
519534
|
var init_LSPClient = __esm({
|
|
@@ -519323,7 +519634,7 @@ var init_LSPClient = __esm({
|
|
|
519323
519634
|
return rootPath;
|
|
519324
519635
|
}
|
|
519325
519636
|
try {
|
|
519326
|
-
const entries = await
|
|
519637
|
+
const entries = await fs40.readdir(rootPath, { withFileTypes: true });
|
|
519327
519638
|
const solutions = entries.filter((entry) => entry.isFile() && entry.name.toLowerCase().endsWith(".sln")).map((entry) => entry.name).sort((a, b) => a.localeCompare(b));
|
|
519328
519639
|
if (solutions.length === 0)
|
|
519329
519640
|
return null;
|
|
@@ -519905,7 +520216,7 @@ var init_LSPServerRegistry = __esm({
|
|
|
519905
520216
|
});
|
|
519906
520217
|
|
|
519907
520218
|
// dist/mcp/lsp/LSPManager.js
|
|
519908
|
-
import { promises as
|
|
520219
|
+
import { promises as fs41 } from "fs";
|
|
519909
520220
|
import * as path46 from "path";
|
|
519910
520221
|
var LSPManager;
|
|
519911
520222
|
var init_LSPManager = __esm({
|
|
@@ -520112,7 +520423,7 @@ var init_LSPManager = __esm({
|
|
|
520112
520423
|
return this.documentCache.get(fullPath);
|
|
520113
520424
|
}
|
|
520114
520425
|
try {
|
|
520115
|
-
const content = await
|
|
520426
|
+
const content = await fs41.readFile(fullPath, "utf-8");
|
|
520116
520427
|
this.documentCache.set(fullPath, content);
|
|
520117
520428
|
return content;
|
|
520118
520429
|
} catch (error42) {
|
|
@@ -522205,7 +522516,7 @@ __export(roleSubagent_exports, {
|
|
|
522205
522516
|
listRoleSubagents: () => listRoleSubagents,
|
|
522206
522517
|
loadSubAgentCustomRole: () => loadSubAgentCustomRole
|
|
522207
522518
|
});
|
|
522208
|
-
import
|
|
522519
|
+
import fs42 from "fs/promises";
|
|
522209
522520
|
import path49 from "path";
|
|
522210
522521
|
import { homedir as homedir15 } from "os";
|
|
522211
522522
|
import { existsSync as existsSync27, readdirSync as readdirSync5, readFileSync as readFileSync22 } from "fs";
|
|
@@ -522240,8 +522551,8 @@ async function createRoleSubagentFile(agentName, location, projectRoot) {
|
|
|
522240
522551
|
};
|
|
522241
522552
|
}
|
|
522242
522553
|
const dir = path49.dirname(filePath);
|
|
522243
|
-
await
|
|
522244
|
-
await
|
|
522554
|
+
await fs42.mkdir(dir, { recursive: true });
|
|
522555
|
+
await fs42.writeFile(filePath, "", "utf-8");
|
|
522245
522556
|
return { success: true, path: filePath };
|
|
522246
522557
|
} catch (error42) {
|
|
522247
522558
|
return {
|
|
@@ -522261,7 +522572,7 @@ async function deleteRoleSubagentFile(agentName, location, projectRoot) {
|
|
|
522261
522572
|
error: `Role file for "${agentName}" does not exist at this location`
|
|
522262
522573
|
};
|
|
522263
522574
|
}
|
|
522264
|
-
await
|
|
522575
|
+
await fs42.unlink(filePath);
|
|
522265
522576
|
return { success: true, path: filePath };
|
|
522266
522577
|
} catch (error42) {
|
|
522267
522578
|
return {
|
|
@@ -523561,7 +523872,8 @@ function createApiStream(config3, model, messages, allowedTools, sessionId, conf
|
|
|
523561
523872
|
max_tokens: config3.maxTokens || 4096,
|
|
523562
523873
|
tools: allowedTools,
|
|
523563
523874
|
sessionId,
|
|
523564
|
-
configProfile
|
|
523875
|
+
configProfile,
|
|
523876
|
+
isSubAgentRequest: true
|
|
523565
523877
|
}, abortSignal);
|
|
523566
523878
|
}
|
|
523567
523879
|
if (config3.requestMethod === "gemini") {
|
|
@@ -523570,7 +523882,8 @@ function createApiStream(config3, model, messages, allowedTools, sessionId, conf
|
|
|
523570
523882
|
messages,
|
|
523571
523883
|
temperature: 0,
|
|
523572
523884
|
tools: allowedTools,
|
|
523573
|
-
configProfile
|
|
523885
|
+
configProfile,
|
|
523886
|
+
isSubAgentRequest: true
|
|
523574
523887
|
}, abortSignal);
|
|
523575
523888
|
}
|
|
523576
523889
|
if (config3.requestMethod === "responses") {
|
|
@@ -523580,7 +523893,8 @@ function createApiStream(config3, model, messages, allowedTools, sessionId, conf
|
|
|
523580
523893
|
temperature: 0,
|
|
523581
523894
|
tools: allowedTools,
|
|
523582
523895
|
prompt_cache_key: sessionId,
|
|
523583
|
-
configProfile
|
|
523896
|
+
configProfile,
|
|
523897
|
+
isSubAgentRequest: true
|
|
523584
523898
|
}, abortSignal);
|
|
523585
523899
|
}
|
|
523586
523900
|
return createStreamingChatCompletion({
|
|
@@ -523588,7 +523902,8 @@ function createApiStream(config3, model, messages, allowedTools, sessionId, conf
|
|
|
523588
523902
|
messages,
|
|
523589
523903
|
temperature: 0,
|
|
523590
523904
|
tools: allowedTools,
|
|
523591
|
-
configProfile
|
|
523905
|
+
configProfile,
|
|
523906
|
+
isSubAgentRequest: true
|
|
523592
523907
|
}, abortSignal);
|
|
523593
523908
|
}
|
|
523594
523909
|
async function processStreamEvents(ctx, stream, config3) {
|
|
@@ -527153,7 +527468,7 @@ var init_stateManager = __esm({
|
|
|
527153
527468
|
});
|
|
527154
527469
|
|
|
527155
527470
|
// dist/utils/connection/instanceLock.js
|
|
527156
|
-
import * as
|
|
527471
|
+
import * as fs43 from "fs";
|
|
527157
527472
|
import * as path50 from "path";
|
|
527158
527473
|
var InstanceLockManager;
|
|
527159
527474
|
var init_instanceLock = __esm({
|
|
@@ -527171,8 +527486,8 @@ var init_instanceLock = __esm({
|
|
|
527171
527486
|
}
|
|
527172
527487
|
// Ensure .snow/locks directory exists
|
|
527173
527488
|
ensureLocksDir() {
|
|
527174
|
-
if (!
|
|
527175
|
-
|
|
527489
|
+
if (!fs43.existsSync(this.locksDir)) {
|
|
527490
|
+
fs43.mkdirSync(this.locksDir, { recursive: true });
|
|
527176
527491
|
}
|
|
527177
527492
|
}
|
|
527178
527493
|
// Get instance lock file path
|
|
@@ -527183,16 +527498,16 @@ var init_instanceLock = __esm({
|
|
|
527183
527498
|
isLocked(instanceId) {
|
|
527184
527499
|
try {
|
|
527185
527500
|
const lockPath = this.getLockPath(instanceId);
|
|
527186
|
-
if (!
|
|
527501
|
+
if (!fs43.existsSync(lockPath)) {
|
|
527187
527502
|
return false;
|
|
527188
527503
|
}
|
|
527189
|
-
const lockContent =
|
|
527504
|
+
const lockContent = fs43.readFileSync(lockPath, "utf-8");
|
|
527190
527505
|
const lockData = JSON.parse(lockContent);
|
|
527191
527506
|
try {
|
|
527192
527507
|
process.kill(lockData.pid, 0);
|
|
527193
527508
|
return true;
|
|
527194
527509
|
} catch {
|
|
527195
|
-
|
|
527510
|
+
fs43.unlinkSync(lockPath);
|
|
527196
527511
|
return false;
|
|
527197
527512
|
}
|
|
527198
527513
|
} catch {
|
|
@@ -527211,7 +527526,7 @@ var init_instanceLock = __esm({
|
|
|
527211
527526
|
pid: process.pid,
|
|
527212
527527
|
timestamp: Date.now()
|
|
527213
527528
|
};
|
|
527214
|
-
|
|
527529
|
+
fs43.writeFileSync(lockPath, JSON.stringify(lockData), "utf-8");
|
|
527215
527530
|
return true;
|
|
527216
527531
|
} catch {
|
|
527217
527532
|
return false;
|
|
@@ -527221,8 +527536,8 @@ var init_instanceLock = __esm({
|
|
|
527221
527536
|
unlock(instanceId) {
|
|
527222
527537
|
try {
|
|
527223
527538
|
const lockPath = this.getLockPath(instanceId);
|
|
527224
|
-
if (
|
|
527225
|
-
|
|
527539
|
+
if (fs43.existsSync(lockPath)) {
|
|
527540
|
+
fs43.unlinkSync(lockPath);
|
|
527226
527541
|
}
|
|
527227
527542
|
} catch {
|
|
527228
527543
|
}
|
|
@@ -527533,7 +527848,7 @@ var init_interactionManager = __esm({
|
|
|
527533
527848
|
});
|
|
527534
527849
|
|
|
527535
527850
|
// dist/utils/connection/projectData.js
|
|
527536
|
-
import * as
|
|
527851
|
+
import * as fs44 from "fs";
|
|
527537
527852
|
import * as path51 from "path";
|
|
527538
527853
|
var ProjectDataManager;
|
|
527539
527854
|
var init_projectData = __esm({
|
|
@@ -527561,7 +527876,7 @@ var init_projectData = __esm({
|
|
|
527561
527876
|
if (result2.length >= maxFiles) {
|
|
527562
527877
|
return;
|
|
527563
527878
|
}
|
|
527564
|
-
const entries = await
|
|
527879
|
+
const entries = await fs44.promises.readdir(dir, { withFileTypes: true });
|
|
527565
527880
|
for (const entry of entries) {
|
|
527566
527881
|
if (result2.length >= maxFiles) {
|
|
527567
527882
|
return;
|
|
@@ -534152,7 +534467,7 @@ var init_esm6 = __esm({
|
|
|
534152
534467
|
|
|
534153
534468
|
// dist/agents/codebaseIndexAgent.js
|
|
534154
534469
|
import path52 from "node:path";
|
|
534155
|
-
import
|
|
534470
|
+
import fs45 from "node:fs";
|
|
534156
534471
|
import crypto5 from "node:crypto";
|
|
534157
534472
|
var import_ignore, CodebaseIndexAgent;
|
|
534158
534473
|
var init_codebaseIndexAgent = __esm({
|
|
@@ -534261,7 +534576,7 @@ var init_codebaseIndexAgent = __esm({
|
|
|
534261
534576
|
return;
|
|
534262
534577
|
}
|
|
534263
534578
|
const gitignorePath = path52.join(this.projectRoot, ".gitignore");
|
|
534264
|
-
if (!
|
|
534579
|
+
if (!fs45.existsSync(gitignorePath)) {
|
|
534265
534580
|
const { getCurrentLanguage: getCurrentLanguage2 } = await Promise.resolve().then(() => (init_languageConfig(), languageConfig_exports));
|
|
534266
534581
|
const { translations: translations2 } = await Promise.resolve().then(() => (init_i18n(), i18n_exports));
|
|
534267
534582
|
const currentLanguage = getCurrentLanguage2();
|
|
@@ -534559,8 +534874,8 @@ var init_codebaseIndexAgent = __esm({
|
|
|
534559
534874
|
*/
|
|
534560
534875
|
loadGitignore() {
|
|
534561
534876
|
const gitignorePath = path52.join(this.projectRoot, ".gitignore");
|
|
534562
|
-
if (
|
|
534563
|
-
const content =
|
|
534877
|
+
if (fs45.existsSync(gitignorePath)) {
|
|
534878
|
+
const content = fs45.readFileSync(gitignorePath, "utf-8");
|
|
534564
534879
|
this.ignoreFilter.add(content);
|
|
534565
534880
|
}
|
|
534566
534881
|
}
|
|
@@ -534595,7 +534910,7 @@ var init_codebaseIndexAgent = __esm({
|
|
|
534595
534910
|
const scanDir = (dir) => {
|
|
534596
534911
|
let entries;
|
|
534597
534912
|
try {
|
|
534598
|
-
entries =
|
|
534913
|
+
entries = fs45.readdirSync(dir, { withFileTypes: true });
|
|
534599
534914
|
} catch (error42) {
|
|
534600
534915
|
if (error42.code === "EPERM" || error42.code === "EACCES") {
|
|
534601
534916
|
logger.warn(`\u8DF3\u8FC7\u65E0\u6743\u9650\u8BBF\u95EE\u7684\u76EE\u5F55: ${dir}`);
|
|
@@ -534677,7 +534992,7 @@ var init_codebaseIndexAgent = __esm({
|
|
|
534677
534992
|
content = docContent.text;
|
|
534678
534993
|
fileHash = crypto5.createHash("sha256").update(content).digest("hex");
|
|
534679
534994
|
} else {
|
|
534680
|
-
content =
|
|
534995
|
+
content = fs45.readFileSync(filePath, "utf-8");
|
|
534681
534996
|
fileHash = crypto5.createHash("sha256").update(content).digest("hex");
|
|
534682
534997
|
}
|
|
534683
534998
|
if (this.db.hasFileHash(fileHash)) {
|
|
@@ -536475,7 +536790,7 @@ var taskManager_exports = {};
|
|
|
536475
536790
|
__export(taskManager_exports, {
|
|
536476
536791
|
taskManager: () => taskManager
|
|
536477
536792
|
});
|
|
536478
|
-
import
|
|
536793
|
+
import fs46 from "fs/promises";
|
|
536479
536794
|
import path53 from "path";
|
|
536480
536795
|
import os25 from "os";
|
|
536481
536796
|
import { randomUUID as randomUUID8 } from "crypto";
|
|
@@ -536516,7 +536831,7 @@ var init_taskManager = __esm({
|
|
|
536516
536831
|
}
|
|
536517
536832
|
async ensureTasksDir() {
|
|
536518
536833
|
try {
|
|
536519
|
-
await
|
|
536834
|
+
await fs46.mkdir(this.tasksDir, { recursive: true });
|
|
536520
536835
|
} catch (error42) {
|
|
536521
536836
|
}
|
|
536522
536837
|
}
|
|
@@ -536542,12 +536857,12 @@ var init_taskManager = __esm({
|
|
|
536542
536857
|
async saveTask(task) {
|
|
536543
536858
|
await this.ensureTasksDir();
|
|
536544
536859
|
const taskPath = this.getTaskPath(task.id);
|
|
536545
|
-
await
|
|
536860
|
+
await fs46.writeFile(taskPath, JSON.stringify(task, null, 2));
|
|
536546
536861
|
}
|
|
536547
536862
|
async loadTask(taskId) {
|
|
536548
536863
|
try {
|
|
536549
536864
|
const taskPath = this.getTaskPath(taskId);
|
|
536550
|
-
const data = await
|
|
536865
|
+
const data = await fs46.readFile(taskPath, "utf-8");
|
|
536551
536866
|
return JSON.parse(data);
|
|
536552
536867
|
} catch (error42) {
|
|
536553
536868
|
return null;
|
|
@@ -536557,12 +536872,12 @@ var init_taskManager = __esm({
|
|
|
536557
536872
|
await this.ensureTasksDir();
|
|
536558
536873
|
const tasks = [];
|
|
536559
536874
|
try {
|
|
536560
|
-
const files = await
|
|
536875
|
+
const files = await fs46.readdir(this.tasksDir);
|
|
536561
536876
|
for (const file2 of files) {
|
|
536562
536877
|
if (file2.endsWith(".json")) {
|
|
536563
536878
|
try {
|
|
536564
536879
|
const taskPath = path53.join(this.tasksDir, file2);
|
|
536565
|
-
const data = await
|
|
536880
|
+
const data = await fs46.readFile(taskPath, "utf-8");
|
|
536566
536881
|
const task = JSON.parse(data);
|
|
536567
536882
|
tasks.push({
|
|
536568
536883
|
id: task.id,
|
|
@@ -536597,7 +536912,7 @@ var init_taskManager = __esm({
|
|
|
536597
536912
|
}
|
|
536598
536913
|
}
|
|
536599
536914
|
const taskPath = this.getTaskPath(taskId);
|
|
536600
|
-
await
|
|
536915
|
+
await fs46.unlink(taskPath);
|
|
536601
536916
|
return true;
|
|
536602
536917
|
} catch (error42) {
|
|
536603
536918
|
return false;
|
|
@@ -536893,16 +537208,16 @@ __export(fileUtils_exports, {
|
|
|
536893
537208
|
getFileLineCount: () => getFileLineCount,
|
|
536894
537209
|
parseAndValidateFileReferences: () => parseAndValidateFileReferences
|
|
536895
537210
|
});
|
|
536896
|
-
import
|
|
537211
|
+
import fs47 from "fs";
|
|
536897
537212
|
import path54 from "path";
|
|
536898
537213
|
function getFileLineCount(filePath) {
|
|
536899
537214
|
return new Promise((resolve15) => {
|
|
536900
537215
|
try {
|
|
536901
|
-
if (!
|
|
537216
|
+
if (!fs47.existsSync(filePath)) {
|
|
536902
537217
|
resolve15(0);
|
|
536903
537218
|
return;
|
|
536904
537219
|
}
|
|
536905
|
-
const content =
|
|
537220
|
+
const content = fs47.readFileSync(filePath, "utf-8");
|
|
536906
537221
|
const lines = content.split("\n").length;
|
|
536907
537222
|
resolve15(lines);
|
|
536908
537223
|
} catch (error42) {
|
|
@@ -536950,7 +537265,7 @@ async function getFileInfo(filePath) {
|
|
|
536950
537265
|
let actualPath = filePath;
|
|
536951
537266
|
let exists = false;
|
|
536952
537267
|
for (const tryPath of uniquePaths) {
|
|
536953
|
-
if (
|
|
537268
|
+
if (fs47.existsSync(tryPath)) {
|
|
536954
537269
|
actualPath = tryPath;
|
|
536955
537270
|
exists = true;
|
|
536956
537271
|
break;
|
|
@@ -536962,7 +537277,7 @@ async function getFileInfo(filePath) {
|
|
|
536962
537277
|
let lineCount = 0;
|
|
536963
537278
|
if (exists) {
|
|
536964
537279
|
if (isImage) {
|
|
536965
|
-
const buffer =
|
|
537280
|
+
const buffer = fs47.readFileSync(actualPath);
|
|
536966
537281
|
const base643 = buffer.toString("base64");
|
|
536967
537282
|
mimeType = getMimeType(actualPath);
|
|
536968
537283
|
imageData = `data:${mimeType};base64,${base643}`;
|
|
@@ -537253,223 +537568,36 @@ var init_sessionInitializer = __esm({
|
|
|
537253
537568
|
}
|
|
537254
537569
|
});
|
|
537255
537570
|
|
|
537256
|
-
// dist/utils/
|
|
537257
|
-
|
|
537258
|
-
|
|
537259
|
-
|
|
537260
|
-
if (!
|
|
537261
|
-
|
|
537262
|
-
|
|
537263
|
-
|
|
537264
|
-
|
|
537265
|
-
|
|
537266
|
-
}
|
|
537267
|
-
function computeHashlinePreview(originalContent, operations) {
|
|
537268
|
-
if (!Array.isArray(operations) || operations.length === 0) {
|
|
537269
|
-
return originalContent;
|
|
537270
|
-
}
|
|
537271
|
-
const mutableLines = originalContent.split("\n");
|
|
537272
|
-
const parsed = operations.map((op2) => {
|
|
537273
|
-
const startMatch = String(op2.startAnchor ?? "").match(/^(\d+):/);
|
|
537274
|
-
const endMatch = String(op2.endAnchor ?? "").match(/^(\d+):/);
|
|
537275
|
-
return {
|
|
537276
|
-
type: op2.type,
|
|
537277
|
-
content: op2.content ?? "",
|
|
537278
|
-
startLine: startMatch ? parseInt(startMatch[1], 10) : 0,
|
|
537279
|
-
endLine: endMatch ? parseInt(endMatch[1], 10) : 0
|
|
537280
|
-
};
|
|
537281
|
-
}).filter((op2) => op2.startLine > 0 && op2.endLine > 0).sort((a, b) => b.startLine - a.startLine);
|
|
537282
|
-
for (const op2 of parsed) {
|
|
537283
|
-
const newLines = op2.content.split("\n");
|
|
537284
|
-
switch (op2.type) {
|
|
537285
|
-
case "replace":
|
|
537286
|
-
mutableLines.splice(op2.startLine - 1, op2.endLine - op2.startLine + 1, ...newLines);
|
|
537287
|
-
break;
|
|
537288
|
-
case "insert_after":
|
|
537289
|
-
mutableLines.splice(op2.startLine, 0, ...newLines);
|
|
537290
|
-
break;
|
|
537291
|
-
case "delete":
|
|
537292
|
-
mutableLines.splice(op2.startLine - 1, op2.endLine - op2.startLine + 1);
|
|
537293
|
-
break;
|
|
537294
|
-
}
|
|
537295
|
-
}
|
|
537296
|
-
return mutableLines.join("\n");
|
|
537297
|
-
}
|
|
537298
|
-
function computeReplaceEditPreview(originalContent, searchContent, replaceContent) {
|
|
537299
|
-
const idx = originalContent.indexOf(searchContent);
|
|
537300
|
-
if (idx !== -1) {
|
|
537301
|
-
return originalContent.substring(0, idx) + replaceContent + originalContent.substring(idx + searchContent.length);
|
|
537302
|
-
}
|
|
537303
|
-
return originalContent;
|
|
537304
|
-
}
|
|
537305
|
-
function collectDiffPreviewEntries(toolName, toolArgs) {
|
|
537306
|
-
const entries = [];
|
|
537307
|
-
try {
|
|
537308
|
-
const parsed = JSON.parse(toolArgs);
|
|
537309
|
-
if (typeof parsed.filePath === "string" && parsed.filePath.trimStart().startsWith("[")) {
|
|
537310
|
-
try {
|
|
537311
|
-
parsed.filePath = JSON.parse(parsed.filePath);
|
|
537312
|
-
} catch {
|
|
537571
|
+
// dist/utils/session/sessionConverter.js
|
|
537572
|
+
function findToolResultDiffData(sessionMessages, startIndex, toolCallId) {
|
|
537573
|
+
for (let j = startIndex + 1; j < sessionMessages.length; j++) {
|
|
537574
|
+
const nextMsg = sessionMessages[j];
|
|
537575
|
+
if (!nextMsg)
|
|
537576
|
+
break;
|
|
537577
|
+
if (nextMsg.role === "tool" && nextMsg.tool_call_id === toolCallId) {
|
|
537578
|
+
const savedEditDiffData = nextMsg.editDiffData;
|
|
537579
|
+
if (savedEditDiffData && (typeof savedEditDiffData.oldContent === "string" || typeof savedEditDiffData.content === "string" || Array.isArray(savedEditDiffData.batchResults))) {
|
|
537580
|
+
return savedEditDiffData;
|
|
537313
537581
|
}
|
|
537314
|
-
|
|
537315
|
-
|
|
537316
|
-
|
|
537317
|
-
const originalContent = readOriginalFile(parsed.filePath);
|
|
537318
|
-
if (originalContent !== null) {
|
|
537319
|
-
const newContent = computeHashlinePreview(originalContent, parsed.operations);
|
|
537320
|
-
entries.push({
|
|
537321
|
-
filePath: parsed.filePath,
|
|
537322
|
-
oldContent: originalContent,
|
|
537323
|
-
newContent
|
|
537324
|
-
});
|
|
537325
|
-
}
|
|
537326
|
-
} else if (Array.isArray(parsed.filePath)) {
|
|
537327
|
-
for (const item of parsed.filePath) {
|
|
537328
|
-
if (item && typeof item === "object" && typeof item.path === "string") {
|
|
537329
|
-
const originalContent = readOriginalFile(item.path);
|
|
537330
|
-
if (originalContent !== null) {
|
|
537331
|
-
const newContent = computeHashlinePreview(originalContent, item.operations);
|
|
537332
|
-
entries.push({
|
|
537333
|
-
filePath: item.path,
|
|
537334
|
-
oldContent: originalContent,
|
|
537335
|
-
newContent
|
|
537336
|
-
});
|
|
537337
|
-
}
|
|
537338
|
-
}
|
|
537339
|
-
}
|
|
537340
|
-
}
|
|
537341
|
-
}
|
|
537342
|
-
if (toolName === "filesystem-replaceedit" && parsed.filePath) {
|
|
537343
|
-
if (typeof parsed.filePath === "string") {
|
|
537344
|
-
const originalContent = readOriginalFile(parsed.filePath);
|
|
537345
|
-
if (originalContent !== null) {
|
|
537346
|
-
const newContent = parsed.searchContent && parsed.replaceContent !== void 0 ? computeReplaceEditPreview(originalContent, parsed.searchContent, parsed.replaceContent) : originalContent;
|
|
537347
|
-
entries.push({
|
|
537348
|
-
filePath: parsed.filePath,
|
|
537349
|
-
oldContent: originalContent,
|
|
537350
|
-
newContent
|
|
537351
|
-
});
|
|
537352
|
-
}
|
|
537353
|
-
} else if (Array.isArray(parsed.filePath)) {
|
|
537354
|
-
for (const item of parsed.filePath) {
|
|
537355
|
-
if (typeof item === "string") {
|
|
537356
|
-
const originalContent = readOriginalFile(item);
|
|
537357
|
-
if (originalContent !== null) {
|
|
537358
|
-
const newContent = parsed.searchContent && parsed.replaceContent !== void 0 ? computeReplaceEditPreview(originalContent, parsed.searchContent, parsed.replaceContent) : originalContent;
|
|
537359
|
-
entries.push({
|
|
537360
|
-
filePath: item,
|
|
537361
|
-
oldContent: originalContent,
|
|
537362
|
-
newContent
|
|
537363
|
-
});
|
|
537364
|
-
}
|
|
537365
|
-
} else if (item && typeof item === "object" && typeof item.path === "string") {
|
|
537366
|
-
const originalContent = readOriginalFile(item.path);
|
|
537367
|
-
if (originalContent !== null) {
|
|
537368
|
-
const search = item.searchContent ?? parsed.searchContent;
|
|
537369
|
-
const replace = item.replaceContent ?? parsed.replaceContent;
|
|
537370
|
-
const newContent = search && replace !== void 0 ? computeReplaceEditPreview(originalContent, search, replace) : originalContent;
|
|
537371
|
-
entries.push({
|
|
537372
|
-
filePath: item.path,
|
|
537373
|
-
oldContent: originalContent,
|
|
537374
|
-
newContent
|
|
537375
|
-
});
|
|
537376
|
-
}
|
|
537377
|
-
}
|
|
537378
|
-
}
|
|
537582
|
+
const toolName = findToolNameForToolCall(sessionMessages, startIndex, toolCallId);
|
|
537583
|
+
if (toolName) {
|
|
537584
|
+
return extractFilesystemEditDiffDataForPersistence(toolName, nextMsg.content);
|
|
537379
537585
|
}
|
|
537586
|
+
return void 0;
|
|
537380
537587
|
}
|
|
537381
|
-
if (
|
|
537382
|
-
|
|
537383
|
-
const originalContent = readOriginalFile(parsed.filePath) ?? "";
|
|
537384
|
-
entries.push({
|
|
537385
|
-
filePath: parsed.filePath,
|
|
537386
|
-
oldContent: originalContent,
|
|
537387
|
-
newContent: parsed.content
|
|
537388
|
-
});
|
|
537389
|
-
} else if (Array.isArray(parsed.filePath)) {
|
|
537390
|
-
for (const item of parsed.filePath) {
|
|
537391
|
-
if (item && typeof item === "object" && typeof item.path === "string" && typeof item.content === "string") {
|
|
537392
|
-
const originalContent = readOriginalFile(item.path) ?? "";
|
|
537393
|
-
entries.push({
|
|
537394
|
-
filePath: item.path,
|
|
537395
|
-
oldContent: originalContent,
|
|
537396
|
-
newContent: item.content
|
|
537397
|
-
});
|
|
537398
|
-
}
|
|
537399
|
-
}
|
|
537400
|
-
}
|
|
537588
|
+
if (nextMsg.role === "assistant" && !nextMsg.subAgentInternal) {
|
|
537589
|
+
break;
|
|
537401
537590
|
}
|
|
537402
|
-
} catch {
|
|
537403
537591
|
}
|
|
537404
|
-
return
|
|
537592
|
+
return void 0;
|
|
537405
537593
|
}
|
|
537406
|
-
function
|
|
537407
|
-
|
|
537408
|
-
|
|
537409
|
-
|
|
537410
|
-
const
|
|
537411
|
-
|
|
537412
|
-
try {
|
|
537413
|
-
toolArgs = { ...toolArgs, filePath: JSON.parse(rawFilePath) };
|
|
537414
|
-
} catch {
|
|
537415
|
-
}
|
|
537416
|
-
}
|
|
537417
|
-
const isBatch = toolArgs["isBatch"] || Array.isArray(toolArgs["filePath"]);
|
|
537418
|
-
if (!isBatch) {
|
|
537419
|
-
const entries2 = collectDiffPreviewEntries(toolName, JSON.stringify(toolArgs));
|
|
537420
|
-
if (entries2.length === 1) {
|
|
537421
|
-
const entry = entries2[0];
|
|
537422
|
-
if (toolName === "filesystem-create") {
|
|
537423
|
-
return {
|
|
537424
|
-
...toolArgs,
|
|
537425
|
-
content: entry.newContent,
|
|
537426
|
-
path: entry.filePath
|
|
537427
|
-
};
|
|
537428
|
-
}
|
|
537429
|
-
return {
|
|
537430
|
-
...toolArgs,
|
|
537431
|
-
oldContent: entry.oldContent,
|
|
537432
|
-
newContent: entry.newContent,
|
|
537433
|
-
filename: entry.filePath
|
|
537434
|
-
};
|
|
537435
|
-
}
|
|
537436
|
-
return toolArgs;
|
|
537437
|
-
}
|
|
537438
|
-
const entries = collectDiffPreviewEntries(toolName, JSON.stringify(toolArgs));
|
|
537439
|
-
if (entries.length === 0) {
|
|
537440
|
-
return toolArgs;
|
|
537441
|
-
}
|
|
537442
|
-
if (toolName === "filesystem-create") {
|
|
537443
|
-
const batchResults2 = entries.map((entry) => ({
|
|
537444
|
-
success: true,
|
|
537445
|
-
path: entry.filePath,
|
|
537446
|
-
content: entry.newContent
|
|
537447
|
-
}));
|
|
537448
|
-
return {
|
|
537449
|
-
...toolArgs,
|
|
537450
|
-
isBatch: true,
|
|
537451
|
-
batchResults: batchResults2
|
|
537452
|
-
};
|
|
537453
|
-
}
|
|
537454
|
-
const batchResults = entries.map((entry) => ({
|
|
537455
|
-
success: true,
|
|
537456
|
-
path: entry.filePath,
|
|
537457
|
-
oldContent: entry.oldContent,
|
|
537458
|
-
newContent: entry.newContent
|
|
537459
|
-
}));
|
|
537460
|
-
return {
|
|
537461
|
-
...toolArgs,
|
|
537462
|
-
isBatch: true,
|
|
537463
|
-
batchResults
|
|
537464
|
-
};
|
|
537594
|
+
function findToolNameForToolCall(sessionMessages, assistantIndex, toolCallId) {
|
|
537595
|
+
const msg = sessionMessages[assistantIndex];
|
|
537596
|
+
if (!msg || !msg.tool_calls)
|
|
537597
|
+
return void 0;
|
|
537598
|
+
const tc = msg.tool_calls.find((t) => t.id === toolCallId);
|
|
537599
|
+
return tc == null ? void 0 : tc.function.name;
|
|
537465
537600
|
}
|
|
537466
|
-
var init_diffPreview = __esm({
|
|
537467
|
-
"dist/utils/ui/diffPreview.js"() {
|
|
537468
|
-
"use strict";
|
|
537469
|
-
}
|
|
537470
|
-
});
|
|
537471
|
-
|
|
537472
|
-
// dist/utils/session/sessionConverter.js
|
|
537473
537601
|
function cleanThinkingContent3(content) {
|
|
537474
537602
|
return content.replace(/\s*<\/?think(?:ing)?>\s*/gi, "").trim();
|
|
537475
537603
|
}
|
|
@@ -537538,13 +537666,15 @@ function convertSessionMessagesToUI(sessionMessages) {
|
|
|
537538
537666
|
const params = toolDisplay.args.map((arg) => `${arg.key}: ${arg.value}`).join(", ");
|
|
537539
537667
|
paramDisplay = ` (${params})`;
|
|
537540
537668
|
}
|
|
537669
|
+
const subAgentSavedDiffData = findToolResultDiffData(sessionMessages, i, toolCall.id);
|
|
537670
|
+
const subAgentEnrichedArgs = subAgentSavedDiffData ? { ...toolArgs, ...subAgentSavedDiffData } : enrichPendingEditArgs(toolCall.function.name, toolArgs);
|
|
537541
537671
|
uiMessages.push({
|
|
537542
537672
|
role: "subagent",
|
|
537543
537673
|
content: `\x1B[38;2;184;122;206m\u2687\u26A1 ${toolDisplay.toolName}${paramDisplay}\x1B[0m`,
|
|
537544
537674
|
streaming: false,
|
|
537545
537675
|
toolCall: {
|
|
537546
537676
|
name: toolCall.function.name,
|
|
537547
|
-
arguments:
|
|
537677
|
+
arguments: subAgentEnrichedArgs
|
|
537548
537678
|
},
|
|
537549
537679
|
toolCallId: toolCall.id,
|
|
537550
537680
|
toolPending: false,
|
|
@@ -537712,7 +537842,8 @@ function convertSessionMessagesToUI(sessionMessages) {
|
|
|
537712
537842
|
}
|
|
537713
537843
|
const needTwoSteps = isToolNeedTwoStepDisplay(toolCall.function.name);
|
|
537714
537844
|
if (needTwoSteps) {
|
|
537715
|
-
const
|
|
537845
|
+
const savedDiffData = findToolResultDiffData(sessionMessages, i, toolCall.id);
|
|
537846
|
+
const enrichedArgs = savedDiffData ? { ...toolArgs, ...savedDiffData } : enrichPendingEditArgs(toolCall.function.name, toolArgs);
|
|
537716
537847
|
uiMessages.push({
|
|
537717
537848
|
role: "assistant",
|
|
537718
537849
|
content: `\u26A1 ${toolDisplay.toolName}`,
|
|
@@ -559002,6 +559133,7 @@ var init_types8 = __esm({
|
|
|
559002
559133
|
"thinkingEffort",
|
|
559003
559134
|
"geminiThinkingLevel",
|
|
559004
559135
|
"responsesReasoningEffort",
|
|
559136
|
+
"responsesReasoningMode",
|
|
559005
559137
|
"responsesVerbosity",
|
|
559006
559138
|
"anthropicSpeed",
|
|
559007
559139
|
"chatReasoningEffort"
|
|
@@ -559210,6 +559342,7 @@ function useConfigState(options3) {
|
|
|
559210
559342
|
const [geminiThinkingLevel, setGeminiThinkingLevel] = (0, import_react69.useState)("high");
|
|
559211
559343
|
const [responsesReasoningEnabled, setResponsesReasoningEnabled] = (0, import_react69.useState)(false);
|
|
559212
559344
|
const [responsesReasoningEffort, setResponsesReasoningEffort] = (0, import_react69.useState)("high");
|
|
559345
|
+
const [responsesReasoningMode, setResponsesReasoningMode] = (0, import_react69.useState)(void 0);
|
|
559213
559346
|
const [responsesVerbosity, setResponsesVerbosity] = (0, import_react69.useState)("medium");
|
|
559214
559347
|
const [responsesFastMode, setResponsesFastMode] = (0, import_react69.useState)(false);
|
|
559215
559348
|
const [anthropicSpeed, setAnthropicSpeed] = (0, import_react69.useState)(void 0);
|
|
@@ -559308,6 +559441,7 @@ function useConfigState(options3) {
|
|
|
559308
559441
|
] : requestMethod === "gemini" ? ["geminiThinkingEnabled", "geminiThinkingLevel"] : requestMethod === "responses" ? [
|
|
559309
559442
|
"responsesReasoningEnabled",
|
|
559310
559443
|
"responsesReasoningEffort",
|
|
559444
|
+
"responsesReasoningMode",
|
|
559311
559445
|
"responsesVerbosity",
|
|
559312
559446
|
"responsesFastMode"
|
|
559313
559447
|
] : requestMethod === "chat" ? [
|
|
@@ -559367,7 +559501,7 @@ function useConfigState(options3) {
|
|
|
559367
559501
|
if (requestMethod !== "gemini" && (currentField === "geminiThinkingEnabled" || currentField === "geminiThinkingLevel")) {
|
|
559368
559502
|
setCurrentField("reasoningGroup");
|
|
559369
559503
|
}
|
|
559370
|
-
if (requestMethod !== "responses" && (currentField === "responsesReasoningEnabled" || currentField === "responsesReasoningEffort" || currentField === "responsesVerbosity" || currentField === "responsesFastMode")) {
|
|
559504
|
+
if (requestMethod !== "responses" && (currentField === "responsesReasoningEnabled" || currentField === "responsesReasoningEffort" || currentField === "responsesReasoningMode" || currentField === "responsesVerbosity" || currentField === "responsesFastMode")) {
|
|
559371
559505
|
setCurrentField("reasoningGroup");
|
|
559372
559506
|
}
|
|
559373
559507
|
if (requestMethod !== "chat" && (currentField === "chatThinkingEnabled" || currentField === "chatReasoningEffort")) {
|
|
@@ -559397,7 +559531,7 @@ function useConfigState(options3) {
|
|
|
559397
559531
|
supportsXHigh
|
|
559398
559532
|
]);
|
|
559399
559533
|
const loadProfilesAndConfig = () => {
|
|
559400
|
-
var _a20, _b14, _c6, _d4, _e2, _f, _g, _h, _i, _j, _k;
|
|
559534
|
+
var _a20, _b14, _c6, _d4, _e2, _f, _g, _h, _i, _j, _k, _l, _m;
|
|
559401
559535
|
const loadedProfiles = getAllProfiles();
|
|
559402
559536
|
setProfiles(loadedProfiles);
|
|
559403
559537
|
const targetConfig = targetProfileName ? loadProfile(targetProfileName) : void 0;
|
|
@@ -559422,11 +559556,12 @@ function useConfigState(options3) {
|
|
|
559422
559556
|
setGeminiThinkingLevel(((_g = config3.geminiThinking) == null ? void 0 : _g.thinkingLevel) || "high");
|
|
559423
559557
|
setResponsesReasoningEnabled(((_h = config3.responsesReasoning) == null ? void 0 : _h.enabled) || false);
|
|
559424
559558
|
setResponsesReasoningEffort(((_i = config3.responsesReasoning) == null ? void 0 : _i.effort) || "high");
|
|
559559
|
+
setResponsesReasoningMode(((_j = config3.responsesReasoning) == null ? void 0 : _j.mode) === "standard" || ((_k = config3.responsesReasoning) == null ? void 0 : _k.mode) === "pro" ? config3.responsesReasoning.mode : void 0);
|
|
559425
559560
|
setResponsesVerbosity(config3.responsesVerbosity || "medium");
|
|
559426
559561
|
setResponsesFastMode(config3.responsesFastMode || false);
|
|
559427
559562
|
setAnthropicSpeed(config3.anthropicSpeed);
|
|
559428
|
-
setChatThinkingEnabled(((
|
|
559429
|
-
setChatReasoningEffort(((
|
|
559563
|
+
setChatThinkingEnabled(((_l = config3.chatThinking) == null ? void 0 : _l.enabled) || false);
|
|
559564
|
+
setChatReasoningEffort(((_m = config3.chatThinking) == null ? void 0 : _m.reasoning_effort) || "high");
|
|
559430
559565
|
setAdvancedModel(config3.advancedModel || "");
|
|
559431
559566
|
setBasicModel(config3.basicModel || "");
|
|
559432
559567
|
setSupportsVision(config3.supportsVision !== false);
|
|
@@ -559823,7 +559958,8 @@ function useConfigState(options3) {
|
|
|
559823
559958
|
}
|
|
559824
559959
|
config3.responsesReasoning = {
|
|
559825
559960
|
enabled: responsesReasoningEnabled,
|
|
559826
|
-
effort: responsesReasoningEffort
|
|
559961
|
+
effort: responsesReasoningEffort,
|
|
559962
|
+
mode: responsesReasoningMode
|
|
559827
559963
|
};
|
|
559828
559964
|
config3.responsesFastMode = responsesFastMode;
|
|
559829
559965
|
config3.responsesVerbosity = responsesVerbosity;
|
|
@@ -559856,7 +559992,8 @@ function useConfigState(options3) {
|
|
|
559856
559992
|
geminiThinking: geminiThinkingEnabled ? { enabled: true, thinkingLevel: geminiThinkingLevel } : void 0,
|
|
559857
559993
|
responsesReasoning: {
|
|
559858
559994
|
enabled: responsesReasoningEnabled,
|
|
559859
|
-
effort: responsesReasoningEffort
|
|
559995
|
+
effort: responsesReasoningEffort,
|
|
559996
|
+
mode: responsesReasoningMode
|
|
559860
559997
|
},
|
|
559861
559998
|
responsesVerbosity,
|
|
559862
559999
|
responsesFastMode,
|
|
@@ -559951,6 +560088,8 @@ function useConfigState(options3) {
|
|
|
559951
560088
|
setResponsesReasoningEnabled,
|
|
559952
560089
|
responsesReasoningEffort,
|
|
559953
560090
|
setResponsesReasoningEffort,
|
|
560091
|
+
responsesReasoningMode,
|
|
560092
|
+
setResponsesReasoningMode,
|
|
559954
560093
|
responsesVerbosity,
|
|
559955
560094
|
setResponsesVerbosity,
|
|
559956
560095
|
responsesFastMode,
|
|
@@ -560131,6 +560270,10 @@ function useConfigInput(state, callbacks) {
|
|
|
560131
560270
|
setRetryDelayMs,
|
|
560132
560271
|
thinkingBudgetTokens,
|
|
560133
560272
|
setThinkingBudgetTokens,
|
|
560273
|
+
setThinkingEffort,
|
|
560274
|
+
setGeminiThinkingLevel,
|
|
560275
|
+
setResponsesReasoningEffort,
|
|
560276
|
+
setChatReasoningEffort,
|
|
560134
560277
|
autoCompressThreshold,
|
|
560135
560278
|
setAutoCompressThreshold,
|
|
560136
560279
|
setAdvancedModel,
|
|
@@ -560241,6 +560384,14 @@ function useConfigInput(state, callbacks) {
|
|
|
560241
560384
|
setBasicModel(cleaned);
|
|
560242
560385
|
} else if (currentField === "visionModel") {
|
|
560243
560386
|
setVisionModel(cleaned);
|
|
560387
|
+
} else if (currentField === "thinkingEffort") {
|
|
560388
|
+
setThinkingEffort(cleaned);
|
|
560389
|
+
} else if (currentField === "geminiThinkingLevel") {
|
|
560390
|
+
setGeminiThinkingLevel(cleaned);
|
|
560391
|
+
} else if (currentField === "responsesReasoningEffort") {
|
|
560392
|
+
setResponsesReasoningEffort(cleaned);
|
|
560393
|
+
} else if (currentField === "chatReasoningEffort") {
|
|
560394
|
+
setChatReasoningEffort(cleaned);
|
|
560244
560395
|
}
|
|
560245
560396
|
}
|
|
560246
560397
|
setManualInputMode(false);
|
|
@@ -560451,7 +560602,7 @@ function useConfigInput(state, callbacks) {
|
|
|
560451
560602
|
setVisionConfigMode(true);
|
|
560452
560603
|
setCurrentField("visionBaseUrl");
|
|
560453
560604
|
setIsEditing(false);
|
|
560454
|
-
} else if (currentField === "anthropicCacheTTL" || currentField === "anthropicSpeed" || currentField === "thinkingMode" || currentField === "thinkingEffort" || currentField === "geminiThinkingLevel" || currentField === "responsesReasoningEffort" || currentField === "responsesVerbosity" || currentField === "chatReasoningEffort") {
|
|
560605
|
+
} else if (currentField === "anthropicCacheTTL" || currentField === "anthropicSpeed" || currentField === "thinkingMode" || currentField === "thinkingEffort" || currentField === "geminiThinkingLevel" || currentField === "responsesReasoningEffort" || currentField === "responsesReasoningMode" || currentField === "responsesVerbosity" || currentField === "chatReasoningEffort") {
|
|
560455
560606
|
setIsEditing(true);
|
|
560456
560607
|
} else if (NUMERIC_FIELDS.includes(currentField)) {
|
|
560457
560608
|
setIsEditing(true);
|
|
@@ -560775,6 +560926,212 @@ var init_ScrollableSelectInput = __esm({
|
|
|
560775
560926
|
}
|
|
560776
560927
|
});
|
|
560777
560928
|
|
|
560929
|
+
// dist/ui/pages/configScreen/ConfigSubViews.js
|
|
560930
|
+
function ProfileNameInputView({ state, inlineMode, title, subtitle, label, value, onChange, placeholder, hint }) {
|
|
560931
|
+
const { theme: theme14, errors } = state;
|
|
560932
|
+
return import_react72.default.createElement(
|
|
560933
|
+
Box_default,
|
|
560934
|
+
{ flexDirection: "column", padding: 1 },
|
|
560935
|
+
!inlineMode && import_react72.default.createElement(
|
|
560936
|
+
Box_default,
|
|
560937
|
+
{ marginBottom: 1, borderStyle: "double", borderColor: theme14.colors.menuInfo, paddingX: 2 },
|
|
560938
|
+
import_react72.default.createElement(
|
|
560939
|
+
Box_default,
|
|
560940
|
+
{ flexDirection: "column" },
|
|
560941
|
+
import_react72.default.createElement(dist_default5, { name: "rainbow" }, title),
|
|
560942
|
+
import_react72.default.createElement(Text, { color: theme14.colors.menuSecondary, dimColor: true }, subtitle)
|
|
560943
|
+
)
|
|
560944
|
+
),
|
|
560945
|
+
import_react72.default.createElement(
|
|
560946
|
+
Box_default,
|
|
560947
|
+
{ flexDirection: "column" },
|
|
560948
|
+
import_react72.default.createElement(Text, { color: theme14.colors.menuInfo }, label),
|
|
560949
|
+
import_react72.default.createElement(
|
|
560950
|
+
Box_default,
|
|
560951
|
+
{ marginLeft: 2 },
|
|
560952
|
+
import_react72.default.createElement(build_default2, { value, onChange: (nextValue) => onChange(stripFocusArtifacts(nextValue)), placeholder })
|
|
560953
|
+
)
|
|
560954
|
+
),
|
|
560955
|
+
errors.length > 0 && import_react72.default.createElement(
|
|
560956
|
+
Box_default,
|
|
560957
|
+
{ marginTop: 1 },
|
|
560958
|
+
import_react72.default.createElement(Text, { color: theme14.colors.error }, errors[0])
|
|
560959
|
+
),
|
|
560960
|
+
import_react72.default.createElement(
|
|
560961
|
+
Box_default,
|
|
560962
|
+
{ marginTop: 1 },
|
|
560963
|
+
import_react72.default.createElement(Alert, { variant: "info" }, hint)
|
|
560964
|
+
)
|
|
560965
|
+
);
|
|
560966
|
+
}
|
|
560967
|
+
function ProfileCreateView({ state, inlineMode }) {
|
|
560968
|
+
const { t, newProfileName, setNewProfileName } = state;
|
|
560969
|
+
return import_react72.default.createElement(ProfileNameInputView, { state, inlineMode, title: t.configScreen.createNewProfile, subtitle: t.configScreen.enterProfileName, label: t.configScreen.profileNameLabel, value: newProfileName, onChange: setNewProfileName, placeholder: t.configScreen.profileNamePlaceholder, hint: t.configScreen.createHint });
|
|
560970
|
+
}
|
|
560971
|
+
function ProfileRenameView({ state, inlineMode }) {
|
|
560972
|
+
const { t, renameProfileName, setRenameProfileName } = state;
|
|
560973
|
+
return import_react72.default.createElement(ProfileNameInputView, { state, inlineMode, title: t.configScreen.renameProfile, subtitle: t.configScreen.enterRenameProfileName, label: t.configScreen.profileNameLabel, value: renameProfileName, onChange: setRenameProfileName, placeholder: t.configScreen.renameProfilePlaceholder, hint: t.configScreen.renameHint });
|
|
560974
|
+
}
|
|
560975
|
+
function ProfileDeleteView({ state, inlineMode }) {
|
|
560976
|
+
const { t, theme: theme14, markedProfiles, errors } = state;
|
|
560977
|
+
const profilesToDelete = Array.from(markedProfiles);
|
|
560978
|
+
return import_react72.default.createElement(
|
|
560979
|
+
Box_default,
|
|
560980
|
+
{ flexDirection: "column", padding: 1 },
|
|
560981
|
+
!inlineMode && import_react72.default.createElement(
|
|
560982
|
+
Box_default,
|
|
560983
|
+
{ marginBottom: 1, borderStyle: "double", borderColor: theme14.colors.menuInfo, paddingX: 2 },
|
|
560984
|
+
import_react72.default.createElement(
|
|
560985
|
+
Box_default,
|
|
560986
|
+
{ flexDirection: "column" },
|
|
560987
|
+
import_react72.default.createElement(dist_default5, { name: "rainbow" }, t.configScreen.deleteProfile),
|
|
560988
|
+
import_react72.default.createElement(Text, { color: theme14.colors.menuSecondary, dimColor: true }, t.configScreen.confirmDelete)
|
|
560989
|
+
)
|
|
560990
|
+
),
|
|
560991
|
+
import_react72.default.createElement(
|
|
560992
|
+
Box_default,
|
|
560993
|
+
{ flexDirection: "column" },
|
|
560994
|
+
import_react72.default.createElement(Text, { color: theme14.colors.warning }, t.configScreen.confirmDeleteProfiles.replace("{count}", String(profilesToDelete.length))),
|
|
560995
|
+
import_react72.default.createElement(Box_default, { marginTop: 1, flexDirection: "column" }, profilesToDelete.map((profileName) => import_react72.default.createElement(
|
|
560996
|
+
Text,
|
|
560997
|
+
{ key: profileName, color: theme14.colors.menuSecondary },
|
|
560998
|
+
"\u2022 ",
|
|
560999
|
+
profileName
|
|
561000
|
+
))),
|
|
561001
|
+
import_react72.default.createElement(Text, { color: theme14.colors.menuSecondary, dimColor: true }, t.configScreen.deleteWarning)
|
|
561002
|
+
),
|
|
561003
|
+
errors.length > 0 && import_react72.default.createElement(
|
|
561004
|
+
Box_default,
|
|
561005
|
+
{ marginTop: 1 },
|
|
561006
|
+
import_react72.default.createElement(Text, { color: theme14.colors.error }, errors[0])
|
|
561007
|
+
),
|
|
561008
|
+
import_react72.default.createElement(
|
|
561009
|
+
Box_default,
|
|
561010
|
+
{ marginTop: 1 },
|
|
561011
|
+
import_react72.default.createElement(Alert, { variant: "warning" }, t.configScreen.confirmHint)
|
|
561012
|
+
)
|
|
561013
|
+
);
|
|
561014
|
+
}
|
|
561015
|
+
function LoadingView({ state, inlineMode }) {
|
|
561016
|
+
const { t, theme: theme14 } = state;
|
|
561017
|
+
return import_react72.default.createElement(
|
|
561018
|
+
Box_default,
|
|
561019
|
+
{ flexDirection: "column", padding: 1 },
|
|
561020
|
+
!inlineMode && import_react72.default.createElement(
|
|
561021
|
+
Box_default,
|
|
561022
|
+
{ marginBottom: 1, borderStyle: "double", borderColor: theme14.colors.menuInfo, paddingX: 2 },
|
|
561023
|
+
import_react72.default.createElement(
|
|
561024
|
+
Box_default,
|
|
561025
|
+
{ flexDirection: "column" },
|
|
561026
|
+
import_react72.default.createElement(dist_default5, { name: "rainbow" }, t.configScreen.title),
|
|
561027
|
+
import_react72.default.createElement(Text, { color: theme14.colors.menuSecondary, dimColor: true }, t.configScreen.loadingMessage)
|
|
561028
|
+
)
|
|
561029
|
+
),
|
|
561030
|
+
import_react72.default.createElement(
|
|
561031
|
+
Box_default,
|
|
561032
|
+
{ flexDirection: "column" },
|
|
561033
|
+
import_react72.default.createElement(
|
|
561034
|
+
Box_default,
|
|
561035
|
+
null,
|
|
561036
|
+
import_react72.default.createElement(Spinner2, { type: "dots" }),
|
|
561037
|
+
import_react72.default.createElement(
|
|
561038
|
+
Text,
|
|
561039
|
+
{ color: theme14.colors.menuInfo },
|
|
561040
|
+
" ",
|
|
561041
|
+
t.configScreen.fetchingModels
|
|
561042
|
+
)
|
|
561043
|
+
),
|
|
561044
|
+
import_react72.default.createElement(
|
|
561045
|
+
Box_default,
|
|
561046
|
+
{ marginLeft: 2 },
|
|
561047
|
+
import_react72.default.createElement(Text, { color: theme14.colors.menuSecondary, dimColor: true }, t.configScreen.fetchingHint)
|
|
561048
|
+
)
|
|
561049
|
+
),
|
|
561050
|
+
import_react72.default.createElement(
|
|
561051
|
+
Box_default,
|
|
561052
|
+
{ flexDirection: "column", marginTop: 1 },
|
|
561053
|
+
import_react72.default.createElement(Alert, { variant: "info" }, t.configScreen.loadingCancelHint)
|
|
561054
|
+
)
|
|
561055
|
+
);
|
|
561056
|
+
}
|
|
561057
|
+
function ManualInputView({ state, inlineMode }) {
|
|
561058
|
+
const { t, theme: theme14, currentField, manualInputValue, loadError } = state;
|
|
561059
|
+
return import_react72.default.createElement(
|
|
561060
|
+
Box_default,
|
|
561061
|
+
{ flexDirection: "column", padding: 1 },
|
|
561062
|
+
!inlineMode && import_react72.default.createElement(
|
|
561063
|
+
Box_default,
|
|
561064
|
+
{ marginBottom: 1, borderStyle: "double", borderColor: theme14.colors.menuInfo, paddingX: 2 },
|
|
561065
|
+
import_react72.default.createElement(
|
|
561066
|
+
Box_default,
|
|
561067
|
+
{ flexDirection: "column" },
|
|
561068
|
+
import_react72.default.createElement(dist_default5, { name: "rainbow" }, t.configScreen.manualInputTitle),
|
|
561069
|
+
import_react72.default.createElement(Text, { color: theme14.colors.menuSecondary, dimColor: true }, t.configScreen.manualInputSubtitle)
|
|
561070
|
+
)
|
|
561071
|
+
),
|
|
561072
|
+
loadError && import_react72.default.createElement(
|
|
561073
|
+
Box_default,
|
|
561074
|
+
{ flexDirection: "column", marginBottom: 1 },
|
|
561075
|
+
import_react72.default.createElement(Text, { color: theme14.colors.warning }, t.configScreen.loadingError),
|
|
561076
|
+
import_react72.default.createElement(Text, { color: theme14.colors.menuSecondary, dimColor: true }, loadError)
|
|
561077
|
+
),
|
|
561078
|
+
import_react72.default.createElement(
|
|
561079
|
+
Box_default,
|
|
561080
|
+
{ flexDirection: "column" },
|
|
561081
|
+
import_react72.default.createElement(
|
|
561082
|
+
Text,
|
|
561083
|
+
{ color: theme14.colors.menuInfo },
|
|
561084
|
+
currentField === "advancedModel" && t.configScreen.advancedModel,
|
|
561085
|
+
currentField === "basicModel" && t.configScreen.basicModel,
|
|
561086
|
+
currentField === "visionModel" && t.configScreen.visionModel,
|
|
561087
|
+
currentField === "thinkingEffort" && t.configScreen.thinkingEffort,
|
|
561088
|
+
currentField === "geminiThinkingLevel" && t.configScreen.geminiThinkingLevel,
|
|
561089
|
+
currentField === "responsesReasoningEffort" && t.configScreen.responsesReasoningEffort,
|
|
561090
|
+
currentField === "chatReasoningEffort" && t.configScreen.chatReasoningEffort
|
|
561091
|
+
),
|
|
561092
|
+
import_react72.default.createElement(
|
|
561093
|
+
Box_default,
|
|
561094
|
+
{ marginLeft: 2 },
|
|
561095
|
+
import_react72.default.createElement(
|
|
561096
|
+
Text,
|
|
561097
|
+
{ color: theme14.colors.menuSelected },
|
|
561098
|
+
`> ${manualInputValue}`,
|
|
561099
|
+
import_react72.default.createElement(Text, { color: theme14.colors.menuNormal }, "_")
|
|
561100
|
+
)
|
|
561101
|
+
)
|
|
561102
|
+
),
|
|
561103
|
+
import_react72.default.createElement(
|
|
561104
|
+
Box_default,
|
|
561105
|
+
{ flexDirection: "column", marginTop: 1 },
|
|
561106
|
+
import_react72.default.createElement(Alert, { variant: "info" }, t.configScreen.manualInputHint)
|
|
561107
|
+
)
|
|
561108
|
+
);
|
|
561109
|
+
}
|
|
561110
|
+
function ResponsesReasoningModeSelect({ value, noneLabel, onChange, isFocused = true }) {
|
|
561111
|
+
const options3 = [
|
|
561112
|
+
{ label: noneLabel, value: "none" },
|
|
561113
|
+
{ label: "standard", value: "standard" },
|
|
561114
|
+
{ label: "pro", value: "pro" }
|
|
561115
|
+
];
|
|
561116
|
+
const selectedValue = value ?? "none";
|
|
561117
|
+
return import_react72.default.createElement(ScrollableSelectInput, { items: options3, initialIndex: Math.max(0, options3.findIndex((option) => option.value === selectedValue)), isFocused, onSelect: (item) => {
|
|
561118
|
+
onChange(item.value === "none" ? void 0 : item.value);
|
|
561119
|
+
} });
|
|
561120
|
+
}
|
|
561121
|
+
var import_react72;
|
|
561122
|
+
var init_ConfigSubViews = __esm({
|
|
561123
|
+
async "dist/ui/pages/configScreen/ConfigSubViews.js"() {
|
|
561124
|
+
"use strict";
|
|
561125
|
+
import_react72 = __toESM(require_react(), 1);
|
|
561126
|
+
await init_src();
|
|
561127
|
+
await init_dist8();
|
|
561128
|
+
await init_build3();
|
|
561129
|
+
await init_build4();
|
|
561130
|
+
await init_ScrollableSelectInput();
|
|
561131
|
+
init_types8();
|
|
561132
|
+
}
|
|
561133
|
+
});
|
|
561134
|
+
|
|
560778
561135
|
// dist/ui/pages/configScreen/ConfigFieldRenderer.js
|
|
560779
561136
|
function ConfigFieldRenderer({ field, state }) {
|
|
560780
561137
|
var _a20, _b14, _c6, _d4, _e2;
|
|
@@ -560824,6 +561181,8 @@ function ConfigFieldRenderer({ field, state }) {
|
|
|
560824
561181
|
responsesReasoningEnabled,
|
|
560825
561182
|
responsesReasoningEffort,
|
|
560826
561183
|
setResponsesReasoningEffort,
|
|
561184
|
+
responsesReasoningMode,
|
|
561185
|
+
setResponsesReasoningMode,
|
|
560827
561186
|
responsesVerbosity,
|
|
560828
561187
|
setResponsesVerbosity,
|
|
560829
561188
|
responsesFastMode,
|
|
@@ -560864,93 +561223,93 @@ function ConfigFieldRenderer({ field, state }) {
|
|
|
560864
561223
|
case "tokenTimeoutGroup":
|
|
560865
561224
|
return renderGroupHeader(field);
|
|
560866
561225
|
case "profile":
|
|
560867
|
-
return
|
|
561226
|
+
return import_react73.default.createElement(
|
|
560868
561227
|
Box_default,
|
|
560869
561228
|
{ key: field, flexDirection: "column" },
|
|
560870
|
-
|
|
561229
|
+
import_react73.default.createElement(
|
|
560871
561230
|
Text,
|
|
560872
561231
|
{ color: activeColor },
|
|
560873
561232
|
activeIndicator,
|
|
560874
561233
|
t.configScreen.profile
|
|
560875
561234
|
),
|
|
560876
|
-
!isCurrentlyEditing &&
|
|
561235
|
+
!isCurrentlyEditing && import_react73.default.createElement(
|
|
560877
561236
|
Box_default,
|
|
560878
561237
|
{ marginLeft: 3 },
|
|
560879
|
-
|
|
561238
|
+
import_react73.default.createElement(Text, { color: theme14.colors.menuSecondary }, ((_a20 = profiles.find((p) => p.name === activeProfile)) == null ? void 0 : _a20.displayName) || activeProfile)
|
|
560880
561239
|
)
|
|
560881
561240
|
);
|
|
560882
561241
|
case "baseUrl":
|
|
560883
|
-
return
|
|
561242
|
+
return import_react73.default.createElement(
|
|
560884
561243
|
Box_default,
|
|
560885
561244
|
{ key: field, flexDirection: "column" },
|
|
560886
|
-
|
|
561245
|
+
import_react73.default.createElement(
|
|
560887
561246
|
Text,
|
|
560888
561247
|
{ color: activeColor },
|
|
560889
561248
|
activeIndicator,
|
|
560890
561249
|
t.configScreen.baseUrl
|
|
560891
561250
|
),
|
|
560892
|
-
isCurrentlyEditing &&
|
|
561251
|
+
isCurrentlyEditing && import_react73.default.createElement(
|
|
560893
561252
|
Box_default,
|
|
560894
561253
|
{ marginLeft: 3 },
|
|
560895
|
-
|
|
561254
|
+
import_react73.default.createElement(build_default2, { value: baseUrl, onChange: (value) => setBaseUrl(stripFocusArtifacts(value)), placeholder: "https://api.openai.com/v1" })
|
|
560896
561255
|
),
|
|
560897
|
-
!isCurrentlyEditing &&
|
|
561256
|
+
!isCurrentlyEditing && import_react73.default.createElement(
|
|
560898
561257
|
Box_default,
|
|
560899
561258
|
{ marginLeft: 3 },
|
|
560900
|
-
|
|
561259
|
+
import_react73.default.createElement(Text, { color: theme14.colors.menuSecondary }, baseUrl || t.configScreen.notSet)
|
|
560901
561260
|
)
|
|
560902
561261
|
);
|
|
560903
561262
|
case "baseUrlMode":
|
|
560904
|
-
return
|
|
561263
|
+
return import_react73.default.createElement(
|
|
560905
561264
|
Box_default,
|
|
560906
561265
|
{ key: field, flexDirection: "column" },
|
|
560907
|
-
|
|
561266
|
+
import_react73.default.createElement(
|
|
560908
561267
|
Text,
|
|
560909
561268
|
{ color: activeColor },
|
|
560910
561269
|
activeIndicator,
|
|
560911
561270
|
t.configScreen.baseUrlMode
|
|
560912
561271
|
),
|
|
560913
|
-
!isCurrentlyEditing &&
|
|
561272
|
+
!isCurrentlyEditing && import_react73.default.createElement(
|
|
560914
561273
|
Box_default,
|
|
560915
561274
|
{ marginLeft: 3 },
|
|
560916
|
-
|
|
561275
|
+
import_react73.default.createElement(Text, { color: theme14.colors.menuSecondary }, baseUrlMode === "base" ? t.configScreen.baseUrlModeBase : baseUrlMode === "endpoint" ? t.configScreen.baseUrlModeEndpoint : t.configScreen.baseUrlModeAuto)
|
|
560917
561276
|
)
|
|
560918
561277
|
);
|
|
560919
561278
|
case "apiKey":
|
|
560920
|
-
return
|
|
561279
|
+
return import_react73.default.createElement(
|
|
560921
561280
|
Box_default,
|
|
560922
561281
|
{ key: field, flexDirection: "column" },
|
|
560923
|
-
|
|
561282
|
+
import_react73.default.createElement(
|
|
560924
561283
|
Text,
|
|
560925
561284
|
{ color: activeColor },
|
|
560926
561285
|
activeIndicator,
|
|
560927
561286
|
t.configScreen.apiKey
|
|
560928
561287
|
),
|
|
560929
|
-
isCurrentlyEditing &&
|
|
561288
|
+
isCurrentlyEditing && import_react73.default.createElement(
|
|
560930
561289
|
Box_default,
|
|
560931
561290
|
{ marginLeft: 3 },
|
|
560932
|
-
|
|
561291
|
+
import_react73.default.createElement(build_default2, { value: apiKey, onChange: (value) => setApiKey(stripFocusArtifacts(value)), placeholder: "sk-...", mask: "*" })
|
|
560933
561292
|
),
|
|
560934
|
-
!isCurrentlyEditing &&
|
|
561293
|
+
!isCurrentlyEditing && import_react73.default.createElement(
|
|
560935
561294
|
Box_default,
|
|
560936
561295
|
{ marginLeft: 3 },
|
|
560937
|
-
|
|
561296
|
+
import_react73.default.createElement(Text, { color: theme14.colors.menuSecondary }, apiKey ? "*".repeat(Math.min(apiKey.length, 20)) : t.configScreen.notSet)
|
|
560938
561297
|
)
|
|
560939
561298
|
);
|
|
560940
561299
|
case "requestMethod":
|
|
560941
|
-
return
|
|
561300
|
+
return import_react73.default.createElement(
|
|
560942
561301
|
Box_default,
|
|
560943
561302
|
{ key: field, flexDirection: "column" },
|
|
560944
|
-
|
|
561303
|
+
import_react73.default.createElement(
|
|
560945
561304
|
Text,
|
|
560946
561305
|
{ color: activeColor },
|
|
560947
561306
|
activeIndicator,
|
|
560948
561307
|
t.configScreen.requestMethod
|
|
560949
561308
|
),
|
|
560950
|
-
!isCurrentlyEditing &&
|
|
561309
|
+
!isCurrentlyEditing && import_react73.default.createElement(
|
|
560951
561310
|
Box_default,
|
|
560952
561311
|
{ marginLeft: 3 },
|
|
560953
|
-
|
|
561312
|
+
import_react73.default.createElement(Text, { color: theme14.colors.menuSecondary }, ((_b14 = requestMethodOptions.find((opt) => opt.value === requestMethod)) == null ? void 0 : _b14.label) || t.configScreen.notSet)
|
|
560954
561313
|
)
|
|
560955
561314
|
);
|
|
560956
561315
|
case "systemPromptId": {
|
|
@@ -560965,19 +561324,19 @@ function ConfigFieldRenderer({ field, state }) {
|
|
|
560965
561324
|
const activeNames = activeSystemPromptIds.map((id) => getSystemPromptNameById(id)).join(", ");
|
|
560966
561325
|
display = t.configScreen.followGlobal.replace("{name}", activeNames);
|
|
560967
561326
|
}
|
|
560968
|
-
return
|
|
561327
|
+
return import_react73.default.createElement(
|
|
560969
561328
|
Box_default,
|
|
560970
561329
|
{ key: field, flexDirection: "column" },
|
|
560971
|
-
|
|
561330
|
+
import_react73.default.createElement(
|
|
560972
561331
|
Text,
|
|
560973
561332
|
{ color: activeColor },
|
|
560974
561333
|
activeIndicator,
|
|
560975
561334
|
t.configScreen.systemPrompt
|
|
560976
561335
|
),
|
|
560977
|
-
!isCurrentlyEditing &&
|
|
561336
|
+
!isCurrentlyEditing && import_react73.default.createElement(
|
|
560978
561337
|
Box_default,
|
|
560979
561338
|
{ marginLeft: 3 },
|
|
560980
|
-
|
|
561339
|
+
import_react73.default.createElement(Text, { color: theme14.colors.menuSecondary }, display || t.configScreen.notSet)
|
|
560981
561340
|
)
|
|
560982
561341
|
);
|
|
560983
561342
|
}
|
|
@@ -560990,36 +561349,36 @@ function ConfigFieldRenderer({ field, state }) {
|
|
|
560990
561349
|
} else if (activeCustomHeadersSchemeId) {
|
|
560991
561350
|
display = t.configScreen.followGlobal.replace("{name}", getCustomHeadersSchemeNameById(activeCustomHeadersSchemeId));
|
|
560992
561351
|
}
|
|
560993
|
-
return
|
|
561352
|
+
return import_react73.default.createElement(
|
|
560994
561353
|
Box_default,
|
|
560995
561354
|
{ key: field, flexDirection: "column" },
|
|
560996
|
-
|
|
561355
|
+
import_react73.default.createElement(
|
|
560997
561356
|
Text,
|
|
560998
561357
|
{ color: activeColor },
|
|
560999
561358
|
activeIndicator,
|
|
561000
561359
|
t.configScreen.customHeadersField
|
|
561001
561360
|
),
|
|
561002
|
-
!isCurrentlyEditing &&
|
|
561361
|
+
!isCurrentlyEditing && import_react73.default.createElement(
|
|
561003
561362
|
Box_default,
|
|
561004
561363
|
{ marginLeft: 3 },
|
|
561005
|
-
|
|
561364
|
+
import_react73.default.createElement(Text, { color: theme14.colors.menuSecondary }, display || t.configScreen.notSet)
|
|
561006
561365
|
)
|
|
561007
561366
|
);
|
|
561008
561367
|
}
|
|
561009
561368
|
case "anthropicBeta":
|
|
561010
|
-
return
|
|
561369
|
+
return import_react73.default.createElement(
|
|
561011
561370
|
Box_default,
|
|
561012
561371
|
{ key: field, flexDirection: "column" },
|
|
561013
|
-
|
|
561372
|
+
import_react73.default.createElement(
|
|
561014
561373
|
Text,
|
|
561015
561374
|
{ color: activeColor },
|
|
561016
561375
|
activeIndicator,
|
|
561017
561376
|
t.configScreen.anthropicBeta
|
|
561018
561377
|
),
|
|
561019
|
-
|
|
561378
|
+
import_react73.default.createElement(
|
|
561020
561379
|
Box_default,
|
|
561021
561380
|
{ marginLeft: 3 },
|
|
561022
|
-
|
|
561381
|
+
import_react73.default.createElement(
|
|
561023
561382
|
Text,
|
|
561024
561383
|
{ color: theme14.colors.menuSecondary },
|
|
561025
561384
|
anthropicBeta ? t.configScreen.enabled : t.configScreen.disabled,
|
|
@@ -561029,29 +561388,29 @@ function ConfigFieldRenderer({ field, state }) {
|
|
|
561029
561388
|
)
|
|
561030
561389
|
);
|
|
561031
561390
|
case "anthropicCacheTTL":
|
|
561032
|
-
return
|
|
561391
|
+
return import_react73.default.createElement(
|
|
561033
561392
|
Box_default,
|
|
561034
561393
|
{ key: field, flexDirection: "column" },
|
|
561035
|
-
|
|
561394
|
+
import_react73.default.createElement(
|
|
561036
561395
|
Text,
|
|
561037
561396
|
{ color: activeColor },
|
|
561038
561397
|
activeIndicator,
|
|
561039
561398
|
t.configScreen.anthropicCacheTTL
|
|
561040
561399
|
),
|
|
561041
|
-
isEditing && isActive ?
|
|
561400
|
+
isEditing && isActive ? import_react73.default.createElement(
|
|
561042
561401
|
Box_default,
|
|
561043
561402
|
{ marginLeft: 3 },
|
|
561044
|
-
|
|
561403
|
+
import_react73.default.createElement(ScrollableSelectInput, { items: [
|
|
561045
561404
|
{ label: t.configScreen.anthropicCacheTTL5m, value: "5m" },
|
|
561046
561405
|
{ label: t.configScreen.anthropicCacheTTL1h, value: "1h" }
|
|
561047
561406
|
], initialIndex: anthropicCacheTTL === "5m" ? 0 : 1, isFocused: true, onSelect: (item) => {
|
|
561048
561407
|
setAnthropicCacheTTL(item.value);
|
|
561049
561408
|
state.setIsEditing(false);
|
|
561050
561409
|
} })
|
|
561051
|
-
) :
|
|
561410
|
+
) : import_react73.default.createElement(
|
|
561052
561411
|
Box_default,
|
|
561053
561412
|
{ marginLeft: 3 },
|
|
561054
|
-
|
|
561413
|
+
import_react73.default.createElement(
|
|
561055
561414
|
Text,
|
|
561056
561415
|
{ color: theme14.colors.menuSecondary },
|
|
561057
561416
|
anthropicCacheTTL === "5m" ? t.configScreen.anthropicCacheTTL5m : t.configScreen.anthropicCacheTTL1h,
|
|
@@ -561061,19 +561420,19 @@ function ConfigFieldRenderer({ field, state }) {
|
|
|
561061
561420
|
)
|
|
561062
561421
|
);
|
|
561063
561422
|
case "anthropicSpeed":
|
|
561064
|
-
return
|
|
561423
|
+
return import_react73.default.createElement(
|
|
561065
561424
|
Box_default,
|
|
561066
561425
|
{ key: field, flexDirection: "column" },
|
|
561067
|
-
|
|
561426
|
+
import_react73.default.createElement(
|
|
561068
561427
|
Text,
|
|
561069
561428
|
{ color: activeColor },
|
|
561070
561429
|
activeIndicator,
|
|
561071
561430
|
t.configScreen.anthropicSpeed
|
|
561072
561431
|
),
|
|
561073
|
-
isEditing && isActive ?
|
|
561432
|
+
isEditing && isActive ? import_react73.default.createElement(
|
|
561074
561433
|
Box_default,
|
|
561075
561434
|
{ marginLeft: 3 },
|
|
561076
|
-
|
|
561435
|
+
import_react73.default.createElement(ScrollableSelectInput, { items: [
|
|
561077
561436
|
{
|
|
561078
561437
|
label: t.configScreen.anthropicSpeedNotUsed,
|
|
561079
561438
|
value: "__NONE__"
|
|
@@ -561087,26 +561446,26 @@ function ConfigFieldRenderer({ field, state }) {
|
|
|
561087
561446
|
setAnthropicSpeed(item.value === "__NONE__" ? void 0 : item.value);
|
|
561088
561447
|
state.setIsEditing(false);
|
|
561089
561448
|
} })
|
|
561090
|
-
) :
|
|
561449
|
+
) : import_react73.default.createElement(
|
|
561091
561450
|
Box_default,
|
|
561092
561451
|
{ marginLeft: 3 },
|
|
561093
|
-
|
|
561452
|
+
import_react73.default.createElement(Text, { color: theme14.colors.menuSecondary }, anthropicSpeed === "fast" ? t.configScreen.anthropicSpeedFast : anthropicSpeed === "standard" ? t.configScreen.anthropicSpeedStandard : t.configScreen.anthropicSpeedNotUsed)
|
|
561094
561453
|
)
|
|
561095
561454
|
);
|
|
561096
561455
|
case "enableAutoCompress":
|
|
561097
|
-
return
|
|
561456
|
+
return import_react73.default.createElement(
|
|
561098
561457
|
Box_default,
|
|
561099
561458
|
{ key: field, flexDirection: "column" },
|
|
561100
|
-
|
|
561459
|
+
import_react73.default.createElement(
|
|
561101
561460
|
Text,
|
|
561102
561461
|
{ color: activeColor },
|
|
561103
561462
|
activeIndicator,
|
|
561104
561463
|
t.configScreen.enableAutoCompress
|
|
561105
561464
|
),
|
|
561106
|
-
|
|
561465
|
+
import_react73.default.createElement(
|
|
561107
561466
|
Box_default,
|
|
561108
561467
|
{ marginLeft: 3 },
|
|
561109
|
-
|
|
561468
|
+
import_react73.default.createElement(
|
|
561110
561469
|
Text,
|
|
561111
561470
|
{ color: theme14.colors.menuSecondary },
|
|
561112
561471
|
enableAutoCompress ? t.configScreen.enabled : t.configScreen.disabled,
|
|
@@ -561118,19 +561477,19 @@ function ConfigFieldRenderer({ field, state }) {
|
|
|
561118
561477
|
case "autoCompressThreshold":
|
|
561119
561478
|
{
|
|
561120
561479
|
const actualThreshold = Math.floor(maxContextTokens * autoCompressThreshold / 100);
|
|
561121
|
-
return
|
|
561480
|
+
return import_react73.default.createElement(
|
|
561122
561481
|
Box_default,
|
|
561123
561482
|
{ key: field, flexDirection: "column" },
|
|
561124
|
-
|
|
561483
|
+
import_react73.default.createElement(
|
|
561125
561484
|
Text,
|
|
561126
561485
|
{ color: activeColor },
|
|
561127
561486
|
activeIndicator,
|
|
561128
561487
|
t.configScreen.autoCompressThreshold
|
|
561129
561488
|
),
|
|
561130
|
-
isCurrentlyEditing &&
|
|
561489
|
+
isCurrentlyEditing && import_react73.default.createElement(
|
|
561131
561490
|
Box_default,
|
|
561132
561491
|
{ marginLeft: 3 },
|
|
561133
|
-
|
|
561492
|
+
import_react73.default.createElement(
|
|
561134
561493
|
Text,
|
|
561135
561494
|
{ color: theme14.colors.menuInfo },
|
|
561136
561495
|
t.configScreen.enterValue,
|
|
@@ -561138,12 +561497,12 @@ function ConfigFieldRenderer({ field, state }) {
|
|
|
561138
561497
|
autoCompressThreshold,
|
|
561139
561498
|
"%"
|
|
561140
561499
|
),
|
|
561141
|
-
|
|
561500
|
+
import_react73.default.createElement(Text, { color: theme14.colors.menuSecondary, dimColor: true }, (_c6 = t.configScreen.autoCompressThresholdHint) == null ? void 0 : _c6.replace("{percentage}", autoCompressThreshold.toString()).replace("{maxContext}", maxContextTokens.toString()).replace("{actualThreshold}", actualThreshold.toLocaleString()))
|
|
561142
561501
|
),
|
|
561143
|
-
!isCurrentlyEditing &&
|
|
561502
|
+
!isCurrentlyEditing && import_react73.default.createElement(
|
|
561144
561503
|
Box_default,
|
|
561145
561504
|
{ marginLeft: 3, flexDirection: "column" },
|
|
561146
|
-
|
|
561505
|
+
import_react73.default.createElement(
|
|
561147
561506
|
Text,
|
|
561148
561507
|
{ color: theme14.colors.menuSecondary },
|
|
561149
561508
|
autoCompressThreshold,
|
|
@@ -561152,23 +561511,23 @@ function ConfigFieldRenderer({ field, state }) {
|
|
|
561152
561511
|
" ",
|
|
561153
561512
|
"tokens"
|
|
561154
561513
|
),
|
|
561155
|
-
isActive &&
|
|
561514
|
+
isActive && import_react73.default.createElement(Text, { color: theme14.colors.menuSecondary, dimColor: true }, t.configScreen.autoCompressThresholdDesc)
|
|
561156
561515
|
)
|
|
561157
561516
|
);
|
|
561158
561517
|
}
|
|
561159
|
-
return
|
|
561518
|
+
return import_react73.default.createElement(
|
|
561160
561519
|
Box_default,
|
|
561161
561520
|
{ key: field, flexDirection: "column" },
|
|
561162
|
-
|
|
561521
|
+
import_react73.default.createElement(
|
|
561163
561522
|
Text,
|
|
561164
561523
|
{ color: activeColor },
|
|
561165
561524
|
activeIndicator,
|
|
561166
561525
|
t.configScreen.autoCompressThreshold
|
|
561167
561526
|
),
|
|
561168
|
-
isCurrentlyEditing &&
|
|
561527
|
+
isCurrentlyEditing && import_react73.default.createElement(
|
|
561169
561528
|
Box_default,
|
|
561170
561529
|
{ marginLeft: 3 },
|
|
561171
|
-
|
|
561530
|
+
import_react73.default.createElement(
|
|
561172
561531
|
Text,
|
|
561173
561532
|
{ color: theme14.colors.menuInfo },
|
|
561174
561533
|
t.configScreen.enterValue,
|
|
@@ -561176,26 +561535,26 @@ function ConfigFieldRenderer({ field, state }) {
|
|
|
561176
561535
|
autoCompressThreshold
|
|
561177
561536
|
)
|
|
561178
561537
|
),
|
|
561179
|
-
!isCurrentlyEditing &&
|
|
561538
|
+
!isCurrentlyEditing && import_react73.default.createElement(
|
|
561180
561539
|
Box_default,
|
|
561181
561540
|
{ marginLeft: 3 },
|
|
561182
|
-
|
|
561541
|
+
import_react73.default.createElement(Text, { color: theme14.colors.menuSecondary }, autoCompressThreshold)
|
|
561183
561542
|
)
|
|
561184
561543
|
);
|
|
561185
561544
|
case "showThinking":
|
|
561186
|
-
return
|
|
561545
|
+
return import_react73.default.createElement(
|
|
561187
561546
|
Box_default,
|
|
561188
561547
|
{ key: field, flexDirection: "column" },
|
|
561189
|
-
|
|
561548
|
+
import_react73.default.createElement(
|
|
561190
561549
|
Text,
|
|
561191
561550
|
{ color: activeColor },
|
|
561192
561551
|
activeIndicator,
|
|
561193
561552
|
t.configScreen.showThinking
|
|
561194
561553
|
),
|
|
561195
|
-
|
|
561554
|
+
import_react73.default.createElement(
|
|
561196
561555
|
Box_default,
|
|
561197
561556
|
{ marginLeft: 3 },
|
|
561198
|
-
|
|
561557
|
+
import_react73.default.createElement(
|
|
561199
561558
|
Text,
|
|
561200
561559
|
{ color: theme14.colors.menuSecondary },
|
|
561201
561560
|
showThinking ? t.configScreen.enabled : t.configScreen.disabled,
|
|
@@ -561205,19 +561564,19 @@ function ConfigFieldRenderer({ field, state }) {
|
|
|
561205
561564
|
)
|
|
561206
561565
|
);
|
|
561207
561566
|
case "streamingDisplay":
|
|
561208
|
-
return
|
|
561567
|
+
return import_react73.default.createElement(
|
|
561209
561568
|
Box_default,
|
|
561210
561569
|
{ key: field, flexDirection: "column" },
|
|
561211
|
-
|
|
561570
|
+
import_react73.default.createElement(
|
|
561212
561571
|
Text,
|
|
561213
561572
|
{ color: activeColor },
|
|
561214
561573
|
activeIndicator,
|
|
561215
561574
|
t.configScreen.streamingDisplay
|
|
561216
561575
|
),
|
|
561217
|
-
|
|
561576
|
+
import_react73.default.createElement(
|
|
561218
561577
|
Box_default,
|
|
561219
561578
|
{ marginLeft: 3 },
|
|
561220
|
-
|
|
561579
|
+
import_react73.default.createElement(
|
|
561221
561580
|
Text,
|
|
561222
561581
|
{ color: theme14.colors.menuSecondary },
|
|
561223
561582
|
streamingDisplay ? t.configScreen.enabled : t.configScreen.disabled,
|
|
@@ -561227,19 +561586,19 @@ function ConfigFieldRenderer({ field, state }) {
|
|
|
561227
561586
|
)
|
|
561228
561587
|
);
|
|
561229
561588
|
case "thinkingEnabled":
|
|
561230
|
-
return
|
|
561589
|
+
return import_react73.default.createElement(
|
|
561231
561590
|
Box_default,
|
|
561232
561591
|
{ key: field, flexDirection: "column" },
|
|
561233
|
-
|
|
561592
|
+
import_react73.default.createElement(
|
|
561234
561593
|
Text,
|
|
561235
561594
|
{ color: activeColor },
|
|
561236
561595
|
activeIndicator,
|
|
561237
561596
|
t.configScreen.thinkingEnabled
|
|
561238
561597
|
),
|
|
561239
|
-
|
|
561598
|
+
import_react73.default.createElement(
|
|
561240
561599
|
Box_default,
|
|
561241
561600
|
{ marginLeft: 3 },
|
|
561242
|
-
|
|
561601
|
+
import_react73.default.createElement(
|
|
561243
561602
|
Text,
|
|
561244
561603
|
{ color: theme14.colors.menuSecondary },
|
|
561245
561604
|
thinkingEnabled ? t.configScreen.enabled : t.configScreen.disabled,
|
|
@@ -561249,37 +561608,37 @@ function ConfigFieldRenderer({ field, state }) {
|
|
|
561249
561608
|
)
|
|
561250
561609
|
);
|
|
561251
561610
|
case "thinkingMode":
|
|
561252
|
-
return
|
|
561611
|
+
return import_react73.default.createElement(
|
|
561253
561612
|
Box_default,
|
|
561254
561613
|
{ key: field, flexDirection: "column" },
|
|
561255
|
-
|
|
561614
|
+
import_react73.default.createElement(
|
|
561256
561615
|
Text,
|
|
561257
561616
|
{ color: activeColor },
|
|
561258
561617
|
activeIndicator,
|
|
561259
561618
|
t.configScreen.thinkingMode
|
|
561260
561619
|
),
|
|
561261
|
-
|
|
561620
|
+
import_react73.default.createElement(
|
|
561262
561621
|
Box_default,
|
|
561263
561622
|
{ marginLeft: 3 },
|
|
561264
|
-
|
|
561623
|
+
import_react73.default.createElement(Text, { color: theme14.colors.menuSecondary }, thinkingMode === "tokens" ? t.configScreen.thinkingModeTokens : t.configScreen.thinkingModeAdaptive)
|
|
561265
561624
|
)
|
|
561266
561625
|
);
|
|
561267
561626
|
case "thinkingBudgetTokens":
|
|
561268
561627
|
if (thinkingMode !== "tokens")
|
|
561269
561628
|
return null;
|
|
561270
|
-
return
|
|
561629
|
+
return import_react73.default.createElement(
|
|
561271
561630
|
Box_default,
|
|
561272
561631
|
{ key: field, flexDirection: "column" },
|
|
561273
|
-
|
|
561632
|
+
import_react73.default.createElement(
|
|
561274
561633
|
Text,
|
|
561275
561634
|
{ color: activeColor },
|
|
561276
561635
|
activeIndicator,
|
|
561277
561636
|
t.configScreen.thinkingBudgetTokens
|
|
561278
561637
|
),
|
|
561279
|
-
isCurrentlyEditing &&
|
|
561638
|
+
isCurrentlyEditing && import_react73.default.createElement(
|
|
561280
561639
|
Box_default,
|
|
561281
561640
|
{ marginLeft: 3 },
|
|
561282
|
-
|
|
561641
|
+
import_react73.default.createElement(
|
|
561283
561642
|
Text,
|
|
561284
561643
|
{ color: theme14.colors.menuInfo },
|
|
561285
561644
|
t.configScreen.enterValue,
|
|
@@ -561287,44 +561646,44 @@ function ConfigFieldRenderer({ field, state }) {
|
|
|
561287
561646
|
thinkingBudgetTokens
|
|
561288
561647
|
)
|
|
561289
561648
|
),
|
|
561290
|
-
!isCurrentlyEditing &&
|
|
561649
|
+
!isCurrentlyEditing && import_react73.default.createElement(
|
|
561291
561650
|
Box_default,
|
|
561292
561651
|
{ marginLeft: 3 },
|
|
561293
|
-
|
|
561652
|
+
import_react73.default.createElement(Text, { color: theme14.colors.menuSecondary }, thinkingBudgetTokens)
|
|
561294
561653
|
)
|
|
561295
561654
|
);
|
|
561296
561655
|
case "thinkingEffort":
|
|
561297
561656
|
if (thinkingMode !== "adaptive")
|
|
561298
561657
|
return null;
|
|
561299
|
-
return
|
|
561658
|
+
return import_react73.default.createElement(
|
|
561300
561659
|
Box_default,
|
|
561301
561660
|
{ key: field, flexDirection: "column" },
|
|
561302
|
-
|
|
561661
|
+
import_react73.default.createElement(
|
|
561303
561662
|
Text,
|
|
561304
561663
|
{ color: activeColor },
|
|
561305
561664
|
activeIndicator,
|
|
561306
561665
|
t.configScreen.thinkingEffort
|
|
561307
561666
|
),
|
|
561308
|
-
|
|
561667
|
+
import_react73.default.createElement(
|
|
561309
561668
|
Box_default,
|
|
561310
561669
|
{ marginLeft: 3 },
|
|
561311
|
-
|
|
561670
|
+
import_react73.default.createElement(Text, { color: theme14.colors.menuSecondary }, thinkingEffort)
|
|
561312
561671
|
)
|
|
561313
561672
|
);
|
|
561314
561673
|
case "geminiThinkingEnabled":
|
|
561315
|
-
return
|
|
561674
|
+
return import_react73.default.createElement(
|
|
561316
561675
|
Box_default,
|
|
561317
561676
|
{ key: field, flexDirection: "column" },
|
|
561318
|
-
|
|
561677
|
+
import_react73.default.createElement(
|
|
561319
561678
|
Text,
|
|
561320
561679
|
{ color: activeColor },
|
|
561321
561680
|
activeIndicator,
|
|
561322
561681
|
t.configScreen.geminiThinkingEnabled
|
|
561323
561682
|
),
|
|
561324
|
-
|
|
561683
|
+
import_react73.default.createElement(
|
|
561325
561684
|
Box_default,
|
|
561326
561685
|
{ marginLeft: 3 },
|
|
561327
|
-
|
|
561686
|
+
import_react73.default.createElement(
|
|
561328
561687
|
Text,
|
|
561329
561688
|
{ color: theme14.colors.menuSecondary },
|
|
561330
561689
|
geminiThinkingEnabled ? t.configScreen.enabled : t.configScreen.disabled,
|
|
@@ -561334,19 +561693,19 @@ function ConfigFieldRenderer({ field, state }) {
|
|
|
561334
561693
|
)
|
|
561335
561694
|
);
|
|
561336
561695
|
case "geminiThinkingLevel":
|
|
561337
|
-
return
|
|
561696
|
+
return import_react73.default.createElement(
|
|
561338
561697
|
Box_default,
|
|
561339
561698
|
{ key: field, flexDirection: "column" },
|
|
561340
|
-
|
|
561699
|
+
import_react73.default.createElement(
|
|
561341
561700
|
Text,
|
|
561342
561701
|
{ color: activeColor },
|
|
561343
561702
|
activeIndicator,
|
|
561344
561703
|
t.configScreen.geminiThinkingLevel
|
|
561345
561704
|
),
|
|
561346
|
-
isCurrentlyEditing &&
|
|
561705
|
+
isCurrentlyEditing && import_react73.default.createElement(
|
|
561347
561706
|
Box_default,
|
|
561348
561707
|
{ marginLeft: 3 },
|
|
561349
|
-
|
|
561708
|
+
import_react73.default.createElement(Select, { options: [
|
|
561350
561709
|
{ label: "MINIMAL", value: "minimal" },
|
|
561351
561710
|
{ label: "LOW", value: "low" },
|
|
561352
561711
|
{ label: "MEDIUM", value: "medium" },
|
|
@@ -561356,26 +561715,26 @@ function ConfigFieldRenderer({ field, state }) {
|
|
|
561356
561715
|
state.setIsEditing(false);
|
|
561357
561716
|
} })
|
|
561358
561717
|
),
|
|
561359
|
-
!isCurrentlyEditing &&
|
|
561718
|
+
!isCurrentlyEditing && import_react73.default.createElement(
|
|
561360
561719
|
Box_default,
|
|
561361
561720
|
{ marginLeft: 3 },
|
|
561362
|
-
|
|
561721
|
+
import_react73.default.createElement(Text, { color: theme14.colors.menuSecondary }, geminiThinkingLevel.toUpperCase())
|
|
561363
561722
|
)
|
|
561364
561723
|
);
|
|
561365
561724
|
case "responsesReasoningEnabled":
|
|
561366
|
-
return
|
|
561725
|
+
return import_react73.default.createElement(
|
|
561367
561726
|
Box_default,
|
|
561368
561727
|
{ key: field, flexDirection: "column" },
|
|
561369
|
-
|
|
561728
|
+
import_react73.default.createElement(
|
|
561370
561729
|
Text,
|
|
561371
561730
|
{ color: activeColor },
|
|
561372
561731
|
activeIndicator,
|
|
561373
561732
|
t.configScreen.responsesReasoningEnabled
|
|
561374
561733
|
),
|
|
561375
|
-
|
|
561734
|
+
import_react73.default.createElement(
|
|
561376
561735
|
Box_default,
|
|
561377
561736
|
{ marginLeft: 3 },
|
|
561378
|
-
|
|
561737
|
+
import_react73.default.createElement(
|
|
561379
561738
|
Text,
|
|
561380
561739
|
{ color: theme14.colors.menuSecondary },
|
|
561381
561740
|
responsesReasoningEnabled ? t.configScreen.enabled : t.configScreen.disabled,
|
|
@@ -561385,24 +561744,24 @@ function ConfigFieldRenderer({ field, state }) {
|
|
|
561385
561744
|
)
|
|
561386
561745
|
);
|
|
561387
561746
|
case "responsesReasoningEffort":
|
|
561388
|
-
return
|
|
561747
|
+
return import_react73.default.createElement(
|
|
561389
561748
|
Box_default,
|
|
561390
561749
|
{ key: field, flexDirection: "column" },
|
|
561391
|
-
|
|
561750
|
+
import_react73.default.createElement(
|
|
561392
561751
|
Text,
|
|
561393
561752
|
{ color: activeColor },
|
|
561394
561753
|
activeIndicator,
|
|
561395
561754
|
t.configScreen.responsesReasoningEffort
|
|
561396
561755
|
),
|
|
561397
|
-
!isCurrentlyEditing &&
|
|
561756
|
+
!isCurrentlyEditing && import_react73.default.createElement(
|
|
561398
561757
|
Box_default,
|
|
561399
561758
|
{ marginLeft: 3 },
|
|
561400
|
-
|
|
561759
|
+
import_react73.default.createElement(Text, { color: theme14.colors.menuSecondary }, responsesReasoningEffort.toUpperCase())
|
|
561401
561760
|
),
|
|
561402
|
-
isCurrentlyEditing &&
|
|
561761
|
+
isCurrentlyEditing && import_react73.default.createElement(
|
|
561403
561762
|
Box_default,
|
|
561404
561763
|
{ marginLeft: 3 },
|
|
561405
|
-
|
|
561764
|
+
import_react73.default.createElement(Select, { options: [
|
|
561406
561765
|
{ label: "NONE", value: "none" },
|
|
561407
561766
|
{ label: "LOW", value: "low" },
|
|
561408
561767
|
{ label: "MEDIUM", value: "medium" },
|
|
@@ -561414,25 +561773,49 @@ function ConfigFieldRenderer({ field, state }) {
|
|
|
561414
561773
|
} })
|
|
561415
561774
|
)
|
|
561416
561775
|
);
|
|
561776
|
+
case "responsesReasoningMode":
|
|
561777
|
+
return import_react73.default.createElement(
|
|
561778
|
+
Box_default,
|
|
561779
|
+
{ key: field, flexDirection: "column" },
|
|
561780
|
+
import_react73.default.createElement(
|
|
561781
|
+
Text,
|
|
561782
|
+
{ color: activeColor },
|
|
561783
|
+
activeIndicator,
|
|
561784
|
+
t.configScreen.responsesReasoningMode
|
|
561785
|
+
),
|
|
561786
|
+
!isCurrentlyEditing && import_react73.default.createElement(
|
|
561787
|
+
Box_default,
|
|
561788
|
+
{ marginLeft: 3 },
|
|
561789
|
+
import_react73.default.createElement(Text, { color: theme14.colors.menuSecondary }, responsesReasoningMode ?? t.configScreen.responsesReasoningModeNone)
|
|
561790
|
+
),
|
|
561791
|
+
isCurrentlyEditing && import_react73.default.createElement(
|
|
561792
|
+
Box_default,
|
|
561793
|
+
{ marginLeft: 3 },
|
|
561794
|
+
import_react73.default.createElement(ResponsesReasoningModeSelect, { value: responsesReasoningMode, noneLabel: t.configScreen.responsesReasoningModeNone, onChange: (value) => {
|
|
561795
|
+
setResponsesReasoningMode(value);
|
|
561796
|
+
state.setIsEditing(false);
|
|
561797
|
+
} })
|
|
561798
|
+
)
|
|
561799
|
+
);
|
|
561417
561800
|
case "responsesVerbosity":
|
|
561418
|
-
return
|
|
561801
|
+
return import_react73.default.createElement(
|
|
561419
561802
|
Box_default,
|
|
561420
561803
|
{ key: field, flexDirection: "column" },
|
|
561421
|
-
|
|
561804
|
+
import_react73.default.createElement(
|
|
561422
561805
|
Text,
|
|
561423
561806
|
{ color: activeColor },
|
|
561424
561807
|
activeIndicator,
|
|
561425
561808
|
t.configScreen.responsesVerbosity
|
|
561426
561809
|
),
|
|
561427
|
-
!isCurrentlyEditing &&
|
|
561810
|
+
!isCurrentlyEditing && import_react73.default.createElement(
|
|
561428
561811
|
Box_default,
|
|
561429
561812
|
{ marginLeft: 3 },
|
|
561430
|
-
|
|
561813
|
+
import_react73.default.createElement(Text, { color: theme14.colors.menuSecondary }, responsesVerbosity.toUpperCase())
|
|
561431
561814
|
),
|
|
561432
|
-
isCurrentlyEditing &&
|
|
561815
|
+
isCurrentlyEditing && import_react73.default.createElement(
|
|
561433
561816
|
Box_default,
|
|
561434
561817
|
{ marginLeft: 3 },
|
|
561435
|
-
|
|
561818
|
+
import_react73.default.createElement(Select, { options: [
|
|
561436
561819
|
{ label: "LOW", value: "low" },
|
|
561437
561820
|
{ label: "MEDIUM", value: "medium" },
|
|
561438
561821
|
{ label: "HIGH", value: "high" }
|
|
@@ -561443,19 +561826,19 @@ function ConfigFieldRenderer({ field, state }) {
|
|
|
561443
561826
|
)
|
|
561444
561827
|
);
|
|
561445
561828
|
case "responsesFastMode":
|
|
561446
|
-
return
|
|
561829
|
+
return import_react73.default.createElement(
|
|
561447
561830
|
Box_default,
|
|
561448
561831
|
{ key: field, flexDirection: "column" },
|
|
561449
|
-
|
|
561832
|
+
import_react73.default.createElement(
|
|
561450
561833
|
Text,
|
|
561451
561834
|
{ color: activeColor },
|
|
561452
561835
|
activeIndicator,
|
|
561453
561836
|
t.configScreen.responsesFastMode
|
|
561454
561837
|
),
|
|
561455
|
-
|
|
561838
|
+
import_react73.default.createElement(
|
|
561456
561839
|
Box_default,
|
|
561457
561840
|
{ marginLeft: 3 },
|
|
561458
|
-
|
|
561841
|
+
import_react73.default.createElement(
|
|
561459
561842
|
Text,
|
|
561460
561843
|
{ color: theme14.colors.menuSecondary },
|
|
561461
561844
|
responsesFastMode ? t.configScreen.enabled : t.configScreen.disabled,
|
|
@@ -561465,19 +561848,19 @@ function ConfigFieldRenderer({ field, state }) {
|
|
|
561465
561848
|
)
|
|
561466
561849
|
);
|
|
561467
561850
|
case "chatThinkingEnabled":
|
|
561468
|
-
return
|
|
561851
|
+
return import_react73.default.createElement(
|
|
561469
561852
|
Box_default,
|
|
561470
561853
|
{ key: field, flexDirection: "column" },
|
|
561471
|
-
|
|
561854
|
+
import_react73.default.createElement(
|
|
561472
561855
|
Text,
|
|
561473
561856
|
{ color: activeColor },
|
|
561474
561857
|
activeIndicator,
|
|
561475
561858
|
t.configScreen.chatThinkingEnabled
|
|
561476
561859
|
),
|
|
561477
|
-
|
|
561860
|
+
import_react73.default.createElement(
|
|
561478
561861
|
Box_default,
|
|
561479
561862
|
{ marginLeft: 3 },
|
|
561480
|
-
|
|
561863
|
+
import_react73.default.createElement(
|
|
561481
561864
|
Text,
|
|
561482
561865
|
{ color: theme14.colors.menuSecondary },
|
|
561483
561866
|
chatThinkingEnabled ? t.configScreen.enabled : t.configScreen.disabled,
|
|
@@ -561487,67 +561870,67 @@ function ConfigFieldRenderer({ field, state }) {
|
|
|
561487
561870
|
)
|
|
561488
561871
|
);
|
|
561489
561872
|
case "chatReasoningEffort":
|
|
561490
|
-
return
|
|
561873
|
+
return import_react73.default.createElement(
|
|
561491
561874
|
Box_default,
|
|
561492
561875
|
{ key: field, flexDirection: "column" },
|
|
561493
|
-
|
|
561876
|
+
import_react73.default.createElement(
|
|
561494
561877
|
Text,
|
|
561495
561878
|
{ color: activeColor },
|
|
561496
561879
|
activeIndicator,
|
|
561497
561880
|
t.configScreen.chatReasoningEffort
|
|
561498
561881
|
),
|
|
561499
|
-
!isCurrentlyEditing &&
|
|
561882
|
+
!isCurrentlyEditing && import_react73.default.createElement(
|
|
561500
561883
|
Box_default,
|
|
561501
561884
|
{ marginLeft: 3 },
|
|
561502
|
-
|
|
561885
|
+
import_react73.default.createElement(Text, { color: theme14.colors.menuSecondary }, chatReasoningEffort.toUpperCase())
|
|
561503
561886
|
)
|
|
561504
561887
|
);
|
|
561505
561888
|
case "advancedModel":
|
|
561506
|
-
return
|
|
561889
|
+
return import_react73.default.createElement(
|
|
561507
561890
|
Box_default,
|
|
561508
561891
|
{ key: field, flexDirection: "column" },
|
|
561509
|
-
|
|
561892
|
+
import_react73.default.createElement(
|
|
561510
561893
|
Text,
|
|
561511
561894
|
{ color: activeColor },
|
|
561512
561895
|
activeIndicator,
|
|
561513
561896
|
t.configScreen.advancedModel
|
|
561514
561897
|
),
|
|
561515
|
-
!isCurrentlyEditing &&
|
|
561898
|
+
!isCurrentlyEditing && import_react73.default.createElement(
|
|
561516
561899
|
Box_default,
|
|
561517
561900
|
{ marginLeft: 3 },
|
|
561518
|
-
|
|
561901
|
+
import_react73.default.createElement(Text, { color: theme14.colors.menuSecondary }, advancedModel || t.configScreen.notSet)
|
|
561519
561902
|
)
|
|
561520
561903
|
);
|
|
561521
561904
|
case "basicModel":
|
|
561522
|
-
return
|
|
561905
|
+
return import_react73.default.createElement(
|
|
561523
561906
|
Box_default,
|
|
561524
561907
|
{ key: field, flexDirection: "column" },
|
|
561525
|
-
|
|
561908
|
+
import_react73.default.createElement(
|
|
561526
561909
|
Text,
|
|
561527
561910
|
{ color: activeColor },
|
|
561528
561911
|
activeIndicator,
|
|
561529
561912
|
t.configScreen.basicModel
|
|
561530
561913
|
),
|
|
561531
|
-
!isCurrentlyEditing &&
|
|
561914
|
+
!isCurrentlyEditing && import_react73.default.createElement(
|
|
561532
561915
|
Box_default,
|
|
561533
561916
|
{ marginLeft: 3 },
|
|
561534
|
-
|
|
561917
|
+
import_react73.default.createElement(Text, { color: theme14.colors.menuSecondary }, basicModel || t.configScreen.notSet)
|
|
561535
561918
|
)
|
|
561536
561919
|
);
|
|
561537
561920
|
case "supportsVision":
|
|
561538
|
-
return
|
|
561921
|
+
return import_react73.default.createElement(
|
|
561539
561922
|
Box_default,
|
|
561540
561923
|
{ key: field, flexDirection: "column" },
|
|
561541
|
-
|
|
561924
|
+
import_react73.default.createElement(
|
|
561542
561925
|
Text,
|
|
561543
561926
|
{ color: activeColor },
|
|
561544
561927
|
activeIndicator,
|
|
561545
561928
|
t.configScreen.supportsVision
|
|
561546
561929
|
),
|
|
561547
|
-
|
|
561930
|
+
import_react73.default.createElement(
|
|
561548
561931
|
Box_default,
|
|
561549
561932
|
{ marginLeft: 3 },
|
|
561550
|
-
|
|
561933
|
+
import_react73.default.createElement(
|
|
561551
561934
|
Text,
|
|
561552
561935
|
{ color: theme14.colors.menuSecondary },
|
|
561553
561936
|
supportsVision ? t.configScreen.supportsVisionYes : t.configScreen.supportsVisionNo,
|
|
@@ -561557,110 +561940,110 @@ function ConfigFieldRenderer({ field, state }) {
|
|
|
561557
561940
|
)
|
|
561558
561941
|
);
|
|
561559
561942
|
case "visionConfig":
|
|
561560
|
-
return
|
|
561943
|
+
return import_react73.default.createElement(
|
|
561561
561944
|
Box_default,
|
|
561562
561945
|
{ key: field, flexDirection: "column" },
|
|
561563
|
-
|
|
561946
|
+
import_react73.default.createElement(
|
|
561564
561947
|
Text,
|
|
561565
561948
|
{ color: activeColor },
|
|
561566
561949
|
activeIndicator,
|
|
561567
561950
|
t.configScreen.visionConfig
|
|
561568
561951
|
),
|
|
561569
|
-
|
|
561952
|
+
import_react73.default.createElement(
|
|
561570
561953
|
Box_default,
|
|
561571
561954
|
{ marginLeft: 3, flexDirection: "column" },
|
|
561572
|
-
|
|
561573
|
-
isActive &&
|
|
561955
|
+
import_react73.default.createElement(Text, { color: theme14.colors.menuSecondary }, t.configScreen.visionConfigSubtitle),
|
|
561956
|
+
isActive && import_react73.default.createElement(Text, { color: theme14.colors.menuSecondary, dimColor: true }, t.configScreen.visionConfigOpenHint)
|
|
561574
561957
|
)
|
|
561575
561958
|
);
|
|
561576
561959
|
case "visionBaseUrl":
|
|
561577
|
-
return
|
|
561960
|
+
return import_react73.default.createElement(
|
|
561578
561961
|
Box_default,
|
|
561579
561962
|
{ key: field, flexDirection: "column" },
|
|
561580
|
-
|
|
561963
|
+
import_react73.default.createElement(
|
|
561581
561964
|
Text,
|
|
561582
561965
|
{ color: activeColor },
|
|
561583
561966
|
activeIndicator,
|
|
561584
561967
|
t.configScreen.visionBaseUrl
|
|
561585
561968
|
),
|
|
561586
|
-
isCurrentlyEditing &&
|
|
561969
|
+
isCurrentlyEditing && import_react73.default.createElement(
|
|
561587
561970
|
Box_default,
|
|
561588
561971
|
{ marginLeft: 3 },
|
|
561589
|
-
|
|
561972
|
+
import_react73.default.createElement(build_default2, { value: visionBaseUrl, onChange: (value) => setVisionBaseUrl(stripFocusArtifacts(value)), placeholder: "https://api.openai.com/v1" })
|
|
561590
561973
|
),
|
|
561591
|
-
!isCurrentlyEditing &&
|
|
561974
|
+
!isCurrentlyEditing && import_react73.default.createElement(
|
|
561592
561975
|
Box_default,
|
|
561593
561976
|
{ marginLeft: 3 },
|
|
561594
|
-
|
|
561977
|
+
import_react73.default.createElement(Text, { color: theme14.colors.menuSecondary }, visionBaseUrl || t.configScreen.notSet)
|
|
561595
561978
|
)
|
|
561596
561979
|
);
|
|
561597
561980
|
case "visionBaseUrlMode":
|
|
561598
|
-
return
|
|
561981
|
+
return import_react73.default.createElement(
|
|
561599
561982
|
Box_default,
|
|
561600
561983
|
{ key: field, flexDirection: "column" },
|
|
561601
|
-
|
|
561984
|
+
import_react73.default.createElement(
|
|
561602
561985
|
Text,
|
|
561603
561986
|
{ color: activeColor },
|
|
561604
561987
|
activeIndicator,
|
|
561605
561988
|
t.configScreen.visionBaseUrlMode
|
|
561606
561989
|
),
|
|
561607
|
-
!isCurrentlyEditing &&
|
|
561990
|
+
!isCurrentlyEditing && import_react73.default.createElement(
|
|
561608
561991
|
Box_default,
|
|
561609
561992
|
{ marginLeft: 3 },
|
|
561610
|
-
|
|
561993
|
+
import_react73.default.createElement(Text, { color: theme14.colors.menuSecondary }, visionBaseUrlMode === "base" ? t.configScreen.baseUrlModeBase : visionBaseUrlMode === "endpoint" ? t.configScreen.baseUrlModeEndpoint : t.configScreen.baseUrlModeAuto)
|
|
561611
561994
|
)
|
|
561612
561995
|
);
|
|
561613
561996
|
case "visionApiKey":
|
|
561614
|
-
return
|
|
561997
|
+
return import_react73.default.createElement(
|
|
561615
561998
|
Box_default,
|
|
561616
561999
|
{ key: field, flexDirection: "column" },
|
|
561617
|
-
|
|
562000
|
+
import_react73.default.createElement(
|
|
561618
562001
|
Text,
|
|
561619
562002
|
{ color: activeColor },
|
|
561620
562003
|
activeIndicator,
|
|
561621
562004
|
t.configScreen.visionApiKey
|
|
561622
562005
|
),
|
|
561623
|
-
isCurrentlyEditing &&
|
|
562006
|
+
isCurrentlyEditing && import_react73.default.createElement(
|
|
561624
562007
|
Box_default,
|
|
561625
562008
|
{ marginLeft: 3 },
|
|
561626
|
-
|
|
562009
|
+
import_react73.default.createElement(build_default2, { value: visionApiKey, onChange: (value) => setVisionApiKey(stripFocusArtifacts(value)), placeholder: "sk-...", mask: "*" })
|
|
561627
562010
|
),
|
|
561628
|
-
!isCurrentlyEditing &&
|
|
562011
|
+
!isCurrentlyEditing && import_react73.default.createElement(
|
|
561629
562012
|
Box_default,
|
|
561630
562013
|
{ marginLeft: 3 },
|
|
561631
|
-
|
|
562014
|
+
import_react73.default.createElement(Text, { color: theme14.colors.menuSecondary }, visionApiKey ? "*".repeat(Math.min(visionApiKey.length, 20)) : t.configScreen.notSet)
|
|
561632
562015
|
)
|
|
561633
562016
|
);
|
|
561634
562017
|
case "visionRequestMethod":
|
|
561635
|
-
return
|
|
562018
|
+
return import_react73.default.createElement(
|
|
561636
562019
|
Box_default,
|
|
561637
562020
|
{ key: field, flexDirection: "column" },
|
|
561638
|
-
|
|
562021
|
+
import_react73.default.createElement(
|
|
561639
562022
|
Text,
|
|
561640
562023
|
{ color: activeColor },
|
|
561641
562024
|
activeIndicator,
|
|
561642
562025
|
t.configScreen.visionRequestMethod
|
|
561643
562026
|
),
|
|
561644
|
-
!isCurrentlyEditing &&
|
|
562027
|
+
!isCurrentlyEditing && import_react73.default.createElement(
|
|
561645
562028
|
Box_default,
|
|
561646
562029
|
{ marginLeft: 3 },
|
|
561647
|
-
|
|
562030
|
+
import_react73.default.createElement(Text, { color: theme14.colors.menuSecondary }, ((_d4 = requestMethodOptions.find((opt) => opt.value === visionRequestMethod)) == null ? void 0 : _d4.label) || t.configScreen.notSet)
|
|
561648
562031
|
)
|
|
561649
562032
|
);
|
|
561650
562033
|
case "visionModel":
|
|
561651
|
-
return
|
|
562034
|
+
return import_react73.default.createElement(
|
|
561652
562035
|
Box_default,
|
|
561653
562036
|
{ key: field, flexDirection: "column" },
|
|
561654
|
-
|
|
562037
|
+
import_react73.default.createElement(
|
|
561655
562038
|
Text,
|
|
561656
562039
|
{ color: activeColor },
|
|
561657
562040
|
activeIndicator,
|
|
561658
562041
|
t.configScreen.visionModel
|
|
561659
562042
|
),
|
|
561660
|
-
!isCurrentlyEditing &&
|
|
562043
|
+
!isCurrentlyEditing && import_react73.default.createElement(
|
|
561661
562044
|
Box_default,
|
|
561662
562045
|
{ marginLeft: 3 },
|
|
561663
|
-
|
|
562046
|
+
import_react73.default.createElement(Text, { color: theme14.colors.menuSecondary }, visionModel || t.configScreen.notSet)
|
|
561664
562047
|
)
|
|
561665
562048
|
);
|
|
561666
562049
|
case "maxContextTokens":
|
|
@@ -561671,19 +562054,19 @@ function ConfigFieldRenderer({ field, state }) {
|
|
|
561671
562054
|
return renderNumericField(field, t.configScreen.streamIdleTimeoutSec, streamIdleTimeoutSec);
|
|
561672
562055
|
case "toolResultTokenLimit": {
|
|
561673
562056
|
const actualLimit = Math.floor(maxContextTokens * toolResultTokenLimit / 100);
|
|
561674
|
-
return
|
|
562057
|
+
return import_react73.default.createElement(
|
|
561675
562058
|
Box_default,
|
|
561676
562059
|
{ key: field, flexDirection: "column" },
|
|
561677
|
-
|
|
562060
|
+
import_react73.default.createElement(
|
|
561678
562061
|
Text,
|
|
561679
562062
|
{ color: activeColor },
|
|
561680
562063
|
activeIndicator,
|
|
561681
562064
|
t.configScreen.toolResultTokenLimit
|
|
561682
562065
|
),
|
|
561683
|
-
isCurrentlyEditing &&
|
|
562066
|
+
isCurrentlyEditing && import_react73.default.createElement(
|
|
561684
562067
|
Box_default,
|
|
561685
562068
|
{ marginLeft: 3 },
|
|
561686
|
-
|
|
562069
|
+
import_react73.default.createElement(
|
|
561687
562070
|
Text,
|
|
561688
562071
|
{ color: theme14.colors.menuInfo },
|
|
561689
562072
|
t.configScreen.enterValue,
|
|
@@ -561691,12 +562074,12 @@ function ConfigFieldRenderer({ field, state }) {
|
|
|
561691
562074
|
toolResultTokenLimit,
|
|
561692
562075
|
"%"
|
|
561693
562076
|
),
|
|
561694
|
-
|
|
562077
|
+
import_react73.default.createElement(Text, { color: theme14.colors.menuSecondary, dimColor: true }, (_e2 = t.configScreen.toolResultTokenLimitHint) == null ? void 0 : _e2.replace("{percentage}", toolResultTokenLimit.toString()).replace("{maxContext}", maxContextTokens.toString()).replace("{actualLimit}", actualLimit.toLocaleString()))
|
|
561695
562078
|
),
|
|
561696
|
-
!isCurrentlyEditing &&
|
|
562079
|
+
!isCurrentlyEditing && import_react73.default.createElement(
|
|
561697
562080
|
Box_default,
|
|
561698
562081
|
{ marginLeft: 3, flexDirection: "column" },
|
|
561699
|
-
|
|
562082
|
+
import_react73.default.createElement(
|
|
561700
562083
|
Text,
|
|
561701
562084
|
{ color: theme14.colors.menuSecondary },
|
|
561702
562085
|
toolResultTokenLimit,
|
|
@@ -561704,7 +562087,7 @@ function ConfigFieldRenderer({ field, state }) {
|
|
|
561704
562087
|
actualLimit.toLocaleString(),
|
|
561705
562088
|
" tokens"
|
|
561706
562089
|
),
|
|
561707
|
-
isActive &&
|
|
562090
|
+
isActive && import_react73.default.createElement(Text, { color: theme14.colors.menuSecondary, dimColor: true }, t.configScreen.toolResultTokenLimitDesc)
|
|
561708
562091
|
)
|
|
561709
562092
|
);
|
|
561710
562093
|
}
|
|
@@ -561747,37 +562130,37 @@ function ConfigFieldRenderer({ field, state }) {
|
|
|
561747
562130
|
return null;
|
|
561748
562131
|
}
|
|
561749
562132
|
const groupColor = isActive ? theme14.colors.menuSelected : theme14.colors.menuInfo;
|
|
561750
|
-
return
|
|
562133
|
+
return import_react73.default.createElement(
|
|
561751
562134
|
Box_default,
|
|
561752
562135
|
{ key: groupField, flexDirection: "column" },
|
|
561753
|
-
|
|
562136
|
+
import_react73.default.createElement(
|
|
561754
562137
|
Text,
|
|
561755
562138
|
{ color: groupColor, bold: true },
|
|
561756
562139
|
activeIndicator,
|
|
561757
562140
|
expanded ? "\u25BC " : "\u25B6 ",
|
|
561758
562141
|
label
|
|
561759
562142
|
),
|
|
561760
|
-
|
|
562143
|
+
import_react73.default.createElement(
|
|
561761
562144
|
Box_default,
|
|
561762
562145
|
{ marginLeft: 3 },
|
|
561763
|
-
|
|
562146
|
+
import_react73.default.createElement(Text, { color: theme14.colors.menuSecondary }, t.configScreen.groupExpandHint)
|
|
561764
562147
|
)
|
|
561765
562148
|
);
|
|
561766
562149
|
}
|
|
561767
562150
|
function renderNumericField(fieldKey, label, value) {
|
|
561768
|
-
return
|
|
562151
|
+
return import_react73.default.createElement(
|
|
561769
562152
|
Box_default,
|
|
561770
562153
|
{ key: fieldKey, flexDirection: "column" },
|
|
561771
|
-
|
|
562154
|
+
import_react73.default.createElement(
|
|
561772
562155
|
Text,
|
|
561773
562156
|
{ color: activeColor },
|
|
561774
562157
|
activeIndicator,
|
|
561775
562158
|
label
|
|
561776
562159
|
),
|
|
561777
|
-
isCurrentlyEditing &&
|
|
562160
|
+
isCurrentlyEditing && import_react73.default.createElement(
|
|
561778
562161
|
Box_default,
|
|
561779
562162
|
{ marginLeft: 3 },
|
|
561780
|
-
|
|
562163
|
+
import_react73.default.createElement(
|
|
561781
562164
|
Text,
|
|
561782
562165
|
{ color: theme14.colors.menuInfo },
|
|
561783
562166
|
t.configScreen.enterValue,
|
|
@@ -561785,30 +562168,31 @@ function ConfigFieldRenderer({ field, state }) {
|
|
|
561785
562168
|
value
|
|
561786
562169
|
)
|
|
561787
562170
|
),
|
|
561788
|
-
!isCurrentlyEditing &&
|
|
562171
|
+
!isCurrentlyEditing && import_react73.default.createElement(
|
|
561789
562172
|
Box_default,
|
|
561790
562173
|
{ marginLeft: 3 },
|
|
561791
|
-
|
|
562174
|
+
import_react73.default.createElement(Text, { color: theme14.colors.menuSecondary }, value)
|
|
561792
562175
|
)
|
|
561793
562176
|
);
|
|
561794
562177
|
}
|
|
561795
562178
|
}
|
|
561796
|
-
var
|
|
562179
|
+
var import_react73;
|
|
561797
562180
|
var init_ConfigFieldRenderer = __esm({
|
|
561798
562181
|
async "dist/ui/pages/configScreen/ConfigFieldRenderer.js"() {
|
|
561799
562182
|
"use strict";
|
|
561800
|
-
|
|
562183
|
+
import_react73 = __toESM(require_react(), 1);
|
|
561801
562184
|
await init_src();
|
|
561802
562185
|
await init_build4();
|
|
561803
562186
|
await init_build3();
|
|
561804
562187
|
await init_ScrollableSelectInput();
|
|
562188
|
+
await init_ConfigSubViews();
|
|
561805
562189
|
init_types8();
|
|
561806
562190
|
}
|
|
561807
562191
|
});
|
|
561808
562192
|
|
|
561809
562193
|
// dist/ui/pages/configScreen/ConfigSelectPanel.js
|
|
561810
562194
|
function ConfigSelectPanel({ state }) {
|
|
561811
|
-
const { t, theme: theme14, currentField, setIsEditing, baseUrlMode, setBaseUrlMode, requestMethod, setRequestMethod, requestMethodOptions, visionBaseUrlMode, setVisionBaseUrlMode, visionRequestMethod, setVisionRequestMethod, thinkingMode, setThinkingMode, thinkingEffort, setThinkingEffort, geminiThinkingLevel, setGeminiThinkingLevel, responsesVerbosity, setResponsesVerbosity, anthropicSpeed, setAnthropicSpeed, chatReasoningEffort, setChatReasoningEffort, getCustomHeadersSchemeSelectItems, getCustomHeadersSchemeSelectedValue, applyCustomHeadersSchemeSelectValue } = state;
|
|
562195
|
+
const { t, theme: theme14, currentField, setIsEditing, baseUrlMode, setBaseUrlMode, requestMethod, setRequestMethod, requestMethodOptions, visionBaseUrlMode, setVisionBaseUrlMode, visionRequestMethod, setVisionRequestMethod, thinkingMode, setThinkingMode, thinkingEffort, setThinkingEffort, geminiThinkingLevel, setGeminiThinkingLevel, responsesReasoningMode, setResponsesReasoningMode, responsesVerbosity, setResponsesVerbosity, anthropicSpeed, setAnthropicSpeed, chatReasoningEffort, setChatReasoningEffort, getCustomHeadersSchemeSelectItems, getCustomHeadersSchemeSelectedValue, applyCustomHeadersSchemeSelectValue } = state;
|
|
561812
562196
|
const getFieldLabel = () => {
|
|
561813
562197
|
switch (currentField) {
|
|
561814
562198
|
case "profile":
|
|
@@ -561835,6 +562219,8 @@ function ConfigSelectPanel({ state }) {
|
|
|
561835
562219
|
return t.configScreen.geminiThinkingLevel.replace(":", "");
|
|
561836
562220
|
case "responsesReasoningEffort":
|
|
561837
562221
|
return t.configScreen.responsesReasoningEffort.replace(":", "");
|
|
562222
|
+
case "responsesReasoningMode":
|
|
562223
|
+
return t.configScreen.responsesReasoningMode.replace(":", "");
|
|
561838
562224
|
case "responsesVerbosity":
|
|
561839
562225
|
return t.configScreen.responsesVerbosity.replace(":", "");
|
|
561840
562226
|
case "anthropicSpeed":
|
|
@@ -561849,24 +562235,24 @@ function ConfigSelectPanel({ state }) {
|
|
|
561849
562235
|
return "";
|
|
561850
562236
|
}
|
|
561851
562237
|
};
|
|
561852
|
-
return
|
|
562238
|
+
return import_react74.default.createElement(
|
|
561853
562239
|
Box_default,
|
|
561854
562240
|
{ flexDirection: "column" },
|
|
561855
|
-
|
|
562241
|
+
import_react74.default.createElement(
|
|
561856
562242
|
Text,
|
|
561857
562243
|
{ color: theme14.colors.menuSelected },
|
|
561858
562244
|
"\u276F ",
|
|
561859
562245
|
getFieldLabel()
|
|
561860
562246
|
),
|
|
561861
|
-
|
|
562247
|
+
import_react74.default.createElement(
|
|
561862
562248
|
Box_default,
|
|
561863
562249
|
{ marginLeft: 3, marginTop: 1 },
|
|
561864
|
-
currentField === "profile" &&
|
|
561865
|
-
currentField === "requestMethod" &&
|
|
562250
|
+
currentField === "profile" && import_react74.default.createElement(ProfileSelect, { state }),
|
|
562251
|
+
currentField === "requestMethod" && import_react74.default.createElement(ScrollableSelectInput, { items: requestMethodOptions, initialIndex: requestMethodOptions.findIndex((opt) => opt.value === requestMethod), isFocused: true, onSelect: (item) => {
|
|
561866
562252
|
setRequestMethod(item.value);
|
|
561867
562253
|
setIsEditing(false);
|
|
561868
562254
|
} }),
|
|
561869
|
-
currentField === "baseUrlMode" &&
|
|
562255
|
+
currentField === "baseUrlMode" && import_react74.default.createElement(ScrollableSelectInput, { items: [
|
|
561870
562256
|
{ label: t.configScreen.baseUrlModeAuto, value: "auto" },
|
|
561871
562257
|
{ label: t.configScreen.baseUrlModeBase, value: "base" },
|
|
561872
562258
|
{
|
|
@@ -561877,7 +562263,7 @@ function ConfigSelectPanel({ state }) {
|
|
|
561877
562263
|
setBaseUrlMode(item.value);
|
|
561878
562264
|
setIsEditing(false);
|
|
561879
562265
|
} }),
|
|
561880
|
-
currentField === "visionBaseUrlMode" &&
|
|
562266
|
+
currentField === "visionBaseUrlMode" && import_react74.default.createElement(ScrollableSelectInput, { items: [
|
|
561881
562267
|
{ label: t.configScreen.baseUrlModeAuto, value: "auto" },
|
|
561882
562268
|
{ label: t.configScreen.baseUrlModeBase, value: "base" },
|
|
561883
562269
|
{
|
|
@@ -561888,21 +562274,21 @@ function ConfigSelectPanel({ state }) {
|
|
|
561888
562274
|
setVisionBaseUrlMode(item.value);
|
|
561889
562275
|
setIsEditing(false);
|
|
561890
562276
|
} }),
|
|
561891
|
-
currentField === "systemPromptId" &&
|
|
562277
|
+
currentField === "systemPromptId" && import_react74.default.createElement(SystemPromptSelect, { state }),
|
|
561892
562278
|
currentField === "customHeadersSchemeId" && (() => {
|
|
561893
562279
|
const items = getCustomHeadersSchemeSelectItems();
|
|
561894
562280
|
const selected = getCustomHeadersSchemeSelectedValue();
|
|
561895
|
-
return
|
|
562281
|
+
return import_react74.default.createElement(ScrollableSelectInput, { items, limit: 10, initialIndex: Math.max(0, items.findIndex((opt) => opt.value === selected)), isFocused: true, onSelect: (item) => {
|
|
561896
562282
|
applyCustomHeadersSchemeSelectValue(item.value);
|
|
561897
562283
|
setIsEditing(false);
|
|
561898
562284
|
} });
|
|
561899
562285
|
})(),
|
|
561900
|
-
(currentField === "advancedModel" || currentField === "basicModel" || currentField === "visionModel") &&
|
|
561901
|
-
currentField === "visionRequestMethod" &&
|
|
562286
|
+
(currentField === "advancedModel" || currentField === "basicModel" || currentField === "visionModel") && import_react74.default.createElement(ModelSelect, { state }),
|
|
562287
|
+
currentField === "visionRequestMethod" && import_react74.default.createElement(ScrollableSelectInput, { items: requestMethodOptions, initialIndex: Math.max(0, requestMethodOptions.findIndex((opt) => opt.value === visionRequestMethod)), isFocused: true, onSelect: (item) => {
|
|
561902
562288
|
setVisionRequestMethod(item.value);
|
|
561903
562289
|
setIsEditing(false);
|
|
561904
562290
|
} }),
|
|
561905
|
-
currentField === "thinkingMode" &&
|
|
562291
|
+
currentField === "thinkingMode" && import_react74.default.createElement(ScrollableSelectInput, { items: [
|
|
561906
562292
|
{ label: t.configScreen.thinkingModeTokens, value: "tokens" },
|
|
561907
562293
|
{
|
|
561908
562294
|
label: t.configScreen.thinkingModeAdaptive,
|
|
@@ -561912,26 +562298,50 @@ function ConfigSelectPanel({ state }) {
|
|
|
561912
562298
|
setThinkingMode(item.value);
|
|
561913
562299
|
setIsEditing(false);
|
|
561914
562300
|
} }),
|
|
561915
|
-
currentField === "thinkingEffort" &&
|
|
562301
|
+
currentField === "thinkingEffort" && import_react74.default.createElement(ScrollableSelectInput, { items: [
|
|
562302
|
+
{
|
|
562303
|
+
label: t.configScreen.manualInputOption,
|
|
562304
|
+
value: "__MANUAL_INPUT__"
|
|
562305
|
+
},
|
|
561916
562306
|
{ label: "low", value: "low" },
|
|
561917
562307
|
{ label: "medium", value: "medium" },
|
|
561918
562308
|
{ label: "high", value: "high" },
|
|
561919
562309
|
{ label: "max", value: "max" }
|
|
561920
|
-
], initialIndex:
|
|
562310
|
+
], initialIndex: Math.max(0, ["__MANUAL_INPUT__", "low", "medium", "high", "max"].indexOf(thinkingEffort)), isFocused: true, onSelect: (item) => {
|
|
562311
|
+
if (item.value === "__MANUAL_INPUT__") {
|
|
562312
|
+
setIsEditing(false);
|
|
562313
|
+
state.setManualInputMode(true);
|
|
562314
|
+
state.setManualInputValue(thinkingEffort);
|
|
562315
|
+
return;
|
|
562316
|
+
}
|
|
561921
562317
|
setThinkingEffort(item.value);
|
|
561922
562318
|
setIsEditing(false);
|
|
561923
562319
|
} }),
|
|
561924
|
-
currentField === "geminiThinkingLevel" &&
|
|
562320
|
+
currentField === "geminiThinkingLevel" && import_react74.default.createElement(ScrollableSelectInput, { items: [
|
|
562321
|
+
{
|
|
562322
|
+
label: t.configScreen.manualInputOption,
|
|
562323
|
+
value: "__MANUAL_INPUT__"
|
|
562324
|
+
},
|
|
561925
562325
|
{ label: "MINIMAL", value: "minimal" },
|
|
561926
562326
|
{ label: "LOW", value: "low" },
|
|
561927
562327
|
{ label: "MEDIUM", value: "medium" },
|
|
561928
562328
|
{ label: "HIGH", value: "high" }
|
|
561929
|
-
], initialIndex: Math.max(0, ["minimal", "low", "medium", "high"].indexOf(geminiThinkingLevel)), isFocused: true, onSelect: (item) => {
|
|
562329
|
+
], initialIndex: Math.max(0, ["__MANUAL_INPUT__", "minimal", "low", "medium", "high"].indexOf(geminiThinkingLevel)), isFocused: true, onSelect: (item) => {
|
|
562330
|
+
if (item.value === "__MANUAL_INPUT__") {
|
|
562331
|
+
setIsEditing(false);
|
|
562332
|
+
state.setManualInputMode(true);
|
|
562333
|
+
state.setManualInputValue(geminiThinkingLevel);
|
|
562334
|
+
return;
|
|
562335
|
+
}
|
|
561930
562336
|
setGeminiThinkingLevel(item.value);
|
|
561931
562337
|
setIsEditing(false);
|
|
561932
562338
|
} }),
|
|
561933
|
-
currentField === "responsesReasoningEffort" &&
|
|
561934
|
-
currentField === "
|
|
562339
|
+
currentField === "responsesReasoningEffort" && import_react74.default.createElement(ReasoningEffortSelect, { state }),
|
|
562340
|
+
currentField === "responsesReasoningMode" && import_react74.default.createElement(ResponsesReasoningModeSelect, { value: responsesReasoningMode, noneLabel: t.configScreen.responsesReasoningModeNone, onChange: (value) => {
|
|
562341
|
+
setResponsesReasoningMode(value);
|
|
562342
|
+
setIsEditing(false);
|
|
562343
|
+
} }),
|
|
562344
|
+
currentField === "responsesVerbosity" && import_react74.default.createElement(ScrollableSelectInput, { items: [
|
|
561935
562345
|
{ label: "LOW", value: "low" },
|
|
561936
562346
|
{ label: "MEDIUM", value: "medium" },
|
|
561937
562347
|
{ label: "HIGH", value: "high" }
|
|
@@ -561943,16 +562353,26 @@ function ConfigSelectPanel({ state }) {
|
|
|
561943
562353
|
setResponsesVerbosity(item.value);
|
|
561944
562354
|
setIsEditing(false);
|
|
561945
562355
|
} }),
|
|
561946
|
-
currentField === "chatReasoningEffort" &&
|
|
562356
|
+
currentField === "chatReasoningEffort" && import_react74.default.createElement(ScrollableSelectInput, { items: [
|
|
562357
|
+
{
|
|
562358
|
+
label: t.configScreen.manualInputOption,
|
|
562359
|
+
value: "__MANUAL_INPUT__"
|
|
562360
|
+
},
|
|
561947
562361
|
{ label: "LOW", value: "low" },
|
|
561948
562362
|
{ label: "MEDIUM", value: "medium" },
|
|
561949
562363
|
{ label: "HIGH", value: "high" },
|
|
561950
562364
|
{ label: "MAX", value: "max" }
|
|
561951
|
-
], initialIndex: Math.max(0, ["low", "medium", "high", "max"].indexOf(chatReasoningEffort)), isFocused: true, onSelect: (item) => {
|
|
562365
|
+
], initialIndex: Math.max(0, ["__MANUAL_INPUT__", "low", "medium", "high", "max"].indexOf(chatReasoningEffort)), isFocused: true, onSelect: (item) => {
|
|
562366
|
+
if (item.value === "__MANUAL_INPUT__") {
|
|
562367
|
+
setIsEditing(false);
|
|
562368
|
+
state.setManualInputMode(true);
|
|
562369
|
+
state.setManualInputValue(chatReasoningEffort);
|
|
562370
|
+
return;
|
|
562371
|
+
}
|
|
561952
562372
|
setChatReasoningEffort(item.value);
|
|
561953
562373
|
setIsEditing(false);
|
|
561954
562374
|
} }),
|
|
561955
|
-
currentField === "anthropicSpeed" &&
|
|
562375
|
+
currentField === "anthropicSpeed" && import_react74.default.createElement(ScrollableSelectInput, { items: [
|
|
561956
562376
|
{ label: t.configScreen.anthropicSpeedNotUsed, value: "__NONE__" },
|
|
561957
562377
|
{ label: t.configScreen.anthropicSpeedFast, value: "fast" },
|
|
561958
562378
|
{ label: t.configScreen.anthropicSpeedStandard, value: "standard" }
|
|
@@ -561965,21 +562385,21 @@ function ConfigSelectPanel({ state }) {
|
|
|
561965
562385
|
}
|
|
561966
562386
|
function ProfileSelect({ state }) {
|
|
561967
562387
|
const { t, theme: theme14, profiles, activeProfile, markedProfiles, setMarkedProfiles, setErrors, setIsEditing, loadProfilesAndConfig } = state;
|
|
561968
|
-
return
|
|
562388
|
+
return import_react74.default.createElement(
|
|
561969
562389
|
Box_default,
|
|
561970
562390
|
{ flexDirection: "column" },
|
|
561971
|
-
profiles.length > 1 &&
|
|
561972
|
-
|
|
562391
|
+
profiles.length > 1 && import_react74.default.createElement(Text, { color: theme14.colors.menuSecondary, dimColor: true }, "Scroll to see more profiles (\u2191\u2193)"),
|
|
562392
|
+
import_react74.default.createElement(ScrollableSelectInput, { items: profiles.map((p) => ({
|
|
561973
562393
|
label: p.displayName,
|
|
561974
562394
|
value: p.name,
|
|
561975
562395
|
isActive: p.name === activeProfile
|
|
561976
562396
|
})), limit: 5, initialIndex: Math.max(0, profiles.findIndex((p) => p.name === activeProfile)), isFocused: true, selectedValues: markedProfiles, renderItem: ({ label, isSelected, isMarked, isActive }) => {
|
|
561977
|
-
return
|
|
562397
|
+
return import_react74.default.createElement(
|
|
561978
562398
|
Text,
|
|
561979
562399
|
null,
|
|
561980
|
-
|
|
561981
|
-
isActive &&
|
|
561982
|
-
|
|
562400
|
+
import_react74.default.createElement(Text, { color: isMarked ? "yellow" : isSelected ? "cyan" : "white" }, isMarked ? "\u2713 " : " "),
|
|
562401
|
+
isActive && import_react74.default.createElement(Text, { color: "green" }, "[active] "),
|
|
562402
|
+
import_react74.default.createElement(Text, { color: isSelected ? "cyan" : "white" }, label)
|
|
561983
562403
|
);
|
|
561984
562404
|
}, onSelect: (item) => {
|
|
561985
562405
|
switchProfile(item.value);
|
|
@@ -562002,33 +562422,33 @@ function ProfileSelect({ state }) {
|
|
|
562002
562422
|
});
|
|
562003
562423
|
setErrors([]);
|
|
562004
562424
|
} }),
|
|
562005
|
-
|
|
562425
|
+
import_react74.default.createElement(
|
|
562006
562426
|
Box_default,
|
|
562007
562427
|
{ flexDirection: "row", marginTop: 1 },
|
|
562008
|
-
|
|
562428
|
+
import_react74.default.createElement(
|
|
562009
562429
|
Box_default,
|
|
562010
562430
|
{ marginRight: 2 },
|
|
562011
|
-
|
|
562012
|
-
|
|
562431
|
+
import_react74.default.createElement(Text, { color: theme14.colors.menuSelected }, t.configScreen.newProfile),
|
|
562432
|
+
import_react74.default.createElement(Text, { color: theme14.colors.menuSecondary }, " (n)")
|
|
562013
562433
|
),
|
|
562014
|
-
|
|
562434
|
+
import_react74.default.createElement(
|
|
562015
562435
|
Box_default,
|
|
562016
562436
|
{ marginRight: 2 },
|
|
562017
|
-
|
|
562018
|
-
|
|
562437
|
+
import_react74.default.createElement(Text, { color: theme14.colors.menuInfo }, t.configScreen.renameProfileShort),
|
|
562438
|
+
import_react74.default.createElement(Text, { color: theme14.colors.menuSecondary }, " (r)")
|
|
562019
562439
|
),
|
|
562020
|
-
|
|
562440
|
+
import_react74.default.createElement(
|
|
562021
562441
|
Box_default,
|
|
562022
562442
|
{ marginRight: 2 },
|
|
562023
|
-
|
|
562024
|
-
|
|
562443
|
+
import_react74.default.createElement(Text, { color: theme14.colors.warning }, t.configScreen.mark),
|
|
562444
|
+
import_react74.default.createElement(Text, { color: theme14.colors.menuSecondary }, " (space)")
|
|
562025
562445
|
),
|
|
562026
|
-
|
|
562446
|
+
import_react74.default.createElement(
|
|
562027
562447
|
Box_default,
|
|
562028
562448
|
null,
|
|
562029
|
-
|
|
562030
|
-
|
|
562031
|
-
markedProfiles.size > 0 &&
|
|
562449
|
+
import_react74.default.createElement(Text, { color: theme14.colors.error }, t.configScreen.deleteProfileShort),
|
|
562450
|
+
import_react74.default.createElement(Text, { color: theme14.colors.menuSecondary }, " (d)"),
|
|
562451
|
+
markedProfiles.size > 0 && import_react74.default.createElement(
|
|
562032
562452
|
Text,
|
|
562033
562453
|
{ color: theme14.colors.warning },
|
|
562034
562454
|
"[",
|
|
@@ -562037,10 +562457,10 @@ function ProfileSelect({ state }) {
|
|
|
562037
562457
|
)
|
|
562038
562458
|
)
|
|
562039
562459
|
),
|
|
562040
|
-
|
|
562460
|
+
import_react74.default.createElement(
|
|
562041
562461
|
Box_default,
|
|
562042
562462
|
{ marginTop: 1 },
|
|
562043
|
-
|
|
562463
|
+
import_react74.default.createElement(Alert, { variant: "info" }, t.configScreen.profileSelectHint)
|
|
562044
562464
|
)
|
|
562045
562465
|
);
|
|
562046
562466
|
}
|
|
@@ -562048,12 +562468,12 @@ function SystemPromptSelect({ state }) {
|
|
|
562048
562468
|
const { t, theme: theme14, pendingPromptIds, setPendingPromptIds, setIsEditing, setSystemPromptId, getSystemPromptSelectItems, getSystemPromptSelectedValue, applySystemPromptSelectValue } = state;
|
|
562049
562469
|
const items = getSystemPromptSelectItems();
|
|
562050
562470
|
const selected = getSystemPromptSelectedValue();
|
|
562051
|
-
return
|
|
562471
|
+
return import_react74.default.createElement(
|
|
562052
562472
|
Box_default,
|
|
562053
562473
|
{ flexDirection: "column" },
|
|
562054
|
-
|
|
562474
|
+
import_react74.default.createElement(ScrollableSelectInput, { items, limit: 10, initialIndex: Math.max(0, items.findIndex((opt) => opt.value === selected)), isFocused: true, selectedValues: pendingPromptIds, renderItem: ({ label, value, isSelected, isMarked }) => {
|
|
562055
562475
|
const isMeta = value === "__FOLLOW__" || value === "__DISABLED__";
|
|
562056
|
-
return
|
|
562476
|
+
return import_react74.default.createElement(
|
|
562057
562477
|
Text,
|
|
562058
562478
|
{ color: isSelected ? "cyan" : isMarked ? theme14.colors.menuInfo : "white" },
|
|
562059
562479
|
isMeta ? "" : isMarked ? "[\u2713] " : "[ ] ",
|
|
@@ -562089,25 +562509,25 @@ function SystemPromptSelect({ state }) {
|
|
|
562089
562509
|
setPendingPromptIds(/* @__PURE__ */ new Set());
|
|
562090
562510
|
setIsEditing(false);
|
|
562091
562511
|
} }),
|
|
562092
|
-
|
|
562512
|
+
import_react74.default.createElement(
|
|
562093
562513
|
Box_default,
|
|
562094
562514
|
{ marginTop: 1 },
|
|
562095
|
-
|
|
562515
|
+
import_react74.default.createElement(Text, { color: theme14.colors.menuSecondary, dimColor: true }, t.configScreen.systemPromptMultiSelectHint || "Space: toggle | Enter: confirm | Esc: cancel")
|
|
562096
562516
|
)
|
|
562097
562517
|
);
|
|
562098
562518
|
}
|
|
562099
562519
|
function ModelSelect({ state }) {
|
|
562100
562520
|
const { t, theme: theme14, searchTerm, getCurrentOptions, getCurrentValue, handleModelChange } = state;
|
|
562101
|
-
const [highlightedIndex, setHighlightedIndex] = (0,
|
|
562521
|
+
const [highlightedIndex, setHighlightedIndex] = (0, import_react74.useState)(0);
|
|
562102
562522
|
const options3 = getCurrentOptions();
|
|
562103
562523
|
const modelCount = options3.length - 1;
|
|
562104
|
-
return
|
|
562524
|
+
return import_react74.default.createElement(
|
|
562105
562525
|
Box_default,
|
|
562106
562526
|
{ flexDirection: "column" },
|
|
562107
|
-
|
|
562527
|
+
import_react74.default.createElement(
|
|
562108
562528
|
Box_default,
|
|
562109
562529
|
null,
|
|
562110
|
-
searchTerm &&
|
|
562530
|
+
searchTerm && import_react74.default.createElement(
|
|
562111
562531
|
Text,
|
|
562112
562532
|
{ color: theme14.colors.menuInfo },
|
|
562113
562533
|
t.configScreen.modelSelectFilterLabel,
|
|
@@ -562115,241 +562535,58 @@ function ModelSelect({ state }) {
|
|
|
562115
562535
|
searchTerm,
|
|
562116
562536
|
" "
|
|
562117
562537
|
),
|
|
562118
|
-
|
|
562538
|
+
import_react74.default.createElement(
|
|
562119
562539
|
Text,
|
|
562120
562540
|
{ color: theme14.colors.warning, bold: true },
|
|
562121
562541
|
t.configScreen.modelSelectModelCount.replace("{count}", modelCount.toString()),
|
|
562122
562542
|
options3.length > 10 && ` (${highlightedIndex + 1}/${options3.length})`
|
|
562123
562543
|
)
|
|
562124
562544
|
),
|
|
562125
|
-
|
|
562545
|
+
import_react74.default.createElement(ScrollableSelectInput, { items: options3, limit: 10, disableNumberShortcuts: true, initialIndex: Math.max(0, options3.findIndex((opt) => opt.value === getCurrentValue())), isFocused: true, onSelect: (item) => {
|
|
562126
562546
|
handleModelChange(item.value);
|
|
562127
562547
|
}, onHighlight: (item) => {
|
|
562128
562548
|
const idx = options3.findIndex((o) => o.value === item.value);
|
|
562129
562549
|
if (idx >= 0)
|
|
562130
562550
|
setHighlightedIndex(idx);
|
|
562131
562551
|
} }),
|
|
562132
|
-
options3.length > 10 &&
|
|
562552
|
+
options3.length > 10 && import_react74.default.createElement(
|
|
562133
562553
|
Box_default,
|
|
562134
562554
|
null,
|
|
562135
|
-
|
|
562555
|
+
import_react74.default.createElement(Text, { dimColor: true, color: theme14.colors.menuSecondary }, t.configScreen.modelSelectScrollHint)
|
|
562136
562556
|
)
|
|
562137
562557
|
);
|
|
562138
562558
|
}
|
|
562139
562559
|
function ReasoningEffortSelect({ state }) {
|
|
562140
|
-
const { supportsXHigh, responsesReasoningEffort, setResponsesReasoningEffort, setIsEditing } = state;
|
|
562560
|
+
const { t, supportsXHigh, responsesReasoningEffort, setResponsesReasoningEffort, setIsEditing } = state;
|
|
562141
562561
|
const effortOptions = [
|
|
562562
|
+
{ label: t.configScreen.manualInputOption, value: "__MANUAL_INPUT__" },
|
|
562142
562563
|
{ label: "NONE", value: "none" },
|
|
562143
562564
|
{ label: "LOW", value: "low" },
|
|
562144
562565
|
{ label: "MEDIUM", value: "medium" },
|
|
562145
562566
|
{ label: "HIGH", value: "high" },
|
|
562146
562567
|
...supportsXHigh ? [{ label: "XHIGH", value: "xhigh" }] : []
|
|
562147
562568
|
];
|
|
562148
|
-
return
|
|
562149
|
-
|
|
562150
|
-
|
|
562569
|
+
return import_react74.default.createElement(ScrollableSelectInput, { items: effortOptions, initialIndex: Math.max(0, effortOptions.findIndex((opt) => opt.value === responsesReasoningEffort)), isFocused: true, onSelect: (item) => {
|
|
562570
|
+
if (item.value === "__MANUAL_INPUT__") {
|
|
562571
|
+
setIsEditing(false);
|
|
562572
|
+
state.setManualInputMode(true);
|
|
562573
|
+
state.setManualInputValue(responsesReasoningEffort);
|
|
562574
|
+
return;
|
|
562575
|
+
}
|
|
562576
|
+
setResponsesReasoningEffort(item.value);
|
|
562151
562577
|
setIsEditing(false);
|
|
562152
562578
|
} });
|
|
562153
562579
|
}
|
|
562154
|
-
var
|
|
562580
|
+
var import_react74;
|
|
562155
562581
|
var init_ConfigSelectPanel = __esm({
|
|
562156
562582
|
async "dist/ui/pages/configScreen/ConfigSelectPanel.js"() {
|
|
562157
562583
|
"use strict";
|
|
562158
|
-
|
|
562584
|
+
import_react74 = __toESM(require_react(), 1);
|
|
562159
562585
|
await init_src();
|
|
562160
562586
|
await init_build3();
|
|
562161
562587
|
await init_ScrollableSelectInput();
|
|
562162
562588
|
init_configManager();
|
|
562163
|
-
|
|
562164
|
-
});
|
|
562165
|
-
|
|
562166
|
-
// dist/ui/pages/configScreen/ConfigSubViews.js
|
|
562167
|
-
function ProfileNameInputView({ state, inlineMode, title, subtitle, label, value, onChange, placeholder, hint }) {
|
|
562168
|
-
const { theme: theme14, errors } = state;
|
|
562169
|
-
return import_react74.default.createElement(
|
|
562170
|
-
Box_default,
|
|
562171
|
-
{ flexDirection: "column", padding: 1 },
|
|
562172
|
-
!inlineMode && import_react74.default.createElement(
|
|
562173
|
-
Box_default,
|
|
562174
|
-
{ marginBottom: 1, borderStyle: "double", borderColor: theme14.colors.menuInfo, paddingX: 2 },
|
|
562175
|
-
import_react74.default.createElement(
|
|
562176
|
-
Box_default,
|
|
562177
|
-
{ flexDirection: "column" },
|
|
562178
|
-
import_react74.default.createElement(dist_default5, { name: "rainbow" }, title),
|
|
562179
|
-
import_react74.default.createElement(Text, { color: theme14.colors.menuSecondary, dimColor: true }, subtitle)
|
|
562180
|
-
)
|
|
562181
|
-
),
|
|
562182
|
-
import_react74.default.createElement(
|
|
562183
|
-
Box_default,
|
|
562184
|
-
{ flexDirection: "column" },
|
|
562185
|
-
import_react74.default.createElement(Text, { color: theme14.colors.menuInfo }, label),
|
|
562186
|
-
import_react74.default.createElement(
|
|
562187
|
-
Box_default,
|
|
562188
|
-
{ marginLeft: 2 },
|
|
562189
|
-
import_react74.default.createElement(build_default2, { value, onChange: (nextValue) => onChange(stripFocusArtifacts(nextValue)), placeholder })
|
|
562190
|
-
)
|
|
562191
|
-
),
|
|
562192
|
-
errors.length > 0 && import_react74.default.createElement(
|
|
562193
|
-
Box_default,
|
|
562194
|
-
{ marginTop: 1 },
|
|
562195
|
-
import_react74.default.createElement(Text, { color: theme14.colors.error }, errors[0])
|
|
562196
|
-
),
|
|
562197
|
-
import_react74.default.createElement(
|
|
562198
|
-
Box_default,
|
|
562199
|
-
{ marginTop: 1 },
|
|
562200
|
-
import_react74.default.createElement(Alert, { variant: "info" }, hint)
|
|
562201
|
-
)
|
|
562202
|
-
);
|
|
562203
|
-
}
|
|
562204
|
-
function ProfileCreateView({ state, inlineMode }) {
|
|
562205
|
-
const { t, newProfileName, setNewProfileName } = state;
|
|
562206
|
-
return import_react74.default.createElement(ProfileNameInputView, { state, inlineMode, title: t.configScreen.createNewProfile, subtitle: t.configScreen.enterProfileName, label: t.configScreen.profileNameLabel, value: newProfileName, onChange: setNewProfileName, placeholder: t.configScreen.profileNamePlaceholder, hint: t.configScreen.createHint });
|
|
562207
|
-
}
|
|
562208
|
-
function ProfileRenameView({ state, inlineMode }) {
|
|
562209
|
-
const { t, renameProfileName, setRenameProfileName } = state;
|
|
562210
|
-
return import_react74.default.createElement(ProfileNameInputView, { state, inlineMode, title: t.configScreen.renameProfile, subtitle: t.configScreen.enterRenameProfileName, label: t.configScreen.profileNameLabel, value: renameProfileName, onChange: setRenameProfileName, placeholder: t.configScreen.renameProfilePlaceholder, hint: t.configScreen.renameHint });
|
|
562211
|
-
}
|
|
562212
|
-
function ProfileDeleteView({ state, inlineMode }) {
|
|
562213
|
-
const { t, theme: theme14, markedProfiles, errors } = state;
|
|
562214
|
-
const profilesToDelete = Array.from(markedProfiles);
|
|
562215
|
-
return import_react74.default.createElement(
|
|
562216
|
-
Box_default,
|
|
562217
|
-
{ flexDirection: "column", padding: 1 },
|
|
562218
|
-
!inlineMode && import_react74.default.createElement(
|
|
562219
|
-
Box_default,
|
|
562220
|
-
{ marginBottom: 1, borderStyle: "double", borderColor: theme14.colors.menuInfo, paddingX: 2 },
|
|
562221
|
-
import_react74.default.createElement(
|
|
562222
|
-
Box_default,
|
|
562223
|
-
{ flexDirection: "column" },
|
|
562224
|
-
import_react74.default.createElement(dist_default5, { name: "rainbow" }, t.configScreen.deleteProfile),
|
|
562225
|
-
import_react74.default.createElement(Text, { color: theme14.colors.menuSecondary, dimColor: true }, t.configScreen.confirmDelete)
|
|
562226
|
-
)
|
|
562227
|
-
),
|
|
562228
|
-
import_react74.default.createElement(
|
|
562229
|
-
Box_default,
|
|
562230
|
-
{ flexDirection: "column" },
|
|
562231
|
-
import_react74.default.createElement(Text, { color: theme14.colors.warning }, t.configScreen.confirmDeleteProfiles.replace("{count}", String(profilesToDelete.length))),
|
|
562232
|
-
import_react74.default.createElement(Box_default, { marginTop: 1, flexDirection: "column" }, profilesToDelete.map((profileName) => import_react74.default.createElement(
|
|
562233
|
-
Text,
|
|
562234
|
-
{ key: profileName, color: theme14.colors.menuSecondary },
|
|
562235
|
-
"\u2022 ",
|
|
562236
|
-
profileName
|
|
562237
|
-
))),
|
|
562238
|
-
import_react74.default.createElement(Text, { color: theme14.colors.menuSecondary, dimColor: true }, t.configScreen.deleteWarning)
|
|
562239
|
-
),
|
|
562240
|
-
errors.length > 0 && import_react74.default.createElement(
|
|
562241
|
-
Box_default,
|
|
562242
|
-
{ marginTop: 1 },
|
|
562243
|
-
import_react74.default.createElement(Text, { color: theme14.colors.error }, errors[0])
|
|
562244
|
-
),
|
|
562245
|
-
import_react74.default.createElement(
|
|
562246
|
-
Box_default,
|
|
562247
|
-
{ marginTop: 1 },
|
|
562248
|
-
import_react74.default.createElement(Alert, { variant: "warning" }, t.configScreen.confirmHint)
|
|
562249
|
-
)
|
|
562250
|
-
);
|
|
562251
|
-
}
|
|
562252
|
-
function LoadingView({ state, inlineMode }) {
|
|
562253
|
-
const { t, theme: theme14 } = state;
|
|
562254
|
-
return import_react74.default.createElement(
|
|
562255
|
-
Box_default,
|
|
562256
|
-
{ flexDirection: "column", padding: 1 },
|
|
562257
|
-
!inlineMode && import_react74.default.createElement(
|
|
562258
|
-
Box_default,
|
|
562259
|
-
{ marginBottom: 1, borderStyle: "double", borderColor: theme14.colors.menuInfo, paddingX: 2 },
|
|
562260
|
-
import_react74.default.createElement(
|
|
562261
|
-
Box_default,
|
|
562262
|
-
{ flexDirection: "column" },
|
|
562263
|
-
import_react74.default.createElement(dist_default5, { name: "rainbow" }, t.configScreen.title),
|
|
562264
|
-
import_react74.default.createElement(Text, { color: theme14.colors.menuSecondary, dimColor: true }, t.configScreen.loadingMessage)
|
|
562265
|
-
)
|
|
562266
|
-
),
|
|
562267
|
-
import_react74.default.createElement(
|
|
562268
|
-
Box_default,
|
|
562269
|
-
{ flexDirection: "column" },
|
|
562270
|
-
import_react74.default.createElement(
|
|
562271
|
-
Box_default,
|
|
562272
|
-
null,
|
|
562273
|
-
import_react74.default.createElement(Spinner2, { type: "dots" }),
|
|
562274
|
-
import_react74.default.createElement(
|
|
562275
|
-
Text,
|
|
562276
|
-
{ color: theme14.colors.menuInfo },
|
|
562277
|
-
" ",
|
|
562278
|
-
t.configScreen.fetchingModels
|
|
562279
|
-
)
|
|
562280
|
-
),
|
|
562281
|
-
import_react74.default.createElement(
|
|
562282
|
-
Box_default,
|
|
562283
|
-
{ marginLeft: 2 },
|
|
562284
|
-
import_react74.default.createElement(Text, { color: theme14.colors.menuSecondary, dimColor: true }, t.configScreen.fetchingHint)
|
|
562285
|
-
)
|
|
562286
|
-
),
|
|
562287
|
-
import_react74.default.createElement(
|
|
562288
|
-
Box_default,
|
|
562289
|
-
{ flexDirection: "column", marginTop: 1 },
|
|
562290
|
-
import_react74.default.createElement(Alert, { variant: "info" }, t.configScreen.loadingCancelHint)
|
|
562291
|
-
)
|
|
562292
|
-
);
|
|
562293
|
-
}
|
|
562294
|
-
function ManualInputView({ state, inlineMode }) {
|
|
562295
|
-
const { t, theme: theme14, currentField, manualInputValue, loadError } = state;
|
|
562296
|
-
return import_react74.default.createElement(
|
|
562297
|
-
Box_default,
|
|
562298
|
-
{ flexDirection: "column", padding: 1 },
|
|
562299
|
-
!inlineMode && import_react74.default.createElement(
|
|
562300
|
-
Box_default,
|
|
562301
|
-
{ marginBottom: 1, borderStyle: "double", borderColor: theme14.colors.menuInfo, paddingX: 2 },
|
|
562302
|
-
import_react74.default.createElement(
|
|
562303
|
-
Box_default,
|
|
562304
|
-
{ flexDirection: "column" },
|
|
562305
|
-
import_react74.default.createElement(dist_default5, { name: "rainbow" }, t.configScreen.manualInputTitle),
|
|
562306
|
-
import_react74.default.createElement(Text, { color: theme14.colors.menuSecondary, dimColor: true }, t.configScreen.manualInputSubtitle)
|
|
562307
|
-
)
|
|
562308
|
-
),
|
|
562309
|
-
loadError && import_react74.default.createElement(
|
|
562310
|
-
Box_default,
|
|
562311
|
-
{ flexDirection: "column", marginBottom: 1 },
|
|
562312
|
-
import_react74.default.createElement(Text, { color: theme14.colors.warning }, t.configScreen.loadingError),
|
|
562313
|
-
import_react74.default.createElement(Text, { color: theme14.colors.menuSecondary, dimColor: true }, loadError)
|
|
562314
|
-
),
|
|
562315
|
-
import_react74.default.createElement(
|
|
562316
|
-
Box_default,
|
|
562317
|
-
{ flexDirection: "column" },
|
|
562318
|
-
import_react74.default.createElement(
|
|
562319
|
-
Text,
|
|
562320
|
-
{ color: theme14.colors.menuInfo },
|
|
562321
|
-
currentField === "advancedModel" && t.configScreen.advancedModel,
|
|
562322
|
-
currentField === "basicModel" && t.configScreen.basicModel,
|
|
562323
|
-
currentField === "visionModel" && t.configScreen.visionModel
|
|
562324
|
-
),
|
|
562325
|
-
import_react74.default.createElement(
|
|
562326
|
-
Box_default,
|
|
562327
|
-
{ marginLeft: 2 },
|
|
562328
|
-
import_react74.default.createElement(
|
|
562329
|
-
Text,
|
|
562330
|
-
{ color: theme14.colors.menuSelected },
|
|
562331
|
-
`> ${manualInputValue}`,
|
|
562332
|
-
import_react74.default.createElement(Text, { color: theme14.colors.menuNormal }, "_")
|
|
562333
|
-
)
|
|
562334
|
-
)
|
|
562335
|
-
),
|
|
562336
|
-
import_react74.default.createElement(
|
|
562337
|
-
Box_default,
|
|
562338
|
-
{ flexDirection: "column", marginTop: 1 },
|
|
562339
|
-
import_react74.default.createElement(Alert, { variant: "info" }, t.configScreen.manualInputHint)
|
|
562340
|
-
)
|
|
562341
|
-
);
|
|
562342
|
-
}
|
|
562343
|
-
var import_react74;
|
|
562344
|
-
var init_ConfigSubViews = __esm({
|
|
562345
|
-
async "dist/ui/pages/configScreen/ConfigSubViews.js"() {
|
|
562346
|
-
"use strict";
|
|
562347
|
-
import_react74 = __toESM(require_react(), 1);
|
|
562348
|
-
await init_src();
|
|
562349
|
-
await init_dist8();
|
|
562350
|
-
await init_build3();
|
|
562351
|
-
await init_build4();
|
|
562352
|
-
init_types8();
|
|
562589
|
+
await init_ConfigSubViews();
|
|
562353
562590
|
}
|
|
562354
562591
|
});
|
|
562355
562592
|
|
|
@@ -675143,6 +675380,7 @@ var init_ModelsPanel = __esm({
|
|
|
675143
675380
|
const [isGeminiLevelSelecting, setIsGeminiLevelSelecting] = (0, import_react187.useState)(false);
|
|
675144
675381
|
const [responsesReasoningEnabled, setResponsesReasoningEnabled] = (0, import_react187.useState)(false);
|
|
675145
675382
|
const [responsesReasoningEffort, setResponsesReasoningEffort] = (0, import_react187.useState)("high");
|
|
675383
|
+
const [responsesReasoningMode, setResponsesReasoningMode] = (0, import_react187.useState)(void 0);
|
|
675146
675384
|
const [responsesFastMode, setResponsesFastMode] = (0, import_react187.useState)(false);
|
|
675147
675385
|
const [responsesVerbosity, setResponsesVerbosity] = (0, import_react187.useState)("medium");
|
|
675148
675386
|
const [thinkingFocusIndex, setThinkingFocusIndex] = (0, import_react187.useState)(0);
|
|
@@ -675150,6 +675388,7 @@ var init_ModelsPanel = __esm({
|
|
|
675150
675388
|
const [thinkingInputValue, setThinkingInputValue] = (0, import_react187.useState)("");
|
|
675151
675389
|
const [isThinkingModeSelecting, setIsThinkingModeSelecting] = (0, import_react187.useState)(false);
|
|
675152
675390
|
const [isThinkingEffortSelecting, setIsThinkingEffortSelecting] = (0, import_react187.useState)(false);
|
|
675391
|
+
const [isResponsesModeSelecting, setIsResponsesModeSelecting] = (0, import_react187.useState)(false);
|
|
675153
675392
|
const [isVerbositySelecting, setIsVerbositySelecting] = (0, import_react187.useState)(false);
|
|
675154
675393
|
const [anthropicSpeed, setAnthropicSpeed] = (0, import_react187.useState)(void 0);
|
|
675155
675394
|
const [isSpeedSelecting, setIsSpeedSelecting] = (0, import_react187.useState)(false);
|
|
@@ -675157,7 +675396,7 @@ var init_ModelsPanel = __esm({
|
|
|
675157
675396
|
const [chatReasoningEffort, setChatReasoningEffort] = (0, import_react187.useState)("high");
|
|
675158
675397
|
const [isChatEffortSelecting, setIsChatEffortSelecting] = (0, import_react187.useState)(false);
|
|
675159
675398
|
(0, import_react187.useEffect)(() => {
|
|
675160
|
-
var _a20, _b14, _c6, _d4, _e2, _f, _g, _h, _i, _j, _k;
|
|
675399
|
+
var _a20, _b14, _c6, _d4, _e2, _f, _g, _h, _i, _j, _k, _l, _m;
|
|
675161
675400
|
if (!visible) {
|
|
675162
675401
|
return;
|
|
675163
675402
|
}
|
|
@@ -675176,6 +675415,7 @@ var init_ModelsPanel = __esm({
|
|
|
675176
675415
|
setThinkingInputMode(null);
|
|
675177
675416
|
setThinkingInputValue("");
|
|
675178
675417
|
setIsThinkingEffortSelecting(false);
|
|
675418
|
+
setIsResponsesModeSelecting(false);
|
|
675179
675419
|
setIsVerbositySelecting(false);
|
|
675180
675420
|
setIsSpeedSelecting(false);
|
|
675181
675421
|
setErrorMessage("");
|
|
@@ -675191,11 +675431,12 @@ var init_ModelsPanel = __esm({
|
|
|
675191
675431
|
setIsGeminiLevelSelecting(false);
|
|
675192
675432
|
setResponsesReasoningEnabled(((_h = cfg.responsesReasoning) == null ? void 0 : _h.enabled) || false);
|
|
675193
675433
|
setResponsesReasoningEffort(((_i = cfg.responsesReasoning) == null ? void 0 : _i.effort) || "high");
|
|
675434
|
+
setResponsesReasoningMode(((_j = cfg.responsesReasoning) == null ? void 0 : _j.mode) === "standard" || ((_k = cfg.responsesReasoning) == null ? void 0 : _k.mode) === "pro" ? cfg.responsesReasoning.mode : void 0);
|
|
675194
675435
|
setResponsesFastMode(cfg.responsesFastMode || false);
|
|
675195
675436
|
setResponsesVerbosity(cfg.responsesVerbosity || "medium");
|
|
675196
675437
|
setAnthropicSpeed(cfg.anthropicSpeed);
|
|
675197
|
-
setChatThinkingEnabled(((
|
|
675198
|
-
setChatReasoningEffort(((
|
|
675438
|
+
setChatThinkingEnabled(((_l = cfg.chatThinking) == null ? void 0 : _l.enabled) || false);
|
|
675439
|
+
setChatReasoningEffort(((_m = cfg.chatThinking) == null ? void 0 : _m.reasoning_effort) || "high");
|
|
675199
675440
|
setIsChatEffortSelecting(false);
|
|
675200
675441
|
}, [visible, advancedModel, basicModel]);
|
|
675201
675442
|
(0, import_react187.useEffect)(() => {
|
|
@@ -675393,7 +675634,8 @@ var init_ModelsPanel = __esm({
|
|
|
675393
675634
|
await updateSnowConfig({
|
|
675394
675635
|
responsesReasoning: {
|
|
675395
675636
|
enabled: next,
|
|
675396
|
-
effort: responsesReasoningEffort
|
|
675637
|
+
effort: responsesReasoningEffort,
|
|
675638
|
+
mode: responsesReasoningMode
|
|
675397
675639
|
}
|
|
675398
675640
|
});
|
|
675399
675641
|
return;
|
|
@@ -675415,6 +675657,7 @@ var init_ModelsPanel = __esm({
|
|
|
675415
675657
|
thinkingEffort,
|
|
675416
675658
|
geminiThinkingLevel,
|
|
675417
675659
|
responsesReasoningEffort,
|
|
675660
|
+
responsesReasoningMode,
|
|
675418
675661
|
applyChatThinkingEnabled,
|
|
675419
675662
|
t
|
|
675420
675663
|
]);
|
|
@@ -675473,14 +675716,31 @@ var init_ModelsPanel = __esm({
|
|
|
675473
675716
|
await updateSnowConfig({
|
|
675474
675717
|
responsesReasoning: {
|
|
675475
675718
|
enabled: responsesReasoningEnabled,
|
|
675476
|
-
effort
|
|
675719
|
+
effort,
|
|
675720
|
+
mode: responsesReasoningMode
|
|
675477
675721
|
}
|
|
675478
675722
|
});
|
|
675479
675723
|
} catch (err) {
|
|
675480
675724
|
const message = err instanceof Error ? err.message : t.modelsPanel.saveFailed;
|
|
675481
675725
|
setErrorMessage(message);
|
|
675482
675726
|
}
|
|
675483
|
-
}, [responsesReasoningEnabled]);
|
|
675727
|
+
}, [responsesReasoningEnabled, responsesReasoningMode]);
|
|
675728
|
+
const applyResponsesMode = (0, import_react187.useCallback)(async (mode) => {
|
|
675729
|
+
setErrorMessage("");
|
|
675730
|
+
try {
|
|
675731
|
+
setResponsesReasoningMode(mode);
|
|
675732
|
+
await updateSnowConfig({
|
|
675733
|
+
responsesReasoning: {
|
|
675734
|
+
enabled: responsesReasoningEnabled,
|
|
675735
|
+
effort: responsesReasoningEffort,
|
|
675736
|
+
mode
|
|
675737
|
+
}
|
|
675738
|
+
});
|
|
675739
|
+
} catch (err) {
|
|
675740
|
+
const message = err instanceof Error ? err.message : t.modelsPanel.saveFailed;
|
|
675741
|
+
setErrorMessage(message);
|
|
675742
|
+
}
|
|
675743
|
+
}, [responsesReasoningEnabled, responsesReasoningEffort]);
|
|
675484
675744
|
const applyResponsesVerbosity = (0, import_react187.useCallback)(async (verbosity2) => {
|
|
675485
675745
|
setErrorMessage("");
|
|
675486
675746
|
try {
|
|
@@ -675536,7 +675796,7 @@ var init_ModelsPanel = __esm({
|
|
|
675536
675796
|
if (requestMethod === "anthropic")
|
|
675537
675797
|
return 4;
|
|
675538
675798
|
if (requestMethod === "responses")
|
|
675539
|
-
return
|
|
675799
|
+
return 5;
|
|
675540
675800
|
if (requestMethod === "gemini")
|
|
675541
675801
|
return 2;
|
|
675542
675802
|
if (requestMethod === "chat")
|
|
@@ -675567,6 +675827,10 @@ var init_ModelsPanel = __esm({
|
|
|
675567
675827
|
setIsThinkingEffortSelecting(false);
|
|
675568
675828
|
return;
|
|
675569
675829
|
}
|
|
675830
|
+
if (isResponsesModeSelecting) {
|
|
675831
|
+
setIsResponsesModeSelecting(false);
|
|
675832
|
+
return;
|
|
675833
|
+
}
|
|
675570
675834
|
if (isVerbositySelecting) {
|
|
675571
675835
|
setIsVerbositySelecting(false);
|
|
675572
675836
|
return;
|
|
@@ -675602,12 +675866,37 @@ var init_ModelsPanel = __esm({
|
|
|
675602
675866
|
return;
|
|
675603
675867
|
}
|
|
675604
675868
|
if (thinkingInputMode) {
|
|
675605
|
-
if (
|
|
675606
|
-
|
|
675607
|
-
|
|
675608
|
-
if (
|
|
675869
|
+
if (thinkingInputMode === "anthropicBudgetTokens") {
|
|
675870
|
+
if (key.return) {
|
|
675871
|
+
const parsed = Number.parseInt(thinkingInputValue.trim(), 10);
|
|
675872
|
+
if (!Number.isNaN(parsed) && parsed >= 0) {
|
|
675609
675873
|
void applyAnthropicBudgetTokens(parsed);
|
|
675610
675874
|
}
|
|
675875
|
+
setThinkingInputMode(null);
|
|
675876
|
+
setThinkingInputValue("");
|
|
675877
|
+
return;
|
|
675878
|
+
}
|
|
675879
|
+
if (key.backspace || key.delete) {
|
|
675880
|
+
setThinkingInputValue((prev) => prev.slice(0, -1));
|
|
675881
|
+
return;
|
|
675882
|
+
}
|
|
675883
|
+
if (input2 && /[0-9]/.test(input2)) {
|
|
675884
|
+
setThinkingInputValue((prev) => prev + input2);
|
|
675885
|
+
}
|
|
675886
|
+
return;
|
|
675887
|
+
}
|
|
675888
|
+
if (key.return) {
|
|
675889
|
+
const cleaned = thinkingInputValue.trim();
|
|
675890
|
+
if (cleaned) {
|
|
675891
|
+
if (thinkingInputMode === "thinkingEffort") {
|
|
675892
|
+
void applyThinkingEffort(cleaned);
|
|
675893
|
+
} else if (thinkingInputMode === "geminiThinkingLevel") {
|
|
675894
|
+
void applyGeminiLevel(cleaned);
|
|
675895
|
+
} else if (thinkingInputMode === "responsesReasoningEffort") {
|
|
675896
|
+
void applyResponsesEffort(cleaned);
|
|
675897
|
+
} else if (thinkingInputMode === "chatReasoningEffort") {
|
|
675898
|
+
void applyChatReasoningEffort(cleaned);
|
|
675899
|
+
}
|
|
675611
675900
|
}
|
|
675612
675901
|
setThinkingInputMode(null);
|
|
675613
675902
|
setThinkingInputValue("");
|
|
@@ -675617,7 +675906,7 @@ var init_ModelsPanel = __esm({
|
|
|
675617
675906
|
setThinkingInputValue((prev) => prev.slice(0, -1));
|
|
675618
675907
|
return;
|
|
675619
675908
|
}
|
|
675620
|
-
if (input2 && /[
|
|
675909
|
+
if (input2 && /[a-zA-Z0-9_-]/.test(input2)) {
|
|
675621
675910
|
setThinkingInputValue((prev) => prev + input2);
|
|
675622
675911
|
}
|
|
675623
675912
|
return;
|
|
@@ -675646,7 +675935,7 @@ var init_ModelsPanel = __esm({
|
|
|
675646
675935
|
}
|
|
675647
675936
|
return;
|
|
675648
675937
|
}
|
|
675649
|
-
if (isThinkingModeSelecting || isGeminiLevelSelecting || isThinkingEffortSelecting || isVerbositySelecting || isSpeedSelecting || isChatEffortSelecting) {
|
|
675938
|
+
if (isThinkingModeSelecting || isGeminiLevelSelecting || isThinkingEffortSelecting || isResponsesModeSelecting || isVerbositySelecting || isSpeedSelecting || isChatEffortSelecting) {
|
|
675650
675939
|
return;
|
|
675651
675940
|
}
|
|
675652
675941
|
if (key.tab) {
|
|
@@ -675686,14 +675975,16 @@ var init_ModelsPanel = __esm({
|
|
|
675686
675975
|
setIsThinkingEffortSelecting(true);
|
|
675687
675976
|
}
|
|
675688
675977
|
} else if (requestMethod === "responses") {
|
|
675689
|
-
|
|
675978
|
+
setIsResponsesModeSelecting(true);
|
|
675690
675979
|
}
|
|
675691
675980
|
} else if (thinkingFocusIndex === 4) {
|
|
675692
675981
|
if (requestMethod === "anthropic") {
|
|
675693
675982
|
setIsSpeedSelecting(true);
|
|
675694
675983
|
} else if (requestMethod === "responses") {
|
|
675695
|
-
|
|
675984
|
+
setIsVerbositySelecting(true);
|
|
675696
675985
|
}
|
|
675986
|
+
} else if (thinkingFocusIndex === 5 && requestMethod === "responses") {
|
|
675987
|
+
void applyResponsesFastMode(!responsesFastMode);
|
|
675697
675988
|
}
|
|
675698
675989
|
return;
|
|
675699
675990
|
}
|
|
@@ -675853,13 +676144,13 @@ var init_ModelsPanel = __esm({
|
|
|
675853
676144
|
Text,
|
|
675854
676145
|
{ color: thinkingFocusIndex === 3 ? theme14.colors.menuSelected : theme14.colors.menuNormal },
|
|
675855
676146
|
thinkingFocusIndex === 3 ? "\u276F " : " ",
|
|
675856
|
-
t.configScreen.
|
|
676147
|
+
t.configScreen.responsesReasoningMode
|
|
675857
676148
|
),
|
|
675858
676149
|
import_react187.default.createElement(
|
|
675859
676150
|
Text,
|
|
675860
676151
|
{ color: theme14.colors.menuSelected },
|
|
675861
676152
|
" ",
|
|
675862
|
-
|
|
676153
|
+
responsesReasoningMode ?? t.configScreen.responsesReasoningModeNone
|
|
675863
676154
|
)
|
|
675864
676155
|
),
|
|
675865
676156
|
requestMethod === "responses" && import_react187.default.createElement(
|
|
@@ -675869,6 +676160,22 @@ var init_ModelsPanel = __esm({
|
|
|
675869
676160
|
Text,
|
|
675870
676161
|
{ color: thinkingFocusIndex === 4 ? theme14.colors.menuSelected : theme14.colors.menuNormal },
|
|
675871
676162
|
thinkingFocusIndex === 4 ? "\u276F " : " ",
|
|
676163
|
+
t.configScreen.responsesVerbosity
|
|
676164
|
+
),
|
|
676165
|
+
import_react187.default.createElement(
|
|
676166
|
+
Text,
|
|
676167
|
+
{ color: theme14.colors.menuSelected },
|
|
676168
|
+
" ",
|
|
676169
|
+
responsesVerbosity.toUpperCase()
|
|
676170
|
+
)
|
|
676171
|
+
),
|
|
676172
|
+
requestMethod === "responses" && import_react187.default.createElement(
|
|
676173
|
+
Box_default,
|
|
676174
|
+
null,
|
|
676175
|
+
import_react187.default.createElement(
|
|
676176
|
+
Text,
|
|
676177
|
+
{ color: thinkingFocusIndex === 5 ? theme14.colors.menuSelected : theme14.colors.menuNormal },
|
|
676178
|
+
thinkingFocusIndex === 5 ? "\u276F " : " ",
|
|
675872
676179
|
t.configScreen.responsesFastMode
|
|
675873
676180
|
),
|
|
675874
676181
|
import_react187.default.createElement(
|
|
@@ -675881,7 +676188,7 @@ var init_ModelsPanel = __esm({
|
|
|
675881
676188
|
thinkingInputMode && import_react187.default.createElement(
|
|
675882
676189
|
Box_default,
|
|
675883
676190
|
{ flexDirection: "column", marginTop: 1 },
|
|
675884
|
-
import_react187.default.createElement(Text, { color: theme14.colors.menuInfo }, t.modelsPanel.inputNumberHint),
|
|
676191
|
+
import_react187.default.createElement(Text, { color: theme14.colors.menuInfo }, thinkingInputMode === "anthropicBudgetTokens" ? t.modelsPanel.inputNumberHint : t.modelsPanel.manualInputHint),
|
|
675885
676192
|
import_react187.default.createElement(
|
|
675886
676193
|
Box_default,
|
|
675887
676194
|
{ marginLeft: 1 },
|
|
@@ -675916,11 +676223,19 @@ var init_ModelsPanel = __esm({
|
|
|
675916
676223
|
Box_default,
|
|
675917
676224
|
{ marginTop: 1 },
|
|
675918
676225
|
import_react187.default.createElement(ScrollableSelectInput, { items: (requestMethod === "anthropic" ? [
|
|
676226
|
+
{
|
|
676227
|
+
label: t.modelsPanel.manualInputOption,
|
|
676228
|
+
value: "__MANUAL_INPUT__"
|
|
676229
|
+
},
|
|
675919
676230
|
{ label: "low", value: "low" },
|
|
675920
676231
|
{ label: "medium", value: "medium" },
|
|
675921
676232
|
{ label: "high", value: "high" },
|
|
675922
676233
|
{ label: "max", value: "max" }
|
|
675923
676234
|
] : [
|
|
676235
|
+
{
|
|
676236
|
+
label: t.modelsPanel.manualInputOption,
|
|
676237
|
+
value: "__MANUAL_INPUT__"
|
|
676238
|
+
},
|
|
675924
676239
|
{ label: "none", value: "none" },
|
|
675925
676240
|
{ label: "low", value: "low" },
|
|
675926
676241
|
{ label: "medium", value: "medium" },
|
|
@@ -675930,6 +676245,18 @@ var init_ModelsPanel = __esm({
|
|
|
675930
676245
|
label: i.label,
|
|
675931
676246
|
value: i.value
|
|
675932
676247
|
})), 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) => {
|
|
676248
|
+
if (item.value === "__MANUAL_INPUT__") {
|
|
676249
|
+
if (requestMethod === "anthropic") {
|
|
676250
|
+
setIsThinkingEffortSelecting(false);
|
|
676251
|
+
setThinkingInputMode("thinkingEffort");
|
|
676252
|
+
setThinkingInputValue(thinkingEffort);
|
|
676253
|
+
} else {
|
|
676254
|
+
setIsThinkingEffortSelecting(false);
|
|
676255
|
+
setThinkingInputMode("responsesReasoningEffort");
|
|
676256
|
+
setThinkingInputValue(responsesReasoningEffort);
|
|
676257
|
+
}
|
|
676258
|
+
return;
|
|
676259
|
+
}
|
|
675933
676260
|
if (requestMethod === "anthropic") {
|
|
675934
676261
|
void applyThinkingEffort(item.value);
|
|
675935
676262
|
} else {
|
|
@@ -675938,6 +676265,21 @@ var init_ModelsPanel = __esm({
|
|
|
675938
676265
|
setIsThinkingEffortSelecting(false);
|
|
675939
676266
|
} })
|
|
675940
676267
|
),
|
|
676268
|
+
isResponsesModeSelecting && import_react187.default.createElement(
|
|
676269
|
+
Box_default,
|
|
676270
|
+
{ marginTop: 1 },
|
|
676271
|
+
import_react187.default.createElement(ScrollableSelectInput, { items: [
|
|
676272
|
+
{
|
|
676273
|
+
label: t.configScreen.responsesReasoningModeNone,
|
|
676274
|
+
value: "none"
|
|
676275
|
+
},
|
|
676276
|
+
{ label: "standard", value: "standard" },
|
|
676277
|
+
{ label: "pro", value: "pro" }
|
|
676278
|
+
], limit: 3, disableNumberShortcuts: true, initialIndex: Math.max(0, ["none", "standard", "pro"].indexOf(responsesReasoningMode ?? "none")), isFocused: true, onSelect: (item) => {
|
|
676279
|
+
void applyResponsesMode(item.value === "none" ? void 0 : item.value);
|
|
676280
|
+
setIsResponsesModeSelecting(false);
|
|
676281
|
+
} })
|
|
676282
|
+
),
|
|
675941
676283
|
isVerbositySelecting && import_react187.default.createElement(
|
|
675942
676284
|
Box_default,
|
|
675943
676285
|
{ marginTop: 1 },
|
|
@@ -675954,11 +676296,21 @@ var init_ModelsPanel = __esm({
|
|
|
675954
676296
|
Box_default,
|
|
675955
676297
|
{ marginTop: 1 },
|
|
675956
676298
|
import_react187.default.createElement(ScrollableSelectInput, { items: [
|
|
676299
|
+
{
|
|
676300
|
+
label: t.modelsPanel.manualInputOption,
|
|
676301
|
+
value: "__MANUAL_INPUT__"
|
|
676302
|
+
},
|
|
675957
676303
|
{ label: "MINIMAL", value: "minimal" },
|
|
675958
676304
|
{ label: "LOW", value: "low" },
|
|
675959
676305
|
{ label: "MEDIUM", value: "medium" },
|
|
675960
676306
|
{ label: "HIGH", value: "high" }
|
|
675961
676307
|
], limit: 6, disableNumberShortcuts: true, initialIndex: Math.max(0, ["minimal", "low", "medium", "high"].indexOf(geminiThinkingLevel)), isFocused: true, onSelect: (item) => {
|
|
676308
|
+
if (item.value === "__MANUAL_INPUT__") {
|
|
676309
|
+
setIsGeminiLevelSelecting(false);
|
|
676310
|
+
setThinkingInputMode("geminiThinkingLevel");
|
|
676311
|
+
setThinkingInputValue(geminiThinkingLevel);
|
|
676312
|
+
return;
|
|
676313
|
+
}
|
|
675962
676314
|
void applyGeminiLevel(item.value);
|
|
675963
676315
|
setIsGeminiLevelSelecting(false);
|
|
675964
676316
|
} })
|
|
@@ -675985,16 +676337,26 @@ var init_ModelsPanel = __esm({
|
|
|
675985
676337
|
Box_default,
|
|
675986
676338
|
{ marginTop: 1 },
|
|
675987
676339
|
import_react187.default.createElement(ScrollableSelectInput, { items: [
|
|
676340
|
+
{
|
|
676341
|
+
label: t.modelsPanel.manualInputOption,
|
|
676342
|
+
value: "__MANUAL_INPUT__"
|
|
676343
|
+
},
|
|
675988
676344
|
{ label: "LOW", value: "low" },
|
|
675989
676345
|
{ label: "MEDIUM", value: "medium" },
|
|
675990
676346
|
{ label: "HIGH", value: "high" },
|
|
675991
676347
|
{ label: "MAX", value: "max" }
|
|
675992
676348
|
], limit: 6, disableNumberShortcuts: true, initialIndex: Math.max(0, ["low", "medium", "high", "max"].indexOf(chatReasoningEffort)), isFocused: true, onSelect: (item) => {
|
|
676349
|
+
if (item.value === "__MANUAL_INPUT__") {
|
|
676350
|
+
setIsChatEffortSelecting(false);
|
|
676351
|
+
setThinkingInputMode("chatReasoningEffort");
|
|
676352
|
+
setThinkingInputValue(chatReasoningEffort);
|
|
676353
|
+
return;
|
|
676354
|
+
}
|
|
675993
676355
|
void applyChatReasoningEffort(item.value);
|
|
675994
676356
|
setIsChatEffortSelecting(false);
|
|
675995
676357
|
} })
|
|
675996
676358
|
),
|
|
675997
|
-
!thinkingInputMode && !isThinkingModeSelecting && !isGeminiLevelSelecting && !isThinkingEffortSelecting && !isVerbositySelecting && !isSpeedSelecting && !isChatEffortSelecting && import_react187.default.createElement(
|
|
676359
|
+
!thinkingInputMode && !isThinkingModeSelecting && !isGeminiLevelSelecting && !isThinkingEffortSelecting && !isResponsesModeSelecting && !isVerbositySelecting && !isSpeedSelecting && !isChatEffortSelecting && import_react187.default.createElement(
|
|
675998
676360
|
Box_default,
|
|
675999
676361
|
{ marginTop: 1 },
|
|
676000
676362
|
import_react187.default.createElement(Text, { dimColor: true, color: theme14.colors.menuSecondary }, t.modelsPanel.navigationHint)
|
|
@@ -693541,7 +693903,7 @@ var require_package4 = __commonJS({
|
|
|
693541
693903
|
"package.json"(exports2, module2) {
|
|
693542
693904
|
module2.exports = {
|
|
693543
693905
|
name: "snow-ai",
|
|
693544
|
-
version: "0.8.
|
|
693906
|
+
version: "0.8.14",
|
|
693545
693907
|
description: "Agentic coding in your terminal",
|
|
693546
693908
|
license: "MIT",
|
|
693547
693909
|
bin: {
|