fluxflow-cli 2.11.1 → 2.11.2
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 +43 -9
- package/package.json +2 -2
package/dist/fluxflow.js
CHANGED
|
@@ -3146,8 +3146,7 @@ function SettingsMenu({
|
|
|
3146
3146
|
Text6,
|
|
3147
3147
|
{
|
|
3148
3148
|
color: isSelected ? "white" : "grey",
|
|
3149
|
-
bold: isSelected
|
|
3150
|
-
underline: isParserDownload
|
|
3149
|
+
bold: isSelected
|
|
3151
3150
|
},
|
|
3152
3151
|
isSelected ? "\u276F " : " ",
|
|
3153
3152
|
item.label
|
|
@@ -10289,8 +10288,10 @@ var init_ResumeModal = __esm({
|
|
|
10289
10288
|
|
|
10290
10289
|
// src/components/MemoryModal.jsx
|
|
10291
10290
|
import React10, { useState as useState7, useEffect as useEffect5 } from "react";
|
|
10292
|
-
import { Box as Box10, Text as Text10, useInput as useInput5 } from "ink";
|
|
10291
|
+
import { Box as Box10, Text as Text10, useInput as useInput5, useStdout } from "ink";
|
|
10293
10292
|
function MemoryModal({ onClose }) {
|
|
10293
|
+
const { stdout } = useStdout();
|
|
10294
|
+
const columns = stdout?.columns || 80;
|
|
10294
10295
|
const [memories, setMemories] = useState7([]);
|
|
10295
10296
|
const [selectedIndex, setSelectedIndex] = useState7(0);
|
|
10296
10297
|
const [isMemoryOn, setIsMemoryOn] = useState7(true);
|
|
@@ -10322,9 +10323,42 @@ function MemoryModal({ onClose }) {
|
|
|
10322
10323
|
}
|
|
10323
10324
|
}
|
|
10324
10325
|
});
|
|
10325
|
-
const
|
|
10326
|
+
const formatMemory = (text, idx, isSelected) => {
|
|
10326
10327
|
if (!text) return "";
|
|
10327
|
-
|
|
10328
|
+
const clean = text.replace(/\[Saved on: .*?\]/g, "").replace(/\\+'/g, "'").trim();
|
|
10329
|
+
const prefix = `${isSelected ? "\u276F " : " "}${idx + 1}. `;
|
|
10330
|
+
const prefixLen = prefix.length;
|
|
10331
|
+
const rightPadding = isSelected ? 22 : 2;
|
|
10332
|
+
const parts = clean.split("\n");
|
|
10333
|
+
return parts.map((part, partIdx) => {
|
|
10334
|
+
const isFirstPart = partIdx === 0;
|
|
10335
|
+
const firstLineMax = Math.max(10, columns - 4 - (isFirstPart ? prefixLen : 3) - rightPadding);
|
|
10336
|
+
const subLineMax = Math.max(10, columns - 4 - 3 - rightPadding);
|
|
10337
|
+
const words = part.split(/(\s+)/);
|
|
10338
|
+
const lines = [];
|
|
10339
|
+
let currentLine = "";
|
|
10340
|
+
words.forEach((word) => {
|
|
10341
|
+
if (word.length === 0) return;
|
|
10342
|
+
const currentLimit = lines.length === 0 ? firstLineMax : subLineMax;
|
|
10343
|
+
if (currentLine.length + word.length > currentLimit) {
|
|
10344
|
+
if (currentLine.trim().length > 0) {
|
|
10345
|
+
lines.push(currentLine.trimEnd());
|
|
10346
|
+
currentLine = word;
|
|
10347
|
+
} else {
|
|
10348
|
+
lines.push(word.substring(0, currentLimit));
|
|
10349
|
+
currentLine = word.substring(currentLimit);
|
|
10350
|
+
}
|
|
10351
|
+
} else {
|
|
10352
|
+
currentLine += word;
|
|
10353
|
+
}
|
|
10354
|
+
});
|
|
10355
|
+
if (currentLine.trimEnd().length > 0) {
|
|
10356
|
+
lines.push(currentLine.trimEnd());
|
|
10357
|
+
}
|
|
10358
|
+
if (lines.length === 0) return "";
|
|
10359
|
+
const wrapped = lines.join("\n ");
|
|
10360
|
+
return isFirstPart ? wrapped : " " + wrapped;
|
|
10361
|
+
}).join("\n");
|
|
10328
10362
|
};
|
|
10329
10363
|
const totalCapacity = 4 * 1024 * 2;
|
|
10330
10364
|
const currentLength = memories.reduce((acc, m) => acc + (m.memory?.length || 0), 0);
|
|
@@ -10348,8 +10382,8 @@ function MemoryModal({ onClose }) {
|
|
|
10348
10382
|
backgroundColor: isSelected ? "#2a2a2a" : void 0,
|
|
10349
10383
|
width: "100%"
|
|
10350
10384
|
},
|
|
10351
|
-
/* @__PURE__ */ React10.createElement(Box10, { flexGrow: 1 }, /* @__PURE__ */ React10.createElement(Text10, { color: isSelected ? "white" : "grey", bold: isSelected }, isSelected ? "\u276F " : " ", idx + 1, ". ",
|
|
10352
|
-
isSelected && /* @__PURE__ */ React10.createElement(Box10, { flexShrink: 0 }, /* @__PURE__ */ React10.createElement(Text10, { color: "grey", dimColor: true }, "[
|
|
10385
|
+
/* @__PURE__ */ React10.createElement(Box10, { flexGrow: 1 }, /* @__PURE__ */ React10.createElement(Text10, { color: isSelected ? "white" : "grey", bold: isSelected }, isSelected ? "\u276F " : " ", idx + 1, ". ", formatMemory(mem.memory, idx, isSelected))),
|
|
10386
|
+
isSelected && /* @__PURE__ */ React10.createElement(Box10, { flexShrink: 0 }, /* @__PURE__ */ React10.createElement(Text10, { color: "grey", dimColor: true }, " [", /* @__PURE__ */ React10.createElement(Text10, { italic: true }, mem.score), "] "), /* @__PURE__ */ React10.createElement(Text10, { color: "grey", bold: true }, "[X] WIPE "))
|
|
10353
10387
|
);
|
|
10354
10388
|
})), /* @__PURE__ */ React10.createElement(
|
|
10355
10389
|
Box10,
|
|
@@ -11015,7 +11049,7 @@ __export(app_exports, {
|
|
|
11015
11049
|
});
|
|
11016
11050
|
import os4 from "os";
|
|
11017
11051
|
import React14, { useState as useState11, useEffect as useEffect8, useRef as useRef3, useMemo as useMemo2 } from "react";
|
|
11018
|
-
import { Box as Box14, Text as Text14, useInput as useInput8, useStdout } from "ink";
|
|
11052
|
+
import { Box as Box14, Text as Text14, useInput as useInput8, useStdout as useStdout2 } from "ink";
|
|
11019
11053
|
import fs22 from "fs-extra";
|
|
11020
11054
|
import path20 from "path";
|
|
11021
11055
|
import { exec as exec2 } from "child_process";
|
|
@@ -11026,7 +11060,7 @@ import gradient2 from "gradient-string";
|
|
|
11026
11060
|
function App({ args = [] }) {
|
|
11027
11061
|
const [confirmExit, setConfirmExit] = useState11(false);
|
|
11028
11062
|
const [exitCountdown, setExitCountdown] = useState11(10);
|
|
11029
|
-
const { stdout } =
|
|
11063
|
+
const { stdout } = useStdout2();
|
|
11030
11064
|
const [input, setInput] = useState11("");
|
|
11031
11065
|
const [inputKey, setInputKey] = useState11(0);
|
|
11032
11066
|
const [isExpanded, setIsExpanded] = useState11(false);
|