fluxflow-cli 1.9.6 → 1.9.7
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 -27
- package/package.json +1 -1
package/dist/fluxflow.js
CHANGED
|
@@ -143,17 +143,17 @@ var init_ChatLayout = __esm({
|
|
|
143
143
|
init_text();
|
|
144
144
|
init_terminal();
|
|
145
145
|
TOOL_LABELS = {
|
|
146
|
-
"write_file": "
|
|
147
|
-
"update_file": "
|
|
148
|
-
"read_folder": "
|
|
149
|
-
"view_file": "
|
|
150
|
-
"exec_command": "
|
|
151
|
-
"web_search": "
|
|
152
|
-
"web_scrape": "
|
|
153
|
-
"search_keyword": "
|
|
154
|
-
"write_pdf": "
|
|
155
|
-
"write_pptx": "
|
|
156
|
-
"write_docx": "
|
|
146
|
+
"write_file": "WriteFile",
|
|
147
|
+
"update_file": "UpdateFile",
|
|
148
|
+
"read_folder": "ReadFolder",
|
|
149
|
+
"view_file": "ViewFile",
|
|
150
|
+
"exec_command": "ExecuteCommand",
|
|
151
|
+
"web_search": "WebSearch",
|
|
152
|
+
"web_scrape": "ReadSite",
|
|
153
|
+
"search_keyword": "FindFiles",
|
|
154
|
+
"write_pdf": "CreatePDF",
|
|
155
|
+
"write_pptx": "CreatePresentation",
|
|
156
|
+
"write_docx": "CreateDocument"
|
|
157
157
|
};
|
|
158
158
|
cleanSignals = (text) => {
|
|
159
159
|
if (!text) return text;
|
|
@@ -209,7 +209,7 @@ var init_ChatLayout = __esm({
|
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
|
-
return result.replace(/^\[TOOL_RESULT\]:\s*/gi, "").split("\n").filter((line) => !line.trim().startsWith("SUCCESS:") && !line.trim().startsWith("ERROR:")).join("\n").replace(/\[\s*turn\s*:\s*(continue|finish)\s*\]/gi, "").replace(/\[\s*turn\s*:?.*?$/gi, "").replace(/\n\s*turn\s*:?.*?$/gi, "").replace(/\[\s*$/gi, "").replace(/\n\nResponded on .*/g, "").replace(/\n\n\[Prompted on: .*\]/g, "").replace(/(\$?\\?\/?\\rightarrow\$?|\$\\rightarrow\$)/gi, "\u2192").replace(/(\$?\\?\/?\\leftarrow\$?|\$\\leftarrow\$)/gi, "\u2190").replace(/(\$?\\?\/?\\uparrow\$?|\$\\uparrow\$)/gi, "\u2191").replace(/(\$?\\?\/?\\downarrow\$?|\$\\downarrow\$)/gi, "\u2193").replace(/(\$?\\?\/?\\leftrightarrow\$?|\$\\leftrightarrow\$)/gi, "\u2194").replace(/\[\/n\]?/g, "
|
|
212
|
+
return result.replace(/^\[TOOL_RESULT\]:\s*/gi, "").split("\n").filter((line) => !line.trim().startsWith("SUCCESS:") && !line.trim().startsWith("ERROR:")).join("\n").replace(/\[\s*turn\s*:\s*(continue|finish)\s*\]/gi, "").replace(/\[\s*turn\s*:?.*?$/gi, "").replace(/\n\s*turn\s*:?.*?$/gi, "").replace(/\[\s*$/gi, "").replace(/\n\nResponded on .*/g, "").replace(/\n\n\[Prompted on: .*\]/g, "").replace(/(\$?\\?\/?\\rightarrow\$?|\$\\rightarrow\$)/gi, "\u2192").replace(/(\$?\\?\/?\\leftarrow\$?|\$\\leftarrow\$)/gi, "\u2190").replace(/(\$?\\?\/?\\uparrow\$?|\$\\uparrow\$)/gi, "\u2191").replace(/(\$?\\?\/?\\downarrow\$?|\$\\downarrow\$)/gi, "\u2193").replace(/(\$?\\?\/?\\leftrightarrow\$?|\$\\leftrightarrow\$)/gi, "\u2194").replace(/\[\/n\]?/g, "\\\\n").replace(/@\[TerminalName:.*?, ProcessId:.*?\]/gi, "").replace(/\b(write_file|update_file|read_folder|view_file|exec_command|web_search|web_scrape|search_keyword|write_pdf|write_pptx|write_docx)\b/gi, (match) => TOOL_LABELS[match.toLowerCase()] || match).trim();
|
|
213
213
|
};
|
|
214
214
|
formatThinkText = (cleaned, columns = 80) => {
|
|
215
215
|
if (!cleaned) return null;
|
|
@@ -379,6 +379,18 @@ var init_ChatLayout = __esm({
|
|
|
379
379
|
if (text.includes("[DIFF_START]")) {
|
|
380
380
|
return /* @__PURE__ */ React2.createElement(DiffBlock, { text, columns });
|
|
381
381
|
}
|
|
382
|
+
if (text.includes("- Content Preview:")) {
|
|
383
|
+
const mainParts = text.split("- Content Preview:");
|
|
384
|
+
const headerText = mainParts[0];
|
|
385
|
+
const contentPart = mainParts[1] || "";
|
|
386
|
+
const footerMarker = "Check if Starting and Ending matches";
|
|
387
|
+
const contentAndFooter = contentPart.split(footerMarker);
|
|
388
|
+
const content = contentAndFooter[0]?.trim() || "";
|
|
389
|
+
const footer = contentAndFooter[1] ? `${footerMarker}${contentAndFooter[1]}` : "";
|
|
390
|
+
const codeLines = content.split("\n");
|
|
391
|
+
const gutterWidth = String(codeLines.length).length;
|
|
392
|
+
return /* @__PURE__ */ React2.createElement(Box2, { flexDirection: "column", width: "100%" }, /* @__PURE__ */ React2.createElement(Box2, { flexDirection: "column", borderStyle: "round", borderColor: "#444", paddingX: 1, width: "100%" }, /* @__PURE__ */ React2.createElement(Box2, { alignSelf: "flex-end", marginTop: -1, marginRight: 1 }, /* @__PURE__ */ React2.createElement(Text2, { backgroundColor: "#444", color: "white" }, " FILE SNAPSHOT ")), /* @__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: "white" }, line)))))));
|
|
393
|
+
}
|
|
382
394
|
if (text.includes("```")) {
|
|
383
395
|
const parts = text.split(/(```\w*\n?[\s\S]*?(?:```|$))/g);
|
|
384
396
|
return /* @__PURE__ */ React2.createElement(Box2, { flexDirection: "column", width: "100%" }, parts.map((part, i) => {
|
|
@@ -396,7 +408,7 @@ var init_ChatLayout = __esm({
|
|
|
396
408
|
return /* @__PURE__ */ React2.createElement(MarkdownText, { text, columns });
|
|
397
409
|
});
|
|
398
410
|
MessageItem = React2.memo(({ msg, showFullThinking, columns = 80 }) => {
|
|
399
|
-
const isDiffResult = msg.role === "system" && msg.text?.includes("[DIFF_START]");
|
|
411
|
+
const isDiffResult = msg.role === "system" && (msg.text?.includes("[DIFF_START]") || msg.text?.includes("- Content Preview:"));
|
|
400
412
|
const isPatchError = msg.role === "system" && msg.text?.includes("[TOOL_RESULT]: ERROR:") && (msg.toolName === "update_file" || msg.text?.includes("Could not find exact match"));
|
|
401
413
|
const isTerminalRecord = msg.isTerminalRecord;
|
|
402
414
|
const isHomeWarning = msg.isHomeWarning;
|
|
@@ -508,8 +520,8 @@ var init_ChatLayout = __esm({
|
|
|
508
520
|
if (msg.role === "think" && !showFullThinking) {
|
|
509
521
|
return "Thinking...";
|
|
510
522
|
}
|
|
511
|
-
return content;
|
|
512
|
-
}, [content, msg.role, showFullThinking]);
|
|
523
|
+
return msg.isStreaming ? content : content.trimEnd();
|
|
524
|
+
}, [content, msg.role, showFullThinking, msg.isStreaming]);
|
|
513
525
|
return /* @__PURE__ */ React2.createElement(Box2, { marginBottom: 1, flexDirection: "column", flexShrink: 0, width: "100%", flexGrow: 1 }, msg.role === "user" ? /* @__PURE__ */ React2.createElement(
|
|
514
526
|
Box2,
|
|
515
527
|
{
|
|
@@ -523,7 +535,7 @@ var init_ChatLayout = __esm({
|
|
|
523
535
|
finalContent.replace(/\r\n/g, "\n").replace(/\r/g, "\n").replace(/\\\n/g, "\n").replace(/\\$/, ""),
|
|
524
536
|
columns - 6
|
|
525
537
|
).split("\n").map((line, lineIdx) => /* @__PURE__ */ React2.createElement(Box2, { key: lineIdx, flexDirection: "row", width: "100%" }, /* @__PURE__ */ React2.createElement(Box2, { flexShrink: 0, width: 2 }, /* @__PURE__ */ React2.createElement(Text2, { bold: true, color: "white" }, lineIdx === 0 ? "\u276F" : " ")), /* @__PURE__ */ React2.createElement(Box2, { flexGrow: 1, marginLeft: 1 }, /* @__PURE__ */ React2.createElement(Text2, { color: msg.color || "white", wrap: "anywhere" }, line))))
|
|
526
|
-
) : msg.role === "think" ? /* @__PURE__ */ React2.createElement(Box2, { flexDirection: "column", marginTop: 1, paddingX: 1, width: "100%" }, /* @__PURE__ */ React2.createElement(Text2, { bold: true, color: "white" }, "Thinking..."), /* @__PURE__ */ React2.createElement(Box2, { borderStyle: "single", borderLeft: true, borderRight: false, borderTop: false, borderBottom: false, paddingLeft: 2, flexDirection: "column", width: "100%" }, formatThinkText(finalContent, columns))) : /* @__PURE__ */ React2.createElement(Box2, { flexDirection: "column", paddingX: 1, marginTop: 1, width: "100%" }, /* @__PURE__ */ React2.createElement(CodeRenderer, { text: finalContent, columns }), msg.memoryUpdated && /* @__PURE__ */ React2.createElement(Box2, { marginTop: 1, width: "100%" }, /* @__PURE__ */ React2.createElement(Text2, { color: "yellow", italic: true }, "\u2728 [Memory Updated]"))));
|
|
538
|
+
) : msg.role === "think" ? /* @__PURE__ */ React2.createElement(Box2, { flexDirection: "column", marginTop: 1, paddingX: 1, width: "100%" }, /* @__PURE__ */ React2.createElement(Text2, { bold: true, color: "white" }, "Thinking..."), /* @__PURE__ */ React2.createElement(Box2, { borderStyle: "single", borderLeft: true, borderRight: false, borderTop: false, borderBottom: false, paddingLeft: 2, flexDirection: "column", width: "100%" }, formatThinkText(finalContent, columns))) : /* @__PURE__ */ React2.createElement(Box2, { flexDirection: "column", paddingX: 1, marginTop: isDiffResult ? 0 : 1, width: "100%" }, /* @__PURE__ */ React2.createElement(CodeRenderer, { text: finalContent, columns }), msg.memoryUpdated && /* @__PURE__ */ React2.createElement(Box2, { marginTop: 1, width: "100%" }, /* @__PURE__ */ React2.createElement(Text2, { color: "yellow", italic: true }, "\u2728 [Memory Updated]"))));
|
|
527
539
|
});
|
|
528
540
|
ChatLayout = React2.memo(({ messages, showFullThinking, columns = 80 }) => {
|
|
529
541
|
return /* @__PURE__ */ React2.createElement(Box2, { flexDirection: "column", width: "100%" }, messages.map((msg, idx) => /* @__PURE__ */ React2.createElement(
|
|
@@ -1091,7 +1103,7 @@ ${userMemories.split("\n").map((line) => ` ${line}`).join("\n")}
|
|
|
1091
1103
|
-- END REPONSE FINISH PROTOCOL --
|
|
1092
1104
|
|
|
1093
1105
|
[SYSTEM METADATA (PRIORITY: DYNAMIC)] Current date and Time is: ${dateTimeStr}
|
|
1094
|
-
[SYSTEM METADATA (PRIORITY: LOWEST)] v1.9.
|
|
1106
|
+
[SYSTEM METADATA (PRIORITY: LOWEST)] v1.9.7. (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.
|
|
1095
1107
|
[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.
|
|
1096
1108
|
[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.
|
|
1097
1109
|
--- END SYSTEM INSTRUCTION ---`.trim();
|
|
@@ -1967,7 +1979,7 @@ ${ancestry}- Content Preview:
|
|
|
1967
1979
|
${snippet.replace(/\\n/g, "[/n]")}
|
|
1968
1980
|
|
|
1969
1981
|
Check if Starting and Ending matches your write.
|
|
1970
|
-
If you see [/n] in preview, it means the tool successfully wrote the literal '' and 'n' characters to the file at that place.`;
|
|
1982
|
+
If you see [/n] in preview, it means the tool successfully wrote the literal '\\' and 'n' characters to the file at that place.`;
|
|
1971
1983
|
} catch (err) {
|
|
1972
1984
|
return `ERROR: Failed to write file [${targetPath}]: ${err.message}`;
|
|
1973
1985
|
}
|
|
@@ -3300,11 +3312,11 @@ USER_PROMPT: "${agentText}"`.trim();
|
|
|
3300
3312
|
const isPdf = pathLower.endsWith(".pdf");
|
|
3301
3313
|
const isImage = /\.(png|jpg|jpeg|webp|gif|bmp)$/.test(pathLower);
|
|
3302
3314
|
if (isPdf) {
|
|
3303
|
-
label = `\u{1F4C4}
|
|
3315
|
+
label = `\u{1F4C4} ANALYZED PDF: ${targetPath2}`.toUpperCase();
|
|
3304
3316
|
} else if (isImage) {
|
|
3305
|
-
label = `\u{1F4F8}
|
|
3317
|
+
label = `\u{1F4F8} ANALYZED IMAGE: ${targetPath2}`.toUpperCase();
|
|
3306
3318
|
} else {
|
|
3307
|
-
label = `\u{1F4C4}
|
|
3319
|
+
label = `\u{1F4C4} ANALYZED FILE: ${targetPath2} | LINES: ${sLine}-${actualEndLine} OF ${totalLines}`.toUpperCase();
|
|
3308
3320
|
}
|
|
3309
3321
|
} else if (toolCall.toolName === "list_files" || toolCall.toolName === "read_folder") {
|
|
3310
3322
|
const action = toolCall.toolName === "list_files" ? "LIST" : "ANALYSED";
|
|
@@ -3331,12 +3343,9 @@ USER_PROMPT: "${agentText}"`.trim();
|
|
|
3331
3343
|
const boxTop = `\u256D${"\u2500".repeat(boxWidth)}\u256E`;
|
|
3332
3344
|
const boxMid = `\u2502 ${label.padEnd(boxWidth - 2).substring(0, boxWidth - 2)} \u2502`;
|
|
3333
3345
|
const boxBottom = `\u2570${"\u2500".repeat(boxWidth)}\u256F`;
|
|
3334
|
-
yield { type: "visual_feedback", content:
|
|
3335
|
-
|
|
3336
|
-
${boxTop}
|
|
3346
|
+
yield { type: "visual_feedback", content: `${boxTop}
|
|
3337
3347
|
${boxMid}
|
|
3338
|
-
${boxBottom}
|
|
3339
|
-
` };
|
|
3348
|
+
${boxBottom}` };
|
|
3340
3349
|
}
|
|
3341
3350
|
if (toolCall.toolName === "exec_command") {
|
|
3342
3351
|
const { command } = parseArgs(toolCall.args);
|
|
@@ -5669,7 +5678,7 @@ var init_app = __esm({
|
|
|
5669
5678
|
init_text();
|
|
5670
5679
|
SESSION_START_TIME = Date.now();
|
|
5671
5680
|
CHANGELOG_URL = "https://fluxflow-cli.onrender.com/changelog.html";
|
|
5672
|
-
versionFluxflow = "1.9.
|
|
5681
|
+
versionFluxflow = "1.9.7";
|
|
5673
5682
|
updatedOn = "2026-05-14";
|
|
5674
5683
|
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(
|
|
5675
5684
|
CommandMenu,
|