fluxflow-cli 1.7.11 → 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.
- package/dist/fluxflow.js +33 -16
- 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
|
-
|
|
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.
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
currentLine =
|
|
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.
|
|
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}
|
|
1792
|
+
diffText += `[UI_CONTEXT] ${i + 1}|${allOriginalLines[i]}
|
|
1785
1793
|
`;
|
|
1786
1794
|
}
|
|
1787
|
-
|
|
1788
|
-
|
|
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
|
-
|
|
1792
|
-
diffText += `+${startLine + i}
|
|
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}
|
|
1813
|
+
diffText += `[UI_CONTEXT] ${i + 1}|${allOriginalLines[i]}
|
|
1797
1814
|
`;
|
|
1798
1815
|
}
|
|
1799
1816
|
diffText += `[DIFF_END]`;
|
|
@@ -2488,7 +2505,7 @@ USER_PROMPT: ${agentText}`.trim();
|
|
|
2488
2505
|
const thinkBlocks = turnText.match(/<think>([\s\S]*?)(?:<\/think>|$)/gi) || [];
|
|
2489
2506
|
const thinkContent = thinkBlocks.join("");
|
|
2490
2507
|
const headingsCount = (thinkContent.match(/\*\*.*?\*\*/g) || []).length;
|
|
2491
|
-
if (headingsCount >
|
|
2508
|
+
if (headingsCount > 35) {
|
|
2492
2509
|
yield { type: "status", content: "Loop Detected. Restarting internal loop." };
|
|
2493
2510
|
await new Promise((resolve) => setTimeout(resolve, 3e3));
|
|
2494
2511
|
break;
|
|
@@ -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.
|
|
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,
|