fluxflow-cli 1.7.12 → 1.7.13

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 +32 -15
  2. package/package.json +1 -1
package/dist/fluxflow.js CHANGED
@@ -158,21 +158,29 @@ var init_ChatLayout = __esm({
158
158
  const sourceLines = text.split(/\r?\n/);
159
159
  let finalLines = [];
160
160
  sourceLines.forEach((sLine) => {
161
- const words = sLine.split(" ");
161
+ if (sLine.length <= width) {
162
+ finalLines.push(sLine);
163
+ return;
164
+ }
162
165
  let currentLine = "";
166
+ const words = sLine.split(/(\s+)/);
163
167
  words.forEach((word) => {
164
168
  if ((currentLine + word).length > width) {
165
- if (currentLine) finalLines.push(currentLine.trim());
166
- currentLine = word + " ";
167
- while (currentLine.length > width) {
168
- finalLines.push(currentLine.substring(0, width));
169
- currentLine = currentLine.substring(width) + " ";
169
+ if (currentLine) finalLines.push(currentLine.replace(/\s+$/, ""));
170
+ if (word.trim().length === 0) {
171
+ currentLine = "";
172
+ } else {
173
+ currentLine = word;
174
+ while (currentLine.length > width) {
175
+ finalLines.push(currentLine.substring(0, width));
176
+ currentLine = currentLine.substring(width);
177
+ }
170
178
  }
171
179
  } else {
172
- currentLine += word + " ";
180
+ currentLine += word;
173
181
  }
174
182
  });
175
- if (currentLine) finalLines.push(currentLine.trim());
183
+ if (currentLine) finalLines.push(currentLine.replace(/\s+$/, ""));
176
184
  });
177
185
  return finalLines.join("\n");
178
186
  };
@@ -1781,19 +1789,28 @@ var init_update_file = __esm({
1781
1789
  `;
1782
1790
  const contextStart = Math.max(0, startLine - 16);
1783
1791
  for (let i = contextStart; i < startLine - 1; i++) {
1784
- diffText += `[UI_CONTEXT] ${i + 1}| ${allOriginalLines[i]}
1792
+ diffText += `[UI_CONTEXT] ${i + 1}|${allOriginalLines[i]}
1785
1793
  `;
1786
1794
  }
1787
- oldLines.forEach((line, i) => {
1788
- diffText += `-${startLine + i}| ${line}
1795
+ const lineStartPos = currentContent.lastIndexOf("\n", startPos) + 1;
1796
+ const affectedEndPos = startPos + content_to_replace.length;
1797
+ const lineEndPos = currentContent.indexOf("\n", affectedEndPos);
1798
+ const actualEndPos = lineEndPos === -1 ? currentContent.length : lineEndPos;
1799
+ const fullOldLines = currentContent.substring(lineStartPos, actualEndPos).split("\n");
1800
+ const newAffectedEndPos = startPos + content_to_add.length;
1801
+ const newLineEndPos = newFileContent.indexOf("\n", newAffectedEndPos);
1802
+ const actualNewEndPos = newLineEndPos === -1 ? newFileContent.length : newLineEndPos;
1803
+ const fullNewLines = newFileContent.substring(lineStartPos, actualNewEndPos).split("\n");
1804
+ fullOldLines.forEach((line, i) => {
1805
+ diffText += `-${startLine + i}|${line}
1789
1806
  `;
1790
1807
  });
1791
- newLines.forEach((line, i) => {
1792
- diffText += `+${startLine + i}| ${line}
1808
+ fullNewLines.forEach((line, i) => {
1809
+ diffText += `+${startLine + i}|${line}
1793
1810
  `;
1794
1811
  });
1795
1812
  for (let i = endLine; i < Math.min(allOriginalLines.length, endLine + 15); i++) {
1796
- diffText += `[UI_CONTEXT] ${i + 1}| ${allOriginalLines[i]}
1813
+ diffText += `[UI_CONTEXT] ${i + 1}|${allOriginalLines[i]}
1797
1814
  `;
1798
1815
  }
1799
1816
  diffText += `[DIFF_END]`;
@@ -4652,7 +4669,7 @@ var init_app = __esm({
4652
4669
  init_setup();
4653
4670
  SESSION_START_TIME = Date.now();
4654
4671
  CHANGELOG_URL = "https://fluxflow-cli.onrender.com/changelog.html";
4655
- versionFluxflow = "1.7.12";
4672
+ versionFluxflow = "1.7.13";
4656
4673
  updatedOn = "2026-05-04";
4657
4674
  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(
4658
4675
  CommandMenu,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fluxflow-cli",
3
- "version": "1.7.12",
3
+ "version": "1.7.13",
4
4
  "description": "A high-fidelity agentic terminal assistant for the Flux Era.",
5
5
  "keywords": [
6
6
  "ai",