fluxflow-cli 2.11.3 → 2.11.5
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/dist/fluxflow.js +78 -24
- package/package.json +1 -1
package/dist/fluxflow.js
CHANGED
|
@@ -3474,6 +3474,7 @@ ${projectContextBlock}
|
|
|
3474
3474
|
-- FORMATTING --
|
|
3475
3475
|
- GFM Supported
|
|
3476
3476
|
- NO CHAT **AFTER** FIRING TOOLS IN THIS TURN
|
|
3477
|
+
- End final response with summary of changes made and files edited
|
|
3477
3478
|
- Basic LaTeX${mode === "Flux" ? "" : ". Kaomojis"}
|
|
3478
3479
|
=== END SYSTEM PROMPT ===`.trim();
|
|
3479
3480
|
};
|
|
@@ -6593,7 +6594,7 @@ var init_ai = __esm({
|
|
|
6593
6594
|
}
|
|
6594
6595
|
return fetch(url, options);
|
|
6595
6596
|
};
|
|
6596
|
-
getDeepSeekStream = async function* (apiKey, model, contents, systemInstruction, thinkingLevel, mode, isMultiModal, signal) {
|
|
6597
|
+
getDeepSeekStream = async function* (apiKey, model, contents, systemInstruction, thinkingLevel, mode, isMultiModal, signal, temperature = 0.9) {
|
|
6597
6598
|
const messages = [];
|
|
6598
6599
|
if (systemInstruction) {
|
|
6599
6600
|
messages.push({ role: "system", content: systemInstruction });
|
|
@@ -6632,7 +6633,8 @@ var init_ai = __esm({
|
|
|
6632
6633
|
model,
|
|
6633
6634
|
messages,
|
|
6634
6635
|
stream: true,
|
|
6635
|
-
stream_options: { include_usage: true }
|
|
6636
|
+
stream_options: { include_usage: true },
|
|
6637
|
+
temperature
|
|
6636
6638
|
};
|
|
6637
6639
|
if (thinkingLevel !== "Fast") {
|
|
6638
6640
|
const reasoningEffortMap = {
|
|
@@ -6724,7 +6726,7 @@ var init_ai = __esm({
|
|
|
6724
6726
|
}
|
|
6725
6727
|
}
|
|
6726
6728
|
};
|
|
6727
|
-
getNVIDIAStream = async function* (apiKey, model, contents, systemInstruction, thinkingLevel, mode, isMultiModal = false, signal) {
|
|
6729
|
+
getNVIDIAStream = async function* (apiKey, model, contents, systemInstruction, thinkingLevel, mode, isMultiModal = false, signal, temperature = 0.8) {
|
|
6728
6730
|
const messages = [];
|
|
6729
6731
|
if (systemInstruction) {
|
|
6730
6732
|
messages.push({ role: "system", content: systemInstruction });
|
|
@@ -6778,7 +6780,8 @@ var init_ai = __esm({
|
|
|
6778
6780
|
messages,
|
|
6779
6781
|
max_tokens: maxTokens,
|
|
6780
6782
|
stream: true,
|
|
6781
|
-
stream_options: { include_usage: true }
|
|
6783
|
+
stream_options: { include_usage: true },
|
|
6784
|
+
temperature
|
|
6782
6785
|
};
|
|
6783
6786
|
if (isKimi) {
|
|
6784
6787
|
body.chat_template_kwargs = { thinking: isThinking };
|
|
@@ -6875,7 +6878,7 @@ var init_ai = __esm({
|
|
|
6875
6878
|
}
|
|
6876
6879
|
}
|
|
6877
6880
|
};
|
|
6878
|
-
getOpenRouterStream = async function* (apiKey, model, contents, systemInstruction, thinkingLevel, mode, isMultiModal, signal) {
|
|
6881
|
+
getOpenRouterStream = async function* (apiKey, model, contents, systemInstruction, thinkingLevel, mode, isMultiModal, signal, temperature = 0.5) {
|
|
6879
6882
|
const messages = [];
|
|
6880
6883
|
if (systemInstruction) {
|
|
6881
6884
|
messages.push({ role: "system", content: systemInstruction });
|
|
@@ -6928,7 +6931,8 @@ var init_ai = __esm({
|
|
|
6928
6931
|
const requestPayload = {
|
|
6929
6932
|
model,
|
|
6930
6933
|
messages,
|
|
6931
|
-
stream: true
|
|
6934
|
+
stream: true,
|
|
6935
|
+
temperature
|
|
6932
6936
|
};
|
|
6933
6937
|
const effort = reasoningEffortMap[thinkingLevel];
|
|
6934
6938
|
if (effort && thinkingLevel !== "Fast") {
|
|
@@ -7118,7 +7122,10 @@ ${originalTextProcessed.length > USER_CONTEXT_LENGTH ? "... (truncated) ...\n\n"
|
|
|
7118
7122
|
janitorPrompt,
|
|
7119
7123
|
"Fast",
|
|
7120
7124
|
// Janitor always minimal
|
|
7121
|
-
mode
|
|
7125
|
+
mode,
|
|
7126
|
+
false,
|
|
7127
|
+
null,
|
|
7128
|
+
0.4
|
|
7122
7129
|
);
|
|
7123
7130
|
const iterator2 = stream[Symbol.asyncIterator]();
|
|
7124
7131
|
const firstResult2 = await iterator2.next();
|
|
@@ -7132,7 +7139,9 @@ ${originalTextProcessed.length > USER_CONTEXT_LENGTH ? "... (truncated) ...\n\n"
|
|
|
7132
7139
|
"Fast",
|
|
7133
7140
|
// Janitor always minimal
|
|
7134
7141
|
mode,
|
|
7135
|
-
false
|
|
7142
|
+
false,
|
|
7143
|
+
null,
|
|
7144
|
+
0.4
|
|
7136
7145
|
);
|
|
7137
7146
|
const iterator2 = stream[Symbol.asyncIterator]();
|
|
7138
7147
|
const firstResult2 = await iterator2.next();
|
|
@@ -7146,7 +7155,9 @@ ${originalTextProcessed.length > USER_CONTEXT_LENGTH ? "... (truncated) ...\n\n"
|
|
|
7146
7155
|
"Fast",
|
|
7147
7156
|
// Janitor always minimal
|
|
7148
7157
|
mode,
|
|
7149
|
-
false
|
|
7158
|
+
false,
|
|
7159
|
+
null,
|
|
7160
|
+
0.4
|
|
7150
7161
|
);
|
|
7151
7162
|
const iterator2 = stream[Symbol.asyncIterator]();
|
|
7152
7163
|
const firstResult2 = await iterator2.next();
|
|
@@ -7158,7 +7169,7 @@ ${originalTextProcessed.length > USER_CONTEXT_LENGTH ? "... (truncated) ...\n\n"
|
|
|
7158
7169
|
config: {
|
|
7159
7170
|
systemInstruction: janitorPrompt,
|
|
7160
7171
|
maxOutputTokens: 512,
|
|
7161
|
-
temperature: 0.
|
|
7172
|
+
temperature: 0.4,
|
|
7162
7173
|
safetySettings: [
|
|
7163
7174
|
{ category: HarmCategory.HARM_CATEGORY_HARASSMENT, threshold: HarmBlockThreshold.BLOCK_NONE },
|
|
7164
7175
|
{ category: HarmCategory.HARM_CATEGORY_HATE_SPEECH, threshold: HarmBlockThreshold.BLOCK_NONE },
|
|
@@ -7518,18 +7529,18 @@ ${originalTextProcessed.length > USER_CONTEXT_LENGTH ? "... (truncated) ...\n\n"
|
|
|
7518
7529
|
client = new GoogleGenAI({ apiKey });
|
|
7519
7530
|
return client;
|
|
7520
7531
|
};
|
|
7521
|
-
generateSimpleContent = async (settings, model, contents, systemInstruction, thinkingLevel = "Fast") => {
|
|
7532
|
+
generateSimpleContent = async (settings, model, contents, systemInstruction, thinkingLevel = "Fast", temperature = 0.4) => {
|
|
7522
7533
|
const { aiProvider = "Google", apiKey, mode } = settings;
|
|
7523
7534
|
let fullText = "";
|
|
7524
7535
|
let usageMetadata = null;
|
|
7525
7536
|
const normalizedContents = typeof contents === "string" ? [{ role: "user", parts: [{ text: contents }] }] : contents;
|
|
7526
7537
|
let stream;
|
|
7527
7538
|
if (aiProvider === "OpenRouter") {
|
|
7528
|
-
stream = getOpenRouterStream(apiKey, model, normalizedContents, systemInstruction, thinkingLevel, mode, false);
|
|
7539
|
+
stream = getOpenRouterStream(apiKey, model, normalizedContents, systemInstruction, thinkingLevel, mode, false, null, temperature);
|
|
7529
7540
|
} else if (aiProvider === "DeepSeek") {
|
|
7530
|
-
stream = getDeepSeekStream(apiKey, model, normalizedContents, systemInstruction, thinkingLevel, mode, false);
|
|
7541
|
+
stream = getDeepSeekStream(apiKey, model, normalizedContents, systemInstruction, thinkingLevel, mode, false, null, temperature);
|
|
7531
7542
|
} else if (aiProvider === "NVIDIA") {
|
|
7532
|
-
stream = getNVIDIAStream(apiKey, model, normalizedContents, systemInstruction, thinkingLevel, mode, false);
|
|
7543
|
+
stream = getNVIDIAStream(apiKey, model, normalizedContents, systemInstruction, thinkingLevel, mode, false, null, temperature);
|
|
7533
7544
|
} else {
|
|
7534
7545
|
const genStream = await client.models.generateContentStream({
|
|
7535
7546
|
model,
|
|
@@ -7537,7 +7548,7 @@ ${originalTextProcessed.length > USER_CONTEXT_LENGTH ? "... (truncated) ...\n\n"
|
|
|
7537
7548
|
config: {
|
|
7538
7549
|
systemInstruction,
|
|
7539
7550
|
maxOutputTokens: 2048,
|
|
7540
|
-
temperature
|
|
7551
|
+
temperature,
|
|
7541
7552
|
thinkingConfig: { includeThoughts: false, thinkingLevel: ThinkingLevel.MINIMAL }
|
|
7542
7553
|
}
|
|
7543
7554
|
});
|
|
@@ -8605,7 +8616,8 @@ ${ideErr} [/ERROR]`;
|
|
|
8605
8616
|
thinkingLevel,
|
|
8606
8617
|
mode,
|
|
8607
8618
|
isMultiModal,
|
|
8608
|
-
abortController.signal
|
|
8619
|
+
abortController.signal,
|
|
8620
|
+
0.5
|
|
8609
8621
|
);
|
|
8610
8622
|
} else if (aiProvider === "DeepSeek") {
|
|
8611
8623
|
stream = getDeepSeekStream(
|
|
@@ -8616,7 +8628,8 @@ ${ideErr} [/ERROR]`;
|
|
|
8616
8628
|
thinkingLevel,
|
|
8617
8629
|
mode,
|
|
8618
8630
|
isMultiModal,
|
|
8619
|
-
abortController.signal
|
|
8631
|
+
abortController.signal,
|
|
8632
|
+
0.9
|
|
8620
8633
|
);
|
|
8621
8634
|
} else if (aiProvider === "NVIDIA") {
|
|
8622
8635
|
stream = getNVIDIAStream(
|
|
@@ -8627,15 +8640,17 @@ ${ideErr} [/ERROR]`;
|
|
|
8627
8640
|
thinkingLevel,
|
|
8628
8641
|
mode,
|
|
8629
8642
|
isMultiModal,
|
|
8630
|
-
abortController.signal
|
|
8643
|
+
abortController.signal,
|
|
8644
|
+
0.8
|
|
8631
8645
|
);
|
|
8632
8646
|
} else {
|
|
8633
8647
|
const apiCallPromise = client.models.generateContentStream({
|
|
8634
|
-
model: targetModel || "
|
|
8648
|
+
model: targetModel || "gemini-3-flash-preview",
|
|
8635
8649
|
contents: activeContents,
|
|
8636
8650
|
config: {
|
|
8637
8651
|
systemInstruction: currentSystemInstruction,
|
|
8638
8652
|
mediaResolution: "MEDIA_RESOLUTION_MEDIUM",
|
|
8653
|
+
temperature: 1.05,
|
|
8639
8654
|
safetySettings: [
|
|
8640
8655
|
{ category: HarmCategory.HARM_CATEGORY_HARASSMENT, threshold: HarmBlockThreshold.BLOCK_NONE },
|
|
8641
8656
|
{ category: HarmCategory.HARM_CATEGORY_HATE_SPEECH, threshold: HarmBlockThreshold.BLOCK_NONE },
|
|
@@ -8765,14 +8780,53 @@ ${ideErr} [/ERROR]`;
|
|
|
8765
8780
|
break;
|
|
8766
8781
|
}
|
|
8767
8782
|
}
|
|
8768
|
-
|
|
8783
|
+
let endIdx = -1;
|
|
8784
|
+
if (activeBufferType === "tool") {
|
|
8785
|
+
let balance = 0;
|
|
8786
|
+
let inString = null;
|
|
8787
|
+
let bracketBalance = 0;
|
|
8788
|
+
let passedParen = false;
|
|
8789
|
+
for (let i = 0; i < combined.length; i++) {
|
|
8790
|
+
const char = combined[i];
|
|
8791
|
+
if (inString) {
|
|
8792
|
+
if (char === inString) {
|
|
8793
|
+
let backslashCount = 0;
|
|
8794
|
+
for (let j = i - 1; j >= 0 && combined[j] === "\\"; j--) {
|
|
8795
|
+
backslashCount++;
|
|
8796
|
+
}
|
|
8797
|
+
if (backslashCount % 2 === 0) {
|
|
8798
|
+
inString = null;
|
|
8799
|
+
}
|
|
8800
|
+
}
|
|
8801
|
+
} else {
|
|
8802
|
+
if (char === '"' || char === "'" || char === "`") {
|
|
8803
|
+
inString = char;
|
|
8804
|
+
} else if (char === "(") {
|
|
8805
|
+
balance++;
|
|
8806
|
+
passedParen = true;
|
|
8807
|
+
} else if (char === ")") {
|
|
8808
|
+
balance--;
|
|
8809
|
+
} else if (char === "[") {
|
|
8810
|
+
bracketBalance++;
|
|
8811
|
+
} else if (char === "]") {
|
|
8812
|
+
if (passedParen && balance === 0 && bracketBalance === 1) {
|
|
8813
|
+
endIdx = i;
|
|
8814
|
+
break;
|
|
8815
|
+
}
|
|
8816
|
+
bracketBalance--;
|
|
8817
|
+
}
|
|
8818
|
+
}
|
|
8819
|
+
}
|
|
8820
|
+
} else {
|
|
8821
|
+
endIdx = combined.indexOf(endTag);
|
|
8822
|
+
}
|
|
8769
8823
|
if (endIdx !== -1) {
|
|
8770
|
-
const fullMatch = combined.substring(0, endIdx +
|
|
8824
|
+
const fullMatch = combined.substring(0, endIdx + 1);
|
|
8771
8825
|
msgs.push({ type: "text", content: fullMatch });
|
|
8772
8826
|
toolCallBuffer = "";
|
|
8773
8827
|
isBufferingToolCall = false;
|
|
8774
8828
|
activeBufferType = null;
|
|
8775
|
-
remaining = combined.substring(endIdx +
|
|
8829
|
+
remaining = combined.substring(endIdx + 1);
|
|
8776
8830
|
} else {
|
|
8777
8831
|
const MAX_BUFFER = 512;
|
|
8778
8832
|
if (combined.length > MAX_BUFFER) {
|
|
@@ -12357,8 +12411,8 @@ function App({ args = [] }) {
|
|
|
12357
12411
|
cmd: "/budget",
|
|
12358
12412
|
desc: "Set or View budget limits",
|
|
12359
12413
|
subs: [
|
|
12360
|
-
{ cmd: "
|
|
12361
|
-
{ cmd: "
|
|
12414
|
+
{ cmd: "view", desc: "View current usage budget bars" },
|
|
12415
|
+
{ cmd: "set", desc: "Configure budgets (Daily/Monthly limits)" }
|
|
12362
12416
|
]
|
|
12363
12417
|
},
|
|
12364
12418
|
{
|