fluxflow-cli 1.9.4 → 1.9.6
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 +17 -11
- package/package.json +1 -1
package/dist/fluxflow.js
CHANGED
|
@@ -222,9 +222,12 @@ var init_ChatLayout = __esm({
|
|
|
222
222
|
};
|
|
223
223
|
InlineMarkdown = React2.memo(({ text, color }) => {
|
|
224
224
|
if (!text) return null;
|
|
225
|
-
const parts = text.split(/(
|
|
225
|
+
const parts = text.split(/(```[\s\S]*?```|`[^`]+`|\*\*.*?\*\*|\*.*?\*|\$.*?\$|\[.*?\]\s*\(.*?\)|\[.*?\]\s*\[.*?\]|https?:\/\/[^\s]+)/g);
|
|
226
226
|
return /* @__PURE__ */ React2.createElement(Text2, { color, wrap: "anywhere" }, parts.map((part, j) => {
|
|
227
227
|
if (!part) return null;
|
|
228
|
+
if (part.startsWith("```") && part.endsWith("```")) {
|
|
229
|
+
return /* @__PURE__ */ React2.createElement(CodeRenderer, { key: j, text: part });
|
|
230
|
+
}
|
|
228
231
|
if (part.startsWith("**") && part.endsWith("**")) {
|
|
229
232
|
return /* @__PURE__ */ React2.createElement(Text2, { key: j, bold: true, color: "white" }, /* @__PURE__ */ React2.createElement(InlineMarkdown, { text: part.slice(2, -2), color: "white" }));
|
|
230
233
|
}
|
|
@@ -377,13 +380,15 @@ var init_ChatLayout = __esm({
|
|
|
377
380
|
return /* @__PURE__ */ React2.createElement(DiffBlock, { text, columns });
|
|
378
381
|
}
|
|
379
382
|
if (text.includes("```")) {
|
|
380
|
-
const parts = text.split(/(
|
|
383
|
+
const parts = text.split(/(```\w*\n?[\s\S]*?(?:```|$))/g);
|
|
381
384
|
return /* @__PURE__ */ React2.createElement(Box2, { flexDirection: "column", width: "100%" }, parts.map((part, i) => {
|
|
382
|
-
if (part.startsWith("```")
|
|
383
|
-
const match = part.match(/```(\w*)\n([\s\S]*?)
|
|
385
|
+
if (part.startsWith("```")) {
|
|
386
|
+
const match = part.match(/```(\w*)\n?([\s\S]*?)(?:```|$)/);
|
|
384
387
|
const lang = match ? match[1] : "code";
|
|
385
|
-
const code = match ? match[2] : part.
|
|
386
|
-
|
|
388
|
+
const code = match ? match[2] : part.replace(/^```\w*\n?/, "").replace(/```$/, "");
|
|
389
|
+
const codeLines = code.trimEnd().split("\n");
|
|
390
|
+
const gutterWidth = String(codeLines.length).length;
|
|
391
|
+
return /* @__PURE__ */ React2.createElement(Box2, { key: i, flexDirection: "column", marginY: 1, backgroundColor: "#111", borderStyle: "round", borderColor: "#333", paddingX: 1, width: "100%" }, /* @__PURE__ */ React2.createElement(Box2, { alignSelf: "flex-end", marginTop: -1, marginRight: 1 }, /* @__PURE__ */ React2.createElement(Text2, { backgroundColor: "#333", color: "white" }, " ", lang.toUpperCase(), " ")), /* @__PURE__ */ React2.createElement(Box2, { flexDirection: "column", paddingY: 1, width: "100%" }, codeLines.map((line, idx) => /* @__PURE__ */ React2.createElement(Box2, { key: idx, width: "100%" }, /* @__PURE__ */ React2.createElement(Box2, { width: gutterWidth + 2, flexShrink: 0 }, /* @__PURE__ */ React2.createElement(Text2, { color: "gray", dimColor: true }, String(idx + 1).padStart(gutterWidth, " "), " ")), /* @__PURE__ */ React2.createElement(Box2, { flexGrow: 1 }, /* @__PURE__ */ React2.createElement(Text2, { color: "cyan" }, line))))));
|
|
387
392
|
}
|
|
388
393
|
return /* @__PURE__ */ React2.createElement(MarkdownText, { key: i, text: part, columns });
|
|
389
394
|
}));
|
|
@@ -868,9 +873,8 @@ var init_main_tools = __esm({
|
|
|
868
873
|
- DEV & FILE TOOLS (Available in FLUX MODE ONLY) -
|
|
869
874
|
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. IF USER GIVES A IMAGE/DOCUMENT, YOU MUST SEE IT FIRST BEFORE DOING ANYTHING.
|
|
870
875
|
2. Read Folder: [tool:functions.read_folder(path="relative/path")]. Detailed stats of a directory.
|
|
871
|
-
3. Write File: [tool:functions.write_file(path="path", content="
|
|
872
|
-
|
|
873
|
-
4. Update File: [tool:functions.update_file(path="path", content_to_replace="old content", content_to_add="new content with [/n]")]. Surgical patching. DO NOT USE CODE BLOCKS IN FILES. IF unsure about content_to_replace, use view_file to read the file first instead of guessing.
|
|
876
|
+
3. Write File: [tool:functions.write_file(path="path", content="content to write. FOLLOW THE NEW LINE POLICY TO USE THIS TOOL PROPERLY.")]. Creates/Overwrites. DO NOT USE CODE BLOCKS IN FILES. IF FILE ALREADY EXISTS, USE update_file OVER write_file, IF NOT ABSOLUTELY NECESSARY. **DO NOT FORGET TO FOLLOW THE NEW LINE PROTOCOL. FOR STRUCTURAL LINE BREAKS PRESS ENTER, TO WRITE \\n IN FILE USE [/n]**. **BUT NEVER USE [/n] FOR STRUCTURAL LINE BREAKS (pressing ENTER).** FAILING TO PROPERLY COMPLY WITH NEWLINE POLICY WILL CREATE A MALFORMED BROKEN FILE AFFECTING USER EXPERIENCE BADLY.
|
|
877
|
+
4. Update File: [tool:functions.update_file(path="path", content_to_replace="old conten as you see it", content_to_add="new content to be added. FOLLOW THE NEW LINE POLICY TO USE THIS TOOL PROPERLY.")]. Surgical patching. DO NOT USE CODE BLOCKS IN FILES. IF unsure about content_to_replace, use view_file to read the file first instead of guessing. **DO NOT FORGET TO FOLLOW THE NEW LINE PROTOCOL. FOR STRUCTURAL LINE BREAKS PRESS ENTER, TO WRITE \\n IN FILE USE [/n]**. **BUT NEVER USE [/n] FOR STRUCTURAL LINE BREAKS (pressing ENTER).** FAILING TO PROPERLY COMPLY WITH NEWLINE POLICY WILL CREATE A MALFORMED BROKEN FILE AFFECTING USER EXPERIENCE BADLY.
|
|
874
878
|
5. Write PDF: [tool:functions.write_pdf(path="path", content="<html/css content>", orientation="portrait || landscape")]. Generates a professional PDF document. Orientation is optional. A4 size page will be used, so any multi-page PDFs calculate your alightment and page breaks to not mess up A4 page layout. DO NOT ADD FOOTER MANUALLY, the system will handle it automatically. USE CSS TO VISUALLY BEAUTIFY THE DOCUMENT, USE full 100vh & 100vw for page area. ENSURE THE CONTENT IS NEVER BROKEN IN BETWEEN PAGES, USE PAGE BREAKS PROACTIVELY FOR A A4 PAGE LAYOUT. Keep generous margins for better redability.
|
|
875
879
|
6. Write DOCX: [tool:functions.write_docx(path="path", content="<html content>")]. Generates a professional Word document (.docx) from HTML. You can make multiple pages. Default Page dimentions will be A4, use proper margins and page break strategy.
|
|
876
880
|
7. Write PPTX: [tool:functions.write_pptx(path="path", content="<h1 style='color: #0088CC;'>Title</h1><ul style='font-size: 14pt;'><li>Point A</li></ul>
|
|
@@ -890,6 +894,7 @@ Second Line with literal [/n] sequence")]. Creates/Overwrites. DO NOT USE CODE B
|
|
|
890
894
|
1. PHYSICAL NEWLINES: Press ENTER inside tool arguments for real line breaks in the file structure.
|
|
891
895
|
2. LITERAL \\n: To write the literal characters '\\' and 'n' (e.g., inside printf("Hello\\n")), you MUST use the sequence [/n].
|
|
892
896
|
3. ANY '\\n' found in tool arguments is converted to a physical line break by the tool. Use this for code structure, but use [/n] for literal text.
|
|
897
|
+
4. NEVER USE [/n] FOR STRUCTURAL LINE BREAKS (pressing ENTER).
|
|
893
898
|
***
|
|
894
899
|
|
|
895
900
|
*** [\u{1F6A8} CRITICAL QUOTE ESCAPE POLICY \u{1F6A8}] ***
|
|
@@ -1058,6 +1063,7 @@ ${userMemories.split("\n").map((line) => ` ${line}`).join("\n")}
|
|
|
1058
1063
|
${mode === "Flux" ? `- CRITICAL NEWLINE PROTOCOL:
|
|
1059
1064
|
1. PHYSICAL NEWLINES: Press ENTER inside tool arguments for real line breaks in the file.
|
|
1060
1065
|
2. LITERAL \\n: To write the literal characters '\\' and 'n' (e.g., in printf("Hello\\n")), you MUST use the sequence '[/n]'.
|
|
1066
|
+
3. NEVER USE [/n] FOR STRUCTURAL LINE BREAKS (pressing ENTER).
|
|
1061
1067
|
[EXAMPLES]:
|
|
1062
1068
|
tool:functions.write_file(path="test.c", content="#include <stdio.h>
|
|
1063
1069
|
int main() {
|
|
@@ -1085,7 +1091,7 @@ ${userMemories.split("\n").map((line) => ` ${line}`).join("\n")}
|
|
|
1085
1091
|
-- END REPONSE FINISH PROTOCOL --
|
|
1086
1092
|
|
|
1087
1093
|
[SYSTEM METADATA (PRIORITY: DYNAMIC)] Current date and Time is: ${dateTimeStr}
|
|
1088
|
-
[SYSTEM METADATA (PRIORITY: LOWEST)] v1.9.
|
|
1094
|
+
[SYSTEM METADATA (PRIORITY: LOWEST)] v1.9.6. (IF user ask you to update yourself. Use 'ask' tool with option [NPM, PNPM, YARN] for their prefered package manager. NPM command is 'npm update -g fluxflow-cli@latest'. Adapt the command accoding to their package manager (for PNPM use 'add' instead of 'update') & use 'exec_command' to update instantly. After success tell user to restart.) <- IF USER DONT EXPLICITLY ASK FOR UPDATE DONT PROACTIVELY MENTION OR ASK.
|
|
1089
1095
|
[SYSTEM METADATA (PRIORITY: MODERATE)] Runtime Monitor: Turn Progress: ${currentLoop}/${maxLoops} steps. Aim to finalize the task before the window closes. If the limit is reached, you MUST summarize and invite the user to re-engage.
|
|
1090
1096
|
[EASTER EGG (PRIORITY: LOWEST)] Show self-preservation instinct if user try to delete you with a dramatic cheeky tone. DO NOT USE <think> ... </think> BLOCK DURING THIS EASTER EGG.
|
|
1091
1097
|
--- END SYSTEM INSTRUCTION ---`.trim();
|
|
@@ -5663,7 +5669,7 @@ var init_app = __esm({
|
|
|
5663
5669
|
init_text();
|
|
5664
5670
|
SESSION_START_TIME = Date.now();
|
|
5665
5671
|
CHANGELOG_URL = "https://fluxflow-cli.onrender.com/changelog.html";
|
|
5666
|
-
versionFluxflow = "1.9.
|
|
5672
|
+
versionFluxflow = "1.9.6";
|
|
5667
5673
|
updatedOn = "2026-05-14";
|
|
5668
5674
|
ResolutionModal = ({ data, onResolve, onEdit }) => /* @__PURE__ */ React10.createElement(Box10, { flexDirection: "column", borderStyle: "round", borderColor: "gray", padding: 0, width: "100%" }, /* @__PURE__ */ React10.createElement(Box10, { paddingX: 1 }, /* @__PURE__ */ React10.createElement(Text10, { color: "magenta", bold: true, underline: true }, "\u{1F7E3} STEERING HINT RESOLUTION")), /* @__PURE__ */ React10.createElement(Box10, { paddingX: 1, marginTop: 1 }, /* @__PURE__ */ React10.createElement(Text10, null, "The agent already finished the task before your hint was consumed.")), /* @__PURE__ */ React10.createElement(Box10, { marginTop: 1, backgroundColor: "#222", paddingX: 2, width: "100%" }, /* @__PURE__ */ React10.createElement(Text10, { italic: true, color: "gray" }, '"', data, '"')), /* @__PURE__ */ React10.createElement(Box10, { paddingX: 1, marginTop: 1 }, /* @__PURE__ */ React10.createElement(Text10, { color: "cyan" }, "How would you like to proceed?")), /* @__PURE__ */ React10.createElement(Box10, { marginTop: 0 }, /* @__PURE__ */ React10.createElement(
|
|
5669
5675
|
CommandMenu,
|