fluxflow-cli 1.19.0 → 1.19.1
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 +18 -14
- package/package.json +1 -1
package/dist/fluxflow.js
CHANGED
|
@@ -5742,8 +5742,7 @@ CWD: ${process.cwd()}${cwdMismatch ? ` (CWD Mismatch! Previous Path: ${lastCwd})
|
|
|
5742
5742
|
**DIRECTORY STRUCTURE**
|
|
5743
5743
|
${dirStructure}
|
|
5744
5744
|
${memoryPrompt}
|
|
5745
|
-
${thinkingLevel != "Fast" ?
|
|
5746
|
-
` : ""}[USER] ${agentText.replace(/\s*\[Prompted on:.*?\]/g, "").trim()}`.trim();
|
|
5745
|
+
${thinkingLevel != "Fast" ? `${modelName.toLowerCase().startsWith("gemma") ? "[SYSTEM] **STRICTLY FOLLOW THINKING POLICY AS CRITICAL PRIORITY. DO NOT START A RESPONSE WITHOUT <think> ... </think**\n" : ""}` : ""}[USER] ${agentText.replace(/\s*\[Prompted on:.*?\]/g, "").trim()}`.trim();
|
|
5747
5746
|
modifiedHistory.push({ role: "user", text: firstUserMsg });
|
|
5748
5747
|
let lastUsage = null;
|
|
5749
5748
|
const MAX_LOOPS = mode === "Flux" ? 70 : 7;
|
|
@@ -5774,8 +5773,7 @@ ${thinkingLevel != "Fast" ? `[SYSTEM] **STRICTLY FOLLOW THINKING POLICY AS CRITI
|
|
|
5774
5773
|
|
|
5775
5774
|
[STEERING HINT]: ${hint}`;
|
|
5776
5775
|
} else {
|
|
5777
|
-
modifiedHistory.push({ role: "user", text: `${thinkingLevel != "Fast" ?
|
|
5778
|
-
` : ""}[STEERING HINT]: ${hint}` });
|
|
5776
|
+
modifiedHistory.push({ role: "user", text: `${thinkingLevel != "Fast" ? `${modelName.toLowerCase().startsWith("gemma") ? "[SYSTEM] **STRICTLY FOLLOW THINKING POLICY AS CRITICAL PRIORITY. DO NOT START A RESPONSE WITHOUT <think> ... </think**\n" : ""}` : ""}[STEERING HINT]: ${hint}` });
|
|
5779
5777
|
}
|
|
5780
5778
|
yield { type: "status", content: "Steering Hint Injected." };
|
|
5781
5779
|
}
|
|
@@ -5846,19 +5844,25 @@ ${thinkingLevel != "Fast" ? `[SYSTEM] **STRICTLY FOLLOW THINKING POLICY AS CRITI
|
|
|
5846
5844
|
yield { type: "model_update", content: null };
|
|
5847
5845
|
}
|
|
5848
5846
|
currentSystemInstruction = getSystemInstruction(profile, !(targetModel || "gemma").toLowerCase().startsWith("gemma") ? "GEM" : thinkingLevel, mode, systemSettings, isMemoryEnabled, MAX_LOOPS, loop + 1);
|
|
5849
|
-
const
|
|
5850
|
-
|
|
5851
|
-
const lastUserMsg = contents[contents.length - 1];
|
|
5847
|
+
const isGemma = modelName && modelName.toLowerCase().startsWith("gemma");
|
|
5848
|
+
let jitInstruction = "";
|
|
5852
5849
|
let addedMarker = false;
|
|
5853
|
-
|
|
5854
|
-
|
|
5855
|
-
|
|
5850
|
+
const lastUserMsg = contents[contents.length - 1];
|
|
5851
|
+
if (isGemma) {
|
|
5852
|
+
jitInstruction = `
|
|
5853
|
+
[SYSTEM] Tool result received. Analyze output and proceed with your turn${thinkingLevel != "Fast" ? `. **STRICTLY MAINTAIN THINKING POLICY. DO NOT START A RESPONSE WITHOUT <think> ... </think>}**` : ""}`;
|
|
5854
|
+
if (lastUserMsg && lastUserMsg.role === "user" && lastUserMsg.parts?.[0]?.text?.startsWith("[TOOL RESULT]")) {
|
|
5855
|
+
lastUserMsg.parts[0].text += jitInstruction;
|
|
5856
|
+
addedMarker = true;
|
|
5857
|
+
}
|
|
5856
5858
|
}
|
|
5857
|
-
|
|
5858
|
-
|
|
5859
|
-
|
|
5860
|
-
lastUserMsg.parts[0]
|
|
5859
|
+
if (isGemma) {
|
|
5860
|
+
const stepThreshold = Math.floor(MAX_LOOPS * (mode === "Flux" ? 0.98 : 0.7));
|
|
5861
|
+
const currentStep = loop + 1;
|
|
5862
|
+
if (currentStep >= stepThreshold && lastUserMsg && lastUserMsg.parts?.[0]) {
|
|
5863
|
+
lastUserMsg.parts[0].text += `
|
|
5861
5864
|
[SYSTEM] WARNING, Turn Limit Impending: Step ${currentStep}/${MAX_LOOPS}. Wrap up quickly/prompt user to continue & use [turn:finish] quickly.`;
|
|
5865
|
+
}
|
|
5862
5866
|
}
|
|
5863
5867
|
let activeContents = contents;
|
|
5864
5868
|
let cachedContentName = null;
|