fluxflow-cli 2.16.8 → 2.16.9
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 +67 -26
- 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,
|
|
@@ -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..." };
|
|
@@ -15067,6 +15098,10 @@ function App({ args = [] }) {
|
|
|
15067
15098
|
if (inputText === "\x1B[I" || inputText === "\x1B[O" || inputText === "[I" || inputText === "[O") {
|
|
15068
15099
|
return;
|
|
15069
15100
|
}
|
|
15101
|
+
if (key.ctrl && (inputText.toLowerCase() === "r" || inputText === "" || inputText === "")) {
|
|
15102
|
+
getMemoryInfo();
|
|
15103
|
+
return;
|
|
15104
|
+
}
|
|
15070
15105
|
if (activeView === "stats") {
|
|
15071
15106
|
if (key.tab && !key.shift) {
|
|
15072
15107
|
setStatsMode((prev) => {
|
|
@@ -15810,6 +15845,11 @@ function App({ args = [] }) {
|
|
|
15810
15845
|
{
|
|
15811
15846
|
cmd: "qwen/qwen3.5-397b-a17b",
|
|
15812
15847
|
desc: "Multimodal"
|
|
15848
|
+
},
|
|
15849
|
+
// NVIDIA NEMOTRON
|
|
15850
|
+
{
|
|
15851
|
+
cmd: "nvidia/nemotron-3-ultra-550b-a55b",
|
|
15852
|
+
desc: "Text Only [EXPERIMENTAL]"
|
|
15813
15853
|
}
|
|
15814
15854
|
] : apiTier === "Free" ? [
|
|
15815
15855
|
{
|
|
@@ -18546,7 +18586,8 @@ Selection: ${val}`,
|
|
|
18546
18586
|
chatId,
|
|
18547
18587
|
isMemoryEnabled: systemSettings.memory,
|
|
18548
18588
|
apiTier,
|
|
18549
|
-
aiProvider
|
|
18589
|
+
aiProvider,
|
|
18590
|
+
activeModel
|
|
18550
18591
|
}
|
|
18551
18592
|
)), activeView === "exit" && (() => {
|
|
18552
18593
|
const wallTimeMs = Date.now() - SESSION_START_TIME;
|