fluxflow-cli 2.14.1 → 2.14.2
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 +42 -17
- package/package.json +1 -1
package/dist/fluxflow.js
CHANGED
|
@@ -6256,9 +6256,9 @@ ${userMemories}` : "";
|
|
|
6256
6256
|
${parts.join("\n\n")}
|
|
6257
6257
|
` : "";
|
|
6258
6258
|
};
|
|
6259
|
-
getSystemInstruction = (profile, thinkingLevel, mode, systemSettings, isMemoryEnabled = true, isFirstPrompt = false, aiProvider = "Google", isMultiModal = false) => {
|
|
6259
|
+
getSystemInstruction = (profile, thinkingLevel, mode, systemSettings, isMemoryEnabled = true, isFirstPrompt = false, aiProvider = "Google", isMultiModal = false, isGemini) => {
|
|
6260
6260
|
let thinkingConfig = "";
|
|
6261
|
-
if (
|
|
6261
|
+
if (!isGemini && aiProvider === "Google") {
|
|
6262
6262
|
let levelKey = thinkingLevel;
|
|
6263
6263
|
if (thinkingLevel === "Fast") levelKey = "Off";
|
|
6264
6264
|
if (thinkingLevel === "Low") levelKey = "Minimal";
|
|
@@ -6266,6 +6266,23 @@ ${parts.join("\n\n")}
|
|
|
6266
6266
|
if (thinkingLevel === "xHigh" || thinkingLevel === "Max") levelKey = "xHigh";
|
|
6267
6267
|
thinkingConfig = thinking_prompts_default[levelKey] || thinking_prompts_default["Medium"];
|
|
6268
6268
|
}
|
|
6269
|
+
if (isGemini || aiProvider !== "Google") {
|
|
6270
|
+
const MAP_FOR_NON_GOOGLE_OR_GEMINI = {
|
|
6271
|
+
"Fast": "LOWEST",
|
|
6272
|
+
"Low": "LOW",
|
|
6273
|
+
"Medium": "MEDIUM",
|
|
6274
|
+
"Standard": "MEDIUM",
|
|
6275
|
+
"High": "HIGH",
|
|
6276
|
+
"xHigh": "HIGH",
|
|
6277
|
+
"Max": "HIGH"
|
|
6278
|
+
};
|
|
6279
|
+
thinkingConfig = thinking_prompts_default["xHigh"];
|
|
6280
|
+
thinkingConfig = thinkingConfig.replace("EFFORT LEVEL: HIGH\nThink in a continuous, relentless analytical monologue. ", `EFFORT LEVEL: ${MAP_FOR_NON_GOOGLE_OR_GEMINI[thinkingLevel]}
|
|
6281
|
+
`).replace("- MANDATORY THINKING: Full reasoning required for ALL requests/greetings", "");
|
|
6282
|
+
if (thinkingLevel === "Fast") {
|
|
6283
|
+
thinkingConfig = "EFFORT LEVEL: LOWEST\nNo thinking. Immediate response\nRULES:\n- Verify ALL imports and system stability, AVOID ANY Syntax errors, re-read TOOL RESULTS/files to verify\n";
|
|
6284
|
+
}
|
|
6285
|
+
}
|
|
6269
6286
|
const osDetected = process.platform === "win32" ? "Windows" : process.platform === "darwin" ? "macOS" : "Linux";
|
|
6270
6287
|
const userInstrStr = profile.instructions && profile.instructions?.length > 0 ? `User Instructions: ${profile.instructions}
|
|
6271
6288
|
|
|
@@ -6311,12 +6328,13 @@ Mode: ${mode}${thinkingLevel !== "Fast" ? " (Thinking)" : ""}. ${mode === "Flux"
|
|
|
6311
6328
|
-- MARKERS --
|
|
6312
6329
|
- TOOL SYSTEM: [TOOL RESULT]
|
|
6313
6330
|
- SYSTEM NOTIFICATION: [SYSTEM] in user turn
|
|
6314
|
-
|
|
6331
|
+
|
|
6315
6332
|
-- THINKING RULES --
|
|
6316
|
-
${thinkingConfig}
|
|
6317
|
-
${thinkingLevel !== "Fast" && thinkingLevel !== "xHigh" ? `
|
|
6333
|
+
${aiProvider === "Google" && !isGemini ? `${thinkingConfig}
|
|
6334
|
+
${thinkingLevel !== "Fast" && thinkingLevel !== "xHigh" && !isGemini ? `
|
|
6318
6335
|
CRITICAL THINKING POLICY
|
|
6319
|
-
- ALWAYS use <think> ... </think> before responding, even with simple queries/greetings
|
|
6336
|
+
- ALWAYS use <think> ... </think> before responding, even with simple queries/greetings
|
|
6337
|
+
` : ""}` : `${thinkingConfig}`}
|
|
6320
6338
|
${TOOL_PROTOCOL(mode, osDetected, aiProvider.toLowerCase() === "deepseek" ? false : isMultiModal, aiProvider)}
|
|
6321
6339
|
${projectContextBlock}
|
|
6322
6340
|
-- MEMORY RULES --
|
|
@@ -11579,7 +11597,7 @@ ${activeSummaryBlock}${thinkingLevel !== "Fast" && thinkingLevel !== "xHigh" &&
|
|
|
11579
11597
|
} else if (retryCount > 0) {
|
|
11580
11598
|
yield { type: "model_update", content: null };
|
|
11581
11599
|
}
|
|
11582
|
-
currentSystemInstruction = getSystemInstruction(profile, !(targetModel || "gemma").toLowerCase().startsWith("gemma") ?
|
|
11600
|
+
currentSystemInstruction = getSystemInstruction(profile, !(targetModel || "gemma").toLowerCase().startsWith("gemma") ? thinkingLevel : thinkingLevel, mode, systemSettings, isMemoryEnabled, isFirstPrompt, aiProvider, aiProvider === "Google" ? true : isMultiModal, !(targetModel || "gemma").toLowerCase().startsWith("gemma") ? true : false);
|
|
11583
11601
|
const lastUserMsg = contents[contents.length - 1];
|
|
11584
11602
|
if (isBridgeConnected() & loop > 0) {
|
|
11585
11603
|
yield { type: "status", content: "Checking Code..." };
|
|
@@ -15458,14 +15476,6 @@ function App({ args = [] }) {
|
|
|
15458
15476
|
{ cmd: "/export", desc: "Export current chat in a .txt file" },
|
|
15459
15477
|
{ cmd: "/chats", desc: "List all chat sessions" },
|
|
15460
15478
|
{ cmd: "/btw", desc: "Ask a question without intefering with ongoing tasks" },
|
|
15461
|
-
{
|
|
15462
|
-
cmd: "/mode",
|
|
15463
|
-
desc: "Toggle Flux/Flow modes",
|
|
15464
|
-
subs: [
|
|
15465
|
-
{ cmd: "flux", desc: "Enable Dev toolset" },
|
|
15466
|
-
{ cmd: "flow", desc: "Enable Chat mode" }
|
|
15467
|
-
]
|
|
15468
|
-
},
|
|
15469
15479
|
{
|
|
15470
15480
|
cmd: "/thinking",
|
|
15471
15481
|
desc: "Set AI reasoning depth",
|
|
@@ -15696,6 +15706,14 @@ function App({ args = [] }) {
|
|
|
15696
15706
|
}
|
|
15697
15707
|
]
|
|
15698
15708
|
},
|
|
15709
|
+
{
|
|
15710
|
+
cmd: "/mode",
|
|
15711
|
+
desc: "Toggle Flux/Flow modes",
|
|
15712
|
+
subs: [
|
|
15713
|
+
{ cmd: "flux", desc: "Enable Dev toolset" },
|
|
15714
|
+
{ cmd: "flow", desc: "Enable Chat mode" }
|
|
15715
|
+
]
|
|
15716
|
+
},
|
|
15699
15717
|
{ cmd: "/settings", desc: "Configure system prefs" },
|
|
15700
15718
|
{ cmd: "/key", desc: "Manage API keys" },
|
|
15701
15719
|
{ cmd: "/profile", desc: "Edit developer persona" },
|
|
@@ -18409,13 +18427,20 @@ var calculatedLimit = Math.floor(totalSystemRamMB * SAFETY_MARGIN);
|
|
|
18409
18427
|
var _rawArgs = process.argv.slice(2);
|
|
18410
18428
|
var _allocIdx = _rawArgs.indexOf("--allocation");
|
|
18411
18429
|
var _allocValue = _allocIdx !== -1 ? parseInt(_rawArgs[_allocIdx + 1], 10) : NaN;
|
|
18430
|
+
if (!isNaN(_allocValue) && _allocValue < 64) {
|
|
18431
|
+
console.error(`
|
|
18432
|
+
[ERROR] Allocation value '${_allocValue} MB' is too low. Minimum: 64 MB, Recommended: 4096 MB.
|
|
18433
|
+
`);
|
|
18434
|
+
process.exit(1);
|
|
18435
|
+
}
|
|
18412
18436
|
var _maxAllowed = Math.floor(totalSystemRamMB * 0.75);
|
|
18413
18437
|
var HEAP_LIMIT = !isNaN(_allocValue) && _allocValue > 0 ? Math.min(_allocValue, _maxAllowed) : Math.max(1536, Math.min(32768, calculatedLimit));
|
|
18414
18438
|
var isBundled = fileURLToPath2(import.meta.url).endsWith(".js");
|
|
18415
18439
|
if (isBundled && !process.execArgv.some((arg) => arg.includes("max-old-space-size"))) {
|
|
18416
18440
|
if (!Number.isNaN(_allocValue)) {
|
|
18417
|
-
console.log(
|
|
18418
|
-
|
|
18441
|
+
console.log(`
|
|
18442
|
+
[MEMORY] Starting with: '${_allocValue > _maxAllowed ? _maxAllowed : _allocValue} MB' Allocation ${_allocValue > _maxAllowed ? "(Max allowed: '" + _maxAllowed + " MB')" : ""}. Please Wait...`);
|
|
18443
|
+
await new Promise((resolve) => setTimeout(resolve, 5e3));
|
|
18419
18444
|
}
|
|
18420
18445
|
const cp = spawn3(process.execPath, [
|
|
18421
18446
|
`--max-old-space-size=${HEAP_LIMIT}`,
|