fluxflow-cli 1.21.3 → 1.21.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 +30 -4
  2. package/package.json +1 -1
package/dist/fluxflow.js CHANGED
@@ -10184,11 +10184,37 @@ Selection: ${val}`,
10184
10184
  case "approval":
10185
10185
  return /* @__PURE__ */ React13.createElement(Box13, { flexDirection: "column", borderStyle: "round", borderColor: "yellow", paddingX: 2, paddingY: 1, width: "100%" }, /* @__PURE__ */ React13.createElement(Text13, { color: "yellow", bold: true, underline: true }, "\u{1F510} SECURITY GATE: FILE WRITE PERMISSION"), /* @__PURE__ */ React13.createElement(Text13, { marginTop: 1 }, "The agent is attempting to modify: ", /* @__PURE__ */ React13.createElement(Text13, { color: "cyan" }, parseArgs(pendingApproval?.args || "{}").path || "Unknown File")), /* @__PURE__ */ React13.createElement(Box13, { marginTop: 1, borderStyle: "single", borderColor: "#333", paddingX: 1, flexDirection: "column" }, /* @__PURE__ */ React13.createElement(Text13, { color: "gray" }, "--- PROPOSED CONTENT / DIFF ---"), (() => {
10186
10186
  const args2 = parseArgs(pendingApproval?.args || "{}");
10187
- const oldVal = args2.TargetContent || args2.content_to_replace || args2.replaceContent || null;
10188
- const newVal = args2.content || args2.ReplacementContent || args2.content_to_add || args2.replacementContent || args2.newContent || null;
10189
- if (oldVal && newVal) {
10190
- return /* @__PURE__ */ React13.createElement(Box13, { flexDirection: "column", marginTop: 1 }, /* @__PURE__ */ React13.createElement(Box13, null, /* @__PURE__ */ React13.createElement(Text13, { color: "red", wrap: "anywhere", bold: true }, "- ", oldVal)), /* @__PURE__ */ React13.createElement(Box13, { marginTop: 1 }, /* @__PURE__ */ React13.createElement(Text13, { color: "green", wrap: "anywhere", bold: true }, "+ ", newVal.replace(/\[\/n\]?/g, "\\n"))));
10187
+ const patchPairs = [];
10188
+ const indices = /* @__PURE__ */ new Set();
10189
+ Object.keys(args2).forEach((key) => {
10190
+ const m = key.match(/^(replaceContent|newContent|content_to_replace|content_to_add|TargetContent|ReplacementContent|replacementContent)(\d+)?$/);
10191
+ if (m) {
10192
+ const index = m[2] ? parseInt(m[2]) : 1;
10193
+ indices.add(index);
10194
+ }
10195
+ });
10196
+ const sortedIndices = Array.from(indices).sort((a, b) => a - b);
10197
+ sortedIndices.forEach((i) => {
10198
+ let r, n;
10199
+ if (i === 1) {
10200
+ r = args2.replaceContent1 ?? args2.content_to_replace1 ?? args2.replaceContent ?? args2.content_to_replace ?? args2.TargetContent ?? null;
10201
+ n = args2.newContent1 ?? args2.content_to_add1 ?? args2.newContent ?? args2.content_to_add ?? args2.ReplacementContent ?? args2.replacementContent ?? null;
10202
+ } else {
10203
+ r = args2[`replaceContent${i}`] ?? args2[`content_to_replace${i}`] ?? null;
10204
+ n = args2[`newContent${i}`] ?? args2[`content_to_add${i}`] ?? null;
10205
+ }
10206
+ if (r !== null || n !== null) {
10207
+ patchPairs.push({ replace: r, new: n });
10208
+ }
10209
+ });
10210
+ if (patchPairs.length > 0) {
10211
+ return /* @__PURE__ */ React13.createElement(Box13, { flexDirection: "column", marginTop: 1 }, patchPairs.map((pair, idx) => {
10212
+ const hasOld = pair.replace !== null;
10213
+ const hasNew = pair.new !== null;
10214
+ return /* @__PURE__ */ React13.createElement(Box13, { key: idx, flexDirection: "column", marginTop: idx > 0 ? 1 : 0 }, patchPairs.length > 1 && /* @__PURE__ */ React13.createElement(Text13, { color: "gray" }, "Block ", idx + 1, ":"), hasOld && /* @__PURE__ */ React13.createElement(Box13, null, /* @__PURE__ */ React13.createElement(Text13, { color: "red", wrap: "anywhere", bold: true }, "- ", pair.replace)), hasNew && /* @__PURE__ */ React13.createElement(Box13, { marginTop: hasOld ? 1 : 0 }, /* @__PURE__ */ React13.createElement(Text13, { color: "green", wrap: "anywhere", bold: true }, "+ ", pair.new.replace(/\[\/n\]?/g, "\\n"))));
10215
+ }));
10191
10216
  }
10217
+ const newVal = args2.content || args2.ReplacementContent || args2.content_to_add || args2.replacementContent || args2.newContent || null;
10192
10218
  return /* @__PURE__ */ React13.createElement(Text13, { color: "white", wrap: "anywhere" }, (newVal ? newVal.replace(/\[\/n\]?/g, "\\n") : null) || "Updating file content...");
10193
10219
  })()), /* @__PURE__ */ React13.createElement(Box13, { marginTop: 1 }, /* @__PURE__ */ React13.createElement(
10194
10220
  CommandMenu,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fluxflow-cli",
3
- "version": "1.21.3",
3
+ "version": "1.21.4",
4
4
  "date": "2026-06-06",
5
5
  "description": "A high-fidelity agentic terminal assistant for the Flux Era.",
6
6
  "keywords": [