fluxflow-cli 2.16.8 → 2.16.10
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 +74 -32
- package/package.json +1 -1
package/dist/fluxflow.js
CHANGED
|
@@ -3357,6 +3357,9 @@ var init_MultilineInput = __esm({
|
|
|
3357
3357
|
setPasteBlocks([]);
|
|
3358
3358
|
return;
|
|
3359
3359
|
}
|
|
3360
|
+
if (key.ctrl && (cleanInput.toLowerCase() === "r" || cleanInput === "" || cleanInput === "")) {
|
|
3361
|
+
return;
|
|
3362
|
+
}
|
|
3360
3363
|
const isArrowKey = key.upArrow || key.downArrow || key.leftArrow || key.rightArrow;
|
|
3361
3364
|
if (isArrowKey) {
|
|
3362
3365
|
flushPasteTransaction();
|
|
@@ -4819,37 +4822,51 @@ var init_ChatLayout = __esm({
|
|
|
4819
4822
|
import React5 from "react";
|
|
4820
4823
|
import { Box as Box4, Text as Text5 } from "ink";
|
|
4821
4824
|
import { useState as useState5, useEffect as useEffect4 } from "react";
|
|
4822
|
-
|
|
4825
|
+
function getMemoryInfo() {
|
|
4826
|
+
if (activeGetMemoryInfo) {
|
|
4827
|
+
activeGetMemoryInfo();
|
|
4828
|
+
}
|
|
4829
|
+
}
|
|
4830
|
+
var activeGetMemoryInfo, StatusBar, StatusBar_default;
|
|
4823
4831
|
var init_StatusBar = __esm({
|
|
4824
4832
|
"src/components/StatusBar.jsx"() {
|
|
4825
4833
|
init_text();
|
|
4826
|
-
|
|
4834
|
+
activeGetMemoryInfo = null;
|
|
4835
|
+
StatusBar = React5.memo(({ mode, thinkingLevel, tokens = "0.0k", tokensTotal = "0.0k", chatId = "NEW-SESSION", isMemoryEnabled = true, apiTier = "Free", aiProvider = "Google", activeModel = "" }) => {
|
|
4827
4836
|
const modeIcon = mode === "Flux" ? "" : "";
|
|
4828
4837
|
const [memoryUsage, setMemoryUsage] = useState5(0);
|
|
4829
4838
|
const [memoryLimit, setMemoryLimit] = useState5(0);
|
|
4830
4839
|
const [memoryUnit, setMemoryUnit] = useState5("MB");
|
|
4831
|
-
|
|
4832
|
-
const
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
const
|
|
4837
|
-
|
|
4838
|
-
return toGB ? parseFloat(converted.toFixed(2)) : Math.round(converted);
|
|
4839
|
-
};
|
|
4840
|
-
setMemoryUnit(currentUnit);
|
|
4841
|
-
setMemoryLimit(formatToNumber(usage.heapTotal, isGB));
|
|
4842
|
-
setMemoryUsage(formatToNumber(usage.heapUsed, isGB));
|
|
4840
|
+
const updateMemory = () => {
|
|
4841
|
+
const usage = process.memoryUsage();
|
|
4842
|
+
const isGB = usage.heapTotal / (1024 * 1024) >= 1024;
|
|
4843
|
+
const currentUnit = isGB ? "GB" : "MB";
|
|
4844
|
+
const formatToNumber = (bytes, toGB) => {
|
|
4845
|
+
const converted = bytes / (1024 * 1024 * (toGB ? 1024 : 1));
|
|
4846
|
+
return toGB ? parseFloat(converted.toFixed(2)) : Math.round(converted);
|
|
4843
4847
|
};
|
|
4844
|
-
|
|
4848
|
+
setMemoryUnit(currentUnit);
|
|
4849
|
+
setMemoryLimit(formatToNumber(usage.heapTotal, isGB));
|
|
4850
|
+
setMemoryUsage(formatToNumber(usage.heapUsed, isGB));
|
|
4851
|
+
};
|
|
4852
|
+
useEffect4(() => {
|
|
4853
|
+
activeGetMemoryInfo = updateMemory;
|
|
4854
|
+
updateMemory();
|
|
4845
4855
|
const interval = setInterval(() => {
|
|
4846
|
-
|
|
4856
|
+
updateMemory();
|
|
4847
4857
|
}, 3e4);
|
|
4848
|
-
return () =>
|
|
4858
|
+
return () => {
|
|
4859
|
+
clearInterval(interval);
|
|
4860
|
+
if (activeGetMemoryInfo === updateMemory) {
|
|
4861
|
+
activeGetMemoryInfo = null;
|
|
4862
|
+
}
|
|
4863
|
+
};
|
|
4849
4864
|
}, []);
|
|
4850
|
-
let maxLimit =
|
|
4851
|
-
if (aiProvider === "
|
|
4852
|
-
maxLimit =
|
|
4865
|
+
let maxLimit = 262144;
|
|
4866
|
+
if (aiProvider === "NVIDIA" && (activeModel?.includes("glm") || activeModel?.includes("gpt") || activeModel?.includes("qwen"))) {
|
|
4867
|
+
maxLimit = 128e3;
|
|
4868
|
+
} else if (aiProvider === "DeepSeek" || aiProvider === "Google" && apiTier === "Paid") {
|
|
4869
|
+
maxLimit = 409600;
|
|
4853
4870
|
}
|
|
4854
4871
|
return /* @__PURE__ */ React5.createElement(
|
|
4855
4872
|
Box4,
|
|
@@ -8649,7 +8666,7 @@ var init_search_keyword = __esm({
|
|
|
8649
8666
|
const fileGroups = [];
|
|
8650
8667
|
let totalMatches = 0;
|
|
8651
8668
|
for (const result of settledResults) {
|
|
8652
|
-
if (!result) continue;
|
|
8669
|
+
if (!result || !result.matches) continue;
|
|
8653
8670
|
if (totalMatches >= maxMatches) break;
|
|
8654
8671
|
const remaining = maxMatches - totalMatches;
|
|
8655
8672
|
const trimmedMatches = result.matches.slice(0, remaining);
|
|
@@ -9941,6 +9958,7 @@ var init_ai = __esm({
|
|
|
9941
9958
|
const isMinimax = model.includes("minimax");
|
|
9942
9959
|
const isGPT = model.includes("gpt");
|
|
9943
9960
|
const isQwen = model.includes("qwen");
|
|
9961
|
+
const isNemotron = model.includes("nemotron");
|
|
9944
9962
|
const GPT_THINKING_LEVELS = {
|
|
9945
9963
|
"Fast": "low",
|
|
9946
9964
|
"Low": "low",
|
|
@@ -9978,6 +9996,16 @@ var init_ai = __esm({
|
|
|
9978
9996
|
body.chat_template_kwargs = { thinking_mode: isThinking ? "enabled" : "disabled" };
|
|
9979
9997
|
} else if (isQwen) {
|
|
9980
9998
|
body.chat_template_kwargs = { enable_thinking: isThinking };
|
|
9999
|
+
} else if (isNemotron) {
|
|
10000
|
+
if (apiLevel === "High") {
|
|
10001
|
+
body.reasoning_budget = 12e3;
|
|
10002
|
+
body.chat_template_kwargs = { enable_thinking: true };
|
|
10003
|
+
} else if (apiLevel === "Standard") {
|
|
10004
|
+
body.reasoning_budget = 12e3;
|
|
10005
|
+
body.chat_template_kwargs = { enable_thinking: true, medium_effort: true };
|
|
10006
|
+
} else {
|
|
10007
|
+
body.chat_template_kwargs = { enable_thinking: false };
|
|
10008
|
+
}
|
|
9981
10009
|
}
|
|
9982
10010
|
const response = await fetchWithBackoff("https://integrate.api.nvidia.com/v1/chat/completions", {
|
|
9983
10011
|
method: "POST",
|
|
@@ -11067,11 +11095,14 @@ Provide a consolidated summary of the entire session.`;
|
|
|
11067
11095
|
modifiedHistory = slicedHistory;
|
|
11068
11096
|
}
|
|
11069
11097
|
}
|
|
11070
|
-
let contextCompressionCount =
|
|
11071
|
-
let contextTruncationCount =
|
|
11072
|
-
if (aiProvider === "
|
|
11073
|
-
contextCompressionCount =
|
|
11074
|
-
contextTruncationCount =
|
|
11098
|
+
let contextCompressionCount = 255e3;
|
|
11099
|
+
let contextTruncationCount = 26e4;
|
|
11100
|
+
if (aiProvider === "NVIDIA" && (modelName?.includes("glm") || modelName?.includes("gpt") || modelName?.includes("qwen"))) {
|
|
11101
|
+
contextCompressionCount = 122e3;
|
|
11102
|
+
contextTruncationCount = 126e3;
|
|
11103
|
+
} else if (aiProvider === "DeepSeek" || aiProvider === "Google" && apiTier === "Paid") {
|
|
11104
|
+
contextCompressionCount = 4e5;
|
|
11105
|
+
contextTruncationCount = 405e3;
|
|
11075
11106
|
}
|
|
11076
11107
|
if ((sessionStats?.tokens || 0) > contextCompressionCount) {
|
|
11077
11108
|
yield { type: "status_history", content: "Context Limit Reached. Condensing session history..." };
|
|
@@ -12391,7 +12422,7 @@ ${ideErr} [/ERROR]`;
|
|
|
12391
12422
|
let label2 = "";
|
|
12392
12423
|
if (normToolName === "web_search") {
|
|
12393
12424
|
const { query, limit = 10 } = parseArgs(toolCall.args);
|
|
12394
|
-
label2 = `\u2714 Searched: ${query}`;
|
|
12425
|
+
label2 = `\u2714 Searched: ${query} \u2192 ${limit}`;
|
|
12395
12426
|
} else if (normToolName === "web_scrape") {
|
|
12396
12427
|
const url = parseArgs(toolCall.args).url || "...";
|
|
12397
12428
|
label2 = `\u2714 Visited: ${url}`;
|
|
@@ -12422,7 +12453,7 @@ ${ideErr} [/ERROR]`;
|
|
|
12422
12453
|
} else if (isImage) {
|
|
12423
12454
|
label2 = `\u2714 Viewed: ${targetPath2}`;
|
|
12424
12455
|
} else {
|
|
12425
|
-
label2 =
|
|
12456
|
+
label2 = `${totalLines !== "..." ? "\u2714" : "\u2717"} Read: ${targetPath2} \u2192 ${totalLines !== "..." ? `Lines ${sLine} - ${actualEndLine} of ${totalLines}` : "File Not Found"}`;
|
|
12426
12457
|
}
|
|
12427
12458
|
} else if (normToolName === "list_files" || normToolName === "read_folder") {
|
|
12428
12459
|
const action = normToolName === "list_files" ? "List" : "Viewed";
|
|
@@ -12997,7 +13028,7 @@ ${boxMid}`) };
|
|
|
12997
13028
|
}
|
|
12998
13029
|
if (normToolName === "write_file" || normToolName === "update_file") {
|
|
12999
13030
|
const action = normToolName === "write_file" ? "Write Cancelled" : "Edit Denied";
|
|
13000
|
-
const deniedLabel = `\
|
|
13031
|
+
const deniedLabel = `\u2717 ${action}: ${parseArgs(toolCall.args).path || "..."}`.toUpperCase();
|
|
13001
13032
|
let terminalWidth = 115;
|
|
13002
13033
|
if (process.stdout.isTTY) {
|
|
13003
13034
|
terminalWidth = process.stdout.columns - 5 || 120;
|
|
@@ -13103,7 +13134,8 @@ ${boxBottom}`}`) };
|
|
|
13103
13134
|
const boxMid = `${postLabel.padEnd(boxWidth - 2).substring(0, boxWidth - 2)}`;
|
|
13104
13135
|
const boxBottom = ` ${" ".repeat(boxWidth)} `;
|
|
13105
13136
|
yield { type: "visual_feedback", content: colorMainWords(`${boxBottom}
|
|
13106
|
-
${boxMid}
|
|
13137
|
+
${boxMid}
|
|
13138
|
+
`) };
|
|
13107
13139
|
}
|
|
13108
13140
|
if (normToolName === "todo") {
|
|
13109
13141
|
const { method, tasks, markDone } = parseArgs(toolCall.args);
|
|
@@ -15067,6 +15099,10 @@ function App({ args = [] }) {
|
|
|
15067
15099
|
if (inputText === "\x1B[I" || inputText === "\x1B[O" || inputText === "[I" || inputText === "[O") {
|
|
15068
15100
|
return;
|
|
15069
15101
|
}
|
|
15102
|
+
if (key.ctrl && (inputText.toLowerCase() === "r" || inputText === "" || inputText === "")) {
|
|
15103
|
+
getMemoryInfo();
|
|
15104
|
+
return;
|
|
15105
|
+
}
|
|
15070
15106
|
if (activeView === "stats") {
|
|
15071
15107
|
if (key.tab && !key.shift) {
|
|
15072
15108
|
setStatsMode((prev) => {
|
|
@@ -15810,6 +15846,11 @@ function App({ args = [] }) {
|
|
|
15810
15846
|
{
|
|
15811
15847
|
cmd: "qwen/qwen3.5-397b-a17b",
|
|
15812
15848
|
desc: "Multimodal"
|
|
15849
|
+
},
|
|
15850
|
+
// NVIDIA NEMOTRON
|
|
15851
|
+
{
|
|
15852
|
+
cmd: "nvidia/nemotron-3-ultra-550b-a55b",
|
|
15853
|
+
desc: "Text Only [EXPERIMENTAL]"
|
|
15813
15854
|
}
|
|
15814
15855
|
] : apiTier === "Free" ? [
|
|
15815
15856
|
{
|
|
@@ -16782,7 +16823,7 @@ ${timestamp}` };
|
|
|
16782
16823
|
id: "cancel-" + Date.now(),
|
|
16783
16824
|
role: "system",
|
|
16784
16825
|
text: "\n\n\x1B[33m\u24D8 Request Cancelled\x1B[0m",
|
|
16785
|
-
isMeta:
|
|
16826
|
+
isMeta: false
|
|
16786
16827
|
}];
|
|
16787
16828
|
setCompletedIndex(newMsgs.length);
|
|
16788
16829
|
return newMsgs;
|
|
@@ -18546,7 +18587,8 @@ Selection: ${val}`,
|
|
|
18546
18587
|
chatId,
|
|
18547
18588
|
isMemoryEnabled: systemSettings.memory,
|
|
18548
18589
|
apiTier,
|
|
18549
|
-
aiProvider
|
|
18590
|
+
aiProvider,
|
|
18591
|
+
activeModel
|
|
18550
18592
|
}
|
|
18551
18593
|
)), activeView === "exit" && (() => {
|
|
18552
18594
|
const wallTimeMs = Date.now() - SESSION_START_TIME;
|