fluxflow-cli 1.5.3 → 1.5.4

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.
Files changed (2) hide show
  1. package/dist/fluxflow.js +42 -18
  2. package/package.json +1 -1
package/dist/fluxflow.js CHANGED
@@ -257,6 +257,9 @@ var init_ChatLayout = __esm({
257
257
  MessageItem = React2.memo(({ msg, showFullThinking, columns = 80 }) => {
258
258
  const isDiffResult = msg.role === "system" && msg.text?.includes("[DIFF_START]");
259
259
  const isTerminalRecord = msg.isTerminalRecord;
260
+ if (msg.isVisualFeedback) {
261
+ return /* @__PURE__ */ React2.createElement(Box2, { marginBottom: 1, paddingX: 1, width: "100%" }, /* @__PURE__ */ React2.createElement(Text2, { color: "white" }, msg.text));
262
+ }
260
263
  if (msg.role === "system" && msg.text?.includes("[TOOL_RESULT]") && !isDiffResult && !isTerminalRecord) return null;
261
264
  if (msg.isAskRecord) {
262
265
  const selectionMatch = msg.text.match(/Selection: (.*)/);
@@ -612,7 +615,7 @@ ${mode === "Flux" ? `
612
615
  3. Read Folder: tool:functions.read_folder(path="relative/path"). Detailed stats of a directory.
613
616
  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.
614
617
  5. Update File: tool:functions.update_file(path="relative/path", content_to_replace="old", content_to_add="new"). Surgical patching. RETURNS: High-fidelity visual diff and old code block. You MUST verify that the change specifically matches your intent using the returned diff. PREFFER UPDATE FILE OVER WRITE FILE if file already exists for better reversal tracking (if a file has 500+ lines, try to stick with update_file over full-rewrite). DONT WRAP UPDATE FILE CALL CONTENT IN MARKDOWN CODE BLOCKS.
615
- 6. Write PDF: tool:functions.write_pdf(path="path", content="<html/css content>", orientation="portrait/landscape"). Generates a professional PDF document. Orientation are optional. A4 size page will be used. DO NOT ADD FOOTER MANUALLY, the system will handle it automatically. USE CSS TO VISUALLY BEAUTIFY THE DOCUMENT.
618
+ 6. Write PDF: tool:functions.write_pdf(path="path", content="<html/css content>", orientation="portrait/landscape"). Generates a professional PDF document. Orientation are 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.
616
619
  7. Execution: tool:functions.exec_command(command="terminal command"). Runs a shell command.
617
620
 
618
621
  **NOTE:** WHEN WRITING/UPDATING FILES, USE ACTUAL NEW LINE CHARACTER FOR LINE BREAKS RATHER THAN STRING '\\n'`.trim() : `
@@ -972,6 +975,9 @@ var init_arg_parser = __esm({
972
975
  if (value === "true") value = true;
973
976
  else if (value === "false") value = false;
974
977
  else if (typeof value === "string" && !isNaN(value) && value.trim() !== "") value = Number(value);
978
+ if (typeof value === "string" && (key.toLowerCase().includes("path") || ["dest", "source", "to", "from"].includes(key.toLowerCase()))) {
979
+ value = value.replace(/\x0C/g, "\\f").replace(/\x0D/g, "\\r").replace(/\x0B/g, "\\v").replace(/\x08/g, "\\b");
980
+ }
975
981
  args[key] = value;
976
982
  }
977
983
  return args;
@@ -1733,16 +1739,33 @@ var init_write_pdf = __esm({
1733
1739
  const page = await browser.newPage();
1734
1740
  const styledContent = `
1735
1741
  <style>
1736
- @page {
1737
- margin: ${margin};
1742
+ @page {
1743
+ margin: ${margin};
1738
1744
  }
1739
- body {
1740
- margin: 0;
1745
+ body {
1746
+ margin: 0;
1741
1747
  padding: 0;
1742
1748
  font-family: system-ui, -apple-system, sans-serif;
1743
1749
  }
1744
1750
  * { box-sizing: border-box; }
1751
+ .watermark {
1752
+ position: fixed;
1753
+ top: 50%;
1754
+ left: 50%;
1755
+ transform: translate(-50%, -50%) rotate(-50deg);
1756
+ font-size: 52px;
1757
+ font-weight: bold;
1758
+ color: rgba(0, 0, 0, 0.005);
1759
+ pointer-events: none;
1760
+ z-index: 1000;
1761
+ text-align: center;
1762
+ width: 150%;
1763
+ white-space: nowrap;
1764
+ text-transform: uppercase;
1765
+ letter-spacing: 5px;
1766
+ }
1745
1767
  </style>
1768
+ <div class="watermark">Generated by FluxFlow CLI (AI)</div>
1746
1769
  ${content}
1747
1770
  `;
1748
1771
  await page.setContent(styledContent, { waitUntil: "networkidle0" });
@@ -1753,17 +1776,9 @@ var init_write_pdf = __esm({
1753
1776
  margin: {
1754
1777
  top: margin,
1755
1778
  right: margin,
1756
- bottom: "15mm",
1757
- // Space for watermark
1779
+ bottom: margin,
1758
1780
  left: margin
1759
1781
  },
1760
- displayHeaderFooter: true,
1761
- headerTemplate: "<span></span>",
1762
- footerTemplate: `
1763
- <div style="font-size: 9px; color: rgba(0,0,0,0.2); width: 100%; text-align: right; padding-right: 15mm; font-family: system-ui, sans-serif; -webkit-print-color-adjust: exact;">
1764
- FluxFlow CLI
1765
- </div>
1766
- `,
1767
1782
  printBackground: true
1768
1783
  });
1769
1784
  const stats = await fs13.stat(absolutePath);
@@ -2102,7 +2117,7 @@ USER_PROMPT: ${agentText}`.trim();
2102
2117
  const boxTop = `\u256D${"\u2500".repeat(boxWidth)}\u256E`;
2103
2118
  const boxMid = `\u2502 ${label.padEnd(boxWidth - 2).substring(0, boxWidth - 2)} \u2502`;
2104
2119
  const boxBottom = `\u2570${"\u2500".repeat(boxWidth)}\u256F`;
2105
- yield { type: "text", content: `
2120
+ yield { type: "visual_feedback", content: `
2106
2121
 
2107
2122
  ${boxTop}
2108
2123
  ${boxMid}
@@ -3214,7 +3229,7 @@ ${timestamp}` };
3214
3229
  setIsExpanded(false);
3215
3230
  try {
3216
3231
  const cleanHistoryForAI = [...messages, userMessage].filter(
3217
- (m) => m.role !== "think" && !String(m.id).startsWith("welcome")
3232
+ (m) => m.role !== "think" && !m.isVisualFeedback && !String(m.id).startsWith("welcome")
3218
3233
  ).map((m) => ({
3219
3234
  ...m,
3220
3235
  text: m.fullText || m.text
@@ -3341,6 +3356,15 @@ Selection: ${val}`,
3341
3356
  });
3342
3357
  continue;
3343
3358
  }
3359
+ if (packet.type === "visual_feedback") {
3360
+ setMessages((prev) => [...prev, {
3361
+ id: "feedback-" + Date.now(),
3362
+ role: "system",
3363
+ text: packet.content,
3364
+ isVisualFeedback: true
3365
+ }]);
3366
+ continue;
3367
+ }
3344
3368
  if (packet.type === "exec_start") {
3345
3369
  continue;
3346
3370
  }
@@ -3452,7 +3476,7 @@ Selection: ${val}`,
3452
3476
  setActiveView("resolution");
3453
3477
  }
3454
3478
  setMessages((prev) => {
3455
- const historyToSave = prev.filter((m) => !String(m.id).startsWith("welcome"));
3479
+ const historyToSave = prev.filter((m) => !String(m.id).startsWith("welcome") && !m.isVisualFeedback);
3456
3480
  saveChat(chatId, null, historyToSave);
3457
3481
  setCompletedIndex(prev.length);
3458
3482
  return prev;
@@ -4121,7 +4145,7 @@ var init_app = __esm({
4121
4145
  init_setup();
4122
4146
  SESSION_START_TIME = Date.now();
4123
4147
  CHANGELOG_URL = "https://fluxflow-cli.onrender.com/changelog.html";
4124
- versionFluxflow = "1.5.3";
4148
+ versionFluxflow = "1.5.4";
4125
4149
  updatedOn = "2026-05-02";
4126
4150
  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(
4127
4151
  CommandMenu,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fluxflow-cli",
3
- "version": "1.5.3",
3
+ "version": "1.5.4",
4
4
  "description": "A high-fidelity agentic terminal assistant for the Flux Era.",
5
5
  "keywords": [
6
6
  "ai",