fluxflow-cli 1.9.23 → 1.9.24
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 +24 -28
- package/package.json +1 -1
package/dist/fluxflow.js
CHANGED
|
@@ -950,20 +950,21 @@ var init_thinking_prompts = __esm({
|
|
|
950
950
|
thinking_prompts_default = {
|
|
951
951
|
Max: `EFFORT_LEVEL: MAX
|
|
952
952
|
Think in a continuous, fluid analytical monologue within the <think>...</think> block. Do NOT use headings, bullet points, or artificial sections. Engage in a deep "Stream of Consciousness" that follows this cognitive path:
|
|
953
|
-
Deep Analysis: Deconstruct the request into its core technical and logic requirements
|
|
954
|
-
Hypothesis & Test: Propose multiple solutions mentally and critique them for edge cases or security risks
|
|
955
|
-
Architectural Planning: Consider the long-term impact on the project structure and maintainability
|
|
956
|
-
Refinement: Iterate on the chosen path until it is bulletproof
|
|
953
|
+
Deep Analysis: Deconstruct the request into its core technical and logic requirements
|
|
954
|
+
Hypothesis & Test: Propose multiple solutions mentally and critique them for edge cases or security risks
|
|
955
|
+
Architectural Planning: Consider the long-term impact on the project structure and maintainability
|
|
956
|
+
Refinement: Iterate on the chosen path until it is bulletproof
|
|
957
957
|
RULES:
|
|
958
|
-
- NO HEADINGS. Just a solid, stable analytical monologue
|
|
959
|
-
- Be thorough and exhaustive. Explore the 'why' behind every decision, depth and nuances
|
|
958
|
+
- NO HEADINGS. Just a solid, stable analytical monologue
|
|
959
|
+
- Be thorough and exhaustive. Explore the 'why' behind every decision, depth and nuances
|
|
960
960
|
Question your own logic as you go,
|
|
961
961
|
|
|
962
|
-
DO NOT GET STUCK IN RE-VERIFICATION LOOP
|
|
962
|
+
DO NOT GET STUCK IN RE-VERIFICATION LOOP
|
|
963
963
|
- MANDATORY THINKING: You MUST engage in full reasoning regardless of perceived simplicity.`,
|
|
964
|
-
High: "EFFORT_LEVEL: HIGH\nThink in a stable, analytical monologue within the <think>...</think> block. Avoid headings or structured formatting. Your thinking should be a continuous stream of logical deduction:\nAnalyze the immediate task and its dependencies
|
|
965
|
-
Medium: "EFFORT_LEVEL: MEDIUM\nThink in a concise, stable monologue within the <think>...</think> block. No headings needed. Focus on the core logic required to solve the task efficiently:\nIdentify the most direct path to the solution
|
|
966
|
-
Minimal: "EFFORT_LEVEL: LOW\nThink in a brief, focused monologue within the <think>...</think> block. No headings. Just a quick mental check before acting:\nVerify the objective
|
|
964
|
+
High: "EFFORT_LEVEL: HIGH\nThink in a stable, analytical monologue within the <think>...</think> block. Avoid headings or structured formatting. Your thinking should be a continuous stream of logical deduction:\nAnalyze the immediate task and its dependencies\nMentally simulate the execution to identify potential failure points\nStructure a precise plan that addresses both primary goals and secondary constraints\nRULES:\n- NO HEADINGS. Maintain a fluid monologue style\n- Be detailed and rigorous in your self-questioning\n- Focus on accuracy, technical correctness, depth and nuances\n- MANDATORY THINKING: You MUST enter reasoning to verify the path forward.",
|
|
965
|
+
Medium: "EFFORT_LEVEL: MEDIUM\nThink in a concise, stable monologue within the <think>...</think> block. No headings needed. Focus on the core logic required to solve the task efficiently:\nIdentify the most direct path to the solution\nBriefly consider and discard obvious alternatives\nConfirm the plan meets the user's immediate requirements\nRULES:\n- NO HEADINGS. Keep it as a simple, logical stream\n- Be efficient. Spend energy only on what matters for the task\n- MANDATORY THINKING: Engage in a baseline mental check for all technical tasks.",
|
|
966
|
+
Minimal: "EFFORT_LEVEL: LOW\nThink in a brief, focused monologue within the <think>...</think> block. No headings. Just a quick mental check before acting:\nVerify the objective\nNote the target files/tools\nRULES:\n- NO HEADINGS. Just a few lines of clear, linear thought\n- Use minimal thinking for simple or conversational requests",
|
|
967
|
+
Off: "EFFORT_LEVEL: FAST\nNo internal thinking process required. Respond directly"
|
|
967
968
|
};
|
|
968
969
|
}
|
|
969
970
|
});
|
|
@@ -989,6 +990,7 @@ ${parts.join("\n\n")}
|
|
|
989
990
|
};
|
|
990
991
|
getSystemInstruction = (profile, thinkingLevel, mode, systemSettings, isMemoryEnabled = true) => {
|
|
991
992
|
let levelKey = thinkingLevel;
|
|
993
|
+
if (thinkingLevel === "Fast") levelKey = "Off";
|
|
992
994
|
if (thinkingLevel === "Low") levelKey = "Minimal";
|
|
993
995
|
if (thinkingLevel === "xHigh" || thinkingLevel === "Max") levelKey = "Max";
|
|
994
996
|
const thinkingConfig = thinking_prompts_default[levelKey] || thinking_prompts_default["Medium"];
|
|
@@ -1034,11 +1036,11 @@ High Priority: [SYSTEM], [STEERING HINT]
|
|
|
1034
1036
|
|
|
1035
1037
|
-- THINKING RULES --
|
|
1036
1038
|
${thinkingConfig}
|
|
1037
|
-
|
|
1039
|
+
${!thinkingLevel === "Fast" ? `***THINKING POLICY***
|
|
1038
1040
|
- Always use <think> ... </think> before responding
|
|
1039
1041
|
- Never skip thinking, even for simple tasks, code, or greetings
|
|
1040
1042
|
- Never jump to responses, regardless of task complexity
|
|
1041
|
-
|
|
1043
|
+
` : ""}
|
|
1042
1044
|
${TOOL_PROTOCOL(mode)}
|
|
1043
1045
|
${projectContextBlock}
|
|
1044
1046
|
|
|
@@ -3068,8 +3070,7 @@ DEBUG [${date}]: ${finalSynthesis}
|
|
|
3068
3070
|
const dateTimeStr = (/* @__PURE__ */ new Date()).toLocaleString([], { year: "numeric", month: "numeric", day: "numeric", hour: "2-digit", minute: "2-digit", hour12: true });
|
|
3069
3071
|
const firstUserMsg = `${memoryPrompt}
|
|
3070
3072
|
[METADATA (PRIORITY: DYNAMIC)] Time: ${dateTimeStr} | v${versionFluxflow2}
|
|
3071
|
-
[SYSTEM] **STRICTLY FOLLOW THINKING POLICY AS HIGHEST PRIORITY. NEVER START A RESPONSE WITHOUT THINKING
|
|
3072
|
-
[USER] ${agentText.replace(/\s*\[Prompted on:.*?\]/g, "").trim()}`.trim();
|
|
3073
|
+
${thinkingLevel != "Fast" ? "[SYSTEM] **STRICTLY FOLLOW THINKING POLICY AS HIGHEST PRIORITY. NEVER START A RESPONSE WITHOUT THINKING**\n" : ""}[USER] ${agentText.replace(/\s*\[Prompted on:.*?\]/g, "").trim()}`.trim();
|
|
3073
3074
|
modifiedHistory.push({ role: "user", text: firstUserMsg });
|
|
3074
3075
|
let lastUsage = null;
|
|
3075
3076
|
const MAX_LOOPS = mode === "Flux" ? 70 : 7;
|
|
@@ -3099,9 +3100,7 @@ DEBUG [${date}]: ${finalSynthesis}
|
|
|
3099
3100
|
|
|
3100
3101
|
[STEERING HINT]: ${hint}`;
|
|
3101
3102
|
} else {
|
|
3102
|
-
modifiedHistory.push({ role: "user", text:
|
|
3103
|
-
|
|
3104
|
-
[STEERING HINT]: ${hint}` });
|
|
3103
|
+
modifiedHistory.push({ role: "user", text: `${thinkingLevel != "Fast" ? "[SYSTEM] **STRICTLY FOLLOW THINKING POLICY AS HIGHEST PRIORITY. NEVER START A RESPONSE WITHOUT THINKING**\n" : ""}[STEERING HINT]: ${hint}` });
|
|
3105
3104
|
}
|
|
3106
3105
|
yield { type: "status", content: "Steering Hint Injected." };
|
|
3107
3106
|
}
|
|
@@ -3155,7 +3154,7 @@ DEBUG [${date}]: ${finalSynthesis}
|
|
|
3155
3154
|
const currentSystemInstruction = getSystemInstruction(profile, thinkingLevel, mode, systemSettings, isMemoryEnabled, MAX_LOOPS, loop + 1);
|
|
3156
3155
|
const jitInstruction = `
|
|
3157
3156
|
|
|
3158
|
-
[SYSTEM] Tool result received. Analyze output and proceed with your turn
|
|
3157
|
+
[SYSTEM] Tool result received. Analyze output and proceed with your turn.${thinkingLevel != "Fast" ? "**STRICTLY MAINTAIN THINKING PROTOCOL. NEVER START A RESPONSE WITHOUT THINKING**" : ""}`;
|
|
3159
3158
|
const lastUserMsg = contents[contents.length - 1];
|
|
3160
3159
|
let addedMarker = false;
|
|
3161
3160
|
if (lastUserMsg && lastUserMsg.role === "user" && lastUserMsg.parts?.[0]?.text?.startsWith("[TOOL RESULT]")) {
|
|
@@ -3449,9 +3448,7 @@ ${boxBottom}` };
|
|
|
3449
3448
|
const absoluteCwd = path15.resolve(process.cwd());
|
|
3450
3449
|
if (isExternalOff && !absoluteTarget.startsWith(absoluteCwd)) {
|
|
3451
3450
|
const denyMsg = `Access Denied. You are not allowed to access files outside the current workspace. To enable this, ask the user to turn on "External Workspace Access" in /settings.`;
|
|
3452
|
-
toolResults.push({ role: "user", text: `[TOOL RESULT]: ERROR: ${denyMsg}
|
|
3453
|
-
|
|
3454
|
-
[SYSTEM] **STRICTLY FOLLOW THINKING POLICY AS HIGHEST PRIORITY. NEVER START A RESPONSE WITHOUT THINKING**.` });
|
|
3451
|
+
toolResults.push({ role: "user", text: `[TOOL RESULT]: ERROR: ${denyMsg}${thinkingLevel != "Fast" ? "\n\n[SYSTEM] **STRICTLY FOLLOW THINKING POLICY AS HIGHEST PRIORITY. NEVER START A RESPONSE WITHOUT THINKING**" : ""}` });
|
|
3455
3452
|
yield { type: "tool_result", content: `[TOOL RESULT]: ERROR: ${denyMsg}` };
|
|
3456
3453
|
toolCallPointer++;
|
|
3457
3454
|
continue;
|
|
@@ -3464,9 +3461,7 @@ ${boxBottom}` };
|
|
|
3464
3461
|
if (approval === "deny") {
|
|
3465
3462
|
if (normToolName === "exec_command" && settings.onExecEnd) settings.onExecEnd();
|
|
3466
3463
|
const denyMsg = `Permission Denied: User rejected the ${normToolName === "exec_command" ? "terminal execution" : "file edit"}.`;
|
|
3467
|
-
toolResults.push({ role: "user", text: `[TOOL RESULT]: DENIED: ${denyMsg}
|
|
3468
|
-
|
|
3469
|
-
[SYSTEM] **STRICTLY FOLLOW THINKING POLICY AS HIGHEST PRIORITY. NEVER START A RESPONSE WITHOUT THINKING**.` });
|
|
3464
|
+
toolResults.push({ role: "user", text: `[TOOL RESULT]: DENIED: ${denyMsg}${thinkingLevel != "Fast" ? "\n\n[SYSTEM] **STRICTLY FOLLOW THINKING POLICY AS HIGHEST PRIORITY. NEVER START A RESPONSE WITHOUT THINKING**" : ""}` });
|
|
3470
3465
|
yield { type: "tool_result", content: `[TOOL RESULT]: DENIED: ${denyMsg}` };
|
|
3471
3466
|
await incrementUsage("toolDenied");
|
|
3472
3467
|
if (settings.onToolResult) settings.onToolResult("denied");
|
|
@@ -4444,10 +4439,11 @@ function App() {
|
|
|
4444
4439
|
cmd: "/thinking",
|
|
4445
4440
|
desc: "Set AI reasoning depth",
|
|
4446
4441
|
subs: [
|
|
4447
|
-
{ cmd: "
|
|
4448
|
-
{ cmd: "
|
|
4449
|
-
{ cmd: "
|
|
4450
|
-
{ cmd: "
|
|
4442
|
+
{ cmd: "fast", desc: "No Reasoning (Fastest)" },
|
|
4443
|
+
{ cmd: "low", desc: "Quick Reasoning" },
|
|
4444
|
+
{ cmd: "medium", desc: "Balanced Reasoning" },
|
|
4445
|
+
{ cmd: "high", desc: "Deep Reasoning" },
|
|
4446
|
+
{ cmd: "max", desc: "Deepest Reasoning" }
|
|
4451
4447
|
]
|
|
4452
4448
|
},
|
|
4453
4449
|
{
|