fluxflow-cli 1.6.5 → 1.6.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.
Files changed (2) hide show
  1. package/dist/fluxflow.js +58 -12
  2. package/package.json +1 -1
package/dist/fluxflow.js CHANGED
@@ -257,7 +257,7 @@ var init_ChatLayout = __esm({
257
257
  flushBuffers("final");
258
258
  return /* @__PURE__ */ React2.createElement(Box2, { flexDirection: "column", width: columns - 2 }, result);
259
259
  });
260
- DiffLine = React2.memo(({ line }) => {
260
+ DiffLine = React2.memo(({ line, columns = 80 }) => {
261
261
  const isContext = line.includes("[UI_CONTEXT]");
262
262
  const cleanLine = line.replace("[UI_CONTEXT]", "");
263
263
  const isRemoval = cleanLine.startsWith("-");
@@ -267,7 +267,7 @@ var init_ChatLayout = __esm({
267
267
  const content = parts.slice(1).join("|");
268
268
  const bgColor = isRemoval ? "#3a0c0c" : isAddition ? "#0c3a1a" : "#1a1a1a";
269
269
  const textColor = isRemoval ? "#ff4d4d" : isAddition ? "#4dff88" : "white";
270
- return /* @__PURE__ */ React2.createElement(Box2, { backgroundColor: bgColor, paddingX: 1, width: "100%" }, /* @__PURE__ */ React2.createElement(Box2, { width: 5, flexShrink: 0 }, /* @__PURE__ */ React2.createElement(Text2, { color: isRemoval ? "#cf3a3a" : isAddition ? "#3acf65" : "gray", dimColor: true }, lineNum)), /* @__PURE__ */ React2.createElement(Box2, { width: 2, flexShrink: 0, marginLeft: 1 }, /* @__PURE__ */ React2.createElement(Text2, { color: textColor, bold: true }, isRemoval ? "-" : isAddition ? "+" : " ")), /* @__PURE__ */ React2.createElement(Box2, { flexGrow: 1, marginLeft: 1 }, /* @__PURE__ */ React2.createElement(Text2, { color: textColor, wrap: "anywhere" }, content)));
270
+ return /* @__PURE__ */ React2.createElement(Box2, { backgroundColor: bgColor, paddingX: 1, width: "100%" }, /* @__PURE__ */ React2.createElement(Box2, { width: 5, flexShrink: 0 }, /* @__PURE__ */ React2.createElement(Text2, { color: isRemoval ? "#cf3a3a" : isAddition ? "#3acf65" : "gray", dimColor: true }, lineNum)), /* @__PURE__ */ React2.createElement(Box2, { width: 2, flexShrink: 0, marginLeft: 1 }, /* @__PURE__ */ React2.createElement(Text2, { color: textColor, bold: true }, isRemoval ? "-" : isAddition ? "+" : " ")), /* @__PURE__ */ React2.createElement(Box2, { flexGrow: 1, marginLeft: 1 }, /* @__PURE__ */ React2.createElement(Text2, { color: textColor }, wrapText(content, columns - 10))));
271
271
  });
272
272
  DiffBlock = React2.memo(({ text, columns = 80 }) => {
273
273
  const beforeDiff = text.substring(0, text.indexOf("[DIFF_START]")).trim();
@@ -275,7 +275,7 @@ var init_ChatLayout = __esm({
275
275
  const match = text.match(/\[DIFF_START\]([\s\S]*?)\[DIFF_END\]/);
276
276
  const diffBody = match ? match[1].trim() : "";
277
277
  const diffLines = diffBody.split("\n");
278
- return /* @__PURE__ */ React2.createElement(Box2, { flexDirection: "column", width: "100%" }, beforeDiff && /* @__PURE__ */ React2.createElement(MarkdownText, { text: beforeDiff, columns }), /* @__PURE__ */ React2.createElement(Box2, { flexDirection: "column", marginTop: 1, backgroundColor: "#1a1a1a", paddingY: 0, width: "100%" }, diffLines.map((line, i) => /* @__PURE__ */ React2.createElement(DiffLine, { key: i, line }))), afterDiff && /* @__PURE__ */ React2.createElement(MarkdownText, { text: afterDiff, columns }));
278
+ return /* @__PURE__ */ React2.createElement(Box2, { flexDirection: "column", width: "100%" }, beforeDiff && /* @__PURE__ */ React2.createElement(MarkdownText, { text: beforeDiff, columns }), /* @__PURE__ */ React2.createElement(Box2, { flexDirection: "column", marginTop: 1, backgroundColor: "#1a1a1a", paddingY: 0, width: "100%" }, diffLines.map((line, i) => /* @__PURE__ */ React2.createElement(DiffLine, { key: i, line, columns }))), afterDiff && /* @__PURE__ */ React2.createElement(MarkdownText, { text: afterDiff, columns }));
279
279
  });
280
280
  CodeRenderer = React2.memo(({ text, columns = 80 }) => {
281
281
  if (!text) return null;
@@ -676,7 +676,7 @@ ${mode === "Flux" ? `
676
676
  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 read images & documents.
677
677
  2. List Files: tool:functions.list_files(path="relative/path"). Lists content of a directory.
678
678
  3. Read Folder: tool:functions.read_folder(path="relative/path"). Detailed stats of a directory.
679
- 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.
679
+ 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 '"'.
680
680
  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.
681
681
  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, 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.
682
682
  7. Execution: tool:functions.exec_command(command="terminal command"). Runs a shell command.
@@ -1025,17 +1025,63 @@ var init_arg_parser = __esm({
1025
1025
  "src/utils/arg_parser.js"() {
1026
1026
  parseArgs = (argsString) => {
1027
1027
  const args = {};
1028
- const regex = /(\w+)\s*=\s*(?:(["'`])((?:\\.|(?!\2)[\s\S])*)\2|([^,\s\)]+))/g;
1029
- let match;
1030
- while ((match = regex.exec(argsString)) !== null) {
1031
- const key = match[1];
1032
- let value = match[3] !== void 0 ? match[3] : match[4];
1033
- if (match[3] !== void 0) {
1028
+ if (!argsString) return args;
1029
+ let i = 0;
1030
+ while (i < argsString.length) {
1031
+ while (i < argsString.length && /[\s,]/.test(argsString[i])) i++;
1032
+ if (i >= argsString.length) break;
1033
+ let keyMatch = argsString.substring(i).match(/^(\w+)\s*=\s*/);
1034
+ if (!keyMatch) {
1035
+ i++;
1036
+ continue;
1037
+ }
1038
+ const key = keyMatch[1];
1039
+ i += keyMatch[0].length;
1040
+ let value = "";
1041
+ if (i < argsString.length && (argsString[i] === '"' || argsString[i] === "'" || argsString[i] === "`")) {
1042
+ const quote = argsString[i];
1043
+ i++;
1044
+ let start = i;
1045
+ let end = -1;
1046
+ let searchIndex = i;
1047
+ while (searchIndex < argsString.length) {
1048
+ let qIdx = argsString.indexOf(quote, searchIndex);
1049
+ if (qIdx === -1) break;
1050
+ if (argsString[qIdx - 1] === "\\" && argsString[qIdx - 2] !== "\\") {
1051
+ searchIndex = qIdx + 1;
1052
+ continue;
1053
+ }
1054
+ const after = argsString.substring(qIdx + 1).trim();
1055
+ const isLogicalEnd = after === "" || // End of entire string
1056
+ after.startsWith(")") || // End of tool call
1057
+ after.startsWith(",") || // Next argument separator
1058
+ /^(\w+)\s*=/.test(after);
1059
+ if (isLogicalEnd) {
1060
+ end = qIdx;
1061
+ break;
1062
+ }
1063
+ searchIndex = qIdx + 1;
1064
+ }
1065
+ if (end !== -1) {
1066
+ value = argsString.substring(start, end);
1067
+ i = end + 1;
1068
+ } else {
1069
+ value = argsString.substring(start);
1070
+ i = argsString.length;
1071
+ }
1034
1072
  try {
1035
- value = JSON.parse(`"${value.replace(/"/g, '\\"').replace(/\n/g, "\\n").replace(/\r/g, "\\r")}"`);
1073
+ if (value.includes("\\")) {
1074
+ value = JSON.parse(`"${value.replace(/"/g, '\\"').replace(/\n/g, "\\n").replace(/\r/g, "\\r")}"`);
1075
+ }
1036
1076
  } catch (e) {
1037
1077
  value = value.replace(/\\"/g, '"').replace(/\\'/g, "'").replace(/\\`/g, "`").replace(/\\\\/g, "\\");
1038
1078
  }
1079
+ } else {
1080
+ let endMatch = argsString.substring(i).match(/([^,\s\)]+)/);
1081
+ if (endMatch) {
1082
+ value = endMatch[1];
1083
+ i += value.length;
1084
+ }
1039
1085
  }
1040
1086
  if (value === "true") value = true;
1041
1087
  else if (value === "false") value = false;
@@ -4297,7 +4343,7 @@ var init_app = __esm({
4297
4343
  init_setup();
4298
4344
  SESSION_START_TIME = Date.now();
4299
4345
  CHANGELOG_URL = "https://fluxflow-cli.onrender.com/changelog.html";
4300
- versionFluxflow = "1.6.5";
4346
+ versionFluxflow = "1.6.6";
4301
4347
  updatedOn = "2026-05-02";
4302
4348
  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(
4303
4349
  CommandMenu,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fluxflow-cli",
3
- "version": "1.6.5",
3
+ "version": "1.6.6",
4
4
  "description": "A high-fidelity agentic terminal assistant for the Flux Era.",
5
5
  "keywords": [
6
6
  "ai",