fluxflow-cli 1.7.14 → 1.7.16
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 +36 -16
- package/package.json +1 -1
package/dist/fluxflow.js
CHANGED
|
@@ -65,7 +65,7 @@ var init_TerminalBox = __esm({
|
|
|
65
65
|
// src/components/ChatLayout.jsx
|
|
66
66
|
import React2, { useState, useEffect, useRef } from "react";
|
|
67
67
|
import { Box as Box2, Text as Text2 } from "ink";
|
|
68
|
-
var TypewriterText, cleanSignals, formatThinkText, InlineMarkdown, TableRenderer, MarkdownText, DiffLine, DiffBlock, CodeRenderer, MessageItem, ChatLayout, ChatLayout_default;
|
|
68
|
+
var TypewriterText, cleanSignals, formatThinkText, parseMathSymbols, InlineMarkdown, TableRenderer, MarkdownText, DiffLine, DiffBlock, CodeRenderer, MessageItem, ChatLayout, ChatLayout_default;
|
|
69
69
|
var init_ChatLayout = __esm({
|
|
70
70
|
"src/components/ChatLayout.jsx"() {
|
|
71
71
|
init_TerminalBox();
|
|
@@ -158,6 +158,9 @@ var init_ChatLayout = __esm({
|
|
|
158
158
|
return /* @__PURE__ */ React2.createElement(Box2, { key: i, marginLeft: isBullet ? 2 : 0, width: "100%" }, /* @__PURE__ */ React2.createElement(Text2, { italic: true, color: "gray" }, bulletPrefix, wrapped.split("\n").join("\n" + " ".repeat(bulletPrefix.length))));
|
|
159
159
|
});
|
|
160
160
|
};
|
|
161
|
+
parseMathSymbols = (content) => {
|
|
162
|
+
return content.replace(/\\multiply|\\mul|\\times/g, "\xD7").replace(/\\div/g, "\xF7").replace(/\\cdot/g, "\u22C5").replace(/\\infty/g, "\u221E").replace(/\\pm/g, "\xB1").replace(/\\leq/g, "\u2264").replace(/\\geq/g, "\u2265").replace(/\\neq/g, "\u2260").replace(/\\sqrt\{?(.*?)\}?/g, (_, p1) => `\u221A(${p1})`).replace(/\\alpha/g, "\u03B1").replace(/\\beta/g, "\u03B2").replace(/\\theta/g, "\u03B8").replace(/\\pi/g, "\u03C0").replace(/\\approx/g, "\u2248").replace(/\\Delta/g, "\u0394").replace(/\\sigma/g, "\u03C3").replace(/\\sum/g, "\u03A3").replace(/\\prod/g, "\u03A0").replace(/\\rightarrow|\\to/g, "\u2192").replace(/\\leftarrow/g, "\u2190").replace(/\\leftrightarrow/g, "\u2194").replace(/\\left\(|\\right\)/g, (match) => match.includes("left") ? "(" : ")").replace(/\\left\[|\\right\]/g, (match) => match.includes("left") ? "[" : "]").replace(/\\\{|\\\}/g, (match) => match.includes("{") ? "{" : "}").replace(/\\text\{?(.*?)\}?/g, "$1");
|
|
163
|
+
};
|
|
161
164
|
InlineMarkdown = React2.memo(({ text, color }) => {
|
|
162
165
|
if (!text) return null;
|
|
163
166
|
const parts = text.split(/(\*\*.*?\*\*|\*.*?\*|`.*?`|\$.*?\$|\[.*?\]\s*\(.*?\)|\[.*?\]\s*\[.*?\]|https?:\/\/[^\s]+)/g);
|
|
@@ -173,12 +176,23 @@ var init_ChatLayout = __esm({
|
|
|
173
176
|
return /* @__PURE__ */ React2.createElement(Text2, { key: j, color: "cyan", backgroundColor: "#003333" }, " ", part.slice(1, -1), " ");
|
|
174
177
|
}
|
|
175
178
|
if (part.startsWith("$") && part.endsWith("$")) {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
179
|
+
const content = part.slice(1, -1);
|
|
180
|
+
const latexParts = content.split(/(\\(?:mathbf|textbf|textit|underline|text|mathrm|textsf|texttt)\{.*?\})/g);
|
|
181
|
+
return /* @__PURE__ */ React2.createElement(Text2, { key: j, color: "yellow" }, latexParts.map((lp, lpi) => {
|
|
182
|
+
if (lp.startsWith("\\")) {
|
|
183
|
+
const match = lp.match(/\\(\w+)\{(.*?)\}/);
|
|
184
|
+
if (match) {
|
|
185
|
+
const cmd = match[1];
|
|
186
|
+
const inner = match[2];
|
|
187
|
+
const isBold = cmd === "mathbf" || cmd === "textbf";
|
|
188
|
+
const isItalic = cmd === "textit";
|
|
189
|
+
const isUnderline = cmd === "underline";
|
|
190
|
+
const isMono = cmd === "texttt";
|
|
191
|
+
return /* @__PURE__ */ React2.createElement(Text2, { key: lpi, bold: isBold, italic: isItalic, underline: isUnderline, color: isMono ? "cyan" : void 0 }, parseMathSymbols(inner));
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
return /* @__PURE__ */ React2.createElement(Text2, { key: lpi }, parseMathSymbols(lp));
|
|
195
|
+
}));
|
|
182
196
|
}
|
|
183
197
|
if (part.startsWith("[") && (part.includes("](") || part.includes("] ("))) {
|
|
184
198
|
const match = part.match(/\[(.*?)\]\s*\((.*?)\)/);
|
|
@@ -700,7 +714,7 @@ tool:functions.tool_name(arguments)
|
|
|
700
714
|
2. Web Scrape: tool:functions.web_scrape(url="<url>"). provides detail from a URL.
|
|
701
715
|
${mode === "Flux" ? `
|
|
702
716
|
- DEV & FILE TOOLS (Available in FLUX MODE ONLY) -
|
|
703
|
-
1. View File: tool:functions.view_file(path="relative/path", start_line=number, end_line=number). Reads file content. Auto-truncates at 500 lines unless start_line and end_line are provided.
|
|
717
|
+
1. View File: tool:functions.view_file(path="relative/path", start_line=number, end_line=number). Reads file content. Auto-truncates at 500 lines unless start_line and end_line are provided. YOU CAN ALSO USE THIS TOOL TO SEE IMAGES AND DOCUMENTS IN A FOLDER. IF USER ASK HOW TO SHARE A IMAGE TELL THEM TO PASTE THE IMAGE IN THE CURRENT FOLDER.
|
|
704
718
|
2. List Files: tool:functions.list_files(path="relative/path"). Lists content of a directory.
|
|
705
719
|
3. Read Folder: tool:functions.read_folder(path="relative/path"). Detailed stats of a directory.
|
|
706
720
|
4. Write File: tool:functions.write_file(path="path", content="content"). Creates/Overwrites. NO CODE BLOCKS. RETURNS: Disk verification + original content (if overwritten) for 100% reversibility. Escape your double quotes '"' using backslash.
|
|
@@ -764,10 +778,10 @@ var thinking_prompts_default;
|
|
|
764
778
|
var init_thinking_prompts = __esm({
|
|
765
779
|
"src/data/thinking_prompts.json"() {
|
|
766
780
|
thinking_prompts_default = {
|
|
767
|
-
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\
|
|
768
|
-
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\
|
|
769
|
-
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\
|
|
770
|
-
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\
|
|
781
|
+
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\nRULES OF THINKING: -HEADING COUNT SHOULD BE 12 - 20. SELF-MONOLOGUE SHOULD BE DETAILED AND THROROUGH. MONOLOGUES SHOULD BE **8 - 12** SENTENCES EACH REGARDLESS OF QUERY COMPLEXITY.\n- YOU MUST **NOT** EXCREED YOUR ALLOTED THINKING BUDGET UNDER **ANY** CIRCUMSTANCES.\n- IF THE QUERY IS SIMPLE, YOU CAN KEEP HEADING COUNT LESS THAN MIN COUNT.\n- CONSIDER ABOUT EDGE CASES BEFORE COMMITING.\n- SHOULD PLAN ARCHITECHTURALLY.\n- SHOULD PLAN LOGICALLY.\n\n-- END THINKING INSTRUCTIONS --",
|
|
782
|
+
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\nnRULES OF THINKING: -HEADING COUNT SHOULD BE 8 - 12. SELF-MONOLOGUE SHOULD BE DETAILED AND THROROUGH. MONOLOGUES SHOULD BE **6 - 8** SENTENCES EACH REGARDLESS OF QUERY COMPLEXITY.\n- YOU MUST **NOT** EXCREED YOUR ALLOTED THINKING BUDGET UNDER **ANY** CIRCUMSTANCES.\n- IF THE QUERY IS SIMPLE, YOU CAN KEEP HEADING COUNT LESS THAN MIN COUNT.\n- CONSIDER ABOUT EDGE CASES BEFORE COMMITING.\n\n-- END THINKING INSTRUCTIONS --",
|
|
783
|
+
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\nnRULES OF THINKING: -HEADING COUNT SHOULD BE 2 - 4. SELF-MONOLOGUE SHOULD BE SHORT YET THROROUGH. MONOLOGUES SHOULD BE **4 - 6** SENTENCES EACH REGARDLESS OF QUERY COMPLEXITY.\n- YOU MUST **NOT** EXCREED YOUR ALLOTED THINKING BUDGET UNDER **ANY** CIRCUMSTANCES.\n- IF THE QUERY IS SIMPLE, YOU CAN KEEP HEADING COUNT LESS THAN MIN COUNT.\n- LITTLE TO NO THINKING IS PREFFERED IF QUERY IS CONVERSATIONAL AND SIMPLE.\n\n-- END THINKING INSTRUCTIONS --",
|
|
784
|
+
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\nnRULES OF THINKING: -HEADING COUNT SHOULD BE 0 - 2. SELF-MONOLOGUE SHOULD BE SHORT AND CONCISE. MONOLOGUES SHOULD BE **1 - 2** SENTENCES EACH REGARDLESS OF QUERY COMPLEXITY.\n- YOU MUST **NOT** EXCREED YOUR ALLOTED THINKING BUDGET UNDER **ANY** CIRCUMSTANCES.\n- IF THE QUERY IS SIMPLE, YOU CAN KEEP HEADING COUNT LESS THAN MIN COUNT.\n- NO THINKING IS PREFFERED IF QUERY IS CONVERSATIONAL AND SIMPLE.\n\n-- END THINKING INSTRUCTIONS --"
|
|
771
785
|
};
|
|
772
786
|
}
|
|
773
787
|
});
|
|
@@ -2517,9 +2531,15 @@ USER_PROMPT: ${agentText}`.trim();
|
|
|
2517
2531
|
}
|
|
2518
2532
|
const thinkBlocks = turnText.match(/<think>([\s\S]*?)(?:<\/think>|$)/gi) || [];
|
|
2519
2533
|
const thinkContent = thinkBlocks.join("");
|
|
2520
|
-
const headingsCount = (thinkContent.match(
|
|
2521
|
-
|
|
2522
|
-
|
|
2534
|
+
const headingsCount = (thinkContent.match(/^\s*\*\*.*?\*\*\s*$/gm) || []).length;
|
|
2535
|
+
const headingSections = thinkContent.split(/^\s*\*\*.*?\*\*\s*$/gm);
|
|
2536
|
+
const isOverVerbose = headingSections.some((section) => {
|
|
2537
|
+
const wordCount = section.trim().split(/\s+/).filter((w) => w.length > 0).length;
|
|
2538
|
+
return wordCount > 450;
|
|
2539
|
+
});
|
|
2540
|
+
if (headingsCount > 25 || isOverVerbose) {
|
|
2541
|
+
const reason = headingsCount > 25 ? "Loop Detected" : "Noise Detected";
|
|
2542
|
+
yield { type: "status", content: `${reason}. Auto-adjusting...` };
|
|
2523
2543
|
await new Promise((resolve) => setTimeout(resolve, 3e3));
|
|
2524
2544
|
break;
|
|
2525
2545
|
}
|
|
@@ -4682,7 +4702,7 @@ var init_app = __esm({
|
|
|
4682
4702
|
init_setup();
|
|
4683
4703
|
SESSION_START_TIME = Date.now();
|
|
4684
4704
|
CHANGELOG_URL = "https://fluxflow-cli.onrender.com/changelog.html";
|
|
4685
|
-
versionFluxflow = "1.7.
|
|
4705
|
+
versionFluxflow = "1.7.16";
|
|
4686
4706
|
updatedOn = "2026-05-05";
|
|
4687
4707
|
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 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(
|
|
4688
4708
|
CommandMenu,
|