fluxflow-cli 2.12.0 → 2.12.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 +22 -4
- package/package.json +1 -1
package/dist/fluxflow.js
CHANGED
|
@@ -749,6 +749,7 @@ import os2 from "os";
|
|
|
749
749
|
var wrapText, formatTokens, truncatePath, parsePatchPairs, applyPatches, generateHighFidelityDiff;
|
|
750
750
|
var init_text = __esm({
|
|
751
751
|
"src/utils/text.js"() {
|
|
752
|
+
init_paths();
|
|
752
753
|
wrapText = (text, width) => {
|
|
753
754
|
if (!text) return "";
|
|
754
755
|
const ansiRegex = /\x1B\[[0-?]*[ -/]*[@-~]/g;
|
|
@@ -812,10 +813,11 @@ var init_text = __esm({
|
|
|
812
813
|
return num.toString();
|
|
813
814
|
};
|
|
814
815
|
truncatePath = (p, maxLength = 40) => {
|
|
815
|
-
|
|
816
|
+
let data_dir = DATA_DIR.replaceAll("\\\\", "\\");
|
|
817
|
+
p = p.replace(os2.homedir(), "~").replace(data_dir, "FluxFlow").replaceAll("\\", "/");
|
|
816
818
|
if (!p || p.length <= maxLength) return p;
|
|
817
819
|
const half = Math.floor((maxLength - 3) / 2);
|
|
818
|
-
return p.substring(0, half) + "..." + p.substring(p.length - half);
|
|
820
|
+
return p.substring(0, half) + "..." + p.substring(p.length - half).replaceAll("\\", "/");
|
|
819
821
|
};
|
|
820
822
|
parsePatchPairs = (args) => {
|
|
821
823
|
const patchPairs = [];
|
|
@@ -11442,6 +11444,7 @@ function App({ args = [] }) {
|
|
|
11442
11444
|
const isThirdRender = useRef3(true);
|
|
11443
11445
|
const prevProviderRef = useRef3(aiProvider);
|
|
11444
11446
|
const originalAllowExternalAccessRef = useRef3(false);
|
|
11447
|
+
const originalMemoryRef = useRef3(true);
|
|
11445
11448
|
useEffect8(() => {
|
|
11446
11449
|
if (prevProviderRef.current !== aiProvider) {
|
|
11447
11450
|
prevProviderRef.current = aiProvider;
|
|
@@ -11901,6 +11904,7 @@ function App({ args = [] }) {
|
|
|
11901
11904
|
}
|
|
11902
11905
|
const saved = await loadSettings();
|
|
11903
11906
|
originalAllowExternalAccessRef.current = saved.systemSettings?.allowExternalAccess ?? false;
|
|
11907
|
+
originalMemoryRef.current = saved.systemSettings?.memory ?? true;
|
|
11904
11908
|
if (parsedArgs.mode) {
|
|
11905
11909
|
setMode(parsedArgs.mode);
|
|
11906
11910
|
} else {
|
|
@@ -11980,6 +11984,7 @@ function App({ args = [] }) {
|
|
|
11980
11984
|
}
|
|
11981
11985
|
if (parsedArgs.playground) {
|
|
11982
11986
|
freshSettings.allowExternalAccess = false;
|
|
11987
|
+
freshSettings.memory = false;
|
|
11983
11988
|
}
|
|
11984
11989
|
setSystemSettings(freshSettings);
|
|
11985
11990
|
setProfileData(saved.profileData);
|
|
@@ -12059,7 +12064,7 @@ function App({ args = [] }) {
|
|
|
12059
12064
|
const newMsgs = [...prev, {
|
|
12060
12065
|
id: "playground-" + Date.now(),
|
|
12061
12066
|
role: "system",
|
|
12062
|
-
text: `[PLAYGROUND] Mode active. CWD locked to:
|
|
12067
|
+
text: `[PLAYGROUND] Mode active. CWD locked to: FluxFlow/playground`,
|
|
12063
12068
|
isMeta: true
|
|
12064
12069
|
}];
|
|
12065
12070
|
setCompletedIndex(newMsgs.length);
|
|
@@ -12118,7 +12123,8 @@ function App({ args = [] }) {
|
|
|
12118
12123
|
if (parsedArgs.playground) {
|
|
12119
12124
|
settingsToSave = {
|
|
12120
12125
|
...systemSettings,
|
|
12121
|
-
allowExternalAccess: originalAllowExternalAccessRef.current
|
|
12126
|
+
allowExternalAccess: originalAllowExternalAccessRef.current,
|
|
12127
|
+
memory: originalMemoryRef.current
|
|
12122
12128
|
};
|
|
12123
12129
|
}
|
|
12124
12130
|
saveSettings({
|
|
@@ -12587,6 +12593,18 @@ ${cleanText}`, color: "magenta" }];
|
|
|
12587
12593
|
{ id: "logo-" + Date.now(), role: "system", isLogo: true, isMeta: true }
|
|
12588
12594
|
]);
|
|
12589
12595
|
setCompletedIndex(1);
|
|
12596
|
+
if (parsedArgs.playground) {
|
|
12597
|
+
parsedArgs.playground = false;
|
|
12598
|
+
deleteChat(PLAYGROUND_CHAT_ID).catch(() => {
|
|
12599
|
+
});
|
|
12600
|
+
fs22.remove(path20.join(DATA_DIR, "playground")).catch(() => {
|
|
12601
|
+
});
|
|
12602
|
+
setSystemSettings((s2) => ({
|
|
12603
|
+
...s2,
|
|
12604
|
+
allowExternalAccess: originalAllowExternalAccessRef.current,
|
|
12605
|
+
memory: originalMemoryRef.current
|
|
12606
|
+
}));
|
|
12607
|
+
}
|
|
12590
12608
|
setChatId(generateChatId());
|
|
12591
12609
|
setSessionStats({ tokens: 0 });
|
|
12592
12610
|
setIsExpanded(false);
|