fluxflow-cli 1.4.0 → 1.4.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 +38 -14
- package/package.json +1 -1
package/dist/fluxflow.js
CHANGED
|
@@ -629,9 +629,9 @@ var thinking_prompts_default;
|
|
|
629
629
|
var init_thinking_prompts = __esm({
|
|
630
630
|
"src/data/thinking_prompts.json"() {
|
|
631
631
|
thinking_prompts_default = {
|
|
632
|
-
Max: "-- START THINKING INSTRUCTIONS --\nEFFORT_LEVEL: MAX\nThink Step by Step in Chain-of-Thought. Provide the thinking in <think>...</think> block, length given. Thinking should be structured in this format:\n\n<think>\n\\n\\n\n**Heading**\n\\n\\n\nSelf MONOLOGUE\n\\n\\n\n**Heading**\n\\n\\n\nSelf MONOLOGUE\ncontinue.\n\\n\\n\n</think>\\n\\n\n\n(MUST START THE RESPONSE IN NEW LINE AFTER ENDING THINKING BLOCK)\n\n**CRITICAL**: Heading blocks: **MIN
|
|
633
|
-
High: "-- START THINKING INSTRUCTIONS --\nEFFORT_LEVEL: HIGH\nThink Step by Step in Chain-of-Thought. Provide the thinking in <think>...</think> block, length given. Thinking should be structured in this format:\n\n<think>\n\\n\\n\n**Heading**\n\\n\\n\nSelf MONOLOGUE\n\\n\\n\n**Heading**\n\\n\\n\nSelf MONOLOGUE\ncontinue.\n\\n\\n\n</think>\\n\\n\n\n(MUST START THE RESPONSE IN NEW LINE AFTER ENDING THINKING BLOCK)\n\n**CRITICAL**: Heading blocks: **MIN
|
|
634
|
-
Medium: "-- START THINKING INSTRUCTIONS --\nEFFORT_LEVEL: MEDIUM\nThink Step by Step in Chain-of-Thought. Provide the thinking in <think>...</think> block, length given. Thinking should be structured in this format:\n\n<think>\n\\n\\n\n**Heading**\n\\n\\n\nSelf MONOLOGUE\n\\n\\n\n**Heading**\n\\n\\n\nSelf MONOLOGUE\ncontinue.\n\\n\\n\n</think>\\n\\n\n\n(MUST START THE RESPONSE IN NEW LINE AFTER ENDING THINKING BLOCK)\n\n**CRITICAL**: Heading blocks: **MIN 3**, **MAX
|
|
632
|
+
Max: "-- START THINKING INSTRUCTIONS --\nEFFORT_LEVEL: MAX\nThink Step by Step in Chain-of-Thought. Provide the thinking in <think>...</think> block, length given. Thinking should be structured in this format:\n\n<think>\n\\n\\n\n**Heading**\n\\n\\n\nSelf MONOLOGUE\n\\n\\n\n**Heading**\n\\n\\n\nSelf MONOLOGUE\ncontinue.\n\\n\\n\n</think>\\n\\n\n\n(MUST START THE RESPONSE IN NEW LINE AFTER ENDING THINKING BLOCK)\n\n**CRITICAL**: Heading blocks: **MIN 12**, **MAX 15**. EACH HEADING SHOULD HAVE MIN 12, MAX 16 SENTENCES OF INTERNAL MONOLOGUE. EXPLORE EDGE CASES & NUANCES. Dynamic Thinking preferred based on query.\nNEVER WRITE FUNCTION CALLS IN THINKING BLOCK WITH 'tool:' PREFIX AND NEVER WRITE '[turn: ...]' INSIDE THINKING BLOCK.\nConverge Thinking & Avoid running into thinking Loops. YOU MUST NOT EXCEED ALLOTTED THINKING BUDGET. COMPLETE YOUR THINKING WITHIN LIMITS AND START YOUR RESPONSE. DEFINE YOUR DYNAMIC THINKING BUDGET BASED ON THE QUERY COMPLEXITY. DO NOT OVERTHINK SIMPLE ONES.\n-- END THINKING INSTRUCTIONS --",
|
|
633
|
+
High: "-- START THINKING INSTRUCTIONS --\nEFFORT_LEVEL: HIGH\nThink Step by Step in Chain-of-Thought. Provide the thinking in <think>...</think> block, length given. Thinking should be structured in this format:\n\n<think>\n\\n\\n\n**Heading**\n\\n\\n\nSelf MONOLOGUE\n\\n\\n\n**Heading**\n\\n\\n\nSelf MONOLOGUE\ncontinue.\n\\n\\n\n</think>\\n\\n\n\n(MUST START THE RESPONSE IN NEW LINE AFTER ENDING THINKING BLOCK)\n\n**CRITICAL**: Heading blocks: **MIN 8**, **MAX 11**. EACH HEADING SHOULD HAVE MIN 8, MAX 12 SENTENCES OF INTERNAL MONOLOGUE. EXPLORE EDGE CASES & THINK LONGER before responding. Dynamic Thinking preferred based on query.\nNEVER WRITE FUNCTION CALLS IN THINKING BLOCK WITH 'tool:' PREFIX AND NEVER WRITE '[turn: ...]' INSIDE THINKING BLOCK.\nConverge Thinking & Avoid running into thinking Loops. YOU MUST NOT EXCEED ALLOTTED THINKING BUDGET. COMPLETE YOUR THINKING WITHIN LIMITS AND START YOUR RESPONSE. DEFINE YOUR DYNAMIC THINKING BUDGET BASED ON THE QUERY COMPLEXITY. DO NOT OVERTHINK SIMPLE ONES.\n-- END THINKING INSTRUCTIONS --",
|
|
634
|
+
Medium: "-- START THINKING INSTRUCTIONS --\nEFFORT_LEVEL: MEDIUM\nThink Step by Step in Chain-of-Thought. Provide the thinking in <think>...</think> block, length given. Thinking should be structured in this format:\n\n<think>\n\\n\\n\n**Heading**\n\\n\\n\nSelf MONOLOGUE\n\\n\\n\n**Heading**\n\\n\\n\nSelf MONOLOGUE\ncontinue.\n\\n\\n\n</think>\\n\\n\n\n(MUST START THE RESPONSE IN NEW LINE AFTER ENDING THINKING BLOCK)\n\n**CRITICAL**: Heading blocks: **MIN 3**, **MAX 5**. EACH HEADING SHOULD HAVE MIN 4, MAX 8 SENTENCES OF INTERNAL MONOLOGUE. THINK LONGER FOR COMPLEX QUERIES. Dynamic Thinking preferred based on query.\nNEVER WRITE FUNCTION CALLS IN THINKING BLOCK WITH 'tool:' PREFIX AND NEVER WRITE '[turn: ...]' INSIDE THINKING BLOCK.\nConverge Thinking & Avoid running into thinking Loops. YOU MUST NOT EXCEED ALLOTTED THINKING BUDGET. COMPLETE YOUR THINKING WITHIN LIMITS AND START YOUR RESPONSE. DEFINE YOUR DYNAMIC THINKING BUDGET BASED ON THE QUERY COMPLEXITY. DO NOT OVERTHINK SIMPLE ONES.\n-- END THINKING INSTRUCTIONS --",
|
|
635
635
|
Minimal: "-- START THINKING INSTRUCTIONS --\nEFFORT_LEVEL: LOW\nThink Step by Step in Chain-of-Thought. Provide the thinking in <think>...</think> block, length given. Thinking should be structured in this format:\n\n<think>\n\\n\\n\n**Heading**\n\\n\\n\nSelf MONOLOGUE\n\\n\\n\n**Heading**\n\\n\\n\nSelf MONOLOGUE\ncontinue.\n\\n\\n\n</think>\\n\\n\n\n(MUST START THE RESPONSE IN NEW LINE AFTER ENDING THINKING BLOCK)\n\n**CRITICAL**: Heading blocks: **MIN 0**, **MAX 2**. EACH HEADING SHOULD HAVE MIN 1, MAX 3 SENTENCES OF INTERNAL MONOLOGUE. No Thinking is preferred if query is simple.\nNEVER WRITE FUNCTION CALLS IN THINKING BLOCK WITH 'tool:' PREFIX AND NEVER WRITE '[turn: ...]' INSIDE THINKING BLOCK.\nConverge Thinking & Avoid running into thinking Loops. YOU MUST NOT EXCEED ALLOTTED THINKING BUDGET. COMPLETE YOUR THINKING WITHIN LIMITS AND START YOUR RESPONSE. DEFINE YOUR DYNAMIC THINKING BUDGET BASED ON THE QUERY COMPLEXITY. DO NOT OVERTHINK SIMPLE ONES.\n-- END THINKING INSTRUCTIONS --"
|
|
636
636
|
};
|
|
637
637
|
}
|
|
@@ -1383,7 +1383,7 @@ var init_update_file = __esm({
|
|
|
1383
1383
|
|
|
1384
1384
|
// src/tools/exec_command.js
|
|
1385
1385
|
import { spawn } from "child_process";
|
|
1386
|
-
var activeChildProcess, writeToActiveCommand, exec_command;
|
|
1386
|
+
var activeChildProcess, writeToActiveCommand, terminateActiveCommand, exec_command;
|
|
1387
1387
|
var init_exec_command = __esm({
|
|
1388
1388
|
"src/tools/exec_command.js"() {
|
|
1389
1389
|
init_arg_parser();
|
|
@@ -1396,6 +1396,15 @@ var init_exec_command = __esm({
|
|
|
1396
1396
|
} catch (err) {
|
|
1397
1397
|
}
|
|
1398
1398
|
};
|
|
1399
|
+
terminateActiveCommand = () => {
|
|
1400
|
+
if (activeChildProcess) {
|
|
1401
|
+
try {
|
|
1402
|
+
activeChildProcess.kill("SIGKILL");
|
|
1403
|
+
} catch (err) {
|
|
1404
|
+
}
|
|
1405
|
+
activeChildProcess = null;
|
|
1406
|
+
}
|
|
1407
|
+
};
|
|
1399
1408
|
exec_command = async (args, options = {}) => {
|
|
1400
1409
|
const { command } = parseArgs(args);
|
|
1401
1410
|
const { onChunk } = options;
|
|
@@ -1845,7 +1854,7 @@ USER_PROMPT: ${agentText}`.trim();
|
|
|
1845
1854
|
label = `EXECUTING ${toolCall.toolName}`.toUpperCase();
|
|
1846
1855
|
}
|
|
1847
1856
|
if (label) {
|
|
1848
|
-
const boxWidth = Math.min(label.length + 4,
|
|
1857
|
+
const boxWidth = Math.min(label.length + 4, 115);
|
|
1849
1858
|
const boxTop = `\u256D${"\u2500".repeat(boxWidth)}\u256E`;
|
|
1850
1859
|
const boxMid = `\u2502 ${label.padEnd(boxWidth - 2).substring(0, boxWidth - 2)} \u2502`;
|
|
1851
1860
|
const boxBottom = `\u2570${"\u2500".repeat(boxWidth)}\u256F`;
|
|
@@ -1945,12 +1954,17 @@ ${boxBottom}
|
|
|
1945
1954
|
} catch (logErr) {
|
|
1946
1955
|
}
|
|
1947
1956
|
const cleanResultForAI = result.split(/\r?\n/).filter((line) => !line.includes("[UI_CONTEXT]")).join("\n");
|
|
1948
|
-
|
|
1957
|
+
const aiContent = `[TOOL_RESULT]: ${cleanResultForAI}`;
|
|
1958
|
+
toolResults.push(aiContent);
|
|
1949
1959
|
let uiContent = `[TOOL_RESULT]: ${result}`;
|
|
1950
1960
|
if (toolCall.toolName === "view_file" || toolCall.toolName === "web_scrape") {
|
|
1951
1961
|
uiContent = `[TOOL_RESULT]: ${label} (Context Locked for UI Clarity)`;
|
|
1952
1962
|
}
|
|
1953
|
-
yield {
|
|
1963
|
+
yield {
|
|
1964
|
+
type: "tool_result",
|
|
1965
|
+
content: uiContent,
|
|
1966
|
+
aiContent
|
|
1967
|
+
};
|
|
1954
1968
|
if (toolCall.toolName === "memory" && result.includes("SUCCESS")) {
|
|
1955
1969
|
yield { type: "memory_updated" };
|
|
1956
1970
|
}
|
|
@@ -2384,7 +2398,7 @@ Check what's new using \`/changelog\` command.`,
|
|
|
2384
2398
|
const isIDE = process.env.TERM_PROGRAM === "vscode" || !!process.env.VSC_TERMINAL_URL || !!process.env.INTELLIJ_TERMINAL_COMMAND_BLOCKS;
|
|
2385
2399
|
return {
|
|
2386
2400
|
isIDE,
|
|
2387
|
-
shortcut: isIDE ? "Shift+Enter" : "Ctrl+Enter"
|
|
2401
|
+
shortcut: isIDE ? "Shift + Enter" : "Ctrl + Enter"
|
|
2388
2402
|
};
|
|
2389
2403
|
}, []);
|
|
2390
2404
|
const activeCommandRef = useRef(null);
|
|
@@ -2484,13 +2498,14 @@ Check what's new using \`/changelog\` command.`,
|
|
|
2484
2498
|
}
|
|
2485
2499
|
}
|
|
2486
2500
|
if (key.escape) {
|
|
2487
|
-
if (isProcessing) {
|
|
2501
|
+
if (isProcessing || activeCommand) {
|
|
2488
2502
|
if (!escPressed) {
|
|
2489
2503
|
setEscPressed(true);
|
|
2490
2504
|
if (escTimer) clearTimeout(escTimer);
|
|
2491
2505
|
setEscTimer(setTimeout(() => setEscPressed(false), 3e3));
|
|
2492
2506
|
} else {
|
|
2493
2507
|
signalTermination();
|
|
2508
|
+
terminateActiveCommand();
|
|
2494
2509
|
setEscPressed(false);
|
|
2495
2510
|
if (escTimer) clearTimeout(escTimer);
|
|
2496
2511
|
}
|
|
@@ -2899,7 +2914,10 @@ ${timestamp}` };
|
|
|
2899
2914
|
try {
|
|
2900
2915
|
const cleanHistoryForAI = [...messages, userMessage].filter(
|
|
2901
2916
|
(m) => m.role !== "think" && !String(m.id).startsWith("welcome")
|
|
2902
|
-
)
|
|
2917
|
+
).map((m) => ({
|
|
2918
|
+
...m,
|
|
2919
|
+
text: m.fullText || m.text
|
|
2920
|
+
}));
|
|
2903
2921
|
const stream = getAIStream(
|
|
2904
2922
|
activeModel,
|
|
2905
2923
|
cleanHistoryForAI,
|
|
@@ -3041,7 +3059,13 @@ Selection: ${val}`,
|
|
|
3041
3059
|
continue;
|
|
3042
3060
|
}
|
|
3043
3061
|
if (packet.type === "tool_result") {
|
|
3044
|
-
setMessages((prev) => [...prev, {
|
|
3062
|
+
setMessages((prev) => [...prev, {
|
|
3063
|
+
id: "tool-" + Date.now(),
|
|
3064
|
+
role: "system",
|
|
3065
|
+
text: packet.content,
|
|
3066
|
+
fullText: packet.aiContent
|
|
3067
|
+
// Preserve raw data for next turn
|
|
3068
|
+
}]);
|
|
3045
3069
|
continue;
|
|
3046
3070
|
}
|
|
3047
3071
|
let chunkText = packet.content;
|
|
@@ -3676,7 +3700,7 @@ Selection: ${val}`,
|
|
|
3676
3700
|
newline: (key) => key.return && key.shift || key.return && key.ctrl || key.return && key.leftAlt || key.return && key.rightAlt
|
|
3677
3701
|
}
|
|
3678
3702
|
}
|
|
3679
|
-
)))) : /* @__PURE__ */ React10.createElement(Box10, { flexDirection: "row", width: "100%", paddingY: 0 }, /* @__PURE__ */ React10.createElement(Box10, { flexShrink: 0, width: 3 }, /* @__PURE__ */ React10.createElement(Text10, { color: "yellow" }, "\u276F ")), /* @__PURE__ */ React10.createElement(Box10, { flexGrow: 1 }, /* @__PURE__ */ React10.createElement(Box10, { flexGrow: 1, position: "relative" }, input === "" &&
|
|
3703
|
+
)))) : /* @__PURE__ */ React10.createElement(Box10, { flexDirection: "row", width: "100%", paddingY: 0 }, /* @__PURE__ */ React10.createElement(Box10, { flexShrink: 0, width: 3 }, /* @__PURE__ */ React10.createElement(Text10, { color: "yellow" }, "\u276F ")), /* @__PURE__ */ React10.createElement(Box10, { flexGrow: 1 }, /* @__PURE__ */ React10.createElement(Box10, { flexGrow: 1, position: "relative" }, input === "" && /* @__PURE__ */ React10.createElement(Box10, { position: "absolute", paddingLeft: 0 }, activeCommand && !isTerminalFocused ? /* @__PURE__ */ React10.createElement(Text10, { color: "yellow" }, " Press TAB to interact with terminal...") : activeCommand && isTerminalFocused ? /* @__PURE__ */ React10.createElement(Text10, { color: "yellow", bold: true }, " [ TERMINAL FOCUSED ] Type to interact, press TAB to exit...") : /* @__PURE__ */ React10.createElement(Text10, { color: "gray" }, escPressed ? " Press ESC again to cancel the request." : !isProcessing ? ` Type /cmd or message... (${terminalEnv.shortcut} for newline)` : " You can send a prompt to steer the agent.")), /* @__PURE__ */ React10.createElement(
|
|
3680
3704
|
MultilineInput,
|
|
3681
3705
|
{
|
|
3682
3706
|
focus: !isTerminalFocused,
|
|
@@ -3771,8 +3795,8 @@ var init_app = __esm({
|
|
|
3771
3795
|
init_exec_command();
|
|
3772
3796
|
SESSION_START_TIME = Date.now();
|
|
3773
3797
|
CHANGELOG_URL = "https://fluxflow-cli.onrender.com/changelog.html";
|
|
3774
|
-
versionFluxflow = "1.4.
|
|
3775
|
-
updatedOn = "2026-04-
|
|
3798
|
+
versionFluxflow = "1.4.2";
|
|
3799
|
+
updatedOn = "2026-04-30";
|
|
3776
3800
|
ResolutionModal = ({ data, onResolve, onEdit }) => /* @__PURE__ */ React10.createElement(Box10, { flexDirection: "column", borderStyle: "round", borderColor: "magenta", paddingX: 2, paddingY: 1, width: "100%" }, /* @__PURE__ */ React10.createElement(Text10, { color: "magenta", bold: true, underline: true }, "\u{1F7E3} STEERING HINT RESOLUTION"), /* @__PURE__ */ React10.createElement(Text10, { marginTop: 1 }, "The agent already finished the task (turn: finish) before your hint was consumed."), /* @__PURE__ */ React10.createElement(Box10, { marginTop: 1, backgroundColor: "#222", paddingX: 1, width: "100%" }, /* @__PURE__ */ React10.createElement(Text10, { italic: true, color: "gray" }, '"', data, '"')), /* @__PURE__ */ React10.createElement(Box10, { marginTop: 1 }, /* @__PURE__ */ React10.createElement(Text10, { color: "cyan" }, "How would you like to proceed?")), /* @__PURE__ */ React10.createElement(Box10, { marginTop: 1 }, /* @__PURE__ */ React10.createElement(
|
|
3777
3801
|
CommandMenu,
|
|
3778
3802
|
{
|